diff --git a/.openzeppelin/unknown-31337.json b/.openzeppelin/unknown-31337.json deleted file mode 100644 index fc59b88..0000000 --- a/.openzeppelin/unknown-31337.json +++ /dev/null @@ -1,3239 +0,0 @@ -{ - "manifestVersion": "3.2", - "admin": { - "address": "0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512", - "txHash": "0xe214fdf949d8553a5cea0f8662289f7e896e85e81d0e1247d780d1768c31a861", - "deployTransaction": { - "hash": "0xe214fdf949d8553a5cea0f8662289f7e896e85e81d0e1247d780d1768c31a861", - "type": 2, - "accessList": [], - "blockHash": "0x43fd837d4b4a7ee8b70e3d1755b9eae20eeb90a72d196fc63519e4860965193d", - "blockNumber": 2, - "transactionIndex": 0, - "confirmations": 1, - "from": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266", - "gasPrice": { - "type": "BigNumber", - "hex": "0x69abbcc2" - }, - "maxPriorityFeePerGas": { - "type": "BigNumber", - "hex": "0x3b9aca00" - }, - "maxFeePerGas": { - "type": "BigNumber", - "hex": "0x97bcaf84" - }, - "gasLimit": { - "type": "BigNumber", - "hex": "0x0762b4" - }, - "to": null, - "value": { - "type": "BigNumber", - "hex": "0x00" - }, - "nonce": 1, - "data": "0x608060405234801561001057600080fd5b50600080546001600160a01b031916339081178255604051909182917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350610759806100616000396000f3fe60806040526004361061007b5760003560e01c80639623609d1161004e5780639623609d1461011157806399a88ec414610124578063f2fde38b14610144578063f3b7dead146101645761007b565b8063204e1c7a14610080578063715018a6146100bc5780637eff275e146100d35780638da5cb5b146100f3575b600080fd5b34801561008c57600080fd5b506100a061009b366004610515565b610184565b6040516001600160a01b03909116815260200160405180910390f35b3480156100c857600080fd5b506100d1610215565b005b3480156100df57600080fd5b506100d16100ee366004610554565b610292565b3480156100ff57600080fd5b506000546001600160a01b03166100a0565b6100d161011f36600461058c565b61031c565b34801561013057600080fd5b506100d161013f366004610554565b6103ad565b34801561015057600080fd5b506100d161015f366004610515565b610405565b34801561017057600080fd5b506100a061017f366004610515565b6104ef565b6000806000836001600160a01b03166040516101aa90635c60da1b60e01b815260040190565b600060405180830381855afa9150503d80600081146101e5576040519150601f19603f3d011682016040523d82523d6000602084013e6101ea565b606091505b5091509150816101f957600080fd5b8080602001905181019061020d9190610538565b949350505050565b6000546001600160a01b031633146102485760405162461bcd60e51b815260040161023f906106c0565b60405180910390fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146102bc5760405162461bcd60e51b815260040161023f906106c0565b6040516308f2839760e41b81526001600160a01b038281166004830152831690638f283970906024015b600060405180830381600087803b15801561030057600080fd5b505af1158015610314573d6000803e3d6000fd5b505050505050565b6000546001600160a01b031633146103465760405162461bcd60e51b815260040161023f906106c0565b60405163278f794360e11b81526001600160a01b03841690634f1ef286903490610376908690869060040161065d565b6000604051808303818588803b15801561038f57600080fd5b505af11580156103a3573d6000803e3d6000fd5b5050505050505050565b6000546001600160a01b031633146103d75760405162461bcd60e51b815260040161023f906106c0565b604051631b2ce7f360e11b81526001600160a01b038281166004830152831690633659cfe6906024016102e6565b6000546001600160a01b0316331461042f5760405162461bcd60e51b815260040161023f906106c0565b6001600160a01b0381166104945760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161023f565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000806000836001600160a01b03166040516101aa906303e1469160e61b815260040190565b600060208284031215610526578081fd5b81356105318161070b565b9392505050565b600060208284031215610549578081fd5b81516105318161070b565b60008060408385031215610566578081fd5b82356105718161070b565b915060208301356105818161070b565b809150509250929050565b6000806000606084860312156105a0578081fd5b83356105ab8161070b565b925060208401356105bb8161070b565b9150604084013567ffffffffffffffff808211156105d7578283fd5b818601915086601f8301126105ea578283fd5b8135818111156105fc576105fc6106f5565b604051601f8201601f19908116603f01168101908382118183101715610624576106246106f5565b8160405282815289602084870101111561063c578586fd5b82602086016020830137856020848301015280955050505050509250925092565b600060018060a01b038416825260206040818401528351806040850152825b818110156106985785810183015185820160600152820161067c565b818111156106a95783606083870101525b50601f01601f191692909201606001949350505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461072057600080fd5b5056fea2646970667358221220d849f96f3086b9f82cdcf665adb8c697ace05638da1c7c16ab2d26293717af6764736f6c63430008020033", - "r": "0xb4f365adb71472667f704949538b673119ee2caaf0f3f6d30a28045b82f43a48", - "s": "0x7e7bb7e734bf43de9bcf3cccd396a7ce36531a86f43f11f28605f3105df91f9e", - "v": 1, - "creates": "0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512", - "chainId": 31337 - } - }, - "proxies": [ - { - "address": "0xDc64a140Aa3E981100a9becA4E685f962f0cF6C9", - "txHash": "0xed20fd3efc2394357981d73b596f3717b3bcdbeb5e1de332e6145d665f63c306", - "kind": "transparent" - }, - { - "address": "0x610178dA211FEF7D417bC0e6FeD39F05609AD788", - "txHash": "0xb1df2d7ea101bcd4cd29f5a676d56855119c27063e51f43c55c898fd85c0f041", - "kind": "transparent" - }, - { - "address": "0x0DCd1Bf9A1b36cE34237eEaFef220932846BCD82", - "txHash": "0x05340857c0a94aaf9fa6355c9e6806e46cfca30248a18e5b2d40c87b18c3448e", - "kind": "transparent" - }, - { - "address": "0x68B1D87F95878fE05B998F19b66F4baba5De1aed", - "txHash": "0xf892e992f2b554d31bce6818bab0bd7e0ea165ece465a316f7bca40bfdfbe7a2", - "kind": "transparent" - }, - { - "address": "0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0", - "txHash": "0xcda70e7f991c83f902092354b1529aade74e5370e0e6245339bfc9c633158713", - "kind": "transparent" - }, - { - "address": "0x9A676e781A523b5d0C0e43731313A708CB607508", - "txHash": "0xd9fd59959492ac0ad727cc6b01f2c0646705b3d2a9bc23570ddaf22c049b31e8", - "kind": "transparent" - }, - { - "address": "0x959922bE3CAee4b8Cd9a407cc3ac1C251C2007B1", - "txHash": "0x83128979c59be16664e5ad63cbaf87d34e7b6dd7466abb75d66d0b6343362052", - "kind": "transparent" - }, - { - "address": "0x4ed7c70F96B99c776995fB64377f0d4aB3B0e1C1", - "txHash": "0x03d9c0060f4d9d0fab3194ab4d1d9069d88d7241a85c300dd26b89219e88fcdd", - "kind": "transparent" - }, - { - "address": "0x4A679253410272dd5232B3Ff7cF5dbB88f295319", - "txHash": "0x0bf0b00cd87daffc4f26e2f495c6f1de1c10d974e49926edf82a87c9593dfb40", - "kind": "transparent" - }, - { - "address": "0xc5a5C42992dECbae36851359345FE25997F5C42d", - "txHash": "0xc434f9b1ab4b5b501311d6cfe32a22377f2a348d4369973639cb8b2060b53686", - "kind": "transparent" - }, - { - "address": "0xE6E340D132b5f46d1e472DebcD681B2aBc16e57E", - "txHash": "0x6b3fbc41284b95520a9d67186a37b1df348889d24e8554534bb5e859d20fd793", - "kind": "transparent" - }, - { - "address": "0x70e0bA845a1A0F2DA3359C97E0285013525FFC49", - "txHash": "0xc82ea18ea4a6a3ed6ded671554f6b0d7824d78fb3df0f5528963e303c5f0183c", - "kind": "transparent" - }, - { - "address": "0x4826533B4897376654Bb4d4AD88B7faFD0C98528", - "txHash": "0x4880a0029140e01bc7f5a5cf21e34aaf99f7083c2fdf3125df9a5e4e2274d474", - "kind": "transparent" - }, - { - "address": "0x9d4454B023096f34B160D6B654540c56A1F81688", - "txHash": "0x5056213a561c4108c98039d4ae8a2e77799e169447047c9ba4f772b5117ce24a", - "kind": "transparent" - }, - { - "address": "0x809d550fca64d94Bd9F66E60752A544199cfAC3D", - "txHash": "0xf0aebf02302733338c1adfc61d83c37db35ee8f1072ce4115296abf15d5e7649", - "kind": "transparent" - }, - { - "address": "0x1291Be112d480055DaFd8a610b7d1e203891C274", - "txHash": "0x03bbb80cedbe5c5a698226b0881625e2b2d49ffa224a52184d739c71c2c8664a", - "kind": "transparent" - }, - { - "address": "0xb7278A61aa25c888815aFC32Ad3cC52fF24fE575", - "txHash": "0x2ac333ad7efd6b39bb21e43cd36419a2765cd764d1e2e16dd2e2bffd620a1487", - "kind": "transparent" - }, - { - "address": "0xB0D4afd8879eD9F52b28595d31B441D079B2Ca07", - "txHash": "0x7bd74d91e9f7ae79439c8ffdb3ead2d829aa915ee43e35b27a12414584aeeedc", - "kind": "transparent" - }, - { - "address": "0x162A433068F51e18b7d13932F27e66a3f99E6890", - "txHash": "0x3c278875a0902f5fe0f79aa4a7eba01c3fcc76d61817e505a3fa74134569a5ed", - "kind": "transparent" - }, - { - "address": "0x21dF544947ba3E8b3c32561399E88B52Dc8b2823", - "txHash": "0x7bf0555bd6efdf9b00bfbad555c082c094f81306445718f7096a954cffe9223b", - "kind": "transparent" - }, - { - "address": "0x2E2Ed0Cfd3AD2f1d34481277b3204d807Ca2F8c2", - "txHash": "0x77aa1c3272572b6a6c8fa10d564a1e6a78fa9630c1e20ee84036686e9d21de73", - "kind": "transparent" - }, - { - "address": "0x0355B7B8cb128fA5692729Ab3AAa199C1753f726", - "txHash": "0xfe3fceab7a7d1178671f807d41b84ccb13267ed30153daedf94349ffef65bd29", - "kind": "transparent" - }, - { - "address": "0xfbC22278A96299D91d41C453234d97b4F5Eb9B2d", - "txHash": "0x37b156b72413e68edf0d47645755d32082736d21520bc410d09fa11e24288307", - "kind": "transparent" - }, - { - "address": "0x46b142DD1E924FAb83eCc3c08e4D46E82f005e0E", - "txHash": "0xa3038ca5bda2dacee8dc12885a3222b4804c9bc13baad5ef61e09c1e4aa39f39", - "kind": "transparent" - }, - { - "address": "0x49fd2BE640DB2910c2fAb69bB8531Ab6E76127ff", - "txHash": "0x96ee0ba825613758bd896f2930a1df9d0172fd68fb417502b048afe06ffc86e7", - "kind": "transparent" - }, - { - "address": "0x86A2EE8FAf9A840F7a2c64CA3d51209F9A02081D", - "txHash": "0x90772d2f5377b6aac3654df963e1c92b739443033d58f659b4eb28797884f6b7", - "kind": "transparent" - }, - { - "address": "0xf953b3A269d80e3eB0F2947630Da976B896A8C5b", - "txHash": "0x74f49e4df13a7ada13733db9eb5efffcc143bfcf6e23e0deaa277d80b1bfd5c7", - "kind": "transparent" - }, - { - "address": "0x5c74c94173F05dA1720953407cbb920F3DF9f887", - "txHash": "0x7c761bf2f5f6d09c83981d844545880c476e8a139ccf9926f33cc9bb0846a157", - "kind": "transparent" - } - ], - "impls": { - "8ee602d804dafcff294f09cb40b488b59fcb0f516da160209f63ee273826ccb9": { - "address": "0x5FbDB2315678afecb367f032d93F642f64180aa3", - "txHash": "0x7f77e40c1ce63651e3e40d6f2cf0aa8a87b7d56622c7b79070d738524e2e9812", - "layout": { - "storage": [ - { - "contract": "Initializable", - "label": "_initialized", - "type": "t_bool", - "src": "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol:25" - }, - { - "contract": "Initializable", - "label": "_initializing", - "type": "t_bool", - "src": "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol:30" - }, - { - "contract": "ContextUpgradeable", - "label": "__gap", - "type": "t_array(t_uint256)50_storage", - "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:31" - }, - { - "contract": "AccessControlUpgradeable", - "label": "_roles", - "type": "t_mapping(t_bytes32,t_struct(RoleData)39_storage)", - "src": "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol:61" - }, - { - "contract": "AccessControlUpgradeable", - "label": "__gap", - "type": "t_array(t_uint256)49_storage", - "src": "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol:225" - }, - { - "contract": "AccessManager", - "label": "multiSignWallet", - "type": "t_address", - "src": "contracts/access/AccessManager.sol:28" - } - ], - "types": { - "t_address": { - "label": "address" - }, - "t_mapping(t_bytes32,t_struct(RoleData)39_storage)": { - "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)" - }, - "t_bytes32": { - "label": "bytes32" - }, - "t_struct(RoleData)39_storage": { - "label": "struct AccessControlUpgradeable.RoleData", - "members": [ - { - "label": "members", - "type": "t_struct(AddressSet)4446_storage" - }, - { - "label": "adminRole", - "type": "t_bytes32" - } - ] - }, - "t_struct(AddressSet)4446_storage": { - "label": "struct EnumerableSetUpgradeable.AddressSet", - "members": [ - { - "label": "_inner", - "type": "t_struct(Set)4181_storage" - } - ] - }, - "t_struct(Set)4181_storage": { - "label": "struct EnumerableSetUpgradeable.Set", - "members": [ - { - "label": "_values", - "type": "t_array(t_bytes32)dyn_storage" - }, - { - "label": "_indexes", - "type": "t_mapping(t_bytes32,t_uint256)" - } - ] - }, - "t_array(t_bytes32)dyn_storage": { - "label": "bytes32[]" - }, - "t_mapping(t_bytes32,t_uint256)": { - "label": "mapping(bytes32 => uint256)" - }, - "t_uint256": { - "label": "uint256" - }, - "t_array(t_uint256)49_storage": { - "label": "uint256[49]" - }, - "t_array(t_uint256)50_storage": { - "label": "uint256[50]" - }, - "t_bool": { - "label": "bool" - } - } - } - }, - "962f35620d2e867e3da3584049498c5983c922018724421b92031d4caec7107a": { - "address": "0xa85233C63b9Ee964Add6F2cffe00Fd84eb32338f", - "txHash": "0xc8540b5e39a41c6eda6e1fe5c8f270c234ad6eedcec95288c766194d7f49dfd9", - "layout": { - "storage": [ - { - "contract": "Initializable", - "label": "_initialized", - "type": "t_bool", - "src": "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol:25" - }, - { - "contract": "Initializable", - "label": "_initializing", - "type": "t_bool", - "src": "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol:30" - }, - { - "contract": "ContextUpgradeable", - "label": "__gap", - "type": "t_array(t_uint256)50_storage", - "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:31" - }, - { - "contract": "OwnableUpgradeable", - "label": "_owner", - "type": "t_address", - "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:20" - }, - { - "contract": "OwnableUpgradeable", - "label": "__gap", - "type": "t_array(t_uint256)49_storage", - "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:74" - }, - { - "contract": "Routing", - "label": "modules", - "type": "t_mapping(t_string_memory_ptr,t_contract(IModule)9574)", - "src": "contracts/core/26-routing/Routing.sol:20" - }, - { - "contract": "Routing", - "label": "router", - "type": "t_mapping(t_string_memory_ptr,t_struct(Rule)6751_storage)", - "src": "contracts/core/26-routing/Routing.sol:21" - }, - { - "contract": "Routing", - "label": "accessManager", - "type": "t_contract(IAccessManager)9406", - "src": "contracts/core/26-routing/Routing.sol:23" - } - ], - "types": { - "t_mapping(t_string_memory_ptr,t_contract(IModule)9574)": { - "label": "mapping(string => contract IModule)" - }, - "t_string_storage": { - "label": "string" - }, - "t_contract(IModule)9574": { - "label": "contract IModule" - }, - "t_mapping(t_string_memory_ptr,t_struct(Rule)6751_storage)": { - "label": "mapping(string => struct Routing.Rule)" - }, - "t_struct(Rule)6751_storage": { - "label": "struct Routing.Rule", - "members": [ - { - "label": "val", - "type": "t_string_storage" - }, - { - "label": "isValue", - "type": "t_bool" - } - ] - }, - "t_bool": { - "label": "bool" - }, - "t_contract(IAccessManager)9406": { - "label": "contract IAccessManager" - }, - "t_address": { - "label": "address" - }, - "t_array(t_uint256)49_storage": { - "label": "uint256[49]" - }, - "t_uint256": { - "label": "uint256" - }, - "t_array(t_uint256)50_storage": { - "label": "uint256[50]" - } - } - } - }, - "2021d1adc2e430e8eee5146453e90aa13906676ffda19acdd5ef0ba952b95e40": { - "address": "0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9", - "txHash": "0x5562a350c3b700d4bf7ed8368b097147e77dda8ae53ea8c2d4069a8849f4ade7", - "layout": { - "storage": [ - { - "contract": "Initializable", - "label": "_initialized", - "type": "t_bool", - "src": "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol:25" - }, - { - "contract": "Initializable", - "label": "_initializing", - "type": "t_bool", - "src": "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol:30" - }, - { - "contract": "ContextUpgradeable", - "label": "__gap", - "type": "t_array(t_uint256)50_storage", - "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:31" - }, - { - "contract": "OwnableUpgradeable", - "label": "_owner", - "type": "t_address", - "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:20" - }, - { - "contract": "OwnableUpgradeable", - "label": "__gap", - "type": "t_array(t_uint256)49_storage", - "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:74" - }, - { - "contract": "ClientManager", - "label": "nativeChainName", - "type": "t_string_storage", - "src": "contracts/core/02-client/ClientManager.sol:13" - }, - { - "contract": "ClientManager", - "label": "clients", - "type": "t_mapping(t_string_memory_ptr,t_contract(IClient)9503)", - "src": "contracts/core/02-client/ClientManager.sol:15" - }, - { - "contract": "ClientManager", - "label": "relayers", - "type": "t_mapping(t_string_memory_ptr,t_mapping(t_address,t_bool))", - "src": "contracts/core/02-client/ClientManager.sol:17" - }, - { - "contract": "ClientManager", - "label": "accessManager", - "type": "t_contract(IAccessManager)9414", - "src": "contracts/core/02-client/ClientManager.sol:19" - } - ], - "types": { - "t_string_storage": { - "label": "string" - }, - "t_mapping(t_string_memory_ptr,t_contract(IClient)9503)": { - "label": "mapping(string => contract IClient)" - }, - "t_contract(IClient)9503": { - "label": "contract IClient" - }, - "t_mapping(t_string_memory_ptr,t_mapping(t_address,t_bool))": { - "label": "mapping(string => mapping(address => bool))" - }, - "t_mapping(t_address,t_bool)": { - "label": "mapping(address => bool)" - }, - "t_address": { - "label": "address" - }, - "t_bool": { - "label": "bool" - }, - "t_contract(IAccessManager)9414": { - "label": "contract IAccessManager" - }, - "t_array(t_uint256)49_storage": { - "label": "uint256[49]" - }, - "t_uint256": { - "label": "uint256" - }, - "t_array(t_uint256)50_storage": { - "label": "uint256[50]" - } - } - } - }, - "5e1ec778deb134dbc85eecef2f4224bbe4185eae2fda0a32fae31912ccbaf498": { - "address": "0x8A791620dd6260079BF849Dc5567aDC3F2FdC318", - "txHash": "0x25ba60f14c1aa946751f4ff28312f5d4cd8b977977bacb824bd9bba0978d426d", - "layout": { - "storage": [ - { - "contract": "Initializable", - "label": "_initialized", - "type": "t_bool", - "src": "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol:25" - }, - { - "contract": "Initializable", - "label": "_initializing", - "type": "t_bool", - "src": "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol:30" - }, - { - "contract": "ContextUpgradeable", - "label": "__gap", - "type": "t_array(t_uint256)50_storage", - "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:31" - }, - { - "contract": "OwnableUpgradeable", - "label": "_owner", - "type": "t_address", - "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:20" - }, - { - "contract": "OwnableUpgradeable", - "label": "__gap", - "type": "t_array(t_uint256)49_storage", - "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:74" - }, - { - "contract": "Tendermint", - "label": "clientState", - "type": "t_struct(Data)44303_storage", - "src": "contracts/light-clients/07-tendermint/Tendermint.sol:26" - }, - { - "contract": "Tendermint", - "label": "consensusStates", - "type": "t_mapping(t_uint128,t_struct(Data)46417_storage)", - "src": "contracts/light-clients/07-tendermint/Tendermint.sol:28" - }, - { - "contract": "Tendermint", - "label": "processedTime", - "type": "t_mapping(t_uint128,t_uint256)", - "src": "contracts/light-clients/07-tendermint/Tendermint.sol:30" - }, - { - "contract": "Tendermint", - "label": "clientManager", - "type": "t_address", - "src": "contracts/light-clients/07-tendermint/Tendermint.sol:32" - } - ], - "types": { - "t_struct(Data)44303_storage": { - "label": "struct ClientState.Data", - "members": [ - { - "label": "chain_id", - "type": "t_string_storage" - }, - { - "label": "trust_level", - "type": "t_struct(Data)48263_storage" - }, - { - "label": "trusting_period", - "type": "t_int64" - }, - { - "label": "unbonding_period", - "type": "t_int64" - }, - { - "label": "max_clock_drift", - "type": "t_int64" - }, - { - "label": "latest_height", - "type": "t_struct(Data)61117_storage" - }, - { - "label": "proof_specs", - "type": "t_array(t_struct(Data)28002_storage)dyn_storage" - }, - { - "label": "merkle_prefix", - "type": "t_struct(Data)17193_storage" - }, - { - "label": "time_delay", - "type": "t_uint64" - } - ] - }, - "t_string_storage": { - "label": "string" - }, - "t_struct(Data)48263_storage": { - "label": "struct Fraction.Data", - "members": [ - { - "label": "numerator", - "type": "t_uint64" - }, - { - "label": "denominator", - "type": "t_uint64" - } - ] - }, - "t_int64": { - "label": "int64" - }, - "t_struct(Data)61117_storage": { - "label": "struct Height.Data", - "members": [ - { - "label": "revision_number", - "type": "t_uint64" - }, - { - "label": "revision_height", - "type": "t_uint64" - } - ] - }, - "t_array(t_struct(Data)28002_storage)dyn_storage": { - "label": "struct ProofSpec.Data[]" - }, - "t_struct(Data)28002_storage": { - "label": "struct ProofSpec.Data", - "members": [ - { - "label": "leaf_spec", - "type": "t_struct(Data)26052_storage" - }, - { - "label": "inner_spec", - "type": "t_struct(Data)28996_storage" - }, - { - "label": "max_depth", - "type": "t_int32" - }, - { - "label": "min_depth", - "type": "t_int32" - } - ] - }, - "t_struct(Data)17193_storage": { - "label": "struct MerklePrefix.Data", - "members": [ - { - "label": "key_prefix", - "type": "t_bytes_storage" - } - ] - }, - "t_uint64": { - "label": "uint64" - }, - "t_struct(Data)26052_storage": { - "label": "struct LeafOp.Data", - "members": [ - { - "label": "hash", - "type": "t_enum(HashOp)36082" - }, - { - "label": "prehash_key", - "type": "t_enum(HashOp)36082" - }, - { - "label": "prehash_value", - "type": "t_enum(HashOp)36082" - }, - { - "label": "length", - "type": "t_enum(LengthOp)36210" - }, - { - "label": "prefix", - "type": "t_bytes_storage" - } - ] - }, - "t_struct(Data)28996_storage": { - "label": "struct InnerSpec.Data", - "members": [ - { - "label": "child_order", - "type": "t_array(t_int32)dyn_storage" - }, - { - "label": "child_size", - "type": "t_int32" - }, - { - "label": "min_prefix_length", - "type": "t_int32" - }, - { - "label": "max_prefix_length", - "type": "t_int32" - }, - { - "label": "empty_child", - "type": "t_bytes_storage" - }, - { - "label": "hash", - "type": "t_enum(HashOp)36082" - } - ] - }, - "t_int32": { - "label": "int32" - }, - "t_bytes_storage": { - "label": "bytes" - }, - "t_enum(HashOp)36082": { - "label": "enum PROOFS_PROTO_GLOBAL_ENUMS.HashOp", - "members": [ - "NO_HASH", - "SHA256", - "SHA512", - "KECCAK", - "RIPEMD160", - "BITCOIN" - ] - }, - "t_enum(LengthOp)36210": { - "label": "enum PROOFS_PROTO_GLOBAL_ENUMS.LengthOp", - "members": [ - "NO_PREFIX", - "VAR_PROTO", - "VAR_RLP", - "FIXED32_BIG", - "FIXED32_LITTLE", - "FIXED64_BIG", - "FIXED64_LITTLE", - "REQUIRE_32_BYTES", - "REQUIRE_64_BYTES" - ] - }, - "t_array(t_int32)dyn_storage": { - "label": "int32[]" - }, - "t_mapping(t_uint128,t_struct(Data)46417_storage)": { - "label": "mapping(uint128 => struct ConsensusState.Data)" - }, - "t_uint128": { - "label": "uint128" - }, - "t_struct(Data)46417_storage": { - "label": "struct ConsensusState.Data", - "members": [ - { - "label": "timestamp", - "type": "t_struct(Data)50272_storage" - }, - { - "label": "root", - "type": "t_bytes_storage" - }, - { - "label": "next_validators_hash", - "type": "t_bytes_storage" - } - ] - }, - "t_struct(Data)50272_storage": { - "label": "struct Timestamp.Data", - "members": [ - { - "label": "secs", - "type": "t_int64" - }, - { - "label": "nanos", - "type": "t_int64" - } - ] - }, - "t_mapping(t_uint128,t_uint256)": { - "label": "mapping(uint128 => uint256)" - }, - "t_uint256": { - "label": "uint256" - }, - "t_address": { - "label": "address" - }, - "t_array(t_uint256)49_storage": { - "label": "uint256[49]" - }, - "t_array(t_uint256)50_storage": { - "label": "uint256[50]" - }, - "t_bool": { - "label": "bool" - } - } - } - }, - "3811b59978044f65622f3c1373667c73800c7edfee80c6533f289d8d7f5a9e4f": { - "address": "0x9A9f2CCfdE556A7E9Ff0848998Aa4a0CFD8863AE", - "txHash": "0x6c20f714b3542beae478a3b0287ab318d977e255155cc1e15ecacd434dcd9a7c", - "layout": { - "storage": [ - { - "contract": "Initializable", - "label": "_initialized", - "type": "t_bool", - "src": "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol:25" - }, - { - "contract": "Initializable", - "label": "_initializing", - "type": "t_bool", - "src": "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol:30" - }, - { - "contract": "ContextUpgradeable", - "label": "__gap", - "type": "t_array(t_uint256)50_storage", - "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:31" - }, - { - "contract": "OwnableUpgradeable", - "label": "_owner", - "type": "t_address", - "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:20" - }, - { - "contract": "OwnableUpgradeable", - "label": "__gap", - "type": "t_array(t_uint256)49_storage", - "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:74" - }, - { - "contract": "MultiTokenTransfer", - "label": "packet", - "type": "t_contract(IPacket)9655", - "src": "contracts/core/apps/mt-transfer/MtTransfer.sol:27" - }, - { - "contract": "MultiTokenTransfer", - "label": "clientManager", - "type": "t_contract(IClientManager)9531", - "src": "contracts/core/apps/mt-transfer/MtTransfer.sol:28" - }, - { - "contract": "MultiTokenTransfer", - "label": "traces", - "type": "t_mapping(t_uint256,t_struct(OriginMT)12982_storage)", - "src": "contracts/core/apps/mt-transfer/MtTransfer.sol:30" - } - ], - "types": { - "t_contract(IPacket)9655": { - "label": "contract IPacket" - }, - "t_contract(IClientManager)9531": { - "label": "contract IClientManager" - }, - "t_mapping(t_uint256,t_struct(OriginMT)12982_storage)": { - "label": "mapping(uint256 => struct TransferDataTypes.OriginMT)" - }, - "t_uint256": { - "label": "uint256" - }, - "t_struct(OriginMT)12982_storage": { - "label": "struct TransferDataTypes.OriginMT", - "members": [ - { - "label": "class", - "type": "t_string_storage" - }, - { - "label": "id", - "type": "t_string_storage" - }, - { - "label": "data", - "type": "t_bytes_storage" - } - ] - }, - "t_string_storage": { - "label": "string" - }, - "t_bytes_storage": { - "label": "bytes" - }, - "t_address": { - "label": "address" - }, - "t_array(t_uint256)49_storage": { - "label": "uint256[49]" - }, - "t_array(t_uint256)50_storage": { - "label": "uint256[50]" - }, - "t_bool": { - "label": "bool" - } - } - } - }, - "c3e6eac33f176bc46e3b6c9100086f5a15c6f4fd9a1cea466ae42d9e77194c94": { - "address": "0x0B306BF915C4d645ff596e518fAf3F9669b97016", - "txHash": "0x13a01aeb594b85a0438687003b511f0784669c489f766df92e492ac24d830004", - "layout": { - "storage": [ - { - "contract": "Initializable", - "label": "_initialized", - "type": "t_bool", - "src": "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol:25" - }, - { - "contract": "Initializable", - "label": "_initializing", - "type": "t_bool", - "src": "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol:30" - }, - { - "contract": "ContextUpgradeable", - "label": "__gap", - "type": "t_array(t_uint256)50_storage", - "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:31" - }, - { - "contract": "OwnableUpgradeable", - "label": "_owner", - "type": "t_address", - "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:20" - }, - { - "contract": "OwnableUpgradeable", - "label": "__gap", - "type": "t_array(t_uint256)49_storage", - "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:74" - }, - { - "contract": "ClientManager", - "label": "nativeChainName", - "type": "t_string_storage", - "src": "contracts/core/02-client/ClientManager.sol:13" - }, - { - "contract": "ClientManager", - "label": "clients", - "type": "t_mapping(t_string_memory_ptr,t_contract(IClient)9495)", - "src": "contracts/core/02-client/ClientManager.sol:15" - }, - { - "contract": "ClientManager", - "label": "relayers", - "type": "t_mapping(t_string_memory_ptr,t_mapping(t_address,t_bool))", - "src": "contracts/core/02-client/ClientManager.sol:17" - }, - { - "contract": "ClientManager", - "label": "accessManager", - "type": "t_contract(IAccessManager)9406", - "src": "contracts/core/02-client/ClientManager.sol:19" - } - ], - "types": { - "t_string_storage": { - "label": "string" - }, - "t_mapping(t_string_memory_ptr,t_contract(IClient)9495)": { - "label": "mapping(string => contract IClient)" - }, - "t_contract(IClient)9495": { - "label": "contract IClient" - }, - "t_mapping(t_string_memory_ptr,t_mapping(t_address,t_bool))": { - "label": "mapping(string => mapping(address => bool))" - }, - "t_mapping(t_address,t_bool)": { - "label": "mapping(address => bool)" - }, - "t_address": { - "label": "address" - }, - "t_bool": { - "label": "bool" - }, - "t_contract(IAccessManager)9406": { - "label": "contract IAccessManager" - }, - "t_array(t_uint256)49_storage": { - "label": "uint256[49]" - }, - "t_uint256": { - "label": "uint256" - }, - "t_array(t_uint256)50_storage": { - "label": "uint256[50]" - } - } - } - }, - "c4390bcb29715e60460c51fc82c553497cc7ca4b8544a331fe89fb4db09e8fec": { - "address": "0x59b670e9fA9D0A427751Af201D676719a970857b", - "txHash": "0xc1f6c858fefb9cb92322aa8f612b1ffff40a4b01edf3e7747b2aa9dcf351da03", - "layout": { - "storage": [ - { - "contract": "Initializable", - "label": "_initialized", - "type": "t_bool", - "src": "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol:25" - }, - { - "contract": "Initializable", - "label": "_initializing", - "type": "t_bool", - "src": "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol:30" - }, - { - "contract": "ContextUpgradeable", - "label": "__gap", - "type": "t_array(t_uint256)50_storage", - "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:31" - }, - { - "contract": "OwnableUpgradeable", - "label": "_owner", - "type": "t_address", - "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:20" - }, - { - "contract": "OwnableUpgradeable", - "label": "__gap", - "type": "t_array(t_uint256)49_storage", - "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:74" - }, - { - "contract": "Tendermint", - "label": "clientState", - "type": "t_struct(Data)44295_storage", - "src": "contracts/light-clients/07-tendermint/Tendermint.sol:26" - }, - { - "contract": "Tendermint", - "label": "consensusStates", - "type": "t_mapping(t_uint128,t_struct(Data)46409_storage)", - "src": "contracts/light-clients/07-tendermint/Tendermint.sol:28" - }, - { - "contract": "Tendermint", - "label": "processedTime", - "type": "t_mapping(t_uint128,t_uint256)", - "src": "contracts/light-clients/07-tendermint/Tendermint.sol:30" - }, - { - "contract": "Tendermint", - "label": "clientManager", - "type": "t_address", - "src": "contracts/light-clients/07-tendermint/Tendermint.sol:32" - } - ], - "types": { - "t_struct(Data)44295_storage": { - "label": "struct ClientState.Data", - "members": [ - { - "label": "chain_id", - "type": "t_string_storage" - }, - { - "label": "trust_level", - "type": "t_struct(Data)48255_storage" - }, - { - "label": "trusting_period", - "type": "t_int64" - }, - { - "label": "unbonding_period", - "type": "t_int64" - }, - { - "label": "max_clock_drift", - "type": "t_int64" - }, - { - "label": "latest_height", - "type": "t_struct(Data)61109_storage" - }, - { - "label": "proof_specs", - "type": "t_array(t_struct(Data)27994_storage)dyn_storage" - }, - { - "label": "merkle_prefix", - "type": "t_struct(Data)17185_storage" - }, - { - "label": "time_delay", - "type": "t_uint64" - } - ] - }, - "t_string_storage": { - "label": "string" - }, - "t_struct(Data)48255_storage": { - "label": "struct Fraction.Data", - "members": [ - { - "label": "numerator", - "type": "t_uint64" - }, - { - "label": "denominator", - "type": "t_uint64" - } - ] - }, - "t_int64": { - "label": "int64" - }, - "t_struct(Data)61109_storage": { - "label": "struct Height.Data", - "members": [ - { - "label": "revision_number", - "type": "t_uint64" - }, - { - "label": "revision_height", - "type": "t_uint64" - } - ] - }, - "t_array(t_struct(Data)27994_storage)dyn_storage": { - "label": "struct ProofSpec.Data[]" - }, - "t_struct(Data)27994_storage": { - "label": "struct ProofSpec.Data", - "members": [ - { - "label": "leaf_spec", - "type": "t_struct(Data)26044_storage" - }, - { - "label": "inner_spec", - "type": "t_struct(Data)28988_storage" - }, - { - "label": "max_depth", - "type": "t_int32" - }, - { - "label": "min_depth", - "type": "t_int32" - } - ] - }, - "t_struct(Data)17185_storage": { - "label": "struct MerklePrefix.Data", - "members": [ - { - "label": "key_prefix", - "type": "t_bytes_storage" - } - ] - }, - "t_uint64": { - "label": "uint64" - }, - "t_struct(Data)26044_storage": { - "label": "struct LeafOp.Data", - "members": [ - { - "label": "hash", - "type": "t_enum(HashOp)36074" - }, - { - "label": "prehash_key", - "type": "t_enum(HashOp)36074" - }, - { - "label": "prehash_value", - "type": "t_enum(HashOp)36074" - }, - { - "label": "length", - "type": "t_enum(LengthOp)36202" - }, - { - "label": "prefix", - "type": "t_bytes_storage" - } - ] - }, - "t_struct(Data)28988_storage": { - "label": "struct InnerSpec.Data", - "members": [ - { - "label": "child_order", - "type": "t_array(t_int32)dyn_storage" - }, - { - "label": "child_size", - "type": "t_int32" - }, - { - "label": "min_prefix_length", - "type": "t_int32" - }, - { - "label": "max_prefix_length", - "type": "t_int32" - }, - { - "label": "empty_child", - "type": "t_bytes_storage" - }, - { - "label": "hash", - "type": "t_enum(HashOp)36074" - } - ] - }, - "t_int32": { - "label": "int32" - }, - "t_bytes_storage": { - "label": "bytes" - }, - "t_enum(HashOp)36074": { - "label": "enum PROOFS_PROTO_GLOBAL_ENUMS.HashOp", - "members": [ - "NO_HASH", - "SHA256", - "SHA512", - "KECCAK", - "RIPEMD160", - "BITCOIN" - ] - }, - "t_enum(LengthOp)36202": { - "label": "enum PROOFS_PROTO_GLOBAL_ENUMS.LengthOp", - "members": [ - "NO_PREFIX", - "VAR_PROTO", - "VAR_RLP", - "FIXED32_BIG", - "FIXED32_LITTLE", - "FIXED64_BIG", - "FIXED64_LITTLE", - "REQUIRE_32_BYTES", - "REQUIRE_64_BYTES" - ] - }, - "t_array(t_int32)dyn_storage": { - "label": "int32[]" - }, - "t_mapping(t_uint128,t_struct(Data)46409_storage)": { - "label": "mapping(uint128 => struct ConsensusState.Data)" - }, - "t_uint128": { - "label": "uint128" - }, - "t_struct(Data)46409_storage": { - "label": "struct ConsensusState.Data", - "members": [ - { - "label": "timestamp", - "type": "t_struct(Data)50264_storage" - }, - { - "label": "root", - "type": "t_bytes_storage" - }, - { - "label": "next_validators_hash", - "type": "t_bytes_storage" - } - ] - }, - "t_struct(Data)50264_storage": { - "label": "struct Timestamp.Data", - "members": [ - { - "label": "secs", - "type": "t_int64" - }, - { - "label": "nanos", - "type": "t_int64" - } - ] - }, - "t_mapping(t_uint128,t_uint256)": { - "label": "mapping(uint128 => uint256)" - }, - "t_uint256": { - "label": "uint256" - }, - "t_address": { - "label": "address" - }, - "t_array(t_uint256)49_storage": { - "label": "uint256[49]" - }, - "t_array(t_uint256)50_storage": { - "label": "uint256[50]" - }, - "t_bool": { - "label": "bool" - } - } - } - }, - "153336ee745c6586f972318466845ffd1bb863008eff11a0e3bfd3a9fe6d3f86": { - "address": "0x09635F643e140090A9A8Dcd712eD6285858ceBef", - "txHash": "0x366e80f329361127894fd0cb6eba01dd893cbc33551d8a57e923f6394f9352e6", - "layout": { - "storage": [ - { - "contract": "Initializable", - "label": "_initialized", - "type": "t_bool", - "src": "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol:25" - }, - { - "contract": "Initializable", - "label": "_initializing", - "type": "t_bool", - "src": "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol:30" - }, - { - "contract": "ContextUpgradeable", - "label": "__gap", - "type": "t_array(t_uint256)50_storage", - "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:31" - }, - { - "contract": "ERC165Upgradeable", - "label": "_supportedInterfaces", - "type": "t_mapping(t_bytes4,t_bool)", - "src": "@openzeppelin/contracts-upgradeable/introspection/ERC165Upgradeable.sol:23" - }, - { - "contract": "ERC165Upgradeable", - "label": "__gap", - "type": "t_array(t_uint256)49_storage", - "src": "@openzeppelin/contracts-upgradeable/introspection/ERC165Upgradeable.sol:59" - }, - { - "contract": "ERC1155Upgradeable", - "label": "_balances", - "type": "t_mapping(t_uint256,t_mapping(t_address,t_uint256))", - "src": "@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155Upgradeable.sol:27" - }, - { - "contract": "ERC1155Upgradeable", - "label": "_operatorApprovals", - "type": "t_mapping(t_address,t_mapping(t_address,t_bool))", - "src": "@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155Upgradeable.sol:30" - }, - { - "contract": "ERC1155Upgradeable", - "label": "_uri", - "type": "t_string_storage", - "src": "@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155Upgradeable.sol:33" - }, - { - "contract": "ERC1155Upgradeable", - "label": "__gap", - "type": "t_array(t_uint256)47_storage", - "src": "@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155Upgradeable.sol:421" - }, - { - "contract": "OwnableUpgradeable", - "label": "_owner", - "type": "t_address", - "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:20" - }, - { - "contract": "OwnableUpgradeable", - "label": "__gap", - "type": "t_array(t_uint256)49_storage", - "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:74" - }, - { - "contract": "Auth", - "label": "roles", - "type": "t_mapping(t_bytes32,t_mapping(t_address,t_bool))", - "src": "contracts/core/apps/30-nft-transfer/Auth.sol:8" - }, - { - "contract": "ERC1155Bank", - "label": "uriMap", - "type": "t_mapping(t_uint256,t_bytes_storage)", - "src": "contracts/core/apps/30-nft-transfer/ERC1155Bank.sol:13" - } - ], - "types": { - "t_mapping(t_uint256,t_bytes_storage)": { - "label": "mapping(uint256 => bytes)" - }, - "t_uint256": { - "label": "uint256" - }, - "t_bytes_storage": { - "label": "bytes" - }, - "t_mapping(t_bytes32,t_mapping(t_address,t_bool))": { - "label": "mapping(bytes32 => mapping(address => bool))" - }, - "t_bytes32": { - "label": "bytes32" - }, - "t_mapping(t_address,t_bool)": { - "label": "mapping(address => bool)" - }, - "t_address": { - "label": "address" - }, - "t_bool": { - "label": "bool" - }, - "t_array(t_uint256)49_storage": { - "label": "uint256[49]" - }, - "t_mapping(t_uint256,t_mapping(t_address,t_uint256))": { - "label": "mapping(uint256 => mapping(address => uint256))" - }, - "t_mapping(t_address,t_uint256)": { - "label": "mapping(address => uint256)" - }, - "t_mapping(t_address,t_mapping(t_address,t_bool))": { - "label": "mapping(address => mapping(address => bool))" - }, - "t_string_storage": { - "label": "string" - }, - "t_array(t_uint256)47_storage": { - "label": "uint256[47]" - }, - "t_mapping(t_bytes4,t_bool)": { - "label": "mapping(bytes4 => bool)" - }, - "t_bytes4": { - "label": "bytes4" - }, - "t_array(t_uint256)50_storage": { - "label": "uint256[50]" - } - } - } - }, - "ade6d2efb1decf4076d597b0a95829e9295fecb16cec414920388e8ef428ac6e": { - "address": "0x67d269191c92Caf3cD7723F116c85e6E9bf55933", - "txHash": "0x3988f5a877161952aa69837aea0a0e37c96d97ab6abb7ddef1cf77ccd4587cf7", - "layout": { - "storage": [ - { - "contract": "Initializable", - "label": "_initialized", - "type": "t_bool", - "src": "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol:25" - }, - { - "contract": "Initializable", - "label": "_initializing", - "type": "t_bool", - "src": "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol:30" - }, - { - "contract": "ContextUpgradeable", - "label": "__gap", - "type": "t_array(t_uint256)50_storage", - "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:31" - }, - { - "contract": "OwnableUpgradeable", - "label": "_owner", - "type": "t_address", - "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:20" - }, - { - "contract": "OwnableUpgradeable", - "label": "__gap", - "type": "t_array(t_uint256)49_storage", - "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:74" - }, - { - "contract": "MultiTokenTransfer", - "label": "packet", - "type": "t_contract(IPacket)9647", - "src": "contracts/core/apps/mt-transfer/MtTransfer.sol:26" - }, - { - "contract": "MultiTokenTransfer", - "label": "clientManager", - "type": "t_contract(IClientManager)9523", - "src": "contracts/core/apps/mt-transfer/MtTransfer.sol:27" - }, - { - "contract": "MultiTokenTransfer", - "label": "traces", - "type": "t_mapping(t_uint256,t_struct(OriginMT)12974_storage)", - "src": "contracts/core/apps/mt-transfer/MtTransfer.sol:29" - } - ], - "types": { - "t_contract(IPacket)9647": { - "label": "contract IPacket" - }, - "t_contract(IClientManager)9523": { - "label": "contract IClientManager" - }, - "t_mapping(t_uint256,t_struct(OriginMT)12974_storage)": { - "label": "mapping(uint256 => struct TransferDataTypes.OriginMT)" - }, - "t_uint256": { - "label": "uint256" - }, - "t_struct(OriginMT)12974_storage": { - "label": "struct TransferDataTypes.OriginMT", - "members": [ - { - "label": "class", - "type": "t_string_storage" - }, - { - "label": "id", - "type": "t_string_storage" - }, - { - "label": "data", - "type": "t_bytes_storage" - } - ] - }, - "t_string_storage": { - "label": "string" - }, - "t_bytes_storage": { - "label": "bytes" - }, - "t_address": { - "label": "address" - }, - "t_array(t_uint256)49_storage": { - "label": "uint256[49]" - }, - "t_array(t_uint256)50_storage": { - "label": "uint256[50]" - }, - "t_bool": { - "label": "bool" - } - } - } - }, - "741a7a968d044750cfc1f2e9ef0468a02d123f219d1c52a3f19402cbf2f0f258": { - "address": "0x8f86403A4DE0BB5791fa46B8e795C547942fE4Cf", - "txHash": "0xbda2178e6d401276ff605a0f55459363abae05a32c5ccaab23be9b34688f9f64", - "layout": { - "storage": [ - { - "contract": "Initializable", - "label": "_initialized", - "type": "t_bool", - "src": "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol:25" - }, - { - "contract": "Initializable", - "label": "_initializing", - "type": "t_bool", - "src": "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol:30" - }, - { - "contract": "ContextUpgradeable", - "label": "__gap", - "type": "t_array(t_uint256)50_storage", - "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:31" - }, - { - "contract": "OwnableUpgradeable", - "label": "_owner", - "type": "t_address", - "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:20" - }, - { - "contract": "OwnableUpgradeable", - "label": "__gap", - "type": "t_array(t_uint256)49_storage", - "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:74" - }, - { - "contract": "MockTendermint", - "label": "clientState", - "type": "t_struct(Data)44295_storage", - "src": "contracts/test/MockTendermint.sol:26" - }, - { - "contract": "MockTendermint", - "label": "consensusStates", - "type": "t_mapping(t_uint128,t_struct(Data)46409_storage)", - "src": "contracts/test/MockTendermint.sol:28" - }, - { - "contract": "MockTendermint", - "label": "processedTime", - "type": "t_mapping(t_uint128,t_uint256)", - "src": "contracts/test/MockTendermint.sol:30" - } - ], - "types": { - "t_struct(Data)44295_storage": { - "label": "struct ClientState.Data", - "members": [ - { - "label": "chain_id", - "type": "t_string_storage" - }, - { - "label": "trust_level", - "type": "t_struct(Data)48255_storage" - }, - { - "label": "trusting_period", - "type": "t_int64" - }, - { - "label": "unbonding_period", - "type": "t_int64" - }, - { - "label": "max_clock_drift", - "type": "t_int64" - }, - { - "label": "latest_height", - "type": "t_struct(Data)61109_storage" - }, - { - "label": "proof_specs", - "type": "t_array(t_struct(Data)27994_storage)dyn_storage" - }, - { - "label": "merkle_prefix", - "type": "t_struct(Data)17185_storage" - }, - { - "label": "time_delay", - "type": "t_uint64" - } - ] - }, - "t_string_storage": { - "label": "string" - }, - "t_struct(Data)48255_storage": { - "label": "struct Fraction.Data", - "members": [ - { - "label": "numerator", - "type": "t_uint64" - }, - { - "label": "denominator", - "type": "t_uint64" - } - ] - }, - "t_int64": { - "label": "int64" - }, - "t_struct(Data)61109_storage": { - "label": "struct Height.Data", - "members": [ - { - "label": "revision_number", - "type": "t_uint64" - }, - { - "label": "revision_height", - "type": "t_uint64" - } - ] - }, - "t_array(t_struct(Data)27994_storage)dyn_storage": { - "label": "struct ProofSpec.Data[]" - }, - "t_struct(Data)27994_storage": { - "label": "struct ProofSpec.Data", - "members": [ - { - "label": "leaf_spec", - "type": "t_struct(Data)26044_storage" - }, - { - "label": "inner_spec", - "type": "t_struct(Data)28988_storage" - }, - { - "label": "max_depth", - "type": "t_int32" - }, - { - "label": "min_depth", - "type": "t_int32" - } - ] - }, - "t_struct(Data)17185_storage": { - "label": "struct MerklePrefix.Data", - "members": [ - { - "label": "key_prefix", - "type": "t_bytes_storage" - } - ] - }, - "t_uint64": { - "label": "uint64" - }, - "t_struct(Data)26044_storage": { - "label": "struct LeafOp.Data", - "members": [ - { - "label": "hash", - "type": "t_enum(HashOp)36074" - }, - { - "label": "prehash_key", - "type": "t_enum(HashOp)36074" - }, - { - "label": "prehash_value", - "type": "t_enum(HashOp)36074" - }, - { - "label": "length", - "type": "t_enum(LengthOp)36202" - }, - { - "label": "prefix", - "type": "t_bytes_storage" - } - ] - }, - "t_struct(Data)28988_storage": { - "label": "struct InnerSpec.Data", - "members": [ - { - "label": "child_order", - "type": "t_array(t_int32)dyn_storage" - }, - { - "label": "child_size", - "type": "t_int32" - }, - { - "label": "min_prefix_length", - "type": "t_int32" - }, - { - "label": "max_prefix_length", - "type": "t_int32" - }, - { - "label": "empty_child", - "type": "t_bytes_storage" - }, - { - "label": "hash", - "type": "t_enum(HashOp)36074" - } - ] - }, - "t_int32": { - "label": "int32" - }, - "t_bytes_storage": { - "label": "bytes" - }, - "t_enum(HashOp)36074": { - "label": "enum PROOFS_PROTO_GLOBAL_ENUMS.HashOp", - "members": [ - "NO_HASH", - "SHA256", - "SHA512", - "KECCAK", - "RIPEMD160", - "BITCOIN" - ] - }, - "t_enum(LengthOp)36202": { - "label": "enum PROOFS_PROTO_GLOBAL_ENUMS.LengthOp", - "members": [ - "NO_PREFIX", - "VAR_PROTO", - "VAR_RLP", - "FIXED32_BIG", - "FIXED32_LITTLE", - "FIXED64_BIG", - "FIXED64_LITTLE", - "REQUIRE_32_BYTES", - "REQUIRE_64_BYTES" - ] - }, - "t_array(t_int32)dyn_storage": { - "label": "int32[]" - }, - "t_mapping(t_uint128,t_struct(Data)46409_storage)": { - "label": "mapping(uint128 => struct ConsensusState.Data)" - }, - "t_uint128": { - "label": "uint128" - }, - "t_struct(Data)46409_storage": { - "label": "struct ConsensusState.Data", - "members": [ - { - "label": "timestamp", - "type": "t_struct(Data)50264_storage" - }, - { - "label": "root", - "type": "t_bytes_storage" - }, - { - "label": "next_validators_hash", - "type": "t_bytes_storage" - } - ] - }, - "t_struct(Data)50264_storage": { - "label": "struct Timestamp.Data", - "members": [ - { - "label": "secs", - "type": "t_int64" - }, - { - "label": "nanos", - "type": "t_int64" - } - ] - }, - "t_mapping(t_uint128,t_uint256)": { - "label": "mapping(uint128 => uint256)" - }, - "t_uint256": { - "label": "uint256" - }, - "t_address": { - "label": "address" - }, - "t_array(t_uint256)49_storage": { - "label": "uint256[49]" - }, - "t_array(t_uint256)50_storage": { - "label": "uint256[50]" - }, - "t_bool": { - "label": "bool" - } - } - } - }, - "8f36fca6b490aa79a4680ad9ad5c5491c92d51e46cc4e0281eb5034b3ff682d6": { - "address": "0x4c5859f0F772848b2D91F1D83E2Fe57935348029", - "txHash": "0xda02ab5571941264a9698e14f3c9ef08ef705d52e34c3e28b80e76ad1f5f29d9", - "layout": { - "storage": [ - { - "contract": "Initializable", - "label": "_initialized", - "type": "t_bool", - "src": "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol:25" - }, - { - "contract": "Initializable", - "label": "_initializing", - "type": "t_bool", - "src": "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol:30" - }, - { - "contract": "ContextUpgradeable", - "label": "__gap", - "type": "t_array(t_uint256)50_storage", - "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:31" - }, - { - "contract": "OwnableUpgradeable", - "label": "_owner", - "type": "t_address", - "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:20" - }, - { - "contract": "OwnableUpgradeable", - "label": "__gap", - "type": "t_array(t_uint256)49_storage", - "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:74" - }, - { - "contract": "Packet", - "label": "clientManager", - "type": "t_contract(IClientManager)9523", - "src": "contracts/core/04-packet/Packet.sol:23" - }, - { - "contract": "Packet", - "label": "routing", - "type": "t_contract(IRouting)9672", - "src": "contracts/core/04-packet/Packet.sol:24" - }, - { - "contract": "Packet", - "label": "sequences", - "type": "t_mapping(t_bytes_memory_ptr,t_uint64)", - "src": "contracts/core/04-packet/Packet.sol:26" - }, - { - "contract": "Packet", - "label": "commitments", - "type": "t_mapping(t_bytes_memory_ptr,t_bytes32)", - "src": "contracts/core/04-packet/Packet.sol:27" - }, - { - "contract": "Packet", - "label": "receipts", - "type": "t_mapping(t_bytes_memory_ptr,t_bool)", - "src": "contracts/core/04-packet/Packet.sol:28" - }, - { - "contract": "Packet", - "label": "commitBytes", - "type": "t_bytes_storage", - "src": "contracts/core/04-packet/Packet.sol:29" - } - ], - "types": { - "t_contract(IClientManager)9523": { - "label": "contract IClientManager" - }, - "t_contract(IRouting)9672": { - "label": "contract IRouting" - }, - "t_mapping(t_bytes_memory_ptr,t_uint64)": { - "label": "mapping(bytes => uint64)" - }, - "t_bytes_storage": { - "label": "bytes" - }, - "t_uint64": { - "label": "uint64" - }, - "t_mapping(t_bytes_memory_ptr,t_bytes32)": { - "label": "mapping(bytes => bytes32)" - }, - "t_bytes32": { - "label": "bytes32" - }, - "t_mapping(t_bytes_memory_ptr,t_bool)": { - "label": "mapping(bytes => bool)" - }, - "t_bool": { - "label": "bool" - }, - "t_address": { - "label": "address" - }, - "t_array(t_uint256)49_storage": { - "label": "uint256[49]" - }, - "t_uint256": { - "label": "uint256" - }, - "t_array(t_uint256)50_storage": { - "label": "uint256[50]" - } - } - } - }, - "85280640df17825e6d9fc033b9839d1dfe930c44619a18db7b1a4275eb3ed1e6": { - "address": "0x5f3f1dBD7B74C6B46e8c44f98792A1dAf8d69154", - "txHash": "0xda36a811fec5c18aba2895dc7b4af17f96aa1e2da526e05e588c2f10f1bf3a5c", - "layout": { - "storage": [ - { - "contract": "Initializable", - "label": "_initialized", - "type": "t_bool", - "src": "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol:25" - }, - { - "contract": "Initializable", - "label": "_initializing", - "type": "t_bool", - "src": "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol:30" - }, - { - "contract": "ContextUpgradeable", - "label": "__gap", - "type": "t_array(t_uint256)50_storage", - "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:31" - }, - { - "contract": "OwnableUpgradeable", - "label": "_owner", - "type": "t_address", - "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:20" - }, - { - "contract": "OwnableUpgradeable", - "label": "__gap", - "type": "t_array(t_uint256)49_storage", - "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:74" - }, - { - "contract": "MockTransfer", - "label": "packet", - "type": "t_contract(IPacket)9647", - "src": "contracts/test/MockTransfer.sol:17" - }, - { - "contract": "MockTransfer", - "label": "clientManager", - "type": "t_contract(IClientManager)9523", - "src": "contracts/test/MockTransfer.sol:18" - } - ], - "types": { - "t_contract(IPacket)9647": { - "label": "contract IPacket" - }, - "t_contract(IClientManager)9523": { - "label": "contract IClientManager" - }, - "t_address": { - "label": "address" - }, - "t_array(t_uint256)49_storage": { - "label": "uint256[49]" - }, - "t_uint256": { - "label": "uint256" - }, - "t_array(t_uint256)50_storage": { - "label": "uint256[50]" - }, - "t_bool": { - "label": "bool" - } - } - } - }, - "7f5c2d64276a6b045cb092fcb8affcb2cfb31dbd109b508749f1599d0050b04a": { - "address": "0xFD471836031dc5108809D173A067e8486B9047A3", - "txHash": "0x04d3a6e2b63b7107ebb9dd5f2b6e861ca1b873de4ab7baaf22bdf5fd9952de0d", - "layout": { - "storage": [ - { - "contract": "Initializable", - "label": "_initialized", - "type": "t_bool", - "src": "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol:25" - }, - { - "contract": "Initializable", - "label": "_initializing", - "type": "t_bool", - "src": "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol:30" - }, - { - "contract": "ContextUpgradeable", - "label": "__gap", - "type": "t_array(t_uint256)50_storage", - "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:31" - }, - { - "contract": "OwnableUpgradeable", - "label": "_owner", - "type": "t_address", - "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:20" - }, - { - "contract": "OwnableUpgradeable", - "label": "__gap", - "type": "t_array(t_uint256)49_storage", - "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:74" - }, - { - "contract": "MockPacketUpgrade", - "label": "clientManager", - "type": "t_contract(IClientManager)9523", - "src": "contracts/test/MockPacketUpgrade.sol:23" - }, - { - "contract": "MockPacketUpgrade", - "label": "routing", - "type": "t_contract(IRouting)9672", - "src": "contracts/test/MockPacketUpgrade.sol:24" - }, - { - "contract": "MockPacketUpgrade", - "label": "sequences", - "type": "t_mapping(t_bytes_memory_ptr,t_uint64)", - "src": "contracts/test/MockPacketUpgrade.sol:26" - }, - { - "contract": "MockPacketUpgrade", - "label": "commitments", - "type": "t_mapping(t_bytes_memory_ptr,t_bytes32)", - "src": "contracts/test/MockPacketUpgrade.sol:27" - }, - { - "contract": "MockPacketUpgrade", - "label": "receipts", - "type": "t_mapping(t_bytes_memory_ptr,t_bool)", - "src": "contracts/test/MockPacketUpgrade.sol:28" - }, - { - "contract": "MockPacketUpgrade", - "label": "commitBytes", - "type": "t_bytes_storage", - "src": "contracts/test/MockPacketUpgrade.sol:29" - }, - { - "contract": "MockPacketUpgrade", - "label": "version", - "type": "t_uint256", - "src": "contracts/test/MockPacketUpgrade.sol:31" - } - ], - "types": { - "t_contract(IClientManager)9523": { - "label": "contract IClientManager" - }, - "t_contract(IRouting)9672": { - "label": "contract IRouting" - }, - "t_mapping(t_bytes_memory_ptr,t_uint64)": { - "label": "mapping(bytes => uint64)" - }, - "t_bytes_storage": { - "label": "bytes" - }, - "t_uint64": { - "label": "uint64" - }, - "t_mapping(t_bytes_memory_ptr,t_bytes32)": { - "label": "mapping(bytes => bytes32)" - }, - "t_bytes32": { - "label": "bytes32" - }, - "t_mapping(t_bytes_memory_ptr,t_bool)": { - "label": "mapping(bytes => bool)" - }, - "t_bool": { - "label": "bool" - }, - "t_uint256": { - "label": "uint256" - }, - "t_address": { - "label": "address" - }, - "t_array(t_uint256)49_storage": { - "label": "uint256[49]" - }, - "t_array(t_uint256)50_storage": { - "label": "uint256[50]" - } - } - } - }, - "2dc19fe6689f0319c123c9201e89ca26c5d64e9c6a5c4abeda7f0a9dc183db06": { - "address": "0xdbC43Ba45381e02825b14322cDdd15eC4B3164E6", - "txHash": "0x7b51b9a0c0227b59d7f865a30b2ec6fc2a273153ea73b03e6de27b8c56fede20", - "layout": { - "storage": [ - { - "contract": "Initializable", - "label": "_initialized", - "type": "t_bool", - "src": "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol:25" - }, - { - "contract": "Initializable", - "label": "_initializing", - "type": "t_bool", - "src": "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol:30" - }, - { - "contract": "ContextUpgradeable", - "label": "__gap", - "type": "t_array(t_uint256)50_storage", - "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:31" - }, - { - "contract": "OwnableUpgradeable", - "label": "_owner", - "type": "t_address", - "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:20" - }, - { - "contract": "OwnableUpgradeable", - "label": "__gap", - "type": "t_array(t_uint256)49_storage", - "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:74" - }, - { - "contract": "MockRoutingUpgrade", - "label": "modules", - "type": "t_mapping(t_string_memory_ptr,t_contract(IModule)9574)", - "src": "contracts/test/MockRoutingUpgrade.sol:20" - }, - { - "contract": "MockRoutingUpgrade", - "label": "router", - "type": "t_mapping(t_string_memory_ptr,t_struct(Rule)66488_storage)", - "src": "contracts/test/MockRoutingUpgrade.sol:21" - }, - { - "contract": "MockRoutingUpgrade", - "label": "accessManager", - "type": "t_contract(IAccessManager)9406", - "src": "contracts/test/MockRoutingUpgrade.sol:23" - }, - { - "contract": "MockRoutingUpgrade", - "label": "version", - "type": "t_uint256", - "src": "contracts/test/MockRoutingUpgrade.sol:29" - } - ], - "types": { - "t_mapping(t_string_memory_ptr,t_contract(IModule)9574)": { - "label": "mapping(string => contract IModule)" - }, - "t_string_storage": { - "label": "string" - }, - "t_contract(IModule)9574": { - "label": "contract IModule" - }, - "t_mapping(t_string_memory_ptr,t_struct(Rule)66488_storage)": { - "label": "mapping(string => struct MockRoutingUpgrade.Rule)" - }, - "t_struct(Rule)66488_storage": { - "label": "struct MockRoutingUpgrade.Rule", - "members": [ - { - "label": "val", - "type": "t_string_storage" - }, - { - "label": "isValue", - "type": "t_bool" - } - ] - }, - "t_bool": { - "label": "bool" - }, - "t_contract(IAccessManager)9406": { - "label": "contract IAccessManager" - }, - "t_uint256": { - "label": "uint256" - }, - "t_address": { - "label": "address" - }, - "t_array(t_uint256)49_storage": { - "label": "uint256[49]" - }, - "t_array(t_uint256)50_storage": { - "label": "uint256[50]" - } - } - } - }, - "370474db878b884a39ee402e272cc52b6b17a241c10caec639d3abe446e312ce": { - "address": "0x8198f5d8F8CfFE8f9C413d98a0A55aEB8ab9FbB7", - "txHash": "0x1747e503daaebc905852ad76fba00b15b24aab0806f43088cc64885093ccbde5", - "layout": { - "storage": [ - { - "contract": "Initializable", - "label": "_initialized", - "type": "t_bool", - "src": "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol:25" - }, - { - "contract": "Initializable", - "label": "_initializing", - "type": "t_bool", - "src": "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol:30" - }, - { - "contract": "ContextUpgradeable", - "label": "__gap", - "type": "t_array(t_uint256)50_storage", - "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:31" - }, - { - "contract": "OwnableUpgradeable", - "label": "_owner", - "type": "t_address", - "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:20" - }, - { - "contract": "OwnableUpgradeable", - "label": "__gap", - "type": "t_array(t_uint256)49_storage", - "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:74" - }, - { - "contract": "Tendermint", - "label": "clientState", - "type": "t_struct(Data)44295_storage", - "src": "contracts/light-clients/07-tendermint/Tendermint.sol:26" - }, - { - "contract": "Tendermint", - "label": "consensusStates", - "type": "t_mapping(t_uint128,t_struct(Data)46409_storage)", - "src": "contracts/light-clients/07-tendermint/Tendermint.sol:28" - }, - { - "contract": "Tendermint", - "label": "processedTime", - "type": "t_mapping(t_uint128,t_uint256)", - "src": "contracts/light-clients/07-tendermint/Tendermint.sol:30" - }, - { - "contract": "Tendermint", - "label": "clientManager", - "type": "t_address", - "src": "contracts/light-clients/07-tendermint/Tendermint.sol:32" - } - ], - "types": { - "t_struct(Data)44295_storage": { - "label": "struct ClientState.Data", - "members": [ - { - "label": "chain_id", - "type": "t_string_storage" - }, - { - "label": "trust_level", - "type": "t_struct(Data)48255_storage" - }, - { - "label": "trusting_period", - "type": "t_int64" - }, - { - "label": "unbonding_period", - "type": "t_int64" - }, - { - "label": "max_clock_drift", - "type": "t_int64" - }, - { - "label": "latest_height", - "type": "t_struct(Data)61109_storage" - }, - { - "label": "proof_specs", - "type": "t_array(t_struct(Data)27994_storage)dyn_storage" - }, - { - "label": "merkle_prefix", - "type": "t_struct(Data)17185_storage" - }, - { - "label": "time_delay", - "type": "t_uint64" - } - ] - }, - "t_string_storage": { - "label": "string" - }, - "t_struct(Data)48255_storage": { - "label": "struct Fraction.Data", - "members": [ - { - "label": "numerator", - "type": "t_uint64" - }, - { - "label": "denominator", - "type": "t_uint64" - } - ] - }, - "t_int64": { - "label": "int64" - }, - "t_struct(Data)61109_storage": { - "label": "struct Height.Data", - "members": [ - { - "label": "revision_number", - "type": "t_uint64" - }, - { - "label": "revision_height", - "type": "t_uint64" - } - ] - }, - "t_array(t_struct(Data)27994_storage)dyn_storage": { - "label": "struct ProofSpec.Data[]" - }, - "t_struct(Data)27994_storage": { - "label": "struct ProofSpec.Data", - "members": [ - { - "label": "leaf_spec", - "type": "t_struct(Data)26044_storage" - }, - { - "label": "inner_spec", - "type": "t_struct(Data)28988_storage" - }, - { - "label": "max_depth", - "type": "t_int32" - }, - { - "label": "min_depth", - "type": "t_int32" - } - ] - }, - "t_struct(Data)17185_storage": { - "label": "struct MerklePrefix.Data", - "members": [ - { - "label": "key_prefix", - "type": "t_bytes_storage" - } - ] - }, - "t_uint64": { - "label": "uint64" - }, - "t_struct(Data)26044_storage": { - "label": "struct LeafOp.Data", - "members": [ - { - "label": "hash", - "type": "t_enum(HashOp)36074" - }, - { - "label": "prehash_key", - "type": "t_enum(HashOp)36074" - }, - { - "label": "prehash_value", - "type": "t_enum(HashOp)36074" - }, - { - "label": "length", - "type": "t_enum(LengthOp)36202" - }, - { - "label": "prefix", - "type": "t_bytes_storage" - } - ] - }, - "t_struct(Data)28988_storage": { - "label": "struct InnerSpec.Data", - "members": [ - { - "label": "child_order", - "type": "t_array(t_int32)dyn_storage" - }, - { - "label": "child_size", - "type": "t_int32" - }, - { - "label": "min_prefix_length", - "type": "t_int32" - }, - { - "label": "max_prefix_length", - "type": "t_int32" - }, - { - "label": "empty_child", - "type": "t_bytes_storage" - }, - { - "label": "hash", - "type": "t_enum(HashOp)36074" - } - ] - }, - "t_int32": { - "label": "int32" - }, - "t_bytes_storage": { - "label": "bytes" - }, - "t_enum(HashOp)36074": { - "label": "enum PROOFS_PROTO_GLOBAL_ENUMS.HashOp", - "members": [ - "NO_HASH", - "SHA256", - "SHA512", - "KECCAK", - "RIPEMD160", - "BITCOIN" - ] - }, - "t_enum(LengthOp)36202": { - "label": "enum PROOFS_PROTO_GLOBAL_ENUMS.LengthOp", - "members": [ - "NO_PREFIX", - "VAR_PROTO", - "VAR_RLP", - "FIXED32_BIG", - "FIXED32_LITTLE", - "FIXED64_BIG", - "FIXED64_LITTLE", - "REQUIRE_32_BYTES", - "REQUIRE_64_BYTES" - ] - }, - "t_array(t_int32)dyn_storage": { - "label": "int32[]" - }, - "t_mapping(t_uint128,t_struct(Data)46409_storage)": { - "label": "mapping(uint128 => struct ConsensusState.Data)" - }, - "t_uint128": { - "label": "uint128" - }, - "t_struct(Data)46409_storage": { - "label": "struct ConsensusState.Data", - "members": [ - { - "label": "timestamp", - "type": "t_struct(Data)50264_storage" - }, - { - "label": "root", - "type": "t_bytes_storage" - }, - { - "label": "next_validators_hash", - "type": "t_bytes_storage" - } - ] - }, - "t_struct(Data)50264_storage": { - "label": "struct Timestamp.Data", - "members": [ - { - "label": "secs", - "type": "t_int64" - }, - { - "label": "nanos", - "type": "t_int64" - } - ] - }, - "t_mapping(t_uint128,t_uint256)": { - "label": "mapping(uint128 => uint256)" - }, - "t_uint256": { - "label": "uint256" - }, - "t_address": { - "label": "address" - }, - "t_array(t_uint256)49_storage": { - "label": "uint256[49]" - }, - "t_array(t_uint256)50_storage": { - "label": "uint256[50]" - }, - "t_bool": { - "label": "bool" - } - } - } - }, - "d3d5243d09e9ae4793eccbe095687e37c4a7235158059e8e70d614c84c9aea93": { - "address": "0xBEc49fA140aCaA83533fB00A2BB19bDdd0290f25", - "txHash": "0xa39ce64b6c0ead0dd8269f3f84dbae4e02ae95b0c1107ade65cfba4c9d386d5d", - "layout": { - "storage": [ - { - "contract": "Initializable", - "label": "_initialized", - "type": "t_bool", - "src": "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol:25" - }, - { - "contract": "Initializable", - "label": "_initializing", - "type": "t_bool", - "src": "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol:30" - }, - { - "contract": "ContextUpgradeable", - "label": "__gap", - "type": "t_array(t_uint256)50_storage", - "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:31" - }, - { - "contract": "OwnableUpgradeable", - "label": "_owner", - "type": "t_address", - "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:20" - }, - { - "contract": "OwnableUpgradeable", - "label": "__gap", - "type": "t_array(t_uint256)49_storage", - "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:74" - }, - { - "contract": "MockClientManager", - "label": "nativeChainName", - "type": "t_string_storage", - "src": "contracts/test/MockClientManager.sol:17" - }, - { - "contract": "MockClientManager", - "label": "clients", - "type": "t_mapping(t_string_memory_ptr,t_contract(IClient)9495)", - "src": "contracts/test/MockClientManager.sol:19" - }, - { - "contract": "MockClientManager", - "label": "relayers", - "type": "t_mapping(t_string_memory_ptr,t_mapping(t_address,t_bool))", - "src": "contracts/test/MockClientManager.sol:21" - }, - { - "contract": "MockClientManager", - "label": "accessManager", - "type": "t_contract(IAccessManager)9406", - "src": "contracts/test/MockClientManager.sol:23" - }, - { - "contract": "MockClientManager", - "label": "version", - "type": "t_uint256", - "src": "contracts/test/MockClientManager.sol:32" - } - ], - "types": { - "t_string_storage": { - "label": "string" - }, - "t_mapping(t_string_memory_ptr,t_contract(IClient)9495)": { - "label": "mapping(string => contract IClient)" - }, - "t_contract(IClient)9495": { - "label": "contract IClient" - }, - "t_mapping(t_string_memory_ptr,t_mapping(t_address,t_bool))": { - "label": "mapping(string => mapping(address => bool))" - }, - "t_mapping(t_address,t_bool)": { - "label": "mapping(address => bool)" - }, - "t_address": { - "label": "address" - }, - "t_bool": { - "label": "bool" - }, - "t_contract(IAccessManager)9406": { - "label": "contract IAccessManager" - }, - "t_uint256": { - "label": "uint256" - }, - "t_array(t_uint256)49_storage": { - "label": "uint256[49]" - }, - "t_array(t_uint256)50_storage": { - "label": "uint256[50]" - } - } - } - }, - "b0e12e83d5d1eec1dd620441ea7a862638c1808dc849bfe633a5e25131ebb596": { - "address": "0x7A9Ec1d04904907De0ED7b6839CcdD59c3716AC9", - "txHash": "0x92252fa18cb1a1730aa198f75d461f16b918b6fe1ebdc53fc56ca8a426c33fed", - "layout": { - "storage": [ - { - "contract": "Initializable", - "label": "_initialized", - "type": "t_bool", - "src": "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol:25" - }, - { - "contract": "Initializable", - "label": "_initializing", - "type": "t_bool", - "src": "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol:30" - }, - { - "contract": "ContextUpgradeable", - "label": "__gap", - "type": "t_array(t_uint256)50_storage", - "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:31" - }, - { - "contract": "OwnableUpgradeable", - "label": "_owner", - "type": "t_address", - "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:20" - }, - { - "contract": "OwnableUpgradeable", - "label": "__gap", - "type": "t_array(t_uint256)49_storage", - "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:74" - }, - { - "contract": "Tendermint", - "label": "clientState", - "type": "t_struct(Data)44295_storage", - "src": "contracts/light-clients/07-tendermint/Tendermint.sol:26" - }, - { - "contract": "Tendermint", - "label": "consensusStates", - "type": "t_mapping(t_uint128,t_struct(Data)46409_storage)", - "src": "contracts/light-clients/07-tendermint/Tendermint.sol:28" - }, - { - "contract": "Tendermint", - "label": "processedTime", - "type": "t_mapping(t_uint128,t_uint256)", - "src": "contracts/light-clients/07-tendermint/Tendermint.sol:30" - }, - { - "contract": "Tendermint", - "label": "clientManager", - "type": "t_address", - "src": "contracts/light-clients/07-tendermint/Tendermint.sol:32" - } - ], - "types": { - "t_struct(Data)44295_storage": { - "label": "struct ClientState.Data", - "members": [ - { - "label": "chain_id", - "type": "t_string_storage" - }, - { - "label": "trust_level", - "type": "t_struct(Data)48255_storage" - }, - { - "label": "trusting_period", - "type": "t_int64" - }, - { - "label": "unbonding_period", - "type": "t_int64" - }, - { - "label": "max_clock_drift", - "type": "t_int64" - }, - { - "label": "latest_height", - "type": "t_struct(Data)61109_storage" - }, - { - "label": "proof_specs", - "type": "t_array(t_struct(Data)27994_storage)dyn_storage" - }, - { - "label": "merkle_prefix", - "type": "t_struct(Data)17185_storage" - }, - { - "label": "time_delay", - "type": "t_uint64" - } - ] - }, - "t_string_storage": { - "label": "string" - }, - "t_struct(Data)48255_storage": { - "label": "struct Fraction.Data", - "members": [ - { - "label": "numerator", - "type": "t_uint64" - }, - { - "label": "denominator", - "type": "t_uint64" - } - ] - }, - "t_int64": { - "label": "int64" - }, - "t_struct(Data)61109_storage": { - "label": "struct Height.Data", - "members": [ - { - "label": "revision_number", - "type": "t_uint64" - }, - { - "label": "revision_height", - "type": "t_uint64" - } - ] - }, - "t_array(t_struct(Data)27994_storage)dyn_storage": { - "label": "struct ProofSpec.Data[]" - }, - "t_struct(Data)27994_storage": { - "label": "struct ProofSpec.Data", - "members": [ - { - "label": "leaf_spec", - "type": "t_struct(Data)26044_storage" - }, - { - "label": "inner_spec", - "type": "t_struct(Data)28988_storage" - }, - { - "label": "max_depth", - "type": "t_int32" - }, - { - "label": "min_depth", - "type": "t_int32" - } - ] - }, - "t_struct(Data)17185_storage": { - "label": "struct MerklePrefix.Data", - "members": [ - { - "label": "key_prefix", - "type": "t_bytes_storage" - } - ] - }, - "t_uint64": { - "label": "uint64" - }, - "t_struct(Data)26044_storage": { - "label": "struct LeafOp.Data", - "members": [ - { - "label": "hash", - "type": "t_enum(HashOp)36074" - }, - { - "label": "prehash_key", - "type": "t_enum(HashOp)36074" - }, - { - "label": "prehash_value", - "type": "t_enum(HashOp)36074" - }, - { - "label": "length", - "type": "t_enum(LengthOp)36202" - }, - { - "label": "prefix", - "type": "t_bytes_storage" - } - ] - }, - "t_struct(Data)28988_storage": { - "label": "struct InnerSpec.Data", - "members": [ - { - "label": "child_order", - "type": "t_array(t_int32)dyn_storage" - }, - { - "label": "child_size", - "type": "t_int32" - }, - { - "label": "min_prefix_length", - "type": "t_int32" - }, - { - "label": "max_prefix_length", - "type": "t_int32" - }, - { - "label": "empty_child", - "type": "t_bytes_storage" - }, - { - "label": "hash", - "type": "t_enum(HashOp)36074" - } - ] - }, - "t_int32": { - "label": "int32" - }, - "t_bytes_storage": { - "label": "bytes" - }, - "t_enum(HashOp)36074": { - "label": "enum PROOFS_PROTO_GLOBAL_ENUMS.HashOp", - "members": [ - "NO_HASH", - "SHA256", - "SHA512", - "KECCAK", - "RIPEMD160", - "BITCOIN" - ] - }, - "t_enum(LengthOp)36202": { - "label": "enum PROOFS_PROTO_GLOBAL_ENUMS.LengthOp", - "members": [ - "NO_PREFIX", - "VAR_PROTO", - "VAR_RLP", - "FIXED32_BIG", - "FIXED32_LITTLE", - "FIXED64_BIG", - "FIXED64_LITTLE", - "REQUIRE_32_BYTES", - "REQUIRE_64_BYTES" - ] - }, - "t_array(t_int32)dyn_storage": { - "label": "int32[]" - }, - "t_mapping(t_uint128,t_struct(Data)46409_storage)": { - "label": "mapping(uint128 => struct ConsensusState.Data)" - }, - "t_uint128": { - "label": "uint128" - }, - "t_struct(Data)46409_storage": { - "label": "struct ConsensusState.Data", - "members": [ - { - "label": "timestamp", - "type": "t_struct(Data)50264_storage" - }, - { - "label": "root", - "type": "t_bytes_storage" - }, - { - "label": "next_validators_hash", - "type": "t_bytes_storage" - } - ] - }, - "t_struct(Data)50264_storage": { - "label": "struct Timestamp.Data", - "members": [ - { - "label": "secs", - "type": "t_int64" - }, - { - "label": "nanos", - "type": "t_int64" - } - ] - }, - "t_mapping(t_uint128,t_uint256)": { - "label": "mapping(uint128 => uint256)" - }, - "t_uint256": { - "label": "uint256" - }, - "t_address": { - "label": "address" - }, - "t_array(t_uint256)49_storage": { - "label": "uint256[49]" - }, - "t_array(t_uint256)50_storage": { - "label": "uint256[50]" - }, - "t_bool": { - "label": "bool" - } - } - } - }, - "326a41450902b752c42cfe65ec7aeab6b5956b5fa344f65402c1137fc5d63637": { - "address": "0xAA292E8611aDF267e563f334Ee42320aC96D0463", - "txHash": "0x1b9f5bc7109b83af26b249968755f12d1454ba41c681ece8e5e64523dd4bd63c", - "layout": { - "storage": [ - { - "contract": "Initializable", - "label": "_initialized", - "type": "t_bool", - "src": "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol:25" - }, - { - "contract": "Initializable", - "label": "_initializing", - "type": "t_bool", - "src": "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol:30" - }, - { - "contract": "ContextUpgradeable", - "label": "__gap", - "type": "t_array(t_uint256)50_storage", - "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:31" - }, - { - "contract": "OwnableUpgradeable", - "label": "_owner", - "type": "t_address", - "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:20" - }, - { - "contract": "OwnableUpgradeable", - "label": "__gap", - "type": "t_array(t_uint256)49_storage", - "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:74" - }, - { - "contract": "Transfer", - "label": "packet", - "type": "t_contract(IPacket)9647", - "src": "contracts/core/apps/30-nft-transfer/Transfer.sol:26" - }, - { - "contract": "Transfer", - "label": "clientManager", - "type": "t_contract(IClientManager)9523", - "src": "contracts/core/apps/30-nft-transfer/Transfer.sol:27" - }, - { - "contract": "Transfer", - "label": "traces", - "type": "t_mapping(t_uint256,t_struct(OriginNFT)12948_storage)", - "src": "contracts/core/apps/30-nft-transfer/Transfer.sol:29" - } - ], - "types": { - "t_contract(IPacket)9647": { - "label": "contract IPacket" - }, - "t_contract(IClientManager)9523": { - "label": "contract IClientManager" - }, - "t_mapping(t_uint256,t_struct(OriginNFT)12948_storage)": { - "label": "mapping(uint256 => struct TransferDataTypes.OriginNFT)" - }, - "t_uint256": { - "label": "uint256" - }, - "t_struct(OriginNFT)12948_storage": { - "label": "struct TransferDataTypes.OriginNFT", - "members": [ - { - "label": "class", - "type": "t_string_storage" - }, - { - "label": "id", - "type": "t_string_storage" - }, - { - "label": "uri", - "type": "t_string_storage" - } - ] - }, - "t_string_storage": { - "label": "string" - }, - "t_address": { - "label": "address" - }, - "t_array(t_uint256)49_storage": { - "label": "uint256[49]" - }, - "t_array(t_uint256)50_storage": { - "label": "uint256[50]" - }, - "t_bool": { - "label": "bool" - } - } - } - }, - "55febc5afc3c29a32776ca65c1b6cd2fabddfecfb7fc0ead8cf7c191647ba4e4": { - "address": "0xc96304e3c037f81dA488ed9dEa1D8F2a48278a75", - "txHash": "0x27f63f8775c3619457fa59b274809c488ffa23e7c6a2d4653dfeeeef4ae6c8fc", - "layout": { - "storage": [ - { - "contract": "Initializable", - "label": "_initialized", - "type": "t_bool", - "src": "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol:25" - }, - { - "contract": "Initializable", - "label": "_initializing", - "type": "t_bool", - "src": "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol:30" - }, - { - "contract": "ContextUpgradeable", - "label": "__gap", - "type": "t_array(t_uint256)50_storage", - "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:31" - }, - { - "contract": "OwnableUpgradeable", - "label": "_owner", - "type": "t_address", - "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:20" - }, - { - "contract": "OwnableUpgradeable", - "label": "__gap", - "type": "t_array(t_uint256)49_storage", - "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:74" - }, - { - "contract": "MockTransferUpgrade", - "label": "packet", - "type": "t_contract(IPacket)9647", - "src": "contracts/test/MockTransferUpgrade.sol:26" - }, - { - "contract": "MockTransferUpgrade", - "label": "clientManager", - "type": "t_contract(IClientManager)9523", - "src": "contracts/test/MockTransferUpgrade.sol:27" - }, - { - "contract": "MockTransferUpgrade", - "label": "traces", - "type": "t_mapping(t_uint256,t_struct(OriginNFT)12948_storage)", - "src": "contracts/test/MockTransferUpgrade.sol:29" - }, - { - "contract": "MockTransferUpgrade", - "label": "version", - "type": "t_uint256", - "src": "contracts/test/MockTransferUpgrade.sol:31" - } - ], - "types": { - "t_contract(IPacket)9647": { - "label": "contract IPacket" - }, - "t_contract(IClientManager)9523": { - "label": "contract IClientManager" - }, - "t_mapping(t_uint256,t_struct(OriginNFT)12948_storage)": { - "label": "mapping(uint256 => struct TransferDataTypes.OriginNFT)" - }, - "t_uint256": { - "label": "uint256" - }, - "t_struct(OriginNFT)12948_storage": { - "label": "struct TransferDataTypes.OriginNFT", - "members": [ - { - "label": "class", - "type": "t_string_storage" - }, - { - "label": "id", - "type": "t_string_storage" - }, - { - "label": "uri", - "type": "t_string_storage" - } - ] - }, - "t_string_storage": { - "label": "string" - }, - "t_address": { - "label": "address" - }, - "t_array(t_uint256)49_storage": { - "label": "uint256[49]" - }, - "t_array(t_uint256)50_storage": { - "label": "uint256[50]" - }, - "t_bool": { - "label": "bool" - } - } - } - } - } -} diff --git a/README.md b/README.md index ba71fe1..a716b04 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ yarn hardhat deployAcessManager --network --wallet * Deploy ClientManager ```shell -yarn hardhat deployClientManager --network --chain --accm +yarn hardhat deployClientManager --network --chain ``` * Deploy Tendermint Client @@ -58,7 +58,7 @@ yarn hardhat deployTendermint --network * Deploy Routing ```shell -yarn hardhat deployRouting --network --accm +yarn hardhat deployRouting --network ``` * Deploy Packet @@ -79,6 +79,12 @@ yarn hardhat deployERC1155Bank --network yarn hardhat deployNFTTransfer --network ``` +* Deploy MT Transfer + +```shell +yarn hardhat deployMtTransfer --network +``` + ### Transfer proxy contract ownership For the safe upgrade of the contract, it is necessary to cooperate with the operation of the multi-signature wallet to transfer the ownership of the contract to the multi-signature wallet. Note that after the project is deployed, the proxy contract address of all contracts and the compilation information of the contract are recorded in the .openzeppelin directory. This information is needed when the contract upgrade is executed next time. Modify the following [script](#./script/transfer-ownership.js) to complete the ownership transfer. In the `scripts/transfer-ownership.js` file, you need to replace the `gnosisSafe` variable, which is the address of the multi-signature wallet. After the modification is complete, execute the following command: @@ -118,7 +124,7 @@ Grant mint and burn permissions to the `` EOA ### Create light client ```shell -DEBUG=* yarn hardhat createClient --chain irishub-testnet --client --clientstate --consensusstate --network +DEBUG=* yarn hardhat createClient --chain irishub-testnet --clientstate --consensusstate --network ``` ## Upgrade contract diff --git a/hardhat.config.ts b/hardhat.config.ts index edfa339..c9b4bb9 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -6,15 +6,16 @@ import "@typechain/hardhat" import "hardhat-gas-reporter" import "hardhat-contract-sizer" import "hardhat-abi-exporter" -import "./tasks/deployLibraries" -import "./tasks/deployTendermintClient" -import "./tasks/deployClientManager" -import "./tasks/deployPacket" -import "./tasks/deployRouting" -import "./tasks/deployERC1155Bank" -import "./tasks/deployNFTTransfer" -import "./tasks/deployAccessManager" -import "./tasks/deployUptickGateway" +import "./tasks/tendermintLibraries" +import "./tasks/tendermintClient" +import "./tasks/clientManager" +import "./tasks/packet" +import "./tasks/routing" +import "./tasks/erc1155Bank" +import "./tasks/nftTransfer" +import "./tasks/mtTransfer" +import "./tasks/accessManager" +import "./tasks/uptickGateway" module.exports = { defaultNetwork: 'hardhat', @@ -33,18 +34,18 @@ module.exports = { // gas: 4100000, // accounts: [''], // }, - bsctestnet: { - url: 'https://data-seed-prebsc-1-s1.binance.org:8545', - gasPrice: 20000000000, - chainId: 97, - //accounts: [''], - }, - bsc: { - url: 'https://bsc-dataseed.binance.org', - gasPrice: 20000000000, - chainId: 56, - //accounts: [''], - }, + // bsctestnet: { + // url: 'https://data-seed-prebsc-1-s1.binance.org:8545', + // gasPrice: 20000000000, + // chainId: 97, + // accounts: [''], + // }, + // bsc: { + // url: 'https://bsc-dataseed.binance.org', + // gasPrice: 20000000000, + // chainId: 56, + // //accounts: [''], + // }, }, solidity: { version: '0.6.8', diff --git a/tasks/accessManager.ts b/tasks/accessManager.ts new file mode 100644 index 0000000..8a2b158 --- /dev/null +++ b/tasks/accessManager.ts @@ -0,0 +1,17 @@ +import "@nomiclabs/hardhat-web3"; +import { task } from "hardhat/config" +const config = require('./config') + +task("deployAcessManager", "Deploy acessManager") + .setAction(async (taskArgs, hre) => { + await config.load(async function (env: any) { + const accessManagerFactory = await hre.ethers.getContractFactory('AccessManager') + const accessManager = await hre.upgrades.deployProxy(accessManagerFactory, + [env.multiSignWalletAddress]); + await accessManager.deployed(); + console.log("AccessManager deployed to:", accessManager.address); + env.contract.accessManagerAddress = accessManager.address + },true) + }); + +module.exports = {}; \ No newline at end of file diff --git a/tasks/clientManager.ts b/tasks/clientManager.ts new file mode 100644 index 0000000..d45e2a1 --- /dev/null +++ b/tasks/clientManager.ts @@ -0,0 +1,143 @@ +import "@nomiclabs/hardhat-web3"; +import { task, types } from "hardhat/config" +const config = require('./config') + +let client = require("../test/proto/compiled.js"); + +task("deployClientManager", "Deploy Client Manager") + .setAction(async (taskArgs, hre) => { + await config.load(async function (env: any) { + const clientManagerFactory = await hre.ethers.getContractFactory('ClientManager') + const clientManager = await hre.upgrades.deployProxy(clientManagerFactory, [ + env.network.nativeChainName, + env.contract.accessManagerAddress + ]); + await clientManager.deployed(); + console.log("Client Manager deployed to:", clientManager.address); + env.contract.clientManagerAddress = clientManager.address + }, true) + }); + +task("upgradeClientManager", "Upgrade Client Manager") + .addParam("chain", "Chain Name") + .setAction(async (taskArgs, hre) => { + await config.load(async function (env: any) { + const clientManagerFactory = await hre.ethers.getContractFactory('ClientManager') + const clientManager = await hre.upgrades.upgradeProxy( + env.contract.clientManagerAddress, + clientManagerFactory + ); + await clientManager.deployed(); + console.log("Client Manager upgraded to:", clientManager.address); + env.contract.clientManagerAddress = clientManager.address + }) + }); +task("createClient", "Deploy Client Manager") + .setAction(async (taskArgs, hre) => { + await config.load(async function (env: any) { + const clientManagerFactory = await hre.ethers.getContractFactory('ClientManager') + const clientManager = await clientManagerFactory.attach(env.contract.clientManagerAddress); + const clientStatebytes = Buffer.from(env.network.clientstate, "hex") + const clientStateObj = JSON.parse(clientStatebytes.toString()) + const clientStateEncode = { + chainId: clientStateObj.chainId, + trustLevel: { + numerator: clientStateObj.trustLevel.numerator, + denominator: clientStateObj.trustLevel.denominator + }, + + trustingPeriod: clientStateObj.trustingPeriod, + unbondingPeriod: clientStateObj.unbondingPeriod, + maxClockDrift: clientStateObj.maxClockDrift, + latestHeight: { + revisionNumber: clientStateObj.latestHeight.revisionNumber, + revisionHeight: clientStateObj.latestHeight.revisionHeight + }, + merklePrefix: { + keyPrefix: Buffer.from("tibc"), + }, + timeDelay: 0, + } + + + const clientState = client.ClientState.encode(clientStateEncode).finish(); + const consensusStateBytes = Buffer.from(env.network.consensusstate, "hex") + const consensusStateObj = JSON.parse(consensusStateBytes.toString()) + const consensusStateEncode = { + timestamp: { + secs: consensusStateObj.timestamp.secs, + nanos: consensusStateObj.timestamp.nanos, + }, + root: Buffer.from(consensusStateObj.root, "hex"), + nextValidatorsHash: Buffer.from(consensusStateObj.nextValidatorsHash, "hex") + } + const consensusState = client.ConsensusState.encode(consensusStateEncode).finish(); + const result = await clientManager.createClient( + env.network.counterpartyChainName, + env.contract.tmLightClientAddress, + clientState, + consensusState); + console.log(result); + }, true) + }); + +task("registerRelayer", "Deploy Client Manager") + .setAction(async (taskArgs, hre) => { + await config.load(async function (env: any) { + const clientManagerFactory = await hre.ethers.getContractFactory('ClientManager') + const clientManager = await clientManagerFactory.attach(env.contract.clientManagerAddress); + const result = await clientManager.registerRelayer( + env.network.counterpartyChainName, + env.network.relayerAddress + ); + console.log(result); + }) + }); + +task("updateClient", "Deploy Client Manager") + .addParam("header", "HEX encoding header") + .setAction(async (taskArgs, hre) => { + await config.load(async function (env: any) { + const clientManagerFactory = await hre.ethers.getContractFactory('ClientManager') + const clientManager = await clientManagerFactory.attach(env.contract.clientManagerAddress); + const result = await clientManager.updateClient(env.network.counterpartyChainName, Buffer.from(taskArgs.header, "hex")) + console.log(await result.wait()); + }) + }); + +task("getClient", "Deploy Client Manager") + .setAction(async (taskArgs, hre) => { + await config.load(async function (env: any) { + const clientManagerFactory = await hre.ethers.getContractFactory('ClientManager') + const clientManager = await clientManagerFactory.attach(env.contract.clientManagerAddress); + const result = await clientManager.clients( + env.network.counterpartyChainName, + ) + console.log(await result); + }) + }); + +task("getRelayers", "Deploy Client Manager") + .setAction(async (taskArgs, hre) => { + await config.load(async function (env: any) { + const clientManagerFactory = await hre.ethers.getContractFactory('ClientManager') + const clientManager = await clientManagerFactory.attach(env.contract.clientManagerAddress); + const result = await clientManager.relayers( + env.network.counterpartyChainName, + env.network.relayerAddress + ) + console.log(result); + }) + }); + +task("lastheight", "Deploy Client Manager") + .setAction(async (taskArgs, hre) => { + await config.load(async function (env: any) { + const clientManagerFactory = await hre.ethers.getContractFactory('ClientManager') + const clientManager = await clientManagerFactory.attach(env.contract.clientManagerAddress); + const result = await clientManager.getLatestHeight(env.network.counterpartyChainName) + console.log(result); + }) + }); + +module.exports = {}; diff --git a/tasks/config.ts b/tasks/config.ts new file mode 100644 index 0000000..a5390f7 --- /dev/null +++ b/tasks/config.ts @@ -0,0 +1,27 @@ +const fs = require('fs') + +function writeConfig(content:Object) { + let data = JSON.stringify(content, null,'\t'); + fs.writeFileSync('./tibcconfig.json', data) +} + +async function load(callback: Function,override:Boolean = false) { + let env = loadSync(); + await callback(env); + if(override) { + writeConfig(env); + } +} + +function loadSync() { + try { + let rawdata = fs.readFileSync('./tibcconfig.json'); + return JSON.parse(rawdata); + }catch(e) { + console.log("no tibcconfig.json file found"); + } +} + +export = { + load, +}; \ No newline at end of file diff --git a/tasks/deployAccessManager.ts b/tasks/deployAccessManager.ts deleted file mode 100644 index 890de53..0000000 --- a/tasks/deployAccessManager.ts +++ /dev/null @@ -1,15 +0,0 @@ -import "@nomiclabs/hardhat-web3"; -import { task } from "hardhat/config" - -task("deployAcessManager", "Deploy acessManager") - .addParam("wallet", "multi sign address") - .setAction(async (taskArgs, hre) => { - const accessManagerFactory = await hre.ethers.getContractFactory('AccessManager') - const accessManager = await hre.upgrades.deployProxy(accessManagerFactory, - [taskArgs.wallet]); - await accessManager.deployed(); - console.log("AccessManager deployed to:", accessManager.address); - console.log("export ACCESS_MANAGER_ADDRES=%s", accessManager.address); - }); - -module.exports = {}; \ No newline at end of file diff --git a/tasks/deployClientManager.ts b/tasks/deployClientManager.ts deleted file mode 100644 index 351ffb2..0000000 --- a/tasks/deployClientManager.ts +++ /dev/null @@ -1,211 +0,0 @@ -import "@nomiclabs/hardhat-web3"; -import { ethers, upgrades } from "hardhat"; -import { task, types } from "hardhat/config" -import { readFileSync } from 'fs'; - -const CLIENT_MANAGER_ADDRES = process.env.CLIENT_MANAGER_ADDRES; -const ACCESS_MANAGER_ADDRES = process.env.ACCESS_MANAGER_ADDRES; - -let client = require("../test/proto/compiled.js"); - -task("deployClientManager", "Deploy Client Manager") - .addParam("chain", "Chain Name") - .addParam("accm", "AccessManager contract address") - .setAction(async (taskArgs, hre) => { - const clientManagerFactory = await hre.ethers.getContractFactory('ClientManager') - const clientManager = await hre.upgrades.deployProxy(clientManagerFactory, [ - taskArgs.chain, - taskArgs.accm - ]); - await clientManager.deployed(); - console.log("Client Manager deployed to:", clientManager.address); - console.log("export CLIENT_MANAGER_ADDRES=%s", clientManager.address); - }); - -task("upgradeClientManager", "Upgrade Client Manager") - .addParam("chain", "Chain Name") - .setAction(async (taskArgs, hre) => { - const clientManagerFactory = await hre.ethers.getContractFactory('ClientManager') - - const clientManager = await hre.upgrades.upgradeProxy(String(CLIENT_MANAGER_ADDRES), clientManagerFactory); - await clientManager.deployed(); - console.log("Client Manager upgraded to:", clientManager.address); - console.log("export CLIENT_MANAGER_ADDRES=%s", clientManager.address); - }); -task("createClientFromFile", "Deploy Client Manager") - .addParam("chain", "Chain Name") - .addParam("client", "Client Address") - .addParam("clientstate", "HEX encoding client client") - .addParam("consensusstate", "HEX encoding consensus state") - .setAction(async (taskArgs, hre) => { - - const clientStatebytesHex = await readFileSync(taskArgs.clientstate); - const clientStatebytes = Buffer.from(clientStatebytesHex.toString(), "hex"); - - const consensusStateBytesHex = await readFileSync(taskArgs.consensusstate); - const consensusStateBytes = Buffer.from(consensusStateBytesHex.toString(), "hex"); - - const clientManagerFactory = await hre.ethers.getContractFactory('ClientManager') - - const clientManager = await clientManagerFactory.attach(String(CLIENT_MANAGER_ADDRES)); - - const clientStateObj = JSON.parse(clientStatebytes.toString()) - - const clientStateEncode = { - chainId: clientStateObj.chainId, - trustLevel: { - numerator: clientStateObj.trustLevel.numerator, - denominator: clientStateObj.trustLevel.denominator - }, - - trustingPeriod: clientStateObj.trustingPeriod, - unbondingPeriod: clientStateObj.unbondingPeriod, - maxClockDrift: clientStateObj.maxClockDrift, - latestHeight: { - revisionNumber: clientStateObj.latestHeight.revisionNumber, - revisionHeight: clientStateObj.latestHeight.revisionHeight - }, - merklePrefix: { - keyPrefix: Buffer.from("tibc"), - }, - timeDelay: 10, - } - - - const clientState = client.ClientState.encode(clientStateEncode).finish(); - - const consensusStateObj = JSON.parse(consensusStateBytes.toString()) - - const consensusStateEncode = { - timestamp: { - secs: consensusStateObj.timestamp.secs, - nanos: consensusStateObj.timestamp.nanos, - }, - root: Buffer.from(consensusStateObj.root, "hex"), - nextValidatorsHash: Buffer.from(consensusStateObj.nextValidatorsHash, "hex") - } - - const consensusState = client.ConsensusState.encode(consensusStateEncode).finish(); - - const result = await clientManager.createClient( - taskArgs.chain, - taskArgs.client, - clientState, - consensusState); - console.log(result); - - }); - -task("createClient", "Deploy Client Manager") - .addParam("chain", "Chain Name") - .addParam("client", "Client Address") - .addParam("clientstate", "HEX encoding client client") - .addParam("consensusstate", "HEX encoding consensus state") - .setAction(async (taskArgs, hre) => { - - const clientManagerFactory = await hre.ethers.getContractFactory('ClientManager') - - const clientManager = await clientManagerFactory.attach(String(CLIENT_MANAGER_ADDRES)); - - const clientStatebytes = Buffer.from(taskArgs.clientstate, "hex") - - const clientStateObj = JSON.parse(clientStatebytes.toString()) - - const clientStateEncode = { - chainId: clientStateObj.chainId, - trustLevel: { - numerator: clientStateObj.trustLevel.numerator, - denominator: clientStateObj.trustLevel.denominator - }, - - trustingPeriod: clientStateObj.trustingPeriod, - unbondingPeriod: clientStateObj.unbondingPeriod, - maxClockDrift: clientStateObj.maxClockDrift, - latestHeight: { - revisionNumber: clientStateObj.latestHeight.revisionNumber, - revisionHeight: clientStateObj.latestHeight.revisionHeight - }, - merklePrefix: { - keyPrefix: Buffer.from("tibc"), - }, - timeDelay: 0, - } - - - const clientState = client.ClientState.encode(clientStateEncode).finish(); - - const consensusStateBytes = Buffer.from(taskArgs.consensusstate, "hex") - - const consensusStateObj = JSON.parse(consensusStateBytes.toString()) - - const consensusStateEncode = { - timestamp: { - secs: consensusStateObj.timestamp.secs, - nanos: consensusStateObj.timestamp.nanos, - }, - // root: Buffer.from("YXBwX2hhc2g=", "base64"), - root: Buffer.from(consensusStateObj.root, "hex"), - nextValidatorsHash: Buffer.from(consensusStateObj.nextValidatorsHash, "hex") - } - - const consensusState = client.ConsensusState.encode(consensusStateEncode).finish(); - - const result = await clientManager.createClient( - taskArgs.chain, - taskArgs.client, - clientState, - consensusState); - console.log(result); - - }); - -task("registerRelayer", "Deploy Client Manager") - .addParam("chain", "Chain Name") - .addParam("relayer", "Relayer Address") - .setAction(async (taskArgs, hre) => { - const clientManagerFactory = await hre.ethers.getContractFactory('ClientManager') - const clientManager = await clientManagerFactory.attach(String(CLIENT_MANAGER_ADDRES)); - const result = await clientManager.registerRelayer(taskArgs.chain, taskArgs.relayer); - console.log(result); - }); - -task("updateClient", "Deploy Client Manager") - .addParam("chain", "chain name") - .addParam("header", "HEX encoding header") - .setAction(async (taskArgs, hre) => { - - const clientManagerFactory = await hre.ethers.getContractFactory('ClientManager') - - const clientManager = await clientManagerFactory.attach(String(CLIENT_MANAGER_ADDRES)); - - const result = await clientManager.updateClient(taskArgs.chain, Buffer.from(taskArgs.header, "hex")) - - console.log(await result.wait()); - }); -task("getRelayers", "Deploy Client Manager") - .addParam("chain", "Chain Name") - .addParam("relayer", "Relayer Address") - .setAction(async (taskArgs, hre) => { - - const clientManagerFactory = await hre.ethers.getContractFactory('ClientManager') - - const clientManager = await clientManagerFactory.attach(String(CLIENT_MANAGER_ADDRES)); - - const result = await clientManager.relayers(taskArgs.chain, taskArgs.relayer) - console.log(result); - }); - -task("lastheight", "Deploy Client Manager") - .addParam("chain", "Chain Name") - .setAction(async (taskArgs, hre) => { - - const clientManagerFactory = await hre.ethers.getContractFactory('ClientManager') - - const clientManager = await clientManagerFactory.attach(String(CLIENT_MANAGER_ADDRES)); - - const result = await clientManager.getLatestHeight(taskArgs.chain) - - console.log(await result.wait()); - }); - -module.exports = {}; diff --git a/tasks/deployERC1155Bank.ts b/tasks/deployERC1155Bank.ts deleted file mode 100644 index 6930317..0000000 --- a/tasks/deployERC1155Bank.ts +++ /dev/null @@ -1,14 +0,0 @@ -import "@nomiclabs/hardhat-web3"; -import { task } from "hardhat/config" - -task("deployERC1155Bank", "Deploy ERC1155Bank") - .addParam("owner", "Contract owner") - .setAction(async (taskArgs, hre) => { - const erc1155BankFactory = await hre.ethers.getContractFactory('ERC1155Bank') - const bank = await hre.upgrades.deployProxy(erc1155BankFactory, [taskArgs.owner]); - await bank.deployed(); - console.log("ERC1155Bank deployed to:", bank.address); - console.log("export ERC1155BANK_ADDRES=%s", bank.address); - }); - -module.exports = {}; \ No newline at end of file diff --git a/tasks/deployPacket.ts b/tasks/deployPacket.ts deleted file mode 100644 index 36a6e58..0000000 --- a/tasks/deployPacket.ts +++ /dev/null @@ -1,20 +0,0 @@ -import "@nomiclabs/hardhat-web3"; -import { task } from "hardhat/config" - -const CLIENT_MANAGER_ADDRES = process.env.CLIENT_MANAGER_ADDRES; -const ROUTING_ADDRES = process.env.ROUTING_ADDRES; - -task("deployPacket", "Deploy Packet") - .setAction(async (taskArgs, hre) => { - const packetFactory = await hre.ethers.getContractFactory('Packet') - const packet = await hre.upgrades.deployProxy(packetFactory, - [ - String(CLIENT_MANAGER_ADDRES), - String(ROUTING_ADDRES) - ]); - await packet.deployed(); - console.log("Packet deployed to:", packet.address); - console.log("export PACKET_ADDRES=%s", packet.address); - }); - -module.exports = {}; diff --git a/tasks/deployRouting.ts b/tasks/deployRouting.ts deleted file mode 100644 index a896066..0000000 --- a/tasks/deployRouting.ts +++ /dev/null @@ -1,41 +0,0 @@ -import "@nomiclabs/hardhat-web3"; -import { ethers } from "hardhat"; -import { task, types } from "hardhat/config" - -const ROUTING_ADDRES = process.env.ROUTING_ADDRES; - -task("deployRouting", "Deploy Routing") - .addParam("accm", "AccessManager contract address") - .setAction(async (taskArgs, hre) => { - const routingFactory = await hre.ethers.getContractFactory('Routing') - const routing = await hre.upgrades.deployProxy(routingFactory, [taskArgs.accm]); - await routing.deployed(); - console.log("Routing deployed to:", routing.address); - console.log("export ROUTING_ADDRES=%s", routing.address); - }); - -task("setRoutingRules", "Set Routing Rules") - .addParam("rules", "routing rules") - .setAction(async (taskArgs, hre) => { - const routingFactory = await hre.ethers.getContractFactory('Routing') - - const routing = await routingFactory.attach(String(ROUTING_ADDRES)); - let rules: string[] = taskArgs.rules.split("|") - const result = await routing.setRoutingRules(rules) - console.log(result); - }); - -task("addRouting", "Add module routing") - .addParam("module", "module name") - .addParam("address", "module address") - .setAction(async (taskArgs, hre) => { - const routingFactory = await hre.ethers.getContractFactory('Routing') - - const routing = await routingFactory.attach(String(ROUTING_ADDRES)); - - let rules: string[] = taskArgs.rules - const result = await routing.addRouting(taskArgs.module, taskArgs.address) - console.log(result); - }); - -module.exports = {}; diff --git a/tasks/deployTendermintClient.ts b/tasks/deployTendermintClient.ts deleted file mode 100644 index d40e160..0000000 --- a/tasks/deployTendermintClient.ts +++ /dev/null @@ -1,25 +0,0 @@ -import "@nomiclabs/hardhat-web3"; -import { task } from "hardhat/config" - -const CLIENT_STATE_CODEC_ADDRES = process.env.CLIENT_STATE_CODEC_ADDRES; -const CONSENSUS_STATE_CODEC_ADDRES = process.env.CONSENSUS_STATE_CODEC_ADDRES; -const VERIFIER_ADDRES = process.env.VERIFIER_ADDRES; -const CLIENT_MANAGER_ADDRES = process.env.CLIENT_MANAGER_ADDRES; - -task("deployTendermint", "Deploy Tendermint Client") - .setAction(async (taskArgs, hre) => { - const tendermintFactory = await hre.ethers.getContractFactory('Tendermint', { - libraries: { - ClientStateCodec: String(CLIENT_STATE_CODEC_ADDRES), - ConsensusStateCodec: String(CONSENSUS_STATE_CODEC_ADDRES), - Verifier: String(VERIFIER_ADDRES), - } - }) - - const tendermint = await hre.upgrades.deployProxy(tendermintFactory, [String(CLIENT_MANAGER_ADDRES)], - { "unsafeAllowLinkedLibraries": true }); - await tendermint.deployed(); - console.log("Tendermint deployed to:", tendermint.address); - }); - -module.exports = {}; diff --git a/tasks/erc1155Bank.ts b/tasks/erc1155Bank.ts new file mode 100644 index 0000000..4c6d961 --- /dev/null +++ b/tasks/erc1155Bank.ts @@ -0,0 +1,17 @@ +import "@nomiclabs/hardhat-web3"; +import { task } from "hardhat/config" +const config = require('./config') + +task("deployERC1155Bank", "Deploy ERC1155Bank") + .addParam("owner", "Contract owner") + .setAction(async (taskArgs, hre) => { + await config.load(async function (env: any) { + const erc1155BankFactory = await hre.ethers.getContractFactory('ERC1155Bank') + const bank = await hre.upgrades.deployProxy(erc1155BankFactory, [taskArgs.owner]); + await bank.deployed(); + console.log("ERC1155Bank deployed to:", bank.address); + env.contract.erc1155BankAddress = bank.address + },true) + }); + +module.exports = {}; \ No newline at end of file diff --git a/tasks/mtTransfer.ts b/tasks/mtTransfer.ts new file mode 100644 index 0000000..f3138c9 --- /dev/null +++ b/tasks/mtTransfer.ts @@ -0,0 +1,52 @@ +import "@nomiclabs/hardhat-web3"; +import { task, types } from "hardhat/config"; +import { BigNumber } from "ethers"; + +const config = require('./config') + +task("deployMtTransfer", "Deploy MT Transfer") + .setAction(async (taskArgs, hre) => { + await config.load(async function (env: any) { + const transferFactory = await hre.ethers.getContractFactory('MultiTokenTransfer') + const transfer = await hre.upgrades.deployProxy(transferFactory, + [ + env.contract.packetAddress, + env.contract.clientManagerAddress + ]); + await transfer.deployed(); + console.log("MtTransfer deployed to:", transfer.address); + env.contract.transferMTAddress = transfer.address + },true) + }); + +task("transferMT", "Sender MT") + .addParam("mtid", "mt id") + .addParam("amount", "mt amount") + .addParam("destchain", "dest chain name") + .addParam("receiver", "receiver address") + .addParam("relaychain", "relay chain name", "", types.string, true) + .setAction(async (taskArgs, hre) => { + await config.load(async function (env: any) { + const transferFactory = await hre.ethers.getContractFactory('MultiTokenTransfer') + const transfer = await transferFactory.attach(env.contract.transferMTAddress); + const tokenID = BigNumber.from(taskArgs.mtid) + + const erc1155BankFactory = await hre.ethers.getContractFactory('ERC1155Bank') + const erc1155Bank = await erc1155BankFactory.attach(env.contract.erc1155BankAddress); + const originToken = await transfer.getBinding(tokenID); + + let transferdata = { + tokenId: tokenID, + receiver: taskArgs.receiver, + class: originToken.class, + destChain: taskArgs.destchain, + relayChain: taskArgs.relaychain, + destContract: erc1155Bank.address, + amount: taskArgs.amount, + } + let res = await transfer.sendTransfer(transferdata); + console.log(await res.wait()) + }) + }); + +module.exports = {}; diff --git a/tasks/deployNFTTransfer.ts b/tasks/nftTransfer.ts similarity index 71% rename from tasks/deployNFTTransfer.ts rename to tasks/nftTransfer.ts index 5ea0cd8..f5fa631 100644 --- a/tasks/deployNFTTransfer.ts +++ b/tasks/nftTransfer.ts @@ -1,21 +1,21 @@ import "@nomiclabs/hardhat-web3"; import { task, types } from "hardhat/config"; import { BigNumber } from "ethers"; - -const CLIENT_MANAGER_ADDRES = process.env.CLIENT_MANAGER_ADDRES; -const PACKET_ADDRES = process.env.PACKET_ADDRES; +const config = require('./config') task("deployNFTTransfer", "Deploy NFT Transfer") .setAction(async (taskArgs, hre) => { - const transferFactory = await hre.ethers.getContractFactory('Transfer') - const transfer = await hre.upgrades.deployProxy(transferFactory, - [ - String(PACKET_ADDRES), - String(CLIENT_MANAGER_ADDRES) - ]); - await transfer.deployed(); - console.log("Transfer deployed to:", transfer.address); - console.log("export TRANSFER_ADDRES=%s", transfer.address); + await config.load(async function (env: any) { + const transferFactory = await hre.ethers.getContractFactory('Transfer') + const transfer = await hre.upgrades.deployProxy(transferFactory, + [ + env.contract.packetAddress, + env.contract.clientManagerAddress + ]); + await transfer.deployed(); + console.log("Transfer deployed to:", transfer.address); + env.contract.transferNFTAddress = transfer.address + },true) }); task("transferNFT", "Sender NFT") diff --git a/tasks/packet.ts b/tasks/packet.ts new file mode 100644 index 0000000..f3d2aed --- /dev/null +++ b/tasks/packet.ts @@ -0,0 +1,21 @@ +import "@nomiclabs/hardhat-web3"; +import { task } from "hardhat/config" +const config = require('./config') + + +task("deployPacket", "Deploy Packet") + .setAction(async (taskArgs, hre) => { + await config.load(async function (env: any) { + const packetFactory = await hre.ethers.getContractFactory('Packet') + const packet = await hre.upgrades.deployProxy(packetFactory, + [ + env.contract.clientManagerAddress, + env.contract.routingAddress + ]); + await packet.deployed(); + console.log("Packet deployed to:", packet.address); + env.contract.packetAddress = packet.address + },true) + }); + +module.exports = {}; diff --git a/tasks/routing.ts b/tasks/routing.ts new file mode 100644 index 0000000..33047ab --- /dev/null +++ b/tasks/routing.ts @@ -0,0 +1,47 @@ +import "@nomiclabs/hardhat-web3"; +import { error } from "console"; +import { task, types } from "hardhat/config" +const config = require('./config') + +task("deployRouting", "Deploy Routing") + .setAction(async (taskArgs, hre) => { + await config.load(async function (env: any) { + const routingFactory = await hre.ethers.getContractFactory('Routing') + const routing = await hre.upgrades.deployProxy(routingFactory, [env.contract.accessManagerAddress]); + await routing.deployed(); + console.log("Routing deployed to:", routing.address); + env.contract.routingAddress = routing.address + },true) + }); + +task("setRoutingRules", "Set Routing Rules") + .setAction(async (taskArgs, hre) => { + await config.load(async function (env: any) { + const routingFactory = await hre.ethers.getContractFactory('Routing') + const routing = await routingFactory.attach(env.contract.routingAddress); + let rules: string[] = env.network.rules.split("|") + const result = await routing.setRoutingRules(rules) + console.log(result); + }) + }); + +task("addRouting", "Add module routing") + .addParam("module", "module name") + .setAction(async (taskArgs, hre) => { + await config.load(async function (env: any) { + const routingFactory = await hre.ethers.getContractFactory('Routing') + const routing = await routingFactory.attach(env.contract.routingAddress); + + var moduleAddress + if (taskArgs.module == "NFT") { + moduleAddress = env.contract.transferNFTAddress + } else if (taskArgs.module == "MT") { + moduleAddress = env.contract.transferMTAddress + }else { + throw error("module address not found") + } + const result = await routing.addRouting(taskArgs.module, moduleAddress) + console.log(result); + }) + }); +module.exports = {}; diff --git a/tasks/tendermintClient.ts b/tasks/tendermintClient.ts new file mode 100644 index 0000000..d0486e6 --- /dev/null +++ b/tasks/tendermintClient.ts @@ -0,0 +1,23 @@ +import "@nomiclabs/hardhat-web3"; +import { task } from "hardhat/config" +const config = require('./config') + +task("deployTendermint", "Deploy Tendermint Client") + .setAction(async (taskArgs, hre) => { + await config.load(async function (env: any) { + const tendermintFactory = await hre.ethers.getContractFactory('Tendermint', { + libraries: { + ClientStateCodec: env.contract.clientStateCodecAddress, + ConsensusStateCodec: env.contract.consensusStateCodecAddress, + Verifier: env.contract.proofVerifierAddress, + } + }) + + const tendermint = await hre.upgrades.deployProxy(tendermintFactory, [env.contract.clientManagerAddress], + { "unsafeAllowLinkedLibraries": true }); + await tendermint.deployed(); + env.contract.tmLightClientAddress = tendermint.address + console.log("Tendermint deployed to:", tendermint.address); + },true) + }); +module.exports = {}; diff --git a/tasks/deployLibraries.ts b/tasks/tendermintLibraries.ts similarity index 77% rename from tasks/deployLibraries.ts rename to tasks/tendermintLibraries.ts index 7e0c25b..108a38a 100644 --- a/tasks/deployLibraries.ts +++ b/tasks/tendermintLibraries.ts @@ -1,5 +1,6 @@ import "@nomiclabs/hardhat-web3"; import { task } from "hardhat/config" +const config = require('./config') task("deployLibraries", "Deploy All Libraries") .setAction(async (taskArgs, hre) => { @@ -28,10 +29,12 @@ task("deployLibraries", "Deploy All Libraries") console.log("ProofCodec deployed to:", proofCodec.address); console.log("Verifier deployed to:", verifierLib.address); - console.log("export CLIENT_STATE_CODEC_ADDRES=%s", clientStateCodec.address); - console.log("export CONSENSUS_STATE_CODEC_ADDRES=%s", consensusStateCodec.address); - console.log("export PROOF_CODEC_ADDRES=%s", proofCodec.address); - console.log("export VERIFIER_ADDRES=%s", verifierLib.address); + await config.load(function (env: any) { + env.contract.clientStateCodecAddress = clientStateCodec.address + env.contract.consensusStateCodecAddress = consensusStateCodec.address + env.contract.proofCodecAddress = proofCodec.address + env.contract.proofVerifierAddress = verifierLib.address + },true) }); module.exports = {}; diff --git a/tasks/deployUptickGateway.ts b/tasks/uptickGateway.ts similarity index 100% rename from tasks/deployUptickGateway.ts rename to tasks/uptickGateway.ts diff --git a/tibcconfig.json b/tibcconfig.json new file mode 100644 index 0000000..978cf6b --- /dev/null +++ b/tibcconfig.json @@ -0,0 +1,25 @@ +{ + "contract": { + "clientStateCodecAddress": "", + "consensusStateCodecAddress": "", + "proofCodecAddress": "", + "proofVerifierAddress": "", + "accessManagerAddress": "", + "clientManagerAddress": "", + "tmLightClientAddress": "", + "routingAddress": "", + "packetAddress": "", + "transferNFTAddress": "", + "transferMTAddress": "", + "erc1155BankAddress": "" + }, + "multiSignWalletAddress": "", + "network":{ + "counterpartyChainName": "", + "nativeChainName": "", + "relayerAddress":"", + "rules":"", + "clientstate":"", + "consensusstate":"" + } +} \ No newline at end of file