Skip to content

Commit ca2acbe

Browse files
committed
Merge branch 'feat-deployment-alt-gas-token' of https://github.com/scroll-tech/scroll-contracts into feat-deployment-alt-gas-token
2 parents 5489c1d + 4d2b3c6 commit ca2acbe

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

docker/templates/bridge-history-config.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
"LIDOGatewayAddr": "0x0000000000000000000000000000000000000000",
2020
"DAIGatewayAddr": "0x0000000000000000000000000000000000000000",
2121
"PufferGatewayAddr": "0x0000000000000000000000000000000000000000",
22-
"GasTokenGatewayAddr": null
22+
"GasTokenGatewayAddr": null,
23+
"WrappedTokenGatewayAddr": null
2324
},
2425
"L2": {
2526
"confirmation": 0,

scripts/deterministic/GenerateConfigs.s.sol

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,7 @@ contract GenerateBridgeHistoryConfig is DeployScroll {
188188
vm.writeJson(vm.toString(L1_ERC721_GATEWAY_PROXY_ADDR), BRIDGE_HISTORY_CONFIG_PATH, ".L1.ERC721GatewayAddr");
189189
vm.writeJson(vm.toString(L1_ERC1155_GATEWAY_PROXY_ADDR), BRIDGE_HISTORY_CONFIG_PATH, ".L1.ERC1155GatewayAddr");
190190
vm.writeJson(vm.toString(L1_GAS_TOKEN_GATEWAY_PROXY_ADDR), BRIDGE_HISTORY_CONFIG_PATH, ".L1.GasTokenGatewayAddr");
191+
vm.writeJson(vm.toString(L1_WRAPPED_TOKEN_GATEWAY_ADDR), BRIDGE_HISTORY_CONFIG_PATH, ".L1.WrappedTokenGatewayAddr");
191192

192193
// L2 contracts
193194
vm.writeJson(vm.toString(L2_MESSAGE_QUEUE_ADDR), BRIDGE_HISTORY_CONFIG_PATH, ".L2.MessageQueueAddr");

src/alternative-gas-token/L1WrappedTokenGateway.sol

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,16 @@ import {IWETH} from "../interfaces/IWETH.sol";
1212
contract L1WrappedTokenGateway {
1313
using SafeERC20 for IERC20;
1414

15+
/**********
16+
* Events *
17+
**********/
18+
19+
/// @notice Emitted when someone wrap ETH to WETH and then deposit WETH from L1 to L2.
20+
/// @param from The address of sender in L1.
21+
/// @param to The address of recipient in L2.
22+
/// @param amount The amount of ETH will be deposited from L1 to L2.
23+
event DepositWrappedToken(address indexed from, address indexed to, uint256 amount);
24+
1525
/*********
1626
* Error *
1727
*********/
@@ -79,6 +89,8 @@ contract L1WrappedTokenGateway {
7989
IL1ERC20Gateway(gateway).depositERC20{value: msg.value - _amount}(WETH, _to, _amount, SAFE_GAS_LIMIT);
8090
sender = DEFAULT_SENDER;
8191

92+
emit DepositWrappedToken(msg.sender, _to, _amount);
93+
8294
// refund exceed fee
8395
uint256 balance = address(this).balance;
8496
if (balance > 0) {

0 commit comments

Comments
 (0)