Skip to content

Commit

Permalink
Merge pull request #44 from bgd-labs/feat/mantle-path-activation
Browse files Browse the repository at this point in the history
feat: Mantle a.DI activation path
  • Loading branch information
sendra authored Feb 12, 2025
2 parents ec0298e + c98028b commit 34b85a9
Show file tree
Hide file tree
Showing 8 changed files with 173 additions and 12 deletions.
9 changes: 6 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ BASE_KEY = --private-key ${PRIVATE_KEY}



custom_ethereum := --with-gas-price 3000000000 # 53 gwei
custom_ethereum := --with-gas-price 1000000000 # 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/
Expand Down Expand Up @@ -286,8 +286,11 @@ deploy-zksync-path-payload:
deploy-sonic-path-payload:
$(call deploy_fn,payloads/adapters/ethereum/Network_Deployments,ethereum)

deploy-mantle-path-payload:
$(call deploy_fn,payloads/adapters/ethereum/Network_Deployments,ethereum)

update-owners-and-guardians:
$(call deploy_fn,helpers/Update_Ownership,zksync)

update-sonic-permissions:
$(call deploy_fn,helpers/UpdateCCCPermissions,sonic)
update-ccc-permissions:
$(call deploy_fn,helpers/UpdateCCCPermissions,mantle)
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
## Raw diff

