diff --git a/multisig/proposals/vip-011/vip-011-sepolia.ts b/multisig/proposals/vip-011/vip-011-sepolia.ts new file mode 100644 index 000000000..7b2563a57 --- /dev/null +++ b/multisig/proposals/vip-011/vip-011-sepolia.ts @@ -0,0 +1,192 @@ +import { parseUnits } from "ethers/lib/utils"; + +import { NETWORK_ADDRESSES } from "../../../src/networkAddresses"; +import { makeProposal } from "../../../src/utils"; + +const { sepolia } = NETWORK_ADDRESSES; +const TRUSTED_REMOTE = "0xeaa89cF3bAB8245F8A2F438595e1fF5cC3eEaE18"; + +export const vip011 = () => { + return makeProposal([ + { + target: sepolia.ACM, + signature: "giveCallPermission(address,string,address)", + params: [sepolia.TOKEN_BRIDGE_ADMIN_VAI, "setSendVersion(uint16)", sepolia.NORMAL_TIMELOCK], + }, + { + target: sepolia.ACM, + signature: "giveCallPermission(address,string,address)", + params: [sepolia.TOKEN_BRIDGE_ADMIN_VAI, "setReceiveVersion(uint16)", sepolia.NORMAL_TIMELOCK], + }, + { + target: sepolia.ACM, + signature: "giveCallPermission(address,string,address)", + params: [sepolia.TOKEN_BRIDGE_ADMIN_VAI, "forceResumeReceive(uint16,bytes)", sepolia.NORMAL_TIMELOCK], + }, + { + target: sepolia.ACM, + signature: "giveCallPermission(address,string,address)", + params: [sepolia.TOKEN_BRIDGE_ADMIN_VAI, "setOracle(address)", sepolia.NORMAL_TIMELOCK], + }, + { + target: sepolia.ACM, + signature: "giveCallPermission(address,string,address)", + params: [sepolia.TOKEN_BRIDGE_ADMIN_VAI, "setMaxSingleTransactionLimit(uint16,uint256)", sepolia.NORMAL_TIMELOCK], + }, + { + target: sepolia.ACM, + signature: "giveCallPermission(address,string,address)", + params: [sepolia.TOKEN_BRIDGE_ADMIN_VAI, "setMaxDailyLimit(uint16,uint256)", sepolia.NORMAL_TIMELOCK], + }, + { + target: sepolia.ACM, + signature: "giveCallPermission(address,string,address)", + params: [ + sepolia.TOKEN_BRIDGE_ADMIN_VAI, + "setMaxSingleReceiveTransactionLimit(uint16,uint256)", + sepolia.NORMAL_TIMELOCK, + ], + }, + { + target: sepolia.ACM, + signature: "giveCallPermission(address,string,address)", + params: [sepolia.TOKEN_BRIDGE_ADMIN_VAI, "setMaxDailyReceiveLimit(uint16,uint256)", sepolia.NORMAL_TIMELOCK], + }, + { + target: sepolia.ACM, + signature: "giveCallPermission(address,string,address)", + params: [sepolia.TOKEN_BRIDGE_ADMIN_VAI, "pause()", sepolia.NORMAL_TIMELOCK], + }, + { + target: sepolia.ACM, + signature: "giveCallPermission(address,string,address)", + params: [sepolia.TOKEN_BRIDGE_ADMIN_VAI, "unpause()", sepolia.NORMAL_TIMELOCK], + }, + { + target: sepolia.ACM, + signature: "giveCallPermission(address,string,address)", + params: [sepolia.TOKEN_BRIDGE_ADMIN_VAI, "removeTrustedRemote(uint16)", sepolia.NORMAL_TIMELOCK], + }, + { + target: sepolia.ACM, + signature: "giveCallPermission(address,string,address)", + params: [sepolia.TOKEN_BRIDGE_ADMIN_VAI, "dropFailedMessage(uint16,bytes,uint64)", sepolia.NORMAL_TIMELOCK], + }, + { + target: sepolia.ACM, + signature: "giveCallPermission(address,string,address)", + params: [sepolia.TOKEN_BRIDGE_ADMIN_VAI, "setPrecrime(address)", sepolia.NORMAL_TIMELOCK], + }, + { + target: sepolia.ACM, + signature: "giveCallPermission(address,string,address)", + params: [sepolia.TOKEN_BRIDGE_ADMIN_VAI, "setMinDstGas(uint16,uint16,uint256)", sepolia.NORMAL_TIMELOCK], + }, + { + target: sepolia.ACM, + signature: "giveCallPermission(address,string,address)", + params: [sepolia.TOKEN_BRIDGE_ADMIN_VAI, "setPayloadSizeLimit(uint16,uint256)", sepolia.NORMAL_TIMELOCK], + }, + { + target: sepolia.ACM, + signature: "giveCallPermission(address,string,address)", + params: [sepolia.TOKEN_BRIDGE_ADMIN_VAI, "setWhitelist(address,bool)", sepolia.NORMAL_TIMELOCK], + }, + { + target: sepolia.ACM, + signature: "giveCallPermission(address,string,address)", + params: [sepolia.TOKEN_BRIDGE_ADMIN_VAI, "setConfig(uint16,uint16,uint256,bytes)", sepolia.NORMAL_TIMELOCK], + }, + { + target: sepolia.ACM, + signature: "giveCallPermission(address,string,address)", + params: [sepolia.TOKEN_BRIDGE_ADMIN_VAI, "sweepToken(address,address,uint256)", sepolia.NORMAL_TIMELOCK], + }, + { + target: sepolia.ACM, + signature: "giveCallPermission(address,string,address)", + params: [sepolia.TOKEN_BRIDGE_ADMIN_VAI, "updateSendAndCallEnabled(bool)", sepolia.NORMAL_TIMELOCK], + }, + { + target: sepolia.ACM, + signature: "giveCallPermission(address,string,address)", + params: [sepolia.TOKEN_BRIDGE_ADMIN_VAI, "forceMint(uint16,address,uint256)", sepolia.NORMAL_TIMELOCK], + }, + { + target: sepolia.ACM, + signature: "giveCallPermission(address,string,address)", + params: [sepolia.VAI, "mint(address,uint256)", sepolia.TOKEN_BRIDGE_VAI], + }, + { + target: sepolia.ACM, + signature: "giveCallPermission(address,string,address)", + params: [sepolia.VAI, "burn(address,uint256)", sepolia.TOKEN_BRIDGE_VAI], + }, + { + target: sepolia.ACM, + signature: "giveCallPermission(address,string,address)", + params: [sepolia.TOKEN_BRIDGE_ADMIN_VAI, "setTrustedRemoteAddress(uint16,bytes)", sepolia.NORMAL_TIMELOCK], + }, + { + target: sepolia.ACM, + signature: "giveCallPermission(address,string,address)", + params: [sepolia.TOKEN_BRIDGE_ADMIN_VAI, "transferBridgeOwnership(address)", sepolia.NORMAL_TIMELOCK], + }, + { + target: sepolia.ACM, + signature: "giveCallPermission(address,string,address)", + params: [sepolia.VAI, "migrateMinterTokens(address,address)", sepolia.NORMAL_TIMELOCK], + }, + { + target: sepolia.ACM, + signature: "giveCallPermission(address,string,address)", + params: [sepolia.VAI, "setMintCap(address,uint256)", sepolia.NORMAL_TIMELOCK], + }, + { + target: sepolia.ACM, + signature: "giveCallPermission(address,string,address)", + params: [sepolia.VAI, "updateBlacklist(address,bool)", sepolia.NORMAL_TIMELOCK], + }, + { + target: sepolia.ACM, + signature: "giveCallPermission(address,string,address)", + params: [sepolia.VAI, "pause()", sepolia.NORMAL_TIMELOCK], + }, + { + target: sepolia.ACM, + signature: "giveCallPermission(address,string,address)", + params: [sepolia.VAI, "unpause()", sepolia.NORMAL_TIMELOCK], + }, + { target: sepolia.TOKEN_BRIDGE_ADMIN_VAI, signature: "acceptOwnership()", params: [] }, + { + target: sepolia.TOKEN_BRIDGE_ADMIN_VAI, + signature: "setTrustedRemoteAddress(uint16,bytes)", + params: ["10102", TRUSTED_REMOTE], + }, + { + target: sepolia.VAI, + signature: "setMintCap(address,uint256)", + params: [sepolia.TOKEN_BRIDGE_VAI, "100000000000000000000000"], // 100K VAI + }, + { + target: sepolia.CHAINLINK_ORACLE, + signature: "setDirectPrice(address,uint256)", + params: [sepolia.VAI, parseUnits("1", 18)], + }, + { + target: sepolia.RESILIENT_ORACLE, + signature: "setTokenConfig((address,address[3],bool[3]))", + params: [ + [ + sepolia.VAI, + [ + sepolia.CHAINLINK_ORACLE, + "0x0000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000", + ], + [true, false, false], + ], + ], + }, + ]); +}; diff --git a/multisig/simulations/vip-011/vip-011-sepolia/abi/resilientOracle.json b/multisig/simulations/vip-011/vip-011-sepolia/abi/resilientOracle.json new file mode 100644 index 000000000..35f52caa0 --- /dev/null +++ b/multisig/simulations/vip-011/vip-011-sepolia/abi/resilientOracle.json @@ -0,0 +1,640 @@ +[ + { + "inputs": [ + { + "internalType": "address", + "name": "nativeMarketAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "vaiAddress", + "type": "address" + }, + { + "internalType": "contract BoundValidatorInterface", + "name": "_boundValidator", + "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" + }, + { + "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": "asset", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "role", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "bool", + "name": "enable", + "type": "bool" + } + ], + "name": "OracleEnabled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "asset", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "oracle", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "role", + "type": "uint256" + } + ], + "name": "OracleSet", + "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": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "asset", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "mainOracle", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "pivotOracle", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "fallbackOracle", + "type": "address" + } + ], + "name": "TokenConfigAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "inputs": [], + "name": "INVALID_PRICE", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "NATIVE_TOKEN_ADDR", + "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": [], + "name": "boundValidator", + "outputs": [ + { + "internalType": "contract BoundValidatorInterface", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "asset", + "type": "address" + }, + { + "internalType": "enum ResilientOracle.OracleRole", + "name": "role", + "type": "uint8" + }, + { + "internalType": "bool", + "name": "enable", + "type": "bool" + } + ], + "name": "enableOracle", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "asset", + "type": "address" + }, + { + "internalType": "enum ResilientOracle.OracleRole", + "name": "role", + "type": "uint8" + } + ], + "name": "getOracle", + "outputs": [ + { + "internalType": "address", + "name": "oracle", + "type": "address" + }, + { + "internalType": "bool", + "name": "enabled", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "asset", + "type": "address" + } + ], + "name": "getPrice", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "asset", + "type": "address" + } + ], + "name": "getTokenConfig", + "outputs": [ + { + "components": [ + { + "internalType": "address", + "name": "asset", + "type": "address" + }, + { + "internalType": "address[3]", + "name": "oracles", + "type": "address[3]" + }, + { + "internalType": "bool[3]", + "name": "enableFlagsForOracles", + "type": "bool[3]" + } + ], + "internalType": "struct ResilientOracle.TokenConfig", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "vToken", + "type": "address" + } + ], + "name": "getUnderlyingPrice", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "accessControlManager_", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "nativeMarket", + "outputs": [ + { + "internalType": "address", + "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": [], + "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": "asset", + "type": "address" + }, + { + "internalType": "address", + "name": "oracle", + "type": "address" + }, + { + "internalType": "enum ResilientOracle.OracleRole", + "name": "role", + "type": "uint8" + } + ], + "name": "setOracle", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "asset", + "type": "address" + }, + { + "internalType": "address[3]", + "name": "oracles", + "type": "address[3]" + }, + { + "internalType": "bool[3]", + "name": "enableFlagsForOracles", + "type": "bool[3]" + } + ], + "internalType": "struct ResilientOracle.TokenConfig", + "name": "tokenConfig", + "type": "tuple" + } + ], + "name": "setTokenConfig", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "asset", + "type": "address" + }, + { + "internalType": "address[3]", + "name": "oracles", + "type": "address[3]" + }, + { + "internalType": "bool[3]", + "name": "enableFlagsForOracles", + "type": "bool[3]" + } + ], + "internalType": "struct ResilientOracle.TokenConfig[]", + "name": "tokenConfigs_", + "type": "tuple[]" + } + ], + "name": "setTokenConfigs", + "outputs": [], + "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": "asset", + "type": "address" + } + ], + "name": "updateAssetPrice", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "vToken", + "type": "address" + } + ], + "name": "updatePrice", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "vai", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } +] diff --git a/multisig/simulations/vip-011/vip-011-sepolia/abi/vai.json b/multisig/simulations/vip-011/vip-011-sepolia/abi/vai.json new file mode 100644 index 000000000..8a2713887 --- /dev/null +++ b/multisig/simulations/vip-011/vip-011-sepolia/abi/vai.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/vip-011/vip-011-sepolia/abi/vaiBridge.json b/multisig/simulations/vip-011/vip-011-sepolia/abi/vaiBridge.json new file mode 100644 index 000000000..5917469fd --- /dev/null +++ b/multisig/simulations/vip-011/vip-011-sepolia/abi/vaiBridge.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/vip-011/vip-011-sepolia/abi/vaiBridgeAdmin.json b/multisig/simulations/vip-011/vip-011-sepolia/abi/vaiBridgeAdmin.json new file mode 100644 index 000000000..024450a40 --- /dev/null +++ b/multisig/simulations/vip-011/vip-011-sepolia/abi/vaiBridgeAdmin.json @@ -0,0 +1,329 @@ +[ + { + "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": "active", + "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": "nonpayable", + "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": [ + { + "internalType": "uint16", + "name": "remoteChainId_", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "remoteAddress_", + "type": "bytes" + } + ], + "name": "isTrustedRemote", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "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": "uint16", + "name": "remoteChainId_", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "remoteAddress_", + "type": "bytes" + } + ], + "name": "setTrustedRemoteAddress", + "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": "active_", + "type": "bool[]" + } + ], + "name": "upsertSignature", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/multisig/simulations/vip-011/vip-011-sepolia/simulations.ts b/multisig/simulations/vip-011/vip-011-sepolia/simulations.ts new file mode 100644 index 000000000..c398a01f8 --- /dev/null +++ b/multisig/simulations/vip-011/vip-011-sepolia/simulations.ts @@ -0,0 +1,193 @@ +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 { initMainnetUser } from "../../../../src/utils"; +import { forking, pretendExecutingVip } from "../../../../src/vip-framework"; +import { vip011 } from "../../../proposals/vip-011/vip-011-sepolia"; +import RESILIENT_ORACLE_ABI from "./abi/resilientOracle.json"; +import VAI_ABI from "./abi/vai.json"; +import VAI_BRIDGE_ABI from "./abi/vaiBridge.json"; +import VAI_BRIDGE_ADMIN_ABI from "./abi/vaiBridgeAdmin.json"; + +const { sepolia } = NETWORK_ADDRESSES; +const TRUSTED_REMOTE = "0xeaa89cf3bab8245f8a2f438595e1ff5cc3eeae18"; +const DEST_CHAIN_ID = 10102; + +forking(5373511, () => { + let vai: Contract; + let vaiBridgeAdmin: Contract; + let vaiBridge: Contract; + let oracle: Contract; + + before(async () => { + vai = await ethers.getContractAt(VAI_ABI, sepolia.VAI); + vaiBridgeAdmin = await ethers.getContractAt(VAI_BRIDGE_ADMIN_ABI, sepolia.TOKEN_BRIDGE_ADMIN_VAI); + vaiBridge = await ethers.getContractAt(VAI_BRIDGE_ABI, sepolia.TOKEN_BRIDGE_VAI); + oracle = await ethers.getContractAt(RESILIENT_ORACLE_ABI, sepolia.RESILIENT_ORACLE); + }); + + describe("Pre-Execution state", () => { + it("Bridge Owner != sepolia multisig", async () => { + const owner = await vaiBridgeAdmin.owner(); + expect(owner).not.equal(sepolia.NORMAL_TIMELOCK); + }); + + it("Trusted remote should not exist", async () => { + await expect(vaiBridge.getTrustedRemoteAddress(10102)).to.be.revertedWith("LzApp: no trusted path record"); + }); + + it("Mint limit = 0", async () => { + const cap = await vai.minterToCap(sepolia.TOKEN_BRIDGE_VAI); + expect(cap).equals(0); + }); + }); + + describe("Post-Execution state", () => { + let acc1: SignerWithAddress; + let impersonateMinterOfVAI: SignerWithAddress; + let receiverAddressBytes32: string; + let defaultAdapterParams: string; + before(async () => { + await pretendExecutingVip(vip011()); + // Mocking for simulations + impersonateMinterOfVAI = await initMainnetUser(sepolia.TOKEN_BRIDGE_VAI, ethers.utils.parseEther("2")); + [acc1] = await ethers.getSigners(); + await vai.connect(impersonateMinterOfVAI).mint(acc1.address, parseUnits("50001", 18)); + receiverAddressBytes32 = ethers.utils.defaultAbiCoder.encode(["address"], [acc1.address]); + defaultAdapterParams = ethers.utils.solidityPack(["uint16", "uint256"], [1, 300000]); + }); + it("Should set bridge owner to multisig", async () => { + const owner = await vaiBridgeAdmin.owner(); + expect(owner).equals(sepolia.NORMAL_TIMELOCK); + }); + + it("Should set trusted remote address in bridge", async () => { + const trustedRemote = await vaiBridge.getTrustedRemoteAddress(10102); + expect(trustedRemote).equals(TRUSTED_REMOTE); + }); + + it("Should set minting limit in sepolia.VAI token", async () => { + const cap = await vai.minterToCap(sepolia.TOKEN_BRIDGE_VAI); + expect(cap).equals(parseUnits("100000", 18)); + }); + + it("Should set correct token address in bridge", async () => { + const token = await vaiBridge.token(); + expect(token).equals(sepolia.VAI); + }); + + it("Should set correct max daily limit", async () => { + const token = await vaiBridge.chainIdToMaxDailyLimit(10102); + expect(token).equals("50000000000000000000000"); + }); + + it("Should set correct max single limit", async () => { + const token = await vaiBridge.chainIdToMaxSingleTransactionLimit(10102); + expect(token).equals("10000000000000000000000"); + }); + + it("Should set correct max daily receive limit", async () => { + const token = await vaiBridge.chainIdToMaxDailyReceiveLimit(10102); + expect(token).equals("50000000000000000000000"); + }); + + it("Should set correct max single receive limit", async () => { + const token = await vaiBridge.chainIdToMaxSingleReceiveTransactionLimit(10102); + expect(token).equals("10000000000000000000000"); + }); + + it("Should set correct mint cap in sepolia.VAI token", async () => { + const token = await vai.minterToCap(sepolia.TOKEN_BRIDGE_VAI); + expect(token).equals("100000000000000000000000"); + }); + + it("Should get correct price of sepolia.VAI token", async () => { + const price = await oracle.getPrice(sepolia.VAI); + expect(price).equals(parseUnits("1", 18)); + }); + + it("Should emit an event on successfull bridging of VAI", async () => { + const amount = parseUnits("0.5", 18); + const nativeFee = ( + await vaiBridge.estimateSendFee(DEST_CHAIN_ID, receiverAddressBytes32, amount, false, defaultAdapterParams) + ).nativeFee; + + await vai.connect(acc1).approve(vaiBridge.address, amount); + + await expect( + vaiBridge + .connect(acc1) + .sendFrom( + acc1.address, + DEST_CHAIN_ID, + receiverAddressBytes32, + amount, + [acc1.address, ethers.constants.AddressZero, defaultAdapterParams], + { value: nativeFee }, + ), + ) + .to.be.emit(vaiBridge, "SendToChain") + .withArgs(DEST_CHAIN_ID, acc1.address, receiverAddressBytes32, amount); + }); + + it("Reverts if single transaction limit exceed", async function () { + const amount = ethers.utils.parseUnits("10001", 18); + await vai.connect(acc1).approve(vaiBridge.address, amount); + + const nativeFee = ( + await vaiBridge.estimateSendFee(DEST_CHAIN_ID, receiverAddressBytes32, amount, false, defaultAdapterParams) + ).nativeFee; + await expect( + vaiBridge + .connect(acc1) + .sendFrom( + acc1.address, + DEST_CHAIN_ID, + receiverAddressBytes32, + amount, + [acc1.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("50001"); + const amount = ethers.utils.parseUnits("10000"); + + await vai.connect(acc1).approve(vaiBridge.address, maxPlusAmount); + const nativeFee = ( + await vaiBridge.estimateSendFee(DEST_CHAIN_ID, receiverAddressBytes32, amount, false, defaultAdapterParams) + ).nativeFee; + + for (let i = 0; i < 4; i++) { + await vaiBridge + .connect(acc1) + .sendFrom( + acc1.address, + DEST_CHAIN_ID, + receiverAddressBytes32, + amount, + [acc1.address, ethers.constants.AddressZero, defaultAdapterParams], + { value: nativeFee }, + ); + } + await expect( + vaiBridge + .connect(acc1) + .sendFrom( + acc1.address, + DEST_CHAIN_ID, + receiverAddressBytes32, + amount, + [acc1.address, ethers.constants.AddressZero, defaultAdapterParams], + { value: nativeFee }, + ), + ).to.be.revertedWith("Daily Transaction Limit Exceed"); + }); + }); +}); diff --git a/simulations/vip-260/abi/AccessControlManager.json b/simulations/vip-260/abi/AccessControlManager.json new file mode 100644 index 000000000..4a118fcc4 --- /dev/null +++ b/simulations/vip-260/abi/AccessControlManager.json @@ -0,0 +1,360 @@ +[ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "contractAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "string", + "name": "functionSig", + "type": "string" + } + ], + "name": "PermissionGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "contractAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "string", + "name": "functionSig", + "type": "string" + } + ], + "name": "PermissionRevoked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "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": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "contractAddress", + "type": "address" + }, + { + "internalType": "string", + "name": "functionSig", + "type": "string" + } + ], + "name": "hasPermission", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "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/simulations/vip-260/abi/TokenBridgeController.json b/simulations/vip-260/abi/TokenBridgeController.json new file mode 100644 index 000000000..abb591406 --- /dev/null +++ b/simulations/vip-260/abi/TokenBridgeController.json @@ -0,0 +1,477 @@ +[ + { + "inputs": [ + { + "internalType": "address", + "name": "accessControlManager_", + "type": "address" + }, + { + "internalType": "address", + "name": "innerToken_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "AccountBlacklisted", + "type": "error" + }, + { + "inputs": [], + "name": "AddressesMustDiffer", + "type": "error" + }, + { + "inputs": [], + "name": "MintLimitExceed", + "type": "error" + }, + { + "inputs": [], + "name": "MintedAmountExceed", + "type": "error" + }, + { + "inputs": [], + "name": "NewCapNotGreaterThanMintedTokens", + "type": "error" + }, + { + "inputs": [], + "name": "Unauthorized", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddressNotAllowed", + "type": "error" + }, + { + "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": "source", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "destination", + "type": "address" + } + ], + "name": "MintedTokensMigrated", + "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": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "inputs": [], + "name": "INNER_TOKEN", + "outputs": [ + { + "internalType": "contract IMultichainToken", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "accessControlManager", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "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": "user_", + "type": "address" + } + ], + "name": "isBlackListed", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "source_", + "type": "address" + }, + { + "internalType": "address", + "name": "destination_", + "type": "address" + } + ], + "name": "migrateMinterTokens", + "outputs": [], + "stateMutability": "nonpayable", + "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": "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": [ + { + "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/simulations/vip-260/abi/VAI.json b/simulations/vip-260/abi/VAI.json new file mode 100644 index 000000000..b0ef0e012 --- /dev/null +++ b/simulations/vip-260/abi/VAI.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-260/abi/VAIBridgeAdmin.json b/simulations/vip-260/abi/VAIBridgeAdmin.json new file mode 100644 index 000000000..36158eeba --- /dev/null +++ b/simulations/vip-260/abi/VAIBridgeAdmin.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-260/abi/VAITokenBridge.json b/simulations/vip-260/abi/VAITokenBridge.json new file mode 100644 index 000000000..e88302d59 --- /dev/null +++ b/simulations/vip-260/abi/VAITokenBridge.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-260/bsctestnet.ts b/simulations/vip-260/bsctestnet.ts new file mode 100644 index 000000000..3dc3a4ce4 --- /dev/null +++ b/simulations/vip-260/bsctestnet.ts @@ -0,0 +1,177 @@ +import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; +import { expect } from "chai"; +import { parseUnits } from "ethers/lib/utils"; +import { ethers } from "hardhat"; + +import { NETWORK_ADDRESSES } from "../../src/networkAddresses"; +import { expectEvents, initMainnetUser } from "../../src/utils"; +import { forking, testVip } from "../../src/vip-framework"; +import { vip260Testnet } from "../../vips/vip-260/bsctestnet"; +import ACM_ABI from "./abi/AccessControlManager.json"; +import TOKEN_BRIDGE_CONTROLLER_ABI from "./abi/TokenBridgeController.json"; +import VAI_ABI from "./abi/VAI.json"; +import VAIBridgeAdmin_ABI from "./abi/VAIBridgeAdmin.json"; +import VAI_BRIDGE_ABI from "./abi/VAITokenBridge.json"; + +const DEST_CHAIN_ID = 10161; +const TOKEN_BRIDGE_CONTROLLER_VAI = "0x5E19dc192DaB0d97986e02795817F72BA85E52A8"; +const TRUSTED_REMOTE = "0x69ffbfce81c105a07916d3a8fca205ed1758b826"; +const VAI_HOLDER = "0x7Db4f5cC3bBA3e12FF1F528D2e3417afb0a57118"; + +const { bsctestnet } = NETWORK_ADDRESSES; + +forking(38107132, () => { + const provider = ethers.provider; + let vaiBridge: ethers.Contract; + let bridgeAdmin: ethers.Contract; + let vai: ethers.Contract; + let tokenController: ethers.Contract; + let receiver: SignerWithAddress; + let vaiHolderSigner: SignerWithAddress; + let receiverAddressBytes32: string; + let defaultAdapterParams: string; + + beforeEach(async () => { + vaiBridge = new ethers.Contract(bsctestnet.TOKEN_BRIDGE_VAI, VAI_BRIDGE_ABI, provider); + bridgeAdmin = new ethers.Contract(bsctestnet.TOKEN_BRIDGE_ADMIN_VAI, VAIBridgeAdmin_ABI, provider); + vai = new ethers.Contract(bsctestnet.VAI, VAI_ABI, provider); + tokenController = new ethers.Contract(TOKEN_BRIDGE_CONTROLLER_VAI, TOKEN_BRIDGE_CONTROLLER_ABI, provider); + [receiver] = await ethers.getSigners(); + vaiHolderSigner = await initMainnetUser(VAI_HOLDER, ethers.utils.parseEther("2")); + receiverAddressBytes32 = ethers.utils.defaultAbiCoder.encode(["address"], [receiver.address]); + defaultAdapterParams = ethers.utils.solidityPack(["uint16", "uint256"], [1, 300000]); + }); + + testVip("vip260Testnet", vip260Testnet(), { + callbackAfterExecution: async (txResponse: TransactionResponse) => { + await expectEvents( + txResponse, + [ACM_ABI, VAIBridgeAdmin_ABI, VAI_BRIDGE_ABI], + ["RoleGranted", "OwnershipTransferred", "SetTrustedRemoteAddress", "Failure"], + [63, 2, 1, 0], + ); + }, + }); + + describe("Post-VIP behavior", () => { + it("Should set trusted remote address in vaiBridge", async () => { + const trustedRemote = await vaiBridge.getTrustedRemoteAddress(10161); + expect(trustedRemote).equals(TRUSTED_REMOTE); + }); + + it("Should set minting limit in Token Controller", async () => { + const cap = await tokenController.minterToCap(bsctestnet.TOKEN_BRIDGE_VAI); + expect(cap).equals(parseUnits("100000", 18)); + }); + + it("Should set correct token address in vaiBridge", async () => { + const token = await vaiBridge.token(); + expect(token).equals(bsctestnet.VAI); + }); + it("Owner of the BridgeAdmin should be Normal Timelock", async () => { + expect(await bridgeAdmin.owner()).to.equal(bsctestnet.NORMAL_TIMELOCK); + }); + + it("Should match minDestGas value", async () => { + expect(await vaiBridge.minDstGasLookup(DEST_CHAIN_ID, 0)).to.equal("300000"); + }); + + it("Should match single send transaction limit", async () => { + expect(await vaiBridge.chainIdToMaxSingleTransactionLimit(DEST_CHAIN_ID)).to.equal("10000000000000000000000"); + }); + + it("Should match single receive transaction limit", async () => { + expect(await vaiBridge.chainIdToMaxSingleReceiveTransactionLimit(DEST_CHAIN_ID)).to.equal( + "10000000000000000000000", + ); + }); + + it("Should match max daily send limit", async () => { + expect(await vaiBridge.chainIdToMaxDailyLimit(DEST_CHAIN_ID)).to.equal("50000000000000000000000"); + }); + + it("Should match max daily receive limit", async () => { + expect(await vaiBridge.chainIdToMaxDailyReceiveLimit(DEST_CHAIN_ID)).to.equal("50000000000000000000000"); + }); + + it("Should emit an event on successful bridging of VAI", async () => { + const amount = parseUnits("0.5", 18); + const nativeFee = ( + await vaiBridge.estimateSendFee(DEST_CHAIN_ID, receiverAddressBytes32, amount, false, defaultAdapterParams) + ).nativeFee; + + await vai.connect(vaiHolderSigner).approve(tokenController.address, amount); + + await expect( + vaiBridge + .connect(vaiHolderSigner) + .sendFrom( + vaiHolderSigner.address, + DEST_CHAIN_ID, + receiverAddressBytes32, + amount, + [vaiHolderSigner.address, ethers.constants.AddressZero, defaultAdapterParams], + { value: nativeFee }, + ), + ) + .to.be.emit(vaiBridge, "SendToChain") + .withArgs(DEST_CHAIN_ID, VAI_HOLDER, receiverAddressBytes32, amount); + }); + + it("Reverts if single transaction limit exceed", async function () { + const amount = ethers.utils.parseUnits("10001", 18); + await vai.connect(vaiHolderSigner).approve(vaiBridge.address, amount); + + const nativeFee = ( + await vaiBridge.estimateSendFee(DEST_CHAIN_ID, receiverAddressBytes32, amount, false, defaultAdapterParams) + ).nativeFee; + await expect( + vaiBridge + .connect(vaiHolderSigner) + .sendFrom( + vaiHolderSigner.address, + DEST_CHAIN_ID, + receiverAddressBytes32, + amount, + [vaiHolderSigner.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("50001"); + const amount = ethers.utils.parseUnits("10000"); + + await vai.connect(vaiHolderSigner).approve(tokenController.address, maxPlusAmount); + const nativeFee = ( + await vaiBridge.estimateSendFee(DEST_CHAIN_ID, receiverAddressBytes32, amount, false, defaultAdapterParams) + ).nativeFee; + + for (let i = 0; i < 4; i++) { + await vaiBridge + .connect(vaiHolderSigner) + .sendFrom( + vaiHolderSigner.address, + DEST_CHAIN_ID, + receiverAddressBytes32, + amount, + [vaiHolderSigner.address, ethers.constants.AddressZero, defaultAdapterParams], + { value: nativeFee }, + ); + } + await expect( + vaiBridge + .connect(vaiHolderSigner) + .sendFrom( + vaiHolderSigner.address, + DEST_CHAIN_ID, + receiverAddressBytes32, + amount, + [vaiHolderSigner.address, ethers.constants.AddressZero, defaultAdapterParams], + { value: nativeFee }, + ), + ).to.be.revertedWith("Daily Transaction Limit Exceed"); + }); + }); +}); diff --git a/src/networkAddresses.ts b/src/networkAddresses.ts index 317b3ae98..b71255f98 100644 --- a/src/networkAddresses.ts +++ b/src/networkAddresses.ts @@ -31,6 +31,9 @@ export const NETWORK_ADDRESSES = { DEFAULT_PROPOSER_ADDRESS: "0x2Ce1d0ffD7E869D9DF33e28552b12DdDed326706", GOVERNOR_PROXY: "0x5573422a1a59385c247ec3a66b93b7c08ec2f8f2", NORMAL_TIMELOCK: bsctestnet_deployed_contracts.contracts.NormalTimelock.address, + FAST_TRACK_TIMELOCK: bsctestnet_deployed_contracts.contracts.FastTrackTimelock.address, + CRITICAL_TIMELOCK: bsctestnet_deployed_contracts.contracts.CriticalTimelock.address, + ACM: bsctestnet_deployed_contracts.contracts.AccessControlManager.address, ETH_CHAINLINK_FEED: "0x143db3CEEfbdfe5631aDD3E50f7614B6ba708BA7", USDT_CHAINLINK_FEED: "0xEca2605f0BCF2BA5966372C99837b1F182d3D620", CHAINLINK_ORACLE: "0xCeA29f1266e880A1482c06eD656cD08C148BaA32", @@ -46,6 +49,9 @@ export const NETWORK_ADDRESSES = { POOL_REGISTRY: il_bsctestnet_deployed_contracts.addresses.PoolRegistry, BINANCE_ORACLE: bsctestnet_deployed_contracts.contracts.BinanceOracle.address, RESILIENT_ORACLE: bsctestnet_deployed_contracts.contracts.ResilientOracle.address, + TOKEN_BRIDGE_VAI: "0xeaa89cF3bAB8245F8A2F438595e1fF5cC3eEaE18", + TOKEN_BRIDGE_ADMIN_VAI: "0xDD2FbCC0145199773EbD46eBba8C81D8743e5324", + TOKEN_BRIDGE_CONTROLLER_VAI: "0x5E19dc192DaB0d97986e02795817F72BA85E52A8", }, ethereum: { NORMAL_TIMELOCK: "0x285960C5B22fD66A736C7136967A3eB15e93CC67", @@ -63,7 +69,7 @@ export const NETWORK_ADDRESSES = { CHAINLINK_ORACLE: "0x102F0b714E5d321187A4b6E5993358448f7261cE", RESILIENT_ORACLE: "0x8000eca36201dddf5805Aa4BeFD73d1EB4D23264", BOUND_VALIDATOR: "0x60c4Aa92eEb6884a76b309Dd8B3731ad514d6f9B", - ACM: "0xbf705C00578d43B6147ab4eaE04DBBEd1ccCdc96", + ACM: sepolia_deployed_contracts.contracts.AccessControlManager.address, MOCK_USDC: "0x772d68929655ce7234C8C94256526ddA66Ef641E", MOCK_USDT: "0x8d412FD0bc5d826615065B931171Eed10F5AF266", MOCK_WETH: "0x700868CAbb60e90d77B6588ce072d9859ec8E281", @@ -90,6 +96,9 @@ export const NETWORK_ADDRESSES = { MOCK_crvUSD: "0x36421d873abCa3E2bE6BB3c819C0CF26374F63b6", XVS_VAULT_PROXY: "0x1129f882eAa912aE6D4f6D445b2E2b1eCbA99fd5", GENERIC_TEST_USER_ACCOUNT: "0x2Ce1d0ffD7E869D9DF33e28552b12DdDed326706", + VAI: "0x87C10aFb916961706B4958816336BB336B483d29", + TOKEN_BRIDGE_VAI: "0x69fFBFCe81c105a07916d3a8fCA205Ed1758B826", + TOKEN_BRIDGE_ADMIN_VAI: "0x71a6c67C9394c3D64593B5A527a11980D1C0cDEB", }, opbnbtestnet: { NORMAL_TIMELOCK: "0xb15f6EfEbC276A3b9805df81b5FB3D50C2A62BDf", diff --git a/vips/vip-260/bsctestnet.ts b/vips/vip-260/bsctestnet.ts new file mode 100644 index 000000000..18ab74be0 --- /dev/null +++ b/vips/vip-260/bsctestnet.ts @@ -0,0 +1,434 @@ +import { NETWORK_ADDRESSES } from "../../src/networkAddresses"; +import { ProposalType } from "../../src/types"; +import { makeProposal } from "../../src/utils"; + +const GUARDIAN = "0x2Ce1d0ffD7E869D9DF33e28552b12DdDed326706"; +const TRUSTED_REMOTE = "0x69fFBFCe81c105a07916d3a8fCA205Ed1758B826"; +const { bsctestnet } = NETWORK_ADDRESSES; + +export const vip260Testnet = () => { + const meta = { + version: "v2", + title: "VIP-260Testnet VIA bridge BSC Testnet - Sepolia", + description: ``, + forDescription: "Execute this proposal", + againstDescription: "Do not execute this proposal", + abstainDescription: "Indifferent to execution", + }; + + return makeProposal( + [ + { + target: bsctestnet.ACM, + signature: "giveCallPermission(address,string,address)", + params: [bsctestnet.TOKEN_BRIDGE_ADMIN_VAI, "setSendVersion(uint16)", bsctestnet.NORMAL_TIMELOCK], + }, + { + target: bsctestnet.ACM, + signature: "giveCallPermission(address,string,address)", + params: [bsctestnet.TOKEN_BRIDGE_ADMIN_VAI, "setReceiveVersion(uint16)", bsctestnet.NORMAL_TIMELOCK], + }, + { + target: bsctestnet.ACM, + signature: "giveCallPermission(address,string,address)", + params: [bsctestnet.TOKEN_BRIDGE_ADMIN_VAI, "forceResumeReceive(uint16,bytes)", bsctestnet.NORMAL_TIMELOCK], + }, + { + target: bsctestnet.ACM, + signature: "giveCallPermission(address,string,address)", + params: [bsctestnet.TOKEN_BRIDGE_ADMIN_VAI, "setOracle(address)", bsctestnet.NORMAL_TIMELOCK], + }, + { + target: bsctestnet.ACM, + signature: "giveCallPermission(address,string,address)", + params: [ + bsctestnet.TOKEN_BRIDGE_ADMIN_VAI, + "setMaxSingleTransactionLimit(uint16,uint256)", + bsctestnet.NORMAL_TIMELOCK, + ], + }, + { + target: bsctestnet.ACM, + signature: "giveCallPermission(address,string,address)", + params: [bsctestnet.TOKEN_BRIDGE_ADMIN_VAI, "setMaxDailyLimit(uint16,uint256)", bsctestnet.NORMAL_TIMELOCK], + }, + { + target: bsctestnet.ACM, + signature: "giveCallPermission(address,string,address)", + params: [ + bsctestnet.TOKEN_BRIDGE_ADMIN_VAI, + "setMaxSingleReceiveTransactionLimit(uint16,uint256)", + bsctestnet.NORMAL_TIMELOCK, + ], + }, + { + target: bsctestnet.ACM, + signature: "giveCallPermission(address,string,address)", + params: [ + bsctestnet.TOKEN_BRIDGE_ADMIN_VAI, + "setMaxDailyReceiveLimit(uint16,uint256)", + bsctestnet.NORMAL_TIMELOCK, + ], + }, + { + target: bsctestnet.ACM, + signature: "giveCallPermission(address,string,address)", + params: [bsctestnet.TOKEN_BRIDGE_ADMIN_VAI, "pause()", bsctestnet.NORMAL_TIMELOCK], + }, + { + target: bsctestnet.ACM, + signature: "giveCallPermission(address,string,address)", + params: [bsctestnet.TOKEN_BRIDGE_ADMIN_VAI, "unpause()", bsctestnet.NORMAL_TIMELOCK], + }, + { + target: bsctestnet.ACM, + signature: "giveCallPermission(address,string,address)", + params: [bsctestnet.TOKEN_BRIDGE_ADMIN_VAI, "removeTrustedRemote(uint16)", bsctestnet.NORMAL_TIMELOCK], + }, + { + target: bsctestnet.ACM, + signature: "giveCallPermission(address,string,address)", + params: [ + bsctestnet.TOKEN_BRIDGE_ADMIN_VAI, + "dropFailedMessage(uint16,bytes,uint64)", + bsctestnet.NORMAL_TIMELOCK, + ], + }, + { + target: bsctestnet.ACM, + signature: "giveCallPermission(address,string,address)", + params: [bsctestnet.TOKEN_BRIDGE_ADMIN_VAI, "setPrecrime(address)", bsctestnet.NORMAL_TIMELOCK], + }, + { + target: bsctestnet.ACM, + signature: "giveCallPermission(address,string,address)", + params: [bsctestnet.TOKEN_BRIDGE_ADMIN_VAI, "setMinDstGas(uint16,uint16,uint256)", bsctestnet.NORMAL_TIMELOCK], + }, + { + target: bsctestnet.ACM, + signature: "giveCallPermission(address,string,address)", + params: [bsctestnet.TOKEN_BRIDGE_ADMIN_VAI, "setPayloadSizeLimit(uint16,uint256)", bsctestnet.NORMAL_TIMELOCK], + }, + { + target: bsctestnet.ACM, + signature: "giveCallPermission(address,string,address)", + params: [bsctestnet.TOKEN_BRIDGE_ADMIN_VAI, "setWhitelist(address,bool)", bsctestnet.NORMAL_TIMELOCK], + }, + { + target: bsctestnet.ACM, + signature: "giveCallPermission(address,string,address)", + params: [ + bsctestnet.TOKEN_BRIDGE_ADMIN_VAI, + "setConfig(uint16,uint16,uint256,bytes)", + bsctestnet.NORMAL_TIMELOCK, + ], + }, + { + target: bsctestnet.ACM, + signature: "giveCallPermission(address,string,address)", + params: [bsctestnet.TOKEN_BRIDGE_ADMIN_VAI, "sweepToken(address,address,uint256)", bsctestnet.NORMAL_TIMELOCK], + }, + { + target: bsctestnet.ACM, + signature: "giveCallPermission(address,string,address)", + params: [bsctestnet.TOKEN_BRIDGE_ADMIN_VAI, "updateSendAndCallEnabled(bool)", bsctestnet.NORMAL_TIMELOCK], + }, + { + target: bsctestnet.ACM, + signature: "giveCallPermission(address,string,address)", + params: [bsctestnet.TOKEN_BRIDGE_ADMIN_VAI, "forceMint(uint16,address,uint256)", bsctestnet.NORMAL_TIMELOCK], + }, + { + target: bsctestnet.ACM, + signature: "giveCallPermission(address,string,address)", + params: [bsctestnet.TOKEN_BRIDGE_CONTROLLER_VAI, "mint(address,uint256)", bsctestnet.TOKEN_BRIDGE_VAI], + }, + { + target: bsctestnet.ACM, + signature: "giveCallPermission(address,string,address)", // TokenController permission to mint tokens + params: [bsctestnet.VAI, "rely(address)", bsctestnet.TOKEN_BRIDGE_CONTROLLER_VAI], + }, + { + target: bsctestnet.ACM, + signature: "giveCallPermission(address,string,address)", + params: [bsctestnet.TOKEN_BRIDGE_CONTROLLER_VAI, "burn(address,uint256)", bsctestnet.TOKEN_BRIDGE_VAI], + }, + { + target: bsctestnet.ACM, + signature: "giveCallPermission(address,string,address)", + params: [ + bsctestnet.TOKEN_BRIDGE_ADMIN_VAI, + "setTrustedRemoteAddress(uint16,bytes)", + bsctestnet.NORMAL_TIMELOCK, + ], + }, + { + target: bsctestnet.ACM, + signature: "giveCallPermission(address,string,address)", + params: [bsctestnet.TOKEN_BRIDGE_ADMIN_VAI, "transferBridgeOwnership(address)", bsctestnet.NORMAL_TIMELOCK], + }, + { + target: bsctestnet.ACM, + signature: "giveCallPermission(address,string,address)", + params: [ + bsctestnet.TOKEN_BRIDGE_CONTROLLER_VAI, + "migrateMinterTokens(address,address)", + bsctestnet.NORMAL_TIMELOCK, + ], + }, + { + target: bsctestnet.ACM, + signature: "giveCallPermission(address,string,address)", + params: [bsctestnet.TOKEN_BRIDGE_CONTROLLER_VAI, "setMintCap(address,uint256)", bsctestnet.NORMAL_TIMELOCK], + }, + { + target: bsctestnet.ACM, + signature: "giveCallPermission(address,string,address)", + params: [bsctestnet.TOKEN_BRIDGE_CONTROLLER_VAI, "updateBlacklist(address,bool)", bsctestnet.NORMAL_TIMELOCK], + }, + { + target: bsctestnet.ACM, + signature: "giveCallPermission(address,string,address)", + params: [bsctestnet.TOKEN_BRIDGE_CONTROLLER_VAI, "pause()", bsctestnet.NORMAL_TIMELOCK], + }, + { + target: bsctestnet.ACM, + signature: "giveCallPermission(address,string,address)", + params: [bsctestnet.TOKEN_BRIDGE_CONTROLLER_VAI, "unpause()", bsctestnet.NORMAL_TIMELOCK], + }, + // FASTTRACK TIMELOCK PERMISSIONS + { + target: bsctestnet.ACM, + signature: "giveCallPermission(address,string,address)", + params: [bsctestnet.TOKEN_BRIDGE_ADMIN_VAI, "setSendVersion(uint16)", bsctestnet.FAST_TRACK_TIMELOCK], + }, + { + target: bsctestnet.ACM, + signature: "giveCallPermission(address,string,address)", + params: [bsctestnet.TOKEN_BRIDGE_ADMIN_VAI, "setReceiveVersion(uint16)", bsctestnet.FAST_TRACK_TIMELOCK], + }, + { + target: bsctestnet.ACM, + signature: "giveCallPermission(address,string,address)", + params: [bsctestnet.TOKEN_BRIDGE_ADMIN_VAI, "forceResumeReceive(uint16,bytes)", bsctestnet.FAST_TRACK_TIMELOCK], + }, + { + target: bsctestnet.ACM, + signature: "giveCallPermission(address,string,address)", + params: [ + bsctestnet.TOKEN_BRIDGE_ADMIN_VAI, + "setMaxSingleTransactionLimit(uint16,uint256)", + bsctestnet.FAST_TRACK_TIMELOCK, + ], + }, + { + target: bsctestnet.ACM, + signature: "giveCallPermission(address,string,address)", + params: [bsctestnet.TOKEN_BRIDGE_ADMIN_VAI, "setMaxDailyLimit(uint16,uint256)", bsctestnet.FAST_TRACK_TIMELOCK], + }, + { + target: bsctestnet.ACM, + signature: "giveCallPermission(address,string,address)", + params: [ + bsctestnet.TOKEN_BRIDGE_ADMIN_VAI, + "setMaxSingleReceiveTransactionLimit(uint16,uint256)", + bsctestnet.FAST_TRACK_TIMELOCK, + ], + }, + { + target: bsctestnet.ACM, + signature: "giveCallPermission(address,string,address)", + params: [ + bsctestnet.TOKEN_BRIDGE_ADMIN_VAI, + "setMaxDailyReceiveLimit(uint16,uint256)", + bsctestnet.FAST_TRACK_TIMELOCK, + ], + }, + { + target: bsctestnet.ACM, + signature: "giveCallPermission(address,string,address)", + params: [bsctestnet.TOKEN_BRIDGE_ADMIN_VAI, "pause()", bsctestnet.FAST_TRACK_TIMELOCK], + }, + { + target: bsctestnet.ACM, + signature: "giveCallPermission(address,string,address)", + params: [bsctestnet.TOKEN_BRIDGE_ADMIN_VAI, "unpause()", bsctestnet.FAST_TRACK_TIMELOCK], + }, + { + target: bsctestnet.ACM, + signature: "giveCallPermission(address,string,address)", + params: [bsctestnet.TOKEN_BRIDGE_ADMIN_VAI, "removeTrustedRemote(uint16)", bsctestnet.FAST_TRACK_TIMELOCK], + }, + { + target: bsctestnet.ACM, + signature: "giveCallPermission(address,string,address)", + params: [ + bsctestnet.TOKEN_BRIDGE_ADMIN_VAI, + "setMinDstGas(uint16,uint16,uint256)", + bsctestnet.FAST_TRACK_TIMELOCK, + ], + }, + { + target: bsctestnet.ACM, + signature: "giveCallPermission(address,string,address)", + params: [ + bsctestnet.TOKEN_BRIDGE_ADMIN_VAI, + "setPayloadSizeLimit(uint16,uint256)", + bsctestnet.FAST_TRACK_TIMELOCK, + ], + }, + { + target: bsctestnet.ACM, + signature: "giveCallPermission(address,string,address)", + params: [bsctestnet.TOKEN_BRIDGE_ADMIN_VAI, "setWhitelist(address,bool)", bsctestnet.FAST_TRACK_TIMELOCK], + }, + { + target: bsctestnet.ACM, + signature: "giveCallPermission(address,string,address)", + params: [ + bsctestnet.TOKEN_BRIDGE_ADMIN_VAI, + "setConfig(uint16,uint16,uint256,bytes)", + bsctestnet.FAST_TRACK_TIMELOCK, + ], + }, + { + target: bsctestnet.ACM, + signature: "giveCallPermission(address,string,address)", + params: [ + bsctestnet.TOKEN_BRIDGE_ADMIN_VAI, + "forceMint(uint16,address,uint256)", + bsctestnet.FAST_TRACK_TIMELOCK, + ], + }, + // CRITICAL TIMELOCK PERMISSIONS + { + target: bsctestnet.ACM, + signature: "giveCallPermission(address,string,address)", + params: [bsctestnet.TOKEN_BRIDGE_ADMIN_VAI, "setSendVersion(uint16)", bsctestnet.CRITICAL_TIMELOCK], + }, + { + target: bsctestnet.ACM, + signature: "giveCallPermission(address,string,address)", + params: [bsctestnet.TOKEN_BRIDGE_ADMIN_VAI, "setReceiveVersion(uint16)", bsctestnet.CRITICAL_TIMELOCK], + }, + { + target: bsctestnet.ACM, + signature: "giveCallPermission(address,string,address)", + params: [bsctestnet.TOKEN_BRIDGE_ADMIN_VAI, "forceResumeReceive(uint16,bytes)", bsctestnet.CRITICAL_TIMELOCK], + }, + { + target: bsctestnet.ACM, + signature: "giveCallPermission(address,string,address)", + params: [ + bsctestnet.TOKEN_BRIDGE_ADMIN_VAI, + "setMaxSingleTransactionLimit(uint16,uint256)", + bsctestnet.CRITICAL_TIMELOCK, + ], + }, + { + target: bsctestnet.ACM, + signature: "giveCallPermission(address,string,address)", + params: [bsctestnet.TOKEN_BRIDGE_ADMIN_VAI, "setMaxDailyLimit(uint16,uint256)", bsctestnet.CRITICAL_TIMELOCK], + }, + { + target: bsctestnet.ACM, + signature: "giveCallPermission(address,string,address)", + params: [ + bsctestnet.TOKEN_BRIDGE_ADMIN_VAI, + "setMaxSingleReceiveTransactionLimit(uint16,uint256)", + bsctestnet.CRITICAL_TIMELOCK, + ], + }, + { + target: bsctestnet.ACM, + signature: "giveCallPermission(address,string,address)", + params: [ + bsctestnet.TOKEN_BRIDGE_ADMIN_VAI, + "setMaxDailyReceiveLimit(uint16,uint256)", + bsctestnet.CRITICAL_TIMELOCK, + ], + }, + { + target: bsctestnet.ACM, + signature: "giveCallPermission(address,string,address)", + params: [bsctestnet.TOKEN_BRIDGE_ADMIN_VAI, "pause()", bsctestnet.CRITICAL_TIMELOCK], + }, + { + target: bsctestnet.ACM, + signature: "giveCallPermission(address,string,address)", + params: [bsctestnet.TOKEN_BRIDGE_ADMIN_VAI, "unpause()", bsctestnet.CRITICAL_TIMELOCK], + }, + { + target: bsctestnet.ACM, + signature: "giveCallPermission(address,string,address)", + params: [bsctestnet.TOKEN_BRIDGE_ADMIN_VAI, "removeTrustedRemote(uint16)", bsctestnet.CRITICAL_TIMELOCK], + }, + { + target: bsctestnet.ACM, + signature: "giveCallPermission(address,string,address)", + params: [ + bsctestnet.TOKEN_BRIDGE_ADMIN_VAI, + "setMinDstGas(uint16,uint16,uint256)", + bsctestnet.CRITICAL_TIMELOCK, + ], + }, + { + target: bsctestnet.ACM, + signature: "giveCallPermission(address,string,address)", + params: [ + bsctestnet.TOKEN_BRIDGE_ADMIN_VAI, + "setPayloadSizeLimit(uint16,uint256)", + bsctestnet.CRITICAL_TIMELOCK, + ], + }, + { + target: bsctestnet.ACM, + signature: "giveCallPermission(address,string,address)", + params: [bsctestnet.TOKEN_BRIDGE_ADMIN_VAI, "setWhitelist(address,bool)", bsctestnet.CRITICAL_TIMELOCK], + }, + { + target: bsctestnet.ACM, + signature: "giveCallPermission(address,string,address)", + params: [ + bsctestnet.TOKEN_BRIDGE_ADMIN_VAI, + "setConfig(uint16,uint16,uint256,bytes)", + bsctestnet.CRITICAL_TIMELOCK, + ], + }, + { + target: bsctestnet.ACM, + signature: "giveCallPermission(address,string,address)", + params: [bsctestnet.TOKEN_BRIDGE_ADMIN_VAI, "forceMint(uint16,address,uint256)", bsctestnet.CRITICAL_TIMELOCK], + }, + // GUARDIAN PERMISSIONS + { + target: bsctestnet.ACM, + signature: "giveCallPermission(address,string,address)", + params: [bsctestnet.TOKEN_BRIDGE_ADMIN_VAI, "pause()", GUARDIAN], + }, + { + target: bsctestnet.ACM, + signature: "giveCallPermission(address,string,address)", + params: [bsctestnet.TOKEN_BRIDGE_ADMIN_VAI, "unpause()", GUARDIAN], + }, + { + target: bsctestnet.ACM, + signature: "giveCallPermission(address,string,address)", + params: [bsctestnet.TOKEN_BRIDGE_ADMIN_VAI, "forceMint(uint16,address,uint256)", GUARDIAN], + }, + { target: bsctestnet.TOKEN_BRIDGE_ADMIN_VAI, signature: "acceptOwnership()", params: [] }, + { + target: bsctestnet.TOKEN_BRIDGE_ADMIN_VAI, + signature: "setTrustedRemoteAddress(uint16,bytes)", + params: [10161, TRUSTED_REMOTE], + }, + { + target: bsctestnet.TOKEN_BRIDGE_CONTROLLER_VAI, + signature: "setMintCap(address,uint256)", + params: [bsctestnet.TOKEN_BRIDGE_VAI, "100000000000000000000000"], // 100K VAI + }, + ], + meta, + ProposalType.REGULAR, + ); +};