diff --git a/Makefile b/Makefile index 1486c47..f7420de 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,7 @@ BASE_KEY = --private-key ${PRIVATE_KEY} -custom_ethereum := --with-gas-price 1500000000 # 53 gwei +custom_ethereum := --with-gas-price 3000000000 # 53 gwei #custom_polygon := --with-gas-price 190000000000 # 560 gwei #custom_avalanche := --with-gas-price 27000000000 # 27 gwei #custom_metis-testnet := --legacy --verifier-url https://goerli.explorer.metisdevops.link/api/ diff --git a/diffs/adi_add_sonic_path_to_adiethereum_before_adi_add_sonic_path_to_adiethereum_after.md b/diffs/adi_add_sonic_path_to_adiethereum_before_adi_add_sonic_path_to_adiethereum_after.md index ba6f8d6..e0a5cec 100644 --- a/diffs/adi_add_sonic_path_to_adiethereum_before_adi_add_sonic_path_to_adiethereum_after.md +++ b/diffs/adi_add_sonic_path_to_adiethereum_before_adi_add_sonic_path_to_adiethereum_after.md @@ -11,6 +11,14 @@ "0xe3a0d9754aD3452D687cf580Ba3674c2D7D2f7AE": "0x1905fCdDa41241C0871A5eC3f9dcC3E8d247261D" } } + }, + "optimalBandwidthByChain": { + "146": { + "optimalBandwidth": { + "from": "0", + "to": "2" + } + } } } ``` \ No newline at end of file diff --git a/src/adapter_payloads/Ethereum_Sonic_Path_Payload.sol b/src/adapter_payloads/Ethereum_Sonic_Path_Payload.sol index c0dea85..ec239dc 100644 --- a/src/adapter_payloads/Ethereum_Sonic_Path_Payload.sol +++ b/src/adapter_payloads/Ethereum_Sonic_Path_Payload.sol @@ -69,4 +69,24 @@ contract Ethereum_Sonic_Path_Payload is BaseAdaptersUpdate { return newForwarders; } + + function execute() public override { + executeReceiversUpdate(CROSS_CHAIN_CONTROLLER); + + executeForwardersUpdate(CROSS_CHAIN_CONTROLLER); + + _updateOptimalBandwidth(); + } + + function _updateOptimalBandwidth() public { + ICrossChainForwarder.OptimalBandwidthByChain[] memory optimalBandwidthByChain = + new ICrossChainForwarder.OptimalBandwidthByChain[](1); + optimalBandwidthByChain[0] = ICrossChainForwarder.OptimalBandwidthByChain({ + chainId: DESTINATION_CHAIN_ID, + optimalBandwidth: 2 + }); + ICrossChainForwarder(CROSS_CHAIN_CONTROLLER).updateOptimalBandwidthByChain( + optimalBandwidthByChain + ); + } } diff --git a/tests/payloads/ethereum/AddSonicPathTest.t.sol b/tests/payloads/ethereum/AddSonicPathTest.t.sol index 58e4435..3f7cd35 100644 --- a/tests/payloads/ethereum/AddSonicPathTest.t.sol +++ b/tests/payloads/ethereum/AddSonicPathTest.t.sol @@ -79,10 +79,10 @@ abstract contract BaseAddSonicPathPayloadTest is ADITestBase { contract EthereumAddSonicPathPayloadTest is PayloadEthereumScript, - BaseAddSonicPathPayloadTest('ethereum', 21822220) -{ // TODO: add new block number + BaseAddSonicPathPayloadTest('ethereum', 21824382) +{ function _getDeployedPayload() internal pure override returns (address) { - return 0xd16f822737b4e360671B4c2D5cdD811f5Aa6611C; + return 0x41FE455778201FB3AC7E41a7b2B4ffC90F08035e; } function _getCurrentNetworkAddresses() internal view override returns (Addresses memory) {