From 0c4e14ab74573ec925fc472b3990f2327b799667 Mon Sep 17 00:00:00 2001 From: web3rover Date: Tue, 11 Feb 2025 23:33:51 +0530 Subject: [PATCH 1/5] fix: use timelock instead of guardian --- deploy/002-access-control.ts | 7 ++- deploy/006-omnichain-executorOwner-remote.ts | 6 ++- helpers/deploy/deploymentUtils.ts | 53 ++++++-------------- 3 files changed, 23 insertions(+), 43 deletions(-) diff --git a/deploy/002-access-control.ts b/deploy/002-access-control.ts index 1d1d6c39..5b043051 100644 --- a/deploy/002-access-control.ts +++ b/deploy/002-access-control.ts @@ -3,7 +3,6 @@ import { DeployFunction } from "hardhat-deploy/types"; import { HardhatRuntimeEnvironment } from "hardhat/types"; import { SUPPORTED_NETWORKS } from "../helpers/deploy/constants"; -import { getAcmAdminAccount } from "../helpers/deploy/deploymentUtils"; const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const { deployments, getNamedAccounts } = hre; @@ -20,9 +19,9 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const acm = await ethers.getContractAt("AccessControlManager", acmDeployment.address); if (hre.network.live) { const networkName = hre.network.name as SUPPORTED_NETWORKS; - const adminAccount = await getAcmAdminAccount(networkName); - console.log(`Granting DEFAULT_ADMIN_ROLE to ${adminAccount} for ${networkName} network`); - await acm.grantRole(acm.DEFAULT_ADMIN_ROLE(), adminAccount); + const normalTimelock = await ethers.getContract("NormalTimelock"); + console.log(`Granting DEFAULT_ADMIN_ROLE to ${normalTimelock} for ${networkName} network`); + await acm.grantRole(acm.DEFAULT_ADMIN_ROLE(), normalTimelock); console.log(`Renouncing DEFAULT_ADMIN_ROLE from deployer (${deployer}) for ${hre.network.name} network`); await acm.renounceRole(acm.DEFAULT_ADMIN_ROLE(), deployer); diff --git a/deploy/006-omnichain-executorOwner-remote.ts b/deploy/006-omnichain-executorOwner-remote.ts index 03e6f852..7c03cf25 100644 --- a/deploy/006-omnichain-executorOwner-remote.ts +++ b/deploy/006-omnichain-executorOwner-remote.ts @@ -12,7 +12,7 @@ import { OmnichainGovernanceExecutorOwnerMethods, config, } from "../helpers/deploy/deploymentConfig"; -import { getOmnichainProposalSender, guardian, testnetNetworks } from "../helpers/deploy/deploymentUtils"; +import { getOmnichainProposalSender, testnetNetworks } from "../helpers/deploy/deploymentUtils"; import { OmnichainGovernanceExecutor } from "../typechain"; interface GovernanceCommand { @@ -102,13 +102,15 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { "hardhat-deploy/solc_0.8/openzeppelin/proxy/transparent/ProxyAdmin.sol:ProxyAdmin", ); + const normalTimelock = await ethers.getContract("NormalTimelock"); + const omnichainGovernanceExecutorAddress = (await ethers.getContract("OmnichainGovernanceExecutor")).address; const OmnichainExecutorOwner = await deploy("OmnichainExecutorOwner", { from: deployer, args: [omnichainGovernanceExecutorAddress], contract: "OmnichainExecutorOwner", proxy: { - owner: hre.network.live ? Guardian : deployer, // Guardian will be replaced by normalTimelock once ownership of DefaultProxyAdmin is transferred to normalTimelock. + owner: hre.network.live ? normalTimelock.address : deployer, proxyContract: "OptimizedTransparentUpgradeableProxy", execute: { methodName: "initialize", diff --git a/helpers/deploy/deploymentUtils.ts b/helpers/deploy/deploymentUtils.ts index e4a6ef11..80cf2764 100644 --- a/helpers/deploy/deploymentUtils.ts +++ b/helpers/deploy/deploymentUtils.ts @@ -3,6 +3,22 @@ import { HardhatRuntimeEnvironment } from "hardhat/types"; import bscMainnetGovernanceDeployments from "../../deployments/bscmainnet.json"; import bscTestnetGovernanceDeployments from "../../deployments/bsctestnet.json"; +import arbitrumoneGovernanceDeployments from "../../deployments/arbitrumone.json"; +import arbitrumsepoliaGovernanceDeployments from "../../deployments/arbitrumsepolia.json"; +import bscmainnetGovernanceDeployments from "../../deployments/bscmainnet.json"; +import bsctestnetGovernanceDeployments from "../../deployments/bsctestnet.json"; +import ethereumGovernanceDeployments from "../../deployments/ethereum.json"; +import opbnbmainnetGovernanceDeployments from "../../deployments/opbnbmainnet.json"; +import opbnbtestnetGovernanceDeployments from "../../deployments/opbnbtestnet.json"; +import sepoliaGovernanceDeployments from "../../deployments/sepolia.json"; +import zksyncsepoliaGovernanceDeployments from "../../deployments/zksyncsepolia.json"; +import zksyncmainnetGovernanceDeployments from "../../deployments/zksyncmainnet.json"; +import opmainnetGovernanceDeployments from "../../deployments/opmainnet.json"; +import opsepoliaGovernanceDeployments from "../../deployments/opsepolia.json"; +import basemainnetGovernanceDeployments from "../../deployments/basemainnet.json"; +import basesepoliaGovernanceDeployments from "../../deployments/basesepolia.json"; +import unichainmainnetGovernanceDeployments from "../../deployments/unichainmainnet.json"; +import unichainsepoliaGovernanceDeployments from "../../deployments/unichainsepolia.json"; import { LZ_CHAINID, SUPPORTED_NETWORKS } from "./constants"; export const testnetNetworks = [ @@ -25,43 +41,6 @@ const mainnetNetworks = [ "hardhat", ]; -export const getAcmAdminAccount = async (network: SUPPORTED_NETWORKS): Promise => { - const { deployer } = await getNamedAccounts(); - if (network === "hardhat") { - return deployer; - } else if (network === "sepolia") { - return "0x94fa6078b6b8a26f0b6edffbe6501b22a10470fb"; // SEPOLIA MULTISIG - } else if (network === "ethereum") { - return "0x285960C5B22fD66A736C7136967A3eB15e93CC67"; // ETHEREUM MULTISIG - } else if (network === "opbnbtestnet") { - return "0xb15f6EfEbC276A3b9805df81b5FB3D50C2A62BDf"; // OPBNBTESTNET MULTISIG - } else if (network === "opbnbmainnet") { - return "0xC46796a21a3A9FAB6546aF3434F2eBfFd0604207"; // OPBNBMAINNET MULTISIG - } else if (network === "arbitrumsepolia") { - return "0x1426A5Ae009c4443188DA8793751024E358A61C2"; // ARBITRUM SEPOLIA MULTISIG - } else if (network === "arbitrumone") { - return "0x14e0E151b33f9802b3e75b621c1457afc44DcAA0"; // ARBITRUM ONE MULTISIG - } else if (network === "zksyncsepolia") { - return "0xa2f83de95E9F28eD443132C331B6a9C9B7a9F866"; // ZKSYNC SEPOLIA MULTISIG - } else if (network === "zksyncmainnet") { - return "0x751Aa759cfBB6CE71A43b48e40e1cCcFC66Ba4aa"; // ZKSYNC MAINNET MULTISIG - } else if (network === "opsepolia") { - return "0xd57365EE4E850e881229e2F8Aa405822f289e78d"; // OPSEPOLIA MULTISIG - } else if (network === "opmainnet") { - return "0x2e94dd14E81999CdBF5deDE31938beD7308354b3"; // OPMAINNET MULTISIG - } else if (network === "basesepolia") { - return "0xdf3b635d2b535f906BB02abb22AED71346E36a00"; // BASE SEPOLIA MULTISIG - } else if (network === "basemainnet") { - return "0x1803Cf1D3495b43cC628aa1d8638A981F8CD341C"; // BASE MAINNET MULTISIG - } else if (network === "unichainsepolia") { - return "0x9831D3A641E8c7F082EEA75b8249c99be9D09a34"; // UNICHAIN SEPOLIA MULTISIG - } else if (network === "unichainmainnet") { - return "0x1803Cf1D3495b43cC628aa1d8638A981F8CD341C"; // UNICHAIN MAINNET MULTISIG - } - const normalTimelock = await ethers.getContract("NormalTimelock"); - return normalTimelock.address; -}; - export const guardian = async (network: SUPPORTED_NETWORKS): Promise => { const { deployer } = await getNamedAccounts(); if (network === "hardhat") { From 3f87841dc65880415cfb5ec0a944caf6dcffe5fe Mon Sep 17 00:00:00 2001 From: web3rover Date: Thu, 13 Feb 2025 19:35:28 +0530 Subject: [PATCH 2/5] feat: deployed contracts --- contracts/Governance/Timelock.sol | 2 +- deploy/002-access-control.ts | 5 +- deploy/005-remote-timelock.ts | 6 + deploy/006-omnichain-executorOwner-remote.ts | 3 +- deployments/berachainbartio/.chainId | 1 + .../berachainbartio/AccessControlManager.json | 573 +++++ .../berachainbartio/CriticalTimelock.json | 691 +++++++ .../berachainbartio/DefaultProxyAdmin.json | 200 ++ .../berachainbartio/FastTrackTimelock.json | 691 +++++++ .../berachainbartio/NormalTimelock.json | 691 +++++++ .../OmnichainExecutorOwner.json | 555 +++++ ...OmnichainExecutorOwner_Implementation.json | 600 ++++++ .../OmnichainExecutorOwner_Proxy.json | 262 +++ .../OmnichainGovernanceExecutor.json | 1840 +++++++++++++++++ .../39b818455672acbd6d12469b0e689d7a.json | 40 + .../9f400d4fd6f6fcf916824838bc678e25.json | 139 ++ .../dd255b4e0156dfc73554b72a83ca02d8.json | 40 + .../e5536fb1b5f4db72d1c808989021a017.json | 73 + hardhat.config.ts | 15 + helpers/deploy/constants.ts | 2 + helpers/deploy/deploymentConfig.ts | 6 + helpers/deploy/deploymentUtils.ts | 22 +- yarn.lock | 35 +- 23 files changed, 6448 insertions(+), 44 deletions(-) create mode 100644 deployments/berachainbartio/.chainId create mode 100644 deployments/berachainbartio/AccessControlManager.json create mode 100644 deployments/berachainbartio/CriticalTimelock.json create mode 100644 deployments/berachainbartio/DefaultProxyAdmin.json create mode 100644 deployments/berachainbartio/FastTrackTimelock.json create mode 100644 deployments/berachainbartio/NormalTimelock.json create mode 100644 deployments/berachainbartio/OmnichainExecutorOwner.json create mode 100644 deployments/berachainbartio/OmnichainExecutorOwner_Implementation.json create mode 100644 deployments/berachainbartio/OmnichainExecutorOwner_Proxy.json create mode 100644 deployments/berachainbartio/OmnichainGovernanceExecutor.json create mode 100644 deployments/berachainbartio/solcInputs/39b818455672acbd6d12469b0e689d7a.json create mode 100644 deployments/berachainbartio/solcInputs/9f400d4fd6f6fcf916824838bc678e25.json create mode 100644 deployments/berachainbartio/solcInputs/dd255b4e0156dfc73554b72a83ca02d8.json create mode 100644 deployments/berachainbartio/solcInputs/e5536fb1b5f4db72d1c808989021a017.json diff --git a/contracts/Governance/Timelock.sol b/contracts/Governance/Timelock.sol index 1ea86bb1..a259609e 100644 --- a/contracts/Governance/Timelock.sol +++ b/contracts/Governance/Timelock.sol @@ -52,7 +52,7 @@ contract Timelock { uint public constant GRACE_PERIOD = 14 days; /// @notice Minimum amount of time a proposal transaction must be queued - uint public constant MINIMUM_DELAY = 1 hours; + uint public constant MINIMUM_DELAY = 2 days; /// @notice Maximum amount of time a proposal transaction must be queued uint public constant MAXIMUM_DELAY = 30 days; diff --git a/deploy/002-access-control.ts b/deploy/002-access-control.ts index 5b043051..0eae0135 100644 --- a/deploy/002-access-control.ts +++ b/deploy/002-access-control.ts @@ -14,14 +14,15 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { args: [], log: true, autoMine: true, + skipIfAlreadyDeployed: true, }); const acm = await ethers.getContractAt("AccessControlManager", acmDeployment.address); if (hre.network.live) { const networkName = hre.network.name as SUPPORTED_NETWORKS; const normalTimelock = await ethers.getContract("NormalTimelock"); - console.log(`Granting DEFAULT_ADMIN_ROLE to ${normalTimelock} for ${networkName} network`); - await acm.grantRole(acm.DEFAULT_ADMIN_ROLE(), normalTimelock); + console.log(`Granting DEFAULT_ADMIN_ROLE to ${normalTimelock.address} for ${networkName} network`); + await acm.grantRole(acm.DEFAULT_ADMIN_ROLE(), normalTimelock.address); console.log(`Renouncing DEFAULT_ADMIN_ROLE from deployer (${deployer}) for ${hre.network.name} network`); await acm.renounceRole(acm.DEFAULT_ADMIN_ROLE(), deployer); diff --git a/deploy/005-remote-timelock.ts b/deploy/005-remote-timelock.ts index 7e84e150..ab19050f 100644 --- a/deploy/005-remote-timelock.ts +++ b/deploy/005-remote-timelock.ts @@ -15,6 +15,7 @@ export enum REMOTE_NETWORKS { OPMAINNET = "opmainnet", BASESEPOLIA = "basesepolia", BASEMAINNET = "basemainnet", + BERACHAINBARTIO = "berachainbartio", HARDHAT = "hardhat", } type DelayTypes = { @@ -92,6 +93,11 @@ export const delayConfig: DelayConfig = { fast: 21600, critical: 3600, }, + berachainbartio: { + normal: 600, + fast: 300, + critical: 100, + }, }; const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { diff --git a/deploy/006-omnichain-executorOwner-remote.ts b/deploy/006-omnichain-executorOwner-remote.ts index 7c03cf25..589983b3 100644 --- a/deploy/006-omnichain-executorOwner-remote.ts +++ b/deploy/006-omnichain-executorOwner-remote.ts @@ -12,7 +12,7 @@ import { OmnichainGovernanceExecutorOwnerMethods, config, } from "../helpers/deploy/deploymentConfig"; -import { getOmnichainProposalSender, testnetNetworks } from "../helpers/deploy/deploymentUtils"; +import { getOmnichainProposalSender, guardian, testnetNetworks } from "../helpers/deploy/deploymentUtils"; import { OmnichainGovernanceExecutor } from "../typechain"; interface GovernanceCommand { @@ -124,6 +124,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { }, log: true, autoMine: true, + skipIfAlreadyDeployed: true, }); const omnichainExecutorOwner = await ethers.getContractAt( "OmnichainExecutorOwner", diff --git a/deployments/berachainbartio/.chainId b/deployments/berachainbartio/.chainId new file mode 100644 index 00000000..39513277 --- /dev/null +++ b/deployments/berachainbartio/.chainId @@ -0,0 +1 @@ +80084 \ No newline at end of file diff --git a/deployments/berachainbartio/AccessControlManager.json b/deployments/berachainbartio/AccessControlManager.json new file mode 100644 index 00000000..ac49b8c7 --- /dev/null +++ b/deployments/berachainbartio/AccessControlManager.json @@ -0,0 +1,573 @@ +{ + "address": "0x92A6BCD9987Eb8689152C5A89BCC5c03305139E3", + "abi": [ + { + "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" + } + ], + "transactionHash": "0x84bbd5cdfc37fe21b3cdb036475c280512b91b9424c32a2334494b3a3337e6a9", + "receipt": { + "to": null, + "from": "0x18BDb05DD1A95677f4381cfb4db52D342dF5C00d", + "contractAddress": "0x92A6BCD9987Eb8689152C5A89BCC5c03305139E3", + "transactionIndex": 6, + "gasUsed": "910465", + "logsBloom": "0x00000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000040000000002000000000000000000000000000000000000020000000000100000000000000020000000000020000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000100000000000020000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x30824601468ef261490d767d23fcb596a7fe6367bdbd8e4b56673fd071d962fe", + "transactionHash": "0x84bbd5cdfc37fe21b3cdb036475c280512b91b9424c32a2334494b3a3337e6a9", + "logs": [ + { + "transactionIndex": 6, + "blockNumber": 10537840, + "transactionHash": "0x84bbd5cdfc37fe21b3cdb036475c280512b91b9424c32a2334494b3a3337e6a9", + "address": "0x92A6BCD9987Eb8689152C5A89BCC5c03305139E3", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000018bdb05dd1a95677f4381cfb4db52d342df5c00d", + "0x00000000000000000000000018bdb05dd1a95677f4381cfb4db52d342df5c00d" + ], + "data": "0x", + "logIndex": 5, + "blockHash": "0x30824601468ef261490d767d23fcb596a7fe6367bdbd8e4b56673fd071d962fe" + } + ], + "blockNumber": 10537840, + "cumulativeGasUsed": "1107466", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "9f400d4fd6f6fcf916824838bc678e25", + "metadata": "{\"compiler\":{\"version\":\"0.8.25+commit.b61c2a91\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"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\"}],\"devdoc\":{\"author\":\"Venus\",\"details\":\"This contract is a wrapper of OpenZeppelin AccessControl extending it in a way to standartize access control within Venus Smart Contract Ecosystem.\",\"events\":{\"PermissionGranted(address,address,string)\":{\"details\":\"If contract address is 0x000..0 this means that the account is a default admin of this function and can call any contract function with this signature\"},\"RoleAdminChanged(bytes32,bytes32,bytes32)\":{\"details\":\"Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite {RoleAdminChanged} not being emitted signaling this. _Available since v3.1._\"},\"RoleGranted(bytes32,address,address)\":{\"details\":\"Emitted when `account` is granted `role`. `sender` is the account that originated the contract call, an admin role bearer except when using {AccessControl-_setupRole}.\"},\"RoleRevoked(bytes32,address,address)\":{\"details\":\"Emitted when `account` is revoked `role`. `sender` is the account that originated the contract call: - if using `revokeRole`, it is the admin role bearer - if using `renounceRole`, it is the role bearer (i.e. `account`)\"}},\"kind\":\"dev\",\"methods\":{\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"giveCallPermission(address,string,address)\":{\"custom:event\":\"Emits a {RoleGranted} and {PermissionGranted} events.\",\"details\":\"this function can be called only from Role Admin or DEFAULT_ADMIN_ROLEif contractAddress is zero address, the account can access the specified function on **any** contract managed by this ACL\",\"params\":{\"accountToPermit\":\"account that will be given access to the contract function\",\"contractAddress\":\"address of contract for which call permissions will be granted\",\"functionSig\":\"signature e.g. \\\"functionName(uint256,bool)\\\"\"}},\"grantRole(bytes32,address)\":{\"details\":\"Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleGranted} event.\"},\"hasPermission(address,address,string)\":{\"details\":\"This function is used as a view function to check permissions rather than contract hook for access restriction check.\",\"params\":{\"account\":\"for which call permissions will be checked against\",\"contractAddress\":\"address of the restricted contract\",\"functionSig\":\"signature of the restricted function e.g. \\\"functionName(uint256,bool)\\\"\"},\"returns\":{\"_0\":\"false if the user account cannot call the particular contract function\"}},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"isAllowedToCall(address,string)\":{\"details\":\"Since restricted contracts using this function as a permission hook, we can get contracts address with msg.sender\",\"params\":{\"account\":\"for which call permissions will be checked\",\"functionSig\":\"restricted function signature e.g. \\\"functionName(uint256,bool)\\\"\"},\"returns\":{\"_0\":\"false if the user account cannot call the particular contract function\"}},\"renounceRole(bytes32,address)\":{\"details\":\"Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`. May emit a {RoleRevoked} event.\"},\"revokeCallPermission(address,string,address)\":{\"custom:event\":\"Emits {RoleRevoked} and {PermissionRevoked} events.\",\"details\":\"this function can be called only from Role Admin or DEFAULT_ADMIN_ROLE \\t\\tMay emit a {RoleRevoked} event.\",\"params\":{\"contractAddress\":\"address of contract for which call permissions will be revoked\",\"functionSig\":\"signature e.g. \\\"functionName(uint256,bool)\\\"\"}},\"revokeRole(bytes32,address)\":{\"details\":\"Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleRevoked} event.\"},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"}},\"title\":\"AccessControlManager\",\"version\":1},\"userdoc\":{\"events\":{\"PermissionGranted(address,address,string)\":{\"notice\":\"Emitted when an account is given a permission to a certain contract function\"},\"PermissionRevoked(address,address,string)\":{\"notice\":\"Emitted when an account is revoked a permission to a certain contract function\"}},\"kind\":\"user\",\"methods\":{\"giveCallPermission(address,string,address)\":{\"notice\":\"Gives a function call permission to one single account\"},\"hasPermission(address,address,string)\":{\"notice\":\"Verifies if the given account can call a contract's guarded function\"},\"isAllowedToCall(address,string)\":{\"notice\":\"Verifies if the given account can call a contract's guarded function\"},\"revokeCallPermission(address,string,address)\":{\"notice\":\"Revokes an account's permission to a particular function call\"}},\"notice\":\"Access control plays a crucial role in the Venus governance model. It is used to restrict functions so that they can only be called from one account or list of accounts (EOA or Contract Accounts). The implementation of `AccessControlManager`(https://github.com/VenusProtocol/governance-contracts/blob/main/contracts/Governance/AccessControlManager.sol) inherits the [Open Zeppelin AccessControl](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/AccessControl.sol) contract as a base for role management logic. There are two role types: admin and granular permissions. ## Granular Roles Granular roles are built by hashing the contract address and its function signature. For example, given contract `Foo` with function `Foo.bar()` which is guarded by ACM, calling `giveRolePermission` for account B do the following: 1. Compute `keccak256(contractFooAddress,functionSignatureBar)` 1. Add the computed role to the roles of account B 1. Account B now can call `ContractFoo.bar()` ## Admin Roles Admin roles allow for an address to call a function signature on any contract guarded by the `AccessControlManager`. This is particularly useful for contracts created by factories. For Admin roles a null address is hashed in place of the contract address (`keccak256(0x0000000000000000000000000000000000000000,functionSignatureBar)`. In the previous example, giving account B the admin role, account B will have permissions to call the `bar()` function on any contract that is guarded by ACM, not only contract A. ## Protocol Integration All restricted functions in Venus Protocol use a hook to ACM in order to check if the caller has the right permission to call the guarded function. `AccessControlledV5` and `AccessControlledV8` abstract contract makes this integration easier. They call ACM's external method `isAllowedToCall(address caller, string functionSig)`. Here is an example of how `setCollateralFactor` function in `Comptroller` is integrated with ACM: ``` contract Comptroller is [...] AccessControlledV8 { [...] function setCollateralFactor(VToken vToken, uint256 newCollateralFactorMantissa, uint256 newLiquidationThresholdMantissa) external { _checkAccessAllowed(\\\"setCollateralFactor(address,uint256,uint256)\\\"); [...] } } ```\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/Governance/AccessControlManager.sol\":\"AccessControlManager\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/AccessControl.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (access/AccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControl.sol\\\";\\nimport \\\"../utils/Context.sol\\\";\\nimport \\\"../utils/Strings.sol\\\";\\nimport \\\"../utils/introspection/ERC165.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\\n * members except through off-chain means by accessing the contract event logs. Some\\n * applications may benefit from on-chain enumerability, for those cases see\\n * {AccessControlEnumerable}.\\n *\\n * Roles are referred to by their `bytes32` identifier. These should be exposed\\n * in the external API and be unique. The best way to achieve this is by\\n * using `public constant` hash digests:\\n *\\n * ```\\n * bytes32 public constant MY_ROLE = keccak256(\\\"MY_ROLE\\\");\\n * ```\\n *\\n * Roles can be used to represent a set of permissions. To restrict access to a\\n * function call, use {hasRole}:\\n *\\n * ```\\n * function foo() public {\\n * require(hasRole(MY_ROLE, msg.sender));\\n * ...\\n * }\\n * ```\\n *\\n * Roles can be granted and revoked dynamically via the {grantRole} and\\n * {revokeRole} functions. Each role has an associated admin role, and only\\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\\n *\\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\\n * that only accounts with this role will be able to grant or revoke other\\n * roles. More complex role relationships can be created by using\\n * {_setRoleAdmin}.\\n *\\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\\n * grant and revoke this role. Extra precautions should be taken to secure\\n * accounts that have been granted it.\\n */\\nabstract contract AccessControl is Context, IAccessControl, ERC165 {\\n struct RoleData {\\n mapping(address => bool) members;\\n bytes32 adminRole;\\n }\\n\\n mapping(bytes32 => RoleData) private _roles;\\n\\n bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;\\n\\n /**\\n * @dev Modifier that checks that an account has a specific role. Reverts\\n * with a standardized message including the required role.\\n *\\n * The format of the revert reason is given by the following regular expression:\\n *\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\n *\\n * _Available since v4.1._\\n */\\n modifier onlyRole(bytes32 role) {\\n _checkRole(role);\\n _;\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) public view virtual override returns (bool) {\\n return _roles[role].members[account];\\n }\\n\\n /**\\n * @dev Revert with a standard message if `_msgSender()` is missing `role`.\\n * Overriding this function changes the behavior of the {onlyRole} modifier.\\n *\\n * Format of the revert message is described in {_checkRole}.\\n *\\n * _Available since v4.6._\\n */\\n function _checkRole(bytes32 role) internal view virtual {\\n _checkRole(role, _msgSender());\\n }\\n\\n /**\\n * @dev Revert with a standard message if `account` is missing `role`.\\n *\\n * The format of the revert reason is given by the following regular expression:\\n *\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\n */\\n function _checkRole(bytes32 role, address account) internal view virtual {\\n if (!hasRole(role, account)) {\\n revert(\\n string(\\n abi.encodePacked(\\n \\\"AccessControl: account \\\",\\n Strings.toHexString(account),\\n \\\" is missing role \\\",\\n Strings.toHexString(uint256(role), 32)\\n )\\n )\\n );\\n }\\n }\\n\\n /**\\n * @dev Returns the admin role that controls `role`. See {grantRole} and\\n * {revokeRole}.\\n *\\n * To change a role's admin, use {_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {\\n return _roles[role].adminRole;\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n *\\n * May emit a {RoleGranted} event.\\n */\\n function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from the calling account.\\n *\\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\\n * purpose is to provide a mechanism for accounts to lose their privileges\\n * if they are compromised (such as when a trusted device is misplaced).\\n *\\n * If the calling account had been revoked `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function renounceRole(bytes32 role, address account) public virtual override {\\n require(account == _msgSender(), \\\"AccessControl: can only renounce roles for self\\\");\\n\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event. Note that unlike {grantRole}, this function doesn't perform any\\n * checks on the calling account.\\n *\\n * May emit a {RoleGranted} event.\\n *\\n * [WARNING]\\n * ====\\n * This function should only be called from the constructor when setting\\n * up the initial roles for the system.\\n *\\n * Using this function in any other way is effectively circumventing the admin\\n * system imposed by {AccessControl}.\\n * ====\\n *\\n * NOTE: This function is deprecated in favor of {_grantRole}.\\n */\\n function _setupRole(bytes32 role, address account) internal virtual {\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Sets `adminRole` as ``role``'s admin role.\\n *\\n * Emits a {RoleAdminChanged} event.\\n */\\n function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {\\n bytes32 previousAdminRole = getRoleAdmin(role);\\n _roles[role].adminRole = adminRole;\\n emit RoleAdminChanged(role, previousAdminRole, adminRole);\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * Internal function without access restriction.\\n *\\n * May emit a {RoleGranted} event.\\n */\\n function _grantRole(bytes32 role, address account) internal virtual {\\n if (!hasRole(role, account)) {\\n _roles[role].members[account] = true;\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * Internal function without access restriction.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function _revokeRole(bytes32 role, address account) internal virtual {\\n if (hasRole(role, account)) {\\n _roles[role].members[account] = false;\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n}\\n\",\"keccak256\":\"0x67e3daf189111d6d5b0464ed09cf9f0605a22c4b965a7fcecd707101faff008a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/access/IAccessControl.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev External interface of AccessControl declared to support ERC165 detection.\\n */\\ninterface IAccessControl {\\n /**\\n * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\\n *\\n * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\\n * {RoleAdminChanged} not being emitted signaling this.\\n *\\n * _Available since v3.1._\\n */\\n event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\\n\\n /**\\n * @dev Emitted when `account` is granted `role`.\\n *\\n * `sender` is the account that originated the contract call, an admin role\\n * bearer except when using {AccessControl-_setupRole}.\\n */\\n event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Emitted when `account` is revoked `role`.\\n *\\n * `sender` is the account that originated the contract call:\\n * - if using `revokeRole`, it is the admin role bearer\\n * - if using `renounceRole`, it is the role bearer (i.e. `account`)\\n */\\n event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) external view returns (bool);\\n\\n /**\\n * @dev Returns the admin role that controls `role`. See {grantRole} and\\n * {revokeRole}.\\n *\\n * To change a role's admin, use {AccessControl-_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) external view returns (bytes32);\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function grantRole(bytes32 role, address account) external;\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function revokeRole(bytes32 role, address account) external;\\n\\n /**\\n * @dev Revokes `role` from the calling account.\\n *\\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\\n * purpose is to provide a mechanism for accounts to lose their privileges\\n * if they are compromised (such as when a trusted device is misplaced).\\n *\\n * If the calling account had been granted `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n */\\n function renounceRole(bytes32 role, address account) external;\\n}\\n\",\"keccak256\":\"0x59ce320a585d7e1f163cd70390a0ef2ff9cec832e2aa544293a00692465a7a57\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./math/Math.sol\\\";\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n bytes16 private constant _SYMBOLS = \\\"0123456789abcdef\\\";\\n uint8 private constant _ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n uint256 length = Math.log10(value) + 1;\\n string memory buffer = new string(length);\\n uint256 ptr;\\n /// @solidity memory-safe-assembly\\n assembly {\\n ptr := add(buffer, add(32, length))\\n }\\n while (true) {\\n ptr--;\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\\n }\\n value /= 10;\\n if (value == 0) break;\\n }\\n return buffer;\\n }\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\n */\\n function toHexString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n return toHexString(value, Math.log256(value) + 1);\\n }\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\n */\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\n bytes memory buffer = new bytes(2 * length + 2);\\n buffer[0] = \\\"0\\\";\\n buffer[1] = \\\"x\\\";\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\n buffer[i] = _SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\n */\\n function toHexString(address addr) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\n }\\n}\\n\",\"keccak256\":\"0xa4d1d62251f8574deb032a35fc948386a9b4de74b812d4f545a1ac120486b48a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/ERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC165} interface.\\n *\\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\\n * for the additional interface id that will be supported. For example:\\n *\\n * ```solidity\\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\\n * }\\n * ```\\n *\\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\\n */\\nabstract contract ERC165 is IERC165 {\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IERC165).interfaceId;\\n }\\n}\\n\",\"keccak256\":\"0xd10975de010d89fd1c78dc5e8a9a7e7f496198085c151648f20cba166b32582b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\n enum Rounding {\\n Down, // Toward negative infinity\\n Up, // Toward infinity\\n Zero // Toward zero\\n }\\n\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two numbers.\\n */\\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two numbers. The result is rounded towards\\n * zero.\\n */\\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b) / 2 can overflow.\\n return (a & b) + (a ^ b) / 2;\\n }\\n\\n /**\\n * @dev Returns the ceiling of the division of two numbers.\\n *\\n * This differs from standard division with `/` in that it rounds up instead\\n * of rounding down.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b - 1) / b can overflow on addition, so we distribute.\\n return a == 0 ? 0 : (a - 1) / b + 1;\\n }\\n\\n /**\\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\\n * with further edits by Uniswap Labs also under MIT license.\\n */\\n function mulDiv(\\n uint256 x,\\n uint256 y,\\n uint256 denominator\\n ) internal pure returns (uint256 result) {\\n unchecked {\\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = prod1 * 2^256 + prod0.\\n uint256 prod0; // Least significant 256 bits of the product\\n uint256 prod1; // Most significant 256 bits of the product\\n assembly {\\n let mm := mulmod(x, y, not(0))\\n prod0 := mul(x, y)\\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\\n }\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (prod1 == 0) {\\n return prod0 / denominator;\\n }\\n\\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\\n require(denominator > prod1);\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [prod1 prod0].\\n uint256 remainder;\\n assembly {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n prod1 := sub(prod1, gt(remainder, prod0))\\n prod0 := sub(prod0, remainder)\\n }\\n\\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\\n // See https://cs.stackexchange.com/q/138556/92363.\\n\\n // Does not overflow because the denominator cannot be zero at this stage in the function.\\n uint256 twos = denominator & (~denominator + 1);\\n assembly {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [prod1 prod0] by twos.\\n prod0 := div(prod0, twos)\\n\\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\\n twos := add(div(sub(0, twos), twos), 1)\\n }\\n\\n // Shift in bits from prod1 into prod0.\\n prod0 |= prod1 * twos;\\n\\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv = 1 mod 2^4.\\n uint256 inverse = (3 * denominator) ^ 2;\\n\\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\\n // in modular arithmetic, doubling the correct bits in each step.\\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\\n\\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\\n // is no longer required.\\n result = prod0 * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\\n */\\n function mulDiv(\\n uint256 x,\\n uint256 y,\\n uint256 denominator,\\n Rounding rounding\\n ) internal pure returns (uint256) {\\n uint256 result = mulDiv(x, y, denominator);\\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\\n result += 1;\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\\n *\\n * Inspired by Henry S. Warren, Jr.'s \\\"Hacker's Delight\\\" (Chapter 11).\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\\n //\\n // We know that the \\\"msb\\\" (most significant bit) of our target number `a` is a power of 2 such that we have\\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\\n //\\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\\n // \\u2192 `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\\n // \\u2192 `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\\n //\\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\\n uint256 result = 1 << (log2(a) >> 1);\\n\\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\\n // into the expected uint128 result.\\n unchecked {\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n return min(result, a / result);\\n }\\n }\\n\\n /**\\n * @notice Calculates sqrt(a), following the selected rounding direction.\\n */\\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = sqrt(a);\\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 128;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 64;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 32;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 16;\\n }\\n if (value >> 8 > 0) {\\n value >>= 8;\\n result += 8;\\n }\\n if (value >> 4 > 0) {\\n value >>= 4;\\n result += 4;\\n }\\n if (value >> 2 > 0) {\\n value >>= 2;\\n result += 2;\\n }\\n if (value >> 1 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log2(value);\\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >= 10**64) {\\n value /= 10**64;\\n result += 64;\\n }\\n if (value >= 10**32) {\\n value /= 10**32;\\n result += 32;\\n }\\n if (value >= 10**16) {\\n value /= 10**16;\\n result += 16;\\n }\\n if (value >= 10**8) {\\n value /= 10**8;\\n result += 8;\\n }\\n if (value >= 10**4) {\\n value /= 10**4;\\n result += 4;\\n }\\n if (value >= 10**2) {\\n value /= 10**2;\\n result += 2;\\n }\\n if (value >= 10**1) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log10(value);\\n return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n *\\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\\n */\\n function log256(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 16;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 8;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 4;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 2;\\n }\\n if (value >> 8 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log256(value);\\n return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa1e8e83cd0087785df04ac79fb395d9f3684caeaf973d9e2c71caef723a3a5d6\",\"license\":\"MIT\"},\"contracts/Governance/AccessControlManager.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.25;\\nimport \\\"@openzeppelin/contracts/access/AccessControl.sol\\\";\\nimport \\\"./IAccessControlManagerV8.sol\\\";\\n\\n/**\\n * @title AccessControlManager\\n * @author Venus\\n * @dev This contract is a wrapper of OpenZeppelin AccessControl extending it in a way to standartize access control within Venus Smart Contract Ecosystem.\\n * @notice Access control plays a crucial role in the Venus governance model. It is used to restrict functions so that they can only be called from one\\n * account or list of accounts (EOA or Contract Accounts).\\n *\\n * The implementation of `AccessControlManager`(https://github.com/VenusProtocol/governance-contracts/blob/main/contracts/Governance/AccessControlManager.sol)\\n * inherits the [Open Zeppelin AccessControl](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/AccessControl.sol)\\n * contract as a base for role management logic. There are two role types: admin and granular permissions.\\n * \\n * ## Granular Roles\\n * \\n * Granular roles are built by hashing the contract address and its function signature. For example, given contract `Foo` with function `Foo.bar()` which\\n * is guarded by ACM, calling `giveRolePermission` for account B do the following:\\n * \\n * 1. Compute `keccak256(contractFooAddress,functionSignatureBar)`\\n * 1. Add the computed role to the roles of account B\\n * 1. Account B now can call `ContractFoo.bar()`\\n * \\n * ## Admin Roles\\n * \\n * Admin roles allow for an address to call a function signature on any contract guarded by the `AccessControlManager`. This is particularly useful for\\n * contracts created by factories.\\n * \\n * For Admin roles a null address is hashed in place of the contract address (`keccak256(0x0000000000000000000000000000000000000000,functionSignatureBar)`.\\n * \\n * In the previous example, giving account B the admin role, account B will have permissions to call the `bar()` function on any contract that is guarded by\\n * ACM, not only contract A.\\n * \\n * ## Protocol Integration\\n * \\n * All restricted functions in Venus Protocol use a hook to ACM in order to check if the caller has the right permission to call the guarded function.\\n * `AccessControlledV5` and `AccessControlledV8` abstract contract makes this integration easier. They call ACM's external method\\n * `isAllowedToCall(address caller, string functionSig)`. Here is an example of how `setCollateralFactor` function in `Comptroller` is integrated with ACM:\\n\\n```\\n contract Comptroller is [...] AccessControlledV8 {\\n [...]\\n function setCollateralFactor(VToken vToken, uint256 newCollateralFactorMantissa, uint256 newLiquidationThresholdMantissa) external {\\n _checkAccessAllowed(\\\"setCollateralFactor(address,uint256,uint256)\\\");\\n [...]\\n }\\n }\\n```\\n */\\ncontract AccessControlManager is AccessControl, IAccessControlManagerV8 {\\n /// @notice Emitted when an account is given a permission to a certain contract function\\n /// @dev If contract address is 0x000..0 this means that the account is a default admin of this function and\\n /// can call any contract function with this signature\\n event PermissionGranted(address account, address contractAddress, string functionSig);\\n\\n /// @notice Emitted when an account is revoked a permission to a certain contract function\\n event PermissionRevoked(address account, address contractAddress, string functionSig);\\n\\n constructor() {\\n // Grant the contract deployer the default admin role: it will be able\\n // to grant and revoke any roles\\n _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);\\n }\\n\\n /**\\n * @notice Gives a function call permission to one single account\\n * @dev this function can be called only from Role Admin or DEFAULT_ADMIN_ROLE\\n * @param contractAddress address of contract for which call permissions will be granted\\n * @dev if contractAddress is zero address, the account can access the specified function\\n * on **any** contract managed by this ACL\\n * @param functionSig signature e.g. \\\"functionName(uint256,bool)\\\"\\n * @param accountToPermit account that will be given access to the contract function\\n * @custom:event Emits a {RoleGranted} and {PermissionGranted} events.\\n */\\n function giveCallPermission(address contractAddress, string calldata functionSig, address accountToPermit) public {\\n bytes32 role = keccak256(abi.encodePacked(contractAddress, functionSig));\\n grantRole(role, accountToPermit);\\n emit PermissionGranted(accountToPermit, contractAddress, functionSig);\\n }\\n\\n /**\\n * @notice Revokes an account's permission to a particular function call\\n * @dev this function can be called only from Role Admin or DEFAULT_ADMIN_ROLE\\n * \\t\\tMay emit a {RoleRevoked} event.\\n * @param contractAddress address of contract for which call permissions will be revoked\\n * @param functionSig signature e.g. \\\"functionName(uint256,bool)\\\"\\n * @custom:event Emits {RoleRevoked} and {PermissionRevoked} events.\\n */\\n function revokeCallPermission(\\n address contractAddress,\\n string calldata functionSig,\\n address accountToRevoke\\n ) public {\\n bytes32 role = keccak256(abi.encodePacked(contractAddress, functionSig));\\n revokeRole(role, accountToRevoke);\\n emit PermissionRevoked(accountToRevoke, contractAddress, functionSig);\\n }\\n\\n /**\\n * @notice Verifies if the given account can call a contract's guarded function\\n * @dev Since restricted contracts using this function as a permission hook, we can get contracts address with msg.sender\\n * @param account for which call permissions will be checked\\n * @param functionSig restricted function signature e.g. \\\"functionName(uint256,bool)\\\"\\n * @return false if the user account cannot call the particular contract function\\n *\\n */\\n function isAllowedToCall(address account, string calldata functionSig) public view returns (bool) {\\n bytes32 role = keccak256(abi.encodePacked(msg.sender, functionSig));\\n\\n if (hasRole(role, account)) {\\n return true;\\n } else {\\n role = keccak256(abi.encodePacked(address(0), functionSig));\\n return hasRole(role, account);\\n }\\n }\\n\\n /**\\n * @notice Verifies if the given account can call a contract's guarded function\\n * @dev This function is used as a view function to check permissions rather than contract hook for access restriction check.\\n * @param account for which call permissions will be checked against\\n * @param contractAddress address of the restricted contract\\n * @param functionSig signature of the restricted function e.g. \\\"functionName(uint256,bool)\\\"\\n * @return false if the user account cannot call the particular contract function\\n */\\n function hasPermission(\\n address account,\\n address contractAddress,\\n string calldata functionSig\\n ) public view returns (bool) {\\n bytes32 role = keccak256(abi.encodePacked(contractAddress, functionSig));\\n return hasRole(role, account);\\n }\\n}\\n\",\"keccak256\":\"0x9cf1fe49aecbf49434d4a04c3bd25c1a103356c999d335774216da17a3a152a8\",\"license\":\"BSD-3-Clause\"},\"contracts/Governance/IAccessControlManagerV8.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity ^0.8.25;\\n\\nimport \\\"@openzeppelin/contracts/access/IAccessControl.sol\\\";\\n\\n/**\\n * @title IAccessControlManagerV8\\n * @author Venus\\n * @notice Interface implemented by the `AccessControlManagerV8` contract.\\n */\\ninterface IAccessControlManagerV8 is IAccessControl {\\n function giveCallPermission(address contractAddress, string calldata functionSig, address accountToPermit) external;\\n\\n function revokeCallPermission(\\n address contractAddress,\\n string calldata functionSig,\\n address accountToRevoke\\n ) external;\\n\\n function isAllowedToCall(address account, string calldata functionSig) external view returns (bool);\\n\\n function hasPermission(\\n address account,\\n address contractAddress,\\n string calldata functionSig\\n ) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xaa29b098440d0b3a131c5ecdf25ce548790c1b5ac7bf9b5c0264b6af6f7a1e0b\",\"license\":\"BSD-3-Clause\"}},\"version\":1}", + "bytecode": "0x6080604052348015600f57600080fd5b506019600033601d565b60c5565b602582826029565b5050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff166025576000828152602081815260408083206001600160a01b03851684529091529020805460ff1916600117905560813390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b610f19806100d46000396000f3fe608060405234801561001057600080fd5b50600436106100c95760003560e01c8063545f7a321161008157806391d148541161005b57806391d148541461019b578063a217fddf146101df578063d547741f146101e757600080fd5b8063545f7a3214610162578063584f6b601461017557806382bfd0f01461018857600080fd5b8063248a9ca3116100b2578063248a9ca3146101095780632f2ff15d1461013a57806336568abe1461014f57600080fd5b806301ffc9a7146100ce57806318c5e8ab146100f6575b600080fd5b6100e16100dc366004610a74565b6101fa565b60405190151581526020015b60405180910390f35b6100e1610104366004610b28565b610293565b61012c610117366004610b7b565b60009081526020819052604090206001015490565b6040519081526020016100ed565b61014d610148366004610b94565b610368565b005b61014d61015d366004610b94565b610392565b61014d610170366004610bc0565b61044a565b61014d610183366004610bc0565b6104c7565b6100e1610196366004610c25565b610535565b6100e16101a9366004610b94565b60009182526020828152604080842073ffffffffffffffffffffffffffffffffffffffff93909316845291905290205460ff1690565b61012c600081565b61014d6101f5366004610b94565b61059f565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b00000000000000000000000000000000000000000000000000000000148061028d57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b6000803384846040516020016102ab93929190610c86565b60408051601f198184030181529181528151602092830120600081815280845282812073ffffffffffffffffffffffffffffffffffffffff8a16825290935291205490915060ff1615610302576001915050610361565b6000848460405160200161031893929190610c86565b60408051808303601f190181529181528151602092830120600090815280835281812073ffffffffffffffffffffffffffffffffffffffff8916825290925290205460ff169150505b9392505050565b600082815260208190526040902060010154610383816105c4565b61038d83836105d1565b505050565b73ffffffffffffffffffffffffffffffffffffffff8116331461043c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084015b60405180910390fd5b61044682826106c1565b5050565b600084848460405160200161046193929190610c86565b604051602081830303815290604052805190602001209050610483818361059f565b7f55426a61e90ac7d7d1fc886b67b420ade8c8b535e68d655394bc271e3a12b8e2828686866040516104b89493929190610cc5565b60405180910390a15050505050565b60008484846040516020016104de93929190610c86565b6040516020818303038152906040528051906020012090506105008183610368565b7f69c5ce2d658fea352a2464f87ffbe1f09746c918a91da0994044c3767d641b3f828686866040516104b89493929190610cc5565b60008084848460405160200161054d93929190610c86565b60408051601f198184030181529181528151602092830120600081815280845282812073ffffffffffffffffffffffffffffffffffffffff8b16825290935291205490915060ff169695505050505050565b6000828152602081905260409020600101546105ba816105c4565b61038d83836106c1565b6105ce8133610778565b50565b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff166104465760008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff85168452909152902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790556106633390565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff16156104465760008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516808552925280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff16610446576107b681610812565b6107c1836020610831565b6040516020016107d2929190610d43565b60408051601f19818403018152908290527f08c379a000000000000000000000000000000000000000000000000000000000825261043391600401610dc4565b606061028d73ffffffffffffffffffffffffffffffffffffffff831660145b60606000610840836002610e26565b61084b906002610e3d565b67ffffffffffffffff81111561086357610863610e50565b6040519080825280601f01601f19166020018201604052801561088d576020820181803683370190505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106108c4576108c4610e7f565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f78000000000000000000000000000000000000000000000000000000000000008160018151811061092757610927610e7f565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506000610963846002610e26565b61096e906001610e3d565b90505b6001811115610a0b577f303132333435363738396162636465660000000000000000000000000000000085600f16601081106109af576109af610e7f565b1a60f81b8282815181106109c5576109c5610e7f565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c93610a0481610eae565b9050610971565b508315610361576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610433565b600060208284031215610a8657600080fd5b81357fffffffff000000000000000000000000000000000000000000000000000000008116811461036157600080fd5b803573ffffffffffffffffffffffffffffffffffffffff81168114610ada57600080fd5b919050565b60008083601f840112610af157600080fd5b50813567ffffffffffffffff811115610b0957600080fd5b602083019150836020828501011115610b2157600080fd5b9250929050565b600080600060408486031215610b3d57600080fd5b610b4684610ab6565b9250602084013567ffffffffffffffff811115610b6257600080fd5b610b6e86828701610adf565b9497909650939450505050565b600060208284031215610b8d57600080fd5b5035919050565b60008060408385031215610ba757600080fd5b82359150610bb760208401610ab6565b90509250929050565b60008060008060608587031215610bd657600080fd5b610bdf85610ab6565b9350602085013567ffffffffffffffff811115610bfb57600080fd5b610c0787828801610adf565b9094509250610c1a905060408601610ab6565b905092959194509250565b60008060008060608587031215610c3b57600080fd5b610c4485610ab6565b9350610c5260208601610ab6565b9250604085013567ffffffffffffffff811115610c6e57600080fd5b610c7a87828801610adf565b95989497509550505050565b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000008460601b168152818360148301376000910160140190815292915050565b600073ffffffffffffffffffffffffffffffffffffffff808716835280861660208401525060606040830152826060830152828460808401376000608084840101526080601f19601f850116830101905095945050505050565b60005b83811015610d3a578181015183820152602001610d22565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351610d7b816017850160208801610d1f565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351610db8816028840160208801610d1f565b01602801949350505050565b6020815260008251806020840152610de3816040850160208701610d1f565b601f01601f19169190910160400192915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b808202811582820484141761028d5761028d610df7565b8082018082111561028d5761028d610df7565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600081610ebd57610ebd610df7565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff019056fea2646970667358221220a6052000a243f1fa66363f0f0a0d702386084ba1cb5d78f17dbc24f77d046bfb64736f6c63430008190033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100c95760003560e01c8063545f7a321161008157806391d148541161005b57806391d148541461019b578063a217fddf146101df578063d547741f146101e757600080fd5b8063545f7a3214610162578063584f6b601461017557806382bfd0f01461018857600080fd5b8063248a9ca3116100b2578063248a9ca3146101095780632f2ff15d1461013a57806336568abe1461014f57600080fd5b806301ffc9a7146100ce57806318c5e8ab146100f6575b600080fd5b6100e16100dc366004610a74565b6101fa565b60405190151581526020015b60405180910390f35b6100e1610104366004610b28565b610293565b61012c610117366004610b7b565b60009081526020819052604090206001015490565b6040519081526020016100ed565b61014d610148366004610b94565b610368565b005b61014d61015d366004610b94565b610392565b61014d610170366004610bc0565b61044a565b61014d610183366004610bc0565b6104c7565b6100e1610196366004610c25565b610535565b6100e16101a9366004610b94565b60009182526020828152604080842073ffffffffffffffffffffffffffffffffffffffff93909316845291905290205460ff1690565b61012c600081565b61014d6101f5366004610b94565b61059f565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b00000000000000000000000000000000000000000000000000000000148061028d57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b6000803384846040516020016102ab93929190610c86565b60408051601f198184030181529181528151602092830120600081815280845282812073ffffffffffffffffffffffffffffffffffffffff8a16825290935291205490915060ff1615610302576001915050610361565b6000848460405160200161031893929190610c86565b60408051808303601f190181529181528151602092830120600090815280835281812073ffffffffffffffffffffffffffffffffffffffff8916825290925290205460ff169150505b9392505050565b600082815260208190526040902060010154610383816105c4565b61038d83836105d1565b505050565b73ffffffffffffffffffffffffffffffffffffffff8116331461043c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084015b60405180910390fd5b61044682826106c1565b5050565b600084848460405160200161046193929190610c86565b604051602081830303815290604052805190602001209050610483818361059f565b7f55426a61e90ac7d7d1fc886b67b420ade8c8b535e68d655394bc271e3a12b8e2828686866040516104b89493929190610cc5565b60405180910390a15050505050565b60008484846040516020016104de93929190610c86565b6040516020818303038152906040528051906020012090506105008183610368565b7f69c5ce2d658fea352a2464f87ffbe1f09746c918a91da0994044c3767d641b3f828686866040516104b89493929190610cc5565b60008084848460405160200161054d93929190610c86565b60408051601f198184030181529181528151602092830120600081815280845282812073ffffffffffffffffffffffffffffffffffffffff8b16825290935291205490915060ff169695505050505050565b6000828152602081905260409020600101546105ba816105c4565b61038d83836106c1565b6105ce8133610778565b50565b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff166104465760008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff85168452909152902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790556106633390565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff16156104465760008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516808552925280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff16610446576107b681610812565b6107c1836020610831565b6040516020016107d2929190610d43565b60408051601f19818403018152908290527f08c379a000000000000000000000000000000000000000000000000000000000825261043391600401610dc4565b606061028d73ffffffffffffffffffffffffffffffffffffffff831660145b60606000610840836002610e26565b61084b906002610e3d565b67ffffffffffffffff81111561086357610863610e50565b6040519080825280601f01601f19166020018201604052801561088d576020820181803683370190505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106108c4576108c4610e7f565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f78000000000000000000000000000000000000000000000000000000000000008160018151811061092757610927610e7f565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506000610963846002610e26565b61096e906001610e3d565b90505b6001811115610a0b577f303132333435363738396162636465660000000000000000000000000000000085600f16601081106109af576109af610e7f565b1a60f81b8282815181106109c5576109c5610e7f565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c93610a0481610eae565b9050610971565b508315610361576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610433565b600060208284031215610a8657600080fd5b81357fffffffff000000000000000000000000000000000000000000000000000000008116811461036157600080fd5b803573ffffffffffffffffffffffffffffffffffffffff81168114610ada57600080fd5b919050565b60008083601f840112610af157600080fd5b50813567ffffffffffffffff811115610b0957600080fd5b602083019150836020828501011115610b2157600080fd5b9250929050565b600080600060408486031215610b3d57600080fd5b610b4684610ab6565b9250602084013567ffffffffffffffff811115610b6257600080fd5b610b6e86828701610adf565b9497909650939450505050565b600060208284031215610b8d57600080fd5b5035919050565b60008060408385031215610ba757600080fd5b82359150610bb760208401610ab6565b90509250929050565b60008060008060608587031215610bd657600080fd5b610bdf85610ab6565b9350602085013567ffffffffffffffff811115610bfb57600080fd5b610c0787828801610adf565b9094509250610c1a905060408601610ab6565b905092959194509250565b60008060008060608587031215610c3b57600080fd5b610c4485610ab6565b9350610c5260208601610ab6565b9250604085013567ffffffffffffffff811115610c6e57600080fd5b610c7a87828801610adf565b95989497509550505050565b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000008460601b168152818360148301376000910160140190815292915050565b600073ffffffffffffffffffffffffffffffffffffffff808716835280861660208401525060606040830152826060830152828460808401376000608084840101526080601f19601f850116830101905095945050505050565b60005b83811015610d3a578181015183820152602001610d22565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351610d7b816017850160208801610d1f565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351610db8816028840160208801610d1f565b01602801949350505050565b6020815260008251806020840152610de3816040850160208701610d1f565b601f01601f19169190910160400192915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b808202811582820484141761028d5761028d610df7565b8082018082111561028d5761028d610df7565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600081610ebd57610ebd610df7565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff019056fea2646970667358221220a6052000a243f1fa66363f0f0a0d702386084ba1cb5d78f17dbc24f77d046bfb64736f6c63430008190033", + "devdoc": { + "author": "Venus", + "details": "This contract is a wrapper of OpenZeppelin AccessControl extending it in a way to standartize access control within Venus Smart Contract Ecosystem.", + "events": { + "PermissionGranted(address,address,string)": { + "details": "If contract address is 0x000..0 this means that the account is a default admin of this function and can call any contract function with this signature" + }, + "RoleAdminChanged(bytes32,bytes32,bytes32)": { + "details": "Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite {RoleAdminChanged} not being emitted signaling this. _Available since v3.1._" + }, + "RoleGranted(bytes32,address,address)": { + "details": "Emitted when `account` is granted `role`. `sender` is the account that originated the contract call, an admin role bearer except when using {AccessControl-_setupRole}." + }, + "RoleRevoked(bytes32,address,address)": { + "details": "Emitted when `account` is revoked `role`. `sender` is the account that originated the contract call: - if using `revokeRole`, it is the admin role bearer - if using `renounceRole`, it is the role bearer (i.e. `account`)" + } + }, + "kind": "dev", + "methods": { + "getRoleAdmin(bytes32)": { + "details": "Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}." + }, + "giveCallPermission(address,string,address)": { + "custom:event": "Emits a {RoleGranted} and {PermissionGranted} events.", + "details": "this function can be called only from Role Admin or DEFAULT_ADMIN_ROLEif contractAddress is zero address, the account can access the specified function on **any** contract managed by this ACL", + "params": { + "accountToPermit": "account that will be given access to the contract function", + "contractAddress": "address of contract for which call permissions will be granted", + "functionSig": "signature e.g. \"functionName(uint256,bool)\"" + } + }, + "grantRole(bytes32,address)": { + "details": "Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleGranted} event." + }, + "hasPermission(address,address,string)": { + "details": "This function is used as a view function to check permissions rather than contract hook for access restriction check.", + "params": { + "account": "for which call permissions will be checked against", + "contractAddress": "address of the restricted contract", + "functionSig": "signature of the restricted function e.g. \"functionName(uint256,bool)\"" + }, + "returns": { + "_0": "false if the user account cannot call the particular contract function" + } + }, + "hasRole(bytes32,address)": { + "details": "Returns `true` if `account` has been granted `role`." + }, + "isAllowedToCall(address,string)": { + "details": "Since restricted contracts using this function as a permission hook, we can get contracts address with msg.sender", + "params": { + "account": "for which call permissions will be checked", + "functionSig": "restricted function signature e.g. \"functionName(uint256,bool)\"" + }, + "returns": { + "_0": "false if the user account cannot call the particular contract function" + } + }, + "renounceRole(bytes32,address)": { + "details": "Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`. May emit a {RoleRevoked} event." + }, + "revokeCallPermission(address,string,address)": { + "custom:event": "Emits {RoleRevoked} and {PermissionRevoked} events.", + "details": "this function can be called only from Role Admin or DEFAULT_ADMIN_ROLE \t\tMay emit a {RoleRevoked} event.", + "params": { + "contractAddress": "address of contract for which call permissions will be revoked", + "functionSig": "signature e.g. \"functionName(uint256,bool)\"" + } + }, + "revokeRole(bytes32,address)": { + "details": "Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleRevoked} event." + }, + "supportsInterface(bytes4)": { + "details": "See {IERC165-supportsInterface}." + } + }, + "title": "AccessControlManager", + "version": 1 + }, + "userdoc": { + "events": { + "PermissionGranted(address,address,string)": { + "notice": "Emitted when an account is given a permission to a certain contract function" + }, + "PermissionRevoked(address,address,string)": { + "notice": "Emitted when an account is revoked a permission to a certain contract function" + } + }, + "kind": "user", + "methods": { + "giveCallPermission(address,string,address)": { + "notice": "Gives a function call permission to one single account" + }, + "hasPermission(address,address,string)": { + "notice": "Verifies if the given account can call a contract's guarded function" + }, + "isAllowedToCall(address,string)": { + "notice": "Verifies if the given account can call a contract's guarded function" + }, + "revokeCallPermission(address,string,address)": { + "notice": "Revokes an account's permission to a particular function call" + } + }, + "notice": "Access control plays a crucial role in the Venus governance model. It is used to restrict functions so that they can only be called from one account or list of accounts (EOA or Contract Accounts). The implementation of `AccessControlManager`(https://github.com/VenusProtocol/governance-contracts/blob/main/contracts/Governance/AccessControlManager.sol) inherits the [Open Zeppelin AccessControl](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/AccessControl.sol) contract as a base for role management logic. There are two role types: admin and granular permissions. ## Granular Roles Granular roles are built by hashing the contract address and its function signature. For example, given contract `Foo` with function `Foo.bar()` which is guarded by ACM, calling `giveRolePermission` for account B do the following: 1. Compute `keccak256(contractFooAddress,functionSignatureBar)` 1. Add the computed role to the roles of account B 1. Account B now can call `ContractFoo.bar()` ## Admin Roles Admin roles allow for an address to call a function signature on any contract guarded by the `AccessControlManager`. This is particularly useful for contracts created by factories. For Admin roles a null address is hashed in place of the contract address (`keccak256(0x0000000000000000000000000000000000000000,functionSignatureBar)`. In the previous example, giving account B the admin role, account B will have permissions to call the `bar()` function on any contract that is guarded by ACM, not only contract A. ## Protocol Integration All restricted functions in Venus Protocol use a hook to ACM in order to check if the caller has the right permission to call the guarded function. `AccessControlledV5` and `AccessControlledV8` abstract contract makes this integration easier. They call ACM's external method `isAllowedToCall(address caller, string functionSig)`. Here is an example of how `setCollateralFactor` function in `Comptroller` is integrated with ACM: ``` contract Comptroller is [...] AccessControlledV8 { [...] function setCollateralFactor(VToken vToken, uint256 newCollateralFactorMantissa, uint256 newLiquidationThresholdMantissa) external { _checkAccessAllowed(\"setCollateralFactor(address,uint256,uint256)\"); [...] } } ```", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 3703, + "contract": "contracts/Governance/AccessControlManager.sol:AccessControlManager", + "label": "_roles", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_bytes32,t_struct(RoleData)3698_storage)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_bytes32,t_struct(RoleData)3698_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct AccessControl.RoleData)", + "numberOfBytes": "32", + "value": "t_struct(RoleData)3698_storage" + }, + "t_struct(RoleData)3698_storage": { + "encoding": "inplace", + "label": "struct AccessControl.RoleData", + "members": [ + { + "astId": 3695, + "contract": "contracts/Governance/AccessControlManager.sol:AccessControlManager", + "label": "members", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_address,t_bool)" + }, + { + "astId": 3697, + "contract": "contracts/Governance/AccessControlManager.sol:AccessControlManager", + "label": "adminRole", + "offset": 0, + "slot": "1", + "type": "t_bytes32" + } + ], + "numberOfBytes": "64" + } + } + } +} diff --git a/deployments/berachainbartio/CriticalTimelock.json b/deployments/berachainbartio/CriticalTimelock.json new file mode 100644 index 00000000..247bb983 --- /dev/null +++ b/deployments/berachainbartio/CriticalTimelock.json @@ -0,0 +1,691 @@ +{ + "address": "0x243313C1cC198FF80756ed2ef14D9dcd94Ee762b", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "admin_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "delay_", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "ZeroAddressNotAllowed", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "txHash", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "signature", + "type": "string" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "eta", + "type": "uint256" + } + ], + "name": "CancelTransaction", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "txHash", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "signature", + "type": "string" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "eta", + "type": "uint256" + } + ], + "name": "ExecuteTransaction", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldAdmin", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "NewAdmin", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "oldDelay", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "newDelay", + "type": "uint256" + } + ], + "name": "NewDelay", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "newPendingAdmin", + "type": "address" + } + ], + "name": "NewPendingAdmin", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "txHash", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "signature", + "type": "string" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "eta", + "type": "uint256" + } + ], + "name": "QueueTransaction", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "GRACE_PERIOD", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MAXIMUM_DELAY", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MINIMUM_DELAY", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "acceptAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "admin", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "string", + "name": "signature", + "type": "string" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "eta", + "type": "uint256" + } + ], + "name": "cancelTransaction", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "delay", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "string", + "name": "signature", + "type": "string" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "eta", + "type": "uint256" + } + ], + "name": "executeTransaction", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "pendingAdmin", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "string", + "name": "signature", + "type": "string" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "eta", + "type": "uint256" + } + ], + "name": "queueTransaction", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "queuedTransactions", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "delay_", + "type": "uint256" + } + ], + "name": "setDelay", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "pendingAdmin_", + "type": "address" + } + ], + "name": "setPendingAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0xbfe38b096e5c053ec896498808aebbcd95ac1dd8a673d408a57bf96e429088e1", + "receipt": { + "to": null, + "from": "0x18BDb05DD1A95677f4381cfb4db52D342dF5C00d", + "contractAddress": "0x243313C1cC198FF80756ed2ef14D9dcd94Ee762b", + "transactionIndex": 42, + "gasUsed": "1178183", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x549afeb5ecedde13abac8adad5fc78901725790d2053c6b5a594efc133729e0d", + "transactionHash": "0xbfe38b096e5c053ec896498808aebbcd95ac1dd8a673d408a57bf96e429088e1", + "logs": [], + "blockNumber": 10537781, + "cumulativeGasUsed": "4657941", + "status": 1, + "byzantium": true + }, + "args": ["0xc80E4112940efF40c8626bAc0D8E79cB7dAbe289", 100], + "numDeployments": 1, + "solcInputHash": "dd255b4e0156dfc73554b72a83ca02d8", + "metadata": "{\"compiler\":{\"version\":\"0.8.25+commit.b61c2a91\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"delay_\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"ZeroAddressNotAllowed\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"txHash\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"signature\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"eta\",\"type\":\"uint256\"}],\"name\":\"CancelTransaction\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"txHash\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"signature\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"eta\",\"type\":\"uint256\"}],\"name\":\"ExecuteTransaction\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"oldAdmin\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"NewAdmin\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"oldDelay\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"newDelay\",\"type\":\"uint256\"}],\"name\":\"NewDelay\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newPendingAdmin\",\"type\":\"address\"}],\"name\":\"NewPendingAdmin\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"txHash\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"signature\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"eta\",\"type\":\"uint256\"}],\"name\":\"QueueTransaction\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"GRACE_PERIOD\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAXIMUM_DELAY\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MINIMUM_DELAY\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"acceptAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"signature\",\"type\":\"string\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"eta\",\"type\":\"uint256\"}],\"name\":\"cancelTransaction\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"delay\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"signature\",\"type\":\"string\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"eta\",\"type\":\"uint256\"}],\"name\":\"executeTransaction\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pendingAdmin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"signature\",\"type\":\"string\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"eta\",\"type\":\"uint256\"}],\"name\":\"queueTransaction\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"queuedTransactions\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"delay_\",\"type\":\"uint256\"}],\"name\":\"setDelay\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"pendingAdmin_\",\"type\":\"address\"}],\"name\":\"setPendingAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Venus\",\"kind\":\"dev\",\"methods\":{\"GRACE_PERIOD()\":{\"returns\":{\"_0\":\"The duration of the grace period, specified as a uint256 value.\"}},\"MAXIMUM_DELAY()\":{\"returns\":{\"_0\":\"Maximum delay\"}},\"MINIMUM_DELAY()\":{\"returns\":{\"_0\":\"Minimum delay\"}},\"acceptAdmin()\":{\"custom:access\":\"Sender must be pending admin\",\"custom:event\":\"Emit NewAdmin with old and new admin\"},\"cancelTransaction(address,uint256,string,bytes,uint256)\":{\"custom:access\":\"Sender must be admin\",\"custom:event\":\"Emit CancelTransaction\",\"params\":{\"data\":\"Arguments to be passed to the function when called\",\"eta\":\"Timestamp after which the transaction can be executed\",\"signature\":\"Signature of the function to be called\",\"target\":\"Address of the contract with the method to be called\",\"value\":\"Native token amount sent with the transaction\"}},\"executeTransaction(address,uint256,string,bytes,uint256)\":{\"custom:access\":\"Sender must be admin\",\"custom:event\":\"Emit ExecuteTransaction\",\"params\":{\"data\":\"Arguments to be passed to the function when called\",\"eta\":\"Timestamp after which the transaction can be executed\",\"signature\":\"Signature of the function to be called\",\"target\":\"Address of the contract with the method to be called\",\"value\":\"Native token amount sent with the transaction\"},\"returns\":{\"_0\":\"Result of function call\"}},\"queueTransaction(address,uint256,string,bytes,uint256)\":{\"custom:access\":\"Sender must be admin\",\"custom:event\":\"Emit QueueTransaction\",\"params\":{\"data\":\"Arguments to be passed to the function when called\",\"eta\":\"Timestamp after which the transaction can be executed\",\"signature\":\"Signature of the function to be called\",\"target\":\"Address of the contract with the method to be called\",\"value\":\"Native token amount sent with the transaction\"},\"returns\":{\"_0\":\"Hash of the queued transaction\"}},\"setDelay(uint256)\":{\"custom:access\":\"Sender must be Timelock itself\",\"custom:event\":\"Emit NewDelay with old and new delay\",\"params\":{\"delay_\":\"The new delay period for the transaction queue\"}},\"setPendingAdmin(address)\":{\"custom:access\":\"Sender must be Timelock contract itself or admin\",\"custom:event\":\"Emit NewPendingAdmin with new pending admin\",\"params\":{\"pendingAdmin_\":\"Address of the proposed admin\"}}},\"title\":\"TimelockV8\",\"version\":1},\"userdoc\":{\"errors\":{\"ZeroAddressNotAllowed()\":[{\"notice\":\"Thrown if the supplied address is a zero address where it is not allowed\"}]},\"events\":{\"CancelTransaction(bytes32,address,uint256,string,bytes,uint256)\":{\"notice\":\"Event emitted when a proposal transaction has been cancelled\"},\"ExecuteTransaction(bytes32,address,uint256,string,bytes,uint256)\":{\"notice\":\"Event emitted when a proposal transaction has been executed\"},\"NewAdmin(address,address)\":{\"notice\":\"Event emitted when a new admin is accepted\"},\"NewDelay(uint256,uint256)\":{\"notice\":\"Event emitted when a new delay is proposed\"},\"NewPendingAdmin(address)\":{\"notice\":\"Event emitted when a new admin is proposed\"},\"QueueTransaction(bytes32,address,uint256,string,bytes,uint256)\":{\"notice\":\"Event emitted when a proposal transaction has been queued\"}},\"kind\":\"user\",\"methods\":{\"GRACE_PERIOD()\":{\"notice\":\"Return grace period\"},\"MAXIMUM_DELAY()\":{\"notice\":\"Return required maximum delay\"},\"MINIMUM_DELAY()\":{\"notice\":\"Return required minimum delay\"},\"acceptAdmin()\":{\"notice\":\"Method for accepting a proposed admin\"},\"admin()\":{\"notice\":\"Timelock admin authorized to queue and execute transactions\"},\"cancelTransaction(address,uint256,string,bytes,uint256)\":{\"notice\":\"Called to cancel a queued transaction\"},\"delay()\":{\"notice\":\"Period for a proposal transaction to be queued\"},\"executeTransaction(address,uint256,string,bytes,uint256)\":{\"notice\":\"Called to execute a queued transaction\"},\"pendingAdmin()\":{\"notice\":\"Account proposed as the next admin\"},\"queueTransaction(address,uint256,string,bytes,uint256)\":{\"notice\":\"Called for each action when queuing a proposal\"},\"queuedTransactions(bytes32)\":{\"notice\":\"Mapping of queued transactions\"},\"setDelay(uint256)\":{\"notice\":\"Setter for the transaction queue delay\"},\"setPendingAdmin(address)\":{\"notice\":\"Method to propose a new admin authorized to call timelock functions. This should be the Governor Contract\"}},\"notice\":\"The Timelock contract using solidity V8. This contract also differs from the original timelock because it has a virtual function to get minimum delays and allow test deployments to override the value.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/Governance/TimelockV8.sol\":\"TimelockV8\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"@venusprotocol/solidity-utilities/contracts/validators.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.25;\\n\\n/// @notice Thrown if the supplied address is a zero address where it is not allowed\\nerror ZeroAddressNotAllowed();\\n\\n/// @notice Thrown if the supplied value is 0 where it is not allowed\\nerror ZeroValueNotAllowed();\\n\\n/// @notice Checks if the provided address is nonzero, reverts otherwise\\n/// @param address_ Address to check\\n/// @custom:error ZeroAddressNotAllowed is thrown if the provided address is a zero address\\nfunction ensureNonzeroAddress(address address_) pure {\\n if (address_ == address(0)) {\\n revert ZeroAddressNotAllowed();\\n }\\n}\\n\\n/// @notice Checks if the provided value is nonzero, reverts otherwise\\n/// @param value_ Value to check\\n/// @custom:error ZeroValueNotAllowed is thrown if the provided value is 0\\nfunction ensureNonzeroValue(uint256 value_) pure {\\n if (value_ == 0) {\\n revert ZeroValueNotAllowed();\\n }\\n}\\n\",\"keccak256\":\"0xdb88e14d50dd21889ca3329d755673d022c47e8da005b6a545c7f69c2c4b7b86\",\"license\":\"BSD-3-Clause\"},\"contracts/Governance/TimelockV8.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.25;\\nimport { ensureNonzeroAddress } from \\\"@venusprotocol/solidity-utilities/contracts/validators.sol\\\";\\n\\n/**\\n * @title TimelockV8\\n * @author Venus\\n * @notice The Timelock contract using solidity V8.\\n * This contract also differs from the original timelock because it has a virtual function to get minimum delays\\n * and allow test deployments to override the value.\\n */\\ncontract TimelockV8 {\\n /// @notice Required period to execute a proposal transaction\\n uint256 private constant DEFAULT_GRACE_PERIOD = 14 days;\\n\\n /// @notice Minimum amount of time a proposal transaction must be queued\\n uint256 private constant DEFAULT_MINIMUM_DELAY = 1 seconds;\\n\\n /// @notice Maximum amount of time a proposal transaction must be queued\\n uint256 private constant DEFAULT_MAXIMUM_DELAY = 30 days;\\n\\n /// @notice Timelock admin authorized to queue and execute transactions\\n address public admin;\\n\\n /// @notice Account proposed as the next admin\\n address public pendingAdmin;\\n\\n /// @notice Period for a proposal transaction to be queued\\n uint256 public delay;\\n\\n /// @notice Mapping of queued transactions\\n mapping(bytes32 => bool) public queuedTransactions;\\n\\n /// @notice Event emitted when a new admin is accepted\\n event NewAdmin(address indexed oldAdmin, address indexed newAdmin);\\n\\n /// @notice Event emitted when a new admin is proposed\\n event NewPendingAdmin(address indexed newPendingAdmin);\\n\\n /// @notice Event emitted when a new delay is proposed\\n event NewDelay(uint256 indexed oldDelay, uint256 indexed newDelay);\\n\\n /// @notice Event emitted when a proposal transaction has been cancelled\\n event CancelTransaction(\\n bytes32 indexed txHash,\\n address indexed target,\\n uint256 value,\\n string signature,\\n bytes data,\\n uint256 eta\\n );\\n\\n /// @notice Event emitted when a proposal transaction has been executed\\n event ExecuteTransaction(\\n bytes32 indexed txHash,\\n address indexed target,\\n uint256 value,\\n string signature,\\n bytes data,\\n uint256 eta\\n );\\n\\n /// @notice Event emitted when a proposal transaction has been queued\\n event QueueTransaction(\\n bytes32 indexed txHash,\\n address indexed target,\\n uint256 value,\\n string signature,\\n bytes data,\\n uint256 eta\\n );\\n\\n constructor(address admin_, uint256 delay_) {\\n require(delay_ >= MINIMUM_DELAY(), \\\"Timelock::constructor: Delay must exceed minimum delay.\\\");\\n require(delay_ <= MAXIMUM_DELAY(), \\\"Timelock::setDelay: Delay must not exceed maximum delay.\\\");\\n ensureNonzeroAddress(admin_);\\n\\n admin = admin_;\\n delay = delay_;\\n }\\n\\n fallback() external payable {}\\n\\n /**\\n * @notice Setter for the transaction queue delay\\n * @param delay_ The new delay period for the transaction queue\\n * @custom:access Sender must be Timelock itself\\n * @custom:event Emit NewDelay with old and new delay\\n */\\n function setDelay(uint256 delay_) public {\\n require(msg.sender == address(this), \\\"Timelock::setDelay: Call must come from Timelock.\\\");\\n require(delay_ >= MINIMUM_DELAY(), \\\"Timelock::setDelay: Delay must exceed minimum delay.\\\");\\n require(delay_ <= MAXIMUM_DELAY(), \\\"Timelock::setDelay: Delay must not exceed maximum delay.\\\");\\n emit NewDelay(delay, delay_);\\n delay = delay_;\\n }\\n\\n /**\\n * @notice Return grace period\\n * @return The duration of the grace period, specified as a uint256 value.\\n */\\n function GRACE_PERIOD() public view virtual returns (uint256) {\\n return DEFAULT_GRACE_PERIOD;\\n }\\n\\n /**\\n * @notice Return required minimum delay\\n * @return Minimum delay\\n */\\n function MINIMUM_DELAY() public view virtual returns (uint256) {\\n return DEFAULT_MINIMUM_DELAY;\\n }\\n\\n /**\\n * @notice Return required maximum delay\\n * @return Maximum delay\\n */\\n function MAXIMUM_DELAY() public view virtual returns (uint256) {\\n return DEFAULT_MAXIMUM_DELAY;\\n }\\n\\n /**\\n * @notice Method for accepting a proposed admin\\n * @custom:access Sender must be pending admin\\n * @custom:event Emit NewAdmin with old and new admin\\n */\\n function acceptAdmin() public {\\n require(msg.sender == pendingAdmin, \\\"Timelock::acceptAdmin: Call must come from pendingAdmin.\\\");\\n emit NewAdmin(admin, msg.sender);\\n admin = msg.sender;\\n pendingAdmin = address(0);\\n }\\n\\n /**\\n * @notice Method to propose a new admin authorized to call timelock functions. This should be the Governor Contract\\n * @param pendingAdmin_ Address of the proposed admin\\n * @custom:access Sender must be Timelock contract itself or admin\\n * @custom:event Emit NewPendingAdmin with new pending admin\\n */\\n function setPendingAdmin(address pendingAdmin_) public {\\n require(\\n msg.sender == address(this) || msg.sender == admin,\\n \\\"Timelock::setPendingAdmin: Call must come from Timelock.\\\"\\n );\\n ensureNonzeroAddress(pendingAdmin_);\\n pendingAdmin = pendingAdmin_;\\n\\n emit NewPendingAdmin(pendingAdmin);\\n }\\n\\n /**\\n * @notice Called for each action when queuing a proposal\\n * @param target Address of the contract with the method to be called\\n * @param value Native token amount sent with the transaction\\n * @param signature Signature of the function to be called\\n * @param data Arguments to be passed to the function when called\\n * @param eta Timestamp after which the transaction can be executed\\n * @return Hash of the queued transaction\\n * @custom:access Sender must be admin\\n * @custom:event Emit QueueTransaction\\n */\\n function queueTransaction(\\n address target,\\n uint256 value,\\n string calldata signature,\\n bytes calldata data,\\n uint256 eta\\n ) public returns (bytes32) {\\n require(msg.sender == admin, \\\"Timelock::queueTransaction: Call must come from admin.\\\");\\n require(\\n eta >= getBlockTimestamp() + delay,\\n \\\"Timelock::queueTransaction: Estimated execution block must satisfy delay.\\\"\\n );\\n\\n bytes32 txHash = keccak256(abi.encode(target, value, signature, data, eta));\\n require(!queuedTransactions[txHash], \\\"Timelock::queueTransaction: transaction already queued.\\\");\\n queuedTransactions[txHash] = true;\\n\\n emit QueueTransaction(txHash, target, value, signature, data, eta);\\n return txHash;\\n }\\n\\n /**\\n * @notice Called to cancel a queued transaction\\n * @param target Address of the contract with the method to be called\\n * @param value Native token amount sent with the transaction\\n * @param signature Signature of the function to be called\\n * @param data Arguments to be passed to the function when called\\n * @param eta Timestamp after which the transaction can be executed\\n * @custom:access Sender must be admin\\n * @custom:event Emit CancelTransaction\\n */\\n function cancelTransaction(\\n address target,\\n uint256 value,\\n string calldata signature,\\n bytes calldata data,\\n uint256 eta\\n ) public {\\n require(msg.sender == admin, \\\"Timelock::cancelTransaction: Call must come from admin.\\\");\\n\\n bytes32 txHash = keccak256(abi.encode(target, value, signature, data, eta));\\n require(queuedTransactions[txHash], \\\"Timelock::cancelTransaction: transaction is not queued yet.\\\");\\n delete (queuedTransactions[txHash]);\\n\\n emit CancelTransaction(txHash, target, value, signature, data, eta);\\n }\\n\\n /**\\n * @notice Called to execute a queued transaction\\n * @param target Address of the contract with the method to be called\\n * @param value Native token amount sent with the transaction\\n * @param signature Signature of the function to be called\\n * @param data Arguments to be passed to the function when called\\n * @param eta Timestamp after which the transaction can be executed\\n * @return Result of function call\\n * @custom:access Sender must be admin\\n * @custom:event Emit ExecuteTransaction\\n */\\n function executeTransaction(\\n address target,\\n uint256 value,\\n string calldata signature,\\n bytes calldata data,\\n uint256 eta\\n ) public returns (bytes memory) {\\n require(msg.sender == admin, \\\"Timelock::executeTransaction: Call must come from admin.\\\");\\n\\n bytes32 txHash = keccak256(abi.encode(target, value, signature, data, eta));\\n require(queuedTransactions[txHash], \\\"Timelock::executeTransaction: Transaction hasn't been queued.\\\");\\n require(getBlockTimestamp() >= eta, \\\"Timelock::executeTransaction: Transaction hasn't surpassed time lock.\\\");\\n require(getBlockTimestamp() <= eta + GRACE_PERIOD(), \\\"Timelock::executeTransaction: Transaction is stale.\\\");\\n\\n delete (queuedTransactions[txHash]);\\n\\n bytes memory callData;\\n\\n if (bytes(signature).length == 0) {\\n callData = data;\\n } else {\\n callData = abi.encodePacked(bytes4(keccak256(bytes(signature))), data);\\n }\\n\\n // solium-disable-next-line security/no-call-value\\n (bool success, bytes memory returnData) = target.call{ value: value }(callData);\\n require(success, \\\"Timelock::executeTransaction: Transaction execution reverted.\\\");\\n\\n emit ExecuteTransaction(txHash, target, value, signature, data, eta);\\n\\n return returnData;\\n }\\n\\n /**\\n * @notice Returns the current block timestamp\\n * @return The current block timestamp\\n */\\n function getBlockTimestamp() internal view returns (uint256) {\\n // solium-disable-next-line security/no-block-members\\n return block.timestamp;\\n }\\n}\\n\",\"keccak256\":\"0xaf1af48a0bb1ad0391a95270b934bcd30a0326f6e5ba415c581503807e689b45\",\"license\":\"BSD-3-Clause\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b5060405161154038038061154083398101604081905261002f91610180565b60018110156100ab5760405162461bcd60e51b815260206004820152603760248201527f54696d656c6f636b3a3a636f6e7374727563746f723a2044656c6179206d757360448201527f7420657863656564206d696e696d756d2064656c61792e00000000000000000060648201526084015b60405180910390fd5b62278d008111156101245760405162461bcd60e51b815260206004820152603860248201527f54696d656c6f636b3a3a73657444656c61793a2044656c6179206d757374206e60448201527f6f7420657863656564206d6178696d756d2064656c61792e000000000000000060648201526084016100a2565b61012d82610156565b600080546001600160a01b0319166001600160a01b0393909316929092179091556002556101ba565b6001600160a01b03811661017d576040516342bcdf7f60e11b815260040160405180910390fd5b50565b6000806040838503121561019357600080fd5b82516001600160a01b03811681146101aa57600080fd5b6020939093015192949293505050565b611377806101c96000396000f3fe6080604052600436106100c95760003560e01c80636a42b8f811610079578063c1a287e211610056578063c1a287e214610216578063e177246e1461022c578063f2b065371461024c578063f851a4401461028c57005b80636a42b8f8146101d65780637d645fab146101ec578063b1b43ae51461020257005b80633a66f901116100a75780633a66f901146101685780634dd18bf514610196578063591fcdfe146101b657005b80630825f38f146100cb5780630e18b681146101015780632678224714610116575b005b3480156100d757600080fd5b506100eb6100e636600461106e565b6102b9565b6040516100f89190611125565b60405180910390f35b34801561010d57600080fd5b506100c9610749565b34801561012257600080fd5b506001546101439073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100f8565b34801561017457600080fd5b5061018861018336600461106e565b610853565b6040519081526020016100f8565b3480156101a257600080fd5b506100c96101b1366004611176565b610b03565b3480156101c257600080fd5b506100c96101d136600461106e565b610c12565b3480156101e257600080fd5b5061018860025481565b3480156101f857600080fd5b5062278d00610188565b34801561020e57600080fd5b506001610188565b34801561022257600080fd5b5062127500610188565b34801561023857600080fd5b506100c9610247366004611198565b610e13565b34801561025857600080fd5b5061027c610267366004611198565b60036020526000908152604090205460ff1681565b60405190151581526020016100f8565b34801561029857600080fd5b506000546101439073ffffffffffffffffffffffffffffffffffffffff1681565b60005460609073ffffffffffffffffffffffffffffffffffffffff16331461034e5760405162461bcd60e51b815260206004820152603860248201527f54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a20436160448201527f6c6c206d75737420636f6d652066726f6d2061646d696e2e000000000000000060648201526084015b60405180910390fd5b60008888888888888860405160200161036d97969594939291906111fa565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291815281516020928301206000818152600390935291205490915060ff166104285760405162461bcd60e51b815260206004820152603d60248201527f54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a20547260448201527f616e73616374696f6e206861736e2774206265656e207175657565642e0000006064820152608401610345565b824210156104c45760405162461bcd60e51b815260206004820152604560248201527f54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a20547260448201527f616e73616374696f6e206861736e2774207375727061737365642074696d652060648201527f6c6f636b2e000000000000000000000000000000000000000000000000000000608482015260a401610345565b6104d16212750084611258565b4211156105465760405162461bcd60e51b815260206004820152603360248201527f54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a20547260448201527f616e73616374696f6e206973207374616c652e000000000000000000000000006064820152608401610345565b600081815260036020526040812080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690556060908790036105c35785858080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509293506105fe92505050565b87876040516105d3929190611298565b6040519081900381206105ec91889088906020016112a8565b60405160208183030381529060405290505b6000808b73ffffffffffffffffffffffffffffffffffffffff168b8460405161062791906112e4565b60006040518083038185875af1925050503d8060008114610664576040519150601f19603f3d011682016040523d82523d6000602084013e610669565b606091505b5091509150816106e15760405162461bcd60e51b815260206004820152603d60248201527f54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a20547260448201527f616e73616374696f6e20657865637574696f6e2072657665727465642e0000006064820152608401610345565b8b73ffffffffffffffffffffffffffffffffffffffff16847fa560e3198060a2f10670c1ec5b403077ea6ae93ca8de1c32b451dc1a943cd6e78d8d8d8d8d8d60405161073296959493929190611300565b60405180910390a39b9a5050505050505050505050565b60015473ffffffffffffffffffffffffffffffffffffffff1633146107d65760405162461bcd60e51b815260206004820152603860248201527f54696d656c6f636b3a3a61636365707441646d696e3a2043616c6c206d75737460448201527f20636f6d652066726f6d2070656e64696e6741646d696e2e00000000000000006064820152608401610345565b60008054604051339273ffffffffffffffffffffffffffffffffffffffff909216917ff9ffabca9c8276e99321725bcb43fb076a6c66a54b7f21c4e8146d8519b417dc91a3600080547fffffffffffffffffffffffff00000000000000000000000000000000000000009081163317909155600180549091169055565b6000805473ffffffffffffffffffffffffffffffffffffffff1633146108e15760405162461bcd60e51b815260206004820152603660248201527f54696d656c6f636b3a3a71756575655472616e73616374696f6e3a2043616c6c60448201527f206d75737420636f6d652066726f6d2061646d696e2e000000000000000000006064820152608401610345565b6002546108ee9042611258565b8210156109895760405162461bcd60e51b815260206004820152604960248201527f54696d656c6f636b3a3a71756575655472616e73616374696f6e3a204573746960448201527f6d6174656420657865637574696f6e20626c6f636b206d75737420736174697360648201527f66792064656c61792e0000000000000000000000000000000000000000000000608482015260a401610345565b6000888888888888886040516020016109a897969594939291906111fa565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291815281516020928301206000818152600390935291205490915060ff1615610a645760405162461bcd60e51b815260206004820152603760248201527f54696d656c6f636b3a3a71756575655472616e73616374696f6e3a207472616e60448201527f73616374696f6e20616c7265616479207175657565642e0000000000000000006064820152608401610345565b6000818152600360205260409081902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555173ffffffffffffffffffffffffffffffffffffffff8a169082907f76e2796dc3a81d57b0e8504b647febcbeeb5f4af818e164f11eef8131a6a763f90610aef908c908c908c908c908c908c90611300565b60405180910390a398975050505050505050565b33301480610b28575060005473ffffffffffffffffffffffffffffffffffffffff1633145b610b9a5760405162461bcd60e51b815260206004820152603860248201527f54696d656c6f636b3a3a73657450656e64696e6741646d696e3a2043616c6c2060448201527f6d75737420636f6d652066726f6d2054696d656c6f636b2e00000000000000006064820152608401610345565b610ba381610fac565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040517f69d78e38a01985fbb1462961809b4b2d65531bc93b2b94037f3334b82ca4a75690600090a250565b60005473ffffffffffffffffffffffffffffffffffffffff163314610c9f5760405162461bcd60e51b815260206004820152603760248201527f54696d656c6f636b3a3a63616e63656c5472616e73616374696f6e3a2043616c60448201527f6c206d75737420636f6d652066726f6d2061646d696e2e0000000000000000006064820152608401610345565b600087878787878787604051602001610cbe97969594939291906111fa565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291815281516020928301206000818152600390935291205490915060ff16610d795760405162461bcd60e51b815260206004820152603b60248201527f54696d656c6f636b3a3a63616e63656c5472616e73616374696f6e3a2074726160448201527f6e73616374696f6e206973206e6f7420717565756564207965742e00000000006064820152608401610345565b6000818152600360205260409081902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690555173ffffffffffffffffffffffffffffffffffffffff89169082907f2fffc091a501fd91bfbff27141450d3acb40fb8e6d8382b243ec7a812a3aaf8790610e01908b908b908b908b908b908b90611300565b60405180910390a35050505050505050565b333014610e885760405162461bcd60e51b815260206004820152603160248201527f54696d656c6f636b3a3a73657444656c61793a2043616c6c206d75737420636f60448201527f6d652066726f6d2054696d656c6f636b2e0000000000000000000000000000006064820152608401610345565b6001811015610eff5760405162461bcd60e51b815260206004820152603460248201527f54696d656c6f636b3a3a73657444656c61793a2044656c6179206d757374206560448201527f7863656564206d696e696d756d2064656c61792e0000000000000000000000006064820152608401610345565b62278d00811115610f785760405162461bcd60e51b815260206004820152603860248201527f54696d656c6f636b3a3a73657444656c61793a2044656c6179206d757374206e60448201527f6f7420657863656564206d6178696d756d2064656c61792e00000000000000006064820152608401610345565b6002546040518291907fed0229422af39d4d7d33f7a27d31d6f5cb20ec628293da58dd6e8a528ed466be90600090a3600255565b73ffffffffffffffffffffffffffffffffffffffff8116610ff9576040517f8579befe00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50565b803573ffffffffffffffffffffffffffffffffffffffff8116811461102057600080fd5b919050565b60008083601f84011261103757600080fd5b50813567ffffffffffffffff81111561104f57600080fd5b60208301915083602082850101111561106757600080fd5b9250929050565b600080600080600080600060a0888a03121561108957600080fd5b61109288610ffc565b965060208801359550604088013567ffffffffffffffff808211156110b657600080fd5b6110c28b838c01611025565b909750955060608a01359150808211156110db57600080fd5b506110e88a828b01611025565b989b979a50959894979596608090950135949350505050565b60005b8381101561111c578181015183820152602001611104565b50506000910152565b6020815260008251806020840152611144816040850160208701611101565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b60006020828403121561118857600080fd5b61119182610ffc565b9392505050565b6000602082840312156111aa57600080fd5b5035919050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b73ffffffffffffffffffffffffffffffffffffffff8816815286602082015260a06040820152600061123060a0830187896111b1565b82810360608401526112438186886111b1565b91505082608083015298975050505050505050565b80820180821115611292577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b92915050565b8183823760009101908152919050565b7fffffffff0000000000000000000000000000000000000000000000000000000084168152818360048301376000910160040190815292915050565b600082516112f6818460208701611101565b9190910192915050565b86815260806020820152600061131a6080830187896111b1565b828103604084015261132d8186886111b1565b91505082606083015297965050505050505056fea2646970667358221220107bb03227edc1c6f85b8373dcceaab44e4dfeb00d413bf48275c2b4e4a1dd8a64736f6c63430008190033", + "deployedBytecode": "0x6080604052600436106100c95760003560e01c80636a42b8f811610079578063c1a287e211610056578063c1a287e214610216578063e177246e1461022c578063f2b065371461024c578063f851a4401461028c57005b80636a42b8f8146101d65780637d645fab146101ec578063b1b43ae51461020257005b80633a66f901116100a75780633a66f901146101685780634dd18bf514610196578063591fcdfe146101b657005b80630825f38f146100cb5780630e18b681146101015780632678224714610116575b005b3480156100d757600080fd5b506100eb6100e636600461106e565b6102b9565b6040516100f89190611125565b60405180910390f35b34801561010d57600080fd5b506100c9610749565b34801561012257600080fd5b506001546101439073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100f8565b34801561017457600080fd5b5061018861018336600461106e565b610853565b6040519081526020016100f8565b3480156101a257600080fd5b506100c96101b1366004611176565b610b03565b3480156101c257600080fd5b506100c96101d136600461106e565b610c12565b3480156101e257600080fd5b5061018860025481565b3480156101f857600080fd5b5062278d00610188565b34801561020e57600080fd5b506001610188565b34801561022257600080fd5b5062127500610188565b34801561023857600080fd5b506100c9610247366004611198565b610e13565b34801561025857600080fd5b5061027c610267366004611198565b60036020526000908152604090205460ff1681565b60405190151581526020016100f8565b34801561029857600080fd5b506000546101439073ffffffffffffffffffffffffffffffffffffffff1681565b60005460609073ffffffffffffffffffffffffffffffffffffffff16331461034e5760405162461bcd60e51b815260206004820152603860248201527f54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a20436160448201527f6c6c206d75737420636f6d652066726f6d2061646d696e2e000000000000000060648201526084015b60405180910390fd5b60008888888888888860405160200161036d97969594939291906111fa565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291815281516020928301206000818152600390935291205490915060ff166104285760405162461bcd60e51b815260206004820152603d60248201527f54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a20547260448201527f616e73616374696f6e206861736e2774206265656e207175657565642e0000006064820152608401610345565b824210156104c45760405162461bcd60e51b815260206004820152604560248201527f54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a20547260448201527f616e73616374696f6e206861736e2774207375727061737365642074696d652060648201527f6c6f636b2e000000000000000000000000000000000000000000000000000000608482015260a401610345565b6104d16212750084611258565b4211156105465760405162461bcd60e51b815260206004820152603360248201527f54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a20547260448201527f616e73616374696f6e206973207374616c652e000000000000000000000000006064820152608401610345565b600081815260036020526040812080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690556060908790036105c35785858080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509293506105fe92505050565b87876040516105d3929190611298565b6040519081900381206105ec91889088906020016112a8565b60405160208183030381529060405290505b6000808b73ffffffffffffffffffffffffffffffffffffffff168b8460405161062791906112e4565b60006040518083038185875af1925050503d8060008114610664576040519150601f19603f3d011682016040523d82523d6000602084013e610669565b606091505b5091509150816106e15760405162461bcd60e51b815260206004820152603d60248201527f54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a20547260448201527f616e73616374696f6e20657865637574696f6e2072657665727465642e0000006064820152608401610345565b8b73ffffffffffffffffffffffffffffffffffffffff16847fa560e3198060a2f10670c1ec5b403077ea6ae93ca8de1c32b451dc1a943cd6e78d8d8d8d8d8d60405161073296959493929190611300565b60405180910390a39b9a5050505050505050505050565b60015473ffffffffffffffffffffffffffffffffffffffff1633146107d65760405162461bcd60e51b815260206004820152603860248201527f54696d656c6f636b3a3a61636365707441646d696e3a2043616c6c206d75737460448201527f20636f6d652066726f6d2070656e64696e6741646d696e2e00000000000000006064820152608401610345565b60008054604051339273ffffffffffffffffffffffffffffffffffffffff909216917ff9ffabca9c8276e99321725bcb43fb076a6c66a54b7f21c4e8146d8519b417dc91a3600080547fffffffffffffffffffffffff00000000000000000000000000000000000000009081163317909155600180549091169055565b6000805473ffffffffffffffffffffffffffffffffffffffff1633146108e15760405162461bcd60e51b815260206004820152603660248201527f54696d656c6f636b3a3a71756575655472616e73616374696f6e3a2043616c6c60448201527f206d75737420636f6d652066726f6d2061646d696e2e000000000000000000006064820152608401610345565b6002546108ee9042611258565b8210156109895760405162461bcd60e51b815260206004820152604960248201527f54696d656c6f636b3a3a71756575655472616e73616374696f6e3a204573746960448201527f6d6174656420657865637574696f6e20626c6f636b206d75737420736174697360648201527f66792064656c61792e0000000000000000000000000000000000000000000000608482015260a401610345565b6000888888888888886040516020016109a897969594939291906111fa565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291815281516020928301206000818152600390935291205490915060ff1615610a645760405162461bcd60e51b815260206004820152603760248201527f54696d656c6f636b3a3a71756575655472616e73616374696f6e3a207472616e60448201527f73616374696f6e20616c7265616479207175657565642e0000000000000000006064820152608401610345565b6000818152600360205260409081902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555173ffffffffffffffffffffffffffffffffffffffff8a169082907f76e2796dc3a81d57b0e8504b647febcbeeb5f4af818e164f11eef8131a6a763f90610aef908c908c908c908c908c908c90611300565b60405180910390a398975050505050505050565b33301480610b28575060005473ffffffffffffffffffffffffffffffffffffffff1633145b610b9a5760405162461bcd60e51b815260206004820152603860248201527f54696d656c6f636b3a3a73657450656e64696e6741646d696e3a2043616c6c2060448201527f6d75737420636f6d652066726f6d2054696d656c6f636b2e00000000000000006064820152608401610345565b610ba381610fac565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040517f69d78e38a01985fbb1462961809b4b2d65531bc93b2b94037f3334b82ca4a75690600090a250565b60005473ffffffffffffffffffffffffffffffffffffffff163314610c9f5760405162461bcd60e51b815260206004820152603760248201527f54696d656c6f636b3a3a63616e63656c5472616e73616374696f6e3a2043616c60448201527f6c206d75737420636f6d652066726f6d2061646d696e2e0000000000000000006064820152608401610345565b600087878787878787604051602001610cbe97969594939291906111fa565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291815281516020928301206000818152600390935291205490915060ff16610d795760405162461bcd60e51b815260206004820152603b60248201527f54696d656c6f636b3a3a63616e63656c5472616e73616374696f6e3a2074726160448201527f6e73616374696f6e206973206e6f7420717565756564207965742e00000000006064820152608401610345565b6000818152600360205260409081902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690555173ffffffffffffffffffffffffffffffffffffffff89169082907f2fffc091a501fd91bfbff27141450d3acb40fb8e6d8382b243ec7a812a3aaf8790610e01908b908b908b908b908b908b90611300565b60405180910390a35050505050505050565b333014610e885760405162461bcd60e51b815260206004820152603160248201527f54696d656c6f636b3a3a73657444656c61793a2043616c6c206d75737420636f60448201527f6d652066726f6d2054696d656c6f636b2e0000000000000000000000000000006064820152608401610345565b6001811015610eff5760405162461bcd60e51b815260206004820152603460248201527f54696d656c6f636b3a3a73657444656c61793a2044656c6179206d757374206560448201527f7863656564206d696e696d756d2064656c61792e0000000000000000000000006064820152608401610345565b62278d00811115610f785760405162461bcd60e51b815260206004820152603860248201527f54696d656c6f636b3a3a73657444656c61793a2044656c6179206d757374206e60448201527f6f7420657863656564206d6178696d756d2064656c61792e00000000000000006064820152608401610345565b6002546040518291907fed0229422af39d4d7d33f7a27d31d6f5cb20ec628293da58dd6e8a528ed466be90600090a3600255565b73ffffffffffffffffffffffffffffffffffffffff8116610ff9576040517f8579befe00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50565b803573ffffffffffffffffffffffffffffffffffffffff8116811461102057600080fd5b919050565b60008083601f84011261103757600080fd5b50813567ffffffffffffffff81111561104f57600080fd5b60208301915083602082850101111561106757600080fd5b9250929050565b600080600080600080600060a0888a03121561108957600080fd5b61109288610ffc565b965060208801359550604088013567ffffffffffffffff808211156110b657600080fd5b6110c28b838c01611025565b909750955060608a01359150808211156110db57600080fd5b506110e88a828b01611025565b989b979a50959894979596608090950135949350505050565b60005b8381101561111c578181015183820152602001611104565b50506000910152565b6020815260008251806020840152611144816040850160208701611101565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b60006020828403121561118857600080fd5b61119182610ffc565b9392505050565b6000602082840312156111aa57600080fd5b5035919050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b73ffffffffffffffffffffffffffffffffffffffff8816815286602082015260a06040820152600061123060a0830187896111b1565b82810360608401526112438186886111b1565b91505082608083015298975050505050505050565b80820180821115611292577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b92915050565b8183823760009101908152919050565b7fffffffff0000000000000000000000000000000000000000000000000000000084168152818360048301376000910160040190815292915050565b600082516112f6818460208701611101565b9190910192915050565b86815260806020820152600061131a6080830187896111b1565b828103604084015261132d8186886111b1565b91505082606083015297965050505050505056fea2646970667358221220107bb03227edc1c6f85b8373dcceaab44e4dfeb00d413bf48275c2b4e4a1dd8a64736f6c63430008190033", + "devdoc": { + "author": "Venus", + "kind": "dev", + "methods": { + "GRACE_PERIOD()": { + "returns": { + "_0": "The duration of the grace period, specified as a uint256 value." + } + }, + "MAXIMUM_DELAY()": { + "returns": { + "_0": "Maximum delay" + } + }, + "MINIMUM_DELAY()": { + "returns": { + "_0": "Minimum delay" + } + }, + "acceptAdmin()": { + "custom:access": "Sender must be pending admin", + "custom:event": "Emit NewAdmin with old and new admin" + }, + "cancelTransaction(address,uint256,string,bytes,uint256)": { + "custom:access": "Sender must be admin", + "custom:event": "Emit CancelTransaction", + "params": { + "data": "Arguments to be passed to the function when called", + "eta": "Timestamp after which the transaction can be executed", + "signature": "Signature of the function to be called", + "target": "Address of the contract with the method to be called", + "value": "Native token amount sent with the transaction" + } + }, + "executeTransaction(address,uint256,string,bytes,uint256)": { + "custom:access": "Sender must be admin", + "custom:event": "Emit ExecuteTransaction", + "params": { + "data": "Arguments to be passed to the function when called", + "eta": "Timestamp after which the transaction can be executed", + "signature": "Signature of the function to be called", + "target": "Address of the contract with the method to be called", + "value": "Native token amount sent with the transaction" + }, + "returns": { + "_0": "Result of function call" + } + }, + "queueTransaction(address,uint256,string,bytes,uint256)": { + "custom:access": "Sender must be admin", + "custom:event": "Emit QueueTransaction", + "params": { + "data": "Arguments to be passed to the function when called", + "eta": "Timestamp after which the transaction can be executed", + "signature": "Signature of the function to be called", + "target": "Address of the contract with the method to be called", + "value": "Native token amount sent with the transaction" + }, + "returns": { + "_0": "Hash of the queued transaction" + } + }, + "setDelay(uint256)": { + "custom:access": "Sender must be Timelock itself", + "custom:event": "Emit NewDelay with old and new delay", + "params": { + "delay_": "The new delay period for the transaction queue" + } + }, + "setPendingAdmin(address)": { + "custom:access": "Sender must be Timelock contract itself or admin", + "custom:event": "Emit NewPendingAdmin with new pending admin", + "params": { + "pendingAdmin_": "Address of the proposed admin" + } + } + }, + "title": "TimelockV8", + "version": 1 + }, + "userdoc": { + "errors": { + "ZeroAddressNotAllowed()": [ + { + "notice": "Thrown if the supplied address is a zero address where it is not allowed" + } + ] + }, + "events": { + "CancelTransaction(bytes32,address,uint256,string,bytes,uint256)": { + "notice": "Event emitted when a proposal transaction has been cancelled" + }, + "ExecuteTransaction(bytes32,address,uint256,string,bytes,uint256)": { + "notice": "Event emitted when a proposal transaction has been executed" + }, + "NewAdmin(address,address)": { + "notice": "Event emitted when a new admin is accepted" + }, + "NewDelay(uint256,uint256)": { + "notice": "Event emitted when a new delay is proposed" + }, + "NewPendingAdmin(address)": { + "notice": "Event emitted when a new admin is proposed" + }, + "QueueTransaction(bytes32,address,uint256,string,bytes,uint256)": { + "notice": "Event emitted when a proposal transaction has been queued" + } + }, + "kind": "user", + "methods": { + "GRACE_PERIOD()": { + "notice": "Return grace period" + }, + "MAXIMUM_DELAY()": { + "notice": "Return required maximum delay" + }, + "MINIMUM_DELAY()": { + "notice": "Return required minimum delay" + }, + "acceptAdmin()": { + "notice": "Method for accepting a proposed admin" + }, + "admin()": { + "notice": "Timelock admin authorized to queue and execute transactions" + }, + "cancelTransaction(address,uint256,string,bytes,uint256)": { + "notice": "Called to cancel a queued transaction" + }, + "delay()": { + "notice": "Period for a proposal transaction to be queued" + }, + "executeTransaction(address,uint256,string,bytes,uint256)": { + "notice": "Called to execute a queued transaction" + }, + "pendingAdmin()": { + "notice": "Account proposed as the next admin" + }, + "queueTransaction(address,uint256,string,bytes,uint256)": { + "notice": "Called for each action when queuing a proposal" + }, + "queuedTransactions(bytes32)": { + "notice": "Mapping of queued transactions" + }, + "setDelay(uint256)": { + "notice": "Setter for the transaction queue delay" + }, + "setPendingAdmin(address)": { + "notice": "Method to propose a new admin authorized to call timelock functions. This should be the Governor Contract" + } + }, + "notice": "The Timelock contract using solidity V8. This contract also differs from the original timelock because it has a virtual function to get minimum delays and allow test deployments to override the value.", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 60, + "contract": "contracts/Governance/TimelockV8.sol:TimelockV8", + "label": "admin", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 63, + "contract": "contracts/Governance/TimelockV8.sol:TimelockV8", + "label": "pendingAdmin", + "offset": 0, + "slot": "1", + "type": "t_address" + }, + { + "astId": 66, + "contract": "contracts/Governance/TimelockV8.sol:TimelockV8", + "label": "delay", + "offset": 0, + "slot": "2", + "type": "t_uint256" + }, + { + "astId": 71, + "contract": "contracts/Governance/TimelockV8.sol:TimelockV8", + "label": "queuedTransactions", + "offset": 0, + "slot": "3", + "type": "t_mapping(t_bytes32,t_bool)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_bool)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} diff --git a/deployments/berachainbartio/DefaultProxyAdmin.json b/deployments/berachainbartio/DefaultProxyAdmin.json new file mode 100644 index 00000000..8396a463 --- /dev/null +++ b/deployments/berachainbartio/DefaultProxyAdmin.json @@ -0,0 +1,200 @@ +{ + "address": "0x39dBB4f255508995cc509E6fDAb2Ab1C286F5766", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "initialOwner", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "contract TransparentUpgradeableProxy", + "name": "proxy", + "type": "address" + }, + { + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "changeProxyAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract TransparentUpgradeableProxy", + "name": "proxy", + "type": "address" + } + ], + "name": "getProxyAdmin", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract TransparentUpgradeableProxy", + "name": "proxy", + "type": "address" + } + ], + "name": "getProxyImplementation", + "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": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract TransparentUpgradeableProxy", + "name": "proxy", + "type": "address" + }, + { + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "upgrade", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract TransparentUpgradeableProxy", + "name": "proxy", + "type": "address" + }, + { + "internalType": "address", + "name": "implementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + } + ], + "transactionHash": "0xccdd63bcaf17e29766137cef42e3ceeda136be8a65a4cf3d8b5bdd76c5b88cb2", + "receipt": { + "to": null, + "from": "0x18BDb05DD1A95677f4381cfb4db52D342dF5C00d", + "contractAddress": "0x39dBB4f255508995cc509E6fDAb2Ab1C286F5766", + "transactionIndex": 5, + "gasUsed": "642835", + "logsBloom": "0x00000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000001000000000000000000000000000000000000020004000000000000000800000000000000000000000000000000400000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000004004000000000000000000000000000", + "blockHash": "0x6c7d843e0cdee29270d39b2e4833253e6a88e18a830812ef9c0a3b30b3e26e82", + "transactionHash": "0xccdd63bcaf17e29766137cef42e3ceeda136be8a65a4cf3d8b5bdd76c5b88cb2", + "logs": [ + { + "transactionIndex": 5, + "blockNumber": 10537890, + "transactionHash": "0xccdd63bcaf17e29766137cef42e3ceeda136be8a65a4cf3d8b5bdd76c5b88cb2", + "address": "0x39dBB4f255508995cc509E6fDAb2Ab1C286F5766", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000008cf9d51df988f1e69174d22b7f93f97e1aaebee" + ], + "data": "0x", + "logIndex": 14, + "blockHash": "0x6c7d843e0cdee29270d39b2e4833253e6a88e18a830812ef9c0a3b30b3e26e82" + } + ], + "blockNumber": 10537890, + "cumulativeGasUsed": "1371968", + "status": 1, + "byzantium": true + }, + "args": ["0x08Cf9d51df988F1E69174D22b7f93f97e1aAEbeE"], + "numDeployments": 1, + "bytecode": "0x6080604052348015600f57600080fd5b50604051610b09380380610b09833981016040819052602c91608a565b80603481603a565b505060b8565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600060208284031215609b57600080fd5b81516001600160a01b038116811460b157600080fd5b9392505050565b610a42806100c76000396000f3fe60806040526004361061007b5760003560e01c80639623609d1161004e5780639623609d1461012b57806399a88ec41461013e578063f2fde38b1461015e578063f3b7dead1461017e57600080fd5b8063204e1c7a14610080578063715018a6146100c95780637eff275e146100e05780638da5cb5b14610100575b600080fd5b34801561008c57600080fd5b506100a061009b3660046107e4565b61019e565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b3480156100d557600080fd5b506100de610255565b005b3480156100ec57600080fd5b506100de6100fb366004610808565b6102e7565b34801561010c57600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff166100a0565b6100de610139366004610870565b6103ee565b34801561014a57600080fd5b506100de610159366004610808565b6104fc565b34801561016a57600080fd5b506100de6101793660046107e4565b6105d1565b34801561018a57600080fd5b506100a06101993660046107e4565b610701565b60008060008373ffffffffffffffffffffffffffffffffffffffff166040516101ea907f5c60da1b00000000000000000000000000000000000000000000000000000000815260040190565b600060405180830381855afa9150503d8060008114610225576040519150601f19603f3d011682016040523d82523d6000602084013e61022a565b606091505b50915091508161023957600080fd5b8080602001905181019061024d9190610964565b949350505050565b60005473ffffffffffffffffffffffffffffffffffffffff1633146102db576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b6102e5600061074d565b565b60005473ffffffffffffffffffffffffffffffffffffffff163314610368576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102d2565b6040517f8f28397000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8281166004830152831690638f283970906024015b600060405180830381600087803b1580156103d257600080fd5b505af11580156103e6573d6000803e3d6000fd5b505050505050565b60005473ffffffffffffffffffffffffffffffffffffffff16331461046f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102d2565b6040517f4f1ef28600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff841690634f1ef2869034906104c59086908690600401610981565b6000604051808303818588803b1580156104de57600080fd5b505af11580156104f2573d6000803e3d6000fd5b5050505050505050565b60005473ffffffffffffffffffffffffffffffffffffffff16331461057d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102d2565b6040517f3659cfe600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8281166004830152831690633659cfe6906024016103b8565b60005473ffffffffffffffffffffffffffffffffffffffff163314610652576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102d2565b73ffffffffffffffffffffffffffffffffffffffff81166106f5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016102d2565b6106fe8161074d565b50565b60008060008373ffffffffffffffffffffffffffffffffffffffff166040516101ea907ff851a44000000000000000000000000000000000000000000000000000000000815260040190565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b73ffffffffffffffffffffffffffffffffffffffff811681146106fe57600080fd5b6000602082840312156107f657600080fd5b8135610801816107c2565b9392505050565b6000806040838503121561081b57600080fd5b8235610826816107c2565b91506020830135610836816107c2565b809150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60008060006060848603121561088557600080fd5b8335610890816107c2565b925060208401356108a0816107c2565b9150604084013567ffffffffffffffff808211156108bd57600080fd5b818601915086601f8301126108d157600080fd5b8135818111156108e3576108e3610841565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810190838211818310171561092957610929610841565b8160405282815289602084870101111561094257600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b60006020828403121561097657600080fd5b8151610801816107c2565b73ffffffffffffffffffffffffffffffffffffffff831681526000602060406020840152835180604085015260005b818110156109cc578581018301518582016060015282016109b0565b5060006060828601015260607fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010192505050939250505056fea2646970667358221220c8b87e24bc510b348206f64f4e9e1d933af610bf37c2ebe141148cb2bdd2610264736f6c63430008190033", + "deployedBytecode": "0x60806040526004361061007b5760003560e01c80639623609d1161004e5780639623609d1461012b57806399a88ec41461013e578063f2fde38b1461015e578063f3b7dead1461017e57600080fd5b8063204e1c7a14610080578063715018a6146100c95780637eff275e146100e05780638da5cb5b14610100575b600080fd5b34801561008c57600080fd5b506100a061009b3660046107e4565b61019e565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b3480156100d557600080fd5b506100de610255565b005b3480156100ec57600080fd5b506100de6100fb366004610808565b6102e7565b34801561010c57600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff166100a0565b6100de610139366004610870565b6103ee565b34801561014a57600080fd5b506100de610159366004610808565b6104fc565b34801561016a57600080fd5b506100de6101793660046107e4565b6105d1565b34801561018a57600080fd5b506100a06101993660046107e4565b610701565b60008060008373ffffffffffffffffffffffffffffffffffffffff166040516101ea907f5c60da1b00000000000000000000000000000000000000000000000000000000815260040190565b600060405180830381855afa9150503d8060008114610225576040519150601f19603f3d011682016040523d82523d6000602084013e61022a565b606091505b50915091508161023957600080fd5b8080602001905181019061024d9190610964565b949350505050565b60005473ffffffffffffffffffffffffffffffffffffffff1633146102db576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b6102e5600061074d565b565b60005473ffffffffffffffffffffffffffffffffffffffff163314610368576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102d2565b6040517f8f28397000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8281166004830152831690638f283970906024015b600060405180830381600087803b1580156103d257600080fd5b505af11580156103e6573d6000803e3d6000fd5b505050505050565b60005473ffffffffffffffffffffffffffffffffffffffff16331461046f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102d2565b6040517f4f1ef28600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff841690634f1ef2869034906104c59086908690600401610981565b6000604051808303818588803b1580156104de57600080fd5b505af11580156104f2573d6000803e3d6000fd5b5050505050505050565b60005473ffffffffffffffffffffffffffffffffffffffff16331461057d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102d2565b6040517f3659cfe600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8281166004830152831690633659cfe6906024016103b8565b60005473ffffffffffffffffffffffffffffffffffffffff163314610652576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102d2565b73ffffffffffffffffffffffffffffffffffffffff81166106f5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016102d2565b6106fe8161074d565b50565b60008060008373ffffffffffffffffffffffffffffffffffffffff166040516101ea907ff851a44000000000000000000000000000000000000000000000000000000000815260040190565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b73ffffffffffffffffffffffffffffffffffffffff811681146106fe57600080fd5b6000602082840312156107f657600080fd5b8135610801816107c2565b9392505050565b6000806040838503121561081b57600080fd5b8235610826816107c2565b91506020830135610836816107c2565b809150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60008060006060848603121561088557600080fd5b8335610890816107c2565b925060208401356108a0816107c2565b9150604084013567ffffffffffffffff808211156108bd57600080fd5b818601915086601f8301126108d157600080fd5b8135818111156108e3576108e3610841565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810190838211818310171561092957610929610841565b8160405282815289602084870101111561094257600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b60006020828403121561097657600080fd5b8151610801816107c2565b73ffffffffffffffffffffffffffffffffffffffff831681526000602060406020840152835180604085015260005b818110156109cc578581018301518582016060015282016109b0565b5060006060828601015260607fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010192505050939250505056fea2646970667358221220c8b87e24bc510b348206f64f4e9e1d933af610bf37c2ebe141148cb2bdd2610264736f6c63430008190033" +} diff --git a/deployments/berachainbartio/FastTrackTimelock.json b/deployments/berachainbartio/FastTrackTimelock.json new file mode 100644 index 00000000..214a850a --- /dev/null +++ b/deployments/berachainbartio/FastTrackTimelock.json @@ -0,0 +1,691 @@ +{ + "address": "0x2aae1073B2219729Ff8e5952887905A8da498062", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "admin_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "delay_", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "ZeroAddressNotAllowed", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "txHash", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "signature", + "type": "string" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "eta", + "type": "uint256" + } + ], + "name": "CancelTransaction", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "txHash", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "signature", + "type": "string" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "eta", + "type": "uint256" + } + ], + "name": "ExecuteTransaction", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldAdmin", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "NewAdmin", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "oldDelay", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "newDelay", + "type": "uint256" + } + ], + "name": "NewDelay", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "newPendingAdmin", + "type": "address" + } + ], + "name": "NewPendingAdmin", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "txHash", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "signature", + "type": "string" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "eta", + "type": "uint256" + } + ], + "name": "QueueTransaction", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "GRACE_PERIOD", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MAXIMUM_DELAY", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MINIMUM_DELAY", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "acceptAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "admin", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "string", + "name": "signature", + "type": "string" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "eta", + "type": "uint256" + } + ], + "name": "cancelTransaction", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "delay", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "string", + "name": "signature", + "type": "string" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "eta", + "type": "uint256" + } + ], + "name": "executeTransaction", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "pendingAdmin", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "string", + "name": "signature", + "type": "string" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "eta", + "type": "uint256" + } + ], + "name": "queueTransaction", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "queuedTransactions", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "delay_", + "type": "uint256" + } + ], + "name": "setDelay", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "pendingAdmin_", + "type": "address" + } + ], + "name": "setPendingAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0xb016a4daf23bd92d5eef1d92d4d293bcb9292f20216553ab975d3a4e71c2f5b3", + "receipt": { + "to": null, + "from": "0x18BDb05DD1A95677f4381cfb4db52D342dF5C00d", + "contractAddress": "0x2aae1073B2219729Ff8e5952887905A8da498062", + "transactionIndex": 5, + "gasUsed": "1178195", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x3c586611af38632a7961754c578bbf4451e8af32432af0f36cb9937f4c279527", + "transactionHash": "0xb016a4daf23bd92d5eef1d92d4d293bcb9292f20216553ab975d3a4e71c2f5b3", + "logs": [], + "blockNumber": 10537773, + "cumulativeGasUsed": "1393354", + "status": 1, + "byzantium": true + }, + "args": ["0xc80E4112940efF40c8626bAc0D8E79cB7dAbe289", 300], + "numDeployments": 1, + "solcInputHash": "dd255b4e0156dfc73554b72a83ca02d8", + "metadata": "{\"compiler\":{\"version\":\"0.8.25+commit.b61c2a91\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"delay_\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"ZeroAddressNotAllowed\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"txHash\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"signature\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"eta\",\"type\":\"uint256\"}],\"name\":\"CancelTransaction\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"txHash\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"signature\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"eta\",\"type\":\"uint256\"}],\"name\":\"ExecuteTransaction\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"oldAdmin\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"NewAdmin\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"oldDelay\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"newDelay\",\"type\":\"uint256\"}],\"name\":\"NewDelay\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newPendingAdmin\",\"type\":\"address\"}],\"name\":\"NewPendingAdmin\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"txHash\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"signature\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"eta\",\"type\":\"uint256\"}],\"name\":\"QueueTransaction\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"GRACE_PERIOD\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAXIMUM_DELAY\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MINIMUM_DELAY\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"acceptAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"signature\",\"type\":\"string\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"eta\",\"type\":\"uint256\"}],\"name\":\"cancelTransaction\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"delay\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"signature\",\"type\":\"string\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"eta\",\"type\":\"uint256\"}],\"name\":\"executeTransaction\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pendingAdmin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"signature\",\"type\":\"string\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"eta\",\"type\":\"uint256\"}],\"name\":\"queueTransaction\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"queuedTransactions\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"delay_\",\"type\":\"uint256\"}],\"name\":\"setDelay\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"pendingAdmin_\",\"type\":\"address\"}],\"name\":\"setPendingAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Venus\",\"kind\":\"dev\",\"methods\":{\"GRACE_PERIOD()\":{\"returns\":{\"_0\":\"The duration of the grace period, specified as a uint256 value.\"}},\"MAXIMUM_DELAY()\":{\"returns\":{\"_0\":\"Maximum delay\"}},\"MINIMUM_DELAY()\":{\"returns\":{\"_0\":\"Minimum delay\"}},\"acceptAdmin()\":{\"custom:access\":\"Sender must be pending admin\",\"custom:event\":\"Emit NewAdmin with old and new admin\"},\"cancelTransaction(address,uint256,string,bytes,uint256)\":{\"custom:access\":\"Sender must be admin\",\"custom:event\":\"Emit CancelTransaction\",\"params\":{\"data\":\"Arguments to be passed to the function when called\",\"eta\":\"Timestamp after which the transaction can be executed\",\"signature\":\"Signature of the function to be called\",\"target\":\"Address of the contract with the method to be called\",\"value\":\"Native token amount sent with the transaction\"}},\"executeTransaction(address,uint256,string,bytes,uint256)\":{\"custom:access\":\"Sender must be admin\",\"custom:event\":\"Emit ExecuteTransaction\",\"params\":{\"data\":\"Arguments to be passed to the function when called\",\"eta\":\"Timestamp after which the transaction can be executed\",\"signature\":\"Signature of the function to be called\",\"target\":\"Address of the contract with the method to be called\",\"value\":\"Native token amount sent with the transaction\"},\"returns\":{\"_0\":\"Result of function call\"}},\"queueTransaction(address,uint256,string,bytes,uint256)\":{\"custom:access\":\"Sender must be admin\",\"custom:event\":\"Emit QueueTransaction\",\"params\":{\"data\":\"Arguments to be passed to the function when called\",\"eta\":\"Timestamp after which the transaction can be executed\",\"signature\":\"Signature of the function to be called\",\"target\":\"Address of the contract with the method to be called\",\"value\":\"Native token amount sent with the transaction\"},\"returns\":{\"_0\":\"Hash of the queued transaction\"}},\"setDelay(uint256)\":{\"custom:access\":\"Sender must be Timelock itself\",\"custom:event\":\"Emit NewDelay with old and new delay\",\"params\":{\"delay_\":\"The new delay period for the transaction queue\"}},\"setPendingAdmin(address)\":{\"custom:access\":\"Sender must be Timelock contract itself or admin\",\"custom:event\":\"Emit NewPendingAdmin with new pending admin\",\"params\":{\"pendingAdmin_\":\"Address of the proposed admin\"}}},\"title\":\"TimelockV8\",\"version\":1},\"userdoc\":{\"errors\":{\"ZeroAddressNotAllowed()\":[{\"notice\":\"Thrown if the supplied address is a zero address where it is not allowed\"}]},\"events\":{\"CancelTransaction(bytes32,address,uint256,string,bytes,uint256)\":{\"notice\":\"Event emitted when a proposal transaction has been cancelled\"},\"ExecuteTransaction(bytes32,address,uint256,string,bytes,uint256)\":{\"notice\":\"Event emitted when a proposal transaction has been executed\"},\"NewAdmin(address,address)\":{\"notice\":\"Event emitted when a new admin is accepted\"},\"NewDelay(uint256,uint256)\":{\"notice\":\"Event emitted when a new delay is proposed\"},\"NewPendingAdmin(address)\":{\"notice\":\"Event emitted when a new admin is proposed\"},\"QueueTransaction(bytes32,address,uint256,string,bytes,uint256)\":{\"notice\":\"Event emitted when a proposal transaction has been queued\"}},\"kind\":\"user\",\"methods\":{\"GRACE_PERIOD()\":{\"notice\":\"Return grace period\"},\"MAXIMUM_DELAY()\":{\"notice\":\"Return required maximum delay\"},\"MINIMUM_DELAY()\":{\"notice\":\"Return required minimum delay\"},\"acceptAdmin()\":{\"notice\":\"Method for accepting a proposed admin\"},\"admin()\":{\"notice\":\"Timelock admin authorized to queue and execute transactions\"},\"cancelTransaction(address,uint256,string,bytes,uint256)\":{\"notice\":\"Called to cancel a queued transaction\"},\"delay()\":{\"notice\":\"Period for a proposal transaction to be queued\"},\"executeTransaction(address,uint256,string,bytes,uint256)\":{\"notice\":\"Called to execute a queued transaction\"},\"pendingAdmin()\":{\"notice\":\"Account proposed as the next admin\"},\"queueTransaction(address,uint256,string,bytes,uint256)\":{\"notice\":\"Called for each action when queuing a proposal\"},\"queuedTransactions(bytes32)\":{\"notice\":\"Mapping of queued transactions\"},\"setDelay(uint256)\":{\"notice\":\"Setter for the transaction queue delay\"},\"setPendingAdmin(address)\":{\"notice\":\"Method to propose a new admin authorized to call timelock functions. This should be the Governor Contract\"}},\"notice\":\"The Timelock contract using solidity V8. This contract also differs from the original timelock because it has a virtual function to get minimum delays and allow test deployments to override the value.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/Governance/TimelockV8.sol\":\"TimelockV8\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"@venusprotocol/solidity-utilities/contracts/validators.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.25;\\n\\n/// @notice Thrown if the supplied address is a zero address where it is not allowed\\nerror ZeroAddressNotAllowed();\\n\\n/// @notice Thrown if the supplied value is 0 where it is not allowed\\nerror ZeroValueNotAllowed();\\n\\n/// @notice Checks if the provided address is nonzero, reverts otherwise\\n/// @param address_ Address to check\\n/// @custom:error ZeroAddressNotAllowed is thrown if the provided address is a zero address\\nfunction ensureNonzeroAddress(address address_) pure {\\n if (address_ == address(0)) {\\n revert ZeroAddressNotAllowed();\\n }\\n}\\n\\n/// @notice Checks if the provided value is nonzero, reverts otherwise\\n/// @param value_ Value to check\\n/// @custom:error ZeroValueNotAllowed is thrown if the provided value is 0\\nfunction ensureNonzeroValue(uint256 value_) pure {\\n if (value_ == 0) {\\n revert ZeroValueNotAllowed();\\n }\\n}\\n\",\"keccak256\":\"0xdb88e14d50dd21889ca3329d755673d022c47e8da005b6a545c7f69c2c4b7b86\",\"license\":\"BSD-3-Clause\"},\"contracts/Governance/TimelockV8.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.25;\\nimport { ensureNonzeroAddress } from \\\"@venusprotocol/solidity-utilities/contracts/validators.sol\\\";\\n\\n/**\\n * @title TimelockV8\\n * @author Venus\\n * @notice The Timelock contract using solidity V8.\\n * This contract also differs from the original timelock because it has a virtual function to get minimum delays\\n * and allow test deployments to override the value.\\n */\\ncontract TimelockV8 {\\n /// @notice Required period to execute a proposal transaction\\n uint256 private constant DEFAULT_GRACE_PERIOD = 14 days;\\n\\n /// @notice Minimum amount of time a proposal transaction must be queued\\n uint256 private constant DEFAULT_MINIMUM_DELAY = 1 seconds;\\n\\n /// @notice Maximum amount of time a proposal transaction must be queued\\n uint256 private constant DEFAULT_MAXIMUM_DELAY = 30 days;\\n\\n /// @notice Timelock admin authorized to queue and execute transactions\\n address public admin;\\n\\n /// @notice Account proposed as the next admin\\n address public pendingAdmin;\\n\\n /// @notice Period for a proposal transaction to be queued\\n uint256 public delay;\\n\\n /// @notice Mapping of queued transactions\\n mapping(bytes32 => bool) public queuedTransactions;\\n\\n /// @notice Event emitted when a new admin is accepted\\n event NewAdmin(address indexed oldAdmin, address indexed newAdmin);\\n\\n /// @notice Event emitted when a new admin is proposed\\n event NewPendingAdmin(address indexed newPendingAdmin);\\n\\n /// @notice Event emitted when a new delay is proposed\\n event NewDelay(uint256 indexed oldDelay, uint256 indexed newDelay);\\n\\n /// @notice Event emitted when a proposal transaction has been cancelled\\n event CancelTransaction(\\n bytes32 indexed txHash,\\n address indexed target,\\n uint256 value,\\n string signature,\\n bytes data,\\n uint256 eta\\n );\\n\\n /// @notice Event emitted when a proposal transaction has been executed\\n event ExecuteTransaction(\\n bytes32 indexed txHash,\\n address indexed target,\\n uint256 value,\\n string signature,\\n bytes data,\\n uint256 eta\\n );\\n\\n /// @notice Event emitted when a proposal transaction has been queued\\n event QueueTransaction(\\n bytes32 indexed txHash,\\n address indexed target,\\n uint256 value,\\n string signature,\\n bytes data,\\n uint256 eta\\n );\\n\\n constructor(address admin_, uint256 delay_) {\\n require(delay_ >= MINIMUM_DELAY(), \\\"Timelock::constructor: Delay must exceed minimum delay.\\\");\\n require(delay_ <= MAXIMUM_DELAY(), \\\"Timelock::setDelay: Delay must not exceed maximum delay.\\\");\\n ensureNonzeroAddress(admin_);\\n\\n admin = admin_;\\n delay = delay_;\\n }\\n\\n fallback() external payable {}\\n\\n /**\\n * @notice Setter for the transaction queue delay\\n * @param delay_ The new delay period for the transaction queue\\n * @custom:access Sender must be Timelock itself\\n * @custom:event Emit NewDelay with old and new delay\\n */\\n function setDelay(uint256 delay_) public {\\n require(msg.sender == address(this), \\\"Timelock::setDelay: Call must come from Timelock.\\\");\\n require(delay_ >= MINIMUM_DELAY(), \\\"Timelock::setDelay: Delay must exceed minimum delay.\\\");\\n require(delay_ <= MAXIMUM_DELAY(), \\\"Timelock::setDelay: Delay must not exceed maximum delay.\\\");\\n emit NewDelay(delay, delay_);\\n delay = delay_;\\n }\\n\\n /**\\n * @notice Return grace period\\n * @return The duration of the grace period, specified as a uint256 value.\\n */\\n function GRACE_PERIOD() public view virtual returns (uint256) {\\n return DEFAULT_GRACE_PERIOD;\\n }\\n\\n /**\\n * @notice Return required minimum delay\\n * @return Minimum delay\\n */\\n function MINIMUM_DELAY() public view virtual returns (uint256) {\\n return DEFAULT_MINIMUM_DELAY;\\n }\\n\\n /**\\n * @notice Return required maximum delay\\n * @return Maximum delay\\n */\\n function MAXIMUM_DELAY() public view virtual returns (uint256) {\\n return DEFAULT_MAXIMUM_DELAY;\\n }\\n\\n /**\\n * @notice Method for accepting a proposed admin\\n * @custom:access Sender must be pending admin\\n * @custom:event Emit NewAdmin with old and new admin\\n */\\n function acceptAdmin() public {\\n require(msg.sender == pendingAdmin, \\\"Timelock::acceptAdmin: Call must come from pendingAdmin.\\\");\\n emit NewAdmin(admin, msg.sender);\\n admin = msg.sender;\\n pendingAdmin = address(0);\\n }\\n\\n /**\\n * @notice Method to propose a new admin authorized to call timelock functions. This should be the Governor Contract\\n * @param pendingAdmin_ Address of the proposed admin\\n * @custom:access Sender must be Timelock contract itself or admin\\n * @custom:event Emit NewPendingAdmin with new pending admin\\n */\\n function setPendingAdmin(address pendingAdmin_) public {\\n require(\\n msg.sender == address(this) || msg.sender == admin,\\n \\\"Timelock::setPendingAdmin: Call must come from Timelock.\\\"\\n );\\n ensureNonzeroAddress(pendingAdmin_);\\n pendingAdmin = pendingAdmin_;\\n\\n emit NewPendingAdmin(pendingAdmin);\\n }\\n\\n /**\\n * @notice Called for each action when queuing a proposal\\n * @param target Address of the contract with the method to be called\\n * @param value Native token amount sent with the transaction\\n * @param signature Signature of the function to be called\\n * @param data Arguments to be passed to the function when called\\n * @param eta Timestamp after which the transaction can be executed\\n * @return Hash of the queued transaction\\n * @custom:access Sender must be admin\\n * @custom:event Emit QueueTransaction\\n */\\n function queueTransaction(\\n address target,\\n uint256 value,\\n string calldata signature,\\n bytes calldata data,\\n uint256 eta\\n ) public returns (bytes32) {\\n require(msg.sender == admin, \\\"Timelock::queueTransaction: Call must come from admin.\\\");\\n require(\\n eta >= getBlockTimestamp() + delay,\\n \\\"Timelock::queueTransaction: Estimated execution block must satisfy delay.\\\"\\n );\\n\\n bytes32 txHash = keccak256(abi.encode(target, value, signature, data, eta));\\n require(!queuedTransactions[txHash], \\\"Timelock::queueTransaction: transaction already queued.\\\");\\n queuedTransactions[txHash] = true;\\n\\n emit QueueTransaction(txHash, target, value, signature, data, eta);\\n return txHash;\\n }\\n\\n /**\\n * @notice Called to cancel a queued transaction\\n * @param target Address of the contract with the method to be called\\n * @param value Native token amount sent with the transaction\\n * @param signature Signature of the function to be called\\n * @param data Arguments to be passed to the function when called\\n * @param eta Timestamp after which the transaction can be executed\\n * @custom:access Sender must be admin\\n * @custom:event Emit CancelTransaction\\n */\\n function cancelTransaction(\\n address target,\\n uint256 value,\\n string calldata signature,\\n bytes calldata data,\\n uint256 eta\\n ) public {\\n require(msg.sender == admin, \\\"Timelock::cancelTransaction: Call must come from admin.\\\");\\n\\n bytes32 txHash = keccak256(abi.encode(target, value, signature, data, eta));\\n require(queuedTransactions[txHash], \\\"Timelock::cancelTransaction: transaction is not queued yet.\\\");\\n delete (queuedTransactions[txHash]);\\n\\n emit CancelTransaction(txHash, target, value, signature, data, eta);\\n }\\n\\n /**\\n * @notice Called to execute a queued transaction\\n * @param target Address of the contract with the method to be called\\n * @param value Native token amount sent with the transaction\\n * @param signature Signature of the function to be called\\n * @param data Arguments to be passed to the function when called\\n * @param eta Timestamp after which the transaction can be executed\\n * @return Result of function call\\n * @custom:access Sender must be admin\\n * @custom:event Emit ExecuteTransaction\\n */\\n function executeTransaction(\\n address target,\\n uint256 value,\\n string calldata signature,\\n bytes calldata data,\\n uint256 eta\\n ) public returns (bytes memory) {\\n require(msg.sender == admin, \\\"Timelock::executeTransaction: Call must come from admin.\\\");\\n\\n bytes32 txHash = keccak256(abi.encode(target, value, signature, data, eta));\\n require(queuedTransactions[txHash], \\\"Timelock::executeTransaction: Transaction hasn't been queued.\\\");\\n require(getBlockTimestamp() >= eta, \\\"Timelock::executeTransaction: Transaction hasn't surpassed time lock.\\\");\\n require(getBlockTimestamp() <= eta + GRACE_PERIOD(), \\\"Timelock::executeTransaction: Transaction is stale.\\\");\\n\\n delete (queuedTransactions[txHash]);\\n\\n bytes memory callData;\\n\\n if (bytes(signature).length == 0) {\\n callData = data;\\n } else {\\n callData = abi.encodePacked(bytes4(keccak256(bytes(signature))), data);\\n }\\n\\n // solium-disable-next-line security/no-call-value\\n (bool success, bytes memory returnData) = target.call{ value: value }(callData);\\n require(success, \\\"Timelock::executeTransaction: Transaction execution reverted.\\\");\\n\\n emit ExecuteTransaction(txHash, target, value, signature, data, eta);\\n\\n return returnData;\\n }\\n\\n /**\\n * @notice Returns the current block timestamp\\n * @return The current block timestamp\\n */\\n function getBlockTimestamp() internal view returns (uint256) {\\n // solium-disable-next-line security/no-block-members\\n return block.timestamp;\\n }\\n}\\n\",\"keccak256\":\"0xaf1af48a0bb1ad0391a95270b934bcd30a0326f6e5ba415c581503807e689b45\",\"license\":\"BSD-3-Clause\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b5060405161154038038061154083398101604081905261002f91610180565b60018110156100ab5760405162461bcd60e51b815260206004820152603760248201527f54696d656c6f636b3a3a636f6e7374727563746f723a2044656c6179206d757360448201527f7420657863656564206d696e696d756d2064656c61792e00000000000000000060648201526084015b60405180910390fd5b62278d008111156101245760405162461bcd60e51b815260206004820152603860248201527f54696d656c6f636b3a3a73657444656c61793a2044656c6179206d757374206e60448201527f6f7420657863656564206d6178696d756d2064656c61792e000000000000000060648201526084016100a2565b61012d82610156565b600080546001600160a01b0319166001600160a01b0393909316929092179091556002556101ba565b6001600160a01b03811661017d576040516342bcdf7f60e11b815260040160405180910390fd5b50565b6000806040838503121561019357600080fd5b82516001600160a01b03811681146101aa57600080fd5b6020939093015192949293505050565b611377806101c96000396000f3fe6080604052600436106100c95760003560e01c80636a42b8f811610079578063c1a287e211610056578063c1a287e214610216578063e177246e1461022c578063f2b065371461024c578063f851a4401461028c57005b80636a42b8f8146101d65780637d645fab146101ec578063b1b43ae51461020257005b80633a66f901116100a75780633a66f901146101685780634dd18bf514610196578063591fcdfe146101b657005b80630825f38f146100cb5780630e18b681146101015780632678224714610116575b005b3480156100d757600080fd5b506100eb6100e636600461106e565b6102b9565b6040516100f89190611125565b60405180910390f35b34801561010d57600080fd5b506100c9610749565b34801561012257600080fd5b506001546101439073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100f8565b34801561017457600080fd5b5061018861018336600461106e565b610853565b6040519081526020016100f8565b3480156101a257600080fd5b506100c96101b1366004611176565b610b03565b3480156101c257600080fd5b506100c96101d136600461106e565b610c12565b3480156101e257600080fd5b5061018860025481565b3480156101f857600080fd5b5062278d00610188565b34801561020e57600080fd5b506001610188565b34801561022257600080fd5b5062127500610188565b34801561023857600080fd5b506100c9610247366004611198565b610e13565b34801561025857600080fd5b5061027c610267366004611198565b60036020526000908152604090205460ff1681565b60405190151581526020016100f8565b34801561029857600080fd5b506000546101439073ffffffffffffffffffffffffffffffffffffffff1681565b60005460609073ffffffffffffffffffffffffffffffffffffffff16331461034e5760405162461bcd60e51b815260206004820152603860248201527f54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a20436160448201527f6c6c206d75737420636f6d652066726f6d2061646d696e2e000000000000000060648201526084015b60405180910390fd5b60008888888888888860405160200161036d97969594939291906111fa565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291815281516020928301206000818152600390935291205490915060ff166104285760405162461bcd60e51b815260206004820152603d60248201527f54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a20547260448201527f616e73616374696f6e206861736e2774206265656e207175657565642e0000006064820152608401610345565b824210156104c45760405162461bcd60e51b815260206004820152604560248201527f54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a20547260448201527f616e73616374696f6e206861736e2774207375727061737365642074696d652060648201527f6c6f636b2e000000000000000000000000000000000000000000000000000000608482015260a401610345565b6104d16212750084611258565b4211156105465760405162461bcd60e51b815260206004820152603360248201527f54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a20547260448201527f616e73616374696f6e206973207374616c652e000000000000000000000000006064820152608401610345565b600081815260036020526040812080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690556060908790036105c35785858080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509293506105fe92505050565b87876040516105d3929190611298565b6040519081900381206105ec91889088906020016112a8565b60405160208183030381529060405290505b6000808b73ffffffffffffffffffffffffffffffffffffffff168b8460405161062791906112e4565b60006040518083038185875af1925050503d8060008114610664576040519150601f19603f3d011682016040523d82523d6000602084013e610669565b606091505b5091509150816106e15760405162461bcd60e51b815260206004820152603d60248201527f54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a20547260448201527f616e73616374696f6e20657865637574696f6e2072657665727465642e0000006064820152608401610345565b8b73ffffffffffffffffffffffffffffffffffffffff16847fa560e3198060a2f10670c1ec5b403077ea6ae93ca8de1c32b451dc1a943cd6e78d8d8d8d8d8d60405161073296959493929190611300565b60405180910390a39b9a5050505050505050505050565b60015473ffffffffffffffffffffffffffffffffffffffff1633146107d65760405162461bcd60e51b815260206004820152603860248201527f54696d656c6f636b3a3a61636365707441646d696e3a2043616c6c206d75737460448201527f20636f6d652066726f6d2070656e64696e6741646d696e2e00000000000000006064820152608401610345565b60008054604051339273ffffffffffffffffffffffffffffffffffffffff909216917ff9ffabca9c8276e99321725bcb43fb076a6c66a54b7f21c4e8146d8519b417dc91a3600080547fffffffffffffffffffffffff00000000000000000000000000000000000000009081163317909155600180549091169055565b6000805473ffffffffffffffffffffffffffffffffffffffff1633146108e15760405162461bcd60e51b815260206004820152603660248201527f54696d656c6f636b3a3a71756575655472616e73616374696f6e3a2043616c6c60448201527f206d75737420636f6d652066726f6d2061646d696e2e000000000000000000006064820152608401610345565b6002546108ee9042611258565b8210156109895760405162461bcd60e51b815260206004820152604960248201527f54696d656c6f636b3a3a71756575655472616e73616374696f6e3a204573746960448201527f6d6174656420657865637574696f6e20626c6f636b206d75737420736174697360648201527f66792064656c61792e0000000000000000000000000000000000000000000000608482015260a401610345565b6000888888888888886040516020016109a897969594939291906111fa565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291815281516020928301206000818152600390935291205490915060ff1615610a645760405162461bcd60e51b815260206004820152603760248201527f54696d656c6f636b3a3a71756575655472616e73616374696f6e3a207472616e60448201527f73616374696f6e20616c7265616479207175657565642e0000000000000000006064820152608401610345565b6000818152600360205260409081902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555173ffffffffffffffffffffffffffffffffffffffff8a169082907f76e2796dc3a81d57b0e8504b647febcbeeb5f4af818e164f11eef8131a6a763f90610aef908c908c908c908c908c908c90611300565b60405180910390a398975050505050505050565b33301480610b28575060005473ffffffffffffffffffffffffffffffffffffffff1633145b610b9a5760405162461bcd60e51b815260206004820152603860248201527f54696d656c6f636b3a3a73657450656e64696e6741646d696e3a2043616c6c2060448201527f6d75737420636f6d652066726f6d2054696d656c6f636b2e00000000000000006064820152608401610345565b610ba381610fac565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040517f69d78e38a01985fbb1462961809b4b2d65531bc93b2b94037f3334b82ca4a75690600090a250565b60005473ffffffffffffffffffffffffffffffffffffffff163314610c9f5760405162461bcd60e51b815260206004820152603760248201527f54696d656c6f636b3a3a63616e63656c5472616e73616374696f6e3a2043616c60448201527f6c206d75737420636f6d652066726f6d2061646d696e2e0000000000000000006064820152608401610345565b600087878787878787604051602001610cbe97969594939291906111fa565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291815281516020928301206000818152600390935291205490915060ff16610d795760405162461bcd60e51b815260206004820152603b60248201527f54696d656c6f636b3a3a63616e63656c5472616e73616374696f6e3a2074726160448201527f6e73616374696f6e206973206e6f7420717565756564207965742e00000000006064820152608401610345565b6000818152600360205260409081902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690555173ffffffffffffffffffffffffffffffffffffffff89169082907f2fffc091a501fd91bfbff27141450d3acb40fb8e6d8382b243ec7a812a3aaf8790610e01908b908b908b908b908b908b90611300565b60405180910390a35050505050505050565b333014610e885760405162461bcd60e51b815260206004820152603160248201527f54696d656c6f636b3a3a73657444656c61793a2043616c6c206d75737420636f60448201527f6d652066726f6d2054696d656c6f636b2e0000000000000000000000000000006064820152608401610345565b6001811015610eff5760405162461bcd60e51b815260206004820152603460248201527f54696d656c6f636b3a3a73657444656c61793a2044656c6179206d757374206560448201527f7863656564206d696e696d756d2064656c61792e0000000000000000000000006064820152608401610345565b62278d00811115610f785760405162461bcd60e51b815260206004820152603860248201527f54696d656c6f636b3a3a73657444656c61793a2044656c6179206d757374206e60448201527f6f7420657863656564206d6178696d756d2064656c61792e00000000000000006064820152608401610345565b6002546040518291907fed0229422af39d4d7d33f7a27d31d6f5cb20ec628293da58dd6e8a528ed466be90600090a3600255565b73ffffffffffffffffffffffffffffffffffffffff8116610ff9576040517f8579befe00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50565b803573ffffffffffffffffffffffffffffffffffffffff8116811461102057600080fd5b919050565b60008083601f84011261103757600080fd5b50813567ffffffffffffffff81111561104f57600080fd5b60208301915083602082850101111561106757600080fd5b9250929050565b600080600080600080600060a0888a03121561108957600080fd5b61109288610ffc565b965060208801359550604088013567ffffffffffffffff808211156110b657600080fd5b6110c28b838c01611025565b909750955060608a01359150808211156110db57600080fd5b506110e88a828b01611025565b989b979a50959894979596608090950135949350505050565b60005b8381101561111c578181015183820152602001611104565b50506000910152565b6020815260008251806020840152611144816040850160208701611101565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b60006020828403121561118857600080fd5b61119182610ffc565b9392505050565b6000602082840312156111aa57600080fd5b5035919050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b73ffffffffffffffffffffffffffffffffffffffff8816815286602082015260a06040820152600061123060a0830187896111b1565b82810360608401526112438186886111b1565b91505082608083015298975050505050505050565b80820180821115611292577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b92915050565b8183823760009101908152919050565b7fffffffff0000000000000000000000000000000000000000000000000000000084168152818360048301376000910160040190815292915050565b600082516112f6818460208701611101565b9190910192915050565b86815260806020820152600061131a6080830187896111b1565b828103604084015261132d8186886111b1565b91505082606083015297965050505050505056fea2646970667358221220107bb03227edc1c6f85b8373dcceaab44e4dfeb00d413bf48275c2b4e4a1dd8a64736f6c63430008190033", + "deployedBytecode": "0x6080604052600436106100c95760003560e01c80636a42b8f811610079578063c1a287e211610056578063c1a287e214610216578063e177246e1461022c578063f2b065371461024c578063f851a4401461028c57005b80636a42b8f8146101d65780637d645fab146101ec578063b1b43ae51461020257005b80633a66f901116100a75780633a66f901146101685780634dd18bf514610196578063591fcdfe146101b657005b80630825f38f146100cb5780630e18b681146101015780632678224714610116575b005b3480156100d757600080fd5b506100eb6100e636600461106e565b6102b9565b6040516100f89190611125565b60405180910390f35b34801561010d57600080fd5b506100c9610749565b34801561012257600080fd5b506001546101439073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100f8565b34801561017457600080fd5b5061018861018336600461106e565b610853565b6040519081526020016100f8565b3480156101a257600080fd5b506100c96101b1366004611176565b610b03565b3480156101c257600080fd5b506100c96101d136600461106e565b610c12565b3480156101e257600080fd5b5061018860025481565b3480156101f857600080fd5b5062278d00610188565b34801561020e57600080fd5b506001610188565b34801561022257600080fd5b5062127500610188565b34801561023857600080fd5b506100c9610247366004611198565b610e13565b34801561025857600080fd5b5061027c610267366004611198565b60036020526000908152604090205460ff1681565b60405190151581526020016100f8565b34801561029857600080fd5b506000546101439073ffffffffffffffffffffffffffffffffffffffff1681565b60005460609073ffffffffffffffffffffffffffffffffffffffff16331461034e5760405162461bcd60e51b815260206004820152603860248201527f54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a20436160448201527f6c6c206d75737420636f6d652066726f6d2061646d696e2e000000000000000060648201526084015b60405180910390fd5b60008888888888888860405160200161036d97969594939291906111fa565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291815281516020928301206000818152600390935291205490915060ff166104285760405162461bcd60e51b815260206004820152603d60248201527f54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a20547260448201527f616e73616374696f6e206861736e2774206265656e207175657565642e0000006064820152608401610345565b824210156104c45760405162461bcd60e51b815260206004820152604560248201527f54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a20547260448201527f616e73616374696f6e206861736e2774207375727061737365642074696d652060648201527f6c6f636b2e000000000000000000000000000000000000000000000000000000608482015260a401610345565b6104d16212750084611258565b4211156105465760405162461bcd60e51b815260206004820152603360248201527f54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a20547260448201527f616e73616374696f6e206973207374616c652e000000000000000000000000006064820152608401610345565b600081815260036020526040812080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690556060908790036105c35785858080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509293506105fe92505050565b87876040516105d3929190611298565b6040519081900381206105ec91889088906020016112a8565b60405160208183030381529060405290505b6000808b73ffffffffffffffffffffffffffffffffffffffff168b8460405161062791906112e4565b60006040518083038185875af1925050503d8060008114610664576040519150601f19603f3d011682016040523d82523d6000602084013e610669565b606091505b5091509150816106e15760405162461bcd60e51b815260206004820152603d60248201527f54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a20547260448201527f616e73616374696f6e20657865637574696f6e2072657665727465642e0000006064820152608401610345565b8b73ffffffffffffffffffffffffffffffffffffffff16847fa560e3198060a2f10670c1ec5b403077ea6ae93ca8de1c32b451dc1a943cd6e78d8d8d8d8d8d60405161073296959493929190611300565b60405180910390a39b9a5050505050505050505050565b60015473ffffffffffffffffffffffffffffffffffffffff1633146107d65760405162461bcd60e51b815260206004820152603860248201527f54696d656c6f636b3a3a61636365707441646d696e3a2043616c6c206d75737460448201527f20636f6d652066726f6d2070656e64696e6741646d696e2e00000000000000006064820152608401610345565b60008054604051339273ffffffffffffffffffffffffffffffffffffffff909216917ff9ffabca9c8276e99321725bcb43fb076a6c66a54b7f21c4e8146d8519b417dc91a3600080547fffffffffffffffffffffffff00000000000000000000000000000000000000009081163317909155600180549091169055565b6000805473ffffffffffffffffffffffffffffffffffffffff1633146108e15760405162461bcd60e51b815260206004820152603660248201527f54696d656c6f636b3a3a71756575655472616e73616374696f6e3a2043616c6c60448201527f206d75737420636f6d652066726f6d2061646d696e2e000000000000000000006064820152608401610345565b6002546108ee9042611258565b8210156109895760405162461bcd60e51b815260206004820152604960248201527f54696d656c6f636b3a3a71756575655472616e73616374696f6e3a204573746960448201527f6d6174656420657865637574696f6e20626c6f636b206d75737420736174697360648201527f66792064656c61792e0000000000000000000000000000000000000000000000608482015260a401610345565b6000888888888888886040516020016109a897969594939291906111fa565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291815281516020928301206000818152600390935291205490915060ff1615610a645760405162461bcd60e51b815260206004820152603760248201527f54696d656c6f636b3a3a71756575655472616e73616374696f6e3a207472616e60448201527f73616374696f6e20616c7265616479207175657565642e0000000000000000006064820152608401610345565b6000818152600360205260409081902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555173ffffffffffffffffffffffffffffffffffffffff8a169082907f76e2796dc3a81d57b0e8504b647febcbeeb5f4af818e164f11eef8131a6a763f90610aef908c908c908c908c908c908c90611300565b60405180910390a398975050505050505050565b33301480610b28575060005473ffffffffffffffffffffffffffffffffffffffff1633145b610b9a5760405162461bcd60e51b815260206004820152603860248201527f54696d656c6f636b3a3a73657450656e64696e6741646d696e3a2043616c6c2060448201527f6d75737420636f6d652066726f6d2054696d656c6f636b2e00000000000000006064820152608401610345565b610ba381610fac565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040517f69d78e38a01985fbb1462961809b4b2d65531bc93b2b94037f3334b82ca4a75690600090a250565b60005473ffffffffffffffffffffffffffffffffffffffff163314610c9f5760405162461bcd60e51b815260206004820152603760248201527f54696d656c6f636b3a3a63616e63656c5472616e73616374696f6e3a2043616c60448201527f6c206d75737420636f6d652066726f6d2061646d696e2e0000000000000000006064820152608401610345565b600087878787878787604051602001610cbe97969594939291906111fa565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291815281516020928301206000818152600390935291205490915060ff16610d795760405162461bcd60e51b815260206004820152603b60248201527f54696d656c6f636b3a3a63616e63656c5472616e73616374696f6e3a2074726160448201527f6e73616374696f6e206973206e6f7420717565756564207965742e00000000006064820152608401610345565b6000818152600360205260409081902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690555173ffffffffffffffffffffffffffffffffffffffff89169082907f2fffc091a501fd91bfbff27141450d3acb40fb8e6d8382b243ec7a812a3aaf8790610e01908b908b908b908b908b908b90611300565b60405180910390a35050505050505050565b333014610e885760405162461bcd60e51b815260206004820152603160248201527f54696d656c6f636b3a3a73657444656c61793a2043616c6c206d75737420636f60448201527f6d652066726f6d2054696d656c6f636b2e0000000000000000000000000000006064820152608401610345565b6001811015610eff5760405162461bcd60e51b815260206004820152603460248201527f54696d656c6f636b3a3a73657444656c61793a2044656c6179206d757374206560448201527f7863656564206d696e696d756d2064656c61792e0000000000000000000000006064820152608401610345565b62278d00811115610f785760405162461bcd60e51b815260206004820152603860248201527f54696d656c6f636b3a3a73657444656c61793a2044656c6179206d757374206e60448201527f6f7420657863656564206d6178696d756d2064656c61792e00000000000000006064820152608401610345565b6002546040518291907fed0229422af39d4d7d33f7a27d31d6f5cb20ec628293da58dd6e8a528ed466be90600090a3600255565b73ffffffffffffffffffffffffffffffffffffffff8116610ff9576040517f8579befe00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50565b803573ffffffffffffffffffffffffffffffffffffffff8116811461102057600080fd5b919050565b60008083601f84011261103757600080fd5b50813567ffffffffffffffff81111561104f57600080fd5b60208301915083602082850101111561106757600080fd5b9250929050565b600080600080600080600060a0888a03121561108957600080fd5b61109288610ffc565b965060208801359550604088013567ffffffffffffffff808211156110b657600080fd5b6110c28b838c01611025565b909750955060608a01359150808211156110db57600080fd5b506110e88a828b01611025565b989b979a50959894979596608090950135949350505050565b60005b8381101561111c578181015183820152602001611104565b50506000910152565b6020815260008251806020840152611144816040850160208701611101565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b60006020828403121561118857600080fd5b61119182610ffc565b9392505050565b6000602082840312156111aa57600080fd5b5035919050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b73ffffffffffffffffffffffffffffffffffffffff8816815286602082015260a06040820152600061123060a0830187896111b1565b82810360608401526112438186886111b1565b91505082608083015298975050505050505050565b80820180821115611292577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b92915050565b8183823760009101908152919050565b7fffffffff0000000000000000000000000000000000000000000000000000000084168152818360048301376000910160040190815292915050565b600082516112f6818460208701611101565b9190910192915050565b86815260806020820152600061131a6080830187896111b1565b828103604084015261132d8186886111b1565b91505082606083015297965050505050505056fea2646970667358221220107bb03227edc1c6f85b8373dcceaab44e4dfeb00d413bf48275c2b4e4a1dd8a64736f6c63430008190033", + "devdoc": { + "author": "Venus", + "kind": "dev", + "methods": { + "GRACE_PERIOD()": { + "returns": { + "_0": "The duration of the grace period, specified as a uint256 value." + } + }, + "MAXIMUM_DELAY()": { + "returns": { + "_0": "Maximum delay" + } + }, + "MINIMUM_DELAY()": { + "returns": { + "_0": "Minimum delay" + } + }, + "acceptAdmin()": { + "custom:access": "Sender must be pending admin", + "custom:event": "Emit NewAdmin with old and new admin" + }, + "cancelTransaction(address,uint256,string,bytes,uint256)": { + "custom:access": "Sender must be admin", + "custom:event": "Emit CancelTransaction", + "params": { + "data": "Arguments to be passed to the function when called", + "eta": "Timestamp after which the transaction can be executed", + "signature": "Signature of the function to be called", + "target": "Address of the contract with the method to be called", + "value": "Native token amount sent with the transaction" + } + }, + "executeTransaction(address,uint256,string,bytes,uint256)": { + "custom:access": "Sender must be admin", + "custom:event": "Emit ExecuteTransaction", + "params": { + "data": "Arguments to be passed to the function when called", + "eta": "Timestamp after which the transaction can be executed", + "signature": "Signature of the function to be called", + "target": "Address of the contract with the method to be called", + "value": "Native token amount sent with the transaction" + }, + "returns": { + "_0": "Result of function call" + } + }, + "queueTransaction(address,uint256,string,bytes,uint256)": { + "custom:access": "Sender must be admin", + "custom:event": "Emit QueueTransaction", + "params": { + "data": "Arguments to be passed to the function when called", + "eta": "Timestamp after which the transaction can be executed", + "signature": "Signature of the function to be called", + "target": "Address of the contract with the method to be called", + "value": "Native token amount sent with the transaction" + }, + "returns": { + "_0": "Hash of the queued transaction" + } + }, + "setDelay(uint256)": { + "custom:access": "Sender must be Timelock itself", + "custom:event": "Emit NewDelay with old and new delay", + "params": { + "delay_": "The new delay period for the transaction queue" + } + }, + "setPendingAdmin(address)": { + "custom:access": "Sender must be Timelock contract itself or admin", + "custom:event": "Emit NewPendingAdmin with new pending admin", + "params": { + "pendingAdmin_": "Address of the proposed admin" + } + } + }, + "title": "TimelockV8", + "version": 1 + }, + "userdoc": { + "errors": { + "ZeroAddressNotAllowed()": [ + { + "notice": "Thrown if the supplied address is a zero address where it is not allowed" + } + ] + }, + "events": { + "CancelTransaction(bytes32,address,uint256,string,bytes,uint256)": { + "notice": "Event emitted when a proposal transaction has been cancelled" + }, + "ExecuteTransaction(bytes32,address,uint256,string,bytes,uint256)": { + "notice": "Event emitted when a proposal transaction has been executed" + }, + "NewAdmin(address,address)": { + "notice": "Event emitted when a new admin is accepted" + }, + "NewDelay(uint256,uint256)": { + "notice": "Event emitted when a new delay is proposed" + }, + "NewPendingAdmin(address)": { + "notice": "Event emitted when a new admin is proposed" + }, + "QueueTransaction(bytes32,address,uint256,string,bytes,uint256)": { + "notice": "Event emitted when a proposal transaction has been queued" + } + }, + "kind": "user", + "methods": { + "GRACE_PERIOD()": { + "notice": "Return grace period" + }, + "MAXIMUM_DELAY()": { + "notice": "Return required maximum delay" + }, + "MINIMUM_DELAY()": { + "notice": "Return required minimum delay" + }, + "acceptAdmin()": { + "notice": "Method for accepting a proposed admin" + }, + "admin()": { + "notice": "Timelock admin authorized to queue and execute transactions" + }, + "cancelTransaction(address,uint256,string,bytes,uint256)": { + "notice": "Called to cancel a queued transaction" + }, + "delay()": { + "notice": "Period for a proposal transaction to be queued" + }, + "executeTransaction(address,uint256,string,bytes,uint256)": { + "notice": "Called to execute a queued transaction" + }, + "pendingAdmin()": { + "notice": "Account proposed as the next admin" + }, + "queueTransaction(address,uint256,string,bytes,uint256)": { + "notice": "Called for each action when queuing a proposal" + }, + "queuedTransactions(bytes32)": { + "notice": "Mapping of queued transactions" + }, + "setDelay(uint256)": { + "notice": "Setter for the transaction queue delay" + }, + "setPendingAdmin(address)": { + "notice": "Method to propose a new admin authorized to call timelock functions. This should be the Governor Contract" + } + }, + "notice": "The Timelock contract using solidity V8. This contract also differs from the original timelock because it has a virtual function to get minimum delays and allow test deployments to override the value.", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 60, + "contract": "contracts/Governance/TimelockV8.sol:TimelockV8", + "label": "admin", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 63, + "contract": "contracts/Governance/TimelockV8.sol:TimelockV8", + "label": "pendingAdmin", + "offset": 0, + "slot": "1", + "type": "t_address" + }, + { + "astId": 66, + "contract": "contracts/Governance/TimelockV8.sol:TimelockV8", + "label": "delay", + "offset": 0, + "slot": "2", + "type": "t_uint256" + }, + { + "astId": 71, + "contract": "contracts/Governance/TimelockV8.sol:TimelockV8", + "label": "queuedTransactions", + "offset": 0, + "slot": "3", + "type": "t_mapping(t_bytes32,t_bool)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_bool)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} diff --git a/deployments/berachainbartio/NormalTimelock.json b/deployments/berachainbartio/NormalTimelock.json new file mode 100644 index 00000000..b373c4af --- /dev/null +++ b/deployments/berachainbartio/NormalTimelock.json @@ -0,0 +1,691 @@ +{ + "address": "0x08Cf9d51df988F1E69174D22b7f93f97e1aAEbeE", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "admin_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "delay_", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "ZeroAddressNotAllowed", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "txHash", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "signature", + "type": "string" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "eta", + "type": "uint256" + } + ], + "name": "CancelTransaction", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "txHash", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "signature", + "type": "string" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "eta", + "type": "uint256" + } + ], + "name": "ExecuteTransaction", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldAdmin", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "NewAdmin", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "oldDelay", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "newDelay", + "type": "uint256" + } + ], + "name": "NewDelay", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "newPendingAdmin", + "type": "address" + } + ], + "name": "NewPendingAdmin", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "txHash", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "signature", + "type": "string" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "eta", + "type": "uint256" + } + ], + "name": "QueueTransaction", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "GRACE_PERIOD", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MAXIMUM_DELAY", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MINIMUM_DELAY", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "acceptAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "admin", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "string", + "name": "signature", + "type": "string" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "eta", + "type": "uint256" + } + ], + "name": "cancelTransaction", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "delay", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "string", + "name": "signature", + "type": "string" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "eta", + "type": "uint256" + } + ], + "name": "executeTransaction", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "pendingAdmin", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "string", + "name": "signature", + "type": "string" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "eta", + "type": "uint256" + } + ], + "name": "queueTransaction", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "queuedTransactions", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "delay_", + "type": "uint256" + } + ], + "name": "setDelay", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "pendingAdmin_", + "type": "address" + } + ], + "name": "setPendingAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0xbedbe82d86b2fece128fd33b9c8acba9928e09c7d2e763491369d3bbd3376cf1", + "receipt": { + "to": null, + "from": "0x18BDb05DD1A95677f4381cfb4db52D342dF5C00d", + "contractAddress": "0x08Cf9d51df988F1E69174D22b7f93f97e1aAEbeE", + "transactionIndex": 0, + "gasUsed": "1178681", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x0f1e5de58cb674c8ab79c4d42800865628a1026ceb3afb3d046509eec6199257", + "transactionHash": "0xbedbe82d86b2fece128fd33b9c8acba9928e09c7d2e763491369d3bbd3376cf1", + "logs": [], + "blockNumber": 10534241, + "cumulativeGasUsed": "1178681", + "status": 1, + "byzantium": true + }, + "args": ["0xc80E4112940efF40c8626bAc0D8E79cB7dAbe289", 600], + "numDeployments": 1, + "solcInputHash": "39b818455672acbd6d12469b0e689d7a", + "metadata": "{\"compiler\":{\"version\":\"0.8.25+commit.b61c2a91\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"delay_\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"ZeroAddressNotAllowed\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"txHash\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"signature\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"eta\",\"type\":\"uint256\"}],\"name\":\"CancelTransaction\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"txHash\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"signature\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"eta\",\"type\":\"uint256\"}],\"name\":\"ExecuteTransaction\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"oldAdmin\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"NewAdmin\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"oldDelay\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"newDelay\",\"type\":\"uint256\"}],\"name\":\"NewDelay\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newPendingAdmin\",\"type\":\"address\"}],\"name\":\"NewPendingAdmin\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"txHash\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"signature\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"eta\",\"type\":\"uint256\"}],\"name\":\"QueueTransaction\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"GRACE_PERIOD\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAXIMUM_DELAY\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MINIMUM_DELAY\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"acceptAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"signature\",\"type\":\"string\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"eta\",\"type\":\"uint256\"}],\"name\":\"cancelTransaction\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"delay\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"signature\",\"type\":\"string\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"eta\",\"type\":\"uint256\"}],\"name\":\"executeTransaction\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pendingAdmin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"signature\",\"type\":\"string\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"eta\",\"type\":\"uint256\"}],\"name\":\"queueTransaction\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"queuedTransactions\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"delay_\",\"type\":\"uint256\"}],\"name\":\"setDelay\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"pendingAdmin_\",\"type\":\"address\"}],\"name\":\"setPendingAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Venus\",\"kind\":\"dev\",\"methods\":{\"GRACE_PERIOD()\":{\"returns\":{\"_0\":\"The duration of the grace period, specified as a uint256 value.\"}},\"MAXIMUM_DELAY()\":{\"returns\":{\"_0\":\"Maximum delay\"}},\"MINIMUM_DELAY()\":{\"returns\":{\"_0\":\"Minimum delay\"}},\"acceptAdmin()\":{\"custom:access\":\"Sender must be pending admin\",\"custom:event\":\"Emit NewAdmin with old and new admin\"},\"cancelTransaction(address,uint256,string,bytes,uint256)\":{\"custom:access\":\"Sender must be admin\",\"custom:event\":\"Emit CancelTransaction\",\"params\":{\"data\":\"Arguments to be passed to the function when called\",\"eta\":\"Timestamp after which the transaction can be executed\",\"signature\":\"Signature of the function to be called\",\"target\":\"Address of the contract with the method to be called\",\"value\":\"Native token amount sent with the transaction\"}},\"executeTransaction(address,uint256,string,bytes,uint256)\":{\"custom:access\":\"Sender must be admin\",\"custom:event\":\"Emit ExecuteTransaction\",\"params\":{\"data\":\"Arguments to be passed to the function when called\",\"eta\":\"Timestamp after which the transaction can be executed\",\"signature\":\"Signature of the function to be called\",\"target\":\"Address of the contract with the method to be called\",\"value\":\"Native token amount sent with the transaction\"},\"returns\":{\"_0\":\"Result of function call\"}},\"queueTransaction(address,uint256,string,bytes,uint256)\":{\"custom:access\":\"Sender must be admin\",\"custom:event\":\"Emit QueueTransaction\",\"params\":{\"data\":\"Arguments to be passed to the function when called\",\"eta\":\"Timestamp after which the transaction can be executed\",\"signature\":\"Signature of the function to be called\",\"target\":\"Address of the contract with the method to be called\",\"value\":\"Native token amount sent with the transaction\"},\"returns\":{\"_0\":\"Hash of the queued transaction\"}},\"setDelay(uint256)\":{\"custom:access\":\"Sender must be Timelock itself\",\"custom:event\":\"Emit NewDelay with old and new delay\",\"params\":{\"delay_\":\"The new delay period for the transaction queue\"}},\"setPendingAdmin(address)\":{\"custom:access\":\"Sender must be Timelock contract itself or admin\",\"custom:event\":\"Emit NewPendingAdmin with new pending admin\",\"params\":{\"pendingAdmin_\":\"Address of the proposed admin\"}}},\"title\":\"TimelockV8\",\"version\":1},\"userdoc\":{\"errors\":{\"ZeroAddressNotAllowed()\":[{\"notice\":\"Thrown if the supplied address is a zero address where it is not allowed\"}]},\"events\":{\"CancelTransaction(bytes32,address,uint256,string,bytes,uint256)\":{\"notice\":\"Event emitted when a proposal transaction has been cancelled\"},\"ExecuteTransaction(bytes32,address,uint256,string,bytes,uint256)\":{\"notice\":\"Event emitted when a proposal transaction has been executed\"},\"NewAdmin(address,address)\":{\"notice\":\"Event emitted when a new admin is accepted\"},\"NewDelay(uint256,uint256)\":{\"notice\":\"Event emitted when a new delay is proposed\"},\"NewPendingAdmin(address)\":{\"notice\":\"Event emitted when a new admin is proposed\"},\"QueueTransaction(bytes32,address,uint256,string,bytes,uint256)\":{\"notice\":\"Event emitted when a proposal transaction has been queued\"}},\"kind\":\"user\",\"methods\":{\"GRACE_PERIOD()\":{\"notice\":\"Return grace period\"},\"MAXIMUM_DELAY()\":{\"notice\":\"Return required maximum delay\"},\"MINIMUM_DELAY()\":{\"notice\":\"Return required minimum delay\"},\"acceptAdmin()\":{\"notice\":\"Method for accepting a proposed admin\"},\"admin()\":{\"notice\":\"Timelock admin authorized to queue and execute transactions\"},\"cancelTransaction(address,uint256,string,bytes,uint256)\":{\"notice\":\"Called to cancel a queued transaction\"},\"delay()\":{\"notice\":\"Period for a proposal transaction to be queued\"},\"executeTransaction(address,uint256,string,bytes,uint256)\":{\"notice\":\"Called to execute a queued transaction\"},\"pendingAdmin()\":{\"notice\":\"Account proposed as the next admin\"},\"queueTransaction(address,uint256,string,bytes,uint256)\":{\"notice\":\"Called for each action when queuing a proposal\"},\"queuedTransactions(bytes32)\":{\"notice\":\"Mapping of queued transactions\"},\"setDelay(uint256)\":{\"notice\":\"Setter for the transaction queue delay\"},\"setPendingAdmin(address)\":{\"notice\":\"Method to propose a new admin authorized to call timelock functions. This should be the Governor Contract\"}},\"notice\":\"The Timelock contract using solidity V8. This contract also differs from the original timelock because it has a virtual function to get minimum delays and allow test deployments to override the value.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/Governance/TimelockV8.sol\":\"TimelockV8\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"@venusprotocol/solidity-utilities/contracts/validators.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.25;\\n\\n/// @notice Thrown if the supplied address is a zero address where it is not allowed\\nerror ZeroAddressNotAllowed();\\n\\n/// @notice Thrown if the supplied value is 0 where it is not allowed\\nerror ZeroValueNotAllowed();\\n\\n/// @notice Checks if the provided address is nonzero, reverts otherwise\\n/// @param address_ Address to check\\n/// @custom:error ZeroAddressNotAllowed is thrown if the provided address is a zero address\\nfunction ensureNonzeroAddress(address address_) pure {\\n if (address_ == address(0)) {\\n revert ZeroAddressNotAllowed();\\n }\\n}\\n\\n/// @notice Checks if the provided value is nonzero, reverts otherwise\\n/// @param value_ Value to check\\n/// @custom:error ZeroValueNotAllowed is thrown if the provided value is 0\\nfunction ensureNonzeroValue(uint256 value_) pure {\\n if (value_ == 0) {\\n revert ZeroValueNotAllowed();\\n }\\n}\\n\",\"keccak256\":\"0xdb88e14d50dd21889ca3329d755673d022c47e8da005b6a545c7f69c2c4b7b86\",\"license\":\"BSD-3-Clause\"},\"contracts/Governance/TimelockV8.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.25;\\nimport { ensureNonzeroAddress } from \\\"@venusprotocol/solidity-utilities/contracts/validators.sol\\\";\\n\\n/**\\n * @title TimelockV8\\n * @author Venus\\n * @notice The Timelock contract using solidity V8.\\n * This contract also differs from the original timelock because it has a virtual function to get minimum delays\\n * and allow test deployments to override the value.\\n */\\ncontract TimelockV8 {\\n /// @notice Required period to execute a proposal transaction\\n uint256 private constant DEFAULT_GRACE_PERIOD = 14 days;\\n\\n /// @notice Minimum amount of time a proposal transaction must be queued\\n uint256 private constant DEFAULT_MINIMUM_DELAY = 10 minutes;\\n\\n /// @notice Maximum amount of time a proposal transaction must be queued\\n uint256 private constant DEFAULT_MAXIMUM_DELAY = 30 days;\\n\\n /// @notice Timelock admin authorized to queue and execute transactions\\n address public admin;\\n\\n /// @notice Account proposed as the next admin\\n address public pendingAdmin;\\n\\n /// @notice Period for a proposal transaction to be queued\\n uint256 public delay;\\n\\n /// @notice Mapping of queued transactions\\n mapping(bytes32 => bool) public queuedTransactions;\\n\\n /// @notice Event emitted when a new admin is accepted\\n event NewAdmin(address indexed oldAdmin, address indexed newAdmin);\\n\\n /// @notice Event emitted when a new admin is proposed\\n event NewPendingAdmin(address indexed newPendingAdmin);\\n\\n /// @notice Event emitted when a new delay is proposed\\n event NewDelay(uint256 indexed oldDelay, uint256 indexed newDelay);\\n\\n /// @notice Event emitted when a proposal transaction has been cancelled\\n event CancelTransaction(\\n bytes32 indexed txHash,\\n address indexed target,\\n uint256 value,\\n string signature,\\n bytes data,\\n uint256 eta\\n );\\n\\n /// @notice Event emitted when a proposal transaction has been executed\\n event ExecuteTransaction(\\n bytes32 indexed txHash,\\n address indexed target,\\n uint256 value,\\n string signature,\\n bytes data,\\n uint256 eta\\n );\\n\\n /// @notice Event emitted when a proposal transaction has been queued\\n event QueueTransaction(\\n bytes32 indexed txHash,\\n address indexed target,\\n uint256 value,\\n string signature,\\n bytes data,\\n uint256 eta\\n );\\n\\n constructor(address admin_, uint256 delay_) {\\n require(delay_ >= MINIMUM_DELAY(), \\\"Timelock::constructor: Delay must exceed minimum delay.\\\");\\n require(delay_ <= MAXIMUM_DELAY(), \\\"Timelock::setDelay: Delay must not exceed maximum delay.\\\");\\n ensureNonzeroAddress(admin_);\\n\\n admin = admin_;\\n delay = delay_;\\n }\\n\\n fallback() external payable {}\\n\\n /**\\n * @notice Setter for the transaction queue delay\\n * @param delay_ The new delay period for the transaction queue\\n * @custom:access Sender must be Timelock itself\\n * @custom:event Emit NewDelay with old and new delay\\n */\\n function setDelay(uint256 delay_) public {\\n require(msg.sender == address(this), \\\"Timelock::setDelay: Call must come from Timelock.\\\");\\n require(delay_ >= MINIMUM_DELAY(), \\\"Timelock::setDelay: Delay must exceed minimum delay.\\\");\\n require(delay_ <= MAXIMUM_DELAY(), \\\"Timelock::setDelay: Delay must not exceed maximum delay.\\\");\\n emit NewDelay(delay, delay_);\\n delay = delay_;\\n }\\n\\n /**\\n * @notice Return grace period\\n * @return The duration of the grace period, specified as a uint256 value.\\n */\\n function GRACE_PERIOD() public view virtual returns (uint256) {\\n return DEFAULT_GRACE_PERIOD;\\n }\\n\\n /**\\n * @notice Return required minimum delay\\n * @return Minimum delay\\n */\\n function MINIMUM_DELAY() public view virtual returns (uint256) {\\n return DEFAULT_MINIMUM_DELAY;\\n }\\n\\n /**\\n * @notice Return required maximum delay\\n * @return Maximum delay\\n */\\n function MAXIMUM_DELAY() public view virtual returns (uint256) {\\n return DEFAULT_MAXIMUM_DELAY;\\n }\\n\\n /**\\n * @notice Method for accepting a proposed admin\\n * @custom:access Sender must be pending admin\\n * @custom:event Emit NewAdmin with old and new admin\\n */\\n function acceptAdmin() public {\\n require(msg.sender == pendingAdmin, \\\"Timelock::acceptAdmin: Call must come from pendingAdmin.\\\");\\n emit NewAdmin(admin, msg.sender);\\n admin = msg.sender;\\n pendingAdmin = address(0);\\n }\\n\\n /**\\n * @notice Method to propose a new admin authorized to call timelock functions. This should be the Governor Contract\\n * @param pendingAdmin_ Address of the proposed admin\\n * @custom:access Sender must be Timelock contract itself or admin\\n * @custom:event Emit NewPendingAdmin with new pending admin\\n */\\n function setPendingAdmin(address pendingAdmin_) public {\\n require(\\n msg.sender == address(this) || msg.sender == admin,\\n \\\"Timelock::setPendingAdmin: Call must come from Timelock.\\\"\\n );\\n ensureNonzeroAddress(pendingAdmin_);\\n pendingAdmin = pendingAdmin_;\\n\\n emit NewPendingAdmin(pendingAdmin);\\n }\\n\\n /**\\n * @notice Called for each action when queuing a proposal\\n * @param target Address of the contract with the method to be called\\n * @param value Native token amount sent with the transaction\\n * @param signature Signature of the function to be called\\n * @param data Arguments to be passed to the function when called\\n * @param eta Timestamp after which the transaction can be executed\\n * @return Hash of the queued transaction\\n * @custom:access Sender must be admin\\n * @custom:event Emit QueueTransaction\\n */\\n function queueTransaction(\\n address target,\\n uint256 value,\\n string calldata signature,\\n bytes calldata data,\\n uint256 eta\\n ) public returns (bytes32) {\\n require(msg.sender == admin, \\\"Timelock::queueTransaction: Call must come from admin.\\\");\\n require(\\n eta >= getBlockTimestamp() + delay,\\n \\\"Timelock::queueTransaction: Estimated execution block must satisfy delay.\\\"\\n );\\n\\n bytes32 txHash = keccak256(abi.encode(target, value, signature, data, eta));\\n require(!queuedTransactions[txHash], \\\"Timelock::queueTransaction: transaction already queued.\\\");\\n queuedTransactions[txHash] = true;\\n\\n emit QueueTransaction(txHash, target, value, signature, data, eta);\\n return txHash;\\n }\\n\\n /**\\n * @notice Called to cancel a queued transaction\\n * @param target Address of the contract with the method to be called\\n * @param value Native token amount sent with the transaction\\n * @param signature Signature of the function to be called\\n * @param data Arguments to be passed to the function when called\\n * @param eta Timestamp after which the transaction can be executed\\n * @custom:access Sender must be admin\\n * @custom:event Emit CancelTransaction\\n */\\n function cancelTransaction(\\n address target,\\n uint256 value,\\n string calldata signature,\\n bytes calldata data,\\n uint256 eta\\n ) public {\\n require(msg.sender == admin, \\\"Timelock::cancelTransaction: Call must come from admin.\\\");\\n\\n bytes32 txHash = keccak256(abi.encode(target, value, signature, data, eta));\\n require(queuedTransactions[txHash], \\\"Timelock::cancelTransaction: transaction is not queued yet.\\\");\\n delete (queuedTransactions[txHash]);\\n\\n emit CancelTransaction(txHash, target, value, signature, data, eta);\\n }\\n\\n /**\\n * @notice Called to execute a queued transaction\\n * @param target Address of the contract with the method to be called\\n * @param value Native token amount sent with the transaction\\n * @param signature Signature of the function to be called\\n * @param data Arguments to be passed to the function when called\\n * @param eta Timestamp after which the transaction can be executed\\n * @return Result of function call\\n * @custom:access Sender must be admin\\n * @custom:event Emit ExecuteTransaction\\n */\\n function executeTransaction(\\n address target,\\n uint256 value,\\n string calldata signature,\\n bytes calldata data,\\n uint256 eta\\n ) public returns (bytes memory) {\\n require(msg.sender == admin, \\\"Timelock::executeTransaction: Call must come from admin.\\\");\\n\\n bytes32 txHash = keccak256(abi.encode(target, value, signature, data, eta));\\n require(queuedTransactions[txHash], \\\"Timelock::executeTransaction: Transaction hasn't been queued.\\\");\\n require(getBlockTimestamp() >= eta, \\\"Timelock::executeTransaction: Transaction hasn't surpassed time lock.\\\");\\n require(getBlockTimestamp() <= eta + GRACE_PERIOD(), \\\"Timelock::executeTransaction: Transaction is stale.\\\");\\n\\n delete (queuedTransactions[txHash]);\\n\\n bytes memory callData;\\n\\n if (bytes(signature).length == 0) {\\n callData = data;\\n } else {\\n callData = abi.encodePacked(bytes4(keccak256(bytes(signature))), data);\\n }\\n\\n // solium-disable-next-line security/no-call-value\\n (bool success, bytes memory returnData) = target.call{ value: value }(callData);\\n require(success, \\\"Timelock::executeTransaction: Transaction execution reverted.\\\");\\n\\n emit ExecuteTransaction(txHash, target, value, signature, data, eta);\\n\\n return returnData;\\n }\\n\\n /**\\n * @notice Returns the current block timestamp\\n * @return The current block timestamp\\n */\\n function getBlockTimestamp() internal view returns (uint256) {\\n // solium-disable-next-line security/no-block-members\\n return block.timestamp;\\n }\\n}\\n\",\"keccak256\":\"0x526aa877aa4467f667d0557acaa288e5ea0dbbeb21c5796d227adef493bd8dae\",\"license\":\"BSD-3-Clause\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b5060405161154338038061154383398101604081905261002f91610181565b6102588110156100ac5760405162461bcd60e51b815260206004820152603760248201527f54696d656c6f636b3a3a636f6e7374727563746f723a2044656c6179206d757360448201527f7420657863656564206d696e696d756d2064656c61792e00000000000000000060648201526084015b60405180910390fd5b62278d008111156101255760405162461bcd60e51b815260206004820152603860248201527f54696d656c6f636b3a3a73657444656c61793a2044656c6179206d757374206e60448201527f6f7420657863656564206d6178696d756d2064656c61792e000000000000000060648201526084016100a3565b61012e82610157565b600080546001600160a01b0319166001600160a01b0393909316929092179091556002556101bb565b6001600160a01b03811661017e576040516342bcdf7f60e11b815260040160405180910390fd5b50565b6000806040838503121561019457600080fd5b82516001600160a01b03811681146101ab57600080fd5b6020939093015192949293505050565b611379806101ca6000396000f3fe6080604052600436106100c95760003560e01c80636a42b8f811610079578063c1a287e211610056578063c1a287e214610217578063e177246e1461022d578063f2b065371461024d578063f851a4401461028d57005b80636a42b8f8146101d65780637d645fab146101ec578063b1b43ae51461020257005b80633a66f901116100a75780633a66f901146101685780634dd18bf514610196578063591fcdfe146101b657005b80630825f38f146100cb5780630e18b681146101015780632678224714610116575b005b3480156100d757600080fd5b506100eb6100e6366004611070565b6102ba565b6040516100f89190611127565b60405180910390f35b34801561010d57600080fd5b506100c961074a565b34801561012257600080fd5b506001546101439073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100f8565b34801561017457600080fd5b50610188610183366004611070565b610854565b6040519081526020016100f8565b3480156101a257600080fd5b506100c96101b1366004611178565b610b04565b3480156101c257600080fd5b506100c96101d1366004611070565b610c13565b3480156101e257600080fd5b5061018860025481565b3480156101f857600080fd5b5062278d00610188565b34801561020e57600080fd5b50610258610188565b34801561022357600080fd5b5062127500610188565b34801561023957600080fd5b506100c961024836600461119a565b610e14565b34801561025957600080fd5b5061027d61026836600461119a565b60036020526000908152604090205460ff1681565b60405190151581526020016100f8565b34801561029957600080fd5b506000546101439073ffffffffffffffffffffffffffffffffffffffff1681565b60005460609073ffffffffffffffffffffffffffffffffffffffff16331461034f5760405162461bcd60e51b815260206004820152603860248201527f54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a20436160448201527f6c6c206d75737420636f6d652066726f6d2061646d696e2e000000000000000060648201526084015b60405180910390fd5b60008888888888888860405160200161036e97969594939291906111fc565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291815281516020928301206000818152600390935291205490915060ff166104295760405162461bcd60e51b815260206004820152603d60248201527f54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a20547260448201527f616e73616374696f6e206861736e2774206265656e207175657565642e0000006064820152608401610346565b824210156104c55760405162461bcd60e51b815260206004820152604560248201527f54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a20547260448201527f616e73616374696f6e206861736e2774207375727061737365642074696d652060648201527f6c6f636b2e000000000000000000000000000000000000000000000000000000608482015260a401610346565b6104d2621275008461125a565b4211156105475760405162461bcd60e51b815260206004820152603360248201527f54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a20547260448201527f616e73616374696f6e206973207374616c652e000000000000000000000000006064820152608401610346565b600081815260036020526040812080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690556060908790036105c45785858080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509293506105ff92505050565b87876040516105d492919061129a565b6040519081900381206105ed91889088906020016112aa565b60405160208183030381529060405290505b6000808b73ffffffffffffffffffffffffffffffffffffffff168b8460405161062891906112e6565b60006040518083038185875af1925050503d8060008114610665576040519150601f19603f3d011682016040523d82523d6000602084013e61066a565b606091505b5091509150816106e25760405162461bcd60e51b815260206004820152603d60248201527f54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a20547260448201527f616e73616374696f6e20657865637574696f6e2072657665727465642e0000006064820152608401610346565b8b73ffffffffffffffffffffffffffffffffffffffff16847fa560e3198060a2f10670c1ec5b403077ea6ae93ca8de1c32b451dc1a943cd6e78d8d8d8d8d8d60405161073396959493929190611302565b60405180910390a39b9a5050505050505050505050565b60015473ffffffffffffffffffffffffffffffffffffffff1633146107d75760405162461bcd60e51b815260206004820152603860248201527f54696d656c6f636b3a3a61636365707441646d696e3a2043616c6c206d75737460448201527f20636f6d652066726f6d2070656e64696e6741646d696e2e00000000000000006064820152608401610346565b60008054604051339273ffffffffffffffffffffffffffffffffffffffff909216917ff9ffabca9c8276e99321725bcb43fb076a6c66a54b7f21c4e8146d8519b417dc91a3600080547fffffffffffffffffffffffff00000000000000000000000000000000000000009081163317909155600180549091169055565b6000805473ffffffffffffffffffffffffffffffffffffffff1633146108e25760405162461bcd60e51b815260206004820152603660248201527f54696d656c6f636b3a3a71756575655472616e73616374696f6e3a2043616c6c60448201527f206d75737420636f6d652066726f6d2061646d696e2e000000000000000000006064820152608401610346565b6002546108ef904261125a565b82101561098a5760405162461bcd60e51b815260206004820152604960248201527f54696d656c6f636b3a3a71756575655472616e73616374696f6e3a204573746960448201527f6d6174656420657865637574696f6e20626c6f636b206d75737420736174697360648201527f66792064656c61792e0000000000000000000000000000000000000000000000608482015260a401610346565b6000888888888888886040516020016109a997969594939291906111fc565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291815281516020928301206000818152600390935291205490915060ff1615610a655760405162461bcd60e51b815260206004820152603760248201527f54696d656c6f636b3a3a71756575655472616e73616374696f6e3a207472616e60448201527f73616374696f6e20616c7265616479207175657565642e0000000000000000006064820152608401610346565b6000818152600360205260409081902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555173ffffffffffffffffffffffffffffffffffffffff8a169082907f76e2796dc3a81d57b0e8504b647febcbeeb5f4af818e164f11eef8131a6a763f90610af0908c908c908c908c908c908c90611302565b60405180910390a398975050505050505050565b33301480610b29575060005473ffffffffffffffffffffffffffffffffffffffff1633145b610b9b5760405162461bcd60e51b815260206004820152603860248201527f54696d656c6f636b3a3a73657450656e64696e6741646d696e3a2043616c6c2060448201527f6d75737420636f6d652066726f6d2054696d656c6f636b2e00000000000000006064820152608401610346565b610ba481610fae565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040517f69d78e38a01985fbb1462961809b4b2d65531bc93b2b94037f3334b82ca4a75690600090a250565b60005473ffffffffffffffffffffffffffffffffffffffff163314610ca05760405162461bcd60e51b815260206004820152603760248201527f54696d656c6f636b3a3a63616e63656c5472616e73616374696f6e3a2043616c60448201527f6c206d75737420636f6d652066726f6d2061646d696e2e0000000000000000006064820152608401610346565b600087878787878787604051602001610cbf97969594939291906111fc565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291815281516020928301206000818152600390935291205490915060ff16610d7a5760405162461bcd60e51b815260206004820152603b60248201527f54696d656c6f636b3a3a63616e63656c5472616e73616374696f6e3a2074726160448201527f6e73616374696f6e206973206e6f7420717565756564207965742e00000000006064820152608401610346565b6000818152600360205260409081902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690555173ffffffffffffffffffffffffffffffffffffffff89169082907f2fffc091a501fd91bfbff27141450d3acb40fb8e6d8382b243ec7a812a3aaf8790610e02908b908b908b908b908b908b90611302565b60405180910390a35050505050505050565b333014610e895760405162461bcd60e51b815260206004820152603160248201527f54696d656c6f636b3a3a73657444656c61793a2043616c6c206d75737420636f60448201527f6d652066726f6d2054696d656c6f636b2e0000000000000000000000000000006064820152608401610346565b610258811015610f015760405162461bcd60e51b815260206004820152603460248201527f54696d656c6f636b3a3a73657444656c61793a2044656c6179206d757374206560448201527f7863656564206d696e696d756d2064656c61792e0000000000000000000000006064820152608401610346565b62278d00811115610f7a5760405162461bcd60e51b815260206004820152603860248201527f54696d656c6f636b3a3a73657444656c61793a2044656c6179206d757374206e60448201527f6f7420657863656564206d6178696d756d2064656c61792e00000000000000006064820152608401610346565b6002546040518291907fed0229422af39d4d7d33f7a27d31d6f5cb20ec628293da58dd6e8a528ed466be90600090a3600255565b73ffffffffffffffffffffffffffffffffffffffff8116610ffb576040517f8579befe00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50565b803573ffffffffffffffffffffffffffffffffffffffff8116811461102257600080fd5b919050565b60008083601f84011261103957600080fd5b50813567ffffffffffffffff81111561105157600080fd5b60208301915083602082850101111561106957600080fd5b9250929050565b600080600080600080600060a0888a03121561108b57600080fd5b61109488610ffe565b965060208801359550604088013567ffffffffffffffff808211156110b857600080fd5b6110c48b838c01611027565b909750955060608a01359150808211156110dd57600080fd5b506110ea8a828b01611027565b989b979a50959894979596608090950135949350505050565b60005b8381101561111e578181015183820152602001611106565b50506000910152565b6020815260008251806020840152611146816040850160208701611103565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b60006020828403121561118a57600080fd5b61119382610ffe565b9392505050565b6000602082840312156111ac57600080fd5b5035919050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b73ffffffffffffffffffffffffffffffffffffffff8816815286602082015260a06040820152600061123260a0830187896111b3565b82810360608401526112458186886111b3565b91505082608083015298975050505050505050565b80820180821115611294577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b92915050565b8183823760009101908152919050565b7fffffffff0000000000000000000000000000000000000000000000000000000084168152818360048301376000910160040190815292915050565b600082516112f8818460208701611103565b9190910192915050565b86815260806020820152600061131c6080830187896111b3565b828103604084015261132f8186886111b3565b91505082606083015297965050505050505056fea264697066735822122080edc9ddc0202ff8cedbebd8e9513924d7c216fe9f767a722943b7c23653701664736f6c63430008190033", + "deployedBytecode": "0x6080604052600436106100c95760003560e01c80636a42b8f811610079578063c1a287e211610056578063c1a287e214610217578063e177246e1461022d578063f2b065371461024d578063f851a4401461028d57005b80636a42b8f8146101d65780637d645fab146101ec578063b1b43ae51461020257005b80633a66f901116100a75780633a66f901146101685780634dd18bf514610196578063591fcdfe146101b657005b80630825f38f146100cb5780630e18b681146101015780632678224714610116575b005b3480156100d757600080fd5b506100eb6100e6366004611070565b6102ba565b6040516100f89190611127565b60405180910390f35b34801561010d57600080fd5b506100c961074a565b34801561012257600080fd5b506001546101439073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100f8565b34801561017457600080fd5b50610188610183366004611070565b610854565b6040519081526020016100f8565b3480156101a257600080fd5b506100c96101b1366004611178565b610b04565b3480156101c257600080fd5b506100c96101d1366004611070565b610c13565b3480156101e257600080fd5b5061018860025481565b3480156101f857600080fd5b5062278d00610188565b34801561020e57600080fd5b50610258610188565b34801561022357600080fd5b5062127500610188565b34801561023957600080fd5b506100c961024836600461119a565b610e14565b34801561025957600080fd5b5061027d61026836600461119a565b60036020526000908152604090205460ff1681565b60405190151581526020016100f8565b34801561029957600080fd5b506000546101439073ffffffffffffffffffffffffffffffffffffffff1681565b60005460609073ffffffffffffffffffffffffffffffffffffffff16331461034f5760405162461bcd60e51b815260206004820152603860248201527f54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a20436160448201527f6c6c206d75737420636f6d652066726f6d2061646d696e2e000000000000000060648201526084015b60405180910390fd5b60008888888888888860405160200161036e97969594939291906111fc565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291815281516020928301206000818152600390935291205490915060ff166104295760405162461bcd60e51b815260206004820152603d60248201527f54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a20547260448201527f616e73616374696f6e206861736e2774206265656e207175657565642e0000006064820152608401610346565b824210156104c55760405162461bcd60e51b815260206004820152604560248201527f54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a20547260448201527f616e73616374696f6e206861736e2774207375727061737365642074696d652060648201527f6c6f636b2e000000000000000000000000000000000000000000000000000000608482015260a401610346565b6104d2621275008461125a565b4211156105475760405162461bcd60e51b815260206004820152603360248201527f54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a20547260448201527f616e73616374696f6e206973207374616c652e000000000000000000000000006064820152608401610346565b600081815260036020526040812080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690556060908790036105c45785858080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509293506105ff92505050565b87876040516105d492919061129a565b6040519081900381206105ed91889088906020016112aa565b60405160208183030381529060405290505b6000808b73ffffffffffffffffffffffffffffffffffffffff168b8460405161062891906112e6565b60006040518083038185875af1925050503d8060008114610665576040519150601f19603f3d011682016040523d82523d6000602084013e61066a565b606091505b5091509150816106e25760405162461bcd60e51b815260206004820152603d60248201527f54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a20547260448201527f616e73616374696f6e20657865637574696f6e2072657665727465642e0000006064820152608401610346565b8b73ffffffffffffffffffffffffffffffffffffffff16847fa560e3198060a2f10670c1ec5b403077ea6ae93ca8de1c32b451dc1a943cd6e78d8d8d8d8d8d60405161073396959493929190611302565b60405180910390a39b9a5050505050505050505050565b60015473ffffffffffffffffffffffffffffffffffffffff1633146107d75760405162461bcd60e51b815260206004820152603860248201527f54696d656c6f636b3a3a61636365707441646d696e3a2043616c6c206d75737460448201527f20636f6d652066726f6d2070656e64696e6741646d696e2e00000000000000006064820152608401610346565b60008054604051339273ffffffffffffffffffffffffffffffffffffffff909216917ff9ffabca9c8276e99321725bcb43fb076a6c66a54b7f21c4e8146d8519b417dc91a3600080547fffffffffffffffffffffffff00000000000000000000000000000000000000009081163317909155600180549091169055565b6000805473ffffffffffffffffffffffffffffffffffffffff1633146108e25760405162461bcd60e51b815260206004820152603660248201527f54696d656c6f636b3a3a71756575655472616e73616374696f6e3a2043616c6c60448201527f206d75737420636f6d652066726f6d2061646d696e2e000000000000000000006064820152608401610346565b6002546108ef904261125a565b82101561098a5760405162461bcd60e51b815260206004820152604960248201527f54696d656c6f636b3a3a71756575655472616e73616374696f6e3a204573746960448201527f6d6174656420657865637574696f6e20626c6f636b206d75737420736174697360648201527f66792064656c61792e0000000000000000000000000000000000000000000000608482015260a401610346565b6000888888888888886040516020016109a997969594939291906111fc565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291815281516020928301206000818152600390935291205490915060ff1615610a655760405162461bcd60e51b815260206004820152603760248201527f54696d656c6f636b3a3a71756575655472616e73616374696f6e3a207472616e60448201527f73616374696f6e20616c7265616479207175657565642e0000000000000000006064820152608401610346565b6000818152600360205260409081902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555173ffffffffffffffffffffffffffffffffffffffff8a169082907f76e2796dc3a81d57b0e8504b647febcbeeb5f4af818e164f11eef8131a6a763f90610af0908c908c908c908c908c908c90611302565b60405180910390a398975050505050505050565b33301480610b29575060005473ffffffffffffffffffffffffffffffffffffffff1633145b610b9b5760405162461bcd60e51b815260206004820152603860248201527f54696d656c6f636b3a3a73657450656e64696e6741646d696e3a2043616c6c2060448201527f6d75737420636f6d652066726f6d2054696d656c6f636b2e00000000000000006064820152608401610346565b610ba481610fae565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040517f69d78e38a01985fbb1462961809b4b2d65531bc93b2b94037f3334b82ca4a75690600090a250565b60005473ffffffffffffffffffffffffffffffffffffffff163314610ca05760405162461bcd60e51b815260206004820152603760248201527f54696d656c6f636b3a3a63616e63656c5472616e73616374696f6e3a2043616c60448201527f6c206d75737420636f6d652066726f6d2061646d696e2e0000000000000000006064820152608401610346565b600087878787878787604051602001610cbf97969594939291906111fc565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291815281516020928301206000818152600390935291205490915060ff16610d7a5760405162461bcd60e51b815260206004820152603b60248201527f54696d656c6f636b3a3a63616e63656c5472616e73616374696f6e3a2074726160448201527f6e73616374696f6e206973206e6f7420717565756564207965742e00000000006064820152608401610346565b6000818152600360205260409081902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690555173ffffffffffffffffffffffffffffffffffffffff89169082907f2fffc091a501fd91bfbff27141450d3acb40fb8e6d8382b243ec7a812a3aaf8790610e02908b908b908b908b908b908b90611302565b60405180910390a35050505050505050565b333014610e895760405162461bcd60e51b815260206004820152603160248201527f54696d656c6f636b3a3a73657444656c61793a2043616c6c206d75737420636f60448201527f6d652066726f6d2054696d656c6f636b2e0000000000000000000000000000006064820152608401610346565b610258811015610f015760405162461bcd60e51b815260206004820152603460248201527f54696d656c6f636b3a3a73657444656c61793a2044656c6179206d757374206560448201527f7863656564206d696e696d756d2064656c61792e0000000000000000000000006064820152608401610346565b62278d00811115610f7a5760405162461bcd60e51b815260206004820152603860248201527f54696d656c6f636b3a3a73657444656c61793a2044656c6179206d757374206e60448201527f6f7420657863656564206d6178696d756d2064656c61792e00000000000000006064820152608401610346565b6002546040518291907fed0229422af39d4d7d33f7a27d31d6f5cb20ec628293da58dd6e8a528ed466be90600090a3600255565b73ffffffffffffffffffffffffffffffffffffffff8116610ffb576040517f8579befe00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50565b803573ffffffffffffffffffffffffffffffffffffffff8116811461102257600080fd5b919050565b60008083601f84011261103957600080fd5b50813567ffffffffffffffff81111561105157600080fd5b60208301915083602082850101111561106957600080fd5b9250929050565b600080600080600080600060a0888a03121561108b57600080fd5b61109488610ffe565b965060208801359550604088013567ffffffffffffffff808211156110b857600080fd5b6110c48b838c01611027565b909750955060608a01359150808211156110dd57600080fd5b506110ea8a828b01611027565b989b979a50959894979596608090950135949350505050565b60005b8381101561111e578181015183820152602001611106565b50506000910152565b6020815260008251806020840152611146816040850160208701611103565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b60006020828403121561118a57600080fd5b61119382610ffe565b9392505050565b6000602082840312156111ac57600080fd5b5035919050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b73ffffffffffffffffffffffffffffffffffffffff8816815286602082015260a06040820152600061123260a0830187896111b3565b82810360608401526112458186886111b3565b91505082608083015298975050505050505050565b80820180821115611294577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b92915050565b8183823760009101908152919050565b7fffffffff0000000000000000000000000000000000000000000000000000000084168152818360048301376000910160040190815292915050565b600082516112f8818460208701611103565b9190910192915050565b86815260806020820152600061131c6080830187896111b3565b828103604084015261132f8186886111b3565b91505082606083015297965050505050505056fea264697066735822122080edc9ddc0202ff8cedbebd8e9513924d7c216fe9f767a722943b7c23653701664736f6c63430008190033", + "devdoc": { + "author": "Venus", + "kind": "dev", + "methods": { + "GRACE_PERIOD()": { + "returns": { + "_0": "The duration of the grace period, specified as a uint256 value." + } + }, + "MAXIMUM_DELAY()": { + "returns": { + "_0": "Maximum delay" + } + }, + "MINIMUM_DELAY()": { + "returns": { + "_0": "Minimum delay" + } + }, + "acceptAdmin()": { + "custom:access": "Sender must be pending admin", + "custom:event": "Emit NewAdmin with old and new admin" + }, + "cancelTransaction(address,uint256,string,bytes,uint256)": { + "custom:access": "Sender must be admin", + "custom:event": "Emit CancelTransaction", + "params": { + "data": "Arguments to be passed to the function when called", + "eta": "Timestamp after which the transaction can be executed", + "signature": "Signature of the function to be called", + "target": "Address of the contract with the method to be called", + "value": "Native token amount sent with the transaction" + } + }, + "executeTransaction(address,uint256,string,bytes,uint256)": { + "custom:access": "Sender must be admin", + "custom:event": "Emit ExecuteTransaction", + "params": { + "data": "Arguments to be passed to the function when called", + "eta": "Timestamp after which the transaction can be executed", + "signature": "Signature of the function to be called", + "target": "Address of the contract with the method to be called", + "value": "Native token amount sent with the transaction" + }, + "returns": { + "_0": "Result of function call" + } + }, + "queueTransaction(address,uint256,string,bytes,uint256)": { + "custom:access": "Sender must be admin", + "custom:event": "Emit QueueTransaction", + "params": { + "data": "Arguments to be passed to the function when called", + "eta": "Timestamp after which the transaction can be executed", + "signature": "Signature of the function to be called", + "target": "Address of the contract with the method to be called", + "value": "Native token amount sent with the transaction" + }, + "returns": { + "_0": "Hash of the queued transaction" + } + }, + "setDelay(uint256)": { + "custom:access": "Sender must be Timelock itself", + "custom:event": "Emit NewDelay with old and new delay", + "params": { + "delay_": "The new delay period for the transaction queue" + } + }, + "setPendingAdmin(address)": { + "custom:access": "Sender must be Timelock contract itself or admin", + "custom:event": "Emit NewPendingAdmin with new pending admin", + "params": { + "pendingAdmin_": "Address of the proposed admin" + } + } + }, + "title": "TimelockV8", + "version": 1 + }, + "userdoc": { + "errors": { + "ZeroAddressNotAllowed()": [ + { + "notice": "Thrown if the supplied address is a zero address where it is not allowed" + } + ] + }, + "events": { + "CancelTransaction(bytes32,address,uint256,string,bytes,uint256)": { + "notice": "Event emitted when a proposal transaction has been cancelled" + }, + "ExecuteTransaction(bytes32,address,uint256,string,bytes,uint256)": { + "notice": "Event emitted when a proposal transaction has been executed" + }, + "NewAdmin(address,address)": { + "notice": "Event emitted when a new admin is accepted" + }, + "NewDelay(uint256,uint256)": { + "notice": "Event emitted when a new delay is proposed" + }, + "NewPendingAdmin(address)": { + "notice": "Event emitted when a new admin is proposed" + }, + "QueueTransaction(bytes32,address,uint256,string,bytes,uint256)": { + "notice": "Event emitted when a proposal transaction has been queued" + } + }, + "kind": "user", + "methods": { + "GRACE_PERIOD()": { + "notice": "Return grace period" + }, + "MAXIMUM_DELAY()": { + "notice": "Return required maximum delay" + }, + "MINIMUM_DELAY()": { + "notice": "Return required minimum delay" + }, + "acceptAdmin()": { + "notice": "Method for accepting a proposed admin" + }, + "admin()": { + "notice": "Timelock admin authorized to queue and execute transactions" + }, + "cancelTransaction(address,uint256,string,bytes,uint256)": { + "notice": "Called to cancel a queued transaction" + }, + "delay()": { + "notice": "Period for a proposal transaction to be queued" + }, + "executeTransaction(address,uint256,string,bytes,uint256)": { + "notice": "Called to execute a queued transaction" + }, + "pendingAdmin()": { + "notice": "Account proposed as the next admin" + }, + "queueTransaction(address,uint256,string,bytes,uint256)": { + "notice": "Called for each action when queuing a proposal" + }, + "queuedTransactions(bytes32)": { + "notice": "Mapping of queued transactions" + }, + "setDelay(uint256)": { + "notice": "Setter for the transaction queue delay" + }, + "setPendingAdmin(address)": { + "notice": "Method to propose a new admin authorized to call timelock functions. This should be the Governor Contract" + } + }, + "notice": "The Timelock contract using solidity V8. This contract also differs from the original timelock because it has a virtual function to get minimum delays and allow test deployments to override the value.", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 60, + "contract": "contracts/Governance/TimelockV8.sol:TimelockV8", + "label": "admin", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 63, + "contract": "contracts/Governance/TimelockV8.sol:TimelockV8", + "label": "pendingAdmin", + "offset": 0, + "slot": "1", + "type": "t_address" + }, + { + "astId": 66, + "contract": "contracts/Governance/TimelockV8.sol:TimelockV8", + "label": "delay", + "offset": 0, + "slot": "2", + "type": "t_uint256" + }, + { + "astId": 71, + "contract": "contracts/Governance/TimelockV8.sol:TimelockV8", + "label": "queuedTransactions", + "offset": 0, + "slot": "3", + "type": "t_mapping(t_bytes32,t_bool)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_bool)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} diff --git a/deployments/berachainbartio/OmnichainExecutorOwner.json b/deployments/berachainbartio/OmnichainExecutorOwner.json new file mode 100644 index 00000000..3d7d3b38 --- /dev/null +++ b/deployments/berachainbartio/OmnichainExecutorOwner.json @@ -0,0 +1,555 @@ +{ + "address": "0xd934a7c03D6fA022321565f2042EC37bD26Baf3c", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "admin", + "outputs": [ + { + "internalType": "address", + "name": "admin_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "implementation", + "outputs": [ + { + "internalType": "address", + "name": "implementation_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { + "inputs": [ + { + "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": true, + "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" + }, + { + "inputs": [], + "name": "OMNICHAIN_GOVERNANCE_EXECUTOR", + "outputs": [ + { + "internalType": "contract IOmnichainGovernanceExecutor", + "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": "uint16", + "name": "srcChainId_", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "srcAddress_", + "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" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "address", + "name": "admin_", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + } + ], + "transactionHash": "0x3071210b323096c2d1c7386e068d15f62f1ffa159883a599584f95919e1f2b2d", + "receipt": { + "to": null, + "from": "0x18BDb05DD1A95677f4381cfb4db52D342dF5C00d", + "contractAddress": "0xd934a7c03D6fA022321565f2042EC37bD26Baf3c", + "transactionIndex": 1, + "gasUsed": "687927", + "logsBloom": "0x00000000000000000000000000000000400000000000000000800000000000000000000000000000000800000000000000000000000000000000000000008040000000000000000000000080000002000001000000000000000000000100000000000000020000000000020000000800000000800000000000000000000000400000000000000200000000000000000000000000001080000000000000800000000000000000000000000000000400000000000000800000000000000000000000000020000000000000000008040000000000010400000000000000000020000000000000000000000000000000000000000800000000000000000000000000", + "blockHash": "0xe93a3273367e39329d04772acf526bf3a8430ab51277b948dd29733dd2bcdde9", + "transactionHash": "0x3071210b323096c2d1c7386e068d15f62f1ffa159883a599584f95919e1f2b2d", + "logs": [ + { + "transactionIndex": 1, + "blockNumber": 10537900, + "transactionHash": "0x3071210b323096c2d1c7386e068d15f62f1ffa159883a599584f95919e1f2b2d", + "address": "0xd934a7c03D6fA022321565f2042EC37bD26Baf3c", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x00000000000000000000000009f0cf4ed50ed01994900ce9ee1ae85bfecd5c66" + ], + "data": "0x", + "logIndex": 1, + "blockHash": "0xe93a3273367e39329d04772acf526bf3a8430ab51277b948dd29733dd2bcdde9" + }, + { + "transactionIndex": 1, + "blockNumber": 10537900, + "transactionHash": "0x3071210b323096c2d1c7386e068d15f62f1ffa159883a599584f95919e1f2b2d", + "address": "0xd934a7c03D6fA022321565f2042EC37bD26Baf3c", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000018bdb05dd1a95677f4381cfb4db52d342df5c00d" + ], + "data": "0x", + "logIndex": 2, + "blockHash": "0xe93a3273367e39329d04772acf526bf3a8430ab51277b948dd29733dd2bcdde9" + }, + { + "transactionIndex": 1, + "blockNumber": 10537900, + "transactionHash": "0x3071210b323096c2d1c7386e068d15f62f1ffa159883a599584f95919e1f2b2d", + "address": "0xd934a7c03D6fA022321565f2042EC37bD26Baf3c", + "topics": ["0x66fd58e82f7b31a2a5c30e0888f3093efe4e111b00cd2b0c31fe014601293aa0"], + "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000092a6bcd9987eb8689152c5a89bcc5c03305139e3", + "logIndex": 3, + "blockHash": "0xe93a3273367e39329d04772acf526bf3a8430ab51277b948dd29733dd2bcdde9" + }, + { + "transactionIndex": 1, + "blockNumber": 10537900, + "transactionHash": "0x3071210b323096c2d1c7386e068d15f62f1ffa159883a599584f95919e1f2b2d", + "address": "0xd934a7c03D6fA022321565f2042EC37bD26Baf3c", + "topics": ["0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498"], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 4, + "blockHash": "0xe93a3273367e39329d04772acf526bf3a8430ab51277b948dd29733dd2bcdde9" + }, + { + "transactionIndex": 1, + "blockNumber": 10537900, + "transactionHash": "0x3071210b323096c2d1c7386e068d15f62f1ffa159883a599584f95919e1f2b2d", + "address": "0xd934a7c03D6fA022321565f2042EC37bD26Baf3c", + "topics": ["0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f"], + "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000039dbb4f255508995cc509e6fdab2ab1c286f5766", + "logIndex": 5, + "blockHash": "0xe93a3273367e39329d04772acf526bf3a8430ab51277b948dd29733dd2bcdde9" + } + ], + "blockNumber": 10537900, + "cumulativeGasUsed": "711502", + "status": 1, + "byzantium": true + }, + "args": [ + "0x09f0Cf4eD50ed01994900CE9ee1ae85BFECd5c66", + "0x39dBB4f255508995cc509E6fDAb2Ab1C286F5766", + "0xc4d66de800000000000000000000000092a6bcd9987eb8689152c5a89bcc5c03305139e3" + ], + "numDeployments": 1, + "solcInputHash": "e5536fb1b5f4db72d1c808989021a017", + "metadata": "{\"compiler\":{\"version\":\"0.8.25+commit.b61c2a91\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"implementation_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"details\":\"This contract implements a proxy that is upgradeable by an admin. To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing], which can potentially be used in an attack, this contract uses the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two things that go hand in hand: 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if that call matches one of the admin functions exposed by the proxy itself. 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the implementation. If the admin tries to call a function on the implementation it will fail with an error that says \\\"admin cannot fallback to proxy target\\\". These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to call a function from the proxy implementation. Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\",\"events\":{\"AdminChanged(address,address)\":{\"details\":\"Emitted when the admin account has changed.\"},\"BeaconUpgraded(address)\":{\"details\":\"Emitted when the beacon is upgraded.\"},\"Upgraded(address)\":{\"details\":\"Emitted when the implementation is upgraded.\"}},\"kind\":\"dev\",\"methods\":{\"admin()\":{\"details\":\"Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\"},\"constructor\":{\"details\":\"Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\"},\"implementation()\":{\"details\":\"Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\"},\"upgradeTo(address)\":{\"details\":\"Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"hardhat-deploy/solc_0.8/proxy/OptimizedTransparentUpgradeableProxy.sol\":\"OptimizedTransparentUpgradeableProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"hardhat-deploy/solc_0.8/openzeppelin/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822Proxiable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x93b4e21c931252739a1ec13ea31d3d35a5c068be3163ccab83e4d70c40355f03\",\"license\":\"MIT\"},\"hardhat-deploy/solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Proxy.sol\\\";\\nimport \\\"./ERC1967Upgrade.sol\\\";\\n\\n/**\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\n * implementation behind the proxy.\\n */\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\n * function call, and allows initializating the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n assert(_IMPLEMENTATION_SLOT == bytes32(uint256(keccak256(\\\"eip1967.proxy.implementation\\\")) - 1));\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation() internal view virtual override returns (address impl) {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0x6309f9f39dc6f4f45a24f296543867aa358e32946cd6b2874627a996d606b3a0\",\"license\":\"MIT\"},\"hardhat-deploy/solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/StorageSlot.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967Upgrade {\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view virtual returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(Address.isContract(IBeacon(newBeacon).implementation()), \\\"ERC1967: beacon implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x17668652127feebed0ce8d9431ef95ccc8c4292f03e3b8cf06c6ca16af396633\",\"license\":\"MIT\"},\"hardhat-deploy/solc_0.8/openzeppelin/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overriden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internall call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overriden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0xd5d1fd16e9faff7fcb3a52e02a8d49156f42a38a03f07b5f1810c21c2149a8ab\",\"license\":\"MIT\"},\"hardhat-deploy/solc_0.8/openzeppelin/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeacon {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\"},\"hardhat-deploy/solc_0.8/openzeppelin/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x3777e696b62134e6177440dbe6e6601c0c156a443f57167194b67e75527439de\",\"license\":\"MIT\"},\"hardhat-deploy/solc_0.8/openzeppelin/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xfe1b7a9aa2a530a9e705b220e26cd584e2fbdc9602a3a1066032b12816b46aca\",\"license\":\"MIT\"},\"hardhat-deploy/solc_0.8/proxy/OptimizedTransparentUpgradeableProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/transparent/TransparentUpgradeableProxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../openzeppelin/proxy/ERC1967/ERC1967Proxy.sol\\\";\\n\\n/**\\n * @dev This contract implements a proxy that is upgradeable by an admin.\\n *\\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\\n * clashing], which can potentially be used in an attack, this contract uses the\\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\\n * things that go hand in hand:\\n *\\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\\n * that call matches one of the admin functions exposed by the proxy itself.\\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\\n * \\\"admin cannot fallback to proxy target\\\".\\n *\\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\\n * to sudden errors when trying to call a function from the proxy implementation.\\n *\\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\\n */\\ncontract OptimizedTransparentUpgradeableProxy is ERC1967Proxy {\\n address internal immutable _ADMIN;\\n\\n /**\\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\\n */\\n constructor(\\n address _logic,\\n address admin_,\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {\\n assert(_ADMIN_SLOT == bytes32(uint256(keccak256(\\\"eip1967.proxy.admin\\\")) - 1));\\n _ADMIN = admin_;\\n\\n // still store it to work with EIP-1967\\n bytes32 slot = _ADMIN_SLOT;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n sstore(slot, admin_)\\n }\\n emit AdminChanged(address(0), admin_);\\n }\\n\\n /**\\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\\n */\\n modifier ifAdmin() {\\n if (msg.sender == _getAdmin()) {\\n _;\\n } else {\\n _fallback();\\n }\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\\n */\\n function admin() external ifAdmin returns (address admin_) {\\n admin_ = _getAdmin();\\n }\\n\\n /**\\n * @dev Returns the current implementation.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\\n */\\n function implementation() external ifAdmin returns (address implementation_) {\\n implementation_ = _implementation();\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\\n */\\n function upgradeTo(address newImplementation) external ifAdmin {\\n _upgradeToAndCall(newImplementation, bytes(\\\"\\\"), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\\n * proxied contract.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\\n */\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin {\\n _upgradeToAndCall(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _admin() internal view virtual returns (address) {\\n return _getAdmin();\\n }\\n\\n /**\\n * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.\\n */\\n function _beforeFallback() internal virtual override {\\n require(msg.sender != _getAdmin(), \\\"TransparentUpgradeableProxy: admin cannot fallback to proxy target\\\");\\n super._beforeFallback();\\n }\\n\\n function _getAdmin() internal view virtual override returns (address) {\\n return _ADMIN;\\n }\\n}\\n\",\"keccak256\":\"0xa30117644e27fa5b49e162aae2f62b36c1aca02f801b8c594d46e2024963a534\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60a0604052604051610ea3380380610ea3833981016040819052610022916103d2565b828161004f60017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd6104a2565b600080516020610e5c8339815191521461006b5761006b6104c3565b61007782826000610128565b506100a5905060017fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61046104a2565b600080516020610e3c833981519152146100c1576100c16104c3565b6001600160a01b0382166080819052600080516020610e3c8339815191528381556040805160008152602081019390935290917f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f910160405180910390a150505050610528565b61013183610154565b60008251118061013e5750805b1561014f5761014d8383610194565b505b505050565b61015d816101c2565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606101b98383604051806060016040528060278152602001610e7c60279139610263565b90505b92915050565b6001600160a01b0381163b6102345760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b600080516020610e5c83398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b60606001600160a01b0384163b6102cb5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b606482015260840161022b565b600080856001600160a01b0316856040516102e691906104d9565b600060405180830381855af49150503d8060008114610321576040519150601f19603f3d011682016040523d82523d6000602084013e610326565b606091505b509092509050610337828286610343565b925050505b9392505050565b6060831561035257508161033c565b8251156103625782518084602001fd5b8160405162461bcd60e51b815260040161022b91906104f5565b80516001600160a01b038116811461039357600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b838110156103c95781810151838201526020016103b1565b50506000910152565b6000806000606084860312156103e757600080fd5b6103f08461037c565b92506103fe6020850161037c565b60408501519092506001600160401b038082111561041b57600080fd5b818601915086601f83011261042f57600080fd5b81518181111561044157610441610398565b604051601f8201601f19908116603f0116810190838211818310171561046957610469610398565b8160405282815289602084870101111561048257600080fd5b6104938360208301602088016103ae565b80955050505050509250925092565b818103818111156101bc57634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052600160045260246000fd5b600082516104eb8184602087016103ae565b9190910192915050565b60208152600082518060208401526105148160408501602087016103ae565b601f01601f19169190910160400192915050565b6080516108d76105656000396000818160fc0152818161015f015281816101ee015281816102450152818161028301526102a701526108d76000f3fe6080604052600436106100435760003560e01c80633659cfe61461005a5780634f1ef2861461007a5780635c60da1b1461008d578063f851a440146100cb57610052565b36610052576100506100e0565b005b6100506100e0565b34801561006657600080fd5b5061005061007536600461074b565b6100fa565b610050610088366004610766565b61015d565b34801561009957600080fd5b506100a26101ea565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b3480156100d757600080fd5b506100a2610241565b6100e86102a5565b6100f86100f3610395565b6103d5565b565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16330361015557610152816040518060200160405280600081525060006103f9565b50565b6101526100e0565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1633036101e2576101dd8383838080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250600192506103f9915050565b505050565b6101dd6100e0565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16330361023657610231610395565b905090565b61023e6100e0565b90565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16330361023657507f000000000000000000000000000000000000000000000000000000000000000090565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1633036100f8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f7879207461726760648201527f6574000000000000000000000000000000000000000000000000000000000000608482015260a4015b60405180910390fd5b60006102317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b3660008037600080366000845af43d6000803e8080156103f4573d6000f35b3d6000fd5b61040283610424565b60008251118061040f5750805b156101dd5761041e8383610471565b50505050565b61042d8161049d565b60405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6060610496838360405180606001604052806027815260200161087b602791396105a7565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff81163b610541576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e747261637400000000000000000000000000000000000000606482015260840161038c565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b606073ffffffffffffffffffffffffffffffffffffffff84163b61064d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e74726163740000000000000000000000000000000000000000000000000000606482015260840161038c565b6000808573ffffffffffffffffffffffffffffffffffffffff1685604051610675919061080d565b600060405180830381855af49150503d80600081146106b0576040519150601f19603f3d011682016040523d82523d6000602084013e6106b5565b606091505b50915091506106c58282866106cf565b9695505050505050565b606083156106de575081610496565b8251156106ee5782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161038c9190610829565b803573ffffffffffffffffffffffffffffffffffffffff8116811461074657600080fd5b919050565b60006020828403121561075d57600080fd5b61049682610722565b60008060006040848603121561077b57600080fd5b61078484610722565b9250602084013567ffffffffffffffff808211156107a157600080fd5b818601915086601f8301126107b557600080fd5b8135818111156107c457600080fd5b8760208285010111156107d657600080fd5b6020830194508093505050509250925092565b60005b838110156108045781810151838201526020016107ec565b50506000910152565b6000825161081f8184602087016107e9565b9190910192915050565b60208152600082518060208401526108488160408501602087016107e9565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212200136fd34dfdb0d97935b77a84c836b17bf901cefa29ed5b1ef847b08c6cba8d064736f6c63430008190033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "deployedBytecode": "0x6080604052600436106100435760003560e01c80633659cfe61461005a5780634f1ef2861461007a5780635c60da1b1461008d578063f851a440146100cb57610052565b36610052576100506100e0565b005b6100506100e0565b34801561006657600080fd5b5061005061007536600461074b565b6100fa565b610050610088366004610766565b61015d565b34801561009957600080fd5b506100a26101ea565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b3480156100d757600080fd5b506100a2610241565b6100e86102a5565b6100f86100f3610395565b6103d5565b565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16330361015557610152816040518060200160405280600081525060006103f9565b50565b6101526100e0565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1633036101e2576101dd8383838080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250600192506103f9915050565b505050565b6101dd6100e0565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16330361023657610231610395565b905090565b61023e6100e0565b90565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16330361023657507f000000000000000000000000000000000000000000000000000000000000000090565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1633036100f8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f7879207461726760648201527f6574000000000000000000000000000000000000000000000000000000000000608482015260a4015b60405180910390fd5b60006102317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b3660008037600080366000845af43d6000803e8080156103f4573d6000f35b3d6000fd5b61040283610424565b60008251118061040f5750805b156101dd5761041e8383610471565b50505050565b61042d8161049d565b60405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6060610496838360405180606001604052806027815260200161087b602791396105a7565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff81163b610541576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e747261637400000000000000000000000000000000000000606482015260840161038c565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b606073ffffffffffffffffffffffffffffffffffffffff84163b61064d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e74726163740000000000000000000000000000000000000000000000000000606482015260840161038c565b6000808573ffffffffffffffffffffffffffffffffffffffff1685604051610675919061080d565b600060405180830381855af49150503d80600081146106b0576040519150601f19603f3d011682016040523d82523d6000602084013e6106b5565b606091505b50915091506106c58282866106cf565b9695505050505050565b606083156106de575081610496565b8251156106ee5782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161038c9190610829565b803573ffffffffffffffffffffffffffffffffffffffff8116811461074657600080fd5b919050565b60006020828403121561075d57600080fd5b61049682610722565b60008060006040848603121561077b57600080fd5b61078484610722565b9250602084013567ffffffffffffffff808211156107a157600080fd5b818601915086601f8301126107b557600080fd5b8135818111156107c457600080fd5b8760208285010111156107d657600080fd5b6020830194508093505050509250925092565b60005b838110156108045781810151838201526020016107ec565b50506000910152565b6000825161081f8184602087016107e9565b9190910192915050565b60208152600082518060208401526108488160408501602087016107e9565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212200136fd34dfdb0d97935b77a84c836b17bf901cefa29ed5b1ef847b08c6cba8d064736f6c63430008190033", + "execute": { + "methodName": "initialize", + "args": ["0x92A6BCD9987Eb8689152C5A89BCC5c03305139E3"] + }, + "implementation": "0x09f0Cf4eD50ed01994900CE9ee1ae85BFECd5c66", + "devdoc": { + "details": "This contract implements a proxy that is upgradeable by an admin. To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing], which can potentially be used in an attack, this contract uses the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two things that go hand in hand: 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if that call matches one of the admin functions exposed by the proxy itself. 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the implementation. If the admin tries to call a function on the implementation it will fail with an error that says \"admin cannot fallback to proxy target\". These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to call a function from the proxy implementation. Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.", + "events": { + "AdminChanged(address,address)": { + "details": "Emitted when the admin account has changed." + }, + "BeaconUpgraded(address)": { + "details": "Emitted when the beacon is upgraded." + }, + "Upgraded(address)": { + "details": "Emitted when the implementation is upgraded." + } + }, + "kind": "dev", + "methods": { + "admin()": { + "details": "Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`" + }, + "constructor": { + "details": "Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}." + }, + "implementation()": { + "details": "Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`" + }, + "upgradeTo(address)": { + "details": "Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}." + }, + "upgradeToAndCall(address,bytes)": { + "details": "Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} diff --git a/deployments/berachainbartio/OmnichainExecutorOwner_Implementation.json b/deployments/berachainbartio/OmnichainExecutorOwner_Implementation.json new file mode 100644 index 00000000..70ea3eef --- /dev/null +++ b/deployments/berachainbartio/OmnichainExecutorOwner_Implementation.json @@ -0,0 +1,600 @@ +{ + "address": "0x09f0Cf4eD50ed01994900CE9ee1ae85BFECd5c66", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "omnichainGovernanceExecutor_", + "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": true, + "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": "OMNICHAIN_GOVERNANCE_EXECUTOR", + "outputs": [ + { + "internalType": "contract IOmnichainGovernanceExecutor", + "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": "uint16", + "name": "srcChainId_", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "srcAddress_", + "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" + } + ], + "transactionHash": "0x2749609f44f7276d43ca7d2440483da0de526a75a1293da352b4af583bfa6ba4", + "receipt": { + "to": null, + "from": "0x18BDb05DD1A95677f4381cfb4db52D342dF5C00d", + "contractAddress": "0x09f0Cf4eD50ed01994900CE9ee1ae85BFECd5c66", + "transactionIndex": 1, + "gasUsed": "1549033", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000800000000000000000000080000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x7a0a1b16365f82b14d06a269b1c5411dcc38e4331e55a8481966d01898a7d8f0", + "transactionHash": "0x2749609f44f7276d43ca7d2440483da0de526a75a1293da352b4af583bfa6ba4", + "logs": [ + { + "transactionIndex": 1, + "blockNumber": 10537895, + "transactionHash": "0x2749609f44f7276d43ca7d2440483da0de526a75a1293da352b4af583bfa6ba4", + "address": "0x09f0Cf4eD50ed01994900CE9ee1ae85BFECd5c66", + "topics": ["0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498"], + "data": "0x00000000000000000000000000000000000000000000000000000000000000ff", + "logIndex": 1, + "blockHash": "0x7a0a1b16365f82b14d06a269b1c5411dcc38e4331e55a8481966d01898a7d8f0" + } + ], + "blockNumber": 10537895, + "cumulativeGasUsed": "1599629", + "status": 1, + "byzantium": true + }, + "args": ["0xc80E4112940efF40c8626bAc0D8E79cB7dAbe289"], + "numDeployments": 1, + "solcInputHash": "9f400d4fd6f6fcf916824838bc678e25", + "metadata": "{\"compiler\":{\"version\":\"0.8.25+commit.b61c2a91\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"omnichainGovernanceExecutor_\",\"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\":true,\"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\":\"OMNICHAIN_GOVERNANCE_EXECUTOR\",\"outputs\":[{\"internalType\":\"contract IOmnichainGovernanceExecutor\",\"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\":\"uint16\",\"name\":\"srcChainId_\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"srcAddress_\",\"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\"}],\"devdoc\":{\"author\":\"Venus\",\"custom:security-contact\":\"https://github.com/VenusProtocol/governance-contracts#discussion\",\"events\":{\"Initialized(uint8)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"}},\"kind\":\"dev\",\"methods\":{\"acceptOwnership()\":{\"details\":\"The new owner accepts the ownership transfer.\"},\"constructor\":{\"custom:oz-upgrades-unsafe-allow\":\"constructor\"},\"initialize(address)\":{\"params\":{\"accessControlManager_\":\"Address of access control manager\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"pendingOwner()\":{\"details\":\"Returns the address of the pending owner.\"},\"setAccessControlManager(address)\":{\"custom:access\":\"Only Governance\",\"custom:event\":\"Emits NewAccessControlManager event\",\"details\":\"Admin function to set address of AccessControlManager\",\"params\":{\"accessControlManager_\":\"The new address of the AccessControlManager\"}},\"setTrustedRemoteAddress(uint16,bytes)\":{\"custom:access\":\"Controlled by AccessControlManager\",\"custom:event\":\"Emits SetTrustedRemoteAddress with source chain Id and source address\",\"params\":{\"srcAddress_\":\"The address of the contract on the source chain\",\"srcChainId_\":\"The LayerZero id of a source chain\"}},\"transferBridgeOwnership(address)\":{\"custom:access\":\"Controlled by AccessControlManager\",\"params\":{\"newOwner_\":\"New owner of the governanceExecutor\"}},\"transferOwnership(address)\":{\"details\":\"Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one. Can only be called by the current owner.\"},\"upsertSignature(string[],bool[])\":{\"custom:access\":\"Only owner\",\"params\":{\"active_\":\"bool value, should be true to add function\",\"signatures_\":\"Function signature to be added or removed\"}}},\"stateVariables\":{\"OMNICHAIN_GOVERNANCE_EXECUTOR\":{\"custom:oz-upgrades-unsafe-allow\":\"state-variable-immutable\"}},\"title\":\"OmnichainExecutorOwner\",\"version\":1},\"userdoc\":{\"errors\":{\"Unauthorized(address,address,string)\":[{\"notice\":\"Thrown when the action is prohibited by AccessControlManager\"}],\"ZeroAddressNotAllowed()\":[{\"notice\":\"Thrown if the supplied address is a zero address where it is not allowed\"}]},\"events\":{\"FunctionRegistryChanged(string,bool)\":{\"notice\":\"Event emitted when function registry updated\"},\"NewAccessControlManager(address,address)\":{\"notice\":\"Emitted when access control manager contract address is changed\"}},\"kind\":\"user\",\"methods\":{\"accessControlManager()\":{\"notice\":\"Returns the address of the access control manager contract\"},\"functionRegistry(bytes4)\":{\"notice\":\"Stores function signature corresponding to their 4 bytes hash value\"},\"initialize(address)\":{\"notice\":\"Initialize the contract\"},\"renounceOwnership()\":{\"notice\":\"Empty implementation of renounce ownership to avoid any mishappening\"},\"setAccessControlManager(address)\":{\"notice\":\"Sets the address of AccessControlManager\"},\"setTrustedRemoteAddress(uint16,bytes)\":{\"notice\":\"Sets the source message sender address\"},\"transferBridgeOwnership(address)\":{\"notice\":\"This function transfer the ownership of the executor from this contract to new owner\"},\"upsertSignature(string[],bool[])\":{\"notice\":\"A registry of functions that are allowed to be executed from proposals\"}},\"notice\":\"OmnichainProposalSender contract acts as a governance and access control mechanism, allowing owner to upsert signature of OmnichainGovernanceExecutor contract, also contains function to transfer the ownership of contract as well.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/Cross-chain/OmnichainExecutorOwner.sol\":\"OmnichainExecutorOwner\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (access/Ownable2Step.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./OwnableUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which provides access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership} and {acceptOwnership}.\\n *\\n * This module is used through inheritance. It will make available all functions\\n * from parent (Ownable).\\n */\\nabstract contract Ownable2StepUpgradeable is Initializable, OwnableUpgradeable {\\n function __Ownable2Step_init() internal onlyInitializing {\\n __Ownable_init_unchained();\\n }\\n\\n function __Ownable2Step_init_unchained() internal onlyInitializing {\\n }\\n address private _pendingOwner;\\n\\n event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Returns the address of the pending owner.\\n */\\n function pendingOwner() public view virtual returns (address) {\\n return _pendingOwner;\\n }\\n\\n /**\\n * @dev Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one.\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual override onlyOwner {\\n _pendingOwner = newOwner;\\n emit OwnershipTransferStarted(owner(), newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`) and deletes any pending owner.\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual override {\\n delete _pendingOwner;\\n super._transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev The new owner accepts the ownership transfer.\\n */\\n function acceptOwnership() external {\\n address sender = _msgSender();\\n require(pendingOwner() == sender, \\\"Ownable2Step: caller is not the new owner\\\");\\n _transferOwnership(sender);\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0xd712fb45b3ea0ab49679164e3895037adc26ce12879d5184feb040e01c1c07a9\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n function __Ownable_init() internal onlyInitializing {\\n __Ownable_init_unchained();\\n }\\n\\n function __Ownable_init_unchained() internal onlyInitializing {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x247c62047745915c0af6b955470a72d1696ebad4352d7d3011aef1a2463cd888\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.1) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized < type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint8) {\\n return _initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _initializing;\\n }\\n}\\n\",\"keccak256\":\"0x037c334add4b033ad3493038c25be1682d78c00992e1acb0e2795caff3925271\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2edcb41c121abc510932e8d83ff8b82cf9cdde35e7c297622f5c29ef0af25183\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract ContextUpgradeable is Initializable {\\n function __Context_init() internal onlyInitializing {\\n }\\n\\n function __Context_init_unchained() internal onlyInitializing {\\n }\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x963ea7f0b48b032eef72fe3a7582edf78408d6f834115b9feadd673a4d5bd149\",\"license\":\"MIT\"},\"@openzeppelin/contracts/access/IAccessControl.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev External interface of AccessControl declared to support ERC165 detection.\\n */\\ninterface IAccessControl {\\n /**\\n * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\\n *\\n * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\\n * {RoleAdminChanged} not being emitted signaling this.\\n *\\n * _Available since v3.1._\\n */\\n event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\\n\\n /**\\n * @dev Emitted when `account` is granted `role`.\\n *\\n * `sender` is the account that originated the contract call, an admin role\\n * bearer except when using {AccessControl-_setupRole}.\\n */\\n event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Emitted when `account` is revoked `role`.\\n *\\n * `sender` is the account that originated the contract call:\\n * - if using `revokeRole`, it is the admin role bearer\\n * - if using `renounceRole`, it is the role bearer (i.e. `account`)\\n */\\n event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) external view returns (bool);\\n\\n /**\\n * @dev Returns the admin role that controls `role`. See {grantRole} and\\n * {revokeRole}.\\n *\\n * To change a role's admin, use {AccessControl-_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) external view returns (bytes32);\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function grantRole(bytes32 role, address account) external;\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function revokeRole(bytes32 role, address account) external;\\n\\n /**\\n * @dev Revokes `role` from the calling account.\\n *\\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\\n * purpose is to provide a mechanism for accounts to lose their privileges\\n * if they are compromised (such as when a trusted device is misplaced).\\n *\\n * If the calling account had been granted `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n */\\n function renounceRole(bytes32 role, address account) external;\\n}\\n\",\"keccak256\":\"0x59ce320a585d7e1f163cd70390a0ef2ff9cec832e2aa544293a00692465a7a57\",\"license\":\"MIT\"},\"@venusprotocol/solidity-utilities/contracts/validators.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.25;\\n\\n/// @notice Thrown if the supplied address is a zero address where it is not allowed\\nerror ZeroAddressNotAllowed();\\n\\n/// @notice Thrown if the supplied value is 0 where it is not allowed\\nerror ZeroValueNotAllowed();\\n\\n/// @notice Checks if the provided address is nonzero, reverts otherwise\\n/// @param address_ Address to check\\n/// @custom:error ZeroAddressNotAllowed is thrown if the provided address is a zero address\\nfunction ensureNonzeroAddress(address address_) pure {\\n if (address_ == address(0)) {\\n revert ZeroAddressNotAllowed();\\n }\\n}\\n\\n/// @notice Checks if the provided value is nonzero, reverts otherwise\\n/// @param value_ Value to check\\n/// @custom:error ZeroValueNotAllowed is thrown if the provided value is 0\\nfunction ensureNonzeroValue(uint256 value_) pure {\\n if (value_ == 0) {\\n revert ZeroValueNotAllowed();\\n }\\n}\\n\",\"keccak256\":\"0xdb88e14d50dd21889ca3329d755673d022c47e8da005b6a545c7f69c2c4b7b86\",\"license\":\"BSD-3-Clause\"},\"contracts/Cross-chain/OmnichainExecutorOwner.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.25;\\n\\nimport { AccessControlledV8 } from \\\"../Governance/AccessControlledV8.sol\\\";\\nimport { IOmnichainGovernanceExecutor } from \\\"./interfaces/IOmnichainGovernanceExecutor.sol\\\";\\nimport { ensureNonzeroAddress } from \\\"@venusprotocol/solidity-utilities/contracts/validators.sol\\\";\\n\\n/**\\n * @title OmnichainExecutorOwner\\n * @author Venus\\n * @notice OmnichainProposalSender contract acts as a governance and access control mechanism,\\n * allowing owner to upsert signature of OmnichainGovernanceExecutor contract,\\n * also contains function to transfer the ownership of contract as well.\\n * @custom:security-contact https://github.com/VenusProtocol/governance-contracts#discussion\\n */\\n\\ncontract OmnichainExecutorOwner is AccessControlledV8 {\\n /**\\n * @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n */\\n IOmnichainGovernanceExecutor public immutable OMNICHAIN_GOVERNANCE_EXECUTOR;\\n\\n /**\\n * @notice Stores function signature corresponding to their 4 bytes hash value\\n */\\n mapping(bytes4 => string) public functionRegistry;\\n\\n /**\\n * @notice Event emitted when function registry updated\\n */\\n event FunctionRegistryChanged(string indexed signature, bool active);\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor(address omnichainGovernanceExecutor_) {\\n require(omnichainGovernanceExecutor_ != address(0), \\\"Address must not be zero\\\");\\n OMNICHAIN_GOVERNANCE_EXECUTOR = IOmnichainGovernanceExecutor(omnichainGovernanceExecutor_);\\n _disableInitializers();\\n }\\n\\n /**\\n * @notice Initialize the contract\\n * @param accessControlManager_ Address of access control manager\\n */\\n function initialize(address accessControlManager_) external initializer {\\n require(accessControlManager_ != address(0), \\\"Address must not be zero\\\");\\n __AccessControlled_init(accessControlManager_);\\n }\\n\\n /**\\n * @notice Sets the source message sender address\\n * @param srcChainId_ The LayerZero id of a source chain\\n * @param srcAddress_ The address of the contract on the source chain\\n * @custom:access Controlled by AccessControlManager\\n * @custom:event Emits SetTrustedRemoteAddress with source chain Id and source address\\n */\\n function setTrustedRemoteAddress(uint16 srcChainId_, bytes calldata srcAddress_) external {\\n _checkAccessAllowed(\\\"setTrustedRemoteAddress(uint16,bytes)\\\");\\n require(srcChainId_ != 0, \\\"ChainId must not be zero\\\");\\n ensureNonzeroAddress(address(uint160(bytes20(srcAddress_))));\\n require(srcAddress_.length == 20, \\\"Source address must be 20 bytes long\\\");\\n OMNICHAIN_GOVERNANCE_EXECUTOR.setTrustedRemoteAddress(srcChainId_, srcAddress_);\\n }\\n\\n /**\\n * @notice Invoked when called function does not exist in the contract\\n * @param data_ Calldata containing the encoded function call\\n * @return Result of function call\\n * @custom:access Controlled by Access Control Manager\\n */\\n fallback(bytes calldata data_) external returns (bytes memory) {\\n string memory fun = functionRegistry[msg.sig];\\n require(bytes(fun).length != 0, \\\"Function not found\\\");\\n _checkAccessAllowed(fun);\\n (bool ok, bytes memory res) = address(OMNICHAIN_GOVERNANCE_EXECUTOR).call(data_);\\n require(ok, \\\"call failed\\\");\\n return res;\\n }\\n\\n /**\\n * @notice A registry of functions that are allowed to be executed from proposals\\n * @param signatures_ Function signature to be added or removed\\n * @param active_ bool value, should be true to add function\\n * @custom:access Only owner\\n */\\n function upsertSignature(string[] calldata signatures_, bool[] calldata active_) external onlyOwner {\\n uint256 signatureLength = signatures_.length;\\n require(signatureLength == active_.length, \\\"Input arrays must have the same length\\\");\\n for (uint256 i; i < signatureLength; ++i) {\\n bytes4 sigHash = bytes4(keccak256(bytes(signatures_[i])));\\n bytes memory signature = bytes(functionRegistry[sigHash]);\\n if (active_[i] && signature.length == 0) {\\n functionRegistry[sigHash] = signatures_[i];\\n emit FunctionRegistryChanged(signatures_[i], true);\\n } else if (!active_[i] && signature.length != 0) {\\n delete functionRegistry[sigHash];\\n emit FunctionRegistryChanged(signatures_[i], false);\\n }\\n }\\n }\\n\\n /**\\n * @notice This function transfer the ownership of the executor from this contract to new owner\\n * @param newOwner_ New owner of the governanceExecutor\\n * @custom:access Controlled by AccessControlManager\\n */\\n\\n function transferBridgeOwnership(address newOwner_) external {\\n _checkAccessAllowed(\\\"transferBridgeOwnership(address)\\\");\\n require(newOwner_ != address(0), \\\"Address must not be zero\\\");\\n OMNICHAIN_GOVERNANCE_EXECUTOR.transferOwnership(newOwner_);\\n }\\n\\n /**\\n * @notice Empty implementation of renounce ownership to avoid any mishappening\\n */\\n function renounceOwnership() public virtual override {}\\n}\\n\",\"keccak256\":\"0xc04fcc16654a57743f1b515fc61aeed0bfe67e456c72e5cce7ff613439133109\",\"license\":\"BSD-3-Clause\"},\"contracts/Cross-chain/interfaces/IOmnichainGovernanceExecutor.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.25;\\n\\ninterface IOmnichainGovernanceExecutor {\\n /**\\n * @notice Transfers ownership of the contract to the specified address\\n * @param addr The address to which ownership will be transferred\\n */\\n function transferOwnership(address addr) external;\\n\\n /**\\n * @notice Sets the source message sender address\\n * @param srcChainId_ The LayerZero id of a source chain\\n * @param srcAddress_ The address of the contract on the source chain\\n */\\n function setTrustedRemoteAddress(uint16 srcChainId_, bytes calldata srcAddress_) external;\\n}\\n\",\"keccak256\":\"0xae3df89cc760968a190e3d723211a643c2aa49c54c0579a1e17db4fc27bf24cb\",\"license\":\"MIT\"},\"contracts/Governance/AccessControlledV8.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.25;\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol\\\";\\n\\nimport \\\"./IAccessControlManagerV8.sol\\\";\\n\\n/**\\n * @title AccessControlledV8\\n * @author Venus\\n * @notice This contract is helper between access control manager and actual contract. This contract further inherited by other contract (using solidity 0.8.13)\\n * to integrate access controlled mechanism. It provides initialise methods and verifying access methods.\\n */\\nabstract contract AccessControlledV8 is Initializable, Ownable2StepUpgradeable {\\n /// @notice Access control manager contract\\n IAccessControlManagerV8 private _accessControlManager;\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n\\n /// @notice Emitted when access control manager contract address is changed\\n event NewAccessControlManager(address oldAccessControlManager, address newAccessControlManager);\\n\\n /// @notice Thrown when the action is prohibited by AccessControlManager\\n error Unauthorized(address sender, address calledContract, string methodSignature);\\n\\n function __AccessControlled_init(address accessControlManager_) internal onlyInitializing {\\n __Ownable2Step_init();\\n __AccessControlled_init_unchained(accessControlManager_);\\n }\\n\\n function __AccessControlled_init_unchained(address accessControlManager_) internal onlyInitializing {\\n _setAccessControlManager(accessControlManager_);\\n }\\n\\n /**\\n * @notice Sets the address of AccessControlManager\\n * @dev Admin function to set address of AccessControlManager\\n * @param accessControlManager_ The new address of the AccessControlManager\\n * @custom:event Emits NewAccessControlManager event\\n * @custom:access Only Governance\\n */\\n function setAccessControlManager(address accessControlManager_) external onlyOwner {\\n _setAccessControlManager(accessControlManager_);\\n }\\n\\n /**\\n * @notice Returns the address of the access control manager contract\\n */\\n function accessControlManager() external view returns (IAccessControlManagerV8) {\\n return _accessControlManager;\\n }\\n\\n /**\\n * @dev Internal function to set address of AccessControlManager\\n * @param accessControlManager_ The new address of the AccessControlManager\\n */\\n function _setAccessControlManager(address accessControlManager_) internal {\\n require(address(accessControlManager_) != address(0), \\\"invalid acess control manager address\\\");\\n address oldAccessControlManager = address(_accessControlManager);\\n _accessControlManager = IAccessControlManagerV8(accessControlManager_);\\n emit NewAccessControlManager(oldAccessControlManager, accessControlManager_);\\n }\\n\\n /**\\n * @notice Reverts if the call is not allowed by AccessControlManager\\n * @param signature Method signature\\n */\\n function _checkAccessAllowed(string memory signature) internal view {\\n bool isAllowedToCall = _accessControlManager.isAllowedToCall(msg.sender, signature);\\n\\n if (!isAllowedToCall) {\\n revert Unauthorized(msg.sender, address(this), signature);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x0dcf283925f4dddc23ca0ee71d2cb96a9dd6e4cf08061b69fde1697ea39dc514\",\"license\":\"BSD-3-Clause\"},\"contracts/Governance/IAccessControlManagerV8.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity ^0.8.25;\\n\\nimport \\\"@openzeppelin/contracts/access/IAccessControl.sol\\\";\\n\\n/**\\n * @title IAccessControlManagerV8\\n * @author Venus\\n * @notice Interface implemented by the `AccessControlManagerV8` contract.\\n */\\ninterface IAccessControlManagerV8 is IAccessControl {\\n function giveCallPermission(address contractAddress, string calldata functionSig, address accountToPermit) external;\\n\\n function revokeCallPermission(\\n address contractAddress,\\n string calldata functionSig,\\n address accountToRevoke\\n ) external;\\n\\n function isAllowedToCall(address account, string calldata functionSig) external view returns (bool);\\n\\n function hasPermission(\\n address account,\\n address contractAddress,\\n string calldata functionSig\\n ) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xaa29b098440d0b3a131c5ecdf25ce548790c1b5ac7bf9b5c0264b6af6f7a1e0b\",\"license\":\"BSD-3-Clause\"}},\"version\":1}", + "bytecode": "0x60a060405234801561001057600080fd5b50604051611c6d380380611c6d83398101604081905261002f91610161565b6001600160a01b03811661008a5760405162461bcd60e51b815260206004820152601860248201527f41646472657373206d757374206e6f74206265207a65726f000000000000000060448201526064015b60405180910390fd5b6001600160a01b03811660805261009f6100a5565b50610191565b600054610100900460ff161561010d5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b6064820152608401610081565b60005460ff908116101561015f576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b60006020828403121561017357600080fd5b81516001600160a01b038116811461018a57600080fd5b9392505050565b608051611aac6101c16000396000818161020701528181610357015281816106aa0152610c640152611aac6000f3fe608060405234801561001057600080fd5b50600436106100df5760003560e01c806379ba50971161008c578063b4a0bdf311610066578063b4a0bdf3146103d7578063c4d66de8146103f5578063e30c397814610408578063f2fde38b14610426576100df565b806379ba50971461039e5780638da5cb5b146103a6578063a6c3d165146103c4576100df565b80634bb7453e116100bd5780634bb7453e1461033f5780635f21f75e14610352578063715018a614610301576100df565b80630e32cb86146102ee578063180d295c146103035780633f90b5401461032c575b600080357fffffffff0000000000000000000000000000000000000000000000000000000016815260c9602052604081208054369160609184919061012390611429565b80601f016020809104026020016040519081016040528092919081815260200182805461014f90611429565b801561019c5780601f106101715761010080835404028352916020019161019c565b820191906000526020600020905b81548152906001019060200180831161017f57829003601f168201915b5050505050905080516000036101f95760405162461bcd60e51b815260206004820152601260248201527f46756e6374696f6e206e6f7420666f756e64000000000000000000000000000060448201526064015b60405180910390fd5b61020281610439565b6000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16868660405161024c92919061147c565b6000604051808303816000865af19150503d8060008114610289576040519150601f19603f3d011682016040523d82523d6000602084013e61028e565b606091505b5091509150816102e05760405162461bcd60e51b815260206004820152600b60248201527f63616c6c206661696c656400000000000000000000000000000000000000000060448201526064016101f0565b805195506020019350505050f35b6103016102fc36600461148c565b610516565b005b6103166103113660046114c9565b61052a565b604051610323919061156f565b60405180910390f35b61030161033a36600461148c565b6105c4565b61030161034d3660046115ce565b610709565b6103797f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610323565b610301610a90565b60335473ffffffffffffffffffffffffffffffffffffffff16610379565b6103016103d236600461163a565b610b28565b60975473ffffffffffffffffffffffffffffffffffffffff16610379565b61030161040336600461148c565b610cd4565b60655473ffffffffffffffffffffffffffffffffffffffff16610379565b61030161043436600461148c565b610eb1565b6097546040517f18c5e8ab00000000000000000000000000000000000000000000000000000000815260009173ffffffffffffffffffffffffffffffffffffffff16906318c5e8ab9061049290339086906004016116c6565b602060405180830381865afa1580156104af573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104d3919061170b565b905080610512573330836040517f4a3fa2930000000000000000000000000000000000000000000000000000000081526004016101f093929190611728565b5050565b61051e610f61565b61052781610fc8565b50565b60c9602052600090815260409020805461054390611429565b80601f016020809104026020016040519081016040528092919081815260200182805461056f90611429565b80156105bc5780601f10610591576101008083540402835291602001916105bc565b820191906000526020600020905b81548152906001019060200180831161059f57829003601f168201915b505050505081565b6106026040518060400160405280602081526020017f7472616e736665724272696467654f776e657273686970286164647265737329815250610439565b73ffffffffffffffffffffffffffffffffffffffff81166106655760405162461bcd60e51b815260206004820152601860248201527f41646472657373206d757374206e6f74206265207a65726f000000000000000060448201526064016101f0565b6040517ff2fde38b00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063f2fde38b90602401600060405180830381600087803b1580156106ee57600080fd5b505af1158015610702573d6000803e3d6000fd5b5050505050565b610711610f61565b828181146107875760405162461bcd60e51b815260206004820152602660248201527f496e70757420617272617973206d7573742068617665207468652073616d652060448201527f6c656e677468000000000000000000000000000000000000000000000000000060648201526084016101f0565b60005b81811015610a865760008686838181106107a6576107a661176a565b90506020028101906107b89190611799565b6040516107c692919061147c565b60408051918290039091207fffffffff000000000000000000000000000000000000000000000000000000008116600090815260c960205291822080549193509061081090611429565b80601f016020809104026020016040519081016040528092919081815260200182805461083c90611429565b80156108895780601f1061085e57610100808354040283529160200191610889565b820191906000526020600020905b81548152906001019060200180831161086c57829003601f168201915b505050505090508585848181106108a2576108a261176a565b90506020020160208101906108b791906117fe565b80156108c257508051155b1561099b578787848181106108d9576108d961176a565b90506020028101906108eb9190611799565b7fffffffff000000000000000000000000000000000000000000000000000000008416600090815260c96020526040902091610928919083611897565b5087878481811061093b5761093b61176a565b905060200281019061094d9190611799565b60405161095b92919061147c565b60405190819003812060018252907f9d424e54f4d851aabd288f6cc4946e5726d6b5c0e66ea4ef159a3c40bcc470fa9060200160405180910390a2610a7c565b8585848181106109ad576109ad61176a565b90506020020160208101906109c291906117fe565b1580156109cf5750805115155b15610a7c577fffffffff000000000000000000000000000000000000000000000000000000008216600090815260c960205260408120610a0e916113db565b878784818110610a2057610a2061176a565b9050602002810190610a329190611799565b604051610a4092919061147c565b60405190819003812060008252907f9d424e54f4d851aabd288f6cc4946e5726d6b5c0e66ea4ef159a3c40bcc470fa9060200160405180910390a25b505060010161078a565b505050505050565b565b606554339073ffffffffffffffffffffffffffffffffffffffff168114610b1f5760405162461bcd60e51b815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f74207468652060448201527f6e6577206f776e6572000000000000000000000000000000000000000000000060648201526084016101f0565b610527816110d0565b610b49604051806060016040528060258152602001611a5260259139610439565b8261ffff16600003610b9d5760405162461bcd60e51b815260206004820152601860248201527f436861696e4964206d757374206e6f74206265207a65726f000000000000000060448201526064016101f0565b610bb2610baa82846119b1565b60601c611101565b60148114610c275760405162461bcd60e51b8152602060048201526024808201527f536f757263652061646472657373206d7573742062652032302062797465732060448201527f6c6f6e670000000000000000000000000000000000000000000000000000000060648201526084016101f0565b6040517fa6c3d16500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063a6c3d16590610c9d908690869086906004016119f9565b600060405180830381600087803b158015610cb757600080fd5b505af1158015610ccb573d6000803e3d6000fd5b50505050505050565b600054610100900460ff1615808015610cf45750600054600160ff909116105b80610d0e5750303b158015610d0e575060005460ff166001145b610d805760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016101f0565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790558015610dde57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b73ffffffffffffffffffffffffffffffffffffffff8216610e415760405162461bcd60e51b815260206004820152601860248201527f41646472657373206d757374206e6f74206265207a65726f000000000000000060448201526064016101f0565b610e4a8261114e565b801561051257600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a15050565b610eb9610f61565b6065805473ffffffffffffffffffffffffffffffffffffffff83167fffffffffffffffffffffffff00000000000000000000000000000000000000009091168117909155610f1c60335473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b60335473ffffffffffffffffffffffffffffffffffffffff163314610a8e5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016101f0565b73ffffffffffffffffffffffffffffffffffffffff81166110515760405162461bcd60e51b815260206004820152602560248201527f696e76616c696420616365737320636f6e74726f6c206d616e6167657220616460448201527f647265737300000000000000000000000000000000000000000000000000000060648201526084016101f0565b6097805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff000000000000000000000000000000000000000083168117909355604080519190921680825260208201939093527f66fd58e82f7b31a2a5c30e0888f3093efe4e111b00cd2b0c31fe014601293aa09101610ea5565b606580547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055610527816111dc565b73ffffffffffffffffffffffffffffffffffffffff8116610527576040517f8579befe00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600054610100900460ff166111cb5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016101f0565b6111d3611253565b610527816112d8565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff166112d05760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016101f0565b610a8e611355565b600054610100900460ff1661051e5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016101f0565b600054610100900460ff166113d25760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016101f0565b610a8e336110d0565b5080546113e790611429565b6000825580601f106113f7575050565b601f01602090049060005260206000209081019061052791905b808211156114255760008155600101611411565b5090565b600181811c9082168061143d57607f821691505b602082108103611476577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b8183823760009101908152919050565b60006020828403121561149e57600080fd5b813573ffffffffffffffffffffffffffffffffffffffff811681146114c257600080fd5b9392505050565b6000602082840312156114db57600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146114c257600080fd5b6000815180845260005b8181101561153157602081850181015186830182015201611515565b5060006020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b6020815260006114c2602083018461150b565b60008083601f84011261159457600080fd5b50813567ffffffffffffffff8111156115ac57600080fd5b6020830191508360208260051b85010111156115c757600080fd5b9250929050565b600080600080604085870312156115e457600080fd5b843567ffffffffffffffff808211156115fc57600080fd5b61160888838901611582565b9096509450602087013591508082111561162157600080fd5b5061162e87828801611582565b95989497509550505050565b60008060006040848603121561164f57600080fd5b833561ffff8116811461166157600080fd5b9250602084013567ffffffffffffffff8082111561167e57600080fd5b818601915086601f83011261169257600080fd5b8135818111156116a157600080fd5b8760208285010111156116b357600080fd5b6020830194508093505050509250925092565b73ffffffffffffffffffffffffffffffffffffffff831681526040602082015260006116f5604083018461150b565b949350505050565b801515811461052757600080fd5b60006020828403121561171d57600080fd5b81516114c2816116fd565b600073ffffffffffffffffffffffffffffffffffffffff808616835280851660208401525060606040830152611761606083018461150b565b95945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18436030181126117ce57600080fd5b83018035915067ffffffffffffffff8211156117e957600080fd5b6020019150368190038213156115c757600080fd5b60006020828403121561181057600080fd5b81356114c2816116fd565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b601f821115611892576000816000526020600020601f850160051c810160208610156118735750805b601f850160051c820191505b81811015610a865782815560010161187f565b505050565b67ffffffffffffffff8311156118af576118af61181b565b6118c3836118bd8354611429565b8361184a565b6000601f84116001811461191557600085156118df5750838201355b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b1c1916600186901b178355610702565b6000838152602090207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0861690835b828110156119645786850135825560209485019460019092019101611944565b508682101561199f577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88860031b161c19848701351681555b505060018560011b0183555050505050565b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000081358181169160148510156119f15780818660140360031b1b83161692505b505092915050565b61ffff8416815260406020820152816040820152818360608301376000818301606090810191909152601f9092017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01601019291505056fe7365745472757374656452656d6f7465416464726573732875696e7431362c627974657329a2646970667358221220f18c05c7a1cc2ae688a65f755300a96ac7320b73e464ed2dcd0d6f13765fdceb64736f6c63430008190033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100df5760003560e01c806379ba50971161008c578063b4a0bdf311610066578063b4a0bdf3146103d7578063c4d66de8146103f5578063e30c397814610408578063f2fde38b14610426576100df565b806379ba50971461039e5780638da5cb5b146103a6578063a6c3d165146103c4576100df565b80634bb7453e116100bd5780634bb7453e1461033f5780635f21f75e14610352578063715018a614610301576100df565b80630e32cb86146102ee578063180d295c146103035780633f90b5401461032c575b600080357fffffffff0000000000000000000000000000000000000000000000000000000016815260c9602052604081208054369160609184919061012390611429565b80601f016020809104026020016040519081016040528092919081815260200182805461014f90611429565b801561019c5780601f106101715761010080835404028352916020019161019c565b820191906000526020600020905b81548152906001019060200180831161017f57829003601f168201915b5050505050905080516000036101f95760405162461bcd60e51b815260206004820152601260248201527f46756e6374696f6e206e6f7420666f756e64000000000000000000000000000060448201526064015b60405180910390fd5b61020281610439565b6000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16868660405161024c92919061147c565b6000604051808303816000865af19150503d8060008114610289576040519150601f19603f3d011682016040523d82523d6000602084013e61028e565b606091505b5091509150816102e05760405162461bcd60e51b815260206004820152600b60248201527f63616c6c206661696c656400000000000000000000000000000000000000000060448201526064016101f0565b805195506020019350505050f35b6103016102fc36600461148c565b610516565b005b6103166103113660046114c9565b61052a565b604051610323919061156f565b60405180910390f35b61030161033a36600461148c565b6105c4565b61030161034d3660046115ce565b610709565b6103797f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610323565b610301610a90565b60335473ffffffffffffffffffffffffffffffffffffffff16610379565b6103016103d236600461163a565b610b28565b60975473ffffffffffffffffffffffffffffffffffffffff16610379565b61030161040336600461148c565b610cd4565b60655473ffffffffffffffffffffffffffffffffffffffff16610379565b61030161043436600461148c565b610eb1565b6097546040517f18c5e8ab00000000000000000000000000000000000000000000000000000000815260009173ffffffffffffffffffffffffffffffffffffffff16906318c5e8ab9061049290339086906004016116c6565b602060405180830381865afa1580156104af573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104d3919061170b565b905080610512573330836040517f4a3fa2930000000000000000000000000000000000000000000000000000000081526004016101f093929190611728565b5050565b61051e610f61565b61052781610fc8565b50565b60c9602052600090815260409020805461054390611429565b80601f016020809104026020016040519081016040528092919081815260200182805461056f90611429565b80156105bc5780601f10610591576101008083540402835291602001916105bc565b820191906000526020600020905b81548152906001019060200180831161059f57829003601f168201915b505050505081565b6106026040518060400160405280602081526020017f7472616e736665724272696467654f776e657273686970286164647265737329815250610439565b73ffffffffffffffffffffffffffffffffffffffff81166106655760405162461bcd60e51b815260206004820152601860248201527f41646472657373206d757374206e6f74206265207a65726f000000000000000060448201526064016101f0565b6040517ff2fde38b00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063f2fde38b90602401600060405180830381600087803b1580156106ee57600080fd5b505af1158015610702573d6000803e3d6000fd5b5050505050565b610711610f61565b828181146107875760405162461bcd60e51b815260206004820152602660248201527f496e70757420617272617973206d7573742068617665207468652073616d652060448201527f6c656e677468000000000000000000000000000000000000000000000000000060648201526084016101f0565b60005b81811015610a865760008686838181106107a6576107a661176a565b90506020028101906107b89190611799565b6040516107c692919061147c565b60408051918290039091207fffffffff000000000000000000000000000000000000000000000000000000008116600090815260c960205291822080549193509061081090611429565b80601f016020809104026020016040519081016040528092919081815260200182805461083c90611429565b80156108895780601f1061085e57610100808354040283529160200191610889565b820191906000526020600020905b81548152906001019060200180831161086c57829003601f168201915b505050505090508585848181106108a2576108a261176a565b90506020020160208101906108b791906117fe565b80156108c257508051155b1561099b578787848181106108d9576108d961176a565b90506020028101906108eb9190611799565b7fffffffff000000000000000000000000000000000000000000000000000000008416600090815260c96020526040902091610928919083611897565b5087878481811061093b5761093b61176a565b905060200281019061094d9190611799565b60405161095b92919061147c565b60405190819003812060018252907f9d424e54f4d851aabd288f6cc4946e5726d6b5c0e66ea4ef159a3c40bcc470fa9060200160405180910390a2610a7c565b8585848181106109ad576109ad61176a565b90506020020160208101906109c291906117fe565b1580156109cf5750805115155b15610a7c577fffffffff000000000000000000000000000000000000000000000000000000008216600090815260c960205260408120610a0e916113db565b878784818110610a2057610a2061176a565b9050602002810190610a329190611799565b604051610a4092919061147c565b60405190819003812060008252907f9d424e54f4d851aabd288f6cc4946e5726d6b5c0e66ea4ef159a3c40bcc470fa9060200160405180910390a25b505060010161078a565b505050505050565b565b606554339073ffffffffffffffffffffffffffffffffffffffff168114610b1f5760405162461bcd60e51b815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f74207468652060448201527f6e6577206f776e6572000000000000000000000000000000000000000000000060648201526084016101f0565b610527816110d0565b610b49604051806060016040528060258152602001611a5260259139610439565b8261ffff16600003610b9d5760405162461bcd60e51b815260206004820152601860248201527f436861696e4964206d757374206e6f74206265207a65726f000000000000000060448201526064016101f0565b610bb2610baa82846119b1565b60601c611101565b60148114610c275760405162461bcd60e51b8152602060048201526024808201527f536f757263652061646472657373206d7573742062652032302062797465732060448201527f6c6f6e670000000000000000000000000000000000000000000000000000000060648201526084016101f0565b6040517fa6c3d16500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063a6c3d16590610c9d908690869086906004016119f9565b600060405180830381600087803b158015610cb757600080fd5b505af1158015610ccb573d6000803e3d6000fd5b50505050505050565b600054610100900460ff1615808015610cf45750600054600160ff909116105b80610d0e5750303b158015610d0e575060005460ff166001145b610d805760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016101f0565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790558015610dde57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b73ffffffffffffffffffffffffffffffffffffffff8216610e415760405162461bcd60e51b815260206004820152601860248201527f41646472657373206d757374206e6f74206265207a65726f000000000000000060448201526064016101f0565b610e4a8261114e565b801561051257600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a15050565b610eb9610f61565b6065805473ffffffffffffffffffffffffffffffffffffffff83167fffffffffffffffffffffffff00000000000000000000000000000000000000009091168117909155610f1c60335473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b60335473ffffffffffffffffffffffffffffffffffffffff163314610a8e5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016101f0565b73ffffffffffffffffffffffffffffffffffffffff81166110515760405162461bcd60e51b815260206004820152602560248201527f696e76616c696420616365737320636f6e74726f6c206d616e6167657220616460448201527f647265737300000000000000000000000000000000000000000000000000000060648201526084016101f0565b6097805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff000000000000000000000000000000000000000083168117909355604080519190921680825260208201939093527f66fd58e82f7b31a2a5c30e0888f3093efe4e111b00cd2b0c31fe014601293aa09101610ea5565b606580547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055610527816111dc565b73ffffffffffffffffffffffffffffffffffffffff8116610527576040517f8579befe00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600054610100900460ff166111cb5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016101f0565b6111d3611253565b610527816112d8565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff166112d05760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016101f0565b610a8e611355565b600054610100900460ff1661051e5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016101f0565b600054610100900460ff166113d25760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016101f0565b610a8e336110d0565b5080546113e790611429565b6000825580601f106113f7575050565b601f01602090049060005260206000209081019061052791905b808211156114255760008155600101611411565b5090565b600181811c9082168061143d57607f821691505b602082108103611476577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b8183823760009101908152919050565b60006020828403121561149e57600080fd5b813573ffffffffffffffffffffffffffffffffffffffff811681146114c257600080fd5b9392505050565b6000602082840312156114db57600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146114c257600080fd5b6000815180845260005b8181101561153157602081850181015186830182015201611515565b5060006020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b6020815260006114c2602083018461150b565b60008083601f84011261159457600080fd5b50813567ffffffffffffffff8111156115ac57600080fd5b6020830191508360208260051b85010111156115c757600080fd5b9250929050565b600080600080604085870312156115e457600080fd5b843567ffffffffffffffff808211156115fc57600080fd5b61160888838901611582565b9096509450602087013591508082111561162157600080fd5b5061162e87828801611582565b95989497509550505050565b60008060006040848603121561164f57600080fd5b833561ffff8116811461166157600080fd5b9250602084013567ffffffffffffffff8082111561167e57600080fd5b818601915086601f83011261169257600080fd5b8135818111156116a157600080fd5b8760208285010111156116b357600080fd5b6020830194508093505050509250925092565b73ffffffffffffffffffffffffffffffffffffffff831681526040602082015260006116f5604083018461150b565b949350505050565b801515811461052757600080fd5b60006020828403121561171d57600080fd5b81516114c2816116fd565b600073ffffffffffffffffffffffffffffffffffffffff808616835280851660208401525060606040830152611761606083018461150b565b95945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18436030181126117ce57600080fd5b83018035915067ffffffffffffffff8211156117e957600080fd5b6020019150368190038213156115c757600080fd5b60006020828403121561181057600080fd5b81356114c2816116fd565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b601f821115611892576000816000526020600020601f850160051c810160208610156118735750805b601f850160051c820191505b81811015610a865782815560010161187f565b505050565b67ffffffffffffffff8311156118af576118af61181b565b6118c3836118bd8354611429565b8361184a565b6000601f84116001811461191557600085156118df5750838201355b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b1c1916600186901b178355610702565b6000838152602090207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0861690835b828110156119645786850135825560209485019460019092019101611944565b508682101561199f577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88860031b161c19848701351681555b505060018560011b0183555050505050565b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000081358181169160148510156119f15780818660140360031b1b83161692505b505092915050565b61ffff8416815260406020820152816040820152818360608301376000818301606090810191909152601f9092017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01601019291505056fe7365745472757374656452656d6f7465416464726573732875696e7431362c627974657329a2646970667358221220f18c05c7a1cc2ae688a65f755300a96ac7320b73e464ed2dcd0d6f13765fdceb64736f6c63430008190033", + "devdoc": { + "author": "Venus", + "custom:security-contact": "https://github.com/VenusProtocol/governance-contracts#discussion", + "events": { + "Initialized(uint8)": { + "details": "Triggered when the contract has been initialized or reinitialized." + } + }, + "kind": "dev", + "methods": { + "acceptOwnership()": { + "details": "The new owner accepts the ownership transfer." + }, + "constructor": { + "custom:oz-upgrades-unsafe-allow": "constructor" + }, + "initialize(address)": { + "params": { + "accessControlManager_": "Address of access control manager" + } + }, + "owner()": { + "details": "Returns the address of the current owner." + }, + "pendingOwner()": { + "details": "Returns the address of the pending owner." + }, + "setAccessControlManager(address)": { + "custom:access": "Only Governance", + "custom:event": "Emits NewAccessControlManager event", + "details": "Admin function to set address of AccessControlManager", + "params": { + "accessControlManager_": "The new address of the AccessControlManager" + } + }, + "setTrustedRemoteAddress(uint16,bytes)": { + "custom:access": "Controlled by AccessControlManager", + "custom:event": "Emits SetTrustedRemoteAddress with source chain Id and source address", + "params": { + "srcAddress_": "The address of the contract on the source chain", + "srcChainId_": "The LayerZero id of a source chain" + } + }, + "transferBridgeOwnership(address)": { + "custom:access": "Controlled by AccessControlManager", + "params": { + "newOwner_": "New owner of the governanceExecutor" + } + }, + "transferOwnership(address)": { + "details": "Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one. Can only be called by the current owner." + }, + "upsertSignature(string[],bool[])": { + "custom:access": "Only owner", + "params": { + "active_": "bool value, should be true to add function", + "signatures_": "Function signature to be added or removed" + } + } + }, + "stateVariables": { + "OMNICHAIN_GOVERNANCE_EXECUTOR": { + "custom:oz-upgrades-unsafe-allow": "state-variable-immutable" + } + }, + "title": "OmnichainExecutorOwner", + "version": 1 + }, + "userdoc": { + "errors": { + "Unauthorized(address,address,string)": [ + { + "notice": "Thrown when the action is prohibited by AccessControlManager" + } + ], + "ZeroAddressNotAllowed()": [ + { + "notice": "Thrown if the supplied address is a zero address where it is not allowed" + } + ] + }, + "events": { + "FunctionRegistryChanged(string,bool)": { + "notice": "Event emitted when function registry updated" + }, + "NewAccessControlManager(address,address)": { + "notice": "Emitted when access control manager contract address is changed" + } + }, + "kind": "user", + "methods": { + "accessControlManager()": { + "notice": "Returns the address of the access control manager contract" + }, + "functionRegistry(bytes4)": { + "notice": "Stores function signature corresponding to their 4 bytes hash value" + }, + "initialize(address)": { + "notice": "Initialize the contract" + }, + "renounceOwnership()": { + "notice": "Empty implementation of renounce ownership to avoid any mishappening" + }, + "setAccessControlManager(address)": { + "notice": "Sets the address of AccessControlManager" + }, + "setTrustedRemoteAddress(uint16,bytes)": { + "notice": "Sets the source message sender address" + }, + "transferBridgeOwnership(address)": { + "notice": "This function transfer the ownership of the executor from this contract to new owner" + }, + "upsertSignature(string[],bool[])": { + "notice": "A registry of functions that are allowed to be executed from proposals" + } + }, + "notice": "OmnichainProposalSender contract acts as a governance and access control mechanism, allowing owner to upsert signature of OmnichainGovernanceExecutor contract, also contains function to transfer the ownership of contract as well.", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 3190, + "contract": "contracts/Cross-chain/OmnichainExecutorOwner.sol:OmnichainExecutorOwner", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8" + }, + { + "astId": 3193, + "contract": "contracts/Cross-chain/OmnichainExecutorOwner.sol:OmnichainExecutorOwner", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 3677, + "contract": "contracts/Cross-chain/OmnichainExecutorOwner.sol:OmnichainExecutorOwner", + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 3062, + "contract": "contracts/Cross-chain/OmnichainExecutorOwner.sol:OmnichainExecutorOwner", + "label": "_owner", + "offset": 0, + "slot": "51", + "type": "t_address" + }, + { + "astId": 3182, + "contract": "contracts/Cross-chain/OmnichainExecutorOwner.sol:OmnichainExecutorOwner", + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 2971, + "contract": "contracts/Cross-chain/OmnichainExecutorOwner.sol:OmnichainExecutorOwner", + "label": "_pendingOwner", + "offset": 0, + "slot": "101", + "type": "t_address" + }, + { + "astId": 3050, + "contract": "contracts/Cross-chain/OmnichainExecutorOwner.sol:OmnichainExecutorOwner", + "label": "__gap", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 8204, + "contract": "contracts/Cross-chain/OmnichainExecutorOwner.sol:OmnichainExecutorOwner", + "label": "_accessControlManager", + "offset": 0, + "slot": "151", + "type": "t_contract(IAccessControlManagerV8)8389" + }, + { + "astId": 8209, + "contract": "contracts/Cross-chain/OmnichainExecutorOwner.sol:OmnichainExecutorOwner", + "label": "__gap", + "offset": 0, + "slot": "152", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 5887, + "contract": "contracts/Cross-chain/OmnichainExecutorOwner.sol:OmnichainExecutorOwner", + "label": "functionRegistry", + "offset": 0, + "slot": "201", + "type": "t_mapping(t_bytes4,t_string_storage)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)49_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes4": { + "encoding": "inplace", + "label": "bytes4", + "numberOfBytes": "4" + }, + "t_contract(IAccessControlManagerV8)8389": { + "encoding": "inplace", + "label": "contract IAccessControlManagerV8", + "numberOfBytes": "20" + }, + "t_mapping(t_bytes4,t_string_storage)": { + "encoding": "mapping", + "key": "t_bytes4", + "label": "mapping(bytes4 => string)", + "numberOfBytes": "32", + "value": "t_string_storage" + }, + "t_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" + } + } + } +} diff --git a/deployments/berachainbartio/OmnichainExecutorOwner_Proxy.json b/deployments/berachainbartio/OmnichainExecutorOwner_Proxy.json new file mode 100644 index 00000000..06af0e2e --- /dev/null +++ b/deployments/berachainbartio/OmnichainExecutorOwner_Proxy.json @@ -0,0 +1,262 @@ +{ + "address": "0xd934a7c03D6fA022321565f2042EC37bD26Baf3c", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "address", + "name": "admin_", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "admin", + "outputs": [ + { + "internalType": "address", + "name": "admin_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "implementation", + "outputs": [ + { + "internalType": "address", + "name": "implementation_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0x3071210b323096c2d1c7386e068d15f62f1ffa159883a599584f95919e1f2b2d", + "receipt": { + "to": null, + "from": "0x18BDb05DD1A95677f4381cfb4db52D342dF5C00d", + "contractAddress": "0xd934a7c03D6fA022321565f2042EC37bD26Baf3c", + "transactionIndex": 1, + "gasUsed": "687927", + "logsBloom": "0x00000000000000000000000000000000400000000000000000800000000000000000000000000000000800000000000000000000000000000000000000008040000000000000000000000080000002000001000000000000000000000100000000000000020000000000020000000800000000800000000000000000000000400000000000000200000000000000000000000000001080000000000000800000000000000000000000000000000400000000000000800000000000000000000000000020000000000000000008040000000000010400000000000000000020000000000000000000000000000000000000000800000000000000000000000000", + "blockHash": "0xe93a3273367e39329d04772acf526bf3a8430ab51277b948dd29733dd2bcdde9", + "transactionHash": "0x3071210b323096c2d1c7386e068d15f62f1ffa159883a599584f95919e1f2b2d", + "logs": [ + { + "transactionIndex": 1, + "blockNumber": 10537900, + "transactionHash": "0x3071210b323096c2d1c7386e068d15f62f1ffa159883a599584f95919e1f2b2d", + "address": "0xd934a7c03D6fA022321565f2042EC37bD26Baf3c", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x00000000000000000000000009f0cf4ed50ed01994900ce9ee1ae85bfecd5c66" + ], + "data": "0x", + "logIndex": 1, + "blockHash": "0xe93a3273367e39329d04772acf526bf3a8430ab51277b948dd29733dd2bcdde9" + }, + { + "transactionIndex": 1, + "blockNumber": 10537900, + "transactionHash": "0x3071210b323096c2d1c7386e068d15f62f1ffa159883a599584f95919e1f2b2d", + "address": "0xd934a7c03D6fA022321565f2042EC37bD26Baf3c", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000018bdb05dd1a95677f4381cfb4db52d342df5c00d" + ], + "data": "0x", + "logIndex": 2, + "blockHash": "0xe93a3273367e39329d04772acf526bf3a8430ab51277b948dd29733dd2bcdde9" + }, + { + "transactionIndex": 1, + "blockNumber": 10537900, + "transactionHash": "0x3071210b323096c2d1c7386e068d15f62f1ffa159883a599584f95919e1f2b2d", + "address": "0xd934a7c03D6fA022321565f2042EC37bD26Baf3c", + "topics": ["0x66fd58e82f7b31a2a5c30e0888f3093efe4e111b00cd2b0c31fe014601293aa0"], + "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000092a6bcd9987eb8689152c5a89bcc5c03305139e3", + "logIndex": 3, + "blockHash": "0xe93a3273367e39329d04772acf526bf3a8430ab51277b948dd29733dd2bcdde9" + }, + { + "transactionIndex": 1, + "blockNumber": 10537900, + "transactionHash": "0x3071210b323096c2d1c7386e068d15f62f1ffa159883a599584f95919e1f2b2d", + "address": "0xd934a7c03D6fA022321565f2042EC37bD26Baf3c", + "topics": ["0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498"], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 4, + "blockHash": "0xe93a3273367e39329d04772acf526bf3a8430ab51277b948dd29733dd2bcdde9" + }, + { + "transactionIndex": 1, + "blockNumber": 10537900, + "transactionHash": "0x3071210b323096c2d1c7386e068d15f62f1ffa159883a599584f95919e1f2b2d", + "address": "0xd934a7c03D6fA022321565f2042EC37bD26Baf3c", + "topics": ["0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f"], + "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000039dbb4f255508995cc509e6fdab2ab1c286f5766", + "logIndex": 5, + "blockHash": "0xe93a3273367e39329d04772acf526bf3a8430ab51277b948dd29733dd2bcdde9" + } + ], + "blockNumber": 10537900, + "cumulativeGasUsed": "711502", + "status": 1, + "byzantium": true + }, + "args": [ + "0x09f0Cf4eD50ed01994900CE9ee1ae85BFECd5c66", + "0x39dBB4f255508995cc509E6fDAb2Ab1C286F5766", + "0xc4d66de800000000000000000000000092a6bcd9987eb8689152c5a89bcc5c03305139e3" + ], + "numDeployments": 1, + "solcInputHash": "e5536fb1b5f4db72d1c808989021a017", + "metadata": "{\"compiler\":{\"version\":\"0.8.25+commit.b61c2a91\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"implementation_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"details\":\"This contract implements a proxy that is upgradeable by an admin. To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing], which can potentially be used in an attack, this contract uses the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two things that go hand in hand: 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if that call matches one of the admin functions exposed by the proxy itself. 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the implementation. If the admin tries to call a function on the implementation it will fail with an error that says \\\"admin cannot fallback to proxy target\\\". These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to call a function from the proxy implementation. Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\",\"events\":{\"AdminChanged(address,address)\":{\"details\":\"Emitted when the admin account has changed.\"},\"BeaconUpgraded(address)\":{\"details\":\"Emitted when the beacon is upgraded.\"},\"Upgraded(address)\":{\"details\":\"Emitted when the implementation is upgraded.\"}},\"kind\":\"dev\",\"methods\":{\"admin()\":{\"details\":\"Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\"},\"constructor\":{\"details\":\"Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\"},\"implementation()\":{\"details\":\"Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\"},\"upgradeTo(address)\":{\"details\":\"Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"hardhat-deploy/solc_0.8/proxy/OptimizedTransparentUpgradeableProxy.sol\":\"OptimizedTransparentUpgradeableProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"hardhat-deploy/solc_0.8/openzeppelin/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822Proxiable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x93b4e21c931252739a1ec13ea31d3d35a5c068be3163ccab83e4d70c40355f03\",\"license\":\"MIT\"},\"hardhat-deploy/solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Proxy.sol\\\";\\nimport \\\"./ERC1967Upgrade.sol\\\";\\n\\n/**\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\n * implementation behind the proxy.\\n */\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\n * function call, and allows initializating the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n assert(_IMPLEMENTATION_SLOT == bytes32(uint256(keccak256(\\\"eip1967.proxy.implementation\\\")) - 1));\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation() internal view virtual override returns (address impl) {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0x6309f9f39dc6f4f45a24f296543867aa358e32946cd6b2874627a996d606b3a0\",\"license\":\"MIT\"},\"hardhat-deploy/solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/StorageSlot.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967Upgrade {\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view virtual returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(Address.isContract(IBeacon(newBeacon).implementation()), \\\"ERC1967: beacon implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x17668652127feebed0ce8d9431ef95ccc8c4292f03e3b8cf06c6ca16af396633\",\"license\":\"MIT\"},\"hardhat-deploy/solc_0.8/openzeppelin/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overriden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internall call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overriden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0xd5d1fd16e9faff7fcb3a52e02a8d49156f42a38a03f07b5f1810c21c2149a8ab\",\"license\":\"MIT\"},\"hardhat-deploy/solc_0.8/openzeppelin/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeacon {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\"},\"hardhat-deploy/solc_0.8/openzeppelin/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x3777e696b62134e6177440dbe6e6601c0c156a443f57167194b67e75527439de\",\"license\":\"MIT\"},\"hardhat-deploy/solc_0.8/openzeppelin/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xfe1b7a9aa2a530a9e705b220e26cd584e2fbdc9602a3a1066032b12816b46aca\",\"license\":\"MIT\"},\"hardhat-deploy/solc_0.8/proxy/OptimizedTransparentUpgradeableProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/transparent/TransparentUpgradeableProxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../openzeppelin/proxy/ERC1967/ERC1967Proxy.sol\\\";\\n\\n/**\\n * @dev This contract implements a proxy that is upgradeable by an admin.\\n *\\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\\n * clashing], which can potentially be used in an attack, this contract uses the\\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\\n * things that go hand in hand:\\n *\\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\\n * that call matches one of the admin functions exposed by the proxy itself.\\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\\n * \\\"admin cannot fallback to proxy target\\\".\\n *\\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\\n * to sudden errors when trying to call a function from the proxy implementation.\\n *\\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\\n */\\ncontract OptimizedTransparentUpgradeableProxy is ERC1967Proxy {\\n address internal immutable _ADMIN;\\n\\n /**\\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\\n */\\n constructor(\\n address _logic,\\n address admin_,\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {\\n assert(_ADMIN_SLOT == bytes32(uint256(keccak256(\\\"eip1967.proxy.admin\\\")) - 1));\\n _ADMIN = admin_;\\n\\n // still store it to work with EIP-1967\\n bytes32 slot = _ADMIN_SLOT;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n sstore(slot, admin_)\\n }\\n emit AdminChanged(address(0), admin_);\\n }\\n\\n /**\\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\\n */\\n modifier ifAdmin() {\\n if (msg.sender == _getAdmin()) {\\n _;\\n } else {\\n _fallback();\\n }\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\\n */\\n function admin() external ifAdmin returns (address admin_) {\\n admin_ = _getAdmin();\\n }\\n\\n /**\\n * @dev Returns the current implementation.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\\n */\\n function implementation() external ifAdmin returns (address implementation_) {\\n implementation_ = _implementation();\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\\n */\\n function upgradeTo(address newImplementation) external ifAdmin {\\n _upgradeToAndCall(newImplementation, bytes(\\\"\\\"), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\\n * proxied contract.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\\n */\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin {\\n _upgradeToAndCall(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _admin() internal view virtual returns (address) {\\n return _getAdmin();\\n }\\n\\n /**\\n * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.\\n */\\n function _beforeFallback() internal virtual override {\\n require(msg.sender != _getAdmin(), \\\"TransparentUpgradeableProxy: admin cannot fallback to proxy target\\\");\\n super._beforeFallback();\\n }\\n\\n function _getAdmin() internal view virtual override returns (address) {\\n return _ADMIN;\\n }\\n}\\n\",\"keccak256\":\"0xa30117644e27fa5b49e162aae2f62b36c1aca02f801b8c594d46e2024963a534\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60a0604052604051610ea3380380610ea3833981016040819052610022916103d2565b828161004f60017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd6104a2565b600080516020610e5c8339815191521461006b5761006b6104c3565b61007782826000610128565b506100a5905060017fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61046104a2565b600080516020610e3c833981519152146100c1576100c16104c3565b6001600160a01b0382166080819052600080516020610e3c8339815191528381556040805160008152602081019390935290917f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f910160405180910390a150505050610528565b61013183610154565b60008251118061013e5750805b1561014f5761014d8383610194565b505b505050565b61015d816101c2565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606101b98383604051806060016040528060278152602001610e7c60279139610263565b90505b92915050565b6001600160a01b0381163b6102345760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b600080516020610e5c83398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b60606001600160a01b0384163b6102cb5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b606482015260840161022b565b600080856001600160a01b0316856040516102e691906104d9565b600060405180830381855af49150503d8060008114610321576040519150601f19603f3d011682016040523d82523d6000602084013e610326565b606091505b509092509050610337828286610343565b925050505b9392505050565b6060831561035257508161033c565b8251156103625782518084602001fd5b8160405162461bcd60e51b815260040161022b91906104f5565b80516001600160a01b038116811461039357600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b838110156103c95781810151838201526020016103b1565b50506000910152565b6000806000606084860312156103e757600080fd5b6103f08461037c565b92506103fe6020850161037c565b60408501519092506001600160401b038082111561041b57600080fd5b818601915086601f83011261042f57600080fd5b81518181111561044157610441610398565b604051601f8201601f19908116603f0116810190838211818310171561046957610469610398565b8160405282815289602084870101111561048257600080fd5b6104938360208301602088016103ae565b80955050505050509250925092565b818103818111156101bc57634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052600160045260246000fd5b600082516104eb8184602087016103ae565b9190910192915050565b60208152600082518060208401526105148160408501602087016103ae565b601f01601f19169190910160400192915050565b6080516108d76105656000396000818160fc0152818161015f015281816101ee015281816102450152818161028301526102a701526108d76000f3fe6080604052600436106100435760003560e01c80633659cfe61461005a5780634f1ef2861461007a5780635c60da1b1461008d578063f851a440146100cb57610052565b36610052576100506100e0565b005b6100506100e0565b34801561006657600080fd5b5061005061007536600461074b565b6100fa565b610050610088366004610766565b61015d565b34801561009957600080fd5b506100a26101ea565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b3480156100d757600080fd5b506100a2610241565b6100e86102a5565b6100f86100f3610395565b6103d5565b565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16330361015557610152816040518060200160405280600081525060006103f9565b50565b6101526100e0565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1633036101e2576101dd8383838080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250600192506103f9915050565b505050565b6101dd6100e0565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16330361023657610231610395565b905090565b61023e6100e0565b90565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16330361023657507f000000000000000000000000000000000000000000000000000000000000000090565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1633036100f8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f7879207461726760648201527f6574000000000000000000000000000000000000000000000000000000000000608482015260a4015b60405180910390fd5b60006102317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b3660008037600080366000845af43d6000803e8080156103f4573d6000f35b3d6000fd5b61040283610424565b60008251118061040f5750805b156101dd5761041e8383610471565b50505050565b61042d8161049d565b60405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6060610496838360405180606001604052806027815260200161087b602791396105a7565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff81163b610541576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e747261637400000000000000000000000000000000000000606482015260840161038c565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b606073ffffffffffffffffffffffffffffffffffffffff84163b61064d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e74726163740000000000000000000000000000000000000000000000000000606482015260840161038c565b6000808573ffffffffffffffffffffffffffffffffffffffff1685604051610675919061080d565b600060405180830381855af49150503d80600081146106b0576040519150601f19603f3d011682016040523d82523d6000602084013e6106b5565b606091505b50915091506106c58282866106cf565b9695505050505050565b606083156106de575081610496565b8251156106ee5782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161038c9190610829565b803573ffffffffffffffffffffffffffffffffffffffff8116811461074657600080fd5b919050565b60006020828403121561075d57600080fd5b61049682610722565b60008060006040848603121561077b57600080fd5b61078484610722565b9250602084013567ffffffffffffffff808211156107a157600080fd5b818601915086601f8301126107b557600080fd5b8135818111156107c457600080fd5b8760208285010111156107d657600080fd5b6020830194508093505050509250925092565b60005b838110156108045781810151838201526020016107ec565b50506000910152565b6000825161081f8184602087016107e9565b9190910192915050565b60208152600082518060208401526108488160408501602087016107e9565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212200136fd34dfdb0d97935b77a84c836b17bf901cefa29ed5b1ef847b08c6cba8d064736f6c63430008190033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "deployedBytecode": "0x6080604052600436106100435760003560e01c80633659cfe61461005a5780634f1ef2861461007a5780635c60da1b1461008d578063f851a440146100cb57610052565b36610052576100506100e0565b005b6100506100e0565b34801561006657600080fd5b5061005061007536600461074b565b6100fa565b610050610088366004610766565b61015d565b34801561009957600080fd5b506100a26101ea565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b3480156100d757600080fd5b506100a2610241565b6100e86102a5565b6100f86100f3610395565b6103d5565b565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16330361015557610152816040518060200160405280600081525060006103f9565b50565b6101526100e0565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1633036101e2576101dd8383838080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250600192506103f9915050565b505050565b6101dd6100e0565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16330361023657610231610395565b905090565b61023e6100e0565b90565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16330361023657507f000000000000000000000000000000000000000000000000000000000000000090565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1633036100f8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f7879207461726760648201527f6574000000000000000000000000000000000000000000000000000000000000608482015260a4015b60405180910390fd5b60006102317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b3660008037600080366000845af43d6000803e8080156103f4573d6000f35b3d6000fd5b61040283610424565b60008251118061040f5750805b156101dd5761041e8383610471565b50505050565b61042d8161049d565b60405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6060610496838360405180606001604052806027815260200161087b602791396105a7565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff81163b610541576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e747261637400000000000000000000000000000000000000606482015260840161038c565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b606073ffffffffffffffffffffffffffffffffffffffff84163b61064d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e74726163740000000000000000000000000000000000000000000000000000606482015260840161038c565b6000808573ffffffffffffffffffffffffffffffffffffffff1685604051610675919061080d565b600060405180830381855af49150503d80600081146106b0576040519150601f19603f3d011682016040523d82523d6000602084013e6106b5565b606091505b50915091506106c58282866106cf565b9695505050505050565b606083156106de575081610496565b8251156106ee5782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161038c9190610829565b803573ffffffffffffffffffffffffffffffffffffffff8116811461074657600080fd5b919050565b60006020828403121561075d57600080fd5b61049682610722565b60008060006040848603121561077b57600080fd5b61078484610722565b9250602084013567ffffffffffffffff808211156107a157600080fd5b818601915086601f8301126107b557600080fd5b8135818111156107c457600080fd5b8760208285010111156107d657600080fd5b6020830194508093505050509250925092565b60005b838110156108045781810151838201526020016107ec565b50506000910152565b6000825161081f8184602087016107e9565b9190910192915050565b60208152600082518060208401526108488160408501602087016107e9565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212200136fd34dfdb0d97935b77a84c836b17bf901cefa29ed5b1ef847b08c6cba8d064736f6c63430008190033", + "devdoc": { + "details": "This contract implements a proxy that is upgradeable by an admin. To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing], which can potentially be used in an attack, this contract uses the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two things that go hand in hand: 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if that call matches one of the admin functions exposed by the proxy itself. 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the implementation. If the admin tries to call a function on the implementation it will fail with an error that says \"admin cannot fallback to proxy target\". These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to call a function from the proxy implementation. Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.", + "events": { + "AdminChanged(address,address)": { + "details": "Emitted when the admin account has changed." + }, + "BeaconUpgraded(address)": { + "details": "Emitted when the beacon is upgraded." + }, + "Upgraded(address)": { + "details": "Emitted when the implementation is upgraded." + } + }, + "kind": "dev", + "methods": { + "admin()": { + "details": "Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`" + }, + "constructor": { + "details": "Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}." + }, + "implementation()": { + "details": "Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`" + }, + "upgradeTo(address)": { + "details": "Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}." + }, + "upgradeToAndCall(address,bytes)": { + "details": "Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} diff --git a/deployments/berachainbartio/OmnichainGovernanceExecutor.json b/deployments/berachainbartio/OmnichainGovernanceExecutor.json new file mode 100644 index 00000000..e437477d --- /dev/null +++ b/deployments/berachainbartio/OmnichainGovernanceExecutor.json @@ -0,0 +1,1840 @@ +{ + "address": "0xc80E4112940efF40c8626bAc0D8E79cB7dAbe289", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "endpoint_", + "type": "address" + }, + { + "internalType": "address", + "name": "guardian_", + "type": "address" + }, + { + "internalType": "uint16", + "name": "srcChainId_", + "type": "uint16" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "InvalidProposalId", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddressNotAllowed", + "type": "error" + }, + { + "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": true, + "internalType": "address", + "name": "oldGuardian", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newGuardian", + "type": "address" + } + ], + "name": "NewGuardian", + "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": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "ProposalCanceled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "ProposalExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "eta", + "type": "uint256" + } + ], + "name": "ProposalQueued", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "string[]", + "name": "signatures", + "type": "string[]" + }, + { + "indexed": false, + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "proposalType", + "type": "uint8" + } + ], + "name": "ProposalReceived", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint16", + "name": "srcChainId", + "type": "uint16" + }, + { + "indexed": true, + "internalType": "bytes", + "name": "srcAddress", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "nonce", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "reason", + "type": "bytes" + } + ], + "name": "ReceivePayloadFailed", + "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": 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": "_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": true, + "internalType": "uint16", + "name": "oldSrcChainId", + "type": "uint16" + }, + { + "indexed": true, + "internalType": "uint16", + "name": "newSrcChainId", + "type": "uint16" + } + ], + "name": "SetSrcChainId", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "name": "SetTimelockPendingAdmin", + "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": false, + "internalType": "uint8", + "name": "routeType", + "type": "uint8" + }, + { + "indexed": true, + "internalType": "address", + "name": "oldTimelock", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newTimelock", + "type": "address" + } + ], + "name": "TimelockAdded", + "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": [ + { + "internalType": "contract ITimelock[]", + "name": "timelocks_", + "type": "address[]" + } + ], + "name": "addTimelocks", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId_", + "type": "uint256" + } + ], + "name": "cancel", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId_", + "type": "uint256" + } + ], + "name": "execute", + "outputs": [], + "stateMutability": "nonpayable", + "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": [], + "name": "guardian", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "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": "last24HourCommandsReceived", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "last24HourReceiveWindowStart", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "lastProposalReceived", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "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": [], + "name": "maxDailyReceiveLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "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": "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": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "proposalTimelocks", + "outputs": [ + { + "internalType": "contract ITimelock", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "proposals", + "outputs": [ + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "eta", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "canceled", + "type": "bool" + }, + { + "internalType": "bool", + "name": "executed", + "type": "bool" + }, + { + "internalType": "uint8", + "name": "proposalType", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "queued", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "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": "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": "address", + "name": "newGuardian", + "type": "address" + } + ], + "name": "setGuardian", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "limit_", + "type": "uint256" + } + ], + "name": "setMaxDailyReceiveLimit", + "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": "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": "srcChainId_", + "type": "uint16" + } + ], + "name": "setSrcChainId", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "pendingAdmin_", + "type": "address" + }, + { + "internalType": "uint8", + "name": "proposalType_", + "type": "uint8" + } + ], + "name": "setTimelockPendingAdmin", + "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": [], + "name": "srcChainId", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId_", + "type": "uint256" + } + ], + "name": "state", + "outputs": [ + { + "internalType": "enum OmnichainGovernanceExecutor.ProposalState", + "name": "", + "type": "uint8" + } + ], + "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" + } + ], + "transactionHash": "0xfa9a22abd3622ef0a96c288fe741f9701b85071dfadbfa60143f56d190cbc7f2", + "receipt": { + "to": null, + "from": "0x18BDb05DD1A95677f4381cfb4db52D342dF5C00d", + "contractAddress": "0xc80E4112940efF40c8626bAc0D8E79cB7dAbe289", + "transactionIndex": 1, + "gasUsed": "4146267", + "logsBloom": "0x00000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000020000000000000040800000000000000000000000000000000001000000000000000000000100000000200000020000000000020000000800000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xb4347668debb8d8bed8a52bb2d01f4a69cfe7edb7c39c84c8144dc35be3ac691", + "transactionHash": "0xfa9a22abd3622ef0a96c288fe741f9701b85071dfadbfa60143f56d190cbc7f2", + "logs": [ + { + "transactionIndex": 1, + "blockNumber": 10533995, + "transactionHash": "0xfa9a22abd3622ef0a96c288fe741f9701b85071dfadbfa60143f56d190cbc7f2", + "address": "0xc80E4112940efF40c8626bAc0D8E79cB7dAbe289", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000018bdb05dd1a95677f4381cfb4db52d342df5c00d" + ], + "data": "0x", + "logIndex": 1, + "blockHash": "0xb4347668debb8d8bed8a52bb2d01f4a69cfe7edb7c39c84c8144dc35be3ac691" + } + ], + "blockNumber": 10533995, + "cumulativeGasUsed": "4169842", + "status": 1, + "byzantium": true + }, + "args": ["0x6EDCE65403992e310A62460808c4b910D972f10f", "0xdf3b635d2b535f906BB02abb22AED71346E36a00", 10102], + "numDeployments": 1, + "solcInputHash": "9f400d4fd6f6fcf916824838bc678e25", + "metadata": "{\"compiler\":{\"version\":\"0.8.25+commit.b61c2a91\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"endpoint_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"guardian_\",\"type\":\"address\"},{\"internalType\":\"uint16\",\"name\":\"srcChainId_\",\"type\":\"uint16\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"InvalidProposalId\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddressNotAllowed\",\"type\":\"error\"},{\"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\":true,\"internalType\":\"address\",\"name\":\"oldGuardian\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newGuardian\",\"type\":\"address\"}],\"name\":\"NewGuardian\",\"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\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"ProposalCanceled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"ProposalExecuted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"eta\",\"type\":\"uint256\"}],\"name\":\"ProposalQueued\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"proposalId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"targets\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"values\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"string[]\",\"name\":\"signatures\",\"type\":\"string[]\"},{\"indexed\":false,\"internalType\":\"bytes[]\",\"name\":\"calldatas\",\"type\":\"bytes[]\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"proposalType\",\"type\":\"uint8\"}],\"name\":\"ProposalReceived\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint16\",\"name\":\"srcChainId\",\"type\":\"uint16\"},{\"indexed\":true,\"internalType\":\"bytes\",\"name\":\"srcAddress\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"nonce\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"reason\",\"type\":\"bytes\"}],\"name\":\"ReceivePayloadFailed\",\"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\":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\":\"_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\":true,\"internalType\":\"uint16\",\"name\":\"oldSrcChainId\",\"type\":\"uint16\"},{\"indexed\":true,\"internalType\":\"uint16\",\"name\":\"newSrcChainId\",\"type\":\"uint16\"}],\"name\":\"SetSrcChainId\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"name\":\"SetTimelockPendingAdmin\",\"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\":false,\"internalType\":\"uint8\",\"name\":\"routeType\",\"type\":\"uint8\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"oldTimelock\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newTimelock\",\"type\":\"address\"}],\"name\":\"TimelockAdded\",\"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\":[{\"internalType\":\"contract ITimelock[]\",\"name\":\"timelocks_\",\"type\":\"address[]\"}],\"name\":\"addTimelocks\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"proposalId_\",\"type\":\"uint256\"}],\"name\":\"cancel\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"proposalId_\",\"type\":\"uint256\"}],\"name\":\"execute\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"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\":[],\"name\":\"guardian\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"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\":\"last24HourCommandsReceived\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"last24HourReceiveWindowStart\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastProposalReceived\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"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\":[],\"name\":\"maxDailyReceiveLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"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\":\"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\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"proposalTimelocks\",\"outputs\":[{\"internalType\":\"contract ITimelock\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"proposals\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"eta\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"canceled\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"executed\",\"type\":\"bool\"},{\"internalType\":\"uint8\",\"name\":\"proposalType\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"queued\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"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\":\"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\":\"address\",\"name\":\"newGuardian\",\"type\":\"address\"}],\"name\":\"setGuardian\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"limit_\",\"type\":\"uint256\"}],\"name\":\"setMaxDailyReceiveLimit\",\"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\":\"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\":\"srcChainId_\",\"type\":\"uint16\"}],\"name\":\"setSrcChainId\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"pendingAdmin_\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"proposalType_\",\"type\":\"uint8\"}],\"name\":\"setTimelockPendingAdmin\",\"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\":[],\"name\":\"srcChainId\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"proposalId_\",\"type\":\"uint256\"}],\"name\":\"state\",\"outputs\":[{\"internalType\":\"enum OmnichainGovernanceExecutor.ProposalState\",\"name\":\"\",\"type\":\"uint8\"}],\"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\"}],\"devdoc\":{\"custom:security-contact\":\"https://github.com/VenusProtocol/governance-contracts#discussion\",\"details\":\"The owner of this contract controls LayerZero configuration. When used in production the owner will be OmnichainExecutor This implementation is non-blocking, meaning the failed messages will not block the future messages from the source. For the blocking behavior, derive the contract from LzApp.\",\"events\":{\"Paused(address)\":{\"details\":\"Emitted when the pause is triggered by `account`.\"},\"Unpaused(address)\":{\"details\":\"Emitted when the pause is lifted by `account`.\"}},\"kind\":\"dev\",\"methods\":{\"addTimelocks(address[])\":{\"custom:access\":\"Only owner\",\"custom:event\":\"Emits TimelockAdded with old and new timelock and route type\",\"params\":{\"timelocks_\":\"Array of addresses of all 3 timelocks\"}},\"cancel(uint256)\":{\"custom:access\":\"Sender must be the guardian\",\"custom:event\":\"Emits ProposalCanceled with proposal id of the canceled proposal\",\"params\":{\"proposalId_\":\"Id of proposal that is to be canceled\"}},\"execute(uint256)\":{\"custom:event\":\"Emits ProposalExecuted with proposal id of executed proposal\",\"params\":{\"proposalId_\":\"Id of proposal that is to be executed\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"pause()\":{\"custom:access\":\"Only owner\"},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"retryMessage(uint16,bytes,uint64,bytes)\":{\"custom:access\":\"Only owner\",\"params\":{\"nonce_\":\"Nonce to identify failed message\",\"payload_\":\"The payload of the message to be retried\",\"srcAddress_\":\"Source address => local app address + remote app address\",\"srcChainId_\":\"Source chain Id\"}},\"setGuardian(address)\":{\"custom:access\":\"Must be call by guardian or owner\",\"custom:event\":\"Emit NewGuardian with old and new guardian address\",\"params\":{\"newGuardian\":\"The address of the new guardian\"}},\"setMaxDailyReceiveLimit(uint256)\":{\"custom:access\":\"Only Owner\",\"custom:event\":\"Emits SetMaxDailyReceiveLimit with old and new limit\",\"params\":{\"limit_\":\"Number of commands\"}},\"setSrcChainId(uint16)\":{\"custom:access\":\"Only owner\",\"custom:event\":\"Emit SetSrcChainId with old and new source id\",\"params\":{\"srcChainId_\":\"The new source chain id to be set\"}},\"setTimelockPendingAdmin(address,uint8)\":{\"custom:access\":\"Only owner\",\"custom:event\":\"Emits SetTimelockPendingAdmin with new pending admin and proposal type\",\"params\":{\"pendingAdmin_\":\"Address of new pending admin\",\"proposalType_\":\"Type of proposal\"}},\"state(uint256)\":{\"params\":{\"proposalId_\":\"The id of the proposal\"},\"returns\":{\"_0\":\"Proposal state\"}},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"unpause()\":{\"custom:access\":\"Only owner\"}},\"title\":\"OmnichainGovernanceExecutor\",\"version\":1},\"userdoc\":{\"errors\":{\"InvalidProposalId()\":[{\"notice\":\"Thrown when proposal ID is invalid\"}],\"ZeroAddressNotAllowed()\":[{\"notice\":\"Thrown if the supplied address is a zero address where it is not allowed\"}]},\"events\":{\"NewGuardian(address,address)\":{\"notice\":\"Emitted when new guardian address is set\"},\"ProposalCanceled(uint256)\":{\"notice\":\"Emitted when proposal is canceled\"},\"ProposalExecuted(uint256)\":{\"notice\":\"Emitted when proposal executed\"},\"ProposalQueued(uint256,uint256)\":{\"notice\":\"Emitted when proposal is queued\"},\"ProposalReceived(uint256,address[],uint256[],string[],bytes[],uint8)\":{\"notice\":\"Emitted when proposal is received\"},\"ReceivePayloadFailed(uint16,bytes,uint64,bytes)\":{\"notice\":\"Emitted when proposal failed\"},\"SetMaxDailyReceiveLimit(uint256,uint256)\":{\"notice\":\"Emitted when the maximum daily limit for receiving command from Binance chain is modified\"},\"SetSrcChainId(uint16,uint16)\":{\"notice\":\"Emitted when source layerzero endpoint id is updated\"},\"SetTimelockPendingAdmin(address,uint8)\":{\"notice\":\"Emitted when pending admin of Timelock is updated\"},\"TimelockAdded(uint8,address,address)\":{\"notice\":\"Emitted when timelock added\"}},\"kind\":\"user\",\"methods\":{\"addTimelocks(address[])\":{\"notice\":\"Add timelocks to the ProposalTimelocks mapping\"},\"cancel(uint256)\":{\"notice\":\"Cancels a proposal only if sender is the guardian and proposal is not executed\"},\"execute(uint256)\":{\"notice\":\"Executes a queued proposal if eta has passed\"},\"guardian()\":{\"notice\":\"A privileged role that can cancel any proposal\"},\"last24HourCommandsReceived()\":{\"notice\":\"Total received commands within the last 24-hour window from Binance chain\"},\"last24HourReceiveWindowStart()\":{\"notice\":\"Timestamp when the last 24-hour window started from Binance chain\"},\"lastProposalReceived()\":{\"notice\":\"Last proposal count received\"},\"maxDailyReceiveLimit()\":{\"notice\":\"Maximum daily limit for receiving commands from Binance chain\"},\"pause()\":{\"notice\":\"Triggers the paused state of the controller\"},\"proposalTimelocks(uint256)\":{\"notice\":\"Mapping containing Timelock addresses for each proposal type\"},\"proposals(uint256)\":{\"notice\":\"The official record of all proposals ever proposed\"},\"queued(uint256)\":{\"notice\":\"Represents queue state of proposal\"},\"renounceOwnership()\":{\"notice\":\"Empty implementation of renounce ownership to avoid any mishappening\"},\"retryMessage(uint16,bytes,uint64,bytes)\":{\"notice\":\"Resends a previously failed message\"},\"setGuardian(address)\":{\"notice\":\"Sets the new executor guardian\"},\"setMaxDailyReceiveLimit(uint256)\":{\"notice\":\"Sets the maximum daily limit for receiving commands\"},\"setSrcChainId(uint16)\":{\"notice\":\"Update source layerzero endpoint id\"},\"setTimelockPendingAdmin(address,uint8)\":{\"notice\":\"Sets the new pending admin of the Timelock\"},\"srcChainId()\":{\"notice\":\"Stores BNB chain layerzero endpoint id\"},\"state(uint256)\":{\"notice\":\"Gets the state of a proposal\"},\"unpause()\":{\"notice\":\"Triggers the resume state of the controller\"}},\"notice\":\"Executes the proposal transactions sent from the main chain\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/Cross-chain/OmnichainGovernanceExecutor.sol\":\"OmnichainGovernanceExecutor\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"@layerzerolabs/solidity-examples/contracts/libraries/BytesLib.sol\":{\"content\":\"// SPDX-License-Identifier: Unlicense\\n/*\\n * @title Solidity Bytes Arrays Utils\\n * @author Gon\\u00e7alo S\\u00e1 \\n *\\n * @dev Bytes tightly packed arrays utility library for ethereum contracts written in Solidity.\\n * The library lets you concatenate, slice and type cast bytes arrays both in memory and storage.\\n */\\npragma solidity >=0.8.0 <0.9.0;\\n\\nlibrary BytesLib {\\n function concat(bytes memory _preBytes, bytes memory _postBytes) internal pure returns (bytes memory) {\\n bytes memory tempBytes;\\n\\n assembly {\\n // Get a location of some free memory and store it in tempBytes as\\n // Solidity does for memory variables.\\n tempBytes := mload(0x40)\\n\\n // Store the length of the first bytes array at the beginning of\\n // the memory for tempBytes.\\n let length := mload(_preBytes)\\n mstore(tempBytes, length)\\n\\n // Maintain a memory counter for the current write location in the\\n // temp bytes array by adding the 32 bytes for the array length to\\n // the starting location.\\n let mc := add(tempBytes, 0x20)\\n // Stop copying when the memory counter reaches the length of the\\n // first bytes array.\\n let end := add(mc, length)\\n\\n for {\\n // Initialize a copy counter to the start of the _preBytes data,\\n // 32 bytes into its memory.\\n let cc := add(_preBytes, 0x20)\\n } lt(mc, end) {\\n // Increase both counters by 32 bytes each iteration.\\n mc := add(mc, 0x20)\\n cc := add(cc, 0x20)\\n } {\\n // Write the _preBytes data into the tempBytes memory 32 bytes\\n // at a time.\\n mstore(mc, mload(cc))\\n }\\n\\n // Add the length of _postBytes to the current length of tempBytes\\n // and store it as the new length in the first 32 bytes of the\\n // tempBytes memory.\\n length := mload(_postBytes)\\n mstore(tempBytes, add(length, mload(tempBytes)))\\n\\n // Move the memory counter back from a multiple of 0x20 to the\\n // actual end of the _preBytes data.\\n mc := end\\n // Stop copying when the memory counter reaches the new combined\\n // length of the arrays.\\n end := add(mc, length)\\n\\n for {\\n let cc := add(_postBytes, 0x20)\\n } lt(mc, end) {\\n mc := add(mc, 0x20)\\n cc := add(cc, 0x20)\\n } {\\n mstore(mc, mload(cc))\\n }\\n\\n // Update the free-memory pointer by padding our last write location\\n // to 32 bytes: add 31 bytes to the end of tempBytes to move to the\\n // next 32 byte block, then round down to the nearest multiple of\\n // 32. If the sum of the length of the two arrays is zero then add\\n // one before rounding down to leave a blank 32 bytes (the length block with 0).\\n mstore(\\n 0x40,\\n and(\\n add(add(end, iszero(add(length, mload(_preBytes)))), 31),\\n not(31) // Round down to the nearest 32 bytes.\\n )\\n )\\n }\\n\\n return tempBytes;\\n }\\n\\n function concatStorage(bytes storage _preBytes, bytes memory _postBytes) internal {\\n assembly {\\n // Read the first 32 bytes of _preBytes storage, which is the length\\n // of the array. (We don't need to use the offset into the slot\\n // because arrays use the entire slot.)\\n let fslot := sload(_preBytes.slot)\\n // Arrays of 31 bytes or less have an even value in their slot,\\n // while longer arrays have an odd value. The actual length is\\n // the slot divided by two for odd values, and the lowest order\\n // byte divided by two for even values.\\n // If the slot is even, bitwise and the slot with 255 and divide by\\n // two to get the length. If the slot is odd, bitwise and the slot\\n // with -1 and divide by two.\\n let slength := div(and(fslot, sub(mul(0x100, iszero(and(fslot, 1))), 1)), 2)\\n let mlength := mload(_postBytes)\\n let newlength := add(slength, mlength)\\n // slength can contain both the length and contents of the array\\n // if length < 32 bytes so let's prepare for that\\n // v. http://solidity.readthedocs.io/en/latest/miscellaneous.html#layout-of-state-variables-in-storage\\n switch add(lt(slength, 32), lt(newlength, 32))\\n case 2 {\\n // Since the new array still fits in the slot, we just need to\\n // update the contents of the slot.\\n // uint256(bytes_storage) = uint256(bytes_storage) + uint256(bytes_memory) + new_length\\n sstore(\\n _preBytes.slot,\\n // all the modifications to the slot are inside this\\n // next block\\n add(\\n // we can just add to the slot contents because the\\n // bytes we want to change are the LSBs\\n fslot,\\n add(\\n mul(\\n div(\\n // load the bytes from memory\\n mload(add(_postBytes, 0x20)),\\n // zero all bytes to the right\\n exp(0x100, sub(32, mlength))\\n ),\\n // and now shift left the number of bytes to\\n // leave space for the length in the slot\\n exp(0x100, sub(32, newlength))\\n ),\\n // increase length by the double of the memory\\n // bytes length\\n mul(mlength, 2)\\n )\\n )\\n )\\n }\\n case 1 {\\n // The stored value fits in the slot, but the combined value\\n // will exceed it.\\n // get the keccak hash to get the contents of the array\\n mstore(0x0, _preBytes.slot)\\n let sc := add(keccak256(0x0, 0x20), div(slength, 32))\\n\\n // save new length\\n sstore(_preBytes.slot, add(mul(newlength, 2), 1))\\n\\n // The contents of the _postBytes array start 32 bytes into\\n // the structure. Our first read should obtain the `submod`\\n // bytes that can fit into the unused space in the last word\\n // of the stored array. To get this, we read 32 bytes starting\\n // from `submod`, so the data we read overlaps with the array\\n // contents by `submod` bytes. Masking the lowest-order\\n // `submod` bytes allows us to add that value directly to the\\n // stored value.\\n\\n let submod := sub(32, slength)\\n let mc := add(_postBytes, submod)\\n let end := add(_postBytes, mlength)\\n let mask := sub(exp(0x100, submod), 1)\\n\\n sstore(sc, add(and(fslot, 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00), and(mload(mc), mask)))\\n\\n for {\\n mc := add(mc, 0x20)\\n sc := add(sc, 1)\\n } lt(mc, end) {\\n sc := add(sc, 1)\\n mc := add(mc, 0x20)\\n } {\\n sstore(sc, mload(mc))\\n }\\n\\n mask := exp(0x100, sub(mc, end))\\n\\n sstore(sc, mul(div(mload(mc), mask), mask))\\n }\\n default {\\n // get the keccak hash to get the contents of the array\\n mstore(0x0, _preBytes.slot)\\n // Start copying to the last used word of the stored array.\\n let sc := add(keccak256(0x0, 0x20), div(slength, 32))\\n\\n // save new length\\n sstore(_preBytes.slot, add(mul(newlength, 2), 1))\\n\\n // Copy over the first `submod` bytes of the new data as in\\n // case 1 above.\\n let slengthmod := mod(slength, 32)\\n let mlengthmod := mod(mlength, 32)\\n let submod := sub(32, slengthmod)\\n let mc := add(_postBytes, submod)\\n let end := add(_postBytes, mlength)\\n let mask := sub(exp(0x100, submod), 1)\\n\\n sstore(sc, add(sload(sc), and(mload(mc), mask)))\\n\\n for {\\n sc := add(sc, 1)\\n mc := add(mc, 0x20)\\n } lt(mc, end) {\\n sc := add(sc, 1)\\n mc := add(mc, 0x20)\\n } {\\n sstore(sc, mload(mc))\\n }\\n\\n mask := exp(0x100, sub(mc, end))\\n\\n sstore(sc, mul(div(mload(mc), mask), mask))\\n }\\n }\\n }\\n\\n function slice(\\n bytes memory _bytes,\\n uint _start,\\n uint _length\\n ) internal pure returns (bytes memory) {\\n require(_length + 31 >= _length, \\\"slice_overflow\\\");\\n require(_bytes.length >= _start + _length, \\\"slice_outOfBounds\\\");\\n\\n bytes memory tempBytes;\\n\\n assembly {\\n switch iszero(_length)\\n case 0 {\\n // Get a location of some free memory and store it in tempBytes as\\n // Solidity does for memory variables.\\n tempBytes := mload(0x40)\\n\\n // The first word of the slice result is potentially a partial\\n // word read from the original array. To read it, we calculate\\n // the length of that partial word and start copying that many\\n // bytes into the array. The first word we copy will start with\\n // data we don't care about, but the last `lengthmod` bytes will\\n // land at the beginning of the contents of the new array. When\\n // we're done copying, we overwrite the full first word with\\n // the actual length of the slice.\\n let lengthmod := and(_length, 31)\\n\\n // The multiplication in the next line is necessary\\n // because when slicing multiples of 32 bytes (lengthmod == 0)\\n // the following copy loop was copying the origin's length\\n // and then ending prematurely not copying everything it should.\\n let mc := add(add(tempBytes, lengthmod), mul(0x20, iszero(lengthmod)))\\n let end := add(mc, _length)\\n\\n for {\\n // The multiplication in the next line has the same exact purpose\\n // as the one above.\\n let cc := add(add(add(_bytes, lengthmod), mul(0x20, iszero(lengthmod))), _start)\\n } lt(mc, end) {\\n mc := add(mc, 0x20)\\n cc := add(cc, 0x20)\\n } {\\n mstore(mc, mload(cc))\\n }\\n\\n mstore(tempBytes, _length)\\n\\n //update free-memory pointer\\n //allocating the array padded to 32 bytes like the compiler does now\\n mstore(0x40, and(add(mc, 31), not(31)))\\n }\\n //if we want a zero-length slice let's just return a zero-length array\\n default {\\n tempBytes := mload(0x40)\\n //zero out the 32 bytes slice we are about to return\\n //we need to do it because Solidity does not garbage collect\\n mstore(tempBytes, 0)\\n\\n mstore(0x40, add(tempBytes, 0x20))\\n }\\n }\\n\\n return tempBytes;\\n }\\n\\n function toAddress(bytes memory _bytes, uint _start) internal pure returns (address) {\\n require(_bytes.length >= _start + 20, \\\"toAddress_outOfBounds\\\");\\n address tempAddress;\\n\\n assembly {\\n tempAddress := div(mload(add(add(_bytes, 0x20), _start)), 0x1000000000000000000000000)\\n }\\n\\n return tempAddress;\\n }\\n\\n function toUint8(bytes memory _bytes, uint _start) internal pure returns (uint8) {\\n require(_bytes.length >= _start + 1, \\\"toUint8_outOfBounds\\\");\\n uint8 tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0x1), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function toUint16(bytes memory _bytes, uint _start) internal pure returns (uint16) {\\n require(_bytes.length >= _start + 2, \\\"toUint16_outOfBounds\\\");\\n uint16 tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0x2), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function toUint32(bytes memory _bytes, uint _start) internal pure returns (uint32) {\\n require(_bytes.length >= _start + 4, \\\"toUint32_outOfBounds\\\");\\n uint32 tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0x4), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function toUint64(bytes memory _bytes, uint _start) internal pure returns (uint64) {\\n require(_bytes.length >= _start + 8, \\\"toUint64_outOfBounds\\\");\\n uint64 tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0x8), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function toUint96(bytes memory _bytes, uint _start) internal pure returns (uint96) {\\n require(_bytes.length >= _start + 12, \\\"toUint96_outOfBounds\\\");\\n uint96 tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0xc), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function toUint128(bytes memory _bytes, uint _start) internal pure returns (uint128) {\\n require(_bytes.length >= _start + 16, \\\"toUint128_outOfBounds\\\");\\n uint128 tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0x10), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function toUint256(bytes memory _bytes, uint _start) internal pure returns (uint) {\\n require(_bytes.length >= _start + 32, \\\"toUint256_outOfBounds\\\");\\n uint tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0x20), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function toBytes32(bytes memory _bytes, uint _start) internal pure returns (bytes32) {\\n require(_bytes.length >= _start + 32, \\\"toBytes32_outOfBounds\\\");\\n bytes32 tempBytes32;\\n\\n assembly {\\n tempBytes32 := mload(add(add(_bytes, 0x20), _start))\\n }\\n\\n return tempBytes32;\\n }\\n\\n function equal(bytes memory _preBytes, bytes memory _postBytes) internal pure returns (bool) {\\n bool success = true;\\n\\n assembly {\\n let length := mload(_preBytes)\\n\\n // if lengths don't match the arrays are not equal\\n switch eq(length, mload(_postBytes))\\n case 1 {\\n // cb is a circuit breaker in the for loop since there's\\n // no said feature for inline assembly loops\\n // cb = 1 - don't breaker\\n // cb = 0 - break\\n let cb := 1\\n\\n let mc := add(_preBytes, 0x20)\\n let end := add(mc, length)\\n\\n for {\\n let cc := add(_postBytes, 0x20)\\n // the next line is the loop condition:\\n // while(uint256(mc < end) + cb == 2)\\n } eq(add(lt(mc, end), cb), 2) {\\n mc := add(mc, 0x20)\\n cc := add(cc, 0x20)\\n } {\\n // if any of these checks fails then arrays are not equal\\n if iszero(eq(mload(mc), mload(cc))) {\\n // unsuccess:\\n success := 0\\n cb := 0\\n }\\n }\\n }\\n default {\\n // unsuccess:\\n success := 0\\n }\\n }\\n\\n return success;\\n }\\n\\n function equalStorage(bytes storage _preBytes, bytes memory _postBytes) internal view returns (bool) {\\n bool success = true;\\n\\n assembly {\\n // we know _preBytes_offset is 0\\n let fslot := sload(_preBytes.slot)\\n // Decode the length of the stored array like in concatStorage().\\n let slength := div(and(fslot, sub(mul(0x100, iszero(and(fslot, 1))), 1)), 2)\\n let mlength := mload(_postBytes)\\n\\n // if lengths don't match the arrays are not equal\\n switch eq(slength, mlength)\\n case 1 {\\n // slength can contain both the length and contents of the array\\n // if length < 32 bytes so let's prepare for that\\n // v. http://solidity.readthedocs.io/en/latest/miscellaneous.html#layout-of-state-variables-in-storage\\n if iszero(iszero(slength)) {\\n switch lt(slength, 32)\\n case 1 {\\n // blank the last byte which is the length\\n fslot := mul(div(fslot, 0x100), 0x100)\\n\\n if iszero(eq(fslot, mload(add(_postBytes, 0x20)))) {\\n // unsuccess:\\n success := 0\\n }\\n }\\n default {\\n // cb is a circuit breaker in the for loop since there's\\n // no said feature for inline assembly loops\\n // cb = 1 - don't breaker\\n // cb = 0 - break\\n let cb := 1\\n\\n // get the keccak hash to get the contents of the array\\n mstore(0x0, _preBytes.slot)\\n let sc := keccak256(0x0, 0x20)\\n\\n let mc := add(_postBytes, 0x20)\\n let end := add(mc, mlength)\\n\\n // the next line is the loop condition:\\n // while(uint256(mc < end) + cb == 2)\\n for {\\n\\n } eq(add(lt(mc, end), cb), 2) {\\n sc := add(sc, 1)\\n mc := add(mc, 0x20)\\n } {\\n if iszero(eq(sload(sc), mload(mc))) {\\n // unsuccess:\\n success := 0\\n cb := 0\\n }\\n }\\n }\\n }\\n }\\n default {\\n // unsuccess:\\n success := 0\\n }\\n }\\n\\n return success;\\n }\\n}\\n\",\"keccak256\":\"0x7e64cccdf22a03f513d94960f2145dd801fb5ec88d971de079b5186a9f5e93c4\",\"license\":\"Unlicense\"},\"@layerzerolabs/solidity-examples/contracts/libraries/ExcessivelySafeCall.sol\":{\"content\":\"// SPDX-License-Identifier: MIT OR Apache-2.0\\npragma solidity >=0.7.6;\\n\\nlibrary ExcessivelySafeCall {\\n uint constant LOW_28_MASK = 0x00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff;\\n\\n /// @notice Use when you _really_ really _really_ don't trust the called\\n /// contract. This prevents the called contract from causing reversion of\\n /// the caller in as many ways as we can.\\n /// @dev The main difference between this and a solidity low-level call is\\n /// that we limit the number of bytes that the callee can cause to be\\n /// copied to caller memory. This prevents stupid things like malicious\\n /// contracts returning 10,000,000 bytes causing a local OOG when copying\\n /// to memory.\\n /// @param _target The address to call\\n /// @param _gas The amount of gas to forward to the remote contract\\n /// @param _maxCopy The maximum number of bytes of returndata to copy\\n /// to memory.\\n /// @param _calldata The data to send to the remote contract\\n /// @return success and returndata, as `.call()`. Returndata is capped to\\n /// `_maxCopy` bytes.\\n function excessivelySafeCall(\\n address _target,\\n uint _gas,\\n uint16 _maxCopy,\\n bytes memory _calldata\\n ) internal returns (bool, bytes memory) {\\n // set up for assembly call\\n uint _toCopy;\\n bool _success;\\n bytes memory _returnData = new bytes(_maxCopy);\\n // dispatch message to recipient\\n // by assembly calling \\\"handle\\\" function\\n // we call via assembly to avoid memcopying a very large returndata\\n // returned by a malicious contract\\n assembly {\\n _success := call(\\n _gas, // gas\\n _target, // recipient\\n 0, // ether value\\n add(_calldata, 0x20), // inloc\\n mload(_calldata), // inlen\\n 0, // outloc\\n 0 // outlen\\n )\\n // limit our copy to 256 bytes\\n _toCopy := returndatasize()\\n if gt(_toCopy, _maxCopy) {\\n _toCopy := _maxCopy\\n }\\n // Store the length of the copied bytes\\n mstore(_returnData, _toCopy)\\n // copy the bytes from returndata[0:_toCopy]\\n returndatacopy(add(_returnData, 0x20), 0, _toCopy)\\n }\\n return (_success, _returnData);\\n }\\n\\n /// @notice Use when you _really_ really _really_ don't trust the called\\n /// contract. This prevents the called contract from causing reversion of\\n /// the caller in as many ways as we can.\\n /// @dev The main difference between this and a solidity low-level call is\\n /// that we limit the number of bytes that the callee can cause to be\\n /// copied to caller memory. This prevents stupid things like malicious\\n /// contracts returning 10,000,000 bytes causing a local OOG when copying\\n /// to memory.\\n /// @param _target The address to call\\n /// @param _gas The amount of gas to forward to the remote contract\\n /// @param _maxCopy The maximum number of bytes of returndata to copy\\n /// to memory.\\n /// @param _calldata The data to send to the remote contract\\n /// @return success and returndata, as `.call()`. Returndata is capped to\\n /// `_maxCopy` bytes.\\n function excessivelySafeStaticCall(\\n address _target,\\n uint _gas,\\n uint16 _maxCopy,\\n bytes memory _calldata\\n ) internal view returns (bool, bytes memory) {\\n // set up for assembly call\\n uint _toCopy;\\n bool _success;\\n bytes memory _returnData = new bytes(_maxCopy);\\n // dispatch message to recipient\\n // by assembly calling \\\"handle\\\" function\\n // we call via assembly to avoid memcopying a very large returndata\\n // returned by a malicious contract\\n assembly {\\n _success := staticcall(\\n _gas, // gas\\n _target, // recipient\\n add(_calldata, 0x20), // inloc\\n mload(_calldata), // inlen\\n 0, // outloc\\n 0 // outlen\\n )\\n // limit our copy to 256 bytes\\n _toCopy := returndatasize()\\n if gt(_toCopy, _maxCopy) {\\n _toCopy := _maxCopy\\n }\\n // Store the length of the copied bytes\\n mstore(_returnData, _toCopy)\\n // copy the bytes from returndata[0:_toCopy]\\n returndatacopy(add(_returnData, 0x20), 0, _toCopy)\\n }\\n return (_success, _returnData);\\n }\\n\\n /**\\n * @notice Swaps function selectors in encoded contract calls\\n * @dev Allows reuse of encoded calldata for functions with identical\\n * argument types but different names. It simply swaps out the first 4 bytes\\n * for the new selector. This function modifies memory in place, and should\\n * only be used with caution.\\n * @param _newSelector The new 4-byte selector\\n * @param _buf The encoded contract args\\n */\\n function swapSelector(bytes4 _newSelector, bytes memory _buf) internal pure {\\n require(_buf.length >= 4);\\n uint _mask = LOW_28_MASK;\\n assembly {\\n // load the first word of\\n let _word := mload(add(_buf, 0x20))\\n // mask out the top 4 bytes\\n // /x\\n _word := and(_word, _mask)\\n _word := or(_newSelector, _word)\\n mstore(add(_buf, 0x20), _word)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xd4e52af409b5ec80432292d86fb01906785eb78ac31da3bab4565aabcd6e3e56\",\"license\":\"MIT OR Apache-2.0\"},\"@layerzerolabs/solidity-examples/contracts/lzApp/LzApp.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\nimport \\\"./interfaces/ILayerZeroReceiver.sol\\\";\\nimport \\\"./interfaces/ILayerZeroUserApplicationConfig.sol\\\";\\nimport \\\"./interfaces/ILayerZeroEndpoint.sol\\\";\\nimport \\\"../libraries/BytesLib.sol\\\";\\n\\n/*\\n * a generic LzReceiver implementation\\n */\\nabstract contract LzApp is Ownable, ILayerZeroReceiver, ILayerZeroUserApplicationConfig {\\n using BytesLib for bytes;\\n\\n // ua can not send payload larger than this by default, but it can be changed by the ua owner\\n uint public constant DEFAULT_PAYLOAD_SIZE_LIMIT = 10000;\\n\\n ILayerZeroEndpoint public immutable lzEndpoint;\\n mapping(uint16 => bytes) public trustedRemoteLookup;\\n mapping(uint16 => mapping(uint16 => uint)) public minDstGasLookup;\\n mapping(uint16 => uint) public payloadSizeLimitLookup;\\n address public precrime;\\n\\n event SetPrecrime(address precrime);\\n event SetTrustedRemote(uint16 _remoteChainId, bytes _path);\\n event SetTrustedRemoteAddress(uint16 _remoteChainId, bytes _remoteAddress);\\n event SetMinDstGas(uint16 _dstChainId, uint16 _type, uint _minDstGas);\\n\\n constructor(address _endpoint) {\\n lzEndpoint = ILayerZeroEndpoint(_endpoint);\\n }\\n\\n function lzReceive(\\n uint16 _srcChainId,\\n bytes calldata _srcAddress,\\n uint64 _nonce,\\n bytes calldata _payload\\n ) public virtual override {\\n // lzReceive must be called by the endpoint for security\\n require(_msgSender() == address(lzEndpoint), \\\"LzApp: invalid endpoint caller\\\");\\n\\n bytes memory trustedRemote = trustedRemoteLookup[_srcChainId];\\n // if will still block the message pathway from (srcChainId, srcAddress). should not receive message from untrusted remote.\\n require(\\n _srcAddress.length == trustedRemote.length && trustedRemote.length > 0 && keccak256(_srcAddress) == keccak256(trustedRemote),\\n \\\"LzApp: invalid source sending contract\\\"\\n );\\n\\n _blockingLzReceive(_srcChainId, _srcAddress, _nonce, _payload);\\n }\\n\\n // abstract function - the default behaviour of LayerZero is blocking. See: NonblockingLzApp if you dont need to enforce ordered messaging\\n function _blockingLzReceive(\\n uint16 _srcChainId,\\n bytes memory _srcAddress,\\n uint64 _nonce,\\n bytes memory _payload\\n ) internal virtual;\\n\\n function _lzSend(\\n uint16 _dstChainId,\\n bytes memory _payload,\\n address payable _refundAddress,\\n address _zroPaymentAddress,\\n bytes memory _adapterParams,\\n uint _nativeFee\\n ) internal virtual {\\n bytes memory trustedRemote = trustedRemoteLookup[_dstChainId];\\n require(trustedRemote.length != 0, \\\"LzApp: destination chain is not a trusted source\\\");\\n _checkPayloadSize(_dstChainId, _payload.length);\\n lzEndpoint.send{value: _nativeFee}(_dstChainId, trustedRemote, _payload, _refundAddress, _zroPaymentAddress, _adapterParams);\\n }\\n\\n function _checkGasLimit(\\n uint16 _dstChainId,\\n uint16 _type,\\n bytes memory _adapterParams,\\n uint _extraGas\\n ) internal view virtual {\\n uint providedGasLimit = _getGasLimit(_adapterParams);\\n uint minGasLimit = minDstGasLookup[_dstChainId][_type];\\n require(minGasLimit > 0, \\\"LzApp: minGasLimit not set\\\");\\n require(providedGasLimit >= minGasLimit + _extraGas, \\\"LzApp: gas limit is too low\\\");\\n }\\n\\n function _getGasLimit(bytes memory _adapterParams) internal pure virtual returns (uint gasLimit) {\\n require(_adapterParams.length >= 34, \\\"LzApp: invalid adapterParams\\\");\\n assembly {\\n gasLimit := mload(add(_adapterParams, 34))\\n }\\n }\\n\\n function _checkPayloadSize(uint16 _dstChainId, uint _payloadSize) internal view virtual {\\n uint payloadSizeLimit = payloadSizeLimitLookup[_dstChainId];\\n if (payloadSizeLimit == 0) {\\n // use default if not set\\n payloadSizeLimit = DEFAULT_PAYLOAD_SIZE_LIMIT;\\n }\\n require(_payloadSize <= payloadSizeLimit, \\\"LzApp: payload size is too large\\\");\\n }\\n\\n //---------------------------UserApplication config----------------------------------------\\n function getConfig(\\n uint16 _version,\\n uint16 _chainId,\\n address,\\n uint _configType\\n ) external view returns (bytes memory) {\\n return lzEndpoint.getConfig(_version, _chainId, address(this), _configType);\\n }\\n\\n // generic config for LayerZero user Application\\n function setConfig(\\n uint16 _version,\\n uint16 _chainId,\\n uint _configType,\\n bytes calldata _config\\n ) external override onlyOwner {\\n lzEndpoint.setConfig(_version, _chainId, _configType, _config);\\n }\\n\\n function setSendVersion(uint16 _version) external override onlyOwner {\\n lzEndpoint.setSendVersion(_version);\\n }\\n\\n function setReceiveVersion(uint16 _version) external override onlyOwner {\\n lzEndpoint.setReceiveVersion(_version);\\n }\\n\\n function forceResumeReceive(uint16 _srcChainId, bytes calldata _srcAddress) external override onlyOwner {\\n lzEndpoint.forceResumeReceive(_srcChainId, _srcAddress);\\n }\\n\\n // _path = abi.encodePacked(remoteAddress, localAddress)\\n // this function set the trusted path for the cross-chain communication\\n function setTrustedRemote(uint16 _remoteChainId, bytes calldata _path) external onlyOwner {\\n trustedRemoteLookup[_remoteChainId] = _path;\\n emit SetTrustedRemote(_remoteChainId, _path);\\n }\\n\\n function setTrustedRemoteAddress(uint16 _remoteChainId, bytes calldata _remoteAddress) external onlyOwner {\\n trustedRemoteLookup[_remoteChainId] = abi.encodePacked(_remoteAddress, address(this));\\n emit SetTrustedRemoteAddress(_remoteChainId, _remoteAddress);\\n }\\n\\n function getTrustedRemoteAddress(uint16 _remoteChainId) external view returns (bytes memory) {\\n bytes memory path = trustedRemoteLookup[_remoteChainId];\\n require(path.length != 0, \\\"LzApp: no trusted path record\\\");\\n return path.slice(0, path.length - 20); // the last 20 bytes should be address(this)\\n }\\n\\n function setPrecrime(address _precrime) external onlyOwner {\\n precrime = _precrime;\\n emit SetPrecrime(_precrime);\\n }\\n\\n function setMinDstGas(\\n uint16 _dstChainId,\\n uint16 _packetType,\\n uint _minGas\\n ) external onlyOwner {\\n minDstGasLookup[_dstChainId][_packetType] = _minGas;\\n emit SetMinDstGas(_dstChainId, _packetType, _minGas);\\n }\\n\\n // if the size is 0, it means default size limit\\n function setPayloadSizeLimit(uint16 _dstChainId, uint _size) external onlyOwner {\\n payloadSizeLimitLookup[_dstChainId] = _size;\\n }\\n\\n //--------------------------- VIEW FUNCTION ----------------------------------------\\n function isTrustedRemote(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (bool) {\\n bytes memory trustedSource = trustedRemoteLookup[_srcChainId];\\n return keccak256(trustedSource) == keccak256(_srcAddress);\\n }\\n}\\n\",\"keccak256\":\"0x309c994bdcf69ad63c6789694a28eb72a773e2d9db58fe572ab2b34a475972ce\",\"license\":\"MIT\"},\"@layerzerolabs/solidity-examples/contracts/lzApp/NonblockingLzApp.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./LzApp.sol\\\";\\nimport \\\"../libraries/ExcessivelySafeCall.sol\\\";\\n\\n/*\\n * the default LayerZero messaging behaviour is blocking, i.e. any failed message will block the channel\\n * this abstract class try-catch all fail messages and store locally for future retry. hence, non-blocking\\n * NOTE: if the srcAddress is not configured properly, it will still block the message pathway from (srcChainId, srcAddress)\\n */\\nabstract contract NonblockingLzApp is LzApp {\\n using ExcessivelySafeCall for address;\\n\\n constructor(address _endpoint) LzApp(_endpoint) {}\\n\\n mapping(uint16 => mapping(bytes => mapping(uint64 => bytes32))) public failedMessages;\\n\\n event MessageFailed(uint16 _srcChainId, bytes _srcAddress, uint64 _nonce, bytes _payload, bytes _reason);\\n event RetryMessageSuccess(uint16 _srcChainId, bytes _srcAddress, uint64 _nonce, bytes32 _payloadHash);\\n\\n // overriding the virtual function in LzReceiver\\n function _blockingLzReceive(\\n uint16 _srcChainId,\\n bytes memory _srcAddress,\\n uint64 _nonce,\\n bytes memory _payload\\n ) internal virtual override {\\n (bool success, bytes memory reason) = address(this).excessivelySafeCall(\\n gasleft(),\\n 150,\\n abi.encodeWithSelector(this.nonblockingLzReceive.selector, _srcChainId, _srcAddress, _nonce, _payload)\\n );\\n if (!success) {\\n _storeFailedMessage(_srcChainId, _srcAddress, _nonce, _payload, reason);\\n }\\n }\\n\\n function _storeFailedMessage(\\n uint16 _srcChainId,\\n bytes memory _srcAddress,\\n uint64 _nonce,\\n bytes memory _payload,\\n bytes memory _reason\\n ) internal virtual {\\n failedMessages[_srcChainId][_srcAddress][_nonce] = keccak256(_payload);\\n emit MessageFailed(_srcChainId, _srcAddress, _nonce, _payload, _reason);\\n }\\n\\n function nonblockingLzReceive(\\n uint16 _srcChainId,\\n bytes calldata _srcAddress,\\n uint64 _nonce,\\n bytes calldata _payload\\n ) public virtual {\\n // only internal transaction\\n require(_msgSender() == address(this), \\\"NonblockingLzApp: caller must be LzApp\\\");\\n _nonblockingLzReceive(_srcChainId, _srcAddress, _nonce, _payload);\\n }\\n\\n //@notice override this function\\n function _nonblockingLzReceive(\\n uint16 _srcChainId,\\n bytes memory _srcAddress,\\n uint64 _nonce,\\n bytes memory _payload\\n ) internal virtual;\\n\\n function retryMessage(\\n uint16 _srcChainId,\\n bytes calldata _srcAddress,\\n uint64 _nonce,\\n bytes calldata _payload\\n ) public payable virtual {\\n // assert there is message to retry\\n bytes32 payloadHash = failedMessages[_srcChainId][_srcAddress][_nonce];\\n require(payloadHash != bytes32(0), \\\"NonblockingLzApp: no stored message\\\");\\n require(keccak256(_payload) == payloadHash, \\\"NonblockingLzApp: invalid payload\\\");\\n // clear the stored message\\n failedMessages[_srcChainId][_srcAddress][_nonce] = bytes32(0);\\n // execute the message. revert if it fails again\\n _nonblockingLzReceive(_srcChainId, _srcAddress, _nonce, _payload);\\n emit RetryMessageSuccess(_srcChainId, _srcAddress, _nonce, payloadHash);\\n }\\n}\\n\",\"keccak256\":\"0xf4bd9e0ecfa4eb18e7305eb66da44c8a4610c3d5afeaf6a3b44c4bf4b7169b40\",\"license\":\"MIT\"},\"@layerzerolabs/solidity-examples/contracts/lzApp/interfaces/ILayerZeroEndpoint.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.5.0;\\n\\nimport \\\"./ILayerZeroUserApplicationConfig.sol\\\";\\n\\ninterface ILayerZeroEndpoint is ILayerZeroUserApplicationConfig {\\n // @notice send a LayerZero message to the specified address at a LayerZero endpoint.\\n // @param _dstChainId - the destination chain identifier\\n // @param _destination - the address on destination chain (in bytes). address length/format may vary by chains\\n // @param _payload - a custom bytes payload to send to the destination contract\\n // @param _refundAddress - if the source transaction is cheaper than the amount of value passed, refund the additional amount to this address\\n // @param _zroPaymentAddress - the address of the ZRO token holder who would pay for the transaction\\n // @param _adapterParams - parameters for custom functionality. e.g. receive airdropped native gas from the relayer on destination\\n function send(\\n uint16 _dstChainId,\\n bytes calldata _destination,\\n bytes calldata _payload,\\n address payable _refundAddress,\\n address _zroPaymentAddress,\\n bytes calldata _adapterParams\\n ) external payable;\\n\\n // @notice used by the messaging library to publish verified payload\\n // @param _srcChainId - the source chain identifier\\n // @param _srcAddress - the source contract (as bytes) at the source chain\\n // @param _dstAddress - the address on destination chain\\n // @param _nonce - the unbound message ordering nonce\\n // @param _gasLimit - the gas limit for external contract execution\\n // @param _payload - verified payload to send to the destination contract\\n function receivePayload(\\n uint16 _srcChainId,\\n bytes calldata _srcAddress,\\n address _dstAddress,\\n uint64 _nonce,\\n uint _gasLimit,\\n bytes calldata _payload\\n ) external;\\n\\n // @notice get the inboundNonce of a lzApp from a source chain which could be EVM or non-EVM chain\\n // @param _srcChainId - the source chain identifier\\n // @param _srcAddress - the source chain contract address\\n function getInboundNonce(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (uint64);\\n\\n // @notice get the outboundNonce from this source chain which, consequently, is always an EVM\\n // @param _srcAddress - the source chain contract address\\n function getOutboundNonce(uint16 _dstChainId, address _srcAddress) external view returns (uint64);\\n\\n // @notice gets a quote in source native gas, for the amount that send() requires to pay for message delivery\\n // @param _dstChainId - the destination chain identifier\\n // @param _userApplication - the user app address on this EVM chain\\n // @param _payload - the custom message to send over LayerZero\\n // @param _payInZRO - if false, user app pays the protocol fee in native token\\n // @param _adapterParam - parameters for the adapter service, e.g. send some dust native token to dstChain\\n function estimateFees(\\n uint16 _dstChainId,\\n address _userApplication,\\n bytes calldata _payload,\\n bool _payInZRO,\\n bytes calldata _adapterParam\\n ) external view returns (uint nativeFee, uint zroFee);\\n\\n // @notice get this Endpoint's immutable source identifier\\n function getChainId() external view returns (uint16);\\n\\n // @notice the interface to retry failed message on this Endpoint destination\\n // @param _srcChainId - the source chain identifier\\n // @param _srcAddress - the source chain contract address\\n // @param _payload - the payload to be retried\\n function retryPayload(\\n uint16 _srcChainId,\\n bytes calldata _srcAddress,\\n bytes calldata _payload\\n ) external;\\n\\n // @notice query if any STORED payload (message blocking) at the endpoint.\\n // @param _srcChainId - the source chain identifier\\n // @param _srcAddress - the source chain contract address\\n function hasStoredPayload(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (bool);\\n\\n // @notice query if the _libraryAddress is valid for sending msgs.\\n // @param _userApplication - the user app address on this EVM chain\\n function getSendLibraryAddress(address _userApplication) external view returns (address);\\n\\n // @notice query if the _libraryAddress is valid for receiving msgs.\\n // @param _userApplication - the user app address on this EVM chain\\n function getReceiveLibraryAddress(address _userApplication) external view returns (address);\\n\\n // @notice query if the non-reentrancy guard for send() is on\\n // @return true if the guard is on. false otherwise\\n function isSendingPayload() external view returns (bool);\\n\\n // @notice query if the non-reentrancy guard for receive() is on\\n // @return true if the guard is on. false otherwise\\n function isReceivingPayload() external view returns (bool);\\n\\n // @notice get the configuration of the LayerZero messaging library of the specified version\\n // @param _version - messaging library version\\n // @param _chainId - the chainId for the pending config change\\n // @param _userApplication - the contract address of the user application\\n // @param _configType - type of configuration. every messaging library has its own convention.\\n function getConfig(\\n uint16 _version,\\n uint16 _chainId,\\n address _userApplication,\\n uint _configType\\n ) external view returns (bytes memory);\\n\\n // @notice get the send() LayerZero messaging library version\\n // @param _userApplication - the contract address of the user application\\n function getSendVersion(address _userApplication) external view returns (uint16);\\n\\n // @notice get the lzReceive() LayerZero messaging library version\\n // @param _userApplication - the contract address of the user application\\n function getReceiveVersion(address _userApplication) external view returns (uint16);\\n}\\n\",\"keccak256\":\"0xab7fcacc672251c850f00c0abd4100df9afcc4ad70b8d331a2fd4cb07acab9f4\",\"license\":\"MIT\"},\"@layerzerolabs/solidity-examples/contracts/lzApp/interfaces/ILayerZeroReceiver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.5.0;\\n\\ninterface ILayerZeroReceiver {\\n // @notice LayerZero endpoint will invoke this function to deliver the message on the destination\\n // @param _srcChainId - the source endpoint identifier\\n // @param _srcAddress - the source sending contract address from the source chain\\n // @param _nonce - the ordered message nonce\\n // @param _payload - the signed payload is the UA bytes has encoded to be sent\\n function lzReceive(\\n uint16 _srcChainId,\\n bytes calldata _srcAddress,\\n uint64 _nonce,\\n bytes calldata _payload\\n ) external;\\n}\\n\",\"keccak256\":\"0xac1966c1229bd4dc36b6c69eeb94a537bd9aa2198d7623b9ba7f8f7dbe79bb4c\",\"license\":\"MIT\"},\"@layerzerolabs/solidity-examples/contracts/lzApp/interfaces/ILayerZeroUserApplicationConfig.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.5.0;\\n\\ninterface ILayerZeroUserApplicationConfig {\\n // @notice set the configuration of the LayerZero messaging library of the specified version\\n // @param _version - messaging library version\\n // @param _chainId - the chainId for the pending config change\\n // @param _configType - type of configuration. every messaging library has its own convention.\\n // @param _config - configuration in the bytes. can encode arbitrary content.\\n function setConfig(\\n uint16 _version,\\n uint16 _chainId,\\n uint _configType,\\n bytes calldata _config\\n ) external;\\n\\n // @notice set the send() LayerZero messaging library version to _version\\n // @param _version - new messaging library version\\n function setSendVersion(uint16 _version) external;\\n\\n // @notice set the lzReceive() LayerZero messaging library version to _version\\n // @param _version - new messaging library version\\n function setReceiveVersion(uint16 _version) external;\\n\\n // @notice Only when the UA needs to resume the message flow in blocking mode and clear the stored payload\\n // @param _srcChainId - the chainId of the source chain\\n // @param _srcAddress - the contract address of the source contract at the source chain\\n function forceResumeReceive(uint16 _srcChainId, bytes calldata _srcAddress) external;\\n}\\n\",\"keccak256\":\"0xb4df93aeb0fb46373a4fb728ad2603edc8b9a1577eee8d801768dc115bf96498\",\"license\":\"MIT\"},\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor() {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xa94b34880e3c1b0b931662cb1c09e5dfa6662f31cba80e07c5ee71cd135c9673\",\"license\":\"MIT\"},\"@openzeppelin/contracts/security/Pausable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which allows children to implement an emergency stop\\n * mechanism that can be triggered by an authorized account.\\n *\\n * This module is used through inheritance. It will make available the\\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\\n * the functions of your contract. Note that they will not be pausable by\\n * simply including this module, only once the modifiers are put in place.\\n */\\nabstract contract Pausable is Context {\\n /**\\n * @dev Emitted when the pause is triggered by `account`.\\n */\\n event Paused(address account);\\n\\n /**\\n * @dev Emitted when the pause is lifted by `account`.\\n */\\n event Unpaused(address account);\\n\\n bool private _paused;\\n\\n /**\\n * @dev Initializes the contract in unpaused state.\\n */\\n constructor() {\\n _paused = false;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is not paused.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n modifier whenNotPaused() {\\n _requireNotPaused();\\n _;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is paused.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n modifier whenPaused() {\\n _requirePaused();\\n _;\\n }\\n\\n /**\\n * @dev Returns true if the contract is paused, and false otherwise.\\n */\\n function paused() public view virtual returns (bool) {\\n return _paused;\\n }\\n\\n /**\\n * @dev Throws if the contract is paused.\\n */\\n function _requireNotPaused() internal view virtual {\\n require(!paused(), \\\"Pausable: paused\\\");\\n }\\n\\n /**\\n * @dev Throws if the contract is not paused.\\n */\\n function _requirePaused() internal view virtual {\\n require(paused(), \\\"Pausable: not paused\\\");\\n }\\n\\n /**\\n * @dev Triggers stopped state.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n function _pause() internal virtual whenNotPaused {\\n _paused = true;\\n emit Paused(_msgSender());\\n }\\n\\n /**\\n * @dev Returns to normal state.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n function _unpause() internal virtual whenPaused {\\n _paused = false;\\n emit Unpaused(_msgSender());\\n }\\n}\\n\",\"keccak256\":\"0x0849d93b16c9940beb286a7864ed02724b248b93e0d80ef6355af5ef15c64773\",\"license\":\"MIT\"},\"@openzeppelin/contracts/security/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuard {\\n // Booleans are more expensive than uint256 or any type that takes up a full\\n // word because each write operation emits an extra SLOAD to first read the\\n // slot's contents, replace the bits taken up by the boolean, and then write\\n // back. This is the compiler's defense against contract upgrades and\\n // pointer aliasing, and it cannot be disabled.\\n\\n // The values being non-zero value makes deployment a bit more expensive,\\n // but in exchange the refund on every call to nonReentrant will be lower in\\n // amount. Since refunds are capped to a percentage of the total\\n // transaction's gas, it is best to keep them low in cases like this one, to\\n // increase the likelihood of the full refund coming into effect.\\n uint256 private constant _NOT_ENTERED = 1;\\n uint256 private constant _ENTERED = 2;\\n\\n uint256 private _status;\\n\\n constructor() {\\n _status = _NOT_ENTERED;\\n }\\n\\n /**\\n * @dev Prevents a contract from calling itself, directly or indirectly.\\n * Calling a `nonReentrant` function from another `nonReentrant`\\n * function is not supported. It is possible to prevent this from happening\\n * by making the `nonReentrant` function external, and making it call a\\n * `private` function that does the actual work.\\n */\\n modifier nonReentrant() {\\n _nonReentrantBefore();\\n _;\\n _nonReentrantAfter();\\n }\\n\\n function _nonReentrantBefore() private {\\n // On the first call to nonReentrant, _status will be _NOT_ENTERED\\n require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n _status = _ENTERED;\\n }\\n\\n function _nonReentrantAfter() private {\\n // By storing the original value once again, a refund is triggered (see\\n // https://eips.ethereum.org/EIPS/eip-2200)\\n _status = _NOT_ENTERED;\\n }\\n}\\n\",\"keccak256\":\"0x190dd6f8d592b7e4e930feb7f4313aeb8e1c4ad3154c27ce1cf6a512fc30d8cc\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"@venusprotocol/solidity-utilities/contracts/validators.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.25;\\n\\n/// @notice Thrown if the supplied address is a zero address where it is not allowed\\nerror ZeroAddressNotAllowed();\\n\\n/// @notice Thrown if the supplied value is 0 where it is not allowed\\nerror ZeroValueNotAllowed();\\n\\n/// @notice Checks if the provided address is nonzero, reverts otherwise\\n/// @param address_ Address to check\\n/// @custom:error ZeroAddressNotAllowed is thrown if the provided address is a zero address\\nfunction ensureNonzeroAddress(address address_) pure {\\n if (address_ == address(0)) {\\n revert ZeroAddressNotAllowed();\\n }\\n}\\n\\n/// @notice Checks if the provided value is nonzero, reverts otherwise\\n/// @param value_ Value to check\\n/// @custom:error ZeroValueNotAllowed is thrown if the provided value is 0\\nfunction ensureNonzeroValue(uint256 value_) pure {\\n if (value_ == 0) {\\n revert ZeroValueNotAllowed();\\n }\\n}\\n\",\"keccak256\":\"0xdb88e14d50dd21889ca3329d755673d022c47e8da005b6a545c7f69c2c4b7b86\",\"license\":\"BSD-3-Clause\"},\"contracts/Cross-chain/BaseOmnichainControllerDest.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\n\\npragma solidity 0.8.25;\\n\\nimport { NonblockingLzApp } from \\\"@layerzerolabs/solidity-examples/contracts/lzApp/NonblockingLzApp.sol\\\";\\nimport { Pausable } from \\\"@openzeppelin/contracts/security/Pausable.sol\\\";\\nimport { ensureNonzeroAddress } from \\\"@venusprotocol/solidity-utilities/contracts/validators.sol\\\";\\n\\n/**\\n * @title BaseOmnichainControllerDest\\n * @author Venus\\n * @dev This contract is the base for the Omnichain controller destination contract\\n * It provides functionality related to daily command limits and pausability\\n * @custom:security-contact https://github.com/VenusProtocol/governance-contracts#discussion\\n */\\n\\nabstract contract BaseOmnichainControllerDest is NonblockingLzApp, Pausable {\\n /**\\n * @notice Maximum daily limit for receiving commands from Binance chain\\n */\\n uint256 public maxDailyReceiveLimit;\\n\\n /**\\n * @notice Total received commands within the last 24-hour window from Binance chain\\n */\\n uint256 public last24HourCommandsReceived;\\n\\n /**\\n * @notice Timestamp when the last 24-hour window started from Binance chain\\n */\\n uint256 public last24HourReceiveWindowStart;\\n\\n /**\\n * @notice Emitted when the maximum daily limit for receiving command from Binance chain is modified\\n */\\n event SetMaxDailyReceiveLimit(uint256 oldMaxLimit, uint256 newMaxLimit);\\n\\n constructor(address endpoint_) NonblockingLzApp(endpoint_) {\\n ensureNonzeroAddress(endpoint_);\\n }\\n\\n /**\\n * @notice Sets the maximum daily limit for receiving commands\\n * @param limit_ Number of commands\\n * @custom:access Only Owner\\n * @custom:event Emits SetMaxDailyReceiveLimit with old and new limit\\n */\\n function setMaxDailyReceiveLimit(uint256 limit_) external onlyOwner {\\n emit SetMaxDailyReceiveLimit(maxDailyReceiveLimit, limit_);\\n maxDailyReceiveLimit = limit_;\\n }\\n\\n /**\\n * @notice Triggers the paused state of the controller\\n * @custom:access Only owner\\n */\\n function pause() external onlyOwner {\\n _pause();\\n }\\n\\n /**\\n * @notice Triggers the resume state of the controller\\n * @custom:access Only owner\\n */\\n function unpause() external onlyOwner {\\n _unpause();\\n }\\n\\n /**\\n * @notice Empty implementation of renounce ownership to avoid any mishappening\\n */\\n function renounceOwnership() public override {}\\n\\n /**\\n * @notice Check eligibility to receive commands\\n * @param noOfCommands_ Number of commands to be received\\n */\\n function _isEligibleToReceive(uint256 noOfCommands_) internal {\\n uint256 currentBlockTimestamp = block.timestamp;\\n\\n // Load values for the 24-hour window checks for receiving\\n uint256 receivedInWindow = last24HourCommandsReceived;\\n\\n // Check if the time window has changed (more than 24 hours have passed)\\n if (currentBlockTimestamp - last24HourReceiveWindowStart > 1 days) {\\n receivedInWindow = noOfCommands_;\\n last24HourReceiveWindowStart = currentBlockTimestamp;\\n } else {\\n receivedInWindow += noOfCommands_;\\n }\\n\\n // Revert if the received amount exceeds the daily limit\\n require(receivedInWindow <= maxDailyReceiveLimit, \\\"Daily Transaction Limit Exceeded\\\");\\n\\n // Update the received amount for the 24-hour window\\n last24HourCommandsReceived = receivedInWindow;\\n }\\n}\\n\",\"keccak256\":\"0x5ccc63f55acd7c37e6e3ce36d034f82173bc8daf257cb859e08238b860cf3723\",\"license\":\"BSD-3-Clause\"},\"contracts/Cross-chain/OmnichainGovernanceExecutor.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.25;\\n\\nimport { ReentrancyGuard } from \\\"@openzeppelin/contracts/security/ReentrancyGuard.sol\\\";\\nimport { BytesLib } from \\\"@layerzerolabs/solidity-examples/contracts/libraries/BytesLib.sol\\\";\\nimport { ExcessivelySafeCall } from \\\"@layerzerolabs/solidity-examples/contracts/libraries/ExcessivelySafeCall.sol\\\";\\nimport { ensureNonzeroAddress } from \\\"@venusprotocol/solidity-utilities/contracts/validators.sol\\\";\\nimport { BaseOmnichainControllerDest } from \\\"./BaseOmnichainControllerDest.sol\\\";\\nimport { ITimelock } from \\\"./interfaces/ITimelock.sol\\\";\\n\\n/**\\n * @title OmnichainGovernanceExecutor\\n * @notice Executes the proposal transactions sent from the main chain\\n * @dev The owner of this contract controls LayerZero configuration. When used in production the owner will be OmnichainExecutor\\n * This implementation is non-blocking, meaning the failed messages will not block the future messages from the source.\\n * For the blocking behavior, derive the contract from LzApp.\\n * @custom:security-contact https://github.com/VenusProtocol/governance-contracts#discussion\\n */\\ncontract OmnichainGovernanceExecutor is ReentrancyGuard, BaseOmnichainControllerDest {\\n using BytesLib for bytes;\\n using ExcessivelySafeCall for address;\\n\\n enum ProposalType {\\n NORMAL,\\n FASTTRACK,\\n CRITICAL\\n }\\n\\n struct Proposal {\\n /** Unique id for looking up a proposal */\\n uint256 id;\\n /** The timestamp that the proposal will be available for execution, set once the vote succeeds */\\n uint256 eta;\\n /** The ordered list of target addresses for calls to be made */\\n address[] targets;\\n /** The ordered list of values (i.e. msg.value) to be passed to the calls to be made */\\n uint256[] values;\\n /** The ordered list of function signatures to be called */\\n string[] signatures;\\n /** The ordered list of calldata to be passed to each call */\\n bytes[] calldatas;\\n /** Flag marking whether the proposal has been canceled */\\n bool canceled;\\n /** Flag marking whether the proposal has been executed */\\n bool executed;\\n /** The type of the proposal */\\n uint8 proposalType;\\n }\\n /*\\n * @notice Possible states that a proposal may be in\\n */\\n enum ProposalState {\\n Canceled,\\n Queued,\\n Executed\\n }\\n\\n /**\\n * @notice A privileged role that can cancel any proposal\\n */\\n address public guardian;\\n\\n /**\\n * @notice Stores BNB chain layerzero endpoint id\\n */\\n uint16 public srcChainId;\\n\\n /**\\n * @notice Last proposal count received\\n */\\n uint256 public lastProposalReceived;\\n\\n /**\\n * @notice The official record of all proposals ever proposed\\n */\\n mapping(uint256 => Proposal) public proposals;\\n\\n /**\\n * @notice Mapping containing Timelock addresses for each proposal type\\n */\\n mapping(uint256 => ITimelock) public proposalTimelocks;\\n\\n /**\\n * @notice Represents queue state of proposal\\n */\\n mapping(uint256 => bool) public queued;\\n\\n /**\\n * @notice Emitted when proposal is received\\n */\\n event ProposalReceived(\\n uint256 indexed proposalId,\\n address[] targets,\\n uint256[] values,\\n string[] signatures,\\n bytes[] calldatas,\\n uint8 proposalType\\n );\\n\\n /**\\n * @notice Emitted when proposal is queued\\n */\\n event ProposalQueued(uint256 indexed id, uint256 eta);\\n\\n /**\\n * Emitted when proposal executed\\n */\\n event ProposalExecuted(uint256 indexed id);\\n\\n /**\\n * @notice Emitted when proposal failed\\n */\\n event ReceivePayloadFailed(uint16 indexed srcChainId, bytes indexed srcAddress, uint64 nonce, bytes reason);\\n\\n /**\\n * @notice Emitted when proposal is canceled\\n */\\n event ProposalCanceled(uint256 indexed id);\\n\\n /**\\n * @notice Emitted when timelock added\\n */\\n event TimelockAdded(uint8 routeType, address indexed oldTimelock, address indexed newTimelock);\\n\\n /**\\n * @notice Emitted when source layerzero endpoint id is updated\\n */\\n event SetSrcChainId(uint16 indexed oldSrcChainId, uint16 indexed newSrcChainId);\\n\\n /**\\n * @notice Emitted when new guardian address is set\\n */\\n event NewGuardian(address indexed oldGuardian, address indexed newGuardian);\\n\\n /**\\n * @notice Emitted when pending admin of Timelock is updated\\n */\\n event SetTimelockPendingAdmin(address, uint8);\\n\\n /**\\n * @notice Thrown when proposal ID is invalid\\n */\\n error InvalidProposalId();\\n\\n constructor(address endpoint_, address guardian_, uint16 srcChainId_) BaseOmnichainControllerDest(endpoint_) {\\n ensureNonzeroAddress(guardian_);\\n guardian = guardian_;\\n srcChainId = srcChainId_;\\n }\\n\\n /**\\n * @notice Update source layerzero endpoint id\\n * @param srcChainId_ The new source chain id to be set\\n * @custom:event Emit SetSrcChainId with old and new source id\\n * @custom:access Only owner\\n */\\n function setSrcChainId(uint16 srcChainId_) external onlyOwner {\\n emit SetSrcChainId(srcChainId, srcChainId_);\\n srcChainId = srcChainId_;\\n }\\n\\n /**\\n * @notice Sets the new executor guardian\\n * @param newGuardian The address of the new guardian\\n * @custom:access Must be call by guardian or owner\\n * @custom:event Emit NewGuardian with old and new guardian address\\n */\\n function setGuardian(address newGuardian) external {\\n require(\\n msg.sender == guardian || msg.sender == owner(),\\n \\\"OmnichainGovernanceExecutor::setGuardian: owner or guardian only\\\"\\n );\\n ensureNonzeroAddress(newGuardian);\\n emit NewGuardian(guardian, newGuardian);\\n guardian = newGuardian;\\n }\\n\\n /**\\n * @notice Add timelocks to the ProposalTimelocks mapping\\n * @param timelocks_ Array of addresses of all 3 timelocks\\n * @custom:access Only owner\\n * @custom:event Emits TimelockAdded with old and new timelock and route type\\n */\\n function addTimelocks(ITimelock[] memory timelocks_) external onlyOwner {\\n uint8 length = uint8(type(ProposalType).max) + 1;\\n require(\\n timelocks_.length == length,\\n \\\"OmnichainGovernanceExecutor::addTimelocks:number of timelocks should match the number of governance routes\\\"\\n );\\n for (uint8 i; i < length; ++i) {\\n ensureNonzeroAddress(address(timelocks_[i]));\\n emit TimelockAdded(i, address(proposalTimelocks[i]), address(timelocks_[i]));\\n proposalTimelocks[i] = timelocks_[i];\\n }\\n }\\n\\n /**\\n * @notice Executes a queued proposal if eta has passed\\n * @param proposalId_ Id of proposal that is to be executed\\n * @custom:event Emits ProposalExecuted with proposal id of executed proposal\\n */\\n function execute(uint256 proposalId_) external nonReentrant {\\n require(\\n state(proposalId_) == ProposalState.Queued,\\n \\\"OmnichainGovernanceExecutor::execute: proposal can only be executed if it is queued\\\"\\n );\\n\\n Proposal storage proposal = proposals[proposalId_];\\n proposal.executed = true;\\n ITimelock timelock = proposalTimelocks[proposal.proposalType];\\n uint256 eta = proposal.eta;\\n uint256 length = proposal.targets.length;\\n\\n emit ProposalExecuted(proposalId_);\\n\\n for (uint256 i; i < length; ++i) {\\n timelock.executeTransaction(\\n proposal.targets[i],\\n proposal.values[i],\\n proposal.signatures[i],\\n proposal.calldatas[i],\\n eta\\n );\\n }\\n delete queued[proposalId_];\\n }\\n\\n /**\\n * @notice Cancels a proposal only if sender is the guardian and proposal is not executed\\n * @param proposalId_ Id of proposal that is to be canceled\\n * @custom:access Sender must be the guardian\\n * @custom:event Emits ProposalCanceled with proposal id of the canceled proposal\\n */\\n function cancel(uint256 proposalId_) external {\\n require(\\n state(proposalId_) == ProposalState.Queued,\\n \\\"OmnichainGovernanceExecutor::cancel: proposal should be queued and not executed\\\"\\n );\\n Proposal storage proposal = proposals[proposalId_];\\n require(msg.sender == guardian, \\\"OmnichainGovernanceExecutor::cancel: sender must be guardian\\\");\\n\\n proposal.canceled = true;\\n ITimelock timelock = proposalTimelocks[proposal.proposalType];\\n uint256 eta = proposal.eta;\\n uint256 length = proposal.targets.length;\\n\\n emit ProposalCanceled(proposalId_);\\n\\n for (uint256 i; i < length; ++i) {\\n timelock.cancelTransaction(\\n proposal.targets[i],\\n proposal.values[i],\\n proposal.signatures[i],\\n proposal.calldatas[i],\\n eta\\n );\\n }\\n delete queued[proposalId_];\\n }\\n\\n /**\\n * @notice Sets the new pending admin of the Timelock\\n * @param pendingAdmin_ Address of new pending admin\\n * @param proposalType_ Type of proposal\\n * @custom:access Only owner\\n * @custom:event Emits SetTimelockPendingAdmin with new pending admin and proposal type\\n */\\n function setTimelockPendingAdmin(address pendingAdmin_, uint8 proposalType_) external onlyOwner {\\n uint8 proposalTypeLength = uint8(type(ProposalType).max) + 1;\\n require(\\n proposalType_ < proposalTypeLength,\\n \\\"OmnichainGovernanceExecutor::setTimelockPendingAdmin: invalid proposal type\\\"\\n );\\n\\n proposalTimelocks[proposalType_].setPendingAdmin(pendingAdmin_);\\n emit SetTimelockPendingAdmin(pendingAdmin_, proposalType_);\\n }\\n\\n /**\\n * @notice Resends a previously failed message\\n * @param srcChainId_ Source chain Id\\n * @param srcAddress_ Source address => local app address + remote app address\\n * @param nonce_ Nonce to identify failed message\\n * @param payload_ The payload of the message to be retried\\n * @custom:access Only owner\\n */\\n function retryMessage(\\n uint16 srcChainId_,\\n bytes calldata srcAddress_,\\n uint64 nonce_,\\n bytes calldata payload_\\n ) public payable override onlyOwner nonReentrant {\\n require(\\n keccak256(trustedRemoteLookup[srcChainId_]) == keccak256(srcAddress_),\\n \\\"OmnichainGovernanceExecutor::retryMessage: not a trusted remote\\\"\\n );\\n super.retryMessage(srcChainId_, srcAddress_, nonce_, payload_);\\n }\\n\\n /**\\n * @notice Gets the state of a proposal\\n * @param proposalId_ The id of the proposal\\n * @return Proposal state\\n */\\n function state(uint256 proposalId_) public view returns (ProposalState) {\\n Proposal storage proposal = proposals[proposalId_];\\n if (proposal.canceled) {\\n return ProposalState.Canceled;\\n } else if (proposal.executed) {\\n return ProposalState.Executed;\\n } else if (queued[proposalId_]) {\\n // queued only when proposal is received\\n return ProposalState.Queued;\\n } else {\\n revert InvalidProposalId();\\n }\\n }\\n\\n /**\\n * @notice Process blocking LayerZero receive request\\n * @param srcChainId_ Source chain Id\\n * @param srcAddress_ Source address from which payload is received\\n * @param nonce_ Nonce associated with the payload to prevent replay attacks\\n * @param payload_ Encoded payload containing proposal information\\n * @custom:event Emit ReceivePayloadFailed if call fails\\n */\\n function _blockingLzReceive(\\n uint16 srcChainId_,\\n bytes memory srcAddress_,\\n uint64 nonce_,\\n bytes memory payload_\\n ) internal virtual override {\\n require(srcChainId_ == srcChainId, \\\"OmnichainGovernanceExecutor::_blockingLzReceive: invalid source chain id\\\");\\n bytes32 hashedPayload = keccak256(payload_);\\n bytes memory callData = abi.encodeCall(this.nonblockingLzReceive, (srcChainId_, srcAddress_, nonce_, payload_));\\n\\n (bool success, bytes memory reason) = address(this).excessivelySafeCall(gasleft() - 30000, 150, callData);\\n // try-catch all errors/exceptions\\n if (!success) {\\n failedMessages[srcChainId_][srcAddress_][nonce_] = hashedPayload;\\n emit ReceivePayloadFailed(srcChainId_, srcAddress_, nonce_, reason); // Retrieve payload from the src side tx if needed to clear\\n }\\n }\\n\\n /**\\n * @notice Process non blocking LayerZero receive request\\n * @param payload_ Encoded payload containing proposal information\\n * @custom:event Emit ProposalReceived\\n */\\n function _nonblockingLzReceive(\\n uint16,\\n bytes memory,\\n uint64,\\n bytes memory payload_\\n ) internal virtual override whenNotPaused {\\n (bytes memory payload, uint256 pId) = abi.decode(payload_, (bytes, uint256));\\n (\\n address[] memory targets,\\n uint256[] memory values,\\n string[] memory signatures,\\n bytes[] memory calldatas,\\n uint8 pType\\n ) = abi.decode(payload, (address[], uint256[], string[], bytes[], uint8));\\n require(proposals[pId].id == 0, \\\"OmnichainGovernanceExecutor::_nonblockingLzReceive: duplicate proposal\\\");\\n require(\\n targets.length == values.length &&\\n targets.length == signatures.length &&\\n targets.length == calldatas.length,\\n \\\"OmnichainGovernanceExecutor::_nonblockingLzReceive: proposal function information arity mismatch\\\"\\n );\\n require(\\n pType < uint8(type(ProposalType).max) + 1,\\n \\\"OmnichainGovernanceExecutor::_nonblockingLzReceive: invalid proposal type\\\"\\n );\\n _isEligibleToReceive(targets.length);\\n\\n Proposal memory newProposal = Proposal({\\n id: pId,\\n eta: 0,\\n targets: targets,\\n values: values,\\n signatures: signatures,\\n calldatas: calldatas,\\n canceled: false,\\n executed: false,\\n proposalType: pType\\n });\\n\\n proposals[pId] = newProposal;\\n lastProposalReceived = pId;\\n\\n emit ProposalReceived(newProposal.id, targets, values, signatures, calldatas, pType);\\n _queue(pId);\\n }\\n\\n /**\\n * @notice Queue proposal for execution\\n * @param proposalId_ Proposal to be queued\\n * @custom:event Emit ProposalQueued with proposal id and eta\\n */\\n function _queue(uint256 proposalId_) internal {\\n Proposal storage proposal = proposals[proposalId_];\\n uint256 eta = block.timestamp + proposalTimelocks[proposal.proposalType].delay();\\n\\n proposal.eta = eta;\\n queued[proposalId_] = true;\\n uint8 proposalType = proposal.proposalType;\\n uint256 length = proposal.targets.length;\\n emit ProposalQueued(proposalId_, eta);\\n\\n for (uint256 i; i < length; ++i) {\\n _queueOrRevertInternal(\\n proposal.targets[i],\\n proposal.values[i],\\n proposal.signatures[i],\\n proposal.calldatas[i],\\n eta,\\n proposalType\\n );\\n }\\n }\\n\\n /**\\n * @notice Check for unique proposal\\n * @param target_ Address of the contract with the method to be called\\n * @param value_ Native token amount sent with the transaction\\n * @param signature_ Signature of the function to be called\\n * @param data_ Arguments to be passed to the function when called\\n * @param eta_ Timestamp after which the transaction can be executed\\n * @param proposalType_ Type of proposal\\n */\\n function _queueOrRevertInternal(\\n address target_,\\n uint256 value_,\\n string memory signature_,\\n bytes memory data_,\\n uint256 eta_,\\n uint8 proposalType_\\n ) internal {\\n require(\\n !proposalTimelocks[proposalType_].queuedTransactions(\\n keccak256(abi.encode(target_, value_, signature_, data_, eta_))\\n ),\\n \\\"OmnichainGovernanceExecutor::queueOrRevertInternal: identical proposal action already queued at eta\\\"\\n );\\n\\n proposalTimelocks[proposalType_].queueTransaction(target_, value_, signature_, data_, eta_);\\n }\\n}\\n\",\"keccak256\":\"0x6b3858ea6ac8248a7189910ed6f8af22cfa2299bcec8d015940ddae3406b3adb\",\"license\":\"MIT\"},\"contracts/Cross-chain/interfaces/ITimelock.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity ^0.8.25;\\n\\n/**\\n * @title ITimelock\\n * @author Venus\\n * @dev Interface for Timelock contract\\n * @custom:security-contact https://github.com/VenusProtocol/governance-contracts#discussion\\n */\\ninterface ITimelock {\\n /**\\n * @notice Delay period for the transaction queue\\n */\\n function delay() external view returns (uint256);\\n\\n /**\\n * @notice Required period to execute a proposal transaction\\n */\\n function GRACE_PERIOD() external view returns (uint256);\\n\\n /**\\n * @notice Method for accepting a proposed admin\\n */\\n function acceptAdmin() external;\\n\\n /**\\n * @notice Method to propose a new admin authorized to call timelock functions. This should be the Governor Contract.\\n */\\n function setPendingAdmin(address pendingAdmin) external;\\n\\n /**\\n * @notice Show mapping of queued transactions\\n * @param hash Transaction hash\\n */\\n function queuedTransactions(bytes32 hash) external view returns (bool);\\n\\n /**\\n * @notice Called for each action when queuing a proposal\\n * @param target Address of the contract with the method to be called\\n * @param value Native token amount sent with the transaction\\n * @param signature signature of the function to be called\\n * @param data Arguments to be passed to the function when called\\n * @param eta Timestamp after which the transaction can be executed\\n * @return Hash of the queued transaction\\n */\\n function queueTransaction(\\n address target,\\n uint256 value,\\n string calldata signature,\\n bytes calldata data,\\n uint256 eta\\n ) external returns (bytes32);\\n\\n /**\\n * @notice Called to cancel a queued transaction\\n * @param target Address of the contract with the method to be called\\n * @param value Native token amount sent with the transaction\\n * @param signature signature of the function to be called\\n * @param data Arguments to be passed to the function when called\\n * @param eta Timestamp after which the transaction can be executed\\n */\\n function cancelTransaction(\\n address target,\\n uint256 value,\\n string calldata signature,\\n bytes calldata data,\\n uint256 eta\\n ) external;\\n\\n /**\\n * @notice Called to execute a queued transaction\\n * @param target Address of the contract with the method to be called\\n * @param value Native token amount sent with the transaction\\n * @param signature signature of the function to be called\\n * @param data Arguments to be passed to the function when called\\n * @param eta Timestamp after which the transaction can be executed\\n * @return Result of function call\\n */\\n function executeTransaction(\\n address target,\\n uint256 value,\\n string calldata signature,\\n bytes calldata data,\\n uint256 eta\\n ) external payable returns (bytes memory);\\n}\\n\",\"keccak256\":\"0x7e05998e5b36a78e6b7933e446c0e0a634ba7fdaae1eb8ba6d4affe12f3a2712\",\"license\":\"BSD-3-Clause\"}},\"version\":1}", + "bytecode": "0x60a060405234801561001057600080fd5b50604051614aa5380380614aa583398101604081905261002f91610136565b60016000558280806100403361009e565b6001600160a01b0316608052506007805460ff19169055610060816100f0565b5061006a826100f0565b600b805461ffff909216600160a01b026001600160b01b03199092166001600160a01b039093169290921717905550610184565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b038116610117576040516342bcdf7f60e11b815260040160405180910390fd5b50565b80516001600160a01b038116811461013157600080fd5b919050565b60008060006060848603121561014b57600080fd5b6101548461011a565b92506101626020850161011a565b9150604084015161ffff8116811461017957600080fd5b809150509250925092565b6080516148dc6101c960003960008181610804015281816109d501528181610c6101528181610d2f01528181611232015281816118c70152611f7901526148dc6000f3fe6080604052600436106102f15760003560e01c8063876919e81161018f578063c4461834116100e1578063ed66039b1161008a578063f4fcfcca11610064578063f4fcfcca14610972578063f5ecbdbc14610992578063fe0d94c1146109b257600080fd5b8063ed66039b146108ef578063ee9799ee1461090f578063f2fde38b1461095257600080fd5b8063d1deba1f116100bb578063d1deba1f1461089c578063df2a5b3b146108af578063eb8d72b7146108cf57600080fd5b8063c446183414610846578063c8b42e5b1461085c578063cbed8b9c1461087c57600080fd5b8063950c8a7411610143578063a6c3d1651161011d578063a6c3d165146107d2578063b353aaa7146107f2578063baf3292d1461082657600080fd5b8063950c8a74146107555780639f0c3101146107825780639f38369a146107b257600080fd5b80638cfd8f5c116101745780638cfd8f5c146106d25780638da5cb5b1461070a5780639493ffad1461073557600080fd5b8063876919e81461069c5780638a0dac4a146106b257600080fd5b806342d65a8d116102485780635c975abb116101fc578063715018a6116101d6578063715018a61461064e5780637533d7881461065a5780638456cb591461068757600080fd5b80635c975abb1461060057806366ad5c8a1461061857806370f6ad9a1461063857600080fd5b8063452a93201161022d578063452a93201461051957806349d126051461056b5780635b8c41e6146105b157600080fd5b806342d65a8d146104e35780634406baaf1461050357600080fd5b806310ddb137116102aa5780633f1f4fa4116102845780633f1f4fa4146104815780633f4ba83a146104ae57806340e58ee5146104c357600080fd5b806310ddb137146104045780633d8b38f6146104245780633e4f49e61461045457600080fd5b80630435bb56116102db5780630435bb56146103a057806307e0db17146103c45780630df37483146103e457600080fd5b80621d3567146102f6578063013cf08b14610318575b600080fd5b34801561030257600080fd5b506103166103113660046137db565b6109d2565b005b34801561032457600080fd5b5061036a61033336600461386f565b600d6020526000908152604090208054600182015460069092015490919060ff808216916101008104821691620100009091041685565b60408051958652602086019490945291151592840192909252901515606083015260ff16608082015260a0015b60405180910390f35b3480156103ac57600080fd5b506103b660085481565b604051908152602001610397565b3480156103d057600080fd5b506103166103df366004613888565b610c27565b3480156103f057600080fd5b506103166103ff3660046138a3565b610cd6565b34801561041057600080fd5b5061031661041f366004613888565b610cf5565b34801561043057600080fd5b5061044461043f3660046138cd565b610d73565b6040519015158152602001610397565b34801561046057600080fd5b5061047461046f36600461386f565b610e40565b604051610397919061394f565b34801561048d57600080fd5b506103b661049c366004613888565b60046020526000908152604090205481565b3480156104ba57600080fd5b50610316610ed7565b3480156104cf57600080fd5b506103166104de36600461386f565b610ee9565b3480156104ef57600080fd5b506103166104fe3660046138cd565b6111ed565b34801561050f57600080fd5b506103b6600c5481565b34801561052557600080fd5b50600b546105469073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610397565b34801561057757600080fd5b50600b5461059e9074010000000000000000000000000000000000000000900461ffff1681565b60405161ffff9091168152602001610397565b3480156105bd57600080fd5b506103b66105cc366004613a18565b6006602090815260009384526040808520845180860184018051928152908401958401959095209452929052825290205481565b34801561060c57600080fd5b5060075460ff16610444565b34801561062457600080fd5b506103166106333660046137db565b611299565b34801561064457600080fd5b506103b660095481565b34801561031657600080fd5b34801561066657600080fd5b5061067a610675366004613888565b61138c565b6040516103979190613b09565b34801561069357600080fd5b50610316611426565b3480156106a857600080fd5b506103b6600a5481565b3480156106be57600080fd5b506103166106cd366004613b3e565b611436565b3480156106de57600080fd5b506103b66106ed366004613b5b565b600360209081526000928352604080842090915290825290205481565b34801561071657600080fd5b5060015473ffffffffffffffffffffffffffffffffffffffff16610546565b34801561074157600080fd5b5061031661075036600461386f565b61157e565b34801561076157600080fd5b506005546105469073ffffffffffffffffffffffffffffffffffffffff1681565b34801561078e57600080fd5b5061044461079d36600461386f565b600f6020526000908152604090205460ff1681565b3480156107be57600080fd5b5061067a6107cd366004613888565b6115c7565b3480156107de57600080fd5b506103166107ed3660046138cd565b6116d6565b3480156107fe57600080fd5b506105467f000000000000000000000000000000000000000000000000000000000000000081565b34801561083257600080fd5b50610316610841366004613b3e565b61175f565b34801561085257600080fd5b506103b661271081565b34801561086857600080fd5b50610316610877366004613888565b6117e0565b34801561088857600080fd5b50610316610897366004613b8e565b611882565b6103166108aa3660046137db565b61193d565b3480156108bb57600080fd5b506103166108ca366004613bfd565b611a19565b3480156108db57600080fd5b506103166108ea3660046138cd565b611a83565b3480156108fb57600080fd5b5061031661090a366004613c5d565b611add565b34801561091b57600080fd5b5061054661092a36600461386f565b600e6020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b34801561095e57600080fd5b5061031661096d366004613b3e565b611cf4565b34801561097e57600080fd5b5061031661098d366004613d06565b611d91565b34801561099e57600080fd5b5061067a6109ad366004613d3f565b611f2f565b3480156109be57600080fd5b506103166109cd36600461386f565b612006565b337f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1614610a5c5760405162461bcd60e51b815260206004820152601e60248201527f4c7a4170703a20696e76616c696420656e64706f696e742063616c6c6572000060448201526064015b60405180910390fd5b61ffff861660009081526002602052604081208054610a7a90613d8c565b80601f0160208091040260200160405190810160405280929190818152602001828054610aa690613d8c565b8015610af35780601f10610ac857610100808354040283529160200191610af3565b820191906000526020600020905b815481529060010190602001808311610ad657829003601f168201915b50505050509050805186869050148015610b0e575060008151115b8015610b36575080516020820120604051610b2c9088908890613dd9565b6040518091039020145b610ba85760405162461bcd60e51b815260206004820152602660248201527f4c7a4170703a20696e76616c696420736f757263652073656e64696e6720636f60448201527f6e747261637400000000000000000000000000000000000000000000000000006064820152608401610a53565b610c1e8787878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8a018190048102820181019092528881528a9350915088908890819084018382808284376000920191909152506122bf92505050565b50505050505050565b610c2f6124b9565b6040517f07e0db1700000000000000000000000000000000000000000000000000000000815261ffff821660048201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906307e0db17906024015b600060405180830381600087803b158015610cbb57600080fd5b505af1158015610ccf573d6000803e3d6000fd5b5050505050565b610cde6124b9565b61ffff909116600090815260046020526040902055565b610cfd6124b9565b6040517f10ddb13700000000000000000000000000000000000000000000000000000000815261ffff821660048201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906310ddb13790602401610ca1565b61ffff831660009081526002602052604081208054829190610d9490613d8c565b80601f0160208091040260200160405190810160405280929190818152602001828054610dc090613d8c565b8015610e0d5780601f10610de257610100808354040283529160200191610e0d565b820191906000526020600020905b815481529060010190602001808311610df057829003601f168201915b505050505090508383604051610e24929190613dd9565b60405180910390208180519060200120149150505b9392505050565b6000818152600d60205260408120600681015460ff1615610e645750600092915050565b6006810154610100900460ff1615610e7f5750600292915050565b6000838152600f602052604090205460ff1615610e9f5750600192915050565b6040517f0992f7ad00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50919050565b610edf6124b9565b610ee7612520565b565b6001610ef482610e40565b6002811115610f0557610f05613920565b14610f9e5760405162461bcd60e51b815260206004820152604f60248201527f4f6d6e69636861696e476f7665726e616e63654578656375746f723a3a63616e60448201527f63656c3a2070726f706f73616c2073686f756c6420626520717565756564206160648201527f6e64206e6f742065786563757465640000000000000000000000000000000000608482015260a401610a53565b6000818152600d60205260409020600b5473ffffffffffffffffffffffffffffffffffffffff1633146110395760405162461bcd60e51b815260206004820152603c60248201527f4f6d6e69636861696e476f7665726e616e63654578656375746f723a3a63616e60448201527f63656c3a2073656e646572206d75737420626520677561726469616e000000006064820152608401610a53565b60068101805460ff19166001908117918290556201000090910460ff166000908152600e602052604080822054928401546002850154915173ffffffffffffffffffffffffffffffffffffffff90941693909286917f789cf55be980739dad1d0699b93b58e806b51c9d96619bfa8fe0a28abaa7b30c9190a260005b818110156111d0578373ffffffffffffffffffffffffffffffffffffffff1663591fcdfe8660020183815481106110ee576110ee613de9565b60009182526020909120015460038801805473ffffffffffffffffffffffffffffffffffffffff909216918590811061112957611129613de9565b906000526020600020015488600401858154811061114957611149613de9565b9060005260206000200189600501868154811061116857611168613de9565b90600052602060002001886040518663ffffffff1660e01b8152600401611193959493929190613e95565b600060405180830381600087803b1580156111ad57600080fd5b505af11580156111c1573d6000803e3d6000fd5b505050508060010190506110b5565b50505060009283525050600f60205260409020805460ff19169055565b6111f56124b9565b6040517f42d65a8d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016906342d65a8d9061126b90869086908690600401613f1a565b600060405180830381600087803b15801561128557600080fd5b505af1158015610c1e573d6000803e3d6000fd5b33301461130e5760405162461bcd60e51b815260206004820152602660248201527f4e6f6e626c6f636b696e674c7a4170703a2063616c6c6572206d75737420626560448201527f204c7a41707000000000000000000000000000000000000000000000000000006064820152608401610a53565b6113848686868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f89018190048102820181019092528781528993509150879087908190840183828082843760009201919091525061257f92505050565b505050505050565b600260205260009081526040902080546113a590613d8c565b80601f01602080910402602001604051908101604052809291908181526020018280546113d190613d8c565b801561141e5780601f106113f35761010080835404028352916020019161141e565b820191906000526020600020905b81548152906001019060200180831161140157829003601f168201915b505050505081565b61142e6124b9565b610ee76129b1565b600b5473ffffffffffffffffffffffffffffffffffffffff16331480611473575060015473ffffffffffffffffffffffffffffffffffffffff1633145b6114e7576040805162461bcd60e51b81526020600482015260248101919091527f4f6d6e69636861696e476f7665726e616e63654578656375746f723a3a73657460448201527f477561726469616e3a206f776e6572206f7220677561726469616e206f6e6c796064820152608401610a53565b6114f0816129ee565b600b5460405173ffffffffffffffffffffffffffffffffffffffff8084169216907f08fdaf06427a2010e5958f4329b566993472d14ce81d3f16ce7f2a2660da98e390600090a3600b80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b6115866124b9565b60085460408051918252602082018390527f0a653bb1a57e62cfd43f0dc557c7223e8b58896238b5f9b300ef646d37b82d1b910160405180910390a1600855565b61ffff81166000908152600260205260408120805460609291906115ea90613d8c565b80601f016020809104026020016040519081016040528092919081815260200182805461161690613d8c565b80156116635780601f1061163857610100808354040283529160200191611663565b820191906000526020600020905b81548152906001019060200180831161164657829003601f168201915b5050505050905080516000036116bb5760405162461bcd60e51b815260206004820152601d60248201527f4c7a4170703a206e6f20747275737465642070617468207265636f72640000006044820152606401610a53565b610e396000601483516116ce9190613f67565b839190612a3b565b6116de6124b9565b8181306040516020016116f393929190613f80565b60408051601f1981840301815291815261ffff851660009081526002602052209061171e9082614001565b507f8c0400cfe2d1199b1a725c78960bcc2a344d869b80590d0f2bd005db15a572ce83838360405161175293929190613f1a565b60405180910390a1505050565b6117676124b9565b600580547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527f5db758e995a17ec1ad84bdef7e8c3293a0bd6179bcce400dff5d4c3d87db726b9060200160405180910390a150565b6117e86124b9565b600b5460405161ffff8084169274010000000000000000000000000000000000000000900416907fb17c58d5977290696b6eea77c81c725f3dc83e426252bd9ece6287c1b8d0e96890600090a3600b805461ffff90921674010000000000000000000000000000000000000000027fffffffffffffffffffff0000ffffffffffffffffffffffffffffffffffffffff909216919091179055565b61188a6124b9565b6040517fcbed8b9c00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063cbed8b9c9061190490889088908890889088906004016140fd565b600060405180830381600087803b15801561191e57600080fd5b505af1158015611932573d6000803e3d6000fd5b505050505050505050565b6119456124b9565b61194d612b63565b848460405161195d929190613dd9565b6040805191829003822061ffff891660009081526002602052919091209091611986919061412b565b604051809103902014611a015760405162461bcd60e51b815260206004820152603f60248201527f4f6d6e69636861696e476f7665726e616e63654578656375746f723a3a72657460448201527f72794d6573736167653a206e6f74206120747275737465642072656d6f7465006064820152608401610a53565b611a0f868686868686612bbc565b6113846001600055565b611a216124b9565b61ffff83811660008181526003602090815260408083209487168084529482529182902085905581519283528201929092529081018290527f9d5c7c0b934da8fefa9c7760c98383778a12dfbfc0c3b3106518f43fb9508ac090606001611752565b611a8b6124b9565b61ffff83166000908152600260205260409020611aa98284836141a1565b507ffa41487ad5d6728f0b19276fa1eddc16558578f5109fc39d2dc33c3230470dab83838360405161175293929190613f1a565b611ae56124b9565b6000611af36002600161429d565b90508060ff16825114611bba5760405162461bcd60e51b815260206004820152606a60248201527f4f6d6e69636861696e476f7665726e616e63654578656375746f723a3a61646460448201527f54696d656c6f636b733a6e756d626572206f662074696d656c6f636b7320736860648201527f6f756c64206d6174636820746865206e756d626572206f6620676f7665726e6160848201527f6e636520726f757465730000000000000000000000000000000000000000000060a482015260c401610a53565b60005b8160ff168160ff161015611cef57611bf0838260ff1681518110611be357611be3613de9565b60200260200101516129ee565b828160ff1681518110611c0557611c05613de9565b60209081029190910181015160ff83166000818152600e845260409081902054905191825273ffffffffffffffffffffffffffffffffffffffff928316939216917ffc45ae51ac4893a3f843d030fbfd4037c0c196109c9e667645b8f144c83c16ea910160405180910390a3828160ff1681518110611c8657611c86613de9565b60209081029190910181015160ff83166000908152600e909252604090912080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909216919091179055600101611bbd565b505050565b611cfc6124b9565b73ffffffffffffffffffffffffffffffffffffffff8116611d855760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610a53565b611d8e81612e0a565b50565b611d996124b9565b6000611da76002600161429d565b90508060ff168260ff1610611e4a5760405162461bcd60e51b815260206004820152604b60248201527f4f6d6e69636861696e476f7665726e616e63654578656375746f723a3a73657460448201527f54696d656c6f636b50656e64696e6741646d696e3a20696e76616c696420707260648201527f6f706f73616c2074797065000000000000000000000000000000000000000000608482015260a401610a53565b60ff82166000908152600e6020526040908190205490517f4dd18bf500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff858116600483015290911690634dd18bf590602401600060405180830381600087803b158015611ec857600080fd5b505af1158015611edc573d6000803e3d6000fd5b50506040805173ffffffffffffffffffffffffffffffffffffffff8716815260ff861660208201527f6ac0b2c896b49975f12891f83c573bdf05490fe6b707cbaa2ba84c36094cbaec9350019050611752565b6040517ff5ecbdbc00000000000000000000000000000000000000000000000000000000815261ffff808616600483015284166024820152306044820152606481018290526060907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063f5ecbdbc90608401600060405180830381865afa158015611fd5573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611ffd9190810190614306565b95945050505050565b61200e612b63565b600161201982610e40565b600281111561202a5761202a613920565b146120c35760405162461bcd60e51b815260206004820152605360248201527f4f6d6e69636861696e476f7665726e616e63654578656375746f723a3a65786560448201527f637574653a2070726f706f73616c2063616e206f6e6c7920626520657865637560648201527f7465642069662069742069732071756575656400000000000000000000000000608482015260a401610a53565b6000818152600d602090815260408083206006810180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16610100179081905562010000900460ff168452600e90925280832054600183015460028401549251939473ffffffffffffffffffffffffffffffffffffffff9092169390929186917f712ae1383f79ac853f8d882153778e0260ef8f03b504e2866e0593e04d2b291f9190a260005b81811015612299578373ffffffffffffffffffffffffffffffffffffffff16630825f38f8660020183815481106121a4576121a4613de9565b60009182526020909120015460038801805473ffffffffffffffffffffffffffffffffffffffff90921691859081106121df576121df613de9565b90600052602060002001548860040185815481106121ff576121ff613de9565b9060005260206000200189600501868154811061221e5761221e613de9565b90600052602060002001886040518663ffffffff1660e01b8152600401612249959493929190613e95565b6000604051808303816000875af1158015612268573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526122909190810190614306565b5060010161216b565b5050506000838152600f60205260409020805460ff1916905550611d8e90506001600055565b600b5461ffff85811674010000000000000000000000000000000000000000909204161461237b5760405162461bcd60e51b815260206004820152604860248201527f4f6d6e69636861696e476f7665726e616e63654578656375746f723a3a5f626c60448201527f6f636b696e674c7a526563656976653a20696e76616c696420736f757263652060648201527f636861696e206964000000000000000000000000000000000000000000000000608482015260a401610a53565b8051602082012060405160009030906366ad5c8a906123a4908990899089908990602401614343565b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505090506000806124066175305a6123fc9190613f67565b3090609686612e81565b91509150816124af5761ffff8816600090815260066020526040908190209051859190612434908a90614382565b90815260408051918290036020908101832067ffffffffffffffff8b16600090815291522091909155612468908890614382565b60405180910390208861ffff167f41d73ce7be31a588d59fe9013cdcfe583bc0aab25093d042b64cade0df73065688846040516124a692919061439e565b60405180910390a35b5050505050505050565b60015473ffffffffffffffffffffffffffffffffffffffff163314610ee75760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a53565b612528612f0c565b6007805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390a1565b612587612f5e565b6000808280602001905181019061259e91906143c1565b915091506000806000806000868060200190518101906125be9190614592565b60008b8152600d602052604090205494995092975090955093509150156126735760405162461bcd60e51b815260206004820152604660248201527f4f6d6e69636861696e476f7665726e616e63654578656375746f723a3a5f6e6f60448201527f6e626c6f636b696e674c7a526563656976653a206475706c696361746520707260648201527f6f706f73616c0000000000000000000000000000000000000000000000000000608482015260a401610a53565b83518551148015612685575082518551145b8015612692575081518551145b61272a5760405162461bcd60e51b815260206004820152606060248201527f4f6d6e69636861696e476f7665726e616e63654578656375746f723a3a5f6e6f60448201527f6e626c6f636b696e674c7a526563656976653a2070726f706f73616c2066756e60648201527f6374696f6e20696e666f726d6174696f6e206172697479206d69736d61746368608482015260a401610a53565b6127366002600161429d565b60ff168160ff16106127d65760405162461bcd60e51b815260206004820152604960248201527f4f6d6e69636861696e476f7665726e616e63654578656375746f723a3a5f6e6f60448201527f6e626c6f636b696e674c7a526563656976653a20696e76616c69642070726f7060648201527f6f73616c20747970650000000000000000000000000000000000000000000000608482015260a401610a53565b6127e08551612fb1565b6040805161012081018252878152600060208083018281528385018a8152606085018a90526080850189905260a0850188905260c0850184905260e0850184905260ff87166101008601528b8452600d835294909220835181559151600183015592518051929384936128599260028501920190613571565b50606082015180516128759160038401916020909101906135fb565b5060808201518051612891916004840191602090910190613636565b5060a082015180516128ad916005840191602090910190613688565b5060c08201516006909101805460e08401516101009485015160ff1662010000027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffff9115159095027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff941515949094167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000909216919091179290921791909116919091179055600c87905580516040517fc37d19c9a6a9a568b5071658f9b5082ff8f142df3cf090385c5621ab1193806590612992908990899089908990899061470b565b60405180910390a26129a387613041565b505050505050505050505050565b6129b9612f5e565b6007805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586125553390565b73ffffffffffffffffffffffffffffffffffffffff8116611d8e576040517f8579befe00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606081612a4981601f6147d5565b1015612a975760405162461bcd60e51b815260206004820152600e60248201527f736c6963655f6f766572666c6f770000000000000000000000000000000000006044820152606401610a53565b612aa182846147d5565b84511015612af15760405162461bcd60e51b815260206004820152601160248201527f736c6963655f6f75744f66426f756e64730000000000000000000000000000006044820152606401610a53565b606082158015612b105760405191506000825260208201604052612b5a565b6040519150601f8416801560200281840101858101878315602002848b0101015b81831015612b49578051835260209283019201612b31565b5050858452601f01601f1916604052505b50949350505050565b600260005403612bb55760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610a53565b6002600055565b61ffff86166000908152600660205260408082209051612bdf9088908890613dd9565b908152604080516020928190038301902067ffffffffffffffff871660009081529252902054905080612c7a5760405162461bcd60e51b815260206004820152602360248201527f4e6f6e626c6f636b696e674c7a4170703a206e6f2073746f726564206d65737360448201527f61676500000000000000000000000000000000000000000000000000000000006064820152608401610a53565b808383604051612c8b929190613dd9565b604051809103902014612d065760405162461bcd60e51b815260206004820152602160248201527f4e6f6e626c6f636b696e674c7a4170703a20696e76616c6964207061796c6f6160448201527f64000000000000000000000000000000000000000000000000000000000000006064820152608401610a53565b61ffff87166000908152600660205260408082209051612d299089908990613dd9565b908152604080516020928190038301812067ffffffffffffffff8916600090815290845282902093909355601f88018290048202830182019052868252612dc2918991899089908190840183828082843760009201919091525050604080516020601f8a018190048102820181019092528881528a93509150889088908190840183828082843760009201919091525061257f92505050565b7fc264d91f3adc5588250e1551f547752ca0cfa8f6b530d243b9f9f4cab10ea8e58787878785604051612df99594939291906147e8565b60405180910390a150505050505050565b6001805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000606060008060008661ffff1667ffffffffffffffff811115612ea757612ea7613990565b6040519080825280601f01601f191660200182016040528015612ed1576020820181803683370190505b50905060008087516020890160008d8df191503d925086831115612ef3578692505b828152826000602083013e909890975095505050505050565b60075460ff16610ee75760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610a53565b60075460ff1615610ee75760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610a53565b600954600a544291906201518090612fc99084613f67565b1115612fdb5750600a81905581612fe8565b612fe583826147d5565b90505b60085481111561303a5760405162461bcd60e51b815260206004820181905260248201527f4461696c79205472616e73616374696f6e204c696d69742045786365656465646044820152606401610a53565b6009555050565b6000818152600d60209081526040808320600681015462010000900460ff168452600e83528184205482517f6a42b8f8000000000000000000000000000000000000000000000000000000008152925191949373ffffffffffffffffffffffffffffffffffffffff90911692636a42b8f892600480830193928290030181865afa1580156130d3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130f79190614824565b61310190426147d5565b60018084018290556000858152600f602052604090819020805460ff191690921790915560068401546002850154915192935062010000900460ff169185907f9a2e42fd6722813d69113e7d0079d3d940171428df7373df9c7f7617cfda28929061316f9086815260200190565b60405180910390a260005b818110156113845761333785600201828154811061319a5761319a613de9565b60009182526020909120015460038701805473ffffffffffffffffffffffffffffffffffffffff90921691849081106131d5576131d5613de9565b90600052602060002001548760040184815481106131f5576131f5613de9565b90600052602060002001805461320a90613d8c565b80601f016020809104026020016040519081016040528092919081815260200182805461323690613d8c565b80156132835780601f1061325857610100808354040283529160200191613283565b820191906000526020600020905b81548152906001019060200180831161326657829003601f168201915b505050505088600501858154811061329d5761329d613de9565b9060005260206000200180546132b290613d8c565b80601f01602080910402602001604051908101604052809291908181526020018280546132de90613d8c565b801561332b5780601f106133005761010080835404028352916020019161332b565b820191906000526020600020905b81548152906001019060200180831161330e57829003601f168201915b5050505050888861333f565b60010161317a565b60ff81166000908152600e602090815260409182902054915173ffffffffffffffffffffffffffffffffffffffff9092169163f2b065379161338b918a918a918a918a918a910161483d565b604051602081830303815290604052805190602001206040518263ffffffff1660e01b81526004016133bf91815260200190565b602060405180830381865afa1580156133dc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906134009190614884565b156134bf5760405162461bcd60e51b815260206004820152606360248201527f4f6d6e69636861696e476f7665726e616e63654578656375746f723a3a71756560448201527f75654f72526576657274496e7465726e616c3a206964656e746963616c20707260648201527f6f706f73616c20616374696f6e20616c7265616479207175657565642061742060848201527f657461000000000000000000000000000000000000000000000000000000000060a482015260c401610a53565b60ff81166000908152600e6020526040908190205490517f3a66f90100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911690633a66f9019061352e908990899089908990899060040161483d565b6020604051808303816000875af115801561354d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c1e9190614824565b8280548282559060005260206000209081019282156135eb579160200282015b828111156135eb57825182547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909116178255602090920191600190910190613591565b506135f79291506136da565b5090565b8280548282559060005260206000209081019282156135eb579160200282015b828111156135eb57825182559160200191906001019061361b565b82805482825590600052602060002090810192821561367c579160200282015b8281111561367c578251829061366c9082614001565b5091602001919060010190613656565b506135f79291506136ef565b8280548282559060005260206000209081019282156136ce579160200282015b828111156136ce57825182906136be9082614001565b50916020019190600101906136a8565b506135f792915061370c565b5b808211156135f757600081556001016136db565b808211156135f75760006137038282613729565b506001016136ef565b808211156135f75760006137208282613729565b5060010161370c565b50805461373590613d8c565b6000825580601f10613745575050565b601f016020900490600052602060002090810190611d8e91906136da565b803561ffff8116811461377557600080fd5b919050565b60008083601f84011261378c57600080fd5b50813567ffffffffffffffff8111156137a457600080fd5b6020830191508360208285010111156137bc57600080fd5b9250929050565b803567ffffffffffffffff8116811461377557600080fd5b600080600080600080608087890312156137f457600080fd5b6137fd87613763565b9550602087013567ffffffffffffffff8082111561381a57600080fd5b6138268a838b0161377a565b909750955085915061383a60408a016137c3565b9450606089013591508082111561385057600080fd5b5061385d89828a0161377a565b979a9699509497509295939492505050565b60006020828403121561388157600080fd5b5035919050565b60006020828403121561389a57600080fd5b610e3982613763565b600080604083850312156138b657600080fd5b6138bf83613763565b946020939093013593505050565b6000806000604084860312156138e257600080fd5b6138eb84613763565b9250602084013567ffffffffffffffff81111561390757600080fd5b6139138682870161377a565b9497909650939450505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b602081016003831061398a577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b91905290565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156139e8576139e8613990565b604052919050565b600067ffffffffffffffff821115613a0a57613a0a613990565b50601f01601f191660200190565b600080600060608486031215613a2d57600080fd5b613a3684613763565b9250602084013567ffffffffffffffff811115613a5257600080fd5b8401601f81018613613a6357600080fd5b8035613a76613a71826139f0565b6139bf565b818152876020838501011115613a8b57600080fd5b81602084016020830137600060208383010152809450505050613ab0604085016137c3565b90509250925092565b60005b83811015613ad4578181015183820152602001613abc565b50506000910152565b60008151808452613af5816020860160208601613ab9565b601f01601f19169290920160200192915050565b602081526000610e396020830184613add565b73ffffffffffffffffffffffffffffffffffffffff81168114611d8e57600080fd5b600060208284031215613b5057600080fd5b8135610e3981613b1c565b60008060408385031215613b6e57600080fd5b613b7783613763565b9150613b8560208401613763565b90509250929050565b600080600080600060808688031215613ba657600080fd5b613baf86613763565b9450613bbd60208701613763565b935060408601359250606086013567ffffffffffffffff811115613be057600080fd5b613bec8882890161377a565b969995985093965092949392505050565b600080600060608486031215613c1257600080fd5b613c1b84613763565b9250613c2960208501613763565b9150604084013590509250925092565b600067ffffffffffffffff821115613c5357613c53613990565b5060051b60200190565b60006020808385031215613c7057600080fd5b823567ffffffffffffffff811115613c8757600080fd5b8301601f81018513613c9857600080fd5b8035613ca6613a7182613c39565b81815260059190911b82018301908381019087831115613cc557600080fd5b928401925b82841015613cec578335613cdd81613b1c565b82529284019290840190613cca565b979650505050505050565b60ff81168114611d8e57600080fd5b60008060408385031215613d1957600080fd5b8235613d2481613b1c565b91506020830135613d3481613cf7565b809150509250929050565b60008060008060808587031215613d5557600080fd5b613d5e85613763565b9350613d6c60208601613763565b92506040850135613d7c81613b1c565b9396929550929360600135925050565b600181811c90821680613da057607f821691505b602082108103610ed1577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b8183823760009101908152919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60008154613e2581613d8c565b808552602060018381168015613e425760018114613e5c57613e8a565b60ff198516838901528284151560051b8901019550613e8a565b866000528260002060005b85811015613e825781548a8201860152908301908401613e67565b890184019650505b505050505092915050565b73ffffffffffffffffffffffffffffffffffffffff8616815284602082015260a060408201526000613eca60a0830186613e18565b8281036060840152613edc8186613e18565b9150508260808301529695505050505050565b818352818160208501375060006020828401015260006020601f19601f840116840101905092915050565b61ffff84168152604060208201526000611ffd604083018486613eef565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b81810381811115613f7a57613f7a613f38565b92915050565b8284823760609190911b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000169101908152601401919050565b601f821115611cef576000816000526020600020601f850160051c81016020861015613fe25750805b601f850160051c820191505b8181101561138457828155600101613fee565b815167ffffffffffffffff81111561401b5761401b613990565b61402f816140298454613d8c565b84613fb9565b602080601f831160018114614082576000841561404c5750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b178555611384565b600085815260208120601f198616915b828110156140b157888601518255948401946001909101908401614092565b50858210156140ed57878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b600061ffff808816835280871660208401525084604083015260806060830152613cec608083018486613eef565b600080835461413981613d8c565b60018281168015614151576001811461416657614195565b60ff1984168752821515830287019450614195565b8760005260208060002060005b8581101561418c5781548a820152908401908201614173565b50505082870194505b50929695505050505050565b67ffffffffffffffff8311156141b9576141b9613990565b6141cd836141c78354613d8c565b83613fb9565b6000601f84116001811461421f57600085156141e95750838201355b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b1c1916600186901b178355610ccf565b600083815260209020601f19861690835b828110156142505786850135825560209485019460019092019101614230565b508682101561428b577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88860031b161c19848701351681555b505060018560011b0183555050505050565b60ff8181168382160190811115613f7a57613f7a613f38565b60006142c4613a71846139f0565b90508281528383830111156142d857600080fd5b610e39836020830184613ab9565b600082601f8301126142f757600080fd5b610e39838351602085016142b6565b60006020828403121561431857600080fd5b815167ffffffffffffffff81111561432f57600080fd5b61433b848285016142e6565b949350505050565b61ffff851681526080602082015260006143606080830186613add565b67ffffffffffffffff851660408401528281036060840152613cec8185613add565b60008251614394818460208701613ab9565b9190910192915050565b67ffffffffffffffff8316815260406020820152600061433b6040830184613add565b600080604083850312156143d457600080fd5b825167ffffffffffffffff8111156143eb57600080fd5b6143f7858286016142e6565b925050602083015190509250929050565b600082601f83011261441957600080fd5b81516020614429613a7183613c39565b8083825260208201915060208460051b87010193508684111561444b57600080fd5b602086015b848110156144675780518352918301918301614450565b509695505050505050565b600082601f83011261448357600080fd5b81516020614493613a7183613c39565b82815260059290921b840181019181810190868411156144b257600080fd5b8286015b8481101561446757805167ffffffffffffffff8111156144d65760008081fd5b8701603f810189136144e85760008081fd5b6144f98986830151604084016142b6565b8452509183019183016144b6565b600082601f83011261451857600080fd5b81516020614528613a7183613c39565b82815260059290921b8401810191818101908684111561454757600080fd5b8286015b8481101561446757805167ffffffffffffffff81111561456b5760008081fd5b6145798986838b01016142e6565b84525091830191830161454b565b805161377581613cf7565b600080600080600060a086880312156145aa57600080fd5b855167ffffffffffffffff808211156145c257600080fd5b818801915088601f8301126145d657600080fd5b815160206145e6613a7183613c39565b82815260059290921b8401810191818101908c84111561460557600080fd5b948201945b8386101561462c57855161461d81613b1c565b8252948201949082019061460a565b918b015191995090935050508082111561464557600080fd5b61465189838a01614408565b9550604088015191508082111561466757600080fd5b61467389838a01614472565b9450606088015191508082111561468957600080fd5b5061469688828901614507565b9250506146a560808701614587565b90509295509295909350565b60008282518085526020808601955060208260051b8401016020860160005b848110156146fe57601f198684030189526146ec838351613add565b988401989250908301906001016146d0565b5090979650505050505050565b60a0808252865190820181905260009060209060c0840190828a01845b8281101561475a57815173ffffffffffffffffffffffffffffffffffffffff1684529284019290840190600101614728565b5050508381038285015287518082528883019183019060005b8181101561478f57835183529284019291840191600101614773565b505084810360408601526147a381896146b1565b9250505082810360608401526147b981866146b1565b9150506147cb608083018460ff169052565b9695505050505050565b80820180821115613f7a57613f7a613f38565b61ffff86168152608060208201526000614806608083018688613eef565b67ffffffffffffffff94909416604083015250606001529392505050565b60006020828403121561483657600080fd5b5051919050565b73ffffffffffffffffffffffffffffffffffffffff8616815284602082015260a06040820152600061487260a0830186613add565b8281036060840152613edc8186613add565b60006020828403121561489657600080fd5b81518015158114610e3957600080fdfea26469706673582212206e9b4e0e8423ddd67a12f6b1a136938a978661714c282ede340b91a73060ecf464736f6c63430008190033", + "deployedBytecode": "0x6080604052600436106102f15760003560e01c8063876919e81161018f578063c4461834116100e1578063ed66039b1161008a578063f4fcfcca11610064578063f4fcfcca14610972578063f5ecbdbc14610992578063fe0d94c1146109b257600080fd5b8063ed66039b146108ef578063ee9799ee1461090f578063f2fde38b1461095257600080fd5b8063d1deba1f116100bb578063d1deba1f1461089c578063df2a5b3b146108af578063eb8d72b7146108cf57600080fd5b8063c446183414610846578063c8b42e5b1461085c578063cbed8b9c1461087c57600080fd5b8063950c8a7411610143578063a6c3d1651161011d578063a6c3d165146107d2578063b353aaa7146107f2578063baf3292d1461082657600080fd5b8063950c8a74146107555780639f0c3101146107825780639f38369a146107b257600080fd5b80638cfd8f5c116101745780638cfd8f5c146106d25780638da5cb5b1461070a5780639493ffad1461073557600080fd5b8063876919e81461069c5780638a0dac4a146106b257600080fd5b806342d65a8d116102485780635c975abb116101fc578063715018a6116101d6578063715018a61461064e5780637533d7881461065a5780638456cb591461068757600080fd5b80635c975abb1461060057806366ad5c8a1461061857806370f6ad9a1461063857600080fd5b8063452a93201161022d578063452a93201461051957806349d126051461056b5780635b8c41e6146105b157600080fd5b806342d65a8d146104e35780634406baaf1461050357600080fd5b806310ddb137116102aa5780633f1f4fa4116102845780633f1f4fa4146104815780633f4ba83a146104ae57806340e58ee5146104c357600080fd5b806310ddb137146104045780633d8b38f6146104245780633e4f49e61461045457600080fd5b80630435bb56116102db5780630435bb56146103a057806307e0db17146103c45780630df37483146103e457600080fd5b80621d3567146102f6578063013cf08b14610318575b600080fd5b34801561030257600080fd5b506103166103113660046137db565b6109d2565b005b34801561032457600080fd5b5061036a61033336600461386f565b600d6020526000908152604090208054600182015460069092015490919060ff808216916101008104821691620100009091041685565b60408051958652602086019490945291151592840192909252901515606083015260ff16608082015260a0015b60405180910390f35b3480156103ac57600080fd5b506103b660085481565b604051908152602001610397565b3480156103d057600080fd5b506103166103df366004613888565b610c27565b3480156103f057600080fd5b506103166103ff3660046138a3565b610cd6565b34801561041057600080fd5b5061031661041f366004613888565b610cf5565b34801561043057600080fd5b5061044461043f3660046138cd565b610d73565b6040519015158152602001610397565b34801561046057600080fd5b5061047461046f36600461386f565b610e40565b604051610397919061394f565b34801561048d57600080fd5b506103b661049c366004613888565b60046020526000908152604090205481565b3480156104ba57600080fd5b50610316610ed7565b3480156104cf57600080fd5b506103166104de36600461386f565b610ee9565b3480156104ef57600080fd5b506103166104fe3660046138cd565b6111ed565b34801561050f57600080fd5b506103b6600c5481565b34801561052557600080fd5b50600b546105469073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610397565b34801561057757600080fd5b50600b5461059e9074010000000000000000000000000000000000000000900461ffff1681565b60405161ffff9091168152602001610397565b3480156105bd57600080fd5b506103b66105cc366004613a18565b6006602090815260009384526040808520845180860184018051928152908401958401959095209452929052825290205481565b34801561060c57600080fd5b5060075460ff16610444565b34801561062457600080fd5b506103166106333660046137db565b611299565b34801561064457600080fd5b506103b660095481565b34801561031657600080fd5b34801561066657600080fd5b5061067a610675366004613888565b61138c565b6040516103979190613b09565b34801561069357600080fd5b50610316611426565b3480156106a857600080fd5b506103b6600a5481565b3480156106be57600080fd5b506103166106cd366004613b3e565b611436565b3480156106de57600080fd5b506103b66106ed366004613b5b565b600360209081526000928352604080842090915290825290205481565b34801561071657600080fd5b5060015473ffffffffffffffffffffffffffffffffffffffff16610546565b34801561074157600080fd5b5061031661075036600461386f565b61157e565b34801561076157600080fd5b506005546105469073ffffffffffffffffffffffffffffffffffffffff1681565b34801561078e57600080fd5b5061044461079d36600461386f565b600f6020526000908152604090205460ff1681565b3480156107be57600080fd5b5061067a6107cd366004613888565b6115c7565b3480156107de57600080fd5b506103166107ed3660046138cd565b6116d6565b3480156107fe57600080fd5b506105467f000000000000000000000000000000000000000000000000000000000000000081565b34801561083257600080fd5b50610316610841366004613b3e565b61175f565b34801561085257600080fd5b506103b661271081565b34801561086857600080fd5b50610316610877366004613888565b6117e0565b34801561088857600080fd5b50610316610897366004613b8e565b611882565b6103166108aa3660046137db565b61193d565b3480156108bb57600080fd5b506103166108ca366004613bfd565b611a19565b3480156108db57600080fd5b506103166108ea3660046138cd565b611a83565b3480156108fb57600080fd5b5061031661090a366004613c5d565b611add565b34801561091b57600080fd5b5061054661092a36600461386f565b600e6020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b34801561095e57600080fd5b5061031661096d366004613b3e565b611cf4565b34801561097e57600080fd5b5061031661098d366004613d06565b611d91565b34801561099e57600080fd5b5061067a6109ad366004613d3f565b611f2f565b3480156109be57600080fd5b506103166109cd36600461386f565b612006565b337f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1614610a5c5760405162461bcd60e51b815260206004820152601e60248201527f4c7a4170703a20696e76616c696420656e64706f696e742063616c6c6572000060448201526064015b60405180910390fd5b61ffff861660009081526002602052604081208054610a7a90613d8c565b80601f0160208091040260200160405190810160405280929190818152602001828054610aa690613d8c565b8015610af35780601f10610ac857610100808354040283529160200191610af3565b820191906000526020600020905b815481529060010190602001808311610ad657829003601f168201915b50505050509050805186869050148015610b0e575060008151115b8015610b36575080516020820120604051610b2c9088908890613dd9565b6040518091039020145b610ba85760405162461bcd60e51b815260206004820152602660248201527f4c7a4170703a20696e76616c696420736f757263652073656e64696e6720636f60448201527f6e747261637400000000000000000000000000000000000000000000000000006064820152608401610a53565b610c1e8787878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8a018190048102820181019092528881528a9350915088908890819084018382808284376000920191909152506122bf92505050565b50505050505050565b610c2f6124b9565b6040517f07e0db1700000000000000000000000000000000000000000000000000000000815261ffff821660048201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906307e0db17906024015b600060405180830381600087803b158015610cbb57600080fd5b505af1158015610ccf573d6000803e3d6000fd5b5050505050565b610cde6124b9565b61ffff909116600090815260046020526040902055565b610cfd6124b9565b6040517f10ddb13700000000000000000000000000000000000000000000000000000000815261ffff821660048201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906310ddb13790602401610ca1565b61ffff831660009081526002602052604081208054829190610d9490613d8c565b80601f0160208091040260200160405190810160405280929190818152602001828054610dc090613d8c565b8015610e0d5780601f10610de257610100808354040283529160200191610e0d565b820191906000526020600020905b815481529060010190602001808311610df057829003601f168201915b505050505090508383604051610e24929190613dd9565b60405180910390208180519060200120149150505b9392505050565b6000818152600d60205260408120600681015460ff1615610e645750600092915050565b6006810154610100900460ff1615610e7f5750600292915050565b6000838152600f602052604090205460ff1615610e9f5750600192915050565b6040517f0992f7ad00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50919050565b610edf6124b9565b610ee7612520565b565b6001610ef482610e40565b6002811115610f0557610f05613920565b14610f9e5760405162461bcd60e51b815260206004820152604f60248201527f4f6d6e69636861696e476f7665726e616e63654578656375746f723a3a63616e60448201527f63656c3a2070726f706f73616c2073686f756c6420626520717565756564206160648201527f6e64206e6f742065786563757465640000000000000000000000000000000000608482015260a401610a53565b6000818152600d60205260409020600b5473ffffffffffffffffffffffffffffffffffffffff1633146110395760405162461bcd60e51b815260206004820152603c60248201527f4f6d6e69636861696e476f7665726e616e63654578656375746f723a3a63616e60448201527f63656c3a2073656e646572206d75737420626520677561726469616e000000006064820152608401610a53565b60068101805460ff19166001908117918290556201000090910460ff166000908152600e602052604080822054928401546002850154915173ffffffffffffffffffffffffffffffffffffffff90941693909286917f789cf55be980739dad1d0699b93b58e806b51c9d96619bfa8fe0a28abaa7b30c9190a260005b818110156111d0578373ffffffffffffffffffffffffffffffffffffffff1663591fcdfe8660020183815481106110ee576110ee613de9565b60009182526020909120015460038801805473ffffffffffffffffffffffffffffffffffffffff909216918590811061112957611129613de9565b906000526020600020015488600401858154811061114957611149613de9565b9060005260206000200189600501868154811061116857611168613de9565b90600052602060002001886040518663ffffffff1660e01b8152600401611193959493929190613e95565b600060405180830381600087803b1580156111ad57600080fd5b505af11580156111c1573d6000803e3d6000fd5b505050508060010190506110b5565b50505060009283525050600f60205260409020805460ff19169055565b6111f56124b9565b6040517f42d65a8d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016906342d65a8d9061126b90869086908690600401613f1a565b600060405180830381600087803b15801561128557600080fd5b505af1158015610c1e573d6000803e3d6000fd5b33301461130e5760405162461bcd60e51b815260206004820152602660248201527f4e6f6e626c6f636b696e674c7a4170703a2063616c6c6572206d75737420626560448201527f204c7a41707000000000000000000000000000000000000000000000000000006064820152608401610a53565b6113848686868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f89018190048102820181019092528781528993509150879087908190840183828082843760009201919091525061257f92505050565b505050505050565b600260205260009081526040902080546113a590613d8c565b80601f01602080910402602001604051908101604052809291908181526020018280546113d190613d8c565b801561141e5780601f106113f35761010080835404028352916020019161141e565b820191906000526020600020905b81548152906001019060200180831161140157829003601f168201915b505050505081565b61142e6124b9565b610ee76129b1565b600b5473ffffffffffffffffffffffffffffffffffffffff16331480611473575060015473ffffffffffffffffffffffffffffffffffffffff1633145b6114e7576040805162461bcd60e51b81526020600482015260248101919091527f4f6d6e69636861696e476f7665726e616e63654578656375746f723a3a73657460448201527f477561726469616e3a206f776e6572206f7220677561726469616e206f6e6c796064820152608401610a53565b6114f0816129ee565b600b5460405173ffffffffffffffffffffffffffffffffffffffff8084169216907f08fdaf06427a2010e5958f4329b566993472d14ce81d3f16ce7f2a2660da98e390600090a3600b80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b6115866124b9565b60085460408051918252602082018390527f0a653bb1a57e62cfd43f0dc557c7223e8b58896238b5f9b300ef646d37b82d1b910160405180910390a1600855565b61ffff81166000908152600260205260408120805460609291906115ea90613d8c565b80601f016020809104026020016040519081016040528092919081815260200182805461161690613d8c565b80156116635780601f1061163857610100808354040283529160200191611663565b820191906000526020600020905b81548152906001019060200180831161164657829003601f168201915b5050505050905080516000036116bb5760405162461bcd60e51b815260206004820152601d60248201527f4c7a4170703a206e6f20747275737465642070617468207265636f72640000006044820152606401610a53565b610e396000601483516116ce9190613f67565b839190612a3b565b6116de6124b9565b8181306040516020016116f393929190613f80565b60408051601f1981840301815291815261ffff851660009081526002602052209061171e9082614001565b507f8c0400cfe2d1199b1a725c78960bcc2a344d869b80590d0f2bd005db15a572ce83838360405161175293929190613f1a565b60405180910390a1505050565b6117676124b9565b600580547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527f5db758e995a17ec1ad84bdef7e8c3293a0bd6179bcce400dff5d4c3d87db726b9060200160405180910390a150565b6117e86124b9565b600b5460405161ffff8084169274010000000000000000000000000000000000000000900416907fb17c58d5977290696b6eea77c81c725f3dc83e426252bd9ece6287c1b8d0e96890600090a3600b805461ffff90921674010000000000000000000000000000000000000000027fffffffffffffffffffff0000ffffffffffffffffffffffffffffffffffffffff909216919091179055565b61188a6124b9565b6040517fcbed8b9c00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063cbed8b9c9061190490889088908890889088906004016140fd565b600060405180830381600087803b15801561191e57600080fd5b505af1158015611932573d6000803e3d6000fd5b505050505050505050565b6119456124b9565b61194d612b63565b848460405161195d929190613dd9565b6040805191829003822061ffff891660009081526002602052919091209091611986919061412b565b604051809103902014611a015760405162461bcd60e51b815260206004820152603f60248201527f4f6d6e69636861696e476f7665726e616e63654578656375746f723a3a72657460448201527f72794d6573736167653a206e6f74206120747275737465642072656d6f7465006064820152608401610a53565b611a0f868686868686612bbc565b6113846001600055565b611a216124b9565b61ffff83811660008181526003602090815260408083209487168084529482529182902085905581519283528201929092529081018290527f9d5c7c0b934da8fefa9c7760c98383778a12dfbfc0c3b3106518f43fb9508ac090606001611752565b611a8b6124b9565b61ffff83166000908152600260205260409020611aa98284836141a1565b507ffa41487ad5d6728f0b19276fa1eddc16558578f5109fc39d2dc33c3230470dab83838360405161175293929190613f1a565b611ae56124b9565b6000611af36002600161429d565b90508060ff16825114611bba5760405162461bcd60e51b815260206004820152606a60248201527f4f6d6e69636861696e476f7665726e616e63654578656375746f723a3a61646460448201527f54696d656c6f636b733a6e756d626572206f662074696d656c6f636b7320736860648201527f6f756c64206d6174636820746865206e756d626572206f6620676f7665726e6160848201527f6e636520726f757465730000000000000000000000000000000000000000000060a482015260c401610a53565b60005b8160ff168160ff161015611cef57611bf0838260ff1681518110611be357611be3613de9565b60200260200101516129ee565b828160ff1681518110611c0557611c05613de9565b60209081029190910181015160ff83166000818152600e845260409081902054905191825273ffffffffffffffffffffffffffffffffffffffff928316939216917ffc45ae51ac4893a3f843d030fbfd4037c0c196109c9e667645b8f144c83c16ea910160405180910390a3828160ff1681518110611c8657611c86613de9565b60209081029190910181015160ff83166000908152600e909252604090912080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909216919091179055600101611bbd565b505050565b611cfc6124b9565b73ffffffffffffffffffffffffffffffffffffffff8116611d855760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610a53565b611d8e81612e0a565b50565b611d996124b9565b6000611da76002600161429d565b90508060ff168260ff1610611e4a5760405162461bcd60e51b815260206004820152604b60248201527f4f6d6e69636861696e476f7665726e616e63654578656375746f723a3a73657460448201527f54696d656c6f636b50656e64696e6741646d696e3a20696e76616c696420707260648201527f6f706f73616c2074797065000000000000000000000000000000000000000000608482015260a401610a53565b60ff82166000908152600e6020526040908190205490517f4dd18bf500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff858116600483015290911690634dd18bf590602401600060405180830381600087803b158015611ec857600080fd5b505af1158015611edc573d6000803e3d6000fd5b50506040805173ffffffffffffffffffffffffffffffffffffffff8716815260ff861660208201527f6ac0b2c896b49975f12891f83c573bdf05490fe6b707cbaa2ba84c36094cbaec9350019050611752565b6040517ff5ecbdbc00000000000000000000000000000000000000000000000000000000815261ffff808616600483015284166024820152306044820152606481018290526060907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063f5ecbdbc90608401600060405180830381865afa158015611fd5573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611ffd9190810190614306565b95945050505050565b61200e612b63565b600161201982610e40565b600281111561202a5761202a613920565b146120c35760405162461bcd60e51b815260206004820152605360248201527f4f6d6e69636861696e476f7665726e616e63654578656375746f723a3a65786560448201527f637574653a2070726f706f73616c2063616e206f6e6c7920626520657865637560648201527f7465642069662069742069732071756575656400000000000000000000000000608482015260a401610a53565b6000818152600d602090815260408083206006810180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16610100179081905562010000900460ff168452600e90925280832054600183015460028401549251939473ffffffffffffffffffffffffffffffffffffffff9092169390929186917f712ae1383f79ac853f8d882153778e0260ef8f03b504e2866e0593e04d2b291f9190a260005b81811015612299578373ffffffffffffffffffffffffffffffffffffffff16630825f38f8660020183815481106121a4576121a4613de9565b60009182526020909120015460038801805473ffffffffffffffffffffffffffffffffffffffff90921691859081106121df576121df613de9565b90600052602060002001548860040185815481106121ff576121ff613de9565b9060005260206000200189600501868154811061221e5761221e613de9565b90600052602060002001886040518663ffffffff1660e01b8152600401612249959493929190613e95565b6000604051808303816000875af1158015612268573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526122909190810190614306565b5060010161216b565b5050506000838152600f60205260409020805460ff1916905550611d8e90506001600055565b600b5461ffff85811674010000000000000000000000000000000000000000909204161461237b5760405162461bcd60e51b815260206004820152604860248201527f4f6d6e69636861696e476f7665726e616e63654578656375746f723a3a5f626c60448201527f6f636b696e674c7a526563656976653a20696e76616c696420736f757263652060648201527f636861696e206964000000000000000000000000000000000000000000000000608482015260a401610a53565b8051602082012060405160009030906366ad5c8a906123a4908990899089908990602401614343565b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505090506000806124066175305a6123fc9190613f67565b3090609686612e81565b91509150816124af5761ffff8816600090815260066020526040908190209051859190612434908a90614382565b90815260408051918290036020908101832067ffffffffffffffff8b16600090815291522091909155612468908890614382565b60405180910390208861ffff167f41d73ce7be31a588d59fe9013cdcfe583bc0aab25093d042b64cade0df73065688846040516124a692919061439e565b60405180910390a35b5050505050505050565b60015473ffffffffffffffffffffffffffffffffffffffff163314610ee75760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a53565b612528612f0c565b6007805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390a1565b612587612f5e565b6000808280602001905181019061259e91906143c1565b915091506000806000806000868060200190518101906125be9190614592565b60008b8152600d602052604090205494995092975090955093509150156126735760405162461bcd60e51b815260206004820152604660248201527f4f6d6e69636861696e476f7665726e616e63654578656375746f723a3a5f6e6f60448201527f6e626c6f636b696e674c7a526563656976653a206475706c696361746520707260648201527f6f706f73616c0000000000000000000000000000000000000000000000000000608482015260a401610a53565b83518551148015612685575082518551145b8015612692575081518551145b61272a5760405162461bcd60e51b815260206004820152606060248201527f4f6d6e69636861696e476f7665726e616e63654578656375746f723a3a5f6e6f60448201527f6e626c6f636b696e674c7a526563656976653a2070726f706f73616c2066756e60648201527f6374696f6e20696e666f726d6174696f6e206172697479206d69736d61746368608482015260a401610a53565b6127366002600161429d565b60ff168160ff16106127d65760405162461bcd60e51b815260206004820152604960248201527f4f6d6e69636861696e476f7665726e616e63654578656375746f723a3a5f6e6f60448201527f6e626c6f636b696e674c7a526563656976653a20696e76616c69642070726f7060648201527f6f73616c20747970650000000000000000000000000000000000000000000000608482015260a401610a53565b6127e08551612fb1565b6040805161012081018252878152600060208083018281528385018a8152606085018a90526080850189905260a0850188905260c0850184905260e0850184905260ff87166101008601528b8452600d835294909220835181559151600183015592518051929384936128599260028501920190613571565b50606082015180516128759160038401916020909101906135fb565b5060808201518051612891916004840191602090910190613636565b5060a082015180516128ad916005840191602090910190613688565b5060c08201516006909101805460e08401516101009485015160ff1662010000027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffff9115159095027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff941515949094167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000909216919091179290921791909116919091179055600c87905580516040517fc37d19c9a6a9a568b5071658f9b5082ff8f142df3cf090385c5621ab1193806590612992908990899089908990899061470b565b60405180910390a26129a387613041565b505050505050505050505050565b6129b9612f5e565b6007805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586125553390565b73ffffffffffffffffffffffffffffffffffffffff8116611d8e576040517f8579befe00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606081612a4981601f6147d5565b1015612a975760405162461bcd60e51b815260206004820152600e60248201527f736c6963655f6f766572666c6f770000000000000000000000000000000000006044820152606401610a53565b612aa182846147d5565b84511015612af15760405162461bcd60e51b815260206004820152601160248201527f736c6963655f6f75744f66426f756e64730000000000000000000000000000006044820152606401610a53565b606082158015612b105760405191506000825260208201604052612b5a565b6040519150601f8416801560200281840101858101878315602002848b0101015b81831015612b49578051835260209283019201612b31565b5050858452601f01601f1916604052505b50949350505050565b600260005403612bb55760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610a53565b6002600055565b61ffff86166000908152600660205260408082209051612bdf9088908890613dd9565b908152604080516020928190038301902067ffffffffffffffff871660009081529252902054905080612c7a5760405162461bcd60e51b815260206004820152602360248201527f4e6f6e626c6f636b696e674c7a4170703a206e6f2073746f726564206d65737360448201527f61676500000000000000000000000000000000000000000000000000000000006064820152608401610a53565b808383604051612c8b929190613dd9565b604051809103902014612d065760405162461bcd60e51b815260206004820152602160248201527f4e6f6e626c6f636b696e674c7a4170703a20696e76616c6964207061796c6f6160448201527f64000000000000000000000000000000000000000000000000000000000000006064820152608401610a53565b61ffff87166000908152600660205260408082209051612d299089908990613dd9565b908152604080516020928190038301812067ffffffffffffffff8916600090815290845282902093909355601f88018290048202830182019052868252612dc2918991899089908190840183828082843760009201919091525050604080516020601f8a018190048102820181019092528881528a93509150889088908190840183828082843760009201919091525061257f92505050565b7fc264d91f3adc5588250e1551f547752ca0cfa8f6b530d243b9f9f4cab10ea8e58787878785604051612df99594939291906147e8565b60405180910390a150505050505050565b6001805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000606060008060008661ffff1667ffffffffffffffff811115612ea757612ea7613990565b6040519080825280601f01601f191660200182016040528015612ed1576020820181803683370190505b50905060008087516020890160008d8df191503d925086831115612ef3578692505b828152826000602083013e909890975095505050505050565b60075460ff16610ee75760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610a53565b60075460ff1615610ee75760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610a53565b600954600a544291906201518090612fc99084613f67565b1115612fdb5750600a81905581612fe8565b612fe583826147d5565b90505b60085481111561303a5760405162461bcd60e51b815260206004820181905260248201527f4461696c79205472616e73616374696f6e204c696d69742045786365656465646044820152606401610a53565b6009555050565b6000818152600d60209081526040808320600681015462010000900460ff168452600e83528184205482517f6a42b8f8000000000000000000000000000000000000000000000000000000008152925191949373ffffffffffffffffffffffffffffffffffffffff90911692636a42b8f892600480830193928290030181865afa1580156130d3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130f79190614824565b61310190426147d5565b60018084018290556000858152600f602052604090819020805460ff191690921790915560068401546002850154915192935062010000900460ff169185907f9a2e42fd6722813d69113e7d0079d3d940171428df7373df9c7f7617cfda28929061316f9086815260200190565b60405180910390a260005b818110156113845761333785600201828154811061319a5761319a613de9565b60009182526020909120015460038701805473ffffffffffffffffffffffffffffffffffffffff90921691849081106131d5576131d5613de9565b90600052602060002001548760040184815481106131f5576131f5613de9565b90600052602060002001805461320a90613d8c565b80601f016020809104026020016040519081016040528092919081815260200182805461323690613d8c565b80156132835780601f1061325857610100808354040283529160200191613283565b820191906000526020600020905b81548152906001019060200180831161326657829003601f168201915b505050505088600501858154811061329d5761329d613de9565b9060005260206000200180546132b290613d8c565b80601f01602080910402602001604051908101604052809291908181526020018280546132de90613d8c565b801561332b5780601f106133005761010080835404028352916020019161332b565b820191906000526020600020905b81548152906001019060200180831161330e57829003601f168201915b5050505050888861333f565b60010161317a565b60ff81166000908152600e602090815260409182902054915173ffffffffffffffffffffffffffffffffffffffff9092169163f2b065379161338b918a918a918a918a918a910161483d565b604051602081830303815290604052805190602001206040518263ffffffff1660e01b81526004016133bf91815260200190565b602060405180830381865afa1580156133dc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906134009190614884565b156134bf5760405162461bcd60e51b815260206004820152606360248201527f4f6d6e69636861696e476f7665726e616e63654578656375746f723a3a71756560448201527f75654f72526576657274496e7465726e616c3a206964656e746963616c20707260648201527f6f706f73616c20616374696f6e20616c7265616479207175657565642061742060848201527f657461000000000000000000000000000000000000000000000000000000000060a482015260c401610a53565b60ff81166000908152600e6020526040908190205490517f3a66f90100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911690633a66f9019061352e908990899089908990899060040161483d565b6020604051808303816000875af115801561354d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c1e9190614824565b8280548282559060005260206000209081019282156135eb579160200282015b828111156135eb57825182547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909116178255602090920191600190910190613591565b506135f79291506136da565b5090565b8280548282559060005260206000209081019282156135eb579160200282015b828111156135eb57825182559160200191906001019061361b565b82805482825590600052602060002090810192821561367c579160200282015b8281111561367c578251829061366c9082614001565b5091602001919060010190613656565b506135f79291506136ef565b8280548282559060005260206000209081019282156136ce579160200282015b828111156136ce57825182906136be9082614001565b50916020019190600101906136a8565b506135f792915061370c565b5b808211156135f757600081556001016136db565b808211156135f75760006137038282613729565b506001016136ef565b808211156135f75760006137208282613729565b5060010161370c565b50805461373590613d8c565b6000825580601f10613745575050565b601f016020900490600052602060002090810190611d8e91906136da565b803561ffff8116811461377557600080fd5b919050565b60008083601f84011261378c57600080fd5b50813567ffffffffffffffff8111156137a457600080fd5b6020830191508360208285010111156137bc57600080fd5b9250929050565b803567ffffffffffffffff8116811461377557600080fd5b600080600080600080608087890312156137f457600080fd5b6137fd87613763565b9550602087013567ffffffffffffffff8082111561381a57600080fd5b6138268a838b0161377a565b909750955085915061383a60408a016137c3565b9450606089013591508082111561385057600080fd5b5061385d89828a0161377a565b979a9699509497509295939492505050565b60006020828403121561388157600080fd5b5035919050565b60006020828403121561389a57600080fd5b610e3982613763565b600080604083850312156138b657600080fd5b6138bf83613763565b946020939093013593505050565b6000806000604084860312156138e257600080fd5b6138eb84613763565b9250602084013567ffffffffffffffff81111561390757600080fd5b6139138682870161377a565b9497909650939450505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b602081016003831061398a577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b91905290565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156139e8576139e8613990565b604052919050565b600067ffffffffffffffff821115613a0a57613a0a613990565b50601f01601f191660200190565b600080600060608486031215613a2d57600080fd5b613a3684613763565b9250602084013567ffffffffffffffff811115613a5257600080fd5b8401601f81018613613a6357600080fd5b8035613a76613a71826139f0565b6139bf565b818152876020838501011115613a8b57600080fd5b81602084016020830137600060208383010152809450505050613ab0604085016137c3565b90509250925092565b60005b83811015613ad4578181015183820152602001613abc565b50506000910152565b60008151808452613af5816020860160208601613ab9565b601f01601f19169290920160200192915050565b602081526000610e396020830184613add565b73ffffffffffffffffffffffffffffffffffffffff81168114611d8e57600080fd5b600060208284031215613b5057600080fd5b8135610e3981613b1c565b60008060408385031215613b6e57600080fd5b613b7783613763565b9150613b8560208401613763565b90509250929050565b600080600080600060808688031215613ba657600080fd5b613baf86613763565b9450613bbd60208701613763565b935060408601359250606086013567ffffffffffffffff811115613be057600080fd5b613bec8882890161377a565b969995985093965092949392505050565b600080600060608486031215613c1257600080fd5b613c1b84613763565b9250613c2960208501613763565b9150604084013590509250925092565b600067ffffffffffffffff821115613c5357613c53613990565b5060051b60200190565b60006020808385031215613c7057600080fd5b823567ffffffffffffffff811115613c8757600080fd5b8301601f81018513613c9857600080fd5b8035613ca6613a7182613c39565b81815260059190911b82018301908381019087831115613cc557600080fd5b928401925b82841015613cec578335613cdd81613b1c565b82529284019290840190613cca565b979650505050505050565b60ff81168114611d8e57600080fd5b60008060408385031215613d1957600080fd5b8235613d2481613b1c565b91506020830135613d3481613cf7565b809150509250929050565b60008060008060808587031215613d5557600080fd5b613d5e85613763565b9350613d6c60208601613763565b92506040850135613d7c81613b1c565b9396929550929360600135925050565b600181811c90821680613da057607f821691505b602082108103610ed1577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b8183823760009101908152919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60008154613e2581613d8c565b808552602060018381168015613e425760018114613e5c57613e8a565b60ff198516838901528284151560051b8901019550613e8a565b866000528260002060005b85811015613e825781548a8201860152908301908401613e67565b890184019650505b505050505092915050565b73ffffffffffffffffffffffffffffffffffffffff8616815284602082015260a060408201526000613eca60a0830186613e18565b8281036060840152613edc8186613e18565b9150508260808301529695505050505050565b818352818160208501375060006020828401015260006020601f19601f840116840101905092915050565b61ffff84168152604060208201526000611ffd604083018486613eef565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b81810381811115613f7a57613f7a613f38565b92915050565b8284823760609190911b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000169101908152601401919050565b601f821115611cef576000816000526020600020601f850160051c81016020861015613fe25750805b601f850160051c820191505b8181101561138457828155600101613fee565b815167ffffffffffffffff81111561401b5761401b613990565b61402f816140298454613d8c565b84613fb9565b602080601f831160018114614082576000841561404c5750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b178555611384565b600085815260208120601f198616915b828110156140b157888601518255948401946001909101908401614092565b50858210156140ed57878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b600061ffff808816835280871660208401525084604083015260806060830152613cec608083018486613eef565b600080835461413981613d8c565b60018281168015614151576001811461416657614195565b60ff1984168752821515830287019450614195565b8760005260208060002060005b8581101561418c5781548a820152908401908201614173565b50505082870194505b50929695505050505050565b67ffffffffffffffff8311156141b9576141b9613990565b6141cd836141c78354613d8c565b83613fb9565b6000601f84116001811461421f57600085156141e95750838201355b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b1c1916600186901b178355610ccf565b600083815260209020601f19861690835b828110156142505786850135825560209485019460019092019101614230565b508682101561428b577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88860031b161c19848701351681555b505060018560011b0183555050505050565b60ff8181168382160190811115613f7a57613f7a613f38565b60006142c4613a71846139f0565b90508281528383830111156142d857600080fd5b610e39836020830184613ab9565b600082601f8301126142f757600080fd5b610e39838351602085016142b6565b60006020828403121561431857600080fd5b815167ffffffffffffffff81111561432f57600080fd5b61433b848285016142e6565b949350505050565b61ffff851681526080602082015260006143606080830186613add565b67ffffffffffffffff851660408401528281036060840152613cec8185613add565b60008251614394818460208701613ab9565b9190910192915050565b67ffffffffffffffff8316815260406020820152600061433b6040830184613add565b600080604083850312156143d457600080fd5b825167ffffffffffffffff8111156143eb57600080fd5b6143f7858286016142e6565b925050602083015190509250929050565b600082601f83011261441957600080fd5b81516020614429613a7183613c39565b8083825260208201915060208460051b87010193508684111561444b57600080fd5b602086015b848110156144675780518352918301918301614450565b509695505050505050565b600082601f83011261448357600080fd5b81516020614493613a7183613c39565b82815260059290921b840181019181810190868411156144b257600080fd5b8286015b8481101561446757805167ffffffffffffffff8111156144d65760008081fd5b8701603f810189136144e85760008081fd5b6144f98986830151604084016142b6565b8452509183019183016144b6565b600082601f83011261451857600080fd5b81516020614528613a7183613c39565b82815260059290921b8401810191818101908684111561454757600080fd5b8286015b8481101561446757805167ffffffffffffffff81111561456b5760008081fd5b6145798986838b01016142e6565b84525091830191830161454b565b805161377581613cf7565b600080600080600060a086880312156145aa57600080fd5b855167ffffffffffffffff808211156145c257600080fd5b818801915088601f8301126145d657600080fd5b815160206145e6613a7183613c39565b82815260059290921b8401810191818101908c84111561460557600080fd5b948201945b8386101561462c57855161461d81613b1c565b8252948201949082019061460a565b918b015191995090935050508082111561464557600080fd5b61465189838a01614408565b9550604088015191508082111561466757600080fd5b61467389838a01614472565b9450606088015191508082111561468957600080fd5b5061469688828901614507565b9250506146a560808701614587565b90509295509295909350565b60008282518085526020808601955060208260051b8401016020860160005b848110156146fe57601f198684030189526146ec838351613add565b988401989250908301906001016146d0565b5090979650505050505050565b60a0808252865190820181905260009060209060c0840190828a01845b8281101561475a57815173ffffffffffffffffffffffffffffffffffffffff1684529284019290840190600101614728565b5050508381038285015287518082528883019183019060005b8181101561478f57835183529284019291840191600101614773565b505084810360408601526147a381896146b1565b9250505082810360608401526147b981866146b1565b9150506147cb608083018460ff169052565b9695505050505050565b80820180821115613f7a57613f7a613f38565b61ffff86168152608060208201526000614806608083018688613eef565b67ffffffffffffffff94909416604083015250606001529392505050565b60006020828403121561483657600080fd5b5051919050565b73ffffffffffffffffffffffffffffffffffffffff8616815284602082015260a06040820152600061487260a0830186613add565b8281036060840152613edc8186613add565b60006020828403121561489657600080fd5b81518015158114610e3957600080fdfea26469706673582212206e9b4e0e8423ddd67a12f6b1a136938a978661714c282ede340b91a73060ecf464736f6c63430008190033", + "devdoc": { + "custom:security-contact": "https://github.com/VenusProtocol/governance-contracts#discussion", + "details": "The owner of this contract controls LayerZero configuration. When used in production the owner will be OmnichainExecutor This implementation is non-blocking, meaning the failed messages will not block the future messages from the source. For the blocking behavior, derive the contract from LzApp.", + "events": { + "Paused(address)": { + "details": "Emitted when the pause is triggered by `account`." + }, + "Unpaused(address)": { + "details": "Emitted when the pause is lifted by `account`." + } + }, + "kind": "dev", + "methods": { + "addTimelocks(address[])": { + "custom:access": "Only owner", + "custom:event": "Emits TimelockAdded with old and new timelock and route type", + "params": { + "timelocks_": "Array of addresses of all 3 timelocks" + } + }, + "cancel(uint256)": { + "custom:access": "Sender must be the guardian", + "custom:event": "Emits ProposalCanceled with proposal id of the canceled proposal", + "params": { + "proposalId_": "Id of proposal that is to be canceled" + } + }, + "execute(uint256)": { + "custom:event": "Emits ProposalExecuted with proposal id of executed proposal", + "params": { + "proposalId_": "Id of proposal that is to be executed" + } + }, + "owner()": { + "details": "Returns the address of the current owner." + }, + "pause()": { + "custom:access": "Only owner" + }, + "paused()": { + "details": "Returns true if the contract is paused, and false otherwise." + }, + "retryMessage(uint16,bytes,uint64,bytes)": { + "custom:access": "Only owner", + "params": { + "nonce_": "Nonce to identify failed message", + "payload_": "The payload of the message to be retried", + "srcAddress_": "Source address => local app address + remote app address", + "srcChainId_": "Source chain Id" + } + }, + "setGuardian(address)": { + "custom:access": "Must be call by guardian or owner", + "custom:event": "Emit NewGuardian with old and new guardian address", + "params": { + "newGuardian": "The address of the new guardian" + } + }, + "setMaxDailyReceiveLimit(uint256)": { + "custom:access": "Only Owner", + "custom:event": "Emits SetMaxDailyReceiveLimit with old and new limit", + "params": { + "limit_": "Number of commands" + } + }, + "setSrcChainId(uint16)": { + "custom:access": "Only owner", + "custom:event": "Emit SetSrcChainId with old and new source id", + "params": { + "srcChainId_": "The new source chain id to be set" + } + }, + "setTimelockPendingAdmin(address,uint8)": { + "custom:access": "Only owner", + "custom:event": "Emits SetTimelockPendingAdmin with new pending admin and proposal type", + "params": { + "pendingAdmin_": "Address of new pending admin", + "proposalType_": "Type of proposal" + } + }, + "state(uint256)": { + "params": { + "proposalId_": "The id of the proposal" + }, + "returns": { + "_0": "Proposal state" + } + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + }, + "unpause()": { + "custom:access": "Only owner" + } + }, + "title": "OmnichainGovernanceExecutor", + "version": 1 + }, + "userdoc": { + "errors": { + "InvalidProposalId()": [ + { + "notice": "Thrown when proposal ID is invalid" + } + ], + "ZeroAddressNotAllowed()": [ + { + "notice": "Thrown if the supplied address is a zero address where it is not allowed" + } + ] + }, + "events": { + "NewGuardian(address,address)": { + "notice": "Emitted when new guardian address is set" + }, + "ProposalCanceled(uint256)": { + "notice": "Emitted when proposal is canceled" + }, + "ProposalExecuted(uint256)": { + "notice": "Emitted when proposal executed" + }, + "ProposalQueued(uint256,uint256)": { + "notice": "Emitted when proposal is queued" + }, + "ProposalReceived(uint256,address[],uint256[],string[],bytes[],uint8)": { + "notice": "Emitted when proposal is received" + }, + "ReceivePayloadFailed(uint16,bytes,uint64,bytes)": { + "notice": "Emitted when proposal failed" + }, + "SetMaxDailyReceiveLimit(uint256,uint256)": { + "notice": "Emitted when the maximum daily limit for receiving command from Binance chain is modified" + }, + "SetSrcChainId(uint16,uint16)": { + "notice": "Emitted when source layerzero endpoint id is updated" + }, + "SetTimelockPendingAdmin(address,uint8)": { + "notice": "Emitted when pending admin of Timelock is updated" + }, + "TimelockAdded(uint8,address,address)": { + "notice": "Emitted when timelock added" + } + }, + "kind": "user", + "methods": { + "addTimelocks(address[])": { + "notice": "Add timelocks to the ProposalTimelocks mapping" + }, + "cancel(uint256)": { + "notice": "Cancels a proposal only if sender is the guardian and proposal is not executed" + }, + "execute(uint256)": { + "notice": "Executes a queued proposal if eta has passed" + }, + "guardian()": { + "notice": "A privileged role that can cancel any proposal" + }, + "last24HourCommandsReceived()": { + "notice": "Total received commands within the last 24-hour window from Binance chain" + }, + "last24HourReceiveWindowStart()": { + "notice": "Timestamp when the last 24-hour window started from Binance chain" + }, + "lastProposalReceived()": { + "notice": "Last proposal count received" + }, + "maxDailyReceiveLimit()": { + "notice": "Maximum daily limit for receiving commands from Binance chain" + }, + "pause()": { + "notice": "Triggers the paused state of the controller" + }, + "proposalTimelocks(uint256)": { + "notice": "Mapping containing Timelock addresses for each proposal type" + }, + "proposals(uint256)": { + "notice": "The official record of all proposals ever proposed" + }, + "queued(uint256)": { + "notice": "Represents queue state of proposal" + }, + "renounceOwnership()": { + "notice": "Empty implementation of renounce ownership to avoid any mishappening" + }, + "retryMessage(uint16,bytes,uint64,bytes)": { + "notice": "Resends a previously failed message" + }, + "setGuardian(address)": { + "notice": "Sets the new executor guardian" + }, + "setMaxDailyReceiveLimit(uint256)": { + "notice": "Sets the maximum daily limit for receiving commands" + }, + "setSrcChainId(uint16)": { + "notice": "Update source layerzero endpoint id" + }, + "setTimelockPendingAdmin(address,uint8)": { + "notice": "Sets the new pending admin of the Timelock" + }, + "srcChainId()": { + "notice": "Stores BNB chain layerzero endpoint id" + }, + "state(uint256)": { + "notice": "Gets the state of a proposal" + }, + "unpause()": { + "notice": "Triggers the resume state of the controller" + } + }, + "notice": "Executes the proposal transactions sent from the main chain", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 4299, + "contract": "contracts/Cross-chain/OmnichainGovernanceExecutor.sol:OmnichainGovernanceExecutor", + "label": "_status", + "offset": 0, + "slot": "0", + "type": "t_uint256" + }, + { + "astId": 4075, + "contract": "contracts/Cross-chain/OmnichainGovernanceExecutor.sol:OmnichainGovernanceExecutor", + "label": "_owner", + "offset": 0, + "slot": "1", + "type": "t_address" + }, + { + "astId": 455, + "contract": "contracts/Cross-chain/OmnichainGovernanceExecutor.sol:OmnichainGovernanceExecutor", + "label": "trustedRemoteLookup", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_uint16,t_bytes_storage)" + }, + { + "astId": 461, + "contract": "contracts/Cross-chain/OmnichainGovernanceExecutor.sol:OmnichainGovernanceExecutor", + "label": "minDstGasLookup", + "offset": 0, + "slot": "3", + "type": "t_mapping(t_uint16,t_mapping(t_uint16,t_uint256))" + }, + { + "astId": 465, + "contract": "contracts/Cross-chain/OmnichainGovernanceExecutor.sol:OmnichainGovernanceExecutor", + "label": "payloadSizeLimitLookup", + "offset": 0, + "slot": "4", + "type": "t_mapping(t_uint16,t_uint256)" + }, + { + "astId": 467, + "contract": "contracts/Cross-chain/OmnichainGovernanceExecutor.sol:OmnichainGovernanceExecutor", + "label": "precrime", + "offset": 0, + "slot": "5", + "type": "t_address" + }, + { + "astId": 997, + "contract": "contracts/Cross-chain/OmnichainGovernanceExecutor.sol:OmnichainGovernanceExecutor", + "label": "failedMessages", + "offset": 0, + "slot": "6", + "type": "t_mapping(t_uint16,t_mapping(t_bytes_memory_ptr,t_mapping(t_uint64,t_bytes32)))" + }, + { + "astId": 4198, + "contract": "contracts/Cross-chain/OmnichainGovernanceExecutor.sol:OmnichainGovernanceExecutor", + "label": "_paused", + "offset": 0, + "slot": "7", + "type": "t_bool" + }, + { + "astId": 5497, + "contract": "contracts/Cross-chain/OmnichainGovernanceExecutor.sol:OmnichainGovernanceExecutor", + "label": "maxDailyReceiveLimit", + "offset": 0, + "slot": "8", + "type": "t_uint256" + }, + { + "astId": 5500, + "contract": "contracts/Cross-chain/OmnichainGovernanceExecutor.sol:OmnichainGovernanceExecutor", + "label": "last24HourCommandsReceived", + "offset": 0, + "slot": "9", + "type": "t_uint256" + }, + { + "astId": 5503, + "contract": "contracts/Cross-chain/OmnichainGovernanceExecutor.sol:OmnichainGovernanceExecutor", + "label": "last24HourReceiveWindowStart", + "offset": 0, + "slot": "10", + "type": "t_uint256" + }, + { + "astId": 6251, + "contract": "contracts/Cross-chain/OmnichainGovernanceExecutor.sol:OmnichainGovernanceExecutor", + "label": "guardian", + "offset": 0, + "slot": "11", + "type": "t_address" + }, + { + "astId": 6254, + "contract": "contracts/Cross-chain/OmnichainGovernanceExecutor.sol:OmnichainGovernanceExecutor", + "label": "srcChainId", + "offset": 20, + "slot": "11", + "type": "t_uint16" + }, + { + "astId": 6257, + "contract": "contracts/Cross-chain/OmnichainGovernanceExecutor.sol:OmnichainGovernanceExecutor", + "label": "lastProposalReceived", + "offset": 0, + "slot": "12", + "type": "t_uint256" + }, + { + "astId": 6263, + "contract": "contracts/Cross-chain/OmnichainGovernanceExecutor.sol:OmnichainGovernanceExecutor", + "label": "proposals", + "offset": 0, + "slot": "13", + "type": "t_mapping(t_uint256,t_struct(Proposal)6244_storage)" + }, + { + "astId": 6269, + "contract": "contracts/Cross-chain/OmnichainGovernanceExecutor.sol:OmnichainGovernanceExecutor", + "label": "proposalTimelocks", + "offset": 0, + "slot": "14", + "type": "t_mapping(t_uint256,t_contract(ITimelock)8011)" + }, + { + "astId": 6274, + "contract": "contracts/Cross-chain/OmnichainGovernanceExecutor.sol:OmnichainGovernanceExecutor", + "label": "queued", + "offset": 0, + "slot": "15", + "type": "t_mapping(t_uint256,t_bool)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_address)dyn_storage": { + "base": "t_address", + "encoding": "dynamic_array", + "label": "address[]", + "numberOfBytes": "32" + }, + "t_array(t_bytes_storage)dyn_storage": { + "base": "t_bytes_storage", + "encoding": "dynamic_array", + "label": "bytes[]", + "numberOfBytes": "32" + }, + "t_array(t_string_storage)dyn_storage": { + "base": "t_string_storage", + "encoding": "dynamic_array", + "label": "string[]", + "numberOfBytes": "32" + }, + "t_array(t_uint256)dyn_storage": { + "base": "t_uint256", + "encoding": "dynamic_array", + "label": "uint256[]", + "numberOfBytes": "32" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_bytes_memory_ptr": { + "encoding": "bytes", + "label": "bytes", + "numberOfBytes": "32" + }, + "t_bytes_storage": { + "encoding": "bytes", + "label": "bytes", + "numberOfBytes": "32" + }, + "t_contract(ITimelock)8011": { + "encoding": "inplace", + "label": "contract ITimelock", + "numberOfBytes": "20" + }, + "t_mapping(t_bytes_memory_ptr,t_mapping(t_uint64,t_bytes32))": { + "encoding": "mapping", + "key": "t_bytes_memory_ptr", + "label": "mapping(bytes => mapping(uint64 => bytes32))", + "numberOfBytes": "32", + "value": "t_mapping(t_uint64,t_bytes32)" + }, + "t_mapping(t_uint16,t_bytes_storage)": { + "encoding": "mapping", + "key": "t_uint16", + "label": "mapping(uint16 => bytes)", + "numberOfBytes": "32", + "value": "t_bytes_storage" + }, + "t_mapping(t_uint16,t_mapping(t_bytes_memory_ptr,t_mapping(t_uint64,t_bytes32)))": { + "encoding": "mapping", + "key": "t_uint16", + "label": "mapping(uint16 => mapping(bytes => mapping(uint64 => bytes32)))", + "numberOfBytes": "32", + "value": "t_mapping(t_bytes_memory_ptr,t_mapping(t_uint64,t_bytes32))" + }, + "t_mapping(t_uint16,t_mapping(t_uint16,t_uint256))": { + "encoding": "mapping", + "key": "t_uint16", + "label": "mapping(uint16 => mapping(uint16 => uint256))", + "numberOfBytes": "32", + "value": "t_mapping(t_uint16,t_uint256)" + }, + "t_mapping(t_uint16,t_uint256)": { + "encoding": "mapping", + "key": "t_uint16", + "label": "mapping(uint16 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_uint256,t_bool)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_uint256,t_contract(ITimelock)8011)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => contract ITimelock)", + "numberOfBytes": "32", + "value": "t_contract(ITimelock)8011" + }, + "t_mapping(t_uint256,t_struct(Proposal)6244_storage)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => struct OmnichainGovernanceExecutor.Proposal)", + "numberOfBytes": "32", + "value": "t_struct(Proposal)6244_storage" + }, + "t_mapping(t_uint64,t_bytes32)": { + "encoding": "mapping", + "key": "t_uint64", + "label": "mapping(uint64 => bytes32)", + "numberOfBytes": "32", + "value": "t_bytes32" + }, + "t_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(Proposal)6244_storage": { + "encoding": "inplace", + "label": "struct OmnichainGovernanceExecutor.Proposal", + "members": [ + { + "astId": 6215, + "contract": "contracts/Cross-chain/OmnichainGovernanceExecutor.sol:OmnichainGovernanceExecutor", + "label": "id", + "offset": 0, + "slot": "0", + "type": "t_uint256" + }, + { + "astId": 6218, + "contract": "contracts/Cross-chain/OmnichainGovernanceExecutor.sol:OmnichainGovernanceExecutor", + "label": "eta", + "offset": 0, + "slot": "1", + "type": "t_uint256" + }, + { + "astId": 6222, + "contract": "contracts/Cross-chain/OmnichainGovernanceExecutor.sol:OmnichainGovernanceExecutor", + "label": "targets", + "offset": 0, + "slot": "2", + "type": "t_array(t_address)dyn_storage" + }, + { + "astId": 6226, + "contract": "contracts/Cross-chain/OmnichainGovernanceExecutor.sol:OmnichainGovernanceExecutor", + "label": "values", + "offset": 0, + "slot": "3", + "type": "t_array(t_uint256)dyn_storage" + }, + { + "astId": 6230, + "contract": "contracts/Cross-chain/OmnichainGovernanceExecutor.sol:OmnichainGovernanceExecutor", + "label": "signatures", + "offset": 0, + "slot": "4", + "type": "t_array(t_string_storage)dyn_storage" + }, + { + "astId": 6234, + "contract": "contracts/Cross-chain/OmnichainGovernanceExecutor.sol:OmnichainGovernanceExecutor", + "label": "calldatas", + "offset": 0, + "slot": "5", + "type": "t_array(t_bytes_storage)dyn_storage" + }, + { + "astId": 6237, + "contract": "contracts/Cross-chain/OmnichainGovernanceExecutor.sol:OmnichainGovernanceExecutor", + "label": "canceled", + "offset": 0, + "slot": "6", + "type": "t_bool" + }, + { + "astId": 6240, + "contract": "contracts/Cross-chain/OmnichainGovernanceExecutor.sol:OmnichainGovernanceExecutor", + "label": "executed", + "offset": 1, + "slot": "6", + "type": "t_bool" + }, + { + "astId": 6243, + "contract": "contracts/Cross-chain/OmnichainGovernanceExecutor.sol:OmnichainGovernanceExecutor", + "label": "proposalType", + "offset": 2, + "slot": "6", + "type": "t_uint8" + } + ], + "numberOfBytes": "224" + }, + "t_uint16": { + "encoding": "inplace", + "label": "uint16", + "numberOfBytes": "2" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint64": { + "encoding": "inplace", + "label": "uint64", + "numberOfBytes": "8" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" + } + } + } +} diff --git a/deployments/berachainbartio/solcInputs/39b818455672acbd6d12469b0e689d7a.json b/deployments/berachainbartio/solcInputs/39b818455672acbd6d12469b0e689d7a.json new file mode 100644 index 00000000..daf16329 --- /dev/null +++ b/deployments/berachainbartio/solcInputs/39b818455672acbd6d12469b0e689d7a.json @@ -0,0 +1,40 @@ +{ + "language": "Solidity", + "sources": { + "@venusprotocol/solidity-utilities/contracts/validators.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.25;\n\n/// @notice Thrown if the supplied address is a zero address where it is not allowed\nerror ZeroAddressNotAllowed();\n\n/// @notice Thrown if the supplied value is 0 where it is not allowed\nerror ZeroValueNotAllowed();\n\n/// @notice Checks if the provided address is nonzero, reverts otherwise\n/// @param address_ Address to check\n/// @custom:error ZeroAddressNotAllowed is thrown if the provided address is a zero address\nfunction ensureNonzeroAddress(address address_) pure {\n if (address_ == address(0)) {\n revert ZeroAddressNotAllowed();\n }\n}\n\n/// @notice Checks if the provided value is nonzero, reverts otherwise\n/// @param value_ Value to check\n/// @custom:error ZeroValueNotAllowed is thrown if the provided value is 0\nfunction ensureNonzeroValue(uint256 value_) pure {\n if (value_ == 0) {\n revert ZeroValueNotAllowed();\n }\n}\n" + }, + "contracts/Governance/TimelockV8.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.25;\nimport { ensureNonzeroAddress } from \"@venusprotocol/solidity-utilities/contracts/validators.sol\";\n\n/**\n * @title TimelockV8\n * @author Venus\n * @notice The Timelock contract using solidity V8.\n * This contract also differs from the original timelock because it has a virtual function to get minimum delays\n * and allow test deployments to override the value.\n */\ncontract TimelockV8 {\n /// @notice Required period to execute a proposal transaction\n uint256 private constant DEFAULT_GRACE_PERIOD = 14 days;\n\n /// @notice Minimum amount of time a proposal transaction must be queued\n uint256 private constant DEFAULT_MINIMUM_DELAY = 10 minutes;\n\n /// @notice Maximum amount of time a proposal transaction must be queued\n uint256 private constant DEFAULT_MAXIMUM_DELAY = 30 days;\n\n /// @notice Timelock admin authorized to queue and execute transactions\n address public admin;\n\n /// @notice Account proposed as the next admin\n address public pendingAdmin;\n\n /// @notice Period for a proposal transaction to be queued\n uint256 public delay;\n\n /// @notice Mapping of queued transactions\n mapping(bytes32 => bool) public queuedTransactions;\n\n /// @notice Event emitted when a new admin is accepted\n event NewAdmin(address indexed oldAdmin, address indexed newAdmin);\n\n /// @notice Event emitted when a new admin is proposed\n event NewPendingAdmin(address indexed newPendingAdmin);\n\n /// @notice Event emitted when a new delay is proposed\n event NewDelay(uint256 indexed oldDelay, uint256 indexed newDelay);\n\n /// @notice Event emitted when a proposal transaction has been cancelled\n event CancelTransaction(\n bytes32 indexed txHash,\n address indexed target,\n uint256 value,\n string signature,\n bytes data,\n uint256 eta\n );\n\n /// @notice Event emitted when a proposal transaction has been executed\n event ExecuteTransaction(\n bytes32 indexed txHash,\n address indexed target,\n uint256 value,\n string signature,\n bytes data,\n uint256 eta\n );\n\n /// @notice Event emitted when a proposal transaction has been queued\n event QueueTransaction(\n bytes32 indexed txHash,\n address indexed target,\n uint256 value,\n string signature,\n bytes data,\n uint256 eta\n );\n\n constructor(address admin_, uint256 delay_) {\n require(delay_ >= MINIMUM_DELAY(), \"Timelock::constructor: Delay must exceed minimum delay.\");\n require(delay_ <= MAXIMUM_DELAY(), \"Timelock::setDelay: Delay must not exceed maximum delay.\");\n ensureNonzeroAddress(admin_);\n\n admin = admin_;\n delay = delay_;\n }\n\n fallback() external payable {}\n\n /**\n * @notice Setter for the transaction queue delay\n * @param delay_ The new delay period for the transaction queue\n * @custom:access Sender must be Timelock itself\n * @custom:event Emit NewDelay with old and new delay\n */\n function setDelay(uint256 delay_) public {\n require(msg.sender == address(this), \"Timelock::setDelay: Call must come from Timelock.\");\n require(delay_ >= MINIMUM_DELAY(), \"Timelock::setDelay: Delay must exceed minimum delay.\");\n require(delay_ <= MAXIMUM_DELAY(), \"Timelock::setDelay: Delay must not exceed maximum delay.\");\n emit NewDelay(delay, delay_);\n delay = delay_;\n }\n\n /**\n * @notice Return grace period\n * @return The duration of the grace period, specified as a uint256 value.\n */\n function GRACE_PERIOD() public view virtual returns (uint256) {\n return DEFAULT_GRACE_PERIOD;\n }\n\n /**\n * @notice Return required minimum delay\n * @return Minimum delay\n */\n function MINIMUM_DELAY() public view virtual returns (uint256) {\n return DEFAULT_MINIMUM_DELAY;\n }\n\n /**\n * @notice Return required maximum delay\n * @return Maximum delay\n */\n function MAXIMUM_DELAY() public view virtual returns (uint256) {\n return DEFAULT_MAXIMUM_DELAY;\n }\n\n /**\n * @notice Method for accepting a proposed admin\n * @custom:access Sender must be pending admin\n * @custom:event Emit NewAdmin with old and new admin\n */\n function acceptAdmin() public {\n require(msg.sender == pendingAdmin, \"Timelock::acceptAdmin: Call must come from pendingAdmin.\");\n emit NewAdmin(admin, msg.sender);\n admin = msg.sender;\n pendingAdmin = address(0);\n }\n\n /**\n * @notice Method to propose a new admin authorized to call timelock functions. This should be the Governor Contract\n * @param pendingAdmin_ Address of the proposed admin\n * @custom:access Sender must be Timelock contract itself or admin\n * @custom:event Emit NewPendingAdmin with new pending admin\n */\n function setPendingAdmin(address pendingAdmin_) public {\n require(\n msg.sender == address(this) || msg.sender == admin,\n \"Timelock::setPendingAdmin: Call must come from Timelock.\"\n );\n ensureNonzeroAddress(pendingAdmin_);\n pendingAdmin = pendingAdmin_;\n\n emit NewPendingAdmin(pendingAdmin);\n }\n\n /**\n * @notice Called for each action when queuing a proposal\n * @param target Address of the contract with the method to be called\n * @param value Native token amount sent with the transaction\n * @param signature Signature of the function to be called\n * @param data Arguments to be passed to the function when called\n * @param eta Timestamp after which the transaction can be executed\n * @return Hash of the queued transaction\n * @custom:access Sender must be admin\n * @custom:event Emit QueueTransaction\n */\n function queueTransaction(\n address target,\n uint256 value,\n string calldata signature,\n bytes calldata data,\n uint256 eta\n ) public returns (bytes32) {\n require(msg.sender == admin, \"Timelock::queueTransaction: Call must come from admin.\");\n require(\n eta >= getBlockTimestamp() + delay,\n \"Timelock::queueTransaction: Estimated execution block must satisfy delay.\"\n );\n\n bytes32 txHash = keccak256(abi.encode(target, value, signature, data, eta));\n require(!queuedTransactions[txHash], \"Timelock::queueTransaction: transaction already queued.\");\n queuedTransactions[txHash] = true;\n\n emit QueueTransaction(txHash, target, value, signature, data, eta);\n return txHash;\n }\n\n /**\n * @notice Called to cancel a queued transaction\n * @param target Address of the contract with the method to be called\n * @param value Native token amount sent with the transaction\n * @param signature Signature of the function to be called\n * @param data Arguments to be passed to the function when called\n * @param eta Timestamp after which the transaction can be executed\n * @custom:access Sender must be admin\n * @custom:event Emit CancelTransaction\n */\n function cancelTransaction(\n address target,\n uint256 value,\n string calldata signature,\n bytes calldata data,\n uint256 eta\n ) public {\n require(msg.sender == admin, \"Timelock::cancelTransaction: Call must come from admin.\");\n\n bytes32 txHash = keccak256(abi.encode(target, value, signature, data, eta));\n require(queuedTransactions[txHash], \"Timelock::cancelTransaction: transaction is not queued yet.\");\n delete (queuedTransactions[txHash]);\n\n emit CancelTransaction(txHash, target, value, signature, data, eta);\n }\n\n /**\n * @notice Called to execute a queued transaction\n * @param target Address of the contract with the method to be called\n * @param value Native token amount sent with the transaction\n * @param signature Signature of the function to be called\n * @param data Arguments to be passed to the function when called\n * @param eta Timestamp after which the transaction can be executed\n * @return Result of function call\n * @custom:access Sender must be admin\n * @custom:event Emit ExecuteTransaction\n */\n function executeTransaction(\n address target,\n uint256 value,\n string calldata signature,\n bytes calldata data,\n uint256 eta\n ) public returns (bytes memory) {\n require(msg.sender == admin, \"Timelock::executeTransaction: Call must come from admin.\");\n\n bytes32 txHash = keccak256(abi.encode(target, value, signature, data, eta));\n require(queuedTransactions[txHash], \"Timelock::executeTransaction: Transaction hasn't been queued.\");\n require(getBlockTimestamp() >= eta, \"Timelock::executeTransaction: Transaction hasn't surpassed time lock.\");\n require(getBlockTimestamp() <= eta + GRACE_PERIOD(), \"Timelock::executeTransaction: Transaction is stale.\");\n\n delete (queuedTransactions[txHash]);\n\n bytes memory callData;\n\n if (bytes(signature).length == 0) {\n callData = data;\n } else {\n callData = abi.encodePacked(bytes4(keccak256(bytes(signature))), data);\n }\n\n // solium-disable-next-line security/no-call-value\n (bool success, bytes memory returnData) = target.call{ value: value }(callData);\n require(success, \"Timelock::executeTransaction: Transaction execution reverted.\");\n\n emit ExecuteTransaction(txHash, target, value, signature, data, eta);\n\n return returnData;\n }\n\n /**\n * @notice Returns the current block timestamp\n * @return The current block timestamp\n */\n function getBlockTimestamp() internal view returns (uint256) {\n // solium-disable-next-line security/no-block-members\n return block.timestamp;\n }\n}\n" + }, + "contracts/test/TestTimelockV8.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.25;\nimport { TimelockV8 } from \"../Governance/TimelockV8.sol\";\n\ncontract TestTimelockV8 is TimelockV8 {\n constructor(address admin_, uint256 delay_) public TimelockV8(admin_, delay_) {}\n\n function GRACE_PERIOD() public view override returns (uint256) {\n return 1 hours;\n }\n\n function MINIMUM_DELAY() public view override returns (uint256) {\n return 1;\n }\n\n function MAXIMUM_DELAY() public view override returns (uint256) {\n return 1 hours;\n }\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 10000 + }, + "evmVersion": "paris", + "outputSelection": { + "*": { + "*": [ + "storageLayout", + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "evm.gasEstimates" + ], + "": ["ast"] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} diff --git a/deployments/berachainbartio/solcInputs/9f400d4fd6f6fcf916824838bc678e25.json b/deployments/berachainbartio/solcInputs/9f400d4fd6f6fcf916824838bc678e25.json new file mode 100644 index 00000000..4ca40ca0 --- /dev/null +++ b/deployments/berachainbartio/solcInputs/9f400d4fd6f6fcf916824838bc678e25.json @@ -0,0 +1,139 @@ +{ + "language": "Solidity", + "sources": { + "@layerzerolabs/solidity-examples/contracts/libraries/BytesLib.sol": { + "content": "// SPDX-License-Identifier: Unlicense\n/*\n * @title Solidity Bytes Arrays Utils\n * @author Gonçalo Sá \n *\n * @dev Bytes tightly packed arrays utility library for ethereum contracts written in Solidity.\n * The library lets you concatenate, slice and type cast bytes arrays both in memory and storage.\n */\npragma solidity >=0.8.0 <0.9.0;\n\nlibrary BytesLib {\n function concat(bytes memory _preBytes, bytes memory _postBytes) internal pure returns (bytes memory) {\n bytes memory tempBytes;\n\n assembly {\n // Get a location of some free memory and store it in tempBytes as\n // Solidity does for memory variables.\n tempBytes := mload(0x40)\n\n // Store the length of the first bytes array at the beginning of\n // the memory for tempBytes.\n let length := mload(_preBytes)\n mstore(tempBytes, length)\n\n // Maintain a memory counter for the current write location in the\n // temp bytes array by adding the 32 bytes for the array length to\n // the starting location.\n let mc := add(tempBytes, 0x20)\n // Stop copying when the memory counter reaches the length of the\n // first bytes array.\n let end := add(mc, length)\n\n for {\n // Initialize a copy counter to the start of the _preBytes data,\n // 32 bytes into its memory.\n let cc := add(_preBytes, 0x20)\n } lt(mc, end) {\n // Increase both counters by 32 bytes each iteration.\n mc := add(mc, 0x20)\n cc := add(cc, 0x20)\n } {\n // Write the _preBytes data into the tempBytes memory 32 bytes\n // at a time.\n mstore(mc, mload(cc))\n }\n\n // Add the length of _postBytes to the current length of tempBytes\n // and store it as the new length in the first 32 bytes of the\n // tempBytes memory.\n length := mload(_postBytes)\n mstore(tempBytes, add(length, mload(tempBytes)))\n\n // Move the memory counter back from a multiple of 0x20 to the\n // actual end of the _preBytes data.\n mc := end\n // Stop copying when the memory counter reaches the new combined\n // length of the arrays.\n end := add(mc, length)\n\n for {\n let cc := add(_postBytes, 0x20)\n } lt(mc, end) {\n mc := add(mc, 0x20)\n cc := add(cc, 0x20)\n } {\n mstore(mc, mload(cc))\n }\n\n // Update the free-memory pointer by padding our last write location\n // to 32 bytes: add 31 bytes to the end of tempBytes to move to the\n // next 32 byte block, then round down to the nearest multiple of\n // 32. If the sum of the length of the two arrays is zero then add\n // one before rounding down to leave a blank 32 bytes (the length block with 0).\n mstore(\n 0x40,\n and(\n add(add(end, iszero(add(length, mload(_preBytes)))), 31),\n not(31) // Round down to the nearest 32 bytes.\n )\n )\n }\n\n return tempBytes;\n }\n\n function concatStorage(bytes storage _preBytes, bytes memory _postBytes) internal {\n assembly {\n // Read the first 32 bytes of _preBytes storage, which is the length\n // of the array. (We don't need to use the offset into the slot\n // because arrays use the entire slot.)\n let fslot := sload(_preBytes.slot)\n // Arrays of 31 bytes or less have an even value in their slot,\n // while longer arrays have an odd value. The actual length is\n // the slot divided by two for odd values, and the lowest order\n // byte divided by two for even values.\n // If the slot is even, bitwise and the slot with 255 and divide by\n // two to get the length. If the slot is odd, bitwise and the slot\n // with -1 and divide by two.\n let slength := div(and(fslot, sub(mul(0x100, iszero(and(fslot, 1))), 1)), 2)\n let mlength := mload(_postBytes)\n let newlength := add(slength, mlength)\n // slength can contain both the length and contents of the array\n // if length < 32 bytes so let's prepare for that\n // v. http://solidity.readthedocs.io/en/latest/miscellaneous.html#layout-of-state-variables-in-storage\n switch add(lt(slength, 32), lt(newlength, 32))\n case 2 {\n // Since the new array still fits in the slot, we just need to\n // update the contents of the slot.\n // uint256(bytes_storage) = uint256(bytes_storage) + uint256(bytes_memory) + new_length\n sstore(\n _preBytes.slot,\n // all the modifications to the slot are inside this\n // next block\n add(\n // we can just add to the slot contents because the\n // bytes we want to change are the LSBs\n fslot,\n add(\n mul(\n div(\n // load the bytes from memory\n mload(add(_postBytes, 0x20)),\n // zero all bytes to the right\n exp(0x100, sub(32, mlength))\n ),\n // and now shift left the number of bytes to\n // leave space for the length in the slot\n exp(0x100, sub(32, newlength))\n ),\n // increase length by the double of the memory\n // bytes length\n mul(mlength, 2)\n )\n )\n )\n }\n case 1 {\n // The stored value fits in the slot, but the combined value\n // will exceed it.\n // get the keccak hash to get the contents of the array\n mstore(0x0, _preBytes.slot)\n let sc := add(keccak256(0x0, 0x20), div(slength, 32))\n\n // save new length\n sstore(_preBytes.slot, add(mul(newlength, 2), 1))\n\n // The contents of the _postBytes array start 32 bytes into\n // the structure. Our first read should obtain the `submod`\n // bytes that can fit into the unused space in the last word\n // of the stored array. To get this, we read 32 bytes starting\n // from `submod`, so the data we read overlaps with the array\n // contents by `submod` bytes. Masking the lowest-order\n // `submod` bytes allows us to add that value directly to the\n // stored value.\n\n let submod := sub(32, slength)\n let mc := add(_postBytes, submod)\n let end := add(_postBytes, mlength)\n let mask := sub(exp(0x100, submod), 1)\n\n sstore(sc, add(and(fslot, 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00), and(mload(mc), mask)))\n\n for {\n mc := add(mc, 0x20)\n sc := add(sc, 1)\n } lt(mc, end) {\n sc := add(sc, 1)\n mc := add(mc, 0x20)\n } {\n sstore(sc, mload(mc))\n }\n\n mask := exp(0x100, sub(mc, end))\n\n sstore(sc, mul(div(mload(mc), mask), mask))\n }\n default {\n // get the keccak hash to get the contents of the array\n mstore(0x0, _preBytes.slot)\n // Start copying to the last used word of the stored array.\n let sc := add(keccak256(0x0, 0x20), div(slength, 32))\n\n // save new length\n sstore(_preBytes.slot, add(mul(newlength, 2), 1))\n\n // Copy over the first `submod` bytes of the new data as in\n // case 1 above.\n let slengthmod := mod(slength, 32)\n let mlengthmod := mod(mlength, 32)\n let submod := sub(32, slengthmod)\n let mc := add(_postBytes, submod)\n let end := add(_postBytes, mlength)\n let mask := sub(exp(0x100, submod), 1)\n\n sstore(sc, add(sload(sc), and(mload(mc), mask)))\n\n for {\n sc := add(sc, 1)\n mc := add(mc, 0x20)\n } lt(mc, end) {\n sc := add(sc, 1)\n mc := add(mc, 0x20)\n } {\n sstore(sc, mload(mc))\n }\n\n mask := exp(0x100, sub(mc, end))\n\n sstore(sc, mul(div(mload(mc), mask), mask))\n }\n }\n }\n\n function slice(\n bytes memory _bytes,\n uint _start,\n uint _length\n ) internal pure returns (bytes memory) {\n require(_length + 31 >= _length, \"slice_overflow\");\n require(_bytes.length >= _start + _length, \"slice_outOfBounds\");\n\n bytes memory tempBytes;\n\n assembly {\n switch iszero(_length)\n case 0 {\n // Get a location of some free memory and store it in tempBytes as\n // Solidity does for memory variables.\n tempBytes := mload(0x40)\n\n // The first word of the slice result is potentially a partial\n // word read from the original array. To read it, we calculate\n // the length of that partial word and start copying that many\n // bytes into the array. The first word we copy will start with\n // data we don't care about, but the last `lengthmod` bytes will\n // land at the beginning of the contents of the new array. When\n // we're done copying, we overwrite the full first word with\n // the actual length of the slice.\n let lengthmod := and(_length, 31)\n\n // The multiplication in the next line is necessary\n // because when slicing multiples of 32 bytes (lengthmod == 0)\n // the following copy loop was copying the origin's length\n // and then ending prematurely not copying everything it should.\n let mc := add(add(tempBytes, lengthmod), mul(0x20, iszero(lengthmod)))\n let end := add(mc, _length)\n\n for {\n // The multiplication in the next line has the same exact purpose\n // as the one above.\n let cc := add(add(add(_bytes, lengthmod), mul(0x20, iszero(lengthmod))), _start)\n } lt(mc, end) {\n mc := add(mc, 0x20)\n cc := add(cc, 0x20)\n } {\n mstore(mc, mload(cc))\n }\n\n mstore(tempBytes, _length)\n\n //update free-memory pointer\n //allocating the array padded to 32 bytes like the compiler does now\n mstore(0x40, and(add(mc, 31), not(31)))\n }\n //if we want a zero-length slice let's just return a zero-length array\n default {\n tempBytes := mload(0x40)\n //zero out the 32 bytes slice we are about to return\n //we need to do it because Solidity does not garbage collect\n mstore(tempBytes, 0)\n\n mstore(0x40, add(tempBytes, 0x20))\n }\n }\n\n return tempBytes;\n }\n\n function toAddress(bytes memory _bytes, uint _start) internal pure returns (address) {\n require(_bytes.length >= _start + 20, \"toAddress_outOfBounds\");\n address tempAddress;\n\n assembly {\n tempAddress := div(mload(add(add(_bytes, 0x20), _start)), 0x1000000000000000000000000)\n }\n\n return tempAddress;\n }\n\n function toUint8(bytes memory _bytes, uint _start) internal pure returns (uint8) {\n require(_bytes.length >= _start + 1, \"toUint8_outOfBounds\");\n uint8 tempUint;\n\n assembly {\n tempUint := mload(add(add(_bytes, 0x1), _start))\n }\n\n return tempUint;\n }\n\n function toUint16(bytes memory _bytes, uint _start) internal pure returns (uint16) {\n require(_bytes.length >= _start + 2, \"toUint16_outOfBounds\");\n uint16 tempUint;\n\n assembly {\n tempUint := mload(add(add(_bytes, 0x2), _start))\n }\n\n return tempUint;\n }\n\n function toUint32(bytes memory _bytes, uint _start) internal pure returns (uint32) {\n require(_bytes.length >= _start + 4, \"toUint32_outOfBounds\");\n uint32 tempUint;\n\n assembly {\n tempUint := mload(add(add(_bytes, 0x4), _start))\n }\n\n return tempUint;\n }\n\n function toUint64(bytes memory _bytes, uint _start) internal pure returns (uint64) {\n require(_bytes.length >= _start + 8, \"toUint64_outOfBounds\");\n uint64 tempUint;\n\n assembly {\n tempUint := mload(add(add(_bytes, 0x8), _start))\n }\n\n return tempUint;\n }\n\n function toUint96(bytes memory _bytes, uint _start) internal pure returns (uint96) {\n require(_bytes.length >= _start + 12, \"toUint96_outOfBounds\");\n uint96 tempUint;\n\n assembly {\n tempUint := mload(add(add(_bytes, 0xc), _start))\n }\n\n return tempUint;\n }\n\n function toUint128(bytes memory _bytes, uint _start) internal pure returns (uint128) {\n require(_bytes.length >= _start + 16, \"toUint128_outOfBounds\");\n uint128 tempUint;\n\n assembly {\n tempUint := mload(add(add(_bytes, 0x10), _start))\n }\n\n return tempUint;\n }\n\n function toUint256(bytes memory _bytes, uint _start) internal pure returns (uint) {\n require(_bytes.length >= _start + 32, \"toUint256_outOfBounds\");\n uint tempUint;\n\n assembly {\n tempUint := mload(add(add(_bytes, 0x20), _start))\n }\n\n return tempUint;\n }\n\n function toBytes32(bytes memory _bytes, uint _start) internal pure returns (bytes32) {\n require(_bytes.length >= _start + 32, \"toBytes32_outOfBounds\");\n bytes32 tempBytes32;\n\n assembly {\n tempBytes32 := mload(add(add(_bytes, 0x20), _start))\n }\n\n return tempBytes32;\n }\n\n function equal(bytes memory _preBytes, bytes memory _postBytes) internal pure returns (bool) {\n bool success = true;\n\n assembly {\n let length := mload(_preBytes)\n\n // if lengths don't match the arrays are not equal\n switch eq(length, mload(_postBytes))\n case 1 {\n // cb is a circuit breaker in the for loop since there's\n // no said feature for inline assembly loops\n // cb = 1 - don't breaker\n // cb = 0 - break\n let cb := 1\n\n let mc := add(_preBytes, 0x20)\n let end := add(mc, length)\n\n for {\n let cc := add(_postBytes, 0x20)\n // the next line is the loop condition:\n // while(uint256(mc < end) + cb == 2)\n } eq(add(lt(mc, end), cb), 2) {\n mc := add(mc, 0x20)\n cc := add(cc, 0x20)\n } {\n // if any of these checks fails then arrays are not equal\n if iszero(eq(mload(mc), mload(cc))) {\n // unsuccess:\n success := 0\n cb := 0\n }\n }\n }\n default {\n // unsuccess:\n success := 0\n }\n }\n\n return success;\n }\n\n function equalStorage(bytes storage _preBytes, bytes memory _postBytes) internal view returns (bool) {\n bool success = true;\n\n assembly {\n // we know _preBytes_offset is 0\n let fslot := sload(_preBytes.slot)\n // Decode the length of the stored array like in concatStorage().\n let slength := div(and(fslot, sub(mul(0x100, iszero(and(fslot, 1))), 1)), 2)\n let mlength := mload(_postBytes)\n\n // if lengths don't match the arrays are not equal\n switch eq(slength, mlength)\n case 1 {\n // slength can contain both the length and contents of the array\n // if length < 32 bytes so let's prepare for that\n // v. http://solidity.readthedocs.io/en/latest/miscellaneous.html#layout-of-state-variables-in-storage\n if iszero(iszero(slength)) {\n switch lt(slength, 32)\n case 1 {\n // blank the last byte which is the length\n fslot := mul(div(fslot, 0x100), 0x100)\n\n if iszero(eq(fslot, mload(add(_postBytes, 0x20)))) {\n // unsuccess:\n success := 0\n }\n }\n default {\n // cb is a circuit breaker in the for loop since there's\n // no said feature for inline assembly loops\n // cb = 1 - don't breaker\n // cb = 0 - break\n let cb := 1\n\n // get the keccak hash to get the contents of the array\n mstore(0x0, _preBytes.slot)\n let sc := keccak256(0x0, 0x20)\n\n let mc := add(_postBytes, 0x20)\n let end := add(mc, mlength)\n\n // the next line is the loop condition:\n // while(uint256(mc < end) + cb == 2)\n for {\n\n } eq(add(lt(mc, end), cb), 2) {\n sc := add(sc, 1)\n mc := add(mc, 0x20)\n } {\n if iszero(eq(sload(sc), mload(mc))) {\n // unsuccess:\n success := 0\n cb := 0\n }\n }\n }\n }\n }\n default {\n // unsuccess:\n success := 0\n }\n }\n\n return success;\n }\n}\n" + }, + "@layerzerolabs/solidity-examples/contracts/libraries/ExcessivelySafeCall.sol": { + "content": "// SPDX-License-Identifier: MIT OR Apache-2.0\npragma solidity >=0.7.6;\n\nlibrary ExcessivelySafeCall {\n uint constant LOW_28_MASK = 0x00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff;\n\n /// @notice Use when you _really_ really _really_ don't trust the called\n /// contract. This prevents the called contract from causing reversion of\n /// the caller in as many ways as we can.\n /// @dev The main difference between this and a solidity low-level call is\n /// that we limit the number of bytes that the callee can cause to be\n /// copied to caller memory. This prevents stupid things like malicious\n /// contracts returning 10,000,000 bytes causing a local OOG when copying\n /// to memory.\n /// @param _target The address to call\n /// @param _gas The amount of gas to forward to the remote contract\n /// @param _maxCopy The maximum number of bytes of returndata to copy\n /// to memory.\n /// @param _calldata The data to send to the remote contract\n /// @return success and returndata, as `.call()`. Returndata is capped to\n /// `_maxCopy` bytes.\n function excessivelySafeCall(\n address _target,\n uint _gas,\n uint16 _maxCopy,\n bytes memory _calldata\n ) internal returns (bool, bytes memory) {\n // set up for assembly call\n uint _toCopy;\n bool _success;\n bytes memory _returnData = new bytes(_maxCopy);\n // dispatch message to recipient\n // by assembly calling \"handle\" function\n // we call via assembly to avoid memcopying a very large returndata\n // returned by a malicious contract\n assembly {\n _success := call(\n _gas, // gas\n _target, // recipient\n 0, // ether value\n add(_calldata, 0x20), // inloc\n mload(_calldata), // inlen\n 0, // outloc\n 0 // outlen\n )\n // limit our copy to 256 bytes\n _toCopy := returndatasize()\n if gt(_toCopy, _maxCopy) {\n _toCopy := _maxCopy\n }\n // Store the length of the copied bytes\n mstore(_returnData, _toCopy)\n // copy the bytes from returndata[0:_toCopy]\n returndatacopy(add(_returnData, 0x20), 0, _toCopy)\n }\n return (_success, _returnData);\n }\n\n /// @notice Use when you _really_ really _really_ don't trust the called\n /// contract. This prevents the called contract from causing reversion of\n /// the caller in as many ways as we can.\n /// @dev The main difference between this and a solidity low-level call is\n /// that we limit the number of bytes that the callee can cause to be\n /// copied to caller memory. This prevents stupid things like malicious\n /// contracts returning 10,000,000 bytes causing a local OOG when copying\n /// to memory.\n /// @param _target The address to call\n /// @param _gas The amount of gas to forward to the remote contract\n /// @param _maxCopy The maximum number of bytes of returndata to copy\n /// to memory.\n /// @param _calldata The data to send to the remote contract\n /// @return success and returndata, as `.call()`. Returndata is capped to\n /// `_maxCopy` bytes.\n function excessivelySafeStaticCall(\n address _target,\n uint _gas,\n uint16 _maxCopy,\n bytes memory _calldata\n ) internal view returns (bool, bytes memory) {\n // set up for assembly call\n uint _toCopy;\n bool _success;\n bytes memory _returnData = new bytes(_maxCopy);\n // dispatch message to recipient\n // by assembly calling \"handle\" function\n // we call via assembly to avoid memcopying a very large returndata\n // returned by a malicious contract\n assembly {\n _success := staticcall(\n _gas, // gas\n _target, // recipient\n add(_calldata, 0x20), // inloc\n mload(_calldata), // inlen\n 0, // outloc\n 0 // outlen\n )\n // limit our copy to 256 bytes\n _toCopy := returndatasize()\n if gt(_toCopy, _maxCopy) {\n _toCopy := _maxCopy\n }\n // Store the length of the copied bytes\n mstore(_returnData, _toCopy)\n // copy the bytes from returndata[0:_toCopy]\n returndatacopy(add(_returnData, 0x20), 0, _toCopy)\n }\n return (_success, _returnData);\n }\n\n /**\n * @notice Swaps function selectors in encoded contract calls\n * @dev Allows reuse of encoded calldata for functions with identical\n * argument types but different names. It simply swaps out the first 4 bytes\n * for the new selector. This function modifies memory in place, and should\n * only be used with caution.\n * @param _newSelector The new 4-byte selector\n * @param _buf The encoded contract args\n */\n function swapSelector(bytes4 _newSelector, bytes memory _buf) internal pure {\n require(_buf.length >= 4);\n uint _mask = LOW_28_MASK;\n assembly {\n // load the first word of\n let _word := mload(add(_buf, 0x20))\n // mask out the top 4 bytes\n // /x\n _word := and(_word, _mask)\n _word := or(_newSelector, _word)\n mstore(add(_buf, 0x20), _word)\n }\n }\n}\n" + }, + "@layerzerolabs/solidity-examples/contracts/lzApp/interfaces/ILayerZeroEndpoint.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.5.0;\n\nimport \"./ILayerZeroUserApplicationConfig.sol\";\n\ninterface ILayerZeroEndpoint is ILayerZeroUserApplicationConfig {\n // @notice send a LayerZero message to the specified address at a LayerZero endpoint.\n // @param _dstChainId - the destination chain identifier\n // @param _destination - the address on destination chain (in bytes). address length/format may vary by chains\n // @param _payload - a custom bytes payload to send to the destination contract\n // @param _refundAddress - if the source transaction is cheaper than the amount of value passed, refund the additional amount to this address\n // @param _zroPaymentAddress - the address of the ZRO token holder who would pay for the transaction\n // @param _adapterParams - parameters for custom functionality. e.g. receive airdropped native gas from the relayer on destination\n function send(\n uint16 _dstChainId,\n bytes calldata _destination,\n bytes calldata _payload,\n address payable _refundAddress,\n address _zroPaymentAddress,\n bytes calldata _adapterParams\n ) external payable;\n\n // @notice used by the messaging library to publish verified payload\n // @param _srcChainId - the source chain identifier\n // @param _srcAddress - the source contract (as bytes) at the source chain\n // @param _dstAddress - the address on destination chain\n // @param _nonce - the unbound message ordering nonce\n // @param _gasLimit - the gas limit for external contract execution\n // @param _payload - verified payload to send to the destination contract\n function receivePayload(\n uint16 _srcChainId,\n bytes calldata _srcAddress,\n address _dstAddress,\n uint64 _nonce,\n uint _gasLimit,\n bytes calldata _payload\n ) external;\n\n // @notice get the inboundNonce of a lzApp from a source chain which could be EVM or non-EVM chain\n // @param _srcChainId - the source chain identifier\n // @param _srcAddress - the source chain contract address\n function getInboundNonce(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (uint64);\n\n // @notice get the outboundNonce from this source chain which, consequently, is always an EVM\n // @param _srcAddress - the source chain contract address\n function getOutboundNonce(uint16 _dstChainId, address _srcAddress) external view returns (uint64);\n\n // @notice gets a quote in source native gas, for the amount that send() requires to pay for message delivery\n // @param _dstChainId - the destination chain identifier\n // @param _userApplication - the user app address on this EVM chain\n // @param _payload - the custom message to send over LayerZero\n // @param _payInZRO - if false, user app pays the protocol fee in native token\n // @param _adapterParam - parameters for the adapter service, e.g. send some dust native token to dstChain\n function estimateFees(\n uint16 _dstChainId,\n address _userApplication,\n bytes calldata _payload,\n bool _payInZRO,\n bytes calldata _adapterParam\n ) external view returns (uint nativeFee, uint zroFee);\n\n // @notice get this Endpoint's immutable source identifier\n function getChainId() external view returns (uint16);\n\n // @notice the interface to retry failed message on this Endpoint destination\n // @param _srcChainId - the source chain identifier\n // @param _srcAddress - the source chain contract address\n // @param _payload - the payload to be retried\n function retryPayload(\n uint16 _srcChainId,\n bytes calldata _srcAddress,\n bytes calldata _payload\n ) external;\n\n // @notice query if any STORED payload (message blocking) at the endpoint.\n // @param _srcChainId - the source chain identifier\n // @param _srcAddress - the source chain contract address\n function hasStoredPayload(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (bool);\n\n // @notice query if the _libraryAddress is valid for sending msgs.\n // @param _userApplication - the user app address on this EVM chain\n function getSendLibraryAddress(address _userApplication) external view returns (address);\n\n // @notice query if the _libraryAddress is valid for receiving msgs.\n // @param _userApplication - the user app address on this EVM chain\n function getReceiveLibraryAddress(address _userApplication) external view returns (address);\n\n // @notice query if the non-reentrancy guard for send() is on\n // @return true if the guard is on. false otherwise\n function isSendingPayload() external view returns (bool);\n\n // @notice query if the non-reentrancy guard for receive() is on\n // @return true if the guard is on. false otherwise\n function isReceivingPayload() external view returns (bool);\n\n // @notice get the configuration of the LayerZero messaging library of the specified version\n // @param _version - messaging library version\n // @param _chainId - the chainId for the pending config change\n // @param _userApplication - the contract address of the user application\n // @param _configType - type of configuration. every messaging library has its own convention.\n function getConfig(\n uint16 _version,\n uint16 _chainId,\n address _userApplication,\n uint _configType\n ) external view returns (bytes memory);\n\n // @notice get the send() LayerZero messaging library version\n // @param _userApplication - the contract address of the user application\n function getSendVersion(address _userApplication) external view returns (uint16);\n\n // @notice get the lzReceive() LayerZero messaging library version\n // @param _userApplication - the contract address of the user application\n function getReceiveVersion(address _userApplication) external view returns (uint16);\n}\n" + }, + "@layerzerolabs/solidity-examples/contracts/lzApp/interfaces/ILayerZeroReceiver.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.5.0;\n\ninterface ILayerZeroReceiver {\n // @notice LayerZero endpoint will invoke this function to deliver the message on the destination\n // @param _srcChainId - the source endpoint identifier\n // @param _srcAddress - the source sending contract address from the source chain\n // @param _nonce - the ordered message nonce\n // @param _payload - the signed payload is the UA bytes has encoded to be sent\n function lzReceive(\n uint16 _srcChainId,\n bytes calldata _srcAddress,\n uint64 _nonce,\n bytes calldata _payload\n ) external;\n}\n" + }, + "@layerzerolabs/solidity-examples/contracts/lzApp/interfaces/ILayerZeroUserApplicationConfig.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.5.0;\n\ninterface ILayerZeroUserApplicationConfig {\n // @notice set the configuration of the LayerZero messaging library of the specified version\n // @param _version - messaging library version\n // @param _chainId - the chainId for the pending config change\n // @param _configType - type of configuration. every messaging library has its own convention.\n // @param _config - configuration in the bytes. can encode arbitrary content.\n function setConfig(\n uint16 _version,\n uint16 _chainId,\n uint _configType,\n bytes calldata _config\n ) external;\n\n // @notice set the send() LayerZero messaging library version to _version\n // @param _version - new messaging library version\n function setSendVersion(uint16 _version) external;\n\n // @notice set the lzReceive() LayerZero messaging library version to _version\n // @param _version - new messaging library version\n function setReceiveVersion(uint16 _version) external;\n\n // @notice Only when the UA needs to resume the message flow in blocking mode and clear the stored payload\n // @param _srcChainId - the chainId of the source chain\n // @param _srcAddress - the contract address of the source contract at the source chain\n function forceResumeReceive(uint16 _srcChainId, bytes calldata _srcAddress) external;\n}\n" + }, + "@layerzerolabs/solidity-examples/contracts/lzApp/libs/LzLib.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity >=0.6.0;\npragma experimental ABIEncoderV2;\n\nlibrary LzLib {\n // LayerZero communication\n struct CallParams {\n address payable refundAddress;\n address zroPaymentAddress;\n }\n\n //---------------------------------------------------------------------------\n // Address type handling\n\n struct AirdropParams {\n uint airdropAmount;\n bytes32 airdropAddress;\n }\n\n function buildAdapterParams(LzLib.AirdropParams memory _airdropParams, uint _uaGasLimit) internal pure returns (bytes memory adapterParams) {\n if (_airdropParams.airdropAmount == 0 && _airdropParams.airdropAddress == bytes32(0x0)) {\n adapterParams = buildDefaultAdapterParams(_uaGasLimit);\n } else {\n adapterParams = buildAirdropAdapterParams(_uaGasLimit, _airdropParams);\n }\n }\n\n // Build Adapter Params\n function buildDefaultAdapterParams(uint _uaGas) internal pure returns (bytes memory) {\n // txType 1\n // bytes [2 32 ]\n // fields [txType extraGas]\n return abi.encodePacked(uint16(1), _uaGas);\n }\n\n function buildAirdropAdapterParams(uint _uaGas, AirdropParams memory _params) internal pure returns (bytes memory) {\n require(_params.airdropAmount > 0, \"Airdrop amount must be greater than 0\");\n require(_params.airdropAddress != bytes32(0x0), \"Airdrop address must be set\");\n\n // txType 2\n // bytes [2 32 32 bytes[] ]\n // fields [txType extraGas dstNativeAmt dstNativeAddress]\n return abi.encodePacked(uint16(2), _uaGas, _params.airdropAmount, _params.airdropAddress);\n }\n\n function getGasLimit(bytes memory _adapterParams) internal pure returns (uint gasLimit) {\n require(_adapterParams.length == 34 || _adapterParams.length > 66, \"Invalid adapterParams\");\n assembly {\n gasLimit := mload(add(_adapterParams, 34))\n }\n }\n\n // Decode Adapter Params\n function decodeAdapterParams(bytes memory _adapterParams)\n internal\n pure\n returns (\n uint16 txType,\n uint uaGas,\n uint airdropAmount,\n address payable airdropAddress\n )\n {\n require(_adapterParams.length == 34 || _adapterParams.length > 66, \"Invalid adapterParams\");\n assembly {\n txType := mload(add(_adapterParams, 2))\n uaGas := mload(add(_adapterParams, 34))\n }\n require(txType == 1 || txType == 2, \"Unsupported txType\");\n require(uaGas > 0, \"Gas too low\");\n\n if (txType == 2) {\n assembly {\n airdropAmount := mload(add(_adapterParams, 66))\n airdropAddress := mload(add(_adapterParams, 86))\n }\n }\n }\n\n //---------------------------------------------------------------------------\n // Address type handling\n function bytes32ToAddress(bytes32 _bytes32Address) internal pure returns (address _address) {\n return address(uint160(uint(_bytes32Address)));\n }\n\n function addressToBytes32(address _address) internal pure returns (bytes32 _bytes32Address) {\n return bytes32(uint(uint160(_address)));\n }\n}\n" + }, + "@layerzerolabs/solidity-examples/contracts/lzApp/LzApp.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\nimport \"./interfaces/ILayerZeroReceiver.sol\";\nimport \"./interfaces/ILayerZeroUserApplicationConfig.sol\";\nimport \"./interfaces/ILayerZeroEndpoint.sol\";\nimport \"../libraries/BytesLib.sol\";\n\n/*\n * a generic LzReceiver implementation\n */\nabstract contract LzApp is Ownable, ILayerZeroReceiver, ILayerZeroUserApplicationConfig {\n using BytesLib for bytes;\n\n // ua can not send payload larger than this by default, but it can be changed by the ua owner\n uint public constant DEFAULT_PAYLOAD_SIZE_LIMIT = 10000;\n\n ILayerZeroEndpoint public immutable lzEndpoint;\n mapping(uint16 => bytes) public trustedRemoteLookup;\n mapping(uint16 => mapping(uint16 => uint)) public minDstGasLookup;\n mapping(uint16 => uint) public payloadSizeLimitLookup;\n address public precrime;\n\n event SetPrecrime(address precrime);\n event SetTrustedRemote(uint16 _remoteChainId, bytes _path);\n event SetTrustedRemoteAddress(uint16 _remoteChainId, bytes _remoteAddress);\n event SetMinDstGas(uint16 _dstChainId, uint16 _type, uint _minDstGas);\n\n constructor(address _endpoint) {\n lzEndpoint = ILayerZeroEndpoint(_endpoint);\n }\n\n function lzReceive(\n uint16 _srcChainId,\n bytes calldata _srcAddress,\n uint64 _nonce,\n bytes calldata _payload\n ) public virtual override {\n // lzReceive must be called by the endpoint for security\n require(_msgSender() == address(lzEndpoint), \"LzApp: invalid endpoint caller\");\n\n bytes memory trustedRemote = trustedRemoteLookup[_srcChainId];\n // if will still block the message pathway from (srcChainId, srcAddress). should not receive message from untrusted remote.\n require(\n _srcAddress.length == trustedRemote.length && trustedRemote.length > 0 && keccak256(_srcAddress) == keccak256(trustedRemote),\n \"LzApp: invalid source sending contract\"\n );\n\n _blockingLzReceive(_srcChainId, _srcAddress, _nonce, _payload);\n }\n\n // abstract function - the default behaviour of LayerZero is blocking. See: NonblockingLzApp if you dont need to enforce ordered messaging\n function _blockingLzReceive(\n uint16 _srcChainId,\n bytes memory _srcAddress,\n uint64 _nonce,\n bytes memory _payload\n ) internal virtual;\n\n function _lzSend(\n uint16 _dstChainId,\n bytes memory _payload,\n address payable _refundAddress,\n address _zroPaymentAddress,\n bytes memory _adapterParams,\n uint _nativeFee\n ) internal virtual {\n bytes memory trustedRemote = trustedRemoteLookup[_dstChainId];\n require(trustedRemote.length != 0, \"LzApp: destination chain is not a trusted source\");\n _checkPayloadSize(_dstChainId, _payload.length);\n lzEndpoint.send{value: _nativeFee}(_dstChainId, trustedRemote, _payload, _refundAddress, _zroPaymentAddress, _adapterParams);\n }\n\n function _checkGasLimit(\n uint16 _dstChainId,\n uint16 _type,\n bytes memory _adapterParams,\n uint _extraGas\n ) internal view virtual {\n uint providedGasLimit = _getGasLimit(_adapterParams);\n uint minGasLimit = minDstGasLookup[_dstChainId][_type];\n require(minGasLimit > 0, \"LzApp: minGasLimit not set\");\n require(providedGasLimit >= minGasLimit + _extraGas, \"LzApp: gas limit is too low\");\n }\n\n function _getGasLimit(bytes memory _adapterParams) internal pure virtual returns (uint gasLimit) {\n require(_adapterParams.length >= 34, \"LzApp: invalid adapterParams\");\n assembly {\n gasLimit := mload(add(_adapterParams, 34))\n }\n }\n\n function _checkPayloadSize(uint16 _dstChainId, uint _payloadSize) internal view virtual {\n uint payloadSizeLimit = payloadSizeLimitLookup[_dstChainId];\n if (payloadSizeLimit == 0) {\n // use default if not set\n payloadSizeLimit = DEFAULT_PAYLOAD_SIZE_LIMIT;\n }\n require(_payloadSize <= payloadSizeLimit, \"LzApp: payload size is too large\");\n }\n\n //---------------------------UserApplication config----------------------------------------\n function getConfig(\n uint16 _version,\n uint16 _chainId,\n address,\n uint _configType\n ) external view returns (bytes memory) {\n return lzEndpoint.getConfig(_version, _chainId, address(this), _configType);\n }\n\n // generic config for LayerZero user Application\n function setConfig(\n uint16 _version,\n uint16 _chainId,\n uint _configType,\n bytes calldata _config\n ) external override onlyOwner {\n lzEndpoint.setConfig(_version, _chainId, _configType, _config);\n }\n\n function setSendVersion(uint16 _version) external override onlyOwner {\n lzEndpoint.setSendVersion(_version);\n }\n\n function setReceiveVersion(uint16 _version) external override onlyOwner {\n lzEndpoint.setReceiveVersion(_version);\n }\n\n function forceResumeReceive(uint16 _srcChainId, bytes calldata _srcAddress) external override onlyOwner {\n lzEndpoint.forceResumeReceive(_srcChainId, _srcAddress);\n }\n\n // _path = abi.encodePacked(remoteAddress, localAddress)\n // this function set the trusted path for the cross-chain communication\n function setTrustedRemote(uint16 _remoteChainId, bytes calldata _path) external onlyOwner {\n trustedRemoteLookup[_remoteChainId] = _path;\n emit SetTrustedRemote(_remoteChainId, _path);\n }\n\n function setTrustedRemoteAddress(uint16 _remoteChainId, bytes calldata _remoteAddress) external onlyOwner {\n trustedRemoteLookup[_remoteChainId] = abi.encodePacked(_remoteAddress, address(this));\n emit SetTrustedRemoteAddress(_remoteChainId, _remoteAddress);\n }\n\n function getTrustedRemoteAddress(uint16 _remoteChainId) external view returns (bytes memory) {\n bytes memory path = trustedRemoteLookup[_remoteChainId];\n require(path.length != 0, \"LzApp: no trusted path record\");\n return path.slice(0, path.length - 20); // the last 20 bytes should be address(this)\n }\n\n function setPrecrime(address _precrime) external onlyOwner {\n precrime = _precrime;\n emit SetPrecrime(_precrime);\n }\n\n function setMinDstGas(\n uint16 _dstChainId,\n uint16 _packetType,\n uint _minGas\n ) external onlyOwner {\n minDstGasLookup[_dstChainId][_packetType] = _minGas;\n emit SetMinDstGas(_dstChainId, _packetType, _minGas);\n }\n\n // if the size is 0, it means default size limit\n function setPayloadSizeLimit(uint16 _dstChainId, uint _size) external onlyOwner {\n payloadSizeLimitLookup[_dstChainId] = _size;\n }\n\n //--------------------------- VIEW FUNCTION ----------------------------------------\n function isTrustedRemote(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (bool) {\n bytes memory trustedSource = trustedRemoteLookup[_srcChainId];\n return keccak256(trustedSource) == keccak256(_srcAddress);\n }\n}\n" + }, + "@layerzerolabs/solidity-examples/contracts/lzApp/mocks/LZEndpointMock.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity ^0.8.0;\npragma abicoder v2;\n\nimport \"../interfaces/ILayerZeroReceiver.sol\";\nimport \"../interfaces/ILayerZeroEndpoint.sol\";\nimport \"../libs/LzLib.sol\";\n\n/*\nlike a real LayerZero endpoint but can be mocked, which handle message transmission, verification, and receipt.\n- blocking: LayerZero provides ordered delivery of messages from a given sender to a destination chain.\n- non-reentrancy: endpoint has a non-reentrancy guard for both the send() and receive(), respectively.\n- adapter parameters: allows UAs to add arbitrary transaction params in the send() function, like airdrop on destination chain.\nunlike a real LayerZero endpoint, it is\n- no messaging library versioning\n- send() will short circuit to lzReceive()\n- no user application configuration\n*/\ncontract LZEndpointMock is ILayerZeroEndpoint {\n uint8 internal constant _NOT_ENTERED = 1;\n uint8 internal constant _ENTERED = 2;\n\n mapping(address => address) public lzEndpointLookup;\n\n uint16 public mockChainId;\n bool public nextMsgBlocked;\n\n // fee config\n RelayerFeeConfig public relayerFeeConfig;\n ProtocolFeeConfig public protocolFeeConfig;\n uint public oracleFee;\n bytes public defaultAdapterParams;\n\n // path = remote addrss + local address\n // inboundNonce = [srcChainId][path].\n mapping(uint16 => mapping(bytes => uint64)) public inboundNonce;\n //todo: this is a hack\n // outboundNonce = [dstChainId][srcAddress]\n mapping(uint16 => mapping(address => uint64)) public outboundNonce;\n // // outboundNonce = [dstChainId][path].\n // mapping(uint16 => mapping(bytes => uint64)) public outboundNonce;\n // storedPayload = [srcChainId][path]\n mapping(uint16 => mapping(bytes => StoredPayload)) public storedPayload;\n // msgToDeliver = [srcChainId][path]\n mapping(uint16 => mapping(bytes => QueuedPayload[])) public msgsToDeliver;\n\n // reentrancy guard\n uint8 internal _send_entered_state = 1;\n uint8 internal _receive_entered_state = 1;\n\n struct ProtocolFeeConfig {\n uint zroFee;\n uint nativeBP;\n }\n\n struct RelayerFeeConfig {\n uint128 dstPriceRatio; // 10^10\n uint128 dstGasPriceInWei;\n uint128 dstNativeAmtCap;\n uint64 baseGas;\n uint64 gasPerByte;\n }\n\n struct StoredPayload {\n uint64 payloadLength;\n address dstAddress;\n bytes32 payloadHash;\n }\n\n struct QueuedPayload {\n address dstAddress;\n uint64 nonce;\n bytes payload;\n }\n\n modifier sendNonReentrant() {\n require(_send_entered_state == _NOT_ENTERED, \"LayerZeroMock: no send reentrancy\");\n _send_entered_state = _ENTERED;\n _;\n _send_entered_state = _NOT_ENTERED;\n }\n\n modifier receiveNonReentrant() {\n require(_receive_entered_state == _NOT_ENTERED, \"LayerZeroMock: no receive reentrancy\");\n _receive_entered_state = _ENTERED;\n _;\n _receive_entered_state = _NOT_ENTERED;\n }\n\n event UaForceResumeReceive(uint16 chainId, bytes srcAddress);\n event PayloadCleared(uint16 srcChainId, bytes srcAddress, uint64 nonce, address dstAddress);\n event PayloadStored(uint16 srcChainId, bytes srcAddress, address dstAddress, uint64 nonce, bytes payload, bytes reason);\n event ValueTransferFailed(address indexed to, uint indexed quantity);\n\n constructor(uint16 _chainId) {\n mockChainId = _chainId;\n\n // init config\n relayerFeeConfig = RelayerFeeConfig({\n dstPriceRatio: 1e10, // 1:1, same chain, same native coin\n dstGasPriceInWei: 1e10,\n dstNativeAmtCap: 1e19,\n baseGas: 100,\n gasPerByte: 1\n });\n protocolFeeConfig = ProtocolFeeConfig({zroFee: 1e18, nativeBP: 1000}); // BP 0.1\n oracleFee = 1e16;\n defaultAdapterParams = LzLib.buildDefaultAdapterParams(200000);\n }\n\n // ------------------------------ ILayerZeroEndpoint Functions ------------------------------\n function send(\n uint16 _chainId,\n bytes memory _path,\n bytes calldata _payload,\n address payable _refundAddress,\n address _zroPaymentAddress,\n bytes memory _adapterParams\n ) external payable override sendNonReentrant {\n require(_path.length == 40, \"LayerZeroMock: incorrect remote address size\"); // only support evm chains\n\n address dstAddr;\n assembly {\n dstAddr := mload(add(_path, 20))\n }\n\n address lzEndpoint = lzEndpointLookup[dstAddr];\n require(lzEndpoint != address(0), \"LayerZeroMock: destination LayerZero Endpoint not found\");\n\n // not handle zro token\n bytes memory adapterParams = _adapterParams.length > 0 ? _adapterParams : defaultAdapterParams;\n (uint nativeFee, ) = estimateFees(_chainId, msg.sender, _payload, _zroPaymentAddress != address(0x0), adapterParams);\n require(msg.value >= nativeFee, \"LayerZeroMock: not enough native for fees\");\n\n uint64 nonce = ++outboundNonce[_chainId][msg.sender];\n\n // refund if they send too much\n uint amount = msg.value - nativeFee;\n if (amount > 0) {\n (bool success, ) = _refundAddress.call{value: amount}(\"\");\n require(success, \"LayerZeroMock: failed to refund\");\n }\n\n // Mock the process of receiving msg on dst chain\n // Mock the relayer paying the dstNativeAddr the amount of extra native token\n (, uint extraGas, uint dstNativeAmt, address payable dstNativeAddr) = LzLib.decodeAdapterParams(adapterParams);\n if (dstNativeAmt > 0) {\n (bool success, ) = dstNativeAddr.call{value: dstNativeAmt}(\"\");\n if (!success) {\n emit ValueTransferFailed(dstNativeAddr, dstNativeAmt);\n }\n }\n\n bytes memory srcUaAddress = abi.encodePacked(msg.sender, dstAddr); // cast this address to bytes\n bytes memory payload = _payload;\n LZEndpointMock(lzEndpoint).receivePayload(mockChainId, srcUaAddress, dstAddr, nonce, extraGas, payload);\n }\n\n function receivePayload(\n uint16 _srcChainId,\n bytes calldata _path,\n address _dstAddress,\n uint64 _nonce,\n uint _gasLimit,\n bytes calldata _payload\n ) external override receiveNonReentrant {\n StoredPayload storage sp = storedPayload[_srcChainId][_path];\n\n // assert and increment the nonce. no message shuffling\n require(_nonce == ++inboundNonce[_srcChainId][_path], \"LayerZeroMock: wrong nonce\");\n\n // queue the following msgs inside of a stack to simulate a successful send on src, but not fully delivered on dst\n if (sp.payloadHash != bytes32(0)) {\n QueuedPayload[] storage msgs = msgsToDeliver[_srcChainId][_path];\n QueuedPayload memory newMsg = QueuedPayload(_dstAddress, _nonce, _payload);\n\n // warning, might run into gas issues trying to forward through a bunch of queued msgs\n // shift all the msgs over so we can treat this like a fifo via array.pop()\n if (msgs.length > 0) {\n // extend the array\n msgs.push(newMsg);\n\n // shift all the indexes up for pop()\n for (uint i = 0; i < msgs.length - 1; i++) {\n msgs[i + 1] = msgs[i];\n }\n\n // put the newMsg at the bottom of the stack\n msgs[0] = newMsg;\n } else {\n msgs.push(newMsg);\n }\n } else if (nextMsgBlocked) {\n storedPayload[_srcChainId][_path] = StoredPayload(uint64(_payload.length), _dstAddress, keccak256(_payload));\n emit PayloadStored(_srcChainId, _path, _dstAddress, _nonce, _payload, bytes(\"\"));\n // ensure the next msgs that go through are no longer blocked\n nextMsgBlocked = false;\n } else {\n try ILayerZeroReceiver(_dstAddress).lzReceive{gas: _gasLimit}(_srcChainId, _path, _nonce, _payload) {} catch (bytes memory reason) {\n storedPayload[_srcChainId][_path] = StoredPayload(uint64(_payload.length), _dstAddress, keccak256(_payload));\n emit PayloadStored(_srcChainId, _path, _dstAddress, _nonce, _payload, reason);\n // ensure the next msgs that go through are no longer blocked\n nextMsgBlocked = false;\n }\n }\n }\n\n function getInboundNonce(uint16 _chainID, bytes calldata _path) external view override returns (uint64) {\n return inboundNonce[_chainID][_path];\n }\n\n function getOutboundNonce(uint16 _chainID, address _srcAddress) external view override returns (uint64) {\n return outboundNonce[_chainID][_srcAddress];\n }\n\n function estimateFees(\n uint16 _dstChainId,\n address _userApplication,\n bytes memory _payload,\n bool _payInZRO,\n bytes memory _adapterParams\n ) public view override returns (uint nativeFee, uint zroFee) {\n bytes memory adapterParams = _adapterParams.length > 0 ? _adapterParams : defaultAdapterParams;\n\n // Relayer Fee\n uint relayerFee = _getRelayerFee(_dstChainId, 1, _userApplication, _payload.length, adapterParams);\n\n // LayerZero Fee\n uint protocolFee = _getProtocolFees(_payInZRO, relayerFee, oracleFee);\n _payInZRO ? zroFee = protocolFee : nativeFee = protocolFee;\n\n // return the sum of fees\n nativeFee = nativeFee + relayerFee + oracleFee;\n }\n\n function getChainId() external view override returns (uint16) {\n return mockChainId;\n }\n\n function retryPayload(\n uint16 _srcChainId,\n bytes calldata _path,\n bytes calldata _payload\n ) external override {\n StoredPayload storage sp = storedPayload[_srcChainId][_path];\n require(sp.payloadHash != bytes32(0), \"LayerZeroMock: no stored payload\");\n require(_payload.length == sp.payloadLength && keccak256(_payload) == sp.payloadHash, \"LayerZeroMock: invalid payload\");\n\n address dstAddress = sp.dstAddress;\n // empty the storedPayload\n sp.payloadLength = 0;\n sp.dstAddress = address(0);\n sp.payloadHash = bytes32(0);\n\n uint64 nonce = inboundNonce[_srcChainId][_path];\n\n ILayerZeroReceiver(dstAddress).lzReceive(_srcChainId, _path, nonce, _payload);\n emit PayloadCleared(_srcChainId, _path, nonce, dstAddress);\n }\n\n function hasStoredPayload(uint16 _srcChainId, bytes calldata _path) external view override returns (bool) {\n StoredPayload storage sp = storedPayload[_srcChainId][_path];\n return sp.payloadHash != bytes32(0);\n }\n\n function getSendLibraryAddress(address) external view override returns (address) {\n return address(this);\n }\n\n function getReceiveLibraryAddress(address) external view override returns (address) {\n return address(this);\n }\n\n function isSendingPayload() external view override returns (bool) {\n return _send_entered_state == _ENTERED;\n }\n\n function isReceivingPayload() external view override returns (bool) {\n return _receive_entered_state == _ENTERED;\n }\n\n function getConfig(\n uint16, /*_version*/\n uint16, /*_chainId*/\n address, /*_ua*/\n uint /*_configType*/\n ) external pure override returns (bytes memory) {\n return \"\";\n }\n\n function getSendVersion(\n address /*_userApplication*/\n ) external pure override returns (uint16) {\n return 1;\n }\n\n function getReceiveVersion(\n address /*_userApplication*/\n ) external pure override returns (uint16) {\n return 1;\n }\n\n function setConfig(\n uint16, /*_version*/\n uint16, /*_chainId*/\n uint, /*_configType*/\n bytes memory /*_config*/\n ) external override {}\n\n function setSendVersion(\n uint16 /*version*/\n ) external override {}\n\n function setReceiveVersion(\n uint16 /*version*/\n ) external override {}\n\n function forceResumeReceive(uint16 _srcChainId, bytes calldata _path) external override {\n StoredPayload storage sp = storedPayload[_srcChainId][_path];\n // revert if no messages are cached. safeguard malicious UA behaviour\n require(sp.payloadHash != bytes32(0), \"LayerZeroMock: no stored payload\");\n require(sp.dstAddress == msg.sender, \"LayerZeroMock: invalid caller\");\n\n // empty the storedPayload\n sp.payloadLength = 0;\n sp.dstAddress = address(0);\n sp.payloadHash = bytes32(0);\n\n emit UaForceResumeReceive(_srcChainId, _path);\n\n // resume the receiving of msgs after we force clear the \"stuck\" msg\n _clearMsgQue(_srcChainId, _path);\n }\n\n // ------------------------------ Other Public/External Functions --------------------------------------------------\n\n function getLengthOfQueue(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (uint) {\n return msgsToDeliver[_srcChainId][_srcAddress].length;\n }\n\n // used to simulate messages received get stored as a payload\n function blockNextMsg() external {\n nextMsgBlocked = true;\n }\n\n function setDestLzEndpoint(address destAddr, address lzEndpointAddr) external {\n lzEndpointLookup[destAddr] = lzEndpointAddr;\n }\n\n function setRelayerPrice(\n uint128 _dstPriceRatio,\n uint128 _dstGasPriceInWei,\n uint128 _dstNativeAmtCap,\n uint64 _baseGas,\n uint64 _gasPerByte\n ) external {\n relayerFeeConfig.dstPriceRatio = _dstPriceRatio;\n relayerFeeConfig.dstGasPriceInWei = _dstGasPriceInWei;\n relayerFeeConfig.dstNativeAmtCap = _dstNativeAmtCap;\n relayerFeeConfig.baseGas = _baseGas;\n relayerFeeConfig.gasPerByte = _gasPerByte;\n }\n\n function setProtocolFee(uint _zroFee, uint _nativeBP) external {\n protocolFeeConfig.zroFee = _zroFee;\n protocolFeeConfig.nativeBP = _nativeBP;\n }\n\n function setOracleFee(uint _oracleFee) external {\n oracleFee = _oracleFee;\n }\n\n function setDefaultAdapterParams(bytes memory _adapterParams) external {\n defaultAdapterParams = _adapterParams;\n }\n\n // --------------------- Internal Functions ---------------------\n // simulates the relayer pushing through the rest of the msgs that got delayed due to the stored payload\n function _clearMsgQue(uint16 _srcChainId, bytes calldata _path) internal {\n QueuedPayload[] storage msgs = msgsToDeliver[_srcChainId][_path];\n\n // warning, might run into gas issues trying to forward through a bunch of queued msgs\n while (msgs.length > 0) {\n QueuedPayload memory payload = msgs[msgs.length - 1];\n ILayerZeroReceiver(payload.dstAddress).lzReceive(_srcChainId, _path, payload.nonce, payload.payload);\n msgs.pop();\n }\n }\n\n function _getProtocolFees(\n bool _payInZro,\n uint _relayerFee,\n uint _oracleFee\n ) internal view returns (uint) {\n if (_payInZro) {\n return protocolFeeConfig.zroFee;\n } else {\n return ((_relayerFee + _oracleFee) * protocolFeeConfig.nativeBP) / 10000;\n }\n }\n\n function _getRelayerFee(\n uint16, /* _dstChainId */\n uint16, /* _outboundProofType */\n address, /* _userApplication */\n uint _payloadSize,\n bytes memory _adapterParams\n ) internal view returns (uint) {\n (uint16 txType, uint extraGas, uint dstNativeAmt, ) = LzLib.decodeAdapterParams(_adapterParams);\n uint totalRemoteToken; // = baseGas + extraGas + requiredNativeAmount\n if (txType == 2) {\n require(relayerFeeConfig.dstNativeAmtCap >= dstNativeAmt, \"LayerZeroMock: dstNativeAmt too large \");\n totalRemoteToken += dstNativeAmt;\n }\n // remoteGasTotal = dstGasPriceInWei * (baseGas + extraGas)\n uint remoteGasTotal = relayerFeeConfig.dstGasPriceInWei * (relayerFeeConfig.baseGas + extraGas);\n totalRemoteToken += remoteGasTotal;\n\n // tokenConversionRate = dstPrice / localPrice\n // basePrice = totalRemoteToken * tokenConversionRate\n uint basePrice = (totalRemoteToken * relayerFeeConfig.dstPriceRatio) / 10**10;\n\n // pricePerByte = (dstGasPriceInWei * gasPerBytes) * tokenConversionRate\n uint pricePerByte = (relayerFeeConfig.dstGasPriceInWei * relayerFeeConfig.gasPerByte * relayerFeeConfig.dstPriceRatio) / 10**10;\n\n return basePrice + _payloadSize * pricePerByte;\n }\n}\n" + }, + "@layerzerolabs/solidity-examples/contracts/lzApp/NonblockingLzApp.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./LzApp.sol\";\nimport \"../libraries/ExcessivelySafeCall.sol\";\n\n/*\n * the default LayerZero messaging behaviour is blocking, i.e. any failed message will block the channel\n * this abstract class try-catch all fail messages and store locally for future retry. hence, non-blocking\n * NOTE: if the srcAddress is not configured properly, it will still block the message pathway from (srcChainId, srcAddress)\n */\nabstract contract NonblockingLzApp is LzApp {\n using ExcessivelySafeCall for address;\n\n constructor(address _endpoint) LzApp(_endpoint) {}\n\n mapping(uint16 => mapping(bytes => mapping(uint64 => bytes32))) public failedMessages;\n\n event MessageFailed(uint16 _srcChainId, bytes _srcAddress, uint64 _nonce, bytes _payload, bytes _reason);\n event RetryMessageSuccess(uint16 _srcChainId, bytes _srcAddress, uint64 _nonce, bytes32 _payloadHash);\n\n // overriding the virtual function in LzReceiver\n function _blockingLzReceive(\n uint16 _srcChainId,\n bytes memory _srcAddress,\n uint64 _nonce,\n bytes memory _payload\n ) internal virtual override {\n (bool success, bytes memory reason) = address(this).excessivelySafeCall(\n gasleft(),\n 150,\n abi.encodeWithSelector(this.nonblockingLzReceive.selector, _srcChainId, _srcAddress, _nonce, _payload)\n );\n if (!success) {\n _storeFailedMessage(_srcChainId, _srcAddress, _nonce, _payload, reason);\n }\n }\n\n function _storeFailedMessage(\n uint16 _srcChainId,\n bytes memory _srcAddress,\n uint64 _nonce,\n bytes memory _payload,\n bytes memory _reason\n ) internal virtual {\n failedMessages[_srcChainId][_srcAddress][_nonce] = keccak256(_payload);\n emit MessageFailed(_srcChainId, _srcAddress, _nonce, _payload, _reason);\n }\n\n function nonblockingLzReceive(\n uint16 _srcChainId,\n bytes calldata _srcAddress,\n uint64 _nonce,\n bytes calldata _payload\n ) public virtual {\n // only internal transaction\n require(_msgSender() == address(this), \"NonblockingLzApp: caller must be LzApp\");\n _nonblockingLzReceive(_srcChainId, _srcAddress, _nonce, _payload);\n }\n\n //@notice override this function\n function _nonblockingLzReceive(\n uint16 _srcChainId,\n bytes memory _srcAddress,\n uint64 _nonce,\n bytes memory _payload\n ) internal virtual;\n\n function retryMessage(\n uint16 _srcChainId,\n bytes calldata _srcAddress,\n uint64 _nonce,\n bytes calldata _payload\n ) public payable virtual {\n // assert there is message to retry\n bytes32 payloadHash = failedMessages[_srcChainId][_srcAddress][_nonce];\n require(payloadHash != bytes32(0), \"NonblockingLzApp: no stored message\");\n require(keccak256(_payload) == payloadHash, \"NonblockingLzApp: invalid payload\");\n // clear the stored message\n failedMessages[_srcChainId][_srcAddress][_nonce] = bytes32(0);\n // execute the message. revert if it fails again\n _nonblockingLzReceive(_srcChainId, _srcAddress, _nonce, _payload);\n emit RetryMessageSuccess(_srcChainId, _srcAddress, _nonce, payloadHash);\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (access/Ownable2Step.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./OwnableUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module which provides access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership} and {acceptOwnership}.\n *\n * This module is used through inheritance. It will make available all functions\n * from parent (Ownable).\n */\nabstract contract Ownable2StepUpgradeable is Initializable, OwnableUpgradeable {\n function __Ownable2Step_init() internal onlyInitializing {\n __Ownable_init_unchained();\n }\n\n function __Ownable2Step_init_unchained() internal onlyInitializing {\n }\n address private _pendingOwner;\n\n event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Returns the address of the pending owner.\n */\n function pendingOwner() public view virtual returns (address) {\n return _pendingOwner;\n }\n\n /**\n * @dev Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one.\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual override onlyOwner {\n _pendingOwner = newOwner;\n emit OwnershipTransferStarted(owner(), newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`) and deletes any pending owner.\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual override {\n delete _pendingOwner;\n super._transferOwnership(newOwner);\n }\n\n /**\n * @dev The new owner accepts the ownership transfer.\n */\n function acceptOwnership() external {\n address sender = _msgSender();\n require(pendingOwner() == sender, \"Ownable2Step: caller is not the new owner\");\n _transferOwnership(sender);\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[49] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/ContextUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\n address private _owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the deployer as the initial owner.\n */\n function __Ownable_init() internal onlyInitializing {\n __Ownable_init_unchained();\n }\n\n function __Ownable_init_unchained() internal onlyInitializing {\n _transferOwnership(_msgSender());\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n _checkOwner();\n _;\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view virtual returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if the sender is not the owner.\n */\n function _checkOwner() internal view virtual {\n require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions anymore. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby removing any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n _transferOwnership(address(0));\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[49] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.1) (proxy/utils/Initializable.sol)\n\npragma solidity ^0.8.2;\n\nimport \"../../utils/AddressUpgradeable.sol\";\n\n/**\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\n *\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\n * reused. This mechanism prevents re-execution of each \"step\" but allows the creation of new initialization steps in\n * case an upgrade adds a module that needs to be initialized.\n *\n * For example:\n *\n * [.hljs-theme-light.nopadding]\n * ```\n * contract MyToken is ERC20Upgradeable {\n * function initialize() initializer public {\n * __ERC20_init(\"MyToken\", \"MTK\");\n * }\n * }\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\n * function initializeV2() reinitializer(2) public {\n * __ERC20Permit_init(\"MyToken\");\n * }\n * }\n * ```\n *\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\n *\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\n *\n * [CAUTION]\n * ====\n * Avoid leaving a contract uninitialized.\n *\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\n *\n * [.hljs-theme-light.nopadding]\n * ```\n * /// @custom:oz-upgrades-unsafe-allow constructor\n * constructor() {\n * _disableInitializers();\n * }\n * ```\n * ====\n */\nabstract contract Initializable {\n /**\n * @dev Indicates that the contract has been initialized.\n * @custom:oz-retyped-from bool\n */\n uint8 private _initialized;\n\n /**\n * @dev Indicates that the contract is in the process of being initialized.\n */\n bool private _initializing;\n\n /**\n * @dev Triggered when the contract has been initialized or reinitialized.\n */\n event Initialized(uint8 version);\n\n /**\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\n * `onlyInitializing` functions can be used to initialize parent contracts.\n *\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\n * constructor.\n *\n * Emits an {Initialized} event.\n */\n modifier initializer() {\n bool isTopLevelCall = !_initializing;\n require(\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\n \"Initializable: contract is already initialized\"\n );\n _initialized = 1;\n if (isTopLevelCall) {\n _initializing = true;\n }\n _;\n if (isTopLevelCall) {\n _initializing = false;\n emit Initialized(1);\n }\n }\n\n /**\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\n * used to initialize parent contracts.\n *\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\n * are added through upgrades and that require initialization.\n *\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\n * cannot be nested. If one is invoked in the context of another, execution will revert.\n *\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\n * a contract, executing them in the right order is up to the developer or operator.\n *\n * WARNING: setting the version to 255 will prevent any future reinitialization.\n *\n * Emits an {Initialized} event.\n */\n modifier reinitializer(uint8 version) {\n require(!_initializing && _initialized < version, \"Initializable: contract is already initialized\");\n _initialized = version;\n _initializing = true;\n _;\n _initializing = false;\n emit Initialized(version);\n }\n\n /**\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\n */\n modifier onlyInitializing() {\n require(_initializing, \"Initializable: contract is not initializing\");\n _;\n }\n\n /**\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\n * through proxies.\n *\n * Emits an {Initialized} event the first time it is successfully executed.\n */\n function _disableInitializers() internal virtual {\n require(!_initializing, \"Initializable: contract is initializing\");\n if (_initialized < type(uint8).max) {\n _initialized = type(uint8).max;\n emit Initialized(type(uint8).max);\n }\n }\n\n /**\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\n */\n function _getInitializedVersion() internal view returns (uint8) {\n return _initialized;\n }\n\n /**\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\n */\n function _isInitializing() internal view returns (bool) {\n return _initializing;\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary AddressUpgradeable {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n * ====\n *\n * [IMPORTANT]\n * ====\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\n *\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n * constructor.\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize/address.code.length, which returns 0\n // for contracts in construction, since the code is only stored at the end\n // of the constructor execution.\n\n return account.code.length > 0;\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n (bool success, ) = recipient.call{value: amount}(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain `call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, \"Address: low-level static call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\n *\n * _Available since v4.8._\n */\n function verifyCallResultFromTarget(\n address target,\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n if (success) {\n if (returndata.length == 0) {\n // only check isContract if the call was successful and the return data is empty\n // otherwise we already know that it was a contract\n require(isContract(target), \"Address: call to non-contract\");\n }\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n /**\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason or using the provided one.\n *\n * _Available since v4.3._\n */\n function verifyCallResult(\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal pure returns (bytes memory) {\n if (success) {\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n /// @solidity memory-safe-assembly\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\npragma solidity ^0.8.0;\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract ContextUpgradeable is Initializable {\n function __Context_init() internal onlyInitializing {\n }\n\n function __Context_init_unchained() internal onlyInitializing {\n }\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[50] private __gap;\n}\n" + }, + "@openzeppelin/contracts/access/AccessControl.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (access/AccessControl.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IAccessControl.sol\";\nimport \"../utils/Context.sol\";\nimport \"../utils/Strings.sol\";\nimport \"../utils/introspection/ERC165.sol\";\n\n/**\n * @dev Contract module that allows children to implement role-based access\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\n * members except through off-chain means by accessing the contract event logs. Some\n * applications may benefit from on-chain enumerability, for those cases see\n * {AccessControlEnumerable}.\n *\n * Roles are referred to by their `bytes32` identifier. These should be exposed\n * in the external API and be unique. The best way to achieve this is by\n * using `public constant` hash digests:\n *\n * ```\n * bytes32 public constant MY_ROLE = keccak256(\"MY_ROLE\");\n * ```\n *\n * Roles can be used to represent a set of permissions. To restrict access to a\n * function call, use {hasRole}:\n *\n * ```\n * function foo() public {\n * require(hasRole(MY_ROLE, msg.sender));\n * ...\n * }\n * ```\n *\n * Roles can be granted and revoked dynamically via the {grantRole} and\n * {revokeRole} functions. Each role has an associated admin role, and only\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\n *\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\n * that only accounts with this role will be able to grant or revoke other\n * roles. More complex role relationships can be created by using\n * {_setRoleAdmin}.\n *\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\n * grant and revoke this role. Extra precautions should be taken to secure\n * accounts that have been granted it.\n */\nabstract contract AccessControl is Context, IAccessControl, ERC165 {\n struct RoleData {\n mapping(address => bool) members;\n bytes32 adminRole;\n }\n\n mapping(bytes32 => RoleData) private _roles;\n\n bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;\n\n /**\n * @dev Modifier that checks that an account has a specific role. Reverts\n * with a standardized message including the required role.\n *\n * The format of the revert reason is given by the following regular expression:\n *\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\n *\n * _Available since v4.1._\n */\n modifier onlyRole(bytes32 role) {\n _checkRole(role);\n _;\n }\n\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);\n }\n\n /**\n * @dev Returns `true` if `account` has been granted `role`.\n */\n function hasRole(bytes32 role, address account) public view virtual override returns (bool) {\n return _roles[role].members[account];\n }\n\n /**\n * @dev Revert with a standard message if `_msgSender()` is missing `role`.\n * Overriding this function changes the behavior of the {onlyRole} modifier.\n *\n * Format of the revert message is described in {_checkRole}.\n *\n * _Available since v4.6._\n */\n function _checkRole(bytes32 role) internal view virtual {\n _checkRole(role, _msgSender());\n }\n\n /**\n * @dev Revert with a standard message if `account` is missing `role`.\n *\n * The format of the revert reason is given by the following regular expression:\n *\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\n */\n function _checkRole(bytes32 role, address account) internal view virtual {\n if (!hasRole(role, account)) {\n revert(\n string(\n abi.encodePacked(\n \"AccessControl: account \",\n Strings.toHexString(account),\n \" is missing role \",\n Strings.toHexString(uint256(role), 32)\n )\n )\n );\n }\n }\n\n /**\n * @dev Returns the admin role that controls `role`. See {grantRole} and\n * {revokeRole}.\n *\n * To change a role's admin, use {_setRoleAdmin}.\n */\n function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {\n return _roles[role].adminRole;\n }\n\n /**\n * @dev Grants `role` to `account`.\n *\n * If `account` had not been already granted `role`, emits a {RoleGranted}\n * event.\n *\n * Requirements:\n *\n * - the caller must have ``role``'s admin role.\n *\n * May emit a {RoleGranted} event.\n */\n function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\n _grantRole(role, account);\n }\n\n /**\n * @dev Revokes `role` from `account`.\n *\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\n *\n * Requirements:\n *\n * - the caller must have ``role``'s admin role.\n *\n * May emit a {RoleRevoked} event.\n */\n function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\n _revokeRole(role, account);\n }\n\n /**\n * @dev Revokes `role` from the calling account.\n *\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\n * purpose is to provide a mechanism for accounts to lose their privileges\n * if they are compromised (such as when a trusted device is misplaced).\n *\n * If the calling account had been revoked `role`, emits a {RoleRevoked}\n * event.\n *\n * Requirements:\n *\n * - the caller must be `account`.\n *\n * May emit a {RoleRevoked} event.\n */\n function renounceRole(bytes32 role, address account) public virtual override {\n require(account == _msgSender(), \"AccessControl: can only renounce roles for self\");\n\n _revokeRole(role, account);\n }\n\n /**\n * @dev Grants `role` to `account`.\n *\n * If `account` had not been already granted `role`, emits a {RoleGranted}\n * event. Note that unlike {grantRole}, this function doesn't perform any\n * checks on the calling account.\n *\n * May emit a {RoleGranted} event.\n *\n * [WARNING]\n * ====\n * This function should only be called from the constructor when setting\n * up the initial roles for the system.\n *\n * Using this function in any other way is effectively circumventing the admin\n * system imposed by {AccessControl}.\n * ====\n *\n * NOTE: This function is deprecated in favor of {_grantRole}.\n */\n function _setupRole(bytes32 role, address account) internal virtual {\n _grantRole(role, account);\n }\n\n /**\n * @dev Sets `adminRole` as ``role``'s admin role.\n *\n * Emits a {RoleAdminChanged} event.\n */\n function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {\n bytes32 previousAdminRole = getRoleAdmin(role);\n _roles[role].adminRole = adminRole;\n emit RoleAdminChanged(role, previousAdminRole, adminRole);\n }\n\n /**\n * @dev Grants `role` to `account`.\n *\n * Internal function without access restriction.\n *\n * May emit a {RoleGranted} event.\n */\n function _grantRole(bytes32 role, address account) internal virtual {\n if (!hasRole(role, account)) {\n _roles[role].members[account] = true;\n emit RoleGranted(role, account, _msgSender());\n }\n }\n\n /**\n * @dev Revokes `role` from `account`.\n *\n * Internal function without access restriction.\n *\n * May emit a {RoleRevoked} event.\n */\n function _revokeRole(bytes32 role, address account) internal virtual {\n if (hasRole(role, account)) {\n _roles[role].members[account] = false;\n emit RoleRevoked(role, account, _msgSender());\n }\n }\n}\n" + }, + "@openzeppelin/contracts/access/IAccessControl.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev External interface of AccessControl declared to support ERC165 detection.\n */\ninterface IAccessControl {\n /**\n * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\n *\n * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\n * {RoleAdminChanged} not being emitted signaling this.\n *\n * _Available since v3.1._\n */\n event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\n\n /**\n * @dev Emitted when `account` is granted `role`.\n *\n * `sender` is the account that originated the contract call, an admin role\n * bearer except when using {AccessControl-_setupRole}.\n */\n event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\n\n /**\n * @dev Emitted when `account` is revoked `role`.\n *\n * `sender` is the account that originated the contract call:\n * - if using `revokeRole`, it is the admin role bearer\n * - if using `renounceRole`, it is the role bearer (i.e. `account`)\n */\n event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\n\n /**\n * @dev Returns `true` if `account` has been granted `role`.\n */\n function hasRole(bytes32 role, address account) external view returns (bool);\n\n /**\n * @dev Returns the admin role that controls `role`. See {grantRole} and\n * {revokeRole}.\n *\n * To change a role's admin, use {AccessControl-_setRoleAdmin}.\n */\n function getRoleAdmin(bytes32 role) external view returns (bytes32);\n\n /**\n * @dev Grants `role` to `account`.\n *\n * If `account` had not been already granted `role`, emits a {RoleGranted}\n * event.\n *\n * Requirements:\n *\n * - the caller must have ``role``'s admin role.\n */\n function grantRole(bytes32 role, address account) external;\n\n /**\n * @dev Revokes `role` from `account`.\n *\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\n *\n * Requirements:\n *\n * - the caller must have ``role``'s admin role.\n */\n function revokeRole(bytes32 role, address account) external;\n\n /**\n * @dev Revokes `role` from the calling account.\n *\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\n * purpose is to provide a mechanism for accounts to lose their privileges\n * if they are compromised (such as when a trusted device is misplaced).\n *\n * If the calling account had been granted `role`, emits a {RoleRevoked}\n * event.\n *\n * Requirements:\n *\n * - the caller must be `account`.\n */\n function renounceRole(bytes32 role, address account) external;\n}\n" + }, + "@openzeppelin/contracts/access/Ownable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/Context.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract Ownable is Context {\n address private _owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the deployer as the initial owner.\n */\n constructor() {\n _transferOwnership(_msgSender());\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n _checkOwner();\n _;\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view virtual returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if the sender is not the owner.\n */\n function _checkOwner() internal view virtual {\n require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions anymore. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby removing any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n _transferOwnership(address(0));\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}\n" + }, + "@openzeppelin/contracts/security/Pausable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/Context.sol\";\n\n/**\n * @dev Contract module which allows children to implement an emergency stop\n * mechanism that can be triggered by an authorized account.\n *\n * This module is used through inheritance. It will make available the\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\n * the functions of your contract. Note that they will not be pausable by\n * simply including this module, only once the modifiers are put in place.\n */\nabstract contract Pausable is Context {\n /**\n * @dev Emitted when the pause is triggered by `account`.\n */\n event Paused(address account);\n\n /**\n * @dev Emitted when the pause is lifted by `account`.\n */\n event Unpaused(address account);\n\n bool private _paused;\n\n /**\n * @dev Initializes the contract in unpaused state.\n */\n constructor() {\n _paused = false;\n }\n\n /**\n * @dev Modifier to make a function callable only when the contract is not paused.\n *\n * Requirements:\n *\n * - The contract must not be paused.\n */\n modifier whenNotPaused() {\n _requireNotPaused();\n _;\n }\n\n /**\n * @dev Modifier to make a function callable only when the contract is paused.\n *\n * Requirements:\n *\n * - The contract must be paused.\n */\n modifier whenPaused() {\n _requirePaused();\n _;\n }\n\n /**\n * @dev Returns true if the contract is paused, and false otherwise.\n */\n function paused() public view virtual returns (bool) {\n return _paused;\n }\n\n /**\n * @dev Throws if the contract is paused.\n */\n function _requireNotPaused() internal view virtual {\n require(!paused(), \"Pausable: paused\");\n }\n\n /**\n * @dev Throws if the contract is not paused.\n */\n function _requirePaused() internal view virtual {\n require(paused(), \"Pausable: not paused\");\n }\n\n /**\n * @dev Triggers stopped state.\n *\n * Requirements:\n *\n * - The contract must not be paused.\n */\n function _pause() internal virtual whenNotPaused {\n _paused = true;\n emit Paused(_msgSender());\n }\n\n /**\n * @dev Returns to normal state.\n *\n * Requirements:\n *\n * - The contract must be paused.\n */\n function _unpause() internal virtual whenPaused {\n _paused = false;\n emit Unpaused(_msgSender());\n }\n}\n" + }, + "@openzeppelin/contracts/security/ReentrancyGuard.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Contract module that helps prevent reentrant calls to a function.\n *\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\n * available, which can be applied to functions to make sure there are no nested\n * (reentrant) calls to them.\n *\n * Note that because there is a single `nonReentrant` guard, functions marked as\n * `nonReentrant` may not call one another. This can be worked around by making\n * those functions `private`, and then adding `external` `nonReentrant` entry\n * points to them.\n *\n * TIP: If you would like to learn more about reentrancy and alternative ways\n * to protect against it, check out our blog post\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\n */\nabstract contract ReentrancyGuard {\n // Booleans are more expensive than uint256 or any type that takes up a full\n // word because each write operation emits an extra SLOAD to first read the\n // slot's contents, replace the bits taken up by the boolean, and then write\n // back. This is the compiler's defense against contract upgrades and\n // pointer aliasing, and it cannot be disabled.\n\n // The values being non-zero value makes deployment a bit more expensive,\n // but in exchange the refund on every call to nonReentrant will be lower in\n // amount. Since refunds are capped to a percentage of the total\n // transaction's gas, it is best to keep them low in cases like this one, to\n // increase the likelihood of the full refund coming into effect.\n uint256 private constant _NOT_ENTERED = 1;\n uint256 private constant _ENTERED = 2;\n\n uint256 private _status;\n\n constructor() {\n _status = _NOT_ENTERED;\n }\n\n /**\n * @dev Prevents a contract from calling itself, directly or indirectly.\n * Calling a `nonReentrant` function from another `nonReentrant`\n * function is not supported. It is possible to prevent this from happening\n * by making the `nonReentrant` function external, and making it call a\n * `private` function that does the actual work.\n */\n modifier nonReentrant() {\n _nonReentrantBefore();\n _;\n _nonReentrantAfter();\n }\n\n function _nonReentrantBefore() private {\n // On the first call to nonReentrant, _status will be _NOT_ENTERED\n require(_status != _ENTERED, \"ReentrancyGuard: reentrant call\");\n\n // Any calls to nonReentrant after this point will fail\n _status = _ENTERED;\n }\n\n function _nonReentrantAfter() private {\n // By storing the original value once again, a refund is triggered (see\n // https://eips.ethereum.org/EIPS/eip-2200)\n _status = _NOT_ENTERED;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Context.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/introspection/ERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC165.sol\";\n\n/**\n * @dev Implementation of the {IERC165} interface.\n *\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\n * for the additional interface id that will be supported. For example:\n *\n * ```solidity\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\n * }\n * ```\n *\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\n */\nabstract contract ERC165 is IERC165 {\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n return interfaceId == type(IERC165).interfaceId;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/introspection/IERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n /**\n * @dev Returns true if this contract implements the interface defined by\n * `interfaceId`. See the corresponding\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\n * to learn more about how these ids are created.\n *\n * This function call must use less than 30 000 gas.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n" + }, + "@openzeppelin/contracts/utils/math/Math.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary Math {\n enum Rounding {\n Down, // Toward negative infinity\n Up, // Toward infinity\n Zero // Toward zero\n }\n\n /**\n * @dev Returns the largest of two numbers.\n */\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\n return a > b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two numbers.\n */\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two numbers. The result is rounded towards\n * zero.\n */\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b) / 2 can overflow.\n return (a & b) + (a ^ b) / 2;\n }\n\n /**\n * @dev Returns the ceiling of the division of two numbers.\n *\n * This differs from standard division with `/` in that it rounds up instead\n * of rounding down.\n */\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b - 1) / b can overflow on addition, so we distribute.\n return a == 0 ? 0 : (a - 1) / b + 1;\n }\n\n /**\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\n * with further edits by Uniswap Labs also under MIT license.\n */\n function mulDiv(\n uint256 x,\n uint256 y,\n uint256 denominator\n ) internal pure returns (uint256 result) {\n unchecked {\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\n // variables such that product = prod1 * 2^256 + prod0.\n uint256 prod0; // Least significant 256 bits of the product\n uint256 prod1; // Most significant 256 bits of the product\n assembly {\n let mm := mulmod(x, y, not(0))\n prod0 := mul(x, y)\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\n }\n\n // Handle non-overflow cases, 256 by 256 division.\n if (prod1 == 0) {\n return prod0 / denominator;\n }\n\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\n require(denominator > prod1);\n\n ///////////////////////////////////////////////\n // 512 by 256 division.\n ///////////////////////////////////////////////\n\n // Make division exact by subtracting the remainder from [prod1 prod0].\n uint256 remainder;\n assembly {\n // Compute remainder using mulmod.\n remainder := mulmod(x, y, denominator)\n\n // Subtract 256 bit number from 512 bit number.\n prod1 := sub(prod1, gt(remainder, prod0))\n prod0 := sub(prod0, remainder)\n }\n\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\n // See https://cs.stackexchange.com/q/138556/92363.\n\n // Does not overflow because the denominator cannot be zero at this stage in the function.\n uint256 twos = denominator & (~denominator + 1);\n assembly {\n // Divide denominator by twos.\n denominator := div(denominator, twos)\n\n // Divide [prod1 prod0] by twos.\n prod0 := div(prod0, twos)\n\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\n twos := add(div(sub(0, twos), twos), 1)\n }\n\n // Shift in bits from prod1 into prod0.\n prod0 |= prod1 * twos;\n\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\n // four bits. That is, denominator * inv = 1 mod 2^4.\n uint256 inverse = (3 * denominator) ^ 2;\n\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\n // in modular arithmetic, doubling the correct bits in each step.\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\n\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\n // is no longer required.\n result = prod0 * inverse;\n return result;\n }\n }\n\n /**\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\n */\n function mulDiv(\n uint256 x,\n uint256 y,\n uint256 denominator,\n Rounding rounding\n ) internal pure returns (uint256) {\n uint256 result = mulDiv(x, y, denominator);\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\n result += 1;\n }\n return result;\n }\n\n /**\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\n *\n * Inspired by Henry S. Warren, Jr.'s \"Hacker's Delight\" (Chapter 11).\n */\n function sqrt(uint256 a) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\n //\n // We know that the \"msb\" (most significant bit) of our target number `a` is a power of 2 such that we have\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\n //\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\n // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\n // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\n //\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\n uint256 result = 1 << (log2(a) >> 1);\n\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\n // into the expected uint128 result.\n unchecked {\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n return min(result, a / result);\n }\n }\n\n /**\n * @notice Calculates sqrt(a), following the selected rounding direction.\n */\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = sqrt(a);\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 2, rounded down, of a positive value.\n * Returns 0 if given 0.\n */\n function log2(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >> 128 > 0) {\n value >>= 128;\n result += 128;\n }\n if (value >> 64 > 0) {\n value >>= 64;\n result += 64;\n }\n if (value >> 32 > 0) {\n value >>= 32;\n result += 32;\n }\n if (value >> 16 > 0) {\n value >>= 16;\n result += 16;\n }\n if (value >> 8 > 0) {\n value >>= 8;\n result += 8;\n }\n if (value >> 4 > 0) {\n value >>= 4;\n result += 4;\n }\n if (value >> 2 > 0) {\n value >>= 2;\n result += 2;\n }\n if (value >> 1 > 0) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log2(value);\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 10, rounded down, of a positive value.\n * Returns 0 if given 0.\n */\n function log10(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >= 10**64) {\n value /= 10**64;\n result += 64;\n }\n if (value >= 10**32) {\n value /= 10**32;\n result += 32;\n }\n if (value >= 10**16) {\n value /= 10**16;\n result += 16;\n }\n if (value >= 10**8) {\n value /= 10**8;\n result += 8;\n }\n if (value >= 10**4) {\n value /= 10**4;\n result += 4;\n }\n if (value >= 10**2) {\n value /= 10**2;\n result += 2;\n }\n if (value >= 10**1) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log10(value);\n return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 256, rounded down, of a positive value.\n * Returns 0 if given 0.\n *\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\n */\n function log256(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >> 128 > 0) {\n value >>= 128;\n result += 16;\n }\n if (value >> 64 > 0) {\n value >>= 64;\n result += 8;\n }\n if (value >> 32 > 0) {\n value >>= 32;\n result += 4;\n }\n if (value >> 16 > 0) {\n value >>= 16;\n result += 2;\n }\n if (value >> 8 > 0) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log256(value);\n return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Strings.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./math/Math.sol\";\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n bytes16 private constant _SYMBOLS = \"0123456789abcdef\";\n uint8 private constant _ADDRESS_LENGTH = 20;\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\n */\n function toString(uint256 value) internal pure returns (string memory) {\n unchecked {\n uint256 length = Math.log10(value) + 1;\n string memory buffer = new string(length);\n uint256 ptr;\n /// @solidity memory-safe-assembly\n assembly {\n ptr := add(buffer, add(32, length))\n }\n while (true) {\n ptr--;\n /// @solidity memory-safe-assembly\n assembly {\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\n }\n value /= 10;\n if (value == 0) break;\n }\n return buffer;\n }\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\n */\n function toHexString(uint256 value) internal pure returns (string memory) {\n unchecked {\n return toHexString(value, Math.log256(value) + 1);\n }\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\n */\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\n bytes memory buffer = new bytes(2 * length + 2);\n buffer[0] = \"0\";\n buffer[1] = \"x\";\n for (uint256 i = 2 * length + 1; i > 1; --i) {\n buffer[i] = _SYMBOLS[value & 0xf];\n value >>= 4;\n }\n require(value == 0, \"Strings: hex length insufficient\");\n return string(buffer);\n }\n\n /**\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\n */\n function toHexString(address addr) internal pure returns (string memory) {\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\n }\n}\n" + }, + "@venusprotocol/solidity-utilities/contracts/validators.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.25;\n\n/// @notice Thrown if the supplied address is a zero address where it is not allowed\nerror ZeroAddressNotAllowed();\n\n/// @notice Thrown if the supplied value is 0 where it is not allowed\nerror ZeroValueNotAllowed();\n\n/// @notice Checks if the provided address is nonzero, reverts otherwise\n/// @param address_ Address to check\n/// @custom:error ZeroAddressNotAllowed is thrown if the provided address is a zero address\nfunction ensureNonzeroAddress(address address_) pure {\n if (address_ == address(0)) {\n revert ZeroAddressNotAllowed();\n }\n}\n\n/// @notice Checks if the provided value is nonzero, reverts otherwise\n/// @param value_ Value to check\n/// @custom:error ZeroValueNotAllowed is thrown if the provided value is 0\nfunction ensureNonzeroValue(uint256 value_) pure {\n if (value_ == 0) {\n revert ZeroValueNotAllowed();\n }\n}\n" + }, + "contracts/Cross-chain/BaseOmnichainControllerDest.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.8.25;\n\nimport { NonblockingLzApp } from \"@layerzerolabs/solidity-examples/contracts/lzApp/NonblockingLzApp.sol\";\nimport { Pausable } from \"@openzeppelin/contracts/security/Pausable.sol\";\nimport { ensureNonzeroAddress } from \"@venusprotocol/solidity-utilities/contracts/validators.sol\";\n\n/**\n * @title BaseOmnichainControllerDest\n * @author Venus\n * @dev This contract is the base for the Omnichain controller destination contract\n * It provides functionality related to daily command limits and pausability\n * @custom:security-contact https://github.com/VenusProtocol/governance-contracts#discussion\n */\n\nabstract contract BaseOmnichainControllerDest is NonblockingLzApp, Pausable {\n /**\n * @notice Maximum daily limit for receiving commands from Binance chain\n */\n uint256 public maxDailyReceiveLimit;\n\n /**\n * @notice Total received commands within the last 24-hour window from Binance chain\n */\n uint256 public last24HourCommandsReceived;\n\n /**\n * @notice Timestamp when the last 24-hour window started from Binance chain\n */\n uint256 public last24HourReceiveWindowStart;\n\n /**\n * @notice Emitted when the maximum daily limit for receiving command from Binance chain is modified\n */\n event SetMaxDailyReceiveLimit(uint256 oldMaxLimit, uint256 newMaxLimit);\n\n constructor(address endpoint_) NonblockingLzApp(endpoint_) {\n ensureNonzeroAddress(endpoint_);\n }\n\n /**\n * @notice Sets the maximum daily limit for receiving commands\n * @param limit_ Number of commands\n * @custom:access Only Owner\n * @custom:event Emits SetMaxDailyReceiveLimit with old and new limit\n */\n function setMaxDailyReceiveLimit(uint256 limit_) external onlyOwner {\n emit SetMaxDailyReceiveLimit(maxDailyReceiveLimit, limit_);\n maxDailyReceiveLimit = limit_;\n }\n\n /**\n * @notice Triggers the paused state of the controller\n * @custom:access Only owner\n */\n function pause() external onlyOwner {\n _pause();\n }\n\n /**\n * @notice Triggers the resume state of the controller\n * @custom:access Only owner\n */\n function unpause() external onlyOwner {\n _unpause();\n }\n\n /**\n * @notice Empty implementation of renounce ownership to avoid any mishappening\n */\n function renounceOwnership() public override {}\n\n /**\n * @notice Check eligibility to receive commands\n * @param noOfCommands_ Number of commands to be received\n */\n function _isEligibleToReceive(uint256 noOfCommands_) internal {\n uint256 currentBlockTimestamp = block.timestamp;\n\n // Load values for the 24-hour window checks for receiving\n uint256 receivedInWindow = last24HourCommandsReceived;\n\n // Check if the time window has changed (more than 24 hours have passed)\n if (currentBlockTimestamp - last24HourReceiveWindowStart > 1 days) {\n receivedInWindow = noOfCommands_;\n last24HourReceiveWindowStart = currentBlockTimestamp;\n } else {\n receivedInWindow += noOfCommands_;\n }\n\n // Revert if the received amount exceeds the daily limit\n require(receivedInWindow <= maxDailyReceiveLimit, \"Daily Transaction Limit Exceeded\");\n\n // Update the received amount for the 24-hour window\n last24HourCommandsReceived = receivedInWindow;\n }\n}\n" + }, + "contracts/Cross-chain/BaseOmnichainControllerSrc.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.8.25;\n\nimport { Pausable } from \"@openzeppelin/contracts/security/Pausable.sol\";\nimport { Ownable } from \"@openzeppelin/contracts/access/Ownable.sol\";\nimport { ensureNonzeroAddress } from \"@venusprotocol/solidity-utilities/contracts/validators.sol\";\nimport { IAccessControlManagerV8 } from \"./../Governance/IAccessControlManagerV8.sol\";\n\n/**\n * @title BaseOmnichainControllerSrc\n * @dev This contract is the base for the Omnichain controller source contracts.\n * It provides functionality related to daily command limits and pausability.\n * @custom:security-contact https://github.com/VenusProtocol/governance-contracts#discussion\n */\n\ncontract BaseOmnichainControllerSrc is Ownable, Pausable {\n /**\n * @notice ACM (Access Control Manager) contract address\n */\n address public accessControlManager;\n\n /**\n * @notice Maximum daily limit for commands from the local chain\n */\n mapping(uint16 => uint256) public chainIdToMaxDailyLimit;\n\n /**\n * @notice Total commands transferred within the last 24-hour window from the local chain\n */\n mapping(uint16 => uint256) public chainIdToLast24HourCommandsSent;\n\n /**\n * @notice Timestamp when the last 24-hour window started from the local chain\n */\n mapping(uint16 => uint256) public chainIdToLast24HourWindowStart;\n /**\n * @notice Timestamp when the last proposal sent from the local chain to dest chain\n */\n mapping(uint16 => uint256) public chainIdToLastProposalSentTimestamp;\n\n /**\n * @notice Emitted when the maximum daily limit of commands from the local chain is modified\n */\n event SetMaxDailyLimit(uint16 indexed chainId, uint256 oldMaxLimit, uint256 newMaxLimit);\n /*\n * @notice Emitted when the address of ACM is updated\n */\n event NewAccessControlManager(address indexed oldAccessControlManager, address indexed newAccessControlManager);\n\n constructor(address accessControlManager_) {\n ensureNonzeroAddress(accessControlManager_);\n accessControlManager = accessControlManager_;\n }\n\n /**\n * @notice Sets the limit of daily (24 Hour) command amount\n * @param chainId_ Destination chain id\n * @param limit_ Number of commands\n * @custom:access Controlled by AccessControlManager\n * @custom:event Emits SetMaxDailyLimit with old and new limit and its corresponding chain id\n */\n function setMaxDailyLimit(uint16 chainId_, uint256 limit_) external {\n _ensureAllowed(\"setMaxDailyLimit(uint16,uint256)\");\n emit SetMaxDailyLimit(chainId_, chainIdToMaxDailyLimit[chainId_], limit_);\n chainIdToMaxDailyLimit[chainId_] = limit_;\n }\n\n /**\n * @notice Triggers the paused state of the controller\n * @custom:access Controlled by AccessControlManager\n */\n function pause() external {\n _ensureAllowed(\"pause()\");\n _pause();\n }\n\n /**\n * @notice Triggers the resume state of the controller\n * @custom:access Controlled by AccessControlManager\n */\n function unpause() external {\n _ensureAllowed(\"unpause()\");\n _unpause();\n }\n\n /**\n * @notice Sets the address of Access Control Manager (ACM)\n * @param accessControlManager_ The new address of the Access Control Manager\n * @custom:access Only owner\n * @custom:event Emits NewAccessControlManager with old and new access control manager addresses\n */\n function setAccessControlManager(address accessControlManager_) external onlyOwner {\n ensureNonzeroAddress(accessControlManager_);\n emit NewAccessControlManager(accessControlManager, accessControlManager_);\n accessControlManager = accessControlManager_;\n }\n\n /**\n * @notice Empty implementation of renounce ownership to avoid any mishap\n */\n function renounceOwnership() public override {}\n\n /**\n * @notice Check eligibility to send commands\n * @param dstChainId_ Destination chain id\n * @param noOfCommands_ Number of commands to send\n */\n function _isEligibleToSend(uint16 dstChainId_, uint256 noOfCommands_) internal {\n // Load values for the 24-hour window checks\n uint256 currentBlockTimestamp = block.timestamp;\n uint256 lastDayWindowStart = chainIdToLast24HourWindowStart[dstChainId_];\n uint256 commandsSentInWindow = chainIdToLast24HourCommandsSent[dstChainId_];\n uint256 maxDailyLimit = chainIdToMaxDailyLimit[dstChainId_];\n uint256 lastProposalSentTimestamp = chainIdToLastProposalSentTimestamp[dstChainId_];\n\n // Check if the time window has changed (more than 24 hours have passed)\n if (currentBlockTimestamp - lastDayWindowStart > 1 days) {\n commandsSentInWindow = noOfCommands_;\n chainIdToLast24HourWindowStart[dstChainId_] = currentBlockTimestamp;\n } else {\n commandsSentInWindow += noOfCommands_;\n }\n\n // Revert if the amount exceeds the daily limit\n require(commandsSentInWindow <= maxDailyLimit, \"Daily Transaction Limit Exceeded\");\n // Revert if the last proposal is already sent in current block i.e multiple proposals cannot be sent within the same block.timestamp\n require(lastProposalSentTimestamp != currentBlockTimestamp, \"Multiple bridging in a proposal\");\n\n // Update the amount for the 24-hour window\n chainIdToLast24HourCommandsSent[dstChainId_] = commandsSentInWindow;\n // Update the last sent proposal timestamp\n chainIdToLastProposalSentTimestamp[dstChainId_] = currentBlockTimestamp;\n }\n\n /**\n * @notice Ensure that the caller has permission to execute a specific function\n * @param functionSig_ Function signature to be checked for permission\n */\n function _ensureAllowed(string memory functionSig_) internal view {\n require(\n IAccessControlManagerV8(accessControlManager).isAllowedToCall(msg.sender, functionSig_),\n \"access denied\"\n );\n }\n}\n" + }, + "contracts/Cross-chain/interfaces/IOmnichainGovernanceExecutor.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.25;\n\ninterface IOmnichainGovernanceExecutor {\n /**\n * @notice Transfers ownership of the contract to the specified address\n * @param addr The address to which ownership will be transferred\n */\n function transferOwnership(address addr) external;\n\n /**\n * @notice Sets the source message sender address\n * @param srcChainId_ The LayerZero id of a source chain\n * @param srcAddress_ The address of the contract on the source chain\n */\n function setTrustedRemoteAddress(uint16 srcChainId_, bytes calldata srcAddress_) external;\n}\n" + }, + "contracts/Cross-chain/interfaces/ITimelock.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity ^0.8.25;\n\n/**\n * @title ITimelock\n * @author Venus\n * @dev Interface for Timelock contract\n * @custom:security-contact https://github.com/VenusProtocol/governance-contracts#discussion\n */\ninterface ITimelock {\n /**\n * @notice Delay period for the transaction queue\n */\n function delay() external view returns (uint256);\n\n /**\n * @notice Required period to execute a proposal transaction\n */\n function GRACE_PERIOD() external view returns (uint256);\n\n /**\n * @notice Method for accepting a proposed admin\n */\n function acceptAdmin() external;\n\n /**\n * @notice Method to propose a new admin authorized to call timelock functions. This should be the Governor Contract.\n */\n function setPendingAdmin(address pendingAdmin) external;\n\n /**\n * @notice Show mapping of queued transactions\n * @param hash Transaction hash\n */\n function queuedTransactions(bytes32 hash) external view returns (bool);\n\n /**\n * @notice Called for each action when queuing a proposal\n * @param target Address of the contract with the method to be called\n * @param value Native token amount sent with the transaction\n * @param signature signature of the function to be called\n * @param data Arguments to be passed to the function when called\n * @param eta Timestamp after which the transaction can be executed\n * @return Hash of the queued transaction\n */\n function queueTransaction(\n address target,\n uint256 value,\n string calldata signature,\n bytes calldata data,\n uint256 eta\n ) external returns (bytes32);\n\n /**\n * @notice Called to cancel a queued transaction\n * @param target Address of the contract with the method to be called\n * @param value Native token amount sent with the transaction\n * @param signature signature of the function to be called\n * @param data Arguments to be passed to the function when called\n * @param eta Timestamp after which the transaction can be executed\n */\n function cancelTransaction(\n address target,\n uint256 value,\n string calldata signature,\n bytes calldata data,\n uint256 eta\n ) external;\n\n /**\n * @notice Called to execute a queued transaction\n * @param target Address of the contract with the method to be called\n * @param value Native token amount sent with the transaction\n * @param signature signature of the function to be called\n * @param data Arguments to be passed to the function when called\n * @param eta Timestamp after which the transaction can be executed\n * @return Result of function call\n */\n function executeTransaction(\n address target,\n uint256 value,\n string calldata signature,\n bytes calldata data,\n uint256 eta\n ) external payable returns (bytes memory);\n}\n" + }, + "contracts/Cross-chain/OmnichainExecutorOwner.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.25;\n\nimport { AccessControlledV8 } from \"../Governance/AccessControlledV8.sol\";\nimport { IOmnichainGovernanceExecutor } from \"./interfaces/IOmnichainGovernanceExecutor.sol\";\nimport { ensureNonzeroAddress } from \"@venusprotocol/solidity-utilities/contracts/validators.sol\";\n\n/**\n * @title OmnichainExecutorOwner\n * @author Venus\n * @notice OmnichainProposalSender contract acts as a governance and access control mechanism,\n * allowing owner to upsert signature of OmnichainGovernanceExecutor contract,\n * also contains function to transfer the ownership of contract as well.\n * @custom:security-contact https://github.com/VenusProtocol/governance-contracts#discussion\n */\n\ncontract OmnichainExecutorOwner is AccessControlledV8 {\n /**\n * @custom:oz-upgrades-unsafe-allow state-variable-immutable\n */\n IOmnichainGovernanceExecutor public immutable OMNICHAIN_GOVERNANCE_EXECUTOR;\n\n /**\n * @notice Stores function signature corresponding to their 4 bytes hash value\n */\n mapping(bytes4 => string) public functionRegistry;\n\n /**\n * @notice Event emitted when function registry updated\n */\n event FunctionRegistryChanged(string indexed signature, bool active);\n\n /// @custom:oz-upgrades-unsafe-allow constructor\n constructor(address omnichainGovernanceExecutor_) {\n require(omnichainGovernanceExecutor_ != address(0), \"Address must not be zero\");\n OMNICHAIN_GOVERNANCE_EXECUTOR = IOmnichainGovernanceExecutor(omnichainGovernanceExecutor_);\n _disableInitializers();\n }\n\n /**\n * @notice Initialize the contract\n * @param accessControlManager_ Address of access control manager\n */\n function initialize(address accessControlManager_) external initializer {\n require(accessControlManager_ != address(0), \"Address must not be zero\");\n __AccessControlled_init(accessControlManager_);\n }\n\n /**\n * @notice Sets the source message sender address\n * @param srcChainId_ The LayerZero id of a source chain\n * @param srcAddress_ The address of the contract on the source chain\n * @custom:access Controlled by AccessControlManager\n * @custom:event Emits SetTrustedRemoteAddress with source chain Id and source address\n */\n function setTrustedRemoteAddress(uint16 srcChainId_, bytes calldata srcAddress_) external {\n _checkAccessAllowed(\"setTrustedRemoteAddress(uint16,bytes)\");\n require(srcChainId_ != 0, \"ChainId must not be zero\");\n ensureNonzeroAddress(address(uint160(bytes20(srcAddress_))));\n require(srcAddress_.length == 20, \"Source address must be 20 bytes long\");\n OMNICHAIN_GOVERNANCE_EXECUTOR.setTrustedRemoteAddress(srcChainId_, srcAddress_);\n }\n\n /**\n * @notice Invoked when called function does not exist in the contract\n * @param data_ Calldata containing the encoded function call\n * @return Result of function call\n * @custom:access Controlled by Access Control Manager\n */\n fallback(bytes calldata data_) external returns (bytes memory) {\n string memory fun = functionRegistry[msg.sig];\n require(bytes(fun).length != 0, \"Function not found\");\n _checkAccessAllowed(fun);\n (bool ok, bytes memory res) = address(OMNICHAIN_GOVERNANCE_EXECUTOR).call(data_);\n require(ok, \"call failed\");\n return res;\n }\n\n /**\n * @notice A registry of functions that are allowed to be executed from proposals\n * @param signatures_ Function signature to be added or removed\n * @param active_ bool value, should be true to add function\n * @custom:access Only owner\n */\n function upsertSignature(string[] calldata signatures_, bool[] calldata active_) external onlyOwner {\n uint256 signatureLength = signatures_.length;\n require(signatureLength == active_.length, \"Input arrays must have the same length\");\n for (uint256 i; i < signatureLength; ++i) {\n bytes4 sigHash = bytes4(keccak256(bytes(signatures_[i])));\n bytes memory signature = bytes(functionRegistry[sigHash]);\n if (active_[i] && signature.length == 0) {\n functionRegistry[sigHash] = signatures_[i];\n emit FunctionRegistryChanged(signatures_[i], true);\n } else if (!active_[i] && signature.length != 0) {\n delete functionRegistry[sigHash];\n emit FunctionRegistryChanged(signatures_[i], false);\n }\n }\n }\n\n /**\n * @notice This function transfer the ownership of the executor from this contract to new owner\n * @param newOwner_ New owner of the governanceExecutor\n * @custom:access Controlled by AccessControlManager\n */\n\n function transferBridgeOwnership(address newOwner_) external {\n _checkAccessAllowed(\"transferBridgeOwnership(address)\");\n require(newOwner_ != address(0), \"Address must not be zero\");\n OMNICHAIN_GOVERNANCE_EXECUTOR.transferOwnership(newOwner_);\n }\n\n /**\n * @notice Empty implementation of renounce ownership to avoid any mishappening\n */\n function renounceOwnership() public virtual override {}\n}\n" + }, + "contracts/Cross-chain/OmnichainGovernanceExecutor.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.25;\n\nimport { ReentrancyGuard } from \"@openzeppelin/contracts/security/ReentrancyGuard.sol\";\nimport { BytesLib } from \"@layerzerolabs/solidity-examples/contracts/libraries/BytesLib.sol\";\nimport { ExcessivelySafeCall } from \"@layerzerolabs/solidity-examples/contracts/libraries/ExcessivelySafeCall.sol\";\nimport { ensureNonzeroAddress } from \"@venusprotocol/solidity-utilities/contracts/validators.sol\";\nimport { BaseOmnichainControllerDest } from \"./BaseOmnichainControllerDest.sol\";\nimport { ITimelock } from \"./interfaces/ITimelock.sol\";\n\n/**\n * @title OmnichainGovernanceExecutor\n * @notice Executes the proposal transactions sent from the main chain\n * @dev The owner of this contract controls LayerZero configuration. When used in production the owner will be OmnichainExecutor\n * This implementation is non-blocking, meaning the failed messages will not block the future messages from the source.\n * For the blocking behavior, derive the contract from LzApp.\n * @custom:security-contact https://github.com/VenusProtocol/governance-contracts#discussion\n */\ncontract OmnichainGovernanceExecutor is ReentrancyGuard, BaseOmnichainControllerDest {\n using BytesLib for bytes;\n using ExcessivelySafeCall for address;\n\n enum ProposalType {\n NORMAL,\n FASTTRACK,\n CRITICAL\n }\n\n struct Proposal {\n /** Unique id for looking up a proposal */\n uint256 id;\n /** The timestamp that the proposal will be available for execution, set once the vote succeeds */\n uint256 eta;\n /** The ordered list of target addresses for calls to be made */\n address[] targets;\n /** The ordered list of values (i.e. msg.value) to be passed to the calls to be made */\n uint256[] values;\n /** The ordered list of function signatures to be called */\n string[] signatures;\n /** The ordered list of calldata to be passed to each call */\n bytes[] calldatas;\n /** Flag marking whether the proposal has been canceled */\n bool canceled;\n /** Flag marking whether the proposal has been executed */\n bool executed;\n /** The type of the proposal */\n uint8 proposalType;\n }\n /*\n * @notice Possible states that a proposal may be in\n */\n enum ProposalState {\n Canceled,\n Queued,\n Executed\n }\n\n /**\n * @notice A privileged role that can cancel any proposal\n */\n address public guardian;\n\n /**\n * @notice Stores BNB chain layerzero endpoint id\n */\n uint16 public srcChainId;\n\n /**\n * @notice Last proposal count received\n */\n uint256 public lastProposalReceived;\n\n /**\n * @notice The official record of all proposals ever proposed\n */\n mapping(uint256 => Proposal) public proposals;\n\n /**\n * @notice Mapping containing Timelock addresses for each proposal type\n */\n mapping(uint256 => ITimelock) public proposalTimelocks;\n\n /**\n * @notice Represents queue state of proposal\n */\n mapping(uint256 => bool) public queued;\n\n /**\n * @notice Emitted when proposal is received\n */\n event ProposalReceived(\n uint256 indexed proposalId,\n address[] targets,\n uint256[] values,\n string[] signatures,\n bytes[] calldatas,\n uint8 proposalType\n );\n\n /**\n * @notice Emitted when proposal is queued\n */\n event ProposalQueued(uint256 indexed id, uint256 eta);\n\n /**\n * Emitted when proposal executed\n */\n event ProposalExecuted(uint256 indexed id);\n\n /**\n * @notice Emitted when proposal failed\n */\n event ReceivePayloadFailed(uint16 indexed srcChainId, bytes indexed srcAddress, uint64 nonce, bytes reason);\n\n /**\n * @notice Emitted when proposal is canceled\n */\n event ProposalCanceled(uint256 indexed id);\n\n /**\n * @notice Emitted when timelock added\n */\n event TimelockAdded(uint8 routeType, address indexed oldTimelock, address indexed newTimelock);\n\n /**\n * @notice Emitted when source layerzero endpoint id is updated\n */\n event SetSrcChainId(uint16 indexed oldSrcChainId, uint16 indexed newSrcChainId);\n\n /**\n * @notice Emitted when new guardian address is set\n */\n event NewGuardian(address indexed oldGuardian, address indexed newGuardian);\n\n /**\n * @notice Emitted when pending admin of Timelock is updated\n */\n event SetTimelockPendingAdmin(address, uint8);\n\n /**\n * @notice Thrown when proposal ID is invalid\n */\n error InvalidProposalId();\n\n constructor(address endpoint_, address guardian_, uint16 srcChainId_) BaseOmnichainControllerDest(endpoint_) {\n ensureNonzeroAddress(guardian_);\n guardian = guardian_;\n srcChainId = srcChainId_;\n }\n\n /**\n * @notice Update source layerzero endpoint id\n * @param srcChainId_ The new source chain id to be set\n * @custom:event Emit SetSrcChainId with old and new source id\n * @custom:access Only owner\n */\n function setSrcChainId(uint16 srcChainId_) external onlyOwner {\n emit SetSrcChainId(srcChainId, srcChainId_);\n srcChainId = srcChainId_;\n }\n\n /**\n * @notice Sets the new executor guardian\n * @param newGuardian The address of the new guardian\n * @custom:access Must be call by guardian or owner\n * @custom:event Emit NewGuardian with old and new guardian address\n */\n function setGuardian(address newGuardian) external {\n require(\n msg.sender == guardian || msg.sender == owner(),\n \"OmnichainGovernanceExecutor::setGuardian: owner or guardian only\"\n );\n ensureNonzeroAddress(newGuardian);\n emit NewGuardian(guardian, newGuardian);\n guardian = newGuardian;\n }\n\n /**\n * @notice Add timelocks to the ProposalTimelocks mapping\n * @param timelocks_ Array of addresses of all 3 timelocks\n * @custom:access Only owner\n * @custom:event Emits TimelockAdded with old and new timelock and route type\n */\n function addTimelocks(ITimelock[] memory timelocks_) external onlyOwner {\n uint8 length = uint8(type(ProposalType).max) + 1;\n require(\n timelocks_.length == length,\n \"OmnichainGovernanceExecutor::addTimelocks:number of timelocks should match the number of governance routes\"\n );\n for (uint8 i; i < length; ++i) {\n ensureNonzeroAddress(address(timelocks_[i]));\n emit TimelockAdded(i, address(proposalTimelocks[i]), address(timelocks_[i]));\n proposalTimelocks[i] = timelocks_[i];\n }\n }\n\n /**\n * @notice Executes a queued proposal if eta has passed\n * @param proposalId_ Id of proposal that is to be executed\n * @custom:event Emits ProposalExecuted with proposal id of executed proposal\n */\n function execute(uint256 proposalId_) external nonReentrant {\n require(\n state(proposalId_) == ProposalState.Queued,\n \"OmnichainGovernanceExecutor::execute: proposal can only be executed if it is queued\"\n );\n\n Proposal storage proposal = proposals[proposalId_];\n proposal.executed = true;\n ITimelock timelock = proposalTimelocks[proposal.proposalType];\n uint256 eta = proposal.eta;\n uint256 length = proposal.targets.length;\n\n emit ProposalExecuted(proposalId_);\n\n for (uint256 i; i < length; ++i) {\n timelock.executeTransaction(\n proposal.targets[i],\n proposal.values[i],\n proposal.signatures[i],\n proposal.calldatas[i],\n eta\n );\n }\n delete queued[proposalId_];\n }\n\n /**\n * @notice Cancels a proposal only if sender is the guardian and proposal is not executed\n * @param proposalId_ Id of proposal that is to be canceled\n * @custom:access Sender must be the guardian\n * @custom:event Emits ProposalCanceled with proposal id of the canceled proposal\n */\n function cancel(uint256 proposalId_) external {\n require(\n state(proposalId_) == ProposalState.Queued,\n \"OmnichainGovernanceExecutor::cancel: proposal should be queued and not executed\"\n );\n Proposal storage proposal = proposals[proposalId_];\n require(msg.sender == guardian, \"OmnichainGovernanceExecutor::cancel: sender must be guardian\");\n\n proposal.canceled = true;\n ITimelock timelock = proposalTimelocks[proposal.proposalType];\n uint256 eta = proposal.eta;\n uint256 length = proposal.targets.length;\n\n emit ProposalCanceled(proposalId_);\n\n for (uint256 i; i < length; ++i) {\n timelock.cancelTransaction(\n proposal.targets[i],\n proposal.values[i],\n proposal.signatures[i],\n proposal.calldatas[i],\n eta\n );\n }\n delete queued[proposalId_];\n }\n\n /**\n * @notice Sets the new pending admin of the Timelock\n * @param pendingAdmin_ Address of new pending admin\n * @param proposalType_ Type of proposal\n * @custom:access Only owner\n * @custom:event Emits SetTimelockPendingAdmin with new pending admin and proposal type\n */\n function setTimelockPendingAdmin(address pendingAdmin_, uint8 proposalType_) external onlyOwner {\n uint8 proposalTypeLength = uint8(type(ProposalType).max) + 1;\n require(\n proposalType_ < proposalTypeLength,\n \"OmnichainGovernanceExecutor::setTimelockPendingAdmin: invalid proposal type\"\n );\n\n proposalTimelocks[proposalType_].setPendingAdmin(pendingAdmin_);\n emit SetTimelockPendingAdmin(pendingAdmin_, proposalType_);\n }\n\n /**\n * @notice Resends a previously failed message\n * @param srcChainId_ Source chain Id\n * @param srcAddress_ Source address => local app address + remote app address\n * @param nonce_ Nonce to identify failed message\n * @param payload_ The payload of the message to be retried\n * @custom:access Only owner\n */\n function retryMessage(\n uint16 srcChainId_,\n bytes calldata srcAddress_,\n uint64 nonce_,\n bytes calldata payload_\n ) public payable override onlyOwner nonReentrant {\n require(\n keccak256(trustedRemoteLookup[srcChainId_]) == keccak256(srcAddress_),\n \"OmnichainGovernanceExecutor::retryMessage: not a trusted remote\"\n );\n super.retryMessage(srcChainId_, srcAddress_, nonce_, payload_);\n }\n\n /**\n * @notice Gets the state of a proposal\n * @param proposalId_ The id of the proposal\n * @return Proposal state\n */\n function state(uint256 proposalId_) public view returns (ProposalState) {\n Proposal storage proposal = proposals[proposalId_];\n if (proposal.canceled) {\n return ProposalState.Canceled;\n } else if (proposal.executed) {\n return ProposalState.Executed;\n } else if (queued[proposalId_]) {\n // queued only when proposal is received\n return ProposalState.Queued;\n } else {\n revert InvalidProposalId();\n }\n }\n\n /**\n * @notice Process blocking LayerZero receive request\n * @param srcChainId_ Source chain Id\n * @param srcAddress_ Source address from which payload is received\n * @param nonce_ Nonce associated with the payload to prevent replay attacks\n * @param payload_ Encoded payload containing proposal information\n * @custom:event Emit ReceivePayloadFailed if call fails\n */\n function _blockingLzReceive(\n uint16 srcChainId_,\n bytes memory srcAddress_,\n uint64 nonce_,\n bytes memory payload_\n ) internal virtual override {\n require(srcChainId_ == srcChainId, \"OmnichainGovernanceExecutor::_blockingLzReceive: invalid source chain id\");\n bytes32 hashedPayload = keccak256(payload_);\n bytes memory callData = abi.encodeCall(this.nonblockingLzReceive, (srcChainId_, srcAddress_, nonce_, payload_));\n\n (bool success, bytes memory reason) = address(this).excessivelySafeCall(gasleft() - 30000, 150, callData);\n // try-catch all errors/exceptions\n if (!success) {\n failedMessages[srcChainId_][srcAddress_][nonce_] = hashedPayload;\n emit ReceivePayloadFailed(srcChainId_, srcAddress_, nonce_, reason); // Retrieve payload from the src side tx if needed to clear\n }\n }\n\n /**\n * @notice Process non blocking LayerZero receive request\n * @param payload_ Encoded payload containing proposal information\n * @custom:event Emit ProposalReceived\n */\n function _nonblockingLzReceive(\n uint16,\n bytes memory,\n uint64,\n bytes memory payload_\n ) internal virtual override whenNotPaused {\n (bytes memory payload, uint256 pId) = abi.decode(payload_, (bytes, uint256));\n (\n address[] memory targets,\n uint256[] memory values,\n string[] memory signatures,\n bytes[] memory calldatas,\n uint8 pType\n ) = abi.decode(payload, (address[], uint256[], string[], bytes[], uint8));\n require(proposals[pId].id == 0, \"OmnichainGovernanceExecutor::_nonblockingLzReceive: duplicate proposal\");\n require(\n targets.length == values.length &&\n targets.length == signatures.length &&\n targets.length == calldatas.length,\n \"OmnichainGovernanceExecutor::_nonblockingLzReceive: proposal function information arity mismatch\"\n );\n require(\n pType < uint8(type(ProposalType).max) + 1,\n \"OmnichainGovernanceExecutor::_nonblockingLzReceive: invalid proposal type\"\n );\n _isEligibleToReceive(targets.length);\n\n Proposal memory newProposal = Proposal({\n id: pId,\n eta: 0,\n targets: targets,\n values: values,\n signatures: signatures,\n calldatas: calldatas,\n canceled: false,\n executed: false,\n proposalType: pType\n });\n\n proposals[pId] = newProposal;\n lastProposalReceived = pId;\n\n emit ProposalReceived(newProposal.id, targets, values, signatures, calldatas, pType);\n _queue(pId);\n }\n\n /**\n * @notice Queue proposal for execution\n * @param proposalId_ Proposal to be queued\n * @custom:event Emit ProposalQueued with proposal id and eta\n */\n function _queue(uint256 proposalId_) internal {\n Proposal storage proposal = proposals[proposalId_];\n uint256 eta = block.timestamp + proposalTimelocks[proposal.proposalType].delay();\n\n proposal.eta = eta;\n queued[proposalId_] = true;\n uint8 proposalType = proposal.proposalType;\n uint256 length = proposal.targets.length;\n emit ProposalQueued(proposalId_, eta);\n\n for (uint256 i; i < length; ++i) {\n _queueOrRevertInternal(\n proposal.targets[i],\n proposal.values[i],\n proposal.signatures[i],\n proposal.calldatas[i],\n eta,\n proposalType\n );\n }\n }\n\n /**\n * @notice Check for unique proposal\n * @param target_ Address of the contract with the method to be called\n * @param value_ Native token amount sent with the transaction\n * @param signature_ Signature of the function to be called\n * @param data_ Arguments to be passed to the function when called\n * @param eta_ Timestamp after which the transaction can be executed\n * @param proposalType_ Type of proposal\n */\n function _queueOrRevertInternal(\n address target_,\n uint256 value_,\n string memory signature_,\n bytes memory data_,\n uint256 eta_,\n uint8 proposalType_\n ) internal {\n require(\n !proposalTimelocks[proposalType_].queuedTransactions(\n keccak256(abi.encode(target_, value_, signature_, data_, eta_))\n ),\n \"OmnichainGovernanceExecutor::queueOrRevertInternal: identical proposal action already queued at eta\"\n );\n\n proposalTimelocks[proposalType_].queueTransaction(target_, value_, signature_, data_, eta_);\n }\n}\n" + }, + "contracts/Cross-chain/OmnichainProposalSender.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.25;\n\nimport { ReentrancyGuard } from \"@openzeppelin/contracts/security/ReentrancyGuard.sol\";\nimport { ILayerZeroEndpoint } from \"@layerzerolabs/solidity-examples/contracts/lzApp/interfaces/ILayerZeroEndpoint.sol\";\nimport { ensureNonzeroAddress } from \"@venusprotocol/solidity-utilities/contracts/validators.sol\";\nimport { BaseOmnichainControllerSrc } from \"./BaseOmnichainControllerSrc.sol\";\n\n/**\n * @title OmnichainProposalSender\n * @author Venus\n * @notice OmnichainProposalSender contract builds upon the functionality of its parent contract , BaseOmnichainControllerSrc\n * It sends a proposal's data to remote chains for execution after the proposal passes on the main chain\n * when used with GovernorBravo, the owner of this contract must be set to the Timelock contract\n * @custom:security-contact https://github.com/VenusProtocol/governance-contracts#discussion\n */\n\ncontract OmnichainProposalSender is ReentrancyGuard, BaseOmnichainControllerSrc {\n /**\n * @notice Stores the total number of remote proposals\n */\n uint256 public proposalCount;\n\n /**\n * @notice Execution hashes of failed messages\n * @dev [proposalId] -> [executionHash]\n */\n mapping(uint256 => bytes32) public storedExecutionHashes;\n\n /**\n * @notice LayerZero endpoint for sending messages to remote chains\n */\n ILayerZeroEndpoint public immutable LZ_ENDPOINT;\n\n /**\n * @notice Specifies the allowed path for sending messages (remote chainId => remote app address + local app address)\n */\n mapping(uint16 => bytes) public trustedRemoteLookup;\n\n /**\n * @notice Emitted when a remote message receiver is set for the remote chain\n */\n event SetTrustedRemoteAddress(uint16 indexed remoteChainId, bytes oldRemoteAddress, bytes newRemoteAddress);\n\n /**\n * @notice Event emitted when trusted remote sets to empty\n */\n event TrustedRemoteRemoved(uint16 indexed chainId);\n\n /**\n * @notice Emitted when a proposal execution request is sent to the remote chain\n */\n event ExecuteRemoteProposal(uint16 indexed remoteChainId, uint256 proposalId, bytes payload);\n\n /**\n * @notice Emitted when a previously failed message is successfully sent to the remote chain\n */\n event ClearPayload(uint256 indexed proposalId, bytes32 executionHash);\n\n /**\n * @notice Emitted when an execution hash of a failed message is saved\n */\n event StorePayload(\n uint256 indexed proposalId,\n uint16 indexed remoteChainId,\n bytes payload,\n bytes adapterParams,\n uint256 value,\n bytes reason\n );\n /**\n * @notice Emitted while fallback withdraw\n */\n event FallbackWithdraw(address indexed receiver, uint256 value);\n\n constructor(\n ILayerZeroEndpoint lzEndpoint_,\n address accessControlManager_\n ) BaseOmnichainControllerSrc(accessControlManager_) {\n ensureNonzeroAddress(address(lzEndpoint_));\n LZ_ENDPOINT = lzEndpoint_;\n }\n\n /**\n * @notice Estimates LayerZero fees for cross-chain message delivery to the remote chain\n * @dev The estimated fees are the minimum required; it's recommended to increase the fees amount when sending a message. The unused amount will be refunded\n * @param remoteChainId_ The LayerZero id of a remote chain\n * @param payload_ The payload to be sent to the remote chain. It's computed as follows:\n * payload = abi.encode(abi.encode(targets, values, signatures, calldatas, proposalType), pId)\n * @param useZro_ Bool that indicates whether to pay in ZRO tokens or not\n * @param adapterParams_ The params used to specify the custom amount of gas required for the execution on the destination\n * @return nativeFee The amount of fee in the native gas token (e.g. ETH)\n * @return zroFee The amount of fee in ZRO token\n */\n function estimateFees(\n uint16 remoteChainId_,\n bytes calldata payload_,\n bool useZro_,\n bytes calldata adapterParams_\n ) external view returns (uint256, uint256) {\n return LZ_ENDPOINT.estimateFees(remoteChainId_, address(this), payload_, useZro_, adapterParams_);\n }\n\n /**\n * @notice Remove trusted remote from storage\n * @param remoteChainId_ The chain's id corresponds to setting the trusted remote to empty\n * @custom:access Controlled by Access Control Manager\n * @custom:event Emit TrustedRemoteRemoved with remote chain id\n */\n function removeTrustedRemote(uint16 remoteChainId_) external {\n _ensureAllowed(\"removeTrustedRemote(uint16)\");\n require(trustedRemoteLookup[remoteChainId_].length != 0, \"OmnichainProposalSender: trusted remote not found\");\n delete trustedRemoteLookup[remoteChainId_];\n emit TrustedRemoteRemoved(remoteChainId_);\n }\n\n /**\n * @notice Sends a message to execute a remote proposal\n * @dev Stores the hash of the execution parameters if sending fails (e.g., due to insufficient fees)\n * @param remoteChainId_ The LayerZero id of the remote chain\n * @param payload_ The payload to be sent to the remote chain\n * It's computed as follows: payload = abi.encode(targets, values, signatures, calldatas, proposalType)\n * @param adapterParams_ The params used to specify the custom amount of gas required for the execution on the destination\n * @param zroPaymentAddress_ The address of the ZRO token holder who would pay for the transaction. This must be either address(this) or tx.origin\n * @custom:event Emits ExecuteRemoteProposal with remote chain id, proposal ID and payload on success\n * @custom:event Emits StorePayload with last stored payload proposal ID ,remote chain id , payload, adapter params , values and reason for failure\n * @custom:access Controlled by Access Control Manager\n */\n function execute(\n uint16 remoteChainId_,\n bytes calldata payload_,\n bytes calldata adapterParams_,\n address zroPaymentAddress_\n ) external payable whenNotPaused {\n _ensureAllowed(\"execute(uint16,bytes,bytes,address)\");\n\n // A zero value will result in a failed message; therefore, a positive value is required to send a message across the chain.\n require(msg.value > 0, \"OmnichainProposalSender: value cannot be zero\");\n require(payload_.length != 0, \"OmnichainProposalSender: empty payload\");\n\n bytes memory trustedRemote = trustedRemoteLookup[remoteChainId_];\n require(trustedRemote.length != 0, \"OmnichainProposalSender: destination chain is not a trusted source\");\n _validateProposal(remoteChainId_, payload_);\n uint256 _pId = ++proposalCount;\n bytes memory payload = abi.encode(payload_, _pId);\n\n try\n LZ_ENDPOINT.send{ value: msg.value }(\n remoteChainId_,\n trustedRemote,\n payload,\n payable(msg.sender),\n zroPaymentAddress_,\n adapterParams_\n )\n {\n emit ExecuteRemoteProposal(remoteChainId_, _pId, payload);\n } catch (bytes memory reason) {\n storedExecutionHashes[_pId] = keccak256(abi.encode(remoteChainId_, payload, adapterParams_, msg.value));\n emit StorePayload(_pId, remoteChainId_, payload, adapterParams_, msg.value, reason);\n }\n }\n\n /**\n * @notice Resends a previously failed message\n * @dev Allows providing more fees if needed. The extra fees will be refunded to the caller\n * @param pId_ The proposal ID to identify a failed message\n * @param remoteChainId_ The LayerZero id of the remote chain\n * @param payload_ The payload to be sent to the remote chain\n * It's computed as follows: payload = abi.encode(abi.encode(targets, values, signatures, calldatas, proposalType), pId)\n * @param adapterParams_ The params used to specify the custom amount of gas required for the execution on the destination\n * @param zroPaymentAddress_ The address of the ZRO token holder who would pay for the transaction.\n * @param originalValue_ The msg.value passed when execute() function was called\n * @custom:event Emits ClearPayload with proposal ID and hash\n * @custom:access Controlled by Access Control Manager\n */\n function retryExecute(\n uint256 pId_,\n uint16 remoteChainId_,\n bytes calldata payload_,\n bytes calldata adapterParams_,\n address zroPaymentAddress_,\n uint256 originalValue_\n ) external payable whenNotPaused nonReentrant {\n _ensureAllowed(\"retryExecute(uint256,uint16,bytes,bytes,address,uint256)\");\n bytes memory trustedRemote = trustedRemoteLookup[remoteChainId_];\n require(trustedRemote.length != 0, \"OmnichainProposalSender: destination chain is not a trusted source\");\n bytes32 hash = storedExecutionHashes[pId_];\n require(hash != bytes32(0), \"OmnichainProposalSender: no stored payload\");\n require(payload_.length != 0, \"OmnichainProposalSender: empty payload\");\n (bytes memory payload, ) = abi.decode(payload_, (bytes, uint256));\n _validateProposal(remoteChainId_, payload);\n\n require(\n keccak256(abi.encode(remoteChainId_, payload_, adapterParams_, originalValue_)) == hash,\n \"OmnichainProposalSender: invalid execution params\"\n );\n\n delete storedExecutionHashes[pId_];\n\n emit ClearPayload(pId_, hash);\n\n LZ_ENDPOINT.send{ value: originalValue_ + msg.value }(\n remoteChainId_,\n trustedRemote,\n payload_,\n payable(msg.sender),\n zroPaymentAddress_,\n adapterParams_\n );\n }\n\n /**\n * @notice Clear previously failed message\n * @param to_ Address of the receiver\n * @param pId_ The proposal ID to identify a failed message\n * @param remoteChainId_ The LayerZero id of the remote chain\n * @param payload_ The payload to be sent to the remote chain\n * It's computed as follows: payload = abi.encode(abi.encode(targets, values, signatures, calldatas, proposalType), pId)\n * @param adapterParams_ The params used to specify the custom amount of gas required for the execution on the destination\n * @param originalValue_ The msg.value passed when execute() function was called\n * @custom:access Only owner\n * @custom:event Emits ClearPayload with proposal ID and hash\n * @custom:event Emits FallbackWithdraw with receiver and amount\n */\n function fallbackWithdraw(\n address to_,\n uint256 pId_,\n uint16 remoteChainId_,\n bytes calldata payload_,\n bytes calldata adapterParams_,\n uint256 originalValue_\n ) external onlyOwner nonReentrant {\n ensureNonzeroAddress(to_);\n require(originalValue_ > 0, \"OmnichainProposalSender: invalid native amount\");\n require(payload_.length != 0, \"OmnichainProposalSender: empty payload\");\n\n bytes32 hash = storedExecutionHashes[pId_];\n require(hash != bytes32(0), \"OmnichainProposalSender: no stored payload\");\n\n bytes memory execution = abi.encode(remoteChainId_, payload_, adapterParams_, originalValue_);\n require(keccak256(execution) == hash, \"OmnichainProposalSender: invalid execution params\");\n\n delete storedExecutionHashes[pId_];\n\n emit FallbackWithdraw(to_, originalValue_);\n emit ClearPayload(pId_, hash);\n\n // Transfer the native to the `to_` address\n (bool sent, ) = to_.call{ value: originalValue_ }(\"\");\n require(sent, \"Call failed\");\n }\n\n /**\n * @notice Sets the remote message receiver address\n * @param remoteChainId_ The LayerZero id of a remote chain\n * @param newRemoteAddress_ The address of the contract on the remote chain to receive messages sent by this contract\n * @custom:access Controlled by AccessControlManager\n * @custom:event Emits SetTrustedRemoteAddress with remote chain Id and remote address\n */\n function setTrustedRemoteAddress(uint16 remoteChainId_, bytes calldata newRemoteAddress_) external {\n _ensureAllowed(\"setTrustedRemoteAddress(uint16,bytes)\");\n require(remoteChainId_ != 0, \"OmnichainProposalSender: chainId must not be zero\");\n ensureNonzeroAddress(address(uint160(bytes20(newRemoteAddress_))));\n require(newRemoteAddress_.length == 20, \"OmnichainProposalSender: remote address must be 20 bytes long\");\n bytes memory oldRemoteAddress = trustedRemoteLookup[remoteChainId_];\n trustedRemoteLookup[remoteChainId_] = abi.encodePacked(newRemoteAddress_, address(this));\n emit SetTrustedRemoteAddress(remoteChainId_, oldRemoteAddress, trustedRemoteLookup[remoteChainId_]);\n }\n\n /**\n * @notice Sets the configuration of the LayerZero messaging library of the specified version\n * @param version_ Messaging library version\n * @param chainId_ The LayerZero chainId for the pending config change\n * @param configType_ The type of configuration. Every messaging library has its own convention\n * @param config_ The configuration in bytes. It can encode arbitrary content\n * @custom:access Controlled by AccessControlManager\n */\n function setConfig(uint16 version_, uint16 chainId_, uint256 configType_, bytes calldata config_) external {\n _ensureAllowed(\"setConfig(uint16,uint16,uint256,bytes)\");\n LZ_ENDPOINT.setConfig(version_, chainId_, configType_, config_);\n }\n\n /**\n * @notice Sets the configuration of the LayerZero messaging library of the specified version\n * @param version_ New messaging library version\n * @custom:access Controlled by AccessControlManager\n */\n function setSendVersion(uint16 version_) external {\n _ensureAllowed(\"setSendVersion(uint16)\");\n LZ_ENDPOINT.setSendVersion(version_);\n }\n\n /**\n * @notice Gets the configuration of the LayerZero messaging library of the specified version\n * @param version_ Messaging library version\n * @param chainId_ The LayerZero chainId\n * @param configType_ Type of configuration. Every messaging library has its own convention\n */\n function getConfig(uint16 version_, uint16 chainId_, uint256 configType_) external view returns (bytes memory) {\n return LZ_ENDPOINT.getConfig(version_, chainId_, address(this), configType_);\n }\n\n function _validateProposal(uint16 remoteChainId_, bytes memory payload_) internal {\n (\n address[] memory targets,\n uint256[] memory values,\n string[] memory signatures,\n bytes[] memory calldatas,\n\n ) = abi.decode(payload_, (address[], uint[], string[], bytes[], uint8));\n require(\n targets.length == values.length &&\n targets.length == signatures.length &&\n targets.length == calldatas.length,\n \"OmnichainProposalSender: proposal function information arity mismatch\"\n );\n _isEligibleToSend(remoteChainId_, targets.length);\n }\n}\n" + }, + "contracts/Governance/AccessControlledV8.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.25;\n\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol\";\n\nimport \"./IAccessControlManagerV8.sol\";\n\n/**\n * @title AccessControlledV8\n * @author Venus\n * @notice This contract is helper between access control manager and actual contract. This contract further inherited by other contract (using solidity 0.8.13)\n * to integrate access controlled mechanism. It provides initialise methods and verifying access methods.\n */\nabstract contract AccessControlledV8 is Initializable, Ownable2StepUpgradeable {\n /// @notice Access control manager contract\n IAccessControlManagerV8 private _accessControlManager;\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[49] private __gap;\n\n /// @notice Emitted when access control manager contract address is changed\n event NewAccessControlManager(address oldAccessControlManager, address newAccessControlManager);\n\n /// @notice Thrown when the action is prohibited by AccessControlManager\n error Unauthorized(address sender, address calledContract, string methodSignature);\n\n function __AccessControlled_init(address accessControlManager_) internal onlyInitializing {\n __Ownable2Step_init();\n __AccessControlled_init_unchained(accessControlManager_);\n }\n\n function __AccessControlled_init_unchained(address accessControlManager_) internal onlyInitializing {\n _setAccessControlManager(accessControlManager_);\n }\n\n /**\n * @notice Sets the address of AccessControlManager\n * @dev Admin function to set address of AccessControlManager\n * @param accessControlManager_ The new address of the AccessControlManager\n * @custom:event Emits NewAccessControlManager event\n * @custom:access Only Governance\n */\n function setAccessControlManager(address accessControlManager_) external onlyOwner {\n _setAccessControlManager(accessControlManager_);\n }\n\n /**\n * @notice Returns the address of the access control manager contract\n */\n function accessControlManager() external view returns (IAccessControlManagerV8) {\n return _accessControlManager;\n }\n\n /**\n * @dev Internal function to set address of AccessControlManager\n * @param accessControlManager_ The new address of the AccessControlManager\n */\n function _setAccessControlManager(address accessControlManager_) internal {\n require(address(accessControlManager_) != address(0), \"invalid acess control manager address\");\n address oldAccessControlManager = address(_accessControlManager);\n _accessControlManager = IAccessControlManagerV8(accessControlManager_);\n emit NewAccessControlManager(oldAccessControlManager, accessControlManager_);\n }\n\n /**\n * @notice Reverts if the call is not allowed by AccessControlManager\n * @param signature Method signature\n */\n function _checkAccessAllowed(string memory signature) internal view {\n bool isAllowedToCall = _accessControlManager.isAllowedToCall(msg.sender, signature);\n\n if (!isAllowedToCall) {\n revert Unauthorized(msg.sender, address(this), signature);\n }\n }\n}\n" + }, + "contracts/Governance/AccessControlManager.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.25;\nimport \"@openzeppelin/contracts/access/AccessControl.sol\";\nimport \"./IAccessControlManagerV8.sol\";\n\n/**\n * @title AccessControlManager\n * @author Venus\n * @dev This contract is a wrapper of OpenZeppelin AccessControl extending it in a way to standartize access control within Venus Smart Contract Ecosystem.\n * @notice Access control plays a crucial role in the Venus governance model. It is used to restrict functions so that they can only be called from one\n * account or list of accounts (EOA or Contract Accounts).\n *\n * The implementation of `AccessControlManager`(https://github.com/VenusProtocol/governance-contracts/blob/main/contracts/Governance/AccessControlManager.sol)\n * inherits the [Open Zeppelin AccessControl](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/AccessControl.sol)\n * contract as a base for role management logic. There are two role types: admin and granular permissions.\n * \n * ## Granular Roles\n * \n * Granular roles are built by hashing the contract address and its function signature. For example, given contract `Foo` with function `Foo.bar()` which\n * is guarded by ACM, calling `giveRolePermission` for account B do the following:\n * \n * 1. Compute `keccak256(contractFooAddress,functionSignatureBar)`\n * 1. Add the computed role to the roles of account B\n * 1. Account B now can call `ContractFoo.bar()`\n * \n * ## Admin Roles\n * \n * Admin roles allow for an address to call a function signature on any contract guarded by the `AccessControlManager`. This is particularly useful for\n * contracts created by factories.\n * \n * For Admin roles a null address is hashed in place of the contract address (`keccak256(0x0000000000000000000000000000000000000000,functionSignatureBar)`.\n * \n * In the previous example, giving account B the admin role, account B will have permissions to call the `bar()` function on any contract that is guarded by\n * ACM, not only contract A.\n * \n * ## Protocol Integration\n * \n * All restricted functions in Venus Protocol use a hook to ACM in order to check if the caller has the right permission to call the guarded function.\n * `AccessControlledV5` and `AccessControlledV8` abstract contract makes this integration easier. They call ACM's external method\n * `isAllowedToCall(address caller, string functionSig)`. Here is an example of how `setCollateralFactor` function in `Comptroller` is integrated with ACM:\n\n```\n contract Comptroller is [...] AccessControlledV8 {\n [...]\n function setCollateralFactor(VToken vToken, uint256 newCollateralFactorMantissa, uint256 newLiquidationThresholdMantissa) external {\n _checkAccessAllowed(\"setCollateralFactor(address,uint256,uint256)\");\n [...]\n }\n }\n```\n */\ncontract AccessControlManager is AccessControl, IAccessControlManagerV8 {\n /// @notice Emitted when an account is given a permission to a certain contract function\n /// @dev If contract address is 0x000..0 this means that the account is a default admin of this function and\n /// can call any contract function with this signature\n event PermissionGranted(address account, address contractAddress, string functionSig);\n\n /// @notice Emitted when an account is revoked a permission to a certain contract function\n event PermissionRevoked(address account, address contractAddress, string functionSig);\n\n constructor() {\n // Grant the contract deployer the default admin role: it will be able\n // to grant and revoke any roles\n _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);\n }\n\n /**\n * @notice Gives a function call permission to one single account\n * @dev this function can be called only from Role Admin or DEFAULT_ADMIN_ROLE\n * @param contractAddress address of contract for which call permissions will be granted\n * @dev if contractAddress is zero address, the account can access the specified function\n * on **any** contract managed by this ACL\n * @param functionSig signature e.g. \"functionName(uint256,bool)\"\n * @param accountToPermit account that will be given access to the contract function\n * @custom:event Emits a {RoleGranted} and {PermissionGranted} events.\n */\n function giveCallPermission(address contractAddress, string calldata functionSig, address accountToPermit) public {\n bytes32 role = keccak256(abi.encodePacked(contractAddress, functionSig));\n grantRole(role, accountToPermit);\n emit PermissionGranted(accountToPermit, contractAddress, functionSig);\n }\n\n /**\n * @notice Revokes an account's permission to a particular function call\n * @dev this function can be called only from Role Admin or DEFAULT_ADMIN_ROLE\n * \t\tMay emit a {RoleRevoked} event.\n * @param contractAddress address of contract for which call permissions will be revoked\n * @param functionSig signature e.g. \"functionName(uint256,bool)\"\n * @custom:event Emits {RoleRevoked} and {PermissionRevoked} events.\n */\n function revokeCallPermission(\n address contractAddress,\n string calldata functionSig,\n address accountToRevoke\n ) public {\n bytes32 role = keccak256(abi.encodePacked(contractAddress, functionSig));\n revokeRole(role, accountToRevoke);\n emit PermissionRevoked(accountToRevoke, contractAddress, functionSig);\n }\n\n /**\n * @notice Verifies if the given account can call a contract's guarded function\n * @dev Since restricted contracts using this function as a permission hook, we can get contracts address with msg.sender\n * @param account for which call permissions will be checked\n * @param functionSig restricted function signature e.g. \"functionName(uint256,bool)\"\n * @return false if the user account cannot call the particular contract function\n *\n */\n function isAllowedToCall(address account, string calldata functionSig) public view returns (bool) {\n bytes32 role = keccak256(abi.encodePacked(msg.sender, functionSig));\n\n if (hasRole(role, account)) {\n return true;\n } else {\n role = keccak256(abi.encodePacked(address(0), functionSig));\n return hasRole(role, account);\n }\n }\n\n /**\n * @notice Verifies if the given account can call a contract's guarded function\n * @dev This function is used as a view function to check permissions rather than contract hook for access restriction check.\n * @param account for which call permissions will be checked against\n * @param contractAddress address of the restricted contract\n * @param functionSig signature of the restricted function e.g. \"functionName(uint256,bool)\"\n * @return false if the user account cannot call the particular contract function\n */\n function hasPermission(\n address account,\n address contractAddress,\n string calldata functionSig\n ) public view returns (bool) {\n bytes32 role = keccak256(abi.encodePacked(contractAddress, functionSig));\n return hasRole(role, account);\n }\n}\n" + }, + "contracts/Governance/IAccessControlManagerV8.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity ^0.8.25;\n\nimport \"@openzeppelin/contracts/access/IAccessControl.sol\";\n\n/**\n * @title IAccessControlManagerV8\n * @author Venus\n * @notice Interface implemented by the `AccessControlManagerV8` contract.\n */\ninterface IAccessControlManagerV8 is IAccessControl {\n function giveCallPermission(address contractAddress, string calldata functionSig, address accountToPermit) external;\n\n function revokeCallPermission(\n address contractAddress,\n string calldata functionSig,\n address accountToRevoke\n ) external;\n\n function isAllowedToCall(address account, string calldata functionSig) external view returns (bool);\n\n function hasPermission(\n address account,\n address contractAddress,\n string calldata functionSig\n ) external view returns (bool);\n}\n" + }, + "contracts/test/MockAccessTest.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.25;\n\nimport \"../Governance/AccessControlledV8.sol\";\nimport \"@layerzerolabs/solidity-examples/contracts/lzApp/mocks/LZEndpointMock.sol\";\n\ncontract MockAccessTest is AccessControlledV8 {\n /**\n * @param accessControlManager Access control manager contract address\n */\n function initialize(address accessControlManager) external initializer {\n __AccessControlled_init_unchained(accessControlManager);\n }\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 10000 + }, + "evmVersion": "paris", + "outputSelection": { + "*": { + "*": [ + "storageLayout", + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "evm.gasEstimates" + ], + "": ["ast"] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} diff --git a/deployments/berachainbartio/solcInputs/dd255b4e0156dfc73554b72a83ca02d8.json b/deployments/berachainbartio/solcInputs/dd255b4e0156dfc73554b72a83ca02d8.json new file mode 100644 index 00000000..b3f1599e --- /dev/null +++ b/deployments/berachainbartio/solcInputs/dd255b4e0156dfc73554b72a83ca02d8.json @@ -0,0 +1,40 @@ +{ + "language": "Solidity", + "sources": { + "@venusprotocol/solidity-utilities/contracts/validators.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.25;\n\n/// @notice Thrown if the supplied address is a zero address where it is not allowed\nerror ZeroAddressNotAllowed();\n\n/// @notice Thrown if the supplied value is 0 where it is not allowed\nerror ZeroValueNotAllowed();\n\n/// @notice Checks if the provided address is nonzero, reverts otherwise\n/// @param address_ Address to check\n/// @custom:error ZeroAddressNotAllowed is thrown if the provided address is a zero address\nfunction ensureNonzeroAddress(address address_) pure {\n if (address_ == address(0)) {\n revert ZeroAddressNotAllowed();\n }\n}\n\n/// @notice Checks if the provided value is nonzero, reverts otherwise\n/// @param value_ Value to check\n/// @custom:error ZeroValueNotAllowed is thrown if the provided value is 0\nfunction ensureNonzeroValue(uint256 value_) pure {\n if (value_ == 0) {\n revert ZeroValueNotAllowed();\n }\n}\n" + }, + "contracts/Governance/TimelockV8.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.25;\nimport { ensureNonzeroAddress } from \"@venusprotocol/solidity-utilities/contracts/validators.sol\";\n\n/**\n * @title TimelockV8\n * @author Venus\n * @notice The Timelock contract using solidity V8.\n * This contract also differs from the original timelock because it has a virtual function to get minimum delays\n * and allow test deployments to override the value.\n */\ncontract TimelockV8 {\n /// @notice Required period to execute a proposal transaction\n uint256 private constant DEFAULT_GRACE_PERIOD = 14 days;\n\n /// @notice Minimum amount of time a proposal transaction must be queued\n uint256 private constant DEFAULT_MINIMUM_DELAY = 1 seconds;\n\n /// @notice Maximum amount of time a proposal transaction must be queued\n uint256 private constant DEFAULT_MAXIMUM_DELAY = 30 days;\n\n /// @notice Timelock admin authorized to queue and execute transactions\n address public admin;\n\n /// @notice Account proposed as the next admin\n address public pendingAdmin;\n\n /// @notice Period for a proposal transaction to be queued\n uint256 public delay;\n\n /// @notice Mapping of queued transactions\n mapping(bytes32 => bool) public queuedTransactions;\n\n /// @notice Event emitted when a new admin is accepted\n event NewAdmin(address indexed oldAdmin, address indexed newAdmin);\n\n /// @notice Event emitted when a new admin is proposed\n event NewPendingAdmin(address indexed newPendingAdmin);\n\n /// @notice Event emitted when a new delay is proposed\n event NewDelay(uint256 indexed oldDelay, uint256 indexed newDelay);\n\n /// @notice Event emitted when a proposal transaction has been cancelled\n event CancelTransaction(\n bytes32 indexed txHash,\n address indexed target,\n uint256 value,\n string signature,\n bytes data,\n uint256 eta\n );\n\n /// @notice Event emitted when a proposal transaction has been executed\n event ExecuteTransaction(\n bytes32 indexed txHash,\n address indexed target,\n uint256 value,\n string signature,\n bytes data,\n uint256 eta\n );\n\n /// @notice Event emitted when a proposal transaction has been queued\n event QueueTransaction(\n bytes32 indexed txHash,\n address indexed target,\n uint256 value,\n string signature,\n bytes data,\n uint256 eta\n );\n\n constructor(address admin_, uint256 delay_) {\n require(delay_ >= MINIMUM_DELAY(), \"Timelock::constructor: Delay must exceed minimum delay.\");\n require(delay_ <= MAXIMUM_DELAY(), \"Timelock::setDelay: Delay must not exceed maximum delay.\");\n ensureNonzeroAddress(admin_);\n\n admin = admin_;\n delay = delay_;\n }\n\n fallback() external payable {}\n\n /**\n * @notice Setter for the transaction queue delay\n * @param delay_ The new delay period for the transaction queue\n * @custom:access Sender must be Timelock itself\n * @custom:event Emit NewDelay with old and new delay\n */\n function setDelay(uint256 delay_) public {\n require(msg.sender == address(this), \"Timelock::setDelay: Call must come from Timelock.\");\n require(delay_ >= MINIMUM_DELAY(), \"Timelock::setDelay: Delay must exceed minimum delay.\");\n require(delay_ <= MAXIMUM_DELAY(), \"Timelock::setDelay: Delay must not exceed maximum delay.\");\n emit NewDelay(delay, delay_);\n delay = delay_;\n }\n\n /**\n * @notice Return grace period\n * @return The duration of the grace period, specified as a uint256 value.\n */\n function GRACE_PERIOD() public view virtual returns (uint256) {\n return DEFAULT_GRACE_PERIOD;\n }\n\n /**\n * @notice Return required minimum delay\n * @return Minimum delay\n */\n function MINIMUM_DELAY() public view virtual returns (uint256) {\n return DEFAULT_MINIMUM_DELAY;\n }\n\n /**\n * @notice Return required maximum delay\n * @return Maximum delay\n */\n function MAXIMUM_DELAY() public view virtual returns (uint256) {\n return DEFAULT_MAXIMUM_DELAY;\n }\n\n /**\n * @notice Method for accepting a proposed admin\n * @custom:access Sender must be pending admin\n * @custom:event Emit NewAdmin with old and new admin\n */\n function acceptAdmin() public {\n require(msg.sender == pendingAdmin, \"Timelock::acceptAdmin: Call must come from pendingAdmin.\");\n emit NewAdmin(admin, msg.sender);\n admin = msg.sender;\n pendingAdmin = address(0);\n }\n\n /**\n * @notice Method to propose a new admin authorized to call timelock functions. This should be the Governor Contract\n * @param pendingAdmin_ Address of the proposed admin\n * @custom:access Sender must be Timelock contract itself or admin\n * @custom:event Emit NewPendingAdmin with new pending admin\n */\n function setPendingAdmin(address pendingAdmin_) public {\n require(\n msg.sender == address(this) || msg.sender == admin,\n \"Timelock::setPendingAdmin: Call must come from Timelock.\"\n );\n ensureNonzeroAddress(pendingAdmin_);\n pendingAdmin = pendingAdmin_;\n\n emit NewPendingAdmin(pendingAdmin);\n }\n\n /**\n * @notice Called for each action when queuing a proposal\n * @param target Address of the contract with the method to be called\n * @param value Native token amount sent with the transaction\n * @param signature Signature of the function to be called\n * @param data Arguments to be passed to the function when called\n * @param eta Timestamp after which the transaction can be executed\n * @return Hash of the queued transaction\n * @custom:access Sender must be admin\n * @custom:event Emit QueueTransaction\n */\n function queueTransaction(\n address target,\n uint256 value,\n string calldata signature,\n bytes calldata data,\n uint256 eta\n ) public returns (bytes32) {\n require(msg.sender == admin, \"Timelock::queueTransaction: Call must come from admin.\");\n require(\n eta >= getBlockTimestamp() + delay,\n \"Timelock::queueTransaction: Estimated execution block must satisfy delay.\"\n );\n\n bytes32 txHash = keccak256(abi.encode(target, value, signature, data, eta));\n require(!queuedTransactions[txHash], \"Timelock::queueTransaction: transaction already queued.\");\n queuedTransactions[txHash] = true;\n\n emit QueueTransaction(txHash, target, value, signature, data, eta);\n return txHash;\n }\n\n /**\n * @notice Called to cancel a queued transaction\n * @param target Address of the contract with the method to be called\n * @param value Native token amount sent with the transaction\n * @param signature Signature of the function to be called\n * @param data Arguments to be passed to the function when called\n * @param eta Timestamp after which the transaction can be executed\n * @custom:access Sender must be admin\n * @custom:event Emit CancelTransaction\n */\n function cancelTransaction(\n address target,\n uint256 value,\n string calldata signature,\n bytes calldata data,\n uint256 eta\n ) public {\n require(msg.sender == admin, \"Timelock::cancelTransaction: Call must come from admin.\");\n\n bytes32 txHash = keccak256(abi.encode(target, value, signature, data, eta));\n require(queuedTransactions[txHash], \"Timelock::cancelTransaction: transaction is not queued yet.\");\n delete (queuedTransactions[txHash]);\n\n emit CancelTransaction(txHash, target, value, signature, data, eta);\n }\n\n /**\n * @notice Called to execute a queued transaction\n * @param target Address of the contract with the method to be called\n * @param value Native token amount sent with the transaction\n * @param signature Signature of the function to be called\n * @param data Arguments to be passed to the function when called\n * @param eta Timestamp after which the transaction can be executed\n * @return Result of function call\n * @custom:access Sender must be admin\n * @custom:event Emit ExecuteTransaction\n */\n function executeTransaction(\n address target,\n uint256 value,\n string calldata signature,\n bytes calldata data,\n uint256 eta\n ) public returns (bytes memory) {\n require(msg.sender == admin, \"Timelock::executeTransaction: Call must come from admin.\");\n\n bytes32 txHash = keccak256(abi.encode(target, value, signature, data, eta));\n require(queuedTransactions[txHash], \"Timelock::executeTransaction: Transaction hasn't been queued.\");\n require(getBlockTimestamp() >= eta, \"Timelock::executeTransaction: Transaction hasn't surpassed time lock.\");\n require(getBlockTimestamp() <= eta + GRACE_PERIOD(), \"Timelock::executeTransaction: Transaction is stale.\");\n\n delete (queuedTransactions[txHash]);\n\n bytes memory callData;\n\n if (bytes(signature).length == 0) {\n callData = data;\n } else {\n callData = abi.encodePacked(bytes4(keccak256(bytes(signature))), data);\n }\n\n // solium-disable-next-line security/no-call-value\n (bool success, bytes memory returnData) = target.call{ value: value }(callData);\n require(success, \"Timelock::executeTransaction: Transaction execution reverted.\");\n\n emit ExecuteTransaction(txHash, target, value, signature, data, eta);\n\n return returnData;\n }\n\n /**\n * @notice Returns the current block timestamp\n * @return The current block timestamp\n */\n function getBlockTimestamp() internal view returns (uint256) {\n // solium-disable-next-line security/no-block-members\n return block.timestamp;\n }\n}\n" + }, + "contracts/test/TestTimelockV8.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.25;\nimport { TimelockV8 } from \"../Governance/TimelockV8.sol\";\n\ncontract TestTimelockV8 is TimelockV8 {\n constructor(address admin_, uint256 delay_) public TimelockV8(admin_, delay_) {}\n\n function GRACE_PERIOD() public view override returns (uint256) {\n return 1 hours;\n }\n\n function MINIMUM_DELAY() public view override returns (uint256) {\n return 1;\n }\n\n function MAXIMUM_DELAY() public view override returns (uint256) {\n return 1 hours;\n }\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 10000 + }, + "evmVersion": "paris", + "outputSelection": { + "*": { + "*": [ + "storageLayout", + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "evm.gasEstimates" + ], + "": ["ast"] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} diff --git a/deployments/berachainbartio/solcInputs/e5536fb1b5f4db72d1c808989021a017.json b/deployments/berachainbartio/solcInputs/e5536fb1b5f4db72d1c808989021a017.json new file mode 100644 index 00000000..9ffdabc3 --- /dev/null +++ b/deployments/berachainbartio/solcInputs/e5536fb1b5f4db72d1c808989021a017.json @@ -0,0 +1,73 @@ +{ + "language": "Solidity", + "sources": { + "contracts/hardhat-dependency-compiler/hardhat-deploy/solc_0.8/openzeppelin/proxy/transparent/ProxyAdmin.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity >0.0.0;\nimport 'hardhat-deploy/solc_0.8/openzeppelin/proxy/transparent/ProxyAdmin.sol';\n" + }, + "contracts/hardhat-dependency-compiler/hardhat-deploy/solc_0.8/proxy/OptimizedTransparentUpgradeableProxy.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity >0.0.0;\nimport 'hardhat-deploy/solc_0.8/proxy/OptimizedTransparentUpgradeableProxy.sol';\n" + }, + "hardhat-deploy/solc_0.8/openzeppelin/access/Ownable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/Context.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract Ownable is Context {\n address private _owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the deployer as the initial owner.\n */\n constructor (address initialOwner) {\n _transferOwnership(initialOwner);\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view virtual returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n _;\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions anymore. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby removing any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n _transferOwnership(address(0));\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}\n" + }, + "hardhat-deploy/solc_0.8/openzeppelin/interfaces/draft-IERC1822.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (interfaces/draft-IERC1822.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\n * proxy whose upgrades are fully controlled by the current implementation.\n */\ninterface IERC1822Proxiable {\n /**\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\n * address.\n *\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\n * function revert if invoked through a proxy.\n */\n function proxiableUUID() external view returns (bytes32);\n}\n" + }, + "hardhat-deploy/solc_0.8/openzeppelin/proxy/beacon/IBeacon.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\n */\ninterface IBeacon {\n /**\n * @dev Must return an address that can be used as a delegate call target.\n *\n * {BeaconProxy} will check that this address is a contract.\n */\n function implementation() external view returns (address);\n}\n" + }, + "hardhat-deploy/solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Proxy.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (proxy/ERC1967/ERC1967Proxy.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../Proxy.sol\";\nimport \"./ERC1967Upgrade.sol\";\n\n/**\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\n * implementation address that can be changed. This address is stored in storage in the location specified by\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\n * implementation behind the proxy.\n */\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\n /**\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\n *\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\n * function call, and allows initializating the storage of the proxy like a Solidity constructor.\n */\n constructor(address _logic, bytes memory _data) payable {\n assert(_IMPLEMENTATION_SLOT == bytes32(uint256(keccak256(\"eip1967.proxy.implementation\")) - 1));\n _upgradeToAndCall(_logic, _data, false);\n }\n\n /**\n * @dev Returns the current implementation address.\n */\n function _implementation() internal view virtual override returns (address impl) {\n return ERC1967Upgrade._getImplementation();\n }\n}\n" + }, + "hardhat-deploy/solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Upgrade.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/ERC1967/ERC1967Upgrade.sol)\n\npragma solidity ^0.8.2;\n\nimport \"../beacon/IBeacon.sol\";\nimport \"../../interfaces/draft-IERC1822.sol\";\nimport \"../../utils/Address.sol\";\nimport \"../../utils/StorageSlot.sol\";\n\n/**\n * @dev This abstract contract provides getters and event emitting update functions for\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\n *\n * _Available since v4.1._\n *\n * @custom:oz-upgrades-unsafe-allow delegatecall\n */\nabstract contract ERC1967Upgrade {\n // This is the keccak-256 hash of \"eip1967.proxy.rollback\" subtracted by 1\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\n\n /**\n * @dev Storage slot with the address of the current implementation.\n * This is the keccak-256 hash of \"eip1967.proxy.implementation\" subtracted by 1, and is\n * validated in the constructor.\n */\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n\n /**\n * @dev Emitted when the implementation is upgraded.\n */\n event Upgraded(address indexed implementation);\n\n /**\n * @dev Returns the current implementation address.\n */\n function _getImplementation() internal view returns (address) {\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n }\n\n /**\n * @dev Stores a new address in the EIP1967 implementation slot.\n */\n function _setImplementation(address newImplementation) private {\n require(Address.isContract(newImplementation), \"ERC1967: new implementation is not a contract\");\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n }\n\n /**\n * @dev Perform implementation upgrade\n *\n * Emits an {Upgraded} event.\n */\n function _upgradeTo(address newImplementation) internal {\n _setImplementation(newImplementation);\n emit Upgraded(newImplementation);\n }\n\n /**\n * @dev Perform implementation upgrade with additional setup call.\n *\n * Emits an {Upgraded} event.\n */\n function _upgradeToAndCall(\n address newImplementation,\n bytes memory data,\n bool forceCall\n ) internal {\n _upgradeTo(newImplementation);\n if (data.length > 0 || forceCall) {\n Address.functionDelegateCall(newImplementation, data);\n }\n }\n\n /**\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\n *\n * Emits an {Upgraded} event.\n */\n function _upgradeToAndCallUUPS(\n address newImplementation,\n bytes memory data,\n bool forceCall\n ) internal {\n // Upgrades from old implementations will perform a rollback test. This test requires the new\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\n // this special case will break upgrade paths from old UUPS implementation to new ones.\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\n _setImplementation(newImplementation);\n } else {\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\n require(slot == _IMPLEMENTATION_SLOT, \"ERC1967Upgrade: unsupported proxiableUUID\");\n } catch {\n revert(\"ERC1967Upgrade: new implementation is not UUPS\");\n }\n _upgradeToAndCall(newImplementation, data, forceCall);\n }\n }\n\n /**\n * @dev Storage slot with the admin of the contract.\n * This is the keccak-256 hash of \"eip1967.proxy.admin\" subtracted by 1, and is\n * validated in the constructor.\n */\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\n\n /**\n * @dev Emitted when the admin account has changed.\n */\n event AdminChanged(address previousAdmin, address newAdmin);\n\n /**\n * @dev Returns the current admin.\n */\n function _getAdmin() internal view virtual returns (address) {\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\n }\n\n /**\n * @dev Stores a new address in the EIP1967 admin slot.\n */\n function _setAdmin(address newAdmin) private {\n require(newAdmin != address(0), \"ERC1967: new admin is the zero address\");\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\n }\n\n /**\n * @dev Changes the admin of the proxy.\n *\n * Emits an {AdminChanged} event.\n */\n function _changeAdmin(address newAdmin) internal {\n emit AdminChanged(_getAdmin(), newAdmin);\n _setAdmin(newAdmin);\n }\n\n /**\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\n */\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\n\n /**\n * @dev Emitted when the beacon is upgraded.\n */\n event BeaconUpgraded(address indexed beacon);\n\n /**\n * @dev Returns the current beacon.\n */\n function _getBeacon() internal view returns (address) {\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\n }\n\n /**\n * @dev Stores a new beacon in the EIP1967 beacon slot.\n */\n function _setBeacon(address newBeacon) private {\n require(Address.isContract(newBeacon), \"ERC1967: new beacon is not a contract\");\n require(Address.isContract(IBeacon(newBeacon).implementation()), \"ERC1967: beacon implementation is not a contract\");\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\n }\n\n /**\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\n *\n * Emits a {BeaconUpgraded} event.\n */\n function _upgradeBeaconToAndCall(\n address newBeacon,\n bytes memory data,\n bool forceCall\n ) internal {\n _setBeacon(newBeacon);\n emit BeaconUpgraded(newBeacon);\n if (data.length > 0 || forceCall) {\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\n }\n }\n}\n" + }, + "hardhat-deploy/solc_0.8/openzeppelin/proxy/Proxy.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/Proxy.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\n * be specified by overriding the virtual {_implementation} function.\n *\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\n * different contract through the {_delegate} function.\n *\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\n */\nabstract contract Proxy {\n /**\n * @dev Delegates the current call to `implementation`.\n *\n * This function does not return to its internal call site, it will return directly to the external caller.\n */\n function _delegate(address implementation) internal virtual {\n assembly {\n // Copy msg.data. We take full control of memory in this inline assembly\n // block because it will not return to Solidity code. We overwrite the\n // Solidity scratch pad at memory position 0.\n calldatacopy(0, 0, calldatasize())\n\n // Call the implementation.\n // out and outsize are 0 because we don't know the size yet.\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\n\n // Copy the returned data.\n returndatacopy(0, 0, returndatasize())\n\n switch result\n // delegatecall returns 0 on error.\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n /**\n * @dev This is a virtual function that should be overriden so it returns the address to which the fallback function\n * and {_fallback} should delegate.\n */\n function _implementation() internal view virtual returns (address);\n\n /**\n * @dev Delegates the current call to the address returned by `_implementation()`.\n *\n * This function does not return to its internall call site, it will return directly to the external caller.\n */\n function _fallback() internal virtual {\n _beforeFallback();\n _delegate(_implementation());\n }\n\n /**\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\n * function in the contract matches the call data.\n */\n fallback() external payable virtual {\n _fallback();\n }\n\n /**\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\n * is empty.\n */\n receive() external payable virtual {\n _fallback();\n }\n\n /**\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\n * call, or as part of the Solidity `fallback` or `receive` functions.\n *\n * If overriden should call `super._beforeFallback()`.\n */\n function _beforeFallback() internal virtual {}\n}\n" + }, + "hardhat-deploy/solc_0.8/openzeppelin/proxy/transparent/ProxyAdmin.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (proxy/transparent/ProxyAdmin.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./TransparentUpgradeableProxy.sol\";\nimport \"../../access/Ownable.sol\";\n\n/**\n * @dev This is an auxiliary contract meant to be assigned as the admin of a {TransparentUpgradeableProxy}. For an\n * explanation of why you would want to use this see the documentation for {TransparentUpgradeableProxy}.\n */\ncontract ProxyAdmin is Ownable {\n\n constructor (address initialOwner) Ownable(initialOwner) {}\n\n /**\n * @dev Returns the current implementation of `proxy`.\n *\n * Requirements:\n *\n * - This contract must be the admin of `proxy`.\n */\n function getProxyImplementation(TransparentUpgradeableProxy proxy) public view virtual returns (address) {\n // We need to manually run the static call since the getter cannot be flagged as view\n // bytes4(keccak256(\"implementation()\")) == 0x5c60da1b\n (bool success, bytes memory returndata) = address(proxy).staticcall(hex\"5c60da1b\");\n require(success);\n return abi.decode(returndata, (address));\n }\n\n /**\n * @dev Returns the current admin of `proxy`.\n *\n * Requirements:\n *\n * - This contract must be the admin of `proxy`.\n */\n function getProxyAdmin(TransparentUpgradeableProxy proxy) public view virtual returns (address) {\n // We need to manually run the static call since the getter cannot be flagged as view\n // bytes4(keccak256(\"admin()\")) == 0xf851a440\n (bool success, bytes memory returndata) = address(proxy).staticcall(hex\"f851a440\");\n require(success);\n return abi.decode(returndata, (address));\n }\n\n /**\n * @dev Changes the admin of `proxy` to `newAdmin`.\n *\n * Requirements:\n *\n * - This contract must be the current admin of `proxy`.\n */\n function changeProxyAdmin(TransparentUpgradeableProxy proxy, address newAdmin) public virtual onlyOwner {\n proxy.changeAdmin(newAdmin);\n }\n\n /**\n * @dev Upgrades `proxy` to `implementation`. See {TransparentUpgradeableProxy-upgradeTo}.\n *\n * Requirements:\n *\n * - This contract must be the admin of `proxy`.\n */\n function upgrade(TransparentUpgradeableProxy proxy, address implementation) public virtual onlyOwner {\n proxy.upgradeTo(implementation);\n }\n\n /**\n * @dev Upgrades `proxy` to `implementation` and calls a function on the new implementation. See\n * {TransparentUpgradeableProxy-upgradeToAndCall}.\n *\n * Requirements:\n *\n * - This contract must be the admin of `proxy`.\n */\n function upgradeAndCall(\n TransparentUpgradeableProxy proxy,\n address implementation,\n bytes memory data\n ) public payable virtual onlyOwner {\n proxy.upgradeToAndCall{value: msg.value}(implementation, data);\n }\n}\n" + }, + "hardhat-deploy/solc_0.8/openzeppelin/proxy/transparent/TransparentUpgradeableProxy.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (proxy/transparent/TransparentUpgradeableProxy.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../ERC1967/ERC1967Proxy.sol\";\n\n/**\n * @dev This contract implements a proxy that is upgradeable by an admin.\n *\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\n * clashing], which can potentially be used in an attack, this contract uses the\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\n * things that go hand in hand:\n *\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\n * that call matches one of the admin functions exposed by the proxy itself.\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\n * \"admin cannot fallback to proxy target\".\n *\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\n * to sudden errors when trying to call a function from the proxy implementation.\n *\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\n */\ncontract TransparentUpgradeableProxy is ERC1967Proxy {\n /**\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\n */\n constructor(\n address _logic,\n address admin_,\n bytes memory _data\n ) payable ERC1967Proxy(_logic, _data) {\n assert(_ADMIN_SLOT == bytes32(uint256(keccak256(\"eip1967.proxy.admin\")) - 1));\n _changeAdmin(admin_);\n }\n\n /**\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\n */\n modifier ifAdmin() {\n if (msg.sender == _getAdmin()) {\n _;\n } else {\n _fallback();\n }\n }\n\n /**\n * @dev Returns the current admin.\n *\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.\n *\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\n */\n function admin() external ifAdmin returns (address admin_) {\n admin_ = _getAdmin();\n }\n\n /**\n * @dev Returns the current implementation.\n *\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.\n *\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\n */\n function implementation() external ifAdmin returns (address implementation_) {\n implementation_ = _implementation();\n }\n\n /**\n * @dev Changes the admin of the proxy.\n *\n * Emits an {AdminChanged} event.\n *\n * NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\n */\n function changeAdmin(address newAdmin) external virtual ifAdmin {\n _changeAdmin(newAdmin);\n }\n\n /**\n * @dev Upgrade the implementation of the proxy.\n *\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\n */\n function upgradeTo(address newImplementation) external ifAdmin {\n _upgradeToAndCall(newImplementation, bytes(\"\"), false);\n }\n\n /**\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\n * proxied contract.\n *\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\n */\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin {\n _upgradeToAndCall(newImplementation, data, true);\n }\n\n /**\n * @dev Returns the current admin.\n */\n function _admin() internal view virtual returns (address) {\n return _getAdmin();\n }\n\n /**\n * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.\n */\n function _beforeFallback() internal virtual override {\n require(msg.sender != _getAdmin(), \"TransparentUpgradeableProxy: admin cannot fallback to proxy target\");\n super._beforeFallback();\n }\n}\n" + }, + "hardhat-deploy/solc_0.8/openzeppelin/utils/Address.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n * ====\n *\n * [IMPORTANT]\n * ====\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\n *\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n * constructor.\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize/address.code.length, which returns 0\n // for contracts in construction, since the code is only stored at the end\n // of the constructor execution.\n\n return account.code.length > 0;\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n (bool success, ) = recipient.call{value: amount}(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain `call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCall(target, data, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n require(isContract(target), \"Address: call to non-contract\");\n\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, \"Address: low-level static call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n require(isContract(target), \"Address: static call to non-contract\");\n\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(isContract(target), \"Address: delegate call to non-contract\");\n\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason using the provided one.\n *\n * _Available since v4.3._\n */\n function verifyCallResult(\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal pure returns (bytes memory) {\n if (success) {\n return returndata;\n } else {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n }\n}\n" + }, + "hardhat-deploy/solc_0.8/openzeppelin/utils/Context.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n}\n" + }, + "hardhat-deploy/solc_0.8/openzeppelin/utils/StorageSlot.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/StorageSlot.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Library for reading and writing primitive types to specific storage slots.\n *\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\n * This library helps with reading and writing to such slots without the need for inline assembly.\n *\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\n *\n * Example usage to set ERC1967 implementation slot:\n * ```\n * contract ERC1967 {\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n *\n * function _getImplementation() internal view returns (address) {\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n * }\n *\n * function _setImplementation(address newImplementation) internal {\n * require(Address.isContract(newImplementation), \"ERC1967: new implementation is not a contract\");\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n * }\n * }\n * ```\n *\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\n */\nlibrary StorageSlot {\n struct AddressSlot {\n address value;\n }\n\n struct BooleanSlot {\n bool value;\n }\n\n struct Bytes32Slot {\n bytes32 value;\n }\n\n struct Uint256Slot {\n uint256 value;\n }\n\n /**\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\n */\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\n */\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\n */\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\n */\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\n assembly {\n r.slot := slot\n }\n }\n}\n" + }, + "hardhat-deploy/solc_0.8/proxy/OptimizedTransparentUpgradeableProxy.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (proxy/transparent/TransparentUpgradeableProxy.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../openzeppelin/proxy/ERC1967/ERC1967Proxy.sol\";\n\n/**\n * @dev This contract implements a proxy that is upgradeable by an admin.\n *\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\n * clashing], which can potentially be used in an attack, this contract uses the\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\n * things that go hand in hand:\n *\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\n * that call matches one of the admin functions exposed by the proxy itself.\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\n * \"admin cannot fallback to proxy target\".\n *\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\n * to sudden errors when trying to call a function from the proxy implementation.\n *\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\n */\ncontract OptimizedTransparentUpgradeableProxy is ERC1967Proxy {\n address internal immutable _ADMIN;\n\n /**\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\n */\n constructor(\n address _logic,\n address admin_,\n bytes memory _data\n ) payable ERC1967Proxy(_logic, _data) {\n assert(_ADMIN_SLOT == bytes32(uint256(keccak256(\"eip1967.proxy.admin\")) - 1));\n _ADMIN = admin_;\n\n // still store it to work with EIP-1967\n bytes32 slot = _ADMIN_SLOT;\n // solhint-disable-next-line no-inline-assembly\n assembly {\n sstore(slot, admin_)\n }\n emit AdminChanged(address(0), admin_);\n }\n\n /**\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\n */\n modifier ifAdmin() {\n if (msg.sender == _getAdmin()) {\n _;\n } else {\n _fallback();\n }\n }\n\n /**\n * @dev Returns the current admin.\n *\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.\n *\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\n */\n function admin() external ifAdmin returns (address admin_) {\n admin_ = _getAdmin();\n }\n\n /**\n * @dev Returns the current implementation.\n *\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.\n *\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\n */\n function implementation() external ifAdmin returns (address implementation_) {\n implementation_ = _implementation();\n }\n\n /**\n * @dev Upgrade the implementation of the proxy.\n *\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\n */\n function upgradeTo(address newImplementation) external ifAdmin {\n _upgradeToAndCall(newImplementation, bytes(\"\"), false);\n }\n\n /**\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\n * proxied contract.\n *\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\n */\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin {\n _upgradeToAndCall(newImplementation, data, true);\n }\n\n /**\n * @dev Returns the current admin.\n */\n function _admin() internal view virtual returns (address) {\n return _getAdmin();\n }\n\n /**\n * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.\n */\n function _beforeFallback() internal virtual override {\n require(msg.sender != _getAdmin(), \"TransparentUpgradeableProxy: admin cannot fallback to proxy target\");\n super._beforeFallback();\n }\n\n function _getAdmin() internal view virtual override returns (address) {\n return _ADMIN;\n }\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 10000 + }, + "evmVersion": "paris", + "outputSelection": { + "*": { + "*": [ + "storageLayout", + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "evm.gasEstimates" + ], + "": ["ast"] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} diff --git a/hardhat.config.ts b/hardhat.config.ts index 75477f57..aeb03933 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -151,6 +151,12 @@ const config: HardhatUserConfig = { live: true, accounts: DEPLOYER_PRIVATE_KEY ? [`0x${DEPLOYER_PRIVATE_KEY}`] : [], }, + berachainbartio: { + url: process.env.ARCHIVE_NODE_berachainbartio || "https://bartio.rpc.berachain.com", + chainId: 80084, + live: true, + accounts: DEPLOYER_PRIVATE_KEY ? [`0x${DEPLOYER_PRIVATE_KEY}`] : [], + }, unichainsepolia: { url: process.env.ARCHIVE_NODE_unichainsepolia || "https://sepolia.unichain.org", chainId: 1301, @@ -180,6 +186,7 @@ const config: HardhatUserConfig = { basemainnet: process.env.ETHERSCAN_API_KEY || "ETHERSCAN_API_KEY", unichainsepolia: process.env.ETHERSCAN_API_KEY || "ETHERSCAN_API_KEY", unichainmainnet: process.env.ETHERSCAN_API_KEY || "ETHERSCAN_API_KEY", + berachainbartio: process.env.ETHERSCAN_API_KEY || "ETHERSCAN_API_KEY", }, customChains: [ { @@ -294,6 +301,14 @@ const config: HardhatUserConfig = { browserURL: "https://uniscan.xyz/", }, }, + { + network: "berachainbartio", + chainId: 80084, + urls: { + apiURL: "https://api.routescan.io/v2/network/testnet/evm/80084/etherscan", + browserURL: "https://bartio.beratrail.io", + }, + }, ], }, paths: { diff --git a/helpers/deploy/constants.ts b/helpers/deploy/constants.ts index 9b0cf353..0e46063d 100644 --- a/helpers/deploy/constants.ts +++ b/helpers/deploy/constants.ts @@ -15,6 +15,7 @@ export enum SUPPORTED_NETWORKS { BASEMAINNET = "basemainnet", UNICHAINSEPOLIA = "unichainsepolia", UNICHAINMAINNET = "unichainmainnet", + BERACHAINBARTIO = "berachainbartio", HARDHAT = "hardhat", } @@ -35,6 +36,7 @@ export const LZ_CHAINID: Record = { opsepolia: 10232, basesepolia: 10245, unichainsepolia: 10333, + berachainbartio: 30362, hardhat: 10102, }; diff --git a/helpers/deploy/deploymentConfig.ts b/helpers/deploy/deploymentConfig.ts index 2513763a..b664aa98 100644 --- a/helpers/deploy/deploymentConfig.ts +++ b/helpers/deploy/deploymentConfig.ts @@ -200,6 +200,12 @@ export const config: Config = { { method: "setMaxDailyReceiveLimit(uint256)", args: [100] }, ], }, + berachainbartio: { + methods: [ + { method: "setMinDstGas(uint16,uint16,uint256)", args: [LZ_CHAINID["bsctestnet"], 0, 200000] }, + { method: "setMaxDailyReceiveLimit(uint256)", args: [100] }, + ], + }, hardhat: { methods: [ { method: "setMinDstGas(uint16,uint16,uint256)", args: [LZ_CHAINID["bsctestnet"], 0, 200000] }, diff --git a/helpers/deploy/deploymentUtils.ts b/helpers/deploy/deploymentUtils.ts index 80cf2764..121f211d 100644 --- a/helpers/deploy/deploymentUtils.ts +++ b/helpers/deploy/deploymentUtils.ts @@ -3,22 +3,6 @@ import { HardhatRuntimeEnvironment } from "hardhat/types"; import bscMainnetGovernanceDeployments from "../../deployments/bscmainnet.json"; import bscTestnetGovernanceDeployments from "../../deployments/bsctestnet.json"; -import arbitrumoneGovernanceDeployments from "../../deployments/arbitrumone.json"; -import arbitrumsepoliaGovernanceDeployments from "../../deployments/arbitrumsepolia.json"; -import bscmainnetGovernanceDeployments from "../../deployments/bscmainnet.json"; -import bsctestnetGovernanceDeployments from "../../deployments/bsctestnet.json"; -import ethereumGovernanceDeployments from "../../deployments/ethereum.json"; -import opbnbmainnetGovernanceDeployments from "../../deployments/opbnbmainnet.json"; -import opbnbtestnetGovernanceDeployments from "../../deployments/opbnbtestnet.json"; -import sepoliaGovernanceDeployments from "../../deployments/sepolia.json"; -import zksyncsepoliaGovernanceDeployments from "../../deployments/zksyncsepolia.json"; -import zksyncmainnetGovernanceDeployments from "../../deployments/zksyncmainnet.json"; -import opmainnetGovernanceDeployments from "../../deployments/opmainnet.json"; -import opsepoliaGovernanceDeployments from "../../deployments/opsepolia.json"; -import basemainnetGovernanceDeployments from "../../deployments/basemainnet.json"; -import basesepoliaGovernanceDeployments from "../../deployments/basesepolia.json"; -import unichainmainnetGovernanceDeployments from "../../deployments/unichainmainnet.json"; -import unichainsepoliaGovernanceDeployments from "../../deployments/unichainsepolia.json"; import { LZ_CHAINID, SUPPORTED_NETWORKS } from "./constants"; export const testnetNetworks = [ @@ -29,6 +13,7 @@ export const testnetNetworks = [ "opsepolia", "basesepolia", "unichainsepolia", + "berachainbartio", "hardhat", ]; const mainnetNetworks = [ @@ -73,6 +58,8 @@ export const guardian = async (network: SUPPORTED_NETWORKS): Promise => return "0x9831D3A641E8c7F082EEA75b8249c99be9D09a34"; // UNICHAIN SEPOLIA MULTISIG } else if (network === "unichainmainnet") { return "0x1803Cf1D3495b43cC628aa1d8638A981F8CD341C"; // UNICHAIN MAINNET MULTISIG + } else if (network === "berachainbartio") { + return "0xdf3b635d2b535f906BB02abb22AED71346E36a00"; // BERACHAIN bArtio MULTISIG } return deployer; }; @@ -107,7 +94,8 @@ export const getLzEndpoint = async (networkName: SUPPORTED_NETWORKS): Promise Date: Thu, 13 Feb 2025 19:36:50 +0530 Subject: [PATCH 3/5] fix: revert timelock change --- contracts/Governance/Timelock.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contracts/Governance/Timelock.sol b/contracts/Governance/Timelock.sol index a259609e..1ea86bb1 100644 --- a/contracts/Governance/Timelock.sol +++ b/contracts/Governance/Timelock.sol @@ -52,7 +52,7 @@ contract Timelock { uint public constant GRACE_PERIOD = 14 days; /// @notice Minimum amount of time a proposal transaction must be queued - uint public constant MINIMUM_DELAY = 2 days; + uint public constant MINIMUM_DELAY = 1 hours; /// @notice Maximum amount of time a proposal transaction must be queued uint public constant MAXIMUM_DELAY = 30 days; From fef53f7172f41669bd8e98981d5553fb2f5b8775 Mon Sep 17 00:00:00 2001 From: web3rover Date: Thu, 13 Feb 2025 19:38:13 +0530 Subject: [PATCH 4/5] feat: deployed aggregator --- .../ACMCommandsAggregator.json | 366 ++++++++++++++++++ .../c8adce9942919fd992f7532e82a0e082.json | 43 ++ 2 files changed, 409 insertions(+) create mode 100644 deployments/berachainbartio/ACMCommandsAggregator.json create mode 100644 deployments/berachainbartio/solcInputs/c8adce9942919fd992f7532e82a0e082.json diff --git a/deployments/berachainbartio/ACMCommandsAggregator.json b/deployments/berachainbartio/ACMCommandsAggregator.json new file mode 100644 index 00000000..bccd9e4b --- /dev/null +++ b/deployments/berachainbartio/ACMCommandsAggregator.json @@ -0,0 +1,366 @@ +{ + "address": "0x65cfF2E3833dC0fFcEE09102C29DD43e2ED75DF9", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IAccessControlManagerV8", + "name": "_acm", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "EmptyPermissions", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddressNotAllowed", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "GrantPermissionsAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "GrantPermissionsExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "RevokePermissionsAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "RevokePermissionsExecuted", + "type": "event" + }, + { + "inputs": [], + "name": "ACM", + "outputs": [ + { + "internalType": "contract IAccessControlManagerV8", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "contractAddress", + "type": "address" + }, + { + "internalType": "string", + "name": "functionSig", + "type": "string" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "internalType": "struct ACMCommandsAggregator.Permission[]", + "name": "_permissions", + "type": "tuple[]" + } + ], + "name": "addGrantPermissions", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "contractAddress", + "type": "address" + }, + { + "internalType": "string", + "name": "functionSig", + "type": "string" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "internalType": "struct ACMCommandsAggregator.Permission[]", + "name": "_permissions", + "type": "tuple[]" + } + ], + "name": "addRevokePermissions", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "executeGrantPermissions", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "executeRevokePermissions", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "grantPermissions", + "outputs": [ + { + "internalType": "address", + "name": "contractAddress", + "type": "address" + }, + { + "internalType": "string", + "name": "functionSig", + "type": "string" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "revokePermissions", + "outputs": [ + { + "internalType": "address", + "name": "contractAddress", + "type": "address" + }, + { + "internalType": "string", + "name": "functionSig", + "type": "string" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x65abcc1b7956efc66639b1d97906d72788d5a6f4e667e1a31d138eaec57e1157", + "receipt": { + "to": null, + "from": "0x18BDb05DD1A95677f4381cfb4db52D342dF5C00d", + "contractAddress": "0x65cfF2E3833dC0fFcEE09102C29DD43e2ED75DF9", + "transactionIndex": 2, + "gasUsed": "937641", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xeba07bed9a9662ef06b587589818656f67a821144a14228963cd9c2ade211f40", + "transactionHash": "0x65abcc1b7956efc66639b1d97906d72788d5a6f4e667e1a31d138eaec57e1157", + "logs": [], + "blockNumber": 10538082, + "cumulativeGasUsed": "982216", + "status": 1, + "byzantium": true + }, + "args": ["0x92A6BCD9987Eb8689152C5A89BCC5c03305139E3"], + "numDeployments": 1, + "solcInputHash": "c8adce9942919fd992f7532e82a0e082", + "metadata": "{\"compiler\":{\"version\":\"0.8.25+commit.b61c2a91\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IAccessControlManagerV8\",\"name\":\"_acm\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"EmptyPermissions\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddressNotAllowed\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"GrantPermissionsAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"GrantPermissionsExecuted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"RevokePermissionsAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"RevokePermissionsExecuted\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"ACM\",\"outputs\":[{\"internalType\":\"contract IAccessControlManagerV8\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"functionSig\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"internalType\":\"struct ACMCommandsAggregator.Permission[]\",\"name\":\"_permissions\",\"type\":\"tuple[]\"}],\"name\":\"addGrantPermissions\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"functionSig\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"internalType\":\"struct ACMCommandsAggregator.Permission[]\",\"name\":\"_permissions\",\"type\":\"tuple[]\"}],\"name\":\"addRevokePermissions\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"executeGrantPermissions\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"executeRevokePermissions\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"grantPermissions\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"functionSig\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"revokePermissions\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"functionSig\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Venus\",\"kind\":\"dev\",\"methods\":{},\"title\":\"ACMCommandsAggregator\",\"version\":1},\"userdoc\":{\"errors\":{\"ZeroAddressNotAllowed()\":[{\"notice\":\"Thrown if the supplied address is a zero address where it is not allowed\"}]},\"kind\":\"user\",\"methods\":{\"ACM()\":{\"notice\":\"Access control manager contract\"}},\"notice\":\"This contract is a helper to aggregate multiple grant and revoke permissions in batches and execute them in one go.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/Utils/ACMCommandsAggregator.sol\":\"ACMCommandsAggregator\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/IAccessControl.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev External interface of AccessControl declared to support ERC165 detection.\\n */\\ninterface IAccessControl {\\n /**\\n * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\\n *\\n * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\\n * {RoleAdminChanged} not being emitted signaling this.\\n *\\n * _Available since v3.1._\\n */\\n event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\\n\\n /**\\n * @dev Emitted when `account` is granted `role`.\\n *\\n * `sender` is the account that originated the contract call, an admin role\\n * bearer except when using {AccessControl-_setupRole}.\\n */\\n event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Emitted when `account` is revoked `role`.\\n *\\n * `sender` is the account that originated the contract call:\\n * - if using `revokeRole`, it is the admin role bearer\\n * - if using `renounceRole`, it is the role bearer (i.e. `account`)\\n */\\n event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) external view returns (bool);\\n\\n /**\\n * @dev Returns the admin role that controls `role`. See {grantRole} and\\n * {revokeRole}.\\n *\\n * To change a role's admin, use {AccessControl-_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) external view returns (bytes32);\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function grantRole(bytes32 role, address account) external;\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function revokeRole(bytes32 role, address account) external;\\n\\n /**\\n * @dev Revokes `role` from the calling account.\\n *\\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\\n * purpose is to provide a mechanism for accounts to lose their privileges\\n * if they are compromised (such as when a trusted device is misplaced).\\n *\\n * If the calling account had been granted `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n */\\n function renounceRole(bytes32 role, address account) external;\\n}\\n\",\"keccak256\":\"0x59ce320a585d7e1f163cd70390a0ef2ff9cec832e2aa544293a00692465a7a57\",\"license\":\"MIT\"},\"@venusprotocol/solidity-utilities/contracts/validators.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.25;\\n\\n/// @notice Thrown if the supplied address is a zero address where it is not allowed\\nerror ZeroAddressNotAllowed();\\n\\n/// @notice Thrown if the supplied value is 0 where it is not allowed\\nerror ZeroValueNotAllowed();\\n\\n/// @notice Checks if the provided address is nonzero, reverts otherwise\\n/// @param address_ Address to check\\n/// @custom:error ZeroAddressNotAllowed is thrown if the provided address is a zero address\\nfunction ensureNonzeroAddress(address address_) pure {\\n if (address_ == address(0)) {\\n revert ZeroAddressNotAllowed();\\n }\\n}\\n\\n/// @notice Checks if the provided value is nonzero, reverts otherwise\\n/// @param value_ Value to check\\n/// @custom:error ZeroValueNotAllowed is thrown if the provided value is 0\\nfunction ensureNonzeroValue(uint256 value_) pure {\\n if (value_ == 0) {\\n revert ZeroValueNotAllowed();\\n }\\n}\\n\",\"keccak256\":\"0xdb88e14d50dd21889ca3329d755673d022c47e8da005b6a545c7f69c2c4b7b86\",\"license\":\"BSD-3-Clause\"},\"contracts/Governance/IAccessControlManagerV8.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity ^0.8.25;\\n\\nimport \\\"@openzeppelin/contracts/access/IAccessControl.sol\\\";\\n\\n/**\\n * @title IAccessControlManagerV8\\n * @author Venus\\n * @notice Interface implemented by the `AccessControlManagerV8` contract.\\n */\\ninterface IAccessControlManagerV8 is IAccessControl {\\n function giveCallPermission(address contractAddress, string calldata functionSig, address accountToPermit) external;\\n\\n function revokeCallPermission(\\n address contractAddress,\\n string calldata functionSig,\\n address accountToRevoke\\n ) external;\\n\\n function isAllowedToCall(address account, string calldata functionSig) external view returns (bool);\\n\\n function hasPermission(\\n address account,\\n address contractAddress,\\n string calldata functionSig\\n ) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xaa29b098440d0b3a131c5ecdf25ce548790c1b5ac7bf9b5c0264b6af6f7a1e0b\",\"license\":\"BSD-3-Clause\"},\"contracts/Utils/ACMCommandsAggregator.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.25;\\n\\nimport { IAccessControlManagerV8 } from \\\"../Governance/IAccessControlManagerV8.sol\\\";\\nimport { ensureNonzeroAddress } from \\\"@venusprotocol/solidity-utilities/contracts/validators.sol\\\";\\n\\n/**\\n * @title ACMCommandsAggregator\\n * @author Venus\\n * @notice This contract is a helper to aggregate multiple grant and revoke permissions in batches and execute them in one go.\\n */\\ncontract ACMCommandsAggregator {\\n /*\\n * @notice Struct to store permission details\\n */\\n struct Permission {\\n /*\\n * @notice Address of the contract\\n */\\n address contractAddress;\\n /*\\n * @notice Function signature\\n */\\n string functionSig;\\n /*\\n * @notice Address of the account\\n */\\n address account;\\n }\\n\\n /**\\n * @notice Access control manager contract\\n */\\n IAccessControlManagerV8 public immutable ACM;\\n\\n /*\\n * @notice 2D array to store grant permissions in batches\\n */\\n Permission[][] public grantPermissions;\\n\\n /*\\n * @notice 2D array to store revoke permissions in batches\\n */\\n Permission[][] public revokePermissions;\\n\\n /*\\n * @notice Event emitted when grant permissions are added\\n */\\n event GrantPermissionsAdded(uint256 index);\\n\\n /*\\n * @notice Event emitted when revoke permissions are added\\n */\\n event RevokePermissionsAdded(uint256 index);\\n\\n /*\\n * @notice Event emitted when grant permissions are executed\\n */\\n event GrantPermissionsExecuted(uint256 index);\\n\\n /*\\n * @notice Event emitted when revoke permissions are executed\\n */\\n event RevokePermissionsExecuted(uint256 index);\\n\\n /*\\n * @notice Error to be thrown when permissions are empty\\n */\\n error EmptyPermissions();\\n\\n /*\\n * @notice Constructor to set the access control manager\\n * @param _acm Address of the access control manager\\n */\\n constructor(IAccessControlManagerV8 _acm) {\\n ensureNonzeroAddress(address(_acm));\\n ACM = _acm;\\n }\\n\\n /*\\n * @notice Function to add grant permissions\\n * @param _permissions Array of permissions\\n * @custom:event Emits GrantPermissionsAdded event\\n */\\n function addGrantPermissions(Permission[] memory _permissions) external {\\n if (_permissions.length == 0) {\\n revert EmptyPermissions();\\n }\\n\\n uint256 index = grantPermissions.length;\\n grantPermissions.push();\\n\\n for (uint256 i; i < _permissions.length; ++i) {\\n grantPermissions[index].push(\\n Permission(_permissions[i].contractAddress, _permissions[i].functionSig, _permissions[i].account)\\n );\\n }\\n\\n emit GrantPermissionsAdded(index);\\n }\\n\\n /*\\n * @notice Function to add revoke permissions\\n * @param _permissions Array of permissions\\n * @custom:event Emits RevokePermissionsAdded event\\n */\\n function addRevokePermissions(Permission[] memory _permissions) external {\\n if (_permissions.length == 0) {\\n revert EmptyPermissions();\\n }\\n\\n uint256 index = revokePermissions.length;\\n revokePermissions.push();\\n\\n for (uint256 i; i < _permissions.length; ++i) {\\n revokePermissions[index].push(\\n Permission(_permissions[i].contractAddress, _permissions[i].functionSig, _permissions[i].account)\\n );\\n }\\n\\n emit RevokePermissionsAdded(index);\\n }\\n\\n /*\\n * @notice Function to execute grant permissions\\n * @param index Index of the permissions array\\n * @custom:event Emits GrantPermissionsExecuted event\\n */\\n function executeGrantPermissions(uint256 index) external {\\n uint256 length = grantPermissions[index].length;\\n for (uint256 i; i < length; ++i) {\\n Permission memory permission = grantPermissions[index][i];\\n ACM.giveCallPermission(permission.contractAddress, permission.functionSig, permission.account);\\n }\\n\\n emit GrantPermissionsExecuted(index);\\n }\\n\\n /*\\n * @notice Function to execute revoke permissions\\n * @param index Index of the permissions array\\n * @custom:event Emits RevokePermissionsExecuted event\\n */\\n function executeRevokePermissions(uint256 index) external {\\n uint256 length = revokePermissions[index].length;\\n for (uint256 i; i < length; ++i) {\\n Permission memory permission = revokePermissions[index][i];\\n ACM.revokeCallPermission(permission.contractAddress, permission.functionSig, permission.account);\\n }\\n\\n emit RevokePermissionsExecuted(index);\\n }\\n}\\n\",\"keccak256\":\"0xe642b8f0e0fedc74d31196197bc7d78b43b44eab556c07ec74d6b75ccf8d0f8c\",\"license\":\"BSD-3-Clause\"}},\"version\":1}", + "bytecode": "0x60a0604052348015600f57600080fd5b506040516110c73803806110c7833981016040819052602c91606c565b6033816043565b6001600160a01b0316608052609a565b6001600160a01b0381166069576040516342bcdf7f60e11b815260040160405180910390fd5b50565b600060208284031215607d57600080fd5b81516001600160a01b0381168114609357600080fd5b9392505050565b6080516110046100c360003960008181610100015281816102de0152610a0101526110046000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c80639d6c76b81161005b5780639d6c76b8146100d5578063de46a235146100e8578063f9b80da1146100fb578063ff1575e11461014757600080fd5b806322473d8c14610082578063514aab87146100975780635666a5ea146100c2575b600080fd5b610095610090366004610ab8565b61015a565b005b6100aa6100a5366004610ad1565b61038d565b6040516100b993929190610af3565b60405180910390f35b6100956100d0366004610c59565b610492565b6100956100e3366004610c59565b610689565b6100956100f6366004610ab8565b61087f565b6101227f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100b9565b6100aa610155366004610ad1565b610aa8565b60006001828154811061016f5761016f610de1565b600091825260208220015491505b818110156103545760006001848154811061019a5761019a610de1565b9060005260206000200182815481106101b5576101b5610de1565b60009182526020918290206040805160608101909152600390920201805473ffffffffffffffffffffffffffffffffffffffff168252600181018054929391929184019161020290610e10565b80601f016020809104026020016040519081016040528092919081815260200182805461022e90610e10565b801561027b5780601f106102505761010080835404028352916020019161027b565b820191906000526020600020905b81548152906001019060200180831161025e57829003601f168201915b50505091835250506002919091015473ffffffffffffffffffffffffffffffffffffffff90811660209283015282519183015160408085015190517f545f7a320000000000000000000000000000000000000000000000000000000081529495507f00000000000000000000000000000000000000000000000000000000000000009092169363545f7a329361031693909291600401610af3565b600060405180830381600087803b15801561033057600080fd5b505af1158015610344573d6000803e3d6000fd5b505050505080600101905061017d565b506040518281527f1382323d6618527d8b03daa05db815f0490966e8b80679fe5ad3d868f84e1a71906020015b60405180910390a15050565b6000828154811061039d57600080fd5b9060005260206000200181815481106103b557600080fd5b60009182526020909120600390910201805460018201805473ffffffffffffffffffffffffffffffffffffffff90921694509192506103f390610e10565b80601f016020809104026020016040519081016040528092919081815260200182805461041f90610e10565b801561046c5780601f106104415761010080835404028352916020019161046c565b820191906000526020600020905b81548152906001019060200180831161044f57829003601f168201915b5050506002909301549192505073ffffffffffffffffffffffffffffffffffffffff1683565b80516000036104cd576040517f4494013c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001805480820182556000918252905b825181101561065857600182815481106104f9576104f9610de1565b90600052602060002001604051806060016040528085848151811061052057610520610de1565b60200260200101516000015173ffffffffffffffffffffffffffffffffffffffff16815260200185848151811061055957610559610de1565b602002602001015160200151815260200185848151811061057c5761057c610de1565b6020908102919091018101516040015173ffffffffffffffffffffffffffffffffffffffff908116909252835460018082018655600095865294829020845160039092020180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169190931617825582015191929091908201906106019082610eb4565b5060409190910151600290910180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9092169190911790556001016104dd565b506040518181527f75922591bf2cec980645dc4a32bb7d5e8da9a15fda86dacf06f8402cecd1478f90602001610381565b80516000036106c4576040517f4494013c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008054600181018255818052905b825181101561084e57600082815481106106ef576106ef610de1565b90600052602060002001604051806060016040528085848151811061071657610716610de1565b60200260200101516000015173ffffffffffffffffffffffffffffffffffffffff16815260200185848151811061074f5761074f610de1565b602002602001015160200151815260200185848151811061077257610772610de1565b6020908102919091018101516040015173ffffffffffffffffffffffffffffffffffffffff908116909252835460018082018655600095865294829020845160039092020180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169190931617825582015191929091908201906107f79082610eb4565b5060409190910151600290910180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9092169190911790556001016106d3565b506040518181527ff8ca6ea7cc31be8572501c37ef5e9e8298be717fb881e0b1ca785aecc4d25e9f90602001610381565b600080828154811061089357610893610de1565b600091825260208220015491505b81811015610a775760008084815481106108bd576108bd610de1565b9060005260206000200182815481106108d8576108d8610de1565b60009182526020918290206040805160608101909152600390920201805473ffffffffffffffffffffffffffffffffffffffff168252600181018054929391929184019161092590610e10565b80601f016020809104026020016040519081016040528092919081815260200182805461095190610e10565b801561099e5780601f106109735761010080835404028352916020019161099e565b820191906000526020600020905b81548152906001019060200180831161098157829003601f168201915b50505091835250506002919091015473ffffffffffffffffffffffffffffffffffffffff90811660209283015282519183015160408085015190517f584f6b600000000000000000000000000000000000000000000000000000000081529495507f00000000000000000000000000000000000000000000000000000000000000009092169363584f6b6093610a3993909291600401610af3565b600060405180830381600087803b158015610a5357600080fd5b505af1158015610a67573d6000803e3d6000fd5b50505050508060010190506108a1565b506040518281527f01a805f459381af632ecab72ec192c3f9a4c72d26be089026ffd6636d82de98890602001610381565b6001828154811061039d57600080fd5b600060208284031215610aca57600080fd5b5035919050565b60008060408385031215610ae457600080fd5b50508035926020909101359150565b600073ffffffffffffffffffffffffffffffffffffffff8086168352602060606020850152855180606086015260005b81811015610b3f57878101830151868201608001528201610b23565b5060006080828701015260807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011686010193505050808416604084015250949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040516060810167ffffffffffffffff81118282101715610bdb57610bdb610b89565b60405290565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715610c2857610c28610b89565b604052919050565b803573ffffffffffffffffffffffffffffffffffffffff81168114610c5457600080fd5b919050565b60006020808385031215610c6c57600080fd5b823567ffffffffffffffff80821115610c8457600080fd5b818501915085601f830112610c9857600080fd5b813581811115610caa57610caa610b89565b8060051b610cb9858201610be1565b9182528381018501918581019089841115610cd357600080fd5b86860192505b83831015610dd457823585811115610cf057600080fd5b86017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe06060828d0382011215610d265760008081fd5b610d2e610bb8565b610d398a8401610c30565b815260408084013589811115610d4f5760008081fd5b8401603f81018f13610d615760008081fd5b8b8101358a811115610d7557610d75610b89565b610d858d86601f84011601610be1565b94508085528f83828401011115610d9c5760008081fd5b808383018e87013760008d82870101525050828b830152610dbf60608501610c30565b90820152845250509186019190860190610cd9565b9998505050505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600181811c90821680610e2457607f821691505b602082108103610e5d577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b601f821115610eaf576000816000526020600020601f850160051c81016020861015610e8c5750805b601f850160051c820191505b81811015610eab57828155600101610e98565b5050505b505050565b815167ffffffffffffffff811115610ece57610ece610b89565b610ee281610edc8454610e10565b84610e63565b602080601f831160018114610f355760008415610eff5750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b178555610eab565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b82811015610f8257888601518255948401946001909101908401610f63565b5085821015610fbe57878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b0190555056fea264697066735822122090d4936e163063dfe747da5bf04cc06002b17436a13e78a30b2797e6219ebb2264736f6c63430008190033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061007d5760003560e01c80639d6c76b81161005b5780639d6c76b8146100d5578063de46a235146100e8578063f9b80da1146100fb578063ff1575e11461014757600080fd5b806322473d8c14610082578063514aab87146100975780635666a5ea146100c2575b600080fd5b610095610090366004610ab8565b61015a565b005b6100aa6100a5366004610ad1565b61038d565b6040516100b993929190610af3565b60405180910390f35b6100956100d0366004610c59565b610492565b6100956100e3366004610c59565b610689565b6100956100f6366004610ab8565b61087f565b6101227f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100b9565b6100aa610155366004610ad1565b610aa8565b60006001828154811061016f5761016f610de1565b600091825260208220015491505b818110156103545760006001848154811061019a5761019a610de1565b9060005260206000200182815481106101b5576101b5610de1565b60009182526020918290206040805160608101909152600390920201805473ffffffffffffffffffffffffffffffffffffffff168252600181018054929391929184019161020290610e10565b80601f016020809104026020016040519081016040528092919081815260200182805461022e90610e10565b801561027b5780601f106102505761010080835404028352916020019161027b565b820191906000526020600020905b81548152906001019060200180831161025e57829003601f168201915b50505091835250506002919091015473ffffffffffffffffffffffffffffffffffffffff90811660209283015282519183015160408085015190517f545f7a320000000000000000000000000000000000000000000000000000000081529495507f00000000000000000000000000000000000000000000000000000000000000009092169363545f7a329361031693909291600401610af3565b600060405180830381600087803b15801561033057600080fd5b505af1158015610344573d6000803e3d6000fd5b505050505080600101905061017d565b506040518281527f1382323d6618527d8b03daa05db815f0490966e8b80679fe5ad3d868f84e1a71906020015b60405180910390a15050565b6000828154811061039d57600080fd5b9060005260206000200181815481106103b557600080fd5b60009182526020909120600390910201805460018201805473ffffffffffffffffffffffffffffffffffffffff90921694509192506103f390610e10565b80601f016020809104026020016040519081016040528092919081815260200182805461041f90610e10565b801561046c5780601f106104415761010080835404028352916020019161046c565b820191906000526020600020905b81548152906001019060200180831161044f57829003601f168201915b5050506002909301549192505073ffffffffffffffffffffffffffffffffffffffff1683565b80516000036104cd576040517f4494013c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001805480820182556000918252905b825181101561065857600182815481106104f9576104f9610de1565b90600052602060002001604051806060016040528085848151811061052057610520610de1565b60200260200101516000015173ffffffffffffffffffffffffffffffffffffffff16815260200185848151811061055957610559610de1565b602002602001015160200151815260200185848151811061057c5761057c610de1565b6020908102919091018101516040015173ffffffffffffffffffffffffffffffffffffffff908116909252835460018082018655600095865294829020845160039092020180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169190931617825582015191929091908201906106019082610eb4565b5060409190910151600290910180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9092169190911790556001016104dd565b506040518181527f75922591bf2cec980645dc4a32bb7d5e8da9a15fda86dacf06f8402cecd1478f90602001610381565b80516000036106c4576040517f4494013c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008054600181018255818052905b825181101561084e57600082815481106106ef576106ef610de1565b90600052602060002001604051806060016040528085848151811061071657610716610de1565b60200260200101516000015173ffffffffffffffffffffffffffffffffffffffff16815260200185848151811061074f5761074f610de1565b602002602001015160200151815260200185848151811061077257610772610de1565b6020908102919091018101516040015173ffffffffffffffffffffffffffffffffffffffff908116909252835460018082018655600095865294829020845160039092020180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169190931617825582015191929091908201906107f79082610eb4565b5060409190910151600290910180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9092169190911790556001016106d3565b506040518181527ff8ca6ea7cc31be8572501c37ef5e9e8298be717fb881e0b1ca785aecc4d25e9f90602001610381565b600080828154811061089357610893610de1565b600091825260208220015491505b81811015610a775760008084815481106108bd576108bd610de1565b9060005260206000200182815481106108d8576108d8610de1565b60009182526020918290206040805160608101909152600390920201805473ffffffffffffffffffffffffffffffffffffffff168252600181018054929391929184019161092590610e10565b80601f016020809104026020016040519081016040528092919081815260200182805461095190610e10565b801561099e5780601f106109735761010080835404028352916020019161099e565b820191906000526020600020905b81548152906001019060200180831161098157829003601f168201915b50505091835250506002919091015473ffffffffffffffffffffffffffffffffffffffff90811660209283015282519183015160408085015190517f584f6b600000000000000000000000000000000000000000000000000000000081529495507f00000000000000000000000000000000000000000000000000000000000000009092169363584f6b6093610a3993909291600401610af3565b600060405180830381600087803b158015610a5357600080fd5b505af1158015610a67573d6000803e3d6000fd5b50505050508060010190506108a1565b506040518281527f01a805f459381af632ecab72ec192c3f9a4c72d26be089026ffd6636d82de98890602001610381565b6001828154811061039d57600080fd5b600060208284031215610aca57600080fd5b5035919050565b60008060408385031215610ae457600080fd5b50508035926020909101359150565b600073ffffffffffffffffffffffffffffffffffffffff8086168352602060606020850152855180606086015260005b81811015610b3f57878101830151868201608001528201610b23565b5060006080828701015260807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011686010193505050808416604084015250949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040516060810167ffffffffffffffff81118282101715610bdb57610bdb610b89565b60405290565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715610c2857610c28610b89565b604052919050565b803573ffffffffffffffffffffffffffffffffffffffff81168114610c5457600080fd5b919050565b60006020808385031215610c6c57600080fd5b823567ffffffffffffffff80821115610c8457600080fd5b818501915085601f830112610c9857600080fd5b813581811115610caa57610caa610b89565b8060051b610cb9858201610be1565b9182528381018501918581019089841115610cd357600080fd5b86860192505b83831015610dd457823585811115610cf057600080fd5b86017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe06060828d0382011215610d265760008081fd5b610d2e610bb8565b610d398a8401610c30565b815260408084013589811115610d4f5760008081fd5b8401603f81018f13610d615760008081fd5b8b8101358a811115610d7557610d75610b89565b610d858d86601f84011601610be1565b94508085528f83828401011115610d9c5760008081fd5b808383018e87013760008d82870101525050828b830152610dbf60608501610c30565b90820152845250509186019190860190610cd9565b9998505050505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600181811c90821680610e2457607f821691505b602082108103610e5d577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b601f821115610eaf576000816000526020600020601f850160051c81016020861015610e8c5750805b601f850160051c820191505b81811015610eab57828155600101610e98565b5050505b505050565b815167ffffffffffffffff811115610ece57610ece610b89565b610ee281610edc8454610e10565b84610e63565b602080601f831160018114610f355760008415610eff5750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b178555610eab565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b82811015610f8257888601518255948401946001909101908401610f63565b5085821015610fbe57878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b0190555056fea264697066735822122090d4936e163063dfe747da5bf04cc06002b17436a13e78a30b2797e6219ebb2264736f6c63430008190033", + "devdoc": { + "author": "Venus", + "kind": "dev", + "methods": {}, + "title": "ACMCommandsAggregator", + "version": 1 + }, + "userdoc": { + "errors": { + "ZeroAddressNotAllowed()": [ + { + "notice": "Thrown if the supplied address is a zero address where it is not allowed" + } + ] + }, + "kind": "user", + "methods": { + "ACM()": { + "notice": "Access control manager contract" + } + }, + "notice": "This contract is a helper to aggregate multiple grant and revoke permissions in batches and execute them in one go.", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 181, + "contract": "contracts/Utils/ACMCommandsAggregator.sol:ACMCommandsAggregator", + "label": "grantPermissions", + "offset": 0, + "slot": "0", + "type": "t_array(t_array(t_struct(Permission)172_storage)dyn_storage)dyn_storage" + }, + { + "astId": 186, + "contract": "contracts/Utils/ACMCommandsAggregator.sol:ACMCommandsAggregator", + "label": "revokePermissions", + "offset": 0, + "slot": "1", + "type": "t_array(t_array(t_struct(Permission)172_storage)dyn_storage)dyn_storage" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_array(t_struct(Permission)172_storage)dyn_storage)dyn_storage": { + "base": "t_array(t_struct(Permission)172_storage)dyn_storage", + "encoding": "dynamic_array", + "label": "struct ACMCommandsAggregator.Permission[][]", + "numberOfBytes": "32" + }, + "t_array(t_struct(Permission)172_storage)dyn_storage": { + "base": "t_struct(Permission)172_storage", + "encoding": "dynamic_array", + "label": "struct ACMCommandsAggregator.Permission[]", + "numberOfBytes": "32" + }, + "t_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(Permission)172_storage": { + "encoding": "inplace", + "label": "struct ACMCommandsAggregator.Permission", + "members": [ + { + "astId": 167, + "contract": "contracts/Utils/ACMCommandsAggregator.sol:ACMCommandsAggregator", + "label": "contractAddress", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 169, + "contract": "contracts/Utils/ACMCommandsAggregator.sol:ACMCommandsAggregator", + "label": "functionSig", + "offset": 0, + "slot": "1", + "type": "t_string_storage" + }, + { + "astId": 171, + "contract": "contracts/Utils/ACMCommandsAggregator.sol:ACMCommandsAggregator", + "label": "account", + "offset": 0, + "slot": "2", + "type": "t_address" + } + ], + "numberOfBytes": "96" + } + } + } +} diff --git a/deployments/berachainbartio/solcInputs/c8adce9942919fd992f7532e82a0e082.json b/deployments/berachainbartio/solcInputs/c8adce9942919fd992f7532e82a0e082.json new file mode 100644 index 00000000..7bb99885 --- /dev/null +++ b/deployments/berachainbartio/solcInputs/c8adce9942919fd992f7532e82a0e082.json @@ -0,0 +1,43 @@ +{ + "language": "Solidity", + "sources": { + "@openzeppelin/contracts/access/IAccessControl.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev External interface of AccessControl declared to support ERC165 detection.\n */\ninterface IAccessControl {\n /**\n * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\n *\n * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\n * {RoleAdminChanged} not being emitted signaling this.\n *\n * _Available since v3.1._\n */\n event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\n\n /**\n * @dev Emitted when `account` is granted `role`.\n *\n * `sender` is the account that originated the contract call, an admin role\n * bearer except when using {AccessControl-_setupRole}.\n */\n event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\n\n /**\n * @dev Emitted when `account` is revoked `role`.\n *\n * `sender` is the account that originated the contract call:\n * - if using `revokeRole`, it is the admin role bearer\n * - if using `renounceRole`, it is the role bearer (i.e. `account`)\n */\n event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\n\n /**\n * @dev Returns `true` if `account` has been granted `role`.\n */\n function hasRole(bytes32 role, address account) external view returns (bool);\n\n /**\n * @dev Returns the admin role that controls `role`. See {grantRole} and\n * {revokeRole}.\n *\n * To change a role's admin, use {AccessControl-_setRoleAdmin}.\n */\n function getRoleAdmin(bytes32 role) external view returns (bytes32);\n\n /**\n * @dev Grants `role` to `account`.\n *\n * If `account` had not been already granted `role`, emits a {RoleGranted}\n * event.\n *\n * Requirements:\n *\n * - the caller must have ``role``'s admin role.\n */\n function grantRole(bytes32 role, address account) external;\n\n /**\n * @dev Revokes `role` from `account`.\n *\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\n *\n * Requirements:\n *\n * - the caller must have ``role``'s admin role.\n */\n function revokeRole(bytes32 role, address account) external;\n\n /**\n * @dev Revokes `role` from the calling account.\n *\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\n * purpose is to provide a mechanism for accounts to lose their privileges\n * if they are compromised (such as when a trusted device is misplaced).\n *\n * If the calling account had been granted `role`, emits a {RoleRevoked}\n * event.\n *\n * Requirements:\n *\n * - the caller must be `account`.\n */\n function renounceRole(bytes32 role, address account) external;\n}\n" + }, + "@venusprotocol/solidity-utilities/contracts/validators.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.25;\n\n/// @notice Thrown if the supplied address is a zero address where it is not allowed\nerror ZeroAddressNotAllowed();\n\n/// @notice Thrown if the supplied value is 0 where it is not allowed\nerror ZeroValueNotAllowed();\n\n/// @notice Checks if the provided address is nonzero, reverts otherwise\n/// @param address_ Address to check\n/// @custom:error ZeroAddressNotAllowed is thrown if the provided address is a zero address\nfunction ensureNonzeroAddress(address address_) pure {\n if (address_ == address(0)) {\n revert ZeroAddressNotAllowed();\n }\n}\n\n/// @notice Checks if the provided value is nonzero, reverts otherwise\n/// @param value_ Value to check\n/// @custom:error ZeroValueNotAllowed is thrown if the provided value is 0\nfunction ensureNonzeroValue(uint256 value_) pure {\n if (value_ == 0) {\n revert ZeroValueNotAllowed();\n }\n}\n" + }, + "contracts/Governance/IAccessControlManagerV8.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity ^0.8.25;\n\nimport \"@openzeppelin/contracts/access/IAccessControl.sol\";\n\n/**\n * @title IAccessControlManagerV8\n * @author Venus\n * @notice Interface implemented by the `AccessControlManagerV8` contract.\n */\ninterface IAccessControlManagerV8 is IAccessControl {\n function giveCallPermission(address contractAddress, string calldata functionSig, address accountToPermit) external;\n\n function revokeCallPermission(\n address contractAddress,\n string calldata functionSig,\n address accountToRevoke\n ) external;\n\n function isAllowedToCall(address account, string calldata functionSig) external view returns (bool);\n\n function hasPermission(\n address account,\n address contractAddress,\n string calldata functionSig\n ) external view returns (bool);\n}\n" + }, + "contracts/Utils/ACMCommandsAggregator.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.25;\n\nimport { IAccessControlManagerV8 } from \"../Governance/IAccessControlManagerV8.sol\";\nimport { ensureNonzeroAddress } from \"@venusprotocol/solidity-utilities/contracts/validators.sol\";\n\n/**\n * @title ACMCommandsAggregator\n * @author Venus\n * @notice This contract is a helper to aggregate multiple grant and revoke permissions in batches and execute them in one go.\n */\ncontract ACMCommandsAggregator {\n /*\n * @notice Struct to store permission details\n */\n struct Permission {\n /*\n * @notice Address of the contract\n */\n address contractAddress;\n /*\n * @notice Function signature\n */\n string functionSig;\n /*\n * @notice Address of the account\n */\n address account;\n }\n\n /**\n * @notice Access control manager contract\n */\n IAccessControlManagerV8 public immutable ACM;\n\n /*\n * @notice 2D array to store grant permissions in batches\n */\n Permission[][] public grantPermissions;\n\n /*\n * @notice 2D array to store revoke permissions in batches\n */\n Permission[][] public revokePermissions;\n\n /*\n * @notice Event emitted when grant permissions are added\n */\n event GrantPermissionsAdded(uint256 index);\n\n /*\n * @notice Event emitted when revoke permissions are added\n */\n event RevokePermissionsAdded(uint256 index);\n\n /*\n * @notice Event emitted when grant permissions are executed\n */\n event GrantPermissionsExecuted(uint256 index);\n\n /*\n * @notice Event emitted when revoke permissions are executed\n */\n event RevokePermissionsExecuted(uint256 index);\n\n /*\n * @notice Error to be thrown when permissions are empty\n */\n error EmptyPermissions();\n\n /*\n * @notice Constructor to set the access control manager\n * @param _acm Address of the access control manager\n */\n constructor(IAccessControlManagerV8 _acm) {\n ensureNonzeroAddress(address(_acm));\n ACM = _acm;\n }\n\n /*\n * @notice Function to add grant permissions\n * @param _permissions Array of permissions\n * @custom:event Emits GrantPermissionsAdded event\n */\n function addGrantPermissions(Permission[] memory _permissions) external {\n if (_permissions.length == 0) {\n revert EmptyPermissions();\n }\n\n uint256 index = grantPermissions.length;\n grantPermissions.push();\n\n for (uint256 i; i < _permissions.length; ++i) {\n grantPermissions[index].push(\n Permission(_permissions[i].contractAddress, _permissions[i].functionSig, _permissions[i].account)\n );\n }\n\n emit GrantPermissionsAdded(index);\n }\n\n /*\n * @notice Function to add revoke permissions\n * @param _permissions Array of permissions\n * @custom:event Emits RevokePermissionsAdded event\n */\n function addRevokePermissions(Permission[] memory _permissions) external {\n if (_permissions.length == 0) {\n revert EmptyPermissions();\n }\n\n uint256 index = revokePermissions.length;\n revokePermissions.push();\n\n for (uint256 i; i < _permissions.length; ++i) {\n revokePermissions[index].push(\n Permission(_permissions[i].contractAddress, _permissions[i].functionSig, _permissions[i].account)\n );\n }\n\n emit RevokePermissionsAdded(index);\n }\n\n /*\n * @notice Function to execute grant permissions\n * @param index Index of the permissions array\n * @custom:event Emits GrantPermissionsExecuted event\n */\n function executeGrantPermissions(uint256 index) external {\n uint256 length = grantPermissions[index].length;\n for (uint256 i; i < length; ++i) {\n Permission memory permission = grantPermissions[index][i];\n ACM.giveCallPermission(permission.contractAddress, permission.functionSig, permission.account);\n }\n\n emit GrantPermissionsExecuted(index);\n }\n\n /*\n * @notice Function to execute revoke permissions\n * @param index Index of the permissions array\n * @custom:event Emits RevokePermissionsExecuted event\n */\n function executeRevokePermissions(uint256 index) external {\n uint256 length = revokePermissions[index].length;\n for (uint256 i; i < length; ++i) {\n Permission memory permission = revokePermissions[index][i];\n ACM.revokeCallPermission(permission.contractAddress, permission.functionSig, permission.account);\n }\n\n emit RevokePermissionsExecuted(index);\n }\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 10000 + }, + "evmVersion": "paris", + "outputSelection": { + "*": { + "*": [ + "storageLayout", + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "evm.gasEstimates" + ], + "": ["ast"] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} From 37b5f472e4bec4efac7ff09480de4e7a91654f0a Mon Sep 17 00:00:00 2001 From: web3rover Date: Fri, 14 Feb 2025 21:57:47 +0530 Subject: [PATCH 5/5] feat: redeployed contracts --- .../ACMCommandsAggregator.json | 18 ++-- .../berachainbartio/AccessControlManager.json | 30 +++--- .../berachainbartio/CriticalTimelock.json | 18 ++-- .../berachainbartio/DefaultProxyAdmin.json | 34 +++---- .../berachainbartio/FastTrackTimelock.json | 18 ++-- .../berachainbartio/NormalTimelock.json | 18 ++-- .../OmnichainExecutorOwner.json | 94 +++++++++---------- ...OmnichainExecutorOwner_Implementation.json | 32 +++---- .../OmnichainExecutorOwner_Proxy.json | 90 +++++++++--------- .../OmnichainGovernanceExecutor.json | 32 +++---- hardhat.config.ts | 5 +- helpers/deploy/constants.ts | 2 +- helpers/deploy/deploymentUtils.ts | 2 +- 13 files changed, 198 insertions(+), 195 deletions(-) diff --git a/deployments/berachainbartio/ACMCommandsAggregator.json b/deployments/berachainbartio/ACMCommandsAggregator.json index bccd9e4b..1952f595 100644 --- a/deployments/berachainbartio/ACMCommandsAggregator.json +++ b/deployments/berachainbartio/ACMCommandsAggregator.json @@ -1,5 +1,5 @@ { - "address": "0x65cfF2E3833dC0fFcEE09102C29DD43e2ED75DF9", + "address": "0x1ba10ca9a744131aD8428D719767816A693c3b71", "abi": [ { "inputs": [ @@ -242,23 +242,23 @@ "type": "function" } ], - "transactionHash": "0x65abcc1b7956efc66639b1d97906d72788d5a6f4e667e1a31d138eaec57e1157", + "transactionHash": "0xbfa01bf9ad457d9f928db132ef382a47bd46703df222583b07788ab57ed00d67", "receipt": { "to": null, "from": "0x18BDb05DD1A95677f4381cfb4db52D342dF5C00d", - "contractAddress": "0x65cfF2E3833dC0fFcEE09102C29DD43e2ED75DF9", - "transactionIndex": 2, + "contractAddress": "0x1ba10ca9a744131aD8428D719767816A693c3b71", + "transactionIndex": 8, "gasUsed": "937641", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xeba07bed9a9662ef06b587589818656f67a821144a14228963cd9c2ade211f40", - "transactionHash": "0x65abcc1b7956efc66639b1d97906d72788d5a6f4e667e1a31d138eaec57e1157", + "blockHash": "0x3ba36cb37af146f7269d81004557cdc41602300b5088b532464fc364a7f72822", + "transactionHash": "0xbfa01bf9ad457d9f928db132ef382a47bd46703df222583b07788ab57ed00d67", "logs": [], - "blockNumber": 10538082, - "cumulativeGasUsed": "982216", + "blockNumber": 10580063, + "cumulativeGasUsed": "1370009", "status": 1, "byzantium": true }, - "args": ["0x92A6BCD9987Eb8689152C5A89BCC5c03305139E3"], + "args": ["0xEf368e4c1f9ACC9241E66CD67531FEB195fF7536"], "numDeployments": 1, "solcInputHash": "c8adce9942919fd992f7532e82a0e082", "metadata": "{\"compiler\":{\"version\":\"0.8.25+commit.b61c2a91\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IAccessControlManagerV8\",\"name\":\"_acm\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"EmptyPermissions\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddressNotAllowed\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"GrantPermissionsAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"GrantPermissionsExecuted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"RevokePermissionsAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"RevokePermissionsExecuted\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"ACM\",\"outputs\":[{\"internalType\":\"contract IAccessControlManagerV8\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"functionSig\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"internalType\":\"struct ACMCommandsAggregator.Permission[]\",\"name\":\"_permissions\",\"type\":\"tuple[]\"}],\"name\":\"addGrantPermissions\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"functionSig\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"internalType\":\"struct ACMCommandsAggregator.Permission[]\",\"name\":\"_permissions\",\"type\":\"tuple[]\"}],\"name\":\"addRevokePermissions\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"executeGrantPermissions\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"executeRevokePermissions\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"grantPermissions\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"functionSig\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"revokePermissions\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"functionSig\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Venus\",\"kind\":\"dev\",\"methods\":{},\"title\":\"ACMCommandsAggregator\",\"version\":1},\"userdoc\":{\"errors\":{\"ZeroAddressNotAllowed()\":[{\"notice\":\"Thrown if the supplied address is a zero address where it is not allowed\"}]},\"kind\":\"user\",\"methods\":{\"ACM()\":{\"notice\":\"Access control manager contract\"}},\"notice\":\"This contract is a helper to aggregate multiple grant and revoke permissions in batches and execute them in one go.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/Utils/ACMCommandsAggregator.sol\":\"ACMCommandsAggregator\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/IAccessControl.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev External interface of AccessControl declared to support ERC165 detection.\\n */\\ninterface IAccessControl {\\n /**\\n * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\\n *\\n * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\\n * {RoleAdminChanged} not being emitted signaling this.\\n *\\n * _Available since v3.1._\\n */\\n event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\\n\\n /**\\n * @dev Emitted when `account` is granted `role`.\\n *\\n * `sender` is the account that originated the contract call, an admin role\\n * bearer except when using {AccessControl-_setupRole}.\\n */\\n event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Emitted when `account` is revoked `role`.\\n *\\n * `sender` is the account that originated the contract call:\\n * - if using `revokeRole`, it is the admin role bearer\\n * - if using `renounceRole`, it is the role bearer (i.e. `account`)\\n */\\n event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) external view returns (bool);\\n\\n /**\\n * @dev Returns the admin role that controls `role`. See {grantRole} and\\n * {revokeRole}.\\n *\\n * To change a role's admin, use {AccessControl-_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) external view returns (bytes32);\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function grantRole(bytes32 role, address account) external;\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function revokeRole(bytes32 role, address account) external;\\n\\n /**\\n * @dev Revokes `role` from the calling account.\\n *\\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\\n * purpose is to provide a mechanism for accounts to lose their privileges\\n * if they are compromised (such as when a trusted device is misplaced).\\n *\\n * If the calling account had been granted `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n */\\n function renounceRole(bytes32 role, address account) external;\\n}\\n\",\"keccak256\":\"0x59ce320a585d7e1f163cd70390a0ef2ff9cec832e2aa544293a00692465a7a57\",\"license\":\"MIT\"},\"@venusprotocol/solidity-utilities/contracts/validators.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.25;\\n\\n/// @notice Thrown if the supplied address is a zero address where it is not allowed\\nerror ZeroAddressNotAllowed();\\n\\n/// @notice Thrown if the supplied value is 0 where it is not allowed\\nerror ZeroValueNotAllowed();\\n\\n/// @notice Checks if the provided address is nonzero, reverts otherwise\\n/// @param address_ Address to check\\n/// @custom:error ZeroAddressNotAllowed is thrown if the provided address is a zero address\\nfunction ensureNonzeroAddress(address address_) pure {\\n if (address_ == address(0)) {\\n revert ZeroAddressNotAllowed();\\n }\\n}\\n\\n/// @notice Checks if the provided value is nonzero, reverts otherwise\\n/// @param value_ Value to check\\n/// @custom:error ZeroValueNotAllowed is thrown if the provided value is 0\\nfunction ensureNonzeroValue(uint256 value_) pure {\\n if (value_ == 0) {\\n revert ZeroValueNotAllowed();\\n }\\n}\\n\",\"keccak256\":\"0xdb88e14d50dd21889ca3329d755673d022c47e8da005b6a545c7f69c2c4b7b86\",\"license\":\"BSD-3-Clause\"},\"contracts/Governance/IAccessControlManagerV8.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity ^0.8.25;\\n\\nimport \\\"@openzeppelin/contracts/access/IAccessControl.sol\\\";\\n\\n/**\\n * @title IAccessControlManagerV8\\n * @author Venus\\n * @notice Interface implemented by the `AccessControlManagerV8` contract.\\n */\\ninterface IAccessControlManagerV8 is IAccessControl {\\n function giveCallPermission(address contractAddress, string calldata functionSig, address accountToPermit) external;\\n\\n function revokeCallPermission(\\n address contractAddress,\\n string calldata functionSig,\\n address accountToRevoke\\n ) external;\\n\\n function isAllowedToCall(address account, string calldata functionSig) external view returns (bool);\\n\\n function hasPermission(\\n address account,\\n address contractAddress,\\n string calldata functionSig\\n ) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xaa29b098440d0b3a131c5ecdf25ce548790c1b5ac7bf9b5c0264b6af6f7a1e0b\",\"license\":\"BSD-3-Clause\"},\"contracts/Utils/ACMCommandsAggregator.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.25;\\n\\nimport { IAccessControlManagerV8 } from \\\"../Governance/IAccessControlManagerV8.sol\\\";\\nimport { ensureNonzeroAddress } from \\\"@venusprotocol/solidity-utilities/contracts/validators.sol\\\";\\n\\n/**\\n * @title ACMCommandsAggregator\\n * @author Venus\\n * @notice This contract is a helper to aggregate multiple grant and revoke permissions in batches and execute them in one go.\\n */\\ncontract ACMCommandsAggregator {\\n /*\\n * @notice Struct to store permission details\\n */\\n struct Permission {\\n /*\\n * @notice Address of the contract\\n */\\n address contractAddress;\\n /*\\n * @notice Function signature\\n */\\n string functionSig;\\n /*\\n * @notice Address of the account\\n */\\n address account;\\n }\\n\\n /**\\n * @notice Access control manager contract\\n */\\n IAccessControlManagerV8 public immutable ACM;\\n\\n /*\\n * @notice 2D array to store grant permissions in batches\\n */\\n Permission[][] public grantPermissions;\\n\\n /*\\n * @notice 2D array to store revoke permissions in batches\\n */\\n Permission[][] public revokePermissions;\\n\\n /*\\n * @notice Event emitted when grant permissions are added\\n */\\n event GrantPermissionsAdded(uint256 index);\\n\\n /*\\n * @notice Event emitted when revoke permissions are added\\n */\\n event RevokePermissionsAdded(uint256 index);\\n\\n /*\\n * @notice Event emitted when grant permissions are executed\\n */\\n event GrantPermissionsExecuted(uint256 index);\\n\\n /*\\n * @notice Event emitted when revoke permissions are executed\\n */\\n event RevokePermissionsExecuted(uint256 index);\\n\\n /*\\n * @notice Error to be thrown when permissions are empty\\n */\\n error EmptyPermissions();\\n\\n /*\\n * @notice Constructor to set the access control manager\\n * @param _acm Address of the access control manager\\n */\\n constructor(IAccessControlManagerV8 _acm) {\\n ensureNonzeroAddress(address(_acm));\\n ACM = _acm;\\n }\\n\\n /*\\n * @notice Function to add grant permissions\\n * @param _permissions Array of permissions\\n * @custom:event Emits GrantPermissionsAdded event\\n */\\n function addGrantPermissions(Permission[] memory _permissions) external {\\n if (_permissions.length == 0) {\\n revert EmptyPermissions();\\n }\\n\\n uint256 index = grantPermissions.length;\\n grantPermissions.push();\\n\\n for (uint256 i; i < _permissions.length; ++i) {\\n grantPermissions[index].push(\\n Permission(_permissions[i].contractAddress, _permissions[i].functionSig, _permissions[i].account)\\n );\\n }\\n\\n emit GrantPermissionsAdded(index);\\n }\\n\\n /*\\n * @notice Function to add revoke permissions\\n * @param _permissions Array of permissions\\n * @custom:event Emits RevokePermissionsAdded event\\n */\\n function addRevokePermissions(Permission[] memory _permissions) external {\\n if (_permissions.length == 0) {\\n revert EmptyPermissions();\\n }\\n\\n uint256 index = revokePermissions.length;\\n revokePermissions.push();\\n\\n for (uint256 i; i < _permissions.length; ++i) {\\n revokePermissions[index].push(\\n Permission(_permissions[i].contractAddress, _permissions[i].functionSig, _permissions[i].account)\\n );\\n }\\n\\n emit RevokePermissionsAdded(index);\\n }\\n\\n /*\\n * @notice Function to execute grant permissions\\n * @param index Index of the permissions array\\n * @custom:event Emits GrantPermissionsExecuted event\\n */\\n function executeGrantPermissions(uint256 index) external {\\n uint256 length = grantPermissions[index].length;\\n for (uint256 i; i < length; ++i) {\\n Permission memory permission = grantPermissions[index][i];\\n ACM.giveCallPermission(permission.contractAddress, permission.functionSig, permission.account);\\n }\\n\\n emit GrantPermissionsExecuted(index);\\n }\\n\\n /*\\n * @notice Function to execute revoke permissions\\n * @param index Index of the permissions array\\n * @custom:event Emits RevokePermissionsExecuted event\\n */\\n function executeRevokePermissions(uint256 index) external {\\n uint256 length = revokePermissions[index].length;\\n for (uint256 i; i < length; ++i) {\\n Permission memory permission = revokePermissions[index][i];\\n ACM.revokeCallPermission(permission.contractAddress, permission.functionSig, permission.account);\\n }\\n\\n emit RevokePermissionsExecuted(index);\\n }\\n}\\n\",\"keccak256\":\"0xe642b8f0e0fedc74d31196197bc7d78b43b44eab556c07ec74d6b75ccf8d0f8c\",\"license\":\"BSD-3-Clause\"}},\"version\":1}", diff --git a/deployments/berachainbartio/AccessControlManager.json b/deployments/berachainbartio/AccessControlManager.json index ac49b8c7..304b69c5 100644 --- a/deployments/berachainbartio/AccessControlManager.json +++ b/deployments/berachainbartio/AccessControlManager.json @@ -1,5 +1,5 @@ { - "address": "0x92A6BCD9987Eb8689152C5A89BCC5c03305139E3", + "address": "0xEf368e4c1f9ACC9241E66CD67531FEB195fF7536", "abi": [ { "inputs": [], @@ -360,22 +360,22 @@ "type": "function" } ], - "transactionHash": "0x84bbd5cdfc37fe21b3cdb036475c280512b91b9424c32a2334494b3a3337e6a9", + "transactionHash": "0x3bc39f8055f8b1791c77ffa066c0a1f0cd95d51bb2256bb556cd18541f6e6cf5", "receipt": { "to": null, "from": "0x18BDb05DD1A95677f4381cfb4db52D342dF5C00d", - "contractAddress": "0x92A6BCD9987Eb8689152C5A89BCC5c03305139E3", - "transactionIndex": 6, + "contractAddress": "0xEf368e4c1f9ACC9241E66CD67531FEB195fF7536", + "transactionIndex": 1, "gasUsed": "910465", - "logsBloom": "0x00000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000040000000002000000000000000000000000000000000000020000000000100000000000000020000000000020000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000100000000000020000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x30824601468ef261490d767d23fcb596a7fe6367bdbd8e4b56673fd071d962fe", - "transactionHash": "0x84bbd5cdfc37fe21b3cdb036475c280512b91b9424c32a2334494b3a3337e6a9", + "logsBloom": "0x00000004000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000100000000000000020000000000020000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000100000000000020000000000000020000000000000000000000000000000000000000000000000800", + "blockHash": "0x1b702acea84724c1c3ed50554397f73334390de772f9bd8f3bab27093450c00e", + "transactionHash": "0x3bc39f8055f8b1791c77ffa066c0a1f0cd95d51bb2256bb556cd18541f6e6cf5", "logs": [ { - "transactionIndex": 6, - "blockNumber": 10537840, - "transactionHash": "0x84bbd5cdfc37fe21b3cdb036475c280512b91b9424c32a2334494b3a3337e6a9", - "address": "0x92A6BCD9987Eb8689152C5A89BCC5c03305139E3", + "transactionIndex": 1, + "blockNumber": 10579991, + "transactionHash": "0x3bc39f8055f8b1791c77ffa066c0a1f0cd95d51bb2256bb556cd18541f6e6cf5", + "address": "0xEf368e4c1f9ACC9241E66CD67531FEB195fF7536", "topics": [ "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", "0x0000000000000000000000000000000000000000000000000000000000000000", @@ -383,12 +383,12 @@ "0x00000000000000000000000018bdb05dd1a95677f4381cfb4db52d342df5c00d" ], "data": "0x", - "logIndex": 5, - "blockHash": "0x30824601468ef261490d767d23fcb596a7fe6367bdbd8e4b56673fd071d962fe" + "logIndex": 1, + "blockHash": "0x1b702acea84724c1c3ed50554397f73334390de772f9bd8f3bab27093450c00e" } ], - "blockNumber": 10537840, - "cumulativeGasUsed": "1107466", + "blockNumber": 10579991, + "cumulativeGasUsed": "934040", "status": 1, "byzantium": true }, diff --git a/deployments/berachainbartio/CriticalTimelock.json b/deployments/berachainbartio/CriticalTimelock.json index 247bb983..ee9832c4 100644 --- a/deployments/berachainbartio/CriticalTimelock.json +++ b/deployments/berachainbartio/CriticalTimelock.json @@ -1,5 +1,5 @@ { - "address": "0x243313C1cC198FF80756ed2ef14D9dcd94Ee762b", + "address": "0x920eeE8A5581e80Ca9C47CbF11B7A6cDB30204BD", "abi": [ { "inputs": [ @@ -448,23 +448,23 @@ "type": "function" } ], - "transactionHash": "0xbfe38b096e5c053ec896498808aebbcd95ac1dd8a673d408a57bf96e429088e1", + "transactionHash": "0x834777ccc6de0b1dc15e541dc70b18898e49050af6bccf70a67b70105367999f", "receipt": { "to": null, "from": "0x18BDb05DD1A95677f4381cfb4db52D342dF5C00d", - "contractAddress": "0x243313C1cC198FF80756ed2ef14D9dcd94Ee762b", - "transactionIndex": 42, + "contractAddress": "0x920eeE8A5581e80Ca9C47CbF11B7A6cDB30204BD", + "transactionIndex": 2, "gasUsed": "1178183", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x549afeb5ecedde13abac8adad5fc78901725790d2053c6b5a594efc133729e0d", - "transactionHash": "0xbfe38b096e5c053ec896498808aebbcd95ac1dd8a673d408a57bf96e429088e1", + "blockHash": "0xdf73177a6859391bb0006ec5e30d2ede4cd8dcdd14196ec029433aef869d14f6", + "transactionHash": "0x834777ccc6de0b1dc15e541dc70b18898e49050af6bccf70a67b70105367999f", "logs": [], - "blockNumber": 10537781, - "cumulativeGasUsed": "4657941", + "blockNumber": 10579981, + "cumulativeGasUsed": "1519307", "status": 1, "byzantium": true }, - "args": ["0xc80E4112940efF40c8626bAc0D8E79cB7dAbe289", 100], + "args": ["0xf1A468Db7787CE1BEA022e46156Fe6A30e0C7847", 100], "numDeployments": 1, "solcInputHash": "dd255b4e0156dfc73554b72a83ca02d8", "metadata": "{\"compiler\":{\"version\":\"0.8.25+commit.b61c2a91\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"delay_\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"ZeroAddressNotAllowed\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"txHash\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"signature\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"eta\",\"type\":\"uint256\"}],\"name\":\"CancelTransaction\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"txHash\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"signature\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"eta\",\"type\":\"uint256\"}],\"name\":\"ExecuteTransaction\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"oldAdmin\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"NewAdmin\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"oldDelay\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"newDelay\",\"type\":\"uint256\"}],\"name\":\"NewDelay\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newPendingAdmin\",\"type\":\"address\"}],\"name\":\"NewPendingAdmin\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"txHash\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"signature\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"eta\",\"type\":\"uint256\"}],\"name\":\"QueueTransaction\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"GRACE_PERIOD\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAXIMUM_DELAY\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MINIMUM_DELAY\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"acceptAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"signature\",\"type\":\"string\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"eta\",\"type\":\"uint256\"}],\"name\":\"cancelTransaction\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"delay\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"signature\",\"type\":\"string\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"eta\",\"type\":\"uint256\"}],\"name\":\"executeTransaction\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pendingAdmin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"signature\",\"type\":\"string\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"eta\",\"type\":\"uint256\"}],\"name\":\"queueTransaction\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"queuedTransactions\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"delay_\",\"type\":\"uint256\"}],\"name\":\"setDelay\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"pendingAdmin_\",\"type\":\"address\"}],\"name\":\"setPendingAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Venus\",\"kind\":\"dev\",\"methods\":{\"GRACE_PERIOD()\":{\"returns\":{\"_0\":\"The duration of the grace period, specified as a uint256 value.\"}},\"MAXIMUM_DELAY()\":{\"returns\":{\"_0\":\"Maximum delay\"}},\"MINIMUM_DELAY()\":{\"returns\":{\"_0\":\"Minimum delay\"}},\"acceptAdmin()\":{\"custom:access\":\"Sender must be pending admin\",\"custom:event\":\"Emit NewAdmin with old and new admin\"},\"cancelTransaction(address,uint256,string,bytes,uint256)\":{\"custom:access\":\"Sender must be admin\",\"custom:event\":\"Emit CancelTransaction\",\"params\":{\"data\":\"Arguments to be passed to the function when called\",\"eta\":\"Timestamp after which the transaction can be executed\",\"signature\":\"Signature of the function to be called\",\"target\":\"Address of the contract with the method to be called\",\"value\":\"Native token amount sent with the transaction\"}},\"executeTransaction(address,uint256,string,bytes,uint256)\":{\"custom:access\":\"Sender must be admin\",\"custom:event\":\"Emit ExecuteTransaction\",\"params\":{\"data\":\"Arguments to be passed to the function when called\",\"eta\":\"Timestamp after which the transaction can be executed\",\"signature\":\"Signature of the function to be called\",\"target\":\"Address of the contract with the method to be called\",\"value\":\"Native token amount sent with the transaction\"},\"returns\":{\"_0\":\"Result of function call\"}},\"queueTransaction(address,uint256,string,bytes,uint256)\":{\"custom:access\":\"Sender must be admin\",\"custom:event\":\"Emit QueueTransaction\",\"params\":{\"data\":\"Arguments to be passed to the function when called\",\"eta\":\"Timestamp after which the transaction can be executed\",\"signature\":\"Signature of the function to be called\",\"target\":\"Address of the contract with the method to be called\",\"value\":\"Native token amount sent with the transaction\"},\"returns\":{\"_0\":\"Hash of the queued transaction\"}},\"setDelay(uint256)\":{\"custom:access\":\"Sender must be Timelock itself\",\"custom:event\":\"Emit NewDelay with old and new delay\",\"params\":{\"delay_\":\"The new delay period for the transaction queue\"}},\"setPendingAdmin(address)\":{\"custom:access\":\"Sender must be Timelock contract itself or admin\",\"custom:event\":\"Emit NewPendingAdmin with new pending admin\",\"params\":{\"pendingAdmin_\":\"Address of the proposed admin\"}}},\"title\":\"TimelockV8\",\"version\":1},\"userdoc\":{\"errors\":{\"ZeroAddressNotAllowed()\":[{\"notice\":\"Thrown if the supplied address is a zero address where it is not allowed\"}]},\"events\":{\"CancelTransaction(bytes32,address,uint256,string,bytes,uint256)\":{\"notice\":\"Event emitted when a proposal transaction has been cancelled\"},\"ExecuteTransaction(bytes32,address,uint256,string,bytes,uint256)\":{\"notice\":\"Event emitted when a proposal transaction has been executed\"},\"NewAdmin(address,address)\":{\"notice\":\"Event emitted when a new admin is accepted\"},\"NewDelay(uint256,uint256)\":{\"notice\":\"Event emitted when a new delay is proposed\"},\"NewPendingAdmin(address)\":{\"notice\":\"Event emitted when a new admin is proposed\"},\"QueueTransaction(bytes32,address,uint256,string,bytes,uint256)\":{\"notice\":\"Event emitted when a proposal transaction has been queued\"}},\"kind\":\"user\",\"methods\":{\"GRACE_PERIOD()\":{\"notice\":\"Return grace period\"},\"MAXIMUM_DELAY()\":{\"notice\":\"Return required maximum delay\"},\"MINIMUM_DELAY()\":{\"notice\":\"Return required minimum delay\"},\"acceptAdmin()\":{\"notice\":\"Method for accepting a proposed admin\"},\"admin()\":{\"notice\":\"Timelock admin authorized to queue and execute transactions\"},\"cancelTransaction(address,uint256,string,bytes,uint256)\":{\"notice\":\"Called to cancel a queued transaction\"},\"delay()\":{\"notice\":\"Period for a proposal transaction to be queued\"},\"executeTransaction(address,uint256,string,bytes,uint256)\":{\"notice\":\"Called to execute a queued transaction\"},\"pendingAdmin()\":{\"notice\":\"Account proposed as the next admin\"},\"queueTransaction(address,uint256,string,bytes,uint256)\":{\"notice\":\"Called for each action when queuing a proposal\"},\"queuedTransactions(bytes32)\":{\"notice\":\"Mapping of queued transactions\"},\"setDelay(uint256)\":{\"notice\":\"Setter for the transaction queue delay\"},\"setPendingAdmin(address)\":{\"notice\":\"Method to propose a new admin authorized to call timelock functions. This should be the Governor Contract\"}},\"notice\":\"The Timelock contract using solidity V8. This contract also differs from the original timelock because it has a virtual function to get minimum delays and allow test deployments to override the value.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/Governance/TimelockV8.sol\":\"TimelockV8\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"@venusprotocol/solidity-utilities/contracts/validators.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.25;\\n\\n/// @notice Thrown if the supplied address is a zero address where it is not allowed\\nerror ZeroAddressNotAllowed();\\n\\n/// @notice Thrown if the supplied value is 0 where it is not allowed\\nerror ZeroValueNotAllowed();\\n\\n/// @notice Checks if the provided address is nonzero, reverts otherwise\\n/// @param address_ Address to check\\n/// @custom:error ZeroAddressNotAllowed is thrown if the provided address is a zero address\\nfunction ensureNonzeroAddress(address address_) pure {\\n if (address_ == address(0)) {\\n revert ZeroAddressNotAllowed();\\n }\\n}\\n\\n/// @notice Checks if the provided value is nonzero, reverts otherwise\\n/// @param value_ Value to check\\n/// @custom:error ZeroValueNotAllowed is thrown if the provided value is 0\\nfunction ensureNonzeroValue(uint256 value_) pure {\\n if (value_ == 0) {\\n revert ZeroValueNotAllowed();\\n }\\n}\\n\",\"keccak256\":\"0xdb88e14d50dd21889ca3329d755673d022c47e8da005b6a545c7f69c2c4b7b86\",\"license\":\"BSD-3-Clause\"},\"contracts/Governance/TimelockV8.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.25;\\nimport { ensureNonzeroAddress } from \\\"@venusprotocol/solidity-utilities/contracts/validators.sol\\\";\\n\\n/**\\n * @title TimelockV8\\n * @author Venus\\n * @notice The Timelock contract using solidity V8.\\n * This contract also differs from the original timelock because it has a virtual function to get minimum delays\\n * and allow test deployments to override the value.\\n */\\ncontract TimelockV8 {\\n /// @notice Required period to execute a proposal transaction\\n uint256 private constant DEFAULT_GRACE_PERIOD = 14 days;\\n\\n /// @notice Minimum amount of time a proposal transaction must be queued\\n uint256 private constant DEFAULT_MINIMUM_DELAY = 1 seconds;\\n\\n /// @notice Maximum amount of time a proposal transaction must be queued\\n uint256 private constant DEFAULT_MAXIMUM_DELAY = 30 days;\\n\\n /// @notice Timelock admin authorized to queue and execute transactions\\n address public admin;\\n\\n /// @notice Account proposed as the next admin\\n address public pendingAdmin;\\n\\n /// @notice Period for a proposal transaction to be queued\\n uint256 public delay;\\n\\n /// @notice Mapping of queued transactions\\n mapping(bytes32 => bool) public queuedTransactions;\\n\\n /// @notice Event emitted when a new admin is accepted\\n event NewAdmin(address indexed oldAdmin, address indexed newAdmin);\\n\\n /// @notice Event emitted when a new admin is proposed\\n event NewPendingAdmin(address indexed newPendingAdmin);\\n\\n /// @notice Event emitted when a new delay is proposed\\n event NewDelay(uint256 indexed oldDelay, uint256 indexed newDelay);\\n\\n /// @notice Event emitted when a proposal transaction has been cancelled\\n event CancelTransaction(\\n bytes32 indexed txHash,\\n address indexed target,\\n uint256 value,\\n string signature,\\n bytes data,\\n uint256 eta\\n );\\n\\n /// @notice Event emitted when a proposal transaction has been executed\\n event ExecuteTransaction(\\n bytes32 indexed txHash,\\n address indexed target,\\n uint256 value,\\n string signature,\\n bytes data,\\n uint256 eta\\n );\\n\\n /// @notice Event emitted when a proposal transaction has been queued\\n event QueueTransaction(\\n bytes32 indexed txHash,\\n address indexed target,\\n uint256 value,\\n string signature,\\n bytes data,\\n uint256 eta\\n );\\n\\n constructor(address admin_, uint256 delay_) {\\n require(delay_ >= MINIMUM_DELAY(), \\\"Timelock::constructor: Delay must exceed minimum delay.\\\");\\n require(delay_ <= MAXIMUM_DELAY(), \\\"Timelock::setDelay: Delay must not exceed maximum delay.\\\");\\n ensureNonzeroAddress(admin_);\\n\\n admin = admin_;\\n delay = delay_;\\n }\\n\\n fallback() external payable {}\\n\\n /**\\n * @notice Setter for the transaction queue delay\\n * @param delay_ The new delay period for the transaction queue\\n * @custom:access Sender must be Timelock itself\\n * @custom:event Emit NewDelay with old and new delay\\n */\\n function setDelay(uint256 delay_) public {\\n require(msg.sender == address(this), \\\"Timelock::setDelay: Call must come from Timelock.\\\");\\n require(delay_ >= MINIMUM_DELAY(), \\\"Timelock::setDelay: Delay must exceed minimum delay.\\\");\\n require(delay_ <= MAXIMUM_DELAY(), \\\"Timelock::setDelay: Delay must not exceed maximum delay.\\\");\\n emit NewDelay(delay, delay_);\\n delay = delay_;\\n }\\n\\n /**\\n * @notice Return grace period\\n * @return The duration of the grace period, specified as a uint256 value.\\n */\\n function GRACE_PERIOD() public view virtual returns (uint256) {\\n return DEFAULT_GRACE_PERIOD;\\n }\\n\\n /**\\n * @notice Return required minimum delay\\n * @return Minimum delay\\n */\\n function MINIMUM_DELAY() public view virtual returns (uint256) {\\n return DEFAULT_MINIMUM_DELAY;\\n }\\n\\n /**\\n * @notice Return required maximum delay\\n * @return Maximum delay\\n */\\n function MAXIMUM_DELAY() public view virtual returns (uint256) {\\n return DEFAULT_MAXIMUM_DELAY;\\n }\\n\\n /**\\n * @notice Method for accepting a proposed admin\\n * @custom:access Sender must be pending admin\\n * @custom:event Emit NewAdmin with old and new admin\\n */\\n function acceptAdmin() public {\\n require(msg.sender == pendingAdmin, \\\"Timelock::acceptAdmin: Call must come from pendingAdmin.\\\");\\n emit NewAdmin(admin, msg.sender);\\n admin = msg.sender;\\n pendingAdmin = address(0);\\n }\\n\\n /**\\n * @notice Method to propose a new admin authorized to call timelock functions. This should be the Governor Contract\\n * @param pendingAdmin_ Address of the proposed admin\\n * @custom:access Sender must be Timelock contract itself or admin\\n * @custom:event Emit NewPendingAdmin with new pending admin\\n */\\n function setPendingAdmin(address pendingAdmin_) public {\\n require(\\n msg.sender == address(this) || msg.sender == admin,\\n \\\"Timelock::setPendingAdmin: Call must come from Timelock.\\\"\\n );\\n ensureNonzeroAddress(pendingAdmin_);\\n pendingAdmin = pendingAdmin_;\\n\\n emit NewPendingAdmin(pendingAdmin);\\n }\\n\\n /**\\n * @notice Called for each action when queuing a proposal\\n * @param target Address of the contract with the method to be called\\n * @param value Native token amount sent with the transaction\\n * @param signature Signature of the function to be called\\n * @param data Arguments to be passed to the function when called\\n * @param eta Timestamp after which the transaction can be executed\\n * @return Hash of the queued transaction\\n * @custom:access Sender must be admin\\n * @custom:event Emit QueueTransaction\\n */\\n function queueTransaction(\\n address target,\\n uint256 value,\\n string calldata signature,\\n bytes calldata data,\\n uint256 eta\\n ) public returns (bytes32) {\\n require(msg.sender == admin, \\\"Timelock::queueTransaction: Call must come from admin.\\\");\\n require(\\n eta >= getBlockTimestamp() + delay,\\n \\\"Timelock::queueTransaction: Estimated execution block must satisfy delay.\\\"\\n );\\n\\n bytes32 txHash = keccak256(abi.encode(target, value, signature, data, eta));\\n require(!queuedTransactions[txHash], \\\"Timelock::queueTransaction: transaction already queued.\\\");\\n queuedTransactions[txHash] = true;\\n\\n emit QueueTransaction(txHash, target, value, signature, data, eta);\\n return txHash;\\n }\\n\\n /**\\n * @notice Called to cancel a queued transaction\\n * @param target Address of the contract with the method to be called\\n * @param value Native token amount sent with the transaction\\n * @param signature Signature of the function to be called\\n * @param data Arguments to be passed to the function when called\\n * @param eta Timestamp after which the transaction can be executed\\n * @custom:access Sender must be admin\\n * @custom:event Emit CancelTransaction\\n */\\n function cancelTransaction(\\n address target,\\n uint256 value,\\n string calldata signature,\\n bytes calldata data,\\n uint256 eta\\n ) public {\\n require(msg.sender == admin, \\\"Timelock::cancelTransaction: Call must come from admin.\\\");\\n\\n bytes32 txHash = keccak256(abi.encode(target, value, signature, data, eta));\\n require(queuedTransactions[txHash], \\\"Timelock::cancelTransaction: transaction is not queued yet.\\\");\\n delete (queuedTransactions[txHash]);\\n\\n emit CancelTransaction(txHash, target, value, signature, data, eta);\\n }\\n\\n /**\\n * @notice Called to execute a queued transaction\\n * @param target Address of the contract with the method to be called\\n * @param value Native token amount sent with the transaction\\n * @param signature Signature of the function to be called\\n * @param data Arguments to be passed to the function when called\\n * @param eta Timestamp after which the transaction can be executed\\n * @return Result of function call\\n * @custom:access Sender must be admin\\n * @custom:event Emit ExecuteTransaction\\n */\\n function executeTransaction(\\n address target,\\n uint256 value,\\n string calldata signature,\\n bytes calldata data,\\n uint256 eta\\n ) public returns (bytes memory) {\\n require(msg.sender == admin, \\\"Timelock::executeTransaction: Call must come from admin.\\\");\\n\\n bytes32 txHash = keccak256(abi.encode(target, value, signature, data, eta));\\n require(queuedTransactions[txHash], \\\"Timelock::executeTransaction: Transaction hasn't been queued.\\\");\\n require(getBlockTimestamp() >= eta, \\\"Timelock::executeTransaction: Transaction hasn't surpassed time lock.\\\");\\n require(getBlockTimestamp() <= eta + GRACE_PERIOD(), \\\"Timelock::executeTransaction: Transaction is stale.\\\");\\n\\n delete (queuedTransactions[txHash]);\\n\\n bytes memory callData;\\n\\n if (bytes(signature).length == 0) {\\n callData = data;\\n } else {\\n callData = abi.encodePacked(bytes4(keccak256(bytes(signature))), data);\\n }\\n\\n // solium-disable-next-line security/no-call-value\\n (bool success, bytes memory returnData) = target.call{ value: value }(callData);\\n require(success, \\\"Timelock::executeTransaction: Transaction execution reverted.\\\");\\n\\n emit ExecuteTransaction(txHash, target, value, signature, data, eta);\\n\\n return returnData;\\n }\\n\\n /**\\n * @notice Returns the current block timestamp\\n * @return The current block timestamp\\n */\\n function getBlockTimestamp() internal view returns (uint256) {\\n // solium-disable-next-line security/no-block-members\\n return block.timestamp;\\n }\\n}\\n\",\"keccak256\":\"0xaf1af48a0bb1ad0391a95270b934bcd30a0326f6e5ba415c581503807e689b45\",\"license\":\"BSD-3-Clause\"}},\"version\":1}", diff --git a/deployments/berachainbartio/DefaultProxyAdmin.json b/deployments/berachainbartio/DefaultProxyAdmin.json index 8396a463..0b84c8d7 100644 --- a/deployments/berachainbartio/DefaultProxyAdmin.json +++ b/deployments/berachainbartio/DefaultProxyAdmin.json @@ -1,5 +1,5 @@ { - "address": "0x39dBB4f255508995cc509E6fDAb2Ab1C286F5766", + "address": "0xccF1655d49bD9f94106524Cc416277135A811815", "abi": [ { "inputs": [ @@ -162,38 +162,38 @@ "type": "function" } ], - "transactionHash": "0xccdd63bcaf17e29766137cef42e3ceeda136be8a65a4cf3d8b5bdd76c5b88cb2", + "transactionHash": "0xd88a9c295b5ffa546b18898d377275778a72a0067d3efb4dbd54685354746628", "receipt": { "to": null, "from": "0x18BDb05DD1A95677f4381cfb4db52D342dF5C00d", - "contractAddress": "0x39dBB4f255508995cc509E6fDAb2Ab1C286F5766", - "transactionIndex": 5, + "contractAddress": "0xccF1655d49bD9f94106524Cc416277135A811815", + "transactionIndex": 11, "gasUsed": "642835", - "logsBloom": "0x00000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000001000000000000000000000000000000000000020004000000000000000800000000000000000000000000000000400000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000004004000000000000000000000000000", - "blockHash": "0x6c7d843e0cdee29270d39b2e4833253e6a88e18a830812ef9c0a3b30b3e26e82", - "transactionHash": "0xccdd63bcaf17e29766137cef42e3ceeda136be8a65a4cf3d8b5bdd76c5b88cb2", + "logsBloom": "0x00000000000000000000000010000000000000000000000000800000100001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000001000000000000000000000000000000000000020000100000000000000800000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000100000000000000000000000", + "blockHash": "0x3285d6264dbc3381398ffb6039e8c08058a003186f706c6f689cc692002408f9", + "transactionHash": "0xd88a9c295b5ffa546b18898d377275778a72a0067d3efb4dbd54685354746628", "logs": [ { - "transactionIndex": 5, - "blockNumber": 10537890, - "transactionHash": "0xccdd63bcaf17e29766137cef42e3ceeda136be8a65a4cf3d8b5bdd76c5b88cb2", - "address": "0x39dBB4f255508995cc509E6fDAb2Ab1C286F5766", + "transactionIndex": 11, + "blockNumber": 10580011, + "transactionHash": "0xd88a9c295b5ffa546b18898d377275778a72a0067d3efb4dbd54685354746628", + "address": "0xccF1655d49bD9f94106524Cc416277135A811815", "topics": [ "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x00000000000000000000000008cf9d51df988f1e69174d22b7f93f97e1aaebee" + "0x0000000000000000000000008699d418d8bae5cfdc566e4fce897b08bd9b03b0" ], "data": "0x", - "logIndex": 14, - "blockHash": "0x6c7d843e0cdee29270d39b2e4833253e6a88e18a830812ef9c0a3b30b3e26e82" + "logIndex": 13, + "blockHash": "0x3285d6264dbc3381398ffb6039e8c08058a003186f706c6f689cc692002408f9" } ], - "blockNumber": 10537890, - "cumulativeGasUsed": "1371968", + "blockNumber": 10580011, + "cumulativeGasUsed": "1074588", "status": 1, "byzantium": true }, - "args": ["0x08Cf9d51df988F1E69174D22b7f93f97e1aAEbeE"], + "args": ["0x8699D418D8bae5CFdc566E4fce897B08bd9B03B0"], "numDeployments": 1, "bytecode": "0x6080604052348015600f57600080fd5b50604051610b09380380610b09833981016040819052602c91608a565b80603481603a565b505060b8565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600060208284031215609b57600080fd5b81516001600160a01b038116811460b157600080fd5b9392505050565b610a42806100c76000396000f3fe60806040526004361061007b5760003560e01c80639623609d1161004e5780639623609d1461012b57806399a88ec41461013e578063f2fde38b1461015e578063f3b7dead1461017e57600080fd5b8063204e1c7a14610080578063715018a6146100c95780637eff275e146100e05780638da5cb5b14610100575b600080fd5b34801561008c57600080fd5b506100a061009b3660046107e4565b61019e565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b3480156100d557600080fd5b506100de610255565b005b3480156100ec57600080fd5b506100de6100fb366004610808565b6102e7565b34801561010c57600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff166100a0565b6100de610139366004610870565b6103ee565b34801561014a57600080fd5b506100de610159366004610808565b6104fc565b34801561016a57600080fd5b506100de6101793660046107e4565b6105d1565b34801561018a57600080fd5b506100a06101993660046107e4565b610701565b60008060008373ffffffffffffffffffffffffffffffffffffffff166040516101ea907f5c60da1b00000000000000000000000000000000000000000000000000000000815260040190565b600060405180830381855afa9150503d8060008114610225576040519150601f19603f3d011682016040523d82523d6000602084013e61022a565b606091505b50915091508161023957600080fd5b8080602001905181019061024d9190610964565b949350505050565b60005473ffffffffffffffffffffffffffffffffffffffff1633146102db576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b6102e5600061074d565b565b60005473ffffffffffffffffffffffffffffffffffffffff163314610368576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102d2565b6040517f8f28397000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8281166004830152831690638f283970906024015b600060405180830381600087803b1580156103d257600080fd5b505af11580156103e6573d6000803e3d6000fd5b505050505050565b60005473ffffffffffffffffffffffffffffffffffffffff16331461046f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102d2565b6040517f4f1ef28600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff841690634f1ef2869034906104c59086908690600401610981565b6000604051808303818588803b1580156104de57600080fd5b505af11580156104f2573d6000803e3d6000fd5b5050505050505050565b60005473ffffffffffffffffffffffffffffffffffffffff16331461057d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102d2565b6040517f3659cfe600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8281166004830152831690633659cfe6906024016103b8565b60005473ffffffffffffffffffffffffffffffffffffffff163314610652576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102d2565b73ffffffffffffffffffffffffffffffffffffffff81166106f5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016102d2565b6106fe8161074d565b50565b60008060008373ffffffffffffffffffffffffffffffffffffffff166040516101ea907ff851a44000000000000000000000000000000000000000000000000000000000815260040190565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b73ffffffffffffffffffffffffffffffffffffffff811681146106fe57600080fd5b6000602082840312156107f657600080fd5b8135610801816107c2565b9392505050565b6000806040838503121561081b57600080fd5b8235610826816107c2565b91506020830135610836816107c2565b809150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60008060006060848603121561088557600080fd5b8335610890816107c2565b925060208401356108a0816107c2565b9150604084013567ffffffffffffffff808211156108bd57600080fd5b818601915086601f8301126108d157600080fd5b8135818111156108e3576108e3610841565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810190838211818310171561092957610929610841565b8160405282815289602084870101111561094257600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b60006020828403121561097657600080fd5b8151610801816107c2565b73ffffffffffffffffffffffffffffffffffffffff831681526000602060406020840152835180604085015260005b818110156109cc578581018301518582016060015282016109b0565b5060006060828601015260607fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010192505050939250505056fea2646970667358221220c8b87e24bc510b348206f64f4e9e1d933af610bf37c2ebe141148cb2bdd2610264736f6c63430008190033", "deployedBytecode": "0x60806040526004361061007b5760003560e01c80639623609d1161004e5780639623609d1461012b57806399a88ec41461013e578063f2fde38b1461015e578063f3b7dead1461017e57600080fd5b8063204e1c7a14610080578063715018a6146100c95780637eff275e146100e05780638da5cb5b14610100575b600080fd5b34801561008c57600080fd5b506100a061009b3660046107e4565b61019e565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b3480156100d557600080fd5b506100de610255565b005b3480156100ec57600080fd5b506100de6100fb366004610808565b6102e7565b34801561010c57600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff166100a0565b6100de610139366004610870565b6103ee565b34801561014a57600080fd5b506100de610159366004610808565b6104fc565b34801561016a57600080fd5b506100de6101793660046107e4565b6105d1565b34801561018a57600080fd5b506100a06101993660046107e4565b610701565b60008060008373ffffffffffffffffffffffffffffffffffffffff166040516101ea907f5c60da1b00000000000000000000000000000000000000000000000000000000815260040190565b600060405180830381855afa9150503d8060008114610225576040519150601f19603f3d011682016040523d82523d6000602084013e61022a565b606091505b50915091508161023957600080fd5b8080602001905181019061024d9190610964565b949350505050565b60005473ffffffffffffffffffffffffffffffffffffffff1633146102db576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b6102e5600061074d565b565b60005473ffffffffffffffffffffffffffffffffffffffff163314610368576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102d2565b6040517f8f28397000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8281166004830152831690638f283970906024015b600060405180830381600087803b1580156103d257600080fd5b505af11580156103e6573d6000803e3d6000fd5b505050505050565b60005473ffffffffffffffffffffffffffffffffffffffff16331461046f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102d2565b6040517f4f1ef28600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff841690634f1ef2869034906104c59086908690600401610981565b6000604051808303818588803b1580156104de57600080fd5b505af11580156104f2573d6000803e3d6000fd5b5050505050505050565b60005473ffffffffffffffffffffffffffffffffffffffff16331461057d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102d2565b6040517f3659cfe600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8281166004830152831690633659cfe6906024016103b8565b60005473ffffffffffffffffffffffffffffffffffffffff163314610652576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102d2565b73ffffffffffffffffffffffffffffffffffffffff81166106f5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016102d2565b6106fe8161074d565b50565b60008060008373ffffffffffffffffffffffffffffffffffffffff166040516101ea907ff851a44000000000000000000000000000000000000000000000000000000000815260040190565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b73ffffffffffffffffffffffffffffffffffffffff811681146106fe57600080fd5b6000602082840312156107f657600080fd5b8135610801816107c2565b9392505050565b6000806040838503121561081b57600080fd5b8235610826816107c2565b91506020830135610836816107c2565b809150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60008060006060848603121561088557600080fd5b8335610890816107c2565b925060208401356108a0816107c2565b9150604084013567ffffffffffffffff808211156108bd57600080fd5b818601915086601f8301126108d157600080fd5b8135818111156108e3576108e3610841565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810190838211818310171561092957610929610841565b8160405282815289602084870101111561094257600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b60006020828403121561097657600080fd5b8151610801816107c2565b73ffffffffffffffffffffffffffffffffffffffff831681526000602060406020840152835180604085015260005b818110156109cc578581018301518582016060015282016109b0565b5060006060828601015260607fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010192505050939250505056fea2646970667358221220c8b87e24bc510b348206f64f4e9e1d933af610bf37c2ebe141148cb2bdd2610264736f6c63430008190033" diff --git a/deployments/berachainbartio/FastTrackTimelock.json b/deployments/berachainbartio/FastTrackTimelock.json index 214a850a..8687a313 100644 --- a/deployments/berachainbartio/FastTrackTimelock.json +++ b/deployments/berachainbartio/FastTrackTimelock.json @@ -1,5 +1,5 @@ { - "address": "0x2aae1073B2219729Ff8e5952887905A8da498062", + "address": "0x723b7CB226d86bd89638ec77936463453a46C656", "abi": [ { "inputs": [ @@ -448,23 +448,23 @@ "type": "function" } ], - "transactionHash": "0xb016a4daf23bd92d5eef1d92d4d293bcb9292f20216553ab975d3a4e71c2f5b3", + "transactionHash": "0x31706e0c3415e6aeefb8923d396aa2f45ea110034a4cff0d04d34f65aa01a256", "receipt": { "to": null, "from": "0x18BDb05DD1A95677f4381cfb4db52D342dF5C00d", - "contractAddress": "0x2aae1073B2219729Ff8e5952887905A8da498062", - "transactionIndex": 5, + "contractAddress": "0x723b7CB226d86bd89638ec77936463453a46C656", + "transactionIndex": 7, "gasUsed": "1178195", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x3c586611af38632a7961754c578bbf4451e8af32432af0f36cb9937f4c279527", - "transactionHash": "0xb016a4daf23bd92d5eef1d92d4d293bcb9292f20216553ab975d3a4e71c2f5b3", + "blockHash": "0xde79a5b51f09cd90fdd405cc6ceaca731536b53e1c6e9bb9340699f482fbcac5", + "transactionHash": "0x31706e0c3415e6aeefb8923d396aa2f45ea110034a4cff0d04d34f65aa01a256", "logs": [], - "blockNumber": 10537773, - "cumulativeGasUsed": "1393354", + "blockNumber": 10579978, + "cumulativeGasUsed": "1885060", "status": 1, "byzantium": true }, - "args": ["0xc80E4112940efF40c8626bAc0D8E79cB7dAbe289", 300], + "args": ["0xf1A468Db7787CE1BEA022e46156Fe6A30e0C7847", 300], "numDeployments": 1, "solcInputHash": "dd255b4e0156dfc73554b72a83ca02d8", "metadata": "{\"compiler\":{\"version\":\"0.8.25+commit.b61c2a91\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"delay_\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"ZeroAddressNotAllowed\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"txHash\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"signature\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"eta\",\"type\":\"uint256\"}],\"name\":\"CancelTransaction\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"txHash\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"signature\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"eta\",\"type\":\"uint256\"}],\"name\":\"ExecuteTransaction\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"oldAdmin\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"NewAdmin\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"oldDelay\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"newDelay\",\"type\":\"uint256\"}],\"name\":\"NewDelay\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newPendingAdmin\",\"type\":\"address\"}],\"name\":\"NewPendingAdmin\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"txHash\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"signature\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"eta\",\"type\":\"uint256\"}],\"name\":\"QueueTransaction\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"GRACE_PERIOD\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAXIMUM_DELAY\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MINIMUM_DELAY\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"acceptAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"signature\",\"type\":\"string\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"eta\",\"type\":\"uint256\"}],\"name\":\"cancelTransaction\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"delay\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"signature\",\"type\":\"string\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"eta\",\"type\":\"uint256\"}],\"name\":\"executeTransaction\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pendingAdmin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"signature\",\"type\":\"string\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"eta\",\"type\":\"uint256\"}],\"name\":\"queueTransaction\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"queuedTransactions\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"delay_\",\"type\":\"uint256\"}],\"name\":\"setDelay\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"pendingAdmin_\",\"type\":\"address\"}],\"name\":\"setPendingAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Venus\",\"kind\":\"dev\",\"methods\":{\"GRACE_PERIOD()\":{\"returns\":{\"_0\":\"The duration of the grace period, specified as a uint256 value.\"}},\"MAXIMUM_DELAY()\":{\"returns\":{\"_0\":\"Maximum delay\"}},\"MINIMUM_DELAY()\":{\"returns\":{\"_0\":\"Minimum delay\"}},\"acceptAdmin()\":{\"custom:access\":\"Sender must be pending admin\",\"custom:event\":\"Emit NewAdmin with old and new admin\"},\"cancelTransaction(address,uint256,string,bytes,uint256)\":{\"custom:access\":\"Sender must be admin\",\"custom:event\":\"Emit CancelTransaction\",\"params\":{\"data\":\"Arguments to be passed to the function when called\",\"eta\":\"Timestamp after which the transaction can be executed\",\"signature\":\"Signature of the function to be called\",\"target\":\"Address of the contract with the method to be called\",\"value\":\"Native token amount sent with the transaction\"}},\"executeTransaction(address,uint256,string,bytes,uint256)\":{\"custom:access\":\"Sender must be admin\",\"custom:event\":\"Emit ExecuteTransaction\",\"params\":{\"data\":\"Arguments to be passed to the function when called\",\"eta\":\"Timestamp after which the transaction can be executed\",\"signature\":\"Signature of the function to be called\",\"target\":\"Address of the contract with the method to be called\",\"value\":\"Native token amount sent with the transaction\"},\"returns\":{\"_0\":\"Result of function call\"}},\"queueTransaction(address,uint256,string,bytes,uint256)\":{\"custom:access\":\"Sender must be admin\",\"custom:event\":\"Emit QueueTransaction\",\"params\":{\"data\":\"Arguments to be passed to the function when called\",\"eta\":\"Timestamp after which the transaction can be executed\",\"signature\":\"Signature of the function to be called\",\"target\":\"Address of the contract with the method to be called\",\"value\":\"Native token amount sent with the transaction\"},\"returns\":{\"_0\":\"Hash of the queued transaction\"}},\"setDelay(uint256)\":{\"custom:access\":\"Sender must be Timelock itself\",\"custom:event\":\"Emit NewDelay with old and new delay\",\"params\":{\"delay_\":\"The new delay period for the transaction queue\"}},\"setPendingAdmin(address)\":{\"custom:access\":\"Sender must be Timelock contract itself or admin\",\"custom:event\":\"Emit NewPendingAdmin with new pending admin\",\"params\":{\"pendingAdmin_\":\"Address of the proposed admin\"}}},\"title\":\"TimelockV8\",\"version\":1},\"userdoc\":{\"errors\":{\"ZeroAddressNotAllowed()\":[{\"notice\":\"Thrown if the supplied address is a zero address where it is not allowed\"}]},\"events\":{\"CancelTransaction(bytes32,address,uint256,string,bytes,uint256)\":{\"notice\":\"Event emitted when a proposal transaction has been cancelled\"},\"ExecuteTransaction(bytes32,address,uint256,string,bytes,uint256)\":{\"notice\":\"Event emitted when a proposal transaction has been executed\"},\"NewAdmin(address,address)\":{\"notice\":\"Event emitted when a new admin is accepted\"},\"NewDelay(uint256,uint256)\":{\"notice\":\"Event emitted when a new delay is proposed\"},\"NewPendingAdmin(address)\":{\"notice\":\"Event emitted when a new admin is proposed\"},\"QueueTransaction(bytes32,address,uint256,string,bytes,uint256)\":{\"notice\":\"Event emitted when a proposal transaction has been queued\"}},\"kind\":\"user\",\"methods\":{\"GRACE_PERIOD()\":{\"notice\":\"Return grace period\"},\"MAXIMUM_DELAY()\":{\"notice\":\"Return required maximum delay\"},\"MINIMUM_DELAY()\":{\"notice\":\"Return required minimum delay\"},\"acceptAdmin()\":{\"notice\":\"Method for accepting a proposed admin\"},\"admin()\":{\"notice\":\"Timelock admin authorized to queue and execute transactions\"},\"cancelTransaction(address,uint256,string,bytes,uint256)\":{\"notice\":\"Called to cancel a queued transaction\"},\"delay()\":{\"notice\":\"Period for a proposal transaction to be queued\"},\"executeTransaction(address,uint256,string,bytes,uint256)\":{\"notice\":\"Called to execute a queued transaction\"},\"pendingAdmin()\":{\"notice\":\"Account proposed as the next admin\"},\"queueTransaction(address,uint256,string,bytes,uint256)\":{\"notice\":\"Called for each action when queuing a proposal\"},\"queuedTransactions(bytes32)\":{\"notice\":\"Mapping of queued transactions\"},\"setDelay(uint256)\":{\"notice\":\"Setter for the transaction queue delay\"},\"setPendingAdmin(address)\":{\"notice\":\"Method to propose a new admin authorized to call timelock functions. This should be the Governor Contract\"}},\"notice\":\"The Timelock contract using solidity V8. This contract also differs from the original timelock because it has a virtual function to get minimum delays and allow test deployments to override the value.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/Governance/TimelockV8.sol\":\"TimelockV8\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"@venusprotocol/solidity-utilities/contracts/validators.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.25;\\n\\n/// @notice Thrown if the supplied address is a zero address where it is not allowed\\nerror ZeroAddressNotAllowed();\\n\\n/// @notice Thrown if the supplied value is 0 where it is not allowed\\nerror ZeroValueNotAllowed();\\n\\n/// @notice Checks if the provided address is nonzero, reverts otherwise\\n/// @param address_ Address to check\\n/// @custom:error ZeroAddressNotAllowed is thrown if the provided address is a zero address\\nfunction ensureNonzeroAddress(address address_) pure {\\n if (address_ == address(0)) {\\n revert ZeroAddressNotAllowed();\\n }\\n}\\n\\n/// @notice Checks if the provided value is nonzero, reverts otherwise\\n/// @param value_ Value to check\\n/// @custom:error ZeroValueNotAllowed is thrown if the provided value is 0\\nfunction ensureNonzeroValue(uint256 value_) pure {\\n if (value_ == 0) {\\n revert ZeroValueNotAllowed();\\n }\\n}\\n\",\"keccak256\":\"0xdb88e14d50dd21889ca3329d755673d022c47e8da005b6a545c7f69c2c4b7b86\",\"license\":\"BSD-3-Clause\"},\"contracts/Governance/TimelockV8.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.25;\\nimport { ensureNonzeroAddress } from \\\"@venusprotocol/solidity-utilities/contracts/validators.sol\\\";\\n\\n/**\\n * @title TimelockV8\\n * @author Venus\\n * @notice The Timelock contract using solidity V8.\\n * This contract also differs from the original timelock because it has a virtual function to get minimum delays\\n * and allow test deployments to override the value.\\n */\\ncontract TimelockV8 {\\n /// @notice Required period to execute a proposal transaction\\n uint256 private constant DEFAULT_GRACE_PERIOD = 14 days;\\n\\n /// @notice Minimum amount of time a proposal transaction must be queued\\n uint256 private constant DEFAULT_MINIMUM_DELAY = 1 seconds;\\n\\n /// @notice Maximum amount of time a proposal transaction must be queued\\n uint256 private constant DEFAULT_MAXIMUM_DELAY = 30 days;\\n\\n /// @notice Timelock admin authorized to queue and execute transactions\\n address public admin;\\n\\n /// @notice Account proposed as the next admin\\n address public pendingAdmin;\\n\\n /// @notice Period for a proposal transaction to be queued\\n uint256 public delay;\\n\\n /// @notice Mapping of queued transactions\\n mapping(bytes32 => bool) public queuedTransactions;\\n\\n /// @notice Event emitted when a new admin is accepted\\n event NewAdmin(address indexed oldAdmin, address indexed newAdmin);\\n\\n /// @notice Event emitted when a new admin is proposed\\n event NewPendingAdmin(address indexed newPendingAdmin);\\n\\n /// @notice Event emitted when a new delay is proposed\\n event NewDelay(uint256 indexed oldDelay, uint256 indexed newDelay);\\n\\n /// @notice Event emitted when a proposal transaction has been cancelled\\n event CancelTransaction(\\n bytes32 indexed txHash,\\n address indexed target,\\n uint256 value,\\n string signature,\\n bytes data,\\n uint256 eta\\n );\\n\\n /// @notice Event emitted when a proposal transaction has been executed\\n event ExecuteTransaction(\\n bytes32 indexed txHash,\\n address indexed target,\\n uint256 value,\\n string signature,\\n bytes data,\\n uint256 eta\\n );\\n\\n /// @notice Event emitted when a proposal transaction has been queued\\n event QueueTransaction(\\n bytes32 indexed txHash,\\n address indexed target,\\n uint256 value,\\n string signature,\\n bytes data,\\n uint256 eta\\n );\\n\\n constructor(address admin_, uint256 delay_) {\\n require(delay_ >= MINIMUM_DELAY(), \\\"Timelock::constructor: Delay must exceed minimum delay.\\\");\\n require(delay_ <= MAXIMUM_DELAY(), \\\"Timelock::setDelay: Delay must not exceed maximum delay.\\\");\\n ensureNonzeroAddress(admin_);\\n\\n admin = admin_;\\n delay = delay_;\\n }\\n\\n fallback() external payable {}\\n\\n /**\\n * @notice Setter for the transaction queue delay\\n * @param delay_ The new delay period for the transaction queue\\n * @custom:access Sender must be Timelock itself\\n * @custom:event Emit NewDelay with old and new delay\\n */\\n function setDelay(uint256 delay_) public {\\n require(msg.sender == address(this), \\\"Timelock::setDelay: Call must come from Timelock.\\\");\\n require(delay_ >= MINIMUM_DELAY(), \\\"Timelock::setDelay: Delay must exceed minimum delay.\\\");\\n require(delay_ <= MAXIMUM_DELAY(), \\\"Timelock::setDelay: Delay must not exceed maximum delay.\\\");\\n emit NewDelay(delay, delay_);\\n delay = delay_;\\n }\\n\\n /**\\n * @notice Return grace period\\n * @return The duration of the grace period, specified as a uint256 value.\\n */\\n function GRACE_PERIOD() public view virtual returns (uint256) {\\n return DEFAULT_GRACE_PERIOD;\\n }\\n\\n /**\\n * @notice Return required minimum delay\\n * @return Minimum delay\\n */\\n function MINIMUM_DELAY() public view virtual returns (uint256) {\\n return DEFAULT_MINIMUM_DELAY;\\n }\\n\\n /**\\n * @notice Return required maximum delay\\n * @return Maximum delay\\n */\\n function MAXIMUM_DELAY() public view virtual returns (uint256) {\\n return DEFAULT_MAXIMUM_DELAY;\\n }\\n\\n /**\\n * @notice Method for accepting a proposed admin\\n * @custom:access Sender must be pending admin\\n * @custom:event Emit NewAdmin with old and new admin\\n */\\n function acceptAdmin() public {\\n require(msg.sender == pendingAdmin, \\\"Timelock::acceptAdmin: Call must come from pendingAdmin.\\\");\\n emit NewAdmin(admin, msg.sender);\\n admin = msg.sender;\\n pendingAdmin = address(0);\\n }\\n\\n /**\\n * @notice Method to propose a new admin authorized to call timelock functions. This should be the Governor Contract\\n * @param pendingAdmin_ Address of the proposed admin\\n * @custom:access Sender must be Timelock contract itself or admin\\n * @custom:event Emit NewPendingAdmin with new pending admin\\n */\\n function setPendingAdmin(address pendingAdmin_) public {\\n require(\\n msg.sender == address(this) || msg.sender == admin,\\n \\\"Timelock::setPendingAdmin: Call must come from Timelock.\\\"\\n );\\n ensureNonzeroAddress(pendingAdmin_);\\n pendingAdmin = pendingAdmin_;\\n\\n emit NewPendingAdmin(pendingAdmin);\\n }\\n\\n /**\\n * @notice Called for each action when queuing a proposal\\n * @param target Address of the contract with the method to be called\\n * @param value Native token amount sent with the transaction\\n * @param signature Signature of the function to be called\\n * @param data Arguments to be passed to the function when called\\n * @param eta Timestamp after which the transaction can be executed\\n * @return Hash of the queued transaction\\n * @custom:access Sender must be admin\\n * @custom:event Emit QueueTransaction\\n */\\n function queueTransaction(\\n address target,\\n uint256 value,\\n string calldata signature,\\n bytes calldata data,\\n uint256 eta\\n ) public returns (bytes32) {\\n require(msg.sender == admin, \\\"Timelock::queueTransaction: Call must come from admin.\\\");\\n require(\\n eta >= getBlockTimestamp() + delay,\\n \\\"Timelock::queueTransaction: Estimated execution block must satisfy delay.\\\"\\n );\\n\\n bytes32 txHash = keccak256(abi.encode(target, value, signature, data, eta));\\n require(!queuedTransactions[txHash], \\\"Timelock::queueTransaction: transaction already queued.\\\");\\n queuedTransactions[txHash] = true;\\n\\n emit QueueTransaction(txHash, target, value, signature, data, eta);\\n return txHash;\\n }\\n\\n /**\\n * @notice Called to cancel a queued transaction\\n * @param target Address of the contract with the method to be called\\n * @param value Native token amount sent with the transaction\\n * @param signature Signature of the function to be called\\n * @param data Arguments to be passed to the function when called\\n * @param eta Timestamp after which the transaction can be executed\\n * @custom:access Sender must be admin\\n * @custom:event Emit CancelTransaction\\n */\\n function cancelTransaction(\\n address target,\\n uint256 value,\\n string calldata signature,\\n bytes calldata data,\\n uint256 eta\\n ) public {\\n require(msg.sender == admin, \\\"Timelock::cancelTransaction: Call must come from admin.\\\");\\n\\n bytes32 txHash = keccak256(abi.encode(target, value, signature, data, eta));\\n require(queuedTransactions[txHash], \\\"Timelock::cancelTransaction: transaction is not queued yet.\\\");\\n delete (queuedTransactions[txHash]);\\n\\n emit CancelTransaction(txHash, target, value, signature, data, eta);\\n }\\n\\n /**\\n * @notice Called to execute a queued transaction\\n * @param target Address of the contract with the method to be called\\n * @param value Native token amount sent with the transaction\\n * @param signature Signature of the function to be called\\n * @param data Arguments to be passed to the function when called\\n * @param eta Timestamp after which the transaction can be executed\\n * @return Result of function call\\n * @custom:access Sender must be admin\\n * @custom:event Emit ExecuteTransaction\\n */\\n function executeTransaction(\\n address target,\\n uint256 value,\\n string calldata signature,\\n bytes calldata data,\\n uint256 eta\\n ) public returns (bytes memory) {\\n require(msg.sender == admin, \\\"Timelock::executeTransaction: Call must come from admin.\\\");\\n\\n bytes32 txHash = keccak256(abi.encode(target, value, signature, data, eta));\\n require(queuedTransactions[txHash], \\\"Timelock::executeTransaction: Transaction hasn't been queued.\\\");\\n require(getBlockTimestamp() >= eta, \\\"Timelock::executeTransaction: Transaction hasn't surpassed time lock.\\\");\\n require(getBlockTimestamp() <= eta + GRACE_PERIOD(), \\\"Timelock::executeTransaction: Transaction is stale.\\\");\\n\\n delete (queuedTransactions[txHash]);\\n\\n bytes memory callData;\\n\\n if (bytes(signature).length == 0) {\\n callData = data;\\n } else {\\n callData = abi.encodePacked(bytes4(keccak256(bytes(signature))), data);\\n }\\n\\n // solium-disable-next-line security/no-call-value\\n (bool success, bytes memory returnData) = target.call{ value: value }(callData);\\n require(success, \\\"Timelock::executeTransaction: Transaction execution reverted.\\\");\\n\\n emit ExecuteTransaction(txHash, target, value, signature, data, eta);\\n\\n return returnData;\\n }\\n\\n /**\\n * @notice Returns the current block timestamp\\n * @return The current block timestamp\\n */\\n function getBlockTimestamp() internal view returns (uint256) {\\n // solium-disable-next-line security/no-block-members\\n return block.timestamp;\\n }\\n}\\n\",\"keccak256\":\"0xaf1af48a0bb1ad0391a95270b934bcd30a0326f6e5ba415c581503807e689b45\",\"license\":\"BSD-3-Clause\"}},\"version\":1}", diff --git a/deployments/berachainbartio/NormalTimelock.json b/deployments/berachainbartio/NormalTimelock.json index b373c4af..83ffd29c 100644 --- a/deployments/berachainbartio/NormalTimelock.json +++ b/deployments/berachainbartio/NormalTimelock.json @@ -1,5 +1,5 @@ { - "address": "0x08Cf9d51df988F1E69174D22b7f93f97e1aAEbeE", + "address": "0x8699D418D8bae5CFdc566E4fce897B08bd9B03B0", "abi": [ { "inputs": [ @@ -448,23 +448,23 @@ "type": "function" } ], - "transactionHash": "0xbedbe82d86b2fece128fd33b9c8acba9928e09c7d2e763491369d3bbd3376cf1", + "transactionHash": "0x6b3c88387c97694d23c87dfe14428356732e41d622f95b77f6b2d1af26caf8a6", "receipt": { "to": null, "from": "0x18BDb05DD1A95677f4381cfb4db52D342dF5C00d", - "contractAddress": "0x08Cf9d51df988F1E69174D22b7f93f97e1aAEbeE", - "transactionIndex": 0, + "contractAddress": "0x8699D418D8bae5CFdc566E4fce897B08bd9B03B0", + "transactionIndex": 2, "gasUsed": "1178681", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x0f1e5de58cb674c8ab79c4d42800865628a1026ceb3afb3d046509eec6199257", - "transactionHash": "0xbedbe82d86b2fece128fd33b9c8acba9928e09c7d2e763491369d3bbd3376cf1", + "blockHash": "0xfad465bc6a2ac30ad84710723d231200f2608bb7476ac52606408eab11ac06d5", + "transactionHash": "0x6b3c88387c97694d23c87dfe14428356732e41d622f95b77f6b2d1af26caf8a6", "logs": [], - "blockNumber": 10534241, - "cumulativeGasUsed": "1178681", + "blockNumber": 10579940, + "cumulativeGasUsed": "1300958", "status": 1, "byzantium": true }, - "args": ["0xc80E4112940efF40c8626bAc0D8E79cB7dAbe289", 600], + "args": ["0xf1A468Db7787CE1BEA022e46156Fe6A30e0C7847", 600], "numDeployments": 1, "solcInputHash": "39b818455672acbd6d12469b0e689d7a", "metadata": "{\"compiler\":{\"version\":\"0.8.25+commit.b61c2a91\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"delay_\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"ZeroAddressNotAllowed\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"txHash\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"signature\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"eta\",\"type\":\"uint256\"}],\"name\":\"CancelTransaction\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"txHash\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"signature\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"eta\",\"type\":\"uint256\"}],\"name\":\"ExecuteTransaction\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"oldAdmin\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"NewAdmin\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"oldDelay\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"newDelay\",\"type\":\"uint256\"}],\"name\":\"NewDelay\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newPendingAdmin\",\"type\":\"address\"}],\"name\":\"NewPendingAdmin\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"txHash\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"signature\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"eta\",\"type\":\"uint256\"}],\"name\":\"QueueTransaction\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"GRACE_PERIOD\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAXIMUM_DELAY\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MINIMUM_DELAY\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"acceptAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"signature\",\"type\":\"string\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"eta\",\"type\":\"uint256\"}],\"name\":\"cancelTransaction\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"delay\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"signature\",\"type\":\"string\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"eta\",\"type\":\"uint256\"}],\"name\":\"executeTransaction\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pendingAdmin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"signature\",\"type\":\"string\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"eta\",\"type\":\"uint256\"}],\"name\":\"queueTransaction\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"queuedTransactions\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"delay_\",\"type\":\"uint256\"}],\"name\":\"setDelay\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"pendingAdmin_\",\"type\":\"address\"}],\"name\":\"setPendingAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Venus\",\"kind\":\"dev\",\"methods\":{\"GRACE_PERIOD()\":{\"returns\":{\"_0\":\"The duration of the grace period, specified as a uint256 value.\"}},\"MAXIMUM_DELAY()\":{\"returns\":{\"_0\":\"Maximum delay\"}},\"MINIMUM_DELAY()\":{\"returns\":{\"_0\":\"Minimum delay\"}},\"acceptAdmin()\":{\"custom:access\":\"Sender must be pending admin\",\"custom:event\":\"Emit NewAdmin with old and new admin\"},\"cancelTransaction(address,uint256,string,bytes,uint256)\":{\"custom:access\":\"Sender must be admin\",\"custom:event\":\"Emit CancelTransaction\",\"params\":{\"data\":\"Arguments to be passed to the function when called\",\"eta\":\"Timestamp after which the transaction can be executed\",\"signature\":\"Signature of the function to be called\",\"target\":\"Address of the contract with the method to be called\",\"value\":\"Native token amount sent with the transaction\"}},\"executeTransaction(address,uint256,string,bytes,uint256)\":{\"custom:access\":\"Sender must be admin\",\"custom:event\":\"Emit ExecuteTransaction\",\"params\":{\"data\":\"Arguments to be passed to the function when called\",\"eta\":\"Timestamp after which the transaction can be executed\",\"signature\":\"Signature of the function to be called\",\"target\":\"Address of the contract with the method to be called\",\"value\":\"Native token amount sent with the transaction\"},\"returns\":{\"_0\":\"Result of function call\"}},\"queueTransaction(address,uint256,string,bytes,uint256)\":{\"custom:access\":\"Sender must be admin\",\"custom:event\":\"Emit QueueTransaction\",\"params\":{\"data\":\"Arguments to be passed to the function when called\",\"eta\":\"Timestamp after which the transaction can be executed\",\"signature\":\"Signature of the function to be called\",\"target\":\"Address of the contract with the method to be called\",\"value\":\"Native token amount sent with the transaction\"},\"returns\":{\"_0\":\"Hash of the queued transaction\"}},\"setDelay(uint256)\":{\"custom:access\":\"Sender must be Timelock itself\",\"custom:event\":\"Emit NewDelay with old and new delay\",\"params\":{\"delay_\":\"The new delay period for the transaction queue\"}},\"setPendingAdmin(address)\":{\"custom:access\":\"Sender must be Timelock contract itself or admin\",\"custom:event\":\"Emit NewPendingAdmin with new pending admin\",\"params\":{\"pendingAdmin_\":\"Address of the proposed admin\"}}},\"title\":\"TimelockV8\",\"version\":1},\"userdoc\":{\"errors\":{\"ZeroAddressNotAllowed()\":[{\"notice\":\"Thrown if the supplied address is a zero address where it is not allowed\"}]},\"events\":{\"CancelTransaction(bytes32,address,uint256,string,bytes,uint256)\":{\"notice\":\"Event emitted when a proposal transaction has been cancelled\"},\"ExecuteTransaction(bytes32,address,uint256,string,bytes,uint256)\":{\"notice\":\"Event emitted when a proposal transaction has been executed\"},\"NewAdmin(address,address)\":{\"notice\":\"Event emitted when a new admin is accepted\"},\"NewDelay(uint256,uint256)\":{\"notice\":\"Event emitted when a new delay is proposed\"},\"NewPendingAdmin(address)\":{\"notice\":\"Event emitted when a new admin is proposed\"},\"QueueTransaction(bytes32,address,uint256,string,bytes,uint256)\":{\"notice\":\"Event emitted when a proposal transaction has been queued\"}},\"kind\":\"user\",\"methods\":{\"GRACE_PERIOD()\":{\"notice\":\"Return grace period\"},\"MAXIMUM_DELAY()\":{\"notice\":\"Return required maximum delay\"},\"MINIMUM_DELAY()\":{\"notice\":\"Return required minimum delay\"},\"acceptAdmin()\":{\"notice\":\"Method for accepting a proposed admin\"},\"admin()\":{\"notice\":\"Timelock admin authorized to queue and execute transactions\"},\"cancelTransaction(address,uint256,string,bytes,uint256)\":{\"notice\":\"Called to cancel a queued transaction\"},\"delay()\":{\"notice\":\"Period for a proposal transaction to be queued\"},\"executeTransaction(address,uint256,string,bytes,uint256)\":{\"notice\":\"Called to execute a queued transaction\"},\"pendingAdmin()\":{\"notice\":\"Account proposed as the next admin\"},\"queueTransaction(address,uint256,string,bytes,uint256)\":{\"notice\":\"Called for each action when queuing a proposal\"},\"queuedTransactions(bytes32)\":{\"notice\":\"Mapping of queued transactions\"},\"setDelay(uint256)\":{\"notice\":\"Setter for the transaction queue delay\"},\"setPendingAdmin(address)\":{\"notice\":\"Method to propose a new admin authorized to call timelock functions. This should be the Governor Contract\"}},\"notice\":\"The Timelock contract using solidity V8. This contract also differs from the original timelock because it has a virtual function to get minimum delays and allow test deployments to override the value.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/Governance/TimelockV8.sol\":\"TimelockV8\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"@venusprotocol/solidity-utilities/contracts/validators.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.25;\\n\\n/// @notice Thrown if the supplied address is a zero address where it is not allowed\\nerror ZeroAddressNotAllowed();\\n\\n/// @notice Thrown if the supplied value is 0 where it is not allowed\\nerror ZeroValueNotAllowed();\\n\\n/// @notice Checks if the provided address is nonzero, reverts otherwise\\n/// @param address_ Address to check\\n/// @custom:error ZeroAddressNotAllowed is thrown if the provided address is a zero address\\nfunction ensureNonzeroAddress(address address_) pure {\\n if (address_ == address(0)) {\\n revert ZeroAddressNotAllowed();\\n }\\n}\\n\\n/// @notice Checks if the provided value is nonzero, reverts otherwise\\n/// @param value_ Value to check\\n/// @custom:error ZeroValueNotAllowed is thrown if the provided value is 0\\nfunction ensureNonzeroValue(uint256 value_) pure {\\n if (value_ == 0) {\\n revert ZeroValueNotAllowed();\\n }\\n}\\n\",\"keccak256\":\"0xdb88e14d50dd21889ca3329d755673d022c47e8da005b6a545c7f69c2c4b7b86\",\"license\":\"BSD-3-Clause\"},\"contracts/Governance/TimelockV8.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.25;\\nimport { ensureNonzeroAddress } from \\\"@venusprotocol/solidity-utilities/contracts/validators.sol\\\";\\n\\n/**\\n * @title TimelockV8\\n * @author Venus\\n * @notice The Timelock contract using solidity V8.\\n * This contract also differs from the original timelock because it has a virtual function to get minimum delays\\n * and allow test deployments to override the value.\\n */\\ncontract TimelockV8 {\\n /// @notice Required period to execute a proposal transaction\\n uint256 private constant DEFAULT_GRACE_PERIOD = 14 days;\\n\\n /// @notice Minimum amount of time a proposal transaction must be queued\\n uint256 private constant DEFAULT_MINIMUM_DELAY = 10 minutes;\\n\\n /// @notice Maximum amount of time a proposal transaction must be queued\\n uint256 private constant DEFAULT_MAXIMUM_DELAY = 30 days;\\n\\n /// @notice Timelock admin authorized to queue and execute transactions\\n address public admin;\\n\\n /// @notice Account proposed as the next admin\\n address public pendingAdmin;\\n\\n /// @notice Period for a proposal transaction to be queued\\n uint256 public delay;\\n\\n /// @notice Mapping of queued transactions\\n mapping(bytes32 => bool) public queuedTransactions;\\n\\n /// @notice Event emitted when a new admin is accepted\\n event NewAdmin(address indexed oldAdmin, address indexed newAdmin);\\n\\n /// @notice Event emitted when a new admin is proposed\\n event NewPendingAdmin(address indexed newPendingAdmin);\\n\\n /// @notice Event emitted when a new delay is proposed\\n event NewDelay(uint256 indexed oldDelay, uint256 indexed newDelay);\\n\\n /// @notice Event emitted when a proposal transaction has been cancelled\\n event CancelTransaction(\\n bytes32 indexed txHash,\\n address indexed target,\\n uint256 value,\\n string signature,\\n bytes data,\\n uint256 eta\\n );\\n\\n /// @notice Event emitted when a proposal transaction has been executed\\n event ExecuteTransaction(\\n bytes32 indexed txHash,\\n address indexed target,\\n uint256 value,\\n string signature,\\n bytes data,\\n uint256 eta\\n );\\n\\n /// @notice Event emitted when a proposal transaction has been queued\\n event QueueTransaction(\\n bytes32 indexed txHash,\\n address indexed target,\\n uint256 value,\\n string signature,\\n bytes data,\\n uint256 eta\\n );\\n\\n constructor(address admin_, uint256 delay_) {\\n require(delay_ >= MINIMUM_DELAY(), \\\"Timelock::constructor: Delay must exceed minimum delay.\\\");\\n require(delay_ <= MAXIMUM_DELAY(), \\\"Timelock::setDelay: Delay must not exceed maximum delay.\\\");\\n ensureNonzeroAddress(admin_);\\n\\n admin = admin_;\\n delay = delay_;\\n }\\n\\n fallback() external payable {}\\n\\n /**\\n * @notice Setter for the transaction queue delay\\n * @param delay_ The new delay period for the transaction queue\\n * @custom:access Sender must be Timelock itself\\n * @custom:event Emit NewDelay with old and new delay\\n */\\n function setDelay(uint256 delay_) public {\\n require(msg.sender == address(this), \\\"Timelock::setDelay: Call must come from Timelock.\\\");\\n require(delay_ >= MINIMUM_DELAY(), \\\"Timelock::setDelay: Delay must exceed minimum delay.\\\");\\n require(delay_ <= MAXIMUM_DELAY(), \\\"Timelock::setDelay: Delay must not exceed maximum delay.\\\");\\n emit NewDelay(delay, delay_);\\n delay = delay_;\\n }\\n\\n /**\\n * @notice Return grace period\\n * @return The duration of the grace period, specified as a uint256 value.\\n */\\n function GRACE_PERIOD() public view virtual returns (uint256) {\\n return DEFAULT_GRACE_PERIOD;\\n }\\n\\n /**\\n * @notice Return required minimum delay\\n * @return Minimum delay\\n */\\n function MINIMUM_DELAY() public view virtual returns (uint256) {\\n return DEFAULT_MINIMUM_DELAY;\\n }\\n\\n /**\\n * @notice Return required maximum delay\\n * @return Maximum delay\\n */\\n function MAXIMUM_DELAY() public view virtual returns (uint256) {\\n return DEFAULT_MAXIMUM_DELAY;\\n }\\n\\n /**\\n * @notice Method for accepting a proposed admin\\n * @custom:access Sender must be pending admin\\n * @custom:event Emit NewAdmin with old and new admin\\n */\\n function acceptAdmin() public {\\n require(msg.sender == pendingAdmin, \\\"Timelock::acceptAdmin: Call must come from pendingAdmin.\\\");\\n emit NewAdmin(admin, msg.sender);\\n admin = msg.sender;\\n pendingAdmin = address(0);\\n }\\n\\n /**\\n * @notice Method to propose a new admin authorized to call timelock functions. This should be the Governor Contract\\n * @param pendingAdmin_ Address of the proposed admin\\n * @custom:access Sender must be Timelock contract itself or admin\\n * @custom:event Emit NewPendingAdmin with new pending admin\\n */\\n function setPendingAdmin(address pendingAdmin_) public {\\n require(\\n msg.sender == address(this) || msg.sender == admin,\\n \\\"Timelock::setPendingAdmin: Call must come from Timelock.\\\"\\n );\\n ensureNonzeroAddress(pendingAdmin_);\\n pendingAdmin = pendingAdmin_;\\n\\n emit NewPendingAdmin(pendingAdmin);\\n }\\n\\n /**\\n * @notice Called for each action when queuing a proposal\\n * @param target Address of the contract with the method to be called\\n * @param value Native token amount sent with the transaction\\n * @param signature Signature of the function to be called\\n * @param data Arguments to be passed to the function when called\\n * @param eta Timestamp after which the transaction can be executed\\n * @return Hash of the queued transaction\\n * @custom:access Sender must be admin\\n * @custom:event Emit QueueTransaction\\n */\\n function queueTransaction(\\n address target,\\n uint256 value,\\n string calldata signature,\\n bytes calldata data,\\n uint256 eta\\n ) public returns (bytes32) {\\n require(msg.sender == admin, \\\"Timelock::queueTransaction: Call must come from admin.\\\");\\n require(\\n eta >= getBlockTimestamp() + delay,\\n \\\"Timelock::queueTransaction: Estimated execution block must satisfy delay.\\\"\\n );\\n\\n bytes32 txHash = keccak256(abi.encode(target, value, signature, data, eta));\\n require(!queuedTransactions[txHash], \\\"Timelock::queueTransaction: transaction already queued.\\\");\\n queuedTransactions[txHash] = true;\\n\\n emit QueueTransaction(txHash, target, value, signature, data, eta);\\n return txHash;\\n }\\n\\n /**\\n * @notice Called to cancel a queued transaction\\n * @param target Address of the contract with the method to be called\\n * @param value Native token amount sent with the transaction\\n * @param signature Signature of the function to be called\\n * @param data Arguments to be passed to the function when called\\n * @param eta Timestamp after which the transaction can be executed\\n * @custom:access Sender must be admin\\n * @custom:event Emit CancelTransaction\\n */\\n function cancelTransaction(\\n address target,\\n uint256 value,\\n string calldata signature,\\n bytes calldata data,\\n uint256 eta\\n ) public {\\n require(msg.sender == admin, \\\"Timelock::cancelTransaction: Call must come from admin.\\\");\\n\\n bytes32 txHash = keccak256(abi.encode(target, value, signature, data, eta));\\n require(queuedTransactions[txHash], \\\"Timelock::cancelTransaction: transaction is not queued yet.\\\");\\n delete (queuedTransactions[txHash]);\\n\\n emit CancelTransaction(txHash, target, value, signature, data, eta);\\n }\\n\\n /**\\n * @notice Called to execute a queued transaction\\n * @param target Address of the contract with the method to be called\\n * @param value Native token amount sent with the transaction\\n * @param signature Signature of the function to be called\\n * @param data Arguments to be passed to the function when called\\n * @param eta Timestamp after which the transaction can be executed\\n * @return Result of function call\\n * @custom:access Sender must be admin\\n * @custom:event Emit ExecuteTransaction\\n */\\n function executeTransaction(\\n address target,\\n uint256 value,\\n string calldata signature,\\n bytes calldata data,\\n uint256 eta\\n ) public returns (bytes memory) {\\n require(msg.sender == admin, \\\"Timelock::executeTransaction: Call must come from admin.\\\");\\n\\n bytes32 txHash = keccak256(abi.encode(target, value, signature, data, eta));\\n require(queuedTransactions[txHash], \\\"Timelock::executeTransaction: Transaction hasn't been queued.\\\");\\n require(getBlockTimestamp() >= eta, \\\"Timelock::executeTransaction: Transaction hasn't surpassed time lock.\\\");\\n require(getBlockTimestamp() <= eta + GRACE_PERIOD(), \\\"Timelock::executeTransaction: Transaction is stale.\\\");\\n\\n delete (queuedTransactions[txHash]);\\n\\n bytes memory callData;\\n\\n if (bytes(signature).length == 0) {\\n callData = data;\\n } else {\\n callData = abi.encodePacked(bytes4(keccak256(bytes(signature))), data);\\n }\\n\\n // solium-disable-next-line security/no-call-value\\n (bool success, bytes memory returnData) = target.call{ value: value }(callData);\\n require(success, \\\"Timelock::executeTransaction: Transaction execution reverted.\\\");\\n\\n emit ExecuteTransaction(txHash, target, value, signature, data, eta);\\n\\n return returnData;\\n }\\n\\n /**\\n * @notice Returns the current block timestamp\\n * @return The current block timestamp\\n */\\n function getBlockTimestamp() internal view returns (uint256) {\\n // solium-disable-next-line security/no-block-members\\n return block.timestamp;\\n }\\n}\\n\",\"keccak256\":\"0x526aa877aa4467f667d0557acaa288e5ea0dbbeb21c5796d227adef493bd8dae\",\"license\":\"BSD-3-Clause\"}},\"version\":1}", diff --git a/deployments/berachainbartio/OmnichainExecutorOwner.json b/deployments/berachainbartio/OmnichainExecutorOwner.json index 3d7d3b38..5d33b22d 100644 --- a/deployments/berachainbartio/OmnichainExecutorOwner.json +++ b/deployments/berachainbartio/OmnichainExecutorOwner.json @@ -1,5 +1,5 @@ { - "address": "0xd934a7c03D6fA022321565f2042EC37bD26Baf3c", + "address": "0x94ba324b639F2C4617834dFcF45EA23188a17124", "abi": [ { "anonymous": false, @@ -421,84 +421,84 @@ "type": "constructor" } ], - "transactionHash": "0x3071210b323096c2d1c7386e068d15f62f1ffa159883a599584f95919e1f2b2d", + "transactionHash": "0x3dba668e2d0cc68736fe4c86e8064a3488e16f636bfcba15d0e288f556d65e60", "receipt": { "to": null, "from": "0x18BDb05DD1A95677f4381cfb4db52D342dF5C00d", - "contractAddress": "0xd934a7c03D6fA022321565f2042EC37bD26Baf3c", - "transactionIndex": 1, + "contractAddress": "0x94ba324b639F2C4617834dFcF45EA23188a17124", + "transactionIndex": 3, "gasUsed": "687927", - "logsBloom": "0x00000000000000000000000000000000400000000000000000800000000000000000000000000000000800000000000000000000000000000000000000008040000000000000000000000080000002000001000000000000000000000100000000000000020000000000020000000800000000800000000000000000000000400000000000000200000000000000000000000000001080000000000000800000000000000000000000000000000400000000000000800000000000000000000000000020000000000000000008040000000000010400000000000000000020000000000000000000000000000000000000000800000000000000000000000000", - "blockHash": "0xe93a3273367e39329d04772acf526bf3a8430ab51277b948dd29733dd2bcdde9", - "transactionHash": "0x3071210b323096c2d1c7386e068d15f62f1ffa159883a599584f95919e1f2b2d", + "logsBloom": "0x00000000000001000000000000000400400000000000000000800000000000000000000000000000000000000000000000000000000000000000000000008040000000010000000000000000000002000001000000000000000200000100000000000000020000000000020000000800000000800000000000000000000000400000000000000000000000000000000000000000000080000000000000800000000000000000000000000000000400000000000000800000000000000000000000000020000000000000000000040000000000000400000000000000200020000000000000200000000000000000000000000800000000000000000000000000", + "blockHash": "0x6fd859221a4f0c95cf0c018dedc5e3a96340cd82cd9eda102b3187fcbcded31c", + "transactionHash": "0x3dba668e2d0cc68736fe4c86e8064a3488e16f636bfcba15d0e288f556d65e60", "logs": [ { - "transactionIndex": 1, - "blockNumber": 10537900, - "transactionHash": "0x3071210b323096c2d1c7386e068d15f62f1ffa159883a599584f95919e1f2b2d", - "address": "0xd934a7c03D6fA022321565f2042EC37bD26Baf3c", + "transactionIndex": 3, + "blockNumber": 10580016, + "transactionHash": "0x3dba668e2d0cc68736fe4c86e8064a3488e16f636bfcba15d0e288f556d65e60", + "address": "0x94ba324b639F2C4617834dFcF45EA23188a17124", "topics": [ "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", - "0x00000000000000000000000009f0cf4ed50ed01994900ce9ee1ae85bfecd5c66" + "0x0000000000000000000000005ea62b02dacc7ca05e2402f0abef60e7591e8653" ], "data": "0x", - "logIndex": 1, - "blockHash": "0xe93a3273367e39329d04772acf526bf3a8430ab51277b948dd29733dd2bcdde9" + "logIndex": 3, + "blockHash": "0x6fd859221a4f0c95cf0c018dedc5e3a96340cd82cd9eda102b3187fcbcded31c" }, { - "transactionIndex": 1, - "blockNumber": 10537900, - "transactionHash": "0x3071210b323096c2d1c7386e068d15f62f1ffa159883a599584f95919e1f2b2d", - "address": "0xd934a7c03D6fA022321565f2042EC37bD26Baf3c", + "transactionIndex": 3, + "blockNumber": 10580016, + "transactionHash": "0x3dba668e2d0cc68736fe4c86e8064a3488e16f636bfcba15d0e288f556d65e60", + "address": "0x94ba324b639F2C4617834dFcF45EA23188a17124", "topics": [ "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x00000000000000000000000018bdb05dd1a95677f4381cfb4db52d342df5c00d" ], "data": "0x", - "logIndex": 2, - "blockHash": "0xe93a3273367e39329d04772acf526bf3a8430ab51277b948dd29733dd2bcdde9" + "logIndex": 4, + "blockHash": "0x6fd859221a4f0c95cf0c018dedc5e3a96340cd82cd9eda102b3187fcbcded31c" }, { - "transactionIndex": 1, - "blockNumber": 10537900, - "transactionHash": "0x3071210b323096c2d1c7386e068d15f62f1ffa159883a599584f95919e1f2b2d", - "address": "0xd934a7c03D6fA022321565f2042EC37bD26Baf3c", + "transactionIndex": 3, + "blockNumber": 10580016, + "transactionHash": "0x3dba668e2d0cc68736fe4c86e8064a3488e16f636bfcba15d0e288f556d65e60", + "address": "0x94ba324b639F2C4617834dFcF45EA23188a17124", "topics": ["0x66fd58e82f7b31a2a5c30e0888f3093efe4e111b00cd2b0c31fe014601293aa0"], - "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000092a6bcd9987eb8689152c5a89bcc5c03305139e3", - "logIndex": 3, - "blockHash": "0xe93a3273367e39329d04772acf526bf3a8430ab51277b948dd29733dd2bcdde9" + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ef368e4c1f9acc9241e66cd67531feb195ff7536", + "logIndex": 5, + "blockHash": "0x6fd859221a4f0c95cf0c018dedc5e3a96340cd82cd9eda102b3187fcbcded31c" }, { - "transactionIndex": 1, - "blockNumber": 10537900, - "transactionHash": "0x3071210b323096c2d1c7386e068d15f62f1ffa159883a599584f95919e1f2b2d", - "address": "0xd934a7c03D6fA022321565f2042EC37bD26Baf3c", + "transactionIndex": 3, + "blockNumber": 10580016, + "transactionHash": "0x3dba668e2d0cc68736fe4c86e8064a3488e16f636bfcba15d0e288f556d65e60", + "address": "0x94ba324b639F2C4617834dFcF45EA23188a17124", "topics": ["0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498"], "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 4, - "blockHash": "0xe93a3273367e39329d04772acf526bf3a8430ab51277b948dd29733dd2bcdde9" + "logIndex": 6, + "blockHash": "0x6fd859221a4f0c95cf0c018dedc5e3a96340cd82cd9eda102b3187fcbcded31c" }, { - "transactionIndex": 1, - "blockNumber": 10537900, - "transactionHash": "0x3071210b323096c2d1c7386e068d15f62f1ffa159883a599584f95919e1f2b2d", - "address": "0xd934a7c03D6fA022321565f2042EC37bD26Baf3c", + "transactionIndex": 3, + "blockNumber": 10580016, + "transactionHash": "0x3dba668e2d0cc68736fe4c86e8064a3488e16f636bfcba15d0e288f556d65e60", + "address": "0x94ba324b639F2C4617834dFcF45EA23188a17124", "topics": ["0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f"], - "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000039dbb4f255508995cc509e6fdab2ab1c286f5766", - "logIndex": 5, - "blockHash": "0xe93a3273367e39329d04772acf526bf3a8430ab51277b948dd29733dd2bcdde9" + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ccf1655d49bd9f94106524cc416277135a811815", + "logIndex": 7, + "blockHash": "0x6fd859221a4f0c95cf0c018dedc5e3a96340cd82cd9eda102b3187fcbcded31c" } ], - "blockNumber": 10537900, - "cumulativeGasUsed": "711502", + "blockNumber": 10580016, + "cumulativeGasUsed": "758652", "status": 1, "byzantium": true }, "args": [ - "0x09f0Cf4eD50ed01994900CE9ee1ae85BFECd5c66", - "0x39dBB4f255508995cc509E6fDAb2Ab1C286F5766", - "0xc4d66de800000000000000000000000092a6bcd9987eb8689152c5a89bcc5c03305139e3" + "0x5ea62b02dacC7cA05e2402f0aBef60E7591e8653", + "0xccF1655d49bD9f94106524Cc416277135A811815", + "0xc4d66de8000000000000000000000000ef368e4c1f9acc9241e66cd67531feb195ff7536" ], "numDeployments": 1, "solcInputHash": "e5536fb1b5f4db72d1c808989021a017", @@ -507,9 +507,9 @@ "deployedBytecode": "0x6080604052600436106100435760003560e01c80633659cfe61461005a5780634f1ef2861461007a5780635c60da1b1461008d578063f851a440146100cb57610052565b36610052576100506100e0565b005b6100506100e0565b34801561006657600080fd5b5061005061007536600461074b565b6100fa565b610050610088366004610766565b61015d565b34801561009957600080fd5b506100a26101ea565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b3480156100d757600080fd5b506100a2610241565b6100e86102a5565b6100f86100f3610395565b6103d5565b565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16330361015557610152816040518060200160405280600081525060006103f9565b50565b6101526100e0565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1633036101e2576101dd8383838080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250600192506103f9915050565b505050565b6101dd6100e0565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16330361023657610231610395565b905090565b61023e6100e0565b90565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16330361023657507f000000000000000000000000000000000000000000000000000000000000000090565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1633036100f8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f7879207461726760648201527f6574000000000000000000000000000000000000000000000000000000000000608482015260a4015b60405180910390fd5b60006102317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b3660008037600080366000845af43d6000803e8080156103f4573d6000f35b3d6000fd5b61040283610424565b60008251118061040f5750805b156101dd5761041e8383610471565b50505050565b61042d8161049d565b60405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6060610496838360405180606001604052806027815260200161087b602791396105a7565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff81163b610541576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e747261637400000000000000000000000000000000000000606482015260840161038c565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b606073ffffffffffffffffffffffffffffffffffffffff84163b61064d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e74726163740000000000000000000000000000000000000000000000000000606482015260840161038c565b6000808573ffffffffffffffffffffffffffffffffffffffff1685604051610675919061080d565b600060405180830381855af49150503d80600081146106b0576040519150601f19603f3d011682016040523d82523d6000602084013e6106b5565b606091505b50915091506106c58282866106cf565b9695505050505050565b606083156106de575081610496565b8251156106ee5782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161038c9190610829565b803573ffffffffffffffffffffffffffffffffffffffff8116811461074657600080fd5b919050565b60006020828403121561075d57600080fd5b61049682610722565b60008060006040848603121561077b57600080fd5b61078484610722565b9250602084013567ffffffffffffffff808211156107a157600080fd5b818601915086601f8301126107b557600080fd5b8135818111156107c457600080fd5b8760208285010111156107d657600080fd5b6020830194508093505050509250925092565b60005b838110156108045781810151838201526020016107ec565b50506000910152565b6000825161081f8184602087016107e9565b9190910192915050565b60208152600082518060208401526108488160408501602087016107e9565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212200136fd34dfdb0d97935b77a84c836b17bf901cefa29ed5b1ef847b08c6cba8d064736f6c63430008190033", "execute": { "methodName": "initialize", - "args": ["0x92A6BCD9987Eb8689152C5A89BCC5c03305139E3"] + "args": ["0xEf368e4c1f9ACC9241E66CD67531FEB195fF7536"] }, - "implementation": "0x09f0Cf4eD50ed01994900CE9ee1ae85BFECd5c66", + "implementation": "0x5ea62b02dacC7cA05e2402f0aBef60E7591e8653", "devdoc": { "details": "This contract implements a proxy that is upgradeable by an admin. To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing], which can potentially be used in an attack, this contract uses the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two things that go hand in hand: 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if that call matches one of the admin functions exposed by the proxy itself. 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the implementation. If the admin tries to call a function on the implementation it will fail with an error that says \"admin cannot fallback to proxy target\". These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to call a function from the proxy implementation. Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.", "events": { diff --git a/deployments/berachainbartio/OmnichainExecutorOwner_Implementation.json b/deployments/berachainbartio/OmnichainExecutorOwner_Implementation.json index 70ea3eef..b169ba7d 100644 --- a/deployments/berachainbartio/OmnichainExecutorOwner_Implementation.json +++ b/deployments/berachainbartio/OmnichainExecutorOwner_Implementation.json @@ -1,5 +1,5 @@ { - "address": "0x09f0Cf4eD50ed01994900CE9ee1ae85BFECd5c66", + "address": "0x5ea62b02dacC7cA05e2402f0aBef60E7591e8653", "abi": [ { "inputs": [ @@ -305,34 +305,34 @@ "type": "function" } ], - "transactionHash": "0x2749609f44f7276d43ca7d2440483da0de526a75a1293da352b4af583bfa6ba4", + "transactionHash": "0xdf859be9d9649c5f1036f2a2249d771cb34b11443d383979b9a0e981e82a79ce", "receipt": { "to": null, "from": "0x18BDb05DD1A95677f4381cfb4db52D342dF5C00d", - "contractAddress": "0x09f0Cf4eD50ed01994900CE9ee1ae85BFECd5c66", - "transactionIndex": 1, + "contractAddress": "0x5ea62b02dacC7cA05e2402f0aBef60E7591e8653", + "transactionIndex": 2, "gasUsed": "1549033", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000800000000000000000000080000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x7a0a1b16365f82b14d06a269b1c5411dcc38e4331e55a8481966d01898a7d8f0", - "transactionHash": "0x2749609f44f7276d43ca7d2440483da0de526a75a1293da352b4af583bfa6ba4", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000040008000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x0aabe02ce066b675f90958935852b915d2284db211ba131992188cecaa2a29b7", + "transactionHash": "0xdf859be9d9649c5f1036f2a2249d771cb34b11443d383979b9a0e981e82a79ce", "logs": [ { - "transactionIndex": 1, - "blockNumber": 10537895, - "transactionHash": "0x2749609f44f7276d43ca7d2440483da0de526a75a1293da352b4af583bfa6ba4", - "address": "0x09f0Cf4eD50ed01994900CE9ee1ae85BFECd5c66", + "transactionIndex": 2, + "blockNumber": 10580014, + "transactionHash": "0xdf859be9d9649c5f1036f2a2249d771cb34b11443d383979b9a0e981e82a79ce", + "address": "0x5ea62b02dacC7cA05e2402f0aBef60E7591e8653", "topics": ["0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498"], "data": "0x00000000000000000000000000000000000000000000000000000000000000ff", - "logIndex": 1, - "blockHash": "0x7a0a1b16365f82b14d06a269b1c5411dcc38e4331e55a8481966d01898a7d8f0" + "logIndex": 2, + "blockHash": "0x0aabe02ce066b675f90958935852b915d2284db211ba131992188cecaa2a29b7" } ], - "blockNumber": 10537895, - "cumulativeGasUsed": "1599629", + "blockNumber": 10580014, + "cumulativeGasUsed": "1668148", "status": 1, "byzantium": true }, - "args": ["0xc80E4112940efF40c8626bAc0D8E79cB7dAbe289"], + "args": ["0xf1A468Db7787CE1BEA022e46156Fe6A30e0C7847"], "numDeployments": 1, "solcInputHash": "9f400d4fd6f6fcf916824838bc678e25", "metadata": "{\"compiler\":{\"version\":\"0.8.25+commit.b61c2a91\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"omnichainGovernanceExecutor_\",\"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\":true,\"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\":\"OMNICHAIN_GOVERNANCE_EXECUTOR\",\"outputs\":[{\"internalType\":\"contract IOmnichainGovernanceExecutor\",\"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\":\"uint16\",\"name\":\"srcChainId_\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"srcAddress_\",\"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\"}],\"devdoc\":{\"author\":\"Venus\",\"custom:security-contact\":\"https://github.com/VenusProtocol/governance-contracts#discussion\",\"events\":{\"Initialized(uint8)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"}},\"kind\":\"dev\",\"methods\":{\"acceptOwnership()\":{\"details\":\"The new owner accepts the ownership transfer.\"},\"constructor\":{\"custom:oz-upgrades-unsafe-allow\":\"constructor\"},\"initialize(address)\":{\"params\":{\"accessControlManager_\":\"Address of access control manager\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"pendingOwner()\":{\"details\":\"Returns the address of the pending owner.\"},\"setAccessControlManager(address)\":{\"custom:access\":\"Only Governance\",\"custom:event\":\"Emits NewAccessControlManager event\",\"details\":\"Admin function to set address of AccessControlManager\",\"params\":{\"accessControlManager_\":\"The new address of the AccessControlManager\"}},\"setTrustedRemoteAddress(uint16,bytes)\":{\"custom:access\":\"Controlled by AccessControlManager\",\"custom:event\":\"Emits SetTrustedRemoteAddress with source chain Id and source address\",\"params\":{\"srcAddress_\":\"The address of the contract on the source chain\",\"srcChainId_\":\"The LayerZero id of a source chain\"}},\"transferBridgeOwnership(address)\":{\"custom:access\":\"Controlled by AccessControlManager\",\"params\":{\"newOwner_\":\"New owner of the governanceExecutor\"}},\"transferOwnership(address)\":{\"details\":\"Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one. Can only be called by the current owner.\"},\"upsertSignature(string[],bool[])\":{\"custom:access\":\"Only owner\",\"params\":{\"active_\":\"bool value, should be true to add function\",\"signatures_\":\"Function signature to be added or removed\"}}},\"stateVariables\":{\"OMNICHAIN_GOVERNANCE_EXECUTOR\":{\"custom:oz-upgrades-unsafe-allow\":\"state-variable-immutable\"}},\"title\":\"OmnichainExecutorOwner\",\"version\":1},\"userdoc\":{\"errors\":{\"Unauthorized(address,address,string)\":[{\"notice\":\"Thrown when the action is prohibited by AccessControlManager\"}],\"ZeroAddressNotAllowed()\":[{\"notice\":\"Thrown if the supplied address is a zero address where it is not allowed\"}]},\"events\":{\"FunctionRegistryChanged(string,bool)\":{\"notice\":\"Event emitted when function registry updated\"},\"NewAccessControlManager(address,address)\":{\"notice\":\"Emitted when access control manager contract address is changed\"}},\"kind\":\"user\",\"methods\":{\"accessControlManager()\":{\"notice\":\"Returns the address of the access control manager contract\"},\"functionRegistry(bytes4)\":{\"notice\":\"Stores function signature corresponding to their 4 bytes hash value\"},\"initialize(address)\":{\"notice\":\"Initialize the contract\"},\"renounceOwnership()\":{\"notice\":\"Empty implementation of renounce ownership to avoid any mishappening\"},\"setAccessControlManager(address)\":{\"notice\":\"Sets the address of AccessControlManager\"},\"setTrustedRemoteAddress(uint16,bytes)\":{\"notice\":\"Sets the source message sender address\"},\"transferBridgeOwnership(address)\":{\"notice\":\"This function transfer the ownership of the executor from this contract to new owner\"},\"upsertSignature(string[],bool[])\":{\"notice\":\"A registry of functions that are allowed to be executed from proposals\"}},\"notice\":\"OmnichainProposalSender contract acts as a governance and access control mechanism, allowing owner to upsert signature of OmnichainGovernanceExecutor contract, also contains function to transfer the ownership of contract as well.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/Cross-chain/OmnichainExecutorOwner.sol\":\"OmnichainExecutorOwner\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (access/Ownable2Step.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./OwnableUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which provides access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership} and {acceptOwnership}.\\n *\\n * This module is used through inheritance. It will make available all functions\\n * from parent (Ownable).\\n */\\nabstract contract Ownable2StepUpgradeable is Initializable, OwnableUpgradeable {\\n function __Ownable2Step_init() internal onlyInitializing {\\n __Ownable_init_unchained();\\n }\\n\\n function __Ownable2Step_init_unchained() internal onlyInitializing {\\n }\\n address private _pendingOwner;\\n\\n event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Returns the address of the pending owner.\\n */\\n function pendingOwner() public view virtual returns (address) {\\n return _pendingOwner;\\n }\\n\\n /**\\n * @dev Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one.\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual override onlyOwner {\\n _pendingOwner = newOwner;\\n emit OwnershipTransferStarted(owner(), newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`) and deletes any pending owner.\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual override {\\n delete _pendingOwner;\\n super._transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev The new owner accepts the ownership transfer.\\n */\\n function acceptOwnership() external {\\n address sender = _msgSender();\\n require(pendingOwner() == sender, \\\"Ownable2Step: caller is not the new owner\\\");\\n _transferOwnership(sender);\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0xd712fb45b3ea0ab49679164e3895037adc26ce12879d5184feb040e01c1c07a9\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n function __Ownable_init() internal onlyInitializing {\\n __Ownable_init_unchained();\\n }\\n\\n function __Ownable_init_unchained() internal onlyInitializing {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x247c62047745915c0af6b955470a72d1696ebad4352d7d3011aef1a2463cd888\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.1) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized < type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint8) {\\n return _initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _initializing;\\n }\\n}\\n\",\"keccak256\":\"0x037c334add4b033ad3493038c25be1682d78c00992e1acb0e2795caff3925271\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2edcb41c121abc510932e8d83ff8b82cf9cdde35e7c297622f5c29ef0af25183\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract ContextUpgradeable is Initializable {\\n function __Context_init() internal onlyInitializing {\\n }\\n\\n function __Context_init_unchained() internal onlyInitializing {\\n }\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x963ea7f0b48b032eef72fe3a7582edf78408d6f834115b9feadd673a4d5bd149\",\"license\":\"MIT\"},\"@openzeppelin/contracts/access/IAccessControl.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev External interface of AccessControl declared to support ERC165 detection.\\n */\\ninterface IAccessControl {\\n /**\\n * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\\n *\\n * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\\n * {RoleAdminChanged} not being emitted signaling this.\\n *\\n * _Available since v3.1._\\n */\\n event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\\n\\n /**\\n * @dev Emitted when `account` is granted `role`.\\n *\\n * `sender` is the account that originated the contract call, an admin role\\n * bearer except when using {AccessControl-_setupRole}.\\n */\\n event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Emitted when `account` is revoked `role`.\\n *\\n * `sender` is the account that originated the contract call:\\n * - if using `revokeRole`, it is the admin role bearer\\n * - if using `renounceRole`, it is the role bearer (i.e. `account`)\\n */\\n event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) external view returns (bool);\\n\\n /**\\n * @dev Returns the admin role that controls `role`. See {grantRole} and\\n * {revokeRole}.\\n *\\n * To change a role's admin, use {AccessControl-_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) external view returns (bytes32);\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function grantRole(bytes32 role, address account) external;\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function revokeRole(bytes32 role, address account) external;\\n\\n /**\\n * @dev Revokes `role` from the calling account.\\n *\\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\\n * purpose is to provide a mechanism for accounts to lose their privileges\\n * if they are compromised (such as when a trusted device is misplaced).\\n *\\n * If the calling account had been granted `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n */\\n function renounceRole(bytes32 role, address account) external;\\n}\\n\",\"keccak256\":\"0x59ce320a585d7e1f163cd70390a0ef2ff9cec832e2aa544293a00692465a7a57\",\"license\":\"MIT\"},\"@venusprotocol/solidity-utilities/contracts/validators.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.25;\\n\\n/// @notice Thrown if the supplied address is a zero address where it is not allowed\\nerror ZeroAddressNotAllowed();\\n\\n/// @notice Thrown if the supplied value is 0 where it is not allowed\\nerror ZeroValueNotAllowed();\\n\\n/// @notice Checks if the provided address is nonzero, reverts otherwise\\n/// @param address_ Address to check\\n/// @custom:error ZeroAddressNotAllowed is thrown if the provided address is a zero address\\nfunction ensureNonzeroAddress(address address_) pure {\\n if (address_ == address(0)) {\\n revert ZeroAddressNotAllowed();\\n }\\n}\\n\\n/// @notice Checks if the provided value is nonzero, reverts otherwise\\n/// @param value_ Value to check\\n/// @custom:error ZeroValueNotAllowed is thrown if the provided value is 0\\nfunction ensureNonzeroValue(uint256 value_) pure {\\n if (value_ == 0) {\\n revert ZeroValueNotAllowed();\\n }\\n}\\n\",\"keccak256\":\"0xdb88e14d50dd21889ca3329d755673d022c47e8da005b6a545c7f69c2c4b7b86\",\"license\":\"BSD-3-Clause\"},\"contracts/Cross-chain/OmnichainExecutorOwner.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.25;\\n\\nimport { AccessControlledV8 } from \\\"../Governance/AccessControlledV8.sol\\\";\\nimport { IOmnichainGovernanceExecutor } from \\\"./interfaces/IOmnichainGovernanceExecutor.sol\\\";\\nimport { ensureNonzeroAddress } from \\\"@venusprotocol/solidity-utilities/contracts/validators.sol\\\";\\n\\n/**\\n * @title OmnichainExecutorOwner\\n * @author Venus\\n * @notice OmnichainProposalSender contract acts as a governance and access control mechanism,\\n * allowing owner to upsert signature of OmnichainGovernanceExecutor contract,\\n * also contains function to transfer the ownership of contract as well.\\n * @custom:security-contact https://github.com/VenusProtocol/governance-contracts#discussion\\n */\\n\\ncontract OmnichainExecutorOwner is AccessControlledV8 {\\n /**\\n * @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n */\\n IOmnichainGovernanceExecutor public immutable OMNICHAIN_GOVERNANCE_EXECUTOR;\\n\\n /**\\n * @notice Stores function signature corresponding to their 4 bytes hash value\\n */\\n mapping(bytes4 => string) public functionRegistry;\\n\\n /**\\n * @notice Event emitted when function registry updated\\n */\\n event FunctionRegistryChanged(string indexed signature, bool active);\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor(address omnichainGovernanceExecutor_) {\\n require(omnichainGovernanceExecutor_ != address(0), \\\"Address must not be zero\\\");\\n OMNICHAIN_GOVERNANCE_EXECUTOR = IOmnichainGovernanceExecutor(omnichainGovernanceExecutor_);\\n _disableInitializers();\\n }\\n\\n /**\\n * @notice Initialize the contract\\n * @param accessControlManager_ Address of access control manager\\n */\\n function initialize(address accessControlManager_) external initializer {\\n require(accessControlManager_ != address(0), \\\"Address must not be zero\\\");\\n __AccessControlled_init(accessControlManager_);\\n }\\n\\n /**\\n * @notice Sets the source message sender address\\n * @param srcChainId_ The LayerZero id of a source chain\\n * @param srcAddress_ The address of the contract on the source chain\\n * @custom:access Controlled by AccessControlManager\\n * @custom:event Emits SetTrustedRemoteAddress with source chain Id and source address\\n */\\n function setTrustedRemoteAddress(uint16 srcChainId_, bytes calldata srcAddress_) external {\\n _checkAccessAllowed(\\\"setTrustedRemoteAddress(uint16,bytes)\\\");\\n require(srcChainId_ != 0, \\\"ChainId must not be zero\\\");\\n ensureNonzeroAddress(address(uint160(bytes20(srcAddress_))));\\n require(srcAddress_.length == 20, \\\"Source address must be 20 bytes long\\\");\\n OMNICHAIN_GOVERNANCE_EXECUTOR.setTrustedRemoteAddress(srcChainId_, srcAddress_);\\n }\\n\\n /**\\n * @notice Invoked when called function does not exist in the contract\\n * @param data_ Calldata containing the encoded function call\\n * @return Result of function call\\n * @custom:access Controlled by Access Control Manager\\n */\\n fallback(bytes calldata data_) external returns (bytes memory) {\\n string memory fun = functionRegistry[msg.sig];\\n require(bytes(fun).length != 0, \\\"Function not found\\\");\\n _checkAccessAllowed(fun);\\n (bool ok, bytes memory res) = address(OMNICHAIN_GOVERNANCE_EXECUTOR).call(data_);\\n require(ok, \\\"call failed\\\");\\n return res;\\n }\\n\\n /**\\n * @notice A registry of functions that are allowed to be executed from proposals\\n * @param signatures_ Function signature to be added or removed\\n * @param active_ bool value, should be true to add function\\n * @custom:access Only owner\\n */\\n function upsertSignature(string[] calldata signatures_, bool[] calldata active_) external onlyOwner {\\n uint256 signatureLength = signatures_.length;\\n require(signatureLength == active_.length, \\\"Input arrays must have the same length\\\");\\n for (uint256 i; i < signatureLength; ++i) {\\n bytes4 sigHash = bytes4(keccak256(bytes(signatures_[i])));\\n bytes memory signature = bytes(functionRegistry[sigHash]);\\n if (active_[i] && signature.length == 0) {\\n functionRegistry[sigHash] = signatures_[i];\\n emit FunctionRegistryChanged(signatures_[i], true);\\n } else if (!active_[i] && signature.length != 0) {\\n delete functionRegistry[sigHash];\\n emit FunctionRegistryChanged(signatures_[i], false);\\n }\\n }\\n }\\n\\n /**\\n * @notice This function transfer the ownership of the executor from this contract to new owner\\n * @param newOwner_ New owner of the governanceExecutor\\n * @custom:access Controlled by AccessControlManager\\n */\\n\\n function transferBridgeOwnership(address newOwner_) external {\\n _checkAccessAllowed(\\\"transferBridgeOwnership(address)\\\");\\n require(newOwner_ != address(0), \\\"Address must not be zero\\\");\\n OMNICHAIN_GOVERNANCE_EXECUTOR.transferOwnership(newOwner_);\\n }\\n\\n /**\\n * @notice Empty implementation of renounce ownership to avoid any mishappening\\n */\\n function renounceOwnership() public virtual override {}\\n}\\n\",\"keccak256\":\"0xc04fcc16654a57743f1b515fc61aeed0bfe67e456c72e5cce7ff613439133109\",\"license\":\"BSD-3-Clause\"},\"contracts/Cross-chain/interfaces/IOmnichainGovernanceExecutor.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.25;\\n\\ninterface IOmnichainGovernanceExecutor {\\n /**\\n * @notice Transfers ownership of the contract to the specified address\\n * @param addr The address to which ownership will be transferred\\n */\\n function transferOwnership(address addr) external;\\n\\n /**\\n * @notice Sets the source message sender address\\n * @param srcChainId_ The LayerZero id of a source chain\\n * @param srcAddress_ The address of the contract on the source chain\\n */\\n function setTrustedRemoteAddress(uint16 srcChainId_, bytes calldata srcAddress_) external;\\n}\\n\",\"keccak256\":\"0xae3df89cc760968a190e3d723211a643c2aa49c54c0579a1e17db4fc27bf24cb\",\"license\":\"MIT\"},\"contracts/Governance/AccessControlledV8.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.25;\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol\\\";\\n\\nimport \\\"./IAccessControlManagerV8.sol\\\";\\n\\n/**\\n * @title AccessControlledV8\\n * @author Venus\\n * @notice This contract is helper between access control manager and actual contract. This contract further inherited by other contract (using solidity 0.8.13)\\n * to integrate access controlled mechanism. It provides initialise methods and verifying access methods.\\n */\\nabstract contract AccessControlledV8 is Initializable, Ownable2StepUpgradeable {\\n /// @notice Access control manager contract\\n IAccessControlManagerV8 private _accessControlManager;\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n\\n /// @notice Emitted when access control manager contract address is changed\\n event NewAccessControlManager(address oldAccessControlManager, address newAccessControlManager);\\n\\n /// @notice Thrown when the action is prohibited by AccessControlManager\\n error Unauthorized(address sender, address calledContract, string methodSignature);\\n\\n function __AccessControlled_init(address accessControlManager_) internal onlyInitializing {\\n __Ownable2Step_init();\\n __AccessControlled_init_unchained(accessControlManager_);\\n }\\n\\n function __AccessControlled_init_unchained(address accessControlManager_) internal onlyInitializing {\\n _setAccessControlManager(accessControlManager_);\\n }\\n\\n /**\\n * @notice Sets the address of AccessControlManager\\n * @dev Admin function to set address of AccessControlManager\\n * @param accessControlManager_ The new address of the AccessControlManager\\n * @custom:event Emits NewAccessControlManager event\\n * @custom:access Only Governance\\n */\\n function setAccessControlManager(address accessControlManager_) external onlyOwner {\\n _setAccessControlManager(accessControlManager_);\\n }\\n\\n /**\\n * @notice Returns the address of the access control manager contract\\n */\\n function accessControlManager() external view returns (IAccessControlManagerV8) {\\n return _accessControlManager;\\n }\\n\\n /**\\n * @dev Internal function to set address of AccessControlManager\\n * @param accessControlManager_ The new address of the AccessControlManager\\n */\\n function _setAccessControlManager(address accessControlManager_) internal {\\n require(address(accessControlManager_) != address(0), \\\"invalid acess control manager address\\\");\\n address oldAccessControlManager = address(_accessControlManager);\\n _accessControlManager = IAccessControlManagerV8(accessControlManager_);\\n emit NewAccessControlManager(oldAccessControlManager, accessControlManager_);\\n }\\n\\n /**\\n * @notice Reverts if the call is not allowed by AccessControlManager\\n * @param signature Method signature\\n */\\n function _checkAccessAllowed(string memory signature) internal view {\\n bool isAllowedToCall = _accessControlManager.isAllowedToCall(msg.sender, signature);\\n\\n if (!isAllowedToCall) {\\n revert Unauthorized(msg.sender, address(this), signature);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x0dcf283925f4dddc23ca0ee71d2cb96a9dd6e4cf08061b69fde1697ea39dc514\",\"license\":\"BSD-3-Clause\"},\"contracts/Governance/IAccessControlManagerV8.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity ^0.8.25;\\n\\nimport \\\"@openzeppelin/contracts/access/IAccessControl.sol\\\";\\n\\n/**\\n * @title IAccessControlManagerV8\\n * @author Venus\\n * @notice Interface implemented by the `AccessControlManagerV8` contract.\\n */\\ninterface IAccessControlManagerV8 is IAccessControl {\\n function giveCallPermission(address contractAddress, string calldata functionSig, address accountToPermit) external;\\n\\n function revokeCallPermission(\\n address contractAddress,\\n string calldata functionSig,\\n address accountToRevoke\\n ) external;\\n\\n function isAllowedToCall(address account, string calldata functionSig) external view returns (bool);\\n\\n function hasPermission(\\n address account,\\n address contractAddress,\\n string calldata functionSig\\n ) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xaa29b098440d0b3a131c5ecdf25ce548790c1b5ac7bf9b5c0264b6af6f7a1e0b\",\"license\":\"BSD-3-Clause\"}},\"version\":1}", diff --git a/deployments/berachainbartio/OmnichainExecutorOwner_Proxy.json b/deployments/berachainbartio/OmnichainExecutorOwner_Proxy.json index 06af0e2e..47ea1ae3 100644 --- a/deployments/berachainbartio/OmnichainExecutorOwner_Proxy.json +++ b/deployments/berachainbartio/OmnichainExecutorOwner_Proxy.json @@ -1,5 +1,5 @@ { - "address": "0xd934a7c03D6fA022321565f2042EC37bD26Baf3c", + "address": "0x94ba324b639F2C4617834dFcF45EA23188a17124", "abi": [ { "inputs": [ @@ -133,84 +133,84 @@ "type": "receive" } ], - "transactionHash": "0x3071210b323096c2d1c7386e068d15f62f1ffa159883a599584f95919e1f2b2d", + "transactionHash": "0x3dba668e2d0cc68736fe4c86e8064a3488e16f636bfcba15d0e288f556d65e60", "receipt": { "to": null, "from": "0x18BDb05DD1A95677f4381cfb4db52D342dF5C00d", - "contractAddress": "0xd934a7c03D6fA022321565f2042EC37bD26Baf3c", - "transactionIndex": 1, + "contractAddress": "0x94ba324b639F2C4617834dFcF45EA23188a17124", + "transactionIndex": 3, "gasUsed": "687927", - "logsBloom": "0x00000000000000000000000000000000400000000000000000800000000000000000000000000000000800000000000000000000000000000000000000008040000000000000000000000080000002000001000000000000000000000100000000000000020000000000020000000800000000800000000000000000000000400000000000000200000000000000000000000000001080000000000000800000000000000000000000000000000400000000000000800000000000000000000000000020000000000000000008040000000000010400000000000000000020000000000000000000000000000000000000000800000000000000000000000000", - "blockHash": "0xe93a3273367e39329d04772acf526bf3a8430ab51277b948dd29733dd2bcdde9", - "transactionHash": "0x3071210b323096c2d1c7386e068d15f62f1ffa159883a599584f95919e1f2b2d", + "logsBloom": "0x00000000000001000000000000000400400000000000000000800000000000000000000000000000000000000000000000000000000000000000000000008040000000010000000000000000000002000001000000000000000200000100000000000000020000000000020000000800000000800000000000000000000000400000000000000000000000000000000000000000000080000000000000800000000000000000000000000000000400000000000000800000000000000000000000000020000000000000000000040000000000000400000000000000200020000000000000200000000000000000000000000800000000000000000000000000", + "blockHash": "0x6fd859221a4f0c95cf0c018dedc5e3a96340cd82cd9eda102b3187fcbcded31c", + "transactionHash": "0x3dba668e2d0cc68736fe4c86e8064a3488e16f636bfcba15d0e288f556d65e60", "logs": [ { - "transactionIndex": 1, - "blockNumber": 10537900, - "transactionHash": "0x3071210b323096c2d1c7386e068d15f62f1ffa159883a599584f95919e1f2b2d", - "address": "0xd934a7c03D6fA022321565f2042EC37bD26Baf3c", + "transactionIndex": 3, + "blockNumber": 10580016, + "transactionHash": "0x3dba668e2d0cc68736fe4c86e8064a3488e16f636bfcba15d0e288f556d65e60", + "address": "0x94ba324b639F2C4617834dFcF45EA23188a17124", "topics": [ "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", - "0x00000000000000000000000009f0cf4ed50ed01994900ce9ee1ae85bfecd5c66" + "0x0000000000000000000000005ea62b02dacc7ca05e2402f0abef60e7591e8653" ], "data": "0x", - "logIndex": 1, - "blockHash": "0xe93a3273367e39329d04772acf526bf3a8430ab51277b948dd29733dd2bcdde9" + "logIndex": 3, + "blockHash": "0x6fd859221a4f0c95cf0c018dedc5e3a96340cd82cd9eda102b3187fcbcded31c" }, { - "transactionIndex": 1, - "blockNumber": 10537900, - "transactionHash": "0x3071210b323096c2d1c7386e068d15f62f1ffa159883a599584f95919e1f2b2d", - "address": "0xd934a7c03D6fA022321565f2042EC37bD26Baf3c", + "transactionIndex": 3, + "blockNumber": 10580016, + "transactionHash": "0x3dba668e2d0cc68736fe4c86e8064a3488e16f636bfcba15d0e288f556d65e60", + "address": "0x94ba324b639F2C4617834dFcF45EA23188a17124", "topics": [ "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x00000000000000000000000018bdb05dd1a95677f4381cfb4db52d342df5c00d" ], "data": "0x", - "logIndex": 2, - "blockHash": "0xe93a3273367e39329d04772acf526bf3a8430ab51277b948dd29733dd2bcdde9" + "logIndex": 4, + "blockHash": "0x6fd859221a4f0c95cf0c018dedc5e3a96340cd82cd9eda102b3187fcbcded31c" }, { - "transactionIndex": 1, - "blockNumber": 10537900, - "transactionHash": "0x3071210b323096c2d1c7386e068d15f62f1ffa159883a599584f95919e1f2b2d", - "address": "0xd934a7c03D6fA022321565f2042EC37bD26Baf3c", + "transactionIndex": 3, + "blockNumber": 10580016, + "transactionHash": "0x3dba668e2d0cc68736fe4c86e8064a3488e16f636bfcba15d0e288f556d65e60", + "address": "0x94ba324b639F2C4617834dFcF45EA23188a17124", "topics": ["0x66fd58e82f7b31a2a5c30e0888f3093efe4e111b00cd2b0c31fe014601293aa0"], - "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000092a6bcd9987eb8689152c5a89bcc5c03305139e3", - "logIndex": 3, - "blockHash": "0xe93a3273367e39329d04772acf526bf3a8430ab51277b948dd29733dd2bcdde9" + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ef368e4c1f9acc9241e66cd67531feb195ff7536", + "logIndex": 5, + "blockHash": "0x6fd859221a4f0c95cf0c018dedc5e3a96340cd82cd9eda102b3187fcbcded31c" }, { - "transactionIndex": 1, - "blockNumber": 10537900, - "transactionHash": "0x3071210b323096c2d1c7386e068d15f62f1ffa159883a599584f95919e1f2b2d", - "address": "0xd934a7c03D6fA022321565f2042EC37bD26Baf3c", + "transactionIndex": 3, + "blockNumber": 10580016, + "transactionHash": "0x3dba668e2d0cc68736fe4c86e8064a3488e16f636bfcba15d0e288f556d65e60", + "address": "0x94ba324b639F2C4617834dFcF45EA23188a17124", "topics": ["0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498"], "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 4, - "blockHash": "0xe93a3273367e39329d04772acf526bf3a8430ab51277b948dd29733dd2bcdde9" + "logIndex": 6, + "blockHash": "0x6fd859221a4f0c95cf0c018dedc5e3a96340cd82cd9eda102b3187fcbcded31c" }, { - "transactionIndex": 1, - "blockNumber": 10537900, - "transactionHash": "0x3071210b323096c2d1c7386e068d15f62f1ffa159883a599584f95919e1f2b2d", - "address": "0xd934a7c03D6fA022321565f2042EC37bD26Baf3c", + "transactionIndex": 3, + "blockNumber": 10580016, + "transactionHash": "0x3dba668e2d0cc68736fe4c86e8064a3488e16f636bfcba15d0e288f556d65e60", + "address": "0x94ba324b639F2C4617834dFcF45EA23188a17124", "topics": ["0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f"], - "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000039dbb4f255508995cc509e6fdab2ab1c286f5766", - "logIndex": 5, - "blockHash": "0xe93a3273367e39329d04772acf526bf3a8430ab51277b948dd29733dd2bcdde9" + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ccf1655d49bd9f94106524cc416277135a811815", + "logIndex": 7, + "blockHash": "0x6fd859221a4f0c95cf0c018dedc5e3a96340cd82cd9eda102b3187fcbcded31c" } ], - "blockNumber": 10537900, - "cumulativeGasUsed": "711502", + "blockNumber": 10580016, + "cumulativeGasUsed": "758652", "status": 1, "byzantium": true }, "args": [ - "0x09f0Cf4eD50ed01994900CE9ee1ae85BFECd5c66", - "0x39dBB4f255508995cc509E6fDAb2Ab1C286F5766", - "0xc4d66de800000000000000000000000092a6bcd9987eb8689152c5a89bcc5c03305139e3" + "0x5ea62b02dacC7cA05e2402f0aBef60E7591e8653", + "0xccF1655d49bD9f94106524Cc416277135A811815", + "0xc4d66de8000000000000000000000000ef368e4c1f9acc9241e66cd67531feb195ff7536" ], "numDeployments": 1, "solcInputHash": "e5536fb1b5f4db72d1c808989021a017", diff --git a/deployments/berachainbartio/OmnichainGovernanceExecutor.json b/deployments/berachainbartio/OmnichainGovernanceExecutor.json index e437477d..3c48ef4b 100644 --- a/deployments/berachainbartio/OmnichainGovernanceExecutor.json +++ b/deployments/berachainbartio/OmnichainGovernanceExecutor.json @@ -1,5 +1,5 @@ { - "address": "0xc80E4112940efF40c8626bAc0D8E79cB7dAbe289", + "address": "0xf1A468Db7787CE1BEA022e46156Fe6A30e0C7847", "abi": [ { "inputs": [ @@ -1225,38 +1225,38 @@ "type": "function" } ], - "transactionHash": "0xfa9a22abd3622ef0a96c288fe741f9701b85071dfadbfa60143f56d190cbc7f2", + "transactionHash": "0xba02e62f2fccbad5475edf3c8cb62ffd2abe175b66c5fbd73daa23e1bba330e7", "receipt": { "to": null, "from": "0x18BDb05DD1A95677f4381cfb4db52D342dF5C00d", - "contractAddress": "0xc80E4112940efF40c8626bAc0D8E79cB7dAbe289", - "transactionIndex": 1, + "contractAddress": "0xf1A468Db7787CE1BEA022e46156Fe6A30e0C7847", + "transactionIndex": 15, "gasUsed": "4146267", - "logsBloom": "0x00000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000020000000000000040800000000000000000000000000000000001000000000000000000000100000000200000020000000000020000000800000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xb4347668debb8d8bed8a52bb2d01f4a69cfe7edb7c39c84c8144dc35be3ac691", - "transactionHash": "0xfa9a22abd3622ef0a96c288fe741f9701b85071dfadbfa60143f56d190cbc7f2", + "logsBloom": "0x00000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000001000000000000008000000100000000000000020000000000020000000800000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000400000000000", + "blockHash": "0x18dfe2ca83aaf4436ba3c33ec979270525f4cad37f5e34a17b3b753441148934", + "transactionHash": "0xba02e62f2fccbad5475edf3c8cb62ffd2abe175b66c5fbd73daa23e1bba330e7", "logs": [ { - "transactionIndex": 1, - "blockNumber": 10533995, - "transactionHash": "0xfa9a22abd3622ef0a96c288fe741f9701b85071dfadbfa60143f56d190cbc7f2", - "address": "0xc80E4112940efF40c8626bAc0D8E79cB7dAbe289", + "transactionIndex": 15, + "blockNumber": 10579934, + "transactionHash": "0xba02e62f2fccbad5475edf3c8cb62ffd2abe175b66c5fbd73daa23e1bba330e7", + "address": "0xf1A468Db7787CE1BEA022e46156Fe6A30e0C7847", "topics": [ "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x00000000000000000000000018bdb05dd1a95677f4381cfb4db52d342df5c00d" ], "data": "0x", - "logIndex": 1, - "blockHash": "0xb4347668debb8d8bed8a52bb2d01f4a69cfe7edb7c39c84c8144dc35be3ac691" + "logIndex": 14, + "blockHash": "0x18dfe2ca83aaf4436ba3c33ec979270525f4cad37f5e34a17b3b753441148934" } ], - "blockNumber": 10533995, - "cumulativeGasUsed": "4169842", + "blockNumber": 10579934, + "cumulativeGasUsed": "4647169", "status": 1, "byzantium": true }, - "args": ["0x6EDCE65403992e310A62460808c4b910D972f10f", "0xdf3b635d2b535f906BB02abb22AED71346E36a00", 10102], + "args": ["0x83c73Da98cf733B03315aFa8758834b36a195b87", "0xdf3b635d2b535f906BB02abb22AED71346E36a00", 10102], "numDeployments": 1, "solcInputHash": "9f400d4fd6f6fcf916824838bc678e25", "metadata": "{\"compiler\":{\"version\":\"0.8.25+commit.b61c2a91\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"endpoint_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"guardian_\",\"type\":\"address\"},{\"internalType\":\"uint16\",\"name\":\"srcChainId_\",\"type\":\"uint16\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"InvalidProposalId\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddressNotAllowed\",\"type\":\"error\"},{\"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\":true,\"internalType\":\"address\",\"name\":\"oldGuardian\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newGuardian\",\"type\":\"address\"}],\"name\":\"NewGuardian\",\"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\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"ProposalCanceled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"ProposalExecuted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"eta\",\"type\":\"uint256\"}],\"name\":\"ProposalQueued\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"proposalId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"targets\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"values\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"string[]\",\"name\":\"signatures\",\"type\":\"string[]\"},{\"indexed\":false,\"internalType\":\"bytes[]\",\"name\":\"calldatas\",\"type\":\"bytes[]\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"proposalType\",\"type\":\"uint8\"}],\"name\":\"ProposalReceived\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint16\",\"name\":\"srcChainId\",\"type\":\"uint16\"},{\"indexed\":true,\"internalType\":\"bytes\",\"name\":\"srcAddress\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"nonce\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"reason\",\"type\":\"bytes\"}],\"name\":\"ReceivePayloadFailed\",\"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\":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\":\"_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\":true,\"internalType\":\"uint16\",\"name\":\"oldSrcChainId\",\"type\":\"uint16\"},{\"indexed\":true,\"internalType\":\"uint16\",\"name\":\"newSrcChainId\",\"type\":\"uint16\"}],\"name\":\"SetSrcChainId\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"name\":\"SetTimelockPendingAdmin\",\"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\":false,\"internalType\":\"uint8\",\"name\":\"routeType\",\"type\":\"uint8\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"oldTimelock\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newTimelock\",\"type\":\"address\"}],\"name\":\"TimelockAdded\",\"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\":[{\"internalType\":\"contract ITimelock[]\",\"name\":\"timelocks_\",\"type\":\"address[]\"}],\"name\":\"addTimelocks\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"proposalId_\",\"type\":\"uint256\"}],\"name\":\"cancel\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"proposalId_\",\"type\":\"uint256\"}],\"name\":\"execute\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"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\":[],\"name\":\"guardian\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"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\":\"last24HourCommandsReceived\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"last24HourReceiveWindowStart\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastProposalReceived\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"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\":[],\"name\":\"maxDailyReceiveLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"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\":\"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\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"proposalTimelocks\",\"outputs\":[{\"internalType\":\"contract ITimelock\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"proposals\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"eta\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"canceled\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"executed\",\"type\":\"bool\"},{\"internalType\":\"uint8\",\"name\":\"proposalType\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"queued\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"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\":\"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\":\"address\",\"name\":\"newGuardian\",\"type\":\"address\"}],\"name\":\"setGuardian\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"limit_\",\"type\":\"uint256\"}],\"name\":\"setMaxDailyReceiveLimit\",\"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\":\"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\":\"srcChainId_\",\"type\":\"uint16\"}],\"name\":\"setSrcChainId\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"pendingAdmin_\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"proposalType_\",\"type\":\"uint8\"}],\"name\":\"setTimelockPendingAdmin\",\"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\":[],\"name\":\"srcChainId\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"proposalId_\",\"type\":\"uint256\"}],\"name\":\"state\",\"outputs\":[{\"internalType\":\"enum OmnichainGovernanceExecutor.ProposalState\",\"name\":\"\",\"type\":\"uint8\"}],\"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\"}],\"devdoc\":{\"custom:security-contact\":\"https://github.com/VenusProtocol/governance-contracts#discussion\",\"details\":\"The owner of this contract controls LayerZero configuration. When used in production the owner will be OmnichainExecutor This implementation is non-blocking, meaning the failed messages will not block the future messages from the source. For the blocking behavior, derive the contract from LzApp.\",\"events\":{\"Paused(address)\":{\"details\":\"Emitted when the pause is triggered by `account`.\"},\"Unpaused(address)\":{\"details\":\"Emitted when the pause is lifted by `account`.\"}},\"kind\":\"dev\",\"methods\":{\"addTimelocks(address[])\":{\"custom:access\":\"Only owner\",\"custom:event\":\"Emits TimelockAdded with old and new timelock and route type\",\"params\":{\"timelocks_\":\"Array of addresses of all 3 timelocks\"}},\"cancel(uint256)\":{\"custom:access\":\"Sender must be the guardian\",\"custom:event\":\"Emits ProposalCanceled with proposal id of the canceled proposal\",\"params\":{\"proposalId_\":\"Id of proposal that is to be canceled\"}},\"execute(uint256)\":{\"custom:event\":\"Emits ProposalExecuted with proposal id of executed proposal\",\"params\":{\"proposalId_\":\"Id of proposal that is to be executed\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"pause()\":{\"custom:access\":\"Only owner\"},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"retryMessage(uint16,bytes,uint64,bytes)\":{\"custom:access\":\"Only owner\",\"params\":{\"nonce_\":\"Nonce to identify failed message\",\"payload_\":\"The payload of the message to be retried\",\"srcAddress_\":\"Source address => local app address + remote app address\",\"srcChainId_\":\"Source chain Id\"}},\"setGuardian(address)\":{\"custom:access\":\"Must be call by guardian or owner\",\"custom:event\":\"Emit NewGuardian with old and new guardian address\",\"params\":{\"newGuardian\":\"The address of the new guardian\"}},\"setMaxDailyReceiveLimit(uint256)\":{\"custom:access\":\"Only Owner\",\"custom:event\":\"Emits SetMaxDailyReceiveLimit with old and new limit\",\"params\":{\"limit_\":\"Number of commands\"}},\"setSrcChainId(uint16)\":{\"custom:access\":\"Only owner\",\"custom:event\":\"Emit SetSrcChainId with old and new source id\",\"params\":{\"srcChainId_\":\"The new source chain id to be set\"}},\"setTimelockPendingAdmin(address,uint8)\":{\"custom:access\":\"Only owner\",\"custom:event\":\"Emits SetTimelockPendingAdmin with new pending admin and proposal type\",\"params\":{\"pendingAdmin_\":\"Address of new pending admin\",\"proposalType_\":\"Type of proposal\"}},\"state(uint256)\":{\"params\":{\"proposalId_\":\"The id of the proposal\"},\"returns\":{\"_0\":\"Proposal state\"}},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"unpause()\":{\"custom:access\":\"Only owner\"}},\"title\":\"OmnichainGovernanceExecutor\",\"version\":1},\"userdoc\":{\"errors\":{\"InvalidProposalId()\":[{\"notice\":\"Thrown when proposal ID is invalid\"}],\"ZeroAddressNotAllowed()\":[{\"notice\":\"Thrown if the supplied address is a zero address where it is not allowed\"}]},\"events\":{\"NewGuardian(address,address)\":{\"notice\":\"Emitted when new guardian address is set\"},\"ProposalCanceled(uint256)\":{\"notice\":\"Emitted when proposal is canceled\"},\"ProposalExecuted(uint256)\":{\"notice\":\"Emitted when proposal executed\"},\"ProposalQueued(uint256,uint256)\":{\"notice\":\"Emitted when proposal is queued\"},\"ProposalReceived(uint256,address[],uint256[],string[],bytes[],uint8)\":{\"notice\":\"Emitted when proposal is received\"},\"ReceivePayloadFailed(uint16,bytes,uint64,bytes)\":{\"notice\":\"Emitted when proposal failed\"},\"SetMaxDailyReceiveLimit(uint256,uint256)\":{\"notice\":\"Emitted when the maximum daily limit for receiving command from Binance chain is modified\"},\"SetSrcChainId(uint16,uint16)\":{\"notice\":\"Emitted when source layerzero endpoint id is updated\"},\"SetTimelockPendingAdmin(address,uint8)\":{\"notice\":\"Emitted when pending admin of Timelock is updated\"},\"TimelockAdded(uint8,address,address)\":{\"notice\":\"Emitted when timelock added\"}},\"kind\":\"user\",\"methods\":{\"addTimelocks(address[])\":{\"notice\":\"Add timelocks to the ProposalTimelocks mapping\"},\"cancel(uint256)\":{\"notice\":\"Cancels a proposal only if sender is the guardian and proposal is not executed\"},\"execute(uint256)\":{\"notice\":\"Executes a queued proposal if eta has passed\"},\"guardian()\":{\"notice\":\"A privileged role that can cancel any proposal\"},\"last24HourCommandsReceived()\":{\"notice\":\"Total received commands within the last 24-hour window from Binance chain\"},\"last24HourReceiveWindowStart()\":{\"notice\":\"Timestamp when the last 24-hour window started from Binance chain\"},\"lastProposalReceived()\":{\"notice\":\"Last proposal count received\"},\"maxDailyReceiveLimit()\":{\"notice\":\"Maximum daily limit for receiving commands from Binance chain\"},\"pause()\":{\"notice\":\"Triggers the paused state of the controller\"},\"proposalTimelocks(uint256)\":{\"notice\":\"Mapping containing Timelock addresses for each proposal type\"},\"proposals(uint256)\":{\"notice\":\"The official record of all proposals ever proposed\"},\"queued(uint256)\":{\"notice\":\"Represents queue state of proposal\"},\"renounceOwnership()\":{\"notice\":\"Empty implementation of renounce ownership to avoid any mishappening\"},\"retryMessage(uint16,bytes,uint64,bytes)\":{\"notice\":\"Resends a previously failed message\"},\"setGuardian(address)\":{\"notice\":\"Sets the new executor guardian\"},\"setMaxDailyReceiveLimit(uint256)\":{\"notice\":\"Sets the maximum daily limit for receiving commands\"},\"setSrcChainId(uint16)\":{\"notice\":\"Update source layerzero endpoint id\"},\"setTimelockPendingAdmin(address,uint8)\":{\"notice\":\"Sets the new pending admin of the Timelock\"},\"srcChainId()\":{\"notice\":\"Stores BNB chain layerzero endpoint id\"},\"state(uint256)\":{\"notice\":\"Gets the state of a proposal\"},\"unpause()\":{\"notice\":\"Triggers the resume state of the controller\"}},\"notice\":\"Executes the proposal transactions sent from the main chain\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/Cross-chain/OmnichainGovernanceExecutor.sol\":\"OmnichainGovernanceExecutor\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"@layerzerolabs/solidity-examples/contracts/libraries/BytesLib.sol\":{\"content\":\"// SPDX-License-Identifier: Unlicense\\n/*\\n * @title Solidity Bytes Arrays Utils\\n * @author Gon\\u00e7alo S\\u00e1 \\n *\\n * @dev Bytes tightly packed arrays utility library for ethereum contracts written in Solidity.\\n * The library lets you concatenate, slice and type cast bytes arrays both in memory and storage.\\n */\\npragma solidity >=0.8.0 <0.9.0;\\n\\nlibrary BytesLib {\\n function concat(bytes memory _preBytes, bytes memory _postBytes) internal pure returns (bytes memory) {\\n bytes memory tempBytes;\\n\\n assembly {\\n // Get a location of some free memory and store it in tempBytes as\\n // Solidity does for memory variables.\\n tempBytes := mload(0x40)\\n\\n // Store the length of the first bytes array at the beginning of\\n // the memory for tempBytes.\\n let length := mload(_preBytes)\\n mstore(tempBytes, length)\\n\\n // Maintain a memory counter for the current write location in the\\n // temp bytes array by adding the 32 bytes for the array length to\\n // the starting location.\\n let mc := add(tempBytes, 0x20)\\n // Stop copying when the memory counter reaches the length of the\\n // first bytes array.\\n let end := add(mc, length)\\n\\n for {\\n // Initialize a copy counter to the start of the _preBytes data,\\n // 32 bytes into its memory.\\n let cc := add(_preBytes, 0x20)\\n } lt(mc, end) {\\n // Increase both counters by 32 bytes each iteration.\\n mc := add(mc, 0x20)\\n cc := add(cc, 0x20)\\n } {\\n // Write the _preBytes data into the tempBytes memory 32 bytes\\n // at a time.\\n mstore(mc, mload(cc))\\n }\\n\\n // Add the length of _postBytes to the current length of tempBytes\\n // and store it as the new length in the first 32 bytes of the\\n // tempBytes memory.\\n length := mload(_postBytes)\\n mstore(tempBytes, add(length, mload(tempBytes)))\\n\\n // Move the memory counter back from a multiple of 0x20 to the\\n // actual end of the _preBytes data.\\n mc := end\\n // Stop copying when the memory counter reaches the new combined\\n // length of the arrays.\\n end := add(mc, length)\\n\\n for {\\n let cc := add(_postBytes, 0x20)\\n } lt(mc, end) {\\n mc := add(mc, 0x20)\\n cc := add(cc, 0x20)\\n } {\\n mstore(mc, mload(cc))\\n }\\n\\n // Update the free-memory pointer by padding our last write location\\n // to 32 bytes: add 31 bytes to the end of tempBytes to move to the\\n // next 32 byte block, then round down to the nearest multiple of\\n // 32. If the sum of the length of the two arrays is zero then add\\n // one before rounding down to leave a blank 32 bytes (the length block with 0).\\n mstore(\\n 0x40,\\n and(\\n add(add(end, iszero(add(length, mload(_preBytes)))), 31),\\n not(31) // Round down to the nearest 32 bytes.\\n )\\n )\\n }\\n\\n return tempBytes;\\n }\\n\\n function concatStorage(bytes storage _preBytes, bytes memory _postBytes) internal {\\n assembly {\\n // Read the first 32 bytes of _preBytes storage, which is the length\\n // of the array. (We don't need to use the offset into the slot\\n // because arrays use the entire slot.)\\n let fslot := sload(_preBytes.slot)\\n // Arrays of 31 bytes or less have an even value in their slot,\\n // while longer arrays have an odd value. The actual length is\\n // the slot divided by two for odd values, and the lowest order\\n // byte divided by two for even values.\\n // If the slot is even, bitwise and the slot with 255 and divide by\\n // two to get the length. If the slot is odd, bitwise and the slot\\n // with -1 and divide by two.\\n let slength := div(and(fslot, sub(mul(0x100, iszero(and(fslot, 1))), 1)), 2)\\n let mlength := mload(_postBytes)\\n let newlength := add(slength, mlength)\\n // slength can contain both the length and contents of the array\\n // if length < 32 bytes so let's prepare for that\\n // v. http://solidity.readthedocs.io/en/latest/miscellaneous.html#layout-of-state-variables-in-storage\\n switch add(lt(slength, 32), lt(newlength, 32))\\n case 2 {\\n // Since the new array still fits in the slot, we just need to\\n // update the contents of the slot.\\n // uint256(bytes_storage) = uint256(bytes_storage) + uint256(bytes_memory) + new_length\\n sstore(\\n _preBytes.slot,\\n // all the modifications to the slot are inside this\\n // next block\\n add(\\n // we can just add to the slot contents because the\\n // bytes we want to change are the LSBs\\n fslot,\\n add(\\n mul(\\n div(\\n // load the bytes from memory\\n mload(add(_postBytes, 0x20)),\\n // zero all bytes to the right\\n exp(0x100, sub(32, mlength))\\n ),\\n // and now shift left the number of bytes to\\n // leave space for the length in the slot\\n exp(0x100, sub(32, newlength))\\n ),\\n // increase length by the double of the memory\\n // bytes length\\n mul(mlength, 2)\\n )\\n )\\n )\\n }\\n case 1 {\\n // The stored value fits in the slot, but the combined value\\n // will exceed it.\\n // get the keccak hash to get the contents of the array\\n mstore(0x0, _preBytes.slot)\\n let sc := add(keccak256(0x0, 0x20), div(slength, 32))\\n\\n // save new length\\n sstore(_preBytes.slot, add(mul(newlength, 2), 1))\\n\\n // The contents of the _postBytes array start 32 bytes into\\n // the structure. Our first read should obtain the `submod`\\n // bytes that can fit into the unused space in the last word\\n // of the stored array. To get this, we read 32 bytes starting\\n // from `submod`, so the data we read overlaps with the array\\n // contents by `submod` bytes. Masking the lowest-order\\n // `submod` bytes allows us to add that value directly to the\\n // stored value.\\n\\n let submod := sub(32, slength)\\n let mc := add(_postBytes, submod)\\n let end := add(_postBytes, mlength)\\n let mask := sub(exp(0x100, submod), 1)\\n\\n sstore(sc, add(and(fslot, 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00), and(mload(mc), mask)))\\n\\n for {\\n mc := add(mc, 0x20)\\n sc := add(sc, 1)\\n } lt(mc, end) {\\n sc := add(sc, 1)\\n mc := add(mc, 0x20)\\n } {\\n sstore(sc, mload(mc))\\n }\\n\\n mask := exp(0x100, sub(mc, end))\\n\\n sstore(sc, mul(div(mload(mc), mask), mask))\\n }\\n default {\\n // get the keccak hash to get the contents of the array\\n mstore(0x0, _preBytes.slot)\\n // Start copying to the last used word of the stored array.\\n let sc := add(keccak256(0x0, 0x20), div(slength, 32))\\n\\n // save new length\\n sstore(_preBytes.slot, add(mul(newlength, 2), 1))\\n\\n // Copy over the first `submod` bytes of the new data as in\\n // case 1 above.\\n let slengthmod := mod(slength, 32)\\n let mlengthmod := mod(mlength, 32)\\n let submod := sub(32, slengthmod)\\n let mc := add(_postBytes, submod)\\n let end := add(_postBytes, mlength)\\n let mask := sub(exp(0x100, submod), 1)\\n\\n sstore(sc, add(sload(sc), and(mload(mc), mask)))\\n\\n for {\\n sc := add(sc, 1)\\n mc := add(mc, 0x20)\\n } lt(mc, end) {\\n sc := add(sc, 1)\\n mc := add(mc, 0x20)\\n } {\\n sstore(sc, mload(mc))\\n }\\n\\n mask := exp(0x100, sub(mc, end))\\n\\n sstore(sc, mul(div(mload(mc), mask), mask))\\n }\\n }\\n }\\n\\n function slice(\\n bytes memory _bytes,\\n uint _start,\\n uint _length\\n ) internal pure returns (bytes memory) {\\n require(_length + 31 >= _length, \\\"slice_overflow\\\");\\n require(_bytes.length >= _start + _length, \\\"slice_outOfBounds\\\");\\n\\n bytes memory tempBytes;\\n\\n assembly {\\n switch iszero(_length)\\n case 0 {\\n // Get a location of some free memory and store it in tempBytes as\\n // Solidity does for memory variables.\\n tempBytes := mload(0x40)\\n\\n // The first word of the slice result is potentially a partial\\n // word read from the original array. To read it, we calculate\\n // the length of that partial word and start copying that many\\n // bytes into the array. The first word we copy will start with\\n // data we don't care about, but the last `lengthmod` bytes will\\n // land at the beginning of the contents of the new array. When\\n // we're done copying, we overwrite the full first word with\\n // the actual length of the slice.\\n let lengthmod := and(_length, 31)\\n\\n // The multiplication in the next line is necessary\\n // because when slicing multiples of 32 bytes (lengthmod == 0)\\n // the following copy loop was copying the origin's length\\n // and then ending prematurely not copying everything it should.\\n let mc := add(add(tempBytes, lengthmod), mul(0x20, iszero(lengthmod)))\\n let end := add(mc, _length)\\n\\n for {\\n // The multiplication in the next line has the same exact purpose\\n // as the one above.\\n let cc := add(add(add(_bytes, lengthmod), mul(0x20, iszero(lengthmod))), _start)\\n } lt(mc, end) {\\n mc := add(mc, 0x20)\\n cc := add(cc, 0x20)\\n } {\\n mstore(mc, mload(cc))\\n }\\n\\n mstore(tempBytes, _length)\\n\\n //update free-memory pointer\\n //allocating the array padded to 32 bytes like the compiler does now\\n mstore(0x40, and(add(mc, 31), not(31)))\\n }\\n //if we want a zero-length slice let's just return a zero-length array\\n default {\\n tempBytes := mload(0x40)\\n //zero out the 32 bytes slice we are about to return\\n //we need to do it because Solidity does not garbage collect\\n mstore(tempBytes, 0)\\n\\n mstore(0x40, add(tempBytes, 0x20))\\n }\\n }\\n\\n return tempBytes;\\n }\\n\\n function toAddress(bytes memory _bytes, uint _start) internal pure returns (address) {\\n require(_bytes.length >= _start + 20, \\\"toAddress_outOfBounds\\\");\\n address tempAddress;\\n\\n assembly {\\n tempAddress := div(mload(add(add(_bytes, 0x20), _start)), 0x1000000000000000000000000)\\n }\\n\\n return tempAddress;\\n }\\n\\n function toUint8(bytes memory _bytes, uint _start) internal pure returns (uint8) {\\n require(_bytes.length >= _start + 1, \\\"toUint8_outOfBounds\\\");\\n uint8 tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0x1), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function toUint16(bytes memory _bytes, uint _start) internal pure returns (uint16) {\\n require(_bytes.length >= _start + 2, \\\"toUint16_outOfBounds\\\");\\n uint16 tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0x2), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function toUint32(bytes memory _bytes, uint _start) internal pure returns (uint32) {\\n require(_bytes.length >= _start + 4, \\\"toUint32_outOfBounds\\\");\\n uint32 tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0x4), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function toUint64(bytes memory _bytes, uint _start) internal pure returns (uint64) {\\n require(_bytes.length >= _start + 8, \\\"toUint64_outOfBounds\\\");\\n uint64 tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0x8), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function toUint96(bytes memory _bytes, uint _start) internal pure returns (uint96) {\\n require(_bytes.length >= _start + 12, \\\"toUint96_outOfBounds\\\");\\n uint96 tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0xc), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function toUint128(bytes memory _bytes, uint _start) internal pure returns (uint128) {\\n require(_bytes.length >= _start + 16, \\\"toUint128_outOfBounds\\\");\\n uint128 tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0x10), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function toUint256(bytes memory _bytes, uint _start) internal pure returns (uint) {\\n require(_bytes.length >= _start + 32, \\\"toUint256_outOfBounds\\\");\\n uint tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0x20), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function toBytes32(bytes memory _bytes, uint _start) internal pure returns (bytes32) {\\n require(_bytes.length >= _start + 32, \\\"toBytes32_outOfBounds\\\");\\n bytes32 tempBytes32;\\n\\n assembly {\\n tempBytes32 := mload(add(add(_bytes, 0x20), _start))\\n }\\n\\n return tempBytes32;\\n }\\n\\n function equal(bytes memory _preBytes, bytes memory _postBytes) internal pure returns (bool) {\\n bool success = true;\\n\\n assembly {\\n let length := mload(_preBytes)\\n\\n // if lengths don't match the arrays are not equal\\n switch eq(length, mload(_postBytes))\\n case 1 {\\n // cb is a circuit breaker in the for loop since there's\\n // no said feature for inline assembly loops\\n // cb = 1 - don't breaker\\n // cb = 0 - break\\n let cb := 1\\n\\n let mc := add(_preBytes, 0x20)\\n let end := add(mc, length)\\n\\n for {\\n let cc := add(_postBytes, 0x20)\\n // the next line is the loop condition:\\n // while(uint256(mc < end) + cb == 2)\\n } eq(add(lt(mc, end), cb), 2) {\\n mc := add(mc, 0x20)\\n cc := add(cc, 0x20)\\n } {\\n // if any of these checks fails then arrays are not equal\\n if iszero(eq(mload(mc), mload(cc))) {\\n // unsuccess:\\n success := 0\\n cb := 0\\n }\\n }\\n }\\n default {\\n // unsuccess:\\n success := 0\\n }\\n }\\n\\n return success;\\n }\\n\\n function equalStorage(bytes storage _preBytes, bytes memory _postBytes) internal view returns (bool) {\\n bool success = true;\\n\\n assembly {\\n // we know _preBytes_offset is 0\\n let fslot := sload(_preBytes.slot)\\n // Decode the length of the stored array like in concatStorage().\\n let slength := div(and(fslot, sub(mul(0x100, iszero(and(fslot, 1))), 1)), 2)\\n let mlength := mload(_postBytes)\\n\\n // if lengths don't match the arrays are not equal\\n switch eq(slength, mlength)\\n case 1 {\\n // slength can contain both the length and contents of the array\\n // if length < 32 bytes so let's prepare for that\\n // v. http://solidity.readthedocs.io/en/latest/miscellaneous.html#layout-of-state-variables-in-storage\\n if iszero(iszero(slength)) {\\n switch lt(slength, 32)\\n case 1 {\\n // blank the last byte which is the length\\n fslot := mul(div(fslot, 0x100), 0x100)\\n\\n if iszero(eq(fslot, mload(add(_postBytes, 0x20)))) {\\n // unsuccess:\\n success := 0\\n }\\n }\\n default {\\n // cb is a circuit breaker in the for loop since there's\\n // no said feature for inline assembly loops\\n // cb = 1 - don't breaker\\n // cb = 0 - break\\n let cb := 1\\n\\n // get the keccak hash to get the contents of the array\\n mstore(0x0, _preBytes.slot)\\n let sc := keccak256(0x0, 0x20)\\n\\n let mc := add(_postBytes, 0x20)\\n let end := add(mc, mlength)\\n\\n // the next line is the loop condition:\\n // while(uint256(mc < end) + cb == 2)\\n for {\\n\\n } eq(add(lt(mc, end), cb), 2) {\\n sc := add(sc, 1)\\n mc := add(mc, 0x20)\\n } {\\n if iszero(eq(sload(sc), mload(mc))) {\\n // unsuccess:\\n success := 0\\n cb := 0\\n }\\n }\\n }\\n }\\n }\\n default {\\n // unsuccess:\\n success := 0\\n }\\n }\\n\\n return success;\\n }\\n}\\n\",\"keccak256\":\"0x7e64cccdf22a03f513d94960f2145dd801fb5ec88d971de079b5186a9f5e93c4\",\"license\":\"Unlicense\"},\"@layerzerolabs/solidity-examples/contracts/libraries/ExcessivelySafeCall.sol\":{\"content\":\"// SPDX-License-Identifier: MIT OR Apache-2.0\\npragma solidity >=0.7.6;\\n\\nlibrary ExcessivelySafeCall {\\n uint constant LOW_28_MASK = 0x00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff;\\n\\n /// @notice Use when you _really_ really _really_ don't trust the called\\n /// contract. This prevents the called contract from causing reversion of\\n /// the caller in as many ways as we can.\\n /// @dev The main difference between this and a solidity low-level call is\\n /// that we limit the number of bytes that the callee can cause to be\\n /// copied to caller memory. This prevents stupid things like malicious\\n /// contracts returning 10,000,000 bytes causing a local OOG when copying\\n /// to memory.\\n /// @param _target The address to call\\n /// @param _gas The amount of gas to forward to the remote contract\\n /// @param _maxCopy The maximum number of bytes of returndata to copy\\n /// to memory.\\n /// @param _calldata The data to send to the remote contract\\n /// @return success and returndata, as `.call()`. Returndata is capped to\\n /// `_maxCopy` bytes.\\n function excessivelySafeCall(\\n address _target,\\n uint _gas,\\n uint16 _maxCopy,\\n bytes memory _calldata\\n ) internal returns (bool, bytes memory) {\\n // set up for assembly call\\n uint _toCopy;\\n bool _success;\\n bytes memory _returnData = new bytes(_maxCopy);\\n // dispatch message to recipient\\n // by assembly calling \\\"handle\\\" function\\n // we call via assembly to avoid memcopying a very large returndata\\n // returned by a malicious contract\\n assembly {\\n _success := call(\\n _gas, // gas\\n _target, // recipient\\n 0, // ether value\\n add(_calldata, 0x20), // inloc\\n mload(_calldata), // inlen\\n 0, // outloc\\n 0 // outlen\\n )\\n // limit our copy to 256 bytes\\n _toCopy := returndatasize()\\n if gt(_toCopy, _maxCopy) {\\n _toCopy := _maxCopy\\n }\\n // Store the length of the copied bytes\\n mstore(_returnData, _toCopy)\\n // copy the bytes from returndata[0:_toCopy]\\n returndatacopy(add(_returnData, 0x20), 0, _toCopy)\\n }\\n return (_success, _returnData);\\n }\\n\\n /// @notice Use when you _really_ really _really_ don't trust the called\\n /// contract. This prevents the called contract from causing reversion of\\n /// the caller in as many ways as we can.\\n /// @dev The main difference between this and a solidity low-level call is\\n /// that we limit the number of bytes that the callee can cause to be\\n /// copied to caller memory. This prevents stupid things like malicious\\n /// contracts returning 10,000,000 bytes causing a local OOG when copying\\n /// to memory.\\n /// @param _target The address to call\\n /// @param _gas The amount of gas to forward to the remote contract\\n /// @param _maxCopy The maximum number of bytes of returndata to copy\\n /// to memory.\\n /// @param _calldata The data to send to the remote contract\\n /// @return success and returndata, as `.call()`. Returndata is capped to\\n /// `_maxCopy` bytes.\\n function excessivelySafeStaticCall(\\n address _target,\\n uint _gas,\\n uint16 _maxCopy,\\n bytes memory _calldata\\n ) internal view returns (bool, bytes memory) {\\n // set up for assembly call\\n uint _toCopy;\\n bool _success;\\n bytes memory _returnData = new bytes(_maxCopy);\\n // dispatch message to recipient\\n // by assembly calling \\\"handle\\\" function\\n // we call via assembly to avoid memcopying a very large returndata\\n // returned by a malicious contract\\n assembly {\\n _success := staticcall(\\n _gas, // gas\\n _target, // recipient\\n add(_calldata, 0x20), // inloc\\n mload(_calldata), // inlen\\n 0, // outloc\\n 0 // outlen\\n )\\n // limit our copy to 256 bytes\\n _toCopy := returndatasize()\\n if gt(_toCopy, _maxCopy) {\\n _toCopy := _maxCopy\\n }\\n // Store the length of the copied bytes\\n mstore(_returnData, _toCopy)\\n // copy the bytes from returndata[0:_toCopy]\\n returndatacopy(add(_returnData, 0x20), 0, _toCopy)\\n }\\n return (_success, _returnData);\\n }\\n\\n /**\\n * @notice Swaps function selectors in encoded contract calls\\n * @dev Allows reuse of encoded calldata for functions with identical\\n * argument types but different names. It simply swaps out the first 4 bytes\\n * for the new selector. This function modifies memory in place, and should\\n * only be used with caution.\\n * @param _newSelector The new 4-byte selector\\n * @param _buf The encoded contract args\\n */\\n function swapSelector(bytes4 _newSelector, bytes memory _buf) internal pure {\\n require(_buf.length >= 4);\\n uint _mask = LOW_28_MASK;\\n assembly {\\n // load the first word of\\n let _word := mload(add(_buf, 0x20))\\n // mask out the top 4 bytes\\n // /x\\n _word := and(_word, _mask)\\n _word := or(_newSelector, _word)\\n mstore(add(_buf, 0x20), _word)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xd4e52af409b5ec80432292d86fb01906785eb78ac31da3bab4565aabcd6e3e56\",\"license\":\"MIT OR Apache-2.0\"},\"@layerzerolabs/solidity-examples/contracts/lzApp/LzApp.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\nimport \\\"./interfaces/ILayerZeroReceiver.sol\\\";\\nimport \\\"./interfaces/ILayerZeroUserApplicationConfig.sol\\\";\\nimport \\\"./interfaces/ILayerZeroEndpoint.sol\\\";\\nimport \\\"../libraries/BytesLib.sol\\\";\\n\\n/*\\n * a generic LzReceiver implementation\\n */\\nabstract contract LzApp is Ownable, ILayerZeroReceiver, ILayerZeroUserApplicationConfig {\\n using BytesLib for bytes;\\n\\n // ua can not send payload larger than this by default, but it can be changed by the ua owner\\n uint public constant DEFAULT_PAYLOAD_SIZE_LIMIT = 10000;\\n\\n ILayerZeroEndpoint public immutable lzEndpoint;\\n mapping(uint16 => bytes) public trustedRemoteLookup;\\n mapping(uint16 => mapping(uint16 => uint)) public minDstGasLookup;\\n mapping(uint16 => uint) public payloadSizeLimitLookup;\\n address public precrime;\\n\\n event SetPrecrime(address precrime);\\n event SetTrustedRemote(uint16 _remoteChainId, bytes _path);\\n event SetTrustedRemoteAddress(uint16 _remoteChainId, bytes _remoteAddress);\\n event SetMinDstGas(uint16 _dstChainId, uint16 _type, uint _minDstGas);\\n\\n constructor(address _endpoint) {\\n lzEndpoint = ILayerZeroEndpoint(_endpoint);\\n }\\n\\n function lzReceive(\\n uint16 _srcChainId,\\n bytes calldata _srcAddress,\\n uint64 _nonce,\\n bytes calldata _payload\\n ) public virtual override {\\n // lzReceive must be called by the endpoint for security\\n require(_msgSender() == address(lzEndpoint), \\\"LzApp: invalid endpoint caller\\\");\\n\\n bytes memory trustedRemote = trustedRemoteLookup[_srcChainId];\\n // if will still block the message pathway from (srcChainId, srcAddress). should not receive message from untrusted remote.\\n require(\\n _srcAddress.length == trustedRemote.length && trustedRemote.length > 0 && keccak256(_srcAddress) == keccak256(trustedRemote),\\n \\\"LzApp: invalid source sending contract\\\"\\n );\\n\\n _blockingLzReceive(_srcChainId, _srcAddress, _nonce, _payload);\\n }\\n\\n // abstract function - the default behaviour of LayerZero is blocking. See: NonblockingLzApp if you dont need to enforce ordered messaging\\n function _blockingLzReceive(\\n uint16 _srcChainId,\\n bytes memory _srcAddress,\\n uint64 _nonce,\\n bytes memory _payload\\n ) internal virtual;\\n\\n function _lzSend(\\n uint16 _dstChainId,\\n bytes memory _payload,\\n address payable _refundAddress,\\n address _zroPaymentAddress,\\n bytes memory _adapterParams,\\n uint _nativeFee\\n ) internal virtual {\\n bytes memory trustedRemote = trustedRemoteLookup[_dstChainId];\\n require(trustedRemote.length != 0, \\\"LzApp: destination chain is not a trusted source\\\");\\n _checkPayloadSize(_dstChainId, _payload.length);\\n lzEndpoint.send{value: _nativeFee}(_dstChainId, trustedRemote, _payload, _refundAddress, _zroPaymentAddress, _adapterParams);\\n }\\n\\n function _checkGasLimit(\\n uint16 _dstChainId,\\n uint16 _type,\\n bytes memory _adapterParams,\\n uint _extraGas\\n ) internal view virtual {\\n uint providedGasLimit = _getGasLimit(_adapterParams);\\n uint minGasLimit = minDstGasLookup[_dstChainId][_type];\\n require(minGasLimit > 0, \\\"LzApp: minGasLimit not set\\\");\\n require(providedGasLimit >= minGasLimit + _extraGas, \\\"LzApp: gas limit is too low\\\");\\n }\\n\\n function _getGasLimit(bytes memory _adapterParams) internal pure virtual returns (uint gasLimit) {\\n require(_adapterParams.length >= 34, \\\"LzApp: invalid adapterParams\\\");\\n assembly {\\n gasLimit := mload(add(_adapterParams, 34))\\n }\\n }\\n\\n function _checkPayloadSize(uint16 _dstChainId, uint _payloadSize) internal view virtual {\\n uint payloadSizeLimit = payloadSizeLimitLookup[_dstChainId];\\n if (payloadSizeLimit == 0) {\\n // use default if not set\\n payloadSizeLimit = DEFAULT_PAYLOAD_SIZE_LIMIT;\\n }\\n require(_payloadSize <= payloadSizeLimit, \\\"LzApp: payload size is too large\\\");\\n }\\n\\n //---------------------------UserApplication config----------------------------------------\\n function getConfig(\\n uint16 _version,\\n uint16 _chainId,\\n address,\\n uint _configType\\n ) external view returns (bytes memory) {\\n return lzEndpoint.getConfig(_version, _chainId, address(this), _configType);\\n }\\n\\n // generic config for LayerZero user Application\\n function setConfig(\\n uint16 _version,\\n uint16 _chainId,\\n uint _configType,\\n bytes calldata _config\\n ) external override onlyOwner {\\n lzEndpoint.setConfig(_version, _chainId, _configType, _config);\\n }\\n\\n function setSendVersion(uint16 _version) external override onlyOwner {\\n lzEndpoint.setSendVersion(_version);\\n }\\n\\n function setReceiveVersion(uint16 _version) external override onlyOwner {\\n lzEndpoint.setReceiveVersion(_version);\\n }\\n\\n function forceResumeReceive(uint16 _srcChainId, bytes calldata _srcAddress) external override onlyOwner {\\n lzEndpoint.forceResumeReceive(_srcChainId, _srcAddress);\\n }\\n\\n // _path = abi.encodePacked(remoteAddress, localAddress)\\n // this function set the trusted path for the cross-chain communication\\n function setTrustedRemote(uint16 _remoteChainId, bytes calldata _path) external onlyOwner {\\n trustedRemoteLookup[_remoteChainId] = _path;\\n emit SetTrustedRemote(_remoteChainId, _path);\\n }\\n\\n function setTrustedRemoteAddress(uint16 _remoteChainId, bytes calldata _remoteAddress) external onlyOwner {\\n trustedRemoteLookup[_remoteChainId] = abi.encodePacked(_remoteAddress, address(this));\\n emit SetTrustedRemoteAddress(_remoteChainId, _remoteAddress);\\n }\\n\\n function getTrustedRemoteAddress(uint16 _remoteChainId) external view returns (bytes memory) {\\n bytes memory path = trustedRemoteLookup[_remoteChainId];\\n require(path.length != 0, \\\"LzApp: no trusted path record\\\");\\n return path.slice(0, path.length - 20); // the last 20 bytes should be address(this)\\n }\\n\\n function setPrecrime(address _precrime) external onlyOwner {\\n precrime = _precrime;\\n emit SetPrecrime(_precrime);\\n }\\n\\n function setMinDstGas(\\n uint16 _dstChainId,\\n uint16 _packetType,\\n uint _minGas\\n ) external onlyOwner {\\n minDstGasLookup[_dstChainId][_packetType] = _minGas;\\n emit SetMinDstGas(_dstChainId, _packetType, _minGas);\\n }\\n\\n // if the size is 0, it means default size limit\\n function setPayloadSizeLimit(uint16 _dstChainId, uint _size) external onlyOwner {\\n payloadSizeLimitLookup[_dstChainId] = _size;\\n }\\n\\n //--------------------------- VIEW FUNCTION ----------------------------------------\\n function isTrustedRemote(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (bool) {\\n bytes memory trustedSource = trustedRemoteLookup[_srcChainId];\\n return keccak256(trustedSource) == keccak256(_srcAddress);\\n }\\n}\\n\",\"keccak256\":\"0x309c994bdcf69ad63c6789694a28eb72a773e2d9db58fe572ab2b34a475972ce\",\"license\":\"MIT\"},\"@layerzerolabs/solidity-examples/contracts/lzApp/NonblockingLzApp.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./LzApp.sol\\\";\\nimport \\\"../libraries/ExcessivelySafeCall.sol\\\";\\n\\n/*\\n * the default LayerZero messaging behaviour is blocking, i.e. any failed message will block the channel\\n * this abstract class try-catch all fail messages and store locally for future retry. hence, non-blocking\\n * NOTE: if the srcAddress is not configured properly, it will still block the message pathway from (srcChainId, srcAddress)\\n */\\nabstract contract NonblockingLzApp is LzApp {\\n using ExcessivelySafeCall for address;\\n\\n constructor(address _endpoint) LzApp(_endpoint) {}\\n\\n mapping(uint16 => mapping(bytes => mapping(uint64 => bytes32))) public failedMessages;\\n\\n event MessageFailed(uint16 _srcChainId, bytes _srcAddress, uint64 _nonce, bytes _payload, bytes _reason);\\n event RetryMessageSuccess(uint16 _srcChainId, bytes _srcAddress, uint64 _nonce, bytes32 _payloadHash);\\n\\n // overriding the virtual function in LzReceiver\\n function _blockingLzReceive(\\n uint16 _srcChainId,\\n bytes memory _srcAddress,\\n uint64 _nonce,\\n bytes memory _payload\\n ) internal virtual override {\\n (bool success, bytes memory reason) = address(this).excessivelySafeCall(\\n gasleft(),\\n 150,\\n abi.encodeWithSelector(this.nonblockingLzReceive.selector, _srcChainId, _srcAddress, _nonce, _payload)\\n );\\n if (!success) {\\n _storeFailedMessage(_srcChainId, _srcAddress, _nonce, _payload, reason);\\n }\\n }\\n\\n function _storeFailedMessage(\\n uint16 _srcChainId,\\n bytes memory _srcAddress,\\n uint64 _nonce,\\n bytes memory _payload,\\n bytes memory _reason\\n ) internal virtual {\\n failedMessages[_srcChainId][_srcAddress][_nonce] = keccak256(_payload);\\n emit MessageFailed(_srcChainId, _srcAddress, _nonce, _payload, _reason);\\n }\\n\\n function nonblockingLzReceive(\\n uint16 _srcChainId,\\n bytes calldata _srcAddress,\\n uint64 _nonce,\\n bytes calldata _payload\\n ) public virtual {\\n // only internal transaction\\n require(_msgSender() == address(this), \\\"NonblockingLzApp: caller must be LzApp\\\");\\n _nonblockingLzReceive(_srcChainId, _srcAddress, _nonce, _payload);\\n }\\n\\n //@notice override this function\\n function _nonblockingLzReceive(\\n uint16 _srcChainId,\\n bytes memory _srcAddress,\\n uint64 _nonce,\\n bytes memory _payload\\n ) internal virtual;\\n\\n function retryMessage(\\n uint16 _srcChainId,\\n bytes calldata _srcAddress,\\n uint64 _nonce,\\n bytes calldata _payload\\n ) public payable virtual {\\n // assert there is message to retry\\n bytes32 payloadHash = failedMessages[_srcChainId][_srcAddress][_nonce];\\n require(payloadHash != bytes32(0), \\\"NonblockingLzApp: no stored message\\\");\\n require(keccak256(_payload) == payloadHash, \\\"NonblockingLzApp: invalid payload\\\");\\n // clear the stored message\\n failedMessages[_srcChainId][_srcAddress][_nonce] = bytes32(0);\\n // execute the message. revert if it fails again\\n _nonblockingLzReceive(_srcChainId, _srcAddress, _nonce, _payload);\\n emit RetryMessageSuccess(_srcChainId, _srcAddress, _nonce, payloadHash);\\n }\\n}\\n\",\"keccak256\":\"0xf4bd9e0ecfa4eb18e7305eb66da44c8a4610c3d5afeaf6a3b44c4bf4b7169b40\",\"license\":\"MIT\"},\"@layerzerolabs/solidity-examples/contracts/lzApp/interfaces/ILayerZeroEndpoint.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.5.0;\\n\\nimport \\\"./ILayerZeroUserApplicationConfig.sol\\\";\\n\\ninterface ILayerZeroEndpoint is ILayerZeroUserApplicationConfig {\\n // @notice send a LayerZero message to the specified address at a LayerZero endpoint.\\n // @param _dstChainId - the destination chain identifier\\n // @param _destination - the address on destination chain (in bytes). address length/format may vary by chains\\n // @param _payload - a custom bytes payload to send to the destination contract\\n // @param _refundAddress - if the source transaction is cheaper than the amount of value passed, refund the additional amount to this address\\n // @param _zroPaymentAddress - the address of the ZRO token holder who would pay for the transaction\\n // @param _adapterParams - parameters for custom functionality. e.g. receive airdropped native gas from the relayer on destination\\n function send(\\n uint16 _dstChainId,\\n bytes calldata _destination,\\n bytes calldata _payload,\\n address payable _refundAddress,\\n address _zroPaymentAddress,\\n bytes calldata _adapterParams\\n ) external payable;\\n\\n // @notice used by the messaging library to publish verified payload\\n // @param _srcChainId - the source chain identifier\\n // @param _srcAddress - the source contract (as bytes) at the source chain\\n // @param _dstAddress - the address on destination chain\\n // @param _nonce - the unbound message ordering nonce\\n // @param _gasLimit - the gas limit for external contract execution\\n // @param _payload - verified payload to send to the destination contract\\n function receivePayload(\\n uint16 _srcChainId,\\n bytes calldata _srcAddress,\\n address _dstAddress,\\n uint64 _nonce,\\n uint _gasLimit,\\n bytes calldata _payload\\n ) external;\\n\\n // @notice get the inboundNonce of a lzApp from a source chain which could be EVM or non-EVM chain\\n // @param _srcChainId - the source chain identifier\\n // @param _srcAddress - the source chain contract address\\n function getInboundNonce(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (uint64);\\n\\n // @notice get the outboundNonce from this source chain which, consequently, is always an EVM\\n // @param _srcAddress - the source chain contract address\\n function getOutboundNonce(uint16 _dstChainId, address _srcAddress) external view returns (uint64);\\n\\n // @notice gets a quote in source native gas, for the amount that send() requires to pay for message delivery\\n // @param _dstChainId - the destination chain identifier\\n // @param _userApplication - the user app address on this EVM chain\\n // @param _payload - the custom message to send over LayerZero\\n // @param _payInZRO - if false, user app pays the protocol fee in native token\\n // @param _adapterParam - parameters for the adapter service, e.g. send some dust native token to dstChain\\n function estimateFees(\\n uint16 _dstChainId,\\n address _userApplication,\\n bytes calldata _payload,\\n bool _payInZRO,\\n bytes calldata _adapterParam\\n ) external view returns (uint nativeFee, uint zroFee);\\n\\n // @notice get this Endpoint's immutable source identifier\\n function getChainId() external view returns (uint16);\\n\\n // @notice the interface to retry failed message on this Endpoint destination\\n // @param _srcChainId - the source chain identifier\\n // @param _srcAddress - the source chain contract address\\n // @param _payload - the payload to be retried\\n function retryPayload(\\n uint16 _srcChainId,\\n bytes calldata _srcAddress,\\n bytes calldata _payload\\n ) external;\\n\\n // @notice query if any STORED payload (message blocking) at the endpoint.\\n // @param _srcChainId - the source chain identifier\\n // @param _srcAddress - the source chain contract address\\n function hasStoredPayload(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (bool);\\n\\n // @notice query if the _libraryAddress is valid for sending msgs.\\n // @param _userApplication - the user app address on this EVM chain\\n function getSendLibraryAddress(address _userApplication) external view returns (address);\\n\\n // @notice query if the _libraryAddress is valid for receiving msgs.\\n // @param _userApplication - the user app address on this EVM chain\\n function getReceiveLibraryAddress(address _userApplication) external view returns (address);\\n\\n // @notice query if the non-reentrancy guard for send() is on\\n // @return true if the guard is on. false otherwise\\n function isSendingPayload() external view returns (bool);\\n\\n // @notice query if the non-reentrancy guard for receive() is on\\n // @return true if the guard is on. false otherwise\\n function isReceivingPayload() external view returns (bool);\\n\\n // @notice get the configuration of the LayerZero messaging library of the specified version\\n // @param _version - messaging library version\\n // @param _chainId - the chainId for the pending config change\\n // @param _userApplication - the contract address of the user application\\n // @param _configType - type of configuration. every messaging library has its own convention.\\n function getConfig(\\n uint16 _version,\\n uint16 _chainId,\\n address _userApplication,\\n uint _configType\\n ) external view returns (bytes memory);\\n\\n // @notice get the send() LayerZero messaging library version\\n // @param _userApplication - the contract address of the user application\\n function getSendVersion(address _userApplication) external view returns (uint16);\\n\\n // @notice get the lzReceive() LayerZero messaging library version\\n // @param _userApplication - the contract address of the user application\\n function getReceiveVersion(address _userApplication) external view returns (uint16);\\n}\\n\",\"keccak256\":\"0xab7fcacc672251c850f00c0abd4100df9afcc4ad70b8d331a2fd4cb07acab9f4\",\"license\":\"MIT\"},\"@layerzerolabs/solidity-examples/contracts/lzApp/interfaces/ILayerZeroReceiver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.5.0;\\n\\ninterface ILayerZeroReceiver {\\n // @notice LayerZero endpoint will invoke this function to deliver the message on the destination\\n // @param _srcChainId - the source endpoint identifier\\n // @param _srcAddress - the source sending contract address from the source chain\\n // @param _nonce - the ordered message nonce\\n // @param _payload - the signed payload is the UA bytes has encoded to be sent\\n function lzReceive(\\n uint16 _srcChainId,\\n bytes calldata _srcAddress,\\n uint64 _nonce,\\n bytes calldata _payload\\n ) external;\\n}\\n\",\"keccak256\":\"0xac1966c1229bd4dc36b6c69eeb94a537bd9aa2198d7623b9ba7f8f7dbe79bb4c\",\"license\":\"MIT\"},\"@layerzerolabs/solidity-examples/contracts/lzApp/interfaces/ILayerZeroUserApplicationConfig.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.5.0;\\n\\ninterface ILayerZeroUserApplicationConfig {\\n // @notice set the configuration of the LayerZero messaging library of the specified version\\n // @param _version - messaging library version\\n // @param _chainId - the chainId for the pending config change\\n // @param _configType - type of configuration. every messaging library has its own convention.\\n // @param _config - configuration in the bytes. can encode arbitrary content.\\n function setConfig(\\n uint16 _version,\\n uint16 _chainId,\\n uint _configType,\\n bytes calldata _config\\n ) external;\\n\\n // @notice set the send() LayerZero messaging library version to _version\\n // @param _version - new messaging library version\\n function setSendVersion(uint16 _version) external;\\n\\n // @notice set the lzReceive() LayerZero messaging library version to _version\\n // @param _version - new messaging library version\\n function setReceiveVersion(uint16 _version) external;\\n\\n // @notice Only when the UA needs to resume the message flow in blocking mode and clear the stored payload\\n // @param _srcChainId - the chainId of the source chain\\n // @param _srcAddress - the contract address of the source contract at the source chain\\n function forceResumeReceive(uint16 _srcChainId, bytes calldata _srcAddress) external;\\n}\\n\",\"keccak256\":\"0xb4df93aeb0fb46373a4fb728ad2603edc8b9a1577eee8d801768dc115bf96498\",\"license\":\"MIT\"},\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor() {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xa94b34880e3c1b0b931662cb1c09e5dfa6662f31cba80e07c5ee71cd135c9673\",\"license\":\"MIT\"},\"@openzeppelin/contracts/security/Pausable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which allows children to implement an emergency stop\\n * mechanism that can be triggered by an authorized account.\\n *\\n * This module is used through inheritance. It will make available the\\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\\n * the functions of your contract. Note that they will not be pausable by\\n * simply including this module, only once the modifiers are put in place.\\n */\\nabstract contract Pausable is Context {\\n /**\\n * @dev Emitted when the pause is triggered by `account`.\\n */\\n event Paused(address account);\\n\\n /**\\n * @dev Emitted when the pause is lifted by `account`.\\n */\\n event Unpaused(address account);\\n\\n bool private _paused;\\n\\n /**\\n * @dev Initializes the contract in unpaused state.\\n */\\n constructor() {\\n _paused = false;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is not paused.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n modifier whenNotPaused() {\\n _requireNotPaused();\\n _;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is paused.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n modifier whenPaused() {\\n _requirePaused();\\n _;\\n }\\n\\n /**\\n * @dev Returns true if the contract is paused, and false otherwise.\\n */\\n function paused() public view virtual returns (bool) {\\n return _paused;\\n }\\n\\n /**\\n * @dev Throws if the contract is paused.\\n */\\n function _requireNotPaused() internal view virtual {\\n require(!paused(), \\\"Pausable: paused\\\");\\n }\\n\\n /**\\n * @dev Throws if the contract is not paused.\\n */\\n function _requirePaused() internal view virtual {\\n require(paused(), \\\"Pausable: not paused\\\");\\n }\\n\\n /**\\n * @dev Triggers stopped state.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n function _pause() internal virtual whenNotPaused {\\n _paused = true;\\n emit Paused(_msgSender());\\n }\\n\\n /**\\n * @dev Returns to normal state.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n function _unpause() internal virtual whenPaused {\\n _paused = false;\\n emit Unpaused(_msgSender());\\n }\\n}\\n\",\"keccak256\":\"0x0849d93b16c9940beb286a7864ed02724b248b93e0d80ef6355af5ef15c64773\",\"license\":\"MIT\"},\"@openzeppelin/contracts/security/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuard {\\n // Booleans are more expensive than uint256 or any type that takes up a full\\n // word because each write operation emits an extra SLOAD to first read the\\n // slot's contents, replace the bits taken up by the boolean, and then write\\n // back. This is the compiler's defense against contract upgrades and\\n // pointer aliasing, and it cannot be disabled.\\n\\n // The values being non-zero value makes deployment a bit more expensive,\\n // but in exchange the refund on every call to nonReentrant will be lower in\\n // amount. Since refunds are capped to a percentage of the total\\n // transaction's gas, it is best to keep them low in cases like this one, to\\n // increase the likelihood of the full refund coming into effect.\\n uint256 private constant _NOT_ENTERED = 1;\\n uint256 private constant _ENTERED = 2;\\n\\n uint256 private _status;\\n\\n constructor() {\\n _status = _NOT_ENTERED;\\n }\\n\\n /**\\n * @dev Prevents a contract from calling itself, directly or indirectly.\\n * Calling a `nonReentrant` function from another `nonReentrant`\\n * function is not supported. It is possible to prevent this from happening\\n * by making the `nonReentrant` function external, and making it call a\\n * `private` function that does the actual work.\\n */\\n modifier nonReentrant() {\\n _nonReentrantBefore();\\n _;\\n _nonReentrantAfter();\\n }\\n\\n function _nonReentrantBefore() private {\\n // On the first call to nonReentrant, _status will be _NOT_ENTERED\\n require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n _status = _ENTERED;\\n }\\n\\n function _nonReentrantAfter() private {\\n // By storing the original value once again, a refund is triggered (see\\n // https://eips.ethereum.org/EIPS/eip-2200)\\n _status = _NOT_ENTERED;\\n }\\n}\\n\",\"keccak256\":\"0x190dd6f8d592b7e4e930feb7f4313aeb8e1c4ad3154c27ce1cf6a512fc30d8cc\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"@venusprotocol/solidity-utilities/contracts/validators.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.25;\\n\\n/// @notice Thrown if the supplied address is a zero address where it is not allowed\\nerror ZeroAddressNotAllowed();\\n\\n/// @notice Thrown if the supplied value is 0 where it is not allowed\\nerror ZeroValueNotAllowed();\\n\\n/// @notice Checks if the provided address is nonzero, reverts otherwise\\n/// @param address_ Address to check\\n/// @custom:error ZeroAddressNotAllowed is thrown if the provided address is a zero address\\nfunction ensureNonzeroAddress(address address_) pure {\\n if (address_ == address(0)) {\\n revert ZeroAddressNotAllowed();\\n }\\n}\\n\\n/// @notice Checks if the provided value is nonzero, reverts otherwise\\n/// @param value_ Value to check\\n/// @custom:error ZeroValueNotAllowed is thrown if the provided value is 0\\nfunction ensureNonzeroValue(uint256 value_) pure {\\n if (value_ == 0) {\\n revert ZeroValueNotAllowed();\\n }\\n}\\n\",\"keccak256\":\"0xdb88e14d50dd21889ca3329d755673d022c47e8da005b6a545c7f69c2c4b7b86\",\"license\":\"BSD-3-Clause\"},\"contracts/Cross-chain/BaseOmnichainControllerDest.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\n\\npragma solidity 0.8.25;\\n\\nimport { NonblockingLzApp } from \\\"@layerzerolabs/solidity-examples/contracts/lzApp/NonblockingLzApp.sol\\\";\\nimport { Pausable } from \\\"@openzeppelin/contracts/security/Pausable.sol\\\";\\nimport { ensureNonzeroAddress } from \\\"@venusprotocol/solidity-utilities/contracts/validators.sol\\\";\\n\\n/**\\n * @title BaseOmnichainControllerDest\\n * @author Venus\\n * @dev This contract is the base for the Omnichain controller destination contract\\n * It provides functionality related to daily command limits and pausability\\n * @custom:security-contact https://github.com/VenusProtocol/governance-contracts#discussion\\n */\\n\\nabstract contract BaseOmnichainControllerDest is NonblockingLzApp, Pausable {\\n /**\\n * @notice Maximum daily limit for receiving commands from Binance chain\\n */\\n uint256 public maxDailyReceiveLimit;\\n\\n /**\\n * @notice Total received commands within the last 24-hour window from Binance chain\\n */\\n uint256 public last24HourCommandsReceived;\\n\\n /**\\n * @notice Timestamp when the last 24-hour window started from Binance chain\\n */\\n uint256 public last24HourReceiveWindowStart;\\n\\n /**\\n * @notice Emitted when the maximum daily limit for receiving command from Binance chain is modified\\n */\\n event SetMaxDailyReceiveLimit(uint256 oldMaxLimit, uint256 newMaxLimit);\\n\\n constructor(address endpoint_) NonblockingLzApp(endpoint_) {\\n ensureNonzeroAddress(endpoint_);\\n }\\n\\n /**\\n * @notice Sets the maximum daily limit for receiving commands\\n * @param limit_ Number of commands\\n * @custom:access Only Owner\\n * @custom:event Emits SetMaxDailyReceiveLimit with old and new limit\\n */\\n function setMaxDailyReceiveLimit(uint256 limit_) external onlyOwner {\\n emit SetMaxDailyReceiveLimit(maxDailyReceiveLimit, limit_);\\n maxDailyReceiveLimit = limit_;\\n }\\n\\n /**\\n * @notice Triggers the paused state of the controller\\n * @custom:access Only owner\\n */\\n function pause() external onlyOwner {\\n _pause();\\n }\\n\\n /**\\n * @notice Triggers the resume state of the controller\\n * @custom:access Only owner\\n */\\n function unpause() external onlyOwner {\\n _unpause();\\n }\\n\\n /**\\n * @notice Empty implementation of renounce ownership to avoid any mishappening\\n */\\n function renounceOwnership() public override {}\\n\\n /**\\n * @notice Check eligibility to receive commands\\n * @param noOfCommands_ Number of commands to be received\\n */\\n function _isEligibleToReceive(uint256 noOfCommands_) internal {\\n uint256 currentBlockTimestamp = block.timestamp;\\n\\n // Load values for the 24-hour window checks for receiving\\n uint256 receivedInWindow = last24HourCommandsReceived;\\n\\n // Check if the time window has changed (more than 24 hours have passed)\\n if (currentBlockTimestamp - last24HourReceiveWindowStart > 1 days) {\\n receivedInWindow = noOfCommands_;\\n last24HourReceiveWindowStart = currentBlockTimestamp;\\n } else {\\n receivedInWindow += noOfCommands_;\\n }\\n\\n // Revert if the received amount exceeds the daily limit\\n require(receivedInWindow <= maxDailyReceiveLimit, \\\"Daily Transaction Limit Exceeded\\\");\\n\\n // Update the received amount for the 24-hour window\\n last24HourCommandsReceived = receivedInWindow;\\n }\\n}\\n\",\"keccak256\":\"0x5ccc63f55acd7c37e6e3ce36d034f82173bc8daf257cb859e08238b860cf3723\",\"license\":\"BSD-3-Clause\"},\"contracts/Cross-chain/OmnichainGovernanceExecutor.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.25;\\n\\nimport { ReentrancyGuard } from \\\"@openzeppelin/contracts/security/ReentrancyGuard.sol\\\";\\nimport { BytesLib } from \\\"@layerzerolabs/solidity-examples/contracts/libraries/BytesLib.sol\\\";\\nimport { ExcessivelySafeCall } from \\\"@layerzerolabs/solidity-examples/contracts/libraries/ExcessivelySafeCall.sol\\\";\\nimport { ensureNonzeroAddress } from \\\"@venusprotocol/solidity-utilities/contracts/validators.sol\\\";\\nimport { BaseOmnichainControllerDest } from \\\"./BaseOmnichainControllerDest.sol\\\";\\nimport { ITimelock } from \\\"./interfaces/ITimelock.sol\\\";\\n\\n/**\\n * @title OmnichainGovernanceExecutor\\n * @notice Executes the proposal transactions sent from the main chain\\n * @dev The owner of this contract controls LayerZero configuration. When used in production the owner will be OmnichainExecutor\\n * This implementation is non-blocking, meaning the failed messages will not block the future messages from the source.\\n * For the blocking behavior, derive the contract from LzApp.\\n * @custom:security-contact https://github.com/VenusProtocol/governance-contracts#discussion\\n */\\ncontract OmnichainGovernanceExecutor is ReentrancyGuard, BaseOmnichainControllerDest {\\n using BytesLib for bytes;\\n using ExcessivelySafeCall for address;\\n\\n enum ProposalType {\\n NORMAL,\\n FASTTRACK,\\n CRITICAL\\n }\\n\\n struct Proposal {\\n /** Unique id for looking up a proposal */\\n uint256 id;\\n /** The timestamp that the proposal will be available for execution, set once the vote succeeds */\\n uint256 eta;\\n /** The ordered list of target addresses for calls to be made */\\n address[] targets;\\n /** The ordered list of values (i.e. msg.value) to be passed to the calls to be made */\\n uint256[] values;\\n /** The ordered list of function signatures to be called */\\n string[] signatures;\\n /** The ordered list of calldata to be passed to each call */\\n bytes[] calldatas;\\n /** Flag marking whether the proposal has been canceled */\\n bool canceled;\\n /** Flag marking whether the proposal has been executed */\\n bool executed;\\n /** The type of the proposal */\\n uint8 proposalType;\\n }\\n /*\\n * @notice Possible states that a proposal may be in\\n */\\n enum ProposalState {\\n Canceled,\\n Queued,\\n Executed\\n }\\n\\n /**\\n * @notice A privileged role that can cancel any proposal\\n */\\n address public guardian;\\n\\n /**\\n * @notice Stores BNB chain layerzero endpoint id\\n */\\n uint16 public srcChainId;\\n\\n /**\\n * @notice Last proposal count received\\n */\\n uint256 public lastProposalReceived;\\n\\n /**\\n * @notice The official record of all proposals ever proposed\\n */\\n mapping(uint256 => Proposal) public proposals;\\n\\n /**\\n * @notice Mapping containing Timelock addresses for each proposal type\\n */\\n mapping(uint256 => ITimelock) public proposalTimelocks;\\n\\n /**\\n * @notice Represents queue state of proposal\\n */\\n mapping(uint256 => bool) public queued;\\n\\n /**\\n * @notice Emitted when proposal is received\\n */\\n event ProposalReceived(\\n uint256 indexed proposalId,\\n address[] targets,\\n uint256[] values,\\n string[] signatures,\\n bytes[] calldatas,\\n uint8 proposalType\\n );\\n\\n /**\\n * @notice Emitted when proposal is queued\\n */\\n event ProposalQueued(uint256 indexed id, uint256 eta);\\n\\n /**\\n * Emitted when proposal executed\\n */\\n event ProposalExecuted(uint256 indexed id);\\n\\n /**\\n * @notice Emitted when proposal failed\\n */\\n event ReceivePayloadFailed(uint16 indexed srcChainId, bytes indexed srcAddress, uint64 nonce, bytes reason);\\n\\n /**\\n * @notice Emitted when proposal is canceled\\n */\\n event ProposalCanceled(uint256 indexed id);\\n\\n /**\\n * @notice Emitted when timelock added\\n */\\n event TimelockAdded(uint8 routeType, address indexed oldTimelock, address indexed newTimelock);\\n\\n /**\\n * @notice Emitted when source layerzero endpoint id is updated\\n */\\n event SetSrcChainId(uint16 indexed oldSrcChainId, uint16 indexed newSrcChainId);\\n\\n /**\\n * @notice Emitted when new guardian address is set\\n */\\n event NewGuardian(address indexed oldGuardian, address indexed newGuardian);\\n\\n /**\\n * @notice Emitted when pending admin of Timelock is updated\\n */\\n event SetTimelockPendingAdmin(address, uint8);\\n\\n /**\\n * @notice Thrown when proposal ID is invalid\\n */\\n error InvalidProposalId();\\n\\n constructor(address endpoint_, address guardian_, uint16 srcChainId_) BaseOmnichainControllerDest(endpoint_) {\\n ensureNonzeroAddress(guardian_);\\n guardian = guardian_;\\n srcChainId = srcChainId_;\\n }\\n\\n /**\\n * @notice Update source layerzero endpoint id\\n * @param srcChainId_ The new source chain id to be set\\n * @custom:event Emit SetSrcChainId with old and new source id\\n * @custom:access Only owner\\n */\\n function setSrcChainId(uint16 srcChainId_) external onlyOwner {\\n emit SetSrcChainId(srcChainId, srcChainId_);\\n srcChainId = srcChainId_;\\n }\\n\\n /**\\n * @notice Sets the new executor guardian\\n * @param newGuardian The address of the new guardian\\n * @custom:access Must be call by guardian or owner\\n * @custom:event Emit NewGuardian with old and new guardian address\\n */\\n function setGuardian(address newGuardian) external {\\n require(\\n msg.sender == guardian || msg.sender == owner(),\\n \\\"OmnichainGovernanceExecutor::setGuardian: owner or guardian only\\\"\\n );\\n ensureNonzeroAddress(newGuardian);\\n emit NewGuardian(guardian, newGuardian);\\n guardian = newGuardian;\\n }\\n\\n /**\\n * @notice Add timelocks to the ProposalTimelocks mapping\\n * @param timelocks_ Array of addresses of all 3 timelocks\\n * @custom:access Only owner\\n * @custom:event Emits TimelockAdded with old and new timelock and route type\\n */\\n function addTimelocks(ITimelock[] memory timelocks_) external onlyOwner {\\n uint8 length = uint8(type(ProposalType).max) + 1;\\n require(\\n timelocks_.length == length,\\n \\\"OmnichainGovernanceExecutor::addTimelocks:number of timelocks should match the number of governance routes\\\"\\n );\\n for (uint8 i; i < length; ++i) {\\n ensureNonzeroAddress(address(timelocks_[i]));\\n emit TimelockAdded(i, address(proposalTimelocks[i]), address(timelocks_[i]));\\n proposalTimelocks[i] = timelocks_[i];\\n }\\n }\\n\\n /**\\n * @notice Executes a queued proposal if eta has passed\\n * @param proposalId_ Id of proposal that is to be executed\\n * @custom:event Emits ProposalExecuted with proposal id of executed proposal\\n */\\n function execute(uint256 proposalId_) external nonReentrant {\\n require(\\n state(proposalId_) == ProposalState.Queued,\\n \\\"OmnichainGovernanceExecutor::execute: proposal can only be executed if it is queued\\\"\\n );\\n\\n Proposal storage proposal = proposals[proposalId_];\\n proposal.executed = true;\\n ITimelock timelock = proposalTimelocks[proposal.proposalType];\\n uint256 eta = proposal.eta;\\n uint256 length = proposal.targets.length;\\n\\n emit ProposalExecuted(proposalId_);\\n\\n for (uint256 i; i < length; ++i) {\\n timelock.executeTransaction(\\n proposal.targets[i],\\n proposal.values[i],\\n proposal.signatures[i],\\n proposal.calldatas[i],\\n eta\\n );\\n }\\n delete queued[proposalId_];\\n }\\n\\n /**\\n * @notice Cancels a proposal only if sender is the guardian and proposal is not executed\\n * @param proposalId_ Id of proposal that is to be canceled\\n * @custom:access Sender must be the guardian\\n * @custom:event Emits ProposalCanceled with proposal id of the canceled proposal\\n */\\n function cancel(uint256 proposalId_) external {\\n require(\\n state(proposalId_) == ProposalState.Queued,\\n \\\"OmnichainGovernanceExecutor::cancel: proposal should be queued and not executed\\\"\\n );\\n Proposal storage proposal = proposals[proposalId_];\\n require(msg.sender == guardian, \\\"OmnichainGovernanceExecutor::cancel: sender must be guardian\\\");\\n\\n proposal.canceled = true;\\n ITimelock timelock = proposalTimelocks[proposal.proposalType];\\n uint256 eta = proposal.eta;\\n uint256 length = proposal.targets.length;\\n\\n emit ProposalCanceled(proposalId_);\\n\\n for (uint256 i; i < length; ++i) {\\n timelock.cancelTransaction(\\n proposal.targets[i],\\n proposal.values[i],\\n proposal.signatures[i],\\n proposal.calldatas[i],\\n eta\\n );\\n }\\n delete queued[proposalId_];\\n }\\n\\n /**\\n * @notice Sets the new pending admin of the Timelock\\n * @param pendingAdmin_ Address of new pending admin\\n * @param proposalType_ Type of proposal\\n * @custom:access Only owner\\n * @custom:event Emits SetTimelockPendingAdmin with new pending admin and proposal type\\n */\\n function setTimelockPendingAdmin(address pendingAdmin_, uint8 proposalType_) external onlyOwner {\\n uint8 proposalTypeLength = uint8(type(ProposalType).max) + 1;\\n require(\\n proposalType_ < proposalTypeLength,\\n \\\"OmnichainGovernanceExecutor::setTimelockPendingAdmin: invalid proposal type\\\"\\n );\\n\\n proposalTimelocks[proposalType_].setPendingAdmin(pendingAdmin_);\\n emit SetTimelockPendingAdmin(pendingAdmin_, proposalType_);\\n }\\n\\n /**\\n * @notice Resends a previously failed message\\n * @param srcChainId_ Source chain Id\\n * @param srcAddress_ Source address => local app address + remote app address\\n * @param nonce_ Nonce to identify failed message\\n * @param payload_ The payload of the message to be retried\\n * @custom:access Only owner\\n */\\n function retryMessage(\\n uint16 srcChainId_,\\n bytes calldata srcAddress_,\\n uint64 nonce_,\\n bytes calldata payload_\\n ) public payable override onlyOwner nonReentrant {\\n require(\\n keccak256(trustedRemoteLookup[srcChainId_]) == keccak256(srcAddress_),\\n \\\"OmnichainGovernanceExecutor::retryMessage: not a trusted remote\\\"\\n );\\n super.retryMessage(srcChainId_, srcAddress_, nonce_, payload_);\\n }\\n\\n /**\\n * @notice Gets the state of a proposal\\n * @param proposalId_ The id of the proposal\\n * @return Proposal state\\n */\\n function state(uint256 proposalId_) public view returns (ProposalState) {\\n Proposal storage proposal = proposals[proposalId_];\\n if (proposal.canceled) {\\n return ProposalState.Canceled;\\n } else if (proposal.executed) {\\n return ProposalState.Executed;\\n } else if (queued[proposalId_]) {\\n // queued only when proposal is received\\n return ProposalState.Queued;\\n } else {\\n revert InvalidProposalId();\\n }\\n }\\n\\n /**\\n * @notice Process blocking LayerZero receive request\\n * @param srcChainId_ Source chain Id\\n * @param srcAddress_ Source address from which payload is received\\n * @param nonce_ Nonce associated with the payload to prevent replay attacks\\n * @param payload_ Encoded payload containing proposal information\\n * @custom:event Emit ReceivePayloadFailed if call fails\\n */\\n function _blockingLzReceive(\\n uint16 srcChainId_,\\n bytes memory srcAddress_,\\n uint64 nonce_,\\n bytes memory payload_\\n ) internal virtual override {\\n require(srcChainId_ == srcChainId, \\\"OmnichainGovernanceExecutor::_blockingLzReceive: invalid source chain id\\\");\\n bytes32 hashedPayload = keccak256(payload_);\\n bytes memory callData = abi.encodeCall(this.nonblockingLzReceive, (srcChainId_, srcAddress_, nonce_, payload_));\\n\\n (bool success, bytes memory reason) = address(this).excessivelySafeCall(gasleft() - 30000, 150, callData);\\n // try-catch all errors/exceptions\\n if (!success) {\\n failedMessages[srcChainId_][srcAddress_][nonce_] = hashedPayload;\\n emit ReceivePayloadFailed(srcChainId_, srcAddress_, nonce_, reason); // Retrieve payload from the src side tx if needed to clear\\n }\\n }\\n\\n /**\\n * @notice Process non blocking LayerZero receive request\\n * @param payload_ Encoded payload containing proposal information\\n * @custom:event Emit ProposalReceived\\n */\\n function _nonblockingLzReceive(\\n uint16,\\n bytes memory,\\n uint64,\\n bytes memory payload_\\n ) internal virtual override whenNotPaused {\\n (bytes memory payload, uint256 pId) = abi.decode(payload_, (bytes, uint256));\\n (\\n address[] memory targets,\\n uint256[] memory values,\\n string[] memory signatures,\\n bytes[] memory calldatas,\\n uint8 pType\\n ) = abi.decode(payload, (address[], uint256[], string[], bytes[], uint8));\\n require(proposals[pId].id == 0, \\\"OmnichainGovernanceExecutor::_nonblockingLzReceive: duplicate proposal\\\");\\n require(\\n targets.length == values.length &&\\n targets.length == signatures.length &&\\n targets.length == calldatas.length,\\n \\\"OmnichainGovernanceExecutor::_nonblockingLzReceive: proposal function information arity mismatch\\\"\\n );\\n require(\\n pType < uint8(type(ProposalType).max) + 1,\\n \\\"OmnichainGovernanceExecutor::_nonblockingLzReceive: invalid proposal type\\\"\\n );\\n _isEligibleToReceive(targets.length);\\n\\n Proposal memory newProposal = Proposal({\\n id: pId,\\n eta: 0,\\n targets: targets,\\n values: values,\\n signatures: signatures,\\n calldatas: calldatas,\\n canceled: false,\\n executed: false,\\n proposalType: pType\\n });\\n\\n proposals[pId] = newProposal;\\n lastProposalReceived = pId;\\n\\n emit ProposalReceived(newProposal.id, targets, values, signatures, calldatas, pType);\\n _queue(pId);\\n }\\n\\n /**\\n * @notice Queue proposal for execution\\n * @param proposalId_ Proposal to be queued\\n * @custom:event Emit ProposalQueued with proposal id and eta\\n */\\n function _queue(uint256 proposalId_) internal {\\n Proposal storage proposal = proposals[proposalId_];\\n uint256 eta = block.timestamp + proposalTimelocks[proposal.proposalType].delay();\\n\\n proposal.eta = eta;\\n queued[proposalId_] = true;\\n uint8 proposalType = proposal.proposalType;\\n uint256 length = proposal.targets.length;\\n emit ProposalQueued(proposalId_, eta);\\n\\n for (uint256 i; i < length; ++i) {\\n _queueOrRevertInternal(\\n proposal.targets[i],\\n proposal.values[i],\\n proposal.signatures[i],\\n proposal.calldatas[i],\\n eta,\\n proposalType\\n );\\n }\\n }\\n\\n /**\\n * @notice Check for unique proposal\\n * @param target_ Address of the contract with the method to be called\\n * @param value_ Native token amount sent with the transaction\\n * @param signature_ Signature of the function to be called\\n * @param data_ Arguments to be passed to the function when called\\n * @param eta_ Timestamp after which the transaction can be executed\\n * @param proposalType_ Type of proposal\\n */\\n function _queueOrRevertInternal(\\n address target_,\\n uint256 value_,\\n string memory signature_,\\n bytes memory data_,\\n uint256 eta_,\\n uint8 proposalType_\\n ) internal {\\n require(\\n !proposalTimelocks[proposalType_].queuedTransactions(\\n keccak256(abi.encode(target_, value_, signature_, data_, eta_))\\n ),\\n \\\"OmnichainGovernanceExecutor::queueOrRevertInternal: identical proposal action already queued at eta\\\"\\n );\\n\\n proposalTimelocks[proposalType_].queueTransaction(target_, value_, signature_, data_, eta_);\\n }\\n}\\n\",\"keccak256\":\"0x6b3858ea6ac8248a7189910ed6f8af22cfa2299bcec8d015940ddae3406b3adb\",\"license\":\"MIT\"},\"contracts/Cross-chain/interfaces/ITimelock.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity ^0.8.25;\\n\\n/**\\n * @title ITimelock\\n * @author Venus\\n * @dev Interface for Timelock contract\\n * @custom:security-contact https://github.com/VenusProtocol/governance-contracts#discussion\\n */\\ninterface ITimelock {\\n /**\\n * @notice Delay period for the transaction queue\\n */\\n function delay() external view returns (uint256);\\n\\n /**\\n * @notice Required period to execute a proposal transaction\\n */\\n function GRACE_PERIOD() external view returns (uint256);\\n\\n /**\\n * @notice Method for accepting a proposed admin\\n */\\n function acceptAdmin() external;\\n\\n /**\\n * @notice Method to propose a new admin authorized to call timelock functions. This should be the Governor Contract.\\n */\\n function setPendingAdmin(address pendingAdmin) external;\\n\\n /**\\n * @notice Show mapping of queued transactions\\n * @param hash Transaction hash\\n */\\n function queuedTransactions(bytes32 hash) external view returns (bool);\\n\\n /**\\n * @notice Called for each action when queuing a proposal\\n * @param target Address of the contract with the method to be called\\n * @param value Native token amount sent with the transaction\\n * @param signature signature of the function to be called\\n * @param data Arguments to be passed to the function when called\\n * @param eta Timestamp after which the transaction can be executed\\n * @return Hash of the queued transaction\\n */\\n function queueTransaction(\\n address target,\\n uint256 value,\\n string calldata signature,\\n bytes calldata data,\\n uint256 eta\\n ) external returns (bytes32);\\n\\n /**\\n * @notice Called to cancel a queued transaction\\n * @param target Address of the contract with the method to be called\\n * @param value Native token amount sent with the transaction\\n * @param signature signature of the function to be called\\n * @param data Arguments to be passed to the function when called\\n * @param eta Timestamp after which the transaction can be executed\\n */\\n function cancelTransaction(\\n address target,\\n uint256 value,\\n string calldata signature,\\n bytes calldata data,\\n uint256 eta\\n ) external;\\n\\n /**\\n * @notice Called to execute a queued transaction\\n * @param target Address of the contract with the method to be called\\n * @param value Native token amount sent with the transaction\\n * @param signature signature of the function to be called\\n * @param data Arguments to be passed to the function when called\\n * @param eta Timestamp after which the transaction can be executed\\n * @return Result of function call\\n */\\n function executeTransaction(\\n address target,\\n uint256 value,\\n string calldata signature,\\n bytes calldata data,\\n uint256 eta\\n ) external payable returns (bytes memory);\\n}\\n\",\"keccak256\":\"0x7e05998e5b36a78e6b7933e446c0e0a634ba7fdaae1eb8ba6d4affe12f3a2712\",\"license\":\"BSD-3-Clause\"}},\"version\":1}", diff --git a/hardhat.config.ts b/hardhat.config.ts index aeb03933..10fec678 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -155,7 +155,10 @@ const config: HardhatUserConfig = { url: process.env.ARCHIVE_NODE_berachainbartio || "https://bartio.rpc.berachain.com", chainId: 80084, live: true, - accounts: DEPLOYER_PRIVATE_KEY ? [`0x${DEPLOYER_PRIVATE_KEY}`] : [], + // accounts: DEPLOYER_PRIVATE_KEY ? [`0x${DEPLOYER_PRIVATE_KEY}`] : [], + accounts: { + mnemonic: process.env.MNEMONIC || "", + }, }, unichainsepolia: { url: process.env.ARCHIVE_NODE_unichainsepolia || "https://sepolia.unichain.org", diff --git a/helpers/deploy/constants.ts b/helpers/deploy/constants.ts index 0e46063d..281eae65 100644 --- a/helpers/deploy/constants.ts +++ b/helpers/deploy/constants.ts @@ -36,7 +36,7 @@ export const LZ_CHAINID: Record = { opsepolia: 10232, basesepolia: 10245, unichainsepolia: 10333, - berachainbartio: 30362, + berachainbartio: 10291, hardhat: 10102, }; diff --git a/helpers/deploy/deploymentUtils.ts b/helpers/deploy/deploymentUtils.ts index 121f211d..51b52ceb 100644 --- a/helpers/deploy/deploymentUtils.ts +++ b/helpers/deploy/deploymentUtils.ts @@ -95,7 +95,7 @@ export const getLzEndpoint = async (networkName: SUPPORTED_NETWORKS): Promise