From c75b647b02df0efd6a078dec609d54e62825c4a4 Mon Sep 17 00:00:00 2001 From: viraj124 Date: Thu, 9 Jan 2025 12:25:47 +0530 Subject: [PATCH 1/5] chore: remove indexed keyword in some L1 contract events --- .../fuelchain/FuelMessagePortal/v3/FuelMessagePortalV3.sol | 2 +- .../messaging/gateway/FuelERC20Gateway/FuelERC20GatewayV4.sol | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/solidity-contracts/contracts/fuelchain/FuelMessagePortal/v3/FuelMessagePortalV3.sol b/packages/solidity-contracts/contracts/fuelchain/FuelMessagePortal/v3/FuelMessagePortalV3.sol index 25354547..44082172 100644 --- a/packages/solidity-contracts/contracts/fuelchain/FuelMessagePortal/v3/FuelMessagePortalV3.sol +++ b/packages/solidity-contracts/contracts/fuelchain/FuelMessagePortal/v3/FuelMessagePortalV3.sol @@ -9,7 +9,7 @@ contract FuelMessagePortalV3 is FuelMessagePortalV2 { using FuelBlockHeaderLiteLib for FuelBlockHeaderLite; /// @dev Emitted when fuel chain state is emitted - event FuelChainStateUpdated(address indexed sender, address indexed oldValue, address indexed newValue); + event FuelChainStateUpdated(address sender, address indexed oldValue, address indexed newValue); /// @dev Emitted when rate limit is reset event ResetRateLimit(uint256 amount); diff --git a/packages/solidity-contracts/contracts/messaging/gateway/FuelERC20Gateway/FuelERC20GatewayV4.sol b/packages/solidity-contracts/contracts/messaging/gateway/FuelERC20Gateway/FuelERC20GatewayV4.sol index 39fbd6a8..86b00ec4 100644 --- a/packages/solidity-contracts/contracts/messaging/gateway/FuelERC20Gateway/FuelERC20GatewayV4.sol +++ b/packages/solidity-contracts/contracts/messaging/gateway/FuelERC20Gateway/FuelERC20GatewayV4.sol @@ -43,10 +43,10 @@ contract FuelERC20GatewayV4 is error RateLimitExceeded(); /// @dev Emitted when tokens are deposited from Ethereum to Fuel - event Deposit(bytes32 indexed sender, address indexed tokenAddress, uint256 amount); + event Deposit(bytes32 sender, address indexed tokenAddress, uint256 amount); /// @dev Emitted when tokens are withdrawn from Fuel to Ethereum - event Withdrawal(bytes32 indexed recipient, address indexed tokenAddress, uint256 amount); + event Withdrawal(bytes32 recipient, address indexed tokenAddress, uint256 amount); /// @dev Emitted when rate limit is reset event RateLimitUpdated(address indexed tokenAddress, uint256 amount); From 2fb5ee75a34f3c0e26fbabe5f301ac94ae3ec6f8 Mon Sep 17 00:00:00 2001 From: viraj124 Date: Thu, 9 Jan 2025 12:32:35 +0530 Subject: [PATCH 2/5] chore: add token id in deposit and withdrawal events in the L2 bridge --- .../bridge-fungible-token/implementation/src/events.sw | 2 ++ .../bridge-fungible-token/implementation/src/main.sw | 2 ++ 2 files changed, 4 insertions(+) diff --git a/packages/fungible-token/bridge-fungible-token/implementation/src/events.sw b/packages/fungible-token/bridge-fungible-token/implementation/src/events.sw index bddafca7..1d37d42f 100644 --- a/packages/fungible-token/bridge-fungible-token/implementation/src/events.sw +++ b/packages/fungible-token/bridge-fungible-token/implementation/src/events.sw @@ -13,12 +13,14 @@ pub struct DepositEvent { pub amount: u64, pub from: b256, pub to: Identity, + pub token_id: b256 } pub struct WithdrawalEvent { pub amount: u64, pub from: Identity, pub to: b256, + pub token_id: b256 } pub struct ClaimRefundEvent { diff --git a/packages/fungible-token/bridge-fungible-token/implementation/src/main.sw b/packages/fungible-token/bridge-fungible-token/implementation/src/main.sw index b249e94d..006600f5 100644 --- a/packages/fungible-token/bridge-fungible-token/implementation/src/main.sw +++ b/packages/fungible-token/bridge-fungible-token/implementation/src/main.sw @@ -181,6 +181,7 @@ impl Bridge for Contract { to: to, from: sender, amount: amount, + token_id }); } @@ -455,6 +456,7 @@ fn _process_deposit(message_data: DepositMessage, msg_idx: u64) { to: message_data.to, from: message_data.from, amount: amount, + token_id: message_data.token_id }); } From 79eec8d9177dde4544c594804254aa797d47ca87 Mon Sep 17 00:00:00 2001 From: viraj124 Date: Thu, 9 Jan 2025 12:33:40 +0530 Subject: [PATCH 3/5] chore: add changeset --- .changeset/hungry-badgers-study.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .changeset/hungry-badgers-study.md diff --git a/.changeset/hungry-badgers-study.md b/.changeset/hungry-badgers-study.md new file mode 100644 index 00000000..1ba4888b --- /dev/null +++ b/.changeset/hungry-badgers-study.md @@ -0,0 +1,6 @@ +--- +'@fuel-bridge/solidity-contracts': minor +'@fuel-bridge/fungible-token': minor +--- + +updates events in L1 and L2 contracts From 82043baaf789b3aec413701ed183811bf4c3aa75 Mon Sep 17 00:00:00 2001 From: viraj124 Date: Thu, 9 Jan 2025 15:07:38 +0530 Subject: [PATCH 4/5] chore: remove changeset --- .changeset/hungry-badgers-study.md | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 .changeset/hungry-badgers-study.md diff --git a/.changeset/hungry-badgers-study.md b/.changeset/hungry-badgers-study.md deleted file mode 100644 index 1ba4888b..00000000 --- a/.changeset/hungry-badgers-study.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@fuel-bridge/solidity-contracts': minor -'@fuel-bridge/fungible-token': minor ---- - -updates events in L1 and L2 contracts From 16a974cba447780d2e0ae20bf2a0483b5d6f9fa8 Mon Sep 17 00:00:00 2001 From: viraj124 Date: Thu, 9 Jan 2025 15:19:41 +0530 Subject: [PATCH 5/5] chore: add changeset --- .changeset/brave-wombats-end.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .changeset/brave-wombats-end.md diff --git a/.changeset/brave-wombats-end.md b/.changeset/brave-wombats-end.md new file mode 100644 index 00000000..8c733a21 --- /dev/null +++ b/.changeset/brave-wombats-end.md @@ -0,0 +1,6 @@ +--- +'@fuel-bridge/solidity-contracts': minor +'@fuel-bridge/fungible-token': minor +--- + +upgrade events in L1 and L2 contracts