diff --git a/.changeset/hot-wombats-confess.md b/.changeset/hot-wombats-confess.md new file mode 100644 index 00000000..9248426c --- /dev/null +++ b/.changeset/hot-wombats-confess.md @@ -0,0 +1,5 @@ +--- +'@fuel-bridge/solidity-contracts': minor +--- + +Deploy mainnet contracts diff --git a/.github/workflows/verify-upgrade-mainnet.yml b/.github/workflows/verify-upgrade-mainnet.yml new file mode 100644 index 00000000..53e3abdc --- /dev/null +++ b/.github/workflows/verify-upgrade-mainnet.yml @@ -0,0 +1,32 @@ +name: Verify Mainnet Deployment + +on: + push: + branches: + - main + pull_request: + branches: + - main # Target branch for the PR + release: + types: [published] + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + verify-upgrade: + runs-on: ubuntu-latest + env: + RPC_URL: ${{ secrets.RPC_URL || 'https://eth.llamarpc.com' }} + if: github.event_name == 'pull_request' + steps: + - uses: actions/checkout@v3 + - uses: FuelLabs/github-actions/setups/node@master + with: + node-version: 20.16.0 + pnpm-version: 9.0.6 + - name: Verify deployment bytecode + run: | + npx hardhat compile && npx hardhat verify-mainnet-deployments --network mainnet + working-directory: ./packages/solidity-contracts diff --git a/packages/solidity-contracts/.openzeppelin/mainnet.json b/packages/solidity-contracts/.openzeppelin/mainnet.json new file mode 100644 index 00000000..5dd7cda4 --- /dev/null +++ b/packages/solidity-contracts/.openzeppelin/mainnet.json @@ -0,0 +1,1570 @@ +{ + "manifestVersion": "3.2", + "proxies": [ + { + "address": "0xf3D20Db1D16A4D0ad2f280A5e594FF3c7790f130", + "txHash": "0x01e63713a7ddee90866f272b7afb1d49aea17ed314edc7a80d00af36fd9b640a", + "kind": "uups" + }, + { + "address": "0xAEB0c00D0125A8a788956ade4f4F12Ead9f65DDf", + "txHash": "0xa06594153f87c4313fe3c5dd702cb063072dd438bac45b89b439ed7447b6ea9f", + "kind": "uups" + }, + { + "address": "0xa4cA04d02bfdC3A2DF56B9b6994520E69dF43F67", + "txHash": "0x57fd18a56dc2962a59b2404aedf837e4168c2487750d1f670563ec70066a62f8", + "kind": "uups" + } + ], + "impls": { + "0431e3a9f730aa01bced9634653b48ff489b2ccf33eb2282d7c2e488d2d8b324": { + "address": "0x725B2b1a15D818E1f25c68be77816802e6036559", + "txHash": "0xb4286d442ac343ffefa517448fc2be59036547d5d60bbf7a2fce7badb5e22e74", + "layout": { + "solcVersion": "0.8.9", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:40" + }, + { + "label": "_paused", + "offset": 0, + "slot": "51", + "type": "t_bool", + "contract": "PausableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:29" + }, + { + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage", + "contract": "PausableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:116" + }, + { + "label": "__gap", + "offset": 0, + "slot": "101", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC165Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol:41" + }, + { + "label": "_roles", + "offset": 0, + "slot": "151", + "type": "t_mapping(t_bytes32,t_struct(RoleData)23_storage)", + "contract": "AccessControlUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol:57" + }, + { + "label": "__gap", + "offset": 0, + "slot": "152", + "type": "t_array(t_uint256)49_storage", + "contract": "AccessControlUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol:260" + }, + { + "label": "__gap", + "offset": 0, + "slot": "201", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC1967UpgradeUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol:169" + }, + { + "label": "__gap", + "offset": 0, + "slot": "251", + "type": "t_array(t_uint256)50_storage", + "contract": "UUPSUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol:111" + }, + { + "label": "_commitSlots", + "offset": 0, + "slot": "301", + "type": "t_array(t_struct(Commit)7068_storage)240_storage", + "contract": "FuelChainState", + "src": "contracts/fuelchain/FuelChainState.sol:67" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_struct(Commit)7068_storage)240_storage": { + "label": "struct Commit[240]", + "numberOfBytes": "15360" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_bool)": { + "label": "mapping(address => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_struct(RoleData)23_storage)": { + "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", + "numberOfBytes": "32" + }, + "t_struct(Commit)7068_storage": { + "label": "struct Commit", + "members": [ + { + "label": "blockHash", + "type": "t_bytes32", + "offset": 0, + "slot": "0" + }, + { + "label": "timestamp", + "type": "t_uint32", + "offset": 0, + "slot": "1" + }, + { + "label": "reserved1", + "type": "t_address", + "offset": 4, + "slot": "1" + }, + { + "label": "reserved2", + "type": "t_uint16", + "offset": 24, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_struct(RoleData)23_storage": { + "label": "struct AccessControlUpgradeable.RoleData", + "members": [ + { + "label": "members", + "type": "t_mapping(t_address,t_bool)", + "offset": 0, + "slot": "0" + }, + { + "label": "adminRole", + "type": "t_bytes32", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_uint16": { + "label": "uint16", + "numberOfBytes": "2" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint32": { + "label": "uint32", + "numberOfBytes": "4" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + }, + "namespaces": {} + } + }, + "ad5750de608c30304d4abe00ccbd9038f5b00091b244371094e474e92177c5c2": { + "address": "0x5A725F508659F9846E5877E8625F9ea32B57d577", + "txHash": "0x64479ecd7bf56b1c7feb36d4103f9b0129383ae64dc644f82b7c309e93d4057f", + "layout": { + "solcVersion": "0.8.9", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:40" + }, + { + "label": "_paused", + "offset": 0, + "slot": "51", + "type": "t_bool", + "contract": "PausableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:29" + }, + { + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage", + "contract": "PausableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:116" + }, + { + "label": "__gap", + "offset": 0, + "slot": "101", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC165Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol:41" + }, + { + "label": "_roles", + "offset": 0, + "slot": "151", + "type": "t_mapping(t_bytes32,t_struct(RoleData)23_storage)", + "contract": "AccessControlUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol:57" + }, + { + "label": "__gap", + "offset": 0, + "slot": "152", + "type": "t_array(t_uint256)49_storage", + "contract": "AccessControlUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol:260" + }, + { + "label": "_status", + "offset": 0, + "slot": "201", + "type": "t_uint256", + "contract": "ReentrancyGuardUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol:38" + }, + { + "label": "__gap", + "offset": 0, + "slot": "202", + "type": "t_array(t_uint256)49_storage", + "contract": "ReentrancyGuardUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol:88" + }, + { + "label": "__gap", + "offset": 0, + "slot": "251", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC1967UpgradeUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol:169" + }, + { + "label": "__gap", + "offset": 0, + "slot": "301", + "type": "t_array(t_uint256)50_storage", + "contract": "UUPSUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol:111" + }, + { + "label": "_incomingMessageSender", + "offset": 0, + "slot": "351", + "type": "t_bytes32", + "contract": "FuelMessagePortal", + "src": "contracts/fuelchain/FuelMessagePortal.sol:96" + }, + { + "label": "_fuelChainState", + "offset": 0, + "slot": "352", + "type": "t_contract(FuelChainState)7380", + "contract": "FuelMessagePortal", + "src": "contracts/fuelchain/FuelMessagePortal.sol:99" + }, + { + "label": "_outgoingMessageNonce", + "offset": 0, + "slot": "353", + "type": "t_uint256", + "contract": "FuelMessagePortal", + "src": "contracts/fuelchain/FuelMessagePortal.sol:102" + }, + { + "label": "_incomingMessageSuccessful", + "offset": 0, + "slot": "354", + "type": "t_mapping(t_bytes32,t_bool)", + "contract": "FuelMessagePortal", + "src": "contracts/fuelchain/FuelMessagePortal.sol:105" + }, + { + "label": "__gap", + "offset": 0, + "slot": "355", + "type": "t_array(t_uint256)49_storage", + "contract": "FuelMessagePortal", + "src": "contracts/fuelchain/FuelMessagePortal.sol:337" + }, + { + "label": "totalDeposited", + "offset": 0, + "slot": "404", + "type": "t_uint256", + "contract": "FuelMessagePortalV2", + "src": "contracts/fuelchain/FuelMessagePortal/v2/FuelMessagePortalV2.sol:14" + }, + { + "label": "__gap", + "offset": 0, + "slot": "405", + "type": "t_array(t_uint256)49_storage", + "contract": "FuelMessagePortalV2", + "src": "contracts/fuelchain/FuelMessagePortal/v2/FuelMessagePortalV2.sol:108" + }, + { + "label": "withdrawalsPaused", + "offset": 0, + "slot": "454", + "type": "t_bool", + "contract": "FuelMessagePortalV3", + "src": "contracts/fuelchain/FuelMessagePortal/v3/FuelMessagePortalV3.sol:26" + }, + { + "label": "messageIsBlacklisted", + "offset": 0, + "slot": "455", + "type": "t_mapping(t_bytes32,t_bool)", + "contract": "FuelMessagePortalV3", + "src": "contracts/fuelchain/FuelMessagePortal/v3/FuelMessagePortalV3.sol:28" + }, + { + "label": "currentPeriodAmount", + "offset": 0, + "slot": "456", + "type": "t_uint256", + "contract": "FuelMessagePortalV3", + "src": "contracts/fuelchain/FuelMessagePortal/v3/FuelMessagePortalV3.sol:31" + }, + { + "label": "currentPeriodEnd", + "offset": 0, + "slot": "457", + "type": "t_uint256", + "contract": "FuelMessagePortalV3", + "src": "contracts/fuelchain/FuelMessagePortal/v3/FuelMessagePortalV3.sol:34" + }, + { + "label": "limitAmount", + "offset": 0, + "slot": "458", + "type": "t_uint256", + "contract": "FuelMessagePortalV3", + "src": "contracts/fuelchain/FuelMessagePortal/v3/FuelMessagePortalV3.sol:37" + }, + { + "label": "__gap", + "offset": 0, + "slot": "459", + "type": "t_array(t_uint256)49_storage", + "contract": "FuelMessagePortalV3", + "src": "contracts/fuelchain/FuelMessagePortal/v3/FuelMessagePortalV3.sol:261" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_contract(FuelChainState)7380": { + "label": "contract FuelChainState", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_bool)": { + "label": "mapping(address => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_bool)": { + "label": "mapping(bytes32 => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_struct(RoleData)23_storage)": { + "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", + "numberOfBytes": "32" + }, + "t_struct(RoleData)23_storage": { + "label": "struct AccessControlUpgradeable.RoleData", + "members": [ + { + "label": "members", + "type": "t_mapping(t_address,t_bool)", + "offset": 0, + "slot": "0" + }, + { + "label": "adminRole", + "type": "t_bytes32", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + }, + "namespaces": {} + } + }, + "582024886ad3e0646ea647ab7cc9daefc28744003f5a2f20f7925944557733f0": { + "address": "0x6d67857224F66d7A677f063B861B6BACafB10639", + "txHash": "0xb1464573e1f44b1486d1d06186088bb7ae61b8520ef59f8a6b6734a41e8c2991", + "layout": { + "solcVersion": "0.8.9", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:40" + }, + { + "label": "_paused", + "offset": 0, + "slot": "51", + "type": "t_bool", + "contract": "PausableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:29" + }, + { + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage", + "contract": "PausableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:116" + }, + { + "label": "__gap", + "offset": 0, + "slot": "101", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC165Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol:41" + }, + { + "label": "_roles", + "offset": 0, + "slot": "151", + "type": "t_mapping(t_bytes32,t_struct(RoleData)23_storage)", + "contract": "AccessControlUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol:57" + }, + { + "label": "__gap", + "offset": 0, + "slot": "152", + "type": "t_array(t_uint256)49_storage", + "contract": "AccessControlUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol:260" + }, + { + "label": "_status", + "offset": 0, + "slot": "201", + "type": "t_uint256", + "contract": "ReentrancyGuardUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol:38" + }, + { + "label": "__gap", + "offset": 0, + "slot": "202", + "type": "t_array(t_uint256)49_storage", + "contract": "ReentrancyGuardUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol:88" + }, + { + "label": "__gap", + "offset": 0, + "slot": "251", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC1967UpgradeUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol:169" + }, + { + "label": "__gap", + "offset": 0, + "slot": "301", + "type": "t_array(t_uint256)50_storage", + "contract": "UUPSUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol:111" + }, + { + "label": "_incomingMessageSender", + "offset": 0, + "slot": "351", + "type": "t_bytes32", + "contract": "FuelMessagePortal", + "src": "contracts/fuelchain/FuelMessagePortal.sol:96" + }, + { + "label": "_fuelChainState", + "offset": 0, + "slot": "352", + "type": "t_contract(FuelChainState)7380", + "contract": "FuelMessagePortal", + "src": "contracts/fuelchain/FuelMessagePortal.sol:99" + }, + { + "label": "_outgoingMessageNonce", + "offset": 0, + "slot": "353", + "type": "t_uint256", + "contract": "FuelMessagePortal", + "src": "contracts/fuelchain/FuelMessagePortal.sol:102" + }, + { + "label": "_incomingMessageSuccessful", + "offset": 0, + "slot": "354", + "type": "t_mapping(t_bytes32,t_bool)", + "contract": "FuelMessagePortal", + "src": "contracts/fuelchain/FuelMessagePortal.sol:105" + }, + { + "label": "__gap", + "offset": 0, + "slot": "355", + "type": "t_array(t_uint256)49_storage", + "contract": "FuelMessagePortal", + "src": "contracts/fuelchain/FuelMessagePortal.sol:337" + }, + { + "label": "totalDeposited", + "offset": 0, + "slot": "404", + "type": "t_uint256", + "contract": "FuelMessagePortalV2", + "src": "contracts/fuelchain/FuelMessagePortal/v2/FuelMessagePortalV2.sol:14" + }, + { + "label": "__gap", + "offset": 0, + "slot": "405", + "type": "t_array(t_uint256)49_storage", + "contract": "FuelMessagePortalV2", + "src": "contracts/fuelchain/FuelMessagePortal/v2/FuelMessagePortalV2.sol:108" + }, + { + "label": "withdrawalsPaused", + "offset": 0, + "slot": "454", + "type": "t_bool", + "contract": "FuelMessagePortalV3", + "src": "contracts/fuelchain/FuelMessagePortal/v3/FuelMessagePortalV3.sol:26" + }, + { + "label": "messageIsBlacklisted", + "offset": 0, + "slot": "455", + "type": "t_mapping(t_bytes32,t_bool)", + "contract": "FuelMessagePortalV3", + "src": "contracts/fuelchain/FuelMessagePortal/v3/FuelMessagePortalV3.sol:28" + }, + { + "label": "currentPeriodAmount", + "offset": 0, + "slot": "456", + "type": "t_uint256", + "contract": "FuelMessagePortalV3", + "src": "contracts/fuelchain/FuelMessagePortal/v3/FuelMessagePortalV3.sol:31" + }, + { + "label": "currentPeriodEnd", + "offset": 0, + "slot": "457", + "type": "t_uint256", + "contract": "FuelMessagePortalV3", + "src": "contracts/fuelchain/FuelMessagePortal/v3/FuelMessagePortalV3.sol:34" + }, + { + "label": "limitAmount", + "offset": 0, + "slot": "458", + "type": "t_uint256", + "contract": "FuelMessagePortalV3", + "src": "contracts/fuelchain/FuelMessagePortal/v3/FuelMessagePortalV3.sol:37" + }, + { + "label": "__gap", + "offset": 0, + "slot": "459", + "type": "t_array(t_uint256)49_storage", + "contract": "FuelMessagePortalV3", + "src": "contracts/fuelchain/FuelMessagePortal/v3/FuelMessagePortalV3.sol:261" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_contract(FuelChainState)7380": { + "label": "contract FuelChainState", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_bool)": { + "label": "mapping(address => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_bool)": { + "label": "mapping(bytes32 => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_struct(RoleData)23_storage)": { + "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", + "numberOfBytes": "32" + }, + "t_struct(RoleData)23_storage": { + "label": "struct AccessControlUpgradeable.RoleData", + "members": [ + { + "label": "members", + "type": "t_mapping(t_address,t_bool)", + "offset": 0, + "slot": "0" + }, + { + "label": "adminRole", + "type": "t_bytes32", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + }, + "namespaces": {} + } + }, + "087131caba1a13a535ddf1d37c869d822f4bf79ac129e9168f14a4ba616b5e63": { + "address": "0xB3109036813ff48E523Cef3818438e64ee04069d", + "txHash": "0x57df76aeec2c61d8c1b1042ab0bd68d3dbb60d26a04ee95dfe1dfac91c06da91", + "layout": { + "solcVersion": "0.8.9", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" + }, + { + "label": "_fuelMessagePortal", + "offset": 2, + "slot": "0", + "type": "t_contract(FuelMessagePortal)8014", + "contract": "FuelMessagesEnabled", + "src": "contracts/messaging/FuelMessagesEnabled.sol:21" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)49_storage", + "contract": "FuelMessagesEnabledUpgradeable", + "src": "contracts/messaging/FuelMessagesEnabledUpgradeable.sol:31" + }, + { + "label": "__gap", + "offset": 0, + "slot": "50", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:40" + }, + { + "label": "_paused", + "offset": 0, + "slot": "100", + "type": "t_bool", + "contract": "PausableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:29" + }, + { + "label": "__gap", + "offset": 0, + "slot": "101", + "type": "t_array(t_uint256)49_storage", + "contract": "PausableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:116" + }, + { + "label": "__gap", + "offset": 0, + "slot": "150", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC165Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol:41" + }, + { + "label": "_roles", + "offset": 0, + "slot": "200", + "type": "t_mapping(t_bytes32,t_struct(RoleData)23_storage)", + "contract": "AccessControlUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol:57" + }, + { + "label": "__gap", + "offset": 0, + "slot": "201", + "type": "t_array(t_uint256)49_storage", + "contract": "AccessControlUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol:260" + }, + { + "label": "__gap", + "offset": 0, + "slot": "250", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC1967UpgradeUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol:169" + }, + { + "label": "__gap", + "offset": 0, + "slot": "300", + "type": "t_array(t_uint256)50_storage", + "contract": "UUPSUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol:111" + }, + { + "label": "whitelistRequired", + "offset": 0, + "slot": "350", + "type": "t_bool", + "contract": "FuelERC20GatewayV4", + "src": "contracts/messaging/gateway/FuelERC20Gateway/FuelERC20GatewayV4.sol:73" + }, + { + "label": "assetIssuerId", + "offset": 0, + "slot": "351", + "type": "t_bytes32", + "contract": "FuelERC20GatewayV4", + "src": "contracts/messaging/gateway/FuelERC20Gateway/FuelERC20GatewayV4.sol:74" + }, + { + "label": "_deposits", + "offset": 0, + "slot": "352", + "type": "t_mapping(t_address,t_uint256)", + "contract": "FuelERC20GatewayV4", + "src": "contracts/messaging/gateway/FuelERC20Gateway/FuelERC20GatewayV4.sol:76" + }, + { + "label": "_depositLimits", + "offset": 0, + "slot": "353", + "type": "t_mapping(t_address,t_uint256)", + "contract": "FuelERC20GatewayV4", + "src": "contracts/messaging/gateway/FuelERC20Gateway/FuelERC20GatewayV4.sol:77" + }, + { + "label": "_decimalsCache", + "offset": 0, + "slot": "354", + "type": "t_mapping(t_address,t_uint256)", + "contract": "FuelERC20GatewayV4", + "src": "contracts/messaging/gateway/FuelERC20Gateway/FuelERC20GatewayV4.sol:78" + }, + { + "label": "rateLimitDuration", + "offset": 0, + "slot": "355", + "type": "t_mapping(t_address,t_uint256)", + "contract": "FuelERC20GatewayV4", + "src": "contracts/messaging/gateway/FuelERC20Gateway/FuelERC20GatewayV4.sol:81" + }, + { + "label": "currentPeriodAmount", + "offset": 0, + "slot": "356", + "type": "t_mapping(t_address,t_uint256)", + "contract": "FuelERC20GatewayV4", + "src": "contracts/messaging/gateway/FuelERC20Gateway/FuelERC20GatewayV4.sol:84" + }, + { + "label": "currentPeriodEnd", + "offset": 0, + "slot": "357", + "type": "t_mapping(t_address,t_uint256)", + "contract": "FuelERC20GatewayV4", + "src": "contracts/messaging/gateway/FuelERC20Gateway/FuelERC20GatewayV4.sol:87" + }, + { + "label": "limitAmount", + "offset": 0, + "slot": "358", + "type": "t_mapping(t_address,t_uint256)", + "contract": "FuelERC20GatewayV4", + "src": "contracts/messaging/gateway/FuelERC20Gateway/FuelERC20GatewayV4.sol:90" + }, + { + "label": "__gap", + "offset": 0, + "slot": "359", + "type": "t_array(t_uint256)49_storage", + "contract": "FuelERC20GatewayV4", + "src": "contracts/messaging/gateway/FuelERC20Gateway/FuelERC20GatewayV4.sol:440" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_contract(FuelMessagePortal)8014": { + "label": "contract FuelMessagePortal", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_bool)": { + "label": "mapping(address => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_uint256)": { + "label": "mapping(address => uint256)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_struct(RoleData)23_storage)": { + "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", + "numberOfBytes": "32" + }, + "t_struct(RoleData)23_storage": { + "label": "struct AccessControlUpgradeable.RoleData", + "members": [ + { + "label": "members", + "type": "t_mapping(t_address,t_bool)", + "offset": 0, + "slot": "0" + }, + { + "label": "adminRole", + "type": "t_bytes32", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + }, + "namespaces": {} + } + }, + "ef9b501dd199bf1c5b9ba00d88d9391ad616f16d1a284f988e71c7b2aa54474a": { + "address": "0xdE2D792ca3C4d02DE3CE1cD1456d8D0990cC3fab", + "txHash": "0x44c0654c83eff10b0126cc97f9d519ba8f1b4a41958886cb58eee3e939760c8e", + "layout": { + "solcVersion": "0.8.9", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" + }, + { + "label": "_fuelMessagePortal", + "offset": 2, + "slot": "0", + "type": "t_contract(FuelMessagePortal)8024", + "contract": "FuelMessagesEnabled", + "src": "contracts/messaging/FuelMessagesEnabled.sol:21" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)49_storage", + "contract": "FuelMessagesEnabledUpgradeable", + "src": "contracts/messaging/FuelMessagesEnabledUpgradeable.sol:31" + }, + { + "label": "__gap", + "offset": 0, + "slot": "50", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:40" + }, + { + "label": "_paused", + "offset": 0, + "slot": "100", + "type": "t_bool", + "contract": "PausableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:29" + }, + { + "label": "__gap", + "offset": 0, + "slot": "101", + "type": "t_array(t_uint256)49_storage", + "contract": "PausableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:116" + }, + { + "label": "__gap", + "offset": 0, + "slot": "150", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC165Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol:41" + }, + { + "label": "_roles", + "offset": 0, + "slot": "200", + "type": "t_mapping(t_bytes32,t_struct(RoleData)23_storage)", + "contract": "AccessControlUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol:57" + }, + { + "label": "__gap", + "offset": 0, + "slot": "201", + "type": "t_array(t_uint256)49_storage", + "contract": "AccessControlUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol:260" + }, + { + "label": "__gap", + "offset": 0, + "slot": "250", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC1967UpgradeUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol:169" + }, + { + "label": "__gap", + "offset": 0, + "slot": "300", + "type": "t_array(t_uint256)50_storage", + "contract": "UUPSUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol:111" + }, + { + "label": "whitelistRequired", + "offset": 0, + "slot": "350", + "type": "t_bool", + "contract": "FuelERC20GatewayV4", + "src": "contracts/messaging/gateway/FuelERC20Gateway/FuelERC20GatewayV4.sol:76" + }, + { + "label": "assetIssuerId", + "offset": 0, + "slot": "351", + "type": "t_bytes32", + "contract": "FuelERC20GatewayV4", + "src": "contracts/messaging/gateway/FuelERC20Gateway/FuelERC20GatewayV4.sol:77" + }, + { + "label": "_deposits", + "offset": 0, + "slot": "352", + "type": "t_mapping(t_address,t_uint256)", + "contract": "FuelERC20GatewayV4", + "src": "contracts/messaging/gateway/FuelERC20Gateway/FuelERC20GatewayV4.sol:79" + }, + { + "label": "_depositLimits", + "offset": 0, + "slot": "353", + "type": "t_mapping(t_address,t_uint256)", + "contract": "FuelERC20GatewayV4", + "src": "contracts/messaging/gateway/FuelERC20Gateway/FuelERC20GatewayV4.sol:80" + }, + { + "label": "_decimalsCache", + "offset": 0, + "slot": "354", + "type": "t_mapping(t_address,t_uint256)", + "contract": "FuelERC20GatewayV4", + "src": "contracts/messaging/gateway/FuelERC20Gateway/FuelERC20GatewayV4.sol:81" + }, + { + "label": "rateLimitDuration", + "offset": 0, + "slot": "355", + "type": "t_mapping(t_address,t_uint256)", + "contract": "FuelERC20GatewayV4", + "src": "contracts/messaging/gateway/FuelERC20Gateway/FuelERC20GatewayV4.sol:84" + }, + { + "label": "currentPeriodAmount", + "offset": 0, + "slot": "356", + "type": "t_mapping(t_address,t_uint256)", + "contract": "FuelERC20GatewayV4", + "src": "contracts/messaging/gateway/FuelERC20Gateway/FuelERC20GatewayV4.sol:87" + }, + { + "label": "currentPeriodEnd", + "offset": 0, + "slot": "357", + "type": "t_mapping(t_address,t_uint256)", + "contract": "FuelERC20GatewayV4", + "src": "contracts/messaging/gateway/FuelERC20Gateway/FuelERC20GatewayV4.sol:90" + }, + { + "label": "limitAmount", + "offset": 0, + "slot": "358", + "type": "t_mapping(t_address,t_uint256)", + "contract": "FuelERC20GatewayV4", + "src": "contracts/messaging/gateway/FuelERC20Gateway/FuelERC20GatewayV4.sol:93" + }, + { + "label": "rateLimitStatus", + "offset": 0, + "slot": "359", + "type": "t_mapping(t_address,t_bool)", + "contract": "FuelERC20GatewayV4", + "src": "contracts/messaging/gateway/FuelERC20Gateway/FuelERC20GatewayV4.sol:98" + }, + { + "label": "__gap", + "offset": 0, + "slot": "360", + "type": "t_array(t_uint256)48_storage", + "contract": "FuelERC20GatewayV4", + "src": "contracts/messaging/gateway/FuelERC20Gateway/FuelERC20GatewayV4.sol:452" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)48_storage": { + "label": "uint256[48]", + "numberOfBytes": "1536" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_contract(FuelMessagePortal)8024": { + "label": "contract FuelMessagePortal", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_bool)": { + "label": "mapping(address => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_uint256)": { + "label": "mapping(address => uint256)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_struct(RoleData)23_storage)": { + "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", + "numberOfBytes": "32" + }, + "t_struct(RoleData)23_storage": { + "label": "struct AccessControlUpgradeable.RoleData", + "members": [ + { + "label": "members", + "type": "t_mapping(t_address,t_bool)", + "offset": 0, + "slot": "0" + }, + { + "label": "adminRole", + "type": "t_bytes32", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + }, + "namespaces": {} + } + }, + "e0cf59c4c01cb80091b20ef02607a6c287b5e2a9f85d0a48772eb319b3a29ec3": { + "address": "0x05f886DDeE0FE07496f6e38b0e140F8eF4655B16", + "txHash": "0x3ba642fb6850d061b7ef32ce921a0e70c98d028cfd3cc0af59ca51323f262814", + "layout": { + "solcVersion": "0.8.9", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:40" + }, + { + "label": "_paused", + "offset": 0, + "slot": "51", + "type": "t_bool", + "contract": "PausableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:29" + }, + { + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage", + "contract": "PausableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:116" + }, + { + "label": "__gap", + "offset": 0, + "slot": "101", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC165Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol:41" + }, + { + "label": "_roles", + "offset": 0, + "slot": "151", + "type": "t_mapping(t_bytes32,t_struct(RoleData)23_storage)", + "contract": "AccessControlUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol:57" + }, + { + "label": "__gap", + "offset": 0, + "slot": "152", + "type": "t_array(t_uint256)49_storage", + "contract": "AccessControlUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol:260" + }, + { + "label": "_status", + "offset": 0, + "slot": "201", + "type": "t_uint256", + "contract": "ReentrancyGuardUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol:38" + }, + { + "label": "__gap", + "offset": 0, + "slot": "202", + "type": "t_array(t_uint256)49_storage", + "contract": "ReentrancyGuardUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol:88" + }, + { + "label": "__gap", + "offset": 0, + "slot": "251", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC1967UpgradeUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol:169" + }, + { + "label": "__gap", + "offset": 0, + "slot": "301", + "type": "t_array(t_uint256)50_storage", + "contract": "UUPSUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol:111" + }, + { + "label": "_incomingMessageSender", + "offset": 0, + "slot": "351", + "type": "t_bytes32", + "contract": "FuelMessagePortal", + "src": "contracts/fuelchain/FuelMessagePortal.sol:96" + }, + { + "label": "_fuelChainState", + "offset": 0, + "slot": "352", + "type": "t_contract(FuelChainState)7390", + "contract": "FuelMessagePortal", + "src": "contracts/fuelchain/FuelMessagePortal.sol:99" + }, + { + "label": "_outgoingMessageNonce", + "offset": 0, + "slot": "353", + "type": "t_uint256", + "contract": "FuelMessagePortal", + "src": "contracts/fuelchain/FuelMessagePortal.sol:102" + }, + { + "label": "_incomingMessageSuccessful", + "offset": 0, + "slot": "354", + "type": "t_mapping(t_bytes32,t_bool)", + "contract": "FuelMessagePortal", + "src": "contracts/fuelchain/FuelMessagePortal.sol:105" + }, + { + "label": "__gap", + "offset": 0, + "slot": "355", + "type": "t_array(t_uint256)49_storage", + "contract": "FuelMessagePortal", + "src": "contracts/fuelchain/FuelMessagePortal.sol:337" + }, + { + "label": "totalDeposited", + "offset": 0, + "slot": "404", + "type": "t_uint256", + "contract": "FuelMessagePortalV2", + "src": "contracts/fuelchain/FuelMessagePortal/v2/FuelMessagePortalV2.sol:14" + }, + { + "label": "__gap", + "offset": 0, + "slot": "405", + "type": "t_array(t_uint256)49_storage", + "contract": "FuelMessagePortalV2", + "src": "contracts/fuelchain/FuelMessagePortal/v2/FuelMessagePortalV2.sol:108" + }, + { + "label": "withdrawalsPaused", + "offset": 0, + "slot": "454", + "type": "t_bool", + "contract": "FuelMessagePortalV3", + "src": "contracts/fuelchain/FuelMessagePortal/v3/FuelMessagePortalV3.sol:31" + }, + { + "label": "messageIsBlacklisted", + "offset": 0, + "slot": "455", + "type": "t_mapping(t_bytes32,t_bool)", + "contract": "FuelMessagePortalV3", + "src": "contracts/fuelchain/FuelMessagePortal/v3/FuelMessagePortalV3.sol:33" + }, + { + "label": "currentPeriodAmount", + "offset": 0, + "slot": "456", + "type": "t_uint256", + "contract": "FuelMessagePortalV3", + "src": "contracts/fuelchain/FuelMessagePortal/v3/FuelMessagePortalV3.sol:36" + }, + { + "label": "currentPeriodEnd", + "offset": 0, + "slot": "457", + "type": "t_uint256", + "contract": "FuelMessagePortalV3", + "src": "contracts/fuelchain/FuelMessagePortal/v3/FuelMessagePortalV3.sol:39" + }, + { + "label": "limitAmount", + "offset": 0, + "slot": "458", + "type": "t_uint256", + "contract": "FuelMessagePortalV3", + "src": "contracts/fuelchain/FuelMessagePortal/v3/FuelMessagePortalV3.sol:42" + }, + { + "label": "rateLimitEnabled", + "offset": 0, + "slot": "459", + "type": "t_bool", + "contract": "FuelMessagePortalV3", + "src": "contracts/fuelchain/FuelMessagePortal/v3/FuelMessagePortalV3.sol:45" + }, + { + "label": "__gap", + "offset": 0, + "slot": "460", + "type": "t_array(t_uint256)48_storage", + "contract": "FuelMessagePortalV3", + "src": "contracts/fuelchain/FuelMessagePortal/v3/FuelMessagePortalV3.sol:266" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)48_storage": { + "label": "uint256[48]", + "numberOfBytes": "1536" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_contract(FuelChainState)7390": { + "label": "contract FuelChainState", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_bool)": { + "label": "mapping(address => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_bool)": { + "label": "mapping(bytes32 => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_struct(RoleData)23_storage)": { + "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", + "numberOfBytes": "32" + }, + "t_struct(RoleData)23_storage": { + "label": "struct AccessControlUpgradeable.RoleData", + "members": [ + { + "label": "members", + "type": "t_mapping(t_address,t_bool)", + "offset": 0, + "slot": "0" + }, + { + "label": "adminRole", + "type": "t_bytes32", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + }, + "namespaces": {} + } + } + } +} diff --git a/packages/solidity-contracts/deploy/mainnet/001.chain_state.ts b/packages/solidity-contracts/deploy/mainnet/001.chain_state.ts new file mode 100644 index 00000000..c29f998c --- /dev/null +++ b/packages/solidity-contracts/deploy/mainnet/001.chain_state.ts @@ -0,0 +1,45 @@ +import type { HardhatRuntimeEnvironment } from 'hardhat/types'; +import type { DeployFunction } from 'hardhat-deploy/dist/types'; + +import { FuelChainState__factory as FuelChainState } from '../../typechain'; + +const BLOCKS_PER_COMMIT_INTERVAL = 10800; +const TIME_TO_FINALIZE = 3600 * 24 * 7; // 7 days of finalization +const COMMIT_COOLDOWN = TIME_TO_FINALIZE; + +const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { + const { + ethers, + upgrades: { deployProxy, erc1967 }, + deployments: { save }, + } = hre; + const [deployer] = await ethers.getSigners(); + + const constructorArgs = [ + TIME_TO_FINALIZE, + BLOCKS_PER_COMMIT_INTERVAL, + COMMIT_COOLDOWN, + ]; + + const contract = await deployProxy(new FuelChainState(deployer), [], { + initializer: 'initialize', + constructorArgs: constructorArgs, + }); + await contract.waitForDeployment(); + const address = await contract.getAddress(); + const implementation = await erc1967.getImplementationAddress(address); + + console.log('Deployed FuelChainState at', address); + await save('FuelChainState', { + address, + abi: [...FuelChainState.abi], + implementation, + linkedData: { factory: 'FuelChainState', constructorArgs }, + }); + + return true; +}; + +func.tags = ['state', 'chain-state', 'chain_state', 'FuelChainState']; +func.id = 'chain_state'; +export default func; diff --git a/packages/solidity-contracts/deploy/mainnet/002.fuel_message_portal_v3.ts b/packages/solidity-contracts/deploy/mainnet/002.fuel_message_portal_v3.ts new file mode 100644 index 00000000..67703d8f --- /dev/null +++ b/packages/solidity-contracts/deploy/mainnet/002.fuel_message_portal_v3.ts @@ -0,0 +1,49 @@ +import { MaxUint256 } from 'ethers'; +import type { HardhatRuntimeEnvironment } from 'hardhat/types'; +import type { DeployFunction } from 'hardhat-deploy/dist/types'; + +import { FuelMessagePortalV3__factory as FuelMessagePortal } from '../../typechain'; + +import { + RATE_LIMIT_AMOUNT, + RATE_LIMIT_DURATION, +} from '../../protocol/constants'; + +const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { + const { + ethers, + upgrades: { deployProxy, erc1967 }, + deployments: { get, save }, + } = hre; + const [deployer] = await ethers.getSigners(); + + const { address: fuelChainState } = await get('FuelChainState'); + + const constructorArgs = [MaxUint256.toString(), RATE_LIMIT_DURATION]; + const contract = await deployProxy( + new FuelMessagePortal(deployer), + [fuelChainState, RATE_LIMIT_AMOUNT.toString()], + { + initializer: 'initializerV3', + constructorArgs: constructorArgs, + } + ); + await contract.waitForDeployment(); + + const address = await contract.getAddress(); + const implementation = await erc1967.getImplementationAddress(address); + + console.log('Deployed FuelMessagePortal at', address); + await save('FuelMessagePortal', { + address, + abi: [...FuelMessagePortal.abi], + implementation, + linkedData: { factory: 'FuelMessagePortalV3', constructorArgs }, + }); + + return true; +}; + +func.tags = ['portal', 'message_portal', 'FuelMessagePortal']; +func.id = 'fuel_message_portal'; +export default func; diff --git a/packages/solidity-contracts/deploy/mainnet/003.register_chainstate_committer.ts b/packages/solidity-contracts/deploy/mainnet/003.register_chainstate_committer.ts new file mode 100644 index 00000000..256a362b --- /dev/null +++ b/packages/solidity-contracts/deploy/mainnet/003.register_chainstate_committer.ts @@ -0,0 +1,28 @@ +import type { HardhatRuntimeEnvironment } from 'hardhat/types'; +import type { DeployFunction } from 'hardhat-deploy/dist/types'; + +import { FuelChainState__factory } from '../../typechain'; + +const COMMITTER_ADDRESS = '0x83dC58504D1d2276Bc8D9Cf01d0B341D84A49cfF'; + +const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { + const { ethers, deployments } = hre; + const [deployer] = await ethers.getSigners(); + + const { address } = await deployments.get('FuelChainState'); + + const fuelChainState = FuelChainState__factory.connect(address, deployer); + const COMMITTER_ROLE = await fuelChainState.COMMITTER_ROLE(); + + await fuelChainState + .grantRole(COMMITTER_ROLE, COMMITTER_ADDRESS) + .then((tx) => tx.wait()); + + console.log('Granted role COMMITTER_ROLE to', COMMITTER_ADDRESS); + + return true; +}; + +func.tags = ['register_committer']; +func.id = 'register_committer'; +export default func; diff --git a/packages/solidity-contracts/deploy/mainnet/004.register_chainstate_watchtower.ts b/packages/solidity-contracts/deploy/mainnet/004.register_chainstate_watchtower.ts new file mode 100644 index 00000000..9fe2e00c --- /dev/null +++ b/packages/solidity-contracts/deploy/mainnet/004.register_chainstate_watchtower.ts @@ -0,0 +1,28 @@ +import type { HardhatRuntimeEnvironment } from 'hardhat/types'; +import type { DeployFunction } from 'hardhat-deploy/dist/types'; + +import { FuelChainState__factory } from '../../typechain'; + +const PAUSER_ADDRESS = '0xe7d56c84cEA9b58569fdfe8863085207F9a14881'; + +const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { + const { ethers, deployments } = hre; + const [deployer] = await ethers.getSigners(); + + const { address } = await deployments.get('FuelChainState'); + + const fuelChainState = FuelChainState__factory.connect(address, deployer); + const PAUSER_ROLE = await fuelChainState.PAUSER_ROLE(); + + await fuelChainState + .grantRole(PAUSER_ROLE, PAUSER_ADDRESS) + .then((tx) => tx.wait()); + + console.log('Granted role PAUSER_ROLE to', PAUSER_ADDRESS); + + return true; +}; + +func.tags = ['register_watchtower']; +func.id = 'register_watchtower'; +export default func; diff --git a/packages/solidity-contracts/deploy/mainnet/005.register_portal_watchtower.ts b/packages/solidity-contracts/deploy/mainnet/005.register_portal_watchtower.ts new file mode 100644 index 00000000..035b1328 --- /dev/null +++ b/packages/solidity-contracts/deploy/mainnet/005.register_portal_watchtower.ts @@ -0,0 +1,31 @@ +import type { HardhatRuntimeEnvironment } from 'hardhat/types'; +import type { DeployFunction } from 'hardhat-deploy/dist/types'; + +import { FuelMessagePortalV3__factory } from '../../typechain'; + +const PAUSER_ADDRESS = '0xe7d56c84cEA9b58569fdfe8863085207F9a14881'; + +const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { + const { ethers, deployments } = hre; + const [deployer] = await ethers.getSigners(); + + const { address } = await deployments.get('FuelMessagePortal'); + + const fuelChainState = FuelMessagePortalV3__factory.connect( + address, + deployer + ); + const PAUSER_ROLE = await fuelChainState.PAUSER_ROLE(); + + await fuelChainState + .grantRole(PAUSER_ROLE, PAUSER_ADDRESS) + .then((tx) => tx.wait()); + + console.log('Granted role PAUSER_ROLE to', PAUSER_ADDRESS); + + return true; +}; + +func.tags = ['register_watchtower_portal']; +func.id = 'register_watchtower_portal'; +export default func; diff --git a/packages/solidity-contracts/deploy/mainnet/006.set_eth_deposit_limit.ts b/packages/solidity-contracts/deploy/mainnet/006.set_eth_deposit_limit.ts new file mode 100644 index 00000000..38f4daf5 --- /dev/null +++ b/packages/solidity-contracts/deploy/mainnet/006.set_eth_deposit_limit.ts @@ -0,0 +1,44 @@ +import { parseEther } from 'ethers'; +import type { HardhatRuntimeEnvironment } from 'hardhat/types'; +import type { DeployFunction } from 'hardhat-deploy/dist/types'; + +import { FuelMessagePortalV3__factory as FuelMessagePortal } from '../../typechain'; + +// Rate limit: 10 ETH / week +const RATE_LIMIT_DURATION = 3600 * 24 * 7; + +// Global deposit cap: 100 ETH +const ETH_DEPOSIT_CAP = parseEther('100'); + +const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { + const { + ethers, + upgrades: { upgradeProxy, erc1967 }, + deployments: { get, save }, + } = hre; + const [deployer] = await ethers.getSigners(); + + const { address } = await get('FuelMessagePortal'); + + const constructorArgs = [ETH_DEPOSIT_CAP.toString(), RATE_LIMIT_DURATION]; + + await upgradeProxy(address, new FuelMessagePortal(deployer), { + constructorArgs, + }); + + const implementation = await erc1967.getImplementationAddress(address); + + console.log('Upgraded FuelMessagePortal to implementation', implementation); + await save('FuelMessagePortal', { + address, + abi: [...FuelMessagePortal.abi], + implementation, + linkedData: { factory: 'FuelMessagePortalV3', constructorArgs }, + }); + + return true; +}; + +func.tags = ['set_deposit_limit_eth']; +func.id = 'set_deposit_limit_eth'; +export default func; diff --git a/packages/solidity-contracts/deploy/mainnet/007.erc20_gateway.ts b/packages/solidity-contracts/deploy/mainnet/007.erc20_gateway.ts new file mode 100644 index 00000000..79c8879c --- /dev/null +++ b/packages/solidity-contracts/deploy/mainnet/007.erc20_gateway.ts @@ -0,0 +1,41 @@ +import type { HardhatRuntimeEnvironment } from 'hardhat/types'; +import type { DeployFunction } from 'hardhat-deploy/dist/types'; + +import { FuelERC20GatewayV4__factory as FuelERC20Gateway } from '../../typechain'; + +const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { + const { + ethers, + upgrades: { deployProxy, erc1967 }, + deployments: { get, save }, + } = hre; + const [deployer] = await ethers.getSigners(); + + const fuelMessagePortal = await get('FuelMessagePortal'); + + const contract = await deployProxy( + new FuelERC20Gateway(deployer), + [fuelMessagePortal.address], + { + initializer: 'initialize', + } + ); + await contract.waitForDeployment(); + + const address = await contract.getAddress(); + const implementation = await erc1967.getImplementationAddress(address); + + console.log('Deployed FuelERC20GatewayV4 at', address); + await save('FuelERC20GatewayV4', { + address, + abi: [...FuelERC20Gateway.abi], + implementation, + linkedData: { factory: 'FuelERC20GatewayV4', constructorArgs: [] }, + }); + + return true; +}; + +func.tags = ['gateway']; +func.id = 'gateway'; +export default func; diff --git a/packages/solidity-contracts/deploy/mainnet/008.gateway_enable_whitelist.ts b/packages/solidity-contracts/deploy/mainnet/008.gateway_enable_whitelist.ts new file mode 100644 index 00000000..99dc1ba5 --- /dev/null +++ b/packages/solidity-contracts/deploy/mainnet/008.gateway_enable_whitelist.ts @@ -0,0 +1,20 @@ +import type { HardhatRuntimeEnvironment } from 'hardhat/types'; +import type { DeployFunction } from 'hardhat-deploy/dist/types'; + +const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { + const { ethers, deployments } = hre; + const [deployer] = await ethers.getSigners(); + + await deployments.execute( + 'FuelERC20GatewayV4', + { log: true, from: deployer.address }, + 'requireWhitelist', + true + ); + + return true; +}; + +func.tags = ['gateway_enable_whitelist']; +func.id = 'gateway_enable_whitelist'; +export default func; diff --git a/packages/solidity-contracts/deploy/mainnet/009.gateway_add_usdc.ts b/packages/solidity-contracts/deploy/mainnet/009.gateway_add_usdc.ts new file mode 100644 index 00000000..f4111bcb --- /dev/null +++ b/packages/solidity-contracts/deploy/mainnet/009.gateway_add_usdc.ts @@ -0,0 +1,26 @@ +import type { HardhatRuntimeEnvironment } from 'hardhat/types'; +import type { DeployFunction } from 'hardhat-deploy/dist/types'; +import { parseUnits } from 'ethers'; + +const USDC_ADDRESS = '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48'; + +const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { + const { ethers, deployments } = hre; + const [deployer] = await ethers.getSigners(); + + await deployments.execute( + 'FuelERC20GatewayV4', + { log: true, from: deployer.address }, + 'setGlobalDepositLimit', + USDC_ADDRESS, + // param `limit` must be down/up scaled according to _adjustDepositDecimals + // USDC => 6 decimals => it will not have any scaling + parseUnits('250000', 6) // 250k USDC + ); + + return true; +}; + +func.tags = ['gateway_whitelist_usdc']; +func.id = 'gateway_whitelist_usdc'; +export default func; diff --git a/packages/solidity-contracts/deploy/mainnet/010.gateway_rate_limit_usdc.ts b/packages/solidity-contracts/deploy/mainnet/010.gateway_rate_limit_usdc.ts new file mode 100644 index 00000000..7e3fa4b0 --- /dev/null +++ b/packages/solidity-contracts/deploy/mainnet/010.gateway_rate_limit_usdc.ts @@ -0,0 +1,28 @@ +import type { HardhatRuntimeEnvironment } from 'hardhat/types'; +import type { DeployFunction } from 'hardhat-deploy/dist/types'; +import { parseUnits } from 'ethers'; + +const USDC_ADDRESS = '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48'; +const ONE_WEEK_IN_SECONDS = 3600 * 24 * 7; + +const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { + const { ethers, deployments } = hre; + const [deployer] = await ethers.getSigners(); + + await deployments.execute( + 'FuelERC20GatewayV4', + { log: true, from: deployer.address }, + 'resetRateLimitAmount', + USDC_ADDRESS, + // param `limit` must be down/up scaled according to _adjustDepositDecimals + // USDC => 6 decimals => it will not have any scaling + parseUnits('25000', 6), // 250k USDC + ONE_WEEK_IN_SECONDS // 1 week of rate limit epochs + ); + + return true; +}; + +func.tags = ['gateway_rate_limit_usdc']; +func.id = 'gateway_rate_limit_usdc'; +export default func; diff --git a/packages/solidity-contracts/deploy/mainnet/011.configure_l2_issuer.ts b/packages/solidity-contracts/deploy/mainnet/011.configure_l2_issuer.ts new file mode 100644 index 00000000..75f90a28 --- /dev/null +++ b/packages/solidity-contracts/deploy/mainnet/011.configure_l2_issuer.ts @@ -0,0 +1,46 @@ +import type { HardhatRuntimeEnvironment } from 'hardhat/types'; +import type { DeployFunction } from 'hardhat-deploy/dist/types'; + +const ASSET_ISSUER_PROXY_ID = + '0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8'; +const ASSET_ISSUER_IMPL_ID = + '0x0ceafc5ef55c66912e855917782a3804dc489fb9e27edfd3621ea47d2a281156'; + +const ASSET_ISSUER_DEPLOY_OPTS = { + storageSlots: [ + { + key: '98437ca47af18022b9c1ac8bb7a1f9250530840d04707415ba2a4209cd03e82e', + value: '0000000000000000000000000000000000000000000000000000000000000000', + }, + ], + configurableConstants: { + BRIDGED_TOKEN_GATEWAY: + '0x000000000000000000000000a4ca04d02bfdc3a2df56b9b6994520e69df43f67', + }, + salt: '0x0000000000000000000000000000000000000000000000000000000000000000', +}; + +const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { + const { ethers, deployments } = hre; + const [deployer] = await ethers.getSigners(); + + await deployments.execute( + 'FuelERC20GatewayV4', + { log: true, from: deployer.address }, + 'setAssetIssuerId', + ASSET_ISSUER_PROXY_ID + ); + + await deployments.save('FuelL2BridgeId', { + address: ASSET_ISSUER_PROXY_ID, + abi: [], + implementation: ASSET_ISSUER_IMPL_ID, + linkedData: { deployOpts: ASSET_ISSUER_DEPLOY_OPTS }, + }); + + return true; +}; + +func.tags = ['set_asset_issuer']; +func.id = 'set_asset_issuer'; +export default func; diff --git a/packages/solidity-contracts/deploy/mainnet/012.portal_transfer_ownership.ts b/packages/solidity-contracts/deploy/mainnet/012.portal_transfer_ownership.ts new file mode 100644 index 00000000..b44a386a --- /dev/null +++ b/packages/solidity-contracts/deploy/mainnet/012.portal_transfer_ownership.ts @@ -0,0 +1,52 @@ +import { ZeroHash as DEFAULT_ADMIN_ROLE } from 'ethers'; +import { DeployFunction } from 'hardhat-deploy/dist/types'; +import { HardhatRuntimeEnvironment } from 'hardhat/types'; +import { FuelMessagePortalV3__factory } from '../../typechain'; +import { MAINNET_MULTISIG_ADDRESS } from '../../protocol/constants'; + +const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { + const { ethers, deployments } = hre; + const [deployer] = await ethers.getSigners(); + + const { address: portalAddress } = await deployments.get('FuelMessagePortal'); + const portal = FuelMessagePortalV3__factory.connect( + portalAddress, + ethers.provider + ); + + const PAUSER_ROLE = await portal.PAUSER_ROLE(); + const RATE_LIMITER_ROLE = await portal.SET_RATE_LIMITER_ROLE(); + + // Give admin role to multisig + await deployments.execute( + 'FuelMessagePortal', + { log: true, from: deployer.address }, + 'grantRole', + DEFAULT_ADMIN_ROLE, + MAINNET_MULTISIG_ADDRESS + ); + + // Give pauser role to multisig + await deployments.execute( + 'FuelMessagePortal', + { log: true, from: deployer.address }, + 'grantRole', + PAUSER_ROLE, + MAINNET_MULTISIG_ADDRESS + ); + + // Give rate limit role to multisig + await deployments.execute( + 'FuelMessagePortal', + { log: true, from: deployer.address }, + 'grantRole', + RATE_LIMITER_ROLE, + MAINNET_MULTISIG_ADDRESS + ); + + return true; +}; + +func.tags = ['portal_ownership']; +func.id = 'portal_ownership'; +export default func; diff --git a/packages/solidity-contracts/deploy/mainnet/013.chain_state_transfer_ownership.ts b/packages/solidity-contracts/deploy/mainnet/013.chain_state_transfer_ownership.ts new file mode 100644 index 00000000..a00fb9da --- /dev/null +++ b/packages/solidity-contracts/deploy/mainnet/013.chain_state_transfer_ownership.ts @@ -0,0 +1,39 @@ +import { ZeroHash as DEFAULT_ADMIN_ROLE } from 'ethers'; +import { DeployFunction } from 'hardhat-deploy/dist/types'; +import { HardhatRuntimeEnvironment } from 'hardhat/types'; +import { FuelChainState__factory } from '../../typechain'; +import { MAINNET_MULTISIG_ADDRESS } from '../../protocol/constants'; + +const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { + const { ethers, deployments } = hre; + const [deployer] = await ethers.getSigners(); + + const { address: stateAddress } = await deployments.get('FuelChainState'); + const state = FuelChainState__factory.connect(stateAddress, ethers.provider); + + const PAUSER_ROLE = await state.PAUSER_ROLE(); + + // Give admin role to multisig + await deployments.execute( + 'FuelChainState', + { log: true, from: deployer.address }, + 'grantRole', + DEFAULT_ADMIN_ROLE, + MAINNET_MULTISIG_ADDRESS + ); + + // Give pauser role to multisig + await deployments.execute( + 'FuelChainState', + { log: true, from: deployer.address }, + 'grantRole', + PAUSER_ROLE, + MAINNET_MULTISIG_ADDRESS + ); + + return true; +}; + +func.tags = ['state_ownership']; +func.id = 'state_ownership'; +export default func; diff --git a/packages/solidity-contracts/deploy/mainnet/014.gateway_transfer_ownership.ts b/packages/solidity-contracts/deploy/mainnet/014.gateway_transfer_ownership.ts new file mode 100644 index 00000000..2aa02169 --- /dev/null +++ b/packages/solidity-contracts/deploy/mainnet/014.gateway_transfer_ownership.ts @@ -0,0 +1,54 @@ +import { ZeroHash as DEFAULT_ADMIN_ROLE } from 'ethers'; +import { DeployFunction } from 'hardhat-deploy/dist/types'; +import { HardhatRuntimeEnvironment } from 'hardhat/types'; +import { FuelERC20GatewayV4__factory } from '../../typechain'; +import { MAINNET_MULTISIG_ADDRESS } from '../../protocol/constants'; + +const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { + const { ethers, deployments } = hre; + const [deployer] = await ethers.getSigners(); + + const { address: gatewayAddress } = await deployments.get( + 'FuelERC20GatewayV4' + ); + const portal = FuelERC20GatewayV4__factory.connect( + gatewayAddress, + ethers.provider + ); + + const PAUSER_ROLE = await portal.PAUSER_ROLE(); + const RATE_LIMITER_ROLE = await portal.SET_RATE_LIMITER_ROLE(); + + // Give admin role to multisig + await deployments.execute( + 'FuelERC20GatewayV4', + { log: true, from: deployer.address }, + 'grantRole', + DEFAULT_ADMIN_ROLE, + MAINNET_MULTISIG_ADDRESS + ); + + // Give pauser role to multisig + await deployments.execute( + 'FuelERC20GatewayV4', + { log: true, from: deployer.address }, + 'grantRole', + PAUSER_ROLE, + MAINNET_MULTISIG_ADDRESS + ); + + // Give rate limit role to multisig + await deployments.execute( + 'FuelMessagePortal', + { log: true, from: deployer.address }, + 'grantRole', + RATE_LIMITER_ROLE, + MAINNET_MULTISIG_ADDRESS + ); + + return true; +}; + +func.tags = ['gateway_ownership']; +func.id = 'gateway_ownership'; +export default func; diff --git a/packages/solidity-contracts/deploy/mainnet/015.relinquish_ownership.ts b/packages/solidity-contracts/deploy/mainnet/015.relinquish_ownership.ts new file mode 100644 index 00000000..ee54a211 --- /dev/null +++ b/packages/solidity-contracts/deploy/mainnet/015.relinquish_ownership.ts @@ -0,0 +1,98 @@ +import { ZeroHash as DEFAULT_ADMIN_ROLE } from 'ethers'; +import { DeployFunction } from 'hardhat-deploy/dist/types'; +import { HardhatRuntimeEnvironment } from 'hardhat/types'; +import { + FuelChainState__factory, + FuelERC20GatewayV4__factory, +} from '../../typechain'; + +const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { + const { ethers, deployments } = hre; + const [deployer] = await ethers.getSigners(); + + const { address: gatewayAddress } = await deployments.get( + 'FuelERC20GatewayV4' + ); + const { address: stateAddress } = await deployments.get('FuelChainState'); + const gateway = FuelERC20GatewayV4__factory.connect( + gatewayAddress, + ethers.provider + ); + + const state = FuelChainState__factory.connect(stateAddress, ethers.provider); + + const COMMITTER_ROLE = await state.COMMITTER_ROLE(); + + // This role is shared between the portal and the gateway + const RATE_LIMITER_ROLE = await gateway.SET_RATE_LIMITER_ROLE(); + + /** + * PORTAL: + * Renounce roles of current admin: + * - DEFAULT_ADMIN_ROLE (upgradability) + * - RATE_LIMITER_ROLE + */ + await deployments.execute( + 'FuelMessagePortal', + { log: true, from: deployer.address }, + 'renounceRole', + DEFAULT_ADMIN_ROLE, + deployer.address + ); + await deployments.execute( + 'FuelMessagePortal', + { log: true, from: deployer.address }, + 'renounceRole', + RATE_LIMITER_ROLE, + deployer.address + ); + + /** + * GATEWAY: + * Renounce roles of current admin: + * - DEFAULT_ADMIN_ROLE (upgradability) + * - RATE_LIMITER_ROLE + */ + await deployments.execute( + 'FuelERC20GatewayV4', + { log: true, from: deployer.address }, + 'renounceRole', + DEFAULT_ADMIN_ROLE, + deployer.address + ); + await deployments.execute( + 'FuelERC20GatewayV4', + { log: true, from: deployer.address }, + 'renounceRole', + RATE_LIMITER_ROLE, + deployer.address + ); + + /** + * STATE: + * Renounce roles of current admin: + * - DEFAULT_ADMIN_ROLE (upgradability) + * - COMMITTER_ROLE + */ + await deployments.execute( + 'FuelChainState', + { log: true, from: deployer.address }, + 'renounceRole', + DEFAULT_ADMIN_ROLE, + deployer.address + ); + await deployments.execute( + 'FuelChainState', + { log: true, from: deployer.address }, + 'renounceRole', + COMMITTER_ROLE, + deployer.address + ); + + return true; +}; + +func.tags = ['relinquish_ownership']; +func.id = 'relinquish_ownership'; +func.skip = async () => true; +export default func; diff --git a/packages/solidity-contracts/deploy/mainnet/016.gateway_upgrade.ts b/packages/solidity-contracts/deploy/mainnet/016.gateway_upgrade.ts new file mode 100644 index 00000000..48735ef4 --- /dev/null +++ b/packages/solidity-contracts/deploy/mainnet/016.gateway_upgrade.ts @@ -0,0 +1,40 @@ +import { TransactionResponse } from 'ethers'; +import type { HardhatRuntimeEnvironment } from 'hardhat/types'; +import type { DeployFunction } from 'hardhat-deploy/dist/types'; + +import { FuelERC20GatewayV4__factory } from '../../typechain'; +import { password } from '@inquirer/prompts'; + +const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { + const { + ethers, + upgrades: { prepareUpgrade, upgradeProxy, erc1967 }, + deployments: { get, save }, + } = hre; + + const privateKey = await password({ message: 'Enter private key' }); + const deployer = new ethers.Wallet(privateKey, ethers.provider); + + const { address } = await get('FuelERC20GatewayV4'); + + const factory = new FuelERC20GatewayV4__factory(deployer); + const tx = (await prepareUpgrade(address, factory, { + getTxResponse: true, + })) as TransactionResponse; + const receipt = await tx.wait(); + const implementation = receipt?.contractAddress!; + + console.log(`Proposed FuelERC20GatewayV4 upgrade to ${implementation}`); + await save('FuelERC20GatewayV4', { + address, + abi: [...FuelERC20GatewayV4__factory.abi], + implementation, + linkedData: { factory: 'FuelERC20GatewayV4' }, + }); + + return true; +}; + +func.tags = ['upgrade_gateway']; +func.id = 'upgrade_gateway'; +export default func; diff --git a/packages/solidity-contracts/deploy/mainnet/017.portal_upgrade.ts b/packages/solidity-contracts/deploy/mainnet/017.portal_upgrade.ts new file mode 100644 index 00000000..dc5e59a0 --- /dev/null +++ b/packages/solidity-contracts/deploy/mainnet/017.portal_upgrade.ts @@ -0,0 +1,48 @@ +import { TransactionResponse, parseEther } from 'ethers'; +import type { HardhatRuntimeEnvironment } from 'hardhat/types'; +import type { DeployFunction } from 'hardhat-deploy/dist/types'; + +import { FuelMessagePortalV3__factory as FuelMessagePortal } from '../../typechain'; +import { password } from '@inquirer/prompts'; + +const RATE_LIMIT_DURATION = 3600 * 24 * 7; + +// Global deposit cap: 19572 ETH +const ETH_DEPOSIT_CAP = parseEther('19572'); + +const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { + const { + ethers, + upgrades: { prepareUpgrade }, + deployments: { get, save }, + } = hre; + + const privateKey = await password({ message: 'Enter private key' }); + const deployer = new ethers.Wallet(privateKey, ethers.provider); + + const { address } = await get('FuelMessagePortal'); + + const constructorArgs = [ETH_DEPOSIT_CAP.toString(), RATE_LIMIT_DURATION]; + + const tx = (await prepareUpgrade(address, new FuelMessagePortal(deployer), { + constructorArgs, + getTxResponse: true, + })) as TransactionResponse; + const receipt = await tx.wait(); + + const implementation = receipt?.contractAddress!; + + console.log('Proposed FuelMessagePortal upgrade to', implementation); + await save('FuelMessagePortal', { + address, + abi: [...FuelMessagePortal.abi], + implementation, + linkedData: { factory: 'FuelMessagePortalV3', constructorArgs }, + }); + + return true; +}; + +func.tags = ['upgrade_portal']; +func.id = 'upgrade_portal'; +export default func; diff --git a/packages/solidity-contracts/deploy/mainnet/018.rate_limit_proposal.ts b/packages/solidity-contracts/deploy/mainnet/018.rate_limit_proposal.ts new file mode 100644 index 00000000..475baa3d --- /dev/null +++ b/packages/solidity-contracts/deploy/mainnet/018.rate_limit_proposal.ts @@ -0,0 +1,101 @@ +import type { + HardhatRuntimeEnvironment, + HttpNetworkConfig, +} from 'hardhat/types'; +import type { DeployFunction } from 'hardhat-deploy/dist/types'; +import SafeProtocolKit from '@safe-global/protocol-kit'; +import SafeApiKit from '@safe-global/api-kit'; + +import { MetaTransactionData } from '@safe-global/safe-core-sdk-types'; + +import { password } from '@inquirer/prompts'; +import { FuelERC20GatewayV4__factory } from '../../typechain'; +import { MAINNET_MULTISIG_ADDRESS } from '../../protocol/constants'; + +const MAINNET_TOKENS = [ + '0x4041381e947CFD3D483d67a25C6aa9Dc924250c5', + '0x8CdF550C04Bc9B9F10938368349C9c8051A772b6', + '0x3f24E1d7a973867fC2A03fE199E5502514E0e11E', + '0x83f20f44975d03b1b09e64809b757c47f942beea', + '0xd5F7838F5C461fefF7FE49ea5ebaF7728bB0ADfa', + '0xf469fbd2abcd6b9de8e169d128226c0fc90a012e', + '0xc96de26018a54d51c097160568752c4e3bd6c364', + '0x7a56e1c57c7475ccf742a1832b028f0456652f97', + '0xd9d920aa40f578ab794426f5c90f6c731d159def', + '0x5fD13359Ba15A84B76f7F87568309040176167cd', + '0x7a4EffD87C2f3C55CA251080b1343b605f327E3a', + '0xBEEF69Ac7870777598A04B2bd4771c71212E6aBc', + '0x84631c0d0081FDe56DeB72F6DE77abBbF6A9f93a', + '0x8c9532a60e0e7c6bbd2b2c1303f63ace1c3e9811', + '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', + '0xCd5fE23C85820F7B72D0926FC9b05b43E359b7ee', //weETH + '0xA1290d69c65A6Fe4DF752f95823fae25cB99e5A7', + '0xae78736cd615f374d3085123a210448e74fc6393', + '0xa2E3356610840701BDf5611a53974510Ae27E2e1', + '0xdac17f958d2ee523a2206206994597c13d831ec7', + '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', + '0x4c9edd5852cd905f086c759e8383e09bff1e68b3', + '0x9d39a5de30e57443bff2a8307a4256c8797a3497', + '0x82f5104b23FF2FA54C2345F821dAc9369e9E0B26', + '0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0', //wstETH + '0xbf5495Efe5DB9ce00f80364C8B423567e58d2110', +]; + +const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { + const privateKey = await password({ message: 'Enter private key' }); + const senderAddress = new hre.ethers.Wallet(privateKey).address; + const provider = (hre.config.networks['mainnet'] as HttpNetworkConfig).url; + + const { address: gatewayAddress } = await hre.deployments.get( + 'FuelERC20GatewayV4' + ); + + const safeAddress = MAINNET_MULTISIG_ADDRESS; + const apiKit = new SafeApiKit({ chainId: 1n }); + const protocolKit = await SafeProtocolKit.init({ + signer: privateKey, + provider, + safeAddress, + }); + + const gateway = FuelERC20GatewayV4__factory.connect( + gatewayAddress, + hre.ethers.provider + ); + + const transactions: MetaTransactionData[] = []; + + for (const token of MAINNET_TOKENS) { + const { data } = await gateway.updateRateLimitStatus.populateTransaction( + token, + true + ); + transactions.push({ + to: gatewayAddress, + data, + value: '0', + }); + } + + const safeTransaction = await protocolKit.createTransaction({ + transactions, + }); + + const safeTxHash = await protocolKit.getTransactionHash(safeTransaction); + + const signature = await protocolKit.signHash(safeTxHash); + + await apiKit.proposeTransaction({ + safeAddress, + safeTransactionData: safeTransaction.data, + safeTxHash, + senderAddress, + senderSignature: signature.data, + }); + + return true; +}; + +func.tags = ['rate_limit_proposal']; +func.id = 'rate_limit_proposal'; +export default func; diff --git a/packages/solidity-contracts/deploy/mainnet/019.pausers_proposal.ts b/packages/solidity-contracts/deploy/mainnet/019.pausers_proposal.ts new file mode 100644 index 00000000..a4b06d66 --- /dev/null +++ b/packages/solidity-contracts/deploy/mainnet/019.pausers_proposal.ts @@ -0,0 +1,95 @@ +import type { + HardhatRuntimeEnvironment, + HttpNetworkConfig, +} from 'hardhat/types'; +import type { DeployFunction } from 'hardhat-deploy/dist/types'; +import SafeProtocolKit from '@safe-global/protocol-kit'; +import SafeApiKit from '@safe-global/api-kit'; + +import { MetaTransactionData } from '@safe-global/safe-core-sdk-types'; + +import { password } from '@inquirer/prompts'; +import { FuelMessagePortalV3__factory } from '../../typechain'; +import { MAINNET_MULTISIG_ADDRESS } from '../../protocol/constants'; + +const PAUSERS = [ + '0x958470a2ADe72b7a01A2e160F3286767b9623Ad7', + '0x81ACA96D4Ae0932d2F3463a043392efcCB1F05b6', + '0x796C3f536C6bf5CB7661C9A0570da0e1ECD303Dd', + '0x9F7dfAb2222A473284205cdDF08a677726d786A0', + '0xC8Bd2Ead61e54C53C5A1836352c29F10383FBad2', + '0x45aa9fF818Ffaca57CA31b1C624b2a8CBF5B417e', + '0xf88b0247e611eE5af8Cf98f5303769Cba8e7177C', +]; + +const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { + const privateKey = await password({ message: 'Enter private key' }); + const senderAddress = new hre.ethers.Wallet(privateKey).address; + const provider = (hre.config.networks['mainnet'] as HttpNetworkConfig).url; + + const { address: gatewayAddress } = await hre.deployments.get( + 'FuelERC20GatewayV4' + ); + + const { address: portalAddress } = await hre.deployments.get( + 'FuelMessagePortal' + ); + + const { address: chainStateAddress } = await hre.deployments.get( + 'FuelChainState' + ); + + const contracts = [gatewayAddress, portalAddress, chainStateAddress]; + + const safeAddress = MAINNET_MULTISIG_ADDRESS; + const apiKit = new SafeApiKit({ chainId: 1n }); + const protocolKit = await SafeProtocolKit.init({ + signer: privateKey, + provider, + safeAddress, + }); + + const transactions: MetaTransactionData[] = []; + + for (const contractAddress of contracts) { + const contract = FuelMessagePortalV3__factory.connect( + contractAddress, + hre.ethers.provider + ); + const pauserRole = await contract.PAUSER_ROLE(); + + for (const pauser of PAUSERS) { + const { data } = await contract.grantRole.populateTransaction( + pauserRole, + pauser + ); + transactions.push({ + to: contractAddress, + data, + value: '0', + }); + } + } + + const safeTransaction = await protocolKit.createTransaction({ + transactions, + }); + + const safeTxHash = await protocolKit.getTransactionHash(safeTransaction); + + const signature = await protocolKit.signHash(safeTxHash); + + await apiKit.proposeTransaction({ + safeAddress, + safeTransactionData: safeTransaction.data, + safeTxHash, + senderAddress, + senderSignature: signature.data, + }); + + return true; +}; + +func.tags = ['pausers_proposal']; +func.id = 'pausers_proposal'; +export default func; diff --git a/packages/solidity-contracts/deployments/mainnet/.chainId b/packages/solidity-contracts/deployments/mainnet/.chainId new file mode 100644 index 00000000..56a6051c --- /dev/null +++ b/packages/solidity-contracts/deployments/mainnet/.chainId @@ -0,0 +1 @@ +1 \ No newline at end of file diff --git a/packages/solidity-contracts/deployments/mainnet/.migrations.json b/packages/solidity-contracts/deployments/mainnet/.migrations.json new file mode 100644 index 00000000..bb9df965 --- /dev/null +++ b/packages/solidity-contracts/deployments/mainnet/.migrations.json @@ -0,0 +1,20 @@ +{ + "chain_state": 1724767852, + "fuel_message_portal": 1724767873, + "register_committer": 1724767885, + "register_watchtower": 1724767898, + "register_watchtower_portal": 1724768943, + "set_deposit_limit_eth": 1724774569, + "gateway": 1725464667, + "gateway_enable_whitelist": 1725476103, + "gateway_whitelist_usdc": 1725476113, + "gateway_rate_limit_usdc": 1725476128, + "set_asset_issuer": 1725476138, + "portal_ownership": 1726352727, + "state_ownership": 1726352751, + "gateway_ownership": 1726352788, + "upgrade_gateway": 1727864679, + "upgrade_portal": 1727864801, + "rate_limit_proposal": 1727884066, + "pausers_proposal": 1728386955 +} \ No newline at end of file diff --git a/packages/solidity-contracts/deployments/mainnet/FuelChainState.json b/packages/solidity-contracts/deployments/mainnet/FuelChainState.json new file mode 100644 index 00000000..6590001e --- /dev/null +++ b/packages/solidity-contracts/deployments/mainnet/FuelChainState.json @@ -0,0 +1,585 @@ +{ + "address": "0xf3D20Db1D16A4D0ad2f280A5e594FF3c7790f130", + "abi": [ + { + "inputs": [ + { + "internalType": "uint256", + "name": "timeToFinalize", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "blocksPerCommitInterval", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "commitCooldown", + "type": "uint32" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "CannotRecommit", + "type": "error" + }, + { + "inputs": [], + "name": "CommitCooldownTooLarge", + "type": "error" + }, + { + "inputs": [], + "name": "FinalizationIsGtCooldown", + "type": "error" + }, + { + "inputs": [], + "name": "TimeToFinalizeTooLarge", + "type": "error" + }, + { + "inputs": [], + "name": "UnknownBlock", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "commitHeight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "blockHash", + "type": "bytes32" + } + ], + "name": "CommitSubmitted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "inputs": [], + "name": "BLOCKS_PER_COMMIT_INTERVAL", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "COMMITTER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "COMMIT_COOLDOWN", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "NUM_COMMIT_SLOTS", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PAUSER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "TIME_TO_FINALIZE", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "commitHeight", + "type": "uint256" + } + ], + "name": "blockHashAtCommit", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "blockHash", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "commitHeight", + "type": "uint256" + } + ], + "name": "commit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "blockHash", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "blockHeight", + "type": "uint256" + } + ], + "name": "finalized", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proxiableUUID", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + } + ], + "numDeployments": 1, + "linkedData": { + "factory": "FuelChainState", + "constructorArgs": [ + 604800, + 10800, + 604800 + ] + }, + "implementation": "0x725B2b1a15D818E1f25c68be77816802e6036559" +} \ No newline at end of file diff --git a/packages/solidity-contracts/deployments/mainnet/FuelERC20GatewayV4.json b/packages/solidity-contracts/deployments/mainnet/FuelERC20GatewayV4.json new file mode 100644 index 00000000..e49310e1 --- /dev/null +++ b/packages/solidity-contracts/deployments/mainnet/FuelERC20GatewayV4.json @@ -0,0 +1,922 @@ +{ + "address": "0xa4cA04d02bfdC3A2DF56B9b6994520E69dF43F67", + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "BridgeFull", + "type": "error" + }, + { + "inputs": [], + "name": "CallerIsNotPortal", + "type": "error" + }, + { + "inputs": [], + "name": "CannotDepositZero", + "type": "error" + }, + { + "inputs": [], + "name": "CannotWithdrawZero", + "type": "error" + }, + { + "inputs": [], + "name": "GlobalDepositLimit", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidAmount", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidAssetIssuerID", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidMessageSender", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidSender", + "type": "error" + }, + { + "inputs": [], + "name": "RateLimitExceeded", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "sender", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "tokenAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Deposit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "tokenAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "status", + "type": "bool" + } + ], + "name": "RateLimitStatusUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "tokenAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "RateLimitUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "recipient", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "tokenAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Withdrawal", + "type": "event" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "FUEL_ASSET_DECIMALS", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PAUSER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "SET_RATE_LIMITER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "assetIssuerId", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "currentPeriodAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "currentPeriodEnd", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "to", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "tokenAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "deposit", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "tokenAddress", + "type": "address" + } + ], + "name": "depositLimits", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "to", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "tokenAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "depositWithData", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "address", + "name": "tokenAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "l2BurntAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "finalizeWithdrawal", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "fuelMessagePortal", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract FuelMessagePortal", + "name": "fuelMessagePortal", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "limitAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proxiableUUID", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "rateLimitDuration", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "rateLimitStatus", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "value", + "type": "bool" + } + ], + "name": "requireWhitelist", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "rescueETH", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_rateLimitDuration", + "type": "uint256" + } + ], + "name": "resetRateLimitAmount", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "tokenAddress", + "type": "address" + } + ], + "name": "sendMetadata", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "id", + "type": "bytes32" + } + ], + "name": "setAssetIssuerId", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "limit", + "type": "uint256" + } + ], + "name": "setGlobalDepositLimit", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "tokenAddress", + "type": "address" + } + ], + "name": "tokensDeposited", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_token", + "type": "address" + }, + { + "internalType": "bool", + "name": "_rateLimitStatus", + "type": "bool" + } + ], + "name": "updateRateLimitStatus", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "whitelistRequired", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "numDeployments": 2, + "linkedData": { + "factory": "FuelERC20GatewayV4", + "constructorArgs": [] + }, + "transactionHash": "0x44c0654c83eff10b0126cc97f9d519ba8f1b4a41958886cb58eee3e939760c8e", + "implementation": "0xdE2D792ca3C4d02DE3CE1cD1456d8D0990cC3fab" +} \ No newline at end of file diff --git a/packages/solidity-contracts/deployments/mainnet/FuelL2BridgeId.json b/packages/solidity-contracts/deployments/mainnet/FuelL2BridgeId.json new file mode 100644 index 00000000..996c4cb3 --- /dev/null +++ b/packages/solidity-contracts/deployments/mainnet/FuelL2BridgeId.json @@ -0,0 +1,20 @@ +{ + "address": "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8", + "abi": [], + "numDeployments": 1, + "implementation": "0x0ceafc5ef55c66912e855917782a3804dc489fb9e27edfd3621ea47d2a281156", + "linkedData": { + "deployOpts": { + "storageSlots": [ + { + "key": "98437ca47af18022b9c1ac8bb7a1f9250530840d04707415ba2a4209cd03e82e", + "value": "0000000000000000000000000000000000000000000000000000000000000000" + } + ], + "configurableConstants": { + "BRIDGED_TOKEN_GATEWAY": "0x000000000000000000000000a4ca04d02bfdc3a2df56b9b6994520e69df43f67" + }, + "salt": "0x0000000000000000000000000000000000000000000000000000000000000000" + } + } +} \ No newline at end of file diff --git a/packages/solidity-contracts/deployments/mainnet/FuelMessagePortal.json b/packages/solidity-contracts/deployments/mainnet/FuelMessagePortal.json new file mode 100644 index 00000000..4f4bfef6 --- /dev/null +++ b/packages/solidity-contracts/deployments/mainnet/FuelMessagePortal.json @@ -0,0 +1,1168 @@ +{ + "address": "0xAEB0c00D0125A8a788956ade4f4F12Ead9f65DDf", + "abi": [ + { + "inputs": [ + { + "internalType": "uint256", + "name": "_depositLimitGlobal", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_rateLimitDuration", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "AlreadyRelayed", + "type": "error" + }, + { + "inputs": [], + "name": "AmountPrecisionIncompatibility", + "type": "error" + }, + { + "inputs": [], + "name": "AmountTooBig", + "type": "error" + }, + { + "inputs": [], + "name": "CurrentMessageSenderNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "GlobalDepositLimit", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidBlockInHistoryProof", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidMessageInBlockProof", + "type": "error" + }, + { + "inputs": [], + "name": "MessageBlacklisted", + "type": "error" + }, + { + "inputs": [], + "name": "MessageDataTooLarge", + "type": "error" + }, + { + "inputs": [], + "name": "MessageRelayFailed", + "type": "error" + }, + { + "inputs": [], + "name": "NotSupported", + "type": "error" + }, + { + "inputs": [], + "name": "RateLimitExceeded", + "type": "error" + }, + { + "inputs": [], + "name": "UnfinalizedBlock", + "type": "error" + }, + { + "inputs": [], + "name": "WithdrawalsPaused", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "oldValue", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newValue", + "type": "address" + } + ], + "name": "FuelChainStateUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "messageId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "sender", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "recipient", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "amount", + "type": "uint64" + } + ], + "name": "MessageRelayed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "sender", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "recipient", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "amount", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "MessageSent", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bool", + "name": "status", + "type": "bool" + } + ], + "name": "RateLimitStatusUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "ResetRateLimit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "ETH_DECIMALS", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "FUEL_BASE_ASSET_DECIMALS", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MAX_MESSAGE_DATA_SIZE", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PAUSER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PRECISION", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "RATE_LIMIT_DURATION", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "SET_RATE_LIMITER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "messageId", + "type": "bytes32" + } + ], + "name": "addMessageToBlacklist", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "currentPeriodAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "currentPeriodEnd", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "recipient", + "type": "bytes32" + } + ], + "name": "depositETH", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "depositLimitGlobal", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "fuelBaseAssetDecimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "fuelChainStateContract", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getNextOutgoingMessageNonce", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "messageId", + "type": "bytes32" + } + ], + "name": "incomingMessageSuccessful", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract FuelChainState", + "name": "", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract FuelChainState", + "name": "fuelChainState", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_limitAmount", + "type": "uint256" + } + ], + "name": "initializerV3", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "limitAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "messageIsBlacklisted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "messageSender", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "pauseWithdrawals", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proxiableUUID", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "rateLimitEnabled", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_limitAmount", + "type": "uint256" + } + ], + "name": "reinitializeV3", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "bytes32", + "name": "sender", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "recipient", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "nonce", + "type": "bytes32" + }, + { + "internalType": "uint64", + "name": "amount", + "type": "uint64" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct Message", + "name": "message", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "prevRoot", + "type": "bytes32" + }, + { + "internalType": "uint32", + "name": "height", + "type": "uint32" + }, + { + "internalType": "uint64", + "name": "timestamp", + "type": "uint64" + }, + { + "internalType": "bytes32", + "name": "applicationHash", + "type": "bytes32" + } + ], + "internalType": "struct FuelBlockHeaderLite", + "name": "rootBlockHeader", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "prevRoot", + "type": "bytes32" + }, + { + "internalType": "uint64", + "name": "timestamp", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "daHeight", + "type": "uint64" + }, + { + "internalType": "uint32", + "name": "outputMessagesCount", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "consensusParametersVersion", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "stateTransitionBytecodeVersion", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "height", + "type": "uint32" + }, + { + "internalType": "bytes32", + "name": "txRoot", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "outputMessagesRoot", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "eventInboxRoot", + "type": "bytes32" + }, + { + "internalType": "uint16", + "name": "txCount", + "type": "uint16" + } + ], + "internalType": "struct FuelBlockHeader", + "name": "blockHeader", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "key", + "type": "uint256" + }, + { + "internalType": "bytes32[]", + "name": "proof", + "type": "bytes32[]" + } + ], + "internalType": "struct MerkleProof", + "name": "blockInHistoryProof", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "key", + "type": "uint256" + }, + { + "internalType": "bytes32[]", + "name": "proof", + "type": "bytes32[]" + } + ], + "internalType": "struct MerkleProof", + "name": "messageInBlockProof", + "type": "tuple" + } + ], + "name": "relayMessage", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "messageId", + "type": "bytes32" + } + ], + "name": "removeMessageFromBlacklist", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "resetRateLimitAmount", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "recipient", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "sendMessage", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newFuelChainState", + "type": "address" + } + ], + "name": "setFuelChainState", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalDeposited", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "unpauseWithdrawals", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "value", + "type": "bool" + } + ], + "name": "updateRateLimitStatus", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "withdrawalsPaused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "numDeployments": 3, + "linkedData": { + "factory": "FuelMessagePortalV3", + "constructorArgs": [ + "19572000000000000000000", + 604800 + ] + }, + "implementation": "0x05f886DDeE0FE07496f6e38b0e140F8eF4655B16", + "transactionHash": "0x3ba642fb6850d061b7ef32ce921a0e70c98d028cfd3cc0af59ca51323f262814" +} \ No newline at end of file diff --git a/packages/solidity-contracts/hardhat.config.ts b/packages/solidity-contracts/hardhat.config.ts index 4c12bdc5..6b6830b3 100644 --- a/packages/solidity-contracts/hardhat.config.ts +++ b/packages/solidity-contracts/hardhat.config.ts @@ -109,6 +109,17 @@ const config: HardhatUserConfig = { deploy: ['deploy/testnet'], chainId: 11155111, }, + mainnet: { + url: RPC_URL, + accounts: CONTRACTS_DEPLOYER_KEY + ? [CONTRACTS_DEPLOYER_KEY] + : { + mnemonic: + 'test test test test test test test test test test test junk', + }, + deploy: ['deploy/mainnet'], + chainId: 1, + }, }, typechain: { outDir: 'typechain', diff --git a/packages/solidity-contracts/package.json b/packages/solidity-contracts/package.json index ce64ee1c..4afd31bc 100644 --- a/packages/solidity-contracts/package.json +++ b/packages/solidity-contracts/package.json @@ -39,6 +39,9 @@ "@openzeppelin/contracts": "^4.8.3", "@openzeppelin/contracts-upgradeable": "^4.8.3", "@openzeppelin/hardhat-upgrades": "^3.0.4", + "@safe-global/api-kit": "^2.4.6", + "@safe-global/protocol-kit": "^4.1.1", + "@safe-global/safe-core-sdk-types": "^5.1.0", "@typechain/ethers-v6": "^0.5.1", "@typechain/hardhat": "^9.1.0", "@types/chai": "^4.3.4", diff --git a/packages/solidity-contracts/protocol/constants.ts b/packages/solidity-contracts/protocol/constants.ts index e4dd37cf..57d477aa 100644 --- a/packages/solidity-contracts/protocol/constants.ts +++ b/packages/solidity-contracts/protocol/constants.ts @@ -17,3 +17,6 @@ export const USDT_ADDRESS = '0xdac17f958d2ee523a2206206994597c13d831ec7'; export const USDC_ADDRESS = '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48'; export const WBTC_ADDRESS = '0x2260fac5e5542a773aa44fbcfedf7c193bc2c599'; export const WETH_ADDRESS = '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2'; + +export const MAINNET_MULTISIG_ADDRESS = + '0x32da601374b38154f05904B16F44A1911Aa6f314'; diff --git a/packages/solidity-contracts/scripts/hardhat/depositMetadata.ts b/packages/solidity-contracts/scripts/hardhat/depositMetadata.ts new file mode 100644 index 00000000..551ebf6e --- /dev/null +++ b/packages/solidity-contracts/scripts/hardhat/depositMetadata.ts @@ -0,0 +1,57 @@ +import { Wallet, hexlify, toBeHex, zeroPadValue } from 'ethers'; +import type { Signer } from 'ethers'; +import { task } from 'hardhat/config'; +import { enterPrivateKey } from './utils'; + +task('depositMetadata', 'relays metadata of a token to Fuel') + .addFlag('env', 'use this flag to send transactions from env var PRIVATE_KEY') + .addFlag('i', 'use this flag to input a private key') + .addParam('token', 'address of the Token') + .setAction(async (taskArgs, hre) => { + let signer: Signer; + + if (taskArgs.i) { + const privateKey = await enterPrivateKey(); + signer = new Wallet(privateKey, hre.ethers.provider); + } else if (taskArgs.env) { + signer = new Wallet(process.env.PRIVATE_KEY!, hre.ethers.provider); + } else { + const signers = await hre.ethers.getSigners(); + signer = signers[0]; + } + + const contract = await hre.ethers.getContractAt( + 'FuelERC20GatewayV4', + ( + await hre.deployments.get('FuelERC20GatewayV4') + ).address, + signer + ); + + const portal = await hre.ethers.getContractAt( + 'FuelMessagePortalV3', + ( + await hre.deployments.get('FuelMessagePortal') + ).address + ); + + const tx = await contract.sendMetadata(taskArgs.token); + + console.log(`Transaction sent with hash=${tx.hash}`); + + const receipt = await tx.wait(); + + const [message] = await portal.queryFilter( + portal.filters.MessageSent, + receipt?.blockNumber!, + receipt?.blockNumber + ); + + console.log( + `\t> Completed at hash=${receipt!.hash} block=${receipt!.blockNumber}` + ); + + const nonce = message.args.nonce; + const nonceHex = zeroPadValue(hexlify(toBeHex(nonce)), 32); + console.log(`\t> Message nonce: ${nonce} (${nonceHex})`); + }); diff --git a/packages/solidity-contracts/scripts/hardhat/index.ts b/packages/solidity-contracts/scripts/hardhat/index.ts index 30cc9483..9d0021fd 100644 --- a/packages/solidity-contracts/scripts/hardhat/index.ts +++ b/packages/solidity-contracts/scripts/hardhat/index.ts @@ -4,9 +4,11 @@ export * from './grantRole'; export * from './verifyDeployment'; export * from './depositETH'; export * from './depositToken'; +export * from './depositMetadata'; export * from './resetETHRateLimit'; export * from './resetERC20RateLimit'; export * from './withdrawalPause'; export * from './withdrawalResume'; export * from './withdrawalBlacklist'; export * from './withdrawalWhitelist'; +export * from './verifyMainnetDeployment'; diff --git a/packages/solidity-contracts/scripts/hardhat/verifyMainnetDeployment.ts b/packages/solidity-contracts/scripts/hardhat/verifyMainnetDeployment.ts new file mode 100644 index 00000000..b60594ed --- /dev/null +++ b/packages/solidity-contracts/scripts/hardhat/verifyMainnetDeployment.ts @@ -0,0 +1,119 @@ +import { task } from 'hardhat/config'; +import { HardhatRuntimeEnvironment } from 'hardhat/types'; +import { ContractFactory, isAddress } from 'ethers'; + +task( + 'verify-mainnet-deployments', + 'Verifies proxy upgrades on mainnet' +).setAction(async (_: any, hre: HardhatRuntimeEnvironment): Promise => { + const network = hre.network.name; + + if (network !== 'mainnet') { + return; + } + + const { + ethers, + upgrades: { validateUpgrade, erc1967 }, + } = hre; + + console.log( + `Verifying proxy upgrade on ${network}:${hre.network.config.chainId}...` + ); + + const deployments = await hre.deployments.all(); + + for (const [contractName, deployment] of Object.entries(deployments)) { + console.log(`\nVerifying ${contractName} (${deployment.address}):`); + + // Edge case: we are also holding Fuel network artifacts (Fuell2BridgeId) + if (!isAddress(deployment.address)) { + continue; + } + + // Skip if not a proxy + if (!isAddress(deployment.implementation)) { + continue; + } + + const currentImplementation = await erc1967.getImplementationAddress( + deployment.address + ); + + // Only perform verification checks for a legitimate upgrade + if ( + currentImplementation.toLowerCase() === + deployment.implementation!.toLowerCase() + ) + continue; + + const factory = (await ethers.getContractFactory( + deployment.linkedData.factory + )) as ContractFactory; // Typing bug in `getContractFactory` + + console.log( + `--- Validating the upgrade to ${deployment.implementation} implementation...` + ); + + await validateUpgrade( + deployment.address as string, + factory, + { + kind: 'uups', + constructorArgs: deployment.linkedData.constructorArgs, + } as any // Typing bug in `validateUpgrade` + ); + + console.log('--- Upgrade Validated...'); + + console.log( + '--- Comparing expected init code with actual init code on-chain...' + ); + + const { data: expectedInitCode } = await factory.getDeployTransaction( + ...deployment.linkedData.constructorArgs + ); + + const fetchedDeploymentTx = await ethers.provider.getTransaction( + deployment.transactionHash! + )!; + + const receipt = await ethers.provider.getTransactionReceipt( + fetchedDeploymentTx?.hash! + ); + + // checking for null/undefined value too + if ( + fetchedDeploymentTx?.data && + expectedInitCode === fetchedDeploymentTx.data + ) { + console.log( + `✅ ${contractName} (${deployment.address}): Init Code verified successfully` + ); + } else { + console.log( + `❌ ${contractName} (${deployment.address}): Init Code mismatch` + ); + throw new Error('Init Code mismatch'); + } + + console.log( + '--- Check if the new implementation deployment resulted in deploying that implementation address...' + ); + + // checking for null/undefined value too + if ( + receipt?.contractAddress && + receipt.contractAddress === deployment.implementation + ) { + console.log( + `✅ ${contractName} (${deployment.address}): New implementation deployment verified` + ); + } else { + console.log( + `❌ ${contractName} (${deployment.address}): New implementation deployment verification failed` + ); + throw new Error('New implementation deployment verification failed'); + } + } +}); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9d9cbbd6..a9529b30 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -154,6 +154,15 @@ importers: '@openzeppelin/hardhat-upgrades': specifier: ^3.0.4 version: 3.0.5(@nomicfoundation/hardhat-ethers@3.0.5(ethers@6.13.1(bufferutil@4.0.5)(utf-8-validate@5.0.7))(hardhat@2.22.3(bufferutil@4.0.5)(ts-node@10.9.2(@types/node@18.19.31)(typescript@4.9.5))(typescript@4.9.5)(utf-8-validate@5.0.7)))(@nomicfoundation/hardhat-verify@1.1.1(hardhat@2.22.3(bufferutil@4.0.5)(ts-node@10.9.2(@types/node@18.19.31)(typescript@4.9.5))(typescript@4.9.5)(utf-8-validate@5.0.7)))(bufferutil@4.0.5)(ethers@6.13.1(bufferutil@4.0.5)(utf-8-validate@5.0.7))(hardhat@2.22.3(bufferutil@4.0.5)(ts-node@10.9.2(@types/node@18.19.31)(typescript@4.9.5))(typescript@4.9.5)(utf-8-validate@5.0.7))(utf-8-validate@5.0.7) + '@safe-global/api-kit': + specifier: ^2.4.6 + version: 2.4.6(bufferutil@4.0.5)(typescript@4.9.5)(utf-8-validate@5.0.7) + '@safe-global/protocol-kit': + specifier: ^4.1.1 + version: 4.1.1(bufferutil@4.0.5)(typescript@4.9.5)(utf-8-validate@5.0.7) + '@safe-global/safe-core-sdk-types': + specifier: ^5.1.0 + version: 5.1.0(typescript@4.9.5) '@typechain/ethers-v6': specifier: ^0.5.1 version: 0.5.1(ethers@6.13.1(bufferutil@4.0.5)(utf-8-validate@5.0.7))(typechain@8.3.2(typescript@4.9.5))(typescript@4.9.5) @@ -1261,6 +1270,7 @@ packages: '@humanwhocodes/config-array@0.11.14': resolution: {integrity: sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==} engines: {node: '>=10.10.0'} + deprecated: Use @eslint/config-array instead '@humanwhocodes/module-importer@1.0.1': resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} @@ -1268,6 +1278,7 @@ packages: '@humanwhocodes/object-schema@2.0.3': resolution: {integrity: sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==} + deprecated: Use @eslint/object-schema instead '@inquirer/checkbox@2.4.7': resolution: {integrity: sha512-5YwCySyV1UEgqzz34gNsC38eKxRBtlRDpJLlKcRtTjlYA/yDKuc1rfw+hjw+2WJxbAZtaDPsRl5Zk7J14SBoBw==} @@ -1570,9 +1581,11 @@ packages: '@openzeppelin/defender-admin-client@1.54.1': resolution: {integrity: sha512-kRpSUdTsnSqntp4FOXIm95t+6VKHc8CUY2Si71VDuxs0q7HSPZkdpRPSntcolwEzWy9L4a8NS/QMwDF5NJ4X1g==} + deprecated: This package has been deprecated and will no longer be maintained, please use @openzeppelin/defender-sdk package instead. '@openzeppelin/defender-base-client@1.54.1': resolution: {integrity: sha512-DRGz/7KN3ZQwu28YWMOaojrC7jjPkz/uCwkC8/C8B11qwZhA5qIVvyhYHhhFOCl0J84+E3TNdvkPD2q3p2WaJw==} + deprecated: This package has been deprecated and will no longer be maintained, please use @openzeppelin/defender-sdk package instead. '@openzeppelin/defender-sdk-base-client@1.12.0': resolution: {integrity: sha512-6n5SwJWCjFciC+T7QhfXnkEmkNZGKK0efkCZDAfu/Kd8L1AICnIkWwVte71dnzCBln7wglMiZupSHL3fZqePmQ==} @@ -1767,6 +1780,21 @@ packages: cpu: [x64] os: [win32] + '@safe-global/api-kit@2.4.6': + resolution: {integrity: sha512-57lXrqXnmdUdQ12ssWSVDZhpIY2HcJzDvR4w6edT8xebEaduKx2UpwRJ8U2WVEBrx5K9PYuLAPsPHs+/r0yuGg==} + + '@safe-global/protocol-kit@4.1.1': + resolution: {integrity: sha512-11Jui1gIpCOV1sUn5HlT+hVn/+gJnKjik0V0aUPDKIL2zajwc+jReZK43CH5GyOHKOF7gCs2yprMHOrQuKkkqw==} + + '@safe-global/safe-core-sdk-types@5.1.0': + resolution: {integrity: sha512-UzXR4zWmVzux25FcIm4H049QhZZpVpIBL5HE+V0p5gHpArZROL+t24fZmsKUf403CtBxIJM5zZSVQL0nFJi+IQ==} + + '@safe-global/safe-deployments@1.37.10': + resolution: {integrity: sha512-lcxX9CV+xdcLs4dF6Cx18zDww5JyqaX6RdcvU0o/34IgJ4Wjo3J/RNzJAoMhurCAfTGr+0vyJ9V13Qo50AR6JA==} + + '@safe-global/safe-modules-deployments@2.2.2': + resolution: {integrity: sha512-OUP/XF5W01BiVpHuojG/pLjzhiDNp7rxmJbRmhX0XqFc4ie7P9e9xYn/kjl6NbBpUc5XzHm9yD8HmpInAZBWig==} + '@scure/base@1.1.6': resolution: {integrity: sha512-ok9AWwhcgYuGG3Zfhyqg+zwl+Wn5uE+dwC0NV/2qQkx4dABbb/bx96vWu8NSj+BNjjSjno+JRYRjle1jV08k3g==} @@ -2086,6 +2114,17 @@ packages: abbrev@1.0.9: resolution: {integrity: sha512-LEyx4aLEC3x6T0UguF6YILf+ntvmOaWsVfENmIW0E9H09vKlLDGelMjjSm0jkDHALj8A8quZ/HapKNigzwge+Q==} + abitype@1.0.6: + resolution: {integrity: sha512-MMSqYh4+C/aVqI2RQaWqbvI4Kxo5cQV40WQ4QFtDnNzCkqChm8MuENhElmynZlO0qUy/ObkEUaXtKqYnx1Kp3A==} + peerDependencies: + typescript: '>=5.0.4' + zod: ^3 >=3.22.0 + peerDependenciesMeta: + typescript: + optional: true + zod: + optional: true + accepts@1.3.8: resolution: {integrity: sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==} engines: {node: '>= 0.6'} @@ -2306,9 +2345,6 @@ packages: resolution: {integrity: sha512-M0JtH+hlOL5pLQwHOLNYZaXuhqmvS8oExsqB1SBYgA4Dk7u/xx+YdGHXaK5pyUfed5mYXdlYiphWq3G8cRi5JQ==} engines: {node: '>=4'} - axios@1.6.8: - resolution: {integrity: sha512-v/ZHtJDU39mDpyBoFVkETcd/uNdxrWRrg3bKpOKzXFA6Bvqopts6ALSMU3y6ijYxbw2B+wPrIv46egTzJXCLGQ==} - axios@1.7.5: resolution: {integrity: sha512-fZu86yCo+svH3uqJ/yTdQ0QHpQu5oL+/QE+QPSv6BZSkDAoky9vytxp7u5qk83OJFS3kEBcesWni9WTZAv3tSw==} @@ -3102,6 +3138,7 @@ packages: ethereum-bloom-filters@1.1.0: resolution: {integrity: sha512-J1gDRkLpuGNvWYzWslBQR9cDV4nd4kfvVTE/Wy4Kkm4yb3EYRSlyi0eB/inTsSTTVyA0+HyzHgbr95Fn/Z1fSw==} + deprecated: do not use this package use package versions above as this can miss some topics ethereum-cryptography@0.1.3: resolution: {integrity: sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ==} @@ -3386,23 +3423,29 @@ packages: glob@5.0.15: resolution: {integrity: sha512-c9IPMazfRITpmAAKi22dK1VKxGDX9ehhqfABDriL/lzO92xcUKEJPQHrVA/2YHSNFB4iFlykVmWvwo48nr3OxA==} + deprecated: Glob versions prior to v9 are no longer supported glob@7.1.7: resolution: {integrity: sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==} + deprecated: Glob versions prior to v9 are no longer supported glob@7.2.0: resolution: {integrity: sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==} + deprecated: Glob versions prior to v9 are no longer supported glob@7.2.3: resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} + deprecated: Glob versions prior to v9 are no longer supported glob@8.0.3: resolution: {integrity: sha512-ull455NHSHI/Y1FqGaaYFaLGkNMMJbavMrEGFXG/PGrg6y7sutWHUHrz6gy6WEBH6akM1M414dWKCNs+IhKdiQ==} engines: {node: '>=12'} + deprecated: Glob versions prior to v9 are no longer supported glob@8.1.0: resolution: {integrity: sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==} engines: {node: '>=12'} + deprecated: Glob versions prior to v9 are no longer supported global-modules@2.0.0: resolution: {integrity: sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A==} @@ -3596,6 +3639,7 @@ packages: inflight@1.0.6: resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} + deprecated: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. inherits@2.0.4: resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} @@ -4676,10 +4720,12 @@ packages: rimraf@2.6.3: resolution: {integrity: sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==} + deprecated: Rimraf versions prior to v4 are no longer supported hasBin: true rimraf@2.7.1: resolution: {integrity: sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==} + deprecated: Rimraf versions prior to v4 are no longer supported hasBin: true rimraf@3.0.2: @@ -4769,6 +4815,11 @@ packages: engines: {node: '>=10'} hasBin: true + semver@7.6.3: + resolution: {integrity: sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==} + engines: {node: '>=10'} + hasBin: true + send@0.18.0: resolution: {integrity: sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==} engines: {node: '>= 0.8.0'} @@ -7323,6 +7374,48 @@ snapshots: '@rollup/rollup-win32-x64-msvc@4.22.4': optional: true + '@safe-global/api-kit@2.4.6(bufferutil@4.0.5)(typescript@4.9.5)(utf-8-validate@5.0.7)': + dependencies: + '@safe-global/protocol-kit': 4.1.1(bufferutil@4.0.5)(typescript@4.9.5)(utf-8-validate@5.0.7) + '@safe-global/safe-core-sdk-types': 5.1.0(typescript@4.9.5) + ethers: 6.13.1(bufferutil@4.0.5)(utf-8-validate@5.0.7) + node-fetch: 2.7.0 + transitivePeerDependencies: + - bufferutil + - encoding + - typescript + - utf-8-validate + - zod + + '@safe-global/protocol-kit@4.1.1(bufferutil@4.0.5)(typescript@4.9.5)(utf-8-validate@5.0.7)': + dependencies: + '@noble/hashes': 1.4.0 + '@safe-global/safe-core-sdk-types': 5.1.0(typescript@4.9.5) + '@safe-global/safe-deployments': 1.37.10 + '@safe-global/safe-modules-deployments': 2.2.2 + abitype: 1.0.6(typescript@4.9.5) + ethereumjs-util: 7.1.5 + ethers: 6.13.1(bufferutil@4.0.5)(utf-8-validate@5.0.7) + semver: 7.6.3 + transitivePeerDependencies: + - bufferutil + - typescript + - utf-8-validate + - zod + + '@safe-global/safe-core-sdk-types@5.1.0(typescript@4.9.5)': + dependencies: + abitype: 1.0.6(typescript@4.9.5) + transitivePeerDependencies: + - typescript + - zod + + '@safe-global/safe-deployments@1.37.10': + dependencies: + semver: 7.6.3 + + '@safe-global/safe-modules-deployments@2.2.2': {} + '@scure/base@1.1.6': {} '@scure/bip32@1.1.5': @@ -7758,6 +7851,10 @@ snapshots: abbrev@1.0.9: {} + abitype@1.0.6(typescript@4.9.5): + optionalDependencies: + typescript: 4.9.5 + accepts@1.3.8: dependencies: mime-types: 2.1.35 @@ -7988,14 +8085,6 @@ snapshots: axe-core@4.7.0: {} - axios@1.6.8(debug@4.3.4): - dependencies: - follow-redirects: 1.15.6(debug@4.3.4) - form-data: 4.0.0 - proxy-from-env: 1.1.0 - transitivePeerDependencies: - - debug - axios@1.7.5(debug@4.3.4): dependencies: follow-redirects: 1.15.6(debug@4.3.4) @@ -9683,7 +9772,7 @@ snapshots: '@ethersproject/transactions': 5.7.0 '@ethersproject/wallet': 5.7.0 '@types/qs': 6.9.15 - axios: 1.6.8(debug@4.3.4) + axios: 1.7.5(debug@4.3.4) chalk: 4.1.2 chokidar: 3.6.0 debug: 4.3.4(supports-color@8.1.1) @@ -11024,6 +11113,8 @@ snapshots: dependencies: lru-cache: 6.0.0 + semver@7.6.3: {} + send@0.18.0: dependencies: debug: 2.6.9