```json
{
"forwarderAdaptersByChain": {
"5000": {
"from": "",
"to": {
"0xb66FA987fa7975Cac3d12B629c9c44e459e50990": "0x4E740ac02b866b429738a9e225e92A15F4452521"
}
}
}
}
```
10 changes: 5 additions & 5 deletions scripts/helpers/UpdateCCCPermissions.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -39,24 +39,24 @@ abstract contract UpdateCCCPermissions {



contract UpdateCCCPermissionsSonic is UpdateCCCPermissions {
contract UpdateCCCPermissionsMantle is UpdateCCCPermissions {
function targetOwner() public pure override returns (address) {
return 0x7b62461a3570c6AC8a9f8330421576e417B71EE7; // executor
return 0x70884634D0098782592111A2A6B8d223be31CB7b; // executor
}

function targetADIGuardian() public pure override returns (address) {
return 0x10078c1D8E46dd1ed5D8df2C42d5ABb969b11566; // Granular Guardian
return 0xb26670d2800DBB9cfCe2f2660FfDcA48C799c86d; // Granular Guardian
}


function aDIContractsToUpdate() public pure override returns (address[] memory) {
address[] memory contracts = new address[](1);
contracts[0] = 0x58e003a3C6f2Aeed6a2a6Bc77B504566523cb15c; // CCC
contracts[0] = 0x1283C5015B1Fb5616FA3aCb0C18e6879a02869cB; // CCC
return contracts;
}
}

contract Sonic is Script, UpdateCCCPermissionsSonic {
contract Mantle is Script, UpdateCCCPermissionsMantle {
function run() external {
vm.startBroadcast();

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import '../../../BaseDeployerScript.sol';
import '../../../../src/templates/SimpleAddForwarderAdapter.sol';

abstract contract Ethereum_Activate_Mantle_Bridge_Adapter_Payload is BaseDeployerScript {
function _getPayloadByteCode() internal virtual returns (bytes memory);

function PAYLOAD_SALT() internal pure virtual returns (string memory) {
return 'Add Mantle path to a.DI';
}

function DESTINATION_CHAIN_ID() internal pure virtual returns (uint256);

function _deployPayload(AddForwarderAdapterArgs memory args) internal returns (address) {
bytes memory payloadCode = abi.encodePacked(_getPayloadByteCode(), abi.encode(args));

return _deployByteCode(payloadCode, PAYLOAD_SALT());
}

function _execute(Addresses memory addresses) internal virtual override {
Addresses memory destinationAddresses = _getAddresses(DESTINATION_CHAIN_ID());

_deployPayload(
AddForwarderAdapterArgs({
crossChainController: addresses.crossChainController,
currentChainBridgeAdapter: addresses.mantleAdapter,
destinationChainBridgeAdapter: destinationAddresses.mantleAdapter,
destinationChainId: DESTINATION_CHAIN_ID()
})
);
}
}
17 changes: 16 additions & 1 deletion scripts/payloads/adapters/ethereum/Network_Deployments.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,26 @@ import '../../../BaseDeployerScript.sol';
import {Ethereum_Activate_Celo_Bridge_Adapter_Payload} from './Ethereum_Activate_Celo_Bridge_Adapter_Payload.s.sol';
import {Ethereum_Activate_Lina_Bridge_Adapter_Payload} from './Ethereum_Activate_Lina_Bridge_Adapter_Payload.s.sol';
import {Ethereum_Activate_Sonic_Bridge_Adapter_Payload} from './Ethereum_Activate_Sonic_Bridge_Adapter_Payload.s.sol';
import {Ethereum_Activate_Mantle_Bridge_Adapter_Payload} from './Ethereum_Activate_Mantle_Bridge_Adapter_Payload.s.sol';
import {Ethereum_Celo_Path_Payload} from '../../../../src/adapter_payloads/Ethereum_Celo_Path_Payload.sol';
import {Ethereum_Sonic_Path_Payload} from '../../../../src/adapter_payloads/Ethereum_Sonic_Path_Payload.sol';
import {SimpleAddForwarderAdapter} from '../../../../src/templates/SimpleAddForwarderAdapter.sol';

contract Ethereum is Ethereum_Activate_Sonic_Bridge_Adapter_Payload {
contract Ethereum is Ethereum_Activate_Mantle_Bridge_Adapter_Payload {
function TRANSACTION_NETWORK() internal pure override returns (uint256) {
return ChainIds.ETHEREUM;
}

function _getPayloadByteCode() internal pure override returns (bytes memory) {
return type(SimpleAddForwarderAdapter).creationCode;
}

function DESTINATION_CHAIN_ID() internal pure override returns (uint256) {
return ChainIds.MANTLE;
}
}

contract Ethereum_Sonic is Ethereum_Activate_Sonic_Bridge_Adapter_Payload {
function TRANSACTION_NETWORK() internal pure override returns (uint256) {
return ChainIds.ETHEREUM;
}
Expand Down
7 changes: 5 additions & 2 deletions tests/adi/ADITestBase.sol
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,7 @@ contract ADITestBase is Test {
uint256 chainId
) internal pure returns (uint256[] memory) {
if (chainId == ChainIds.MAINNET) {
uint256[] memory chainIds = new uint256[](13);
uint256[] memory chainIds = new uint256[](14);
chainIds[0] = ChainIds.MAINNET;
chainIds[1] = ChainIds.POLYGON;
chainIds[2] = ChainIds.AVALANCHE;
Expand All @@ -644,7 +644,8 @@ contract ADITestBase is Test {
chainIds[10] = ChainIds.LINEA;
chainIds[11] = ChainIds.CELO;
chainIds[12] = ChainIds.SONIC;

chainIds[13] = ChainIds.MANTLE;

return chainIds;
} else if (chainId == ChainIds.POLYGON) {
uint256[] memory chainIds = new uint256[](1);
Expand Down Expand Up @@ -725,6 +726,8 @@ contract ADITestBase is Test {
return 0x50F4dAA86F3c747ce15C3C38bD0383200B61d6Dd;
} else if (chainId == ChainIds.SONIC) {
return 0x58e003a3C6f2Aeed6a2a6Bc77B504566523cb15c;
} else if (chainId == ChainIds.MANTLE) {
return 0x1283C5015B1Fb5616FA3aCb0C18e6879a02869cB;
}
revert();
}
Expand Down
92 changes: 92 additions & 0 deletions tests/payloads/ethereum/AddMantlePathTest.t.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.0;

import 'forge-std/console.sol';
import {ADITestBase} from '../../adi/ADITestBase.sol';
import {Addresses, Ethereum as PayloadEthereumScript} from '../../../scripts/payloads/adapters/ethereum/Network_Deployments.s.sol';
import {SimpleAddForwarderAdapter, AddForwarderAdapterArgs} from '../../../src/templates/SimpleAddForwarderAdapter.sol';

abstract contract BaseAddMantlePathPayloadTest is ADITestBase {
address internal _payload;
address internal _crossChainController;

string internal NETWORK;
uint256 internal immutable BLOCK_NUMBER;

constructor(string memory network, uint256 blockNumber) {
NETWORK = network;
BLOCK_NUMBER = blockNumber;
}

function _getDeployedPayload() internal virtual returns (address);

function _getPayload() internal virtual returns (address);

function _getCurrentNetworkAddresses() internal virtual returns (Addresses memory);

function setUp() public {
vm.createSelectFork(vm.rpcUrl(NETWORK), BLOCK_NUMBER);

Addresses memory addresses = _getCurrentNetworkAddresses();
_crossChainController = addresses.crossChainController;

_payload = _getPayload();
}

function test_defaultTest() public {
defaultTest(
string.concat('add_mantle_path_to_adi', NETWORK),
_crossChainController,
address(_payload),
false,
vm
);
}

function test_samePayloadAddress(
address currentChainAdapter,
address destinationChainAdapter,
address crossChainController,
uint256 destinationChainId
) public {
SimpleAddForwarderAdapter deployedPayload = SimpleAddForwarderAdapter(_getDeployedPayload());
SimpleAddForwarderAdapter predictedPayload = SimpleAddForwarderAdapter(_getPayload());

assertEq(predictedPayload.DESTINATION_CHAIN_ID(), deployedPayload.DESTINATION_CHAIN_ID());
assertEq(predictedPayload.CROSS_CHAIN_CONTROLLER(), deployedPayload.CROSS_CHAIN_CONTROLLER());
assertEq(
predictedPayload.CURRENT_CHAIN_BRIDGE_ADAPTER(),
deployedPayload.CURRENT_CHAIN_BRIDGE_ADAPTER()
);
assertEq(
predictedPayload.DESTINATION_CHAIN_BRIDGE_ADAPTER(),
deployedPayload.DESTINATION_CHAIN_BRIDGE_ADAPTER()
);
}
}

contract EthereumAddMantlePathPayloadTest is
PayloadEthereumScript,
BaseAddMantlePathPayloadTest('ethereum', 21830243)
{
function _getDeployedPayload() internal pure override returns (address) {
return 0x184CA99Cd89313c00a69b9A8E1649D84FBD8D86D;
}

function _getCurrentNetworkAddresses() internal view override returns (Addresses memory) {
return _getAddresses(TRANSACTION_NETWORK());
}

function _getPayload() internal override returns (address) {
Addresses memory currentAddresses = _getCurrentNetworkAddresses();
Addresses memory destinationAddresses = _getAddresses(DESTINATION_CHAIN_ID());

AddForwarderAdapterArgs memory args = AddForwarderAdapterArgs({
crossChainController: currentAddresses.crossChainController,
currentChainBridgeAdapter: currentAddresses.mantleAdapter, // ethereum -> mantle bridge adapter
destinationChainBridgeAdapter: destinationAddresses.mantleAdapter, // mantle bridge adapter
destinationChainId: DESTINATION_CHAIN_ID()
});
return _deployPayload(args);
}
}
2 changes: 1 addition & 1 deletion tests/payloads/ethereum/AddSonicPathTest.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ pragma solidity ^0.8.0;

import 'forge-std/console.sol';
import {ADITestBase} from '../../adi/ADITestBase.sol';
import { Addresses, Ethereum as PayloadEthereumScript} from '../../../scripts/payloads/adapters/ethereum/Network_Deployments.s.sol';
import { Addresses, Ethereum_Sonic as PayloadEthereumScript} from '../../../scripts/payloads/adapters/ethereum/Network_Deployments.s.sol';
import {Ethereum_Sonic_Path_Payload, AddForwarderAdapterArgs} from '../../../src/adapter_payloads/Ethereum_Sonic_Path_Payload.sol';

abstract contract BaseAddSonicPathPayloadTest is ADITestBase {
Expand Down

3 comments on commit 34b85a9

@sakulstra
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

♻️ Forge Gas Snapshots

Seems like you are not measuring gas of any operations yet. 🤔
Consider adding some snapshot tests to measure regressions & improvements.

@sakulstra
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🌈 Test Results
No files changed, compilation skipped

Ran 3 tests for tests/access_control/GranularGuardianDeployTest.t.sol:ArbitrumGGTest
[PASS] test_initialization() (gas: 214313)
[PASS] test_updateGuardian(address) (runs: 256, μ: 210166, ~: 210166)
[PASS] test_updateGuardianWhenWrongCaller(address,address) (runs: 256, μ: 12968, ~: 12968)
Suite result: ok. 3 passed; 0 failed; 0 skipped; finished in 18.47s (18.14s CPU time)
2025-02-12T15:25:33.715512Z ERROR cheatcodes: non-empty stderr input=["npx", "@bgd-labs/aave-cli@^0.16.2", "adi-diff-snapshots", "./reports/adi_add_celo_path_to_adiethereum_before.json", "./reports/adi_add_celo_path_to_adiethereum_after.json", "-o", "./diffs/adi_add_celo_path_to_adiethereum_before_adi_add_celo_path_to_adiethereum_after.md"] stderr="npm warn exec The following package was not found and will be installed: @bgd-labs/aave-cli@0.16.4\nnpm warn deprecated stable@0.1.8: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility\nnpm warn deprecated interface-ipld-format@1.0.1: This module has been superseded by the multiformats module\nnpm warn deprecated cids@1.1.9: This module has been superseded by the multiformats module\nnpm warn deprecated multibase@4.0.6: This module has been superseded by the multiformats module\nnpm warn deprecated multicodec@3.2.1: This module has been superseded by the multiformats module\nnpm warn deprecated ipld-dag-pb@0.22.3: This module has been superseded by @ipld/dag-pb and multiformats\nfile:///home/runner/.npm/_npx/98f577e373727b30/node_modules/@bgd-labs/aave-cli/dist/cli.js:399\nimport { CHAIN_ID_CLIENT_MAP } from \"@bgd-labs/js-utils\";\n         ^^^^^^^^^^^^^^^^^^^\nSyntaxError: Named export 'CHAIN_ID_CLIENT_MAP' not found. The requested module '@bgd-labs/js-utils' is a CommonJS module, which may not support all module.exports as named exports.\nCommonJS modules can always be imported via the default export, for example using:\n\nimport pkg from '@bgd-labs/js-utils';\nconst { CHAIN_ID_CLIENT_MAP } = pkg;\n\n    at ModuleJob._instantiate (node:internal/modules/esm/module_job:146:21)\n    at async ModuleJob.run (node:internal/modules/esm/module_job:229:5)\n    at async ModuleLoader.import (node:internal/modules/esm/loader:473:24)\n    at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:122:5)\n\nNode.js v20.18.2\n"

Ran 1 test for tests/payloads/ethereum/AddCeloPathTest.t.sol:EthereumAddCeloPathPayloadTest
[PASS] test_defaultTest() (gas: 1737067)
Suite result: ok. 1 passed; 0 failed; 0 skipped; finished in 21.83s (20.43s CPU time)
2025-02-12T15:25:42.911774Z ERROR cheatcodes: non-empty stderr input=["npx", "@bgd-labs/aave-cli@^0.16.2", "adi-diff-snapshots", "./reports/adi_add_mantle_path_to_adiethereum_before.json", "./reports/adi_add_mantle_path_to_adiethereum_after.json", "-o", "./diffs/adi_add_mantle_path_to_adiethereum_before_adi_add_mantle_path_to_adiethereum_after.md"] stderr="file:///home/runner/.npm/_npx/98f577e373727b30/node_modules/@bgd-labs/aave-cli/dist/cli.js:399\nimport { CHAIN_ID_CLIENT_MAP } from \"@bgd-labs/js-utils\";\n         ^^^^^^^^^^^^^^^^^^^\nSyntaxError: Named export 'CHAIN_ID_CLIENT_MAP' not found. The requested module '@bgd-labs/js-utils' is a CommonJS module, which may not support all module.exports as named exports.\nCommonJS modules can always be imported via the default export, for example using:\n\nimport pkg from '@bgd-labs/js-utils';\nconst { CHAIN_ID_CLIENT_MAP } = pkg;\n\n    at ModuleJob._instantiate (node:internal/modules/esm/module_job:146:21)\n    at async ModuleJob.run (node:internal/modules/esm/module_job:229:5)\n    at async ModuleLoader.import (node:internal/modules/esm/loader:473:24)\n    at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:122:5)\n\nNode.js v20.18.2\n"

Ran 2 tests for tests/payloads/ethereum/AddMantlePathTest.t.sol:EthereumAddMantlePathPayloadTest
[PASS] test_defaultTest() (gas: 1676828)
[PASS] test_samePayloadAddress(address,address,address,uint256) (runs: 256, μ: 391783, ~: 391783)
Suite result: ok. 2 passed; 0 failed; 0 skipped; finished in 10.02s (9.44s CPU time)
2025-02-12T15:25:45.566540Z ERROR cheatcodes: non-empty stderr input=["npx", "@bgd-labs/aave-cli@^0.16.2", "adi-diff-snapshots", "./reports/adi_add_sonic_path_to_adiethereum_before.json", "./reports/adi_add_sonic_path_to_adiethereum_after.json", "-o", "./diffs/adi_add_sonic_path_to_adiethereum_before_adi_add_sonic_path_to_adiethereum_after.md"] stderr="file:///home/runner/.npm/_npx/98f577e373727b30/node_modules/@bgd-labs/aave-cli/dist/cli.js:399\nimport { CHAIN_ID_CLIENT_MAP } from \"@bgd-labs/js-utils\";\n         ^^^^^^^^^^^^^^^^^^^\nSyntaxError: Named export 'CHAIN_ID_CLIENT_MAP' not found. The requested module '@bgd-labs/js-utils' is a CommonJS module, which may not support all module.exports as named exports.\nCommonJS modules can always be imported via the default export, for example using:\n\nimport pkg from '@bgd-labs/js-utils';\nconst { CHAIN_ID_CLIENT_MAP } = pkg;\n\n    at ModuleJob._instantiate (node:internal/modules/esm/module_job:146:21)\n    at async ModuleJob.run (node:internal/modules/esm/module_job:229:5)\n    at async ModuleLoader.import (node:internal/modules/esm/loader:473:24)\n    at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:122:5)\n\nNode.js v20.18.2\n"

Ran 2 tests for tests/payloads/ethereum/AddSonicPathTest.t.sol:EthereumAddSonicPathPayloadTest
[PASS] test_defaultTest() (gas: 1839139)
[PASS] test_samePayloadAddress() (gas: 225232)
Suite result: ok. 2 passed; 0 failed; 0 skipped; finished in 1.83s (1.63s CPU time)

Ran 3 tests for tests/access_control/GranularGuardianDeployTest.t.sol:MetisGGTest
[PASS] test_initialization() (gas: 214354)
[PASS] test_updateGuardian(address) (runs: 256, μ: 210207, ~: 210207)
[PASS] test_updateGuardianWhenWrongCaller(address,address) (runs: 256, μ: 12968, ~: 12968)
Suite result: ok. 3 passed; 0 failed; 0 skipped; finished in 35.80s (35.38s CPU time)

Ran 3 tests for tests/access_control/GranularGuardianDeployTest.t.sol:OptimismGGTest
[PASS] test_initialization() (gas: 214336)
[PASS] test_updateGuardian(address) (runs: 256, μ: 210189, ~: 210189)
[PASS] test_updateGuardianWhenWrongCaller(address,address) (runs: 256, μ: 12968, ~: 12968)
Suite result: ok. 3 passed; 0 failed; 0 skipped; finished in 16.98s (16.77s CPU time)

Ran 3 tests for tests/access_control/GranularGuardianDeployTest.t.sol:ScrollGGTest
[PASS] test_initialization() (gas: 214469)
[PASS] test_updateGuardian(address) (runs: 256, μ: 210280, ~: 210280)
[PASS] test_updateGuardianWhenWrongCaller(address,address) (runs: 256, μ: 12968, ~: 12968)
Suite result: ok. 3 passed; 0 failed; 0 skipped; finished in 18.77s (18.51s CPU time)

Ran 7 tests for tests/access_control/GranularGuardianDeployTest.t.sol:EthereumGGTest
[PASS] test_initialization() (gas: 214857)
[PASS] test_retryEnvelope(address,uint256) (runs: 256, μ: 1962666, ~: 1967509)
[PASS] test_retryEnvelopeWhenWrongCaller(uint256,address) (runs: 256, μ: 14396, ~: 14396)
[PASS] test_retryTx(address,uint256) (runs: 256, μ: 1578339, ~: 1582748)
[PASS] test_retryTxWhenWrongCaller(uint256,address) (runs: 256, μ: 14514, ~: 14514)
[PASS] test_updateGuardian(address) (runs: 256, μ: 210821, ~: 210821)
[PASS] test_updateGuardianWhenWrongCaller(address,address) (runs: 256, μ: 12990, ~: 12990)
Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 118.60s (118.21s CPU time)

Ran 5 tests for tests/access_control/GranularGuardianDeployTest.t.sol:GnosisGGTest
[PASS] test_initialization() (gas: 214378)
[PASS] test_solveEmergencyDeprecated() (gas: 424035)
[PASS] test_solveEmergencyDeprecatedWhenWrongCaller(address) (runs: 256, μ: 18137, ~: 18137)
[PASS] test_updateGuardian(address) (runs: 256, μ: 210321, ~: 210321)
[PASS] test_updateGuardianWhenWrongCaller(address,address) (runs: 256, μ: 12980, ~: 12980)
Suite result: ok. 5 passed; 0 failed; 0 skipped; finished in 48.58s (48.31s CPU time)

Ran 3 tests for tests/access_control/GranularGuardianDeployTest.t.sol:LineaGGTest
[PASS] test_initialization() (gas: 214538)
[PASS] test_updateGuardian(address) (runs: 256, μ: 207693, ~: 207693)
[PASS] test_updateGuardianWhenWrongCaller(address,address) (runs: 256, μ: 12968, ~: 12968)
Suite result: ok. 3 passed; 0 failed; 0 skipped; finished in 19.09s (18.83s CPU time)

Ran 9 tests for tests/access_control/GranularGuardianDeployTest.t.sol:PolygonGGTest
[PASS] test_initialization() (gas: 214912)
[PASS] test_retryEnvelope(address,uint256) (runs: 256, μ: 1929640, ~: 1932658)
[PASS] test_retryEnvelopeWhenWrongCaller(uint256,address) (runs: 256, μ: 14386, ~: 14386)
[PASS] test_retryTx(address,uint256) (runs: 256, μ: 1544938, ~: 1548790)
[PASS] test_retryTxWhenWrongCaller(uint256,address) (runs: 256, μ: 14549, ~: 14549)
[PASS] test_solveEmergencyDeprecated() (gas: 425097)
[PASS] test_solveEmergencyWhenWrongCallerDeprecated(address) (runs: 256, μ: 18136, ~: 18136)
[PASS] test_updateGuardian(address) (runs: 256, μ: 210897, ~: 210897)
[PASS] test_updateGuardianWhenWrongCaller(address,address) (runs: 256, μ: 12992, ~: 13002)
Suite result: ok. 9 passed; 0 failed; 0 skipped; finished in 121.18s (120.86s CPU time)

Ran 3 tests for tests/access_control/GranularGuardianDeployTest.t.sol:CBaseGGTest
[PASS] test_initialization() (gas: 214400)
[PASS] test_updateGuardian(address) (runs: 256, μ: 210211, ~: 210211)
[PASS] test_updateGuardianWhenWrongCaller(address,address) (runs: 256, μ: 12968, ~: 12968)
Suite result: ok. 3 passed; 0 failed; 0 skipped; finished in 17.00s (16.79s CPU time)

Ran 9 tests for tests/access_control/GranularGuardianDeployTest.t.sol:AvalancheGGTest
[PASS] test_initialization() (gas: 214935)
[PASS] test_retryEnvelope(address,uint256) (runs: 256, μ: 1914363, ~: 1919055)
[PASS] test_retryEnvelopeWhenWrongCaller(uint256,address) (runs: 256, μ: 14386, ~: 14386)
[PASS] test_retryTx(address,uint256) (runs: 256, μ: 1601178, ~: 1607348)
[PASS] test_retryTxWhenWrongCaller(uint256,address) (runs: 256, μ: 14539, ~: 14549)
[PASS] test_solveEmergencyDeprecated() (gas: 425143)
[PASS] test_solveEmergencyWhenWrongCallerDeprecated(address) (runs: 256, μ: 18136, ~: 18136)
[PASS] test_updateGuardian(address) (runs: 256, μ: 210920, ~: 210920)
[PASS] test_updateGuardianWhenWrongCaller(address,address) (runs: 256, μ: 13002, ~: 13002)
Suite result: ok. 9 passed; 0 failed; 0 skipped; finished in 140.32s (137.66s CPU time)

Ran 5 tests for tests/access_control/GranularGuardianDeployTest.t.sol:BinanceGGTest
[PASS] test_initialization() (gas: 214314)
[PASS] test_solveEmergencyDeprecated() (gas: 423907)
[PASS] test_solveEmergencyDeprecatedWhenWrongCaller(address) (runs: 256, μ: 18137, ~: 18137)
[PASS] test_updateGuardian(address) (runs: 256, μ: 210257, ~: 210257)
[PASS] test_updateGuardianWhenWrongCaller(address,address) (runs: 256, μ: 12980, ~: 12980)
Suite result: ok. 5 passed; 0 failed; 0 skipped; finished in 40.82s (40.53s CPU time)

Ran 14 test suites in 159.47s (629.28s CPU time): 58 tests passed, 0 failed, 0 skipped (58 total tests)

@sakulstra
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔮 Coverage report
File Line Coverage Function Coverage Branch Coverage
src/adapter_payloads/Ethereum_Celo_Path_Payload.sol ${\color{orange}93.33\%}$
$14 / 15$
43
${\color{red}50\%}$
$1 / 2$
Ethereum_Celo_Path_Payload.getForwarderBridgeAdaptersToEnable
${\color{green}100\%}$
$0 / 0$
src/adapter_payloads/Ethereum_Sonic_Path_Payload.sol ${\color{orange}91.67\%}$
$22 / 24$
43, 81
${\color{red}50\%}$
$2 / 4$
Ethereum_Sonic_Path_Payload.getForwarderBridgeAdaptersToEnable, Ethereum_Sonic_Path_Payload._updateOptimalBandwidth
${\color{green}100\%}$
$0 / 0$
src/ccc_payloads/shuffle/ShuffleCCCUpdatePayload.sol ${\color{red}0\%}$
$0 / 47$
17, 18, 19, 21, 25 and 42 more
${\color{red}0\%}$
$0 / 10$
Ethereum_Add_Shuffle_to_CCC_Payload.getInitializeSignature, Polygon_Add_Shuffle_to_CCC_Payload.getInitializeSignature, Avalanche_Add_Shuffle_to_CCC_Payload.getInitializeSignature, Arbitrum_Add_Shuffle_to_CCC_Payload.getInitializeSignature, Optimism_Add_Shuffle_to_CCC_Payload.getInitializeSignature and 5 more
${\color{green}100\%}$
$0 / 0$
src/templates/BaseADIPayloadUpdate.sol ${\color{green}100\%}$
$2 / 2$
${\color{green}100\%}$
$1 / 1$
${\color{green}100\%}$
$0 / 0$
src/templates/BaseAdaptersUpdate.sol ${\color{green}100\%}$
$3 / 3$
${\color{green}100\%}$
$1 / 1$
${\color{green}100\%}$
$0 / 0$
src/templates/BaseCCCUpdate.sol ${\color{red}0\%}$
$0 / 5$
30, 33, 34, 40, 41
${\color{red}0\%}$
$0 / 2$
BaseCCCUpdate.constructor, BaseCCCUpdate.execute
${\color{green}100\%}$
$0 / 0$
src/templates/BaseForwarderAdaptersUpdate.sol ${\color{red}63.16\%}$
$12 / 19$
12, 22, 28, 32, 37 and 2 more
${\color{red}0\%}$
$0 / 4$
BaseForwarderAdaptersUpdate.getForwarderBridgeAdaptersToRemove, BaseForwarderAdaptersUpdate.getForwarderBridgeAdaptersToEnable, BaseForwarderAdaptersUpdate.getOptimalBandwidthByChain, BaseForwarderAdaptersUpdate.executeForwardersUpdate
${\color{red}33.33\%}$
$1 / 3$
src/templates/BaseReceiverAdaptersUpdate.sol ${\color{red}61.54\%}$
$8 / 13$
12, 23, 33, 38, 45
${\color{red}0\%}$
$0 / 3$
BaseReceiverAdaptersUpdate.getReceiverBridgeAdaptersToRemove, BaseReceiverAdaptersUpdate.getReceiverBridgeAdaptersToAllow, BaseReceiverAdaptersUpdate.executeReceiversUpdate
${\color{red}0\%}$
$0 / 2$
src/templates/SimpleAddForwarderAdapter.sol ${\color{orange}88.89\%}$
$8 / 9$
31
${\color{red}50\%}$
$1 / 2$
SimpleAddForwarderAdapter.getForwarderBridgeAdaptersToEnable
${\color{green}100\%}$
$0 / 0$
src/templates/SimpleOneToManyAdapterUpdate.sol ${\color{red}0\%}$
$0 / 39$
26, 27, 28, 35, 41 and 34 more
${\color{red}0\%}$
$0 / 7$
SimpleOneToManyAdapterUpdate.constructor, SimpleOneToManyAdapterUpdate.getDestinationAdapters, SimpleOneToManyAdapterUpdate.getChainsToSend, SimpleOneToManyAdapterUpdate.getReceiverBridgeAdaptersToRemove, SimpleOneToManyAdapterUpdate.getForwarderBridgeAdaptersToRemove and 2 more
${\color{red}0\%}$
$0 / 6$
src/templates/SimpleReceiverAdapterUpdate.sol ${\color{red}0\%}$
$0 / 17$
27, 28, 29, 39, 46 and 12 more
${\color{red}0\%}$
$0 / 3$
SimpleReceiverAdapterUpdate.constructor, SimpleReceiverAdapterUpdate.getReceiverBridgeAdaptersToRemove, SimpleReceiverAdapterUpdate.getReceiverBridgeAdaptersToAllow
${\color{red}0\%}$
$0 / 4$

Please sign in to comment.