From afae9aaec84981056479e175a5490796c236a253 Mon Sep 17 00:00:00 2001 From: GitGuru7 <128375421+GitGuru7@users.noreply.github.com> Date: Thu, 8 Aug 2024 12:05:23 +0530 Subject: [PATCH 1/9] feat: add vip to enable bsc -> zksync bridge on testnet --- simulations/vip-349/abi/XVS.json | 295 ++++ simulations/vip-349/abi/XVSBridgeAdmin.json | 287 ++++ simulations/vip-349/abi/XVSProxyOFTSrc.json | 1616 +++++++++++++++++++ simulations/vip-349/simulations.ts | 188 +++ src/types.ts | 1 + src/vip-framework/index.ts | 2 + vips/vip-349/bsctestnet.ts | 62 + yarn.lock | 127 +- 8 files changed, 2577 insertions(+), 1 deletion(-) create mode 100644 simulations/vip-349/abi/XVS.json create mode 100644 simulations/vip-349/abi/XVSBridgeAdmin.json create mode 100644 simulations/vip-349/abi/XVSProxyOFTSrc.json create mode 100644 simulations/vip-349/simulations.ts create mode 100644 vips/vip-349/bsctestnet.ts diff --git a/simulations/vip-349/abi/XVS.json b/simulations/vip-349/abi/XVS.json new file mode 100644 index 000000000..b0ef0e012 --- /dev/null +++ b/simulations/vip-349/abi/XVS.json @@ -0,0 +1,295 @@ +[ + { + "inputs": [{ "internalType": "address", "name": "account", "type": "address" }], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": true, "internalType": "address", "name": "owner", "type": "address" }, + { "indexed": true, "internalType": "address", "name": "spender", "type": "address" }, + { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": true, "internalType": "address", "name": "delegator", "type": "address" }, + { "indexed": true, "internalType": "address", "name": "fromDelegate", "type": "address" }, + { "indexed": true, "internalType": "address", "name": "toDelegate", "type": "address" } + ], + "name": "DelegateChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": true, "internalType": "address", "name": "delegate", "type": "address" }, + { "indexed": false, "internalType": "uint256", "name": "previousBalance", "type": "uint256" }, + { "indexed": false, "internalType": "uint256", "name": "newBalance", "type": "uint256" } + ], + "name": "DelegateVotesChanged", + "type": "event" + }, + { "anonymous": false, "inputs": [], "name": "Freezed", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { "indexed": true, "internalType": "address", "name": "_from", "type": "address" }, + { "indexed": true, "internalType": "address", "name": "_to", "type": "address" } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": true, "internalType": "address", "name": "from", "type": "address" }, + { "indexed": true, "internalType": "address", "name": "to", "type": "address" }, + { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } + ], + "name": "Transfer", + "type": "event" + }, + { "anonymous": false, "inputs": [], "name": "UnFreezed", "type": "event" }, + { + "constant": true, + "inputs": [], + "name": "DELEGATION_TYPEHASH", + "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "DOMAIN_TYPEHASH", + "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { "internalType": "address", "name": "account", "type": "address" }, + { "internalType": "address", "name": "spender", "type": "address" } + ], + "name": "allowance", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "address", "name": "spender", "type": "address" }, + { "internalType": "uint256", "name": "rawAmount", "type": "uint256" } + ], + "name": "approve", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [{ "internalType": "address", "name": "account", "type": "address" }], + "name": "balanceOf", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { "internalType": "address", "name": "", "type": "address" }, + { "internalType": "uint32", "name": "", "type": "uint32" } + ], + "name": "checkpoints", + "outputs": [ + { "internalType": "uint32", "name": "fromBlock", "type": "uint32" }, + { "internalType": "uint96", "name": "votes", "type": "uint96" } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "decimals", + "outputs": [{ "internalType": "uint8", "name": "", "type": "uint8" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [{ "internalType": "address", "name": "delegatee", "type": "address" }], + "name": "delegate", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "address", "name": "delegatee", "type": "address" }, + { "internalType": "uint256", "name": "nonce", "type": "uint256" }, + { "internalType": "uint256", "name": "expiry", "type": "uint256" }, + { "internalType": "uint8", "name": "v", "type": "uint8" }, + { "internalType": "bytes32", "name": "r", "type": "bytes32" }, + { "internalType": "bytes32", "name": "s", "type": "bytes32" } + ], + "name": "delegateBySig", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [{ "internalType": "address", "name": "", "type": "address" }], + "name": "delegates", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "freeze", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [{ "internalType": "address", "name": "account", "type": "address" }], + "name": "getCurrentVotes", + "outputs": [{ "internalType": "uint96", "name": "", "type": "uint96" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { "internalType": "address", "name": "account", "type": "address" }, + { "internalType": "uint256", "name": "blockNumber", "type": "uint256" } + ], + "name": "getPriorVotes", + "outputs": [{ "internalType": "uint96", "name": "", "type": "uint96" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "name", + "outputs": [{ "internalType": "string", "name": "", "type": "string" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [{ "internalType": "address", "name": "", "type": "address" }], + "name": "nonces", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [{ "internalType": "address", "name": "", "type": "address" }], + "name": "numCheckpoints", + "outputs": [{ "internalType": "uint32", "name": "", "type": "uint32" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "owner", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "symbol", + "outputs": [{ "internalType": "string", "name": "", "type": "string" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "totalSupply", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "address", "name": "dst", "type": "address" }, + { "internalType": "uint256", "name": "rawAmount", "type": "uint256" } + ], + "name": "transfer", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "address", "name": "src", "type": "address" }, + { "internalType": "address", "name": "dst", "type": "address" }, + { "internalType": "uint256", "name": "rawAmount", "type": "uint256" } + ], + "name": "transferFrom", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [{ "internalType": "address", "name": "newOwner", "type": "address" }], + "name": "transferOwnership", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "unfreeze", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/simulations/vip-349/abi/XVSBridgeAdmin.json b/simulations/vip-349/abi/XVSBridgeAdmin.json new file mode 100644 index 000000000..36158eeba --- /dev/null +++ b/simulations/vip-349/abi/XVSBridgeAdmin.json @@ -0,0 +1,287 @@ +[ + { + "inputs": [ + { + "internalType": "address", + "name": "XVSBridge_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "calledContract", + "type": "address" + }, + { + "internalType": "string", + "name": "methodSignature", + "type": "string" + } + ], + "name": "Unauthorized", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddressNotAllowed", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "signature", + "type": "string" + }, + { + "indexed": false, + "internalType": "bool", + "name": "isRemoved", + "type": "bool" + } + ], + "name": "FunctionRegistryChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldAccessControlManager", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAccessControlManager", + "type": "address" + } + ], + "name": "NewAccessControlManager", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "XVSBridge", + "outputs": [ + { + "internalType": "contract IXVSProxyOFT", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "accessControlManager", + "outputs": [ + { + "internalType": "contract IAccessControlManagerV8", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "name": "functionRegistry", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "accessControlManager_", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pendingOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "accessControlManager_", + "type": "address" + } + ], + "name": "setAccessControlManager", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner_", + "type": "address" + } + ], + "name": "transferBridgeOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string[]", + "name": "signatures_", + "type": "string[]" + }, + { + "internalType": "bool[]", + "name": "remove_", + "type": "bool[]" + } + ], + "name": "upsertSignature", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/simulations/vip-349/abi/XVSProxyOFTSrc.json b/simulations/vip-349/abi/XVSProxyOFTSrc.json new file mode 100644 index 000000000..e88302d59 --- /dev/null +++ b/simulations/vip-349/abi/XVSProxyOFTSrc.json @@ -0,0 +1,1616 @@ +[ + { + "inputs": [], + "name": "ZeroAddressNotAllowed", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "_nonce", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "_hash", + "type": "bytes32" + } + ], + "name": "CallOFTReceivedSuccess", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "_nonce", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_payload", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_reason", + "type": "bytes" + } + ], + "name": "MessageFailed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "_address", + "type": "address" + } + ], + "name": "NonContractAddress", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldOracle", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOracle", + "type": "address" + } + ], + "name": "OracleChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "indexed": true, + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "ReceiveFromChain", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "_nonce", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "_payloadHash", + "type": "bytes32" + } + ], + "name": "RetryMessageSuccess", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "indexed": true, + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "_toAddress", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "SendToChain", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "chainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oldMaxLimit", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newMaxLimit", + "type": "uint256" + } + ], + "name": "SetMaxDailyLimit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "chainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oldMaxLimit", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newMaxLimit", + "type": "uint256" + } + ], + "name": "SetMaxDailyReceiveLimit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "chainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oldMaxLimit", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newMaxLimit", + "type": "uint256" + } + ], + "name": "SetMaxSingleReceiveTransactionLimit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "chainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oldMaxLimit", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newMaxLimit", + "type": "uint256" + } + ], + "name": "SetMaxSingleTransactionLimit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "uint16", + "name": "_type", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_minDstGas", + "type": "uint256" + } + ], + "name": "SetMinDstGas", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "precrime", + "type": "address" + } + ], + "name": "SetPrecrime", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "_remoteChainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_path", + "type": "bytes" + } + ], + "name": "SetTrustedRemote", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "_remoteChainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_remoteAddress", + "type": "bytes" + } + ], + "name": "SetTrustedRemoteAddress", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "addr", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "isWhitelist", + "type": "bool" + } + ], + "name": "SetWhitelist", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "inputs": [], + "name": "DEFAULT_PAYLOAD_SIZE_LIMIT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "NO_EXTRA_GAS", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PT_SEND", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PT_SEND_AND_CALL", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "_nonce", + "type": "uint64" + }, + { + "internalType": "bytes32", + "name": "_from", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "_payload", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "_gasForCall", + "type": "uint256" + } + ], + "name": "callOnOFTReceived", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "chainIdToLast24HourReceiveWindowStart", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "chainIdToLast24HourReceived", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "chainIdToLast24HourTransferred", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "chainIdToLast24HourWindowStart", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "chainIdToMaxDailyLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "chainIdToMaxDailyReceiveLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "chainIdToMaxSingleReceiveTransactionLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "chainIdToMaxSingleTransactionLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "circulatingSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "name": "creditedPackets", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "internalType": "bytes32", + "name": "_toAddress", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "_payload", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "_dstGasForCall", + "type": "uint64" + }, + { + "internalType": "bool", + "name": "_useZro", + "type": "bool" + }, + { + "internalType": "bytes", + "name": "_adapterParams", + "type": "bytes" + } + ], + "name": "estimateSendAndCallFee", + "outputs": [ + { + "internalType": "uint256", + "name": "nativeFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "zroFee", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "internalType": "bytes32", + "name": "_toAddress", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "_useZro", + "type": "bool" + }, + { + "internalType": "bytes", + "name": "_adapterParams", + "type": "bytes" + } + ], + "name": "estimateSendFee", + "outputs": [ + { + "internalType": "uint256", + "name": "nativeFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "zroFee", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "name": "failedMessages", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + } + ], + "name": "forceResumeReceive", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_version", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "_chainId", + "type": "uint16" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_configType", + "type": "uint256" + } + ], + "name": "getConfig", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_remoteChainId", + "type": "uint16" + } + ], + "name": "getTrustedRemoteAddress", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + } + ], + "name": "isTrustedRemote", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "lzEndpoint", + "outputs": [ + { + "internalType": "contract ILayerZeroEndpoint", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "_nonce", + "type": "uint64" + }, + { + "internalType": "bytes", + "name": "_payload", + "type": "bytes" + } + ], + "name": "lzReceive", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "minDstGasLookup", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "_nonce", + "type": "uint64" + }, + { + "internalType": "bytes", + "name": "_payload", + "type": "bytes" + } + ], + "name": "nonblockingLzReceive", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "oracle", + "outputs": [ + { + "internalType": "contract ResilientOracleInterface", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "payloadSizeLimitLookup", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "precrime", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "_nonce", + "type": "uint64" + }, + { + "internalType": "bytes", + "name": "_payload", + "type": "bytes" + } + ], + "name": "retryMessage", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "internalType": "bytes32", + "name": "_toAddress", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "_payload", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "_dstGasForCall", + "type": "uint64" + }, + { + "components": [ + { + "internalType": "address payable", + "name": "refundAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "zroPaymentAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "adapterParams", + "type": "bytes" + } + ], + "internalType": "struct ICommonOFT.LzCallParams", + "name": "_callParams", + "type": "tuple" + } + ], + "name": "sendAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "internalType": "bytes32", + "name": "_toAddress", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address payable", + "name": "refundAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "zroPaymentAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "adapterParams", + "type": "bytes" + } + ], + "internalType": "struct ICommonOFT.LzCallParams", + "name": "_callParams", + "type": "tuple" + } + ], + "name": "sendFrom", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_version", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "_chainId", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "_configType", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "_config", + "type": "bytes" + } + ], + "name": "setConfig", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "chainId_", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "limit_", + "type": "uint256" + } + ], + "name": "setMaxDailyLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "chainId_", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "limit_", + "type": "uint256" + } + ], + "name": "setMaxDailyReceiveLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "chainId_", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "limit_", + "type": "uint256" + } + ], + "name": "setMaxSingleReceiveTransactionLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "chainId_", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "limit_", + "type": "uint256" + } + ], + "name": "setMaxSingleTransactionLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "_packetType", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "_minGas", + "type": "uint256" + } + ], + "name": "setMinDstGas", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "oracleAddress_", + "type": "address" + } + ], + "name": "setOracle", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "_size", + "type": "uint256" + } + ], + "name": "setPayloadSizeLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_precrime", + "type": "address" + } + ], + "name": "setPrecrime", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_version", + "type": "uint16" + } + ], + "name": "setReceiveVersion", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_version", + "type": "uint16" + } + ], + "name": "setSendVersion", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_remoteChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_path", + "type": "bytes" + } + ], + "name": "setTrustedRemote", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_remoteChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_remoteAddress", + "type": "bytes" + } + ], + "name": "setTrustedRemoteAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user_", + "type": "address" + }, + { + "internalType": "bool", + "name": "val_", + "type": "bool" + } + ], + "name": "setWhitelist", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "sharedDecimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "token", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "trustedRemoteLookup", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "whitelist", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } +] diff --git a/simulations/vip-349/simulations.ts b/simulations/vip-349/simulations.ts new file mode 100644 index 000000000..2e31c1b47 --- /dev/null +++ b/simulations/vip-349/simulations.ts @@ -0,0 +1,188 @@ +import { TransactionResponse } from "@ethersproject/providers"; +import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; +import { expect } from "chai"; +import { Contract } from "ethers"; +import { parseUnits } from "ethers/lib/utils"; +import { ethers } from "hardhat"; +import { NETWORK_ADDRESSES } from "src/networkAddresses"; +import { LzChainId } from "src/types"; +import { expectEvents, initMainnetUser } from "src/utils"; +import { forking, testVip } from "src/vip-framework"; + +import vip349, { + MAX_DAILY_RECEIVE_LIMIT, + MAX_DAILY_SEND_LIMIT, + MIN_DST_GAS, + SINGLE_RECEIVE_LIMIT, + SINGLE_SEND_LIMIT, +} from "../../vips/vip-349/bsctestnet"; +import XVS_ABI from "./abi/XVS.json"; +import XVS_BRIDGE_ADMIN_ABI from "./abi/XVSBridgeAdmin.json"; +import XVS_BRIDGE_SRC_ABI from "./abi/XVSProxyOFTSrc.json"; + +const { bsctestnet } = NETWORK_ADDRESSES; + +const XVSProxyOFTSrc = "0x0E132cd94fd70298b747d2b4D977db8d086e5fD0"; +const XVS_HOLDER = "0x2Ce1d0ffD7E869D9DF33e28552b12DdDed326706"; + +forking(42792146, async () => { + const provider = ethers.provider; + let bridge: Contract; + let xvs: Contract; + let xvsHolderSigner: SignerWithAddress; + let receiver: SignerWithAddress; + let receiverAddressBytes32: string; + let defaultAdapterParams: string; + + beforeEach(async () => { + bridge = new ethers.Contract(XVSProxyOFTSrc, XVS_BRIDGE_SRC_ABI, provider); + xvs = new ethers.Contract(bsctestnet.XVS, XVS_ABI, provider); + xvsHolderSigner = await initMainnetUser(XVS_HOLDER, ethers.utils.parseEther("2")); + [receiver] = await ethers.getSigners(); + receiverAddressBytes32 = ethers.utils.defaultAbiCoder.encode(["address"], [receiver.address]); + defaultAdapterParams = ethers.utils.solidityPack(["uint16", "uint256"], [1, 300000]); + }); + + testVip("vip-349 testnet", await vip349(), { + callbackAfterExecution: async (txResponse: TransactionResponse) => { + await expectEvents( + txResponse, + [XVS_BRIDGE_ADMIN_ABI, XVS_BRIDGE_SRC_ABI], + [ + "SetMinDstGas", + "SetMaxSingleTransactionLimit", + "SetMaxDailyLimit", + "SetMaxSingleReceiveTransactionLimit", + "SetMaxDailyReceiveLimit", + "SetTrustedRemoteAddress", + "Failure", + ], + [1, 1, 1, 1, 1, 1, 0], + ); + }, + }); + + describe("Post-VIP behavior", () => { + it("Should match minDestGas value", async () => { + expect(await bridge.minDstGasLookup(LzChainId.zksyncsepolia, 0)).to.equal(MIN_DST_GAS); + }); + + it("Should match single send transaction limit", async () => { + expect(await bridge.chainIdToMaxSingleTransactionLimit(LzChainId.zksyncsepolia)).to.equal(SINGLE_SEND_LIMIT); + }); + + it("Should match single receive transaction limit", async () => { + expect(await bridge.chainIdToMaxSingleReceiveTransactionLimit(LzChainId.zksyncsepolia)).to.equal( + SINGLE_RECEIVE_LIMIT, + ); + }); + + it("Should match max daily send limit", async () => { + expect(await bridge.chainIdToMaxDailyLimit(LzChainId.zksyncsepolia)).to.equal(MAX_DAILY_SEND_LIMIT); + }); + + it("Should match max daily receive limit", async () => { + expect(await bridge.chainIdToMaxDailyReceiveLimit(LzChainId.zksyncsepolia)).to.equal(MAX_DAILY_RECEIVE_LIMIT); + }); + + it("Should emit an event on successfull bridging of XVS", async () => { + const amount = parseUnits("0.5", 18); + const nativeFee = ( + await bridge.estimateSendFee( + LzChainId.zksyncsepolia, + receiverAddressBytes32, + amount, + false, + defaultAdapterParams, + ) + ).nativeFee; + + await xvs.connect(xvsHolderSigner).approve(bridge.address, amount); + const bridgeBalPrev = await xvs.balanceOf(XVSProxyOFTSrc); + await expect( + bridge + .connect(xvsHolderSigner) + .sendFrom( + xvsHolderSigner.address, + LzChainId.zksyncsepolia, + receiverAddressBytes32, + amount, + [xvsHolderSigner.address, ethers.constants.AddressZero, defaultAdapterParams], + { value: nativeFee }, + ), + ) + .to.be.emit(bridge, "SendToChain") + .withArgs(LzChainId.zksyncsepolia, XVS_HOLDER, receiverAddressBytes32, amount); + const bridgeBalAfter = await xvs.balanceOf(XVSProxyOFTSrc); + + expect(bridgeBalAfter.sub(bridgeBalPrev)).to.equal(amount); + }); + + it("Reverts if single transaction limit exceed", async function () { + const amount = ethers.utils.parseUnits("10000", 18); + await xvs.connect(xvsHolderSigner).approve(bridge.address, amount); + + const nativeFee = ( + await bridge.estimateSendFee( + LzChainId.zksyncsepolia, + receiverAddressBytes32, + amount, + false, + defaultAdapterParams, + ) + ).nativeFee; + await expect( + bridge + .connect(xvsHolderSigner) + .sendFrom( + xvsHolderSigner.address, + LzChainId.zksyncsepolia, + receiverAddressBytes32, + amount, + [xvsHolderSigner.address, ethers.constants.AddressZero, defaultAdapterParams], + { value: nativeFee }, + ), + ).to.be.revertedWith("Single Transaction Limit Exceed"); + }); + + it("Reverts if max daily transaction limit exceed", async function () { + const maxPlusAmount = ethers.utils.parseUnits("50000", 18); + const amount = parseUnits("1700", 18); + await xvs.connect(xvsHolderSigner).approve(bridge.address, maxPlusAmount); + const nativeFee = ( + await bridge.estimateSendFee( + LzChainId.zksyncsepolia, + receiverAddressBytes32, + amount, + false, + defaultAdapterParams, + ) + ).nativeFee; + + for (let i = 0; i < 5; i++) { + await bridge + .connect(xvsHolderSigner) + .sendFrom( + xvsHolderSigner.address, + LzChainId.zksyncsepolia, + receiverAddressBytes32, + amount, + [xvsHolderSigner.address, ethers.constants.AddressZero, defaultAdapterParams], + { value: nativeFee }, + ); + } + await expect( + bridge + .connect(xvsHolderSigner) + .sendFrom( + xvsHolderSigner.address, + LzChainId.zksyncsepolia, + receiverAddressBytes32, + amount, + [xvsHolderSigner.address, ethers.constants.AddressZero, defaultAdapterParams], + { value: nativeFee }, + ), + ).to.be.revertedWith("Daily Transaction Limit Exceed"); + }); + }); +}); diff --git a/src/types.ts b/src/types.ts index e80e27c33..3aa792813 100644 --- a/src/types.ts +++ b/src/types.ts @@ -67,4 +67,5 @@ export enum LzChainId { opbnbtestnet = 10202, arbitrumsepolia = 10231, arbitrumone = 110, + zksyncsepolia = 10248, } diff --git a/src/vip-framework/index.ts b/src/vip-framework/index.ts index 4300990aa..00e5a2b6d 100644 --- a/src/vip-framework/index.ts +++ b/src/vip-framework/index.ts @@ -135,6 +135,8 @@ export const testVip = (description: string, proposal: Proposal, options: Testin let proposalId: number; it("can be proposed", async () => { + // Temporary workaround(mining a block just after forking) till hardforking issue is solved by hardhat, https://github.com/NomicFoundation/hardhat/issues/5511 + await mine(); const { targets, signatures, values, meta } = proposal; const proposalIdBefore = await governorProxy.callStatic.proposalCount(); let tx; diff --git a/vips/vip-349/bsctestnet.ts b/vips/vip-349/bsctestnet.ts new file mode 100644 index 000000000..7de61d1fc --- /dev/null +++ b/vips/vip-349/bsctestnet.ts @@ -0,0 +1,62 @@ +import { parseUnits } from "ethers/lib/utils"; + +import { LzChainId, ProposalType } from "../../src/types"; +import { makeProposal } from "../../src/utils"; + +const XVS_BRIDGE_ADMIN = "0xB164Cb262328Ca44a806bA9e3d4094931E658513"; + +export const MIN_DST_GAS = "300000"; +export const SINGLE_SEND_LIMIT = parseUnits("10000", 18); +export const MAX_DAILY_SEND_LIMIT = parseUnits("50000", 18); +export const SINGLE_RECEIVE_LIMIT = parseUnits("10200", 18); +export const MAX_DAILY_RECEIVE_LIMIT = parseUnits("51000", 18); + +const vip349 = () => { + const meta = { + version: "v2", + title: "VIP-349 Enable BSC -> ZKSYNC bridge", + description: `#### Summary Enable BSC -> ZKSYNC bridge`, + forDescription: "I agree that Venus Protocol should proceed with this proposal", + againstDescription: "I do not think that Venus Protocol should proceed with this proposal", + abstainDescription: "I am indifferent to whether Venus Protocol proceeds or not", + }; + + return makeProposal( + [ + { + target: XVS_BRIDGE_ADMIN, + signature: "setTrustedRemoteAddress(uint16,bytes)", + params: [LzChainId.zksyncsepolia, "0x760461ccB2508CAAa2ECe0c28af3a4707b853043"], + }, + { + target: XVS_BRIDGE_ADMIN, + signature: "setMinDstGas(uint16,uint16,uint256)", + params: [LzChainId.zksyncsepolia, 0, MIN_DST_GAS], + }, + { + target: XVS_BRIDGE_ADMIN, + signature: "setMaxDailyLimit(uint16,uint256)", + params: [LzChainId.zksyncsepolia, MAX_DAILY_SEND_LIMIT], + }, + { + target: XVS_BRIDGE_ADMIN, + signature: "setMaxSingleTransactionLimit(uint16,uint256)", + params: [LzChainId.zksyncsepolia, SINGLE_SEND_LIMIT], + }, + { + target: XVS_BRIDGE_ADMIN, + signature: "setMaxDailyReceiveLimit(uint16,uint256)", + params: [LzChainId.zksyncsepolia, MAX_DAILY_RECEIVE_LIMIT], + }, + { + target: XVS_BRIDGE_ADMIN, + signature: "setMaxSingleReceiveTransactionLimit(uint16,uint256)", + params: [LzChainId.zksyncsepolia, SINGLE_RECEIVE_LIMIT], + }, + ], + meta, + ProposalType.REGULAR, + ); +}; + +export default vip349; diff --git a/yarn.lock b/yarn.lock index 7c9113b54..80e3dd3ba 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1421,6 +1421,13 @@ __metadata: languageName: node linkType: hard +"@nomicfoundation/edr-darwin-arm64@npm:0.5.2": + version: 0.5.2 + resolution: "@nomicfoundation/edr-darwin-arm64@npm:0.5.2" + checksum: f6ab386603c6e080fe7f611b739eb6d1d6a370220318b725cb582702563577150b3be14b6d0be71cb72bdb854e6992c587ecfc6833216f750eae8e7cd96de46f + languageName: node + linkType: hard + "@nomicfoundation/edr-darwin-x64@npm:0.4.2": version: 0.4.2 resolution: "@nomicfoundation/edr-darwin-x64@npm:0.4.2" @@ -1428,6 +1435,13 @@ __metadata: languageName: node linkType: hard +"@nomicfoundation/edr-darwin-x64@npm:0.5.2": + version: 0.5.2 + resolution: "@nomicfoundation/edr-darwin-x64@npm:0.5.2" + checksum: 6f91f6d0294c0450e0501983f1de34a48582fe93f48428bc4b798ac93bb5483a96d626c2b4c62ac91102f00c826a3f9bfa16d748301440ebe1bbb2920ba3ba6d + languageName: node + linkType: hard + "@nomicfoundation/edr-linux-arm64-gnu@npm:0.4.2": version: 0.4.2 resolution: "@nomicfoundation/edr-linux-arm64-gnu@npm:0.4.2" @@ -1435,6 +1449,13 @@ __metadata: languageName: node linkType: hard +"@nomicfoundation/edr-linux-arm64-gnu@npm:0.5.2": + version: 0.5.2 + resolution: "@nomicfoundation/edr-linux-arm64-gnu@npm:0.5.2" + checksum: bd84cc2741bb2be3c3a60bae9dbb8ca7794a68b8675684c97f2c6e7310e5cba7efd1cf18d392d42481cda83fb478f83c0bd605104c5cf08bab44ec07669c3010 + languageName: node + linkType: hard + "@nomicfoundation/edr-linux-arm64-musl@npm:0.4.2": version: 0.4.2 resolution: "@nomicfoundation/edr-linux-arm64-musl@npm:0.4.2" @@ -1442,6 +1463,13 @@ __metadata: languageName: node linkType: hard +"@nomicfoundation/edr-linux-arm64-musl@npm:0.5.2": + version: 0.5.2 + resolution: "@nomicfoundation/edr-linux-arm64-musl@npm:0.5.2" + checksum: e7f7d82f16be1b26805bd90964c456aecb4a6a1397e87d507810d37bd383064271fa63932564e725fdb30868925334338ec459fe32f84fc11206644b7b37825c + languageName: node + linkType: hard + "@nomicfoundation/edr-linux-x64-gnu@npm:0.4.2": version: 0.4.2 resolution: "@nomicfoundation/edr-linux-x64-gnu@npm:0.4.2" @@ -1449,6 +1477,13 @@ __metadata: languageName: node linkType: hard +"@nomicfoundation/edr-linux-x64-gnu@npm:0.5.2": + version: 0.5.2 + resolution: "@nomicfoundation/edr-linux-x64-gnu@npm:0.5.2" + checksum: ec025bf75227638b6b2cd01b7ba01b3ddaddf54c4d18d25e9d0364ac621981be2aaf124f4e60a88da5c9e267adb41a660a42668e2d6c9a6a57e55e8671fc76f1 + languageName: node + linkType: hard + "@nomicfoundation/edr-linux-x64-musl@npm:0.4.2": version: 0.4.2 resolution: "@nomicfoundation/edr-linux-x64-musl@npm:0.4.2" @@ -1456,6 +1491,13 @@ __metadata: languageName: node linkType: hard +"@nomicfoundation/edr-linux-x64-musl@npm:0.5.2": + version: 0.5.2 + resolution: "@nomicfoundation/edr-linux-x64-musl@npm:0.5.2" + checksum: c9ff47f72645492383b2a598675878abc029b86325e2c457db1b2c4281916e11e4ef6336c355d40ae3c1736595bc43da51cfcf1e923464011f526f4db64c245b + languageName: node + linkType: hard + "@nomicfoundation/edr-win32-x64-msvc@npm:0.4.2": version: 0.4.2 resolution: "@nomicfoundation/edr-win32-x64-msvc@npm:0.4.2" @@ -1463,6 +1505,13 @@ __metadata: languageName: node linkType: hard +"@nomicfoundation/edr-win32-x64-msvc@npm:0.5.2": + version: 0.5.2 + resolution: "@nomicfoundation/edr-win32-x64-msvc@npm:0.5.2" + checksum: 56da7a1283470dede413cda5f2fef96e10250ec7a25562254ca0cd8045a653212c91e40fbcf37330e7af4e036d3c3aed83ea617831f9c7a5424389c73c53ed4e + languageName: node + linkType: hard + "@nomicfoundation/edr@npm:^0.4.1": version: 0.4.2 resolution: "@nomicfoundation/edr@npm:0.4.2" @@ -1478,6 +1527,21 @@ __metadata: languageName: node linkType: hard +"@nomicfoundation/edr@npm:^0.5.0": + version: 0.5.2 + resolution: "@nomicfoundation/edr@npm:0.5.2" + dependencies: + "@nomicfoundation/edr-darwin-arm64": 0.5.2 + "@nomicfoundation/edr-darwin-x64": 0.5.2 + "@nomicfoundation/edr-linux-arm64-gnu": 0.5.2 + "@nomicfoundation/edr-linux-arm64-musl": 0.5.2 + "@nomicfoundation/edr-linux-x64-gnu": 0.5.2 + "@nomicfoundation/edr-linux-x64-musl": 0.5.2 + "@nomicfoundation/edr-win32-x64-msvc": 0.5.2 + checksum: 336b1c7cad96fa78410f0c9cc9524abe9fb1e56384fe990b98bfd17f15f25b4665ad8f0525ccd9511f7c19173841fe712d50db993078629e2fc4047fda4665dc + languageName: node + linkType: hard + "@nomicfoundation/ethereumjs-common@npm:4.0.4": version: 4.0.4 resolution: "@nomicfoundation/ethereumjs-common@npm:4.0.4" @@ -6662,7 +6726,68 @@ __metadata: languageName: node linkType: hard -"hardhat@npm:^2.12.2, hardhat@npm:^2.14.0, hardhat@npm:^2.16.1, hardhat@npm:^2.8.0": +"hardhat@npm:^2.12.2": + version: 2.22.7 + resolution: "hardhat@npm:2.22.7" + dependencies: + "@ethersproject/abi": ^5.1.2 + "@metamask/eth-sig-util": ^4.0.0 + "@nomicfoundation/edr": ^0.5.0 + "@nomicfoundation/ethereumjs-common": 4.0.4 + "@nomicfoundation/ethereumjs-tx": 5.0.4 + "@nomicfoundation/ethereumjs-util": 9.0.4 + "@nomicfoundation/solidity-analyzer": ^0.1.0 + "@sentry/node": ^5.18.1 + "@types/bn.js": ^5.1.0 + "@types/lru-cache": ^5.1.0 + adm-zip: ^0.4.16 + aggregate-error: ^3.0.0 + ansi-escapes: ^4.3.0 + boxen: ^5.1.2 + chalk: ^2.4.2 + chokidar: ^3.4.0 + ci-info: ^2.0.0 + debug: ^4.1.1 + enquirer: ^2.3.0 + env-paths: ^2.2.0 + ethereum-cryptography: ^1.0.3 + ethereumjs-abi: ^0.6.8 + find-up: ^2.1.0 + fp-ts: 1.19.3 + fs-extra: ^7.0.1 + glob: 7.2.0 + immutable: ^4.0.0-rc.12 + io-ts: 1.10.4 + keccak: ^3.0.2 + lodash: ^4.17.11 + mnemonist: ^0.38.0 + mocha: ^10.0.0 + p-map: ^4.0.0 + raw-body: ^2.4.1 + resolve: 1.17.0 + semver: ^6.3.0 + solc: 0.8.26 + source-map-support: ^0.5.13 + stacktrace-parser: ^0.1.10 + tsort: 0.0.1 + undici: ^5.14.0 + uuid: ^8.3.2 + ws: ^7.4.6 + peerDependencies: + ts-node: "*" + typescript: "*" + peerDependenciesMeta: + ts-node: + optional: true + typescript: + optional: true + bin: + hardhat: internal/cli/bootstrap.js + checksum: 3b630db8c337d47d220ab0a94a009e61da0a4bb08cc4576ae33cb50e57d9dbb577ab64a85211914fc511e59cd5fca55c986e9ee2180c2e05657c084a14128b16 + languageName: node + linkType: hard + +"hardhat@npm:^2.14.0, hardhat@npm:^2.16.1, hardhat@npm:^2.8.0": version: 2.22.6 resolution: "hardhat@npm:2.22.6" dependencies: From 2fd8c995f7662f30677908fae8798b367f99d585 Mon Sep 17 00:00:00 2001 From: GitGuru7 <128375421+GitGuru7@users.noreply.github.com> Date: Thu, 8 Aug 2024 19:38:15 +0530 Subject: [PATCH 2/9] feat: enable bridge from all remote networks to zksync sepolia --- .../arbitrumsepolia/vip-013/index.ts | 49 + .../proposals/opbnbtestnet/vip-019/index.ts | 49 + multisig/proposals/sepolia/vip-052/index.ts | 49 + .../arbitrumsepolia/vip-013/abi/xvs.json | 683 +++++++ .../vip-013/abi/xvsProxyOFTDest.json | 1729 +++++++++++++++++ .../arbitrumsepolia/vip-013/index.ts | 109 ++ .../opbnbtestnet/vip-019/abi/xvs.json | 683 +++++++ .../vip-019/abi/xvsProxyOFTDest.json | 1729 +++++++++++++++++ .../simulations/opbnbtestnet/vip-019/index.ts | 109 ++ .../simulations/sepolia/vip-052/abi/xvs.json | 683 +++++++ .../sepolia/vip-052/abi/xvsProxyOFTDest.json | 1729 +++++++++++++++++ multisig/simulations/sepolia/vip-052/index.ts | 109 ++ 12 files changed, 7710 insertions(+) create mode 100644 multisig/proposals/arbitrumsepolia/vip-013/index.ts create mode 100644 multisig/proposals/opbnbtestnet/vip-019/index.ts create mode 100644 multisig/proposals/sepolia/vip-052/index.ts create mode 100644 multisig/simulations/arbitrumsepolia/vip-013/abi/xvs.json create mode 100644 multisig/simulations/arbitrumsepolia/vip-013/abi/xvsProxyOFTDest.json create mode 100644 multisig/simulations/arbitrumsepolia/vip-013/index.ts create mode 100644 multisig/simulations/opbnbtestnet/vip-019/abi/xvs.json create mode 100644 multisig/simulations/opbnbtestnet/vip-019/abi/xvsProxyOFTDest.json create mode 100644 multisig/simulations/opbnbtestnet/vip-019/index.ts create mode 100644 multisig/simulations/sepolia/vip-052/abi/xvs.json create mode 100644 multisig/simulations/sepolia/vip-052/abi/xvsProxyOFTDest.json create mode 100644 multisig/simulations/sepolia/vip-052/index.ts diff --git a/multisig/proposals/arbitrumsepolia/vip-013/index.ts b/multisig/proposals/arbitrumsepolia/vip-013/index.ts new file mode 100644 index 000000000..248bb6c8e --- /dev/null +++ b/multisig/proposals/arbitrumsepolia/vip-013/index.ts @@ -0,0 +1,49 @@ +import { parseUnits } from "ethers/lib/utils"; +import { LzChainId } from "src/types"; +import { makeProposal } from "src/utils"; + +const XVS_BRIDGE_ADMIN = "0xc94578caCC89a29B044a0a1D54d20d48A645E5C8"; + +export const MIN_DST_GAS = "300000"; +export const SINGLE_SEND_LIMIT = parseUnits("10000", 18); +export const MAX_DAILY_SEND_LIMIT = parseUnits("50000", 18); +export const SINGLE_RECEIVE_LIMIT = parseUnits("10200", 18); +export const MAX_DAILY_RECEIVE_LIMIT = parseUnits("51000", 18); +export const ZKSYNC_SEPOLIA_TRUSTED_REMOTE = "0x760461ccb2508caaa2ece0c28af3a4707b853043"; + +const vip013 = () => { + return makeProposal([ + { + target: XVS_BRIDGE_ADMIN, + signature: "setTrustedRemoteAddress(uint16,bytes)", + params: [LzChainId.zksyncsepolia, ZKSYNC_SEPOLIA_TRUSTED_REMOTE], + }, + { + target: XVS_BRIDGE_ADMIN, + signature: "setMinDstGas(uint16,uint16,uint256)", + params: [LzChainId.zksyncsepolia, 0, MIN_DST_GAS], + }, + { + target: XVS_BRIDGE_ADMIN, + signature: "setMaxDailyLimit(uint16,uint256)", + params: [LzChainId.zksyncsepolia, MAX_DAILY_SEND_LIMIT], + }, + { + target: XVS_BRIDGE_ADMIN, + signature: "setMaxSingleTransactionLimit(uint16,uint256)", + params: [LzChainId.zksyncsepolia, SINGLE_SEND_LIMIT], + }, + { + target: XVS_BRIDGE_ADMIN, + signature: "setMaxDailyReceiveLimit(uint16,uint256)", + params: [LzChainId.zksyncsepolia, MAX_DAILY_RECEIVE_LIMIT], + }, + { + target: XVS_BRIDGE_ADMIN, + signature: "setMaxSingleReceiveTransactionLimit(uint16,uint256)", + params: [LzChainId.zksyncsepolia, SINGLE_RECEIVE_LIMIT], + }, + ]); +}; + +export default vip013; diff --git a/multisig/proposals/opbnbtestnet/vip-019/index.ts b/multisig/proposals/opbnbtestnet/vip-019/index.ts new file mode 100644 index 000000000..734208830 --- /dev/null +++ b/multisig/proposals/opbnbtestnet/vip-019/index.ts @@ -0,0 +1,49 @@ +import { parseUnits } from "ethers/lib/utils"; +import { LzChainId } from "src/types"; +import { makeProposal } from "src/utils"; + +const XVS_BRIDGE_ADMIN = "0x19252AFD0B2F539C400aEab7d460CBFbf74c17ff"; + +export const MIN_DST_GAS = "300000"; +export const SINGLE_SEND_LIMIT = parseUnits("10000", 18); +export const MAX_DAILY_SEND_LIMIT = parseUnits("50000", 18); +export const SINGLE_RECEIVE_LIMIT = parseUnits("10200", 18); +export const MAX_DAILY_RECEIVE_LIMIT = parseUnits("51000", 18); +export const ZKSYNC_SEPOLIA_TRUSTED_REMOTE = "0x760461ccb2508caaa2ece0c28af3a4707b853043"; + +const vip019 = () => { + return makeProposal([ + { + target: XVS_BRIDGE_ADMIN, + signature: "setTrustedRemoteAddress(uint16,bytes)", + params: [LzChainId.zksyncsepolia, ZKSYNC_SEPOLIA_TRUSTED_REMOTE], + }, + { + target: XVS_BRIDGE_ADMIN, + signature: "setMinDstGas(uint16,uint16,uint256)", + params: [LzChainId.zksyncsepolia, 0, MIN_DST_GAS], + }, + { + target: XVS_BRIDGE_ADMIN, + signature: "setMaxDailyLimit(uint16,uint256)", + params: [LzChainId.zksyncsepolia, MAX_DAILY_SEND_LIMIT], + }, + { + target: XVS_BRIDGE_ADMIN, + signature: "setMaxSingleTransactionLimit(uint16,uint256)", + params: [LzChainId.zksyncsepolia, SINGLE_SEND_LIMIT], + }, + { + target: XVS_BRIDGE_ADMIN, + signature: "setMaxDailyReceiveLimit(uint16,uint256)", + params: [LzChainId.zksyncsepolia, MAX_DAILY_RECEIVE_LIMIT], + }, + { + target: XVS_BRIDGE_ADMIN, + signature: "setMaxSingleReceiveTransactionLimit(uint16,uint256)", + params: [LzChainId.zksyncsepolia, SINGLE_RECEIVE_LIMIT], + }, + ]); +}; + +export default vip019; diff --git a/multisig/proposals/sepolia/vip-052/index.ts b/multisig/proposals/sepolia/vip-052/index.ts new file mode 100644 index 000000000..17c8a3176 --- /dev/null +++ b/multisig/proposals/sepolia/vip-052/index.ts @@ -0,0 +1,49 @@ +import { parseUnits } from "ethers/lib/utils"; +import { LzChainId } from "src/types"; +import { makeProposal } from "src/utils"; + +const XVS_BRIDGE_ADMIN = "0xd3c6bdeeadB2359F726aD4cF42EAa8B7102DAd9B"; + +export const MIN_DST_GAS = "300000"; +export const SINGLE_SEND_LIMIT = parseUnits("10000", 18); +export const MAX_DAILY_SEND_LIMIT = parseUnits("50000", 18); +export const SINGLE_RECEIVE_LIMIT = parseUnits("10200", 18); +export const MAX_DAILY_RECEIVE_LIMIT = parseUnits("51000", 18); +export const ZKSYNC_SEPOLIA_TRUSTED_REMOTE = "0x760461ccb2508caaa2ece0c28af3a4707b853043"; + +const vip019 = () => { + return makeProposal([ + { + target: XVS_BRIDGE_ADMIN, + signature: "setTrustedRemoteAddress(uint16,bytes)", + params: [LzChainId.zksyncsepolia, ZKSYNC_SEPOLIA_TRUSTED_REMOTE], + }, + { + target: XVS_BRIDGE_ADMIN, + signature: "setMinDstGas(uint16,uint16,uint256)", + params: [LzChainId.zksyncsepolia, 0, MIN_DST_GAS], + }, + { + target: XVS_BRIDGE_ADMIN, + signature: "setMaxDailyLimit(uint16,uint256)", + params: [LzChainId.zksyncsepolia, MAX_DAILY_SEND_LIMIT], + }, + { + target: XVS_BRIDGE_ADMIN, + signature: "setMaxSingleTransactionLimit(uint16,uint256)", + params: [LzChainId.zksyncsepolia, SINGLE_SEND_LIMIT], + }, + { + target: XVS_BRIDGE_ADMIN, + signature: "setMaxDailyReceiveLimit(uint16,uint256)", + params: [LzChainId.zksyncsepolia, MAX_DAILY_RECEIVE_LIMIT], + }, + { + target: XVS_BRIDGE_ADMIN, + signature: "setMaxSingleReceiveTransactionLimit(uint16,uint256)", + params: [LzChainId.zksyncsepolia, SINGLE_RECEIVE_LIMIT], + }, + ]); +}; + +export default vip019; diff --git a/multisig/simulations/arbitrumsepolia/vip-013/abi/xvs.json b/multisig/simulations/arbitrumsepolia/vip-013/abi/xvs.json new file mode 100644 index 000000000..8a2713887 --- /dev/null +++ b/multisig/simulations/arbitrumsepolia/vip-013/abi/xvs.json @@ -0,0 +1,683 @@ +[ + { + "inputs": [ + { + "internalType": "address", + "name": "accessControlManager_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "MintLimitExceed", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + } + ], + "name": "MintNotAllowed", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddressNotAllowed", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "value", + "type": "bool" + } + ], + "name": "BlacklistUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "minter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "MintCapChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "minter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newLimit", + "type": "uint256" + } + ], + "name": "MintLimitDecreased", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "minter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newLimit", + "type": "uint256" + } + ], + "name": "MintLimitIncreased", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldAccessControlManager", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newAccessControlManager", + "type": "address" + } + ], + "name": "NewAccessControlManager", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "_blacklist", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "accessControlManager", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount_", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user_", + "type": "address" + } + ], + "name": "isBlackListed", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount_", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "minterToCap", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "minterToMintedAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newAccessControlAddress_", + "type": "address" + } + ], + "name": "setAccessControlManager", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "minter_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount_", + "type": "uint256" + } + ], + "name": "setMintCap", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user_", + "type": "address" + }, + { + "internalType": "bool", + "name": "value_", + "type": "bool" + } + ], + "name": "updateBlacklist", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/multisig/simulations/arbitrumsepolia/vip-013/abi/xvsProxyOFTDest.json b/multisig/simulations/arbitrumsepolia/vip-013/abi/xvsProxyOFTDest.json new file mode 100644 index 000000000..5917469fd --- /dev/null +++ b/multisig/simulations/arbitrumsepolia/vip-013/abi/xvsProxyOFTDest.json @@ -0,0 +1,1729 @@ +[ + { + "inputs": [ + { + "internalType": "address", + "name": "tokenAddress_", + "type": "address" + }, + { + "internalType": "uint8", + "name": "sharedDecimals_", + "type": "uint8" + }, + { + "internalType": "address", + "name": "lzEndpoint_", + "type": "address" + }, + { + "internalType": "address", + "name": "oracle_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "ZeroAddressNotAllowed", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "_nonce", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "_hash", + "type": "bytes32" + } + ], + "name": "CallOFTReceivedSuccess", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "srcChainId", + "type": "uint16" + }, + { + "indexed": true, + "internalType": "bytes", + "name": "srcAddress", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "nonce", + "type": "uint64" + } + ], + "name": "DropFailedMessage", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "innerToken", + "type": "address" + } + ], + "name": "InnerTokenAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "_nonce", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_payload", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_reason", + "type": "bytes" + } + ], + "name": "MessageFailed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "_address", + "type": "address" + } + ], + "name": "NonContractAddress", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldOracle", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOracle", + "type": "address" + } + ], + "name": "OracleChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "indexed": true, + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "ReceiveFromChain", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "_nonce", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "_payloadHash", + "type": "bytes32" + } + ], + "name": "RetryMessageSuccess", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "indexed": true, + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "_toAddress", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "SendToChain", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "chainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oldMaxLimit", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newMaxLimit", + "type": "uint256" + } + ], + "name": "SetMaxDailyLimit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "chainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oldMaxLimit", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newMaxLimit", + "type": "uint256" + } + ], + "name": "SetMaxDailyReceiveLimit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "chainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oldMaxLimit", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newMaxLimit", + "type": "uint256" + } + ], + "name": "SetMaxSingleReceiveTransactionLimit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "chainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oldMaxLimit", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newMaxLimit", + "type": "uint256" + } + ], + "name": "SetMaxSingleTransactionLimit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "uint16", + "name": "_type", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_minDstGas", + "type": "uint256" + } + ], + "name": "SetMinDstGas", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "precrime", + "type": "address" + } + ], + "name": "SetPrecrime", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "_remoteChainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_path", + "type": "bytes" + } + ], + "name": "SetTrustedRemote", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "_remoteChainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_remoteAddress", + "type": "bytes" + } + ], + "name": "SetTrustedRemoteAddress", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "addr", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "isWhitelist", + "type": "bool" + } + ], + "name": "SetWhitelist", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "chainId", + "type": "uint16" + } + ], + "name": "TrustedRemoteRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "inputs": [], + "name": "DEFAULT_PAYLOAD_SIZE_LIMIT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "NO_EXTRA_GAS", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PT_SEND", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PT_SEND_AND_CALL", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "_nonce", + "type": "uint64" + }, + { + "internalType": "bytes32", + "name": "_from", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "_payload", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "_gasForCall", + "type": "uint256" + } + ], + "name": "callOnOFTReceived", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "chainIdToLast24HourReceiveWindowStart", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "chainIdToLast24HourReceived", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "chainIdToLast24HourTransferred", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "chainIdToLast24HourWindowStart", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "chainIdToMaxDailyLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "chainIdToMaxDailyReceiveLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "chainIdToMaxSingleReceiveTransactionLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "chainIdToMaxSingleTransactionLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "circulatingSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "name": "creditedPackets", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "srcChainId_", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "srcAddress_", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "nonce_", + "type": "uint64" + } + ], + "name": "dropFailedMessage", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "internalType": "bytes32", + "name": "_toAddress", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "_payload", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "_dstGasForCall", + "type": "uint64" + }, + { + "internalType": "bool", + "name": "_useZro", + "type": "bool" + }, + { + "internalType": "bytes", + "name": "_adapterParams", + "type": "bytes" + } + ], + "name": "estimateSendAndCallFee", + "outputs": [ + { + "internalType": "uint256", + "name": "nativeFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "zroFee", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "internalType": "bytes32", + "name": "_toAddress", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "_useZro", + "type": "bool" + }, + { + "internalType": "bytes", + "name": "_adapterParams", + "type": "bytes" + } + ], + "name": "estimateSendFee", + "outputs": [ + { + "internalType": "uint256", + "name": "nativeFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "zroFee", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "name": "failedMessages", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + } + ], + "name": "forceResumeReceive", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_version", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "_chainId", + "type": "uint16" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_configType", + "type": "uint256" + } + ], + "name": "getConfig", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_remoteChainId", + "type": "uint16" + } + ], + "name": "getTrustedRemoteAddress", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + } + ], + "name": "isTrustedRemote", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "lzEndpoint", + "outputs": [ + { + "internalType": "contract ILayerZeroEndpoint", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "_nonce", + "type": "uint64" + }, + { + "internalType": "bytes", + "name": "_payload", + "type": "bytes" + } + ], + "name": "lzReceive", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "minDstGasLookup", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "_nonce", + "type": "uint64" + }, + { + "internalType": "bytes", + "name": "_payload", + "type": "bytes" + } + ], + "name": "nonblockingLzReceive", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "oracle", + "outputs": [ + { + "internalType": "contract ResilientOracleInterface", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "payloadSizeLimitLookup", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "precrime", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "remoteChainId_", + "type": "uint16" + } + ], + "name": "removeTrustedRemote", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "_nonce", + "type": "uint64" + }, + { + "internalType": "bytes", + "name": "_payload", + "type": "bytes" + } + ], + "name": "retryMessage", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "internalType": "bytes32", + "name": "_toAddress", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "_payload", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "_dstGasForCall", + "type": "uint64" + }, + { + "components": [ + { + "internalType": "address payable", + "name": "refundAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "zroPaymentAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "adapterParams", + "type": "bytes" + } + ], + "internalType": "struct ICommonOFT.LzCallParams", + "name": "_callParams", + "type": "tuple" + } + ], + "name": "sendAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "internalType": "bytes32", + "name": "_toAddress", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address payable", + "name": "refundAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "zroPaymentAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "adapterParams", + "type": "bytes" + } + ], + "internalType": "struct ICommonOFT.LzCallParams", + "name": "_callParams", + "type": "tuple" + } + ], + "name": "sendFrom", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_version", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "_chainId", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "_configType", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "_config", + "type": "bytes" + } + ], + "name": "setConfig", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "chainId_", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "limit_", + "type": "uint256" + } + ], + "name": "setMaxDailyLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "chainId_", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "limit_", + "type": "uint256" + } + ], + "name": "setMaxDailyReceiveLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "chainId_", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "limit_", + "type": "uint256" + } + ], + "name": "setMaxSingleReceiveTransactionLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "chainId_", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "limit_", + "type": "uint256" + } + ], + "name": "setMaxSingleTransactionLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "_packetType", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "_minGas", + "type": "uint256" + } + ], + "name": "setMinDstGas", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "oracleAddress_", + "type": "address" + } + ], + "name": "setOracle", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "_size", + "type": "uint256" + } + ], + "name": "setPayloadSizeLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_precrime", + "type": "address" + } + ], + "name": "setPrecrime", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_version", + "type": "uint16" + } + ], + "name": "setReceiveVersion", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_version", + "type": "uint16" + } + ], + "name": "setSendVersion", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_remoteChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_path", + "type": "bytes" + } + ], + "name": "setTrustedRemote", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_remoteChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_remoteAddress", + "type": "bytes" + } + ], + "name": "setTrustedRemoteAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user_", + "type": "address" + }, + { + "internalType": "bool", + "name": "val_", + "type": "bool" + } + ], + "name": "setWhitelist", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "sharedDecimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "token", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "trustedRemoteLookup", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "whitelist", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } +] diff --git a/multisig/simulations/arbitrumsepolia/vip-013/index.ts b/multisig/simulations/arbitrumsepolia/vip-013/index.ts new file mode 100644 index 000000000..4d59d1e2c --- /dev/null +++ b/multisig/simulations/arbitrumsepolia/vip-013/index.ts @@ -0,0 +1,109 @@ +import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; +import { expect } from "chai"; +import { Contract } from "ethers"; +import { parseUnits } from "ethers/lib/utils"; +import { ethers } from "hardhat"; +import { LzChainId } from "src/types"; +import { initMainnetUser } from "src/utils"; +import { forking, pretendExecutingVip } from "src/vip-framework"; + +import vip013, { + MAX_DAILY_RECEIVE_LIMIT, + MAX_DAILY_SEND_LIMIT, + SINGLE_RECEIVE_LIMIT, + SINGLE_SEND_LIMIT, + ZKSYNC_SEPOLIA_TRUSTED_REMOTE, +} from "../../../proposals/arbitrumsepolia/vip-013"; +import XVS_ABI from "./abi/xvs.json"; +import XVS_BRIDGE_ABI from "./abi/xvsProxyOFTDest.json"; + +const XVS = "0x877Dc896e7b13096D3827872e396927BbE704407"; +const XVS_BRIDGE = "0xFdC5cEC63FD167DA46cF006585b30D03B104eFD4"; +const XVS_HOLDER = "0xFd7dA20ea0bE63ACb0852f97E950376E7E4a817D"; + +forking(69696597, async () => { + let xvs: Contract; + let xvsBridge: Contract; + let xvsHolderSigner: SignerWithAddress; + let receiver: SignerWithAddress; + let receiverAddressBytes32: string; + let defaultAdapterParams: string; + + before(async () => { + xvs = await ethers.getContractAt(XVS_ABI, XVS); + xvsBridge = await ethers.getContractAt(XVS_BRIDGE_ABI, XVS_BRIDGE); + xvsHolderSigner = await initMainnetUser(XVS_HOLDER, ethers.utils.parseEther("5")); + [receiver] = await ethers.getSigners(); + receiverAddressBytes32 = ethers.utils.defaultAbiCoder.encode(["address"], [receiver.address]); + defaultAdapterParams = ethers.utils.solidityPack(["uint16", "uint256"], [1, 300000]); + }); + + describe("Post-Execution state", () => { + before(async () => { + await pretendExecutingVip(await vip013()); + }); + + it("Should match trusted remote address", async () => { + const trustedRemote = await xvsBridge.getTrustedRemoteAddress(LzChainId.zksyncsepolia); + expect(trustedRemote).equals(ZKSYNC_SEPOLIA_TRUSTED_REMOTE); + }); + + it("Should match single send transaction limit", async () => { + expect(await xvsBridge.chainIdToMaxSingleTransactionLimit(LzChainId.zksyncsepolia)).to.equal(SINGLE_SEND_LIMIT); + }); + + it("Should match single receive transaction limit", async () => { + expect(await xvsBridge.chainIdToMaxSingleReceiveTransactionLimit(LzChainId.zksyncsepolia)).to.equal( + SINGLE_RECEIVE_LIMIT, + ); + }); + + it("Should match max daily send limit", async () => { + expect(await xvsBridge.chainIdToMaxDailyLimit(LzChainId.zksyncsepolia)).to.equal(MAX_DAILY_SEND_LIMIT); + }); + + it("Should match max daily receive limit", async () => { + expect(await xvsBridge.chainIdToMaxDailyReceiveLimit(LzChainId.zksyncsepolia)).to.equal(MAX_DAILY_RECEIVE_LIMIT); + }); + + it("Should emit an event on successful bridging of XVS (Arbitrum sepolia -> Zksync Sepolia)", async () => { + const amount = parseUnits("1", 18); + const nativeFee = ( + await xvsBridge.estimateSendFee( + LzChainId.zksyncsepolia, + receiverAddressBytes32, + amount, + false, + defaultAdapterParams, + ) + ).nativeFee; + + const circulatingSupplyBefore = await xvsBridge.circulatingSupply(); + const totalSupplyBefore = await xvs.totalSupply(); + const minterToMintedAmountBefore = await xvs.minterToMintedAmount(XVS_BRIDGE); + + await expect( + xvsBridge + .connect(xvsHolderSigner) + .sendFrom( + xvsHolderSigner.address, + LzChainId.zksyncsepolia, + receiverAddressBytes32, + amount, + [xvsHolderSigner.address, ethers.constants.AddressZero, defaultAdapterParams], + { value: nativeFee }, + ), + ) + .to.be.emit(xvsBridge, "SendToChain") + .withArgs(LzChainId.zksyncsepolia, XVS_HOLDER, receiverAddressBytes32, amount); + + const circulatingSupplyAfter = await xvsBridge.circulatingSupply(); + const totalSupplyAfter = await xvs.totalSupply(); + const minterToMintedAmountAfter = await xvs.minterToMintedAmount(XVS_BRIDGE); + + expect(circulatingSupplyBefore).equals(circulatingSupplyAfter.add(amount)); + expect(totalSupplyBefore).equals(totalSupplyAfter.add(amount)); + expect(minterToMintedAmountBefore).equals(minterToMintedAmountAfter.add(amount)); + }); + }); +}); diff --git a/multisig/simulations/opbnbtestnet/vip-019/abi/xvs.json b/multisig/simulations/opbnbtestnet/vip-019/abi/xvs.json new file mode 100644 index 000000000..8a2713887 --- /dev/null +++ b/multisig/simulations/opbnbtestnet/vip-019/abi/xvs.json @@ -0,0 +1,683 @@ +[ + { + "inputs": [ + { + "internalType": "address", + "name": "accessControlManager_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "MintLimitExceed", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + } + ], + "name": "MintNotAllowed", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddressNotAllowed", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "value", + "type": "bool" + } + ], + "name": "BlacklistUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "minter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "MintCapChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "minter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newLimit", + "type": "uint256" + } + ], + "name": "MintLimitDecreased", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "minter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newLimit", + "type": "uint256" + } + ], + "name": "MintLimitIncreased", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldAccessControlManager", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newAccessControlManager", + "type": "address" + } + ], + "name": "NewAccessControlManager", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "_blacklist", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "accessControlManager", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount_", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user_", + "type": "address" + } + ], + "name": "isBlackListed", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount_", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "minterToCap", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "minterToMintedAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newAccessControlAddress_", + "type": "address" + } + ], + "name": "setAccessControlManager", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "minter_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount_", + "type": "uint256" + } + ], + "name": "setMintCap", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user_", + "type": "address" + }, + { + "internalType": "bool", + "name": "value_", + "type": "bool" + } + ], + "name": "updateBlacklist", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/multisig/simulations/opbnbtestnet/vip-019/abi/xvsProxyOFTDest.json b/multisig/simulations/opbnbtestnet/vip-019/abi/xvsProxyOFTDest.json new file mode 100644 index 000000000..5917469fd --- /dev/null +++ b/multisig/simulations/opbnbtestnet/vip-019/abi/xvsProxyOFTDest.json @@ -0,0 +1,1729 @@ +[ + { + "inputs": [ + { + "internalType": "address", + "name": "tokenAddress_", + "type": "address" + }, + { + "internalType": "uint8", + "name": "sharedDecimals_", + "type": "uint8" + }, + { + "internalType": "address", + "name": "lzEndpoint_", + "type": "address" + }, + { + "internalType": "address", + "name": "oracle_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "ZeroAddressNotAllowed", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "_nonce", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "_hash", + "type": "bytes32" + } + ], + "name": "CallOFTReceivedSuccess", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "srcChainId", + "type": "uint16" + }, + { + "indexed": true, + "internalType": "bytes", + "name": "srcAddress", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "nonce", + "type": "uint64" + } + ], + "name": "DropFailedMessage", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "innerToken", + "type": "address" + } + ], + "name": "InnerTokenAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "_nonce", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_payload", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_reason", + "type": "bytes" + } + ], + "name": "MessageFailed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "_address", + "type": "address" + } + ], + "name": "NonContractAddress", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldOracle", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOracle", + "type": "address" + } + ], + "name": "OracleChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "indexed": true, + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "ReceiveFromChain", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "_nonce", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "_payloadHash", + "type": "bytes32" + } + ], + "name": "RetryMessageSuccess", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "indexed": true, + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "_toAddress", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "SendToChain", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "chainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oldMaxLimit", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newMaxLimit", + "type": "uint256" + } + ], + "name": "SetMaxDailyLimit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "chainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oldMaxLimit", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newMaxLimit", + "type": "uint256" + } + ], + "name": "SetMaxDailyReceiveLimit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "chainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oldMaxLimit", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newMaxLimit", + "type": "uint256" + } + ], + "name": "SetMaxSingleReceiveTransactionLimit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "chainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oldMaxLimit", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newMaxLimit", + "type": "uint256" + } + ], + "name": "SetMaxSingleTransactionLimit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "uint16", + "name": "_type", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_minDstGas", + "type": "uint256" + } + ], + "name": "SetMinDstGas", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "precrime", + "type": "address" + } + ], + "name": "SetPrecrime", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "_remoteChainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_path", + "type": "bytes" + } + ], + "name": "SetTrustedRemote", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "_remoteChainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_remoteAddress", + "type": "bytes" + } + ], + "name": "SetTrustedRemoteAddress", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "addr", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "isWhitelist", + "type": "bool" + } + ], + "name": "SetWhitelist", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "chainId", + "type": "uint16" + } + ], + "name": "TrustedRemoteRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "inputs": [], + "name": "DEFAULT_PAYLOAD_SIZE_LIMIT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "NO_EXTRA_GAS", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PT_SEND", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PT_SEND_AND_CALL", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "_nonce", + "type": "uint64" + }, + { + "internalType": "bytes32", + "name": "_from", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "_payload", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "_gasForCall", + "type": "uint256" + } + ], + "name": "callOnOFTReceived", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "chainIdToLast24HourReceiveWindowStart", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "chainIdToLast24HourReceived", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "chainIdToLast24HourTransferred", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "chainIdToLast24HourWindowStart", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "chainIdToMaxDailyLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "chainIdToMaxDailyReceiveLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "chainIdToMaxSingleReceiveTransactionLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "chainIdToMaxSingleTransactionLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "circulatingSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "name": "creditedPackets", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "srcChainId_", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "srcAddress_", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "nonce_", + "type": "uint64" + } + ], + "name": "dropFailedMessage", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "internalType": "bytes32", + "name": "_toAddress", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "_payload", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "_dstGasForCall", + "type": "uint64" + }, + { + "internalType": "bool", + "name": "_useZro", + "type": "bool" + }, + { + "internalType": "bytes", + "name": "_adapterParams", + "type": "bytes" + } + ], + "name": "estimateSendAndCallFee", + "outputs": [ + { + "internalType": "uint256", + "name": "nativeFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "zroFee", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "internalType": "bytes32", + "name": "_toAddress", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "_useZro", + "type": "bool" + }, + { + "internalType": "bytes", + "name": "_adapterParams", + "type": "bytes" + } + ], + "name": "estimateSendFee", + "outputs": [ + { + "internalType": "uint256", + "name": "nativeFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "zroFee", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "name": "failedMessages", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + } + ], + "name": "forceResumeReceive", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_version", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "_chainId", + "type": "uint16" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_configType", + "type": "uint256" + } + ], + "name": "getConfig", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_remoteChainId", + "type": "uint16" + } + ], + "name": "getTrustedRemoteAddress", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + } + ], + "name": "isTrustedRemote", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "lzEndpoint", + "outputs": [ + { + "internalType": "contract ILayerZeroEndpoint", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "_nonce", + "type": "uint64" + }, + { + "internalType": "bytes", + "name": "_payload", + "type": "bytes" + } + ], + "name": "lzReceive", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "minDstGasLookup", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "_nonce", + "type": "uint64" + }, + { + "internalType": "bytes", + "name": "_payload", + "type": "bytes" + } + ], + "name": "nonblockingLzReceive", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "oracle", + "outputs": [ + { + "internalType": "contract ResilientOracleInterface", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "payloadSizeLimitLookup", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "precrime", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "remoteChainId_", + "type": "uint16" + } + ], + "name": "removeTrustedRemote", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "_nonce", + "type": "uint64" + }, + { + "internalType": "bytes", + "name": "_payload", + "type": "bytes" + } + ], + "name": "retryMessage", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "internalType": "bytes32", + "name": "_toAddress", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "_payload", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "_dstGasForCall", + "type": "uint64" + }, + { + "components": [ + { + "internalType": "address payable", + "name": "refundAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "zroPaymentAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "adapterParams", + "type": "bytes" + } + ], + "internalType": "struct ICommonOFT.LzCallParams", + "name": "_callParams", + "type": "tuple" + } + ], + "name": "sendAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "internalType": "bytes32", + "name": "_toAddress", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address payable", + "name": "refundAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "zroPaymentAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "adapterParams", + "type": "bytes" + } + ], + "internalType": "struct ICommonOFT.LzCallParams", + "name": "_callParams", + "type": "tuple" + } + ], + "name": "sendFrom", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_version", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "_chainId", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "_configType", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "_config", + "type": "bytes" + } + ], + "name": "setConfig", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "chainId_", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "limit_", + "type": "uint256" + } + ], + "name": "setMaxDailyLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "chainId_", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "limit_", + "type": "uint256" + } + ], + "name": "setMaxDailyReceiveLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "chainId_", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "limit_", + "type": "uint256" + } + ], + "name": "setMaxSingleReceiveTransactionLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "chainId_", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "limit_", + "type": "uint256" + } + ], + "name": "setMaxSingleTransactionLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "_packetType", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "_minGas", + "type": "uint256" + } + ], + "name": "setMinDstGas", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "oracleAddress_", + "type": "address" + } + ], + "name": "setOracle", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "_size", + "type": "uint256" + } + ], + "name": "setPayloadSizeLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_precrime", + "type": "address" + } + ], + "name": "setPrecrime", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_version", + "type": "uint16" + } + ], + "name": "setReceiveVersion", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_version", + "type": "uint16" + } + ], + "name": "setSendVersion", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_remoteChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_path", + "type": "bytes" + } + ], + "name": "setTrustedRemote", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_remoteChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_remoteAddress", + "type": "bytes" + } + ], + "name": "setTrustedRemoteAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user_", + "type": "address" + }, + { + "internalType": "bool", + "name": "val_", + "type": "bool" + } + ], + "name": "setWhitelist", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "sharedDecimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "token", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "trustedRemoteLookup", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "whitelist", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } +] diff --git a/multisig/simulations/opbnbtestnet/vip-019/index.ts b/multisig/simulations/opbnbtestnet/vip-019/index.ts new file mode 100644 index 000000000..d35d40b76 --- /dev/null +++ b/multisig/simulations/opbnbtestnet/vip-019/index.ts @@ -0,0 +1,109 @@ +import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; +import { expect } from "chai"; +import { Contract } from "ethers"; +import { parseUnits } from "ethers/lib/utils"; +import { ethers } from "hardhat"; +import { LzChainId } from "src/types"; +import { initMainnetUser } from "src/utils"; +import { forking, pretendExecutingVip } from "src/vip-framework"; + +import vip019, { + MAX_DAILY_RECEIVE_LIMIT, + MAX_DAILY_SEND_LIMIT, + SINGLE_RECEIVE_LIMIT, + SINGLE_SEND_LIMIT, + ZKSYNC_SEPOLIA_TRUSTED_REMOTE, +} from "../../../proposals/opbnbtestnet/vip-019"; +import XVS_ABI from "./abi/xvs.json"; +import XVS_BRIDGE_ABI from "./abi/xvsProxyOFTDest.json"; + +const XVS = "0xc2931B1fEa69b6D6dA65a50363A8D75d285e4da9"; +const XVS_BRIDGE = "0xA03205bC635A772E533E7BE36b5701E331a70ea3"; +const XVS_HOLDER = "0xFd7dA20ea0bE63ACb0852f97E950376E7E4a817D"; + +forking(36246118, async () => { + let xvs: Contract; + let xvsBridge: Contract; + let xvsHolderSigner: SignerWithAddress; + let receiver: SignerWithAddress; + let receiverAddressBytes32: string; + let defaultAdapterParams: string; + + before(async () => { + xvs = await ethers.getContractAt(XVS_ABI, XVS); + xvsBridge = await ethers.getContractAt(XVS_BRIDGE_ABI, XVS_BRIDGE); + xvsHolderSigner = await initMainnetUser(XVS_HOLDER, ethers.utils.parseEther("5")); + [receiver] = await ethers.getSigners(); + receiverAddressBytes32 = ethers.utils.defaultAbiCoder.encode(["address"], [receiver.address]); + defaultAdapterParams = ethers.utils.solidityPack(["uint16", "uint256"], [1, 300000]); + }); + + describe("Post-Execution state", () => { + before(async () => { + await pretendExecutingVip(await vip019()); + }); + + it("Should match trusted remote address", async () => { + const trustedRemote = await xvsBridge.getTrustedRemoteAddress(LzChainId.zksyncsepolia); + expect(trustedRemote).equals(ZKSYNC_SEPOLIA_TRUSTED_REMOTE); + }); + + it("Should match single send transaction limit", async () => { + expect(await xvsBridge.chainIdToMaxSingleTransactionLimit(LzChainId.zksyncsepolia)).to.equal(SINGLE_SEND_LIMIT); + }); + + it("Should match single receive transaction limit", async () => { + expect(await xvsBridge.chainIdToMaxSingleReceiveTransactionLimit(LzChainId.zksyncsepolia)).to.equal( + SINGLE_RECEIVE_LIMIT, + ); + }); + + it("Should match max daily send limit", async () => { + expect(await xvsBridge.chainIdToMaxDailyLimit(LzChainId.zksyncsepolia)).to.equal(MAX_DAILY_SEND_LIMIT); + }); + + it("Should match max daily receive limit", async () => { + expect(await xvsBridge.chainIdToMaxDailyReceiveLimit(LzChainId.zksyncsepolia)).to.equal(MAX_DAILY_RECEIVE_LIMIT); + }); + + it("Should emit an event on successful bridging of XVS (Opbnb testnet -> Zksync Sepolia)", async () => { + const amount = parseUnits("1", 18); + const nativeFee = ( + await xvsBridge.estimateSendFee( + LzChainId.zksyncsepolia, + receiverAddressBytes32, + amount, + false, + defaultAdapterParams, + ) + ).nativeFee; + + const circulatingSupplyBefore = await xvsBridge.circulatingSupply(); + const totalSupplyBefore = await xvs.totalSupply(); + const minterToMintedAmountBefore = await xvs.minterToMintedAmount(XVS_BRIDGE); + + await expect( + xvsBridge + .connect(xvsHolderSigner) + .sendFrom( + xvsHolderSigner.address, + LzChainId.zksyncsepolia, + receiverAddressBytes32, + amount, + [xvsHolderSigner.address, ethers.constants.AddressZero, defaultAdapterParams], + { value: nativeFee }, + ), + ) + .to.be.emit(xvsBridge, "SendToChain") + .withArgs(LzChainId.zksyncsepolia, XVS_HOLDER, receiverAddressBytes32, amount); + + const circulatingSupplyAfter = await xvsBridge.circulatingSupply(); + const totalSupplyAfter = await xvs.totalSupply(); + const minterToMintedAmountAfter = await xvs.minterToMintedAmount(XVS_BRIDGE); + + expect(circulatingSupplyBefore).equals(circulatingSupplyAfter.add(amount)); + expect(totalSupplyBefore).equals(totalSupplyAfter.add(amount)); + expect(minterToMintedAmountBefore).equals(minterToMintedAmountAfter.add(amount)); + }); + }); +}); diff --git a/multisig/simulations/sepolia/vip-052/abi/xvs.json b/multisig/simulations/sepolia/vip-052/abi/xvs.json new file mode 100644 index 000000000..8a2713887 --- /dev/null +++ b/multisig/simulations/sepolia/vip-052/abi/xvs.json @@ -0,0 +1,683 @@ +[ + { + "inputs": [ + { + "internalType": "address", + "name": "accessControlManager_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "MintLimitExceed", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + } + ], + "name": "MintNotAllowed", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddressNotAllowed", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "value", + "type": "bool" + } + ], + "name": "BlacklistUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "minter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "MintCapChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "minter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newLimit", + "type": "uint256" + } + ], + "name": "MintLimitDecreased", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "minter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newLimit", + "type": "uint256" + } + ], + "name": "MintLimitIncreased", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldAccessControlManager", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newAccessControlManager", + "type": "address" + } + ], + "name": "NewAccessControlManager", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "_blacklist", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "accessControlManager", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount_", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user_", + "type": "address" + } + ], + "name": "isBlackListed", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount_", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "minterToCap", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "minterToMintedAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newAccessControlAddress_", + "type": "address" + } + ], + "name": "setAccessControlManager", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "minter_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount_", + "type": "uint256" + } + ], + "name": "setMintCap", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user_", + "type": "address" + }, + { + "internalType": "bool", + "name": "value_", + "type": "bool" + } + ], + "name": "updateBlacklist", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/multisig/simulations/sepolia/vip-052/abi/xvsProxyOFTDest.json b/multisig/simulations/sepolia/vip-052/abi/xvsProxyOFTDest.json new file mode 100644 index 000000000..5917469fd --- /dev/null +++ b/multisig/simulations/sepolia/vip-052/abi/xvsProxyOFTDest.json @@ -0,0 +1,1729 @@ +[ + { + "inputs": [ + { + "internalType": "address", + "name": "tokenAddress_", + "type": "address" + }, + { + "internalType": "uint8", + "name": "sharedDecimals_", + "type": "uint8" + }, + { + "internalType": "address", + "name": "lzEndpoint_", + "type": "address" + }, + { + "internalType": "address", + "name": "oracle_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "ZeroAddressNotAllowed", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "_nonce", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "_hash", + "type": "bytes32" + } + ], + "name": "CallOFTReceivedSuccess", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "srcChainId", + "type": "uint16" + }, + { + "indexed": true, + "internalType": "bytes", + "name": "srcAddress", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "nonce", + "type": "uint64" + } + ], + "name": "DropFailedMessage", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "innerToken", + "type": "address" + } + ], + "name": "InnerTokenAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "_nonce", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_payload", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_reason", + "type": "bytes" + } + ], + "name": "MessageFailed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "_address", + "type": "address" + } + ], + "name": "NonContractAddress", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldOracle", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOracle", + "type": "address" + } + ], + "name": "OracleChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "indexed": true, + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "ReceiveFromChain", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "_nonce", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "_payloadHash", + "type": "bytes32" + } + ], + "name": "RetryMessageSuccess", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "indexed": true, + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "_toAddress", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "SendToChain", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "chainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oldMaxLimit", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newMaxLimit", + "type": "uint256" + } + ], + "name": "SetMaxDailyLimit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "chainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oldMaxLimit", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newMaxLimit", + "type": "uint256" + } + ], + "name": "SetMaxDailyReceiveLimit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "chainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oldMaxLimit", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newMaxLimit", + "type": "uint256" + } + ], + "name": "SetMaxSingleReceiveTransactionLimit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "chainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oldMaxLimit", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newMaxLimit", + "type": "uint256" + } + ], + "name": "SetMaxSingleTransactionLimit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "uint16", + "name": "_type", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_minDstGas", + "type": "uint256" + } + ], + "name": "SetMinDstGas", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "precrime", + "type": "address" + } + ], + "name": "SetPrecrime", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "_remoteChainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_path", + "type": "bytes" + } + ], + "name": "SetTrustedRemote", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "_remoteChainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_remoteAddress", + "type": "bytes" + } + ], + "name": "SetTrustedRemoteAddress", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "addr", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "isWhitelist", + "type": "bool" + } + ], + "name": "SetWhitelist", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "chainId", + "type": "uint16" + } + ], + "name": "TrustedRemoteRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "inputs": [], + "name": "DEFAULT_PAYLOAD_SIZE_LIMIT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "NO_EXTRA_GAS", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PT_SEND", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PT_SEND_AND_CALL", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "_nonce", + "type": "uint64" + }, + { + "internalType": "bytes32", + "name": "_from", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "_payload", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "_gasForCall", + "type": "uint256" + } + ], + "name": "callOnOFTReceived", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "chainIdToLast24HourReceiveWindowStart", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "chainIdToLast24HourReceived", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "chainIdToLast24HourTransferred", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "chainIdToLast24HourWindowStart", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "chainIdToMaxDailyLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "chainIdToMaxDailyReceiveLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "chainIdToMaxSingleReceiveTransactionLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "chainIdToMaxSingleTransactionLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "circulatingSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "name": "creditedPackets", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "srcChainId_", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "srcAddress_", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "nonce_", + "type": "uint64" + } + ], + "name": "dropFailedMessage", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "internalType": "bytes32", + "name": "_toAddress", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "_payload", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "_dstGasForCall", + "type": "uint64" + }, + { + "internalType": "bool", + "name": "_useZro", + "type": "bool" + }, + { + "internalType": "bytes", + "name": "_adapterParams", + "type": "bytes" + } + ], + "name": "estimateSendAndCallFee", + "outputs": [ + { + "internalType": "uint256", + "name": "nativeFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "zroFee", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "internalType": "bytes32", + "name": "_toAddress", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "_useZro", + "type": "bool" + }, + { + "internalType": "bytes", + "name": "_adapterParams", + "type": "bytes" + } + ], + "name": "estimateSendFee", + "outputs": [ + { + "internalType": "uint256", + "name": "nativeFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "zroFee", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "name": "failedMessages", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + } + ], + "name": "forceResumeReceive", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_version", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "_chainId", + "type": "uint16" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_configType", + "type": "uint256" + } + ], + "name": "getConfig", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_remoteChainId", + "type": "uint16" + } + ], + "name": "getTrustedRemoteAddress", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + } + ], + "name": "isTrustedRemote", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "lzEndpoint", + "outputs": [ + { + "internalType": "contract ILayerZeroEndpoint", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "_nonce", + "type": "uint64" + }, + { + "internalType": "bytes", + "name": "_payload", + "type": "bytes" + } + ], + "name": "lzReceive", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "minDstGasLookup", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "_nonce", + "type": "uint64" + }, + { + "internalType": "bytes", + "name": "_payload", + "type": "bytes" + } + ], + "name": "nonblockingLzReceive", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "oracle", + "outputs": [ + { + "internalType": "contract ResilientOracleInterface", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "payloadSizeLimitLookup", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "precrime", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "remoteChainId_", + "type": "uint16" + } + ], + "name": "removeTrustedRemote", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "_nonce", + "type": "uint64" + }, + { + "internalType": "bytes", + "name": "_payload", + "type": "bytes" + } + ], + "name": "retryMessage", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "internalType": "bytes32", + "name": "_toAddress", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "_payload", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "_dstGasForCall", + "type": "uint64" + }, + { + "components": [ + { + "internalType": "address payable", + "name": "refundAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "zroPaymentAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "adapterParams", + "type": "bytes" + } + ], + "internalType": "struct ICommonOFT.LzCallParams", + "name": "_callParams", + "type": "tuple" + } + ], + "name": "sendAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "internalType": "bytes32", + "name": "_toAddress", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address payable", + "name": "refundAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "zroPaymentAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "adapterParams", + "type": "bytes" + } + ], + "internalType": "struct ICommonOFT.LzCallParams", + "name": "_callParams", + "type": "tuple" + } + ], + "name": "sendFrom", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_version", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "_chainId", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "_configType", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "_config", + "type": "bytes" + } + ], + "name": "setConfig", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "chainId_", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "limit_", + "type": "uint256" + } + ], + "name": "setMaxDailyLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "chainId_", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "limit_", + "type": "uint256" + } + ], + "name": "setMaxDailyReceiveLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "chainId_", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "limit_", + "type": "uint256" + } + ], + "name": "setMaxSingleReceiveTransactionLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "chainId_", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "limit_", + "type": "uint256" + } + ], + "name": "setMaxSingleTransactionLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "_packetType", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "_minGas", + "type": "uint256" + } + ], + "name": "setMinDstGas", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "oracleAddress_", + "type": "address" + } + ], + "name": "setOracle", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "_size", + "type": "uint256" + } + ], + "name": "setPayloadSizeLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_precrime", + "type": "address" + } + ], + "name": "setPrecrime", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_version", + "type": "uint16" + } + ], + "name": "setReceiveVersion", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_version", + "type": "uint16" + } + ], + "name": "setSendVersion", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_remoteChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_path", + "type": "bytes" + } + ], + "name": "setTrustedRemote", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_remoteChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_remoteAddress", + "type": "bytes" + } + ], + "name": "setTrustedRemoteAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user_", + "type": "address" + }, + { + "internalType": "bool", + "name": "val_", + "type": "bool" + } + ], + "name": "setWhitelist", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "sharedDecimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "token", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "trustedRemoteLookup", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "whitelist", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } +] diff --git a/multisig/simulations/sepolia/vip-052/index.ts b/multisig/simulations/sepolia/vip-052/index.ts new file mode 100644 index 000000000..ce727381a --- /dev/null +++ b/multisig/simulations/sepolia/vip-052/index.ts @@ -0,0 +1,109 @@ +import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; +import { expect } from "chai"; +import { Contract } from "ethers"; +import { parseUnits } from "ethers/lib/utils"; +import { ethers } from "hardhat"; +import { LzChainId } from "src/types"; +import { initMainnetUser } from "src/utils"; +import { forking, pretendExecutingVip } from "src/vip-framework"; + +import vip052, { + MAX_DAILY_RECEIVE_LIMIT, + MAX_DAILY_SEND_LIMIT, + SINGLE_RECEIVE_LIMIT, + SINGLE_SEND_LIMIT, + ZKSYNC_SEPOLIA_TRUSTED_REMOTE, +} from "../../../proposals/sepolia/vip-052"; +import XVS_ABI from "./abi/xvs.json"; +import XVS_BRIDGE_ABI from "./abi/xvsProxyOFTDest.json"; + +const XVS = "0x66ebd019E86e0af5f228a0439EBB33f045CBe63E"; +const XVS_BRIDGE = "0xc340b7d3406502F43dC11a988E4EC5bbE536E642"; +const XVS_HOLDER = "0xFd7dA20ea0bE63ACb0852f97E950376E7E4a817D"; + +forking(6460328, async () => { + let xvs: Contract; + let xvsBridge: Contract; + let xvsHolderSigner: SignerWithAddress; + let receiver: SignerWithAddress; + let receiverAddressBytes32: string; + let defaultAdapterParams: string; + + before(async () => { + xvs = await ethers.getContractAt(XVS_ABI, XVS); + xvsBridge = await ethers.getContractAt(XVS_BRIDGE_ABI, XVS_BRIDGE); + xvsHolderSigner = await initMainnetUser(XVS_HOLDER, ethers.utils.parseEther("5")); + [receiver] = await ethers.getSigners(); + receiverAddressBytes32 = ethers.utils.defaultAbiCoder.encode(["address"], [receiver.address]); + defaultAdapterParams = ethers.utils.solidityPack(["uint16", "uint256"], [1, 300000]); + }); + + describe("Post-Execution state", () => { + before(async () => { + await pretendExecutingVip(await vip052()); + }); + + it("Should match trusted remote address", async () => { + const trustedRemote = await xvsBridge.getTrustedRemoteAddress(LzChainId.zksyncsepolia); + expect(trustedRemote).equals(ZKSYNC_SEPOLIA_TRUSTED_REMOTE); + }); + + it("Should match single send transaction limit", async () => { + expect(await xvsBridge.chainIdToMaxSingleTransactionLimit(LzChainId.zksyncsepolia)).to.equal(SINGLE_SEND_LIMIT); + }); + + it("Should match single receive transaction limit", async () => { + expect(await xvsBridge.chainIdToMaxSingleReceiveTransactionLimit(LzChainId.zksyncsepolia)).to.equal( + SINGLE_RECEIVE_LIMIT, + ); + }); + + it("Should match max daily send limit", async () => { + expect(await xvsBridge.chainIdToMaxDailyLimit(LzChainId.zksyncsepolia)).to.equal(MAX_DAILY_SEND_LIMIT); + }); + + it("Should match max daily receive limit", async () => { + expect(await xvsBridge.chainIdToMaxDailyReceiveLimit(LzChainId.zksyncsepolia)).to.equal(MAX_DAILY_RECEIVE_LIMIT); + }); + + it("Should emit an event on successful bridging of XVS (sepolia -> Zksync Sepolia)", async () => { + const amount = parseUnits("1", 18); + const nativeFee = ( + await xvsBridge.estimateSendFee( + LzChainId.zksyncsepolia, + receiverAddressBytes32, + amount, + false, + defaultAdapterParams, + ) + ).nativeFee; + + const circulatingSupplyBefore = await xvsBridge.circulatingSupply(); + const totalSupplyBefore = await xvs.totalSupply(); + const minterToMintedAmountBefore = await xvs.minterToMintedAmount(XVS_BRIDGE); + + await expect( + xvsBridge + .connect(xvsHolderSigner) + .sendFrom( + xvsHolderSigner.address, + LzChainId.zksyncsepolia, + receiverAddressBytes32, + amount, + [xvsHolderSigner.address, ethers.constants.AddressZero, defaultAdapterParams], + { value: nativeFee }, + ), + ) + .to.be.emit(xvsBridge, "SendToChain") + .withArgs(LzChainId.zksyncsepolia, XVS_HOLDER, receiverAddressBytes32, amount); + + const circulatingSupplyAfter = await xvsBridge.circulatingSupply(); + const totalSupplyAfter = await xvs.totalSupply(); + const minterToMintedAmountAfter = await xvs.minterToMintedAmount(XVS_BRIDGE); + + expect(circulatingSupplyBefore).equals(circulatingSupplyAfter.add(amount)); + expect(totalSupplyBefore).equals(totalSupplyAfter.add(amount)); + expect(minterToMintedAmountBefore).equals(minterToMintedAmountAfter.add(amount)); + }); + }); +}); From 95a02b2ce90972013062f7a39f0c4d085cb3663f Mon Sep 17 00:00:00 2001 From: GitGuru7 <128375421+GitGuru7@users.noreply.github.com> Date: Fri, 9 Aug 2024 16:41:33 +0530 Subject: [PATCH 3/9] refactor: remove opbnb <> zksync config till LZ support --- .../proposals/opbnbtestnet/vip-019/index.ts | 49 - .../opbnbtestnet/vip-019/abi/xvs.json | 683 ------- .../vip-019/abi/xvsProxyOFTDest.json | 1729 ----------------- .../simulations/opbnbtestnet/vip-019/index.ts | 109 -- 4 files changed, 2570 deletions(-) delete mode 100644 multisig/proposals/opbnbtestnet/vip-019/index.ts delete mode 100644 multisig/simulations/opbnbtestnet/vip-019/abi/xvs.json delete mode 100644 multisig/simulations/opbnbtestnet/vip-019/abi/xvsProxyOFTDest.json delete mode 100644 multisig/simulations/opbnbtestnet/vip-019/index.ts diff --git a/multisig/proposals/opbnbtestnet/vip-019/index.ts b/multisig/proposals/opbnbtestnet/vip-019/index.ts deleted file mode 100644 index 734208830..000000000 --- a/multisig/proposals/opbnbtestnet/vip-019/index.ts +++ /dev/null @@ -1,49 +0,0 @@ -import { parseUnits } from "ethers/lib/utils"; -import { LzChainId } from "src/types"; -import { makeProposal } from "src/utils"; - -const XVS_BRIDGE_ADMIN = "0x19252AFD0B2F539C400aEab7d460CBFbf74c17ff"; - -export const MIN_DST_GAS = "300000"; -export const SINGLE_SEND_LIMIT = parseUnits("10000", 18); -export const MAX_DAILY_SEND_LIMIT = parseUnits("50000", 18); -export const SINGLE_RECEIVE_LIMIT = parseUnits("10200", 18); -export const MAX_DAILY_RECEIVE_LIMIT = parseUnits("51000", 18); -export const ZKSYNC_SEPOLIA_TRUSTED_REMOTE = "0x760461ccb2508caaa2ece0c28af3a4707b853043"; - -const vip019 = () => { - return makeProposal([ - { - target: XVS_BRIDGE_ADMIN, - signature: "setTrustedRemoteAddress(uint16,bytes)", - params: [LzChainId.zksyncsepolia, ZKSYNC_SEPOLIA_TRUSTED_REMOTE], - }, - { - target: XVS_BRIDGE_ADMIN, - signature: "setMinDstGas(uint16,uint16,uint256)", - params: [LzChainId.zksyncsepolia, 0, MIN_DST_GAS], - }, - { - target: XVS_BRIDGE_ADMIN, - signature: "setMaxDailyLimit(uint16,uint256)", - params: [LzChainId.zksyncsepolia, MAX_DAILY_SEND_LIMIT], - }, - { - target: XVS_BRIDGE_ADMIN, - signature: "setMaxSingleTransactionLimit(uint16,uint256)", - params: [LzChainId.zksyncsepolia, SINGLE_SEND_LIMIT], - }, - { - target: XVS_BRIDGE_ADMIN, - signature: "setMaxDailyReceiveLimit(uint16,uint256)", - params: [LzChainId.zksyncsepolia, MAX_DAILY_RECEIVE_LIMIT], - }, - { - target: XVS_BRIDGE_ADMIN, - signature: "setMaxSingleReceiveTransactionLimit(uint16,uint256)", - params: [LzChainId.zksyncsepolia, SINGLE_RECEIVE_LIMIT], - }, - ]); -}; - -export default vip019; diff --git a/multisig/simulations/opbnbtestnet/vip-019/abi/xvs.json b/multisig/simulations/opbnbtestnet/vip-019/abi/xvs.json deleted file mode 100644 index 8a2713887..000000000 --- a/multisig/simulations/opbnbtestnet/vip-019/abi/xvs.json +++ /dev/null @@ -1,683 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "address", - "name": "accessControlManager_", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "MintLimitExceed", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - } - ], - "name": "MintNotAllowed", - "type": "error" - }, - { - "inputs": [], - "name": "ZeroAddressNotAllowed", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": false, - "internalType": "bool", - "name": "value", - "type": "bool" - } - ], - "name": "BlacklistUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "MintCapChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newLimit", - "type": "uint256" - } - ], - "name": "MintLimitDecreased", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newLimit", - "type": "uint256" - } - ], - "name": "MintLimitIncreased", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldAccessControlManager", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newAccessControlManager", - "type": "address" - } - ], - "name": "NewAccessControlManager", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Paused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Unpaused", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "_blacklist", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount_", - "type": "uint256" - } - ], - "name": "burn", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "user_", - "type": "address" - } - ], - "name": "isBlackListed", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount_", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "minterToCap", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "minterToMintedAmount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "pause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "paused", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlAddress_", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "minter_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount_", - "type": "uint256" - } - ], - "name": "setMintCap", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "unpause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "user_", - "type": "address" - }, - { - "internalType": "bool", - "name": "value_", - "type": "bool" - } - ], - "name": "updateBlacklist", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } -] diff --git a/multisig/simulations/opbnbtestnet/vip-019/abi/xvsProxyOFTDest.json b/multisig/simulations/opbnbtestnet/vip-019/abi/xvsProxyOFTDest.json deleted file mode 100644 index 5917469fd..000000000 --- a/multisig/simulations/opbnbtestnet/vip-019/abi/xvsProxyOFTDest.json +++ /dev/null @@ -1,1729 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "address", - "name": "tokenAddress_", - "type": "address" - }, - { - "internalType": "uint8", - "name": "sharedDecimals_", - "type": "uint8" - }, - { - "internalType": "address", - "name": "lzEndpoint_", - "type": "address" - }, - { - "internalType": "address", - "name": "oracle_", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "ZeroAddressNotAllowed", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint16", - "name": "_srcChainId", - "type": "uint16" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "_srcAddress", - "type": "bytes" - }, - { - "indexed": false, - "internalType": "uint64", - "name": "_nonce", - "type": "uint64" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "_hash", - "type": "bytes32" - } - ], - "name": "CallOFTReceivedSuccess", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint16", - "name": "srcChainId", - "type": "uint16" - }, - { - "indexed": true, - "internalType": "bytes", - "name": "srcAddress", - "type": "bytes" - }, - { - "indexed": false, - "internalType": "uint64", - "name": "nonce", - "type": "uint64" - } - ], - "name": "DropFailedMessage", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "innerToken", - "type": "address" - } - ], - "name": "InnerTokenAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint16", - "name": "_srcChainId", - "type": "uint16" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "_srcAddress", - "type": "bytes" - }, - { - "indexed": false, - "internalType": "uint64", - "name": "_nonce", - "type": "uint64" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "_payload", - "type": "bytes" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "_reason", - "type": "bytes" - } - ], - "name": "MessageFailed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "_address", - "type": "address" - } - ], - "name": "NonContractAddress", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldOracle", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOracle", - "type": "address" - } - ], - "name": "OracleChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Paused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint16", - "name": "_srcChainId", - "type": "uint16" - }, - { - "indexed": true, - "internalType": "address", - "name": "_to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "ReceiveFromChain", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint16", - "name": "_srcChainId", - "type": "uint16" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "_srcAddress", - "type": "bytes" - }, - { - "indexed": false, - "internalType": "uint64", - "name": "_nonce", - "type": "uint64" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "_payloadHash", - "type": "bytes32" - } - ], - "name": "RetryMessageSuccess", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint16", - "name": "_dstChainId", - "type": "uint16" - }, - { - "indexed": true, - "internalType": "address", - "name": "_from", - "type": "address" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "_toAddress", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "SendToChain", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint16", - "name": "chainId", - "type": "uint16" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "oldMaxLimit", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newMaxLimit", - "type": "uint256" - } - ], - "name": "SetMaxDailyLimit", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint16", - "name": "chainId", - "type": "uint16" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "oldMaxLimit", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newMaxLimit", - "type": "uint256" - } - ], - "name": "SetMaxDailyReceiveLimit", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint16", - "name": "chainId", - "type": "uint16" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "oldMaxLimit", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newMaxLimit", - "type": "uint256" - } - ], - "name": "SetMaxSingleReceiveTransactionLimit", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint16", - "name": "chainId", - "type": "uint16" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "oldMaxLimit", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newMaxLimit", - "type": "uint256" - } - ], - "name": "SetMaxSingleTransactionLimit", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint16", - "name": "_dstChainId", - "type": "uint16" - }, - { - "indexed": false, - "internalType": "uint16", - "name": "_type", - "type": "uint16" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_minDstGas", - "type": "uint256" - } - ], - "name": "SetMinDstGas", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "precrime", - "type": "address" - } - ], - "name": "SetPrecrime", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint16", - "name": "_remoteChainId", - "type": "uint16" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "_path", - "type": "bytes" - } - ], - "name": "SetTrustedRemote", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint16", - "name": "_remoteChainId", - "type": "uint16" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "_remoteAddress", - "type": "bytes" - } - ], - "name": "SetTrustedRemoteAddress", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "addr", - "type": "address" - }, - { - "indexed": false, - "internalType": "bool", - "name": "isWhitelist", - "type": "bool" - } - ], - "name": "SetWhitelist", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint16", - "name": "chainId", - "type": "uint16" - } - ], - "name": "TrustedRemoteRemoved", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Unpaused", - "type": "event" - }, - { - "inputs": [], - "name": "DEFAULT_PAYLOAD_SIZE_LIMIT", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "NO_EXTRA_GAS", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "PT_SEND", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "PT_SEND_AND_CALL", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint16", - "name": "_srcChainId", - "type": "uint16" - }, - { - "internalType": "bytes", - "name": "_srcAddress", - "type": "bytes" - }, - { - "internalType": "uint64", - "name": "_nonce", - "type": "uint64" - }, - { - "internalType": "bytes32", - "name": "_from", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "_to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_payload", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "_gasForCall", - "type": "uint256" - } - ], - "name": "callOnOFTReceived", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint16", - "name": "", - "type": "uint16" - } - ], - "name": "chainIdToLast24HourReceiveWindowStart", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint16", - "name": "", - "type": "uint16" - } - ], - "name": "chainIdToLast24HourReceived", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint16", - "name": "", - "type": "uint16" - } - ], - "name": "chainIdToLast24HourTransferred", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint16", - "name": "", - "type": "uint16" - } - ], - "name": "chainIdToLast24HourWindowStart", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint16", - "name": "", - "type": "uint16" - } - ], - "name": "chainIdToMaxDailyLimit", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint16", - "name": "", - "type": "uint16" - } - ], - "name": "chainIdToMaxDailyReceiveLimit", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint16", - "name": "", - "type": "uint16" - } - ], - "name": "chainIdToMaxSingleReceiveTransactionLimit", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint16", - "name": "", - "type": "uint16" - } - ], - "name": "chainIdToMaxSingleTransactionLimit", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "circulatingSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint16", - "name": "", - "type": "uint16" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - }, - { - "internalType": "uint64", - "name": "", - "type": "uint64" - } - ], - "name": "creditedPackets", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint16", - "name": "srcChainId_", - "type": "uint16" - }, - { - "internalType": "bytes", - "name": "srcAddress_", - "type": "bytes" - }, - { - "internalType": "uint64", - "name": "nonce_", - "type": "uint64" - } - ], - "name": "dropFailedMessage", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint16", - "name": "_dstChainId", - "type": "uint16" - }, - { - "internalType": "bytes32", - "name": "_toAddress", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_payload", - "type": "bytes" - }, - { - "internalType": "uint64", - "name": "_dstGasForCall", - "type": "uint64" - }, - { - "internalType": "bool", - "name": "_useZro", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "_adapterParams", - "type": "bytes" - } - ], - "name": "estimateSendAndCallFee", - "outputs": [ - { - "internalType": "uint256", - "name": "nativeFee", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "zroFee", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint16", - "name": "_dstChainId", - "type": "uint16" - }, - { - "internalType": "bytes32", - "name": "_toAddress", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "_useZro", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "_adapterParams", - "type": "bytes" - } - ], - "name": "estimateSendFee", - "outputs": [ - { - "internalType": "uint256", - "name": "nativeFee", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "zroFee", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint16", - "name": "", - "type": "uint16" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - }, - { - "internalType": "uint64", - "name": "", - "type": "uint64" - } - ], - "name": "failedMessages", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint16", - "name": "_srcChainId", - "type": "uint16" - }, - { - "internalType": "bytes", - "name": "_srcAddress", - "type": "bytes" - } - ], - "name": "forceResumeReceive", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint16", - "name": "_version", - "type": "uint16" - }, - { - "internalType": "uint16", - "name": "_chainId", - "type": "uint16" - }, - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_configType", - "type": "uint256" - } - ], - "name": "getConfig", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint16", - "name": "_remoteChainId", - "type": "uint16" - } - ], - "name": "getTrustedRemoteAddress", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint16", - "name": "_srcChainId", - "type": "uint16" - }, - { - "internalType": "bytes", - "name": "_srcAddress", - "type": "bytes" - } - ], - "name": "isTrustedRemote", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "lzEndpoint", - "outputs": [ - { - "internalType": "contract ILayerZeroEndpoint", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint16", - "name": "_srcChainId", - "type": "uint16" - }, - { - "internalType": "bytes", - "name": "_srcAddress", - "type": "bytes" - }, - { - "internalType": "uint64", - "name": "_nonce", - "type": "uint64" - }, - { - "internalType": "bytes", - "name": "_payload", - "type": "bytes" - } - ], - "name": "lzReceive", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint16", - "name": "", - "type": "uint16" - }, - { - "internalType": "uint16", - "name": "", - "type": "uint16" - } - ], - "name": "minDstGasLookup", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint16", - "name": "_srcChainId", - "type": "uint16" - }, - { - "internalType": "bytes", - "name": "_srcAddress", - "type": "bytes" - }, - { - "internalType": "uint64", - "name": "_nonce", - "type": "uint64" - }, - { - "internalType": "bytes", - "name": "_payload", - "type": "bytes" - } - ], - "name": "nonblockingLzReceive", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "oracle", - "outputs": [ - { - "internalType": "contract ResilientOracleInterface", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "pause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "paused", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint16", - "name": "", - "type": "uint16" - } - ], - "name": "payloadSizeLimitLookup", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "precrime", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint16", - "name": "remoteChainId_", - "type": "uint16" - } - ], - "name": "removeTrustedRemote", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint16", - "name": "_srcChainId", - "type": "uint16" - }, - { - "internalType": "bytes", - "name": "_srcAddress", - "type": "bytes" - }, - { - "internalType": "uint64", - "name": "_nonce", - "type": "uint64" - }, - { - "internalType": "bytes", - "name": "_payload", - "type": "bytes" - } - ], - "name": "retryMessage", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_from", - "type": "address" - }, - { - "internalType": "uint16", - "name": "_dstChainId", - "type": "uint16" - }, - { - "internalType": "bytes32", - "name": "_toAddress", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_payload", - "type": "bytes" - }, - { - "internalType": "uint64", - "name": "_dstGasForCall", - "type": "uint64" - }, - { - "components": [ - { - "internalType": "address payable", - "name": "refundAddress", - "type": "address" - }, - { - "internalType": "address", - "name": "zroPaymentAddress", - "type": "address" - }, - { - "internalType": "bytes", - "name": "adapterParams", - "type": "bytes" - } - ], - "internalType": "struct ICommonOFT.LzCallParams", - "name": "_callParams", - "type": "tuple" - } - ], - "name": "sendAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_from", - "type": "address" - }, - { - "internalType": "uint16", - "name": "_dstChainId", - "type": "uint16" - }, - { - "internalType": "bytes32", - "name": "_toAddress", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - }, - { - "components": [ - { - "internalType": "address payable", - "name": "refundAddress", - "type": "address" - }, - { - "internalType": "address", - "name": "zroPaymentAddress", - "type": "address" - }, - { - "internalType": "bytes", - "name": "adapterParams", - "type": "bytes" - } - ], - "internalType": "struct ICommonOFT.LzCallParams", - "name": "_callParams", - "type": "tuple" - } - ], - "name": "sendFrom", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint16", - "name": "_version", - "type": "uint16" - }, - { - "internalType": "uint16", - "name": "_chainId", - "type": "uint16" - }, - { - "internalType": "uint256", - "name": "_configType", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_config", - "type": "bytes" - } - ], - "name": "setConfig", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint16", - "name": "chainId_", - "type": "uint16" - }, - { - "internalType": "uint256", - "name": "limit_", - "type": "uint256" - } - ], - "name": "setMaxDailyLimit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint16", - "name": "chainId_", - "type": "uint16" - }, - { - "internalType": "uint256", - "name": "limit_", - "type": "uint256" - } - ], - "name": "setMaxDailyReceiveLimit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint16", - "name": "chainId_", - "type": "uint16" - }, - { - "internalType": "uint256", - "name": "limit_", - "type": "uint256" - } - ], - "name": "setMaxSingleReceiveTransactionLimit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint16", - "name": "chainId_", - "type": "uint16" - }, - { - "internalType": "uint256", - "name": "limit_", - "type": "uint256" - } - ], - "name": "setMaxSingleTransactionLimit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint16", - "name": "_dstChainId", - "type": "uint16" - }, - { - "internalType": "uint16", - "name": "_packetType", - "type": "uint16" - }, - { - "internalType": "uint256", - "name": "_minGas", - "type": "uint256" - } - ], - "name": "setMinDstGas", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "oracleAddress_", - "type": "address" - } - ], - "name": "setOracle", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint16", - "name": "_dstChainId", - "type": "uint16" - }, - { - "internalType": "uint256", - "name": "_size", - "type": "uint256" - } - ], - "name": "setPayloadSizeLimit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_precrime", - "type": "address" - } - ], - "name": "setPrecrime", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint16", - "name": "_version", - "type": "uint16" - } - ], - "name": "setReceiveVersion", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint16", - "name": "_version", - "type": "uint16" - } - ], - "name": "setSendVersion", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint16", - "name": "_remoteChainId", - "type": "uint16" - }, - { - "internalType": "bytes", - "name": "_path", - "type": "bytes" - } - ], - "name": "setTrustedRemote", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint16", - "name": "_remoteChainId", - "type": "uint16" - }, - { - "internalType": "bytes", - "name": "_remoteAddress", - "type": "bytes" - } - ], - "name": "setTrustedRemoteAddress", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "user_", - "type": "address" - }, - { - "internalType": "bool", - "name": "val_", - "type": "bool" - } - ], - "name": "setWhitelist", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "sharedDecimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "token", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint16", - "name": "", - "type": "uint16" - } - ], - "name": "trustedRemoteLookup", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "unpause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "whitelist", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - } -] diff --git a/multisig/simulations/opbnbtestnet/vip-019/index.ts b/multisig/simulations/opbnbtestnet/vip-019/index.ts deleted file mode 100644 index d35d40b76..000000000 --- a/multisig/simulations/opbnbtestnet/vip-019/index.ts +++ /dev/null @@ -1,109 +0,0 @@ -import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; -import { expect } from "chai"; -import { Contract } from "ethers"; -import { parseUnits } from "ethers/lib/utils"; -import { ethers } from "hardhat"; -import { LzChainId } from "src/types"; -import { initMainnetUser } from "src/utils"; -import { forking, pretendExecutingVip } from "src/vip-framework"; - -import vip019, { - MAX_DAILY_RECEIVE_LIMIT, - MAX_DAILY_SEND_LIMIT, - SINGLE_RECEIVE_LIMIT, - SINGLE_SEND_LIMIT, - ZKSYNC_SEPOLIA_TRUSTED_REMOTE, -} from "../../../proposals/opbnbtestnet/vip-019"; -import XVS_ABI from "./abi/xvs.json"; -import XVS_BRIDGE_ABI from "./abi/xvsProxyOFTDest.json"; - -const XVS = "0xc2931B1fEa69b6D6dA65a50363A8D75d285e4da9"; -const XVS_BRIDGE = "0xA03205bC635A772E533E7BE36b5701E331a70ea3"; -const XVS_HOLDER = "0xFd7dA20ea0bE63ACb0852f97E950376E7E4a817D"; - -forking(36246118, async () => { - let xvs: Contract; - let xvsBridge: Contract; - let xvsHolderSigner: SignerWithAddress; - let receiver: SignerWithAddress; - let receiverAddressBytes32: string; - let defaultAdapterParams: string; - - before(async () => { - xvs = await ethers.getContractAt(XVS_ABI, XVS); - xvsBridge = await ethers.getContractAt(XVS_BRIDGE_ABI, XVS_BRIDGE); - xvsHolderSigner = await initMainnetUser(XVS_HOLDER, ethers.utils.parseEther("5")); - [receiver] = await ethers.getSigners(); - receiverAddressBytes32 = ethers.utils.defaultAbiCoder.encode(["address"], [receiver.address]); - defaultAdapterParams = ethers.utils.solidityPack(["uint16", "uint256"], [1, 300000]); - }); - - describe("Post-Execution state", () => { - before(async () => { - await pretendExecutingVip(await vip019()); - }); - - it("Should match trusted remote address", async () => { - const trustedRemote = await xvsBridge.getTrustedRemoteAddress(LzChainId.zksyncsepolia); - expect(trustedRemote).equals(ZKSYNC_SEPOLIA_TRUSTED_REMOTE); - }); - - it("Should match single send transaction limit", async () => { - expect(await xvsBridge.chainIdToMaxSingleTransactionLimit(LzChainId.zksyncsepolia)).to.equal(SINGLE_SEND_LIMIT); - }); - - it("Should match single receive transaction limit", async () => { - expect(await xvsBridge.chainIdToMaxSingleReceiveTransactionLimit(LzChainId.zksyncsepolia)).to.equal( - SINGLE_RECEIVE_LIMIT, - ); - }); - - it("Should match max daily send limit", async () => { - expect(await xvsBridge.chainIdToMaxDailyLimit(LzChainId.zksyncsepolia)).to.equal(MAX_DAILY_SEND_LIMIT); - }); - - it("Should match max daily receive limit", async () => { - expect(await xvsBridge.chainIdToMaxDailyReceiveLimit(LzChainId.zksyncsepolia)).to.equal(MAX_DAILY_RECEIVE_LIMIT); - }); - - it("Should emit an event on successful bridging of XVS (Opbnb testnet -> Zksync Sepolia)", async () => { - const amount = parseUnits("1", 18); - const nativeFee = ( - await xvsBridge.estimateSendFee( - LzChainId.zksyncsepolia, - receiverAddressBytes32, - amount, - false, - defaultAdapterParams, - ) - ).nativeFee; - - const circulatingSupplyBefore = await xvsBridge.circulatingSupply(); - const totalSupplyBefore = await xvs.totalSupply(); - const minterToMintedAmountBefore = await xvs.minterToMintedAmount(XVS_BRIDGE); - - await expect( - xvsBridge - .connect(xvsHolderSigner) - .sendFrom( - xvsHolderSigner.address, - LzChainId.zksyncsepolia, - receiverAddressBytes32, - amount, - [xvsHolderSigner.address, ethers.constants.AddressZero, defaultAdapterParams], - { value: nativeFee }, - ), - ) - .to.be.emit(xvsBridge, "SendToChain") - .withArgs(LzChainId.zksyncsepolia, XVS_HOLDER, receiverAddressBytes32, amount); - - const circulatingSupplyAfter = await xvsBridge.circulatingSupply(); - const totalSupplyAfter = await xvs.totalSupply(); - const minterToMintedAmountAfter = await xvs.minterToMintedAmount(XVS_BRIDGE); - - expect(circulatingSupplyBefore).equals(circulatingSupplyAfter.add(amount)); - expect(totalSupplyBefore).equals(totalSupplyAfter.add(amount)); - expect(minterToMintedAmountBefore).equals(minterToMintedAmountAfter.add(amount)); - }); - }); -}); From 476207a4f3b769a7d5f8f5cd477f4f1c506361b3 Mon Sep 17 00:00:00 2001 From: GitGuru7 <128375421+GitGuru7@users.noreply.github.com> Date: Fri, 9 Aug 2024 16:48:42 +0530 Subject: [PATCH 4/9] Merge branch 'main' into vip/bsc-zksync --- .../proposals/zksyncsepolia/vip-003/index.ts | 79 + .../proposals/zksyncsepolia/vip-005/index.ts | 15 + .../zksyncsepolia/vip-003/abi/acm.json | 126 ++ .../zksyncsepolia/vip-003/abi/xvs.json | 683 +++++++ .../zksyncsepolia/vip-003/abi/xvsstore.json | 235 +++ .../zksyncsepolia/vip-003/abi/xvsvault.json | 1651 +++++++++++++++++ .../zksyncsepolia/vip-003/index.ts | 91 + .../vip-005/abi/NativeTokenGateway.json | 376 ++++ .../zksyncsepolia/vip-005/index.ts | 31 + package.json | 2 +- simulations/vip-349/abi/ERC20.json | 231 +++ simulations/vip-349/abi/VTreasury.json | 83 + simulations/vip-349/bscmainnet.ts | 41 + src/networkAddresses.ts | 2 + src/utils.ts | 11 + src/vip-framework/checks/checkXVSVault.ts | 58 +- vips/vip-349/bscmainnet.ts | 59 + yarn.lock | 574 +++++- 18 files changed, 4252 insertions(+), 96 deletions(-) create mode 100644 multisig/proposals/zksyncsepolia/vip-003/index.ts create mode 100644 multisig/proposals/zksyncsepolia/vip-005/index.ts create mode 100644 multisig/simulations/zksyncsepolia/vip-003/abi/acm.json create mode 100644 multisig/simulations/zksyncsepolia/vip-003/abi/xvs.json create mode 100644 multisig/simulations/zksyncsepolia/vip-003/abi/xvsstore.json create mode 100644 multisig/simulations/zksyncsepolia/vip-003/abi/xvsvault.json create mode 100644 multisig/simulations/zksyncsepolia/vip-003/index.ts create mode 100644 multisig/simulations/zksyncsepolia/vip-005/abi/NativeTokenGateway.json create mode 100644 multisig/simulations/zksyncsepolia/vip-005/index.ts create mode 100644 simulations/vip-349/abi/ERC20.json create mode 100644 simulations/vip-349/abi/VTreasury.json create mode 100644 simulations/vip-349/bscmainnet.ts create mode 100644 vips/vip-349/bscmainnet.ts diff --git a/multisig/proposals/zksyncsepolia/vip-003/index.ts b/multisig/proposals/zksyncsepolia/vip-003/index.ts new file mode 100644 index 000000000..6f247b2db --- /dev/null +++ b/multisig/proposals/zksyncsepolia/vip-003/index.ts @@ -0,0 +1,79 @@ +import { NETWORK_ADDRESSES } from "src/networkAddresses"; +import { makeProposal } from "src/utils"; + +const { zksyncsepolia } = NETWORK_ADDRESSES; + +export const XVS_STORE = "0xf0DaEFE5f5df4170426F88757EcdF45430332d88"; +export const ACM = "0xD07f543d47c3a8997D6079958308e981AC14CD01"; + +const vip003 = () => { + return makeProposal([ + { + target: zksyncsepolia.XVS_VAULT_PROXY, + signature: "_acceptAdmin()", + params: [], + }, + + { + target: XVS_STORE, + signature: "acceptAdmin()", + params: [], + }, + + { + target: ACM, + signature: "giveCallPermission(address,string,address)", + params: [zksyncsepolia.XVS_VAULT_PROXY, "pause()", zksyncsepolia.GUARDIAN], + }, + + { + target: ACM, + signature: "giveCallPermission(address,string,address)", + params: [zksyncsepolia.XVS_VAULT_PROXY, "resume()", zksyncsepolia.GUARDIAN], + }, + + { + target: ACM, + signature: "giveCallPermission(address,string,address)", + params: [zksyncsepolia.XVS_VAULT_PROXY, "add(address,uint256,address,uint256,uint256)", zksyncsepolia.GUARDIAN], + }, + + { + target: ACM, + signature: "giveCallPermission(address,string,address)", + params: [zksyncsepolia.XVS_VAULT_PROXY, "set(address,uint256,uint256)", zksyncsepolia.GUARDIAN], + }, + + { + target: ACM, + signature: "giveCallPermission(address,string,address)", + params: [ + zksyncsepolia.XVS_VAULT_PROXY, + "setRewardAmountPerBlockOrSecond(address,uint256)", + zksyncsepolia.GUARDIAN, + ], + }, + + { + target: ACM, + signature: "giveCallPermission(address,string,address)", + params: [ + zksyncsepolia.XVS_VAULT_PROXY, + "setWithdrawalLockingPeriod(address,uint256,uint256)", + zksyncsepolia.GUARDIAN, + ], + }, + { + target: zksyncsepolia.XVS_VAULT_PROXY, + signature: "add(address,uint256,address,uint256,uint256)", + params: [zksyncsepolia.XVS, 100, zksyncsepolia.XVS, "0", 300], + }, + { + target: zksyncsepolia.XVS_VAULT_PROXY, + signature: "pause()", + params: [], + }, + ]); +}; + +export default vip003; diff --git a/multisig/proposals/zksyncsepolia/vip-005/index.ts b/multisig/proposals/zksyncsepolia/vip-005/index.ts new file mode 100644 index 000000000..b8b9140c2 --- /dev/null +++ b/multisig/proposals/zksyncsepolia/vip-005/index.ts @@ -0,0 +1,15 @@ +import { makeProposal } from "src/utils"; + +export const NATIVE_TOKEN_GATEWAY_CORE_POOL = "0xC2bc5881f2c1ee08a1f0fee65Fbf2BB4C4DD81e9"; + +const vip005 = () => { + return makeProposal([ + { + target: NATIVE_TOKEN_GATEWAY_CORE_POOL, + signature: "acceptOwnership()", + params: [], + }, + ]); +}; + +export default vip005; diff --git a/multisig/simulations/zksyncsepolia/vip-003/abi/acm.json b/multisig/simulations/zksyncsepolia/vip-003/abi/acm.json new file mode 100644 index 000000000..687d32137 --- /dev/null +++ b/multisig/simulations/zksyncsepolia/vip-003/abi/acm.json @@ -0,0 +1,126 @@ +[ + { "inputs": [], "stateMutability": "nonpayable", "type": "constructor" }, + { + "anonymous": false, + "inputs": [ + { "indexed": true, "internalType": "bytes32", "name": "role", "type": "bytes32" }, + { "indexed": true, "internalType": "bytes32", "name": "previousAdminRole", "type": "bytes32" }, + { "indexed": true, "internalType": "bytes32", "name": "newAdminRole", "type": "bytes32" } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": true, "internalType": "bytes32", "name": "role", "type": "bytes32" }, + { "indexed": true, "internalType": "address", "name": "account", "type": "address" }, + { "indexed": true, "internalType": "address", "name": "sender", "type": "address" } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": true, "internalType": "bytes32", "name": "role", "type": "bytes32" }, + { "indexed": true, "internalType": "address", "name": "account", "type": "address" }, + { "indexed": true, "internalType": "address", "name": "sender", "type": "address" } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "bytes32", "name": "role", "type": "bytes32" }], + "name": "getRoleAdmin", + "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "contractAddress", "type": "address" }, + { "internalType": "string", "name": "functionSig", "type": "string" }, + { "internalType": "address", "name": "accountToPermit", "type": "address" } + ], + "name": "giveCallPermission", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "bytes32", "name": "role", "type": "bytes32" }, + { "internalType": "address", "name": "account", "type": "address" } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "bytes32", "name": "role", "type": "bytes32" }, + { "internalType": "address", "name": "account", "type": "address" } + ], + "name": "hasRole", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "account", "type": "address" }, + { "internalType": "string", "name": "functionSig", "type": "string" } + ], + "name": "isAllowedToCall", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "bytes32", "name": "role", "type": "bytes32" }, + { "internalType": "address", "name": "account", "type": "address" } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "contractAddress", "type": "address" }, + { "internalType": "string", "name": "functionSig", "type": "string" }, + { "internalType": "address", "name": "accountToRevoke", "type": "address" } + ], + "name": "revokeCallPermission", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "bytes32", "name": "role", "type": "bytes32" }, + { "internalType": "address", "name": "account", "type": "address" } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [{ "internalType": "bytes4", "name": "interfaceId", "type": "bytes4" }], + "name": "supportsInterface", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "view", + "type": "function" + } +] diff --git a/multisig/simulations/zksyncsepolia/vip-003/abi/xvs.json b/multisig/simulations/zksyncsepolia/vip-003/abi/xvs.json new file mode 100644 index 000000000..8a2713887 --- /dev/null +++ b/multisig/simulations/zksyncsepolia/vip-003/abi/xvs.json @@ -0,0 +1,683 @@ +[ + { + "inputs": [ + { + "internalType": "address", + "name": "accessControlManager_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "MintLimitExceed", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + } + ], + "name": "MintNotAllowed", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddressNotAllowed", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "value", + "type": "bool" + } + ], + "name": "BlacklistUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "minter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "MintCapChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "minter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newLimit", + "type": "uint256" + } + ], + "name": "MintLimitDecreased", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "minter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newLimit", + "type": "uint256" + } + ], + "name": "MintLimitIncreased", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldAccessControlManager", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newAccessControlManager", + "type": "address" + } + ], + "name": "NewAccessControlManager", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "_blacklist", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "accessControlManager", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount_", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user_", + "type": "address" + } + ], + "name": "isBlackListed", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount_", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "minterToCap", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "minterToMintedAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newAccessControlAddress_", + "type": "address" + } + ], + "name": "setAccessControlManager", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "minter_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount_", + "type": "uint256" + } + ], + "name": "setMintCap", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user_", + "type": "address" + }, + { + "internalType": "bool", + "name": "value_", + "type": "bool" + } + ], + "name": "updateBlacklist", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/multisig/simulations/zksyncsepolia/vip-003/abi/xvsstore.json b/multisig/simulations/zksyncsepolia/vip-003/abi/xvsstore.json new file mode 100644 index 000000000..56b26cc2d --- /dev/null +++ b/multisig/simulations/zksyncsepolia/vip-003/abi/xvsstore.json @@ -0,0 +1,235 @@ +[ + { + "inputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldAdmin", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldPendingAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newPendingAdmin", + "type": "address" + } + ], + "name": "NewPendingAdmin", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnerTransferred", + "type": "event" + }, + { + "constant": false, + "inputs": [], + "name": "acceptAdmin", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "admin", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "_tokenAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "emergencyRewardWithdraw", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "pendingAdmin", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "rewardTokens", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "safeRewardTransfer", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "_owner", + "type": "address" + } + ], + "name": "setNewOwner", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "_admin", + "type": "address" + } + ], + "name": "setPendingAdmin", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "_tokenAddress", + "type": "address" + }, + { + "internalType": "bool", + "name": "status", + "type": "bool" + } + ], + "name": "setRewardToken", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/multisig/simulations/zksyncsepolia/vip-003/abi/xvsvault.json b/multisig/simulations/zksyncsepolia/vip-003/abi/xvsvault.json new file mode 100644 index 000000000..e32e0b3d1 --- /dev/null +++ b/multisig/simulations/zksyncsepolia/vip-003/abi/xvsvault.json @@ -0,0 +1,1651 @@ +[ + { + "inputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "rewardToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "pid", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Claim", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "delegator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "fromDelegate", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "toDelegate", + "type": "address" + } + ], + "name": "DelegateChangedV2", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "delegate", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "previousBalance", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newBalance", + "type": "uint256" + } + ], + "name": "DelegateVotesChangedV2", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "rewardToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "pid", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Deposit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "rewardToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "pid", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "ExecutedWithdrawal", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldAccessControlManager", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAccessControlManager", + "type": "address" + } + ], + "name": "NewAccessControlManager", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IPrime", + "name": "oldPrimeToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "contract IPrime", + "name": "newPrimeToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "oldPrimeRewardToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newPrimeRewardToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oldPrimePoolId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newPrimePoolId", + "type": "uint256" + } + ], + "name": "NewPrimeToken", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "rewardToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "pid", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "allocPoints", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "rewardPerBlockOrSecond", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "lockPeriod", + "type": "uint256" + } + ], + "name": "PoolAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "rewardToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "pid", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oldAllocPoints", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newAllocPoints", + "type": "uint256" + } + ], + "name": "PoolUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "rewardToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "pid", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "RequestedWithdrawal", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "rewardToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oldReward", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newReward", + "type": "uint256" + } + ], + "name": "RewardAmountUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldXvs", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "oldStore", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newXvs", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newStore", + "type": "address" + } + ], + "name": "StoreUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "rewardToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "userAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oldOwedAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newOwedAmount", + "type": "uint256" + } + ], + "name": "VaultDebtUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "admin", + "type": "address" + } + ], + "name": "VaultPaused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "admin", + "type": "address" + } + ], + "name": "VaultResumed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "rewardToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "pid", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oldPeriod", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newPeriod", + "type": "uint256" + } + ], + "name": "WithdrawalLockingPeriodUpdated", + "type": "event" + }, + { + "constant": true, + "inputs": [], + "name": "DELEGATION_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "DOMAIN_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "MAX_LOCK_PERIOD", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "SECONDS_PER_YEAR", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "contract XVSVaultProxy", + "name": "xvsVaultProxy", + "type": "address" + } + ], + "name": "_become", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "accessControlManager", + "outputs": [ + { + "internalType": "contract IAccessControlManagerV5", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "_rewardToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_allocPoint", + "type": "uint256" + }, + { + "internalType": "contract IBEP20", + "name": "_token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_rewardPerBlockOrSecond", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_lockPeriod", + "type": "uint256" + } + ], + "name": "add", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "admin", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "blocksOrSecondsPerYear", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "name": "checkpoints", + "outputs": [ + { + "internalType": "uint32", + "name": "fromBlockOrSecond", + "type": "uint32" + }, + { + "internalType": "uint96", + "name": "votes", + "type": "uint96" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + }, + { + "internalType": "address", + "name": "_rewardToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + } + ], + "name": "claim", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "delegatee", + "type": "address" + } + ], + "name": "delegate", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "delegatee", + "type": "address" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expiry", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "delegateBySig", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "delegates", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "_rewardToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "deposit", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "_rewardToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + } + ], + "name": "executeWithdrawal", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getBlockNumberOrTimestamp", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getCurrentVotes", + "outputs": [ + { + "internalType": "uint96", + "name": "", + "type": "uint96" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "_rewardToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_user", + "type": "address" + } + ], + "name": "getEligibleWithdrawalAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "withdrawalAmount", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "blockNumberOrSecond", + "type": "uint256" + } + ], + "name": "getPriorVotes", + "outputs": [ + { + "internalType": "uint96", + "name": "", + "type": "uint96" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "_rewardToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_user", + "type": "address" + } + ], + "name": "getRequestedAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "_rewardToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_user", + "type": "address" + } + ], + "name": "getUserInfo", + "outputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "rewardDebt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "pendingWithdrawals", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "_rewardToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_user", + "type": "address" + } + ], + "name": "getWithdrawalRequests", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "uint128", + "name": "lockedUntil", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "afterUpgrade", + "type": "uint128" + } + ], + "internalType": "struct XVSVaultStorageV1.WithdrawalRequest[]", + "name": "", + "type": "tuple[]" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "implementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "bool", + "name": "timeBased_", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "blocksPerYear_", + "type": "uint256" + } + ], + "name": "initializeTimeManager", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "isStakedToken", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "isTimeBased", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "numCheckpoints", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "pause", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "pendingAdmin", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "_rewardToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_user", + "type": "address" + } + ], + "name": "pendingReward", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "pendingRewardTransfers", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "_rewardToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_user", + "type": "address" + } + ], + "name": "pendingWithdrawalsBeforeUpgrade", + "outputs": [ + { + "internalType": "uint256", + "name": "beforeUpgradeWithdrawalAmount", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "pendingXVSVaultImplementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "poolInfos", + "outputs": [ + { + "internalType": "contract IBEP20", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "allocPoint", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lastRewardBlockOrSecond", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "accRewardPerShare", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lockPeriod", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "rewardToken", + "type": "address" + } + ], + "name": "poolLength", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "primePoolId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "primeRewardToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "primeToken", + "outputs": [ + { + "internalType": "contract IPrime", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "_rewardToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "requestWithdrawal", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "resume", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "_rewardToken", + "type": "address" + } + ], + "name": "rewardTokenAmountsPerBlock", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "rewardTokenAmountsPerBlockOrSecond", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "_rewardToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_allocPoint", + "type": "uint256" + } + ], + "name": "set", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "newAccessControlAddress", + "type": "address" + } + ], + "name": "setAccessControl", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "contract IPrime", + "name": "_primeToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_primeRewardToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_primePoolId", + "type": "uint256" + } + ], + "name": "setPrimeToken", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "_rewardToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_rewardAmount", + "type": "uint256" + } + ], + "name": "setRewardAmountPerBlockOrSecond", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "_rewardToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_newPeriod", + "type": "uint256" + } + ], + "name": "setWithdrawalLockingPeriod", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "_xvs", + "type": "address" + }, + { + "internalType": "address", + "name": "_xvsStore", + "type": "address" + } + ], + "name": "setXvsStore", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "totalAllocPoints", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "_rewardToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + } + ], + "name": "updatePool", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "vaultPaused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "xvsAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "xvsStore", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + } +] diff --git a/multisig/simulations/zksyncsepolia/vip-003/index.ts b/multisig/simulations/zksyncsepolia/vip-003/index.ts new file mode 100644 index 000000000..50c9b4216 --- /dev/null +++ b/multisig/simulations/zksyncsepolia/vip-003/index.ts @@ -0,0 +1,91 @@ +import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; +import { expect } from "chai"; +import { BigNumber, Contract } from "ethers"; +import { parseEther, parseUnits } from "ethers/lib/utils"; +import { ethers } from "hardhat"; +import { NETWORK_ADDRESSES } from "src/networkAddresses"; +import { initMainnetUser } from "src/utils"; +import { checkXVSVault } from "src/vip-framework/checks/checkXVSVault"; +import { forking, pretendExecutingVip } from "src/vip-framework/index"; + +import vip003, { ACM, XVS_STORE } from "../../../proposals/zksyncsepolia/vip-003"; +import ACM_ABI from "./abi/acm.json"; +import XVS_ABI from "./abi/xvs.json"; +import XVS_STORE_ABI from "./abi/xvsstore.json"; +import XVS_VAULT_ABI from "./abi/xvsvault.json"; + +const { zksyncsepolia } = NETWORK_ADDRESSES; + +const XVS_BRIDGE = "0x20cEa49B5F7a6DBD78cAE772CA5973eF360AA1e6"; + +forking(3572259, async () => { + let xvsVault: Contract; + let xvsStore: Contract; + let xvsMinter: SignerWithAddress; + + before(async () => { + xvsVault = await ethers.getContractAt(XVS_VAULT_ABI, zksyncsepolia.XVS_VAULT_PROXY); + xvsStore = await ethers.getContractAt(XVS_STORE_ABI, XVS_STORE); + await pretendExecutingVip(await vip003()); + }); + + describe("Post tx checks", () => { + describe("Generic checks", async () => { + before(async () => { + const feeData = await ethers.provider.getFeeData(); + const txnParams: { maxFeePerGas?: BigNumber } = {}; + if (feeData.maxFeePerGas) { + // Sometimes the gas estimation is wrong with zksync + txnParams.maxFeePerGas = feeData.maxFeePerGas.mul(15).div(10); + } + + const acm: Contract = await ethers.getContractAt(ACM_ABI, ACM); + const xvs: Contract = await ethers.getContractAt(XVS_ABI, zksyncsepolia.XVS); + xvsMinter = await initMainnetUser(XVS_BRIDGE, ethers.utils.parseEther("1")); + const admin = await initMainnetUser(zksyncsepolia.GUARDIAN, ethers.utils.parseEther("1")); + const xvsHolder = await initMainnetUser(zksyncsepolia.GENERIC_TEST_USER_ACCOUNT, ethers.utils.parseEther("1")); + await xvsVault + .connect(admin) + .setRewardAmountPerBlockOrSecond(zksyncsepolia.XVS, "61805555555555555", txnParams); + + await xvsVault.connect(admin).resume(txnParams); + // Giving call permissions to call the functions as xvs bridge vip is not executed now. + await acm.connect(admin).giveCallPermission(zksyncsepolia.XVS, "mint(address,uint256)", XVS_BRIDGE, txnParams); + + await acm + .connect(admin) + .giveCallPermission(zksyncsepolia.XVS, "setMintCap(address,uint256)", admin.address, txnParams); + await xvs.connect(admin).setMintCap(XVS_BRIDGE, parseUnits("100", 18), txnParams); + await xvs.connect(xvsMinter).mint(xvsHolder.address, parseEther("10"), txnParams); + + await xvs.connect(xvsHolder).transfer(XVS_STORE, ethers.utils.parseEther("1"), txnParams); + }); + checkXVSVault(); + }); + + it("Should set xvs vault owner to multisig", async () => { + const owner = await xvsVault.admin(); + expect(owner).equals(zksyncsepolia.GUARDIAN); + }); + + it("Should set xvs store owner to multisig", async () => { + const owner = await xvsStore.admin(); + expect(owner).equals(zksyncsepolia.GUARDIAN); + }); + + it("Should set correct xvs store address", async () => { + const xvsStore = await xvsVault.xvsStore(); + expect(xvsStore).equals(XVS_STORE); + }); + + it("Should set correct reward token address", async () => { + const isActive = await xvsStore.rewardTokens(zksyncsepolia.XVS); + expect(isActive).equals(true); + }); + + it("Vault should be paused", async () => { + const paused = await xvsVault.vaultPaused(); + expect(paused).to.be.true; + }); + }); +}); diff --git a/multisig/simulations/zksyncsepolia/vip-005/abi/NativeTokenGateway.json b/multisig/simulations/zksyncsepolia/vip-005/abi/NativeTokenGateway.json new file mode 100644 index 000000000..7d11f47d3 --- /dev/null +++ b/multisig/simulations/zksyncsepolia/vip-005/abi/NativeTokenGateway.json @@ -0,0 +1,376 @@ +[ + { + "inputs": [ + { + "internalType": "contract IVToken", + "name": "vWrappedNativeToken", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "NativeTokenTransferFailed", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddressNotAllowed", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroValueNotAllowed", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "SweepNative", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "SweepToken", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "vToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "TokensBorrowedAndUnwrapped", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "vToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "TokensRedeemedAndUnwrapped", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "vToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "TokensWrappedAndRepaid", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "vToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "TokensWrappedAndSupplied", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "borrowAmount", + "type": "uint256" + } + ], + "name": "borrowAndUnwrap", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pendingOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "redeemTokens", + "type": "uint256" + } + ], + "name": "redeemAndUnwrap", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "redeemAmount", + "type": "uint256" + } + ], + "name": "redeemUnderlyingAndUnwrap", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "sweepNative", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "token", + "type": "address" + } + ], + "name": "sweepToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "vWNativeToken", + "outputs": [ + { + "internalType": "contract IVToken", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "wNativeToken", + "outputs": [ + { + "internalType": "contract IWrappedNative", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "wrapAndRepay", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "minter", + "type": "address" + } + ], + "name": "wrapAndSupply", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } +] diff --git a/multisig/simulations/zksyncsepolia/vip-005/index.ts b/multisig/simulations/zksyncsepolia/vip-005/index.ts new file mode 100644 index 000000000..988c4f4e2 --- /dev/null +++ b/multisig/simulations/zksyncsepolia/vip-005/index.ts @@ -0,0 +1,31 @@ +import { expect } from "chai"; +import { Contract } from "ethers"; +import { ethers } from "hardhat"; +import { NETWORK_ADDRESSES } from "src/networkAddresses"; +import { forking, pretendExecutingVip } from "src/vip-framework"; + +import vip005, { NATIVE_TOKEN_GATEWAY_CORE_POOL } from "../../../proposals/zksyncsepolia/vip-005"; +import GATEWAY_ABI from "./abi/NativeTokenGateway.json"; + +const VWETH = "0x31eb7305f9fE281027028D0ba0d7f57ddA836d49"; +const WETH = "0x53F7e72C7ac55b44c7cd73cC13D4EF4b121678e6"; + +forking(3548843, async () => { + let nativeTokenGateway: Contract; + + before(async () => { + nativeTokenGateway = await ethers.getContractAt(GATEWAY_ABI, NATIVE_TOKEN_GATEWAY_CORE_POOL); + await pretendExecutingVip(await vip005()); + }); + + describe("Post tx checks", () => { + it("Should set owner to multisig", async () => { + expect(await nativeTokenGateway.owner()).equals(NETWORK_ADDRESSES.zksyncsepolia.GUARDIAN); + }); + + it("Should have correct owner vWETH and wETH addresses", async () => { + expect(await nativeTokenGateway.vWNativeToken()).to.be.equal(VWETH); + expect(await nativeTokenGateway.wNativeToken()).to.be.equal(WETH); + }); + }); +}); diff --git a/package.json b/package.json index f99adb99f..0ba3e0b04 100644 --- a/package.json +++ b/package.json @@ -70,7 +70,7 @@ "eslint-config-prettier": "^8.5.0", "ethers": "^5.7.2", "fs-extra": "^10.1.0", - "hardhat": "^2.12.2", + "hardhat": "2.19.5", "hardhat-gas-reporter": "^1.0.9", "husky": "^8.0.2", "lint-staged": "^13.0.4", diff --git a/simulations/vip-349/abi/ERC20.json b/simulations/vip-349/abi/ERC20.json new file mode 100644 index 000000000..02d30dd88 --- /dev/null +++ b/simulations/vip-349/abi/ERC20.json @@ -0,0 +1,231 @@ +[ + { "inputs": [], "payable": false, "stateMutability": "nonpayable", "type": "constructor" }, + { + "anonymous": false, + "inputs": [ + { "indexed": true, "internalType": "address", "name": "owner", "type": "address" }, + { "indexed": true, "internalType": "address", "name": "spender", "type": "address" }, + { "indexed": false, "internalType": "uint256", "name": "value", "type": "uint256" } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": true, "internalType": "address", "name": "previousOwner", "type": "address" }, + { "indexed": true, "internalType": "address", "name": "newOwner", "type": "address" } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": true, "internalType": "address", "name": "from", "type": "address" }, + { "indexed": true, "internalType": "address", "name": "to", "type": "address" }, + { "indexed": false, "internalType": "uint256", "name": "value", "type": "uint256" } + ], + "name": "Transfer", + "type": "event" + }, + { + "constant": true, + "inputs": [], + "name": "_decimals", + "outputs": [{ "internalType": "uint8", "name": "", "type": "uint8" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "_name", + "outputs": [{ "internalType": "string", "name": "", "type": "string" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "_symbol", + "outputs": [{ "internalType": "string", "name": "", "type": "string" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { "internalType": "address", "name": "owner", "type": "address" }, + { "internalType": "address", "name": "spender", "type": "address" } + ], + "name": "allowance", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "address", "name": "spender", "type": "address" }, + { "internalType": "uint256", "name": "amount", "type": "uint256" } + ], + "name": "approve", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [{ "internalType": "address", "name": "account", "type": "address" }], + "name": "balanceOf", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [{ "internalType": "uint256", "name": "amount", "type": "uint256" }], + "name": "burn", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "decimals", + "outputs": [{ "internalType": "uint8", "name": "", "type": "uint8" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "address", "name": "spender", "type": "address" }, + { "internalType": "uint256", "name": "subtractedValue", "type": "uint256" } + ], + "name": "decreaseAllowance", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getOwner", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "address", "name": "spender", "type": "address" }, + { "internalType": "uint256", "name": "addedValue", "type": "uint256" } + ], + "name": "increaseAllowance", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [{ "internalType": "uint256", "name": "amount", "type": "uint256" }], + "name": "mint", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "name", + "outputs": [{ "internalType": "string", "name": "", "type": "string" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "owner", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "symbol", + "outputs": [{ "internalType": "string", "name": "", "type": "string" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "totalSupply", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "address", "name": "recipient", "type": "address" }, + { "internalType": "uint256", "name": "amount", "type": "uint256" } + ], + "name": "transfer", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "address", "name": "sender", "type": "address" }, + { "internalType": "address", "name": "recipient", "type": "address" }, + { "internalType": "uint256", "name": "amount", "type": "uint256" } + ], + "name": "transferFrom", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [{ "internalType": "address", "name": "newOwner", "type": "address" }], + "name": "transferOwnership", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/simulations/vip-349/abi/VTreasury.json b/simulations/vip-349/abi/VTreasury.json new file mode 100644 index 000000000..df5a655ee --- /dev/null +++ b/simulations/vip-349/abi/VTreasury.json @@ -0,0 +1,83 @@ +[ + { + "anonymous": false, + "inputs": [ + { "indexed": true, "internalType": "address", "name": "previousOwner", "type": "address" }, + { "indexed": true, "internalType": "address", "name": "newOwner", "type": "address" } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": false, "internalType": "address", "name": "tokenAddress", "type": "address" }, + { "indexed": false, "internalType": "uint256", "name": "withdrawAmount", "type": "uint256" }, + { "indexed": false, "internalType": "address", "name": "withdrawAddress", "type": "address" } + ], + "name": "WithdrawTreasuryBEP20", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": false, "internalType": "uint256", "name": "withdrawAmount", "type": "uint256" }, + { "indexed": false, "internalType": "address", "name": "withdrawAddress", "type": "address" } + ], + "name": "WithdrawTreasuryBNB", + "type": "event" + }, + { "payable": true, "stateMutability": "payable", "type": "fallback" }, + { + "constant": true, + "inputs": [], + "name": "owner", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [{ "internalType": "address", "name": "newOwner", "type": "address" }], + "name": "transferOwnership", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "address", "name": "tokenAddress", "type": "address" }, + { "internalType": "uint256", "name": "withdrawAmount", "type": "uint256" }, + { "internalType": "address", "name": "withdrawAddress", "type": "address" } + ], + "name": "withdrawTreasuryBEP20", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "uint256", "name": "withdrawAmount", "type": "uint256" }, + { "internalType": "address payable", "name": "withdrawAddress", "type": "address" } + ], + "name": "withdrawTreasuryBNB", + "outputs": [], + "payable": true, + "stateMutability": "payable", + "type": "function" + } +] diff --git a/simulations/vip-349/bscmainnet.ts b/simulations/vip-349/bscmainnet.ts new file mode 100644 index 000000000..dfd084ae8 --- /dev/null +++ b/simulations/vip-349/bscmainnet.ts @@ -0,0 +1,41 @@ +import { expect } from "chai"; +import { BigNumber, Contract } from "ethers"; +import { ethers } from "hardhat"; + +import { expectEvents } from "../../src/utils"; +import { forking, testVip } from "../../src/vip-framework"; +import vip349, { COMMUNITY, USDT, USDT_AMOUNT, VAI, VAI_AMOUNT } from "../../vips/vip-349/bscmainnet"; +import ERC20_ABI from "./abi/ERC20.json"; +import VTREASURY_ABI from "./abi/VTreasury.json"; + +forking(41186097, async () => { + let vai: Contract; + let usdt: Contract; + + let prevUSDTBalance: BigNumber; + let prevVAIBalance: BigNumber; + + before(async () => { + vai = new ethers.Contract(VAI, ERC20_ABI, ethers.provider); + usdt = new ethers.Contract(USDT, ERC20_ABI, ethers.provider); + + prevUSDTBalance = await usdt.balanceOf(COMMUNITY); + prevVAIBalance = await vai.balanceOf(COMMUNITY); + }); + + testVip("VIP-349", await vip349(), { + callbackAfterExecution: async txResponse => { + await expectEvents(txResponse, [VTREASURY_ABI], ["WithdrawTreasuryBEP20"], [2]); + }, + }); + + describe("Post-VIP behavior", async () => { + it("check balances", async () => { + const usdtBalance = await usdt.balanceOf(COMMUNITY); + const vaiBalance = await vai.balanceOf(COMMUNITY); + + expect(usdtBalance.sub(prevUSDTBalance)).to.equal(USDT_AMOUNT); + expect(vaiBalance.sub(prevVAIBalance)).to.equal(VAI_AMOUNT); + }); + }); +}); diff --git a/src/networkAddresses.ts b/src/networkAddresses.ts index 356fc1727..19f8bacf4 100644 --- a/src/networkAddresses.ts +++ b/src/networkAddresses.ts @@ -163,9 +163,11 @@ export const NETWORK_ADDRESSES = { zksyncsepolia: { NORMAL_TIMELOCK: "", // To be deployed GUARDIAN: "0xa2f83de95E9F28eD443132C331B6a9C9B7a9F866", + GENERIC_TEST_USER_ACCOUNT: "0x6f057A858171e187124ddEDF034dAc63De5dE5dB", RESILIENT_ORACLE: "0x748853B3bE26c46b4562Fd314dfb82708F395bDf", CHAINLINK_ORACLE: "0x0DFf10dCdb3526010Df01ECc42076C25C27F8323", XVS: "0x3AeCac43A2ebe5D8184e650403bf9F656F9D1cfA", + XVS_VAULT_PROXY: "0x825f9EE3b2b1C159a5444A111A70607f3918564e", POOL_REGISTRY: "0x1401404e6279BB8C06E5E3999eCA3e2008B46A76", VTREASURY: "0x943eBE4460a12F551D60A68f510Ea10CD8d564BA", }, diff --git a/src/utils.ts b/src/utils.ts index 5a9eba8f4..3ff8ff522 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -116,6 +116,17 @@ const toRpcQuantity = (x: NumberLike): string => { return hex.startsWith("0x") ? hex.replace(/0x0+/, "0x") : `0x${hex}`; }; +export async function mineBlocks(blocks: NumberLike = 1, options: { interval?: NumberLike } = {}): Promise { + const interval = options.interval ?? 1; + const blocksHex = toRpcQuantity(blocks); + const intervalHex = toRpcQuantity(interval); + + await network.provider.request({ + method: "hardhat_mine", + params: [blocksHex, intervalHex], + }); +} + const getAdapterParam = (noOfCommands: number): string => { const requiredGas = calculateGasForAdapterParam(noOfCommands); const adapterParam = ethers.utils.solidityPack(["uint16", "uint256"], [1, requiredGas]); diff --git a/src/vip-framework/checks/checkXVSVault.ts b/src/vip-framework/checks/checkXVSVault.ts index 7a226611a..dd7cb37e3 100644 --- a/src/vip-framework/checks/checkXVSVault.ts +++ b/src/vip-framework/checks/checkXVSVault.ts @@ -1,21 +1,20 @@ -import { impersonateAccount, mine } from "@nomicfoundation/hardhat-network-helpers"; import { expect } from "chai"; -import { Contract } from "ethers"; +import { BigNumber, Contract } from "ethers"; import { parseUnits } from "ethers/lib/utils"; -import { FORKED_NETWORK, ethers } from "hardhat"; +import { FORKED_NETWORK, ethers, network } from "hardhat"; import { NETWORK_CONFIG } from "../../networkConfig"; -import { getForkedNetworkAddress } from "../../utils"; +import { getForkedNetworkAddress, initMainnetUser, mineBlocks } from "../../utils"; import XVSVault_ABI from "../abi/XVSVault.json"; import ERC20_ABI from "../abi/erc20.json"; const FORKED_NETWORK_CONFIG = FORKED_NETWORK && NETWORK_CONFIG[FORKED_NETWORK]; -const NORMAL_TIMELOCK = getForkedNetworkAddress("NORMAL_TIMELOCK"); const XVS = getForkedNetworkAddress("XVS"); const XVS_VAULT_PROXY = getForkedNetworkAddress("XVS_VAULT_PROXY"); const ACCOUNT = getForkedNetworkAddress("GENERIC_TEST_USER_ACCOUNT"); const POOL_ID = FORKED_NETWORK_CONFIG?.XVS_VAULT_POOL_ID; +const DEPOSIT_AMOUNT = parseUnits("1"); export const checkXVSVault = () => { describe("generic XVS Vault checks", () => { @@ -23,28 +22,51 @@ export const checkXVSVault = () => { let xvsVault: Contract; before(async () => { - await impersonateAccount(ACCOUNT); - await impersonateAccount(NORMAL_TIMELOCK); - const signer = await ethers.getSigner(ACCOUNT); + const signer = await initMainnetUser(ACCOUNT, parseUnits("10")); + xvs = await ethers.getContractAt(ERC20_ABI, XVS, signer); xvsVault = await ethers.getContractAt(XVSVault_ABI, XVS_VAULT_PROXY, signer); - - const accounts = await ethers.getSigners(); - await accounts[0].sendTransaction({ to: ACCOUNT, value: parseUnits("10") }); }); it("deposit and withdraw", async () => { - await xvsVault.claim(ACCOUNT, xvs.address, POOL_ID); + const feeData = await ethers.provider.getFeeData(); + const txnParams: { maxFeePerGas?: BigNumber } = {}; + + if (network.zksync && feeData.maxFeePerGas) { + // Sometimes the gas estimation is wrong with zksync + txnParams.maxFeePerGas = feeData.maxFeePerGas.mul(15).div(10); + } + // Claim already existing rewards and make it 0 for easier testing + await xvsVault.claim(ACCOUNT, xvs.address, POOL_ID, txnParams); + let originalBalance = await xvs.balanceOf(ACCOUNT); - await xvs.approve(xvsVault.address, parseUnits("1", 18)); - await expect(xvsVault.deposit(xvs.address, POOL_ID, parseUnits("1", 18))).to.be.not.reverted; + + // deposit XVS + await xvs.approve(xvsVault.address, parseUnits("1", 18), txnParams); + await expect(xvsVault.deposit(xvs.address, POOL_ID, DEPOSIT_AMOUNT, txnParams)).to.be.not.reverted; expect(await xvs.balanceOf(ACCOUNT)).to.be.lt(originalBalance); - originalBalance = await xvs.balanceOf(ACCOUNT); - await xvsVault.requestWithdrawal(xvs.address, POOL_ID, parseUnits("1", 18)); - await mine(10000); - await xvsVault.claim(ACCOUNT, xvs.address, POOL_ID); + // Test claim + originalBalance = await xvs.balanceOf(ACCOUNT); + await mineBlocks(5); + await xvsVault.claim(ACCOUNT, xvs.address, POOL_ID, txnParams); expect(await xvs.balanceOf(ACCOUNT)).to.be.gte(originalBalance); + + // Test withdrawal + await xvsVault.requestWithdrawal(xvs.address, POOL_ID, parseUnits("1", 18), txnParams); + await expect(xvsVault.executeWithdrawal(xvs.address, POOL_ID, txnParams)).to.be.reverted; + + // Can only withdraw after the lock period passes + const blockTimestamp = (await ethers.provider.getBlock("latest")).timestamp; + const targetTimestamp = blockTimestamp + 604800; + await ethers.provider.send("evm_setNextBlockTimestamp", [targetTimestamp]); + await mineBlocks(); + + originalBalance = await xvs.balanceOf(ACCOUNT); + await expect(xvsVault.executeWithdrawal(xvs.address, POOL_ID, txnParams)).to.not.be.reverted; + + const updatedBalancePostWithdraw = await xvs.balanceOf(ACCOUNT); + expect(updatedBalancePostWithdraw.sub(originalBalance)).equals(DEPOSIT_AMOUNT); }); }); }; diff --git a/vips/vip-349/bscmainnet.ts b/vips/vip-349/bscmainnet.ts new file mode 100644 index 000000000..69c82c1ed --- /dev/null +++ b/vips/vip-349/bscmainnet.ts @@ -0,0 +1,59 @@ +import { parseUnits } from "ethers/lib/utils"; +import { ProposalType } from "src/types"; +import { makeProposal } from "src/utils"; + +export const USDT = "0x55d398326f99059fF775485246999027B3197955"; +export const VAI = "0x4BD17003473389A42DAF6a0a729f6Fdb328BbBd7"; + +export const COMMUNITY = "0xc444949e0054A23c44Fc45789738bdF64aed2391"; +export const VTREASURY = "0xF322942f644A996A617BD29c16bd7d231d9F35E9"; + +export const USDT_AMOUNT = parseUnits("193000", 18); +export const VAI_AMOUNT = parseUnits("200000", 18); + +export const vip349 = () => { + const meta = { + version: "v2", + title: "VIP-349 Venus Stars Program Renewal", + description: `#### Summary + +If passed, this VIP will transfer to the [Venus Community Wallet](https://bscscan.com/address/0xc444949e0054A23c44Fc45789738bdF64aed2391) 193,000 USDT and 200,000 VAI, from the [Venus Treasury](https://bscscan.com/address/0xf322942f644a996a617bd29c16bd7d231d9f35e9): the budget for the annual Venus Stars Program (Ambassador Program) renewal for the period of July 2024 - June 2025. All unused funds will be carried over and used in the next period as previously. + +#### Description + +The Venus Stars Team suggests revising and enhancing the budget for the Venus Ambassadors program. With Venus expanding to multiple new blockchains, additional resources are necessary. The proposed restructuring aims to ensure that resources are appropriately allocated to meet the program's increasing needs, enabling effective outreach and support for our global community. + +#### Details + +- The estimated yearly budget total is $393K. We propose using a mix of VAI tokens already accumulated in the Venus Treasury and USDT to fund the program. +- This VIP will transfer: 200,000 VAI and 193,000 USDT to the Venus Community wallet address: [0xc444949e0054A23c44Fc45789738bdF64aed2391](https://bscscan.com/address/0xc444949e0054A23c44Fc45789738bdF64aed2391) + +#### References + +- [Venus Stars Program Renewal Snapshot](https://snapshot.org/#/venus-xvs.eth/proposal/0xfc7200b104fc61aa283ef25136c7d48d686f1edc2bb684d3da2904508ac69aa8) +- [Proposal: Venus Stars Program Renewal 2024](https://community.venus.io/t/proposal-venus-stars-program-renewal-2024/4488) +- [VIP simulation](https://github.com/VenusProtocol/vips/pull/343)`, + forDescription: "I agree that Venus Protocol should proceed with this proposal", + againstDescription: "I do not think that Venus Protocol should proceed with this proposal", + abstainDescription: "I am indifferent to whether Venus Protocol proceeds or not", + }; + + return makeProposal( + [ + { + target: VTREASURY, + signature: "withdrawTreasuryBEP20(address,uint256,address)", + params: [USDT, USDT_AMOUNT, COMMUNITY], + }, + { + target: VTREASURY, + signature: "withdrawTreasuryBEP20(address,uint256,address)", + params: [VAI, VAI_AMOUNT, COMMUNITY], + }, + ], + meta, + ProposalType.REGULAR, + ); +}; + +export default vip349; diff --git a/yarn.lock b/yarn.lock index 80e3dd3ba..81a7fcb99 100644 --- a/yarn.lock +++ b/yarn.lock @@ -219,6 +219,52 @@ __metadata: languageName: node linkType: hard +"@chainsafe/as-sha256@npm:^0.3.1": + version: 0.3.1 + resolution: "@chainsafe/as-sha256@npm:0.3.1" + checksum: 58ea733be1657b0e31dbf48b0dba862da0833df34a81c1460c7352f04ce90874f70003cbf34d0afb9e5e53a33ee2d63a261a8b12462be85b2ba0a6f7f13d6150 + languageName: node + linkType: hard + +"@chainsafe/persistent-merkle-tree@npm:^0.4.2": + version: 0.4.2 + resolution: "@chainsafe/persistent-merkle-tree@npm:0.4.2" + dependencies: + "@chainsafe/as-sha256": ^0.3.1 + checksum: f9cfcb2132a243992709715dbd28186ab48c7c0c696f29d30857693cca5526bf753974a505ef68ffd5623bbdbcaa10f9083f4dd40bf99eb6408e451cc26a1a9e + languageName: node + linkType: hard + +"@chainsafe/persistent-merkle-tree@npm:^0.5.0": + version: 0.5.0 + resolution: "@chainsafe/persistent-merkle-tree@npm:0.5.0" + dependencies: + "@chainsafe/as-sha256": ^0.3.1 + checksum: 2c67203da776c79cd3a6132e2d672fe132393b2e63dc71604e3134acc8c0ec25cc5e431051545939ea0f7c5ff2066fb806b9e5cab974ca085d046226a1671f7d + languageName: node + linkType: hard + +"@chainsafe/ssz@npm:^0.10.0": + version: 0.10.2 + resolution: "@chainsafe/ssz@npm:0.10.2" + dependencies: + "@chainsafe/as-sha256": ^0.3.1 + "@chainsafe/persistent-merkle-tree": ^0.5.0 + checksum: 6bb70cf741d0a19dd0b28b3f6f067b96fa39f556e2eefa6ac745b21db9c3b3a8393dc3cca8ff4a6ce065ed71ddc3fb1b2b390a92004b9d01067c26e2558e5503 + languageName: node + linkType: hard + +"@chainsafe/ssz@npm:^0.9.2": + version: 0.9.4 + resolution: "@chainsafe/ssz@npm:0.9.4" + dependencies: + "@chainsafe/as-sha256": ^0.3.1 + "@chainsafe/persistent-merkle-tree": ^0.4.2 + case: ^1.6.3 + checksum: c6eaedeae9e5618b3c666ff4507a27647f665a8dcf17d5ca86da4ed4788c5a93868f256d0005467d184fdf35ec03f323517ec2e55ec42492d769540a2ec396bc + languageName: node + linkType: hard + "@colors/colors@npm:1.5.0": version: 1.5.0 resolution: "@colors/colors@npm:1.5.0" @@ -858,7 +904,7 @@ __metadata: languageName: node linkType: hard -"@ethersproject/providers@npm:5.7.2, @ethersproject/providers@npm:^5.4.4, @ethersproject/providers@npm:^5.7.0, @ethersproject/providers@npm:^5.7.2": +"@ethersproject/providers@npm:5.7.2, @ethersproject/providers@npm:^5.4.4, @ethersproject/providers@npm:^5.7.0, @ethersproject/providers@npm:^5.7.1, @ethersproject/providers@npm:^5.7.2": version: 5.7.2 resolution: "@ethersproject/providers@npm:5.7.2" dependencies: @@ -1421,13 +1467,6 @@ __metadata: languageName: node linkType: hard -"@nomicfoundation/edr-darwin-arm64@npm:0.5.2": - version: 0.5.2 - resolution: "@nomicfoundation/edr-darwin-arm64@npm:0.5.2" - checksum: f6ab386603c6e080fe7f611b739eb6d1d6a370220318b725cb582702563577150b3be14b6d0be71cb72bdb854e6992c587ecfc6833216f750eae8e7cd96de46f - languageName: node - linkType: hard - "@nomicfoundation/edr-darwin-x64@npm:0.4.2": version: 0.4.2 resolution: "@nomicfoundation/edr-darwin-x64@npm:0.4.2" @@ -1435,13 +1474,6 @@ __metadata: languageName: node linkType: hard -"@nomicfoundation/edr-darwin-x64@npm:0.5.2": - version: 0.5.2 - resolution: "@nomicfoundation/edr-darwin-x64@npm:0.5.2" - checksum: 6f91f6d0294c0450e0501983f1de34a48582fe93f48428bc4b798ac93bb5483a96d626c2b4c62ac91102f00c826a3f9bfa16d748301440ebe1bbb2920ba3ba6d - languageName: node - linkType: hard - "@nomicfoundation/edr-linux-arm64-gnu@npm:0.4.2": version: 0.4.2 resolution: "@nomicfoundation/edr-linux-arm64-gnu@npm:0.4.2" @@ -1449,13 +1481,6 @@ __metadata: languageName: node linkType: hard -"@nomicfoundation/edr-linux-arm64-gnu@npm:0.5.2": - version: 0.5.2 - resolution: "@nomicfoundation/edr-linux-arm64-gnu@npm:0.5.2" - checksum: bd84cc2741bb2be3c3a60bae9dbb8ca7794a68b8675684c97f2c6e7310e5cba7efd1cf18d392d42481cda83fb478f83c0bd605104c5cf08bab44ec07669c3010 - languageName: node - linkType: hard - "@nomicfoundation/edr-linux-arm64-musl@npm:0.4.2": version: 0.4.2 resolution: "@nomicfoundation/edr-linux-arm64-musl@npm:0.4.2" @@ -1463,13 +1488,6 @@ __metadata: languageName: node linkType: hard -"@nomicfoundation/edr-linux-arm64-musl@npm:0.5.2": - version: 0.5.2 - resolution: "@nomicfoundation/edr-linux-arm64-musl@npm:0.5.2" - checksum: e7f7d82f16be1b26805bd90964c456aecb4a6a1397e87d507810d37bd383064271fa63932564e725fdb30868925334338ec459fe32f84fc11206644b7b37825c - languageName: node - linkType: hard - "@nomicfoundation/edr-linux-x64-gnu@npm:0.4.2": version: 0.4.2 resolution: "@nomicfoundation/edr-linux-x64-gnu@npm:0.4.2" @@ -1477,13 +1495,6 @@ __metadata: languageName: node linkType: hard -"@nomicfoundation/edr-linux-x64-gnu@npm:0.5.2": - version: 0.5.2 - resolution: "@nomicfoundation/edr-linux-x64-gnu@npm:0.5.2" - checksum: ec025bf75227638b6b2cd01b7ba01b3ddaddf54c4d18d25e9d0364ac621981be2aaf124f4e60a88da5c9e267adb41a660a42668e2d6c9a6a57e55e8671fc76f1 - languageName: node - linkType: hard - "@nomicfoundation/edr-linux-x64-musl@npm:0.4.2": version: 0.4.2 resolution: "@nomicfoundation/edr-linux-x64-musl@npm:0.4.2" @@ -1491,13 +1502,6 @@ __metadata: languageName: node linkType: hard -"@nomicfoundation/edr-linux-x64-musl@npm:0.5.2": - version: 0.5.2 - resolution: "@nomicfoundation/edr-linux-x64-musl@npm:0.5.2" - checksum: c9ff47f72645492383b2a598675878abc029b86325e2c457db1b2c4281916e11e4ef6336c355d40ae3c1736595bc43da51cfcf1e923464011f526f4db64c245b - languageName: node - linkType: hard - "@nomicfoundation/edr-win32-x64-msvc@npm:0.4.2": version: 0.4.2 resolution: "@nomicfoundation/edr-win32-x64-msvc@npm:0.4.2" @@ -1505,13 +1509,6 @@ __metadata: languageName: node linkType: hard -"@nomicfoundation/edr-win32-x64-msvc@npm:0.5.2": - version: 0.5.2 - resolution: "@nomicfoundation/edr-win32-x64-msvc@npm:0.5.2" - checksum: 56da7a1283470dede413cda5f2fef96e10250ec7a25562254ca0cd8045a653212c91e40fbcf37330e7af4e036d3c3aed83ea617831f9c7a5424389c73c53ed4e - languageName: node - linkType: hard - "@nomicfoundation/edr@npm:^0.4.1": version: 0.4.2 resolution: "@nomicfoundation/edr@npm:0.4.2" @@ -1527,18 +1524,49 @@ __metadata: languageName: node linkType: hard -"@nomicfoundation/edr@npm:^0.5.0": - version: 0.5.2 - resolution: "@nomicfoundation/edr@npm:0.5.2" +"@nomicfoundation/ethereumjs-block@npm:5.0.2": + version: 5.0.2 + resolution: "@nomicfoundation/ethereumjs-block@npm:5.0.2" + dependencies: + "@nomicfoundation/ethereumjs-common": 4.0.2 + "@nomicfoundation/ethereumjs-rlp": 5.0.2 + "@nomicfoundation/ethereumjs-trie": 6.0.2 + "@nomicfoundation/ethereumjs-tx": 5.0.2 + "@nomicfoundation/ethereumjs-util": 9.0.2 + ethereum-cryptography: 0.1.3 + ethers: ^5.7.1 + checksum: 7ff744f44a01f1c059ca7812a1cfc8089f87aa506af6cb39c78331dca71b32993cbd6fa05ad03f8c4f4fab73bb998a927af69e0d8ff01ae192ee5931606e09f5 + languageName: node + linkType: hard + +"@nomicfoundation/ethereumjs-blockchain@npm:7.0.2": + version: 7.0.2 + resolution: "@nomicfoundation/ethereumjs-blockchain@npm:7.0.2" + dependencies: + "@nomicfoundation/ethereumjs-block": 5.0.2 + "@nomicfoundation/ethereumjs-common": 4.0.2 + "@nomicfoundation/ethereumjs-ethash": 3.0.2 + "@nomicfoundation/ethereumjs-rlp": 5.0.2 + "@nomicfoundation/ethereumjs-trie": 6.0.2 + "@nomicfoundation/ethereumjs-tx": 5.0.2 + "@nomicfoundation/ethereumjs-util": 9.0.2 + abstract-level: ^1.0.3 + debug: ^4.3.3 + ethereum-cryptography: 0.1.3 + level: ^8.0.0 + lru-cache: ^5.1.1 + memory-level: ^1.0.0 + checksum: b7e440dcd73e32aa72d13bfd28cb472773c9c60ea808a884131bf7eb3f42286ad594a0864215f599332d800f3fe1f772fff4b138d2dcaa8f41e4d8389bff33e7 + languageName: node + linkType: hard + +"@nomicfoundation/ethereumjs-common@npm:4.0.2": + version: 4.0.2 + resolution: "@nomicfoundation/ethereumjs-common@npm:4.0.2" dependencies: - "@nomicfoundation/edr-darwin-arm64": 0.5.2 - "@nomicfoundation/edr-darwin-x64": 0.5.2 - "@nomicfoundation/edr-linux-arm64-gnu": 0.5.2 - "@nomicfoundation/edr-linux-arm64-musl": 0.5.2 - "@nomicfoundation/edr-linux-x64-gnu": 0.5.2 - "@nomicfoundation/edr-linux-x64-musl": 0.5.2 - "@nomicfoundation/edr-win32-x64-msvc": 0.5.2 - checksum: 336b1c7cad96fa78410f0c9cc9524abe9fb1e56384fe990b98bfd17f15f25b4665ad8f0525ccd9511f7c19173841fe712d50db993078629e2fc4047fda4665dc + "@nomicfoundation/ethereumjs-util": 9.0.2 + crc-32: ^1.2.0 + checksum: f0d84704d6254d374299c19884312bd5666974b4b6f342d3f10bc76e549de78d20e45a53d25fbdc146268a52335497127e4f069126da7c60ac933a158e704887 languageName: node linkType: hard @@ -1551,6 +1579,45 @@ __metadata: languageName: node linkType: hard +"@nomicfoundation/ethereumjs-ethash@npm:3.0.2": + version: 3.0.2 + resolution: "@nomicfoundation/ethereumjs-ethash@npm:3.0.2" + dependencies: + "@nomicfoundation/ethereumjs-block": 5.0.2 + "@nomicfoundation/ethereumjs-rlp": 5.0.2 + "@nomicfoundation/ethereumjs-util": 9.0.2 + abstract-level: ^1.0.3 + bigint-crypto-utils: ^3.0.23 + ethereum-cryptography: 0.1.3 + checksum: e4011e4019dd9b92f7eeebfc1e6c9a9685c52d8fd0ee4f28f03e50048a23b600c714490827f59fdce497b3afb503b3fd2ebf6815ff307e9949c3efeff1403278 + languageName: node + linkType: hard + +"@nomicfoundation/ethereumjs-evm@npm:2.0.2": + version: 2.0.2 + resolution: "@nomicfoundation/ethereumjs-evm@npm:2.0.2" + dependencies: + "@ethersproject/providers": ^5.7.1 + "@nomicfoundation/ethereumjs-common": 4.0.2 + "@nomicfoundation/ethereumjs-tx": 5.0.2 + "@nomicfoundation/ethereumjs-util": 9.0.2 + debug: ^4.3.3 + ethereum-cryptography: 0.1.3 + mcl-wasm: ^0.7.1 + rustbn.js: ~0.2.0 + checksum: a23cf570836ddc147606b02df568069de946108e640f902358fef67e589f6b371d856056ee44299d9b4e3497f8ae25faa45e6b18fefd90e9b222dc6a761d85f0 + languageName: node + linkType: hard + +"@nomicfoundation/ethereumjs-rlp@npm:5.0.2": + version: 5.0.2 + resolution: "@nomicfoundation/ethereumjs-rlp@npm:5.0.2" + bin: + rlp: bin/rlp + checksum: a74434cadefca9aa8754607cc1ad7bb4bbea4ee61c6214918e60a5bbee83206850346eb64e39fd1fe97f854c7ec0163e01148c0c881dda23881938f0645a0ef2 + languageName: node + linkType: hard + "@nomicfoundation/ethereumjs-rlp@npm:5.0.4": version: 5.0.4 resolution: "@nomicfoundation/ethereumjs-rlp@npm:5.0.4" @@ -1560,6 +1627,47 @@ __metadata: languageName: node linkType: hard +"@nomicfoundation/ethereumjs-statemanager@npm:2.0.2": + version: 2.0.2 + resolution: "@nomicfoundation/ethereumjs-statemanager@npm:2.0.2" + dependencies: + "@nomicfoundation/ethereumjs-common": 4.0.2 + "@nomicfoundation/ethereumjs-rlp": 5.0.2 + debug: ^4.3.3 + ethereum-cryptography: 0.1.3 + ethers: ^5.7.1 + js-sdsl: ^4.1.4 + checksum: 3ab6578e252e53609afd98d8ba42a99f182dcf80252f23ed9a5e0471023ffb2502130f85fc47fa7c94cd149f9be799ed9a0942ca52a143405be9267f4ad94e64 + languageName: node + linkType: hard + +"@nomicfoundation/ethereumjs-trie@npm:6.0.2": + version: 6.0.2 + resolution: "@nomicfoundation/ethereumjs-trie@npm:6.0.2" + dependencies: + "@nomicfoundation/ethereumjs-rlp": 5.0.2 + "@nomicfoundation/ethereumjs-util": 9.0.2 + "@types/readable-stream": ^2.3.13 + ethereum-cryptography: 0.1.3 + readable-stream: ^3.6.0 + checksum: d4da918d333851b9f2cce7dbd25ab5753e0accd43d562d98fd991b168b6a08d1794528f0ade40fe5617c84900378376fe6256cdbe52c8d66bf4c53293bbc7c40 + languageName: node + linkType: hard + +"@nomicfoundation/ethereumjs-tx@npm:5.0.2": + version: 5.0.2 + resolution: "@nomicfoundation/ethereumjs-tx@npm:5.0.2" + dependencies: + "@chainsafe/ssz": ^0.9.2 + "@ethersproject/providers": ^5.7.2 + "@nomicfoundation/ethereumjs-common": 4.0.2 + "@nomicfoundation/ethereumjs-rlp": 5.0.2 + "@nomicfoundation/ethereumjs-util": 9.0.2 + ethereum-cryptography: 0.1.3 + checksum: 0bbcea75786b2ccb559afe2ecc9866fb4566a9f157b6ffba4f50960d14f4b3da2e86e273f6fadda9b860e67cfcabf589970fb951b328cb5f900a585cd21842a2 + languageName: node + linkType: hard + "@nomicfoundation/ethereumjs-tx@npm:5.0.4": version: 5.0.4 resolution: "@nomicfoundation/ethereumjs-tx@npm:5.0.4" @@ -1577,6 +1685,17 @@ __metadata: languageName: node linkType: hard +"@nomicfoundation/ethereumjs-util@npm:9.0.2": + version: 9.0.2 + resolution: "@nomicfoundation/ethereumjs-util@npm:9.0.2" + dependencies: + "@chainsafe/ssz": ^0.10.0 + "@nomicfoundation/ethereumjs-rlp": 5.0.2 + ethereum-cryptography: 0.1.3 + checksum: 3a08f7b88079ef9f53b43da9bdcb8195498fd3d3911c2feee2571f4d1204656053f058b2f650471c86f7d2d0ba2f814768c7cfb0f266eede41c848356afc4900 + languageName: node + linkType: hard + "@nomicfoundation/ethereumjs-util@npm:9.0.4, @nomicfoundation/ethereumjs-util@npm:^9.0.4": version: 9.0.4 resolution: "@nomicfoundation/ethereumjs-util@npm:9.0.4" @@ -1592,6 +1711,27 @@ __metadata: languageName: node linkType: hard +"@nomicfoundation/ethereumjs-vm@npm:7.0.2": + version: 7.0.2 + resolution: "@nomicfoundation/ethereumjs-vm@npm:7.0.2" + dependencies: + "@nomicfoundation/ethereumjs-block": 5.0.2 + "@nomicfoundation/ethereumjs-blockchain": 7.0.2 + "@nomicfoundation/ethereumjs-common": 4.0.2 + "@nomicfoundation/ethereumjs-evm": 2.0.2 + "@nomicfoundation/ethereumjs-rlp": 5.0.2 + "@nomicfoundation/ethereumjs-statemanager": 2.0.2 + "@nomicfoundation/ethereumjs-trie": 6.0.2 + "@nomicfoundation/ethereumjs-tx": 5.0.2 + "@nomicfoundation/ethereumjs-util": 9.0.2 + debug: ^4.3.3 + ethereum-cryptography: 0.1.3 + mcl-wasm: ^0.7.1 + rustbn.js: ~0.2.0 + checksum: 1c25ba4d0644cadb8a2b0241a4bb02e578bfd7f70e3492b855c2ab5c120cb159cb8f7486f84dc1597884bd1697feedbfb5feb66e91352afb51f3694fd8e4a043 + languageName: node + linkType: hard + "@nomicfoundation/hardhat-chai-matchers@npm:^1.0.4": version: 1.0.6 resolution: "@nomicfoundation/hardhat-chai-matchers@npm:1.0.6" @@ -2533,6 +2673,16 @@ __metadata: languageName: node linkType: hard +"@types/readable-stream@npm:^2.3.13": + version: 2.3.15 + resolution: "@types/readable-stream@npm:2.3.15" + dependencies: + "@types/node": "*" + safe-buffer: ~5.1.1 + checksum: ec36f525cad09b6c65a1dafcb5ad99b9e2ed824ec49b7aa23180ac427e5d35b8a0706193ecd79ab4253a283ad485ba03d5917a98daaaa144f0ea34f4823e9d82 + languageName: node + linkType: hard + "@types/readline-sync@npm:^1.4.8": version: 1.4.8 resolution: "@types/readline-sync@npm:1.4.8" @@ -2892,7 +3042,7 @@ __metadata: eslint-config-prettier: ^8.5.0 ethers: ^5.7.2 fs-extra: ^10.1.0 - hardhat: ^2.12.2 + hardhat: 2.19.5 hardhat-gas-reporter: ^1.0.9 husky: ^8.0.2 lint-staged: ^13.0.4 @@ -2948,6 +3098,21 @@ __metadata: languageName: node linkType: hard +"abstract-level@npm:^1.0.0, abstract-level@npm:^1.0.2, abstract-level@npm:^1.0.3, abstract-level@npm:^1.0.4": + version: 1.0.4 + resolution: "abstract-level@npm:1.0.4" + dependencies: + buffer: ^6.0.3 + catering: ^2.1.0 + is-buffer: ^2.0.5 + level-supports: ^4.0.0 + level-transcoder: ^1.0.1 + module-error: ^1.0.1 + queue-microtask: ^1.2.3 + checksum: 5b70d08926f5234c3c23ffca848542af4def780dc96d6ca35a81659af80e6439c46f5106bd14a5ea37465173d7dcc8294317048b0194fdf6480103edc4aa9e63 + languageName: node + linkType: hard + "accepts@npm:~1.3.8": version: 1.3.8 resolution: "accepts@npm:1.3.8" @@ -3415,6 +3580,13 @@ __metadata: languageName: node linkType: hard +"bigint-crypto-utils@npm:^3.0.23": + version: 3.3.0 + resolution: "bigint-crypto-utils@npm:3.3.0" + checksum: 9598ce57b23f776c8936d44114c9f051e62b5fa654915b664784cbcbacc5aa0485f4479571c51ff58008abb1210c0d6a234853742f07cf84bda890f2a1e01000 + languageName: node + linkType: hard + "bignumber.js@npm:^9.0.0, bignumber.js@npm:^9.1.2": version: 9.1.2 resolution: "bignumber.js@npm:9.1.2" @@ -3556,6 +3728,18 @@ __metadata: languageName: node linkType: hard +"browser-level@npm:^1.0.1": + version: 1.0.1 + resolution: "browser-level@npm:1.0.1" + dependencies: + abstract-level: ^1.0.2 + catering: ^2.1.1 + module-error: ^1.0.2 + run-parallel-limit: ^1.1.0 + checksum: 67fbc77ce832940bfa25073eccff279f512ad56f545deb996a5b23b02316f5e76f4a79d381acc27eda983f5c9a2566aaf9c97e4fdd0748288c4407307537a29b + languageName: node + linkType: hard + "browser-stdout@npm:^1.3.1": version: 1.3.1 resolution: "browser-stdout@npm:1.3.1" @@ -3663,6 +3847,16 @@ __metadata: languageName: node linkType: hard +"buffer@npm:^6.0.3": + version: 6.0.3 + resolution: "buffer@npm:6.0.3" + dependencies: + base64-js: ^1.3.1 + ieee754: ^1.2.1 + checksum: 5ad23293d9a731e4318e420025800b42bf0d264004c0286c8cc010af7a270c7a0f6522e84f54b9ad65cbd6db20b8badbfd8d2ebf4f80fa03dab093b89e68c3f9 + languageName: node + linkType: hard + "bufferutil@npm:^4.0.1": version: 4.0.8 resolution: "bufferutil@npm:4.0.8" @@ -3795,6 +3989,13 @@ __metadata: languageName: node linkType: hard +"case@npm:^1.6.3": + version: 1.6.3 + resolution: "case@npm:1.6.3" + checksum: febe73278f910b0d28aab7efd6f51c235f9aa9e296148edb56dfb83fd58faa88308c30ce9a0122b6e53e0362c44f4407105bd5ef89c46860fc2b184e540fd68d + languageName: node + linkType: hard + "caseless@npm:^0.12.0, caseless@npm:~0.12.0": version: 0.12.0 resolution: "caseless@npm:0.12.0" @@ -3802,6 +4003,13 @@ __metadata: languageName: node linkType: hard +"catering@npm:^2.1.0, catering@npm:^2.1.1": + version: 2.1.1 + resolution: "catering@npm:2.1.1" + checksum: 205daefa69c935b0c19f3d8f2e0a520dd69aebe9bda55902958003f7c9cff8f967dfb90071b421bd6eb618576f657a89d2bc0986872c9bc04bbd66655e9d4bd6 + languageName: node + linkType: hard + "cbor@npm:^8.1.0": version: 8.1.0 resolution: "cbor@npm:8.1.0" @@ -3967,6 +4175,20 @@ __metadata: languageName: node linkType: hard +"classic-level@npm:^1.2.0": + version: 1.4.1 + resolution: "classic-level@npm:1.4.1" + dependencies: + abstract-level: ^1.0.2 + catering: ^2.1.0 + module-error: ^1.0.1 + napi-macros: ^2.2.2 + node-gyp: latest + node-gyp-build: ^4.3.0 + checksum: 62e7e07297fcd656941eb88f92b91df0046ebb2b34987e98ec870cb736f096e212ef109a25541deba2f30866b9d5df550594ed04948614815dd5964933da50a9 + languageName: node + linkType: hard + "clean-stack@npm:^2.0.0": version: 2.2.0 resolution: "clean-stack@npm:2.2.0" @@ -4197,6 +4419,13 @@ __metadata: languageName: node linkType: hard +"commander@npm:3.0.2": + version: 3.0.2 + resolution: "commander@npm:3.0.2" + checksum: 6d14ad030d1904428139487ed31febcb04c1604db2b8d9fae711f60ee6718828dc0e11602249e91c8a97b0e721e9c6d53edbc166bad3cde1596851d59a8f824d + languageName: node + linkType: hard + "commander@npm:^8.1.0": version: 8.3.0 resolution: "commander@npm:8.3.0" @@ -4648,6 +4877,18 @@ __metadata: languageName: node linkType: hard +"debug@npm:^4.3.3": + version: 4.3.6 + resolution: "debug@npm:4.3.6" + dependencies: + ms: 2.1.2 + peerDependenciesMeta: + supports-color: + optional: true + checksum: 1630b748dea3c581295e02137a9f5cbe2c1d85fea35c1e6597a65ca2b16a6fce68cec61b299d480787ef310ba927dc8c92d3061faba0ad06c6a724672f66be7f + languageName: node + linkType: hard + "decamelize-keys@npm:^1.1.0": version: 1.1.1 resolution: "decamelize-keys@npm:1.1.1" @@ -5566,7 +5807,7 @@ __metadata: languageName: node linkType: hard -"ethers@npm:^5.6.8, ethers@npm:^5.7.0, ethers@npm:^5.7.2, ethers@npm:~5.7.0, ethers@npm:~5.7.2": +"ethers@npm:^5.6.8, ethers@npm:^5.7.0, ethers@npm:^5.7.1, ethers@npm:^5.7.2, ethers@npm:~5.7.0, ethers@npm:~5.7.2": version: 5.7.2 resolution: "ethers@npm:5.7.2" dependencies: @@ -6124,6 +6365,19 @@ __metadata: languageName: node linkType: hard +"fs-extra@npm:^0.30.0": + version: 0.30.0 + resolution: "fs-extra@npm:0.30.0" + dependencies: + graceful-fs: ^4.1.2 + jsonfile: ^2.1.0 + klaw: ^1.0.0 + path-is-absolute: ^1.0.0 + rimraf: ^2.2.8 + checksum: 6edfd65fc813baa27f1603778c0f5ec11f8c5006a20b920437813ee2023eba18aeec8bef1c89b2e6c84f9fc90fdc7c916f4a700466c8c69d22a35d018f2570f0 + languageName: node + linkType: hard + "fs-extra@npm:^10.0.0, fs-extra@npm:^10.1.0": version: 10.1.0 resolution: "fs-extra@npm:10.1.0" @@ -6247,6 +6501,13 @@ __metadata: languageName: node linkType: hard +"functional-red-black-tree@npm:^1.0.1": + version: 1.0.1 + resolution: "functional-red-black-tree@npm:1.0.1" + checksum: ca6c170f37640e2d94297da8bb4bf27a1d12bea3e00e6a3e007fd7aa32e37e000f5772acf941b4e4f3cf1c95c3752033d0c509af157ad8f526e7f00723b9eb9f + languageName: node + linkType: hard + "functions-have-names@npm:^1.2.3": version: 1.2.3 resolution: "functions-have-names@npm:1.2.3" @@ -6569,7 +6830,7 @@ __metadata: languageName: node linkType: hard -"graceful-fs@npm:^4.1.2, graceful-fs@npm:^4.1.6, graceful-fs@npm:^4.2.0, graceful-fs@npm:^4.2.4, graceful-fs@npm:^4.2.6": +"graceful-fs@npm:^4.1.2, graceful-fs@npm:^4.1.6, graceful-fs@npm:^4.1.9, graceful-fs@npm:^4.2.0, graceful-fs@npm:^4.2.4, graceful-fs@npm:^4.2.6": version: 4.2.11 resolution: "graceful-fs@npm:4.2.11" checksum: ac85f94da92d8eb6b7f5a8b20ce65e43d66761c55ce85ac96df6865308390da45a8d3f0296dd3a663de65d30ba497bd46c696cc1e248c72b13d6d567138a4fc7 @@ -6726,16 +6987,22 @@ __metadata: languageName: node linkType: hard -"hardhat@npm:^2.12.2": - version: 2.22.7 - resolution: "hardhat@npm:2.22.7" +"hardhat@npm:2.19.5": + version: 2.19.5 + resolution: "hardhat@npm:2.19.5" dependencies: "@ethersproject/abi": ^5.1.2 "@metamask/eth-sig-util": ^4.0.0 - "@nomicfoundation/edr": ^0.5.0 - "@nomicfoundation/ethereumjs-common": 4.0.4 - "@nomicfoundation/ethereumjs-tx": 5.0.4 - "@nomicfoundation/ethereumjs-util": 9.0.4 + "@nomicfoundation/ethereumjs-block": 5.0.2 + "@nomicfoundation/ethereumjs-blockchain": 7.0.2 + "@nomicfoundation/ethereumjs-common": 4.0.2 + "@nomicfoundation/ethereumjs-evm": 2.0.2 + "@nomicfoundation/ethereumjs-rlp": 5.0.2 + "@nomicfoundation/ethereumjs-statemanager": 2.0.2 + "@nomicfoundation/ethereumjs-trie": 6.0.2 + "@nomicfoundation/ethereumjs-tx": 5.0.2 + "@nomicfoundation/ethereumjs-util": 9.0.2 + "@nomicfoundation/ethereumjs-vm": 7.0.2 "@nomicfoundation/solidity-analyzer": ^0.1.0 "@sentry/node": ^5.18.1 "@types/bn.js": ^5.1.0 @@ -6766,7 +7033,7 @@ __metadata: raw-body: ^2.4.1 resolve: 1.17.0 semver: ^6.3.0 - solc: 0.8.26 + solc: 0.7.3 source-map-support: ^0.5.13 stacktrace-parser: ^0.1.10 tsort: 0.0.1 @@ -6783,7 +7050,7 @@ __metadata: optional: true bin: hardhat: internal/cli/bootstrap.js - checksum: 3b630db8c337d47d220ab0a94a009e61da0a4bb08cc4576ae33cb50e57d9dbb577ab64a85211914fc511e59cd5fca55c986e9ee2180c2e05657c084a14128b16 + checksum: 316b03a1d090360e6ed471fe125360ec0c66c5bb62e29492898932b1a9a5227c12d7a18343877c59725f321647a01fde0841649bf7d8a4a746148a0d38b0ee27 languageName: node linkType: hard @@ -7135,7 +7402,7 @@ __metadata: languageName: node linkType: hard -"ieee754@npm:^1.1.13, ieee754@npm:^1.1.4": +"ieee754@npm:^1.1.13, ieee754@npm:^1.1.4, ieee754@npm:^1.2.1": version: 1.2.1 resolution: "ieee754@npm:1.2.1" checksum: 5144c0c9815e54ada181d80a0b810221a253562422e7c6c3a60b1901154184f49326ec239d618c416c1c5945a2e197107aee8d986a3dd836b53dffefd99b5e7e @@ -7340,6 +7607,13 @@ __metadata: languageName: node linkType: hard +"is-buffer@npm:^2.0.5": + version: 2.0.5 + resolution: "is-buffer@npm:2.0.5" + checksum: 764c9ad8b523a9f5a32af29bdf772b08eb48c04d2ad0a7240916ac2688c983bf5f8504bf25b35e66240edeb9d9085461f9b5dae1f3d2861c6b06a65fe983de42 + languageName: node + linkType: hard + "is-callable@npm:^1.1.3, is-callable@npm:^1.1.4, is-callable@npm:^1.2.7": version: 1.2.7 resolution: "is-callable@npm:1.2.7" @@ -7700,6 +7974,13 @@ __metadata: languageName: node linkType: hard +"js-sdsl@npm:^4.1.4": + version: 4.4.2 + resolution: "js-sdsl@npm:4.4.2" + checksum: ba705adc1788bf3c6f6c8e5077824f2bb4f0acab5a984420ce5cc492c7fff3daddc26335ad2c9a67d4f5e3241ec790f9e5b72a625adcf20cf321d2fd85e62b8b + languageName: node + linkType: hard + "js-sha3@npm:0.8.0, js-sha3@npm:^0.8.0": version: 0.8.0 resolution: "js-sha3@npm:0.8.0" @@ -7804,6 +8085,18 @@ __metadata: languageName: node linkType: hard +"jsonfile@npm:^2.1.0": + version: 2.4.0 + resolution: "jsonfile@npm:2.4.0" + dependencies: + graceful-fs: ^4.1.6 + dependenciesMeta: + graceful-fs: + optional: true + checksum: f5064aabbc9e35530dc471d8b203ae1f40dbe949ddde4391c6f6a6d310619a15f0efdae5587df594d1d70c555193aaeee9d2ed4aec9ffd5767bd5e4e62d49c3d + languageName: node + linkType: hard + "jsonfile@npm:^4.0.0": version: 4.0.0 resolution: "jsonfile@npm:4.0.0" @@ -7883,6 +8176,46 @@ __metadata: languageName: node linkType: hard +"klaw@npm:^1.0.0": + version: 1.3.1 + resolution: "klaw@npm:1.3.1" + dependencies: + graceful-fs: ^4.1.9 + dependenciesMeta: + graceful-fs: + optional: true + checksum: 8f69e4797c26e7c3f2426bfa85f38a3da3c2cb1b4c6bd850d2377aed440d41ce9d806f2885c2e2e224372c56af4b1d43b8a499adecf9a05e7373dc6b8b7c52e4 + languageName: node + linkType: hard + +"level-supports@npm:^4.0.0": + version: 4.0.1 + resolution: "level-supports@npm:4.0.1" + checksum: d4552b42bb8cdeada07b0f6356c7a90fefe76279147331f291aceae26e3e56d5f927b09ce921647c0230bfe03ddfbdcef332be921e5c2194421ae2bfa3cf6368 + languageName: node + linkType: hard + +"level-transcoder@npm:^1.0.1": + version: 1.0.1 + resolution: "level-transcoder@npm:1.0.1" + dependencies: + buffer: ^6.0.3 + module-error: ^1.0.1 + checksum: 304f08d802faf3491a533b6d87ad8be3cabfd27f2713bbe9d4c633bf50fcb9460eab5a6776bf015e101ead7ba1c1853e05e7f341112f17a9d0cb37ee5a421a25 + languageName: node + linkType: hard + +"level@npm:^8.0.0": + version: 8.0.1 + resolution: "level@npm:8.0.1" + dependencies: + abstract-level: ^1.0.4 + browser-level: ^1.0.1 + classic-level: ^1.2.0 + checksum: c5641cbba666ef9eb0292aad01d86a4f1af18e637d1fc097c65bf0109ab8d7e6fba8c8faf6c74ae4e48edac4310f7dd87def26ffeebfe395c7afd9bd2461ab97 + languageName: node + linkType: hard + "levn@npm:^0.4.1": version: 0.4.1 resolution: "levn@npm:0.4.1" @@ -8153,6 +8486,15 @@ __metadata: languageName: node linkType: hard +"lru-cache@npm:^5.1.1": + version: 5.1.1 + resolution: "lru-cache@npm:5.1.1" + dependencies: + yallist: ^3.0.2 + checksum: c154ae1cbb0c2206d1501a0e94df349653c92c8cbb25236d7e85190bcaf4567a03ac6eb43166fabfa36fd35623694da7233e88d9601fbf411a9a481d85dbd2cb + languageName: node + linkType: hard + "lru-cache@npm:^6.0.0": version: 6.0.0 resolution: "lru-cache@npm:6.0.0" @@ -8224,6 +8566,13 @@ __metadata: languageName: node linkType: hard +"mcl-wasm@npm:^0.7.1": + version: 0.7.9 + resolution: "mcl-wasm@npm:0.7.9" + checksum: 6b6ed5084156b98b2db70b223e1ba2c01953970b48a2e0c4ea3eeb9296610e6b3bfb2a2cce9e92e2d7ad61778b5f5a630e705e663835e915ba188c174a0a37fa + languageName: node + linkType: hard + "md5.js@npm:^1.3.4": version: 1.3.5 resolution: "md5.js@npm:1.3.5" @@ -8242,6 +8591,17 @@ __metadata: languageName: node linkType: hard +"memory-level@npm:^1.0.0": + version: 1.0.0 + resolution: "memory-level@npm:1.0.0" + dependencies: + abstract-level: ^1.0.0 + functional-red-black-tree: ^1.0.1 + module-error: ^1.0.1 + checksum: 80b1b7aedaf936e754adbcd7b9303018c3684fb32f9992fd967c448f145d177f16c724fbba9ed3c3590a9475fd563151eae664d69b83d2ad48714852e9fc5c72 + languageName: node + linkType: hard + "memorystream@npm:^0.3.1": version: 0.3.1 resolution: "memorystream@npm:0.3.1" @@ -8674,6 +9034,13 @@ __metadata: languageName: node linkType: hard +"module-error@npm:^1.0.1, module-error@npm:^1.0.2": + version: 1.0.2 + resolution: "module-error@npm:1.0.2" + checksum: 5d653e35bd55b3e95f8aee2cdac108082ea892e71b8f651be92cde43e4ee86abee4fa8bd7fc3fe5e68b63926d42f63c54cd17b87a560c31f18739295575a3962 + languageName: node + linkType: hard + "module-not-found-error@npm:^1.0.1": version: 1.0.1 resolution: "module-not-found-error@npm:1.0.1" @@ -8786,6 +9153,13 @@ __metadata: languageName: node linkType: hard +"napi-macros@npm:^2.2.2": + version: 2.2.2 + resolution: "napi-macros@npm:2.2.2" + checksum: c6f9bd71cdbbc37ddc3535aa5be481238641d89585b8a3f4d301cb89abf459e2d294810432bb7d12056d1f9350b1a0899a5afcf460237a3da6c398cf0fec7629 + languageName: node + linkType: hard + "natural-compare-lite@npm:^1.4.0": version: 1.4.0 resolution: "natural-compare-lite@npm:1.4.0" @@ -9587,7 +9961,7 @@ __metadata: languageName: node linkType: hard -"queue-microtask@npm:^1.2.2": +"queue-microtask@npm:^1.2.2, queue-microtask@npm:^1.2.3": version: 1.2.3 resolution: "queue-microtask@npm:1.2.3" checksum: b676f8c040cdc5b12723ad2f91414d267605b26419d5c821ff03befa817ddd10e238d22b25d604920340fd73efd8ba795465a0377c4adf45a4a41e4234e42dc4 @@ -9795,7 +10169,7 @@ __metadata: languageName: node linkType: hard -"require-from-string@npm:^2.0.2": +"require-from-string@npm:^2.0.0, require-from-string@npm:^2.0.2": version: 2.0.2 resolution: "require-from-string@npm:2.0.2" checksum: a03ef6895445f33a4015300c426699bc66b2b044ba7b670aa238610381b56d3f07c686251740d575e22f4c87531ba662d06937508f0f3c0f1ddc04db3130560b @@ -9950,6 +10324,17 @@ __metadata: languageName: node linkType: hard +"rimraf@npm:^2.2.8": + version: 2.7.1 + resolution: "rimraf@npm:2.7.1" + dependencies: + glob: ^7.1.3 + bin: + rimraf: ./bin.js + checksum: cdc7f6eacb17927f2a075117a823e1c5951792c6498ebcce81ca8203454a811d4cf8900314154d3259bb8f0b42ab17f67396a8694a54cae3283326e57ad250cd + languageName: node + linkType: hard + "rimraf@npm:^3.0.2": version: 3.0.2 resolution: "rimraf@npm:3.0.2" @@ -9989,6 +10374,15 @@ __metadata: languageName: node linkType: hard +"run-parallel-limit@npm:^1.1.0": + version: 1.1.0 + resolution: "run-parallel-limit@npm:1.1.0" + dependencies: + queue-microtask: ^1.2.2 + checksum: 672c3b87e7f939c684b9965222b361421db0930223ed1e43ebf0e7e48ccc1a022ea4de080bef4d5468434e2577c33b7681e3f03b7593fdc49ad250a55381123c + languageName: node + linkType: hard + "run-parallel@npm:^1.1.9": version: 1.2.0 resolution: "run-parallel@npm:1.2.0" @@ -9998,6 +10392,13 @@ __metadata: languageName: node linkType: hard +"rustbn.js@npm:~0.2.0": + version: 0.2.0 + resolution: "rustbn.js@npm:0.2.0" + checksum: 2148e7ba34e70682907ee29df4784639e6eb025481b2c91249403b7ec57181980161868d9aa24822a5075dd1bb5a180dfedc77309e5f0d27b6301f9b563af99a + languageName: node + linkType: hard + "rxjs@npm:^7.2.0, rxjs@npm:^7.5.5": version: 7.8.1 resolution: "rxjs@npm:7.8.1" @@ -10379,6 +10780,25 @@ __metadata: languageName: node linkType: hard +"solc@npm:0.7.3": + version: 0.7.3 + resolution: "solc@npm:0.7.3" + dependencies: + command-exists: ^1.2.8 + commander: 3.0.2 + follow-redirects: ^1.12.1 + fs-extra: ^0.30.0 + js-sha3: 0.8.0 + memorystream: ^0.3.1 + require-from-string: ^2.0.0 + semver: ^5.5.0 + tmp: 0.0.33 + bin: + solcjs: solcjs + checksum: 2d8eb16c6d8f648213c94dc8d977cffe5099cba7d41c82d92d769ef71ae8320a985065ce3d6c306440a85f8e8d2b27fb30bdd3ac38f69e5c1fa0ab8a3fb2f217 + languageName: node + linkType: hard + "solc@npm:0.8.26": version: 0.8.26 resolution: "solc@npm:0.8.26" @@ -12193,7 +12613,7 @@ __metadata: languageName: node linkType: hard -"yallist@npm:^3.0.0, yallist@npm:^3.1.1": +"yallist@npm:^3.0.0, yallist@npm:^3.0.2, yallist@npm:^3.1.1": version: 3.1.1 resolution: "yallist@npm:3.1.1" checksum: 48f7bb00dc19fc635a13a39fe547f527b10c9290e7b3e836b9a8f1ca04d4d342e85714416b3c2ab74949c9c66f9cebb0473e6bc353b79035356103b47641285d From 9958a9969fdadc83455bf812dc1a98ac31a8214c Mon Sep 17 00:00:00 2001 From: GitGuru7 <128375421+GitGuru7@users.noreply.github.com> Date: Fri, 9 Aug 2024 17:07:55 +0530 Subject: [PATCH 5/9] fix: remove temporary workaround --- src/vip-framework/index.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/vip-framework/index.ts b/src/vip-framework/index.ts index 00e5a2b6d..4300990aa 100644 --- a/src/vip-framework/index.ts +++ b/src/vip-framework/index.ts @@ -135,8 +135,6 @@ export const testVip = (description: string, proposal: Proposal, options: Testin let proposalId: number; it("can be proposed", async () => { - // Temporary workaround(mining a block just after forking) till hardforking issue is solved by hardhat, https://github.com/NomicFoundation/hardhat/issues/5511 - await mine(); const { targets, signatures, values, meta } = proposal; const proposalIdBefore = await governorProxy.callStatic.proposalCount(); let tx; From 8e723eaee64dc9037d04137ad93a34e855e1565b Mon Sep 17 00:00:00 2001 From: GitGuru7 <128375421+GitGuru7@users.noreply.github.com> Date: Fri, 9 Aug 2024 17:17:10 +0530 Subject: [PATCH 6/9] refactor: change file structure --- simulations/{vip-349 => vip-350}/abi/XVS.json | 0 simulations/{vip-349 => vip-350}/abi/XVSBridgeAdmin.json | 0 simulations/{vip-349 => vip-350}/abi/XVSProxyOFTSrc.json | 0 simulations/{vip-349 => vip-350}/simulations.ts | 6 +++--- vips/{vip-349 => vip-350}/bsctestnet.ts | 4 ++-- 5 files changed, 5 insertions(+), 5 deletions(-) rename simulations/{vip-349 => vip-350}/abi/XVS.json (100%) rename simulations/{vip-349 => vip-350}/abi/XVSBridgeAdmin.json (100%) rename simulations/{vip-349 => vip-350}/abi/XVSProxyOFTSrc.json (100%) rename simulations/{vip-349 => vip-350}/simulations.ts (98%) rename vips/{vip-349 => vip-350}/bsctestnet.ts (97%) diff --git a/simulations/vip-349/abi/XVS.json b/simulations/vip-350/abi/XVS.json similarity index 100% rename from simulations/vip-349/abi/XVS.json rename to simulations/vip-350/abi/XVS.json diff --git a/simulations/vip-349/abi/XVSBridgeAdmin.json b/simulations/vip-350/abi/XVSBridgeAdmin.json similarity index 100% rename from simulations/vip-349/abi/XVSBridgeAdmin.json rename to simulations/vip-350/abi/XVSBridgeAdmin.json diff --git a/simulations/vip-349/abi/XVSProxyOFTSrc.json b/simulations/vip-350/abi/XVSProxyOFTSrc.json similarity index 100% rename from simulations/vip-349/abi/XVSProxyOFTSrc.json rename to simulations/vip-350/abi/XVSProxyOFTSrc.json diff --git a/simulations/vip-349/simulations.ts b/simulations/vip-350/simulations.ts similarity index 98% rename from simulations/vip-349/simulations.ts rename to simulations/vip-350/simulations.ts index 2e31c1b47..13cf27cfe 100644 --- a/simulations/vip-349/simulations.ts +++ b/simulations/vip-350/simulations.ts @@ -9,13 +9,13 @@ import { LzChainId } from "src/types"; import { expectEvents, initMainnetUser } from "src/utils"; import { forking, testVip } from "src/vip-framework"; -import vip349, { +import vip350, { MAX_DAILY_RECEIVE_LIMIT, MAX_DAILY_SEND_LIMIT, MIN_DST_GAS, SINGLE_RECEIVE_LIMIT, SINGLE_SEND_LIMIT, -} from "../../vips/vip-349/bsctestnet"; +} from "../../vips/vip-350/bsctestnet"; import XVS_ABI from "./abi/XVS.json"; import XVS_BRIDGE_ADMIN_ABI from "./abi/XVSBridgeAdmin.json"; import XVS_BRIDGE_SRC_ABI from "./abi/XVSProxyOFTSrc.json"; @@ -43,7 +43,7 @@ forking(42792146, async () => { defaultAdapterParams = ethers.utils.solidityPack(["uint16", "uint256"], [1, 300000]); }); - testVip("vip-349 testnet", await vip349(), { + testVip("vip-350 testnet", await vip350(), { callbackAfterExecution: async (txResponse: TransactionResponse) => { await expectEvents( txResponse, diff --git a/vips/vip-349/bsctestnet.ts b/vips/vip-350/bsctestnet.ts similarity index 97% rename from vips/vip-349/bsctestnet.ts rename to vips/vip-350/bsctestnet.ts index 7de61d1fc..365fdb2a9 100644 --- a/vips/vip-349/bsctestnet.ts +++ b/vips/vip-350/bsctestnet.ts @@ -11,7 +11,7 @@ export const MAX_DAILY_SEND_LIMIT = parseUnits("50000", 18); export const SINGLE_RECEIVE_LIMIT = parseUnits("10200", 18); export const MAX_DAILY_RECEIVE_LIMIT = parseUnits("51000", 18); -const vip349 = () => { +const vip350 = () => { const meta = { version: "v2", title: "VIP-349 Enable BSC -> ZKSYNC bridge", @@ -59,4 +59,4 @@ const vip349 = () => { ); }; -export default vip349; +export default vip350; From 343190bc125872542ee3e712ab48f8414f4b61ed Mon Sep 17 00:00:00 2001 From: GitGuru7 <128375421+GitGuru7@users.noreply.github.com> Date: Wed, 14 Aug 2024 12:42:35 +0530 Subject: [PATCH 7/9] feat: add vip to enable opbnb <> zksync testnets bridge --- .../proposals/opbnbtestnet/vip-019/index.ts | 49 + .../opbnbtestnet/vip-019/abi/xvs.json | 683 +++++++ .../vip-019/abi/xvsProxyOFTDest.json | 1729 +++++++++++++++++ .../simulations/opbnbtestnet/vip-019/index.ts | 109 ++ 4 files changed, 2570 insertions(+) create mode 100644 multisig/proposals/opbnbtestnet/vip-019/index.ts create mode 100644 multisig/simulations/opbnbtestnet/vip-019/abi/xvs.json create mode 100644 multisig/simulations/opbnbtestnet/vip-019/abi/xvsProxyOFTDest.json create mode 100644 multisig/simulations/opbnbtestnet/vip-019/index.ts diff --git a/multisig/proposals/opbnbtestnet/vip-019/index.ts b/multisig/proposals/opbnbtestnet/vip-019/index.ts new file mode 100644 index 000000000..734208830 --- /dev/null +++ b/multisig/proposals/opbnbtestnet/vip-019/index.ts @@ -0,0 +1,49 @@ +import { parseUnits } from "ethers/lib/utils"; +import { LzChainId } from "src/types"; +import { makeProposal } from "src/utils"; + +const XVS_BRIDGE_ADMIN = "0x19252AFD0B2F539C400aEab7d460CBFbf74c17ff"; + +export const MIN_DST_GAS = "300000"; +export const SINGLE_SEND_LIMIT = parseUnits("10000", 18); +export const MAX_DAILY_SEND_LIMIT = parseUnits("50000", 18); +export const SINGLE_RECEIVE_LIMIT = parseUnits("10200", 18); +export const MAX_DAILY_RECEIVE_LIMIT = parseUnits("51000", 18); +export const ZKSYNC_SEPOLIA_TRUSTED_REMOTE = "0x760461ccb2508caaa2ece0c28af3a4707b853043"; + +const vip019 = () => { + return makeProposal([ + { + target: XVS_BRIDGE_ADMIN, + signature: "setTrustedRemoteAddress(uint16,bytes)", + params: [LzChainId.zksyncsepolia, ZKSYNC_SEPOLIA_TRUSTED_REMOTE], + }, + { + target: XVS_BRIDGE_ADMIN, + signature: "setMinDstGas(uint16,uint16,uint256)", + params: [LzChainId.zksyncsepolia, 0, MIN_DST_GAS], + }, + { + target: XVS_BRIDGE_ADMIN, + signature: "setMaxDailyLimit(uint16,uint256)", + params: [LzChainId.zksyncsepolia, MAX_DAILY_SEND_LIMIT], + }, + { + target: XVS_BRIDGE_ADMIN, + signature: "setMaxSingleTransactionLimit(uint16,uint256)", + params: [LzChainId.zksyncsepolia, SINGLE_SEND_LIMIT], + }, + { + target: XVS_BRIDGE_ADMIN, + signature: "setMaxDailyReceiveLimit(uint16,uint256)", + params: [LzChainId.zksyncsepolia, MAX_DAILY_RECEIVE_LIMIT], + }, + { + target: XVS_BRIDGE_ADMIN, + signature: "setMaxSingleReceiveTransactionLimit(uint16,uint256)", + params: [LzChainId.zksyncsepolia, SINGLE_RECEIVE_LIMIT], + }, + ]); +}; + +export default vip019; diff --git a/multisig/simulations/opbnbtestnet/vip-019/abi/xvs.json b/multisig/simulations/opbnbtestnet/vip-019/abi/xvs.json new file mode 100644 index 000000000..8a2713887 --- /dev/null +++ b/multisig/simulations/opbnbtestnet/vip-019/abi/xvs.json @@ -0,0 +1,683 @@ +[ + { + "inputs": [ + { + "internalType": "address", + "name": "accessControlManager_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "MintLimitExceed", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + } + ], + "name": "MintNotAllowed", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddressNotAllowed", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "value", + "type": "bool" + } + ], + "name": "BlacklistUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "minter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "MintCapChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "minter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newLimit", + "type": "uint256" + } + ], + "name": "MintLimitDecreased", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "minter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newLimit", + "type": "uint256" + } + ], + "name": "MintLimitIncreased", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldAccessControlManager", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newAccessControlManager", + "type": "address" + } + ], + "name": "NewAccessControlManager", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "_blacklist", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "accessControlManager", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount_", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user_", + "type": "address" + } + ], + "name": "isBlackListed", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount_", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "minterToCap", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "minterToMintedAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newAccessControlAddress_", + "type": "address" + } + ], + "name": "setAccessControlManager", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "minter_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount_", + "type": "uint256" + } + ], + "name": "setMintCap", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user_", + "type": "address" + }, + { + "internalType": "bool", + "name": "value_", + "type": "bool" + } + ], + "name": "updateBlacklist", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/multisig/simulations/opbnbtestnet/vip-019/abi/xvsProxyOFTDest.json b/multisig/simulations/opbnbtestnet/vip-019/abi/xvsProxyOFTDest.json new file mode 100644 index 000000000..5917469fd --- /dev/null +++ b/multisig/simulations/opbnbtestnet/vip-019/abi/xvsProxyOFTDest.json @@ -0,0 +1,1729 @@ +[ + { + "inputs": [ + { + "internalType": "address", + "name": "tokenAddress_", + "type": "address" + }, + { + "internalType": "uint8", + "name": "sharedDecimals_", + "type": "uint8" + }, + { + "internalType": "address", + "name": "lzEndpoint_", + "type": "address" + }, + { + "internalType": "address", + "name": "oracle_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "ZeroAddressNotAllowed", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "_nonce", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "_hash", + "type": "bytes32" + } + ], + "name": "CallOFTReceivedSuccess", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "srcChainId", + "type": "uint16" + }, + { + "indexed": true, + "internalType": "bytes", + "name": "srcAddress", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "nonce", + "type": "uint64" + } + ], + "name": "DropFailedMessage", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "innerToken", + "type": "address" + } + ], + "name": "InnerTokenAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "_nonce", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_payload", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_reason", + "type": "bytes" + } + ], + "name": "MessageFailed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "_address", + "type": "address" + } + ], + "name": "NonContractAddress", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldOracle", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOracle", + "type": "address" + } + ], + "name": "OracleChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "indexed": true, + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "ReceiveFromChain", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "_nonce", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "_payloadHash", + "type": "bytes32" + } + ], + "name": "RetryMessageSuccess", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "indexed": true, + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "_toAddress", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "SendToChain", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "chainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oldMaxLimit", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newMaxLimit", + "type": "uint256" + } + ], + "name": "SetMaxDailyLimit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "chainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oldMaxLimit", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newMaxLimit", + "type": "uint256" + } + ], + "name": "SetMaxDailyReceiveLimit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "chainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oldMaxLimit", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newMaxLimit", + "type": "uint256" + } + ], + "name": "SetMaxSingleReceiveTransactionLimit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "chainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oldMaxLimit", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newMaxLimit", + "type": "uint256" + } + ], + "name": "SetMaxSingleTransactionLimit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "uint16", + "name": "_type", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_minDstGas", + "type": "uint256" + } + ], + "name": "SetMinDstGas", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "precrime", + "type": "address" + } + ], + "name": "SetPrecrime", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "_remoteChainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_path", + "type": "bytes" + } + ], + "name": "SetTrustedRemote", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "_remoteChainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_remoteAddress", + "type": "bytes" + } + ], + "name": "SetTrustedRemoteAddress", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "addr", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "isWhitelist", + "type": "bool" + } + ], + "name": "SetWhitelist", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "chainId", + "type": "uint16" + } + ], + "name": "TrustedRemoteRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "inputs": [], + "name": "DEFAULT_PAYLOAD_SIZE_LIMIT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "NO_EXTRA_GAS", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PT_SEND", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PT_SEND_AND_CALL", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "_nonce", + "type": "uint64" + }, + { + "internalType": "bytes32", + "name": "_from", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "_payload", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "_gasForCall", + "type": "uint256" + } + ], + "name": "callOnOFTReceived", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "chainIdToLast24HourReceiveWindowStart", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "chainIdToLast24HourReceived", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "chainIdToLast24HourTransferred", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "chainIdToLast24HourWindowStart", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "chainIdToMaxDailyLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "chainIdToMaxDailyReceiveLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "chainIdToMaxSingleReceiveTransactionLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "chainIdToMaxSingleTransactionLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "circulatingSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "name": "creditedPackets", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "srcChainId_", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "srcAddress_", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "nonce_", + "type": "uint64" + } + ], + "name": "dropFailedMessage", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "internalType": "bytes32", + "name": "_toAddress", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "_payload", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "_dstGasForCall", + "type": "uint64" + }, + { + "internalType": "bool", + "name": "_useZro", + "type": "bool" + }, + { + "internalType": "bytes", + "name": "_adapterParams", + "type": "bytes" + } + ], + "name": "estimateSendAndCallFee", + "outputs": [ + { + "internalType": "uint256", + "name": "nativeFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "zroFee", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "internalType": "bytes32", + "name": "_toAddress", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "_useZro", + "type": "bool" + }, + { + "internalType": "bytes", + "name": "_adapterParams", + "type": "bytes" + } + ], + "name": "estimateSendFee", + "outputs": [ + { + "internalType": "uint256", + "name": "nativeFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "zroFee", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "name": "failedMessages", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + } + ], + "name": "forceResumeReceive", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_version", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "_chainId", + "type": "uint16" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_configType", + "type": "uint256" + } + ], + "name": "getConfig", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_remoteChainId", + "type": "uint16" + } + ], + "name": "getTrustedRemoteAddress", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + } + ], + "name": "isTrustedRemote", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "lzEndpoint", + "outputs": [ + { + "internalType": "contract ILayerZeroEndpoint", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "_nonce", + "type": "uint64" + }, + { + "internalType": "bytes", + "name": "_payload", + "type": "bytes" + } + ], + "name": "lzReceive", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "minDstGasLookup", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "_nonce", + "type": "uint64" + }, + { + "internalType": "bytes", + "name": "_payload", + "type": "bytes" + } + ], + "name": "nonblockingLzReceive", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "oracle", + "outputs": [ + { + "internalType": "contract ResilientOracleInterface", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "payloadSizeLimitLookup", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "precrime", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "remoteChainId_", + "type": "uint16" + } + ], + "name": "removeTrustedRemote", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "_nonce", + "type": "uint64" + }, + { + "internalType": "bytes", + "name": "_payload", + "type": "bytes" + } + ], + "name": "retryMessage", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "internalType": "bytes32", + "name": "_toAddress", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "_payload", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "_dstGasForCall", + "type": "uint64" + }, + { + "components": [ + { + "internalType": "address payable", + "name": "refundAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "zroPaymentAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "adapterParams", + "type": "bytes" + } + ], + "internalType": "struct ICommonOFT.LzCallParams", + "name": "_callParams", + "type": "tuple" + } + ], + "name": "sendAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "internalType": "bytes32", + "name": "_toAddress", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address payable", + "name": "refundAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "zroPaymentAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "adapterParams", + "type": "bytes" + } + ], + "internalType": "struct ICommonOFT.LzCallParams", + "name": "_callParams", + "type": "tuple" + } + ], + "name": "sendFrom", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_version", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "_chainId", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "_configType", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "_config", + "type": "bytes" + } + ], + "name": "setConfig", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "chainId_", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "limit_", + "type": "uint256" + } + ], + "name": "setMaxDailyLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "chainId_", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "limit_", + "type": "uint256" + } + ], + "name": "setMaxDailyReceiveLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "chainId_", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "limit_", + "type": "uint256" + } + ], + "name": "setMaxSingleReceiveTransactionLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "chainId_", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "limit_", + "type": "uint256" + } + ], + "name": "setMaxSingleTransactionLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "_packetType", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "_minGas", + "type": "uint256" + } + ], + "name": "setMinDstGas", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "oracleAddress_", + "type": "address" + } + ], + "name": "setOracle", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "_size", + "type": "uint256" + } + ], + "name": "setPayloadSizeLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_precrime", + "type": "address" + } + ], + "name": "setPrecrime", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_version", + "type": "uint16" + } + ], + "name": "setReceiveVersion", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_version", + "type": "uint16" + } + ], + "name": "setSendVersion", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_remoteChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_path", + "type": "bytes" + } + ], + "name": "setTrustedRemote", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_remoteChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_remoteAddress", + "type": "bytes" + } + ], + "name": "setTrustedRemoteAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user_", + "type": "address" + }, + { + "internalType": "bool", + "name": "val_", + "type": "bool" + } + ], + "name": "setWhitelist", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "sharedDecimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "token", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "trustedRemoteLookup", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "whitelist", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } +] diff --git a/multisig/simulations/opbnbtestnet/vip-019/index.ts b/multisig/simulations/opbnbtestnet/vip-019/index.ts new file mode 100644 index 000000000..2c2bbe019 --- /dev/null +++ b/multisig/simulations/opbnbtestnet/vip-019/index.ts @@ -0,0 +1,109 @@ +import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; +import { expect } from "chai"; +import { Contract } from "ethers"; +import { parseUnits } from "ethers/lib/utils"; +import { ethers } from "hardhat"; +import { LzChainId } from "src/types"; +import { initMainnetUser } from "src/utils"; +import { forking, pretendExecutingVip } from "src/vip-framework"; + +import vip019, { + MAX_DAILY_RECEIVE_LIMIT, + MAX_DAILY_SEND_LIMIT, + SINGLE_RECEIVE_LIMIT, + SINGLE_SEND_LIMIT, + ZKSYNC_SEPOLIA_TRUSTED_REMOTE, +} from "../../../proposals/opbnbtestnet/vip-019"; +import XVS_ABI from "./abi/xvs.json"; +import XVS_BRIDGE_ABI from "./abi/xvsProxyOFTDest.json"; + +const XVS = "0xc2931B1fEa69b6D6dA65a50363A8D75d285e4da9"; +const XVS_BRIDGE = "0xA03205bC635A772E533E7BE36b5701E331a70ea3"; +const XVS_HOLDER = "0xFd7dA20ea0bE63ACb0852f97E950376E7E4a817D"; + +forking(36739883, async () => { + let xvs: Contract; + let xvsBridge: Contract; + let xvsHolderSigner: SignerWithAddress; + let receiver: SignerWithAddress; + let receiverAddressBytes32: string; + let defaultAdapterParams: string; + + before(async () => { + xvs = await ethers.getContractAt(XVS_ABI, XVS); + xvsBridge = await ethers.getContractAt(XVS_BRIDGE_ABI, XVS_BRIDGE); + xvsHolderSigner = await initMainnetUser(XVS_HOLDER, ethers.utils.parseEther("5")); + [receiver] = await ethers.getSigners(); + receiverAddressBytes32 = ethers.utils.defaultAbiCoder.encode(["address"], [receiver.address]); + defaultAdapterParams = ethers.utils.solidityPack(["uint16", "uint256"], [1, 300000]); + }); + + describe("Post-Execution state", () => { + before(async () => { + await pretendExecutingVip(await vip019()); + }); + + it("Should match trusted remote address", async () => { + const trustedRemote = await xvsBridge.getTrustedRemoteAddress(LzChainId.zksyncsepolia); + expect(trustedRemote).equals(ZKSYNC_SEPOLIA_TRUSTED_REMOTE); + }); + + it("Should match single send transaction limit", async () => { + expect(await xvsBridge.chainIdToMaxSingleTransactionLimit(LzChainId.zksyncsepolia)).to.equal(SINGLE_SEND_LIMIT); + }); + + it("Should match single receive transaction limit", async () => { + expect(await xvsBridge.chainIdToMaxSingleReceiveTransactionLimit(LzChainId.zksyncsepolia)).to.equal( + SINGLE_RECEIVE_LIMIT, + ); + }); + + it("Should match max daily send limit", async () => { + expect(await xvsBridge.chainIdToMaxDailyLimit(LzChainId.zksyncsepolia)).to.equal(MAX_DAILY_SEND_LIMIT); + }); + + it("Should match max daily receive limit", async () => { + expect(await xvsBridge.chainIdToMaxDailyReceiveLimit(LzChainId.zksyncsepolia)).to.equal(MAX_DAILY_RECEIVE_LIMIT); + }); + + it("Should emit an event on successful bridging of XVS (Opbnb testnet -> Zksync Sepolia)", async () => { + const amount = parseUnits("1", 18); + const nativeFee = ( + await xvsBridge.estimateSendFee( + LzChainId.zksyncsepolia, + receiverAddressBytes32, + amount, + false, + defaultAdapterParams, + ) + ).nativeFee; + + const circulatingSupplyBefore = await xvsBridge.circulatingSupply(); + const totalSupplyBefore = await xvs.totalSupply(); + const minterToMintedAmountBefore = await xvs.minterToMintedAmount(XVS_BRIDGE); + + await expect( + xvsBridge + .connect(xvsHolderSigner) + .sendFrom( + xvsHolderSigner.address, + LzChainId.zksyncsepolia, + receiverAddressBytes32, + amount, + [xvsHolderSigner.address, ethers.constants.AddressZero, defaultAdapterParams], + { value: nativeFee }, + ), + ) + .to.be.emit(xvsBridge, "SendToChain") + .withArgs(LzChainId.zksyncsepolia, XVS_HOLDER, receiverAddressBytes32, amount); + + const circulatingSupplyAfter = await xvsBridge.circulatingSupply(); + const totalSupplyAfter = await xvs.totalSupply(); + const minterToMintedAmountAfter = await xvs.minterToMintedAmount(XVS_BRIDGE); + + expect(circulatingSupplyBefore).equals(circulatingSupplyAfter.add(amount)); + expect(totalSupplyBefore).equals(totalSupplyAfter.add(amount)); + expect(minterToMintedAmountBefore).equals(minterToMintedAmountAfter.add(amount)); + }); + }); +}); From db54b8a68dfb98ced9cb1135e7f2267511888d08 Mon Sep 17 00:00:00 2001 From: Jesus Lanchas Date: Mon, 2 Sep 2024 11:58:11 +0200 Subject: [PATCH 8/9] refactor: move testnet folders to the right folders according to the nonces on mainnets --- .../arbitrumsepolia/vip-005/addendum.ts | 16 + .../arbitrumsepolia/vip-011/index.ts | 45 +- .../arbitrumsepolia/vip-013/index.ts | 49 - .../{vip-019 => vip-020}/index.ts | 4 +- .../sepolia/{vip-052 => vip-057}/index.ts | 4 +- .../arbitrumsepolia/vip-005/addendum.ts | 35 + .../vip-011/abi/ProtocolShareReserve.json | 918 ------------------ .../{vip-013 => vip-011}/abi/xvs.json | 0 .../abi/xvsProxyOFTDest.json | 0 .../arbitrumsepolia/vip-011/index.ts | 110 ++- .../arbitrumsepolia/vip-013/index.ts | 109 --- .../{vip-019 => vip-020}/abi/xvs.json | 0 .../abi/xvsProxyOFTDest.json | 0 .../{vip-019 => vip-020}/index.ts | 6 +- .../sepolia/{vip-052 => vip-057}/abi/xvs.json | 0 .../abi/xvsProxyOFTDest.json | 0 .../sepolia/{vip-052 => vip-057}/index.ts | 6 +- simulations/{vip-350 => vip-358}/abi/XVS.json | 0 .../abi/XVSBridgeAdmin.json | 0 .../abi/XVSProxyOFTSrc.json | 0 .../{vip-350 => vip-358}/simulations.ts | 6 +- vips/{vip-350 => vip-358}/bsctestnet.ts | 6 +- 22 files changed, 198 insertions(+), 1116 deletions(-) create mode 100644 multisig/proposals/arbitrumsepolia/vip-005/addendum.ts delete mode 100644 multisig/proposals/arbitrumsepolia/vip-013/index.ts rename multisig/proposals/opbnbtestnet/{vip-019 => vip-020}/index.ts (97%) rename multisig/proposals/sepolia/{vip-052 => vip-057}/index.ts (97%) create mode 100644 multisig/simulations/arbitrumsepolia/vip-005/addendum.ts delete mode 100644 multisig/simulations/arbitrumsepolia/vip-011/abi/ProtocolShareReserve.json rename multisig/simulations/arbitrumsepolia/{vip-013 => vip-011}/abi/xvs.json (100%) rename multisig/simulations/arbitrumsepolia/{vip-013 => vip-011}/abi/xvsProxyOFTDest.json (100%) delete mode 100644 multisig/simulations/arbitrumsepolia/vip-013/index.ts rename multisig/simulations/opbnbtestnet/{vip-019 => vip-020}/abi/xvs.json (100%) rename multisig/simulations/opbnbtestnet/{vip-019 => vip-020}/abi/xvsProxyOFTDest.json (100%) rename multisig/simulations/opbnbtestnet/{vip-019 => vip-020}/index.ts (97%) rename multisig/simulations/sepolia/{vip-052 => vip-057}/abi/xvs.json (100%) rename multisig/simulations/sepolia/{vip-052 => vip-057}/abi/xvsProxyOFTDest.json (100%) rename multisig/simulations/sepolia/{vip-052 => vip-057}/index.ts (97%) rename simulations/{vip-350 => vip-358}/abi/XVS.json (100%) rename simulations/{vip-350 => vip-358}/abi/XVSBridgeAdmin.json (100%) rename simulations/{vip-350 => vip-358}/abi/XVSProxyOFTSrc.json (100%) rename simulations/{vip-350 => vip-358}/simulations.ts (98%) rename vips/{vip-350 => vip-358}/bsctestnet.ts (95%) diff --git a/multisig/proposals/arbitrumsepolia/vip-005/addendum.ts b/multisig/proposals/arbitrumsepolia/vip-005/addendum.ts new file mode 100644 index 000000000..7c0538a11 --- /dev/null +++ b/multisig/proposals/arbitrumsepolia/vip-005/addendum.ts @@ -0,0 +1,16 @@ +import { makeProposal } from "../../../../src/utils"; + +export const PSR = "0x09267d30798B59c581ce54E861A084C6FC298666"; +export const POOL_REGISTRY = "0xf93Df3135e0D555185c0BC888073374cA551C5fE"; + +const vip005 = () => { + return makeProposal([ + { + target: PSR, + signature: "setPoolRegistry(address)", + params: [POOL_REGISTRY], + }, + ]); +}; + +export default vip005; diff --git a/multisig/proposals/arbitrumsepolia/vip-011/index.ts b/multisig/proposals/arbitrumsepolia/vip-011/index.ts index a5aafdd88..5d5ad737f 100644 --- a/multisig/proposals/arbitrumsepolia/vip-011/index.ts +++ b/multisig/proposals/arbitrumsepolia/vip-011/index.ts @@ -1,14 +1,47 @@ -import { makeProposal } from "../../../../src/utils"; +import { parseUnits } from "ethers/lib/utils"; +import { LzChainId } from "src/types"; +import { makeProposal } from "src/utils"; -export const PSR = "0x09267d30798B59c581ce54E861A084C6FC298666"; -export const POOL_REGISTRY = "0xf93Df3135e0D555185c0BC888073374cA551C5fE"; +const XVS_BRIDGE_ADMIN = "0xc94578caCC89a29B044a0a1D54d20d48A645E5C8"; + +export const MIN_DST_GAS = "300000"; +export const SINGLE_SEND_LIMIT = parseUnits("10000", 18); +export const MAX_DAILY_SEND_LIMIT = parseUnits("50000", 18); +export const SINGLE_RECEIVE_LIMIT = parseUnits("10200", 18); +export const MAX_DAILY_RECEIVE_LIMIT = parseUnits("51000", 18); +export const ZKSYNC_SEPOLIA_TRUSTED_REMOTE = "0x760461ccb2508caaa2ece0c28af3a4707b853043"; const vip011 = () => { return makeProposal([ { - target: PSR, - signature: "setPoolRegistry(address)", - params: [POOL_REGISTRY], + target: XVS_BRIDGE_ADMIN, + signature: "setTrustedRemoteAddress(uint16,bytes)", + params: [LzChainId.zksyncsepolia, ZKSYNC_SEPOLIA_TRUSTED_REMOTE], + }, + { + target: XVS_BRIDGE_ADMIN, + signature: "setMinDstGas(uint16,uint16,uint256)", + params: [LzChainId.zksyncsepolia, 0, MIN_DST_GAS], + }, + { + target: XVS_BRIDGE_ADMIN, + signature: "setMaxDailyLimit(uint16,uint256)", + params: [LzChainId.zksyncsepolia, MAX_DAILY_SEND_LIMIT], + }, + { + target: XVS_BRIDGE_ADMIN, + signature: "setMaxSingleTransactionLimit(uint16,uint256)", + params: [LzChainId.zksyncsepolia, SINGLE_SEND_LIMIT], + }, + { + target: XVS_BRIDGE_ADMIN, + signature: "setMaxDailyReceiveLimit(uint16,uint256)", + params: [LzChainId.zksyncsepolia, MAX_DAILY_RECEIVE_LIMIT], + }, + { + target: XVS_BRIDGE_ADMIN, + signature: "setMaxSingleReceiveTransactionLimit(uint16,uint256)", + params: [LzChainId.zksyncsepolia, SINGLE_RECEIVE_LIMIT], }, ]); }; diff --git a/multisig/proposals/arbitrumsepolia/vip-013/index.ts b/multisig/proposals/arbitrumsepolia/vip-013/index.ts deleted file mode 100644 index 248bb6c8e..000000000 --- a/multisig/proposals/arbitrumsepolia/vip-013/index.ts +++ /dev/null @@ -1,49 +0,0 @@ -import { parseUnits } from "ethers/lib/utils"; -import { LzChainId } from "src/types"; -import { makeProposal } from "src/utils"; - -const XVS_BRIDGE_ADMIN = "0xc94578caCC89a29B044a0a1D54d20d48A645E5C8"; - -export const MIN_DST_GAS = "300000"; -export const SINGLE_SEND_LIMIT = parseUnits("10000", 18); -export const MAX_DAILY_SEND_LIMIT = parseUnits("50000", 18); -export const SINGLE_RECEIVE_LIMIT = parseUnits("10200", 18); -export const MAX_DAILY_RECEIVE_LIMIT = parseUnits("51000", 18); -export const ZKSYNC_SEPOLIA_TRUSTED_REMOTE = "0x760461ccb2508caaa2ece0c28af3a4707b853043"; - -const vip013 = () => { - return makeProposal([ - { - target: XVS_BRIDGE_ADMIN, - signature: "setTrustedRemoteAddress(uint16,bytes)", - params: [LzChainId.zksyncsepolia, ZKSYNC_SEPOLIA_TRUSTED_REMOTE], - }, - { - target: XVS_BRIDGE_ADMIN, - signature: "setMinDstGas(uint16,uint16,uint256)", - params: [LzChainId.zksyncsepolia, 0, MIN_DST_GAS], - }, - { - target: XVS_BRIDGE_ADMIN, - signature: "setMaxDailyLimit(uint16,uint256)", - params: [LzChainId.zksyncsepolia, MAX_DAILY_SEND_LIMIT], - }, - { - target: XVS_BRIDGE_ADMIN, - signature: "setMaxSingleTransactionLimit(uint16,uint256)", - params: [LzChainId.zksyncsepolia, SINGLE_SEND_LIMIT], - }, - { - target: XVS_BRIDGE_ADMIN, - signature: "setMaxDailyReceiveLimit(uint16,uint256)", - params: [LzChainId.zksyncsepolia, MAX_DAILY_RECEIVE_LIMIT], - }, - { - target: XVS_BRIDGE_ADMIN, - signature: "setMaxSingleReceiveTransactionLimit(uint16,uint256)", - params: [LzChainId.zksyncsepolia, SINGLE_RECEIVE_LIMIT], - }, - ]); -}; - -export default vip013; diff --git a/multisig/proposals/opbnbtestnet/vip-019/index.ts b/multisig/proposals/opbnbtestnet/vip-020/index.ts similarity index 97% rename from multisig/proposals/opbnbtestnet/vip-019/index.ts rename to multisig/proposals/opbnbtestnet/vip-020/index.ts index 734208830..cd94e471c 100644 --- a/multisig/proposals/opbnbtestnet/vip-019/index.ts +++ b/multisig/proposals/opbnbtestnet/vip-020/index.ts @@ -11,7 +11,7 @@ export const SINGLE_RECEIVE_LIMIT = parseUnits("10200", 18); export const MAX_DAILY_RECEIVE_LIMIT = parseUnits("51000", 18); export const ZKSYNC_SEPOLIA_TRUSTED_REMOTE = "0x760461ccb2508caaa2ece0c28af3a4707b853043"; -const vip019 = () => { +const vip020 = () => { return makeProposal([ { target: XVS_BRIDGE_ADMIN, @@ -46,4 +46,4 @@ const vip019 = () => { ]); }; -export default vip019; +export default vip020; diff --git a/multisig/proposals/sepolia/vip-052/index.ts b/multisig/proposals/sepolia/vip-057/index.ts similarity index 97% rename from multisig/proposals/sepolia/vip-052/index.ts rename to multisig/proposals/sepolia/vip-057/index.ts index 17c8a3176..dab93d5bb 100644 --- a/multisig/proposals/sepolia/vip-052/index.ts +++ b/multisig/proposals/sepolia/vip-057/index.ts @@ -11,7 +11,7 @@ export const SINGLE_RECEIVE_LIMIT = parseUnits("10200", 18); export const MAX_DAILY_RECEIVE_LIMIT = parseUnits("51000", 18); export const ZKSYNC_SEPOLIA_TRUSTED_REMOTE = "0x760461ccb2508caaa2ece0c28af3a4707b853043"; -const vip019 = () => { +const vip057 = () => { return makeProposal([ { target: XVS_BRIDGE_ADMIN, @@ -46,4 +46,4 @@ const vip019 = () => { ]); }; -export default vip019; +export default vip057; diff --git a/multisig/simulations/arbitrumsepolia/vip-005/addendum.ts b/multisig/simulations/arbitrumsepolia/vip-005/addendum.ts new file mode 100644 index 000000000..275b9eaf2 --- /dev/null +++ b/multisig/simulations/arbitrumsepolia/vip-005/addendum.ts @@ -0,0 +1,35 @@ +import { expect } from "chai"; +import { Contract } from "ethers"; +import { ethers } from "hardhat"; + +import { forking, pretendExecutingVip } from "../../../../src/vip-framework/index"; +import vip005, { POOL_REGISTRY, PSR } from "../../../proposals/arbitrumsepolia/vip-005/addendum"; +import PSR_ABI from "./abi/protocolShareReserve.json"; + +const OLD_POOL_REGISTRY = "0x6866b2BDaaEf6648ddd5b678B3e9f3352bF3d2A5"; + +forking(57920209, async () => { + let protocolShareReserve: Contract; + + before(async () => { + protocolShareReserve = await ethers.getContractAt(PSR_ABI, PSR); + }); + + describe("Pre tx checks", () => { + it("PSR should contain old PoolRegistry address", async () => { + const poolRegistry = await protocolShareReserve.poolRegistry(); + expect(poolRegistry).equals(OLD_POOL_REGISTRY); + }); + }); + + describe("Post tx checks", () => { + before(async () => { + await pretendExecutingVip(await vip005()); + }); + + it("PSR should contain correct PoolRegistry address", async () => { + const poolRegistry = await protocolShareReserve.poolRegistry(); + expect(poolRegistry).equals(POOL_REGISTRY); + }); + }); +}); diff --git a/multisig/simulations/arbitrumsepolia/vip-011/abi/ProtocolShareReserve.json b/multisig/simulations/arbitrumsepolia/vip-011/abi/ProtocolShareReserve.json deleted file mode 100644 index 8a1c8ad14..000000000 --- a/multisig/simulations/arbitrumsepolia/vip-011/abi/ProtocolShareReserve.json +++ /dev/null @@ -1,918 +0,0 @@ -[ - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "previousAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "AdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "beacon", - "type": "address" - } - ], - "name": "BeaconUpgraded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address", - "name": "admin_", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "changeAdmin", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "upgradeTo", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - }, - { - "inputs": [], - "name": "InvalidAddress", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidTotalPercentage", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "loopsLimit", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "requiredLoops", - "type": "uint256" - } - ], - "name": "MaxLoopsLimitExceeded", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "address", - "name": "calledContract", - "type": "address" - }, - { - "internalType": "string", - "name": "methodSignature", - "type": "string" - } - ], - "name": "Unauthorized", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "destination", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "asset", - "type": "address" - }, - { - "indexed": false, - "internalType": "enum ProtocolShareReserve.Schema", - "name": "schema", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "percent", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "AssetReleased", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "comptroller", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "asset", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "enum IProtocolShareReserve.IncomeType", - "name": "incomeType", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "enum ProtocolShareReserve.Schema", - "name": "schema", - "type": "uint8" - } - ], - "name": "AssetsReservesUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "destination", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint16", - "name": "percentage", - "type": "uint16" - }, - { - "indexed": false, - "internalType": "enum ProtocolShareReserve.Schema", - "name": "schema", - "type": "uint8" - } - ], - "name": "DistributionConfigAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "destination", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint16", - "name": "percentage", - "type": "uint16" - }, - { - "indexed": false, - "internalType": "enum ProtocolShareReserve.Schema", - "name": "schema", - "type": "uint8" - } - ], - "name": "DistributionConfigRemoved", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "destination", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint16", - "name": "oldPercentage", - "type": "uint16" - }, - { - "indexed": false, - "internalType": "uint16", - "name": "newPercentage", - "type": "uint16" - }, - { - "indexed": false, - "internalType": "enum ProtocolShareReserve.Schema", - "name": "schema", - "type": "uint8" - } - ], - "name": "DistributionConfigUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldMaxLoopsLimit", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newmaxLoopsLimit", - "type": "uint256" - } - ], - "name": "MaxLoopsLimitUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlManager", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlManager", - "type": "address" - } - ], - "name": "NewAccessControlManager", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferStarted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldPoolRegistry", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newPoolRegistry", - "type": "address" - } - ], - "name": "PoolRegistryUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "comptroller", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "asset", - "type": "address" - }, - { - "indexed": false, - "internalType": "enum ProtocolShareReserve.Schema", - "name": "schema", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "oldBalance", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newBalance", - "type": "uint256" - } - ], - "name": "ReservesUpdated", - "type": "event" - }, - { - "inputs": [], - "name": "CORE_POOL_COMPTROLLER", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MAX_PERCENT", - "outputs": [ - { - "internalType": "uint16", - "name": "", - "type": "uint16" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "WBNB", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "acceptOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "contract IAccessControlManagerV8", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "enum ProtocolShareReserve.Schema", - "name": "schema", - "type": "uint8" - }, - { - "internalType": "uint16", - "name": "percentage", - "type": "uint16" - }, - { - "internalType": "address", - "name": "destination", - "type": "address" - } - ], - "internalType": "struct ProtocolShareReserve.DistributionConfig[]", - "name": "configs", - "type": "tuple[]" - } - ], - "name": "addOrUpdateDistributionConfigs", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "enum ProtocolShareReserve.Schema", - "name": "", - "type": "uint8" - } - ], - "name": "assetsReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "distributionTargets", - "outputs": [ - { - "internalType": "enum ProtocolShareReserve.Schema", - "name": "schema", - "type": "uint8" - }, - { - "internalType": "uint16", - "name": "percentage", - "type": "uint16" - }, - { - "internalType": "address", - "name": "destination", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "destination", - "type": "address" - }, - { - "internalType": "enum ProtocolShareReserve.Schema", - "name": "schema", - "type": "uint8" - } - ], - "name": "getPercentageDistribution", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "comptroller", - "type": "address" - }, - { - "internalType": "enum ProtocolShareReserve.Schema", - "name": "schema", - "type": "uint8" - }, - { - "internalType": "address", - "name": "destination", - "type": "address" - }, - { - "internalType": "address", - "name": "asset", - "type": "address" - } - ], - "name": "getUnreleasedFunds", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_accessControlManager", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_loopsLimit", - "type": "uint256" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "maxLoopsLimit", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "pendingOwner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "poolRegistry", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "comptroller", - "type": "address" - }, - { - "internalType": "address[]", - "name": "assets", - "type": "address[]" - } - ], - "name": "releaseFunds", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "enum ProtocolShareReserve.Schema", - "name": "schema", - "type": "uint8" - }, - { - "internalType": "address", - "name": "destination", - "type": "address" - } - ], - "name": "removeDistributionConfig", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "accessControlManager_", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_poolRegistry", - "type": "address" - } - ], - "name": "setPoolRegistry", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "totalAssetReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalDistributions", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "comptroller", - "type": "address" - }, - { - "internalType": "address", - "name": "asset", - "type": "address" - }, - { - "internalType": "enum IProtocolShareReserve.IncomeType", - "name": "incomeType", - "type": "uint8" - } - ], - "name": "updateAssetsState", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "vBNB", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_logic", - "type": "address" - }, - { - "internalType": "address", - "name": "admin_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "payable", - "type": "constructor" - } -] diff --git a/multisig/simulations/arbitrumsepolia/vip-013/abi/xvs.json b/multisig/simulations/arbitrumsepolia/vip-011/abi/xvs.json similarity index 100% rename from multisig/simulations/arbitrumsepolia/vip-013/abi/xvs.json rename to multisig/simulations/arbitrumsepolia/vip-011/abi/xvs.json diff --git a/multisig/simulations/arbitrumsepolia/vip-013/abi/xvsProxyOFTDest.json b/multisig/simulations/arbitrumsepolia/vip-011/abi/xvsProxyOFTDest.json similarity index 100% rename from multisig/simulations/arbitrumsepolia/vip-013/abi/xvsProxyOFTDest.json rename to multisig/simulations/arbitrumsepolia/vip-011/abi/xvsProxyOFTDest.json diff --git a/multisig/simulations/arbitrumsepolia/vip-011/index.ts b/multisig/simulations/arbitrumsepolia/vip-011/index.ts index 42310e72e..f6b24c0c5 100644 --- a/multisig/simulations/arbitrumsepolia/vip-011/index.ts +++ b/multisig/simulations/arbitrumsepolia/vip-011/index.ts @@ -1,35 +1,109 @@ +import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; import { expect } from "chai"; import { Contract } from "ethers"; +import { parseUnits } from "ethers/lib/utils"; import { ethers } from "hardhat"; +import { LzChainId } from "src/types"; +import { initMainnetUser } from "src/utils"; +import { forking, pretendExecutingVip } from "src/vip-framework"; -import { forking, pretendExecutingVip } from "../../../../src/vip-framework/index"; -import vip011, { POOL_REGISTRY, PSR } from "../../../proposals/arbitrumsepolia/vip-011"; -import PSR_ABI from "./abi/ProtocolShareReserve.json"; +import vip011, { + MAX_DAILY_RECEIVE_LIMIT, + MAX_DAILY_SEND_LIMIT, + SINGLE_RECEIVE_LIMIT, + SINGLE_SEND_LIMIT, + ZKSYNC_SEPOLIA_TRUSTED_REMOTE, +} from "../../../proposals/arbitrumsepolia/vip-011"; +import XVS_ABI from "./abi/xvs.json"; +import XVS_BRIDGE_ABI from "./abi/xvsProxyOFTDest.json"; -const OLD_POOL_REGISTRY = "0x6866b2BDaaEf6648ddd5b678B3e9f3352bF3d2A5"; +const XVS = "0x877Dc896e7b13096D3827872e396927BbE704407"; +const XVS_BRIDGE = "0xFdC5cEC63FD167DA46cF006585b30D03B104eFD4"; +const XVS_HOLDER = "0xFd7dA20ea0bE63ACb0852f97E950376E7E4a817D"; -forking(57920209, async () => { - let protocolShareReserve: Contract; +forking(69696597, async () => { + let xvs: Contract; + let xvsBridge: Contract; + let xvsHolderSigner: SignerWithAddress; + let receiver: SignerWithAddress; + let receiverAddressBytes32: string; + let defaultAdapterParams: string; before(async () => { - protocolShareReserve = await ethers.getContractAt(PSR_ABI, PSR); + xvs = await ethers.getContractAt(XVS_ABI, XVS); + xvsBridge = await ethers.getContractAt(XVS_BRIDGE_ABI, XVS_BRIDGE); + xvsHolderSigner = await initMainnetUser(XVS_HOLDER, ethers.utils.parseEther("5")); + [receiver] = await ethers.getSigners(); + receiverAddressBytes32 = ethers.utils.defaultAbiCoder.encode(["address"], [receiver.address]); + defaultAdapterParams = ethers.utils.solidityPack(["uint16", "uint256"], [1, 300000]); }); - describe("Pre tx checks", () => { - it("PSR should contain old PoolRegistry address", async () => { - const poolRegistry = await protocolShareReserve.poolRegistry(); - expect(poolRegistry).equals(OLD_POOL_REGISTRY); - }); - }); - - describe("Post tx checks", () => { + describe("Post-Execution state", () => { before(async () => { await pretendExecutingVip(await vip011()); }); - it("PSR should contain correct PoolRegistry address", async () => { - const poolRegistry = await protocolShareReserve.poolRegistry(); - expect(poolRegistry).equals(POOL_REGISTRY); + it("Should match trusted remote address", async () => { + const trustedRemote = await xvsBridge.getTrustedRemoteAddress(LzChainId.zksyncsepolia); + expect(trustedRemote).equals(ZKSYNC_SEPOLIA_TRUSTED_REMOTE); + }); + + it("Should match single send transaction limit", async () => { + expect(await xvsBridge.chainIdToMaxSingleTransactionLimit(LzChainId.zksyncsepolia)).to.equal(SINGLE_SEND_LIMIT); + }); + + it("Should match single receive transaction limit", async () => { + expect(await xvsBridge.chainIdToMaxSingleReceiveTransactionLimit(LzChainId.zksyncsepolia)).to.equal( + SINGLE_RECEIVE_LIMIT, + ); + }); + + it("Should match max daily send limit", async () => { + expect(await xvsBridge.chainIdToMaxDailyLimit(LzChainId.zksyncsepolia)).to.equal(MAX_DAILY_SEND_LIMIT); + }); + + it("Should match max daily receive limit", async () => { + expect(await xvsBridge.chainIdToMaxDailyReceiveLimit(LzChainId.zksyncsepolia)).to.equal(MAX_DAILY_RECEIVE_LIMIT); + }); + + it("Should emit an event on successful bridging of XVS (Arbitrum sepolia -> Zksync Sepolia)", async () => { + const amount = parseUnits("1", 18); + const nativeFee = ( + await xvsBridge.estimateSendFee( + LzChainId.zksyncsepolia, + receiverAddressBytes32, + amount, + false, + defaultAdapterParams, + ) + ).nativeFee; + + const circulatingSupplyBefore = await xvsBridge.circulatingSupply(); + const totalSupplyBefore = await xvs.totalSupply(); + const minterToMintedAmountBefore = await xvs.minterToMintedAmount(XVS_BRIDGE); + + await expect( + xvsBridge + .connect(xvsHolderSigner) + .sendFrom( + xvsHolderSigner.address, + LzChainId.zksyncsepolia, + receiverAddressBytes32, + amount, + [xvsHolderSigner.address, ethers.constants.AddressZero, defaultAdapterParams], + { value: nativeFee }, + ), + ) + .to.be.emit(xvsBridge, "SendToChain") + .withArgs(LzChainId.zksyncsepolia, XVS_HOLDER, receiverAddressBytes32, amount); + + const circulatingSupplyAfter = await xvsBridge.circulatingSupply(); + const totalSupplyAfter = await xvs.totalSupply(); + const minterToMintedAmountAfter = await xvs.minterToMintedAmount(XVS_BRIDGE); + + expect(circulatingSupplyBefore).equals(circulatingSupplyAfter.add(amount)); + expect(totalSupplyBefore).equals(totalSupplyAfter.add(amount)); + expect(minterToMintedAmountBefore).equals(minterToMintedAmountAfter.add(amount)); }); }); }); diff --git a/multisig/simulations/arbitrumsepolia/vip-013/index.ts b/multisig/simulations/arbitrumsepolia/vip-013/index.ts deleted file mode 100644 index 4d59d1e2c..000000000 --- a/multisig/simulations/arbitrumsepolia/vip-013/index.ts +++ /dev/null @@ -1,109 +0,0 @@ -import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; -import { expect } from "chai"; -import { Contract } from "ethers"; -import { parseUnits } from "ethers/lib/utils"; -import { ethers } from "hardhat"; -import { LzChainId } from "src/types"; -import { initMainnetUser } from "src/utils"; -import { forking, pretendExecutingVip } from "src/vip-framework"; - -import vip013, { - MAX_DAILY_RECEIVE_LIMIT, - MAX_DAILY_SEND_LIMIT, - SINGLE_RECEIVE_LIMIT, - SINGLE_SEND_LIMIT, - ZKSYNC_SEPOLIA_TRUSTED_REMOTE, -} from "../../../proposals/arbitrumsepolia/vip-013"; -import XVS_ABI from "./abi/xvs.json"; -import XVS_BRIDGE_ABI from "./abi/xvsProxyOFTDest.json"; - -const XVS = "0x877Dc896e7b13096D3827872e396927BbE704407"; -const XVS_BRIDGE = "0xFdC5cEC63FD167DA46cF006585b30D03B104eFD4"; -const XVS_HOLDER = "0xFd7dA20ea0bE63ACb0852f97E950376E7E4a817D"; - -forking(69696597, async () => { - let xvs: Contract; - let xvsBridge: Contract; - let xvsHolderSigner: SignerWithAddress; - let receiver: SignerWithAddress; - let receiverAddressBytes32: string; - let defaultAdapterParams: string; - - before(async () => { - xvs = await ethers.getContractAt(XVS_ABI, XVS); - xvsBridge = await ethers.getContractAt(XVS_BRIDGE_ABI, XVS_BRIDGE); - xvsHolderSigner = await initMainnetUser(XVS_HOLDER, ethers.utils.parseEther("5")); - [receiver] = await ethers.getSigners(); - receiverAddressBytes32 = ethers.utils.defaultAbiCoder.encode(["address"], [receiver.address]); - defaultAdapterParams = ethers.utils.solidityPack(["uint16", "uint256"], [1, 300000]); - }); - - describe("Post-Execution state", () => { - before(async () => { - await pretendExecutingVip(await vip013()); - }); - - it("Should match trusted remote address", async () => { - const trustedRemote = await xvsBridge.getTrustedRemoteAddress(LzChainId.zksyncsepolia); - expect(trustedRemote).equals(ZKSYNC_SEPOLIA_TRUSTED_REMOTE); - }); - - it("Should match single send transaction limit", async () => { - expect(await xvsBridge.chainIdToMaxSingleTransactionLimit(LzChainId.zksyncsepolia)).to.equal(SINGLE_SEND_LIMIT); - }); - - it("Should match single receive transaction limit", async () => { - expect(await xvsBridge.chainIdToMaxSingleReceiveTransactionLimit(LzChainId.zksyncsepolia)).to.equal( - SINGLE_RECEIVE_LIMIT, - ); - }); - - it("Should match max daily send limit", async () => { - expect(await xvsBridge.chainIdToMaxDailyLimit(LzChainId.zksyncsepolia)).to.equal(MAX_DAILY_SEND_LIMIT); - }); - - it("Should match max daily receive limit", async () => { - expect(await xvsBridge.chainIdToMaxDailyReceiveLimit(LzChainId.zksyncsepolia)).to.equal(MAX_DAILY_RECEIVE_LIMIT); - }); - - it("Should emit an event on successful bridging of XVS (Arbitrum sepolia -> Zksync Sepolia)", async () => { - const amount = parseUnits("1", 18); - const nativeFee = ( - await xvsBridge.estimateSendFee( - LzChainId.zksyncsepolia, - receiverAddressBytes32, - amount, - false, - defaultAdapterParams, - ) - ).nativeFee; - - const circulatingSupplyBefore = await xvsBridge.circulatingSupply(); - const totalSupplyBefore = await xvs.totalSupply(); - const minterToMintedAmountBefore = await xvs.minterToMintedAmount(XVS_BRIDGE); - - await expect( - xvsBridge - .connect(xvsHolderSigner) - .sendFrom( - xvsHolderSigner.address, - LzChainId.zksyncsepolia, - receiverAddressBytes32, - amount, - [xvsHolderSigner.address, ethers.constants.AddressZero, defaultAdapterParams], - { value: nativeFee }, - ), - ) - .to.be.emit(xvsBridge, "SendToChain") - .withArgs(LzChainId.zksyncsepolia, XVS_HOLDER, receiverAddressBytes32, amount); - - const circulatingSupplyAfter = await xvsBridge.circulatingSupply(); - const totalSupplyAfter = await xvs.totalSupply(); - const minterToMintedAmountAfter = await xvs.minterToMintedAmount(XVS_BRIDGE); - - expect(circulatingSupplyBefore).equals(circulatingSupplyAfter.add(amount)); - expect(totalSupplyBefore).equals(totalSupplyAfter.add(amount)); - expect(minterToMintedAmountBefore).equals(minterToMintedAmountAfter.add(amount)); - }); - }); -}); diff --git a/multisig/simulations/opbnbtestnet/vip-019/abi/xvs.json b/multisig/simulations/opbnbtestnet/vip-020/abi/xvs.json similarity index 100% rename from multisig/simulations/opbnbtestnet/vip-019/abi/xvs.json rename to multisig/simulations/opbnbtestnet/vip-020/abi/xvs.json diff --git a/multisig/simulations/opbnbtestnet/vip-019/abi/xvsProxyOFTDest.json b/multisig/simulations/opbnbtestnet/vip-020/abi/xvsProxyOFTDest.json similarity index 100% rename from multisig/simulations/opbnbtestnet/vip-019/abi/xvsProxyOFTDest.json rename to multisig/simulations/opbnbtestnet/vip-020/abi/xvsProxyOFTDest.json diff --git a/multisig/simulations/opbnbtestnet/vip-019/index.ts b/multisig/simulations/opbnbtestnet/vip-020/index.ts similarity index 97% rename from multisig/simulations/opbnbtestnet/vip-019/index.ts rename to multisig/simulations/opbnbtestnet/vip-020/index.ts index 2c2bbe019..cdf88444c 100644 --- a/multisig/simulations/opbnbtestnet/vip-019/index.ts +++ b/multisig/simulations/opbnbtestnet/vip-020/index.ts @@ -7,13 +7,13 @@ import { LzChainId } from "src/types"; import { initMainnetUser } from "src/utils"; import { forking, pretendExecutingVip } from "src/vip-framework"; -import vip019, { +import vip020, { MAX_DAILY_RECEIVE_LIMIT, MAX_DAILY_SEND_LIMIT, SINGLE_RECEIVE_LIMIT, SINGLE_SEND_LIMIT, ZKSYNC_SEPOLIA_TRUSTED_REMOTE, -} from "../../../proposals/opbnbtestnet/vip-019"; +} from "../../../proposals/opbnbtestnet/vip-020"; import XVS_ABI from "./abi/xvs.json"; import XVS_BRIDGE_ABI from "./abi/xvsProxyOFTDest.json"; @@ -40,7 +40,7 @@ forking(36739883, async () => { describe("Post-Execution state", () => { before(async () => { - await pretendExecutingVip(await vip019()); + await pretendExecutingVip(await vip020()); }); it("Should match trusted remote address", async () => { diff --git a/multisig/simulations/sepolia/vip-052/abi/xvs.json b/multisig/simulations/sepolia/vip-057/abi/xvs.json similarity index 100% rename from multisig/simulations/sepolia/vip-052/abi/xvs.json rename to multisig/simulations/sepolia/vip-057/abi/xvs.json diff --git a/multisig/simulations/sepolia/vip-052/abi/xvsProxyOFTDest.json b/multisig/simulations/sepolia/vip-057/abi/xvsProxyOFTDest.json similarity index 100% rename from multisig/simulations/sepolia/vip-052/abi/xvsProxyOFTDest.json rename to multisig/simulations/sepolia/vip-057/abi/xvsProxyOFTDest.json diff --git a/multisig/simulations/sepolia/vip-052/index.ts b/multisig/simulations/sepolia/vip-057/index.ts similarity index 97% rename from multisig/simulations/sepolia/vip-052/index.ts rename to multisig/simulations/sepolia/vip-057/index.ts index ce727381a..5a2dec8ae 100644 --- a/multisig/simulations/sepolia/vip-052/index.ts +++ b/multisig/simulations/sepolia/vip-057/index.ts @@ -7,13 +7,13 @@ import { LzChainId } from "src/types"; import { initMainnetUser } from "src/utils"; import { forking, pretendExecutingVip } from "src/vip-framework"; -import vip052, { +import vip057, { MAX_DAILY_RECEIVE_LIMIT, MAX_DAILY_SEND_LIMIT, SINGLE_RECEIVE_LIMIT, SINGLE_SEND_LIMIT, ZKSYNC_SEPOLIA_TRUSTED_REMOTE, -} from "../../../proposals/sepolia/vip-052"; +} from "../../../proposals/sepolia/vip-057"; import XVS_ABI from "./abi/xvs.json"; import XVS_BRIDGE_ABI from "./abi/xvsProxyOFTDest.json"; @@ -40,7 +40,7 @@ forking(6460328, async () => { describe("Post-Execution state", () => { before(async () => { - await pretendExecutingVip(await vip052()); + await pretendExecutingVip(await vip057()); }); it("Should match trusted remote address", async () => { diff --git a/simulations/vip-350/abi/XVS.json b/simulations/vip-358/abi/XVS.json similarity index 100% rename from simulations/vip-350/abi/XVS.json rename to simulations/vip-358/abi/XVS.json diff --git a/simulations/vip-350/abi/XVSBridgeAdmin.json b/simulations/vip-358/abi/XVSBridgeAdmin.json similarity index 100% rename from simulations/vip-350/abi/XVSBridgeAdmin.json rename to simulations/vip-358/abi/XVSBridgeAdmin.json diff --git a/simulations/vip-350/abi/XVSProxyOFTSrc.json b/simulations/vip-358/abi/XVSProxyOFTSrc.json similarity index 100% rename from simulations/vip-350/abi/XVSProxyOFTSrc.json rename to simulations/vip-358/abi/XVSProxyOFTSrc.json diff --git a/simulations/vip-350/simulations.ts b/simulations/vip-358/simulations.ts similarity index 98% rename from simulations/vip-350/simulations.ts rename to simulations/vip-358/simulations.ts index 13cf27cfe..5436577c4 100644 --- a/simulations/vip-350/simulations.ts +++ b/simulations/vip-358/simulations.ts @@ -9,13 +9,13 @@ import { LzChainId } from "src/types"; import { expectEvents, initMainnetUser } from "src/utils"; import { forking, testVip } from "src/vip-framework"; -import vip350, { +import vip358, { MAX_DAILY_RECEIVE_LIMIT, MAX_DAILY_SEND_LIMIT, MIN_DST_GAS, SINGLE_RECEIVE_LIMIT, SINGLE_SEND_LIMIT, -} from "../../vips/vip-350/bsctestnet"; +} from "../../vips/vip-358/bsctestnet"; import XVS_ABI from "./abi/XVS.json"; import XVS_BRIDGE_ADMIN_ABI from "./abi/XVSBridgeAdmin.json"; import XVS_BRIDGE_SRC_ABI from "./abi/XVSProxyOFTSrc.json"; @@ -43,7 +43,7 @@ forking(42792146, async () => { defaultAdapterParams = ethers.utils.solidityPack(["uint16", "uint256"], [1, 300000]); }); - testVip("vip-350 testnet", await vip350(), { + testVip("vip-358 testnet", await vip358(), { callbackAfterExecution: async (txResponse: TransactionResponse) => { await expectEvents( txResponse, diff --git a/vips/vip-350/bsctestnet.ts b/vips/vip-358/bsctestnet.ts similarity index 95% rename from vips/vip-350/bsctestnet.ts rename to vips/vip-358/bsctestnet.ts index 365fdb2a9..beac0aa1e 100644 --- a/vips/vip-350/bsctestnet.ts +++ b/vips/vip-358/bsctestnet.ts @@ -11,10 +11,10 @@ export const MAX_DAILY_SEND_LIMIT = parseUnits("50000", 18); export const SINGLE_RECEIVE_LIMIT = parseUnits("10200", 18); export const MAX_DAILY_RECEIVE_LIMIT = parseUnits("51000", 18); -const vip350 = () => { +const vip358 = () => { const meta = { version: "v2", - title: "VIP-349 Enable BSC -> ZKSYNC bridge", + title: "VIP-358 Enable BSC -> ZKSYNC bridge", description: `#### Summary Enable BSC -> ZKSYNC bridge`, forDescription: "I agree that Venus Protocol should proceed with this proposal", againstDescription: "I do not think that Venus Protocol should proceed with this proposal", @@ -59,4 +59,4 @@ const vip350 = () => { ); }; -export default vip350; +export default vip358; From 605abc0e834067c3850f40c5e13cd0d088960cda Mon Sep 17 00:00:00 2001 From: GitGuru7 <128375421+GitGuru7@users.noreply.github.com> Date: Mon, 2 Sep 2024 17:42:22 +0530 Subject: [PATCH 9/9] fix: lint --- simulations/vip-358/abi/xvs.json | 295 --- simulations/vip-358/abi/xvsBridgeAdmin.json | 287 --- simulations/vip-358/abi/xvsProxyOFTSrc.json | 1616 ----------------- simulations/vip-358/bscmainnet.ts | 6 +- .../vip-358/{simulations.ts => bsctestnet.ts} | 0 5 files changed, 3 insertions(+), 2201 deletions(-) delete mode 100644 simulations/vip-358/abi/xvs.json delete mode 100644 simulations/vip-358/abi/xvsBridgeAdmin.json delete mode 100644 simulations/vip-358/abi/xvsProxyOFTSrc.json rename simulations/vip-358/{simulations.ts => bsctestnet.ts} (100%) diff --git a/simulations/vip-358/abi/xvs.json b/simulations/vip-358/abi/xvs.json deleted file mode 100644 index b0ef0e012..000000000 --- a/simulations/vip-358/abi/xvs.json +++ /dev/null @@ -1,295 +0,0 @@ -[ - { - "inputs": [{ "internalType": "address", "name": "account", "type": "address" }], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "owner", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "spender", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "delegator", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "fromDelegate", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "toDelegate", "type": "address" } - ], - "name": "DelegateChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "delegate", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "previousBalance", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "newBalance", "type": "uint256" } - ], - "name": "DelegateVotesChanged", - "type": "event" - }, - { "anonymous": false, "inputs": [], "name": "Freezed", "type": "event" }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "_from", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "_to", "type": "address" } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "from", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "to", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "Transfer", - "type": "event" - }, - { "anonymous": false, "inputs": [], "name": "UnFreezed", "type": "event" }, - { - "constant": true, - "inputs": [], - "name": "DELEGATION_TYPEHASH", - "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "DOMAIN_TYPEHASH", - "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { "internalType": "address", "name": "account", "type": "address" }, - { "internalType": "address", "name": "spender", "type": "address" } - ], - "name": "allowance", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { "internalType": "address", "name": "spender", "type": "address" }, - { "internalType": "uint256", "name": "rawAmount", "type": "uint256" } - ], - "name": "approve", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [{ "internalType": "address", "name": "account", "type": "address" }], - "name": "balanceOf", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { "internalType": "address", "name": "", "type": "address" }, - { "internalType": "uint32", "name": "", "type": "uint32" } - ], - "name": "checkpoints", - "outputs": [ - { "internalType": "uint32", "name": "fromBlock", "type": "uint32" }, - { "internalType": "uint96", "name": "votes", "type": "uint96" } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [{ "internalType": "uint8", "name": "", "type": "uint8" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [{ "internalType": "address", "name": "delegatee", "type": "address" }], - "name": "delegate", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { "internalType": "address", "name": "delegatee", "type": "address" }, - { "internalType": "uint256", "name": "nonce", "type": "uint256" }, - { "internalType": "uint256", "name": "expiry", "type": "uint256" }, - { "internalType": "uint8", "name": "v", "type": "uint8" }, - { "internalType": "bytes32", "name": "r", "type": "bytes32" }, - { "internalType": "bytes32", "name": "s", "type": "bytes32" } - ], - "name": "delegateBySig", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [{ "internalType": "address", "name": "", "type": "address" }], - "name": "delegates", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "freeze", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [{ "internalType": "address", "name": "account", "type": "address" }], - "name": "getCurrentVotes", - "outputs": [{ "internalType": "uint96", "name": "", "type": "uint96" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { "internalType": "address", "name": "account", "type": "address" }, - { "internalType": "uint256", "name": "blockNumber", "type": "uint256" } - ], - "name": "getPriorVotes", - "outputs": [{ "internalType": "uint96", "name": "", "type": "uint96" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [{ "internalType": "string", "name": "", "type": "string" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [{ "internalType": "address", "name": "", "type": "address" }], - "name": "nonces", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [{ "internalType": "address", "name": "", "type": "address" }], - "name": "numCheckpoints", - "outputs": [{ "internalType": "uint32", "name": "", "type": "uint32" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "owner", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [{ "internalType": "string", "name": "", "type": "string" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { "internalType": "address", "name": "dst", "type": "address" }, - { "internalType": "uint256", "name": "rawAmount", "type": "uint256" } - ], - "name": "transfer", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { "internalType": "address", "name": "src", "type": "address" }, - { "internalType": "address", "name": "dst", "type": "address" }, - { "internalType": "uint256", "name": "rawAmount", "type": "uint256" } - ], - "name": "transferFrom", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [{ "internalType": "address", "name": "newOwner", "type": "address" }], - "name": "transferOwnership", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "unfreeze", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - } -] diff --git a/simulations/vip-358/abi/xvsBridgeAdmin.json b/simulations/vip-358/abi/xvsBridgeAdmin.json deleted file mode 100644 index 36158eeba..000000000 --- a/simulations/vip-358/abi/xvsBridgeAdmin.json +++ /dev/null @@ -1,287 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "address", - "name": "XVSBridge_", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "address", - "name": "calledContract", - "type": "address" - }, - { - "internalType": "string", - "name": "methodSignature", - "type": "string" - } - ], - "name": "Unauthorized", - "type": "error" - }, - { - "inputs": [], - "name": "ZeroAddressNotAllowed", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "string", - "name": "signature", - "type": "string" - }, - { - "indexed": false, - "internalType": "bool", - "name": "isRemoved", - "type": "bool" - } - ], - "name": "FunctionRegistryChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlManager", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlManager", - "type": "address" - } - ], - "name": "NewAccessControlManager", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferStarted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "inputs": [], - "name": "XVSBridge", - "outputs": [ - { - "internalType": "contract IXVSProxyOFT", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "acceptOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "contract IAccessControlManagerV8", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "", - "type": "bytes4" - } - ], - "name": "functionRegistry", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "accessControlManager_", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "pendingOwner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "accessControlManager_", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOwner_", - "type": "address" - } - ], - "name": "transferBridgeOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string[]", - "name": "signatures_", - "type": "string[]" - }, - { - "internalType": "bool[]", - "name": "remove_", - "type": "bool[]" - } - ], - "name": "upsertSignature", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } -] diff --git a/simulations/vip-358/abi/xvsProxyOFTSrc.json b/simulations/vip-358/abi/xvsProxyOFTSrc.json deleted file mode 100644 index e88302d59..000000000 --- a/simulations/vip-358/abi/xvsProxyOFTSrc.json +++ /dev/null @@ -1,1616 +0,0 @@ -[ - { - "inputs": [], - "name": "ZeroAddressNotAllowed", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint16", - "name": "_srcChainId", - "type": "uint16" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "_srcAddress", - "type": "bytes" - }, - { - "indexed": false, - "internalType": "uint64", - "name": "_nonce", - "type": "uint64" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "_hash", - "type": "bytes32" - } - ], - "name": "CallOFTReceivedSuccess", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint16", - "name": "_srcChainId", - "type": "uint16" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "_srcAddress", - "type": "bytes" - }, - { - "indexed": false, - "internalType": "uint64", - "name": "_nonce", - "type": "uint64" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "_payload", - "type": "bytes" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "_reason", - "type": "bytes" - } - ], - "name": "MessageFailed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "_address", - "type": "address" - } - ], - "name": "NonContractAddress", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldOracle", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOracle", - "type": "address" - } - ], - "name": "OracleChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Paused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint16", - "name": "_srcChainId", - "type": "uint16" - }, - { - "indexed": true, - "internalType": "address", - "name": "_to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "ReceiveFromChain", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint16", - "name": "_srcChainId", - "type": "uint16" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "_srcAddress", - "type": "bytes" - }, - { - "indexed": false, - "internalType": "uint64", - "name": "_nonce", - "type": "uint64" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "_payloadHash", - "type": "bytes32" - } - ], - "name": "RetryMessageSuccess", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint16", - "name": "_dstChainId", - "type": "uint16" - }, - { - "indexed": true, - "internalType": "address", - "name": "_from", - "type": "address" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "_toAddress", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "SendToChain", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint16", - "name": "chainId", - "type": "uint16" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "oldMaxLimit", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newMaxLimit", - "type": "uint256" - } - ], - "name": "SetMaxDailyLimit", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint16", - "name": "chainId", - "type": "uint16" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "oldMaxLimit", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newMaxLimit", - "type": "uint256" - } - ], - "name": "SetMaxDailyReceiveLimit", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint16", - "name": "chainId", - "type": "uint16" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "oldMaxLimit", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newMaxLimit", - "type": "uint256" - } - ], - "name": "SetMaxSingleReceiveTransactionLimit", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint16", - "name": "chainId", - "type": "uint16" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "oldMaxLimit", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newMaxLimit", - "type": "uint256" - } - ], - "name": "SetMaxSingleTransactionLimit", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint16", - "name": "_dstChainId", - "type": "uint16" - }, - { - "indexed": false, - "internalType": "uint16", - "name": "_type", - "type": "uint16" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_minDstGas", - "type": "uint256" - } - ], - "name": "SetMinDstGas", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "precrime", - "type": "address" - } - ], - "name": "SetPrecrime", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint16", - "name": "_remoteChainId", - "type": "uint16" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "_path", - "type": "bytes" - } - ], - "name": "SetTrustedRemote", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint16", - "name": "_remoteChainId", - "type": "uint16" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "_remoteAddress", - "type": "bytes" - } - ], - "name": "SetTrustedRemoteAddress", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "addr", - "type": "address" - }, - { - "indexed": false, - "internalType": "bool", - "name": "isWhitelist", - "type": "bool" - } - ], - "name": "SetWhitelist", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Unpaused", - "type": "event" - }, - { - "inputs": [], - "name": "DEFAULT_PAYLOAD_SIZE_LIMIT", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "NO_EXTRA_GAS", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "PT_SEND", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "PT_SEND_AND_CALL", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint16", - "name": "_srcChainId", - "type": "uint16" - }, - { - "internalType": "bytes", - "name": "_srcAddress", - "type": "bytes" - }, - { - "internalType": "uint64", - "name": "_nonce", - "type": "uint64" - }, - { - "internalType": "bytes32", - "name": "_from", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "_to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_payload", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "_gasForCall", - "type": "uint256" - } - ], - "name": "callOnOFTReceived", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint16", - "name": "", - "type": "uint16" - } - ], - "name": "chainIdToLast24HourReceiveWindowStart", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint16", - "name": "", - "type": "uint16" - } - ], - "name": "chainIdToLast24HourReceived", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint16", - "name": "", - "type": "uint16" - } - ], - "name": "chainIdToLast24HourTransferred", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint16", - "name": "", - "type": "uint16" - } - ], - "name": "chainIdToLast24HourWindowStart", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint16", - "name": "", - "type": "uint16" - } - ], - "name": "chainIdToMaxDailyLimit", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint16", - "name": "", - "type": "uint16" - } - ], - "name": "chainIdToMaxDailyReceiveLimit", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint16", - "name": "", - "type": "uint16" - } - ], - "name": "chainIdToMaxSingleReceiveTransactionLimit", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint16", - "name": "", - "type": "uint16" - } - ], - "name": "chainIdToMaxSingleTransactionLimit", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "circulatingSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint16", - "name": "", - "type": "uint16" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - }, - { - "internalType": "uint64", - "name": "", - "type": "uint64" - } - ], - "name": "creditedPackets", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint16", - "name": "_dstChainId", - "type": "uint16" - }, - { - "internalType": "bytes32", - "name": "_toAddress", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_payload", - "type": "bytes" - }, - { - "internalType": "uint64", - "name": "_dstGasForCall", - "type": "uint64" - }, - { - "internalType": "bool", - "name": "_useZro", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "_adapterParams", - "type": "bytes" - } - ], - "name": "estimateSendAndCallFee", - "outputs": [ - { - "internalType": "uint256", - "name": "nativeFee", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "zroFee", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint16", - "name": "_dstChainId", - "type": "uint16" - }, - { - "internalType": "bytes32", - "name": "_toAddress", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "_useZro", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "_adapterParams", - "type": "bytes" - } - ], - "name": "estimateSendFee", - "outputs": [ - { - "internalType": "uint256", - "name": "nativeFee", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "zroFee", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint16", - "name": "", - "type": "uint16" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - }, - { - "internalType": "uint64", - "name": "", - "type": "uint64" - } - ], - "name": "failedMessages", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint16", - "name": "_srcChainId", - "type": "uint16" - }, - { - "internalType": "bytes", - "name": "_srcAddress", - "type": "bytes" - } - ], - "name": "forceResumeReceive", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint16", - "name": "_version", - "type": "uint16" - }, - { - "internalType": "uint16", - "name": "_chainId", - "type": "uint16" - }, - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_configType", - "type": "uint256" - } - ], - "name": "getConfig", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint16", - "name": "_remoteChainId", - "type": "uint16" - } - ], - "name": "getTrustedRemoteAddress", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint16", - "name": "_srcChainId", - "type": "uint16" - }, - { - "internalType": "bytes", - "name": "_srcAddress", - "type": "bytes" - } - ], - "name": "isTrustedRemote", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "lzEndpoint", - "outputs": [ - { - "internalType": "contract ILayerZeroEndpoint", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint16", - "name": "_srcChainId", - "type": "uint16" - }, - { - "internalType": "bytes", - "name": "_srcAddress", - "type": "bytes" - }, - { - "internalType": "uint64", - "name": "_nonce", - "type": "uint64" - }, - { - "internalType": "bytes", - "name": "_payload", - "type": "bytes" - } - ], - "name": "lzReceive", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint16", - "name": "", - "type": "uint16" - }, - { - "internalType": "uint16", - "name": "", - "type": "uint16" - } - ], - "name": "minDstGasLookup", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint16", - "name": "_srcChainId", - "type": "uint16" - }, - { - "internalType": "bytes", - "name": "_srcAddress", - "type": "bytes" - }, - { - "internalType": "uint64", - "name": "_nonce", - "type": "uint64" - }, - { - "internalType": "bytes", - "name": "_payload", - "type": "bytes" - } - ], - "name": "nonblockingLzReceive", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "oracle", - "outputs": [ - { - "internalType": "contract ResilientOracleInterface", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "pause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "paused", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint16", - "name": "", - "type": "uint16" - } - ], - "name": "payloadSizeLimitLookup", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "precrime", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint16", - "name": "_srcChainId", - "type": "uint16" - }, - { - "internalType": "bytes", - "name": "_srcAddress", - "type": "bytes" - }, - { - "internalType": "uint64", - "name": "_nonce", - "type": "uint64" - }, - { - "internalType": "bytes", - "name": "_payload", - "type": "bytes" - } - ], - "name": "retryMessage", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_from", - "type": "address" - }, - { - "internalType": "uint16", - "name": "_dstChainId", - "type": "uint16" - }, - { - "internalType": "bytes32", - "name": "_toAddress", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_payload", - "type": "bytes" - }, - { - "internalType": "uint64", - "name": "_dstGasForCall", - "type": "uint64" - }, - { - "components": [ - { - "internalType": "address payable", - "name": "refundAddress", - "type": "address" - }, - { - "internalType": "address", - "name": "zroPaymentAddress", - "type": "address" - }, - { - "internalType": "bytes", - "name": "adapterParams", - "type": "bytes" - } - ], - "internalType": "struct ICommonOFT.LzCallParams", - "name": "_callParams", - "type": "tuple" - } - ], - "name": "sendAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_from", - "type": "address" - }, - { - "internalType": "uint16", - "name": "_dstChainId", - "type": "uint16" - }, - { - "internalType": "bytes32", - "name": "_toAddress", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - }, - { - "components": [ - { - "internalType": "address payable", - "name": "refundAddress", - "type": "address" - }, - { - "internalType": "address", - "name": "zroPaymentAddress", - "type": "address" - }, - { - "internalType": "bytes", - "name": "adapterParams", - "type": "bytes" - } - ], - "internalType": "struct ICommonOFT.LzCallParams", - "name": "_callParams", - "type": "tuple" - } - ], - "name": "sendFrom", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint16", - "name": "_version", - "type": "uint16" - }, - { - "internalType": "uint16", - "name": "_chainId", - "type": "uint16" - }, - { - "internalType": "uint256", - "name": "_configType", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_config", - "type": "bytes" - } - ], - "name": "setConfig", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint16", - "name": "chainId_", - "type": "uint16" - }, - { - "internalType": "uint256", - "name": "limit_", - "type": "uint256" - } - ], - "name": "setMaxDailyLimit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint16", - "name": "chainId_", - "type": "uint16" - }, - { - "internalType": "uint256", - "name": "limit_", - "type": "uint256" - } - ], - "name": "setMaxDailyReceiveLimit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint16", - "name": "chainId_", - "type": "uint16" - }, - { - "internalType": "uint256", - "name": "limit_", - "type": "uint256" - } - ], - "name": "setMaxSingleReceiveTransactionLimit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint16", - "name": "chainId_", - "type": "uint16" - }, - { - "internalType": "uint256", - "name": "limit_", - "type": "uint256" - } - ], - "name": "setMaxSingleTransactionLimit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint16", - "name": "_dstChainId", - "type": "uint16" - }, - { - "internalType": "uint16", - "name": "_packetType", - "type": "uint16" - }, - { - "internalType": "uint256", - "name": "_minGas", - "type": "uint256" - } - ], - "name": "setMinDstGas", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "oracleAddress_", - "type": "address" - } - ], - "name": "setOracle", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint16", - "name": "_dstChainId", - "type": "uint16" - }, - { - "internalType": "uint256", - "name": "_size", - "type": "uint256" - } - ], - "name": "setPayloadSizeLimit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_precrime", - "type": "address" - } - ], - "name": "setPrecrime", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint16", - "name": "_version", - "type": "uint16" - } - ], - "name": "setReceiveVersion", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint16", - "name": "_version", - "type": "uint16" - } - ], - "name": "setSendVersion", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint16", - "name": "_remoteChainId", - "type": "uint16" - }, - { - "internalType": "bytes", - "name": "_path", - "type": "bytes" - } - ], - "name": "setTrustedRemote", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint16", - "name": "_remoteChainId", - "type": "uint16" - }, - { - "internalType": "bytes", - "name": "_remoteAddress", - "type": "bytes" - } - ], - "name": "setTrustedRemoteAddress", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "user_", - "type": "address" - }, - { - "internalType": "bool", - "name": "val_", - "type": "bool" - } - ], - "name": "setWhitelist", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "sharedDecimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "token", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint16", - "name": "", - "type": "uint16" - } - ], - "name": "trustedRemoteLookup", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "unpause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "whitelist", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - } -] diff --git a/simulations/vip-358/bscmainnet.ts b/simulations/vip-358/bscmainnet.ts index edec4b0df..5f4861584 100644 --- a/simulations/vip-358/bscmainnet.ts +++ b/simulations/vip-358/bscmainnet.ts @@ -16,9 +16,9 @@ import vip358, { SINGLE_RECEIVE_LIMIT, SINGLE_SEND_LIMIT, } from "../../vips/vip-358/bscmainnet"; -import XVS_ABI from "./abi/xvs.json"; -import XVS_BRIDGE_ADMIN_ABI from "./abi/xvsBridgeAdmin.json"; -import XVS_BRIDGE_SRC_ABI from "./abi/xvsProxyOFTSrc.json"; +import XVS_ABI from "./abi/XVS.json"; +import XVS_BRIDGE_ADMIN_ABI from "./abi/XVSBridgeAdmin.json"; +import XVS_BRIDGE_SRC_ABI from "./abi/XVSProxyOFTSrc.json"; const { bscmainnet } = NETWORK_ADDRESSES; diff --git a/simulations/vip-358/simulations.ts b/simulations/vip-358/bsctestnet.ts similarity index 100% rename from simulations/vip-358/simulations.ts rename to simulations/vip-358/bsctestnet.ts