You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We can make some updates to events in the L1 contracts, mainly to save gas on L1, the potential changes would be as follows:
event FuelChainStateUpdated(address indexed sender, address indexed oldValue, address indexed newValue); can be updated to event FuelChainStateUpdated(address sender, address indexed oldValue, address indexed newValue); as only addresses with DEFAULT_ADMIN_ROLE can update the chain state contract, and addresses with that role are limited.
event Deposit(bytes32 indexed sender, address indexed tokenAddress, uint256 amount); can be changed to event Deposit(bytes32 sender, address indexed tokenAddress, uint256 amount); to remove the number of indexed arguments and save gas.
event Withdrawal(bytes32 indexed recipient, address indexed tokenAddress, uint256 amount); can be changed to event Withdrawal(bytes32 recipient, address indexed tokenAddress, uint256 amount); to remove the number of indexed arguments and save gas.
There is another update we can make to the L2 bridge contract events, which would be as follows:
pub struct DepositEvent {pub amount: u64, pub from: b256, pub to: Identity} can be updated to pub struct DepositEvent {pub amount: u64, pub from: b256, pub to: Identity, pub token_id: b256} to add the deposited token id.
pub struct WithdrawalEvent {pub amount: u64, pub from: b256, pub to: Identity} can be updated to pub struct WithdrawalEvent {pub amount: u64, pub from: b256, pub to: Identity, pub token_id: b256} to add the withdrawn token id.
The text was updated successfully, but these errors were encountered:
We can make some updates to events in the L1 contracts, mainly to save gas on L1, the potential changes would be as follows:
event FuelChainStateUpdated(address indexed sender, address indexed oldValue, address indexed newValue);
can be updated toevent FuelChainStateUpdated(address sender, address indexed oldValue, address indexed newValue);
as only addresses withDEFAULT_ADMIN_ROLE
can update the chain state contract, and addresses with that role are limited.event Deposit(bytes32 indexed sender, address indexed tokenAddress, uint256 amount);
can be changed toevent Deposit(bytes32 sender, address indexed tokenAddress, uint256 amount);
to remove the number of indexed arguments and save gas.event Withdrawal(bytes32 indexed recipient, address indexed tokenAddress, uint256 amount);
can be changed toevent Withdrawal(bytes32 recipient, address indexed tokenAddress, uint256 amount);
to remove the number of indexed arguments and save gas.There is another update we can make to the L2 bridge contract events, which would be as follows:
pub struct DepositEvent {pub amount: u64, pub from: b256, pub to: Identity}
can be updated topub struct DepositEvent {pub amount: u64, pub from: b256, pub to: Identity, pub token_id: b256}
to add the deposited token id.pub struct WithdrawalEvent {pub amount: u64, pub from: b256, pub to: Identity}
can be updated topub struct WithdrawalEvent {pub amount: u64, pub from: b256, pub to: Identity, pub token_id: b256}
to add the withdrawn token id.The text was updated successfully, but these errors were encountered: