From 23c9f27070b780af362039a80d6d6d8f95303ce5 Mon Sep 17 00:00:00 2001 From: Sergey <2901744+evercoinx@users.noreply.github.com> Date: Tue, 5 Nov 2024 09:47:44 +0100 Subject: [PATCH] Deploy MaticX and ChildPool contracts into amoy network --- .openzeppelin/unknown-80002.json | 558 +++++++++++++++++++++++++++++++ Makefile | 10 +- docs/Amoy-Testnet.md | 28 ++ docs/Home.md | 1 + 4 files changed, 595 insertions(+), 2 deletions(-) create mode 100644 .openzeppelin/unknown-80002.json diff --git a/.openzeppelin/unknown-80002.json b/.openzeppelin/unknown-80002.json new file mode 100644 index 0000000..b2a6f6a --- /dev/null +++ b/.openzeppelin/unknown-80002.json @@ -0,0 +1,558 @@ +{ + "manifestVersion": "3.2", + "proxies": [ + { + "address": "0xFD837d45dd6Af18D039122301C3331D4A4307351", + "txHash": "0x93a73c0dbac85f903c8ea2910ea8c75c83cfb183c694c369dfbe348d89561e31", + "kind": "transparent" + }, + { + "address": "0x54a994B66FA7eA7160D6281002B56a041db0b5a5", + "txHash": "0xd18cddf5f1099bc9d352e21b280ac1769203b0256ca2120b438fcc1e41402240", + "kind": "transparent" + } + ], + "impls": { + "e5903ca0d7aa262e0f06104e130a6d000b3f913aef9fe9cde05367ad80f5de61": { + "address": "0xFAFbbA44f12066B4BF8EB0d05dD26a5567D3bb2F", + "txHash": "0x9be41cce4cda2bb58d62b841fa9ff31465b5171b791dad6c4493499e85f1ebbc", + "layout": { + "solcVersion": "0.8.8", + "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": "__gap", + "offset": 0, + "slot": "51", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC165Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol:41" + }, + { + "label": "_roles", + "offset": 0, + "slot": "101", + "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": "102", + "type": "t_array(t_uint256)49_storage", + "contract": "AccessControlUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol:260" + }, + { + "label": "_balances", + "offset": 0, + "slot": "151", + "type": "t_mapping(t_address,t_uint256)", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:40" + }, + { + "label": "_allowances", + "offset": 0, + "slot": "152", + "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:42" + }, + { + "label": "_totalSupply", + "offset": 0, + "slot": "153", + "type": "t_uint256", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:44" + }, + { + "label": "_name", + "offset": 0, + "slot": "154", + "type": "t_string_storage", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:46" + }, + { + "label": "_symbol", + "offset": 0, + "slot": "155", + "type": "t_string_storage", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:47" + }, + { + "label": "__gap", + "offset": 0, + "slot": "156", + "type": "t_array(t_uint256)45_storage", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:376" + }, + { + "label": "_hashedName", + "offset": 0, + "slot": "201", + "type": "t_bytes32", + "contract": "EIP712Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol:40", + "renamedFrom": "_HASHED_NAME" + }, + { + "label": "_hashedVersion", + "offset": 0, + "slot": "202", + "type": "t_bytes32", + "contract": "EIP712Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol:42", + "renamedFrom": "_HASHED_VERSION" + }, + { + "label": "_name", + "offset": 0, + "slot": "203", + "type": "t_string_storage", + "contract": "EIP712Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol:44" + }, + { + "label": "_version", + "offset": 0, + "slot": "204", + "type": "t_string_storage", + "contract": "EIP712Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol:45" + }, + { + "label": "__gap", + "offset": 0, + "slot": "205", + "type": "t_array(t_uint256)48_storage", + "contract": "EIP712Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol:204" + }, + { + "label": "_nonces", + "offset": 0, + "slot": "253", + "type": "t_mapping(t_address,t_struct(Counter)2523_storage)", + "contract": "ERC20PermitUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20PermitUpgradeable.sol:28" + }, + { + "label": "_PERMIT_TYPEHASH_DEPRECATED_SLOT", + "offset": 0, + "slot": "254", + "type": "t_bytes32", + "contract": "ERC20PermitUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20PermitUpgradeable.sol:40", + "renamedFrom": "_PERMIT_TYPEHASH" + }, + { + "label": "__gap", + "offset": 0, + "slot": "255", + "type": "t_array(t_uint256)49_storage", + "contract": "ERC20PermitUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20PermitUpgradeable.sol:108" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)45_storage": { + "label": "uint256[45]", + "numberOfBytes": "1440" + }, + "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_mapping(t_address,t_bool)": { + "label": "mapping(address => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_mapping(t_address,t_uint256))": { + "label": "mapping(address => mapping(address => uint256))", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_struct(Counter)2523_storage)": { + "label": "mapping(address => struct CountersUpgradeable.Counter)", + "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_string_storage": { + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(Counter)2523_storage": { + "label": "struct CountersUpgradeable.Counter", + "members": [ + { + "label": "_value", + "type": "t_uint256", + "offset": 0, + "slot": "0" + } + ], + "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": {} + } + }, + "90e9acc63b9f699726932b072fafdb4f0936f0bc0434ae250c781d075c489eec": { + "address": "0xE98fc808E8aE8025a1D17d6F4Fbc3Df226788438", + "txHash": "0x5e24d7aea66d9472cf29778d3fd47a21c4baea0672ee7a1c6e560638cb24096d", + "layout": { + "solcVersion": "0.8.7", + "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": "__gap", + "offset": 0, + "slot": "51", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC165Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol:41" + }, + { + "label": "_roles", + "offset": 0, + "slot": "101", + "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": "102", + "type": "t_array(t_uint256)49_storage", + "contract": "AccessControlUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol:260" + }, + { + "label": "_paused", + "offset": 0, + "slot": "151", + "type": "t_bool", + "contract": "PausableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:29" + }, + { + "label": "__gap", + "offset": 0, + "slot": "152", + "type": "t_array(t_uint256)49_storage", + "contract": "PausableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:116" + }, + { + "label": "fxStateChildTunnel", + "offset": 0, + "slot": "201", + "type": "t_address", + "contract": "ChildPool", + "src": "contracts/ChildPool.sol:26" + }, + { + "label": "maticX", + "offset": 0, + "slot": "202", + "type": "t_address", + "contract": "ChildPool", + "src": "contracts/ChildPool.sol:27" + }, + { + "label": "trustedForwarder", + "offset": 0, + "slot": "203", + "type": "t_address", + "contract": "ChildPool", + "src": "contracts/ChildPool.sol:28" + }, + { + "label": "treasury", + "offset": 0, + "slot": "204", + "type": "t_address_payable", + "contract": "ChildPool", + "src": "contracts/ChildPool.sol:30" + }, + { + "label": "instantPoolOwner", + "offset": 0, + "slot": "205", + "type": "t_address_payable", + "contract": "ChildPool", + "src": "contracts/ChildPool.sol:31" + }, + { + "label": "instantPoolMatic", + "offset": 0, + "slot": "206", + "type": "t_uint256", + "contract": "ChildPool", + "src": "contracts/ChildPool.sol:32" + }, + { + "label": "instantPoolMaticX", + "offset": 0, + "slot": "207", + "type": "t_uint256", + "contract": "ChildPool", + "src": "contracts/ChildPool.sol:33" + }, + { + "label": "version", + "offset": 0, + "slot": "208", + "type": "t_string_storage", + "contract": "ChildPool", + "src": "contracts/ChildPool.sol:35" + }, + { + "label": "instantWithdrawalFeeBps", + "offset": 0, + "slot": "209", + "type": "t_uint256", + "contract": "ChildPool", + "src": "contracts/ChildPool.sol:36" + }, + { + "label": "instantWithdrawalFees", + "offset": 0, + "slot": "210", + "type": "t_uint256", + "contract": "ChildPool", + "src": "contracts/ChildPool.sol:37" + }, + { + "label": "userMaticXSwapRequests", + "offset": 0, + "slot": "211", + "type": "t_mapping(t_address,t_array(t_struct(MaticXSwapRequest)9223_storage)dyn_storage)", + "contract": "ChildPool", + "src": "contracts/ChildPool.sol:39" + }, + { + "label": "claimedMatic", + "offset": 0, + "slot": "212", + "type": "t_uint256", + "contract": "ChildPool", + "src": "contracts/ChildPool.sol:40" + }, + { + "label": "maticXSwapLockPeriod", + "offset": 0, + "slot": "213", + "type": "t_uint256", + "contract": "ChildPool", + "src": "contracts/ChildPool.sol:41" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_address_payable": { + "label": "address payable", + "numberOfBytes": "20" + }, + "t_array(t_struct(MaticXSwapRequest)9223_storage)dyn_storage": { + "label": "struct IChildPool.MaticXSwapRequest[]", + "numberOfBytes": "32" + }, + "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_array(t_struct(MaticXSwapRequest)9223_storage)dyn_storage)": { + "label": "mapping(address => struct IChildPool.MaticXSwapRequest[])", + "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_string_storage": { + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(MaticXSwapRequest)9223_storage": { + "label": "struct IChildPool.MaticXSwapRequest", + "members": [ + { + "label": "amount", + "type": "t_uint256", + "offset": 0, + "slot": "0" + }, + { + "label": "requestTime", + "type": "t_uint256", + "offset": 0, + "slot": "1" + }, + { + "label": "withdrawalTime", + "type": "t_uint256", + "offset": 0, + "slot": "2" + } + ], + "numberOfBytes": "96" + }, + "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/Makefile b/Makefile index a3dd987..63a505b 100644 --- a/Makefile +++ b/Makefile @@ -60,8 +60,8 @@ SEPOLIA_MANAGER := 0x369B31971250859d3AD37E7cEDCF42AA5CF2C4F4 SEPOLIA_TREASURY := 0xdeb90df43BBa8FC0e2C08C54dC0F48cfc694F896 # Amoy contract addresses -AMOY_MATIC_X := -AMOY_CHILD_POOL := +AMOY_MATIC_X := 0xFD837d45dd6Af18D039122301C3331D4A4307351 +AMOY_CHILD_POOL := 0x54a994B66FA7eA7160D6281002B56a041db0b5a5 AMOY_FX_CHILD := 0xE5930336866d0388f0f745A2d9207C7781047C0f AMOY_FX_STATE_CHILD_TUNNEL := 0xDC5e26af83c1694A655beBe22689f12A42573d94 AMOY_MANAGER := 0x8C6B3eE457b193A49794df466957441b4AccD102 @@ -198,6 +198,12 @@ verify-maticx-ethereum: verify-maticx-polygon: $(BIN_HARDHAT) verify-contract --network $(NETWORK_POLYGON) --contract $(POLYGON_MATIC_X) +# Verify the ChildPool contract +verify-childpool-amoy: + $(BIN_HARDHAT) verify-contract --network $(NETWORK_AMOY) --contract $(AMOY_CHILD_POOL) +verify-childpool-polygon: + $(BIN_HARDHAT) verify-contract --network $(NETWORK_POLYGON) --contract $(POLYGON_CHILD_POOL) + # Verify the FxStateRootTunnel contract verify-fxstateroottunnel-sepolia: $(BIN_HARDHAT) verify-contract --network $(NETWORK_SEPOLIA) --contract $(SEPOLIA_FX_STATE_ROOT_TUNNEL) "$(SEPOLIA_CHECKPOINT_MANAGER)" "$(SEPOLIA_FX_ROOT)" "$(SEPOLIA_MATIC_X)" diff --git a/docs/Amoy-Testnet.md b/docs/Amoy-Testnet.md index 3b73dd6..a134e29 100644 --- a/docs/Amoy-Testnet.md +++ b/docs/Amoy-Testnet.md @@ -2,6 +2,34 @@ ## Amoy Testnet +### MaticX + +- Proxy address: [0xFD837d45dd6Af18D039122301C3331D4A4307351](https://amoy.polygonscan.com/address/0xFD837d45dd6Af18D039122301C3331D4A4307351) +- Implementation address: [0xFAFbbA44f12066B4BF8EB0d05dD26a5567D3bb2F](https://amoy.polygonscan.com/address/0xFAFbbA44f12066B4BF8EB0d05dD26a5567D3bb2F) +- Proxy admin address: [0x2c589ae5c64Be500585A712892c71ffd105A184E](https://amoy.polygonscan.com/address/0x2c589ae5c64Be500585A712892c71ffd105A184E) + +### Child Pool + +- Proxy address: [0x54a994B66FA7eA7160D6281002B56a041db0b5a5](https://amoy.polygonscan.com/address/0x54a994B66FA7eA7160D6281002B56a041db0b5a5) +- Implementation address: [0xE98fc808E8aE8025a1D17d6F4Fbc3Df226788438](https://amoy.polygonscan.com/address/0xE98fc808E8aE8025a1D17d6F4Fbc3Df226788438) +- Proxy admin address: [0x9eA2a15715629A67f08815CDf6608E35A2371691](https://amoy.polygonscan.com/address/0x9eA2a15715629A67f08815CDf6608E35A2371691) + +### Fx State Child Tunnel + +- Address: [0xDC5e26af83c1694A655beBe22689f12A42573d94](https://amoy.polygonscan.com/address/0xDC5e26af83c1694A655beBe22689f12A42573d94) + ### Fx Child - Address: [0xE5930336866d0388f0f745A2d9207C7781047C0f](https://amoy.polygonscan.com/address/0xE5930336866d0388f0f745A2d9207C7781047C0f) + +### Manager + +- Address: [0x8C6B3eE457b193A49794df466957441b4AccD102](https://amoy.polygonscan.com/address/0x8C6B3eE457b193A49794df466957441b4AccD102) + +### Treasury + +- Address: [0x8C6B3eE457b193A49794df466957441b4AccD102](https://amoy.polygonscan.com/address/0x8C6B3eE457b193A49794df466957441b4AccD102) + +### Root Deployer + +- Address: [0x8C6B3eE457b193A49794df466957441b4AccD102](https://amoy.polygonscan.com/address/0x8C6B3eE457b193A49794df466957441b4AccD102) diff --git a/docs/Home.md b/docs/Home.md index 4296db1..6bd6706 100644 --- a/docs/Home.md +++ b/docs/Home.md @@ -5,3 +5,4 @@ - [Ethereum Mainnet](https://github.com/stader-labs/maticX/wiki/Ethereum-Mainnet) - [Polygon Mainnet](https://github.com/stader-labs/maticX/wiki/Polygon-Mainnet) - [Sepolia Testnet](https://github.com/stader-labs/maticX/wiki/Sepolia-Testnet) +- [Amoy Testnet](https://github.com/stader-labs/maticX/wiki/Amoy-Testnet)