From 63368aca74fe91e44c4b2f25e74d713b81db3bcd Mon Sep 17 00:00:00 2001 From: Debugger022 Date: Tue, 26 Mar 2024 15:42:07 +0530 Subject: [PATCH 01/12] feat: add deployments for XVS and XVSBridge --- .env.example | 4 +- .github/workflows/ci.yaml | 2 +- deployments/arbitrumsepolia/.chainId | 1 + .../arbitrumsepolia/DefaultProxyAdmin.json | 257 ++ deployments/arbitrumsepolia/XVS.json | 1109 ++++++++ .../arbitrumsepolia/XVSBridgeAdmin.json | 584 ++++ .../XVSBridgeAdmin_Implementation.json | 629 ++++ .../arbitrumsepolia/XVSBridgeAdmin_Proxy.json | 267 ++ .../arbitrumsepolia/XVSProxyOFTDest.json | 2518 +++++++++++++++++ .../0e89febeebc7444140de8e67c9067d2c.json | 78 + .../f2046c3ab03975d1be43bca1cf657398.json | 186 ++ hardhat.config.ts | 30 + helpers/deploymentConfig.ts | 38 + 13 files changed, 5701 insertions(+), 2 deletions(-) create mode 100644 deployments/arbitrumsepolia/.chainId create mode 100644 deployments/arbitrumsepolia/DefaultProxyAdmin.json create mode 100644 deployments/arbitrumsepolia/XVS.json create mode 100644 deployments/arbitrumsepolia/XVSBridgeAdmin.json create mode 100644 deployments/arbitrumsepolia/XVSBridgeAdmin_Implementation.json create mode 100644 deployments/arbitrumsepolia/XVSBridgeAdmin_Proxy.json create mode 100644 deployments/arbitrumsepolia/XVSProxyOFTDest.json create mode 100644 deployments/arbitrumsepolia/solcInputs/0e89febeebc7444140de8e67c9067d2c.json create mode 100644 deployments/arbitrumsepolia/solcInputs/f2046c3ab03975d1be43bca1cf657398.json diff --git a/.env.example b/.env.example index e3b86a2..4a66e33 100644 --- a/.env.example +++ b/.env.example @@ -15,4 +15,6 @@ DEPLOYER_PRIVATE_KEY= #ARCHIVE_NODE_sepolia=https://ethereum-sepolia.blockpi.network/v1/rpc/public #ARCHIVE_NODE_ethereum=https://eth-mainnet.nodereal.io/v1/API_KEY #ARCHIVE_NODE_opbnbtestnet=https://opbnb-testnet.nodereal.io/v1/ -#ARCHIVE_NODE_opbnbmainnet=https://opbnb-mainnet.nodereal.io/v1/ \ No newline at end of file +#ARCHIVE_NODE_opbnbmainnet=https://opbnb-mainnet.nodereal.io/v1/ +#ARCHIVE_NODE_arbitrumsepolia="https://sepolia-rollup.arbitrum.io/rpc" +#ARCHIVE_NODE_arbitrumone="https://open-platform.nodereal.io//arbitrum-nitro/" \ No newline at end of file diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 7a90aa0..471204e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -114,7 +114,7 @@ jobs: - name: Export deployments run: | - for NETWORK in bsctestnet bscmainnet ethereum sepolia opbnbtestnet opbnbmainnet; do + for NETWORK in bsctestnet bscmainnet ethereum sepolia opbnbtestnet opbnbmainnet arbitrumsepolia arbitrumone; do EXPORT=true yarn hardhat export --network ${NETWORK} --export ./deployments/${NETWORK}.json jq -M '{name, chainId, addresses: .contracts | map_values(.address)}' ./deployments/${NETWORK}.json > ./deployments/${NETWORK}_addresses.json done diff --git a/deployments/arbitrumsepolia/.chainId b/deployments/arbitrumsepolia/.chainId new file mode 100644 index 0000000..71ba4d6 --- /dev/null +++ b/deployments/arbitrumsepolia/.chainId @@ -0,0 +1 @@ +421614 \ No newline at end of file diff --git a/deployments/arbitrumsepolia/DefaultProxyAdmin.json b/deployments/arbitrumsepolia/DefaultProxyAdmin.json new file mode 100644 index 0000000..0717a5f --- /dev/null +++ b/deployments/arbitrumsepolia/DefaultProxyAdmin.json @@ -0,0 +1,257 @@ +{ + "address": "0xA78A1Df376c3CEeBC5Fab574fe6EdDbbF76fd03e", + "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": "0xb6fb511443bdc4feee3dd6c3c9f8b2625f62b8be86df092b7665328544f488ab", + "receipt": { + "to": null, + "from": "0x638Eb8DFfF094Fd1d52c5A198b44984806C521E5", + "contractAddress": "0xA78A1Df376c3CEeBC5Fab574fe6EdDbbF76fd03e", + "transactionIndex": 1, + "gasUsed": "3327088", + "logsBloom": "0x00000000000000000000000000000000000000000000000000800000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800001000000000000000000000000000000000000020000000000000000000800000000000000000000200000000000400000000000000000000200000008000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xa213c1110e421780dc94a130829f7a5641c711a4baa5bb2e66b242c6a5171efa", + "transactionHash": "0xb6fb511443bdc4feee3dd6c3c9f8b2625f62b8be86df092b7665328544f488ab", + "logs": [ + { + "transactionIndex": 1, + "blockNumber": 25719456, + "transactionHash": "0xb6fb511443bdc4feee3dd6c3c9f8b2625f62b8be86df092b7665328544f488ab", + "address": "0xA78A1Df376c3CEeBC5Fab574fe6EdDbbF76fd03e", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000001426a5ae009c4443188da8793751024e358a61c2" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0xa213c1110e421780dc94a130829f7a5641c711a4baa5bb2e66b242c6a5171efa" + } + ], + "blockNumber": 25719456, + "cumulativeGasUsed": "3327088", + "status": 1, + "byzantium": true + }, + "args": ["0x1426A5Ae009c4443188DA8793751024E358A61C2"], + "numDeployments": 1, + "solcInputHash": "0e89febeebc7444140de8e67c9067d2c", + "metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"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\"}],\"devdoc\":{\"details\":\"This is an auxiliary contract meant to be assigned as the admin of a {TransparentUpgradeableProxy}. For an explanation of why you would want to use this see the documentation for {TransparentUpgradeableProxy}.\",\"kind\":\"dev\",\"methods\":{\"changeProxyAdmin(address,address)\":{\"details\":\"Changes the admin of `proxy` to `newAdmin`. Requirements: - This contract must be the current admin of `proxy`.\"},\"getProxyAdmin(address)\":{\"details\":\"Returns the current admin of `proxy`. Requirements: - This contract must be the admin of `proxy`.\"},\"getProxyImplementation(address)\":{\"details\":\"Returns the current implementation of `proxy`. Requirements: - This contract must be the admin of `proxy`.\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"upgrade(address,address)\":{\"details\":\"Upgrades `proxy` to `implementation`. See {TransparentUpgradeableProxy-upgradeTo}. Requirements: - This contract must be the admin of `proxy`.\"},\"upgradeAndCall(address,address,bytes)\":{\"details\":\"Upgrades `proxy` to `implementation` and calls a function on the new implementation. See {TransparentUpgradeableProxy-upgradeToAndCall}. Requirements: - This contract must be the admin of `proxy`.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"solc_0.8/openzeppelin/proxy/transparent/ProxyAdmin.sol\":\"ProxyAdmin\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[]},\"sources\":{\"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\",\"keccak256\":\"0x9b2bbba5bb04f53f277739c1cdff896ba8b3bf591cfc4eab2098c655e8ac251e\",\"license\":\"MIT\"},\"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\"},\"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\"},\"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\"},\"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\"},\"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\"},\"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\",\"keccak256\":\"0x754888b9c9ab5525343460b0a4fa2e2f4fca9b6a7e0e7ddea4154e2b1182a45d\",\"license\":\"MIT\"},\"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\",\"keccak256\":\"0x140055a64cf579d622e04f5a198595832bf2cb193cd0005f4f2d4d61ca906253\",\"license\":\"MIT\"},\"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\"},\"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\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"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\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50604051610b17380380610b1783398101604081905261002f91610090565b8061003981610040565b50506100c0565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000602082840312156100a257600080fd5b81516001600160a01b03811681146100b957600080fd5b9392505050565b610a48806100cf6000396000f3fe60806040526004361061007b5760003560e01c80639623609d1161004e5780639623609d1461012b57806399a88ec41461013e578063f2fde38b1461015e578063f3b7dead1461017e57600080fd5b8063204e1c7a14610080578063715018a6146100c95780637eff275e146100e05780638da5cb5b14610100575b600080fd5b34801561008c57600080fd5b506100a061009b3660046107e4565b61019e565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b3480156100d557600080fd5b506100de610255565b005b3480156100ec57600080fd5b506100de6100fb366004610808565b6102e7565b34801561010c57600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff166100a0565b6100de610139366004610870565b6103ee565b34801561014a57600080fd5b506100de610159366004610808565b6104fc565b34801561016a57600080fd5b506100de6101793660046107e4565b6105d1565b34801561018a57600080fd5b506100a06101993660046107e4565b610701565b60008060008373ffffffffffffffffffffffffffffffffffffffff166040516101ea907f5c60da1b00000000000000000000000000000000000000000000000000000000815260040190565b600060405180830381855afa9150503d8060008114610225576040519150601f19603f3d011682016040523d82523d6000602084013e61022a565b606091505b50915091508161023957600080fd5b8080602001905181019061024d9190610964565b949350505050565b60005473ffffffffffffffffffffffffffffffffffffffff1633146102db576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b6102e5600061074d565b565b60005473ffffffffffffffffffffffffffffffffffffffff163314610368576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102d2565b6040517f8f28397000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8281166004830152831690638f283970906024015b600060405180830381600087803b1580156103d257600080fd5b505af11580156103e6573d6000803e3d6000fd5b505050505050565b60005473ffffffffffffffffffffffffffffffffffffffff16331461046f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102d2565b6040517f4f1ef28600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff841690634f1ef2869034906104c59086908690600401610981565b6000604051808303818588803b1580156104de57600080fd5b505af11580156104f2573d6000803e3d6000fd5b5050505050505050565b60005473ffffffffffffffffffffffffffffffffffffffff16331461057d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102d2565b6040517f3659cfe600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8281166004830152831690633659cfe6906024016103b8565b60005473ffffffffffffffffffffffffffffffffffffffff163314610652576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102d2565b73ffffffffffffffffffffffffffffffffffffffff81166106f5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016102d2565b6106fe8161074d565b50565b60008060008373ffffffffffffffffffffffffffffffffffffffff166040516101ea907ff851a44000000000000000000000000000000000000000000000000000000000815260040190565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b73ffffffffffffffffffffffffffffffffffffffff811681146106fe57600080fd5b6000602082840312156107f657600080fd5b8135610801816107c2565b9392505050565b6000806040838503121561081b57600080fd5b8235610826816107c2565b91506020830135610836816107c2565b809150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60008060006060848603121561088557600080fd5b8335610890816107c2565b925060208401356108a0816107c2565b9150604084013567ffffffffffffffff808211156108bd57600080fd5b818601915086601f8301126108d157600080fd5b8135818111156108e3576108e3610841565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810190838211818310171561092957610929610841565b8160405282815289602084870101111561094257600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b60006020828403121561097657600080fd5b8151610801816107c2565b73ffffffffffffffffffffffffffffffffffffffff8316815260006020604081840152835180604085015260005b818110156109cb578581018301518582016060015282016109af565b818111156109dd576000606083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160600194935050505056fea2646970667358221220bd6c09ab03bfaf9ec60a4bf8cd98903cecb891974e17e2d76a3b2002c97eeb8964736f6c634300080a0033", + "deployedBytecode": "0x60806040526004361061007b5760003560e01c80639623609d1161004e5780639623609d1461012b57806399a88ec41461013e578063f2fde38b1461015e578063f3b7dead1461017e57600080fd5b8063204e1c7a14610080578063715018a6146100c95780637eff275e146100e05780638da5cb5b14610100575b600080fd5b34801561008c57600080fd5b506100a061009b3660046107e4565b61019e565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b3480156100d557600080fd5b506100de610255565b005b3480156100ec57600080fd5b506100de6100fb366004610808565b6102e7565b34801561010c57600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff166100a0565b6100de610139366004610870565b6103ee565b34801561014a57600080fd5b506100de610159366004610808565b6104fc565b34801561016a57600080fd5b506100de6101793660046107e4565b6105d1565b34801561018a57600080fd5b506100a06101993660046107e4565b610701565b60008060008373ffffffffffffffffffffffffffffffffffffffff166040516101ea907f5c60da1b00000000000000000000000000000000000000000000000000000000815260040190565b600060405180830381855afa9150503d8060008114610225576040519150601f19603f3d011682016040523d82523d6000602084013e61022a565b606091505b50915091508161023957600080fd5b8080602001905181019061024d9190610964565b949350505050565b60005473ffffffffffffffffffffffffffffffffffffffff1633146102db576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b6102e5600061074d565b565b60005473ffffffffffffffffffffffffffffffffffffffff163314610368576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102d2565b6040517f8f28397000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8281166004830152831690638f283970906024015b600060405180830381600087803b1580156103d257600080fd5b505af11580156103e6573d6000803e3d6000fd5b505050505050565b60005473ffffffffffffffffffffffffffffffffffffffff16331461046f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102d2565b6040517f4f1ef28600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff841690634f1ef2869034906104c59086908690600401610981565b6000604051808303818588803b1580156104de57600080fd5b505af11580156104f2573d6000803e3d6000fd5b5050505050505050565b60005473ffffffffffffffffffffffffffffffffffffffff16331461057d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102d2565b6040517f3659cfe600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8281166004830152831690633659cfe6906024016103b8565b60005473ffffffffffffffffffffffffffffffffffffffff163314610652576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102d2565b73ffffffffffffffffffffffffffffffffffffffff81166106f5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016102d2565b6106fe8161074d565b50565b60008060008373ffffffffffffffffffffffffffffffffffffffff166040516101ea907ff851a44000000000000000000000000000000000000000000000000000000000815260040190565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b73ffffffffffffffffffffffffffffffffffffffff811681146106fe57600080fd5b6000602082840312156107f657600080fd5b8135610801816107c2565b9392505050565b6000806040838503121561081b57600080fd5b8235610826816107c2565b91506020830135610836816107c2565b809150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60008060006060848603121561088557600080fd5b8335610890816107c2565b925060208401356108a0816107c2565b9150604084013567ffffffffffffffff808211156108bd57600080fd5b818601915086601f8301126108d157600080fd5b8135818111156108e3576108e3610841565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810190838211818310171561092957610929610841565b8160405282815289602084870101111561094257600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b60006020828403121561097657600080fd5b8151610801816107c2565b73ffffffffffffffffffffffffffffffffffffffff8316815260006020604081840152835180604085015260005b818110156109cb578581018301518582016060015282016109af565b818111156109dd576000606083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160600194935050505056fea2646970667358221220bd6c09ab03bfaf9ec60a4bf8cd98903cecb891974e17e2d76a3b2002c97eeb8964736f6c634300080a0033", + "devdoc": { + "details": "This is an auxiliary contract meant to be assigned as the admin of a {TransparentUpgradeableProxy}. For an explanation of why you would want to use this see the documentation for {TransparentUpgradeableProxy}.", + "kind": "dev", + "methods": { + "changeProxyAdmin(address,address)": { + "details": "Changes the admin of `proxy` to `newAdmin`. Requirements: - This contract must be the current admin of `proxy`." + }, + "getProxyAdmin(address)": { + "details": "Returns the current admin of `proxy`. Requirements: - This contract must be the admin of `proxy`." + }, + "getProxyImplementation(address)": { + "details": "Returns the current implementation of `proxy`. Requirements: - This contract must be the admin of `proxy`." + }, + "owner()": { + "details": "Returns the address of the current owner." + }, + "renounceOwnership()": { + "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner." + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + }, + "upgrade(address,address)": { + "details": "Upgrades `proxy` to `implementation`. See {TransparentUpgradeableProxy-upgradeTo}. Requirements: - This contract must be the admin of `proxy`." + }, + "upgradeAndCall(address,address,bytes)": { + "details": "Upgrades `proxy` to `implementation` and calls a function on the new implementation. See {TransparentUpgradeableProxy-upgradeToAndCall}. Requirements: - This contract must be the admin of `proxy`." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 7, + "contract": "solc_0.8/openzeppelin/proxy/transparent/ProxyAdmin.sol:ProxyAdmin", + "label": "_owner", + "offset": 0, + "slot": "0", + "type": "t_address" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + } + } + } +} diff --git a/deployments/arbitrumsepolia/XVS.json b/deployments/arbitrumsepolia/XVS.json new file mode 100644 index 0000000..eea1988 --- /dev/null +++ b/deployments/arbitrumsepolia/XVS.json @@ -0,0 +1,1109 @@ +{ + "address": "0x8f377098e488D227e809BD56D30C9Fd8388245D3", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "accessControlManager_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "AccountBlacklisted", + "type": "error" + }, + { + "inputs": [], + "name": "AddressesMustDiffer", + "type": "error" + }, + { + "inputs": [], + "name": "MintLimitExceed", + "type": "error" + }, + { + "inputs": [], + "name": "MintedAmountExceed", + "type": "error" + }, + { + "inputs": [], + "name": "NewCapNotGreaterThanMintedTokens", + "type": "error" + }, + { + "inputs": [], + "name": "Unauthorized", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddressNotAllowed", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "value", + "type": "bool" + } + ], + "name": "BlacklistUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "minter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "MintCapChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "minter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newLimit", + "type": "uint256" + } + ], + "name": "MintLimitDecreased", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "minter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newLimit", + "type": "uint256" + } + ], + "name": "MintLimitIncreased", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "source", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "destination", + "type": "address" + } + ], + "name": "MintedTokensMigrated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldAccessControlManager", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newAccessControlManager", + "type": "address" + } + ], + "name": "NewAccessControlManager", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "inputs": [], + "name": "accessControlManager", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount_", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user_", + "type": "address" + } + ], + "name": "isBlackListed", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "source_", + "type": "address" + }, + { + "internalType": "address", + "name": "destination_", + "type": "address" + } + ], + "name": "migrateMinterTokens", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount_", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "minterToCap", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "minterToMintedAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newAccessControlAddress_", + "type": "address" + } + ], + "name": "setAccessControlManager", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "minter_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount_", + "type": "uint256" + } + ], + "name": "setMintCap", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user_", + "type": "address" + }, + { + "internalType": "bool", + "name": "value_", + "type": "bool" + } + ], + "name": "updateBlacklist", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0xa4451e8b4ee611bccdbd94595874f92344f3c1be9ec4dc27759c713994b33746", + "receipt": { + "to": null, + "from": "0x638Eb8DFfF094Fd1d52c5A198b44984806C521E5", + "contractAddress": "0x8f377098e488D227e809BD56D30C9Fd8388245D3", + "transactionIndex": 3, + "gasUsed": "1646166", + "logsBloom": "0x00000000000000000000000200000000000000000000000400800000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000200000000000020800000000000000000800000000000000000000000000000000400000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xde62f7d261145afe999ab2b38c474a89bdd042a5a696a858d6ff4d3998259933", + "transactionHash": "0xa4451e8b4ee611bccdbd94595874f92344f3c1be9ec4dc27759c713994b33746", + "logs": [ + { + "transactionIndex": 3, + "blockNumber": 27104878, + "transactionHash": "0xa4451e8b4ee611bccdbd94595874f92344f3c1be9ec4dc27759c713994b33746", + "address": "0x8f377098e488D227e809BD56D30C9Fd8388245D3", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000638eb8dfff094fd1d52c5a198b44984806c521e5" + ], + "data": "0x", + "logIndex": 19, + "blockHash": "0xde62f7d261145afe999ab2b38c474a89bdd042a5a696a858d6ff4d3998259933" + } + ], + "blockNumber": 27104878, + "cumulativeGasUsed": "3274704", + "status": 1, + "byzantium": true + }, + "args": ["0xa36AD96441cB931D8dFEAAaC97D3FaB4B39E590F"], + "numDeployments": 1, + "solcInputHash": "f2046c3ab03975d1be43bca1cf657398", + "metadata": "{\"compiler\":{\"version\":\"0.8.13+commit.abaa5c0e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"accessControlManager_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"}],\"name\":\"AccountBlacklisted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"AddressesMustDiffer\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MintLimitExceed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MintedAmountExceed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NewCapNotGreaterThanMintedTokens\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Unauthorized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddressNotAllowed\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"value\",\"type\":\"bool\"}],\"name\":\"BlacklistUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"minter\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"MintCapChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"minter\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newLimit\",\"type\":\"uint256\"}],\"name\":\"MintLimitDecreased\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"minter\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newLimit\",\"type\":\"uint256\"}],\"name\":\"MintLimitIncreased\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"source\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"}],\"name\":\"MintedTokensMigrated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"oldAccessControlManager\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newAccessControlManager\",\"type\":\"address\"}],\"name\":\"NewAccessControlManager\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"accessControlManager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account_\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount_\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user_\",\"type\":\"address\"}],\"name\":\"isBlackListed\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"source_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"destination_\",\"type\":\"address\"}],\"name\":\"migrateMinterTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account_\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount_\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"minterToCap\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"minterToMintedAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAccessControlAddress_\",\"type\":\"address\"}],\"name\":\"setAccessControlManager\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"minter_\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount_\",\"type\":\"uint256\"}],\"name\":\"setMintCap\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user_\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"value_\",\"type\":\"bool\"}],\"name\":\"updateBlacklist\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Venus\",\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"burn(address,uint256)\":{\"custom:access\":\"Controlled by AccessControlManager.\",\"custom:event\":\"Emits MintLimitIncreased with new available limit.\",\"params\":{\"account_\":\"Address from which tokens be destroyed.\",\"amount_\":\"Amount of tokens to be destroyed.\"}},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the default value returned by this function, unless it's overridden. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.\"},\"isBlackListed(address)\":{\"params\":{\"user_\":\"Address of user to check blacklist status.\"},\"returns\":{\"_0\":\"bool status of blacklist.\"}},\"migrateMinterTokens(address,address)\":{\"custom:access\":\"Controlled by AccessControlManager.\",\"custom:error\":\"MintLimitExceed is thrown when the minting limit exceeds the cap after migration.AddressesMustDiffer is thrown when the source_ and destination_ addresses are the same.\",\"custom:event\":\"Emits MintLimitIncreased and MintLimitDecreased events for 'source' and 'destination'.Emits MintedTokensMigrated.\",\"params\":{\"destination_\":\"Minter address to migrate tokens to.\",\"source_\":\"Minter address to migrate tokens from.\"}},\"mint(address,uint256)\":{\"custom:access\":\"Controlled by AccessControlManager.\",\"custom:error\":\"MintLimitExceed is thrown when minting amount exceeds the maximum cap.\",\"custom:event\":\"Emits MintLimitDecreased with new available limit.\",\"params\":{\"account_\":\"Address to which tokens are assigned.\",\"amount_\":\"Amount of tokens to be assigned.\"}},\"name()\":{\"details\":\"Returns the name of the token.\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"pause()\":{\"custom:access\":\"Controlled by AccessControlManager.\"},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.\"},\"setAccessControlManager(address)\":{\"custom:access\":\"Only owner.\",\"custom:error\":\"ZeroAddressNotAllowed is thrown when newAccessControlAddress_ contract address is zero.\",\"custom:event\":\"Emits NewAccessControlManager.\",\"details\":\"Admin function to set the access control address.\",\"params\":{\"newAccessControlAddress_\":\"New address for the access control.\"}},\"setMintCap(address,uint256)\":{\"custom:access\":\"Controlled by AccessControlManager.\",\"custom:event\":\"Emits MintCapChanged.\",\"params\":{\"amount_\":\"Cap for the minter.\",\"minter_\":\"Minter address.\"}},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `amount`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `amount`. - the caller must have allowance for ``from``'s tokens of at least `amount`.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"unpause()\":{\"custom:access\":\"Controlled by AccessControlManager.\"},\"updateBlacklist(address,bool)\":{\"custom:access\":\"Controlled by AccessControlManager.\",\"custom:event\":\"Emits BlacklistUpdated event.\",\"params\":{\"user_\":\"User address to be affected.\",\"value_\":\"Boolean to toggle value.\"}}},\"title\":\"XVS\",\"version\":1},\"userdoc\":{\"errors\":{\"AccountBlacklisted(address)\":[{\"notice\":\"This error is used to indicate that `mint` `burn` and `transfer` actions are not allowed for the user address.\"}],\"AddressesMustDiffer()\":[{\"notice\":\"This error is used to indicate that the addresses must be different.\"}],\"MintLimitExceed()\":[{\"notice\":\"This error is used to indicate that the minting limit has been exceeded. It is typically thrown when a minting operation would surpass the defined cap.\"}],\"MintedAmountExceed()\":[{\"notice\":\"This error is used to indicate that the minter did not mint the required amount of tokens.\"}],\"NewCapNotGreaterThanMintedTokens()\":[{\"notice\":\"This error is used to indicate that the new cap is greater than the previously minted tokens for the minter.\"}],\"Unauthorized()\":[{\"notice\":\"This error is used to indicate that sender is not allowed to perform this action.\"}],\"ZeroAddressNotAllowed()\":[{\"notice\":\"Thrown if the supplied address is a zero address where it is not allowed\"}]},\"events\":{\"BlacklistUpdated(address,bool)\":{\"notice\":\"Emitted when the blacklist status of a user is updated.\"},\"MintCapChanged(address,uint256)\":{\"notice\":\"Emitted when the minting cap for a minter is changed.\"},\"MintLimitDecreased(address,uint256)\":{\"notice\":\"Emitted when the minting limit for a minter is decreased.\"},\"MintLimitIncreased(address,uint256)\":{\"notice\":\"Emitted when the minting limit for a minter is increased.\"},\"MintedTokensMigrated(address,address)\":{\"notice\":\"Emitted when all minted tokens are migrated from one minter to another.\"},\"NewAccessControlManager(address,address)\":{\"notice\":\"Emitted when the address of the access control manager of the contract is updated.\"}},\"kind\":\"user\",\"methods\":{\"accessControlManager()\":{\"notice\":\"Access control manager contract address.\"},\"burn(address,uint256)\":{\"notice\":\"Destroys `amount_` tokens from `account_`, reducing the total supply. Checks access and eligibility.\"},\"isBlackListed(address)\":{\"notice\":\"Returns the blacklist status of the address.\"},\"migrateMinterTokens(address,address)\":{\"notice\":\"Migrates all minted tokens from one minter to another. This function is useful when we want to permanent take down a bridge.\"},\"mint(address,uint256)\":{\"notice\":\"Creates `amount_` tokens and assigns them to `account_`, increasing the total supply. Checks access and eligibility.\"},\"minterToCap(address)\":{\"notice\":\"A mapping is used to keep track of the maximum amount a minter is permitted to mint.\"},\"minterToMintedAmount(address)\":{\"notice\":\"A Mapping used to keep track of the amount i.e already minted by minter.\"},\"pause()\":{\"notice\":\"Pauses Token\"},\"setAccessControlManager(address)\":{\"notice\":\"Sets the address of the access control manager of this contract.\"},\"setMintCap(address,uint256)\":{\"notice\":\"Sets the minting cap for minter.\"},\"unpause()\":{\"notice\":\"Resumes Token\"},\"updateBlacklist(address,bool)\":{\"notice\":\"Function to update blacklist.\"}},\"notice\":\"XVS contract serves as a customized ERC-20 token with additional minting and burning functionality. It also incorporates access control features provided by the \\\"TokenController\\\" contract to ensure proper governance and restrictions on minting and burning operations.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/Bridge/token/XVS.sol\":\"XVS\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"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\"},\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.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. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby disabling 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\":\"0xba43b97fba0d32eb4254f6a5a297b39a19a247082a02d6e69349e071e2946218\",\"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/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/ERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"./extensions/IERC20Metadata.sol\\\";\\nimport \\\"../../utils/Context.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * The default value of {decimals} is 18. To change this, you should override\\n * this function so it returns a different value.\\n *\\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\\n * instead returning `false` on failure. This behavior is nonetheless\\n * conventional and does not conflict with the expectations of ERC20\\n * applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20 is Context, IERC20, IERC20Metadata {\\n mapping(address => uint256) private _balances;\\n\\n mapping(address => mapping(address => uint256)) private _allowances;\\n\\n uint256 private _totalSupply;\\n\\n string private _name;\\n string private _symbol;\\n\\n /**\\n * @dev Sets the values for {name} and {symbol}.\\n *\\n * All two of these values are immutable: they can only be set once during\\n * construction.\\n */\\n constructor(string memory name_, string memory symbol_) {\\n _name = name_;\\n _symbol = symbol_;\\n }\\n\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() public view virtual override returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev Returns the symbol of the token, usually a shorter version of the\\n * name.\\n */\\n function symbol() public view virtual override returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev Returns the number of decimals used to get its user representation.\\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\\n *\\n * Tokens usually opt for a value of 18, imitating the relationship between\\n * Ether and Wei. This is the default value returned by this function, unless\\n * it's overridden.\\n *\\n * NOTE: This information is only used for _display_ purposes: it in\\n * no way affects any of the arithmetic of the contract, including\\n * {IERC20-balanceOf} and {IERC20-transfer}.\\n */\\n function decimals() public view virtual override returns (uint8) {\\n return 18;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return _balances[account];\\n }\\n\\n /**\\n * @dev See {IERC20-transfer}.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address to, uint256 amount) public virtual override returns (bool) {\\n address owner = _msgSender();\\n _transfer(owner, to, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-allowance}.\\n */\\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n return _allowances[owner][spender];\\n }\\n\\n /**\\n * @dev See {IERC20-approve}.\\n *\\n * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on\\n * `transferFrom`. This is semantically equivalent to an infinite approval.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-transferFrom}.\\n *\\n * Emits an {Approval} event indicating the updated allowance. This is not\\n * required by the EIP. See the note at the beginning of {ERC20}.\\n *\\n * NOTE: Does not update the allowance if the current allowance\\n * is the maximum `uint256`.\\n *\\n * Requirements:\\n *\\n * - `from` and `to` cannot be the zero address.\\n * - `from` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``from``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) {\\n address spender = _msgSender();\\n _spendAllowance(from, spender, amount);\\n _transfer(from, to, amount);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, allowance(owner, spender) + addedValue);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `spender` must have allowance for the caller of at least\\n * `subtractedValue`.\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n address owner = _msgSender();\\n uint256 currentAllowance = allowance(owner, spender);\\n require(currentAllowance >= subtractedValue, \\\"ERC20: decreased allowance below zero\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - subtractedValue);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Moves `amount` of tokens from `from` to `to`.\\n *\\n * This internal function is equivalent to {transfer}, and can be used to\\n * e.g. implement automatic token fees, slashing mechanisms, etc.\\n *\\n * Emits a {Transfer} event.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `from` must have a balance of at least `amount`.\\n */\\n function _transfer(address from, address to, uint256 amount) internal virtual {\\n require(from != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(to != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(from, to, amount);\\n\\n uint256 fromBalance = _balances[from];\\n require(fromBalance >= amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n unchecked {\\n _balances[from] = fromBalance - amount;\\n // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by\\n // decrementing then incrementing.\\n _balances[to] += amount;\\n }\\n\\n emit Transfer(from, to, amount);\\n\\n _afterTokenTransfer(from, to, amount);\\n }\\n\\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n * the total supply.\\n *\\n * Emits a {Transfer} event with `from` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function _mint(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: mint to the zero address\\\");\\n\\n _beforeTokenTransfer(address(0), account, amount);\\n\\n _totalSupply += amount;\\n unchecked {\\n // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.\\n _balances[account] += amount;\\n }\\n emit Transfer(address(0), account, amount);\\n\\n _afterTokenTransfer(address(0), account, amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, reducing the\\n * total supply.\\n *\\n * Emits a {Transfer} event with `to` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n * - `account` must have at least `amount` tokens.\\n */\\n function _burn(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n uint256 accountBalance = _balances[account];\\n require(accountBalance >= amount, \\\"ERC20: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[account] = accountBalance - amount;\\n // Overflow not possible: amount <= accountBalance <= totalSupply.\\n _totalSupply -= amount;\\n }\\n\\n emit Transfer(account, address(0), amount);\\n\\n _afterTokenTransfer(account, address(0), amount);\\n }\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n *\\n * This internal function is equivalent to `approve`, and can be used to\\n * e.g. set automatic allowances for certain subsystems, etc.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `owner` cannot be the zero address.\\n * - `spender` cannot be the zero address.\\n */\\n function _approve(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the zero address\\\");\\n\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n }\\n\\n /**\\n * @dev Updates `owner` s allowance for `spender` based on spent `amount`.\\n *\\n * Does not update the allowance amount in case of infinite allowance.\\n * Revert if not enough allowance is available.\\n *\\n * Might emit an {Approval} event.\\n */\\n function _spendAllowance(address owner, address spender, uint256 amount) internal virtual {\\n uint256 currentAllowance = allowance(owner, spender);\\n if (currentAllowance != type(uint256).max) {\\n require(currentAllowance >= amount, \\\"ERC20: insufficient allowance\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - amount);\\n }\\n }\\n }\\n\\n /**\\n * @dev Hook that is called before any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * will be transferred to `to`.\\n * - when `from` is zero, `amount` tokens will be minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * has been transferred to `to`.\\n * - when `from` is zero, `amount` tokens have been minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(address from, address to, uint256 amount) internal virtual {}\\n}\\n\",\"keccak256\":\"0xa56ca923f70c1748830700250b19c61b70db9a683516dc5e216694a50445d99c\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the optional metadata functions from the ERC20 standard.\\n *\\n * _Available since v4.1._\\n */\\ninterface IERC20Metadata is IERC20 {\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the symbol of the token.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the decimals places of the token.\\n */\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x8de418a5503946cabe331f35fe242d3201a73f67f77aaeb7110acb1f30423aca\",\"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/governance-contracts/contracts/Governance/IAccessControlManagerV8.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.13;\\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\":\"0x8adbe291d659987faf4de606736227ad9d8e1a0e284a33a6ca12b30ab2a504b2\",\"license\":\"BSD-3-Clause\"},\"@venusprotocol/solidity-utilities/contracts/validators.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.13;\\n\\n/// @notice Thrown if the supplied address is a zero address where it is not allowed\\nerror ZeroAddressNotAllowed();\\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\",\"keccak256\":\"0x909eb76841ebd57d8f53686b76b1a09da7bbbbcddb29510c41674d5aa84c713e\",\"license\":\"BSD-3-Clause\"},\"contracts/Bridge/token/TokenController.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.13;\\nimport { IAccessControlManagerV8 } from \\\"@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV8.sol\\\";\\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\\\";\\n\\n/**\\n * @title TokenController\\n * @author Venus\\n * @notice TokenController contract acts as a governance and access control mechanism,\\n * allowing the owner to manage minting restrictions and blacklist certain addresses to maintain control and security within the token ecosystem.\\n * It provides a flexible framework for token-related operations.\\n */\\n\\ncontract TokenController is Ownable, Pausable {\\n /**\\n * @notice Access control manager contract address.\\n */\\n address public accessControlManager;\\n /**\\n * @notice A Mapping used to keep track of the blacklist status of addresses.\\n */\\n mapping(address => bool) internal _blacklist;\\n /**\\n * @notice A mapping is used to keep track of the maximum amount a minter is permitted to mint.\\n */\\n mapping(address => uint256) public minterToCap;\\n /**\\n * @notice A Mapping used to keep track of the amount i.e already minted by minter.\\n */\\n mapping(address => uint256) public minterToMintedAmount;\\n\\n /**\\n * @notice Emitted when the blacklist status of a user is updated.\\n */\\n event BlacklistUpdated(address indexed user, bool value);\\n /**\\n * @notice Emitted when the minting limit for a minter is increased.\\n */\\n event MintLimitIncreased(address indexed minter, uint256 newLimit);\\n /**\\n * @notice Emitted when the minting limit for a minter is decreased.\\n */\\n event MintLimitDecreased(address indexed minter, uint256 newLimit);\\n /**\\n * @notice Emitted when the minting cap for a minter is changed.\\n */\\n event MintCapChanged(address indexed minter, uint256 amount);\\n /**\\n * @notice Emitted when the address of the access control manager of the contract is updated.\\n */\\n event NewAccessControlManager(address indexed oldAccessControlManager, address indexed newAccessControlManager);\\n /**\\n * @notice Emitted when all minted tokens are migrated from one minter to another.\\n */\\n event MintedTokensMigrated(address indexed source, address indexed destination);\\n\\n /**\\n * @notice This error is used to indicate that the minting limit has been exceeded. It is typically thrown when a minting operation would surpass the defined cap.\\n */\\n error MintLimitExceed();\\n /**\\n * @notice This error is used to indicate that `mint` `burn` and `transfer` actions are not allowed for the user address.\\n */\\n error AccountBlacklisted(address user);\\n /**\\n * @notice This error is used to indicate that sender is not allowed to perform this action.\\n */\\n error Unauthorized();\\n /**\\n * @notice This error is used to indicate that the new cap is greater than the previously minted tokens for the minter.\\n */\\n error NewCapNotGreaterThanMintedTokens();\\n /**\\n * @notice This error is used to indicate that the addresses must be different.\\n */\\n error AddressesMustDiffer();\\n /**\\n * @notice This error is used to indicate that the minter did not mint the required amount of tokens.\\n */\\n error MintedAmountExceed();\\n\\n /**\\n * @param accessControlManager_ Address of access control manager contract.\\n * @custom:error ZeroAddressNotAllowed is thrown when accessControlManager contract address is zero.\\n */\\n constructor(address accessControlManager_) {\\n ensureNonzeroAddress(accessControlManager_);\\n accessControlManager = accessControlManager_;\\n }\\n\\n /**\\n * @notice Pauses Token\\n * @custom:access Controlled by AccessControlManager.\\n */\\n function pause() external {\\n _ensureAllowed(\\\"pause()\\\");\\n _pause();\\n }\\n\\n /**\\n * @notice Resumes Token\\n * @custom:access Controlled by AccessControlManager.\\n */\\n function unpause() external {\\n _ensureAllowed(\\\"unpause()\\\");\\n _unpause();\\n }\\n\\n /**\\n * @notice Function to update blacklist.\\n * @param user_ User address to be affected.\\n * @param value_ Boolean to toggle value.\\n * @custom:access Controlled by AccessControlManager.\\n * @custom:event Emits BlacklistUpdated event.\\n */\\n function updateBlacklist(address user_, bool value_) external {\\n _ensureAllowed(\\\"updateBlacklist(address,bool)\\\");\\n _blacklist[user_] = value_;\\n emit BlacklistUpdated(user_, value_);\\n }\\n\\n /**\\n * @notice Sets the minting cap for minter.\\n * @param minter_ Minter address.\\n * @param amount_ Cap for the minter.\\n * @custom:access Controlled by AccessControlManager.\\n * @custom:event Emits MintCapChanged.\\n */\\n function setMintCap(address minter_, uint256 amount_) external {\\n _ensureAllowed(\\\"setMintCap(address,uint256)\\\");\\n\\n if (amount_ < minterToMintedAmount[minter_]) {\\n revert NewCapNotGreaterThanMintedTokens();\\n }\\n\\n minterToCap[minter_] = amount_;\\n emit MintCapChanged(minter_, amount_);\\n }\\n\\n /**\\n * @notice Sets the address of the access control manager of this contract.\\n * @dev Admin function to set the access control address.\\n * @param newAccessControlAddress_ New address for the access control.\\n * @custom:access Only owner.\\n * @custom:event Emits NewAccessControlManager.\\n * @custom:error ZeroAddressNotAllowed is thrown when newAccessControlAddress_ contract address is zero.\\n */\\n function setAccessControlManager(address newAccessControlAddress_) external onlyOwner {\\n ensureNonzeroAddress(newAccessControlAddress_);\\n emit NewAccessControlManager(accessControlManager, newAccessControlAddress_);\\n accessControlManager = newAccessControlAddress_;\\n }\\n\\n /**\\n * @notice Migrates all minted tokens from one minter to another. This function is useful when we want to permanent take down a bridge.\\n * @param source_ Minter address to migrate tokens from.\\n * @param destination_ Minter address to migrate tokens to.\\n * @custom:access Controlled by AccessControlManager.\\n * @custom:error MintLimitExceed is thrown when the minting limit exceeds the cap after migration.\\n * @custom:error AddressesMustDiffer is thrown when the source_ and destination_ addresses are the same.\\n * @custom:event Emits MintLimitIncreased and MintLimitDecreased events for 'source' and 'destination'.\\n * @custom:event Emits MintedTokensMigrated.\\n */\\n function migrateMinterTokens(address source_, address destination_) external {\\n _ensureAllowed(\\\"migrateMinterTokens(address,address)\\\");\\n\\n if (source_ == destination_) {\\n revert AddressesMustDiffer();\\n }\\n\\n uint256 sourceCap = minterToCap[source_];\\n uint256 destinationCap = minterToCap[destination_];\\n\\n uint256 sourceMinted = minterToMintedAmount[source_];\\n uint256 destinationMinted = minterToMintedAmount[destination_];\\n uint256 newDestinationMinted = destinationMinted + sourceMinted;\\n\\n if (newDestinationMinted > destinationCap) {\\n revert MintLimitExceed();\\n }\\n\\n minterToMintedAmount[source_] = 0;\\n minterToMintedAmount[destination_] = newDestinationMinted;\\n uint256 availableLimit;\\n unchecked {\\n availableLimit = destinationCap - newDestinationMinted;\\n }\\n\\n emit MintLimitDecreased(destination_, availableLimit);\\n emit MintLimitIncreased(source_, sourceCap);\\n emit MintedTokensMigrated(source_, destination_);\\n }\\n\\n /**\\n * @notice Returns the blacklist status of the address.\\n * @param user_ Address of user to check blacklist status.\\n * @return bool status of blacklist.\\n */\\n function isBlackListed(address user_) external view returns (bool) {\\n return _blacklist[user_];\\n }\\n\\n /**\\n * @dev Checks the minter cap and eligibility of receiver to receive tokens.\\n * @param from_ Minter address.\\n * @param to_ Receiver address.\\n * @param amount_ Amount to be mint.\\n * @custom:error MintLimitExceed is thrown when minting limit exceeds the cap.\\n * @custom:event Emits MintLimitDecreased with minter address and available limits.\\n */\\n function _isEligibleToMint(address from_, address to_, uint256 amount_) internal {\\n uint256 mintingCap = minterToCap[from_];\\n uint256 totalMintedOld = minterToMintedAmount[from_];\\n uint256 totalMintedNew = totalMintedOld + amount_;\\n\\n if (totalMintedNew > mintingCap) {\\n revert MintLimitExceed();\\n }\\n minterToMintedAmount[from_] = totalMintedNew;\\n uint256 availableLimit;\\n unchecked {\\n availableLimit = mintingCap - totalMintedNew;\\n }\\n emit MintLimitDecreased(from_, availableLimit);\\n }\\n\\n /**\\n * @dev This is post hook of burn function, increases minting limit of the minter.\\n * @param from_ Minter address.\\n * @param amount_ Amount burned.\\n * @custom:error MintedAmountExceed is thrown when `amount_` is greater than the tokens minted by `from_`.\\n * @custom:event Emits MintLimitIncreased with minter address and availabe limit.\\n */\\n function _increaseMintLimit(address from_, uint256 amount_) internal {\\n uint256 totalMintedOld = minterToMintedAmount[from_];\\n\\n if (totalMintedOld < amount_) {\\n revert MintedAmountExceed();\\n }\\n\\n uint256 totalMintedNew;\\n unchecked {\\n totalMintedNew = totalMintedOld - amount_;\\n }\\n minterToMintedAmount[from_] = totalMintedNew;\\n uint256 availableLimit = minterToCap[from_] - totalMintedNew;\\n emit MintLimitIncreased(from_, availableLimit);\\n }\\n\\n /**\\n * @dev Checks the caller is allowed to call the specified fuction.\\n * @param functionSig_ Function signatureon which access is to be checked.\\n * @custom:error Unauthorized, thrown when unauthorised user try to access function.\\n */\\n function _ensureAllowed(string memory functionSig_) internal view {\\n if (!IAccessControlManagerV8(accessControlManager).isAllowedToCall(msg.sender, functionSig_)) {\\n revert Unauthorized();\\n }\\n }\\n}\\n\",\"keccak256\":\"0xc17ede791bb2160af4c2741f0d80a7340ab8352cb32581beb1d05a2a6a24ac71\",\"license\":\"BSD-3-Clause\"},\"contracts/Bridge/token/XVS.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.13;\\n\\nimport { ERC20 } from \\\"@openzeppelin/contracts/token/ERC20/ERC20.sol\\\";\\n\\nimport { TokenController } from \\\"./TokenController.sol\\\";\\n\\n/**\\n * @title XVS\\n * @author Venus\\n * @notice XVS contract serves as a customized ERC-20 token with additional minting and burning functionality.\\n * It also incorporates access control features provided by the \\\"TokenController\\\" contract to ensure proper governance and restrictions on minting and burning operations.\\n */\\n\\ncontract XVS is ERC20, TokenController {\\n constructor(address accessControlManager_) ERC20(\\\"Venus XVS\\\", \\\"XVS\\\") TokenController(accessControlManager_) {}\\n\\n /**\\n * @notice Creates `amount_` tokens and assigns them to `account_`, increasing\\n * the total supply. Checks access and eligibility.\\n * @param account_ Address to which tokens are assigned.\\n * @param amount_ Amount of tokens to be assigned.\\n * @custom:access Controlled by AccessControlManager.\\n * @custom:event Emits MintLimitDecreased with new available limit.\\n * @custom:error MintLimitExceed is thrown when minting amount exceeds the maximum cap.\\n */\\n function mint(address account_, uint256 amount_) external whenNotPaused {\\n _ensureAllowed(\\\"mint(address,uint256)\\\");\\n _isEligibleToMint(msg.sender, account_, amount_);\\n _mint(account_, amount_);\\n }\\n\\n /**\\n * @notice Destroys `amount_` tokens from `account_`, reducing the\\n * total supply. Checks access and eligibility.\\n * @param account_ Address from which tokens be destroyed.\\n * @param amount_ Amount of tokens to be destroyed.\\n * @custom:access Controlled by AccessControlManager.\\n * @custom:event Emits MintLimitIncreased with new available limit.\\n */\\n function burn(address account_, uint256 amount_) external whenNotPaused {\\n _ensureAllowed(\\\"burn(address,uint256)\\\");\\n _burn(account_, amount_);\\n _increaseMintLimit(msg.sender, amount_);\\n }\\n\\n /**\\n * @notice Hook that is called before any transfer of tokens. This includes\\n * minting and burning.\\n * @param from_ Address of account from which tokens are to be transferred.\\n * @param to_ Address of the account to which tokens are to be transferred.\\n * @param amount_ The amount of tokens to be transferred.\\n * @custom:error AccountBlacklisted is thrown when either `from` or `to` address is blacklisted.\\n */\\n function _beforeTokenTransfer(address from_, address to_, uint256 amount_) internal override whenNotPaused {\\n if (_blacklist[to_]) {\\n revert AccountBlacklisted(to_);\\n }\\n if (_blacklist[from_]) {\\n revert AccountBlacklisted(from_);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf26fd5d1197124598105b0b2c6d3e260cb7d3e73ba07ad9dcf81f5c027075962\",\"license\":\"BSD-3-Clause\"}},\"version\":1}", + "bytecode": "0x60806040523480156200001157600080fd5b50604051620019e4380380620019e483398101604081905262000034916200021b565b604080518082018252600981526856656e75732058565360b81b6020808301918252835180850190945260038085526258565360e81b91850191909152825185949262000082929162000175565b5080516200009890600490602084019062000175565b505050620000b5620000af620000f460201b60201c565b620000f8565b6005805460ff60a01b19169055620000cd816200014a565b600680546001600160a01b0319166001600160a01b03929092169190911790555062000289565b3390565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b03811662000172576040516342bcdf7f60e11b815260040160405180910390fd5b50565b82805462000183906200024d565b90600052602060002090601f016020900481019282620001a75760008555620001f2565b82601f10620001c257805160ff1916838001178555620001f2565b82800160010185558215620001f2579182015b82811115620001f2578251825591602001919060010190620001d5565b506200020092915062000204565b5090565b5b8082111562000200576000815560010162000205565b6000602082840312156200022e57600080fd5b81516001600160a01b03811681146200024657600080fd5b9392505050565b600181811c908216806200026257607f821691505b6020821081036200028357634e487b7160e01b600052602260045260246000fd5b50919050565b61174b80620002996000396000f3fe608060405234801561001057600080fd5b50600436106101a95760003560e01c80637b517334116100f9578063a9059cbb11610097578063d89e2dac11610071578063d89e2dac14610390578063dd62ed3e146103a3578063e47d6060146103b6578063f2fde38b146103e257600080fd5b8063a9059cbb14610357578063b4a0bdf31461036a578063c06abe771461037d57600080fd5b80639155e083116100d35780639155e0831461031657806395d89b41146103295780639dc29fac14610331578063a457c2d71461034457600080fd5b80637b517334146102c95780638456cb59146102e95780638da5cb5b146102f157600080fd5b8063391efe121161016657806340c10f191161014057806340c10f19146102735780635c975abb1461028657806370a0823114610298578063715018a6146102c157600080fd5b8063391efe121461023857806339509351146102585780633f4ba83a1461026b57600080fd5b806306fdde03146101ae578063095ea7b3146101cc5780630e32cb86146101ef57806318160ddd1461020457806323b872dd14610216578063313ce56714610229575b600080fd5b6101b66103f5565b6040516101c391906114fa565b60405180910390f35b6101df6101da366004611530565b610487565b60405190151581526020016101c3565b6102026101fd36600461155a565b61049f565b005b6002545b6040519081526020016101c3565b6101df610224366004611575565b61050c565b604051601281526020016101c3565b61020861024636600461155a565b60086020526000908152604090205481565b6101df610266366004611530565b610530565b610202610552565b610202610281366004611530565b610586565b600554600160a01b900460ff166101df565b6102086102a636600461155a565b6001600160a01b031660009081526020819052604090205490565b6102026105dd565b6102086102d736600461155a565b60096020526000908152604090205481565b6102026105ef565b6005546001600160a01b03165b6040516001600160a01b0390911681526020016101c3565b6102026103243660046115bf565b61061f565b6101b66106bd565b61020261033f366004611530565b6106cc565b6101df610352366004611530565b61071e565b6101df610365366004611530565b61079e565b6006546102fe906001600160a01b031681565b61020261038b366004611530565b6107ac565b61020261039e3660046115f6565b610870565b6102086103b13660046115f6565b610a18565b6101df6103c436600461155a565b6001600160a01b031660009081526007602052604090205460ff1690565b6102026103f036600461155a565b610a43565b60606003805461040490611629565b80601f016020809104026020016040519081016040528092919081815260200182805461043090611629565b801561047d5780601f106104525761010080835404028352916020019161047d565b820191906000526020600020905b81548152906001019060200180831161046057829003601f168201915b5050505050905090565b600033610495818585610abc565b5060019392505050565b6104a7610be1565b6104b081610c3b565b6006546040516001600160a01b038084169216907f66fd58e82f7b31a2a5c30e0888f3093efe4e111b00cd2b0c31fe014601293aa090600090a3600680546001600160a01b0319166001600160a01b0392909216919091179055565b60003361051a858285610c62565b610525858585610cdc565b506001949350505050565b6000336104958185856105438383610a18565b61054d9190611679565b610abc565b61057c60405180604001604052806009815260200168756e7061757365282960b81b815250610e8b565b610584610f1a565b565b61058e610f6f565b6105c4604051806040016040528060158152602001746d696e7428616464726573732c75696e743235362960581b815250610e8b565b6105cf338383610fbc565b6105d98282611072565b5050565b6105e5610be1565b610584600061113d565b610617604051806040016040528060078152602001667061757365282960c81b815250610e8b565b61058461118f565b61065d6040518060400160405280601d81526020017f757064617465426c61636b6c69737428616464726573732c626f6f6c29000000815250610e8b565b6001600160a01b038216600081815260076020908152604091829020805460ff191685151590811790915591519182527f6a12b3df6cba4203bd7fd06b816789f87de8c594299aed5717ae070fac781bac91015b60405180910390a25050565b60606004805461040490611629565b6106d4610f6f565b61070a604051806040016040528060158152602001746275726e28616464726573732c75696e743235362960581b815250610e8b565b61071482826111d2565b6105d9338261130d565b6000338161072c8286610a18565b9050838110156107915760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6105258286868403610abc565b600033610495818585610cdc565b6107ea6040518060400160405280601b81526020017f7365744d696e7443617028616464726573732c75696e74323536290000000000815250610e8b565b6001600160a01b0382166000908152600960205260409020548110156108235760405163ce89973d60e01b815260040160405180910390fd5b6001600160a01b03821660008181526008602052604090819020839055517f01a85f4ecff52e70907e25b863010bca98a9458d9f2fe9b3efb4c47d197e6448906106b19084815260200190565b6108916040518060600160405280602481526020016116f260249139610e8b565b806001600160a01b0316826001600160a01b0316036108c3576040516380ae98f560e01b815260040160405180910390fd5b6001600160a01b038083166000818152600860209081526040808320549486168084528184205494845260099092528083205491835282205490916109088383611679565b90508381111561092b57604051634f2dbd1d60e01b815260040160405180910390fd5b6001600160a01b038781166000908152600960209081526040808320839055928916808352918390208490559151838703808252927fbe214d1fa2403a39be9a36c9f4b45125eba30bf27a8b56a619baf00493ad3e61910160405180910390a2876001600160a01b03167f0831a8ba59684daef8a957d2bd2d943e233993771429e9a17b71ddb1cea35cdb876040516109c691815260200190565b60405180910390a2866001600160a01b0316886001600160a01b03167f63ce671e4a37975f0a9e340f6f72320c617a5f728b83e3860b03aa847dc26ebb60405160405180910390a35050505050505050565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b610a4b610be1565b6001600160a01b038116610ab05760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610788565b610ab98161113d565b50565b6001600160a01b038316610b1e5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610788565b6001600160a01b038216610b7f5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610788565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b6005546001600160a01b031633146105845760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610788565b6001600160a01b038116610ab9576040516342bcdf7f60e11b815260040160405180910390fd5b6000610c6e8484610a18565b90506000198114610cd65781811015610cc95760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610788565b610cd68484848403610abc565b50505050565b6001600160a01b038316610d405760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610788565b6001600160a01b038216610da25760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610788565b610dad8383836113cb565b6001600160a01b03831660009081526020819052604090205481811015610e255760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610788565b6001600160a01b03848116600081815260208181526040808320878703905593871680835291849020805487019055925185815290927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3610cd6565b6006546040516318c5e8ab60e01b81526001600160a01b03909116906318c5e8ab90610ebd9033908590600401611691565b602060405180830381865afa158015610eda573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610efe91906116bd565b610ab9576040516282b42960e81b815260040160405180910390fd5b610f2261145d565b6005805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600554600160a01b900460ff16156105845760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610788565b6001600160a01b03831660009081526008602090815260408083205460099092528220549091610fec8483611679565b90508281111561100f57604051634f2dbd1d60e01b815260040160405180910390fd5b6001600160a01b038616600081815260096020526040908190208390555182850391907fbe214d1fa2403a39be9a36c9f4b45125eba30bf27a8b56a619baf00493ad3e61906110619084815260200190565b60405180910390a250505050505050565b6001600160a01b0382166110c85760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610788565b6110d4600083836113cb565b80600260008282546110e69190611679565b90915550506001600160a01b038216600081815260208181526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b611197610f6f565b6005805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610f523390565b6001600160a01b0382166112325760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610788565b61123e826000836113cb565b6001600160a01b038216600090815260208190526040902054818110156112b25760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610788565b6001600160a01b0383166000818152602081815260408083208686039055600280548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9101610bd4565b505050565b6001600160a01b03821660009081526009602052604090205481811015611347576040516348af2f2960e11b815260040160405180910390fd5b6001600160a01b038316600090815260096020908152604080832085850390819055600890925282205490919061137f9083906116da565b9050846001600160a01b03167f0831a8ba59684daef8a957d2bd2d943e233993771429e9a17b71ddb1cea35cdb826040516113bc91815260200190565b60405180910390a25050505050565b6113d3610f6f565b6001600160a01b03821660009081526007602052604090205460ff16156114185760405163571f7b4960e01b81526001600160a01b0383166004820152602401610788565b6001600160a01b03831660009081526007602052604090205460ff16156113085760405163571f7b4960e01b81526001600160a01b0384166004820152602401610788565b600554600160a01b900460ff166105845760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610788565b6000815180845260005b818110156114d3576020818501810151868301820152016114b7565b818111156114e5576000602083870101525b50601f01601f19169290920160200192915050565b60208152600061150d60208301846114ad565b9392505050565b80356001600160a01b038116811461152b57600080fd5b919050565b6000806040838503121561154357600080fd5b61154c83611514565b946020939093013593505050565b60006020828403121561156c57600080fd5b61150d82611514565b60008060006060848603121561158a57600080fd5b61159384611514565b92506115a160208501611514565b9150604084013590509250925092565b8015158114610ab957600080fd5b600080604083850312156115d257600080fd5b6115db83611514565b915060208301356115eb816115b1565b809150509250929050565b6000806040838503121561160957600080fd5b61161283611514565b915061162060208401611514565b90509250929050565b600181811c9082168061163d57607f821691505b60208210810361165d57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b6000821982111561168c5761168c611663565b500190565b6001600160a01b03831681526040602082018190526000906116b5908301846114ad565b949350505050565b6000602082840312156116cf57600080fd5b815161150d816115b1565b6000828210156116ec576116ec611663565b50039056fe6d6967726174654d696e746572546f6b656e7328616464726573732c6164647265737329a26469706673582212202dd502ad7f111f919097342862e006098fd7d7236fbb113e5b8a2648ff94916664736f6c634300080d0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101a95760003560e01c80637b517334116100f9578063a9059cbb11610097578063d89e2dac11610071578063d89e2dac14610390578063dd62ed3e146103a3578063e47d6060146103b6578063f2fde38b146103e257600080fd5b8063a9059cbb14610357578063b4a0bdf31461036a578063c06abe771461037d57600080fd5b80639155e083116100d35780639155e0831461031657806395d89b41146103295780639dc29fac14610331578063a457c2d71461034457600080fd5b80637b517334146102c95780638456cb59146102e95780638da5cb5b146102f157600080fd5b8063391efe121161016657806340c10f191161014057806340c10f19146102735780635c975abb1461028657806370a0823114610298578063715018a6146102c157600080fd5b8063391efe121461023857806339509351146102585780633f4ba83a1461026b57600080fd5b806306fdde03146101ae578063095ea7b3146101cc5780630e32cb86146101ef57806318160ddd1461020457806323b872dd14610216578063313ce56714610229575b600080fd5b6101b66103f5565b6040516101c391906114fa565b60405180910390f35b6101df6101da366004611530565b610487565b60405190151581526020016101c3565b6102026101fd36600461155a565b61049f565b005b6002545b6040519081526020016101c3565b6101df610224366004611575565b61050c565b604051601281526020016101c3565b61020861024636600461155a565b60086020526000908152604090205481565b6101df610266366004611530565b610530565b610202610552565b610202610281366004611530565b610586565b600554600160a01b900460ff166101df565b6102086102a636600461155a565b6001600160a01b031660009081526020819052604090205490565b6102026105dd565b6102086102d736600461155a565b60096020526000908152604090205481565b6102026105ef565b6005546001600160a01b03165b6040516001600160a01b0390911681526020016101c3565b6102026103243660046115bf565b61061f565b6101b66106bd565b61020261033f366004611530565b6106cc565b6101df610352366004611530565b61071e565b6101df610365366004611530565b61079e565b6006546102fe906001600160a01b031681565b61020261038b366004611530565b6107ac565b61020261039e3660046115f6565b610870565b6102086103b13660046115f6565b610a18565b6101df6103c436600461155a565b6001600160a01b031660009081526007602052604090205460ff1690565b6102026103f036600461155a565b610a43565b60606003805461040490611629565b80601f016020809104026020016040519081016040528092919081815260200182805461043090611629565b801561047d5780601f106104525761010080835404028352916020019161047d565b820191906000526020600020905b81548152906001019060200180831161046057829003601f168201915b5050505050905090565b600033610495818585610abc565b5060019392505050565b6104a7610be1565b6104b081610c3b565b6006546040516001600160a01b038084169216907f66fd58e82f7b31a2a5c30e0888f3093efe4e111b00cd2b0c31fe014601293aa090600090a3600680546001600160a01b0319166001600160a01b0392909216919091179055565b60003361051a858285610c62565b610525858585610cdc565b506001949350505050565b6000336104958185856105438383610a18565b61054d9190611679565b610abc565b61057c60405180604001604052806009815260200168756e7061757365282960b81b815250610e8b565b610584610f1a565b565b61058e610f6f565b6105c4604051806040016040528060158152602001746d696e7428616464726573732c75696e743235362960581b815250610e8b565b6105cf338383610fbc565b6105d98282611072565b5050565b6105e5610be1565b610584600061113d565b610617604051806040016040528060078152602001667061757365282960c81b815250610e8b565b61058461118f565b61065d6040518060400160405280601d81526020017f757064617465426c61636b6c69737428616464726573732c626f6f6c29000000815250610e8b565b6001600160a01b038216600081815260076020908152604091829020805460ff191685151590811790915591519182527f6a12b3df6cba4203bd7fd06b816789f87de8c594299aed5717ae070fac781bac91015b60405180910390a25050565b60606004805461040490611629565b6106d4610f6f565b61070a604051806040016040528060158152602001746275726e28616464726573732c75696e743235362960581b815250610e8b565b61071482826111d2565b6105d9338261130d565b6000338161072c8286610a18565b9050838110156107915760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6105258286868403610abc565b600033610495818585610cdc565b6107ea6040518060400160405280601b81526020017f7365744d696e7443617028616464726573732c75696e74323536290000000000815250610e8b565b6001600160a01b0382166000908152600960205260409020548110156108235760405163ce89973d60e01b815260040160405180910390fd5b6001600160a01b03821660008181526008602052604090819020839055517f01a85f4ecff52e70907e25b863010bca98a9458d9f2fe9b3efb4c47d197e6448906106b19084815260200190565b6108916040518060600160405280602481526020016116f260249139610e8b565b806001600160a01b0316826001600160a01b0316036108c3576040516380ae98f560e01b815260040160405180910390fd5b6001600160a01b038083166000818152600860209081526040808320549486168084528184205494845260099092528083205491835282205490916109088383611679565b90508381111561092b57604051634f2dbd1d60e01b815260040160405180910390fd5b6001600160a01b038781166000908152600960209081526040808320839055928916808352918390208490559151838703808252927fbe214d1fa2403a39be9a36c9f4b45125eba30bf27a8b56a619baf00493ad3e61910160405180910390a2876001600160a01b03167f0831a8ba59684daef8a957d2bd2d943e233993771429e9a17b71ddb1cea35cdb876040516109c691815260200190565b60405180910390a2866001600160a01b0316886001600160a01b03167f63ce671e4a37975f0a9e340f6f72320c617a5f728b83e3860b03aa847dc26ebb60405160405180910390a35050505050505050565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b610a4b610be1565b6001600160a01b038116610ab05760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610788565b610ab98161113d565b50565b6001600160a01b038316610b1e5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610788565b6001600160a01b038216610b7f5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610788565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b6005546001600160a01b031633146105845760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610788565b6001600160a01b038116610ab9576040516342bcdf7f60e11b815260040160405180910390fd5b6000610c6e8484610a18565b90506000198114610cd65781811015610cc95760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610788565b610cd68484848403610abc565b50505050565b6001600160a01b038316610d405760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610788565b6001600160a01b038216610da25760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610788565b610dad8383836113cb565b6001600160a01b03831660009081526020819052604090205481811015610e255760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610788565b6001600160a01b03848116600081815260208181526040808320878703905593871680835291849020805487019055925185815290927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3610cd6565b6006546040516318c5e8ab60e01b81526001600160a01b03909116906318c5e8ab90610ebd9033908590600401611691565b602060405180830381865afa158015610eda573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610efe91906116bd565b610ab9576040516282b42960e81b815260040160405180910390fd5b610f2261145d565b6005805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600554600160a01b900460ff16156105845760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610788565b6001600160a01b03831660009081526008602090815260408083205460099092528220549091610fec8483611679565b90508281111561100f57604051634f2dbd1d60e01b815260040160405180910390fd5b6001600160a01b038616600081815260096020526040908190208390555182850391907fbe214d1fa2403a39be9a36c9f4b45125eba30bf27a8b56a619baf00493ad3e61906110619084815260200190565b60405180910390a250505050505050565b6001600160a01b0382166110c85760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610788565b6110d4600083836113cb565b80600260008282546110e69190611679565b90915550506001600160a01b038216600081815260208181526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b611197610f6f565b6005805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610f523390565b6001600160a01b0382166112325760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610788565b61123e826000836113cb565b6001600160a01b038216600090815260208190526040902054818110156112b25760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610788565b6001600160a01b0383166000818152602081815260408083208686039055600280548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9101610bd4565b505050565b6001600160a01b03821660009081526009602052604090205481811015611347576040516348af2f2960e11b815260040160405180910390fd5b6001600160a01b038316600090815260096020908152604080832085850390819055600890925282205490919061137f9083906116da565b9050846001600160a01b03167f0831a8ba59684daef8a957d2bd2d943e233993771429e9a17b71ddb1cea35cdb826040516113bc91815260200190565b60405180910390a25050505050565b6113d3610f6f565b6001600160a01b03821660009081526007602052604090205460ff16156114185760405163571f7b4960e01b81526001600160a01b0383166004820152602401610788565b6001600160a01b03831660009081526007602052604090205460ff16156113085760405163571f7b4960e01b81526001600160a01b0384166004820152602401610788565b600554600160a01b900460ff166105845760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610788565b6000815180845260005b818110156114d3576020818501810151868301820152016114b7565b818111156114e5576000602083870101525b50601f01601f19169290920160200192915050565b60208152600061150d60208301846114ad565b9392505050565b80356001600160a01b038116811461152b57600080fd5b919050565b6000806040838503121561154357600080fd5b61154c83611514565b946020939093013593505050565b60006020828403121561156c57600080fd5b61150d82611514565b60008060006060848603121561158a57600080fd5b61159384611514565b92506115a160208501611514565b9150604084013590509250925092565b8015158114610ab957600080fd5b600080604083850312156115d257600080fd5b6115db83611514565b915060208301356115eb816115b1565b809150509250929050565b6000806040838503121561160957600080fd5b61161283611514565b915061162060208401611514565b90509250929050565b600181811c9082168061163d57607f821691505b60208210810361165d57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b6000821982111561168c5761168c611663565b500190565b6001600160a01b03831681526040602082018190526000906116b5908301846114ad565b949350505050565b6000602082840312156116cf57600080fd5b815161150d816115b1565b6000828210156116ec576116ec611663565b50039056fe6d6967726174654d696e746572546f6b656e7328616464726573732c6164647265737329a26469706673582212202dd502ad7f111f919097342862e006098fd7d7236fbb113e5b8a2648ff94916664736f6c634300080d0033", + "devdoc": { + "author": "Venus", + "kind": "dev", + "methods": { + "allowance(address,address)": { + "details": "See {IERC20-allowance}." + }, + "approve(address,uint256)": { + "details": "See {IERC20-approve}. NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address." + }, + "balanceOf(address)": { + "details": "See {IERC20-balanceOf}." + }, + "burn(address,uint256)": { + "custom:access": "Controlled by AccessControlManager.", + "custom:event": "Emits MintLimitIncreased with new available limit.", + "params": { + "account_": "Address from which tokens be destroyed.", + "amount_": "Amount of tokens to be destroyed." + } + }, + "decimals()": { + "details": "Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the default value returned by this function, unless it's overridden. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}." + }, + "decreaseAllowance(address,uint256)": { + "details": "Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`." + }, + "increaseAllowance(address,uint256)": { + "details": "Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address." + }, + "isBlackListed(address)": { + "params": { + "user_": "Address of user to check blacklist status." + }, + "returns": { + "_0": "bool status of blacklist." + } + }, + "migrateMinterTokens(address,address)": { + "custom:access": "Controlled by AccessControlManager.", + "custom:error": "MintLimitExceed is thrown when the minting limit exceeds the cap after migration.AddressesMustDiffer is thrown when the source_ and destination_ addresses are the same.", + "custom:event": "Emits MintLimitIncreased and MintLimitDecreased events for 'source' and 'destination'.Emits MintedTokensMigrated.", + "params": { + "destination_": "Minter address to migrate tokens to.", + "source_": "Minter address to migrate tokens from." + } + }, + "mint(address,uint256)": { + "custom:access": "Controlled by AccessControlManager.", + "custom:error": "MintLimitExceed is thrown when minting amount exceeds the maximum cap.", + "custom:event": "Emits MintLimitDecreased with new available limit.", + "params": { + "account_": "Address to which tokens are assigned.", + "amount_": "Amount of tokens to be assigned." + } + }, + "name()": { + "details": "Returns the name of the token." + }, + "owner()": { + "details": "Returns the address of the current owner." + }, + "pause()": { + "custom:access": "Controlled by AccessControlManager." + }, + "paused()": { + "details": "Returns true if the contract is paused, and false otherwise." + }, + "renounceOwnership()": { + "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner." + }, + "setAccessControlManager(address)": { + "custom:access": "Only owner.", + "custom:error": "ZeroAddressNotAllowed is thrown when newAccessControlAddress_ contract address is zero.", + "custom:event": "Emits NewAccessControlManager.", + "details": "Admin function to set the access control address.", + "params": { + "newAccessControlAddress_": "New address for the access control." + } + }, + "setMintCap(address,uint256)": { + "custom:access": "Controlled by AccessControlManager.", + "custom:event": "Emits MintCapChanged.", + "params": { + "amount_": "Cap for the minter.", + "minter_": "Minter address." + } + }, + "symbol()": { + "details": "Returns the symbol of the token, usually a shorter version of the name." + }, + "totalSupply()": { + "details": "See {IERC20-totalSupply}." + }, + "transfer(address,uint256)": { + "details": "See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `amount`." + }, + "transferFrom(address,address,uint256)": { + "details": "See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `amount`. - the caller must have allowance for ``from``'s tokens of at least `amount`." + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + }, + "unpause()": { + "custom:access": "Controlled by AccessControlManager." + }, + "updateBlacklist(address,bool)": { + "custom:access": "Controlled by AccessControlManager.", + "custom:event": "Emits BlacklistUpdated event.", + "params": { + "user_": "User address to be affected.", + "value_": "Boolean to toggle value." + } + } + }, + "title": "XVS", + "version": 1 + }, + "userdoc": { + "errors": { + "AccountBlacklisted(address)": [ + { + "notice": "This error is used to indicate that `mint` `burn` and `transfer` actions are not allowed for the user address." + } + ], + "AddressesMustDiffer()": [ + { + "notice": "This error is used to indicate that the addresses must be different." + } + ], + "MintLimitExceed()": [ + { + "notice": "This error is used to indicate that the minting limit has been exceeded. It is typically thrown when a minting operation would surpass the defined cap." + } + ], + "MintedAmountExceed()": [ + { + "notice": "This error is used to indicate that the minter did not mint the required amount of tokens." + } + ], + "NewCapNotGreaterThanMintedTokens()": [ + { + "notice": "This error is used to indicate that the new cap is greater than the previously minted tokens for the minter." + } + ], + "Unauthorized()": [ + { + "notice": "This error is used to indicate that sender is not allowed to perform this action." + } + ], + "ZeroAddressNotAllowed()": [ + { + "notice": "Thrown if the supplied address is a zero address where it is not allowed" + } + ] + }, + "events": { + "BlacklistUpdated(address,bool)": { + "notice": "Emitted when the blacklist status of a user is updated." + }, + "MintCapChanged(address,uint256)": { + "notice": "Emitted when the minting cap for a minter is changed." + }, + "MintLimitDecreased(address,uint256)": { + "notice": "Emitted when the minting limit for a minter is decreased." + }, + "MintLimitIncreased(address,uint256)": { + "notice": "Emitted when the minting limit for a minter is increased." + }, + "MintedTokensMigrated(address,address)": { + "notice": "Emitted when all minted tokens are migrated from one minter to another." + }, + "NewAccessControlManager(address,address)": { + "notice": "Emitted when the address of the access control manager of the contract is updated." + } + }, + "kind": "user", + "methods": { + "accessControlManager()": { + "notice": "Access control manager contract address." + }, + "burn(address,uint256)": { + "notice": "Destroys `amount_` tokens from `account_`, reducing the total supply. Checks access and eligibility." + }, + "isBlackListed(address)": { + "notice": "Returns the blacklist status of the address." + }, + "migrateMinterTokens(address,address)": { + "notice": "Migrates all minted tokens from one minter to another. This function is useful when we want to permanent take down a bridge." + }, + "mint(address,uint256)": { + "notice": "Creates `amount_` tokens and assigns them to `account_`, increasing the total supply. Checks access and eligibility." + }, + "minterToCap(address)": { + "notice": "A mapping is used to keep track of the maximum amount a minter is permitted to mint." + }, + "minterToMintedAmount(address)": { + "notice": "A Mapping used to keep track of the amount i.e already minted by minter." + }, + "pause()": { + "notice": "Pauses Token" + }, + "setAccessControlManager(address)": { + "notice": "Sets the address of the access control manager of this contract." + }, + "setMintCap(address,uint256)": { + "notice": "Sets the minting cap for minter." + }, + "unpause()": { + "notice": "Resumes Token" + }, + "updateBlacklist(address,bool)": { + "notice": "Function to update blacklist." + } + }, + "notice": "XVS contract serves as a customized ERC-20 token with additional minting and burning functionality. It also incorporates access control features provided by the \"TokenController\" contract to ensure proper governance and restrictions on minting and burning operations.", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 5612, + "contract": "contracts/Bridge/token/XVS.sol:XVS", + "label": "_balances", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 5618, + "contract": "contracts/Bridge/token/XVS.sol:XVS", + "label": "_allowances", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" + }, + { + "astId": 5620, + "contract": "contracts/Bridge/token/XVS.sol:XVS", + "label": "_totalSupply", + "offset": 0, + "slot": "2", + "type": "t_uint256" + }, + { + "astId": 5622, + "contract": "contracts/Bridge/token/XVS.sol:XVS", + "label": "_name", + "offset": 0, + "slot": "3", + "type": "t_string_storage" + }, + { + "astId": 5624, + "contract": "contracts/Bridge/token/XVS.sol:XVS", + "label": "_symbol", + "offset": 0, + "slot": "4", + "type": "t_string_storage" + }, + { + "astId": 5383, + "contract": "contracts/Bridge/token/XVS.sol:XVS", + "label": "_owner", + "offset": 0, + "slot": "5", + "type": "t_address" + }, + { + "astId": 5506, + "contract": "contracts/Bridge/token/XVS.sol:XVS", + "label": "_paused", + "offset": 20, + "slot": "5", + "type": "t_bool" + }, + { + "astId": 11266, + "contract": "contracts/Bridge/token/XVS.sol:XVS", + "label": "accessControlManager", + "offset": 0, + "slot": "6", + "type": "t_address" + }, + { + "astId": 11271, + "contract": "contracts/Bridge/token/XVS.sol:XVS", + "label": "_blacklist", + "offset": 0, + "slot": "7", + "type": "t_mapping(t_address,t_bool)" + }, + { + "astId": 11276, + "contract": "contracts/Bridge/token/XVS.sol:XVS", + "label": "minterToCap", + "offset": 0, + "slot": "8", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 11281, + "contract": "contracts/Bridge/token/XVS.sol:XVS", + "label": "minterToMintedAmount", + "offset": 0, + "slot": "9", + "type": "t_mapping(t_address,t_uint256)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_address,t_mapping(t_address,t_uint256))": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => mapping(address => uint256))", + "numberOfBytes": "32", + "value": "t_mapping(t_address,t_uint256)" + }, + "t_mapping(t_address,t_uint256)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} diff --git a/deployments/arbitrumsepolia/XVSBridgeAdmin.json b/deployments/arbitrumsepolia/XVSBridgeAdmin.json new file mode 100644 index 0000000..655e631 --- /dev/null +++ b/deployments/arbitrumsepolia/XVSBridgeAdmin.json @@ -0,0 +1,584 @@ +{ + "address": "0x649c35088bAd6847fF163B15d0e7A00943D7FD40", + "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": [ + { + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "changeAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "implementation", + "outputs": [ + { + "internalType": "address", + "name": "implementation_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "calledContract", + "type": "address" + }, + { + "internalType": "string", + "name": "methodSignature", + "type": "string" + } + ], + "name": "Unauthorized", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddressNotAllowed", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "signature", + "type": "string" + }, + { + "indexed": false, + "internalType": "bool", + "name": "active", + "type": "bool" + } + ], + "name": "FunctionRegistryChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldAccessControlManager", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAccessControlManager", + "type": "address" + } + ], + "name": "NewAccessControlManager", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "inputs": [], + "name": "XVSBridge", + "outputs": [ + { + "internalType": "contract IXVSProxyOFT", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "accessControlManager", + "outputs": [ + { + "internalType": "contract IAccessControlManagerV8", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "name": "functionRegistry", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "accessControlManager_", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "remoteChainId_", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "remoteAddress_", + "type": "bytes" + } + ], + "name": "isTrustedRemote", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pendingOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "accessControlManager_", + "type": "address" + } + ], + "name": "setAccessControlManager", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "remoteChainId_", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "remoteAddress_", + "type": "bytes" + } + ], + "name": "setTrustedRemoteAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner_", + "type": "address" + } + ], + "name": "transferBridgeOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string[]", + "name": "signatures_", + "type": "string[]" + }, + { + "internalType": "bool[]", + "name": "active_", + "type": "bool[]" + } + ], + "name": "upsertSignature", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "address", + "name": "admin_", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + } + ], + "transactionHash": "0x00847afebb038e883d2e493d8e0dd53315661a1378b772a9d0ad9b7800cf956d", + "receipt": { + "to": null, + "from": "0x638Eb8DFfF094Fd1d52c5A198b44984806C521E5", + "contractAddress": "0x649c35088bAd6847fF163B15d0e7A00943D7FD40", + "transactionIndex": 5, + "gasUsed": "921541", + "logsBloom": "0x00000000000000000000000200000000400000000000000400800000000000040000000000000000000000000000000000200000000000000000000000008000000000000000000000000000000002000001000000000000000000000000000000000000020000000000000000000840000000800000000000000000000000400000000000000000000000000000000000000000000080000000000010800000000000000000000000000000000400000000000000800000000000000000000000000022000000000000100000040000000000000400000000000000000020000000000000000000000000000000000000000800000000000000000000000000", + "blockHash": "0xf1a2ac69f9fbfc2157e069168b0ca9a46480549e21d7e5c709be3fb15589df7f", + "transactionHash": "0x00847afebb038e883d2e493d8e0dd53315661a1378b772a9d0ad9b7800cf956d", + "logs": [ + { + "transactionIndex": 5, + "blockNumber": 27104954, + "transactionHash": "0x00847afebb038e883d2e493d8e0dd53315661a1378b772a9d0ad9b7800cf956d", + "address": "0x649c35088bAd6847fF163B15d0e7A00943D7FD40", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x000000000000000000000000cacdfb7cba8b0f4b4f6c842f4d19b03ef1453235" + ], + "data": "0x", + "logIndex": 10, + "blockHash": "0xf1a2ac69f9fbfc2157e069168b0ca9a46480549e21d7e5c709be3fb15589df7f" + }, + { + "transactionIndex": 5, + "blockNumber": 27104954, + "transactionHash": "0x00847afebb038e883d2e493d8e0dd53315661a1378b772a9d0ad9b7800cf956d", + "address": "0x649c35088bAd6847fF163B15d0e7A00943D7FD40", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000638eb8dfff094fd1d52c5a198b44984806c521e5" + ], + "data": "0x", + "logIndex": 11, + "blockHash": "0xf1a2ac69f9fbfc2157e069168b0ca9a46480549e21d7e5c709be3fb15589df7f" + }, + { + "transactionIndex": 5, + "blockNumber": 27104954, + "transactionHash": "0x00847afebb038e883d2e493d8e0dd53315661a1378b772a9d0ad9b7800cf956d", + "address": "0x649c35088bAd6847fF163B15d0e7A00943D7FD40", + "topics": ["0x66fd58e82f7b31a2a5c30e0888f3093efe4e111b00cd2b0c31fe014601293aa0"], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a36ad96441cb931d8dfeaaac97d3fab4b39e590f", + "logIndex": 12, + "blockHash": "0xf1a2ac69f9fbfc2157e069168b0ca9a46480549e21d7e5c709be3fb15589df7f" + }, + { + "transactionIndex": 5, + "blockNumber": 27104954, + "transactionHash": "0x00847afebb038e883d2e493d8e0dd53315661a1378b772a9d0ad9b7800cf956d", + "address": "0x649c35088bAd6847fF163B15d0e7A00943D7FD40", + "topics": ["0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498"], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 13, + "blockHash": "0xf1a2ac69f9fbfc2157e069168b0ca9a46480549e21d7e5c709be3fb15589df7f" + }, + { + "transactionIndex": 5, + "blockNumber": 27104954, + "transactionHash": "0x00847afebb038e883d2e493d8e0dd53315661a1378b772a9d0ad9b7800cf956d", + "address": "0x649c35088bAd6847fF163B15d0e7A00943D7FD40", + "topics": ["0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f"], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a78a1df376c3ceebc5fab574fe6eddbbf76fd03e", + "logIndex": 14, + "blockHash": "0xf1a2ac69f9fbfc2157e069168b0ca9a46480549e21d7e5c709be3fb15589df7f" + } + ], + "blockNumber": 27104954, + "cumulativeGasUsed": "2395016", + "status": 1, + "byzantium": true + }, + "args": [ + "0xcAcDfB7Cba8B0f4b4f6C842f4d19b03EF1453235", + "0xA78A1Df376c3CEeBC5Fab574fe6EdDbbF76fd03e", + "0xc4d66de8000000000000000000000000a36ad96441cb931d8dfeaaac97d3fab4b39e590f" + ], + "numDeployments": 1, + "solcInputHash": "0e89febeebc7444140de8e67c9067d2c", + "metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"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\":[{\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"changeAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"implementation_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"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.\",\"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`\"},\"changeAdmin(address)\":{\"details\":\"Changes the admin of the proxy. Emits an {AdminChanged} event. NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\"},\"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\":{\"solc_0.8/openzeppelin/proxy/transparent/TransparentUpgradeableProxy.sol\":\"TransparentUpgradeableProxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[]},\"sources\":{\"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\"},\"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\"},\"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\"},\"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\"},\"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\"},\"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\",\"keccak256\":\"0x140055a64cf579d622e04f5a198595832bf2cb193cd0005f4f2d4d61ca906253\",\"license\":\"MIT\"},\"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\"},\"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\"}},\"version\":1}", + "bytecode": "0x6080604052604051620011b2380380620011b2833981016040819052620000269162000519565b82816200005560017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd620005f9565b6000805160206200116b833981519152146200007557620000756200061f565b6200008382826000620000e7565b50620000b3905060017fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6104620005f9565b6000805160206200114b83398151915214620000d357620000d36200061f565b620000de8262000124565b50505062000688565b620000f2836200017f565b600082511180620001005750805b156200011f576200011d8383620001c160201b620002ff1760201c565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6200014f620001f0565b604080516001600160a01b03928316815291841660208301520160405180910390a16200017c8162000229565b50565b6200018a81620002de565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6060620001e983836040518060600160405280602781526020016200118b6027913962000381565b9392505050565b60006200021a6000805160206200114b83398151915260001b6200046760201b620002731760201c565b546001600160a01b0316919050565b6001600160a01b038116620002945760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b80620002bd6000805160206200114b83398151915260001b6200046760201b620002731760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b620002f4816200046a60201b6200032b1760201c565b620003585760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016200028b565b80620002bd6000805160206200116b83398151915260001b6200046760201b620002731760201c565b60606001600160a01b0384163b620003eb5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016200028b565b600080856001600160a01b03168560405162000408919062000635565b600060405180830381855af49150503d806000811462000445576040519150601f19603f3d011682016040523d82523d6000602084013e6200044a565b606091505b5090925090506200045d82828662000479565b9695505050505050565b90565b6001600160a01b03163b151590565b606083156200048a575081620001e9565b8251156200049b5782518084602001fd5b8160405162461bcd60e51b81526004016200028b919062000653565b80516001600160a01b0381168114620004cf57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101562000507578181015183820152602001620004ed565b838111156200011d5750506000910152565b6000806000606084860312156200052f57600080fd5b6200053a84620004b7565b92506200054a60208501620004b7565b60408501519092506001600160401b03808211156200056857600080fd5b818601915086601f8301126200057d57600080fd5b815181811115620005925762000592620004d4565b604051601f8201601f19908116603f01168101908382118183101715620005bd57620005bd620004d4565b81604052828152896020848701011115620005d757600080fd5b620005ea836020830160208801620004ea565b80955050505050509250925092565b6000828210156200061a57634e487b7160e01b600052601160045260246000fd5b500390565b634e487b7160e01b600052600160045260246000fd5b6000825162000649818460208701620004ea565b9190910192915050565b602081526000825180602084015262000674816040850160208701620004ea565b601f01601f19169190910160400192915050565b610ab380620006986000396000f3fe60806040526004361061005e5760003560e01c80635c60da1b116100435780635c60da1b146100a85780638f283970146100e6578063f851a440146101065761006d565b80633659cfe6146100755780634f1ef286146100955761006d565b3661006d5761006b61011b565b005b61006b61011b565b34801561008157600080fd5b5061006b61009036600461091f565b610135565b61006b6100a336600461093a565b610196565b3480156100b457600080fd5b506100bd610221565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b3480156100f257600080fd5b5061006b61010136600461091f565b610276565b34801561011257600080fd5b506100bd6102ba565b610123610347565b61013361012e610435565b61043f565b565b61013d610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561018e5761018b816040518060200160405280600081525060006104a3565b50565b61018b61011b565b61019e610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415610219576102148383838080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250600192506104a3915050565b505050565b61021461011b565b600061022b610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561026b57610266610435565b905090565b61027361011b565b90565b61027e610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561018e5761018b816104ce565b60006102c4610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561026b57610266610463565b60606103248383604051806060016040528060278152602001610a576027913961052f565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b61034f610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415610133576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f7879207461726760648201527f6574000000000000000000000000000000000000000000000000000000000000608482015260a4015b60405180910390fd5b6000610266610657565b3660008037600080366000845af43d6000803e80801561045e573d6000f35b3d6000fd5b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b5473ffffffffffffffffffffffffffffffffffffffff16919050565b6104ac8361067f565b6000825111806104b95750805b15610214576104c883836102ff565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6104f7610463565b6040805173ffffffffffffffffffffffffffffffffffffffff928316815291841660208301520160405180910390a161018b816106cc565b606073ffffffffffffffffffffffffffffffffffffffff84163b6105d5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e74726163740000000000000000000000000000000000000000000000000000606482015260840161042c565b6000808573ffffffffffffffffffffffffffffffffffffffff16856040516105fd91906109e9565b600060405180830381855af49150503d8060008114610638576040519150601f19603f3d011682016040523d82523d6000602084013e61063d565b606091505b509150915061064d8282866107d8565b9695505050505050565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610487565b6106888161082b565b60405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b73ffffffffffffffffffffffffffffffffffffffff811661076f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161042c565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9290921691909117905550565b606083156107e7575081610324565b8251156107f75782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161042c9190610a05565b73ffffffffffffffffffffffffffffffffffffffff81163b6108cf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e747261637400000000000000000000000000000000000000606482015260840161042c565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610792565b803573ffffffffffffffffffffffffffffffffffffffff8116811461091a57600080fd5b919050565b60006020828403121561093157600080fd5b610324826108f6565b60008060006040848603121561094f57600080fd5b610958846108f6565b9250602084013567ffffffffffffffff8082111561097557600080fd5b818601915086601f83011261098957600080fd5b81358181111561099857600080fd5b8760208285010111156109aa57600080fd5b6020830194508093505050509250925092565b60005b838110156109d85781810151838201526020016109c0565b838111156104c85750506000910152565b600082516109fb8184602087016109bd565b9190910192915050565b6020815260008251806020840152610a248160408501602087016109bd565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220b29caa54336b3ee836679675e9732ec5e526fb3f803cca2fe336cc3555aba62264736f6c634300080a0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "deployedBytecode": "0x60806040526004361061005e5760003560e01c80635c60da1b116100435780635c60da1b146100a85780638f283970146100e6578063f851a440146101065761006d565b80633659cfe6146100755780634f1ef286146100955761006d565b3661006d5761006b61011b565b005b61006b61011b565b34801561008157600080fd5b5061006b61009036600461091f565b610135565b61006b6100a336600461093a565b610196565b3480156100b457600080fd5b506100bd610221565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b3480156100f257600080fd5b5061006b61010136600461091f565b610276565b34801561011257600080fd5b506100bd6102ba565b610123610347565b61013361012e610435565b61043f565b565b61013d610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561018e5761018b816040518060200160405280600081525060006104a3565b50565b61018b61011b565b61019e610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415610219576102148383838080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250600192506104a3915050565b505050565b61021461011b565b600061022b610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561026b57610266610435565b905090565b61027361011b565b90565b61027e610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561018e5761018b816104ce565b60006102c4610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561026b57610266610463565b60606103248383604051806060016040528060278152602001610a576027913961052f565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b61034f610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415610133576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f7879207461726760648201527f6574000000000000000000000000000000000000000000000000000000000000608482015260a4015b60405180910390fd5b6000610266610657565b3660008037600080366000845af43d6000803e80801561045e573d6000f35b3d6000fd5b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b5473ffffffffffffffffffffffffffffffffffffffff16919050565b6104ac8361067f565b6000825111806104b95750805b15610214576104c883836102ff565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6104f7610463565b6040805173ffffffffffffffffffffffffffffffffffffffff928316815291841660208301520160405180910390a161018b816106cc565b606073ffffffffffffffffffffffffffffffffffffffff84163b6105d5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e74726163740000000000000000000000000000000000000000000000000000606482015260840161042c565b6000808573ffffffffffffffffffffffffffffffffffffffff16856040516105fd91906109e9565b600060405180830381855af49150503d8060008114610638576040519150601f19603f3d011682016040523d82523d6000602084013e61063d565b606091505b509150915061064d8282866107d8565b9695505050505050565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610487565b6106888161082b565b60405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b73ffffffffffffffffffffffffffffffffffffffff811661076f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161042c565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9290921691909117905550565b606083156107e7575081610324565b8251156107f75782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161042c9190610a05565b73ffffffffffffffffffffffffffffffffffffffff81163b6108cf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e747261637400000000000000000000000000000000000000606482015260840161042c565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610792565b803573ffffffffffffffffffffffffffffffffffffffff8116811461091a57600080fd5b919050565b60006020828403121561093157600080fd5b610324826108f6565b60008060006040848603121561094f57600080fd5b610958846108f6565b9250602084013567ffffffffffffffff8082111561097557600080fd5b818601915086601f83011261098957600080fd5b81358181111561099857600080fd5b8760208285010111156109aa57600080fd5b6020830194508093505050509250925092565b60005b838110156109d85781810151838201526020016109c0565b838111156104c85750506000910152565b600082516109fb8184602087016109bd565b9190910192915050565b6020815260008251806020840152610a248160408501602087016109bd565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220b29caa54336b3ee836679675e9732ec5e526fb3f803cca2fe336cc3555aba62264736f6c634300080a0033", + "execute": { + "methodName": "initialize", + "args": ["0xa36AD96441cB931D8dFEAAaC97D3FaB4B39E590F"] + }, + "implementation": "0xcAcDfB7Cba8B0f4b4f6C842f4d19b03EF1453235", + "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.", + "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`" + }, + "changeAdmin(address)": { + "details": "Changes the admin of the proxy. Emits an {AdminChanged} event. NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}." + }, + "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/arbitrumsepolia/XVSBridgeAdmin_Implementation.json b/deployments/arbitrumsepolia/XVSBridgeAdmin_Implementation.json new file mode 100644 index 0000000..c1dea6e --- /dev/null +++ b/deployments/arbitrumsepolia/XVSBridgeAdmin_Implementation.json @@ -0,0 +1,629 @@ +{ + "address": "0xcAcDfB7Cba8B0f4b4f6C842f4d19b03EF1453235", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "XVSBridge_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "calledContract", + "type": "address" + }, + { + "internalType": "string", + "name": "methodSignature", + "type": "string" + } + ], + "name": "Unauthorized", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddressNotAllowed", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "signature", + "type": "string" + }, + { + "indexed": false, + "internalType": "bool", + "name": "active", + "type": "bool" + } + ], + "name": "FunctionRegistryChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldAccessControlManager", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAccessControlManager", + "type": "address" + } + ], + "name": "NewAccessControlManager", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "stateMutability": "nonpayable", + "type": "fallback" + }, + { + "inputs": [], + "name": "XVSBridge", + "outputs": [ + { + "internalType": "contract IXVSProxyOFT", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "accessControlManager", + "outputs": [ + { + "internalType": "contract IAccessControlManagerV8", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "name": "functionRegistry", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "accessControlManager_", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "remoteChainId_", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "remoteAddress_", + "type": "bytes" + } + ], + "name": "isTrustedRemote", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pendingOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "accessControlManager_", + "type": "address" + } + ], + "name": "setAccessControlManager", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "remoteChainId_", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "remoteAddress_", + "type": "bytes" + } + ], + "name": "setTrustedRemoteAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner_", + "type": "address" + } + ], + "name": "transferBridgeOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string[]", + "name": "signatures_", + "type": "string[]" + }, + { + "internalType": "bool[]", + "name": "active_", + "type": "bool[]" + } + ], + "name": "upsertSignature", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x06fc510c4442619cab163901c33cc571ee30189320559aac202a5a5ff9e1c360", + "receipt": { + "to": null, + "from": "0x638Eb8DFfF094Fd1d52c5A198b44984806C521E5", + "contractAddress": "0xcAcDfB7Cba8B0f4b4f6C842f4d19b03EF1453235", + "transactionIndex": 2, + "gasUsed": "1417014", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080010000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000", + "blockHash": "0xf9c24f53bccdd04a09907818d68da24ccbb3a427bb56392140102590267d2cc9", + "transactionHash": "0x06fc510c4442619cab163901c33cc571ee30189320559aac202a5a5ff9e1c360", + "logs": [ + { + "transactionIndex": 2, + "blockNumber": 27104932, + "transactionHash": "0x06fc510c4442619cab163901c33cc571ee30189320559aac202a5a5ff9e1c360", + "address": "0xcAcDfB7Cba8B0f4b4f6C842f4d19b03EF1453235", + "topics": ["0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498"], + "data": "0x00000000000000000000000000000000000000000000000000000000000000ff", + "logIndex": 3, + "blockHash": "0xf9c24f53bccdd04a09907818d68da24ccbb3a427bb56392140102590267d2cc9" + } + ], + "blockNumber": 27104932, + "cumulativeGasUsed": "2537511", + "status": 1, + "byzantium": true + }, + "args": ["0x8A5580d7154F9abb01836655b8594f94719b265C"], + "numDeployments": 1, + "solcInputHash": "f2046c3ab03975d1be43bca1cf657398", + "metadata": "{\"compiler\":{\"version\":\"0.8.13+commit.abaa5c0e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"XVSBridge_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"calledContract\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"methodSignature\",\"type\":\"string\"}],\"name\":\"Unauthorized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddressNotAllowed\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"signature\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"active\",\"type\":\"bool\"}],\"name\":\"FunctionRegistryChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldAccessControlManager\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAccessControlManager\",\"type\":\"address\"}],\"name\":\"NewAccessControlManager\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"stateMutability\":\"nonpayable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"XVSBridge\",\"outputs\":[{\"internalType\":\"contract IXVSProxyOFT\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"accessControlManager\",\"outputs\":[{\"internalType\":\"contract IAccessControlManagerV8\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"name\":\"functionRegistry\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"accessControlManager_\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"remoteChainId_\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"remoteAddress_\",\"type\":\"bytes\"}],\"name\":\"isTrustedRemote\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pendingOwner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"accessControlManager_\",\"type\":\"address\"}],\"name\":\"setAccessControlManager\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"remoteChainId_\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"remoteAddress_\",\"type\":\"bytes\"}],\"name\":\"setTrustedRemoteAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner_\",\"type\":\"address\"}],\"name\":\"transferBridgeOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string[]\",\"name\":\"signatures_\",\"type\":\"string[]\"},{\"internalType\":\"bool[]\",\"name\":\"active_\",\"type\":\"bool[]\"}],\"name\":\"upsertSignature\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Venus\",\"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 contract.\"}},\"isTrustedRemote(uint16,bytes)\":{\"custom:error\":\"ZeroAddressNotAllowed is thrown when remoteAddress_ contract address is zero.\",\"params\":{\"remoteAddress_\":\"Address of the destination bridge.\",\"remoteChainId_\":\"Chain Id of the destination chain.\"},\"returns\":{\"_0\":\"Bool indicating whether the remote chain is trusted or not.\"}},\"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:error\":\"ZeroAddressNotAllowed is thrown when remoteAddress_ contract address is zero.\",\"params\":{\"remoteAddress_\":\"Address of the destination bridge.\",\"remoteChainId_\":\"Chain Id of the destination chain.\"}},\"transferBridgeOwnership(address)\":{\"custom:access\":\"Controlled by AccessControlManager.\",\"params\":{\"newOwner_\":\"New owner of the XVS Bridge.\"}},\"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.\",\"custom:event\":\"Emits FunctionRegistryChanged if bool value of function changes.\",\"params\":{\"active_\":\"bool value, should be true to add function.\",\"signatures_\":\"Function signature to be added or removed.\"}}},\"stateVariables\":{\"XVSBridge\":{\"custom:oz-upgrades-unsafe-allow\":\"state-variable-immutable\"}},\"title\":\"XVSBridgeAdmin\",\"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\":\"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\":\"A mapping keeps track of function signature associated with function name string.\"},\"isTrustedRemote(uint16,bytes)\":{\"notice\":\"Returns true if remote address is trustedRemote corresponds to chainId_.\"},\"renounceOwnership()\":{\"notice\":\"Empty implementation of renounce ownership to avoid any mishappening.\"},\"setAccessControlManager(address)\":{\"notice\":\"Sets the address of AccessControlManager\"},\"setTrustedRemoteAddress(uint16,bytes)\":{\"notice\":\"Sets trusted remote on particular chain.\"},\"transferBridgeOwnership(address)\":{\"notice\":\"This function transfers the ownership of the bridge from this contract to new owner.\"},\"upsertSignature(string[],bool[])\":{\"notice\":\"A setter for the registry of functions that are allowed to be executed from proposals.\"}},\"notice\":\"The XVSBridgeAdmin contract extends a parent contract AccessControlledV8 for access control, and it manages an external contract called XVSProxyOFT. It maintains a registry of function signatures and names, allowing for dynamic function handling i.e checking of access control of interaction with only owner functions.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/Bridge/XVSBridgeAdmin.sol\":\"XVSBridgeAdmin\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.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() public virtual {\\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\":\"0x84efb8889801b0ac817324aff6acc691d07bbee816b671817132911d287a8c63\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.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. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby disabling 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\":\"0x4075622496acc77fd6d4de4cc30a8577a744d5c75afad33fdeacf1704d6eda98\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (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 * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\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\":\"0x89be10e757d242e9b18d5a32c9fbe2019f6d63052bbe46397a430a1d60d7f794\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.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 * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\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://consensys.net/diligence/blog/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.8.0/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(address target, bytes memory data, uint256 value) 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 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 (bool success, bytes memory returndata) = target.delegatecall(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\":\"0x9c80f545915582e63fe206c6ce27cbe85a86fc10b9cd2a0e8c9488fb7c2ee422\",\"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/governance-contracts/contracts/Governance/AccessControlledV8.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.13;\\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\":\"0x1b805a5d09990e2c4f7839afe7726a02f8452261eb3d0d488e24129ec0a7736d\",\"license\":\"BSD-3-Clause\"},\"@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV8.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.13;\\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\":\"0x8adbe291d659987faf4de606736227ad9d8e1a0e284a33a6ca12b30ab2a504b2\",\"license\":\"BSD-3-Clause\"},\"@venusprotocol/solidity-utilities/contracts/validators.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.13;\\n\\n/// @notice Thrown if the supplied address is a zero address where it is not allowed\\nerror ZeroAddressNotAllowed();\\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\",\"keccak256\":\"0x909eb76841ebd57d8f53686b76b1a09da7bbbbcddb29510c41674d5aa84c713e\",\"license\":\"BSD-3-Clause\"},\"contracts/Bridge/XVSBridgeAdmin.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\n\\npragma solidity 0.8.13;\\n\\nimport { AccessControlledV8 } from \\\"@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV8.sol\\\";\\nimport { ensureNonzeroAddress } from \\\"@venusprotocol/solidity-utilities/contracts/validators.sol\\\";\\nimport { IXVSProxyOFT } from \\\"./interfaces/IXVSProxyOFT.sol\\\";\\n\\n/**\\n * @title XVSBridgeAdmin\\n * @author Venus\\n * @notice The XVSBridgeAdmin contract extends a parent contract AccessControlledV8 for access control, and it manages an external contract called XVSProxyOFT.\\n * It maintains a registry of function signatures and names,\\n * allowing for dynamic function handling i.e checking of access control of interaction with only owner functions.\\n */\\ncontract XVSBridgeAdmin is AccessControlledV8 {\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n IXVSProxyOFT public immutable XVSBridge;\\n /**\\n * @notice A mapping keeps track of function signature associated with function name string.\\n */\\n mapping(bytes4 => string) public functionRegistry;\\n\\n /**\\n * @notice emitted when function registry updated\\n */\\n event FunctionRegistryChanged(string signature, bool active);\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor(address XVSBridge_) {\\n ensureNonzeroAddress(XVSBridge_);\\n XVSBridge = IXVSProxyOFT(XVSBridge_);\\n _disableInitializers();\\n }\\n\\n /**\\n * @param accessControlManager_ Address of access control manager contract.\\n */\\n function initialize(address accessControlManager_) external initializer {\\n __AccessControlled_init(accessControlManager_);\\n }\\n\\n /**\\n * @notice Invoked when called function does not exist in the contract.\\n * @return Response of low level call.\\n * @custom:access Controlled by AccessControlManager.\\n */\\n fallback(bytes calldata data) external returns (bytes memory) {\\n string memory fun = _getFunctionName(msg.sig);\\n require(bytes(fun).length != 0, \\\"Function not found\\\");\\n _checkAccessAllowed(fun);\\n (bool ok, bytes memory res) = address(XVSBridge).call(data);\\n require(ok, \\\"call failed\\\");\\n return res;\\n }\\n\\n /**\\n * @notice Sets trusted remote on particular chain.\\n * @param remoteChainId_ Chain Id of the destination chain.\\n * @param remoteAddress_ Address of the destination bridge.\\n * @custom:access Controlled by AccessControlManager.\\n * @custom:error ZeroAddressNotAllowed is thrown when remoteAddress_ contract address is zero.\\n */\\n function setTrustedRemoteAddress(uint16 remoteChainId_, bytes calldata remoteAddress_) external {\\n _checkAccessAllowed(\\\"setTrustedRemoteAddress(uint16,bytes)\\\");\\n require(remoteChainId_ != 0, \\\"ChainId must not be zero\\\");\\n ensureNonzeroAddress(bytesToAddress(remoteAddress_));\\n XVSBridge.setTrustedRemoteAddress(remoteChainId_, remoteAddress_);\\n }\\n\\n /**\\n * @notice A setter for the 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 * @custom:event Emits FunctionRegistryChanged if bool value of function changes.\\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; ) {\\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 unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /**\\n * @notice This function transfers the ownership of the bridge from this contract to new owner.\\n * @param newOwner_ New owner of the XVS Bridge.\\n * @custom:access Controlled by AccessControlManager.\\n */\\n function transferBridgeOwnership(address newOwner_) external {\\n _checkAccessAllowed(\\\"transferBridgeOwnership(address)\\\");\\n XVSBridge.transferOwnership(newOwner_);\\n }\\n\\n /**\\n * @notice Returns true if remote address is trustedRemote corresponds to chainId_.\\n * @param remoteChainId_ Chain Id of the destination chain.\\n * @param remoteAddress_ Address of the destination bridge.\\n * @custom:error ZeroAddressNotAllowed is thrown when remoteAddress_ contract address is zero.\\n * @return Bool indicating whether the remote chain is trusted or not.\\n */\\n function isTrustedRemote(uint16 remoteChainId_, bytes calldata remoteAddress_) external returns (bool) {\\n require(remoteChainId_ != 0, \\\"ChainId must not be zero\\\");\\n ensureNonzeroAddress(bytesToAddress(remoteAddress_));\\n return XVSBridge.isTrustedRemote(remoteChainId_, remoteAddress_);\\n }\\n\\n /**\\n * @notice Empty implementation of renounce ownership to avoid any mishappening.\\n */\\n function renounceOwnership() public override {}\\n\\n /**\\n * @dev Returns function name string associated with function signature.\\n * @param signature_ Four bytes of function signature.\\n * @return Function signature corresponding to its hash.\\n */\\n function _getFunctionName(bytes4 signature_) internal view returns (string memory) {\\n return functionRegistry[signature_];\\n }\\n\\n /**\\n * @notice Converts given bytes into address.\\n * @param b Bytes to be converted into address.\\n * @return Converted address of given bytes.\\n */\\n function bytesToAddress(bytes calldata b) private pure returns (address) {\\n return address(uint160(bytes20(b)));\\n }\\n}\\n\",\"keccak256\":\"0x3ba34b95f911e1772aca61e6daa00c4ebdb5bee61fc072ffba9e7ff3dc1262cd\",\"license\":\"BSD-3-Clause\"},\"contracts/Bridge/interfaces/IXVSProxyOFT.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.13;\\n\\n/**\\n * @title IXVSProxyOFT\\n * @author Venus\\n * @notice Interface implemented by `XVSProxyOFT`.\\n */\\ninterface IXVSProxyOFT {\\n function transferOwnership(address addr) external;\\n\\n function setTrustedRemoteAddress(uint16 remoteChainId, bytes calldata srcAddress) external;\\n\\n function isTrustedRemote(uint16 remoteChainId, bytes calldata srcAddress) external returns (bool);\\n}\\n\",\"keccak256\":\"0x854518f3e4c2270ca52184e63dc1f9d27f2893388216ee6153e6ab8cf2d7c960\",\"license\":\"BSD-3-Clause\"}},\"version\":1}", + "bytecode": "0x60a06040523480156200001157600080fd5b50604051620016ac380380620016ac833981016040819052620000349162000149565b6200003f816200005d565b6001600160a01b0381166080526200005662000088565b506200017b565b6001600160a01b03811662000085576040516342bcdf7f60e11b815260040160405180910390fd5b50565b600054610100900460ff1615620000f55760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff9081161462000147576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6000602082840312156200015c57600080fd5b81516001600160a01b03811681146200017457600080fd5b9392505050565b6080516114f9620001b3600039600081816101610152818161026c015281816105d6015281816106b70152610b2a01526114f96000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c806379ba50971161008c578063b4a0bdf311610066578063b4a0bdf31461031b578063c4d66de81461032c578063e30c39781461033f578063f2fde38b14610350576100ea565b806379ba5097146102ef5780638da5cb5b146102f7578063a6c3d16514610308576100ea565b80633d8b38f6116100c85780633d8b38f6146102a65780633f90b540146102c95780634bb7453e146102dc578063715018a61461023c576100ea565b80630e32cb8614610229578063180d295c1461023e57806327a020ef14610267575b600036606060006101066000356001600160e01b031916610363565b905080516000036101535760405162461bcd60e51b8152602060048201526012602482015271119d5b98dd1a5bdb881b9bdd08199bdd5b9960721b60448201526064015b60405180910390fd5b61015c81610410565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316868660405161019992919061106b565b6000604051808303816000865af19150503d80600081146101d6576040519150601f19603f3d011682016040523d82523d6000602084013e6101db565b606091505b50915091508161021b5760405162461bcd60e51b815260206004820152600b60248201526a18d85b1b0819985a5b195960aa1b604482015260640161014a565b805195506020019350505050f35b61023c61023736600461107b565b6104ae565b005b61025161024c3660046110ab565b6104c2565b60405161025e9190611122565b60405180910390f35b61028e7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161025e565b6102b96102b4366004611135565b61055c565b604051901515815260200161025e565b61023c6102d736600461107b565b61065a565b61023c6102ea36600461120d565b610716565b61023c610a1f565b6033546001600160a01b031661028e565b61023c610316366004611135565b610a96565b6097546001600160a01b031661028e565b61023c61033a36600461107b565b610b9a565b6065546001600160a01b031661028e565b61023c61035e36600461107b565b610cad565b6001600160e01b03198116600090815260c96020526040902080546060919061038b90611279565b80601f01602080910402602001604051908101604052809291908181526020018280546103b790611279565b80156104045780601f106103d957610100808354040283529160200191610404565b820191906000526020600020905b8154815290600101906020018083116103e757829003601f168201915b50505050509050919050565b6097546040516318c5e8ab60e01b81526000916001600160a01b0316906318c5e8ab9061044390339086906004016112b3565b602060405180830381865afa158015610460573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061048491906112e5565b9050806104aa57333083604051634a3fa29360e01b815260040161014a93929190611302565b5050565b6104b6610d1e565b6104bf81610d78565b50565b60c960205260009081526040902080546104db90611279565b80601f016020809104026020016040519081016040528092919081815260200182805461050790611279565b80156105545780601f1061052957610100808354040283529160200191610554565b820191906000526020600020905b81548152906001019060200180831161053757829003601f168201915b505050505081565b60008361ffff166000036105ad5760405162461bcd60e51b8152602060048201526018602482015277436861696e4964206d757374206e6f74206265207a65726f60401b604482015260640161014a565b6105bf6105ba8484610e36565b610e4c565b604051631ec59c7b60e11b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690633d8b38f69061060f90879087908790600401611360565b6020604051808303816000875af115801561062e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061065291906112e5565b949350505050565b6106986040518060400160405280602081526020017f7472616e736665724272696467654f776e657273686970286164647265737329815250610410565b60405163f2fde38b60e01b81526001600160a01b0382811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063f2fde38b90602401600060405180830381600087803b1580156106fb57600080fd5b505af115801561070f573d6000803e3d6000fd5b5050505050565b61071e610d1e565b8281811461077d5760405162461bcd60e51b815260206004820152602660248201527f496e70757420617272617973206d7573742068617665207468652073616d65206044820152650d8cadccee8d60d31b606482015260840161014a565b60005b81811015610a1557600086868381811061079c5761079c61137e565b90506020028101906107ae9190611394565b6040516107bc92919061106b565b60408051918290039091206001600160e01b03198116600090815260c96020529182208054919350906107ee90611279565b80601f016020809104026020016040519081016040528092919081815260200182805461081a90611279565b80156108675780601f1061083c57610100808354040283529160200191610867565b820191906000526020600020905b81548152906001019060200180831161084a57829003601f168201915b505050505090508585848181106108805761088061137e565b905060200201602081019061089591906113db565b80156108a057508051155b15610951578787848181106108b7576108b761137e565b90506020028101906108c99190611394565b6001600160e01b03198416600090815260c9602052604090206108ed929091610f9c565b507f9d424e54f4d851aabd288f6cc4946e5726d6b5c0e66ea4ef159a3c40bcc470fa8888858181106109215761092161137e565b90506020028101906109339190611394565b6001604051610944939291906113f8565b60405180910390a1610a0b565b8585848181106109635761096361137e565b905060200201602081019061097891906113db565b1580156109855750805115155b15610a0b576001600160e01b03198216600090815260c9602052604081206109ac91611020565b7f9d424e54f4d851aabd288f6cc4946e5726d6b5c0e66ea4ef159a3c40bcc470fa8888858181106109df576109df61137e565b90506020028101906109f19190611394565b6000604051610a02939291906113f8565b60405180910390a15b5050600101610780565b505050505050565b565b60655433906001600160a01b03168114610a8d5760405162461bcd60e51b815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f7420746865206044820152683732bb9037bbb732b960b91b606482015260840161014a565b6104bf81610e73565b610ab760405180606001604052806025815260200161149f60259139610410565b8261ffff16600003610b065760405162461bcd60e51b8152602060048201526018602482015277436861696e4964206d757374206e6f74206265207a65726f60401b604482015260640161014a565b610b136105ba8383610e36565b60405163a6c3d16560e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063a6c3d16590610b6390869086908690600401611360565b600060405180830381600087803b158015610b7d57600080fd5b505af1158015610b91573d6000803e3d6000fd5b50505050505050565b600054610100900460ff1615808015610bba5750600054600160ff909116105b80610bd45750303b158015610bd4575060005460ff166001145b610c375760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161014a565b6000805460ff191660011790558015610c5a576000805461ff0019166101001790555b610c6382610e8c565b80156104aa576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a15050565b610cb5610d1e565b606580546001600160a01b0383166001600160a01b03199091168117909155610ce66033546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b6033546001600160a01b03163314610a1d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161014a565b6001600160a01b038116610ddc5760405162461bcd60e51b815260206004820152602560248201527f696e76616c696420616365737320636f6e74726f6c206d616e61676572206164604482015264647265737360d81b606482015260840161014a565b609780546001600160a01b038381166001600160a01b031983168117909355604080519190921680825260208201939093527f66fd58e82f7b31a2a5c30e0888f3093efe4e111b00cd2b0c31fe014601293aa09101610ca1565b6000610e42828461141e565b60601c9392505050565b6001600160a01b0381166104bf576040516342bcdf7f60e11b815260040160405180910390fd5b606580546001600160a01b03191690556104bf81610ec4565b600054610100900460ff16610eb35760405162461bcd60e51b815260040161014a90611453565b610ebb610f16565b6104bf81610f45565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16610f3d5760405162461bcd60e51b815260040161014a90611453565b610a1d610f6c565b600054610100900460ff166104b65760405162461bcd60e51b815260040161014a90611453565b600054610100900460ff16610f935760405162461bcd60e51b815260040161014a90611453565b610a1d33610e73565b828054610fa890611279565b90600052602060002090601f016020900481019282610fca5760008555611010565b82601f10610fe35782800160ff19823516178555611010565b82800160010185558215611010579182015b82811115611010578235825591602001919060010190610ff5565b5061101c929150611056565b5090565b50805461102c90611279565b6000825580601f1061103c575050565b601f0160209004906000526020600020908101906104bf91905b5b8082111561101c5760008155600101611057565b8183823760009101908152919050565b60006020828403121561108d57600080fd5b81356001600160a01b03811681146110a457600080fd5b9392505050565b6000602082840312156110bd57600080fd5b81356001600160e01b0319811681146110a457600080fd5b6000815180845260005b818110156110fb576020818501810151868301820152016110df565b8181111561110d576000602083870101525b50601f01601f19169290920160200192915050565b6020815260006110a460208301846110d5565b60008060006040848603121561114a57600080fd5b833561ffff8116811461115c57600080fd5b9250602084013567ffffffffffffffff8082111561117957600080fd5b818601915086601f83011261118d57600080fd5b81358181111561119c57600080fd5b8760208285010111156111ae57600080fd5b6020830194508093505050509250925092565b60008083601f8401126111d357600080fd5b50813567ffffffffffffffff8111156111eb57600080fd5b6020830191508360208260051b850101111561120657600080fd5b9250929050565b6000806000806040858703121561122357600080fd5b843567ffffffffffffffff8082111561123b57600080fd5b611247888389016111c1565b9096509450602087013591508082111561126057600080fd5b5061126d878288016111c1565b95989497509550505050565b600181811c9082168061128d57607f821691505b6020821081036112ad57634e487b7160e01b600052602260045260246000fd5b50919050565b6001600160a01b0383168152604060208201819052600090610652908301846110d5565b80151581146104bf57600080fd5b6000602082840312156112f757600080fd5b81516110a4816112d7565b6001600160a01b0384811682528316602082015260606040820181905260009061132e908301846110d5565b95945050505050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b61ffff8416815260406020820152600061132e604083018486611337565b634e487b7160e01b600052603260045260246000fd5b6000808335601e198436030181126113ab57600080fd5b83018035915067ffffffffffffffff8211156113c657600080fd5b60200191503681900382131561120657600080fd5b6000602082840312156113ed57600080fd5b81356110a4816112d7565b60408152600061140c604083018587611337565b90508215156020830152949350505050565b6bffffffffffffffffffffffff19813581811691601485101561144b5780818660140360031b1b83161692505b505092915050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b60608201526080019056fe7365745472757374656452656d6f7465416464726573732875696e7431362c627974657329a2646970667358221220ac99e6bde2c9eb9bdd52a744515930950de54cf45081e77327e35b07ad11a96064736f6c634300080d0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100ea5760003560e01c806379ba50971161008c578063b4a0bdf311610066578063b4a0bdf31461031b578063c4d66de81461032c578063e30c39781461033f578063f2fde38b14610350576100ea565b806379ba5097146102ef5780638da5cb5b146102f7578063a6c3d16514610308576100ea565b80633d8b38f6116100c85780633d8b38f6146102a65780633f90b540146102c95780634bb7453e146102dc578063715018a61461023c576100ea565b80630e32cb8614610229578063180d295c1461023e57806327a020ef14610267575b600036606060006101066000356001600160e01b031916610363565b905080516000036101535760405162461bcd60e51b8152602060048201526012602482015271119d5b98dd1a5bdb881b9bdd08199bdd5b9960721b60448201526064015b60405180910390fd5b61015c81610410565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316868660405161019992919061106b565b6000604051808303816000865af19150503d80600081146101d6576040519150601f19603f3d011682016040523d82523d6000602084013e6101db565b606091505b50915091508161021b5760405162461bcd60e51b815260206004820152600b60248201526a18d85b1b0819985a5b195960aa1b604482015260640161014a565b805195506020019350505050f35b61023c61023736600461107b565b6104ae565b005b61025161024c3660046110ab565b6104c2565b60405161025e9190611122565b60405180910390f35b61028e7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161025e565b6102b96102b4366004611135565b61055c565b604051901515815260200161025e565b61023c6102d736600461107b565b61065a565b61023c6102ea36600461120d565b610716565b61023c610a1f565b6033546001600160a01b031661028e565b61023c610316366004611135565b610a96565b6097546001600160a01b031661028e565b61023c61033a36600461107b565b610b9a565b6065546001600160a01b031661028e565b61023c61035e36600461107b565b610cad565b6001600160e01b03198116600090815260c96020526040902080546060919061038b90611279565b80601f01602080910402602001604051908101604052809291908181526020018280546103b790611279565b80156104045780601f106103d957610100808354040283529160200191610404565b820191906000526020600020905b8154815290600101906020018083116103e757829003601f168201915b50505050509050919050565b6097546040516318c5e8ab60e01b81526000916001600160a01b0316906318c5e8ab9061044390339086906004016112b3565b602060405180830381865afa158015610460573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061048491906112e5565b9050806104aa57333083604051634a3fa29360e01b815260040161014a93929190611302565b5050565b6104b6610d1e565b6104bf81610d78565b50565b60c960205260009081526040902080546104db90611279565b80601f016020809104026020016040519081016040528092919081815260200182805461050790611279565b80156105545780601f1061052957610100808354040283529160200191610554565b820191906000526020600020905b81548152906001019060200180831161053757829003601f168201915b505050505081565b60008361ffff166000036105ad5760405162461bcd60e51b8152602060048201526018602482015277436861696e4964206d757374206e6f74206265207a65726f60401b604482015260640161014a565b6105bf6105ba8484610e36565b610e4c565b604051631ec59c7b60e11b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690633d8b38f69061060f90879087908790600401611360565b6020604051808303816000875af115801561062e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061065291906112e5565b949350505050565b6106986040518060400160405280602081526020017f7472616e736665724272696467654f776e657273686970286164647265737329815250610410565b60405163f2fde38b60e01b81526001600160a01b0382811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063f2fde38b90602401600060405180830381600087803b1580156106fb57600080fd5b505af115801561070f573d6000803e3d6000fd5b5050505050565b61071e610d1e565b8281811461077d5760405162461bcd60e51b815260206004820152602660248201527f496e70757420617272617973206d7573742068617665207468652073616d65206044820152650d8cadccee8d60d31b606482015260840161014a565b60005b81811015610a1557600086868381811061079c5761079c61137e565b90506020028101906107ae9190611394565b6040516107bc92919061106b565b60408051918290039091206001600160e01b03198116600090815260c96020529182208054919350906107ee90611279565b80601f016020809104026020016040519081016040528092919081815260200182805461081a90611279565b80156108675780601f1061083c57610100808354040283529160200191610867565b820191906000526020600020905b81548152906001019060200180831161084a57829003601f168201915b505050505090508585848181106108805761088061137e565b905060200201602081019061089591906113db565b80156108a057508051155b15610951578787848181106108b7576108b761137e565b90506020028101906108c99190611394565b6001600160e01b03198416600090815260c9602052604090206108ed929091610f9c565b507f9d424e54f4d851aabd288f6cc4946e5726d6b5c0e66ea4ef159a3c40bcc470fa8888858181106109215761092161137e565b90506020028101906109339190611394565b6001604051610944939291906113f8565b60405180910390a1610a0b565b8585848181106109635761096361137e565b905060200201602081019061097891906113db565b1580156109855750805115155b15610a0b576001600160e01b03198216600090815260c9602052604081206109ac91611020565b7f9d424e54f4d851aabd288f6cc4946e5726d6b5c0e66ea4ef159a3c40bcc470fa8888858181106109df576109df61137e565b90506020028101906109f19190611394565b6000604051610a02939291906113f8565b60405180910390a15b5050600101610780565b505050505050565b565b60655433906001600160a01b03168114610a8d5760405162461bcd60e51b815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f7420746865206044820152683732bb9037bbb732b960b91b606482015260840161014a565b6104bf81610e73565b610ab760405180606001604052806025815260200161149f60259139610410565b8261ffff16600003610b065760405162461bcd60e51b8152602060048201526018602482015277436861696e4964206d757374206e6f74206265207a65726f60401b604482015260640161014a565b610b136105ba8383610e36565b60405163a6c3d16560e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063a6c3d16590610b6390869086908690600401611360565b600060405180830381600087803b158015610b7d57600080fd5b505af1158015610b91573d6000803e3d6000fd5b50505050505050565b600054610100900460ff1615808015610bba5750600054600160ff909116105b80610bd45750303b158015610bd4575060005460ff166001145b610c375760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161014a565b6000805460ff191660011790558015610c5a576000805461ff0019166101001790555b610c6382610e8c565b80156104aa576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a15050565b610cb5610d1e565b606580546001600160a01b0383166001600160a01b03199091168117909155610ce66033546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b6033546001600160a01b03163314610a1d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161014a565b6001600160a01b038116610ddc5760405162461bcd60e51b815260206004820152602560248201527f696e76616c696420616365737320636f6e74726f6c206d616e61676572206164604482015264647265737360d81b606482015260840161014a565b609780546001600160a01b038381166001600160a01b031983168117909355604080519190921680825260208201939093527f66fd58e82f7b31a2a5c30e0888f3093efe4e111b00cd2b0c31fe014601293aa09101610ca1565b6000610e42828461141e565b60601c9392505050565b6001600160a01b0381166104bf576040516342bcdf7f60e11b815260040160405180910390fd5b606580546001600160a01b03191690556104bf81610ec4565b600054610100900460ff16610eb35760405162461bcd60e51b815260040161014a90611453565b610ebb610f16565b6104bf81610f45565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16610f3d5760405162461bcd60e51b815260040161014a90611453565b610a1d610f6c565b600054610100900460ff166104b65760405162461bcd60e51b815260040161014a90611453565b600054610100900460ff16610f935760405162461bcd60e51b815260040161014a90611453565b610a1d33610e73565b828054610fa890611279565b90600052602060002090601f016020900481019282610fca5760008555611010565b82601f10610fe35782800160ff19823516178555611010565b82800160010185558215611010579182015b82811115611010578235825591602001919060010190610ff5565b5061101c929150611056565b5090565b50805461102c90611279565b6000825580601f1061103c575050565b601f0160209004906000526020600020908101906104bf91905b5b8082111561101c5760008155600101611057565b8183823760009101908152919050565b60006020828403121561108d57600080fd5b81356001600160a01b03811681146110a457600080fd5b9392505050565b6000602082840312156110bd57600080fd5b81356001600160e01b0319811681146110a457600080fd5b6000815180845260005b818110156110fb576020818501810151868301820152016110df565b8181111561110d576000602083870101525b50601f01601f19169290920160200192915050565b6020815260006110a460208301846110d5565b60008060006040848603121561114a57600080fd5b833561ffff8116811461115c57600080fd5b9250602084013567ffffffffffffffff8082111561117957600080fd5b818601915086601f83011261118d57600080fd5b81358181111561119c57600080fd5b8760208285010111156111ae57600080fd5b6020830194508093505050509250925092565b60008083601f8401126111d357600080fd5b50813567ffffffffffffffff8111156111eb57600080fd5b6020830191508360208260051b850101111561120657600080fd5b9250929050565b6000806000806040858703121561122357600080fd5b843567ffffffffffffffff8082111561123b57600080fd5b611247888389016111c1565b9096509450602087013591508082111561126057600080fd5b5061126d878288016111c1565b95989497509550505050565b600181811c9082168061128d57607f821691505b6020821081036112ad57634e487b7160e01b600052602260045260246000fd5b50919050565b6001600160a01b0383168152604060208201819052600090610652908301846110d5565b80151581146104bf57600080fd5b6000602082840312156112f757600080fd5b81516110a4816112d7565b6001600160a01b0384811682528316602082015260606040820181905260009061132e908301846110d5565b95945050505050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b61ffff8416815260406020820152600061132e604083018486611337565b634e487b7160e01b600052603260045260246000fd5b6000808335601e198436030181126113ab57600080fd5b83018035915067ffffffffffffffff8211156113c657600080fd5b60200191503681900382131561120657600080fd5b6000602082840312156113ed57600080fd5b81356110a4816112d7565b60408152600061140c604083018587611337565b90508215156020830152949350505050565b6bffffffffffffffffffffffff19813581811691601485101561144b5780818660140360031b1b83161692505b505092915050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b60608201526080019056fe7365745472757374656452656d6f7465416464726573732875696e7431362c627974657329a2646970667358221220ac99e6bde2c9eb9bdd52a744515930950de54cf45081e77327e35b07ad11a96064736f6c634300080d0033", + "devdoc": { + "author": "Venus", + "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 contract." + } + }, + "isTrustedRemote(uint16,bytes)": { + "custom:error": "ZeroAddressNotAllowed is thrown when remoteAddress_ contract address is zero.", + "params": { + "remoteAddress_": "Address of the destination bridge.", + "remoteChainId_": "Chain Id of the destination chain." + }, + "returns": { + "_0": "Bool indicating whether the remote chain is trusted or not." + } + }, + "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:error": "ZeroAddressNotAllowed is thrown when remoteAddress_ contract address is zero.", + "params": { + "remoteAddress_": "Address of the destination bridge.", + "remoteChainId_": "Chain Id of the destination chain." + } + }, + "transferBridgeOwnership(address)": { + "custom:access": "Controlled by AccessControlManager.", + "params": { + "newOwner_": "New owner of the XVS Bridge." + } + }, + "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.", + "custom:event": "Emits FunctionRegistryChanged if bool value of function changes.", + "params": { + "active_": "bool value, should be true to add function.", + "signatures_": "Function signature to be added or removed." + } + } + }, + "stateVariables": { + "XVSBridge": { + "custom:oz-upgrades-unsafe-allow": "state-variable-immutable" + } + }, + "title": "XVSBridgeAdmin", + "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": "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": "A mapping keeps track of function signature associated with function name string." + }, + "isTrustedRemote(uint16,bytes)": { + "notice": "Returns true if remote address is trustedRemote corresponds to chainId_." + }, + "renounceOwnership()": { + "notice": "Empty implementation of renounce ownership to avoid any mishappening." + }, + "setAccessControlManager(address)": { + "notice": "Sets the address of AccessControlManager" + }, + "setTrustedRemoteAddress(uint16,bytes)": { + "notice": "Sets trusted remote on particular chain." + }, + "transferBridgeOwnership(address)": { + "notice": "This function transfers the ownership of the bridge from this contract to new owner." + }, + "upsertSignature(string[],bool[])": { + "notice": "A setter for the registry of functions that are allowed to be executed from proposals." + } + }, + "notice": "The XVSBridgeAdmin contract extends a parent contract AccessControlledV8 for access control, and it manages an external contract called XVSProxyOFT. It maintains a registry of function signatures and names, allowing for dynamic function handling i.e checking of access control of interaction with only owner functions.", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 4452, + "contract": "contracts/Bridge/XVSBridgeAdmin.sol:XVSBridgeAdmin", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8" + }, + { + "astId": 4455, + "contract": "contracts/Bridge/XVSBridgeAdmin.sol:XVSBridgeAdmin", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 4985, + "contract": "contracts/Bridge/XVSBridgeAdmin.sol:XVSBridgeAdmin", + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 4324, + "contract": "contracts/Bridge/XVSBridgeAdmin.sol:XVSBridgeAdmin", + "label": "_owner", + "offset": 0, + "slot": "51", + "type": "t_address" + }, + { + "astId": 4444, + "contract": "contracts/Bridge/XVSBridgeAdmin.sol:XVSBridgeAdmin", + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 4233, + "contract": "contracts/Bridge/XVSBridgeAdmin.sol:XVSBridgeAdmin", + "label": "_pendingOwner", + "offset": 0, + "slot": "101", + "type": "t_address" + }, + { + "astId": 4312, + "contract": "contracts/Bridge/XVSBridgeAdmin.sol:XVSBridgeAdmin", + "label": "__gap", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 8479, + "contract": "contracts/Bridge/XVSBridgeAdmin.sol:XVSBridgeAdmin", + "label": "_accessControlManager", + "offset": 0, + "slot": "151", + "type": "t_contract(IAccessControlManagerV8)8664" + }, + { + "astId": 8484, + "contract": "contracts/Bridge/XVSBridgeAdmin.sol:XVSBridgeAdmin", + "label": "__gap", + "offset": 0, + "slot": "152", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 10420, + "contract": "contracts/Bridge/XVSBridgeAdmin.sol:XVSBridgeAdmin", + "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)8664": { + "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/arbitrumsepolia/XVSBridgeAdmin_Proxy.json b/deployments/arbitrumsepolia/XVSBridgeAdmin_Proxy.json new file mode 100644 index 0000000..b962385 --- /dev/null +++ b/deployments/arbitrumsepolia/XVSBridgeAdmin_Proxy.json @@ -0,0 +1,267 @@ +{ + "address": "0x649c35088bAd6847fF163B15d0e7A00943D7FD40", + "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": [ + { + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "changeAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "implementation", + "outputs": [ + { + "internalType": "address", + "name": "implementation_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0x00847afebb038e883d2e493d8e0dd53315661a1378b772a9d0ad9b7800cf956d", + "receipt": { + "to": null, + "from": "0x638Eb8DFfF094Fd1d52c5A198b44984806C521E5", + "contractAddress": "0x649c35088bAd6847fF163B15d0e7A00943D7FD40", + "transactionIndex": 5, + "gasUsed": "921541", + "logsBloom": "0x00000000000000000000000200000000400000000000000400800000000000040000000000000000000000000000000000200000000000000000000000008000000000000000000000000000000002000001000000000000000000000000000000000000020000000000000000000840000000800000000000000000000000400000000000000000000000000000000000000000000080000000000010800000000000000000000000000000000400000000000000800000000000000000000000000022000000000000100000040000000000000400000000000000000020000000000000000000000000000000000000000800000000000000000000000000", + "blockHash": "0xf1a2ac69f9fbfc2157e069168b0ca9a46480549e21d7e5c709be3fb15589df7f", + "transactionHash": "0x00847afebb038e883d2e493d8e0dd53315661a1378b772a9d0ad9b7800cf956d", + "logs": [ + { + "transactionIndex": 5, + "blockNumber": 27104954, + "transactionHash": "0x00847afebb038e883d2e493d8e0dd53315661a1378b772a9d0ad9b7800cf956d", + "address": "0x649c35088bAd6847fF163B15d0e7A00943D7FD40", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x000000000000000000000000cacdfb7cba8b0f4b4f6c842f4d19b03ef1453235" + ], + "data": "0x", + "logIndex": 10, + "blockHash": "0xf1a2ac69f9fbfc2157e069168b0ca9a46480549e21d7e5c709be3fb15589df7f" + }, + { + "transactionIndex": 5, + "blockNumber": 27104954, + "transactionHash": "0x00847afebb038e883d2e493d8e0dd53315661a1378b772a9d0ad9b7800cf956d", + "address": "0x649c35088bAd6847fF163B15d0e7A00943D7FD40", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000638eb8dfff094fd1d52c5a198b44984806c521e5" + ], + "data": "0x", + "logIndex": 11, + "blockHash": "0xf1a2ac69f9fbfc2157e069168b0ca9a46480549e21d7e5c709be3fb15589df7f" + }, + { + "transactionIndex": 5, + "blockNumber": 27104954, + "transactionHash": "0x00847afebb038e883d2e493d8e0dd53315661a1378b772a9d0ad9b7800cf956d", + "address": "0x649c35088bAd6847fF163B15d0e7A00943D7FD40", + "topics": ["0x66fd58e82f7b31a2a5c30e0888f3093efe4e111b00cd2b0c31fe014601293aa0"], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a36ad96441cb931d8dfeaaac97d3fab4b39e590f", + "logIndex": 12, + "blockHash": "0xf1a2ac69f9fbfc2157e069168b0ca9a46480549e21d7e5c709be3fb15589df7f" + }, + { + "transactionIndex": 5, + "blockNumber": 27104954, + "transactionHash": "0x00847afebb038e883d2e493d8e0dd53315661a1378b772a9d0ad9b7800cf956d", + "address": "0x649c35088bAd6847fF163B15d0e7A00943D7FD40", + "topics": ["0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498"], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 13, + "blockHash": "0xf1a2ac69f9fbfc2157e069168b0ca9a46480549e21d7e5c709be3fb15589df7f" + }, + { + "transactionIndex": 5, + "blockNumber": 27104954, + "transactionHash": "0x00847afebb038e883d2e493d8e0dd53315661a1378b772a9d0ad9b7800cf956d", + "address": "0x649c35088bAd6847fF163B15d0e7A00943D7FD40", + "topics": ["0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f"], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a78a1df376c3ceebc5fab574fe6eddbbf76fd03e", + "logIndex": 14, + "blockHash": "0xf1a2ac69f9fbfc2157e069168b0ca9a46480549e21d7e5c709be3fb15589df7f" + } + ], + "blockNumber": 27104954, + "cumulativeGasUsed": "2395016", + "status": 1, + "byzantium": true + }, + "args": [ + "0xcAcDfB7Cba8B0f4b4f6C842f4d19b03EF1453235", + "0xA78A1Df376c3CEeBC5Fab574fe6EdDbbF76fd03e", + "0xc4d66de8000000000000000000000000a36ad96441cb931d8dfeaaac97d3fab4b39e590f" + ], + "numDeployments": 1, + "solcInputHash": "0e89febeebc7444140de8e67c9067d2c", + "metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"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\":[{\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"changeAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"implementation_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"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.\",\"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`\"},\"changeAdmin(address)\":{\"details\":\"Changes the admin of the proxy. Emits an {AdminChanged} event. NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\"},\"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\":{\"solc_0.8/openzeppelin/proxy/transparent/TransparentUpgradeableProxy.sol\":\"TransparentUpgradeableProxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[]},\"sources\":{\"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\"},\"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\"},\"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\"},\"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\"},\"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\"},\"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\",\"keccak256\":\"0x140055a64cf579d622e04f5a198595832bf2cb193cd0005f4f2d4d61ca906253\",\"license\":\"MIT\"},\"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\"},\"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\"}},\"version\":1}", + "bytecode": "0x6080604052604051620011b2380380620011b2833981016040819052620000269162000519565b82816200005560017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd620005f9565b6000805160206200116b833981519152146200007557620000756200061f565b6200008382826000620000e7565b50620000b3905060017fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6104620005f9565b6000805160206200114b83398151915214620000d357620000d36200061f565b620000de8262000124565b50505062000688565b620000f2836200017f565b600082511180620001005750805b156200011f576200011d8383620001c160201b620002ff1760201c565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6200014f620001f0565b604080516001600160a01b03928316815291841660208301520160405180910390a16200017c8162000229565b50565b6200018a81620002de565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6060620001e983836040518060600160405280602781526020016200118b6027913962000381565b9392505050565b60006200021a6000805160206200114b83398151915260001b6200046760201b620002731760201c565b546001600160a01b0316919050565b6001600160a01b038116620002945760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b80620002bd6000805160206200114b83398151915260001b6200046760201b620002731760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b620002f4816200046a60201b6200032b1760201c565b620003585760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016200028b565b80620002bd6000805160206200116b83398151915260001b6200046760201b620002731760201c565b60606001600160a01b0384163b620003eb5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016200028b565b600080856001600160a01b03168560405162000408919062000635565b600060405180830381855af49150503d806000811462000445576040519150601f19603f3d011682016040523d82523d6000602084013e6200044a565b606091505b5090925090506200045d82828662000479565b9695505050505050565b90565b6001600160a01b03163b151590565b606083156200048a575081620001e9565b8251156200049b5782518084602001fd5b8160405162461bcd60e51b81526004016200028b919062000653565b80516001600160a01b0381168114620004cf57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101562000507578181015183820152602001620004ed565b838111156200011d5750506000910152565b6000806000606084860312156200052f57600080fd5b6200053a84620004b7565b92506200054a60208501620004b7565b60408501519092506001600160401b03808211156200056857600080fd5b818601915086601f8301126200057d57600080fd5b815181811115620005925762000592620004d4565b604051601f8201601f19908116603f01168101908382118183101715620005bd57620005bd620004d4565b81604052828152896020848701011115620005d757600080fd5b620005ea836020830160208801620004ea565b80955050505050509250925092565b6000828210156200061a57634e487b7160e01b600052601160045260246000fd5b500390565b634e487b7160e01b600052600160045260246000fd5b6000825162000649818460208701620004ea565b9190910192915050565b602081526000825180602084015262000674816040850160208701620004ea565b601f01601f19169190910160400192915050565b610ab380620006986000396000f3fe60806040526004361061005e5760003560e01c80635c60da1b116100435780635c60da1b146100a85780638f283970146100e6578063f851a440146101065761006d565b80633659cfe6146100755780634f1ef286146100955761006d565b3661006d5761006b61011b565b005b61006b61011b565b34801561008157600080fd5b5061006b61009036600461091f565b610135565b61006b6100a336600461093a565b610196565b3480156100b457600080fd5b506100bd610221565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b3480156100f257600080fd5b5061006b61010136600461091f565b610276565b34801561011257600080fd5b506100bd6102ba565b610123610347565b61013361012e610435565b61043f565b565b61013d610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561018e5761018b816040518060200160405280600081525060006104a3565b50565b61018b61011b565b61019e610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415610219576102148383838080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250600192506104a3915050565b505050565b61021461011b565b600061022b610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561026b57610266610435565b905090565b61027361011b565b90565b61027e610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561018e5761018b816104ce565b60006102c4610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561026b57610266610463565b60606103248383604051806060016040528060278152602001610a576027913961052f565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b61034f610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415610133576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f7879207461726760648201527f6574000000000000000000000000000000000000000000000000000000000000608482015260a4015b60405180910390fd5b6000610266610657565b3660008037600080366000845af43d6000803e80801561045e573d6000f35b3d6000fd5b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b5473ffffffffffffffffffffffffffffffffffffffff16919050565b6104ac8361067f565b6000825111806104b95750805b15610214576104c883836102ff565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6104f7610463565b6040805173ffffffffffffffffffffffffffffffffffffffff928316815291841660208301520160405180910390a161018b816106cc565b606073ffffffffffffffffffffffffffffffffffffffff84163b6105d5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e74726163740000000000000000000000000000000000000000000000000000606482015260840161042c565b6000808573ffffffffffffffffffffffffffffffffffffffff16856040516105fd91906109e9565b600060405180830381855af49150503d8060008114610638576040519150601f19603f3d011682016040523d82523d6000602084013e61063d565b606091505b509150915061064d8282866107d8565b9695505050505050565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610487565b6106888161082b565b60405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b73ffffffffffffffffffffffffffffffffffffffff811661076f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161042c565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9290921691909117905550565b606083156107e7575081610324565b8251156107f75782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161042c9190610a05565b73ffffffffffffffffffffffffffffffffffffffff81163b6108cf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e747261637400000000000000000000000000000000000000606482015260840161042c565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610792565b803573ffffffffffffffffffffffffffffffffffffffff8116811461091a57600080fd5b919050565b60006020828403121561093157600080fd5b610324826108f6565b60008060006040848603121561094f57600080fd5b610958846108f6565b9250602084013567ffffffffffffffff8082111561097557600080fd5b818601915086601f83011261098957600080fd5b81358181111561099857600080fd5b8760208285010111156109aa57600080fd5b6020830194508093505050509250925092565b60005b838110156109d85781810151838201526020016109c0565b838111156104c85750506000910152565b600082516109fb8184602087016109bd565b9190910192915050565b6020815260008251806020840152610a248160408501602087016109bd565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220b29caa54336b3ee836679675e9732ec5e526fb3f803cca2fe336cc3555aba62264736f6c634300080a0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "deployedBytecode": "0x60806040526004361061005e5760003560e01c80635c60da1b116100435780635c60da1b146100a85780638f283970146100e6578063f851a440146101065761006d565b80633659cfe6146100755780634f1ef286146100955761006d565b3661006d5761006b61011b565b005b61006b61011b565b34801561008157600080fd5b5061006b61009036600461091f565b610135565b61006b6100a336600461093a565b610196565b3480156100b457600080fd5b506100bd610221565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b3480156100f257600080fd5b5061006b61010136600461091f565b610276565b34801561011257600080fd5b506100bd6102ba565b610123610347565b61013361012e610435565b61043f565b565b61013d610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561018e5761018b816040518060200160405280600081525060006104a3565b50565b61018b61011b565b61019e610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415610219576102148383838080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250600192506104a3915050565b505050565b61021461011b565b600061022b610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561026b57610266610435565b905090565b61027361011b565b90565b61027e610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561018e5761018b816104ce565b60006102c4610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561026b57610266610463565b60606103248383604051806060016040528060278152602001610a576027913961052f565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b61034f610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415610133576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f7879207461726760648201527f6574000000000000000000000000000000000000000000000000000000000000608482015260a4015b60405180910390fd5b6000610266610657565b3660008037600080366000845af43d6000803e80801561045e573d6000f35b3d6000fd5b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b5473ffffffffffffffffffffffffffffffffffffffff16919050565b6104ac8361067f565b6000825111806104b95750805b15610214576104c883836102ff565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6104f7610463565b6040805173ffffffffffffffffffffffffffffffffffffffff928316815291841660208301520160405180910390a161018b816106cc565b606073ffffffffffffffffffffffffffffffffffffffff84163b6105d5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e74726163740000000000000000000000000000000000000000000000000000606482015260840161042c565b6000808573ffffffffffffffffffffffffffffffffffffffff16856040516105fd91906109e9565b600060405180830381855af49150503d8060008114610638576040519150601f19603f3d011682016040523d82523d6000602084013e61063d565b606091505b509150915061064d8282866107d8565b9695505050505050565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610487565b6106888161082b565b60405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b73ffffffffffffffffffffffffffffffffffffffff811661076f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161042c565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9290921691909117905550565b606083156107e7575081610324565b8251156107f75782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161042c9190610a05565b73ffffffffffffffffffffffffffffffffffffffff81163b6108cf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e747261637400000000000000000000000000000000000000606482015260840161042c565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610792565b803573ffffffffffffffffffffffffffffffffffffffff8116811461091a57600080fd5b919050565b60006020828403121561093157600080fd5b610324826108f6565b60008060006040848603121561094f57600080fd5b610958846108f6565b9250602084013567ffffffffffffffff8082111561097557600080fd5b818601915086601f83011261098957600080fd5b81358181111561099857600080fd5b8760208285010111156109aa57600080fd5b6020830194508093505050509250925092565b60005b838110156109d85781810151838201526020016109c0565b838111156104c85750506000910152565b600082516109fb8184602087016109bd565b9190910192915050565b6020815260008251806020840152610a248160408501602087016109bd565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220b29caa54336b3ee836679675e9732ec5e526fb3f803cca2fe336cc3555aba62264736f6c634300080a0033", + "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.", + "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`" + }, + "changeAdmin(address)": { + "details": "Changes the admin of the proxy. Emits an {AdminChanged} event. NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}." + }, + "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/arbitrumsepolia/XVSProxyOFTDest.json b/deployments/arbitrumsepolia/XVSProxyOFTDest.json new file mode 100644 index 0000000..e5aa17e --- /dev/null +++ b/deployments/arbitrumsepolia/XVSProxyOFTDest.json @@ -0,0 +1,2518 @@ +{ + "address": "0x8A5580d7154F9abb01836655b8594f94719b265C", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "tokenAddress_", + "type": "address" + }, + { + "internalType": "uint8", + "name": "sharedDecimals_", + "type": "uint8" + }, + { + "internalType": "address", + "name": "lzEndpoint_", + "type": "address" + }, + { + "internalType": "address", + "name": "oracle_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "sweepAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + } + ], + "name": "InsufficientBalance", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddressNotAllowed", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "_nonce", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "_hash", + "type": "bytes32" + } + ], + "name": "CallOFTReceivedSuccess", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "srcChainId", + "type": "uint16" + }, + { + "indexed": true, + "internalType": "bytes", + "name": "srcAddress", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "nonce", + "type": "uint64" + } + ], + "name": "DropFailedMessage", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "innerToken", + "type": "address" + } + ], + "name": "InnerTokenAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "_nonce", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_payload", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_reason", + "type": "bytes" + } + ], + "name": "MessageFailed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "_address", + "type": "address" + } + ], + "name": "NonContractAddress", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldOracle", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOracle", + "type": "address" + } + ], + "name": "OracleChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "indexed": true, + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "ReceiveFromChain", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "_nonce", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "_payloadHash", + "type": "bytes32" + } + ], + "name": "RetryMessageSuccess", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "indexed": true, + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "_toAddress", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "SendToChain", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "chainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oldMaxLimit", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newMaxLimit", + "type": "uint256" + } + ], + "name": "SetMaxDailyLimit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "chainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oldMaxLimit", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newMaxLimit", + "type": "uint256" + } + ], + "name": "SetMaxDailyReceiveLimit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "chainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oldMaxLimit", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newMaxLimit", + "type": "uint256" + } + ], + "name": "SetMaxSingleReceiveTransactionLimit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "chainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oldMaxLimit", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newMaxLimit", + "type": "uint256" + } + ], + "name": "SetMaxSingleTransactionLimit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "uint16", + "name": "_type", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_minDstGas", + "type": "uint256" + } + ], + "name": "SetMinDstGas", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "precrime", + "type": "address" + } + ], + "name": "SetPrecrime", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "_remoteChainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_path", + "type": "bytes" + } + ], + "name": "SetTrustedRemote", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "_remoteChainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_remoteAddress", + "type": "bytes" + } + ], + "name": "SetTrustedRemoteAddress", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "addr", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "isWhitelist", + "type": "bool" + } + ], + "name": "SetWhitelist", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "sweepAmount", + "type": "uint256" + } + ], + "name": "SweepToken", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "chainId", + "type": "uint16" + } + ], + "name": "TrustedRemoteRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bool", + "name": "enabled", + "type": "bool" + } + ], + "name": "UpdateSendAndCallEnabled", + "type": "event" + }, + { + "inputs": [], + "name": "DEFAULT_PAYLOAD_SIZE_LIMIT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "NO_EXTRA_GAS", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PT_SEND", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PT_SEND_AND_CALL", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "_nonce", + "type": "uint64" + }, + { + "internalType": "bytes32", + "name": "_from", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "_payload", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "_gasForCall", + "type": "uint256" + } + ], + "name": "callOnOFTReceived", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "chainIdToLast24HourReceiveWindowStart", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "chainIdToLast24HourReceived", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "chainIdToLast24HourTransferred", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "chainIdToLast24HourWindowStart", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "chainIdToMaxDailyLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "chainIdToMaxDailyReceiveLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "chainIdToMaxSingleReceiveTransactionLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "chainIdToMaxSingleTransactionLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "circulatingSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "name": "creditedPackets", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "srcChainId_", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "srcAddress_", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "nonce_", + "type": "uint64" + } + ], + "name": "dropFailedMessage", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "internalType": "bytes32", + "name": "_toAddress", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "_payload", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "_dstGasForCall", + "type": "uint64" + }, + { + "internalType": "bool", + "name": "_useZro", + "type": "bool" + }, + { + "internalType": "bytes", + "name": "_adapterParams", + "type": "bytes" + } + ], + "name": "estimateSendAndCallFee", + "outputs": [ + { + "internalType": "uint256", + "name": "nativeFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "zroFee", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "internalType": "bytes32", + "name": "_toAddress", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "_useZro", + "type": "bool" + }, + { + "internalType": "bytes", + "name": "_adapterParams", + "type": "bytes" + } + ], + "name": "estimateSendFee", + "outputs": [ + { + "internalType": "uint256", + "name": "nativeFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "zroFee", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "name": "failedMessages", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + } + ], + "name": "forceResumeReceive", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_version", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "_chainId", + "type": "uint16" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_configType", + "type": "uint256" + } + ], + "name": "getConfig", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_remoteChainId", + "type": "uint16" + } + ], + "name": "getTrustedRemoteAddress", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from_", + "type": "address" + }, + { + "internalType": "uint16", + "name": "dstChainId_", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "amount_", + "type": "uint256" + } + ], + "name": "isEligibleToSend", + "outputs": [ + { + "internalType": "bool", + "name": "eligibleToSend", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "maxSingleTransactionLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxDailyLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountInUsd", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "transferredInWindow", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "last24HourWindowStart", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "isWhiteListedUser", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + } + ], + "name": "isTrustedRemote", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "lzEndpoint", + "outputs": [ + { + "internalType": "contract ILayerZeroEndpoint", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "_nonce", + "type": "uint64" + }, + { + "internalType": "bytes", + "name": "_payload", + "type": "bytes" + } + ], + "name": "lzReceive", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "minDstGasLookup", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "_nonce", + "type": "uint64" + }, + { + "internalType": "bytes", + "name": "_payload", + "type": "bytes" + } + ], + "name": "nonblockingLzReceive", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "oracle", + "outputs": [ + { + "internalType": "contract ResilientOracleInterface", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "payloadSizeLimitLookup", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "precrime", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "remoteChainId_", + "type": "uint16" + } + ], + "name": "removeTrustedRemote", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "_nonce", + "type": "uint64" + }, + { + "internalType": "bytes", + "name": "_payload", + "type": "bytes" + } + ], + "name": "retryMessage", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from_", + "type": "address" + }, + { + "internalType": "uint16", + "name": "dstChainId_", + "type": "uint16" + }, + { + "internalType": "bytes32", + "name": "toAddress_", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "amount_", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "payload_", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "dstGasForCall_", + "type": "uint64" + }, + { + "components": [ + { + "internalType": "address payable", + "name": "refundAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "zroPaymentAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "adapterParams", + "type": "bytes" + } + ], + "internalType": "struct ICommonOFT.LzCallParams", + "name": "callparams_", + "type": "tuple" + } + ], + "name": "sendAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "sendAndCallEnabled", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "internalType": "bytes32", + "name": "_toAddress", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address payable", + "name": "refundAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "zroPaymentAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "adapterParams", + "type": "bytes" + } + ], + "internalType": "struct ICommonOFT.LzCallParams", + "name": "_callParams", + "type": "tuple" + } + ], + "name": "sendFrom", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_version", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "_chainId", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "_configType", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "_config", + "type": "bytes" + } + ], + "name": "setConfig", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "chainId_", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "limit_", + "type": "uint256" + } + ], + "name": "setMaxDailyLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "chainId_", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "limit_", + "type": "uint256" + } + ], + "name": "setMaxDailyReceiveLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "chainId_", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "limit_", + "type": "uint256" + } + ], + "name": "setMaxSingleReceiveTransactionLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "chainId_", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "limit_", + "type": "uint256" + } + ], + "name": "setMaxSingleTransactionLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "_packetType", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "_minGas", + "type": "uint256" + } + ], + "name": "setMinDstGas", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "oracleAddress_", + "type": "address" + } + ], + "name": "setOracle", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "_size", + "type": "uint256" + } + ], + "name": "setPayloadSizeLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_precrime", + "type": "address" + } + ], + "name": "setPrecrime", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_version", + "type": "uint16" + } + ], + "name": "setReceiveVersion", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_version", + "type": "uint16" + } + ], + "name": "setSendVersion", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_remoteChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_path", + "type": "bytes" + } + ], + "name": "setTrustedRemote", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_remoteChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_remoteAddress", + "type": "bytes" + } + ], + "name": "setTrustedRemoteAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user_", + "type": "address" + }, + { + "internalType": "bool", + "name": "val_", + "type": "bool" + } + ], + "name": "setWhitelist", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "sharedDecimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "token_", + "type": "address" + }, + { + "internalType": "address", + "name": "to_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount_", + "type": "uint256" + } + ], + "name": "sweepToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "token", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "trustedRemoteLookup", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "enabled_", + "type": "bool" + } + ], + "name": "updateSendAndCallEnabled", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "whitelist", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0xd869f101af2cabc5dea707d49d25380f2e44a9c0988d31d2c9c8662e57151aec", + "receipt": { + "to": null, + "from": "0x638Eb8DFfF094Fd1d52c5A198b44984806C521E5", + "contractAddress": "0x8A5580d7154F9abb01836655b8594f94719b265C", + "transactionIndex": 1, + "gasUsed": "5402923", + "logsBloom": "0x00000000000000000000000200000000000000000004000400800000000000040000000000000000000010000000000008000000000000000000200000000000000000000000000000080000000000000001000020000000000000800000010000000000020000000000000000000800020000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080400000000000000000000000100000000000000010000000040000000000000000000000000000000000000000000000000000000000000000000000000020000000800000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xc9c8255102fae4cb8d12714da1ce03075589b611e50e66ba942e21e005af76b7", + "transactionHash": "0xd869f101af2cabc5dea707d49d25380f2e44a9c0988d31d2c9c8662e57151aec", + "logs": [ + { + "transactionIndex": 1, + "blockNumber": 27104908, + "transactionHash": "0xd869f101af2cabc5dea707d49d25380f2e44a9c0988d31d2c9c8662e57151aec", + "address": "0x8A5580d7154F9abb01836655b8594f94719b265C", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000638eb8dfff094fd1d52c5a198b44984806c521e5" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0xc9c8255102fae4cb8d12714da1ce03075589b611e50e66ba942e21e005af76b7" + }, + { + "transactionIndex": 1, + "blockNumber": 27104908, + "transactionHash": "0xd869f101af2cabc5dea707d49d25380f2e44a9c0988d31d2c9c8662e57151aec", + "address": "0x8A5580d7154F9abb01836655b8594f94719b265C", + "topics": [ + "0x0b673f021ff9a27bbe58f282908695869e130b3103029190387b83650806c2c3", + "0x0000000000000000000000008f377098e488d227e809bd56d30c9fd8388245d3" + ], + "data": "0x", + "logIndex": 1, + "blockHash": "0xc9c8255102fae4cb8d12714da1ce03075589b611e50e66ba942e21e005af76b7" + }, + { + "transactionIndex": 1, + "blockNumber": 27104908, + "transactionHash": "0xd869f101af2cabc5dea707d49d25380f2e44a9c0988d31d2c9c8662e57151aec", + "address": "0x8A5580d7154F9abb01836655b8594f94719b265C", + "topics": [ + "0x05cd89403c6bdeac21c2ff33de395121a31fa1bc2bf3adf4825f1f86e79969dd", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000006708bad042916b47311c8078b29d7f432342102f" + ], + "data": "0x", + "logIndex": 2, + "blockHash": "0xc9c8255102fae4cb8d12714da1ce03075589b611e50e66ba942e21e005af76b7" + } + ], + "blockNumber": 27104908, + "cumulativeGasUsed": "5402923", + "status": 1, + "byzantium": true + }, + "args": [ + "0x8f377098e488D227e809BD56D30C9Fd8388245D3", + 8, + "0x6098e96a28E02f27B1e6BD381f870F1C8Bd169d3", + "0x6708bAd042916B47311c8078b29d7f432342102F" + ], + "numDeployments": 1, + "solcInputHash": "f2046c3ab03975d1be43bca1cf657398", + "metadata": "{\"compiler\":{\"version\":\"0.8.13+commit.abaa5c0e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress_\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"sharedDecimals_\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"lzEndpoint_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"oracle_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"sweepAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"balance\",\"type\":\"uint256\"}],\"name\":\"InsufficientBalance\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddressNotAllowed\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_nonce\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_hash\",\"type\":\"bytes32\"}],\"name\":\"CallOFTReceivedSuccess\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"srcChainId\",\"type\":\"uint16\"},{\"indexed\":true,\"internalType\":\"bytes\",\"name\":\"srcAddress\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"nonce\",\"type\":\"uint64\"}],\"name\":\"DropFailedMessage\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"innerToken\",\"type\":\"address\"}],\"name\":\"InnerTokenAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_nonce\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_payload\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_reason\",\"type\":\"bytes\"}],\"name\":\"MessageFailed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"NonContractAddress\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"oldOracle\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOracle\",\"type\":\"address\"}],\"name\":\"OracleChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"ReceiveFromChain\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_nonce\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_payloadHash\",\"type\":\"bytes32\"}],\"name\":\"RetryMessageSuccess\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"_toAddress\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"SendToChain\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"chainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldMaxLimit\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newMaxLimit\",\"type\":\"uint256\"}],\"name\":\"SetMaxDailyLimit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"chainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldMaxLimit\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newMaxLimit\",\"type\":\"uint256\"}],\"name\":\"SetMaxDailyReceiveLimit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"chainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldMaxLimit\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newMaxLimit\",\"type\":\"uint256\"}],\"name\":\"SetMaxSingleReceiveTransactionLimit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"chainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldMaxLimit\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newMaxLimit\",\"type\":\"uint256\"}],\"name\":\"SetMaxSingleTransactionLimit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"_type\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_minDstGas\",\"type\":\"uint256\"}],\"name\":\"SetMinDstGas\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"precrime\",\"type\":\"address\"}],\"name\":\"SetPrecrime\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"_remoteChainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_path\",\"type\":\"bytes\"}],\"name\":\"SetTrustedRemote\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"_remoteChainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_remoteAddress\",\"type\":\"bytes\"}],\"name\":\"SetTrustedRemoteAddress\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"isWhitelist\",\"type\":\"bool\"}],\"name\":\"SetWhitelist\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"sweepAmount\",\"type\":\"uint256\"}],\"name\":\"SweepToken\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"chainId\",\"type\":\"uint16\"}],\"name\":\"TrustedRemoteRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bool\",\"name\":\"enabled\",\"type\":\"bool\"}],\"name\":\"UpdateSendAndCallEnabled\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_PAYLOAD_SIZE_LIMIT\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"NO_EXTRA_GAS\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PT_SEND\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PT_SEND_AND_CALL\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"_nonce\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"_from\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_payload\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"_gasForCall\",\"type\":\"uint256\"}],\"name\":\"callOnOFTReceived\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"chainIdToLast24HourReceiveWindowStart\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"chainIdToLast24HourReceived\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"chainIdToLast24HourTransferred\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"chainIdToLast24HourWindowStart\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"chainIdToMaxDailyLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"chainIdToMaxDailyReceiveLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"chainIdToMaxSingleReceiveTransactionLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"chainIdToMaxSingleTransactionLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"circulatingSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"name\":\"creditedPackets\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"srcChainId_\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"srcAddress_\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"nonce_\",\"type\":\"uint64\"}],\"name\":\"dropFailedMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes32\",\"name\":\"_toAddress\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_payload\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"_dstGasForCall\",\"type\":\"uint64\"},{\"internalType\":\"bool\",\"name\":\"_useZro\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"_adapterParams\",\"type\":\"bytes\"}],\"name\":\"estimateSendAndCallFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"nativeFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"zroFee\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes32\",\"name\":\"_toAddress\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"_useZro\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"_adapterParams\",\"type\":\"bytes\"}],\"name\":\"estimateSendFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"nativeFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"zroFee\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"name\":\"failedMessages\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"}],\"name\":\"forceResumeReceive\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_version\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"_chainId\",\"type\":\"uint16\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_configType\",\"type\":\"uint256\"}],\"name\":\"getConfig\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_remoteChainId\",\"type\":\"uint16\"}],\"name\":\"getTrustedRemoteAddress\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from_\",\"type\":\"address\"},{\"internalType\":\"uint16\",\"name\":\"dstChainId_\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"amount_\",\"type\":\"uint256\"}],\"name\":\"isEligibleToSend\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"eligibleToSend\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"maxSingleTransactionLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxDailyLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountInUsd\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"transferredInWindow\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"last24HourWindowStart\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"isWhiteListedUser\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"}],\"name\":\"isTrustedRemote\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lzEndpoint\",\"outputs\":[{\"internalType\":\"contract ILayerZeroEndpoint\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"_nonce\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"_payload\",\"type\":\"bytes\"}],\"name\":\"lzReceive\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"minDstGasLookup\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"_nonce\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"_payload\",\"type\":\"bytes\"}],\"name\":\"nonblockingLzReceive\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"oracle\",\"outputs\":[{\"internalType\":\"contract ResilientOracleInterface\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"payloadSizeLimitLookup\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"precrime\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"remoteChainId_\",\"type\":\"uint16\"}],\"name\":\"removeTrustedRemote\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"_nonce\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"_payload\",\"type\":\"bytes\"}],\"name\":\"retryMessage\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from_\",\"type\":\"address\"},{\"internalType\":\"uint16\",\"name\":\"dstChainId_\",\"type\":\"uint16\"},{\"internalType\":\"bytes32\",\"name\":\"toAddress_\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"amount_\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"payload_\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"dstGasForCall_\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"address payable\",\"name\":\"refundAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"zroPaymentAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"adapterParams\",\"type\":\"bytes\"}],\"internalType\":\"struct ICommonOFT.LzCallParams\",\"name\":\"callparams_\",\"type\":\"tuple\"}],\"name\":\"sendAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sendAndCallEnabled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes32\",\"name\":\"_toAddress\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"address payable\",\"name\":\"refundAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"zroPaymentAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"adapterParams\",\"type\":\"bytes\"}],\"internalType\":\"struct ICommonOFT.LzCallParams\",\"name\":\"_callParams\",\"type\":\"tuple\"}],\"name\":\"sendFrom\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_version\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"_chainId\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"_configType\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_config\",\"type\":\"bytes\"}],\"name\":\"setConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"chainId_\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"limit_\",\"type\":\"uint256\"}],\"name\":\"setMaxDailyLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"chainId_\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"limit_\",\"type\":\"uint256\"}],\"name\":\"setMaxDailyReceiveLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"chainId_\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"limit_\",\"type\":\"uint256\"}],\"name\":\"setMaxSingleReceiveTransactionLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"chainId_\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"limit_\",\"type\":\"uint256\"}],\"name\":\"setMaxSingleTransactionLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"_packetType\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"_minGas\",\"type\":\"uint256\"}],\"name\":\"setMinDstGas\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"oracleAddress_\",\"type\":\"address\"}],\"name\":\"setOracle\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"_size\",\"type\":\"uint256\"}],\"name\":\"setPayloadSizeLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_precrime\",\"type\":\"address\"}],\"name\":\"setPrecrime\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_version\",\"type\":\"uint16\"}],\"name\":\"setReceiveVersion\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_version\",\"type\":\"uint16\"}],\"name\":\"setSendVersion\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_remoteChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_path\",\"type\":\"bytes\"}],\"name\":\"setTrustedRemote\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_remoteChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_remoteAddress\",\"type\":\"bytes\"}],\"name\":\"setTrustedRemoteAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user_\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"val_\",\"type\":\"bool\"}],\"name\":\"setWhitelist\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sharedDecimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"token_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to_\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount_\",\"type\":\"uint256\"}],\"name\":\"sweepToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"token\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"trustedRemoteLookup\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"enabled_\",\"type\":\"bool\"}],\"name\":\"updateSendAndCallEnabled\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"whitelist\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Venus\",\"kind\":\"dev\",\"methods\":{\"circulatingSupply()\":{\"returns\":{\"_0\":\"total circulating supply of the token on the destination chain.\"}},\"dropFailedMessage(uint16,bytes,uint64)\":{\"custom:access\":\"Only owner\",\"custom:event\":\"Emits DropFailedMessage on clearance of failed message.\",\"params\":{\"nonce_\":\"Nonce_ of the transaction\",\"srcAddress_\":\"Address of source followed by current bridge address\",\"srcChainId_\":\"Chain id of source\"}},\"estimateSendFee(uint16,bytes32,uint256,bool,bytes)\":{\"details\":\"estimate send token `_tokenId` to (`_dstChainId`, `_toAddress`) _dstChainId - L0 defined chain id to send tokens too _toAddress - dynamic bytes array which contains the address to whom you are sending tokens to on the dstChain _amount - amount of the tokens to transfer _useZro - indicates to use zro to pay L0 fees _adapterParam - flexible bytes array to indicate messaging adapter services in L0\"},\"isEligibleToSend(address,uint16,uint256)\":{\"details\":\"This external view function assesses whether the specified sender is eligible to transfer the given amount to the specified destination chain. It considers factors such as whitelisting, transaction limits, and a 24-hour window.\",\"params\":{\"amount_\":\"The quantity of tokens to be transferred.\",\"dstChainId_\":\"Indicates destination chain.\",\"from_\":\"The sender's address initiating the transfer.\"},\"returns\":{\"amountInUsd\":\"The equivalent amount in USD based on the oracle price.\",\"eligibleToSend\":\"A boolean indicating whether the sender is eligible to transfer the tokens.\",\"isWhiteListedUser\":\"A boolean indicating whether the sender is whitelisted.\",\"last24HourWindowStart\":\"The timestamp when the current 24-hour window started.\",\"maxDailyLimit\":\"The maximum daily limit for transactions.\",\"maxSingleTransactionLimit\":\"The maximum limit for a single transaction.\",\"transferredInWindow\":\"The total amount transferred in the current 24-hour window.\"}},\"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.\"},\"removeTrustedRemote(uint16)\":{\"custom:access\":\"Only owner.\",\"custom:event\":\"Emits TrustedRemoteRemoved once chain id is removed from trusted remote.\",\"params\":{\"remoteChainId_\":\"The chain's id corresponds to setting the trusted remote to empty.\"}},\"sendAndCall(address,uint16,bytes32,uint256,bytes,uint64,(address,address,bytes))\":{\"details\":\"This internal override function enables the contract to send tokens and invoke calls on the specified destination chain. It checks whether the sendAndCall feature is enabled before proceeding with the transfer.\",\"params\":{\"amount_\":\"Amount of tokens that will be transferred.\",\"callparams_\":\"Additional parameters, including refund address, ZRO payment address, and adapter params.\",\"dstChainId_\":\"Destination chain id on which tokens will be send.\",\"dstGasForCall_\":\"The amount of gas allocated for the call on the destination chain.\",\"from_\":\"Address from which tokens will be debited.\",\"payload_\":\"Additional data payload for the call on the destination chain.\",\"toAddress_\":\"Address on which tokens will be credited on destination chain.\"}},\"sendFrom(address,uint16,bytes32,uint256,(address,address,bytes))\":{\"details\":\"send `_amount` amount of token to (`_dstChainId`, `_toAddress`) from `_from` `_from` the owner of token `_dstChainId` the destination chain identifier `_toAddress` can be any size depending on the `dstChainId`. `_amount` the quantity of tokens in wei `_refundAddress` the address LayerZero refunds if too much message fee is sent `_zroPaymentAddress` set to address(0x0) if not paying in ZRO (LayerZero Token) `_adapterParams` is a flexible bytes array to indicate messaging adapter services\"},\"setMaxDailyLimit(uint16,uint256)\":{\"custom:access\":\"Only owner.\",\"custom:event\":\"Emits setMaxDailyLimit with old and new limit associated with chain id.\",\"params\":{\"chainId_\":\"Destination chain id.\",\"limit_\":\"Amount in USD(scaled with 18 decimals).\"}},\"setMaxDailyReceiveLimit(uint16,uint256)\":{\"custom:access\":\"Only owner.\",\"custom:event\":\"Emits setMaxDailyReceiveLimit with old and new limit associated with chain id.\",\"params\":{\"chainId_\":\"The destination chain ID.\",\"limit_\":\"The new maximum daily limit in USD(scaled with 18 decimals).\"}},\"setMaxSingleReceiveTransactionLimit(uint16,uint256)\":{\"custom:access\":\"Only owner.\",\"custom:event\":\"Emits setMaxSingleReceiveTransactionLimit with old and new limit associated with chain id.\",\"params\":{\"chainId_\":\"The destination chain ID.\",\"limit_\":\"The new maximum limit in USD(scaled with 18 decimals).\"}},\"setMaxSingleTransactionLimit(uint16,uint256)\":{\"custom:access\":\"Only owner.\",\"custom:event\":\"Emits SetMaxSingleTransactionLimit with old and new limit associated with chain id.\",\"params\":{\"chainId_\":\"Destination chain id.\",\"limit_\":\"Amount in USD(scaled with 18 decimals).\"}},\"setOracle(address)\":{\"custom:access\":\"Only owner.\",\"custom:event\":\"Emits OracleChanged with old and new oracle address.\",\"details\":\"Reverts if the new address is zero.\",\"params\":{\"oracleAddress_\":\"The new address of the ResilientOracle contract.\"}},\"setWhitelist(address,bool)\":{\"custom:access\":\"Only owner.\",\"custom:event\":\"Emits setWhitelist.\",\"params\":{\"user_\":\"Address to be add in whitelist.\",\"val_\":\"Boolean to be set (true for user_ address is whitelisted).\"}},\"sweepToken(address,address,uint256)\":{\"custom:access\":\"Only Owner\",\"custom:error\":\"Throw InsufficientBalance if amount_ is greater than the available balance of the token in the contract\",\"custom:event\":\"Emits SweepToken event\",\"params\":{\"amount_\":\"The amount of tokens needs to transfer\",\"to_\":\"The address of the recipient\",\"token_\":\"The address of the ERC-20 token to sweep\"}},\"token()\":{\"returns\":{\"_0\":\"Address of the inner token of this bridge.\"}},\"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.\"},\"updateSendAndCallEnabled(bool)\":{\"params\":{\"enabled_\":\"Boolean indicating whether the sendAndCall function should be enabled or disabled.\"}}},\"title\":\"XVSProxyOFTDest\",\"version\":1},\"userdoc\":{\"errors\":{\"InsufficientBalance(uint256,uint256)\":[{\"notice\":\"Error thrown when this contract balance is less than sweep amount\"}],\"ZeroAddressNotAllowed()\":[{\"notice\":\"Thrown if the supplied address is a zero address where it is not allowed\"}]},\"events\":{\"DropFailedMessage(uint16,bytes,uint64)\":{\"notice\":\"Emits when stored message dropped without successful retrying.\"},\"InnerTokenAdded(address)\":{\"notice\":\"Event emitted when inner token set successfully.\"},\"OracleChanged(address,address)\":{\"notice\":\"Event emitted when oracle is modified.\"},\"SetMaxDailyLimit(uint16,uint256,uint256)\":{\"notice\":\"Emitted when the maximum daily limit of transactions from local chain is modified.\"},\"SetMaxDailyReceiveLimit(uint16,uint256,uint256)\":{\"notice\":\"Emitted when the maximum daily limit for receiving transactions from remote chain is modified.\"},\"SetMaxSingleReceiveTransactionLimit(uint16,uint256,uint256)\":{\"notice\":\"Emitted when the maximum limit for a single receive transaction from remote chain is modified.\"},\"SetMaxSingleTransactionLimit(uint16,uint256,uint256)\":{\"notice\":\"Emitted when the maximum limit for a single transaction from local chain is modified.\"},\"SetWhitelist(address,bool)\":{\"notice\":\"Emitted when address is added to whitelist.\"},\"SweepToken(address,address,uint256)\":{\"notice\":\"Emitted on sweep token success\"},\"TrustedRemoteRemoved(uint16)\":{\"notice\":\"Event emitted when trusted remote sets to empty.\"},\"UpdateSendAndCallEnabled(bool)\":{\"notice\":\"Event emitted when SendAndCallEnabled updated successfully.\"}},\"kind\":\"user\",\"methods\":{\"chainIdToLast24HourReceiveWindowStart(uint16)\":{\"notice\":\"Timestamp when the last 24-hour window started from remote chain.\"},\"chainIdToLast24HourReceived(uint16)\":{\"notice\":\"Total received amount in USD(scaled with 18 decimals) within the last 24-hour window from remote chain.\"},\"chainIdToLast24HourTransferred(uint16)\":{\"notice\":\"Total sent amount in USD(scaled with 18 decimals) within the last 24-hour window from local chain.\"},\"chainIdToLast24HourWindowStart(uint16)\":{\"notice\":\"Timestamp when the last 24-hour window started from local chain.\"},\"chainIdToMaxDailyLimit(uint16)\":{\"notice\":\"Maximum daily limit for transactions in USD(scaled with 18 decimals) from local chain.\"},\"chainIdToMaxDailyReceiveLimit(uint16)\":{\"notice\":\"Maximum daily limit for receiving transactions in USD(scaled with 18 decimals) from remote chain.\"},\"chainIdToMaxSingleReceiveTransactionLimit(uint16)\":{\"notice\":\"Maximum limit for a single receive transaction in USD(scaled with 18 decimals) from remote chain.\"},\"chainIdToMaxSingleTransactionLimit(uint16)\":{\"notice\":\"Maximum limit for a single transaction in USD(scaled with 18 decimals) from local chain.\"},\"circulatingSupply()\":{\"notice\":\"Returns the total circulating supply of the token on the destination chain i.e (total supply).\"},\"dropFailedMessage(uint16,bytes,uint64)\":{\"notice\":\"Clear failed messages from the storage.\"},\"isEligibleToSend(address,uint16,uint256)\":{\"notice\":\"Checks the eligibility of a sender to initiate a cross-chain token transfer.\"},\"oracle()\":{\"notice\":\"The address of ResilientOracle contract wrapped in its interface.\"},\"pause()\":{\"notice\":\"Triggers stopped state of the bridge.\"},\"removeTrustedRemote(uint16)\":{\"notice\":\"Remove trusted remote from storage.\"},\"renounceOwnership()\":{\"notice\":\"Empty implementation of renounce ownership to avoid any mishappening.\"},\"sendAndCall(address,uint16,bytes32,uint256,bytes,uint64,(address,address,bytes))\":{\"notice\":\"Initiates a cross-chain token transfer and triggers a call on the destination chain.\"},\"setMaxDailyLimit(uint16,uint256)\":{\"notice\":\"Sets the limit of daily (24 Hour) transactions amount.\"},\"setMaxDailyReceiveLimit(uint16,uint256)\":{\"notice\":\"Sets the maximum daily limit for receiving transactions.\"},\"setMaxSingleReceiveTransactionLimit(uint16,uint256)\":{\"notice\":\"Sets the maximum limit for a single receive transaction.\"},\"setMaxSingleTransactionLimit(uint16,uint256)\":{\"notice\":\"Sets the limit of single transaction amount.\"},\"setOracle(address)\":{\"notice\":\"Set the address of the ResilientOracle contract.\"},\"setWhitelist(address,bool)\":{\"notice\":\"Sets the whitelist address to skip checks on transaction limit.\"},\"sweepToken(address,address,uint256)\":{\"notice\":\"A public function to sweep accidental ERC-20 transfers to this contract. Tokens are sent to user\"},\"token()\":{\"notice\":\"Return's the address of the inner token of this bridge.\"},\"unpause()\":{\"notice\":\"Triggers resume state of the bridge.\"},\"updateSendAndCallEnabled(bool)\":{\"notice\":\"It enables or disables sendAndCall functionality for the bridge.\"},\"whitelist(address)\":{\"notice\":\"Address on which cap check and bound limit is not applicable.\"}},\"notice\":\"XVSProxyOFTDest contract builds upon the functionality of its parent contract, BaseXVSProxyOFT, and focuses on managing token transfers to the destination chain. It provides functions to check eligibility and perform the actual token transfers while maintaining strict access controls and pausing mechanisms.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/Bridge/XVSProxyOFTDest.sol\":\"XVSProxyOFTDest\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"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 // try-catch all errors/exceptions\\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\":\"0x612ff1f2a158b7e64e873885b5ff08afa348998fd9005f384d555d643ba7968d\",\"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\"},\"@layerzerolabs/solidity-examples/contracts/token/oft/v2/BaseOFTV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./OFTCoreV2.sol\\\";\\nimport \\\"./interfaces/IOFTV2.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/introspection/ERC165.sol\\\";\\n\\nabstract contract BaseOFTV2 is OFTCoreV2, ERC165, IOFTV2 {\\n constructor(uint8 _sharedDecimals, address _lzEndpoint) OFTCoreV2(_sharedDecimals, _lzEndpoint) {}\\n\\n /************************************************************************\\n * public functions\\n ************************************************************************/\\n function sendFrom(\\n address _from,\\n uint16 _dstChainId,\\n bytes32 _toAddress,\\n uint _amount,\\n LzCallParams calldata _callParams\\n ) public payable virtual override {\\n _send(_from, _dstChainId, _toAddress, _amount, _callParams.refundAddress, _callParams.zroPaymentAddress, _callParams.adapterParams);\\n }\\n\\n function sendAndCall(\\n address _from,\\n uint16 _dstChainId,\\n bytes32 _toAddress,\\n uint _amount,\\n bytes calldata _payload,\\n uint64 _dstGasForCall,\\n LzCallParams calldata _callParams\\n ) public payable virtual override {\\n _sendAndCall(\\n _from,\\n _dstChainId,\\n _toAddress,\\n _amount,\\n _payload,\\n _dstGasForCall,\\n _callParams.refundAddress,\\n _callParams.zroPaymentAddress,\\n _callParams.adapterParams\\n );\\n }\\n\\n /************************************************************************\\n * public view functions\\n ************************************************************************/\\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\\n return interfaceId == type(IOFTV2).interfaceId || super.supportsInterface(interfaceId);\\n }\\n\\n function estimateSendFee(\\n uint16 _dstChainId,\\n bytes32 _toAddress,\\n uint _amount,\\n bool _useZro,\\n bytes calldata _adapterParams\\n ) public view virtual override returns (uint nativeFee, uint zroFee) {\\n return _estimateSendFee(_dstChainId, _toAddress, _amount, _useZro, _adapterParams);\\n }\\n\\n function estimateSendAndCallFee(\\n uint16 _dstChainId,\\n bytes32 _toAddress,\\n uint _amount,\\n bytes calldata _payload,\\n uint64 _dstGasForCall,\\n bool _useZro,\\n bytes calldata _adapterParams\\n ) public view virtual override returns (uint nativeFee, uint zroFee) {\\n return _estimateSendAndCallFee(_dstChainId, _toAddress, _amount, _payload, _dstGasForCall, _useZro, _adapterParams);\\n }\\n\\n function circulatingSupply() public view virtual override returns (uint);\\n\\n function token() public view virtual override returns (address);\\n}\\n\",\"keccak256\":\"0x59d2d32dd14a4f58232b126a7d69608a85f82137bd56d8ce0fc28ff646cba943\",\"license\":\"MIT\"},\"@layerzerolabs/solidity-examples/contracts/token/oft/v2/OFTCoreV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../../lzApp/NonblockingLzApp.sol\\\";\\nimport \\\"../../../libraries/ExcessivelySafeCall.sol\\\";\\nimport \\\"./interfaces/ICommonOFT.sol\\\";\\nimport \\\"./interfaces/IOFTReceiverV2.sol\\\";\\n\\nabstract contract OFTCoreV2 is NonblockingLzApp {\\n using BytesLib for bytes;\\n using ExcessivelySafeCall for address;\\n\\n uint public constant NO_EXTRA_GAS = 0;\\n\\n // packet type\\n uint8 public constant PT_SEND = 0;\\n uint8 public constant PT_SEND_AND_CALL = 1;\\n\\n uint8 public immutable sharedDecimals;\\n\\n mapping(uint16 => mapping(bytes => mapping(uint64 => bool))) public creditedPackets;\\n\\n /**\\n * @dev Emitted when `_amount` tokens are moved from the `_sender` to (`_dstChainId`, `_toAddress`)\\n * `_nonce` is the outbound nonce\\n */\\n event SendToChain(uint16 indexed _dstChainId, address indexed _from, bytes32 indexed _toAddress, uint _amount);\\n\\n /**\\n * @dev Emitted when `_amount` tokens are received from `_srcChainId` into the `_toAddress` on the local chain.\\n * `_nonce` is the inbound nonce.\\n */\\n event ReceiveFromChain(uint16 indexed _srcChainId, address indexed _to, uint _amount);\\n\\n event CallOFTReceivedSuccess(uint16 indexed _srcChainId, bytes _srcAddress, uint64 _nonce, bytes32 _hash);\\n\\n event NonContractAddress(address _address);\\n\\n // _sharedDecimals should be the minimum decimals on all chains\\n constructor(uint8 _sharedDecimals, address _lzEndpoint) NonblockingLzApp(_lzEndpoint) {\\n sharedDecimals = _sharedDecimals;\\n }\\n\\n /************************************************************************\\n * public functions\\n ************************************************************************/\\n function callOnOFTReceived(\\n uint16 _srcChainId,\\n bytes calldata _srcAddress,\\n uint64 _nonce,\\n bytes32 _from,\\n address _to,\\n uint _amount,\\n bytes calldata _payload,\\n uint _gasForCall\\n ) public virtual {\\n require(_msgSender() == address(this), \\\"OFTCore: caller must be OFTCore\\\");\\n\\n // send\\n _amount = _transferFrom(address(this), _to, _amount);\\n emit ReceiveFromChain(_srcChainId, _to, _amount);\\n\\n // call\\n IOFTReceiverV2(_to).onOFTReceived{gas: _gasForCall}(_srcChainId, _srcAddress, _nonce, _from, _amount, _payload);\\n }\\n\\n /************************************************************************\\n * internal functions\\n ************************************************************************/\\n function _estimateSendFee(\\n uint16 _dstChainId,\\n bytes32 _toAddress,\\n uint _amount,\\n bool _useZro,\\n bytes memory _adapterParams\\n ) internal view virtual returns (uint nativeFee, uint zroFee) {\\n // mock the payload for sendFrom()\\n bytes memory payload = _encodeSendPayload(_toAddress, _ld2sd(_amount));\\n return lzEndpoint.estimateFees(_dstChainId, address(this), payload, _useZro, _adapterParams);\\n }\\n\\n function _estimateSendAndCallFee(\\n uint16 _dstChainId,\\n bytes32 _toAddress,\\n uint _amount,\\n bytes memory _payload,\\n uint64 _dstGasForCall,\\n bool _useZro,\\n bytes memory _adapterParams\\n ) internal view virtual returns (uint nativeFee, uint zroFee) {\\n // mock the payload for sendAndCall()\\n bytes memory payload = _encodeSendAndCallPayload(msg.sender, _toAddress, _ld2sd(_amount), _payload, _dstGasForCall);\\n return lzEndpoint.estimateFees(_dstChainId, address(this), payload, _useZro, _adapterParams);\\n }\\n\\n function _nonblockingLzReceive(\\n uint16 _srcChainId,\\n bytes memory _srcAddress,\\n uint64 _nonce,\\n bytes memory _payload\\n ) internal virtual override {\\n uint8 packetType = _payload.toUint8(0);\\n\\n if (packetType == PT_SEND) {\\n _sendAck(_srcChainId, _srcAddress, _nonce, _payload);\\n } else if (packetType == PT_SEND_AND_CALL) {\\n _sendAndCallAck(_srcChainId, _srcAddress, _nonce, _payload);\\n } else {\\n revert(\\\"OFTCore: unknown packet type\\\");\\n }\\n }\\n\\n function _send(\\n address _from,\\n uint16 _dstChainId,\\n bytes32 _toAddress,\\n uint _amount,\\n address payable _refundAddress,\\n address _zroPaymentAddress,\\n bytes memory _adapterParams\\n ) internal virtual returns (uint amount) {\\n _checkGasLimit(_dstChainId, PT_SEND, _adapterParams, NO_EXTRA_GAS);\\n\\n (amount, ) = _removeDust(_amount);\\n amount = _debitFrom(_from, _dstChainId, _toAddress, amount); // amount returned should not have dust\\n require(amount > 0, \\\"OFTCore: amount too small\\\");\\n\\n bytes memory lzPayload = _encodeSendPayload(_toAddress, _ld2sd(amount));\\n _lzSend(_dstChainId, lzPayload, _refundAddress, _zroPaymentAddress, _adapterParams, msg.value);\\n\\n emit SendToChain(_dstChainId, _from, _toAddress, amount);\\n }\\n\\n function _sendAck(\\n uint16 _srcChainId,\\n bytes memory,\\n uint64,\\n bytes memory _payload\\n ) internal virtual {\\n (address to, uint64 amountSD) = _decodeSendPayload(_payload);\\n if (to == address(0)) {\\n to = address(0xdead);\\n }\\n\\n uint amount = _sd2ld(amountSD);\\n amount = _creditTo(_srcChainId, to, amount);\\n\\n emit ReceiveFromChain(_srcChainId, to, amount);\\n }\\n\\n function _sendAndCall(\\n address _from,\\n uint16 _dstChainId,\\n bytes32 _toAddress,\\n uint _amount,\\n bytes memory _payload,\\n uint64 _dstGasForCall,\\n address payable _refundAddress,\\n address _zroPaymentAddress,\\n bytes memory _adapterParams\\n ) internal virtual returns (uint amount) {\\n _checkGasLimit(_dstChainId, PT_SEND_AND_CALL, _adapterParams, _dstGasForCall);\\n\\n (amount, ) = _removeDust(_amount);\\n amount = _debitFrom(_from, _dstChainId, _toAddress, amount);\\n require(amount > 0, \\\"OFTCore: amount too small\\\");\\n\\n // encode the msg.sender into the payload instead of _from\\n bytes memory lzPayload = _encodeSendAndCallPayload(msg.sender, _toAddress, _ld2sd(amount), _payload, _dstGasForCall);\\n _lzSend(_dstChainId, lzPayload, _refundAddress, _zroPaymentAddress, _adapterParams, msg.value);\\n\\n emit SendToChain(_dstChainId, _from, _toAddress, amount);\\n }\\n\\n function _sendAndCallAck(\\n uint16 _srcChainId,\\n bytes memory _srcAddress,\\n uint64 _nonce,\\n bytes memory _payload\\n ) internal virtual {\\n (bytes32 from, address to, uint64 amountSD, bytes memory payloadForCall, uint64 gasForCall) = _decodeSendAndCallPayload(_payload);\\n\\n bool credited = creditedPackets[_srcChainId][_srcAddress][_nonce];\\n uint amount = _sd2ld(amountSD);\\n\\n // credit to this contract first, and then transfer to receiver only if callOnOFTReceived() succeeds\\n if (!credited) {\\n amount = _creditTo(_srcChainId, address(this), amount);\\n creditedPackets[_srcChainId][_srcAddress][_nonce] = true;\\n }\\n\\n if (!_isContract(to)) {\\n emit NonContractAddress(to);\\n return;\\n }\\n\\n // workaround for stack too deep\\n uint16 srcChainId = _srcChainId;\\n bytes memory srcAddress = _srcAddress;\\n uint64 nonce = _nonce;\\n bytes memory payload = _payload;\\n bytes32 from_ = from;\\n address to_ = to;\\n uint amount_ = amount;\\n bytes memory payloadForCall_ = payloadForCall;\\n\\n // no gas limit for the call if retry\\n uint gas = credited ? gasleft() : gasForCall;\\n (bool success, bytes memory reason) = address(this).excessivelySafeCall(\\n gasleft(),\\n 150,\\n abi.encodeWithSelector(this.callOnOFTReceived.selector, srcChainId, srcAddress, nonce, from_, to_, amount_, payloadForCall_, gas)\\n );\\n\\n if (success) {\\n bytes32 hash = keccak256(payload);\\n emit CallOFTReceivedSuccess(srcChainId, srcAddress, nonce, hash);\\n } else {\\n // store the failed message into the nonblockingLzApp\\n _storeFailedMessage(srcChainId, srcAddress, nonce, payload, reason);\\n }\\n }\\n\\n function _isContract(address _account) internal view returns (bool) {\\n return _account.code.length > 0;\\n }\\n\\n function _ld2sd(uint _amount) internal view virtual returns (uint64) {\\n uint amountSD = _amount / _ld2sdRate();\\n require(amountSD <= type(uint64).max, \\\"OFTCore: amountSD overflow\\\");\\n return uint64(amountSD);\\n }\\n\\n function _sd2ld(uint64 _amountSD) internal view virtual returns (uint) {\\n return _amountSD * _ld2sdRate();\\n }\\n\\n function _removeDust(uint _amount) internal view virtual returns (uint amountAfter, uint dust) {\\n dust = _amount % _ld2sdRate();\\n amountAfter = _amount - dust;\\n }\\n\\n function _encodeSendPayload(bytes32 _toAddress, uint64 _amountSD) internal view virtual returns (bytes memory) {\\n return abi.encodePacked(PT_SEND, _toAddress, _amountSD);\\n }\\n\\n function _decodeSendPayload(bytes memory _payload) internal view virtual returns (address to, uint64 amountSD) {\\n require(_payload.toUint8(0) == PT_SEND && _payload.length == 41, \\\"OFTCore: invalid payload\\\");\\n\\n to = _payload.toAddress(13); // drop the first 12 bytes of bytes32\\n amountSD = _payload.toUint64(33);\\n }\\n\\n function _encodeSendAndCallPayload(\\n address _from,\\n bytes32 _toAddress,\\n uint64 _amountSD,\\n bytes memory _payload,\\n uint64 _dstGasForCall\\n ) internal view virtual returns (bytes memory) {\\n return abi.encodePacked(PT_SEND_AND_CALL, _toAddress, _amountSD, _addressToBytes32(_from), _dstGasForCall, _payload);\\n }\\n\\n function _decodeSendAndCallPayload(bytes memory _payload)\\n internal\\n view\\n virtual\\n returns (\\n bytes32 from,\\n address to,\\n uint64 amountSD,\\n bytes memory payload,\\n uint64 dstGasForCall\\n )\\n {\\n require(_payload.toUint8(0) == PT_SEND_AND_CALL, \\\"OFTCore: invalid payload\\\");\\n\\n to = _payload.toAddress(13); // drop the first 12 bytes of bytes32\\n amountSD = _payload.toUint64(33);\\n from = _payload.toBytes32(41);\\n dstGasForCall = _payload.toUint64(73);\\n payload = _payload.slice(81, _payload.length - 81);\\n }\\n\\n function _addressToBytes32(address _address) internal pure virtual returns (bytes32) {\\n return bytes32(uint(uint160(_address)));\\n }\\n\\n function _debitFrom(\\n address _from,\\n uint16 _dstChainId,\\n bytes32 _toAddress,\\n uint _amount\\n ) internal virtual returns (uint);\\n\\n function _creditTo(\\n uint16 _srcChainId,\\n address _toAddress,\\n uint _amount\\n ) internal virtual returns (uint);\\n\\n function _transferFrom(\\n address _from,\\n address _to,\\n uint _amount\\n ) internal virtual returns (uint);\\n\\n function _ld2sdRate() internal view virtual returns (uint);\\n}\\n\",\"keccak256\":\"0x96cf7a10c5af4243822d25e77985a4a46d12264f839593ded5378cd6519a8df0\",\"license\":\"MIT\"},\"@layerzerolabs/solidity-examples/contracts/token/oft/v2/interfaces/ICommonOFT.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.5.0;\\n\\nimport \\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Interface of the IOFT core standard\\n */\\ninterface ICommonOFT is IERC165 {\\n\\n struct LzCallParams {\\n address payable refundAddress;\\n address zroPaymentAddress;\\n bytes adapterParams;\\n }\\n\\n /**\\n * @dev estimate send token `_tokenId` to (`_dstChainId`, `_toAddress`)\\n * _dstChainId - L0 defined chain id to send tokens too\\n * _toAddress - dynamic bytes array which contains the address to whom you are sending tokens to on the dstChain\\n * _amount - amount of the tokens to transfer\\n * _useZro - indicates to use zro to pay L0 fees\\n * _adapterParam - flexible bytes array to indicate messaging adapter services in L0\\n */\\n function estimateSendFee(uint16 _dstChainId, bytes32 _toAddress, uint _amount, bool _useZro, bytes calldata _adapterParams) external view returns (uint nativeFee, uint zroFee);\\n\\n function estimateSendAndCallFee(uint16 _dstChainId, bytes32 _toAddress, uint _amount, bytes calldata _payload, uint64 _dstGasForCall, bool _useZro, bytes calldata _adapterParams) external view returns (uint nativeFee, uint zroFee);\\n\\n /**\\n * @dev returns the circulating amount of tokens on current chain\\n */\\n function circulatingSupply() external view returns (uint);\\n\\n /**\\n * @dev returns the address of the ERC20 token\\n */\\n function token() external view returns (address);\\n}\\n\",\"keccak256\":\"0x1d034ba786436c1fce8057352c87373098bd1d8026b24c8fbc7be28636d0c15d\",\"license\":\"MIT\"},\"@layerzerolabs/solidity-examples/contracts/token/oft/v2/interfaces/IOFTReceiverV2.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity >=0.5.0;\\n\\ninterface IOFTReceiverV2 {\\n /**\\n * @dev Called by the OFT contract when tokens are received from source chain.\\n * @param _srcChainId The chain id of the source chain.\\n * @param _srcAddress The address of the OFT token contract on the source chain.\\n * @param _nonce The nonce of the transaction on the source chain.\\n * @param _from The address of the account who calls the sendAndCall() on the source chain.\\n * @param _amount The amount of tokens to transfer.\\n * @param _payload Additional data with no specified format.\\n */\\n function onOFTReceived(uint16 _srcChainId, bytes calldata _srcAddress, uint64 _nonce, bytes32 _from, uint _amount, bytes calldata _payload) external;\\n}\\n\",\"keccak256\":\"0xf57e437ced3bc10bb333123bb49475dab47c7615b86401c4d872c29ad4928fd5\",\"license\":\"BUSL-1.1\"},\"@layerzerolabs/solidity-examples/contracts/token/oft/v2/interfaces/IOFTV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.5.0;\\n\\nimport \\\"./ICommonOFT.sol\\\";\\n\\n/**\\n * @dev Interface of the IOFT core standard\\n */\\ninterface IOFTV2 is ICommonOFT {\\n\\n /**\\n * @dev send `_amount` amount of token to (`_dstChainId`, `_toAddress`) from `_from`\\n * `_from` the owner of token\\n * `_dstChainId` the destination chain identifier\\n * `_toAddress` can be any size depending on the `dstChainId`.\\n * `_amount` the quantity of tokens in wei\\n * `_refundAddress` the address LayerZero refunds if too much message fee is sent\\n * `_zroPaymentAddress` set to address(0x0) if not paying in ZRO (LayerZero Token)\\n * `_adapterParams` is a flexible bytes array to indicate messaging adapter services\\n */\\n function sendFrom(address _from, uint16 _dstChainId, bytes32 _toAddress, uint _amount, LzCallParams calldata _callParams) external payable;\\n\\n function sendAndCall(address _from, uint16 _dstChainId, bytes32 _toAddress, uint _amount, bytes calldata _payload, uint64 _dstGasForCall, LzCallParams calldata _callParams) external payable;\\n}\\n\",\"keccak256\":\"0xb1d31f341715347d49db4e2c0de27c49bbd70b5b3d9b0adb1050b2b3a305ab87\",\"license\":\"MIT\"},\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.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. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby disabling 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\":\"0xba43b97fba0d32eb4254f6a5a297b39a19a247082a02d6e69349e071e2946218\",\"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/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/IERC20Permit.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\\n *\\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\\n * need to send a transaction, and thus is not required to hold Ether at all.\\n */\\ninterface IERC20Permit {\\n /**\\n * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\\n * given ``owner``'s signed approval.\\n *\\n * IMPORTANT: The same issues {IERC20-approve} has related to transaction\\n * ordering also apply here.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `deadline` must be a timestamp in the future.\\n * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\\n * over the EIP712-formatted function arguments.\\n * - the signature must use ``owner``'s current nonce (see {nonces}).\\n *\\n * For more information on the signature format, see the\\n * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\\n * section].\\n */\\n function permit(\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external;\\n\\n /**\\n * @dev Returns the current nonce for `owner`. This value must be\\n * included whenever a signature is generated for {permit}.\\n *\\n * Every successful call to {permit} increases ``owner``'s nonce by one. This\\n * prevents a signature from being used multiple times.\\n */\\n function nonces(address owner) external view returns (uint256);\\n\\n /**\\n * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0xec63854014a5b4f2b3290ab9103a21bdf902a508d0f41a8573fea49e98bf571a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\nimport \\\"../extensions/IERC20Permit.sol\\\";\\nimport \\\"../../../utils/Address.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20 {\\n using Address for address;\\n\\n /**\\n * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n /**\\n * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the\\n * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.\\n */\\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n }\\n\\n /**\\n * @dev Deprecated. This function has issues similar to the ones found in\\n * {IERC20-approve}, and its usage is discouraged.\\n *\\n * Whenever possible, use {safeIncreaseAllowance} and\\n * {safeDecreaseAllowance} instead.\\n */\\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\\n // safeApprove should only be called when setting an initial allowance,\\n // or when resetting it to zero. To increase and decrease it, use\\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\\n require(\\n (value == 0) || (token.allowance(address(this), spender) == 0),\\n \\\"SafeERC20: approve from non-zero to non-zero allowance\\\"\\n );\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\\n }\\n\\n /**\\n * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));\\n }\\n\\n /**\\n * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n unchecked {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n require(oldAllowance >= value, \\\"SafeERC20: decreased allowance below zero\\\");\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));\\n }\\n }\\n\\n /**\\n * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval\\n * to be set to zero before setting it to a non-zero value, such as USDT.\\n */\\n function forceApprove(IERC20 token, address spender, uint256 value) internal {\\n bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);\\n\\n if (!_callOptionalReturnBool(token, approvalCall)) {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));\\n _callOptionalReturn(token, approvalCall);\\n }\\n }\\n\\n /**\\n * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.\\n * Revert on invalid signature.\\n */\\n function safePermit(\\n IERC20Permit token,\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal {\\n uint256 nonceBefore = token.nonces(owner);\\n token.permit(owner, spender, value, deadline, v, r, s);\\n uint256 nonceAfter = token.nonces(owner);\\n require(nonceAfter == nonceBefore + 1, \\\"SafeERC20: permit did not succeed\\\");\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n */\\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that\\n // the target address contains contract code and also asserts for success in the low-level call.\\n\\n bytes memory returndata = address(token).functionCall(data, \\\"SafeERC20: low-level call failed\\\");\\n require(returndata.length == 0 || abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n *\\n * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.\\n */\\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false\\n // and not revert is the subcall reverts.\\n\\n (bool success, bytes memory returndata) = address(token).call(data);\\n return\\n success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token));\\n }\\n}\\n\",\"keccak256\":\"0xabefac93435967b4d36a4fabcbdbb918d1f0b7ae3c3d85bc30923b326c927ed1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.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 * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\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://consensys.net/diligence/blog/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.8.0/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(address target, bytes memory data, uint256 value) 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 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 (bool success, bytes memory returndata) = target.delegatecall(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\":\"0x006dd67219697fe68d7fbfdea512e7c4cb64a43565ed86171d67e844982da6fa\",\"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/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\"},\"@venusprotocol/oracle/contracts/interfaces/OracleInterface.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.13;\\n\\ninterface OracleInterface {\\n function getPrice(address asset) external view returns (uint256);\\n}\\n\\ninterface ResilientOracleInterface is OracleInterface {\\n function updatePrice(address vToken) external;\\n\\n function updateAssetPrice(address asset) external;\\n\\n function getUnderlyingPrice(address vToken) external view returns (uint256);\\n}\\n\\ninterface TwapInterface is OracleInterface {\\n function updateTwap(address asset) external returns (uint256);\\n}\\n\\ninterface BoundValidatorInterface {\\n function validatePriceWithAnchorPrice(\\n address asset,\\n uint256 reporterPrice,\\n uint256 anchorPrice\\n ) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x40031b19684ca0c912e794d08c2c0b0d8be77d3c1bdc937830a0658eff899650\",\"license\":\"BSD-3-Clause\"},\"@venusprotocol/solidity-utilities/contracts/ExponentialNoError.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.13;\\n\\nimport { EXP_SCALE as EXP_SCALE_, MANTISSA_ONE as MANTISSA_ONE_ } from \\\"./constants.sol\\\";\\n\\n/**\\n * @title Exponential module for storing fixed-precision decimals\\n * @author Compound\\n * @notice Exp is a struct which stores decimals with a fixed precision of 18 decimal places.\\n * Thus, if we wanted to store the 5.1, mantissa would store 5.1e18. That is:\\n * `Exp({mantissa: 5100000000000000000})`.\\n */\\ncontract ExponentialNoError {\\n struct Exp {\\n uint256 mantissa;\\n }\\n\\n struct Double {\\n uint256 mantissa;\\n }\\n\\n uint256 internal constant EXP_SCALE = EXP_SCALE_;\\n uint256 internal constant DOUBLE_SCALE = 1e36;\\n uint256 internal constant HALF_EXP_SCALE = EXP_SCALE / 2;\\n uint256 internal constant MANTISSA_ONE = MANTISSA_ONE_;\\n\\n /**\\n * @dev Truncates the given exp to a whole number value.\\n * For example, truncate(Exp{mantissa: 15 * EXP_SCALE}) = 15\\n */\\n function truncate(Exp memory exp) internal pure returns (uint256) {\\n // Note: We are not using careful math here as we're performing a division that cannot fail\\n return exp.mantissa / EXP_SCALE;\\n }\\n\\n /**\\n * @dev Multiply an Exp by a scalar, then truncate to return an unsigned integer.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function mul_ScalarTruncate(Exp memory a, uint256 scalar) internal pure returns (uint256) {\\n Exp memory product = mul_(a, scalar);\\n return truncate(product);\\n }\\n\\n /**\\n * @dev Multiply an Exp by a scalar, truncate, then add an to an unsigned integer, returning an unsigned integer.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function mul_ScalarTruncateAddUInt(Exp memory a, uint256 scalar, uint256 addend) internal pure returns (uint256) {\\n Exp memory product = mul_(a, scalar);\\n return add_(truncate(product), addend);\\n }\\n\\n /**\\n * @dev Checks if first Exp is less than second Exp.\\n */\\n function lessThanExp(Exp memory left, Exp memory right) internal pure returns (bool) {\\n return left.mantissa < right.mantissa;\\n }\\n\\n function safe224(uint256 n, string memory errorMessage) internal pure returns (uint224) {\\n require(n <= type(uint224).max, errorMessage);\\n return uint224(n);\\n }\\n\\n function safe32(uint256 n, string memory errorMessage) internal pure returns (uint32) {\\n require(n <= type(uint32).max, errorMessage);\\n return uint32(n);\\n }\\n\\n function add_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\\n return Exp({ mantissa: add_(a.mantissa, b.mantissa) });\\n }\\n\\n function add_(Double memory a, Double memory b) internal pure returns (Double memory) {\\n return Double({ mantissa: add_(a.mantissa, b.mantissa) });\\n }\\n\\n function add_(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a + b;\\n }\\n\\n function sub_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\\n return Exp({ mantissa: sub_(a.mantissa, b.mantissa) });\\n }\\n\\n function sub_(Double memory a, Double memory b) internal pure returns (Double memory) {\\n return Double({ mantissa: sub_(a.mantissa, b.mantissa) });\\n }\\n\\n function sub_(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a - b;\\n }\\n\\n function mul_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\\n return Exp({ mantissa: mul_(a.mantissa, b.mantissa) / EXP_SCALE });\\n }\\n\\n function mul_(Exp memory a, uint256 b) internal pure returns (Exp memory) {\\n return Exp({ mantissa: mul_(a.mantissa, b) });\\n }\\n\\n function mul_(uint256 a, Exp memory b) internal pure returns (uint256) {\\n return mul_(a, b.mantissa) / EXP_SCALE;\\n }\\n\\n function mul_(Double memory a, Double memory b) internal pure returns (Double memory) {\\n return Double({ mantissa: mul_(a.mantissa, b.mantissa) / DOUBLE_SCALE });\\n }\\n\\n function mul_(Double memory a, uint256 b) internal pure returns (Double memory) {\\n return Double({ mantissa: mul_(a.mantissa, b) });\\n }\\n\\n function mul_(uint256 a, Double memory b) internal pure returns (uint256) {\\n return mul_(a, b.mantissa) / DOUBLE_SCALE;\\n }\\n\\n function mul_(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a * b;\\n }\\n\\n function div_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\\n return Exp({ mantissa: div_(mul_(a.mantissa, EXP_SCALE), b.mantissa) });\\n }\\n\\n function div_(Exp memory a, uint256 b) internal pure returns (Exp memory) {\\n return Exp({ mantissa: div_(a.mantissa, b) });\\n }\\n\\n function div_(uint256 a, Exp memory b) internal pure returns (uint256) {\\n return div_(mul_(a, EXP_SCALE), b.mantissa);\\n }\\n\\n function div_(Double memory a, Double memory b) internal pure returns (Double memory) {\\n return Double({ mantissa: div_(mul_(a.mantissa, DOUBLE_SCALE), b.mantissa) });\\n }\\n\\n function div_(Double memory a, uint256 b) internal pure returns (Double memory) {\\n return Double({ mantissa: div_(a.mantissa, b) });\\n }\\n\\n function div_(uint256 a, Double memory b) internal pure returns (uint256) {\\n return div_(mul_(a, DOUBLE_SCALE), b.mantissa);\\n }\\n\\n function div_(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a / b;\\n }\\n\\n function fraction(uint256 a, uint256 b) internal pure returns (Double memory) {\\n return Double({ mantissa: div_(mul_(a, DOUBLE_SCALE), b) });\\n }\\n}\\n\",\"keccak256\":\"0x6cf5430c2db151ab24ef0f567ed443c0b75b8b6051a62cacbe83f28b16834605\",\"license\":\"BSD-3-Clause\"},\"@venusprotocol/solidity-utilities/contracts/constants.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.13;\\n\\n/// @dev Base unit for computations, usually used in scaling (multiplications, divisions)\\nuint256 constant EXP_SCALE = 1e18;\\n\\n/// @dev A unit (literal one) in EXP_SCALE, usually used in additions/subtractions\\nuint256 constant MANTISSA_ONE = EXP_SCALE;\\n\",\"keccak256\":\"0x44de02d7837ee1d4dcf6e9f5e783e9d9e0bec0154f23f5661fb54810cff9f892\",\"license\":\"BSD-3-Clause\"},\"@venusprotocol/solidity-utilities/contracts/validators.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.13;\\n\\n/// @notice Thrown if the supplied address is a zero address where it is not allowed\\nerror ZeroAddressNotAllowed();\\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\",\"keccak256\":\"0x909eb76841ebd57d8f53686b76b1a09da7bbbbcddb29510c41674d5aa84c713e\",\"license\":\"BSD-3-Clause\"},\"contracts/Bridge/BaseXVSProxyOFT.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.13;\\n\\nimport { SafeERC20, IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport { ResilientOracleInterface } from \\\"@venusprotocol/oracle/contracts/interfaces/OracleInterface.sol\\\";\\nimport { Pausable } from \\\"@openzeppelin/contracts/security/Pausable.sol\\\";\\nimport { BaseOFTV2 } from \\\"@layerzerolabs/solidity-examples/contracts/token/oft/v2/BaseOFTV2.sol\\\";\\nimport { ensureNonzeroAddress } from \\\"@venusprotocol/solidity-utilities/contracts/validators.sol\\\";\\nimport { ExponentialNoError } from \\\"@venusprotocol/solidity-utilities/contracts/ExponentialNoError.sol\\\";\\n\\n/**\\n * @title BaseXVSProxyOFT\\n * @author Venus\\n * @notice The BaseXVSProxyOFT contract is tailored for facilitating cross-chain transactions with an ERC20 token.\\n * It manages transaction limits of a single and daily transactions.\\n * This contract inherits key functionalities from other contracts, including pausing capabilities and error handling.\\n * It holds state variables for the inner token and maps for tracking transaction limits and statistics across various chains and addresses.\\n * The contract allows the owner to configure limits, set whitelists, and control pausing.\\n * Internal functions conduct eligibility check of transactions, making the contract a fundamental component for cross-chain token management.\\n */\\n\\nabstract contract BaseXVSProxyOFT is Pausable, ExponentialNoError, BaseOFTV2 {\\n using SafeERC20 for IERC20;\\n IERC20 internal immutable innerToken;\\n uint256 internal immutable ld2sdRate;\\n bool public sendAndCallEnabled;\\n\\n /**\\n * @notice The address of ResilientOracle contract wrapped in its interface.\\n */\\n ResilientOracleInterface public oracle;\\n /**\\n * @notice Maximum limit for a single transaction in USD(scaled with 18 decimals) from local chain.\\n */\\n mapping(uint16 => uint256) public chainIdToMaxSingleTransactionLimit;\\n /**\\n * @notice Maximum daily limit for transactions in USD(scaled with 18 decimals) from local chain.\\n */\\n mapping(uint16 => uint256) public chainIdToMaxDailyLimit;\\n /**\\n * @notice Total sent amount in USD(scaled with 18 decimals) within the last 24-hour window from local chain.\\n */\\n mapping(uint16 => uint256) public chainIdToLast24HourTransferred;\\n /**\\n * @notice Timestamp when the last 24-hour window started from local chain.\\n */\\n mapping(uint16 => uint256) public chainIdToLast24HourWindowStart;\\n /**\\n * @notice Maximum limit for a single receive transaction in USD(scaled with 18 decimals) from remote chain.\\n */\\n mapping(uint16 => uint256) public chainIdToMaxSingleReceiveTransactionLimit;\\n /**\\n * @notice Maximum daily limit for receiving transactions in USD(scaled with 18 decimals) from remote chain.\\n */\\n mapping(uint16 => uint256) public chainIdToMaxDailyReceiveLimit;\\n /**\\n * @notice Total received amount in USD(scaled with 18 decimals) within the last 24-hour window from remote chain.\\n */\\n mapping(uint16 => uint256) public chainIdToLast24HourReceived;\\n /**\\n * @notice Timestamp when the last 24-hour window started from remote chain.\\n */\\n mapping(uint16 => uint256) public chainIdToLast24HourReceiveWindowStart;\\n /**\\n * @notice Address on which cap check and bound limit is not applicable.\\n */\\n mapping(address => bool) public whitelist;\\n\\n /**\\n * @notice Emitted when address is added to whitelist.\\n */\\n event SetWhitelist(address indexed addr, bool isWhitelist);\\n /**\\n * @notice Emitted when the maximum limit for a single transaction from local chain is modified.\\n */\\n event SetMaxSingleTransactionLimit(uint16 chainId, uint256 oldMaxLimit, uint256 newMaxLimit);\\n /**\\n * @notice Emitted when the maximum daily limit of transactions from local chain is modified.\\n */\\n event SetMaxDailyLimit(uint16 chainId, uint256 oldMaxLimit, uint256 newMaxLimit);\\n /**\\n * @notice Emitted when the maximum limit for a single receive transaction from remote chain is modified.\\n */\\n event SetMaxSingleReceiveTransactionLimit(uint16 chainId, uint256 oldMaxLimit, uint256 newMaxLimit);\\n /**\\n * @notice Emitted when the maximum daily limit for receiving transactions from remote chain is modified.\\n */\\n event SetMaxDailyReceiveLimit(uint16 chainId, uint256 oldMaxLimit, uint256 newMaxLimit);\\n /**\\n * @notice Event emitted when oracle is modified.\\n */\\n event OracleChanged(address indexed oldOracle, address indexed newOracle);\\n /**\\n * @notice Event emitted when trusted remote sets to empty.\\n */\\n event TrustedRemoteRemoved(uint16 chainId);\\n /**\\n * @notice Event emitted when inner token set successfully.\\n */\\n event InnerTokenAdded(address indexed innerToken);\\n /**\\n *@notice Emitted on sweep token success\\n */\\n event SweepToken(address indexed token, address indexed to, uint256 sweepAmount);\\n /**\\n * @notice Event emitted when SendAndCallEnabled updated successfully.\\n */\\n event UpdateSendAndCallEnabled(bool indexed enabled);\\n /**\\n *@notice Error thrown when this contract balance is less than sweep amount\\n */\\n error InsufficientBalance(uint256 sweepAmount, uint256 balance);\\n\\n /**\\n * @param tokenAddress_ Address of the inner token.\\n * @param sharedDecimals_ Number of shared decimals.\\n * @param lzEndpoint_ Address of the layer zero endpoint contract.\\n * @param oracle_ Address of the price oracle.\\n * @custom:error ZeroAddressNotAllowed is thrown when token contract address is zero.\\n * @custom:error ZeroAddressNotAllowed is thrown when lzEndpoint contract address is zero.\\n * @custom:error ZeroAddressNotAllowed is thrown when oracle contract address is zero.\\n * @custom:event Emits InnerTokenAdded with token address.\\n * @custom:event Emits OracleChanged with zero address and oracle address.\\n */\\n constructor(\\n address tokenAddress_,\\n uint8 sharedDecimals_,\\n address lzEndpoint_,\\n address oracle_\\n ) BaseOFTV2(sharedDecimals_, lzEndpoint_) {\\n ensureNonzeroAddress(tokenAddress_);\\n ensureNonzeroAddress(lzEndpoint_);\\n ensureNonzeroAddress(oracle_);\\n\\n innerToken = IERC20(tokenAddress_);\\n\\n (bool success, bytes memory data) = tokenAddress_.staticcall(abi.encodeWithSignature(\\\"decimals()\\\"));\\n require(success, \\\"ProxyOFT: failed to get token decimals\\\");\\n uint8 decimals = abi.decode(data, (uint8));\\n\\n require(sharedDecimals_ <= decimals, \\\"ProxyOFT: sharedDecimals must be <= decimals\\\");\\n ld2sdRate = 10 ** (decimals - sharedDecimals_);\\n\\n emit InnerTokenAdded(tokenAddress_);\\n emit OracleChanged(address(0), oracle_);\\n\\n oracle = ResilientOracleInterface(oracle_);\\n }\\n\\n /**\\n * @notice Set the address of the ResilientOracle contract.\\n * @dev Reverts if the new address is zero.\\n * @param oracleAddress_ The new address of the ResilientOracle contract.\\n * @custom:access Only owner.\\n * @custom:event Emits OracleChanged with old and new oracle address.\\n */\\n function setOracle(address oracleAddress_) external onlyOwner {\\n ensureNonzeroAddress(oracleAddress_);\\n emit OracleChanged(address(oracle), oracleAddress_);\\n oracle = ResilientOracleInterface(oracleAddress_);\\n }\\n\\n /**\\n * @notice Sets the limit of single transaction amount.\\n * @param chainId_ Destination chain id.\\n * @param limit_ Amount in USD(scaled with 18 decimals).\\n * @custom:access Only owner.\\n * @custom:event Emits SetMaxSingleTransactionLimit with old and new limit associated with chain id.\\n */\\n function setMaxSingleTransactionLimit(uint16 chainId_, uint256 limit_) external onlyOwner {\\n require(limit_ <= chainIdToMaxDailyLimit[chainId_], \\\"Single transaction limit > Daily limit\\\");\\n emit SetMaxSingleTransactionLimit(chainId_, chainIdToMaxSingleTransactionLimit[chainId_], limit_);\\n chainIdToMaxSingleTransactionLimit[chainId_] = limit_;\\n }\\n\\n /**\\n * @notice Sets the limit of daily (24 Hour) transactions amount.\\n * @param chainId_ Destination chain id.\\n * @param limit_ Amount in USD(scaled with 18 decimals).\\n * @custom:access Only owner.\\n * @custom:event Emits setMaxDailyLimit with old and new limit associated with chain id.\\n */\\n function setMaxDailyLimit(uint16 chainId_, uint256 limit_) external onlyOwner {\\n require(limit_ >= chainIdToMaxSingleTransactionLimit[chainId_], \\\"Daily limit < single transaction limit\\\");\\n emit SetMaxDailyLimit(chainId_, chainIdToMaxDailyLimit[chainId_], limit_);\\n chainIdToMaxDailyLimit[chainId_] = limit_;\\n }\\n\\n /**\\n * @notice Sets the maximum limit for a single receive transaction.\\n * @param chainId_ The destination chain ID.\\n * @param limit_ The new maximum limit in USD(scaled with 18 decimals).\\n * @custom:access Only owner.\\n * @custom:event Emits setMaxSingleReceiveTransactionLimit with old and new limit associated with chain id.\\n */\\n function setMaxSingleReceiveTransactionLimit(uint16 chainId_, uint256 limit_) external onlyOwner {\\n require(limit_ <= chainIdToMaxDailyReceiveLimit[chainId_], \\\"single receive transaction limit > Daily limit\\\");\\n emit SetMaxSingleReceiveTransactionLimit(chainId_, chainIdToMaxSingleReceiveTransactionLimit[chainId_], limit_);\\n chainIdToMaxSingleReceiveTransactionLimit[chainId_] = limit_;\\n }\\n\\n /**\\n * @notice Sets the maximum daily limit for receiving transactions.\\n * @param chainId_ The destination chain ID.\\n * @param limit_ The new maximum daily limit in USD(scaled with 18 decimals).\\n * @custom:access Only owner.\\n * @custom:event Emits setMaxDailyReceiveLimit with old and new limit associated with chain id.\\n */\\n function setMaxDailyReceiveLimit(uint16 chainId_, uint256 limit_) external onlyOwner {\\n require(\\n limit_ >= chainIdToMaxSingleReceiveTransactionLimit[chainId_],\\n \\\"Daily limit < single receive transaction limit\\\"\\n );\\n emit SetMaxDailyReceiveLimit(chainId_, chainIdToMaxDailyReceiveLimit[chainId_], limit_);\\n chainIdToMaxDailyReceiveLimit[chainId_] = limit_;\\n }\\n\\n /**\\n * @notice Sets the whitelist address to skip checks on transaction limit.\\n * @param user_ Address to be add in whitelist.\\n * @param val_ Boolean to be set (true for user_ address is whitelisted).\\n * @custom:access Only owner.\\n * @custom:event Emits setWhitelist.\\n */\\n function setWhitelist(address user_, bool val_) external onlyOwner {\\n emit SetWhitelist(user_, val_);\\n whitelist[user_] = val_;\\n }\\n\\n /**\\n * @notice Triggers stopped state of the bridge.\\n * @custom:access Only owner.\\n */\\n function pause() external onlyOwner {\\n _pause();\\n }\\n\\n /**\\n * @notice Triggers resume state of the bridge.\\n * @custom:access Only owner.\\n */\\n function unpause() external onlyOwner {\\n _unpause();\\n }\\n\\n /**\\n * @notice A public function to sweep accidental ERC-20 transfers to this contract. Tokens are sent to user\\n * @param token_ The address of the ERC-20 token to sweep\\n * @param to_ The address of the recipient\\n * @param amount_ The amount of tokens needs to transfer\\n * @custom:event Emits SweepToken event\\n * @custom:error Throw InsufficientBalance if amount_ is greater than the available balance of the token in the contract\\n * @custom:access Only Owner\\n */\\n function sweepToken(IERC20 token_, address to_, uint256 amount_) external onlyOwner {\\n uint256 balance = token_.balanceOf(address(this));\\n if (amount_ > balance) {\\n revert InsufficientBalance(amount_, balance);\\n }\\n\\n emit SweepToken(address(token_), to_, amount_);\\n\\n token_.safeTransfer(to_, amount_);\\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 Only owner.\\n * @custom:event Emits TrustedRemoteRemoved once chain id is removed from trusted remote.\\n */\\n function removeTrustedRemote(uint16 remoteChainId_) external onlyOwner {\\n delete trustedRemoteLookup[remoteChainId_];\\n emit TrustedRemoteRemoved(remoteChainId_);\\n }\\n\\n /**\\n * @notice It enables or disables sendAndCall functionality for the bridge.\\n * @param enabled_ Boolean indicating whether the sendAndCall function should be enabled or disabled.\\n */\\n function updateSendAndCallEnabled(bool enabled_) external onlyOwner {\\n sendAndCallEnabled = enabled_;\\n emit UpdateSendAndCallEnabled(enabled_);\\n }\\n\\n /**\\n * @notice Checks the eligibility of a sender to initiate a cross-chain token transfer.\\n * @dev This external view function assesses whether the specified sender is eligible to transfer the given amount\\n * to the specified destination chain. It considers factors such as whitelisting, transaction limits, and a 24-hour window.\\n * @param from_ The sender's address initiating the transfer.\\n * @param dstChainId_ Indicates destination chain.\\n * @param amount_ The quantity of tokens to be transferred.\\n * @return eligibleToSend A boolean indicating whether the sender is eligible to transfer the tokens.\\n * @return maxSingleTransactionLimit The maximum limit for a single transaction.\\n * @return maxDailyLimit The maximum daily limit for transactions.\\n * @return amountInUsd The equivalent amount in USD based on the oracle price.\\n * @return transferredInWindow The total amount transferred in the current 24-hour window.\\n * @return last24HourWindowStart The timestamp when the current 24-hour window started.\\n * @return isWhiteListedUser A boolean indicating whether the sender is whitelisted.\\n */\\n function isEligibleToSend(\\n address from_,\\n uint16 dstChainId_,\\n uint256 amount_\\n )\\n external\\n view\\n returns (\\n bool eligibleToSend,\\n uint256 maxSingleTransactionLimit,\\n uint256 maxDailyLimit,\\n uint256 amountInUsd,\\n uint256 transferredInWindow,\\n uint256 last24HourWindowStart,\\n bool isWhiteListedUser\\n )\\n {\\n // Check if the sender's address is whitelisted\\n isWhiteListedUser = whitelist[from_];\\n\\n // Calculate the amount in USD using the oracle price\\n Exp memory oraclePrice = Exp({ mantissa: oracle.getPrice(token()) });\\n amountInUsd = mul_ScalarTruncate(oraclePrice, amount_);\\n\\n // Load values for the 24-hour window checks\\n uint256 currentBlockTimestamp = block.timestamp;\\n last24HourWindowStart = chainIdToLast24HourWindowStart[dstChainId_];\\n transferredInWindow = chainIdToLast24HourTransferred[dstChainId_];\\n maxSingleTransactionLimit = chainIdToMaxSingleTransactionLimit[dstChainId_];\\n maxDailyLimit = chainIdToMaxDailyLimit[dstChainId_];\\n if (currentBlockTimestamp - last24HourWindowStart > 1 days) {\\n transferredInWindow = amountInUsd;\\n last24HourWindowStart = currentBlockTimestamp;\\n } else {\\n transferredInWindow += amountInUsd;\\n }\\n eligibleToSend = (isWhiteListedUser ||\\n ((amountInUsd <= maxSingleTransactionLimit) && (transferredInWindow <= maxDailyLimit)));\\n }\\n\\n /**\\n * @notice Initiates a cross-chain token transfer and triggers a call on the destination chain.\\n * @dev This internal override function enables the contract to send tokens and invoke calls on the specified\\n * destination chain. It checks whether the sendAndCall feature is enabled before proceeding with the transfer.\\n * @param from_ Address from which tokens will be debited.\\n * @param dstChainId_ Destination chain id on which tokens will be send.\\n * @param toAddress_ Address on which tokens will be credited on destination chain.\\n * @param amount_ Amount of tokens that will be transferred.\\n * @param payload_ Additional data payload for the call on the destination chain.\\n * @param dstGasForCall_ The amount of gas allocated for the call on the destination chain.\\n * @param callparams_ Additional parameters, including refund address, ZRO payment address,\\n * and adapter params.\\n */\\n function sendAndCall(\\n address from_,\\n uint16 dstChainId_,\\n bytes32 toAddress_,\\n uint256 amount_,\\n bytes calldata payload_,\\n uint64 dstGasForCall_,\\n LzCallParams calldata callparams_\\n ) public payable override {\\n require(sendAndCallEnabled, \\\"sendAndCall is disabled\\\");\\n\\n super.sendAndCall(from_, dstChainId_, toAddress_, amount_, payload_, dstGasForCall_, callparams_);\\n }\\n\\n function retryMessage(\\n uint16 _srcChainId,\\n bytes calldata _srcAddress,\\n uint64 _nonce,\\n bytes calldata _payload\\n ) public payable override {\\n bytes memory trustedRemote = trustedRemoteLookup[_srcChainId];\\n // it will still block the message pathway from (srcChainId, srcAddress). should not receive message from untrusted remote.\\n require(\\n _srcAddress.length == trustedRemote.length &&\\n trustedRemote.length > 0 &&\\n keccak256(_srcAddress) == keccak256(trustedRemote),\\n \\\"LzApp: invalid source sending contract\\\"\\n );\\n super.retryMessage(_srcChainId, _srcAddress, _nonce, _payload);\\n }\\n\\n /**\\n * @notice Empty implementation of renounce ownership to avoid any mishappening.\\n */\\n function renounceOwnership() public override {}\\n\\n /**\\n * @notice Return's the address of the inner token of this bridge.\\n * @return Address of the inner token of this bridge.\\n */\\n function token() public view override returns (address) {\\n return address(innerToken);\\n }\\n\\n /**\\n * @notice Checks if the sender is eligible to send tokens\\n * @param from_ Sender's address sending tokens\\n * @param dstChainId_ Chain id on which tokens should be sent\\n * @param amount_ Amount of tokens to be sent\\n */\\n function _isEligibleToSend(address from_, uint16 dstChainId_, uint256 amount_) internal {\\n // Check if the sender's address is whitelisted\\n bool isWhiteListedUser = whitelist[from_];\\n // Check if the user is whitelisted and return if true\\n if (isWhiteListedUser) {\\n return;\\n }\\n\\n // Calculate the amount in USD using the oracle price\\n uint256 amountInUsd;\\n Exp memory oraclePrice = Exp({ mantissa: oracle.getPrice(token()) });\\n amountInUsd = mul_ScalarTruncate(oraclePrice, amount_);\\n\\n // Load values for the 24-hour window checks\\n uint256 currentBlockTimestamp = block.timestamp;\\n uint256 lastDayWindowStart = chainIdToLast24HourWindowStart[dstChainId_];\\n uint256 transferredInWindow = chainIdToLast24HourTransferred[dstChainId_];\\n uint256 maxSingleTransactionLimit = chainIdToMaxSingleTransactionLimit[dstChainId_];\\n uint256 maxDailyLimit = chainIdToMaxDailyLimit[dstChainId_];\\n\\n // Revert if the amount exceeds the single transaction limit\\n require(amountInUsd <= maxSingleTransactionLimit, \\\"Single Transaction Limit Exceed\\\");\\n\\n // Check if the time window has changed (more than 24 hours have passed)\\n if (currentBlockTimestamp - lastDayWindowStart > 1 days) {\\n transferredInWindow = amountInUsd;\\n chainIdToLast24HourWindowStart[dstChainId_] = currentBlockTimestamp;\\n } else {\\n transferredInWindow += amountInUsd;\\n }\\n\\n // Revert if the amount exceeds the daily limit\\n require(transferredInWindow <= maxDailyLimit, \\\"Daily Transaction Limit Exceed\\\");\\n\\n // Update the amount for the 24-hour window\\n chainIdToLast24HourTransferred[dstChainId_] = transferredInWindow;\\n }\\n\\n /**\\n * @notice Checks if receiver is able to receive tokens\\n * @param toAddress_ Receiver address\\n * @param srcChainId_ Source chain id from which token is send\\n * @param receivedAmount_ Amount of tokens received\\n */\\n function _isEligibleToReceive(address toAddress_, uint16 srcChainId_, uint256 receivedAmount_) internal {\\n // Check if the recipient's address is whitelisted\\n bool isWhiteListedUser = whitelist[toAddress_];\\n // Check if the user is whitelisted and return if true\\n if (isWhiteListedUser) {\\n return;\\n }\\n\\n // Calculate the received amount in USD using the oracle price\\n uint256 receivedAmountInUsd;\\n Exp memory oraclePrice = Exp({ mantissa: oracle.getPrice(address(token())) });\\n receivedAmountInUsd = mul_ScalarTruncate(oraclePrice, receivedAmount_);\\n\\n uint256 currentBlockTimestamp = block.timestamp;\\n\\n // Load values for the 24-hour window checks for receiving\\n uint256 lastDayReceiveWindowStart = chainIdToLast24HourReceiveWindowStart[srcChainId_];\\n uint256 receivedInWindow = chainIdToLast24HourReceived[srcChainId_];\\n uint256 maxSingleReceiveTransactionLimit = chainIdToMaxSingleReceiveTransactionLimit[srcChainId_];\\n uint256 maxDailyReceiveLimit = chainIdToMaxDailyReceiveLimit[srcChainId_];\\n\\n // Check if the received amount exceeds the single transaction limit\\n require(receivedAmountInUsd <= maxSingleReceiveTransactionLimit, \\\"Single Transaction Limit Exceed\\\");\\n\\n // Check if the time window has changed (more than 24 hours have passed)\\n if (currentBlockTimestamp - lastDayReceiveWindowStart > 1 days) {\\n receivedInWindow = receivedAmountInUsd;\\n chainIdToLast24HourReceiveWindowStart[srcChainId_] = currentBlockTimestamp;\\n } else {\\n receivedInWindow += receivedAmountInUsd;\\n }\\n\\n // Revert if the received amount exceeds the daily limit\\n require(receivedInWindow <= maxDailyReceiveLimit, \\\"Daily Transaction Limit Exceed\\\");\\n\\n // Update the received amount for the 24-hour window\\n chainIdToLast24HourReceived[srcChainId_] = receivedInWindow;\\n }\\n\\n /**\\n * @notice Transfer tokens from sender to receiver account.\\n * @param from_ Address from which token has to be transferred(Sender).\\n * @param to_ Address on which token will be tranferred(Receiver).\\n * @param amount_ Amount of token to be transferred.\\n * @return Actual balance difference.\\n */\\n function _transferFrom(\\n address from_,\\n address to_,\\n uint256 amount_\\n ) internal override whenNotPaused returns (uint256) {\\n uint256 before = innerToken.balanceOf(to_);\\n if (from_ == address(this)) {\\n innerToken.safeTransfer(to_, amount_);\\n } else {\\n innerToken.safeTransferFrom(from_, to_, amount_);\\n }\\n return innerToken.balanceOf(to_) - before;\\n }\\n\\n /**\\n * @notice Returns Conversion rate factor from large decimals to shared decimals.\\n * @return Conversion rate factor.\\n */\\n function _ld2sdRate() internal view override returns (uint256) {\\n return ld2sdRate;\\n }\\n}\\n\",\"keccak256\":\"0x75d98574e674d1c3f35ac92c9e930d0238059b540d3385abeb14b20ef03cb13c\",\"license\":\"BSD-3-Clause\"},\"contracts/Bridge/XVSProxyOFTDest.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.13;\\n\\nimport { IXVS } from \\\"./interfaces/IXVS.sol\\\";\\nimport { BaseXVSProxyOFT } from \\\"./BaseXVSProxyOFT.sol\\\";\\n\\n/**\\n * @title XVSProxyOFTDest\\n * @author Venus\\n * @notice XVSProxyOFTDest contract builds upon the functionality of its parent contract, BaseXVSProxyOFT,\\n * and focuses on managing token transfers to the destination chain.\\n * It provides functions to check eligibility and perform the actual token transfers while maintaining strict access controls and pausing mechanisms.\\n */\\n\\ncontract XVSProxyOFTDest is BaseXVSProxyOFT {\\n /**\\n * @notice Emits when stored message dropped without successful retrying.\\n */\\n event DropFailedMessage(uint16 srcChainId, bytes indexed srcAddress, uint64 nonce);\\n\\n constructor(\\n address tokenAddress_,\\n uint8 sharedDecimals_,\\n address lzEndpoint_,\\n address oracle_\\n ) BaseXVSProxyOFT(tokenAddress_, sharedDecimals_, lzEndpoint_, oracle_) {}\\n\\n /**\\n * @notice Clear failed messages from the storage.\\n * @param srcChainId_ Chain id of source\\n * @param srcAddress_ Address of source followed by current bridge address\\n * @param nonce_ Nonce_ of the transaction\\n * @custom:access Only owner\\n * @custom:event Emits DropFailedMessage on clearance of failed message.\\n */\\n function dropFailedMessage(uint16 srcChainId_, bytes memory srcAddress_, uint64 nonce_) external onlyOwner {\\n failedMessages[srcChainId_][srcAddress_][nonce_] = bytes32(0);\\n emit DropFailedMessage(srcChainId_, srcAddress_, nonce_);\\n }\\n\\n /**\\n * @notice Returns the total circulating supply of the token on the destination chain i.e (total supply).\\n * @return total circulating supply of the token on the destination chain.\\n */\\n function circulatingSupply() public view override returns (uint256) {\\n return innerToken.totalSupply();\\n }\\n\\n /**\\n * @notice Debit tokens from the given address\\n * @param from_ Address from which tokens to be debited\\n * @param dstChainId_ Destination chain id\\n * @param amount_ Amount of tokens to be debited\\n * @return Actual amount debited\\n */\\n function _debitFrom(\\n address from_,\\n uint16 dstChainId_,\\n bytes32,\\n uint256 amount_\\n ) internal override whenNotPaused returns (uint256) {\\n require(from_ == _msgSender(), \\\"ProxyOFT: owner is not send caller\\\");\\n _isEligibleToSend(from_, dstChainId_, amount_);\\n IXVS(address(innerToken)).burn(from_, amount_);\\n return amount_;\\n }\\n\\n /**\\n * @notice Credit tokens in the given account\\n * @param srcChainId_ Source chain id\\n * @param toAddress_ Address on which token will be credited\\n * @param amount_ Amount of tokens to be credited\\n * @return Actual amount credited\\n */\\n function _creditTo(\\n uint16 srcChainId_,\\n address toAddress_,\\n uint256 amount_\\n ) internal override whenNotPaused returns (uint256) {\\n _isEligibleToReceive(toAddress_, srcChainId_, amount_);\\n IXVS(address(innerToken)).mint(toAddress_, amount_);\\n return amount_;\\n }\\n}\\n\",\"keccak256\":\"0x4a4bf23d37f26b82877c24326d81699f0ca217a593599fa179d45db8be919e50\",\"license\":\"BSD-3-Clause\"},\"contracts/Bridge/interfaces/IXVS.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.13;\\n\\n/**\\n * @title IXVS\\n * @author Venus\\n * @notice Interface implemented by `XVS` token.\\n */\\ninterface IXVS {\\n function mint(address to, uint256 amount) external;\\n\\n function burn(address from, uint256 amount) external;\\n}\\n\",\"keccak256\":\"0x55c954155c4499e8ef1915ad28c5567c247e4397dc12ba553b33c5edb1114dba\",\"license\":\"BSD-3-Clause\"}},\"version\":1}", + "bytecode": "0x6101006040523480156200001257600080fd5b5060405162005adf38038062005adf833981016040819052620000359162000379565b6000805460ff19169055838383838282818180806200005433620002c6565b6001600160a01b0316608052505060ff1660a05250620000769050846200031f565b62000081826200031f565b6200008c816200031f565b6001600160a01b03841660c081905260408051600481526024810182526020810180516001600160e01b031663313ce56760e01b179052905160009283929091620000d89190620003d6565b600060405180830381855afa9150503d806000811462000115576040519150601f19603f3d011682016040523d82523d6000602084013e6200011a565b606091505b509150915081620001815760405162461bcd60e51b815260206004820152602660248201527f50726f78794f46543a206661696c656420746f2067657420746f6b656e20646560448201526563696d616c7360d01b60648201526084015b60405180910390fd5b60008180602001905181019062000199919062000414565b90508060ff168660ff161115620002085760405162461bcd60e51b815260206004820152602c60248201527f50726f78794f46543a20736861726564446563696d616c73206d75737420626560448201526b203c3d20646563696d616c7360a01b606482015260840162000178565b6200021486826200044f565b6200022190600a62000574565b60e0526040516001600160a01b038816907f0b673f021ff9a27bbe58f282908695869e130b3103029190387b83650806c2c390600090a26040516001600160a01b038516906000907f05cd89403c6bdeac21c2ff33de395121a31fa1bc2bf3adf4825f1f86e79969dd908290a35050600780546001600160a01b0390931661010002610100600160a81b03199093169290921790915550620005859650505050505050565b600080546001600160a01b03838116610100818102610100600160a81b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b6001600160a01b03811662000347576040516342bcdf7f60e11b815260040160405180910390fd5b50565b80516001600160a01b03811681146200036257600080fd5b919050565b805160ff811681146200036257600080fd5b600080600080608085870312156200039057600080fd5b6200039b856200034a565b9350620003ab6020860162000367565b9250620003bb604086016200034a565b9150620003cb606086016200034a565b905092959194509250565b6000825160005b81811015620003f95760208186018101518583015201620003dd565b8181111562000409576000828501525b509190910192915050565b6000602082840312156200042757600080fd5b620004328262000367565b9392505050565b634e487b7160e01b600052601160045260246000fd5b600060ff821660ff8416808210156200046c576200046c62000439565b90039392505050565b600181815b80851115620004b65781600019048211156200049a576200049a62000439565b80851615620004a857918102915b93841c93908002906200047a565b509250929050565b600082620004cf575060016200056e565b81620004de575060006200056e565b8160018114620004f75760028114620005025762000522565b60019150506200056e565b60ff84111562000516576200051662000439565b50506001821b6200056e565b5060208310610133831016604e8410600b841016171562000547575081810a6200056e565b62000553838362000475565b80600019048211156200056a576200056a62000439565b0290505b92915050565b60006200043260ff841683620004be565b60805160a05160c05160e05161548d62000652600039600081816130d4015281816136470152613b82015260008181610ca10152818161106801528181611ba701528181612d7501528181612e0101528181612e3a01528181612e830152818161371d01528181613beb01528181613db401526141e4015260006108be015260008181610abe01528181610cf501528181610f3c01528181610fe40152818161142601528181611ed9015281816123cc015281816125a701528181612aa501526138ab015261548d6000f3fe6080604052600436106103b75760003560e01c80637dc0d1d0116101f2578063baf3292d1161010d578063df2a5b3b116100a0578063f2fde38b1161006f578063f2fde38b14610c52578063f5ecbdbc14610c72578063fc0c546a14610c92578063fdff235b14610cc557600080fd5b8063df2a5b3b14610bdd578063e6a20ae614610bfd578063eaffd49a14610c12578063eb8d72b714610c3257600080fd5b8063cc01e9b6116100dc578063cc01e9b614610b50578063cc7015ae14610b70578063d1deba1f14610b9d578063d708a46814610bb057600080fd5b8063baf3292d14610ae0578063c1e9132e14610b00578063c446183414610b1a578063cbed8b9c14610b3057600080fd5b806393a61d6c116101855780639f38369a116101545780639f38369a14610a4c578063a4c51df514610a6c578063a6c3d16514610a8c578063b353aaa714610aac57600080fd5b806393a61d6c1461097d578063950c8a74146109aa5780639b19251a146109ca5780639bdb9812146109fa57600080fd5b80638cfd8f5c116101c15780638cfd8f5c146108e05780638da5cb5b14610918578063904365671461093b5780639358928b1461096857600080fd5b80637dc0d1d01461083a5780638456cb591461087757806384e69c691461088c578063857749b0146108ac57600080fd5b80634c42899a116102e257806364aff9ec11610275578063715018a611610244578063715018a6146107ce5780637533d788146107da57806376203b48146108075780637adbf9731461081a57600080fd5b806364aff9ec1461075b57806366ad5c8a1461077b578063695ef6bf1461079b57806369c1e7b8146107ae57600080fd5b806353489d6c116102b157806353489d6c146106b457806353d6fd59146106d45780635b8c41e6146106f45780635c975abb1461074357600080fd5b80634c42899a146106135780634cec62561461063a5780634ed2c662146106675780634f4ba0f41461068757600080fd5b80632dbbec081161035a5780633f1f4fa4116103295780633f1f4fa41461059c5780633f4ba83a146105c957806342d65a8d146105de57806344770515146105fe57600080fd5b80632dbbec08146104ec578063365260b41461050c5780633c4ec39b146105415780633d8b38f61461057c57600080fd5b80630df37483116103965780630df374831461043357806310ddb13714610453578063182b4b89146104735780632488eec8146104cc57600080fd5b80621d3567146103bc57806301ffc9a7146103de57806307e0db1714610413575b600080fd5b3480156103c857600080fd5b506103dc6103d736600461466d565b610cf2565b005b3480156103ea57600080fd5b506103fe6103f9366004614700565b610ee4565b60405190151581526020015b60405180910390f35b34801561041f57600080fd5b506103dc61042e36600461472a565b610f1b565b34801561043f57600080fd5b506103dc61044e366004614745565b610fa4565b34801561045f57600080fd5b506103dc61046e36600461472a565b610fc3565b34801561047f57600080fd5b5061049361048e366004614784565b61101b565b6040805197151588526020880196909652948601939093526060850191909152608084015260a0830152151560c082015260e00161040a565b3480156104d857600080fd5b506103dc6104e7366004614745565b611191565b3480156104f857600080fd5b506103dc61050736600461472a565b611275565b34801561051857600080fd5b5061052c6105273660046147d0565b6112d4565b6040805192835260208301919091520161040a565b34801561054d57600080fd5b5061056e61055c36600461472a565b600d6020526000908152604090205481565b60405190815260200161040a565b34801561058857600080fd5b506103fe610597366004614837565b611329565b3480156105a857600080fd5b5061056e6105b736600461472a565b60036020526000908152604090205481565b3480156105d557600080fd5b506103dc6113f5565b3480156105ea57600080fd5b506103dc6105f9366004614837565b611407565b34801561060a57600080fd5b5061056e600081565b34801561061f57600080fd5b50610628600081565b60405160ff909116815260200161040a565b34801561064657600080fd5b5061056e61065536600461472a565b600a6020526000908152604090205481565b34801561067357600080fd5b506103dc610682366004614889565b61148d565b34801561069357600080fd5b5061056e6106a236600461472a565b60096020526000908152604090205481565b3480156106c057600080fd5b506103dc6106cf366004614745565b6114d2565b3480156106e057600080fd5b506103dc6106ef3660046148a6565b6115b6565b34801561070057600080fd5b5061056e61070f36600461494c565b6005602090815260009384526040808520845180860184018051928152908401958401959095209452929052825290205481565b34801561074f57600080fd5b5060005460ff166103fe565b34801561076757600080fd5b506103dc6107763660046149ec565b61162e565b34801561078757600080fd5b506103dc61079636600461466d565b611735565b6103dc6107a9366004614a45565b611811565b3480156107ba57600080fd5b506103dc6107c9366004614745565b61187c565b3480156103dc57600080fd5b3480156107e657600080fd5b506107fa6107f536600461472a565b611968565b60405161040a9190614b10565b6103dc610815366004614b23565b611a02565b34801561082657600080fd5b506103dc610835366004614bd5565b611a6e565b34801561084657600080fd5b5060075461085f9061010090046001600160a01b031681565b6040516001600160a01b03909116815260200161040a565b34801561088357600080fd5b506103dc611ae6565b34801561089857600080fd5b506103dc6108a736600461494c565b611af6565b3480156108b857600080fd5b506106287f000000000000000000000000000000000000000000000000000000000000000081565b3480156108ec57600080fd5b5061056e6108fb366004614bf2565b600260209081526000928352604080842090915290825290205481565b34801561092457600080fd5b5060005461010090046001600160a01b031661085f565b34801561094757600080fd5b5061056e61095636600461472a565b600c6020526000908152604090205481565b34801561097457600080fd5b5061056e611ba3565b34801561098957600080fd5b5061056e61099836600461472a565b600b6020526000908152604090205481565b3480156109b657600080fd5b5060045461085f906001600160a01b031681565b3480156109d657600080fd5b506103fe6109e5366004614bd5565b60106020526000908152604090205460ff1681565b348015610a0657600080fd5b506103fe610a1536600461494c565b6006602090815260009384526040808520845180860184018051928152908401958401959095209452929052825290205460ff1681565b348015610a5857600080fd5b506107fa610a6736600461472a565b611c2c565b348015610a7857600080fd5b5061052c610a87366004614c25565b611d42565b348015610a9857600080fd5b506103dc610aa7366004614837565b611dd1565b348015610ab857600080fd5b5061085f7f000000000000000000000000000000000000000000000000000000000000000081565b348015610aec57600080fd5b506103dc610afb366004614bd5565b611e64565b348015610b0c57600080fd5b506007546103fe9060ff1681565b348015610b2657600080fd5b5061056e61271081565b348015610b3c57600080fd5b506103dc610b4b366004614ce2565b611eba565b348015610b5c57600080fd5b506103dc610b6b366004614745565b611f4f565b348015610b7c57600080fd5b5061056e610b8b36600461472a565b60086020526000908152604090205481565b6103dc610bab36600461466d565b61203b565b348015610bbc57600080fd5b5061056e610bcb36600461472a565b600e6020526000908152604090205481565b348015610be957600080fd5b506103dc610bf8366004614d50565b61213f565b348015610c0957600080fd5b50610628600181565b348015610c1e57600080fd5b506103dc610c2d366004614d6e565b6121a9565b348015610c3e57600080fd5b506103dc610c4d366004614837565b6122c8565b348015610c5e57600080fd5b506103dc610c6d366004614bd5565b612322565b348015610c7e57600080fd5b506107fa610c8d366004614e36565b61239b565b348015610c9e57600080fd5b507f000000000000000000000000000000000000000000000000000000000000000061085f565b348015610cd157600080fd5b5061056e610ce036600461472a565b600f6020526000908152604090205481565b337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610d6f5760405162461bcd60e51b815260206004820152601e60248201527f4c7a4170703a20696e76616c696420656e64706f696e742063616c6c6572000060448201526064015b60405180910390fd5b61ffff861660009081526001602052604081208054610d8d90614e83565b80601f0160208091040260200160405190810160405280929190818152602001828054610db990614e83565b8015610e065780601f10610ddb57610100808354040283529160200191610e06565b820191906000526020600020905b815481529060010190602001808311610de957829003601f168201915b50505050509050805186869050148015610e21575060008151115b8015610e49575080516020820120604051610e3f9088908890614eb7565b6040518091039020145b610e655760405162461bcd60e51b8152600401610d6690614ec7565b610edb8787878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8a018190048102820181019092528881528a93509150889088908190840183828082843760009201919091525061244e92505050565b50505050505050565b60006001600160e01b03198216631f7ecdf760e01b1480610f1557506301ffc9a760e01b6001600160e01b03198316145b92915050565b610f236124c7565b6040516307e0db1760e01b815261ffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906307e0db17906024015b600060405180830381600087803b158015610f8957600080fd5b505af1158015610f9d573d6000803e3d6000fd5b5050505050565b610fac6124c7565b61ffff909116600090815260036020526040902055565b610fcb6124c7565b6040516310ddb13760e01b815261ffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906310ddb13790602401610f6f565b6001600160a01b03838116600090815260106020908152604080832054815192830190915260075492938493849384938493849360ff909216928492909182916101009004166341976e097f00000000000000000000000000000000000000000000000000000000000000006040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa1580156110cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110ef9190614f0d565b905290506110fd818a612527565b61ffff8b166000908152600b6020908152604080832054600a835281842054600884528285205460099094529190932054919a509098509196509094509250426201518061114b8583614f3c565b111561115c57859450809350611169565b6111668686614f53565b94505b828061118057508786111580156111805750868511155b985050509397509397509397909450565b6111996124c7565b61ffff821660009081526008602052604090205481101561120b5760405162461bcd60e51b815260206004820152602660248201527f4461696c79206c696d6974203c2073696e676c65207472616e73616374696f6e604482015265081b1a5b5a5d60d21b6064820152608401610d66565b61ffff82166000818152600960209081526040918290205482519384529083015281018290527f4dd31065e259d5284e44d1f9265710da72eafcf78dc925e3881189fc3b71f6939060600160405180910390a161ffff909116600090815260096020526040902055565b61127d6124c7565b61ffff81166000908152600160205260408120611299916144b0565b60405161ffff821681527f6d5075c81d4d9e75bec6052f4e44f58f8a8cf1327544addbbf015fb06f83bd37906020015b60405180910390a150565b60008061131a8888888888888080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061253f92505050565b91509150965096945050505050565b61ffff83166000908152600160205260408120805482919061134a90614e83565b80601f016020809104026020016040519081016040528092919081815260200182805461137690614e83565b80156113c35780601f10611398576101008083540402835291602001916113c3565b820191906000526020600020905b8154815290600101906020018083116113a657829003601f168201915b5050505050905083836040516113da929190614eb7565b60405180910390208180519060200120149150509392505050565b6113fd6124c7565b611405612633565b565b61140f6124c7565b6040516342d65a8d60e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906342d65a8d9061145f90869086908690600401614f94565b600060405180830381600087803b15801561147957600080fd5b505af1158015610edb573d6000803e3d6000fd5b6114956124c7565b6007805460ff19168215159081179091556040517fe628f01c6f4e6340598d3a2913390db68e8859379eebff349e170f2b16baed0090600090a250565b6114da6124c7565b61ffff821660009081526009602052604090205481111561154c5760405162461bcd60e51b815260206004820152602660248201527f53696e676c65207472616e73616374696f6e206c696d6974203e204461696c79604482015265081b1a5b5a5d60d21b6064820152608401610d66565b61ffff82166000818152600860209081526040918290205482519384529083015281018290527f7babeac42ccbb33537ee421fedc4db7b5f251b5d2a3fa5c0ff4b35b2d783be879060600160405180910390a161ffff909116600090815260086020526040902055565b6115be6124c7565b816001600160a01b03167ff6019ec0a78d156d249a1ec7579e2321f6ac7521d6e1d2eacf90ba4a184dcceb826040516115fb911515815260200190565b60405180910390a26001600160a01b03919091166000908152601060205260409020805460ff1916911515919091179055565b6116366124c7565b6040516370a0823160e01b81523060048201526000906001600160a01b038516906370a0823190602401602060405180830381865afa15801561167d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116a19190614f0d565b9050808211156116ce5760405163cf47918160e01b81526004810183905260248101829052604401610d66565b826001600160a01b0316846001600160a01b03167f6d25be279134f4ecaa4770aff0c3d916d9e7c5ef37b65ed95dbdba411f5d54d58460405161171391815260200190565b60405180910390a361172f6001600160a01b0385168484612685565b50505050565b3330146117935760405162461bcd60e51b815260206004820152602660248201527f4e6f6e626c6f636b696e674c7a4170703a2063616c6c6572206d7573742062656044820152650204c7a4170760d41b6064820152608401610d66565b6118098686868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8901819004810282018101909252878152899350915087908790819084018382808284376000920191909152506126ed92505050565b505050505050565b611809858585856118256020870187614bd5565b6118356040880160208901614bd5565b6118426040890189614fb2565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061277492505050565b6118846124c7565b61ffff82166000908152600c60205260409020548110156118fe5760405162461bcd60e51b815260206004820152602e60248201527f4461696c79206c696d6974203c2073696e676c6520726563656976652074726160448201526d1b9cd858dd1a5bdb881b1a5b5a5d60921b6064820152608401610d66565b61ffff82166000818152600d60209081526040918290205482519384529083015281018290527f95dc51094cd27cf4ee3fd0dbb50cf96f8df1629c822f5434c4a34d7eb03c97249060600160405180910390a161ffff9091166000908152600d6020526040902055565b6001602052600090815260409020805461198190614e83565b80601f01602080910402602001604051908101604052809291908181526020018280546119ad90614e83565b80156119fa5780601f106119cf576101008083540402835291602001916119fa565b820191906000526020600020905b8154815290600101906020018083116119dd57829003601f168201915b505050505081565b60075460ff16611a545760405162461bcd60e51b815260206004820152601760248201527f73656e64416e6443616c6c2069732064697361626c65640000000000000000006044820152606401610d66565b611a64888888888888888861285c565b5050505050505050565b611a766124c7565b611a7f81612900565b6007546040516001600160a01b0380841692610100900416907f05cd89403c6bdeac21c2ff33de395121a31fa1bc2bf3adf4825f1f86e79969dd90600090a3600780546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b611aee6124c7565b611405612927565b611afe6124c7565b61ffff83166000908152600560205260408082209051611b1f908590614ff8565b9081526040805191829003602090810183206001600160401b038616600090815291522091909155611b52908390614ff8565b6040805191829003822061ffff861683526001600160401b0384166020840152917f48a980eea4ea1c540209e2f9f32a4c2edf51fab37b1d21f453868301ecb6e2ee910160405180910390a2505050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611c03573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c279190614f0d565b905090565b61ffff8116600090815260016020526040812080546060929190611c4f90614e83565b80601f0160208091040260200160405190810160405280929190818152602001828054611c7b90614e83565b8015611cc85780601f10611c9d57610100808354040283529160200191611cc8565b820191906000526020600020905b815481529060010190602001808311611cab57829003601f168201915b505050505090508051600003611d205760405162461bcd60e51b815260206004820152601d60248201527f4c7a4170703a206e6f20747275737465642070617468207265636f72640000006044820152606401610d66565b611d3b600060148351611d339190614f3c565b839190612964565b9392505050565b600080611dbf8b8b8b8b8b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8d018190048102820181019092528b81528e93508d9250908c908c9081908401838280828437600092019190915250612a7192505050565b91509150995099975050505050505050565b611dd96124c7565b818130604051602001611dee93929190615014565b60408051601f1981840301815291815261ffff85166000908152600160209081529190208251611e23939192909101906144ea565b507f8c0400cfe2d1199b1a725c78960bcc2a344d869b80590d0f2bd005db15a572ce838383604051611e5793929190614f94565b60405180910390a1505050565b611e6c6124c7565b600480546001600160a01b0319166001600160a01b0383169081179091556040519081527f5db758e995a17ec1ad84bdef7e8c3293a0bd6179bcce400dff5d4c3d87db726b906020016112c9565b611ec26124c7565b6040516332fb62e760e21b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063cbed8b9c90611f16908890889088908890889060040161503a565b600060405180830381600087803b158015611f3057600080fd5b505af1158015611f44573d6000803e3d6000fd5b505050505050505050565b611f576124c7565b61ffff82166000908152600d6020526040902054811115611fd15760405162461bcd60e51b815260206004820152602e60248201527f73696e676c652072656365697665207472616e73616374696f6e206c696d697460448201526d080f8811185a5b1e481b1a5b5a5d60921b6064820152608401610d66565b61ffff82166000818152600c60209081526040918290205482519384529083015281018290527f2c42997a938a029910a78e7c28d762b349c28e70f3a89c1fbccbb1a46020b1599060600160405180910390a161ffff9091166000908152600c6020526040902055565b61ffff86166000908152600160205260408120805461205990614e83565b80601f016020809104026020016040519081016040528092919081815260200182805461208590614e83565b80156120d25780601f106120a7576101008083540402835291602001916120d2565b820191906000526020600020905b8154815290600101906020018083116120b557829003601f168201915b505050505090508051868690501480156120ed575060008151115b801561211557508051602082012060405161210b9088908890614eb7565b6040518091039020145b6121315760405162461bcd60e51b8152600401610d6690614ec7565b610edb878787878787612b33565b6121476124c7565b61ffff83811660008181526002602090815260408083209487168084529482529182902085905581519283528201929092529081018290527f9d5c7c0b934da8fefa9c7760c98383778a12dfbfc0c3b3106518f43fb9508ac090606001611e57565b3330146121f85760405162461bcd60e51b815260206004820152601f60248201527f4f4654436f72653a2063616c6c6572206d757374206265204f4654436f7265006044820152606401610d66565b612203308686612d49565b9350846001600160a01b03168a61ffff167fbf551ec93859b170f9b2141bd9298bf3f64322c6f7beb2543a0cb669834118bf8660405161224591815260200190565b60405180910390a3604051633fe79aed60e11b81526001600160a01b03861690637fcf35da908390612289908e908e908e908e908e908d908d908d90600401615068565b600060405180830381600088803b1580156122a357600080fd5b5087f11580156122b7573d6000803e3d6000fd5b505050505050505050505050505050565b6122d06124c7565b61ffff831660009081526001602052604090206122ee90838361456e565b507ffa41487ad5d6728f0b19276fa1eddc16558578f5109fc39d2dc33c3230470dab838383604051611e5793929190614f94565b61232a6124c7565b6001600160a01b03811661238f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610d66565b61239881612f03565b50565b604051633d7b2f6f60e21b815261ffff808616600483015284166024820152306044820152606481018290526060907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063f5ecbdbc90608401600060405180830381865afa15801561241b573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261244391908101906150c3565b90505b949350505050565b6000806124b15a60966366ad5c8a60e01b898989896040516024016124769493929190615130565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915230929190612f5c565b9150915081611809576118098686868685612fe6565b6000546001600160a01b036101009091041633146114055760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610d66565b6000806125348484613083565b9050612446816130b4565b600080600061258d87612551886130cc565b6040805160006020820152602181019390935260c09190911b6001600160c01b0319166041830152805160298184030181526049909201905290565b60405163040a7bb160e41b81529091506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906340a7bb10906125e4908b90309086908b908b9060040161516e565b6040805180830381865afa158015612600573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061262491906151c2565b92509250509550959350505050565b61263b613152565b6000805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6040516001600160a01b0383166024820152604481018290526126e890849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915261319b565b505050565b60006126f98282613270565b905060ff81166127145761270f858585856132cc565b610f9d565b60001960ff82160161272c5761270f8585858561335c565b60405162461bcd60e51b815260206004820152601c60248201527f4f4654436f72653a20756e6b6e6f776e207061636b65742074797065000000006044820152606401610d66565b60006127828782848161356a565b61278b8561363f565b50905061279a8888888461367f565b9050600081116127e85760405162461bcd60e51b815260206004820152601960248201527813d19510dbdc994e88185b5bdd5b9d081d1bdbc81cdb585b1b603a1b6044820152606401610d66565b60006127f787612551846130cc565b9050612807888287878734613782565b86896001600160a01b03168961ffff167fd81fc9b8523134ed613870ed029d6170cbb73aa6a6bc311b9a642689fb9df59a8560405161284891815260200190565b60405180910390a450979650505050505050565b611f448888888888888080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508a92506128a99150506020890189614bd5565b6128b960408a0160208b01614bd5565b6128c660408b018b614fb2565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061392792505050565b6001600160a01b038116612398576040516342bcdf7f60e11b815260040160405180910390fd5b61292f613a1c565b6000805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586126683390565b60608161297281601f614f53565b10156129b15760405162461bcd60e51b815260206004820152600e60248201526d736c6963655f6f766572666c6f7760901b6044820152606401610d66565b6129bb8284614f53565b845110156129ff5760405162461bcd60e51b8152602060048201526011602482015270736c6963655f6f75744f66426f756e647360781b6044820152606401610d66565b606082158015612a1e5760405191506000825260208201604052612a68565b6040519150601f8416801560200281840101858101878315602002848b0101015b81831015612a57578051835260209283019201612a3f565b5050858452601f01601f1916604052505b50949350505050565b6000806000612a8b338a612a848b6130cc565b8a8a613a62565b60405163040a7bb160e41b81529091506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906340a7bb1090612ae2908d90309086908b908b9060040161516e565b6040805180830381865afa158015612afe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b2291906151c2565b925092505097509795505050505050565b61ffff86166000908152600560205260408082209051612b569088908890614eb7565b90815260408051602092819003830190206001600160401b03871660009081529252902054905080612bd65760405162461bcd60e51b815260206004820152602360248201527f4e6f6e626c6f636b696e674c7a4170703a206e6f2073746f726564206d65737360448201526261676560e81b6064820152608401610d66565b808383604051612be7929190614eb7565b604051809103902014612c465760405162461bcd60e51b815260206004820152602160248201527f4e6f6e626c6f636b696e674c7a4170703a20696e76616c6964207061796c6f616044820152601960fa1b6064820152608401610d66565b61ffff87166000908152600560205260408082209051612c699089908990614eb7565b90815260408051602092819003830181206001600160401b038916600090815290845282902093909355601f88018290048202830182019052868252612d01918991899089908190840183828082843760009201919091525050604080516020601f8a018190048102820181019092528881528a9350915088908890819084018382808284376000920191909152506126ed92505050565b7fc264d91f3adc5588250e1551f547752ca0cfa8f6b530d243b9f9f4cab10ea8e58787878785604051612d389594939291906151e6565b60405180910390a150505050505050565b6000612d53613a1c565b6040516370a0823160e01b81526001600160a01b0384811660048301526000917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa158015612dbe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612de29190614f0d565b9050306001600160a01b03861603612e2d57612e286001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168585612685565b612e62565b612e626001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016868686613aa3565b6040516370a0823160e01b81526001600160a01b03858116600483015282917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa158015612ecc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ef09190614f0d565b612efa9190614f3c565b95945050505050565b600080546001600160a01b03838116610100818102610100600160a81b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b6000606060008060008661ffff166001600160401b03811115612f8157612f816148df565b6040519080825280601f01601f191660200182016040528015612fab576020820181803683370190505b50905060008087516020890160008d8df191503d925086831115612fcd578692505b828152826000602083013e909890975095505050505050565b8180519060200120600560008761ffff1661ffff168152602001908152602001600020856040516130179190614ff8565b9081526040805191829003602090810183206001600160401b0388166000908152915220919091557fe183f33de2837795525b4792ca4cd60535bd77c53b7e7030060bfcf5734d6b0c906130749087908790879087908790615221565b60405180910390a15050505050565b60408051602081019091526000815260405180602001604052806130ab856000015185613adb565b90529392505050565b8051600090610f1590670de0b6b3a764000090615289565b6000806130f97f000000000000000000000000000000000000000000000000000000000000000084615289565b90506001600160401b03811115610f155760405162461bcd60e51b815260206004820152601a60248201527f4f4654436f72653a20616d6f756e745344206f766572666c6f770000000000006044820152606401610d66565b60005460ff166114055760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610d66565b60006131f0826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316613ae79092919063ffffffff16565b9050805160001480613211575080806020019051810190613211919061529d565b6126e85760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610d66565b600061327d826001614f53565b835110156132c35760405162461bcd60e51b8152602060048201526013602482015272746f55696e74385f6f75744f66426f756e647360681b6044820152606401610d66565b50016001015190565b6000806132d883613af6565b90925090506001600160a01b0382166132f15761dead91505b60006132fc82613b7b565b9050613309878483613bb0565b9050826001600160a01b03168761ffff167fbf551ec93859b170f9b2141bd9298bf3f64322c6f7beb2543a0cb669834118bf8360405161334b91815260200190565b60405180910390a350505050505050565b600080600080600061336d86613c4f565b945094509450945094506000600660008b61ffff1661ffff168152602001908152602001600020896040516133a29190614ff8565b90815260408051602092819003830190206001600160401b038b166000908152925281205460ff1691506133d585613b7b565b905081613443576133e78b3083613bb0565b61ffff8c1660009081526006602052604090819020905191925060019161340f908d90614ff8565b90815260408051602092819003830190206001600160401b038d16600090815292529020805460ff19169115159190911790555b6001600160a01b0386163b61349a576040516001600160a01b03871681527f9aedf5fdba8716db3b6705ca00150643309995d4f818a249ed6dde6677e7792d9060200160405180910390a15050505050505061172f565b8a8a8a8a8a8a868a60008a6134b8578b6001600160401b03166134ba565b5a5b90506000806134ec5a609663eaffd49a60e01b8e8e8e8d8d8d8d8d6040516024016124769897969594939291906152ba565b915091508115613545578751602089012060405161ffff8d16907fb8890edbfc1c74692f527444645f95489c3703cc2df42e4a366f5d06fa6cd88490613537908e908e90869061532e565b60405180910390a250613552565b6135528b8b8b8b85612fe6565b50505050505050505050505050505050505050505050565b600061357583613d06565b61ffff808716600090815260026020908152604080832093891683529290522054909150806135e65760405162461bcd60e51b815260206004820152601a60248201527f4c7a4170703a206d696e4761734c696d6974206e6f74207365740000000000006044820152606401610d66565b6135f08382614f53565b8210156118095760405162461bcd60e51b815260206004820152601b60248201527f4c7a4170703a20676173206c696d697420697320746f6f206c6f7700000000006044820152606401610d66565b60008061366c7f00000000000000000000000000000000000000000000000000000000000000008461535c565b90506136788184614f3c565b9150915091565b6000613689613a1c565b6001600160a01b03851633146136ec5760405162461bcd60e51b815260206004820152602260248201527f50726f78794f46543a206f776e6572206973206e6f742073656e642063616c6c60448201526132b960f11b6064820152608401610d66565b6136f7858584613d62565b604051632770a7eb60e21b81526001600160a01b038681166004830152602482018490527f00000000000000000000000000000000000000000000000000000000000000001690639dc29fac90604401600060405180830381600087803b15801561376157600080fd5b505af1158015613775573d6000803e3d6000fd5b5093979650505050505050565b61ffff8616600090815260016020526040812080546137a090614e83565b80601f01602080910402602001604051908101604052809291908181526020018280546137cc90614e83565b80156138195780601f106137ee57610100808354040283529160200191613819565b820191906000526020600020905b8154815290600101906020018083116137fc57829003601f168201915b50505050509050805160000361388a5760405162461bcd60e51b815260206004820152603060248201527f4c7a4170703a2064657374696e6174696f6e20636861696e206973206e6f742060448201526f61207472757374656420736f7572636560801b6064820152608401610d66565b613895878751613f84565b60405162c5803160e81b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063c58031009084906138ec908b9086908c908c908c908c90600401615370565b6000604051808303818588803b15801561390557600080fd5b505af1158015613919573d6000803e3d6000fd5b505050505050505050505050565b600061393f896001846001600160401b03891661356a565b6139488761363f565b5090506139578a8a8a8461367f565b9050600081116139a55760405162461bcd60e51b815260206004820152601960248201527813d19510dbdc994e88185b5bdd5b9d081d1bdbc81cdb585b1b603a1b6044820152606401610d66565b60006139b5338a612a84856130cc565b90506139c58a8287878734613782565b888b6001600160a01b03168b61ffff167fd81fc9b8523134ed613870ed029d6170cbb73aa6a6bc311b9a642689fb9df59a85604051613a0691815260200190565b60405180910390a4509998505050505050505050565b60005460ff16156114055760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610d66565b6060600185856001600160a01b0389168587604051602001613a89969594939291906153d7565b604051602081830303815290604052905095945050505050565b6040516001600160a01b038085166024830152831660448201526064810182905261172f9085906323b872dd60e01b906084016126b1565b6000611d3b8284615438565b60606124468484600085613ff5565b60008080613b048482613270565b60ff16148015613b15575082516029145b613b5c5760405162461bcd60e51b815260206004820152601860248201527713d19510dbdc994e881a5b9d985b1a59081c185e5b1bd85960421b6044820152606401610d66565b613b6783600d6140d0565b9150613b74836021614135565b9050915091565b6000610f157f00000000000000000000000000000000000000000000000000000000000000006001600160401b038416615438565b6000613bba613a1c565b613bc5838584614192565b6040516340c10f1960e01b81526001600160a01b038481166004830152602482018490527f000000000000000000000000000000000000000000000000000000000000000016906340c10f1990604401600060405180830381600087803b158015613c2f57600080fd5b505af1158015613c43573d6000803e3d6000fd5b50939695505050505050565b600080806060816001613c628783613270565b60ff1614613cad5760405162461bcd60e51b815260206004820152601860248201527713d19510dbdc994e881a5b9d985b1a59081c185e5b1bd85960421b6044820152606401610d66565b613cb886600d6140d0565b9350613cc5866021614135565b9250613cd28660296143b4565b9450613cdf866049614135565b9050613cfb6051808851613cf39190614f3c565b889190612964565b915091939590929450565b6000602282511015613d5a5760405162461bcd60e51b815260206004820152601c60248201527f4c7a4170703a20696e76616c69642061646170746572506172616d73000000006044820152606401610d66565b506022015190565b6001600160a01b03831660009081526010602052604090205460ff168015613d8a5750505050565b60408051602081019091526007546000918291819061010090046001600160a01b03166341976e097f00000000000000000000000000000000000000000000000000000000000000006040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015613e17573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613e3b9190614f0d565b90529050613e498185612527565b61ffff86166000908152600b6020908152604080832054600a835281842054600884528285205460099094529190932054939550429390919081871115613ed25760405162461bcd60e51b815260206004820152601f60248201527f53696e676c65205472616e73616374696f6e204c696d697420457863656564006044820152606401610d66565b62015180613ee08587614f3c565b1115613f045761ffff8a166000908152600b60205260409020859055869250613f11565b613f0e8784614f53565b92505b80831115613f615760405162461bcd60e51b815260206004820152601e60248201527f4461696c79205472616e73616374696f6e204c696d69742045786365656400006044820152606401610d66565b505061ffff9097166000908152600a602052604090209690965550505050505050565b61ffff821660009081526003602052604081205490819003613fa557506127105b808211156126e85760405162461bcd60e51b815260206004820181905260248201527f4c7a4170703a207061796c6f61642073697a6520697320746f6f206c617267656044820152606401610d66565b6060824710156140565760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610d66565b600080866001600160a01b031685876040516140729190614ff8565b60006040518083038185875af1925050503d80600081146140af576040519150601f19603f3d011682016040523d82523d6000602084013e6140b4565b606091505b50915091506140c587838387614412565b979650505050505050565b60006140dd826014614f53565b835110156141255760405162461bcd60e51b8152602060048201526015602482015274746f416464726573735f6f75744f66426f756e647360581b6044820152606401610d66565b500160200151600160601b900490565b6000614142826008614f53565b835110156141895760405162461bcd60e51b8152602060048201526014602482015273746f55696e7436345f6f75744f66426f756e647360601b6044820152606401610d66565b50016008015190565b6001600160a01b03831660009081526010602052604090205460ff1680156141ba5750505050565b60408051602081019091526007546000918291819061010090046001600160a01b03166341976e097f00000000000000000000000000000000000000000000000000000000000000006040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015614247573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061426b9190614f0d565b905290506142798185612527565b61ffff86166000908152600f6020908152604080832054600e835281842054600c845282852054600d90945291909320549395504293909190818711156143025760405162461bcd60e51b815260206004820152601f60248201527f53696e676c65205472616e73616374696f6e204c696d697420457863656564006044820152606401610d66565b620151806143108587614f3c565b11156143345761ffff8a166000908152600f60205260409020859055869250614341565b61433e8784614f53565b92505b808311156143915760405162461bcd60e51b815260206004820152601e60248201527f4461696c79205472616e73616374696f6e204c696d69742045786365656400006044820152606401610d66565b505061ffff9097166000908152600e602052604090209690965550505050505050565b60006143c1826020614f53565b835110156144095760405162461bcd60e51b8152602060048201526015602482015274746f427974657333325f6f75744f66426f756e647360581b6044820152606401610d66565b50016020015190565b6060831561448157825160000361447a576001600160a01b0385163b61447a5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610d66565b5081612446565b61244683838151156144965781518083602001fd5b8060405162461bcd60e51b8152600401610d669190614b10565b5080546144bc90614e83565b6000825580601f106144cc575050565b601f01602090049060005260206000209081019061239891906145e2565b8280546144f690614e83565b90600052602060002090601f016020900481019282614518576000855561455e565b82601f1061453157805160ff191683800117855561455e565b8280016001018555821561455e579182015b8281111561455e578251825591602001919060010190614543565b5061456a9291506145e2565b5090565b82805461457a90614e83565b90600052602060002090601f01602090048101928261459c576000855561455e565b82601f106145b55782800160ff1982351617855561455e565b8280016001018555821561455e579182015b8281111561455e5782358255916020019190600101906145c7565b5b8082111561456a57600081556001016145e3565b803561ffff8116811461460957600080fd5b919050565b60008083601f84011261462057600080fd5b5081356001600160401b0381111561463757600080fd5b60208301915083602082850101111561464f57600080fd5b9250929050565b80356001600160401b038116811461460957600080fd5b6000806000806000806080878903121561468657600080fd5b61468f876145f7565b955060208701356001600160401b03808211156146ab57600080fd5b6146b78a838b0161460e565b90975095508591506146cb60408a01614656565b945060608901359150808211156146e157600080fd5b506146ee89828a0161460e565b979a9699509497509295939492505050565b60006020828403121561471257600080fd5b81356001600160e01b031981168114611d3b57600080fd5b60006020828403121561473c57600080fd5b611d3b826145f7565b6000806040838503121561475857600080fd5b614761836145f7565b946020939093013593505050565b6001600160a01b038116811461239857600080fd5b60008060006060848603121561479957600080fd5b83356147a48161476f565b92506147b2602085016145f7565b9150604084013590509250925092565b801515811461239857600080fd5b60008060008060008060a087890312156147e957600080fd5b6147f2876145f7565b955060208701359450604087013593506060870135614810816147c2565b925060808701356001600160401b0381111561482b57600080fd5b6146ee89828a0161460e565b60008060006040848603121561484c57600080fd5b614855846145f7565b925060208401356001600160401b0381111561487057600080fd5b61487c8682870161460e565b9497909650939450505050565b60006020828403121561489b57600080fd5b8135611d3b816147c2565b600080604083850312156148b957600080fd5b82356148c48161476f565b915060208301356148d4816147c2565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171561491d5761491d6148df565b604052919050565b60006001600160401b0382111561493e5761493e6148df565b50601f01601f191660200190565b60008060006060848603121561496157600080fd5b61496a846145f7565b925060208401356001600160401b0381111561498557600080fd5b8401601f8101861361499657600080fd5b80356149a96149a482614925565b6148f5565b8181528760208385010111156149be57600080fd5b816020840160208301376000602083830101528094505050506149e360408501614656565b90509250925092565b600080600060608486031215614a0157600080fd5b8335614a0c8161476f565b92506020840135614a1c8161476f565b929592945050506040919091013590565b600060608284031215614a3f57600080fd5b50919050565b600080600080600060a08688031215614a5d57600080fd5b8535614a688161476f565b9450614a76602087016145f7565b9350604086013592506060860135915060808601356001600160401b03811115614a9f57600080fd5b614aab88828901614a2d565b9150509295509295909350565b60005b83811015614ad3578181015183820152602001614abb565b8381111561172f5750506000910152565b60008151808452614afc816020860160208601614ab8565b601f01601f19169290920160200192915050565b602081526000611d3b6020830184614ae4565b60008060008060008060008060e0898b031215614b3f57600080fd5b8835614b4a8161476f565b9750614b5860208a016145f7565b9650604089013595506060890135945060808901356001600160401b0380821115614b8257600080fd5b614b8e8c838d0161460e565b9096509450849150614ba260a08c01614656565b935060c08b0135915080821115614bb857600080fd5b50614bc58b828c01614a2d565b9150509295985092959890939650565b600060208284031215614be757600080fd5b8135611d3b8161476f565b60008060408385031215614c0557600080fd5b614c0e836145f7565b9150614c1c602084016145f7565b90509250929050565b600080600080600080600080600060e08a8c031215614c4357600080fd5b614c4c8a6145f7565b985060208a0135975060408a0135965060608a01356001600160401b0380821115614c7657600080fd5b614c828d838e0161460e565b9098509650869150614c9660808d01614656565b955060a08c01359150614ca8826147c2565b90935060c08b01359080821115614cbe57600080fd5b50614ccb8c828d0161460e565b915080935050809150509295985092959850929598565b600080600080600060808688031215614cfa57600080fd5b614d03866145f7565b9450614d11602087016145f7565b93506040860135925060608601356001600160401b03811115614d3357600080fd5b614d3f8882890161460e565b969995985093965092949392505050565b600080600060608486031215614d6557600080fd5b6147a4846145f7565b6000806000806000806000806000806101008b8d031215614d8e57600080fd5b614d978b6145f7565b995060208b01356001600160401b0380821115614db357600080fd5b614dbf8e838f0161460e565b909b509950899150614dd360408e01614656565b985060608d0135975060808d01359150614dec8261476f565b90955060a08c0135945060c08c01359080821115614e0957600080fd5b50614e168d828e0161460e565b9150809450508092505060e08b013590509295989b9194979a5092959850565b60008060008060808587031215614e4c57600080fd5b614e55856145f7565b9350614e63602086016145f7565b92506040850135614e738161476f565b9396929550929360600135925050565b600181811c90821680614e9757607f821691505b602082108103614a3f57634e487b7160e01b600052602260045260246000fd5b8183823760009101908152919050565b60208082526026908201527f4c7a4170703a20696e76616c696420736f757263652073656e64696e6720636f6040820152651b9d1c9858dd60d21b606082015260800190565b600060208284031215614f1f57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b600082821015614f4e57614f4e614f26565b500390565b60008219821115614f6657614f66614f26565b500190565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b61ffff84168152604060208201526000612443604083018486614f6b565b6000808335601e19843603018112614fc957600080fd5b8301803591506001600160401b03821115614fe357600080fd5b60200191503681900382131561464f57600080fd5b6000825161500a818460208701614ab8565b9190910192915050565b8284823760609190911b6bffffffffffffffffffffffff19169101908152601401919050565b600061ffff8088168352808716602084015250846040830152608060608301526140c5608083018486614f6b565b61ffff8916815260c06020820152600061508660c08301898b614f6b565b6001600160401b038816604084015286606084015285608084015282810360a08401526150b4818587614f6b565b9b9a5050505050505050505050565b6000602082840312156150d557600080fd5b81516001600160401b038111156150eb57600080fd5b8201601f810184136150fc57600080fd5b805161510a6149a482614925565b81815285602083850101111561511f57600080fd5b612efa826020830160208601614ab8565b61ffff8516815260806020820152600061514d6080830186614ae4565b6001600160401b038516604084015282810360608401526140c58185614ae4565b61ffff861681526001600160a01b038516602082015260a06040820181905260009061519c90830186614ae4565b841515606084015282810360808401526151b68185614ae4565b98975050505050505050565b600080604083850312156151d557600080fd5b505080516020909101519092909150565b61ffff86168152608060208201526000615204608083018688614f6b565b6001600160401b0394909416604083015250606001529392505050565b61ffff8616815260a06020820152600061523e60a0830187614ae4565b6001600160401b0386166040840152828103606084015261525f8186614ae4565b905082810360808401526151b68185614ae4565b634e487b7160e01b600052601260045260246000fd5b60008261529857615298615273565b500490565b6000602082840312156152af57600080fd5b8151611d3b816147c2565b600061010061ffff8b1683528060208401526152d88184018b614ae4565b6001600160401b038a166040850152606084018990526001600160a01b038816608085015260a0840187905283810360c085015290506153188186614ae4565b9150508260e08301529998505050505050505050565b6060815260006153416060830186614ae4565b6001600160401b039490941660208301525060400152919050565b60008261536b5761536b615273565b500690565b61ffff8716815260c06020820152600061538d60c0830188614ae4565b828103604084015261539f8188614ae4565b6001600160a01b0387811660608601528616608085015283810360a085015290506153ca8185614ae4565b9998505050505050505050565b60ff60f81b8760f81b16815285600182015260006001600160401b0360c01b808760c01b166021840152856029840152808560c01b166049840152508251615426816051850160208701614ab8565b91909101605101979650505050505050565b600081600019048311821515161561545257615452614f26565b50029056fea264697066735822122002e85e39cd4c45156c727cd464d515ec143b5814676650286110a986cc477f2264736f6c634300080d0033", + "deployedBytecode": "0x6080604052600436106103b75760003560e01c80637dc0d1d0116101f2578063baf3292d1161010d578063df2a5b3b116100a0578063f2fde38b1161006f578063f2fde38b14610c52578063f5ecbdbc14610c72578063fc0c546a14610c92578063fdff235b14610cc557600080fd5b8063df2a5b3b14610bdd578063e6a20ae614610bfd578063eaffd49a14610c12578063eb8d72b714610c3257600080fd5b8063cc01e9b6116100dc578063cc01e9b614610b50578063cc7015ae14610b70578063d1deba1f14610b9d578063d708a46814610bb057600080fd5b8063baf3292d14610ae0578063c1e9132e14610b00578063c446183414610b1a578063cbed8b9c14610b3057600080fd5b806393a61d6c116101855780639f38369a116101545780639f38369a14610a4c578063a4c51df514610a6c578063a6c3d16514610a8c578063b353aaa714610aac57600080fd5b806393a61d6c1461097d578063950c8a74146109aa5780639b19251a146109ca5780639bdb9812146109fa57600080fd5b80638cfd8f5c116101c15780638cfd8f5c146108e05780638da5cb5b14610918578063904365671461093b5780639358928b1461096857600080fd5b80637dc0d1d01461083a5780638456cb591461087757806384e69c691461088c578063857749b0146108ac57600080fd5b80634c42899a116102e257806364aff9ec11610275578063715018a611610244578063715018a6146107ce5780637533d788146107da57806376203b48146108075780637adbf9731461081a57600080fd5b806364aff9ec1461075b57806366ad5c8a1461077b578063695ef6bf1461079b57806369c1e7b8146107ae57600080fd5b806353489d6c116102b157806353489d6c146106b457806353d6fd59146106d45780635b8c41e6146106f45780635c975abb1461074357600080fd5b80634c42899a146106135780634cec62561461063a5780634ed2c662146106675780634f4ba0f41461068757600080fd5b80632dbbec081161035a5780633f1f4fa4116103295780633f1f4fa41461059c5780633f4ba83a146105c957806342d65a8d146105de57806344770515146105fe57600080fd5b80632dbbec08146104ec578063365260b41461050c5780633c4ec39b146105415780633d8b38f61461057c57600080fd5b80630df37483116103965780630df374831461043357806310ddb13714610453578063182b4b89146104735780632488eec8146104cc57600080fd5b80621d3567146103bc57806301ffc9a7146103de57806307e0db1714610413575b600080fd5b3480156103c857600080fd5b506103dc6103d736600461466d565b610cf2565b005b3480156103ea57600080fd5b506103fe6103f9366004614700565b610ee4565b60405190151581526020015b60405180910390f35b34801561041f57600080fd5b506103dc61042e36600461472a565b610f1b565b34801561043f57600080fd5b506103dc61044e366004614745565b610fa4565b34801561045f57600080fd5b506103dc61046e36600461472a565b610fc3565b34801561047f57600080fd5b5061049361048e366004614784565b61101b565b6040805197151588526020880196909652948601939093526060850191909152608084015260a0830152151560c082015260e00161040a565b3480156104d857600080fd5b506103dc6104e7366004614745565b611191565b3480156104f857600080fd5b506103dc61050736600461472a565b611275565b34801561051857600080fd5b5061052c6105273660046147d0565b6112d4565b6040805192835260208301919091520161040a565b34801561054d57600080fd5b5061056e61055c36600461472a565b600d6020526000908152604090205481565b60405190815260200161040a565b34801561058857600080fd5b506103fe610597366004614837565b611329565b3480156105a857600080fd5b5061056e6105b736600461472a565b60036020526000908152604090205481565b3480156105d557600080fd5b506103dc6113f5565b3480156105ea57600080fd5b506103dc6105f9366004614837565b611407565b34801561060a57600080fd5b5061056e600081565b34801561061f57600080fd5b50610628600081565b60405160ff909116815260200161040a565b34801561064657600080fd5b5061056e61065536600461472a565b600a6020526000908152604090205481565b34801561067357600080fd5b506103dc610682366004614889565b61148d565b34801561069357600080fd5b5061056e6106a236600461472a565b60096020526000908152604090205481565b3480156106c057600080fd5b506103dc6106cf366004614745565b6114d2565b3480156106e057600080fd5b506103dc6106ef3660046148a6565b6115b6565b34801561070057600080fd5b5061056e61070f36600461494c565b6005602090815260009384526040808520845180860184018051928152908401958401959095209452929052825290205481565b34801561074f57600080fd5b5060005460ff166103fe565b34801561076757600080fd5b506103dc6107763660046149ec565b61162e565b34801561078757600080fd5b506103dc61079636600461466d565b611735565b6103dc6107a9366004614a45565b611811565b3480156107ba57600080fd5b506103dc6107c9366004614745565b61187c565b3480156103dc57600080fd5b3480156107e657600080fd5b506107fa6107f536600461472a565b611968565b60405161040a9190614b10565b6103dc610815366004614b23565b611a02565b34801561082657600080fd5b506103dc610835366004614bd5565b611a6e565b34801561084657600080fd5b5060075461085f9061010090046001600160a01b031681565b6040516001600160a01b03909116815260200161040a565b34801561088357600080fd5b506103dc611ae6565b34801561089857600080fd5b506103dc6108a736600461494c565b611af6565b3480156108b857600080fd5b506106287f000000000000000000000000000000000000000000000000000000000000000081565b3480156108ec57600080fd5b5061056e6108fb366004614bf2565b600260209081526000928352604080842090915290825290205481565b34801561092457600080fd5b5060005461010090046001600160a01b031661085f565b34801561094757600080fd5b5061056e61095636600461472a565b600c6020526000908152604090205481565b34801561097457600080fd5b5061056e611ba3565b34801561098957600080fd5b5061056e61099836600461472a565b600b6020526000908152604090205481565b3480156109b657600080fd5b5060045461085f906001600160a01b031681565b3480156109d657600080fd5b506103fe6109e5366004614bd5565b60106020526000908152604090205460ff1681565b348015610a0657600080fd5b506103fe610a1536600461494c565b6006602090815260009384526040808520845180860184018051928152908401958401959095209452929052825290205460ff1681565b348015610a5857600080fd5b506107fa610a6736600461472a565b611c2c565b348015610a7857600080fd5b5061052c610a87366004614c25565b611d42565b348015610a9857600080fd5b506103dc610aa7366004614837565b611dd1565b348015610ab857600080fd5b5061085f7f000000000000000000000000000000000000000000000000000000000000000081565b348015610aec57600080fd5b506103dc610afb366004614bd5565b611e64565b348015610b0c57600080fd5b506007546103fe9060ff1681565b348015610b2657600080fd5b5061056e61271081565b348015610b3c57600080fd5b506103dc610b4b366004614ce2565b611eba565b348015610b5c57600080fd5b506103dc610b6b366004614745565b611f4f565b348015610b7c57600080fd5b5061056e610b8b36600461472a565b60086020526000908152604090205481565b6103dc610bab36600461466d565b61203b565b348015610bbc57600080fd5b5061056e610bcb36600461472a565b600e6020526000908152604090205481565b348015610be957600080fd5b506103dc610bf8366004614d50565b61213f565b348015610c0957600080fd5b50610628600181565b348015610c1e57600080fd5b506103dc610c2d366004614d6e565b6121a9565b348015610c3e57600080fd5b506103dc610c4d366004614837565b6122c8565b348015610c5e57600080fd5b506103dc610c6d366004614bd5565b612322565b348015610c7e57600080fd5b506107fa610c8d366004614e36565b61239b565b348015610c9e57600080fd5b507f000000000000000000000000000000000000000000000000000000000000000061085f565b348015610cd157600080fd5b5061056e610ce036600461472a565b600f6020526000908152604090205481565b337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610d6f5760405162461bcd60e51b815260206004820152601e60248201527f4c7a4170703a20696e76616c696420656e64706f696e742063616c6c6572000060448201526064015b60405180910390fd5b61ffff861660009081526001602052604081208054610d8d90614e83565b80601f0160208091040260200160405190810160405280929190818152602001828054610db990614e83565b8015610e065780601f10610ddb57610100808354040283529160200191610e06565b820191906000526020600020905b815481529060010190602001808311610de957829003601f168201915b50505050509050805186869050148015610e21575060008151115b8015610e49575080516020820120604051610e3f9088908890614eb7565b6040518091039020145b610e655760405162461bcd60e51b8152600401610d6690614ec7565b610edb8787878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8a018190048102820181019092528881528a93509150889088908190840183828082843760009201919091525061244e92505050565b50505050505050565b60006001600160e01b03198216631f7ecdf760e01b1480610f1557506301ffc9a760e01b6001600160e01b03198316145b92915050565b610f236124c7565b6040516307e0db1760e01b815261ffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906307e0db17906024015b600060405180830381600087803b158015610f8957600080fd5b505af1158015610f9d573d6000803e3d6000fd5b5050505050565b610fac6124c7565b61ffff909116600090815260036020526040902055565b610fcb6124c7565b6040516310ddb13760e01b815261ffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906310ddb13790602401610f6f565b6001600160a01b03838116600090815260106020908152604080832054815192830190915260075492938493849384938493849360ff909216928492909182916101009004166341976e097f00000000000000000000000000000000000000000000000000000000000000006040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa1580156110cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110ef9190614f0d565b905290506110fd818a612527565b61ffff8b166000908152600b6020908152604080832054600a835281842054600884528285205460099094529190932054919a509098509196509094509250426201518061114b8583614f3c565b111561115c57859450809350611169565b6111668686614f53565b94505b828061118057508786111580156111805750868511155b985050509397509397509397909450565b6111996124c7565b61ffff821660009081526008602052604090205481101561120b5760405162461bcd60e51b815260206004820152602660248201527f4461696c79206c696d6974203c2073696e676c65207472616e73616374696f6e604482015265081b1a5b5a5d60d21b6064820152608401610d66565b61ffff82166000818152600960209081526040918290205482519384529083015281018290527f4dd31065e259d5284e44d1f9265710da72eafcf78dc925e3881189fc3b71f6939060600160405180910390a161ffff909116600090815260096020526040902055565b61127d6124c7565b61ffff81166000908152600160205260408120611299916144b0565b60405161ffff821681527f6d5075c81d4d9e75bec6052f4e44f58f8a8cf1327544addbbf015fb06f83bd37906020015b60405180910390a150565b60008061131a8888888888888080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061253f92505050565b91509150965096945050505050565b61ffff83166000908152600160205260408120805482919061134a90614e83565b80601f016020809104026020016040519081016040528092919081815260200182805461137690614e83565b80156113c35780601f10611398576101008083540402835291602001916113c3565b820191906000526020600020905b8154815290600101906020018083116113a657829003601f168201915b5050505050905083836040516113da929190614eb7565b60405180910390208180519060200120149150509392505050565b6113fd6124c7565b611405612633565b565b61140f6124c7565b6040516342d65a8d60e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906342d65a8d9061145f90869086908690600401614f94565b600060405180830381600087803b15801561147957600080fd5b505af1158015610edb573d6000803e3d6000fd5b6114956124c7565b6007805460ff19168215159081179091556040517fe628f01c6f4e6340598d3a2913390db68e8859379eebff349e170f2b16baed0090600090a250565b6114da6124c7565b61ffff821660009081526009602052604090205481111561154c5760405162461bcd60e51b815260206004820152602660248201527f53696e676c65207472616e73616374696f6e206c696d6974203e204461696c79604482015265081b1a5b5a5d60d21b6064820152608401610d66565b61ffff82166000818152600860209081526040918290205482519384529083015281018290527f7babeac42ccbb33537ee421fedc4db7b5f251b5d2a3fa5c0ff4b35b2d783be879060600160405180910390a161ffff909116600090815260086020526040902055565b6115be6124c7565b816001600160a01b03167ff6019ec0a78d156d249a1ec7579e2321f6ac7521d6e1d2eacf90ba4a184dcceb826040516115fb911515815260200190565b60405180910390a26001600160a01b03919091166000908152601060205260409020805460ff1916911515919091179055565b6116366124c7565b6040516370a0823160e01b81523060048201526000906001600160a01b038516906370a0823190602401602060405180830381865afa15801561167d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116a19190614f0d565b9050808211156116ce5760405163cf47918160e01b81526004810183905260248101829052604401610d66565b826001600160a01b0316846001600160a01b03167f6d25be279134f4ecaa4770aff0c3d916d9e7c5ef37b65ed95dbdba411f5d54d58460405161171391815260200190565b60405180910390a361172f6001600160a01b0385168484612685565b50505050565b3330146117935760405162461bcd60e51b815260206004820152602660248201527f4e6f6e626c6f636b696e674c7a4170703a2063616c6c6572206d7573742062656044820152650204c7a4170760d41b6064820152608401610d66565b6118098686868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8901819004810282018101909252878152899350915087908790819084018382808284376000920191909152506126ed92505050565b505050505050565b611809858585856118256020870187614bd5565b6118356040880160208901614bd5565b6118426040890189614fb2565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061277492505050565b6118846124c7565b61ffff82166000908152600c60205260409020548110156118fe5760405162461bcd60e51b815260206004820152602e60248201527f4461696c79206c696d6974203c2073696e676c6520726563656976652074726160448201526d1b9cd858dd1a5bdb881b1a5b5a5d60921b6064820152608401610d66565b61ffff82166000818152600d60209081526040918290205482519384529083015281018290527f95dc51094cd27cf4ee3fd0dbb50cf96f8df1629c822f5434c4a34d7eb03c97249060600160405180910390a161ffff9091166000908152600d6020526040902055565b6001602052600090815260409020805461198190614e83565b80601f01602080910402602001604051908101604052809291908181526020018280546119ad90614e83565b80156119fa5780601f106119cf576101008083540402835291602001916119fa565b820191906000526020600020905b8154815290600101906020018083116119dd57829003601f168201915b505050505081565b60075460ff16611a545760405162461bcd60e51b815260206004820152601760248201527f73656e64416e6443616c6c2069732064697361626c65640000000000000000006044820152606401610d66565b611a64888888888888888861285c565b5050505050505050565b611a766124c7565b611a7f81612900565b6007546040516001600160a01b0380841692610100900416907f05cd89403c6bdeac21c2ff33de395121a31fa1bc2bf3adf4825f1f86e79969dd90600090a3600780546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b611aee6124c7565b611405612927565b611afe6124c7565b61ffff83166000908152600560205260408082209051611b1f908590614ff8565b9081526040805191829003602090810183206001600160401b038616600090815291522091909155611b52908390614ff8565b6040805191829003822061ffff861683526001600160401b0384166020840152917f48a980eea4ea1c540209e2f9f32a4c2edf51fab37b1d21f453868301ecb6e2ee910160405180910390a2505050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611c03573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c279190614f0d565b905090565b61ffff8116600090815260016020526040812080546060929190611c4f90614e83565b80601f0160208091040260200160405190810160405280929190818152602001828054611c7b90614e83565b8015611cc85780601f10611c9d57610100808354040283529160200191611cc8565b820191906000526020600020905b815481529060010190602001808311611cab57829003601f168201915b505050505090508051600003611d205760405162461bcd60e51b815260206004820152601d60248201527f4c7a4170703a206e6f20747275737465642070617468207265636f72640000006044820152606401610d66565b611d3b600060148351611d339190614f3c565b839190612964565b9392505050565b600080611dbf8b8b8b8b8b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8d018190048102820181019092528b81528e93508d9250908c908c9081908401838280828437600092019190915250612a7192505050565b91509150995099975050505050505050565b611dd96124c7565b818130604051602001611dee93929190615014565b60408051601f1981840301815291815261ffff85166000908152600160209081529190208251611e23939192909101906144ea565b507f8c0400cfe2d1199b1a725c78960bcc2a344d869b80590d0f2bd005db15a572ce838383604051611e5793929190614f94565b60405180910390a1505050565b611e6c6124c7565b600480546001600160a01b0319166001600160a01b0383169081179091556040519081527f5db758e995a17ec1ad84bdef7e8c3293a0bd6179bcce400dff5d4c3d87db726b906020016112c9565b611ec26124c7565b6040516332fb62e760e21b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063cbed8b9c90611f16908890889088908890889060040161503a565b600060405180830381600087803b158015611f3057600080fd5b505af1158015611f44573d6000803e3d6000fd5b505050505050505050565b611f576124c7565b61ffff82166000908152600d6020526040902054811115611fd15760405162461bcd60e51b815260206004820152602e60248201527f73696e676c652072656365697665207472616e73616374696f6e206c696d697460448201526d080f8811185a5b1e481b1a5b5a5d60921b6064820152608401610d66565b61ffff82166000818152600c60209081526040918290205482519384529083015281018290527f2c42997a938a029910a78e7c28d762b349c28e70f3a89c1fbccbb1a46020b1599060600160405180910390a161ffff9091166000908152600c6020526040902055565b61ffff86166000908152600160205260408120805461205990614e83565b80601f016020809104026020016040519081016040528092919081815260200182805461208590614e83565b80156120d25780601f106120a7576101008083540402835291602001916120d2565b820191906000526020600020905b8154815290600101906020018083116120b557829003601f168201915b505050505090508051868690501480156120ed575060008151115b801561211557508051602082012060405161210b9088908890614eb7565b6040518091039020145b6121315760405162461bcd60e51b8152600401610d6690614ec7565b610edb878787878787612b33565b6121476124c7565b61ffff83811660008181526002602090815260408083209487168084529482529182902085905581519283528201929092529081018290527f9d5c7c0b934da8fefa9c7760c98383778a12dfbfc0c3b3106518f43fb9508ac090606001611e57565b3330146121f85760405162461bcd60e51b815260206004820152601f60248201527f4f4654436f72653a2063616c6c6572206d757374206265204f4654436f7265006044820152606401610d66565b612203308686612d49565b9350846001600160a01b03168a61ffff167fbf551ec93859b170f9b2141bd9298bf3f64322c6f7beb2543a0cb669834118bf8660405161224591815260200190565b60405180910390a3604051633fe79aed60e11b81526001600160a01b03861690637fcf35da908390612289908e908e908e908e908e908d908d908d90600401615068565b600060405180830381600088803b1580156122a357600080fd5b5087f11580156122b7573d6000803e3d6000fd5b505050505050505050505050505050565b6122d06124c7565b61ffff831660009081526001602052604090206122ee90838361456e565b507ffa41487ad5d6728f0b19276fa1eddc16558578f5109fc39d2dc33c3230470dab838383604051611e5793929190614f94565b61232a6124c7565b6001600160a01b03811661238f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610d66565b61239881612f03565b50565b604051633d7b2f6f60e21b815261ffff808616600483015284166024820152306044820152606481018290526060907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063f5ecbdbc90608401600060405180830381865afa15801561241b573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261244391908101906150c3565b90505b949350505050565b6000806124b15a60966366ad5c8a60e01b898989896040516024016124769493929190615130565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915230929190612f5c565b9150915081611809576118098686868685612fe6565b6000546001600160a01b036101009091041633146114055760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610d66565b6000806125348484613083565b9050612446816130b4565b600080600061258d87612551886130cc565b6040805160006020820152602181019390935260c09190911b6001600160c01b0319166041830152805160298184030181526049909201905290565b60405163040a7bb160e41b81529091506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906340a7bb10906125e4908b90309086908b908b9060040161516e565b6040805180830381865afa158015612600573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061262491906151c2565b92509250509550959350505050565b61263b613152565b6000805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6040516001600160a01b0383166024820152604481018290526126e890849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915261319b565b505050565b60006126f98282613270565b905060ff81166127145761270f858585856132cc565b610f9d565b60001960ff82160161272c5761270f8585858561335c565b60405162461bcd60e51b815260206004820152601c60248201527f4f4654436f72653a20756e6b6e6f776e207061636b65742074797065000000006044820152606401610d66565b60006127828782848161356a565b61278b8561363f565b50905061279a8888888461367f565b9050600081116127e85760405162461bcd60e51b815260206004820152601960248201527813d19510dbdc994e88185b5bdd5b9d081d1bdbc81cdb585b1b603a1b6044820152606401610d66565b60006127f787612551846130cc565b9050612807888287878734613782565b86896001600160a01b03168961ffff167fd81fc9b8523134ed613870ed029d6170cbb73aa6a6bc311b9a642689fb9df59a8560405161284891815260200190565b60405180910390a450979650505050505050565b611f448888888888888080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508a92506128a99150506020890189614bd5565b6128b960408a0160208b01614bd5565b6128c660408b018b614fb2565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061392792505050565b6001600160a01b038116612398576040516342bcdf7f60e11b815260040160405180910390fd5b61292f613a1c565b6000805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586126683390565b60608161297281601f614f53565b10156129b15760405162461bcd60e51b815260206004820152600e60248201526d736c6963655f6f766572666c6f7760901b6044820152606401610d66565b6129bb8284614f53565b845110156129ff5760405162461bcd60e51b8152602060048201526011602482015270736c6963655f6f75744f66426f756e647360781b6044820152606401610d66565b606082158015612a1e5760405191506000825260208201604052612a68565b6040519150601f8416801560200281840101858101878315602002848b0101015b81831015612a57578051835260209283019201612a3f565b5050858452601f01601f1916604052505b50949350505050565b6000806000612a8b338a612a848b6130cc565b8a8a613a62565b60405163040a7bb160e41b81529091506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906340a7bb1090612ae2908d90309086908b908b9060040161516e565b6040805180830381865afa158015612afe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b2291906151c2565b925092505097509795505050505050565b61ffff86166000908152600560205260408082209051612b569088908890614eb7565b90815260408051602092819003830190206001600160401b03871660009081529252902054905080612bd65760405162461bcd60e51b815260206004820152602360248201527f4e6f6e626c6f636b696e674c7a4170703a206e6f2073746f726564206d65737360448201526261676560e81b6064820152608401610d66565b808383604051612be7929190614eb7565b604051809103902014612c465760405162461bcd60e51b815260206004820152602160248201527f4e6f6e626c6f636b696e674c7a4170703a20696e76616c6964207061796c6f616044820152601960fa1b6064820152608401610d66565b61ffff87166000908152600560205260408082209051612c699089908990614eb7565b90815260408051602092819003830181206001600160401b038916600090815290845282902093909355601f88018290048202830182019052868252612d01918991899089908190840183828082843760009201919091525050604080516020601f8a018190048102820181019092528881528a9350915088908890819084018382808284376000920191909152506126ed92505050565b7fc264d91f3adc5588250e1551f547752ca0cfa8f6b530d243b9f9f4cab10ea8e58787878785604051612d389594939291906151e6565b60405180910390a150505050505050565b6000612d53613a1c565b6040516370a0823160e01b81526001600160a01b0384811660048301526000917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa158015612dbe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612de29190614f0d565b9050306001600160a01b03861603612e2d57612e286001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168585612685565b612e62565b612e626001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016868686613aa3565b6040516370a0823160e01b81526001600160a01b03858116600483015282917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa158015612ecc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ef09190614f0d565b612efa9190614f3c565b95945050505050565b600080546001600160a01b03838116610100818102610100600160a81b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b6000606060008060008661ffff166001600160401b03811115612f8157612f816148df565b6040519080825280601f01601f191660200182016040528015612fab576020820181803683370190505b50905060008087516020890160008d8df191503d925086831115612fcd578692505b828152826000602083013e909890975095505050505050565b8180519060200120600560008761ffff1661ffff168152602001908152602001600020856040516130179190614ff8565b9081526040805191829003602090810183206001600160401b0388166000908152915220919091557fe183f33de2837795525b4792ca4cd60535bd77c53b7e7030060bfcf5734d6b0c906130749087908790879087908790615221565b60405180910390a15050505050565b60408051602081019091526000815260405180602001604052806130ab856000015185613adb565b90529392505050565b8051600090610f1590670de0b6b3a764000090615289565b6000806130f97f000000000000000000000000000000000000000000000000000000000000000084615289565b90506001600160401b03811115610f155760405162461bcd60e51b815260206004820152601a60248201527f4f4654436f72653a20616d6f756e745344206f766572666c6f770000000000006044820152606401610d66565b60005460ff166114055760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610d66565b60006131f0826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316613ae79092919063ffffffff16565b9050805160001480613211575080806020019051810190613211919061529d565b6126e85760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610d66565b600061327d826001614f53565b835110156132c35760405162461bcd60e51b8152602060048201526013602482015272746f55696e74385f6f75744f66426f756e647360681b6044820152606401610d66565b50016001015190565b6000806132d883613af6565b90925090506001600160a01b0382166132f15761dead91505b60006132fc82613b7b565b9050613309878483613bb0565b9050826001600160a01b03168761ffff167fbf551ec93859b170f9b2141bd9298bf3f64322c6f7beb2543a0cb669834118bf8360405161334b91815260200190565b60405180910390a350505050505050565b600080600080600061336d86613c4f565b945094509450945094506000600660008b61ffff1661ffff168152602001908152602001600020896040516133a29190614ff8565b90815260408051602092819003830190206001600160401b038b166000908152925281205460ff1691506133d585613b7b565b905081613443576133e78b3083613bb0565b61ffff8c1660009081526006602052604090819020905191925060019161340f908d90614ff8565b90815260408051602092819003830190206001600160401b038d16600090815292529020805460ff19169115159190911790555b6001600160a01b0386163b61349a576040516001600160a01b03871681527f9aedf5fdba8716db3b6705ca00150643309995d4f818a249ed6dde6677e7792d9060200160405180910390a15050505050505061172f565b8a8a8a8a8a8a868a60008a6134b8578b6001600160401b03166134ba565b5a5b90506000806134ec5a609663eaffd49a60e01b8e8e8e8d8d8d8d8d6040516024016124769897969594939291906152ba565b915091508115613545578751602089012060405161ffff8d16907fb8890edbfc1c74692f527444645f95489c3703cc2df42e4a366f5d06fa6cd88490613537908e908e90869061532e565b60405180910390a250613552565b6135528b8b8b8b85612fe6565b50505050505050505050505050505050505050505050565b600061357583613d06565b61ffff808716600090815260026020908152604080832093891683529290522054909150806135e65760405162461bcd60e51b815260206004820152601a60248201527f4c7a4170703a206d696e4761734c696d6974206e6f74207365740000000000006044820152606401610d66565b6135f08382614f53565b8210156118095760405162461bcd60e51b815260206004820152601b60248201527f4c7a4170703a20676173206c696d697420697320746f6f206c6f7700000000006044820152606401610d66565b60008061366c7f00000000000000000000000000000000000000000000000000000000000000008461535c565b90506136788184614f3c565b9150915091565b6000613689613a1c565b6001600160a01b03851633146136ec5760405162461bcd60e51b815260206004820152602260248201527f50726f78794f46543a206f776e6572206973206e6f742073656e642063616c6c60448201526132b960f11b6064820152608401610d66565b6136f7858584613d62565b604051632770a7eb60e21b81526001600160a01b038681166004830152602482018490527f00000000000000000000000000000000000000000000000000000000000000001690639dc29fac90604401600060405180830381600087803b15801561376157600080fd5b505af1158015613775573d6000803e3d6000fd5b5093979650505050505050565b61ffff8616600090815260016020526040812080546137a090614e83565b80601f01602080910402602001604051908101604052809291908181526020018280546137cc90614e83565b80156138195780601f106137ee57610100808354040283529160200191613819565b820191906000526020600020905b8154815290600101906020018083116137fc57829003601f168201915b50505050509050805160000361388a5760405162461bcd60e51b815260206004820152603060248201527f4c7a4170703a2064657374696e6174696f6e20636861696e206973206e6f742060448201526f61207472757374656420736f7572636560801b6064820152608401610d66565b613895878751613f84565b60405162c5803160e81b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063c58031009084906138ec908b9086908c908c908c908c90600401615370565b6000604051808303818588803b15801561390557600080fd5b505af1158015613919573d6000803e3d6000fd5b505050505050505050505050565b600061393f896001846001600160401b03891661356a565b6139488761363f565b5090506139578a8a8a8461367f565b9050600081116139a55760405162461bcd60e51b815260206004820152601960248201527813d19510dbdc994e88185b5bdd5b9d081d1bdbc81cdb585b1b603a1b6044820152606401610d66565b60006139b5338a612a84856130cc565b90506139c58a8287878734613782565b888b6001600160a01b03168b61ffff167fd81fc9b8523134ed613870ed029d6170cbb73aa6a6bc311b9a642689fb9df59a85604051613a0691815260200190565b60405180910390a4509998505050505050505050565b60005460ff16156114055760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610d66565b6060600185856001600160a01b0389168587604051602001613a89969594939291906153d7565b604051602081830303815290604052905095945050505050565b6040516001600160a01b038085166024830152831660448201526064810182905261172f9085906323b872dd60e01b906084016126b1565b6000611d3b8284615438565b60606124468484600085613ff5565b60008080613b048482613270565b60ff16148015613b15575082516029145b613b5c5760405162461bcd60e51b815260206004820152601860248201527713d19510dbdc994e881a5b9d985b1a59081c185e5b1bd85960421b6044820152606401610d66565b613b6783600d6140d0565b9150613b74836021614135565b9050915091565b6000610f157f00000000000000000000000000000000000000000000000000000000000000006001600160401b038416615438565b6000613bba613a1c565b613bc5838584614192565b6040516340c10f1960e01b81526001600160a01b038481166004830152602482018490527f000000000000000000000000000000000000000000000000000000000000000016906340c10f1990604401600060405180830381600087803b158015613c2f57600080fd5b505af1158015613c43573d6000803e3d6000fd5b50939695505050505050565b600080806060816001613c628783613270565b60ff1614613cad5760405162461bcd60e51b815260206004820152601860248201527713d19510dbdc994e881a5b9d985b1a59081c185e5b1bd85960421b6044820152606401610d66565b613cb886600d6140d0565b9350613cc5866021614135565b9250613cd28660296143b4565b9450613cdf866049614135565b9050613cfb6051808851613cf39190614f3c565b889190612964565b915091939590929450565b6000602282511015613d5a5760405162461bcd60e51b815260206004820152601c60248201527f4c7a4170703a20696e76616c69642061646170746572506172616d73000000006044820152606401610d66565b506022015190565b6001600160a01b03831660009081526010602052604090205460ff168015613d8a5750505050565b60408051602081019091526007546000918291819061010090046001600160a01b03166341976e097f00000000000000000000000000000000000000000000000000000000000000006040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015613e17573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613e3b9190614f0d565b90529050613e498185612527565b61ffff86166000908152600b6020908152604080832054600a835281842054600884528285205460099094529190932054939550429390919081871115613ed25760405162461bcd60e51b815260206004820152601f60248201527f53696e676c65205472616e73616374696f6e204c696d697420457863656564006044820152606401610d66565b62015180613ee08587614f3c565b1115613f045761ffff8a166000908152600b60205260409020859055869250613f11565b613f0e8784614f53565b92505b80831115613f615760405162461bcd60e51b815260206004820152601e60248201527f4461696c79205472616e73616374696f6e204c696d69742045786365656400006044820152606401610d66565b505061ffff9097166000908152600a602052604090209690965550505050505050565b61ffff821660009081526003602052604081205490819003613fa557506127105b808211156126e85760405162461bcd60e51b815260206004820181905260248201527f4c7a4170703a207061796c6f61642073697a6520697320746f6f206c617267656044820152606401610d66565b6060824710156140565760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610d66565b600080866001600160a01b031685876040516140729190614ff8565b60006040518083038185875af1925050503d80600081146140af576040519150601f19603f3d011682016040523d82523d6000602084013e6140b4565b606091505b50915091506140c587838387614412565b979650505050505050565b60006140dd826014614f53565b835110156141255760405162461bcd60e51b8152602060048201526015602482015274746f416464726573735f6f75744f66426f756e647360581b6044820152606401610d66565b500160200151600160601b900490565b6000614142826008614f53565b835110156141895760405162461bcd60e51b8152602060048201526014602482015273746f55696e7436345f6f75744f66426f756e647360601b6044820152606401610d66565b50016008015190565b6001600160a01b03831660009081526010602052604090205460ff1680156141ba5750505050565b60408051602081019091526007546000918291819061010090046001600160a01b03166341976e097f00000000000000000000000000000000000000000000000000000000000000006040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015614247573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061426b9190614f0d565b905290506142798185612527565b61ffff86166000908152600f6020908152604080832054600e835281842054600c845282852054600d90945291909320549395504293909190818711156143025760405162461bcd60e51b815260206004820152601f60248201527f53696e676c65205472616e73616374696f6e204c696d697420457863656564006044820152606401610d66565b620151806143108587614f3c565b11156143345761ffff8a166000908152600f60205260409020859055869250614341565b61433e8784614f53565b92505b808311156143915760405162461bcd60e51b815260206004820152601e60248201527f4461696c79205472616e73616374696f6e204c696d69742045786365656400006044820152606401610d66565b505061ffff9097166000908152600e602052604090209690965550505050505050565b60006143c1826020614f53565b835110156144095760405162461bcd60e51b8152602060048201526015602482015274746f427974657333325f6f75744f66426f756e647360581b6044820152606401610d66565b50016020015190565b6060831561448157825160000361447a576001600160a01b0385163b61447a5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610d66565b5081612446565b61244683838151156144965781518083602001fd5b8060405162461bcd60e51b8152600401610d669190614b10565b5080546144bc90614e83565b6000825580601f106144cc575050565b601f01602090049060005260206000209081019061239891906145e2565b8280546144f690614e83565b90600052602060002090601f016020900481019282614518576000855561455e565b82601f1061453157805160ff191683800117855561455e565b8280016001018555821561455e579182015b8281111561455e578251825591602001919060010190614543565b5061456a9291506145e2565b5090565b82805461457a90614e83565b90600052602060002090601f01602090048101928261459c576000855561455e565b82601f106145b55782800160ff1982351617855561455e565b8280016001018555821561455e579182015b8281111561455e5782358255916020019190600101906145c7565b5b8082111561456a57600081556001016145e3565b803561ffff8116811461460957600080fd5b919050565b60008083601f84011261462057600080fd5b5081356001600160401b0381111561463757600080fd5b60208301915083602082850101111561464f57600080fd5b9250929050565b80356001600160401b038116811461460957600080fd5b6000806000806000806080878903121561468657600080fd5b61468f876145f7565b955060208701356001600160401b03808211156146ab57600080fd5b6146b78a838b0161460e565b90975095508591506146cb60408a01614656565b945060608901359150808211156146e157600080fd5b506146ee89828a0161460e565b979a9699509497509295939492505050565b60006020828403121561471257600080fd5b81356001600160e01b031981168114611d3b57600080fd5b60006020828403121561473c57600080fd5b611d3b826145f7565b6000806040838503121561475857600080fd5b614761836145f7565b946020939093013593505050565b6001600160a01b038116811461239857600080fd5b60008060006060848603121561479957600080fd5b83356147a48161476f565b92506147b2602085016145f7565b9150604084013590509250925092565b801515811461239857600080fd5b60008060008060008060a087890312156147e957600080fd5b6147f2876145f7565b955060208701359450604087013593506060870135614810816147c2565b925060808701356001600160401b0381111561482b57600080fd5b6146ee89828a0161460e565b60008060006040848603121561484c57600080fd5b614855846145f7565b925060208401356001600160401b0381111561487057600080fd5b61487c8682870161460e565b9497909650939450505050565b60006020828403121561489b57600080fd5b8135611d3b816147c2565b600080604083850312156148b957600080fd5b82356148c48161476f565b915060208301356148d4816147c2565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171561491d5761491d6148df565b604052919050565b60006001600160401b0382111561493e5761493e6148df565b50601f01601f191660200190565b60008060006060848603121561496157600080fd5b61496a846145f7565b925060208401356001600160401b0381111561498557600080fd5b8401601f8101861361499657600080fd5b80356149a96149a482614925565b6148f5565b8181528760208385010111156149be57600080fd5b816020840160208301376000602083830101528094505050506149e360408501614656565b90509250925092565b600080600060608486031215614a0157600080fd5b8335614a0c8161476f565b92506020840135614a1c8161476f565b929592945050506040919091013590565b600060608284031215614a3f57600080fd5b50919050565b600080600080600060a08688031215614a5d57600080fd5b8535614a688161476f565b9450614a76602087016145f7565b9350604086013592506060860135915060808601356001600160401b03811115614a9f57600080fd5b614aab88828901614a2d565b9150509295509295909350565b60005b83811015614ad3578181015183820152602001614abb565b8381111561172f5750506000910152565b60008151808452614afc816020860160208601614ab8565b601f01601f19169290920160200192915050565b602081526000611d3b6020830184614ae4565b60008060008060008060008060e0898b031215614b3f57600080fd5b8835614b4a8161476f565b9750614b5860208a016145f7565b9650604089013595506060890135945060808901356001600160401b0380821115614b8257600080fd5b614b8e8c838d0161460e565b9096509450849150614ba260a08c01614656565b935060c08b0135915080821115614bb857600080fd5b50614bc58b828c01614a2d565b9150509295985092959890939650565b600060208284031215614be757600080fd5b8135611d3b8161476f565b60008060408385031215614c0557600080fd5b614c0e836145f7565b9150614c1c602084016145f7565b90509250929050565b600080600080600080600080600060e08a8c031215614c4357600080fd5b614c4c8a6145f7565b985060208a0135975060408a0135965060608a01356001600160401b0380821115614c7657600080fd5b614c828d838e0161460e565b9098509650869150614c9660808d01614656565b955060a08c01359150614ca8826147c2565b90935060c08b01359080821115614cbe57600080fd5b50614ccb8c828d0161460e565b915080935050809150509295985092959850929598565b600080600080600060808688031215614cfa57600080fd5b614d03866145f7565b9450614d11602087016145f7565b93506040860135925060608601356001600160401b03811115614d3357600080fd5b614d3f8882890161460e565b969995985093965092949392505050565b600080600060608486031215614d6557600080fd5b6147a4846145f7565b6000806000806000806000806000806101008b8d031215614d8e57600080fd5b614d978b6145f7565b995060208b01356001600160401b0380821115614db357600080fd5b614dbf8e838f0161460e565b909b509950899150614dd360408e01614656565b985060608d0135975060808d01359150614dec8261476f565b90955060a08c0135945060c08c01359080821115614e0957600080fd5b50614e168d828e0161460e565b9150809450508092505060e08b013590509295989b9194979a5092959850565b60008060008060808587031215614e4c57600080fd5b614e55856145f7565b9350614e63602086016145f7565b92506040850135614e738161476f565b9396929550929360600135925050565b600181811c90821680614e9757607f821691505b602082108103614a3f57634e487b7160e01b600052602260045260246000fd5b8183823760009101908152919050565b60208082526026908201527f4c7a4170703a20696e76616c696420736f757263652073656e64696e6720636f6040820152651b9d1c9858dd60d21b606082015260800190565b600060208284031215614f1f57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b600082821015614f4e57614f4e614f26565b500390565b60008219821115614f6657614f66614f26565b500190565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b61ffff84168152604060208201526000612443604083018486614f6b565b6000808335601e19843603018112614fc957600080fd5b8301803591506001600160401b03821115614fe357600080fd5b60200191503681900382131561464f57600080fd5b6000825161500a818460208701614ab8565b9190910192915050565b8284823760609190911b6bffffffffffffffffffffffff19169101908152601401919050565b600061ffff8088168352808716602084015250846040830152608060608301526140c5608083018486614f6b565b61ffff8916815260c06020820152600061508660c08301898b614f6b565b6001600160401b038816604084015286606084015285608084015282810360a08401526150b4818587614f6b565b9b9a5050505050505050505050565b6000602082840312156150d557600080fd5b81516001600160401b038111156150eb57600080fd5b8201601f810184136150fc57600080fd5b805161510a6149a482614925565b81815285602083850101111561511f57600080fd5b612efa826020830160208601614ab8565b61ffff8516815260806020820152600061514d6080830186614ae4565b6001600160401b038516604084015282810360608401526140c58185614ae4565b61ffff861681526001600160a01b038516602082015260a06040820181905260009061519c90830186614ae4565b841515606084015282810360808401526151b68185614ae4565b98975050505050505050565b600080604083850312156151d557600080fd5b505080516020909101519092909150565b61ffff86168152608060208201526000615204608083018688614f6b565b6001600160401b0394909416604083015250606001529392505050565b61ffff8616815260a06020820152600061523e60a0830187614ae4565b6001600160401b0386166040840152828103606084015261525f8186614ae4565b905082810360808401526151b68185614ae4565b634e487b7160e01b600052601260045260246000fd5b60008261529857615298615273565b500490565b6000602082840312156152af57600080fd5b8151611d3b816147c2565b600061010061ffff8b1683528060208401526152d88184018b614ae4565b6001600160401b038a166040850152606084018990526001600160a01b038816608085015260a0840187905283810360c085015290506153188186614ae4565b9150508260e08301529998505050505050505050565b6060815260006153416060830186614ae4565b6001600160401b039490941660208301525060400152919050565b60008261536b5761536b615273565b500690565b61ffff8716815260c06020820152600061538d60c0830188614ae4565b828103604084015261539f8188614ae4565b6001600160a01b0387811660608601528616608085015283810360a085015290506153ca8185614ae4565b9998505050505050505050565b60ff60f81b8760f81b16815285600182015260006001600160401b0360c01b808760c01b166021840152856029840152808560c01b166049840152508251615426816051850160208701614ab8565b91909101605101979650505050505050565b600081600019048311821515161561545257615452614f26565b50029056fea264697066735822122002e85e39cd4c45156c727cd464d515ec143b5814676650286110a986cc477f2264736f6c634300080d0033", + "devdoc": { + "author": "Venus", + "kind": "dev", + "methods": { + "circulatingSupply()": { + "returns": { + "_0": "total circulating supply of the token on the destination chain." + } + }, + "dropFailedMessage(uint16,bytes,uint64)": { + "custom:access": "Only owner", + "custom:event": "Emits DropFailedMessage on clearance of failed message.", + "params": { + "nonce_": "Nonce_ of the transaction", + "srcAddress_": "Address of source followed by current bridge address", + "srcChainId_": "Chain id of source" + } + }, + "estimateSendFee(uint16,bytes32,uint256,bool,bytes)": { + "details": "estimate send token `_tokenId` to (`_dstChainId`, `_toAddress`) _dstChainId - L0 defined chain id to send tokens too _toAddress - dynamic bytes array which contains the address to whom you are sending tokens to on the dstChain _amount - amount of the tokens to transfer _useZro - indicates to use zro to pay L0 fees _adapterParam - flexible bytes array to indicate messaging adapter services in L0" + }, + "isEligibleToSend(address,uint16,uint256)": { + "details": "This external view function assesses whether the specified sender is eligible to transfer the given amount to the specified destination chain. It considers factors such as whitelisting, transaction limits, and a 24-hour window.", + "params": { + "amount_": "The quantity of tokens to be transferred.", + "dstChainId_": "Indicates destination chain.", + "from_": "The sender's address initiating the transfer." + }, + "returns": { + "amountInUsd": "The equivalent amount in USD based on the oracle price.", + "eligibleToSend": "A boolean indicating whether the sender is eligible to transfer the tokens.", + "isWhiteListedUser": "A boolean indicating whether the sender is whitelisted.", + "last24HourWindowStart": "The timestamp when the current 24-hour window started.", + "maxDailyLimit": "The maximum daily limit for transactions.", + "maxSingleTransactionLimit": "The maximum limit for a single transaction.", + "transferredInWindow": "The total amount transferred in the current 24-hour window." + } + }, + "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." + }, + "removeTrustedRemote(uint16)": { + "custom:access": "Only owner.", + "custom:event": "Emits TrustedRemoteRemoved once chain id is removed from trusted remote.", + "params": { + "remoteChainId_": "The chain's id corresponds to setting the trusted remote to empty." + } + }, + "sendAndCall(address,uint16,bytes32,uint256,bytes,uint64,(address,address,bytes))": { + "details": "This internal override function enables the contract to send tokens and invoke calls on the specified destination chain. It checks whether the sendAndCall feature is enabled before proceeding with the transfer.", + "params": { + "amount_": "Amount of tokens that will be transferred.", + "callparams_": "Additional parameters, including refund address, ZRO payment address, and adapter params.", + "dstChainId_": "Destination chain id on which tokens will be send.", + "dstGasForCall_": "The amount of gas allocated for the call on the destination chain.", + "from_": "Address from which tokens will be debited.", + "payload_": "Additional data payload for the call on the destination chain.", + "toAddress_": "Address on which tokens will be credited on destination chain." + } + }, + "sendFrom(address,uint16,bytes32,uint256,(address,address,bytes))": { + "details": "send `_amount` amount of token to (`_dstChainId`, `_toAddress`) from `_from` `_from` the owner of token `_dstChainId` the destination chain identifier `_toAddress` can be any size depending on the `dstChainId`. `_amount` the quantity of tokens in wei `_refundAddress` the address LayerZero refunds if too much message fee is sent `_zroPaymentAddress` set to address(0x0) if not paying in ZRO (LayerZero Token) `_adapterParams` is a flexible bytes array to indicate messaging adapter services" + }, + "setMaxDailyLimit(uint16,uint256)": { + "custom:access": "Only owner.", + "custom:event": "Emits setMaxDailyLimit with old and new limit associated with chain id.", + "params": { + "chainId_": "Destination chain id.", + "limit_": "Amount in USD(scaled with 18 decimals)." + } + }, + "setMaxDailyReceiveLimit(uint16,uint256)": { + "custom:access": "Only owner.", + "custom:event": "Emits setMaxDailyReceiveLimit with old and new limit associated with chain id.", + "params": { + "chainId_": "The destination chain ID.", + "limit_": "The new maximum daily limit in USD(scaled with 18 decimals)." + } + }, + "setMaxSingleReceiveTransactionLimit(uint16,uint256)": { + "custom:access": "Only owner.", + "custom:event": "Emits setMaxSingleReceiveTransactionLimit with old and new limit associated with chain id.", + "params": { + "chainId_": "The destination chain ID.", + "limit_": "The new maximum limit in USD(scaled with 18 decimals)." + } + }, + "setMaxSingleTransactionLimit(uint16,uint256)": { + "custom:access": "Only owner.", + "custom:event": "Emits SetMaxSingleTransactionLimit with old and new limit associated with chain id.", + "params": { + "chainId_": "Destination chain id.", + "limit_": "Amount in USD(scaled with 18 decimals)." + } + }, + "setOracle(address)": { + "custom:access": "Only owner.", + "custom:event": "Emits OracleChanged with old and new oracle address.", + "details": "Reverts if the new address is zero.", + "params": { + "oracleAddress_": "The new address of the ResilientOracle contract." + } + }, + "setWhitelist(address,bool)": { + "custom:access": "Only owner.", + "custom:event": "Emits setWhitelist.", + "params": { + "user_": "Address to be add in whitelist.", + "val_": "Boolean to be set (true for user_ address is whitelisted)." + } + }, + "sweepToken(address,address,uint256)": { + "custom:access": "Only Owner", + "custom:error": "Throw InsufficientBalance if amount_ is greater than the available balance of the token in the contract", + "custom:event": "Emits SweepToken event", + "params": { + "amount_": "The amount of tokens needs to transfer", + "to_": "The address of the recipient", + "token_": "The address of the ERC-20 token to sweep" + } + }, + "token()": { + "returns": { + "_0": "Address of the inner token of this bridge." + } + }, + "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." + }, + "updateSendAndCallEnabled(bool)": { + "params": { + "enabled_": "Boolean indicating whether the sendAndCall function should be enabled or disabled." + } + } + }, + "title": "XVSProxyOFTDest", + "version": 1 + }, + "userdoc": { + "errors": { + "InsufficientBalance(uint256,uint256)": [ + { + "notice": "Error thrown when this contract balance is less than sweep amount" + } + ], + "ZeroAddressNotAllowed()": [ + { + "notice": "Thrown if the supplied address is a zero address where it is not allowed" + } + ] + }, + "events": { + "DropFailedMessage(uint16,bytes,uint64)": { + "notice": "Emits when stored message dropped without successful retrying." + }, + "InnerTokenAdded(address)": { + "notice": "Event emitted when inner token set successfully." + }, + "OracleChanged(address,address)": { + "notice": "Event emitted when oracle is modified." + }, + "SetMaxDailyLimit(uint16,uint256,uint256)": { + "notice": "Emitted when the maximum daily limit of transactions from local chain is modified." + }, + "SetMaxDailyReceiveLimit(uint16,uint256,uint256)": { + "notice": "Emitted when the maximum daily limit for receiving transactions from remote chain is modified." + }, + "SetMaxSingleReceiveTransactionLimit(uint16,uint256,uint256)": { + "notice": "Emitted when the maximum limit for a single receive transaction from remote chain is modified." + }, + "SetMaxSingleTransactionLimit(uint16,uint256,uint256)": { + "notice": "Emitted when the maximum limit for a single transaction from local chain is modified." + }, + "SetWhitelist(address,bool)": { + "notice": "Emitted when address is added to whitelist." + }, + "SweepToken(address,address,uint256)": { + "notice": "Emitted on sweep token success" + }, + "TrustedRemoteRemoved(uint16)": { + "notice": "Event emitted when trusted remote sets to empty." + }, + "UpdateSendAndCallEnabled(bool)": { + "notice": "Event emitted when SendAndCallEnabled updated successfully." + } + }, + "kind": "user", + "methods": { + "chainIdToLast24HourReceiveWindowStart(uint16)": { + "notice": "Timestamp when the last 24-hour window started from remote chain." + }, + "chainIdToLast24HourReceived(uint16)": { + "notice": "Total received amount in USD(scaled with 18 decimals) within the last 24-hour window from remote chain." + }, + "chainIdToLast24HourTransferred(uint16)": { + "notice": "Total sent amount in USD(scaled with 18 decimals) within the last 24-hour window from local chain." + }, + "chainIdToLast24HourWindowStart(uint16)": { + "notice": "Timestamp when the last 24-hour window started from local chain." + }, + "chainIdToMaxDailyLimit(uint16)": { + "notice": "Maximum daily limit for transactions in USD(scaled with 18 decimals) from local chain." + }, + "chainIdToMaxDailyReceiveLimit(uint16)": { + "notice": "Maximum daily limit for receiving transactions in USD(scaled with 18 decimals) from remote chain." + }, + "chainIdToMaxSingleReceiveTransactionLimit(uint16)": { + "notice": "Maximum limit for a single receive transaction in USD(scaled with 18 decimals) from remote chain." + }, + "chainIdToMaxSingleTransactionLimit(uint16)": { + "notice": "Maximum limit for a single transaction in USD(scaled with 18 decimals) from local chain." + }, + "circulatingSupply()": { + "notice": "Returns the total circulating supply of the token on the destination chain i.e (total supply)." + }, + "dropFailedMessage(uint16,bytes,uint64)": { + "notice": "Clear failed messages from the storage." + }, + "isEligibleToSend(address,uint16,uint256)": { + "notice": "Checks the eligibility of a sender to initiate a cross-chain token transfer." + }, + "oracle()": { + "notice": "The address of ResilientOracle contract wrapped in its interface." + }, + "pause()": { + "notice": "Triggers stopped state of the bridge." + }, + "removeTrustedRemote(uint16)": { + "notice": "Remove trusted remote from storage." + }, + "renounceOwnership()": { + "notice": "Empty implementation of renounce ownership to avoid any mishappening." + }, + "sendAndCall(address,uint16,bytes32,uint256,bytes,uint64,(address,address,bytes))": { + "notice": "Initiates a cross-chain token transfer and triggers a call on the destination chain." + }, + "setMaxDailyLimit(uint16,uint256)": { + "notice": "Sets the limit of daily (24 Hour) transactions amount." + }, + "setMaxDailyReceiveLimit(uint16,uint256)": { + "notice": "Sets the maximum daily limit for receiving transactions." + }, + "setMaxSingleReceiveTransactionLimit(uint16,uint256)": { + "notice": "Sets the maximum limit for a single receive transaction." + }, + "setMaxSingleTransactionLimit(uint16,uint256)": { + "notice": "Sets the limit of single transaction amount." + }, + "setOracle(address)": { + "notice": "Set the address of the ResilientOracle contract." + }, + "setWhitelist(address,bool)": { + "notice": "Sets the whitelist address to skip checks on transaction limit." + }, + "sweepToken(address,address,uint256)": { + "notice": "A public function to sweep accidental ERC-20 transfers to this contract. Tokens are sent to user" + }, + "token()": { + "notice": "Return's the address of the inner token of this bridge." + }, + "unpause()": { + "notice": "Triggers resume state of the bridge." + }, + "updateSendAndCallEnabled(bool)": { + "notice": "It enables or disables sendAndCall functionality for the bridge." + }, + "whitelist(address)": { + "notice": "Address on which cap check and bound limit is not applicable." + } + }, + "notice": "XVSProxyOFTDest contract builds upon the functionality of its parent contract, BaseXVSProxyOFT, and focuses on managing token transfers to the destination chain. It provides functions to check eligibility and perform the actual token transfers while maintaining strict access controls and pausing mechanisms.", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 5506, + "contract": "contracts/Bridge/XVSProxyOFTDest.sol:XVSProxyOFTDest", + "label": "_paused", + "offset": 0, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 5383, + "contract": "contracts/Bridge/XVSProxyOFTDest.sol:XVSProxyOFTDest", + "label": "_owner", + "offset": 1, + "slot": "0", + "type": "t_address" + }, + { + "astId": 455, + "contract": "contracts/Bridge/XVSProxyOFTDest.sol:XVSProxyOFTDest", + "label": "trustedRemoteLookup", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_uint16,t_bytes_storage)" + }, + { + "astId": 461, + "contract": "contracts/Bridge/XVSProxyOFTDest.sol:XVSProxyOFTDest", + "label": "minDstGasLookup", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_uint16,t_mapping(t_uint16,t_uint256))" + }, + { + "astId": 465, + "contract": "contracts/Bridge/XVSProxyOFTDest.sol:XVSProxyOFTDest", + "label": "payloadSizeLimitLookup", + "offset": 0, + "slot": "3", + "type": "t_mapping(t_uint16,t_uint256)" + }, + { + "astId": 467, + "contract": "contracts/Bridge/XVSProxyOFTDest.sol:XVSProxyOFTDest", + "label": "precrime", + "offset": 0, + "slot": "4", + "type": "t_address" + }, + { + "astId": 997, + "contract": "contracts/Bridge/XVSProxyOFTDest.sol:XVSProxyOFTDest", + "label": "failedMessages", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_uint16,t_mapping(t_bytes_memory_ptr,t_mapping(t_uint64,t_bytes32)))" + }, + { + "astId": 3161, + "contract": "contracts/Bridge/XVSProxyOFTDest.sol:XVSProxyOFTDest", + "label": "creditedPackets", + "offset": 0, + "slot": "6", + "type": "t_mapping(t_uint16,t_mapping(t_bytes_memory_ptr,t_mapping(t_uint64,t_bool)))" + }, + { + "astId": 9369, + "contract": "contracts/Bridge/XVSProxyOFTDest.sol:XVSProxyOFTDest", + "label": "sendAndCallEnabled", + "offset": 0, + "slot": "7", + "type": "t_bool" + }, + { + "astId": 9373, + "contract": "contracts/Bridge/XVSProxyOFTDest.sol:XVSProxyOFTDest", + "label": "oracle", + "offset": 1, + "slot": "7", + "type": "t_contract(ResilientOracleInterface)8694" + }, + { + "astId": 9378, + "contract": "contracts/Bridge/XVSProxyOFTDest.sol:XVSProxyOFTDest", + "label": "chainIdToMaxSingleTransactionLimit", + "offset": 0, + "slot": "8", + "type": "t_mapping(t_uint16,t_uint256)" + }, + { + "astId": 9383, + "contract": "contracts/Bridge/XVSProxyOFTDest.sol:XVSProxyOFTDest", + "label": "chainIdToMaxDailyLimit", + "offset": 0, + "slot": "9", + "type": "t_mapping(t_uint16,t_uint256)" + }, + { + "astId": 9388, + "contract": "contracts/Bridge/XVSProxyOFTDest.sol:XVSProxyOFTDest", + "label": "chainIdToLast24HourTransferred", + "offset": 0, + "slot": "10", + "type": "t_mapping(t_uint16,t_uint256)" + }, + { + "astId": 9393, + "contract": "contracts/Bridge/XVSProxyOFTDest.sol:XVSProxyOFTDest", + "label": "chainIdToLast24HourWindowStart", + "offset": 0, + "slot": "11", + "type": "t_mapping(t_uint16,t_uint256)" + }, + { + "astId": 9398, + "contract": "contracts/Bridge/XVSProxyOFTDest.sol:XVSProxyOFTDest", + "label": "chainIdToMaxSingleReceiveTransactionLimit", + "offset": 0, + "slot": "12", + "type": "t_mapping(t_uint16,t_uint256)" + }, + { + "astId": 9403, + "contract": "contracts/Bridge/XVSProxyOFTDest.sol:XVSProxyOFTDest", + "label": "chainIdToMaxDailyReceiveLimit", + "offset": 0, + "slot": "13", + "type": "t_mapping(t_uint16,t_uint256)" + }, + { + "astId": 9408, + "contract": "contracts/Bridge/XVSProxyOFTDest.sol:XVSProxyOFTDest", + "label": "chainIdToLast24HourReceived", + "offset": 0, + "slot": "14", + "type": "t_mapping(t_uint16,t_uint256)" + }, + { + "astId": 9413, + "contract": "contracts/Bridge/XVSProxyOFTDest.sol:XVSProxyOFTDest", + "label": "chainIdToLast24HourReceiveWindowStart", + "offset": 0, + "slot": "15", + "type": "t_mapping(t_uint16,t_uint256)" + }, + { + "astId": 9418, + "contract": "contracts/Bridge/XVSProxyOFTDest.sol:XVSProxyOFTDest", + "label": "whitelist", + "offset": 0, + "slot": "16", + "type": "t_mapping(t_address,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_bytes_memory_ptr": { + "encoding": "bytes", + "label": "bytes", + "numberOfBytes": "32" + }, + "t_bytes_storage": { + "encoding": "bytes", + "label": "bytes", + "numberOfBytes": "32" + }, + "t_contract(ResilientOracleInterface)8694": { + "encoding": "inplace", + "label": "contract ResilientOracleInterface", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_bytes_memory_ptr,t_mapping(t_uint64,t_bool))": { + "encoding": "mapping", + "key": "t_bytes_memory_ptr", + "label": "mapping(bytes => mapping(uint64 => bool))", + "numberOfBytes": "32", + "value": "t_mapping(t_uint64,t_bool)" + }, + "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_bool)))": { + "encoding": "mapping", + "key": "t_uint16", + "label": "mapping(uint16 => mapping(bytes => mapping(uint64 => bool)))", + "numberOfBytes": "32", + "value": "t_mapping(t_bytes_memory_ptr,t_mapping(t_uint64,t_bool))" + }, + "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_uint64,t_bool)": { + "encoding": "mapping", + "key": "t_uint64", + "label": "mapping(uint64 => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_uint64,t_bytes32)": { + "encoding": "mapping", + "key": "t_uint64", + "label": "mapping(uint64 => bytes32)", + "numberOfBytes": "32", + "value": "t_bytes32" + }, + "t_uint16": { + "encoding": "inplace", + "label": "uint16", + "numberOfBytes": "2" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint64": { + "encoding": "inplace", + "label": "uint64", + "numberOfBytes": "8" + } + } + } +} diff --git a/deployments/arbitrumsepolia/solcInputs/0e89febeebc7444140de8e67c9067d2c.json b/deployments/arbitrumsepolia/solcInputs/0e89febeebc7444140de8e67c9067d2c.json new file mode 100644 index 0000000..557e5cb --- /dev/null +++ b/deployments/arbitrumsepolia/solcInputs/0e89febeebc7444140de8e67c9067d2c.json @@ -0,0 +1,78 @@ +{ + "language": "Solidity", + "sources": { + "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" + }, + "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" + }, + "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" + }, + "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" + }, + "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" + }, + "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" + }, + "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" + }, + "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" + }, + "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" + }, + "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" + }, + "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" + }, + "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" + }, + "solc_0.8/openzeppelin/proxy/utils/UUPSUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/utils/UUPSUpgradeable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../interfaces/draft-IERC1822.sol\";\nimport \"../ERC1967/ERC1967Upgrade.sol\";\n\n/**\n * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an\n * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy.\n *\n * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\n * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\n * `UUPSUpgradeable` with a custom implementation of upgrades.\n *\n * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism.\n *\n * _Available since v4.1._\n */\nabstract contract UUPSUpgradeable is IERC1822Proxiable, ERC1967Upgrade {\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable state-variable-assignment\n address private immutable __self = address(this);\n\n /**\n * @dev Check that the execution is being performed through a delegatecall call and that the execution context is\n * a proxy contract with an implementation (as defined in ERC1967) pointing to self. This should only be the case\n * for UUPS and transparent proxies that are using the current contract as their implementation. Execution of a\n * function through ERC1167 minimal proxies (clones) would not normally pass this test, but is not guaranteed to\n * fail.\n */\n modifier onlyProxy() {\n require(address(this) != __self, \"Function must be called through delegatecall\");\n require(_getImplementation() == __self, \"Function must be called through active proxy\");\n _;\n }\n\n /**\n * @dev Check that the execution is not being performed through a delegate call. This allows a function to be\n * callable on the implementing contract but not through proxies.\n */\n modifier notDelegated() {\n require(address(this) == __self, \"UUPSUpgradeable: must not be called through delegatecall\");\n _;\n }\n\n /**\n * @dev Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the\n * implementation. It is used to validate that the this implementation remains valid after an upgrade.\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. This is guaranteed by the `notDelegated` modifier.\n */\n function proxiableUUID() external view virtual override notDelegated returns (bytes32) {\n return _IMPLEMENTATION_SLOT;\n }\n\n /**\n * @dev Upgrade the implementation of the proxy to `newImplementation`.\n *\n * Calls {_authorizeUpgrade}.\n *\n * Emits an {Upgraded} event.\n */\n function upgradeTo(address newImplementation) external virtual onlyProxy {\n _authorizeUpgrade(newImplementation);\n _upgradeToAndCallUUPS(newImplementation, new bytes(0), false);\n }\n\n /**\n * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call\n * encoded in `data`.\n *\n * Calls {_authorizeUpgrade}.\n *\n * Emits an {Upgraded} event.\n */\n function upgradeToAndCall(address newImplementation, bytes memory data) external payable virtual onlyProxy {\n _authorizeUpgrade(newImplementation);\n _upgradeToAndCallUUPS(newImplementation, data, true);\n }\n\n /**\n * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by\n * {upgradeTo} and {upgradeToAndCall}.\n *\n * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}.\n *\n * ```solidity\n * function _authorizeUpgrade(address) internal override onlyOwner {}\n * ```\n */\n function _authorizeUpgrade(address newImplementation) internal virtual;\n}\n" + }, + "solc_0.8/openzeppelin/proxy/utils/Initializable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/utils/Initializable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../utils/Address.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 * 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 initialize the implementation contract, you can either invoke the\n * initializer manually, or you can include a constructor to automatically mark it as initialized when it is deployed:\n *\n * [.hljs-theme-light.nopadding]\n * ```\n * /// @custom:oz-upgrades-unsafe-allow constructor\n * constructor() initializer {}\n * ```\n * ====\n */\nabstract contract Initializable {\n /**\n * @dev Indicates that the contract has been initialized.\n */\n bool 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 Modifier to protect an initializer function from being invoked twice.\n */\n modifier initializer() {\n // If the contract is initializing we ignore whether _initialized is set in order to support multiple\n // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the\n // contract may have been reentered.\n require(_initializing ? _isConstructor() : !_initialized, \"Initializable: contract is already initialized\");\n\n bool isTopLevelCall = !_initializing;\n if (isTopLevelCall) {\n _initializing = true;\n _initialized = true;\n }\n\n _;\n\n if (isTopLevelCall) {\n _initializing = false;\n }\n }\n\n /**\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\n * {initializer} modifier, directly or indirectly.\n */\n modifier onlyInitializing() {\n require(_initializing, \"Initializable: contract is not initializing\");\n _;\n }\n\n function _isConstructor() private view returns (bool) {\n return !Address.isContract(address(this));\n }\n}\n" + }, + "solc_0.8/openzeppelin/proxy/beacon/UpgradeableBeacon.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/UpgradeableBeacon.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IBeacon.sol\";\nimport \"../../access/Ownable.sol\";\nimport \"../../utils/Address.sol\";\n\n/**\n * @dev This contract is used in conjunction with one or more instances of {BeaconProxy} to determine their\n * implementation contract, which is where they will delegate all function calls.\n *\n * An owner is able to change the implementation the beacon points to, thus upgrading the proxies that use this beacon.\n */\ncontract UpgradeableBeacon is IBeacon, Ownable {\n address private _implementation;\n\n /**\n * @dev Emitted when the implementation returned by the beacon is changed.\n */\n event Upgraded(address indexed implementation);\n\n /**\n * @dev Sets the address of the initial implementation, and the deployer account as the owner who can upgrade the\n * beacon.\n */\n\n constructor(address implementation_, address initialOwner) Ownable(initialOwner) {\n _setImplementation(implementation_);\n }\n\n /**\n * @dev Returns the current implementation address.\n */\n function implementation() public view virtual override returns (address) {\n return _implementation;\n }\n\n /**\n * @dev Upgrades the beacon to a new implementation.\n *\n * Emits an {Upgraded} event.\n *\n * Requirements:\n *\n * - msg.sender must be the owner of the contract.\n * - `newImplementation` must be a contract.\n */\n function upgradeTo(address newImplementation) public virtual onlyOwner {\n _setImplementation(newImplementation);\n emit Upgraded(newImplementation);\n }\n\n /**\n * @dev Sets the implementation contract address for this beacon\n *\n * Requirements:\n *\n * - `newImplementation` must be a contract.\n */\n function _setImplementation(address newImplementation) private {\n require(Address.isContract(newImplementation), \"UpgradeableBeacon: implementation is not a contract\");\n _implementation = newImplementation;\n }\n}\n" + }, + "solc_0.8/openzeppelin/proxy/beacon/BeaconProxy.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/BeaconProxy.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IBeacon.sol\";\nimport \"../Proxy.sol\";\nimport \"../ERC1967/ERC1967Upgrade.sol\";\n\n/**\n * @dev This contract implements a proxy that gets the implementation address for each call from a {UpgradeableBeacon}.\n *\n * The beacon address is stored in storage slot `uint256(keccak256('eip1967.proxy.beacon')) - 1`, so that it doesn't\n * conflict with the storage layout of the implementation behind the proxy.\n *\n * _Available since v3.4._\n */\ncontract BeaconProxy is Proxy, ERC1967Upgrade {\n /**\n * @dev Initializes the proxy with `beacon`.\n *\n * If `data` is nonempty, it's used as data in a delegate call to the implementation returned by the beacon. This\n * will typically be an encoded function call, and allows initializating the storage of the proxy like a Solidity\n * constructor.\n *\n * Requirements:\n *\n * - `beacon` must be a contract with the interface {IBeacon}.\n */\n constructor(address beacon, bytes memory data) payable {\n assert(_BEACON_SLOT == bytes32(uint256(keccak256(\"eip1967.proxy.beacon\")) - 1));\n _upgradeBeaconToAndCall(beacon, data, false);\n }\n\n /**\n * @dev Returns the current beacon address.\n */\n function _beacon() internal view virtual returns (address) {\n return _getBeacon();\n }\n\n /**\n * @dev Returns the current implementation address of the associated beacon.\n */\n function _implementation() internal view virtual override returns (address) {\n return IBeacon(_getBeacon()).implementation();\n }\n\n /**\n * @dev Changes the proxy to use a new beacon. Deprecated: see {_upgradeBeaconToAndCall}.\n *\n * If `data` is nonempty, it's used as data in a delegate call to the implementation returned by the beacon.\n *\n * Requirements:\n *\n * - `beacon` must be a contract.\n * - The implementation returned by `beacon` must be a contract.\n */\n function _setBeacon(address beacon, bytes memory data) internal virtual {\n _upgradeBeaconToAndCall(beacon, data, false);\n }\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 999999 + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates" + ], + "": ["ast"] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} diff --git a/deployments/arbitrumsepolia/solcInputs/f2046c3ab03975d1be43bca1cf657398.json b/deployments/arbitrumsepolia/solcInputs/f2046c3ab03975d1be43bca1cf657398.json new file mode 100644 index 0000000..556e3c9 --- /dev/null +++ b/deployments/arbitrumsepolia/solcInputs/f2046c3ab03975d1be43bca1cf657398.json @@ -0,0 +1,186 @@ +{ + "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 // try-catch all errors/exceptions\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" + }, + "@layerzerolabs/solidity-examples/contracts/token/oft/v2/BaseOFTV2.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./OFTCoreV2.sol\";\nimport \"./interfaces/IOFTV2.sol\";\nimport \"@openzeppelin/contracts/utils/introspection/ERC165.sol\";\n\nabstract contract BaseOFTV2 is OFTCoreV2, ERC165, IOFTV2 {\n constructor(uint8 _sharedDecimals, address _lzEndpoint) OFTCoreV2(_sharedDecimals, _lzEndpoint) {}\n\n /************************************************************************\n * public functions\n ************************************************************************/\n function sendFrom(\n address _from,\n uint16 _dstChainId,\n bytes32 _toAddress,\n uint _amount,\n LzCallParams calldata _callParams\n ) public payable virtual override {\n _send(_from, _dstChainId, _toAddress, _amount, _callParams.refundAddress, _callParams.zroPaymentAddress, _callParams.adapterParams);\n }\n\n function sendAndCall(\n address _from,\n uint16 _dstChainId,\n bytes32 _toAddress,\n uint _amount,\n bytes calldata _payload,\n uint64 _dstGasForCall,\n LzCallParams calldata _callParams\n ) public payable virtual override {\n _sendAndCall(\n _from,\n _dstChainId,\n _toAddress,\n _amount,\n _payload,\n _dstGasForCall,\n _callParams.refundAddress,\n _callParams.zroPaymentAddress,\n _callParams.adapterParams\n );\n }\n\n /************************************************************************\n * public view functions\n ************************************************************************/\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\n return interfaceId == type(IOFTV2).interfaceId || super.supportsInterface(interfaceId);\n }\n\n function estimateSendFee(\n uint16 _dstChainId,\n bytes32 _toAddress,\n uint _amount,\n bool _useZro,\n bytes calldata _adapterParams\n ) public view virtual override returns (uint nativeFee, uint zroFee) {\n return _estimateSendFee(_dstChainId, _toAddress, _amount, _useZro, _adapterParams);\n }\n\n function estimateSendAndCallFee(\n uint16 _dstChainId,\n bytes32 _toAddress,\n uint _amount,\n bytes calldata _payload,\n uint64 _dstGasForCall,\n bool _useZro,\n bytes calldata _adapterParams\n ) public view virtual override returns (uint nativeFee, uint zroFee) {\n return _estimateSendAndCallFee(_dstChainId, _toAddress, _amount, _payload, _dstGasForCall, _useZro, _adapterParams);\n }\n\n function circulatingSupply() public view virtual override returns (uint);\n\n function token() public view virtual override returns (address);\n}\n" + }, + "@layerzerolabs/solidity-examples/contracts/token/oft/v2/interfaces/ICommonOFT.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.5.0;\n\nimport \"@openzeppelin/contracts/utils/introspection/IERC165.sol\";\n\n/**\n * @dev Interface of the IOFT core standard\n */\ninterface ICommonOFT is IERC165 {\n\n struct LzCallParams {\n address payable refundAddress;\n address zroPaymentAddress;\n bytes adapterParams;\n }\n\n /**\n * @dev estimate send token `_tokenId` to (`_dstChainId`, `_toAddress`)\n * _dstChainId - L0 defined chain id to send tokens too\n * _toAddress - dynamic bytes array which contains the address to whom you are sending tokens to on the dstChain\n * _amount - amount of the tokens to transfer\n * _useZro - indicates to use zro to pay L0 fees\n * _adapterParam - flexible bytes array to indicate messaging adapter services in L0\n */\n function estimateSendFee(uint16 _dstChainId, bytes32 _toAddress, uint _amount, bool _useZro, bytes calldata _adapterParams) external view returns (uint nativeFee, uint zroFee);\n\n function estimateSendAndCallFee(uint16 _dstChainId, bytes32 _toAddress, uint _amount, bytes calldata _payload, uint64 _dstGasForCall, bool _useZro, bytes calldata _adapterParams) external view returns (uint nativeFee, uint zroFee);\n\n /**\n * @dev returns the circulating amount of tokens on current chain\n */\n function circulatingSupply() external view returns (uint);\n\n /**\n * @dev returns the address of the ERC20 token\n */\n function token() external view returns (address);\n}\n" + }, + "@layerzerolabs/solidity-examples/contracts/token/oft/v2/interfaces/IOFTReceiverV2.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity >=0.5.0;\n\ninterface IOFTReceiverV2 {\n /**\n * @dev Called by the OFT contract when tokens are received from source chain.\n * @param _srcChainId The chain id of the source chain.\n * @param _srcAddress The address of the OFT token contract on the source chain.\n * @param _nonce The nonce of the transaction on the source chain.\n * @param _from The address of the account who calls the sendAndCall() on the source chain.\n * @param _amount The amount of tokens to transfer.\n * @param _payload Additional data with no specified format.\n */\n function onOFTReceived(uint16 _srcChainId, bytes calldata _srcAddress, uint64 _nonce, bytes32 _from, uint _amount, bytes calldata _payload) external;\n}\n" + }, + "@layerzerolabs/solidity-examples/contracts/token/oft/v2/interfaces/IOFTV2.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.5.0;\n\nimport \"./ICommonOFT.sol\";\n\n/**\n * @dev Interface of the IOFT core standard\n */\ninterface IOFTV2 is ICommonOFT {\n\n /**\n * @dev send `_amount` amount of token to (`_dstChainId`, `_toAddress`) from `_from`\n * `_from` the owner of token\n * `_dstChainId` the destination chain identifier\n * `_toAddress` can be any size depending on the `dstChainId`.\n * `_amount` the quantity of tokens in wei\n * `_refundAddress` the address LayerZero refunds if too much message fee is sent\n * `_zroPaymentAddress` set to address(0x0) if not paying in ZRO (LayerZero Token)\n * `_adapterParams` is a flexible bytes array to indicate messaging adapter services\n */\n function sendFrom(address _from, uint16 _dstChainId, bytes32 _toAddress, uint _amount, LzCallParams calldata _callParams) external payable;\n\n function sendAndCall(address _from, uint16 _dstChainId, bytes32 _toAddress, uint _amount, bytes calldata _payload, uint64 _dstGasForCall, LzCallParams calldata _callParams) external payable;\n}\n" + }, + "@layerzerolabs/solidity-examples/contracts/token/oft/v2/OFTCoreV2.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../../../lzApp/NonblockingLzApp.sol\";\nimport \"../../../libraries/ExcessivelySafeCall.sol\";\nimport \"./interfaces/ICommonOFT.sol\";\nimport \"./interfaces/IOFTReceiverV2.sol\";\n\nabstract contract OFTCoreV2 is NonblockingLzApp {\n using BytesLib for bytes;\n using ExcessivelySafeCall for address;\n\n uint public constant NO_EXTRA_GAS = 0;\n\n // packet type\n uint8 public constant PT_SEND = 0;\n uint8 public constant PT_SEND_AND_CALL = 1;\n\n uint8 public immutable sharedDecimals;\n\n mapping(uint16 => mapping(bytes => mapping(uint64 => bool))) public creditedPackets;\n\n /**\n * @dev Emitted when `_amount` tokens are moved from the `_sender` to (`_dstChainId`, `_toAddress`)\n * `_nonce` is the outbound nonce\n */\n event SendToChain(uint16 indexed _dstChainId, address indexed _from, bytes32 indexed _toAddress, uint _amount);\n\n /**\n * @dev Emitted when `_amount` tokens are received from `_srcChainId` into the `_toAddress` on the local chain.\n * `_nonce` is the inbound nonce.\n */\n event ReceiveFromChain(uint16 indexed _srcChainId, address indexed _to, uint _amount);\n\n event CallOFTReceivedSuccess(uint16 indexed _srcChainId, bytes _srcAddress, uint64 _nonce, bytes32 _hash);\n\n event NonContractAddress(address _address);\n\n // _sharedDecimals should be the minimum decimals on all chains\n constructor(uint8 _sharedDecimals, address _lzEndpoint) NonblockingLzApp(_lzEndpoint) {\n sharedDecimals = _sharedDecimals;\n }\n\n /************************************************************************\n * public functions\n ************************************************************************/\n function callOnOFTReceived(\n uint16 _srcChainId,\n bytes calldata _srcAddress,\n uint64 _nonce,\n bytes32 _from,\n address _to,\n uint _amount,\n bytes calldata _payload,\n uint _gasForCall\n ) public virtual {\n require(_msgSender() == address(this), \"OFTCore: caller must be OFTCore\");\n\n // send\n _amount = _transferFrom(address(this), _to, _amount);\n emit ReceiveFromChain(_srcChainId, _to, _amount);\n\n // call\n IOFTReceiverV2(_to).onOFTReceived{gas: _gasForCall}(_srcChainId, _srcAddress, _nonce, _from, _amount, _payload);\n }\n\n /************************************************************************\n * internal functions\n ************************************************************************/\n function _estimateSendFee(\n uint16 _dstChainId,\n bytes32 _toAddress,\n uint _amount,\n bool _useZro,\n bytes memory _adapterParams\n ) internal view virtual returns (uint nativeFee, uint zroFee) {\n // mock the payload for sendFrom()\n bytes memory payload = _encodeSendPayload(_toAddress, _ld2sd(_amount));\n return lzEndpoint.estimateFees(_dstChainId, address(this), payload, _useZro, _adapterParams);\n }\n\n function _estimateSendAndCallFee(\n uint16 _dstChainId,\n bytes32 _toAddress,\n uint _amount,\n bytes memory _payload,\n uint64 _dstGasForCall,\n bool _useZro,\n bytes memory _adapterParams\n ) internal view virtual returns (uint nativeFee, uint zroFee) {\n // mock the payload for sendAndCall()\n bytes memory payload = _encodeSendAndCallPayload(msg.sender, _toAddress, _ld2sd(_amount), _payload, _dstGasForCall);\n return lzEndpoint.estimateFees(_dstChainId, address(this), payload, _useZro, _adapterParams);\n }\n\n function _nonblockingLzReceive(\n uint16 _srcChainId,\n bytes memory _srcAddress,\n uint64 _nonce,\n bytes memory _payload\n ) internal virtual override {\n uint8 packetType = _payload.toUint8(0);\n\n if (packetType == PT_SEND) {\n _sendAck(_srcChainId, _srcAddress, _nonce, _payload);\n } else if (packetType == PT_SEND_AND_CALL) {\n _sendAndCallAck(_srcChainId, _srcAddress, _nonce, _payload);\n } else {\n revert(\"OFTCore: unknown packet type\");\n }\n }\n\n function _send(\n address _from,\n uint16 _dstChainId,\n bytes32 _toAddress,\n uint _amount,\n address payable _refundAddress,\n address _zroPaymentAddress,\n bytes memory _adapterParams\n ) internal virtual returns (uint amount) {\n _checkGasLimit(_dstChainId, PT_SEND, _adapterParams, NO_EXTRA_GAS);\n\n (amount, ) = _removeDust(_amount);\n amount = _debitFrom(_from, _dstChainId, _toAddress, amount); // amount returned should not have dust\n require(amount > 0, \"OFTCore: amount too small\");\n\n bytes memory lzPayload = _encodeSendPayload(_toAddress, _ld2sd(amount));\n _lzSend(_dstChainId, lzPayload, _refundAddress, _zroPaymentAddress, _adapterParams, msg.value);\n\n emit SendToChain(_dstChainId, _from, _toAddress, amount);\n }\n\n function _sendAck(\n uint16 _srcChainId,\n bytes memory,\n uint64,\n bytes memory _payload\n ) internal virtual {\n (address to, uint64 amountSD) = _decodeSendPayload(_payload);\n if (to == address(0)) {\n to = address(0xdead);\n }\n\n uint amount = _sd2ld(amountSD);\n amount = _creditTo(_srcChainId, to, amount);\n\n emit ReceiveFromChain(_srcChainId, to, amount);\n }\n\n function _sendAndCall(\n address _from,\n uint16 _dstChainId,\n bytes32 _toAddress,\n uint _amount,\n bytes memory _payload,\n uint64 _dstGasForCall,\n address payable _refundAddress,\n address _zroPaymentAddress,\n bytes memory _adapterParams\n ) internal virtual returns (uint amount) {\n _checkGasLimit(_dstChainId, PT_SEND_AND_CALL, _adapterParams, _dstGasForCall);\n\n (amount, ) = _removeDust(_amount);\n amount = _debitFrom(_from, _dstChainId, _toAddress, amount);\n require(amount > 0, \"OFTCore: amount too small\");\n\n // encode the msg.sender into the payload instead of _from\n bytes memory lzPayload = _encodeSendAndCallPayload(msg.sender, _toAddress, _ld2sd(amount), _payload, _dstGasForCall);\n _lzSend(_dstChainId, lzPayload, _refundAddress, _zroPaymentAddress, _adapterParams, msg.value);\n\n emit SendToChain(_dstChainId, _from, _toAddress, amount);\n }\n\n function _sendAndCallAck(\n uint16 _srcChainId,\n bytes memory _srcAddress,\n uint64 _nonce,\n bytes memory _payload\n ) internal virtual {\n (bytes32 from, address to, uint64 amountSD, bytes memory payloadForCall, uint64 gasForCall) = _decodeSendAndCallPayload(_payload);\n\n bool credited = creditedPackets[_srcChainId][_srcAddress][_nonce];\n uint amount = _sd2ld(amountSD);\n\n // credit to this contract first, and then transfer to receiver only if callOnOFTReceived() succeeds\n if (!credited) {\n amount = _creditTo(_srcChainId, address(this), amount);\n creditedPackets[_srcChainId][_srcAddress][_nonce] = true;\n }\n\n if (!_isContract(to)) {\n emit NonContractAddress(to);\n return;\n }\n\n // workaround for stack too deep\n uint16 srcChainId = _srcChainId;\n bytes memory srcAddress = _srcAddress;\n uint64 nonce = _nonce;\n bytes memory payload = _payload;\n bytes32 from_ = from;\n address to_ = to;\n uint amount_ = amount;\n bytes memory payloadForCall_ = payloadForCall;\n\n // no gas limit for the call if retry\n uint gas = credited ? gasleft() : gasForCall;\n (bool success, bytes memory reason) = address(this).excessivelySafeCall(\n gasleft(),\n 150,\n abi.encodeWithSelector(this.callOnOFTReceived.selector, srcChainId, srcAddress, nonce, from_, to_, amount_, payloadForCall_, gas)\n );\n\n if (success) {\n bytes32 hash = keccak256(payload);\n emit CallOFTReceivedSuccess(srcChainId, srcAddress, nonce, hash);\n } else {\n // store the failed message into the nonblockingLzApp\n _storeFailedMessage(srcChainId, srcAddress, nonce, payload, reason);\n }\n }\n\n function _isContract(address _account) internal view returns (bool) {\n return _account.code.length > 0;\n }\n\n function _ld2sd(uint _amount) internal view virtual returns (uint64) {\n uint amountSD = _amount / _ld2sdRate();\n require(amountSD <= type(uint64).max, \"OFTCore: amountSD overflow\");\n return uint64(amountSD);\n }\n\n function _sd2ld(uint64 _amountSD) internal view virtual returns (uint) {\n return _amountSD * _ld2sdRate();\n }\n\n function _removeDust(uint _amount) internal view virtual returns (uint amountAfter, uint dust) {\n dust = _amount % _ld2sdRate();\n amountAfter = _amount - dust;\n }\n\n function _encodeSendPayload(bytes32 _toAddress, uint64 _amountSD) internal view virtual returns (bytes memory) {\n return abi.encodePacked(PT_SEND, _toAddress, _amountSD);\n }\n\n function _decodeSendPayload(bytes memory _payload) internal view virtual returns (address to, uint64 amountSD) {\n require(_payload.toUint8(0) == PT_SEND && _payload.length == 41, \"OFTCore: invalid payload\");\n\n to = _payload.toAddress(13); // drop the first 12 bytes of bytes32\n amountSD = _payload.toUint64(33);\n }\n\n function _encodeSendAndCallPayload(\n address _from,\n bytes32 _toAddress,\n uint64 _amountSD,\n bytes memory _payload,\n uint64 _dstGasForCall\n ) internal view virtual returns (bytes memory) {\n return abi.encodePacked(PT_SEND_AND_CALL, _toAddress, _amountSD, _addressToBytes32(_from), _dstGasForCall, _payload);\n }\n\n function _decodeSendAndCallPayload(bytes memory _payload)\n internal\n view\n virtual\n returns (\n bytes32 from,\n address to,\n uint64 amountSD,\n bytes memory payload,\n uint64 dstGasForCall\n )\n {\n require(_payload.toUint8(0) == PT_SEND_AND_CALL, \"OFTCore: invalid payload\");\n\n to = _payload.toAddress(13); // drop the first 12 bytes of bytes32\n amountSD = _payload.toUint64(33);\n from = _payload.toBytes32(41);\n dstGasForCall = _payload.toUint64(73);\n payload = _payload.slice(81, _payload.length - 81);\n }\n\n function _addressToBytes32(address _address) internal pure virtual returns (bytes32) {\n return bytes32(uint(uint160(_address)));\n }\n\n function _debitFrom(\n address _from,\n uint16 _dstChainId,\n bytes32 _toAddress,\n uint _amount\n ) internal virtual returns (uint);\n\n function _creditTo(\n uint16 _srcChainId,\n address _toAddress,\n uint _amount\n ) internal virtual returns (uint);\n\n function _transferFrom(\n address _from,\n address _to,\n uint _amount\n ) internal virtual returns (uint);\n\n function _ld2sdRate() internal view virtual returns (uint);\n}\n" + }, + "@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.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() public virtual {\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.9.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. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby disabling 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.9.0) (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 * ```solidity\n * contract MyToken is ERC20Upgradeable {\n * function initialize() initializer public {\n * __ERC20_init(\"MyToken\", \"MTK\");\n * }\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.9.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 * Furthermore, `isContract` will also return true if the target contract within\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\n * which only has an effect at the end of a transaction.\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://consensys.net/diligence/blog/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.8.0/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(address target, bytes memory data, uint256 value) 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 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 (bool success, bytes memory returndata) = target.delegatecall(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.9.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 * ```solidity\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 * ```solidity\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. We recommend using {AccessControlDefaultAdminRules}\n * to enforce additional security measures for this role.\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.9.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. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby disabling 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/token/ERC20/ERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/ERC20.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC20.sol\";\nimport \"./extensions/IERC20Metadata.sol\";\nimport \"../../utils/Context.sol\";\n\n/**\n * @dev Implementation of the {IERC20} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n * For a generic mechanism see {ERC20PresetMinterPauser}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * The default value of {decimals} is 18. To change this, you should override\n * this function so it returns a different value.\n *\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\n * instead returning `false` on failure. This behavior is nonetheless\n * conventional and does not conflict with the expectations of ERC20\n * applications.\n *\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\n * This allows applications to reconstruct the allowance for all accounts just\n * by listening to said events. Other implementations of the EIP may not emit\n * these events, as it isn't required by the specification.\n *\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\n * functions have been added to mitigate the well-known issues around setting\n * allowances. See {IERC20-approve}.\n */\ncontract ERC20 is Context, IERC20, IERC20Metadata {\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n string private _name;\n string private _symbol;\n\n /**\n * @dev Sets the values for {name} and {symbol}.\n *\n * All two of these values are immutable: they can only be set once during\n * construction.\n */\n constructor(string memory name_, string memory symbol_) {\n _name = name_;\n _symbol = symbol_;\n }\n\n /**\n * @dev Returns the name of the token.\n */\n function name() public view virtual override returns (string memory) {\n return _name;\n }\n\n /**\n * @dev Returns the symbol of the token, usually a shorter version of the\n * name.\n */\n function symbol() public view virtual override returns (string memory) {\n return _symbol;\n }\n\n /**\n * @dev Returns the number of decimals used to get its user representation.\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\n *\n * Tokens usually opt for a value of 18, imitating the relationship between\n * Ether and Wei. This is the default value returned by this function, unless\n * it's overridden.\n *\n * NOTE: This information is only used for _display_ purposes: it in\n * no way affects any of the arithmetic of the contract, including\n * {IERC20-balanceOf} and {IERC20-transfer}.\n */\n function decimals() public view virtual override returns (uint8) {\n return 18;\n }\n\n /**\n * @dev See {IERC20-totalSupply}.\n */\n function totalSupply() public view virtual override returns (uint256) {\n return _totalSupply;\n }\n\n /**\n * @dev See {IERC20-balanceOf}.\n */\n function balanceOf(address account) public view virtual override returns (uint256) {\n return _balances[account];\n }\n\n /**\n * @dev See {IERC20-transfer}.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - the caller must have a balance of at least `amount`.\n */\n function transfer(address to, uint256 amount) public virtual override returns (bool) {\n address owner = _msgSender();\n _transfer(owner, to, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-allowance}.\n */\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n /**\n * @dev See {IERC20-approve}.\n *\n * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on\n * `transferFrom`. This is semantically equivalent to an infinite approval.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\n address owner = _msgSender();\n _approve(owner, spender, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-transferFrom}.\n *\n * Emits an {Approval} event indicating the updated allowance. This is not\n * required by the EIP. See the note at the beginning of {ERC20}.\n *\n * NOTE: Does not update the allowance if the current allowance\n * is the maximum `uint256`.\n *\n * Requirements:\n *\n * - `from` and `to` cannot be the zero address.\n * - `from` must have a balance of at least `amount`.\n * - the caller must have allowance for ``from``'s tokens of at least\n * `amount`.\n */\n function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) {\n address spender = _msgSender();\n _spendAllowance(from, spender, amount);\n _transfer(from, to, amount);\n return true;\n }\n\n /**\n * @dev Atomically increases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\n address owner = _msgSender();\n _approve(owner, spender, allowance(owner, spender) + addedValue);\n return true;\n }\n\n /**\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `spender` must have allowance for the caller of at least\n * `subtractedValue`.\n */\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\n address owner = _msgSender();\n uint256 currentAllowance = allowance(owner, spender);\n require(currentAllowance >= subtractedValue, \"ERC20: decreased allowance below zero\");\n unchecked {\n _approve(owner, spender, currentAllowance - subtractedValue);\n }\n\n return true;\n }\n\n /**\n * @dev Moves `amount` of tokens from `from` to `to`.\n *\n * This internal function is equivalent to {transfer}, and can be used to\n * e.g. implement automatic token fees, slashing mechanisms, etc.\n *\n * Emits a {Transfer} event.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `from` must have a balance of at least `amount`.\n */\n function _transfer(address from, address to, uint256 amount) internal virtual {\n require(from != address(0), \"ERC20: transfer from the zero address\");\n require(to != address(0), \"ERC20: transfer to the zero address\");\n\n _beforeTokenTransfer(from, to, amount);\n\n uint256 fromBalance = _balances[from];\n require(fromBalance >= amount, \"ERC20: transfer amount exceeds balance\");\n unchecked {\n _balances[from] = fromBalance - amount;\n // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by\n // decrementing then incrementing.\n _balances[to] += amount;\n }\n\n emit Transfer(from, to, amount);\n\n _afterTokenTransfer(from, to, amount);\n }\n\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\n * the total supply.\n *\n * Emits a {Transfer} event with `from` set to the zero address.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n */\n function _mint(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: mint to the zero address\");\n\n _beforeTokenTransfer(address(0), account, amount);\n\n _totalSupply += amount;\n unchecked {\n // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.\n _balances[account] += amount;\n }\n emit Transfer(address(0), account, amount);\n\n _afterTokenTransfer(address(0), account, amount);\n }\n\n /**\n * @dev Destroys `amount` tokens from `account`, reducing the\n * total supply.\n *\n * Emits a {Transfer} event with `to` set to the zero address.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n * - `account` must have at least `amount` tokens.\n */\n function _burn(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: burn from the zero address\");\n\n _beforeTokenTransfer(account, address(0), amount);\n\n uint256 accountBalance = _balances[account];\n require(accountBalance >= amount, \"ERC20: burn amount exceeds balance\");\n unchecked {\n _balances[account] = accountBalance - amount;\n // Overflow not possible: amount <= accountBalance <= totalSupply.\n _totalSupply -= amount;\n }\n\n emit Transfer(account, address(0), amount);\n\n _afterTokenTransfer(account, address(0), amount);\n }\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\n *\n * This internal function is equivalent to `approve`, and can be used to\n * e.g. set automatic allowances for certain subsystems, etc.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `owner` cannot be the zero address.\n * - `spender` cannot be the zero address.\n */\n function _approve(address owner, address spender, uint256 amount) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n emit Approval(owner, spender, amount);\n }\n\n /**\n * @dev Updates `owner` s allowance for `spender` based on spent `amount`.\n *\n * Does not update the allowance amount in case of infinite allowance.\n * Revert if not enough allowance is available.\n *\n * Might emit an {Approval} event.\n */\n function _spendAllowance(address owner, address spender, uint256 amount) internal virtual {\n uint256 currentAllowance = allowance(owner, spender);\n if (currentAllowance != type(uint256).max) {\n require(currentAllowance >= amount, \"ERC20: insufficient allowance\");\n unchecked {\n _approve(owner, spender, currentAllowance - amount);\n }\n }\n }\n\n /**\n * @dev Hook that is called before any transfer of tokens. This includes\n * minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * will be transferred to `to`.\n * - when `from` is zero, `amount` tokens will be minted for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\n * - `from` and `to` are never both zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual {}\n\n /**\n * @dev Hook that is called after any transfer of tokens. This includes\n * minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * has been transferred to `to`.\n * - when `from` is zero, `amount` tokens have been minted for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\n * - `from` and `to` are never both zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _afterTokenTransfer(address from, address to, uint256 amount) internal virtual {}\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC20 standard.\n *\n * _Available since v4.1._\n */\ninterface IERC20Metadata is IERC20 {\n /**\n * @dev Returns the name of the token.\n */\n function name() external view returns (string memory);\n\n /**\n * @dev Returns the symbol of the token.\n */\n function symbol() external view returns (string memory);\n\n /**\n * @dev Returns the decimals places of the token.\n */\n function decimals() external view returns (uint8);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/IERC20Permit.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\n *\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\n * need to send a transaction, and thus is not required to hold Ether at all.\n */\ninterface IERC20Permit {\n /**\n * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\n * given ``owner``'s signed approval.\n *\n * IMPORTANT: The same issues {IERC20-approve} has related to transaction\n * ordering also apply here.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `deadline` must be a timestamp in the future.\n * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\n * over the EIP712-formatted function arguments.\n * - the signature must use ``owner``'s current nonce (see {nonces}).\n *\n * For more information on the signature format, see the\n * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\n * section].\n */\n function permit(\n address owner,\n address spender,\n uint256 value,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external;\n\n /**\n * @dev Returns the current nonce for `owner`. This value must be\n * included whenever a signature is generated for {permit}.\n *\n * Every successful call to {permit} increases ``owner``'s nonce by one. This\n * prevents a signature from being used multiple times.\n */\n function nonces(address owner) external view returns (uint256);\n\n /**\n * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\n */\n // solhint-disable-next-line func-name-mixedcase\n function DOMAIN_SEPARATOR() external view returns (bytes32);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/IERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `to`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address to, uint256 amount) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `from` to `to` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20.sol\";\nimport \"../extensions/IERC20Permit.sol\";\nimport \"../../../utils/Address.sol\";\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\n * contract returns false). Tokens that return no value (and instead revert or\n * throw on failure) are also supported, non-reverting calls are assumed to be\n * successful.\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeERC20 {\n using Address for address;\n\n /**\n * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,\n * non-reverting calls are assumed to be successful.\n */\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\n }\n\n /**\n * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the\n * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.\n */\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\n }\n\n /**\n * @dev Deprecated. This function has issues similar to the ones found in\n * {IERC20-approve}, and its usage is discouraged.\n *\n * Whenever possible, use {safeIncreaseAllowance} and\n * {safeDecreaseAllowance} instead.\n */\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\n // safeApprove should only be called when setting an initial allowance,\n // or when resetting it to zero. To increase and decrease it, use\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\n require(\n (value == 0) || (token.allowance(address(this), spender) == 0),\n \"SafeERC20: approve from non-zero to non-zero allowance\"\n );\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\n }\n\n /**\n * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\n * non-reverting calls are assumed to be successful.\n */\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n uint256 oldAllowance = token.allowance(address(this), spender);\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));\n }\n\n /**\n * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\n * non-reverting calls are assumed to be successful.\n */\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n unchecked {\n uint256 oldAllowance = token.allowance(address(this), spender);\n require(oldAllowance >= value, \"SafeERC20: decreased allowance below zero\");\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));\n }\n }\n\n /**\n * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,\n * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval\n * to be set to zero before setting it to a non-zero value, such as USDT.\n */\n function forceApprove(IERC20 token, address spender, uint256 value) internal {\n bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);\n\n if (!_callOptionalReturnBool(token, approvalCall)) {\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));\n _callOptionalReturn(token, approvalCall);\n }\n }\n\n /**\n * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.\n * Revert on invalid signature.\n */\n function safePermit(\n IERC20Permit token,\n address owner,\n address spender,\n uint256 value,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal {\n uint256 nonceBefore = token.nonces(owner);\n token.permit(owner, spender, value, deadline, v, r, s);\n uint256 nonceAfter = token.nonces(owner);\n require(nonceAfter == nonceBefore + 1, \"SafeERC20: permit did not succeed\");\n }\n\n /**\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n * on the return value: the return value is optional (but if data is returned, it must not be false).\n * @param token The token targeted by the call.\n * @param data The call data (encoded using abi.encode or one of its variants).\n */\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\n // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that\n // the target address contains contract code and also asserts for success in the low-level call.\n\n bytes memory returndata = address(token).functionCall(data, \"SafeERC20: low-level call failed\");\n require(returndata.length == 0 || abi.decode(returndata, (bool)), \"SafeERC20: ERC20 operation did not succeed\");\n }\n\n /**\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n * on the return value: the return value is optional (but if data is returned, it must not be false).\n * @param token The token targeted by the call.\n * @param data The call data (encoded using abi.encode or one of its variants).\n *\n * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.\n */\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\n // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false\n // and not revert is the subcall reverts.\n\n (bool success, bytes memory returndata) = address(token).call(data);\n return\n success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token));\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Address.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.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 * Furthermore, `isContract` will also return true if the target contract within\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\n * which only has an effect at the end of a transaction.\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://consensys.net/diligence/blog/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.8.0/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(address target, bytes memory data, uint256 value) 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 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 (bool success, bytes memory returndata) = target.delegatecall(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/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.9.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(uint256 x, uint256 y, uint256 denominator) 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 // Solidity will revert if denominator == 0, unlike the div opcode on its own.\n // The surrounding unchecked block does not change this fact.\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\n return prod0 / denominator;\n }\n\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\n require(denominator > prod1, \"Math: mulDiv overflow\");\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(uint256 x, uint256 y, uint256 denominator, Rounding rounding) 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 256, 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 << 3) < value ? 1 : 0);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/math/SignedMath.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Standard signed math utilities missing in the Solidity language.\n */\nlibrary SignedMath {\n /**\n * @dev Returns the largest of two signed numbers.\n */\n function max(int256 a, int256 b) internal pure returns (int256) {\n return a > b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two signed numbers.\n */\n function min(int256 a, int256 b) internal pure returns (int256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two signed numbers without overflow.\n * The result is rounded towards zero.\n */\n function average(int256 a, int256 b) internal pure returns (int256) {\n // Formula from the book \"Hacker's Delight\"\n int256 x = (a & b) + ((a ^ b) >> 1);\n return x + (int256(uint256(x) >> 255) & (a ^ b));\n }\n\n /**\n * @dev Returns the absolute unsigned value of a signed value.\n */\n function abs(int256 n) internal pure returns (uint256) {\n unchecked {\n // must be unchecked in order to support `n = type(int256).min`\n return uint256(n >= 0 ? n : -n);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Strings.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./math/Math.sol\";\nimport \"./math/SignedMath.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 `int256` to its ASCII `string` decimal representation.\n */\n function toString(int256 value) internal pure returns (string memory) {\n return string(abi.encodePacked(value < 0 ? \"-\" : \"\", toString(SignedMath.abs(value))));\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 /**\n * @dev Returns true if the two strings are equal.\n */\n function equal(string memory a, string memory b) internal pure returns (bool) {\n return keccak256(bytes(a)) == keccak256(bytes(b));\n }\n}\n" + }, + "@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV8.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.13;\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" + }, + "@venusprotocol/governance-contracts/contracts/Governance/AccessControlManager.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.13;\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" + }, + "@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV8.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.13;\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" + }, + "@venusprotocol/oracle/contracts/interfaces/OracleInterface.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.13;\n\ninterface OracleInterface {\n function getPrice(address asset) external view returns (uint256);\n}\n\ninterface ResilientOracleInterface is OracleInterface {\n function updatePrice(address vToken) external;\n\n function updateAssetPrice(address asset) external;\n\n function getUnderlyingPrice(address vToken) external view returns (uint256);\n}\n\ninterface TwapInterface is OracleInterface {\n function updateTwap(address asset) external returns (uint256);\n}\n\ninterface BoundValidatorInterface {\n function validatePriceWithAnchorPrice(\n address asset,\n uint256 reporterPrice,\n uint256 anchorPrice\n ) external view returns (bool);\n}\n" + }, + "@venusprotocol/solidity-utilities/contracts/constants.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.13;\n\n/// @dev Base unit for computations, usually used in scaling (multiplications, divisions)\nuint256 constant EXP_SCALE = 1e18;\n\n/// @dev A unit (literal one) in EXP_SCALE, usually used in additions/subtractions\nuint256 constant MANTISSA_ONE = EXP_SCALE;\n" + }, + "@venusprotocol/solidity-utilities/contracts/ExponentialNoError.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.13;\n\nimport { EXP_SCALE as EXP_SCALE_, MANTISSA_ONE as MANTISSA_ONE_ } from \"./constants.sol\";\n\n/**\n * @title Exponential module for storing fixed-precision decimals\n * @author Compound\n * @notice Exp is a struct which stores decimals with a fixed precision of 18 decimal places.\n * Thus, if we wanted to store the 5.1, mantissa would store 5.1e18. That is:\n * `Exp({mantissa: 5100000000000000000})`.\n */\ncontract ExponentialNoError {\n struct Exp {\n uint256 mantissa;\n }\n\n struct Double {\n uint256 mantissa;\n }\n\n uint256 internal constant EXP_SCALE = EXP_SCALE_;\n uint256 internal constant DOUBLE_SCALE = 1e36;\n uint256 internal constant HALF_EXP_SCALE = EXP_SCALE / 2;\n uint256 internal constant MANTISSA_ONE = MANTISSA_ONE_;\n\n /**\n * @dev Truncates the given exp to a whole number value.\n * For example, truncate(Exp{mantissa: 15 * EXP_SCALE}) = 15\n */\n function truncate(Exp memory exp) internal pure returns (uint256) {\n // Note: We are not using careful math here as we're performing a division that cannot fail\n return exp.mantissa / EXP_SCALE;\n }\n\n /**\n * @dev Multiply an Exp by a scalar, then truncate to return an unsigned integer.\n */\n // solhint-disable-next-line func-name-mixedcase\n function mul_ScalarTruncate(Exp memory a, uint256 scalar) internal pure returns (uint256) {\n Exp memory product = mul_(a, scalar);\n return truncate(product);\n }\n\n /**\n * @dev Multiply an Exp by a scalar, truncate, then add an to an unsigned integer, returning an unsigned integer.\n */\n // solhint-disable-next-line func-name-mixedcase\n function mul_ScalarTruncateAddUInt(Exp memory a, uint256 scalar, uint256 addend) internal pure returns (uint256) {\n Exp memory product = mul_(a, scalar);\n return add_(truncate(product), addend);\n }\n\n /**\n * @dev Checks if first Exp is less than second Exp.\n */\n function lessThanExp(Exp memory left, Exp memory right) internal pure returns (bool) {\n return left.mantissa < right.mantissa;\n }\n\n function safe224(uint256 n, string memory errorMessage) internal pure returns (uint224) {\n require(n <= type(uint224).max, errorMessage);\n return uint224(n);\n }\n\n function safe32(uint256 n, string memory errorMessage) internal pure returns (uint32) {\n require(n <= type(uint32).max, errorMessage);\n return uint32(n);\n }\n\n function add_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\n return Exp({ mantissa: add_(a.mantissa, b.mantissa) });\n }\n\n function add_(Double memory a, Double memory b) internal pure returns (Double memory) {\n return Double({ mantissa: add_(a.mantissa, b.mantissa) });\n }\n\n function add_(uint256 a, uint256 b) internal pure returns (uint256) {\n return a + b;\n }\n\n function sub_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\n return Exp({ mantissa: sub_(a.mantissa, b.mantissa) });\n }\n\n function sub_(Double memory a, Double memory b) internal pure returns (Double memory) {\n return Double({ mantissa: sub_(a.mantissa, b.mantissa) });\n }\n\n function sub_(uint256 a, uint256 b) internal pure returns (uint256) {\n return a - b;\n }\n\n function mul_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\n return Exp({ mantissa: mul_(a.mantissa, b.mantissa) / EXP_SCALE });\n }\n\n function mul_(Exp memory a, uint256 b) internal pure returns (Exp memory) {\n return Exp({ mantissa: mul_(a.mantissa, b) });\n }\n\n function mul_(uint256 a, Exp memory b) internal pure returns (uint256) {\n return mul_(a, b.mantissa) / EXP_SCALE;\n }\n\n function mul_(Double memory a, Double memory b) internal pure returns (Double memory) {\n return Double({ mantissa: mul_(a.mantissa, b.mantissa) / DOUBLE_SCALE });\n }\n\n function mul_(Double memory a, uint256 b) internal pure returns (Double memory) {\n return Double({ mantissa: mul_(a.mantissa, b) });\n }\n\n function mul_(uint256 a, Double memory b) internal pure returns (uint256) {\n return mul_(a, b.mantissa) / DOUBLE_SCALE;\n }\n\n function mul_(uint256 a, uint256 b) internal pure returns (uint256) {\n return a * b;\n }\n\n function div_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\n return Exp({ mantissa: div_(mul_(a.mantissa, EXP_SCALE), b.mantissa) });\n }\n\n function div_(Exp memory a, uint256 b) internal pure returns (Exp memory) {\n return Exp({ mantissa: div_(a.mantissa, b) });\n }\n\n function div_(uint256 a, Exp memory b) internal pure returns (uint256) {\n return div_(mul_(a, EXP_SCALE), b.mantissa);\n }\n\n function div_(Double memory a, Double memory b) internal pure returns (Double memory) {\n return Double({ mantissa: div_(mul_(a.mantissa, DOUBLE_SCALE), b.mantissa) });\n }\n\n function div_(Double memory a, uint256 b) internal pure returns (Double memory) {\n return Double({ mantissa: div_(a.mantissa, b) });\n }\n\n function div_(uint256 a, Double memory b) internal pure returns (uint256) {\n return div_(mul_(a, DOUBLE_SCALE), b.mantissa);\n }\n\n function div_(uint256 a, uint256 b) internal pure returns (uint256) {\n return a / b;\n }\n\n function fraction(uint256 a, uint256 b) internal pure returns (Double memory) {\n return Double({ mantissa: div_(mul_(a, DOUBLE_SCALE), b) });\n }\n}\n" + }, + "@venusprotocol/solidity-utilities/contracts/validators.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.13;\n\n/// @notice Thrown if the supplied address is a zero address where it is not allowed\nerror ZeroAddressNotAllowed();\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" + }, + "contracts/Bridge/BaseXVSProxyOFT.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.13;\n\nimport { SafeERC20, IERC20 } from \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\nimport { ResilientOracleInterface } from \"@venusprotocol/oracle/contracts/interfaces/OracleInterface.sol\";\nimport { Pausable } from \"@openzeppelin/contracts/security/Pausable.sol\";\nimport { BaseOFTV2 } from \"@layerzerolabs/solidity-examples/contracts/token/oft/v2/BaseOFTV2.sol\";\nimport { ensureNonzeroAddress } from \"@venusprotocol/solidity-utilities/contracts/validators.sol\";\nimport { ExponentialNoError } from \"@venusprotocol/solidity-utilities/contracts/ExponentialNoError.sol\";\n\n/**\n * @title BaseXVSProxyOFT\n * @author Venus\n * @notice The BaseXVSProxyOFT contract is tailored for facilitating cross-chain transactions with an ERC20 token.\n * It manages transaction limits of a single and daily transactions.\n * This contract inherits key functionalities from other contracts, including pausing capabilities and error handling.\n * It holds state variables for the inner token and maps for tracking transaction limits and statistics across various chains and addresses.\n * The contract allows the owner to configure limits, set whitelists, and control pausing.\n * Internal functions conduct eligibility check of transactions, making the contract a fundamental component for cross-chain token management.\n */\n\nabstract contract BaseXVSProxyOFT is Pausable, ExponentialNoError, BaseOFTV2 {\n using SafeERC20 for IERC20;\n IERC20 internal immutable innerToken;\n uint256 internal immutable ld2sdRate;\n bool public sendAndCallEnabled;\n\n /**\n * @notice The address of ResilientOracle contract wrapped in its interface.\n */\n ResilientOracleInterface public oracle;\n /**\n * @notice Maximum limit for a single transaction in USD(scaled with 18 decimals) from local chain.\n */\n mapping(uint16 => uint256) public chainIdToMaxSingleTransactionLimit;\n /**\n * @notice Maximum daily limit for transactions in USD(scaled with 18 decimals) from local chain.\n */\n mapping(uint16 => uint256) public chainIdToMaxDailyLimit;\n /**\n * @notice Total sent amount in USD(scaled with 18 decimals) within the last 24-hour window from local chain.\n */\n mapping(uint16 => uint256) public chainIdToLast24HourTransferred;\n /**\n * @notice Timestamp when the last 24-hour window started from local chain.\n */\n mapping(uint16 => uint256) public chainIdToLast24HourWindowStart;\n /**\n * @notice Maximum limit for a single receive transaction in USD(scaled with 18 decimals) from remote chain.\n */\n mapping(uint16 => uint256) public chainIdToMaxSingleReceiveTransactionLimit;\n /**\n * @notice Maximum daily limit for receiving transactions in USD(scaled with 18 decimals) from remote chain.\n */\n mapping(uint16 => uint256) public chainIdToMaxDailyReceiveLimit;\n /**\n * @notice Total received amount in USD(scaled with 18 decimals) within the last 24-hour window from remote chain.\n */\n mapping(uint16 => uint256) public chainIdToLast24HourReceived;\n /**\n * @notice Timestamp when the last 24-hour window started from remote chain.\n */\n mapping(uint16 => uint256) public chainIdToLast24HourReceiveWindowStart;\n /**\n * @notice Address on which cap check and bound limit is not applicable.\n */\n mapping(address => bool) public whitelist;\n\n /**\n * @notice Emitted when address is added to whitelist.\n */\n event SetWhitelist(address indexed addr, bool isWhitelist);\n /**\n * @notice Emitted when the maximum limit for a single transaction from local chain is modified.\n */\n event SetMaxSingleTransactionLimit(uint16 chainId, uint256 oldMaxLimit, uint256 newMaxLimit);\n /**\n * @notice Emitted when the maximum daily limit of transactions from local chain is modified.\n */\n event SetMaxDailyLimit(uint16 chainId, uint256 oldMaxLimit, uint256 newMaxLimit);\n /**\n * @notice Emitted when the maximum limit for a single receive transaction from remote chain is modified.\n */\n event SetMaxSingleReceiveTransactionLimit(uint16 chainId, uint256 oldMaxLimit, uint256 newMaxLimit);\n /**\n * @notice Emitted when the maximum daily limit for receiving transactions from remote chain is modified.\n */\n event SetMaxDailyReceiveLimit(uint16 chainId, uint256 oldMaxLimit, uint256 newMaxLimit);\n /**\n * @notice Event emitted when oracle is modified.\n */\n event OracleChanged(address indexed oldOracle, address indexed newOracle);\n /**\n * @notice Event emitted when trusted remote sets to empty.\n */\n event TrustedRemoteRemoved(uint16 chainId);\n /**\n * @notice Event emitted when inner token set successfully.\n */\n event InnerTokenAdded(address indexed innerToken);\n /**\n *@notice Emitted on sweep token success\n */\n event SweepToken(address indexed token, address indexed to, uint256 sweepAmount);\n /**\n * @notice Event emitted when SendAndCallEnabled updated successfully.\n */\n event UpdateSendAndCallEnabled(bool indexed enabled);\n /**\n *@notice Error thrown when this contract balance is less than sweep amount\n */\n error InsufficientBalance(uint256 sweepAmount, uint256 balance);\n\n /**\n * @param tokenAddress_ Address of the inner token.\n * @param sharedDecimals_ Number of shared decimals.\n * @param lzEndpoint_ Address of the layer zero endpoint contract.\n * @param oracle_ Address of the price oracle.\n * @custom:error ZeroAddressNotAllowed is thrown when token contract address is zero.\n * @custom:error ZeroAddressNotAllowed is thrown when lzEndpoint contract address is zero.\n * @custom:error ZeroAddressNotAllowed is thrown when oracle contract address is zero.\n * @custom:event Emits InnerTokenAdded with token address.\n * @custom:event Emits OracleChanged with zero address and oracle address.\n */\n constructor(\n address tokenAddress_,\n uint8 sharedDecimals_,\n address lzEndpoint_,\n address oracle_\n ) BaseOFTV2(sharedDecimals_, lzEndpoint_) {\n ensureNonzeroAddress(tokenAddress_);\n ensureNonzeroAddress(lzEndpoint_);\n ensureNonzeroAddress(oracle_);\n\n innerToken = IERC20(tokenAddress_);\n\n (bool success, bytes memory data) = tokenAddress_.staticcall(abi.encodeWithSignature(\"decimals()\"));\n require(success, \"ProxyOFT: failed to get token decimals\");\n uint8 decimals = abi.decode(data, (uint8));\n\n require(sharedDecimals_ <= decimals, \"ProxyOFT: sharedDecimals must be <= decimals\");\n ld2sdRate = 10 ** (decimals - sharedDecimals_);\n\n emit InnerTokenAdded(tokenAddress_);\n emit OracleChanged(address(0), oracle_);\n\n oracle = ResilientOracleInterface(oracle_);\n }\n\n /**\n * @notice Set the address of the ResilientOracle contract.\n * @dev Reverts if the new address is zero.\n * @param oracleAddress_ The new address of the ResilientOracle contract.\n * @custom:access Only owner.\n * @custom:event Emits OracleChanged with old and new oracle address.\n */\n function setOracle(address oracleAddress_) external onlyOwner {\n ensureNonzeroAddress(oracleAddress_);\n emit OracleChanged(address(oracle), oracleAddress_);\n oracle = ResilientOracleInterface(oracleAddress_);\n }\n\n /**\n * @notice Sets the limit of single transaction amount.\n * @param chainId_ Destination chain id.\n * @param limit_ Amount in USD(scaled with 18 decimals).\n * @custom:access Only owner.\n * @custom:event Emits SetMaxSingleTransactionLimit with old and new limit associated with chain id.\n */\n function setMaxSingleTransactionLimit(uint16 chainId_, uint256 limit_) external onlyOwner {\n require(limit_ <= chainIdToMaxDailyLimit[chainId_], \"Single transaction limit > Daily limit\");\n emit SetMaxSingleTransactionLimit(chainId_, chainIdToMaxSingleTransactionLimit[chainId_], limit_);\n chainIdToMaxSingleTransactionLimit[chainId_] = limit_;\n }\n\n /**\n * @notice Sets the limit of daily (24 Hour) transactions amount.\n * @param chainId_ Destination chain id.\n * @param limit_ Amount in USD(scaled with 18 decimals).\n * @custom:access Only owner.\n * @custom:event Emits setMaxDailyLimit with old and new limit associated with chain id.\n */\n function setMaxDailyLimit(uint16 chainId_, uint256 limit_) external onlyOwner {\n require(limit_ >= chainIdToMaxSingleTransactionLimit[chainId_], \"Daily limit < single transaction limit\");\n emit SetMaxDailyLimit(chainId_, chainIdToMaxDailyLimit[chainId_], limit_);\n chainIdToMaxDailyLimit[chainId_] = limit_;\n }\n\n /**\n * @notice Sets the maximum limit for a single receive transaction.\n * @param chainId_ The destination chain ID.\n * @param limit_ The new maximum limit in USD(scaled with 18 decimals).\n * @custom:access Only owner.\n * @custom:event Emits setMaxSingleReceiveTransactionLimit with old and new limit associated with chain id.\n */\n function setMaxSingleReceiveTransactionLimit(uint16 chainId_, uint256 limit_) external onlyOwner {\n require(limit_ <= chainIdToMaxDailyReceiveLimit[chainId_], \"single receive transaction limit > Daily limit\");\n emit SetMaxSingleReceiveTransactionLimit(chainId_, chainIdToMaxSingleReceiveTransactionLimit[chainId_], limit_);\n chainIdToMaxSingleReceiveTransactionLimit[chainId_] = limit_;\n }\n\n /**\n * @notice Sets the maximum daily limit for receiving transactions.\n * @param chainId_ The destination chain ID.\n * @param limit_ The new maximum daily limit in USD(scaled with 18 decimals).\n * @custom:access Only owner.\n * @custom:event Emits setMaxDailyReceiveLimit with old and new limit associated with chain id.\n */\n function setMaxDailyReceiveLimit(uint16 chainId_, uint256 limit_) external onlyOwner {\n require(\n limit_ >= chainIdToMaxSingleReceiveTransactionLimit[chainId_],\n \"Daily limit < single receive transaction limit\"\n );\n emit SetMaxDailyReceiveLimit(chainId_, chainIdToMaxDailyReceiveLimit[chainId_], limit_);\n chainIdToMaxDailyReceiveLimit[chainId_] = limit_;\n }\n\n /**\n * @notice Sets the whitelist address to skip checks on transaction limit.\n * @param user_ Address to be add in whitelist.\n * @param val_ Boolean to be set (true for user_ address is whitelisted).\n * @custom:access Only owner.\n * @custom:event Emits setWhitelist.\n */\n function setWhitelist(address user_, bool val_) external onlyOwner {\n emit SetWhitelist(user_, val_);\n whitelist[user_] = val_;\n }\n\n /**\n * @notice Triggers stopped state of the bridge.\n * @custom:access Only owner.\n */\n function pause() external onlyOwner {\n _pause();\n }\n\n /**\n * @notice Triggers resume state of the bridge.\n * @custom:access Only owner.\n */\n function unpause() external onlyOwner {\n _unpause();\n }\n\n /**\n * @notice A public function to sweep accidental ERC-20 transfers to this contract. Tokens are sent to user\n * @param token_ The address of the ERC-20 token to sweep\n * @param to_ The address of the recipient\n * @param amount_ The amount of tokens needs to transfer\n * @custom:event Emits SweepToken event\n * @custom:error Throw InsufficientBalance if amount_ is greater than the available balance of the token in the contract\n * @custom:access Only Owner\n */\n function sweepToken(IERC20 token_, address to_, uint256 amount_) external onlyOwner {\n uint256 balance = token_.balanceOf(address(this));\n if (amount_ > balance) {\n revert InsufficientBalance(amount_, balance);\n }\n\n emit SweepToken(address(token_), to_, amount_);\n\n token_.safeTransfer(to_, amount_);\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 Only owner.\n * @custom:event Emits TrustedRemoteRemoved once chain id is removed from trusted remote.\n */\n function removeTrustedRemote(uint16 remoteChainId_) external onlyOwner {\n delete trustedRemoteLookup[remoteChainId_];\n emit TrustedRemoteRemoved(remoteChainId_);\n }\n\n /**\n * @notice It enables or disables sendAndCall functionality for the bridge.\n * @param enabled_ Boolean indicating whether the sendAndCall function should be enabled or disabled.\n */\n function updateSendAndCallEnabled(bool enabled_) external onlyOwner {\n sendAndCallEnabled = enabled_;\n emit UpdateSendAndCallEnabled(enabled_);\n }\n\n /**\n * @notice Checks the eligibility of a sender to initiate a cross-chain token transfer.\n * @dev This external view function assesses whether the specified sender is eligible to transfer the given amount\n * to the specified destination chain. It considers factors such as whitelisting, transaction limits, and a 24-hour window.\n * @param from_ The sender's address initiating the transfer.\n * @param dstChainId_ Indicates destination chain.\n * @param amount_ The quantity of tokens to be transferred.\n * @return eligibleToSend A boolean indicating whether the sender is eligible to transfer the tokens.\n * @return maxSingleTransactionLimit The maximum limit for a single transaction.\n * @return maxDailyLimit The maximum daily limit for transactions.\n * @return amountInUsd The equivalent amount in USD based on the oracle price.\n * @return transferredInWindow The total amount transferred in the current 24-hour window.\n * @return last24HourWindowStart The timestamp when the current 24-hour window started.\n * @return isWhiteListedUser A boolean indicating whether the sender is whitelisted.\n */\n function isEligibleToSend(\n address from_,\n uint16 dstChainId_,\n uint256 amount_\n )\n external\n view\n returns (\n bool eligibleToSend,\n uint256 maxSingleTransactionLimit,\n uint256 maxDailyLimit,\n uint256 amountInUsd,\n uint256 transferredInWindow,\n uint256 last24HourWindowStart,\n bool isWhiteListedUser\n )\n {\n // Check if the sender's address is whitelisted\n isWhiteListedUser = whitelist[from_];\n\n // Calculate the amount in USD using the oracle price\n Exp memory oraclePrice = Exp({ mantissa: oracle.getPrice(token()) });\n amountInUsd = mul_ScalarTruncate(oraclePrice, amount_);\n\n // Load values for the 24-hour window checks\n uint256 currentBlockTimestamp = block.timestamp;\n last24HourWindowStart = chainIdToLast24HourWindowStart[dstChainId_];\n transferredInWindow = chainIdToLast24HourTransferred[dstChainId_];\n maxSingleTransactionLimit = chainIdToMaxSingleTransactionLimit[dstChainId_];\n maxDailyLimit = chainIdToMaxDailyLimit[dstChainId_];\n if (currentBlockTimestamp - last24HourWindowStart > 1 days) {\n transferredInWindow = amountInUsd;\n last24HourWindowStart = currentBlockTimestamp;\n } else {\n transferredInWindow += amountInUsd;\n }\n eligibleToSend = (isWhiteListedUser ||\n ((amountInUsd <= maxSingleTransactionLimit) && (transferredInWindow <= maxDailyLimit)));\n }\n\n /**\n * @notice Initiates a cross-chain token transfer and triggers a call on the destination chain.\n * @dev This internal override function enables the contract to send tokens and invoke calls on the specified\n * destination chain. It checks whether the sendAndCall feature is enabled before proceeding with the transfer.\n * @param from_ Address from which tokens will be debited.\n * @param dstChainId_ Destination chain id on which tokens will be send.\n * @param toAddress_ Address on which tokens will be credited on destination chain.\n * @param amount_ Amount of tokens that will be transferred.\n * @param payload_ Additional data payload for the call on the destination chain.\n * @param dstGasForCall_ The amount of gas allocated for the call on the destination chain.\n * @param callparams_ Additional parameters, including refund address, ZRO payment address,\n * and adapter params.\n */\n function sendAndCall(\n address from_,\n uint16 dstChainId_,\n bytes32 toAddress_,\n uint256 amount_,\n bytes calldata payload_,\n uint64 dstGasForCall_,\n LzCallParams calldata callparams_\n ) public payable override {\n require(sendAndCallEnabled, \"sendAndCall is disabled\");\n\n super.sendAndCall(from_, dstChainId_, toAddress_, amount_, payload_, dstGasForCall_, callparams_);\n }\n\n function retryMessage(\n uint16 _srcChainId,\n bytes calldata _srcAddress,\n uint64 _nonce,\n bytes calldata _payload\n ) public payable override {\n bytes memory trustedRemote = trustedRemoteLookup[_srcChainId];\n // it will still block the message pathway from (srcChainId, srcAddress). should not receive message from untrusted remote.\n require(\n _srcAddress.length == trustedRemote.length &&\n trustedRemote.length > 0 &&\n keccak256(_srcAddress) == keccak256(trustedRemote),\n \"LzApp: invalid source sending contract\"\n );\n super.retryMessage(_srcChainId, _srcAddress, _nonce, _payload);\n }\n\n /**\n * @notice Empty implementation of renounce ownership to avoid any mishappening.\n */\n function renounceOwnership() public override {}\n\n /**\n * @notice Return's the address of the inner token of this bridge.\n * @return Address of the inner token of this bridge.\n */\n function token() public view override returns (address) {\n return address(innerToken);\n }\n\n /**\n * @notice Checks if the sender is eligible to send tokens\n * @param from_ Sender's address sending tokens\n * @param dstChainId_ Chain id on which tokens should be sent\n * @param amount_ Amount of tokens to be sent\n */\n function _isEligibleToSend(address from_, uint16 dstChainId_, uint256 amount_) internal {\n // Check if the sender's address is whitelisted\n bool isWhiteListedUser = whitelist[from_];\n // Check if the user is whitelisted and return if true\n if (isWhiteListedUser) {\n return;\n }\n\n // Calculate the amount in USD using the oracle price\n uint256 amountInUsd;\n Exp memory oraclePrice = Exp({ mantissa: oracle.getPrice(token()) });\n amountInUsd = mul_ScalarTruncate(oraclePrice, amount_);\n\n // Load values for the 24-hour window checks\n uint256 currentBlockTimestamp = block.timestamp;\n uint256 lastDayWindowStart = chainIdToLast24HourWindowStart[dstChainId_];\n uint256 transferredInWindow = chainIdToLast24HourTransferred[dstChainId_];\n uint256 maxSingleTransactionLimit = chainIdToMaxSingleTransactionLimit[dstChainId_];\n uint256 maxDailyLimit = chainIdToMaxDailyLimit[dstChainId_];\n\n // Revert if the amount exceeds the single transaction limit\n require(amountInUsd <= maxSingleTransactionLimit, \"Single Transaction Limit Exceed\");\n\n // Check if the time window has changed (more than 24 hours have passed)\n if (currentBlockTimestamp - lastDayWindowStart > 1 days) {\n transferredInWindow = amountInUsd;\n chainIdToLast24HourWindowStart[dstChainId_] = currentBlockTimestamp;\n } else {\n transferredInWindow += amountInUsd;\n }\n\n // Revert if the amount exceeds the daily limit\n require(transferredInWindow <= maxDailyLimit, \"Daily Transaction Limit Exceed\");\n\n // Update the amount for the 24-hour window\n chainIdToLast24HourTransferred[dstChainId_] = transferredInWindow;\n }\n\n /**\n * @notice Checks if receiver is able to receive tokens\n * @param toAddress_ Receiver address\n * @param srcChainId_ Source chain id from which token is send\n * @param receivedAmount_ Amount of tokens received\n */\n function _isEligibleToReceive(address toAddress_, uint16 srcChainId_, uint256 receivedAmount_) internal {\n // Check if the recipient's address is whitelisted\n bool isWhiteListedUser = whitelist[toAddress_];\n // Check if the user is whitelisted and return if true\n if (isWhiteListedUser) {\n return;\n }\n\n // Calculate the received amount in USD using the oracle price\n uint256 receivedAmountInUsd;\n Exp memory oraclePrice = Exp({ mantissa: oracle.getPrice(address(token())) });\n receivedAmountInUsd = mul_ScalarTruncate(oraclePrice, receivedAmount_);\n\n uint256 currentBlockTimestamp = block.timestamp;\n\n // Load values for the 24-hour window checks for receiving\n uint256 lastDayReceiveWindowStart = chainIdToLast24HourReceiveWindowStart[srcChainId_];\n uint256 receivedInWindow = chainIdToLast24HourReceived[srcChainId_];\n uint256 maxSingleReceiveTransactionLimit = chainIdToMaxSingleReceiveTransactionLimit[srcChainId_];\n uint256 maxDailyReceiveLimit = chainIdToMaxDailyReceiveLimit[srcChainId_];\n\n // Check if the received amount exceeds the single transaction limit\n require(receivedAmountInUsd <= maxSingleReceiveTransactionLimit, \"Single Transaction Limit Exceed\");\n\n // Check if the time window has changed (more than 24 hours have passed)\n if (currentBlockTimestamp - lastDayReceiveWindowStart > 1 days) {\n receivedInWindow = receivedAmountInUsd;\n chainIdToLast24HourReceiveWindowStart[srcChainId_] = currentBlockTimestamp;\n } else {\n receivedInWindow += receivedAmountInUsd;\n }\n\n // Revert if the received amount exceeds the daily limit\n require(receivedInWindow <= maxDailyReceiveLimit, \"Daily Transaction Limit Exceed\");\n\n // Update the received amount for the 24-hour window\n chainIdToLast24HourReceived[srcChainId_] = receivedInWindow;\n }\n\n /**\n * @notice Transfer tokens from sender to receiver account.\n * @param from_ Address from which token has to be transferred(Sender).\n * @param to_ Address on which token will be tranferred(Receiver).\n * @param amount_ Amount of token to be transferred.\n * @return Actual balance difference.\n */\n function _transferFrom(\n address from_,\n address to_,\n uint256 amount_\n ) internal override whenNotPaused returns (uint256) {\n uint256 before = innerToken.balanceOf(to_);\n if (from_ == address(this)) {\n innerToken.safeTransfer(to_, amount_);\n } else {\n innerToken.safeTransferFrom(from_, to_, amount_);\n }\n return innerToken.balanceOf(to_) - before;\n }\n\n /**\n * @notice Returns Conversion rate factor from large decimals to shared decimals.\n * @return Conversion rate factor.\n */\n function _ld2sdRate() internal view override returns (uint256) {\n return ld2sdRate;\n }\n}\n" + }, + "contracts/Bridge/interfaces/IXVS.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.13;\n\n/**\n * @title IXVS\n * @author Venus\n * @notice Interface implemented by `XVS` token.\n */\ninterface IXVS {\n function mint(address to, uint256 amount) external;\n\n function burn(address from, uint256 amount) external;\n}\n" + }, + "contracts/Bridge/interfaces/IXVSProxyOFT.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.13;\n\n/**\n * @title IXVSProxyOFT\n * @author Venus\n * @notice Interface implemented by `XVSProxyOFT`.\n */\ninterface IXVSProxyOFT {\n function transferOwnership(address addr) external;\n\n function setTrustedRemoteAddress(uint16 remoteChainId, bytes calldata srcAddress) external;\n\n function isTrustedRemote(uint16 remoteChainId, bytes calldata srcAddress) external returns (bool);\n}\n" + }, + "contracts/Bridge/token/TokenController.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.13;\nimport { IAccessControlManagerV8 } from \"@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV8.sol\";\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\";\n\n/**\n * @title TokenController\n * @author Venus\n * @notice TokenController contract acts as a governance and access control mechanism,\n * allowing the owner to manage minting restrictions and blacklist certain addresses to maintain control and security within the token ecosystem.\n * It provides a flexible framework for token-related operations.\n */\n\ncontract TokenController is Ownable, Pausable {\n /**\n * @notice Access control manager contract address.\n */\n address public accessControlManager;\n /**\n * @notice A Mapping used to keep track of the blacklist status of addresses.\n */\n mapping(address => bool) internal _blacklist;\n /**\n * @notice A mapping is used to keep track of the maximum amount a minter is permitted to mint.\n */\n mapping(address => uint256) public minterToCap;\n /**\n * @notice A Mapping used to keep track of the amount i.e already minted by minter.\n */\n mapping(address => uint256) public minterToMintedAmount;\n\n /**\n * @notice Emitted when the blacklist status of a user is updated.\n */\n event BlacklistUpdated(address indexed user, bool value);\n /**\n * @notice Emitted when the minting limit for a minter is increased.\n */\n event MintLimitIncreased(address indexed minter, uint256 newLimit);\n /**\n * @notice Emitted when the minting limit for a minter is decreased.\n */\n event MintLimitDecreased(address indexed minter, uint256 newLimit);\n /**\n * @notice Emitted when the minting cap for a minter is changed.\n */\n event MintCapChanged(address indexed minter, uint256 amount);\n /**\n * @notice Emitted when the address of the access control manager of the contract is updated.\n */\n event NewAccessControlManager(address indexed oldAccessControlManager, address indexed newAccessControlManager);\n /**\n * @notice Emitted when all minted tokens are migrated from one minter to another.\n */\n event MintedTokensMigrated(address indexed source, address indexed destination);\n\n /**\n * @notice This error is used to indicate that the minting limit has been exceeded. It is typically thrown when a minting operation would surpass the defined cap.\n */\n error MintLimitExceed();\n /**\n * @notice This error is used to indicate that `mint` `burn` and `transfer` actions are not allowed for the user address.\n */\n error AccountBlacklisted(address user);\n /**\n * @notice This error is used to indicate that sender is not allowed to perform this action.\n */\n error Unauthorized();\n /**\n * @notice This error is used to indicate that the new cap is greater than the previously minted tokens for the minter.\n */\n error NewCapNotGreaterThanMintedTokens();\n /**\n * @notice This error is used to indicate that the addresses must be different.\n */\n error AddressesMustDiffer();\n /**\n * @notice This error is used to indicate that the minter did not mint the required amount of tokens.\n */\n error MintedAmountExceed();\n\n /**\n * @param accessControlManager_ Address of access control manager contract.\n * @custom:error ZeroAddressNotAllowed is thrown when accessControlManager contract address is zero.\n */\n constructor(address accessControlManager_) {\n ensureNonzeroAddress(accessControlManager_);\n accessControlManager = accessControlManager_;\n }\n\n /**\n * @notice Pauses Token\n * @custom:access Controlled by AccessControlManager.\n */\n function pause() external {\n _ensureAllowed(\"pause()\");\n _pause();\n }\n\n /**\n * @notice Resumes Token\n * @custom:access Controlled by AccessControlManager.\n */\n function unpause() external {\n _ensureAllowed(\"unpause()\");\n _unpause();\n }\n\n /**\n * @notice Function to update blacklist.\n * @param user_ User address to be affected.\n * @param value_ Boolean to toggle value.\n * @custom:access Controlled by AccessControlManager.\n * @custom:event Emits BlacklistUpdated event.\n */\n function updateBlacklist(address user_, bool value_) external {\n _ensureAllowed(\"updateBlacklist(address,bool)\");\n _blacklist[user_] = value_;\n emit BlacklistUpdated(user_, value_);\n }\n\n /**\n * @notice Sets the minting cap for minter.\n * @param minter_ Minter address.\n * @param amount_ Cap for the minter.\n * @custom:access Controlled by AccessControlManager.\n * @custom:event Emits MintCapChanged.\n */\n function setMintCap(address minter_, uint256 amount_) external {\n _ensureAllowed(\"setMintCap(address,uint256)\");\n\n if (amount_ < minterToMintedAmount[minter_]) {\n revert NewCapNotGreaterThanMintedTokens();\n }\n\n minterToCap[minter_] = amount_;\n emit MintCapChanged(minter_, amount_);\n }\n\n /**\n * @notice Sets the address of the access control manager of this contract.\n * @dev Admin function to set the access control address.\n * @param newAccessControlAddress_ New address for the access control.\n * @custom:access Only owner.\n * @custom:event Emits NewAccessControlManager.\n * @custom:error ZeroAddressNotAllowed is thrown when newAccessControlAddress_ contract address is zero.\n */\n function setAccessControlManager(address newAccessControlAddress_) external onlyOwner {\n ensureNonzeroAddress(newAccessControlAddress_);\n emit NewAccessControlManager(accessControlManager, newAccessControlAddress_);\n accessControlManager = newAccessControlAddress_;\n }\n\n /**\n * @notice Migrates all minted tokens from one minter to another. This function is useful when we want to permanent take down a bridge.\n * @param source_ Minter address to migrate tokens from.\n * @param destination_ Minter address to migrate tokens to.\n * @custom:access Controlled by AccessControlManager.\n * @custom:error MintLimitExceed is thrown when the minting limit exceeds the cap after migration.\n * @custom:error AddressesMustDiffer is thrown when the source_ and destination_ addresses are the same.\n * @custom:event Emits MintLimitIncreased and MintLimitDecreased events for 'source' and 'destination'.\n * @custom:event Emits MintedTokensMigrated.\n */\n function migrateMinterTokens(address source_, address destination_) external {\n _ensureAllowed(\"migrateMinterTokens(address,address)\");\n\n if (source_ == destination_) {\n revert AddressesMustDiffer();\n }\n\n uint256 sourceCap = minterToCap[source_];\n uint256 destinationCap = minterToCap[destination_];\n\n uint256 sourceMinted = minterToMintedAmount[source_];\n uint256 destinationMinted = minterToMintedAmount[destination_];\n uint256 newDestinationMinted = destinationMinted + sourceMinted;\n\n if (newDestinationMinted > destinationCap) {\n revert MintLimitExceed();\n }\n\n minterToMintedAmount[source_] = 0;\n minterToMintedAmount[destination_] = newDestinationMinted;\n uint256 availableLimit;\n unchecked {\n availableLimit = destinationCap - newDestinationMinted;\n }\n\n emit MintLimitDecreased(destination_, availableLimit);\n emit MintLimitIncreased(source_, sourceCap);\n emit MintedTokensMigrated(source_, destination_);\n }\n\n /**\n * @notice Returns the blacklist status of the address.\n * @param user_ Address of user to check blacklist status.\n * @return bool status of blacklist.\n */\n function isBlackListed(address user_) external view returns (bool) {\n return _blacklist[user_];\n }\n\n /**\n * @dev Checks the minter cap and eligibility of receiver to receive tokens.\n * @param from_ Minter address.\n * @param to_ Receiver address.\n * @param amount_ Amount to be mint.\n * @custom:error MintLimitExceed is thrown when minting limit exceeds the cap.\n * @custom:event Emits MintLimitDecreased with minter address and available limits.\n */\n function _isEligibleToMint(address from_, address to_, uint256 amount_) internal {\n uint256 mintingCap = minterToCap[from_];\n uint256 totalMintedOld = minterToMintedAmount[from_];\n uint256 totalMintedNew = totalMintedOld + amount_;\n\n if (totalMintedNew > mintingCap) {\n revert MintLimitExceed();\n }\n minterToMintedAmount[from_] = totalMintedNew;\n uint256 availableLimit;\n unchecked {\n availableLimit = mintingCap - totalMintedNew;\n }\n emit MintLimitDecreased(from_, availableLimit);\n }\n\n /**\n * @dev This is post hook of burn function, increases minting limit of the minter.\n * @param from_ Minter address.\n * @param amount_ Amount burned.\n * @custom:error MintedAmountExceed is thrown when `amount_` is greater than the tokens minted by `from_`.\n * @custom:event Emits MintLimitIncreased with minter address and availabe limit.\n */\n function _increaseMintLimit(address from_, uint256 amount_) internal {\n uint256 totalMintedOld = minterToMintedAmount[from_];\n\n if (totalMintedOld < amount_) {\n revert MintedAmountExceed();\n }\n\n uint256 totalMintedNew;\n unchecked {\n totalMintedNew = totalMintedOld - amount_;\n }\n minterToMintedAmount[from_] = totalMintedNew;\n uint256 availableLimit = minterToCap[from_] - totalMintedNew;\n emit MintLimitIncreased(from_, availableLimit);\n }\n\n /**\n * @dev Checks the caller is allowed to call the specified fuction.\n * @param functionSig_ Function signatureon which access is to be checked.\n * @custom:error Unauthorized, thrown when unauthorised user try to access function.\n */\n function _ensureAllowed(string memory functionSig_) internal view {\n if (!IAccessControlManagerV8(accessControlManager).isAllowedToCall(msg.sender, functionSig_)) {\n revert Unauthorized();\n }\n }\n}\n" + }, + "contracts/Bridge/token/XVS.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.13;\n\nimport { ERC20 } from \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\n\nimport { TokenController } from \"./TokenController.sol\";\n\n/**\n * @title XVS\n * @author Venus\n * @notice XVS contract serves as a customized ERC-20 token with additional minting and burning functionality.\n * It also incorporates access control features provided by the \"TokenController\" contract to ensure proper governance and restrictions on minting and burning operations.\n */\n\ncontract XVS is ERC20, TokenController {\n constructor(address accessControlManager_) ERC20(\"Venus XVS\", \"XVS\") TokenController(accessControlManager_) {}\n\n /**\n * @notice Creates `amount_` tokens and assigns them to `account_`, increasing\n * the total supply. Checks access and eligibility.\n * @param account_ Address to which tokens are assigned.\n * @param amount_ Amount of tokens to be assigned.\n * @custom:access Controlled by AccessControlManager.\n * @custom:event Emits MintLimitDecreased with new available limit.\n * @custom:error MintLimitExceed is thrown when minting amount exceeds the maximum cap.\n */\n function mint(address account_, uint256 amount_) external whenNotPaused {\n _ensureAllowed(\"mint(address,uint256)\");\n _isEligibleToMint(msg.sender, account_, amount_);\n _mint(account_, amount_);\n }\n\n /**\n * @notice Destroys `amount_` tokens from `account_`, reducing the\n * total supply. Checks access and eligibility.\n * @param account_ Address from which tokens be destroyed.\n * @param amount_ Amount of tokens to be destroyed.\n * @custom:access Controlled by AccessControlManager.\n * @custom:event Emits MintLimitIncreased with new available limit.\n */\n function burn(address account_, uint256 amount_) external whenNotPaused {\n _ensureAllowed(\"burn(address,uint256)\");\n _burn(account_, amount_);\n _increaseMintLimit(msg.sender, amount_);\n }\n\n /**\n * @notice Hook that is called before any transfer of tokens. This includes\n * minting and burning.\n * @param from_ Address of account from which tokens are to be transferred.\n * @param to_ Address of the account to which tokens are to be transferred.\n * @param amount_ The amount of tokens to be transferred.\n * @custom:error AccountBlacklisted is thrown when either `from` or `to` address is blacklisted.\n */\n function _beforeTokenTransfer(address from_, address to_, uint256 amount_) internal override whenNotPaused {\n if (_blacklist[to_]) {\n revert AccountBlacklisted(to_);\n }\n if (_blacklist[from_]) {\n revert AccountBlacklisted(from_);\n }\n }\n}\n" + }, + "contracts/Bridge/XVSBridgeAdmin.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.8.13;\n\nimport { AccessControlledV8 } from \"@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV8.sol\";\nimport { ensureNonzeroAddress } from \"@venusprotocol/solidity-utilities/contracts/validators.sol\";\nimport { IXVSProxyOFT } from \"./interfaces/IXVSProxyOFT.sol\";\n\n/**\n * @title XVSBridgeAdmin\n * @author Venus\n * @notice The XVSBridgeAdmin contract extends a parent contract AccessControlledV8 for access control, and it manages an external contract called XVSProxyOFT.\n * It maintains a registry of function signatures and names,\n * allowing for dynamic function handling i.e checking of access control of interaction with only owner functions.\n */\ncontract XVSBridgeAdmin is AccessControlledV8 {\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n IXVSProxyOFT public immutable XVSBridge;\n /**\n * @notice A mapping keeps track of function signature associated with function name string.\n */\n mapping(bytes4 => string) public functionRegistry;\n\n /**\n * @notice emitted when function registry updated\n */\n event FunctionRegistryChanged(string signature, bool active);\n\n /// @custom:oz-upgrades-unsafe-allow constructor\n constructor(address XVSBridge_) {\n ensureNonzeroAddress(XVSBridge_);\n XVSBridge = IXVSProxyOFT(XVSBridge_);\n _disableInitializers();\n }\n\n /**\n * @param accessControlManager_ Address of access control manager contract.\n */\n function initialize(address accessControlManager_) external initializer {\n __AccessControlled_init(accessControlManager_);\n }\n\n /**\n * @notice Invoked when called function does not exist in the contract.\n * @return Response of low level call.\n * @custom:access Controlled by AccessControlManager.\n */\n fallback(bytes calldata data) external returns (bytes memory) {\n string memory fun = _getFunctionName(msg.sig);\n require(bytes(fun).length != 0, \"Function not found\");\n _checkAccessAllowed(fun);\n (bool ok, bytes memory res) = address(XVSBridge).call(data);\n require(ok, \"call failed\");\n return res;\n }\n\n /**\n * @notice Sets trusted remote on particular chain.\n * @param remoteChainId_ Chain Id of the destination chain.\n * @param remoteAddress_ Address of the destination bridge.\n * @custom:access Controlled by AccessControlManager.\n * @custom:error ZeroAddressNotAllowed is thrown when remoteAddress_ contract address is zero.\n */\n function setTrustedRemoteAddress(uint16 remoteChainId_, bytes calldata remoteAddress_) external {\n _checkAccessAllowed(\"setTrustedRemoteAddress(uint16,bytes)\");\n require(remoteChainId_ != 0, \"ChainId must not be zero\");\n ensureNonzeroAddress(bytesToAddress(remoteAddress_));\n XVSBridge.setTrustedRemoteAddress(remoteChainId_, remoteAddress_);\n }\n\n /**\n * @notice A setter for the 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 * @custom:event Emits FunctionRegistryChanged if bool value of function changes.\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; ) {\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 unchecked {\n ++i;\n }\n }\n }\n\n /**\n * @notice This function transfers the ownership of the bridge from this contract to new owner.\n * @param newOwner_ New owner of the XVS Bridge.\n * @custom:access Controlled by AccessControlManager.\n */\n function transferBridgeOwnership(address newOwner_) external {\n _checkAccessAllowed(\"transferBridgeOwnership(address)\");\n XVSBridge.transferOwnership(newOwner_);\n }\n\n /**\n * @notice Returns true if remote address is trustedRemote corresponds to chainId_.\n * @param remoteChainId_ Chain Id of the destination chain.\n * @param remoteAddress_ Address of the destination bridge.\n * @custom:error ZeroAddressNotAllowed is thrown when remoteAddress_ contract address is zero.\n * @return Bool indicating whether the remote chain is trusted or not.\n */\n function isTrustedRemote(uint16 remoteChainId_, bytes calldata remoteAddress_) external returns (bool) {\n require(remoteChainId_ != 0, \"ChainId must not be zero\");\n ensureNonzeroAddress(bytesToAddress(remoteAddress_));\n return XVSBridge.isTrustedRemote(remoteChainId_, remoteAddress_);\n }\n\n /**\n * @notice Empty implementation of renounce ownership to avoid any mishappening.\n */\n function renounceOwnership() public override {}\n\n /**\n * @dev Returns function name string associated with function signature.\n * @param signature_ Four bytes of function signature.\n * @return Function signature corresponding to its hash.\n */\n function _getFunctionName(bytes4 signature_) internal view returns (string memory) {\n return functionRegistry[signature_];\n }\n\n /**\n * @notice Converts given bytes into address.\n * @param b Bytes to be converted into address.\n * @return Converted address of given bytes.\n */\n function bytesToAddress(bytes calldata b) private pure returns (address) {\n return address(uint160(bytes20(b)));\n }\n}\n" + }, + "contracts/Bridge/XVSProxyOFTDest.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.13;\n\nimport { IXVS } from \"./interfaces/IXVS.sol\";\nimport { BaseXVSProxyOFT } from \"./BaseXVSProxyOFT.sol\";\n\n/**\n * @title XVSProxyOFTDest\n * @author Venus\n * @notice XVSProxyOFTDest contract builds upon the functionality of its parent contract, BaseXVSProxyOFT,\n * and focuses on managing token transfers to the destination chain.\n * It provides functions to check eligibility and perform the actual token transfers while maintaining strict access controls and pausing mechanisms.\n */\n\ncontract XVSProxyOFTDest is BaseXVSProxyOFT {\n /**\n * @notice Emits when stored message dropped without successful retrying.\n */\n event DropFailedMessage(uint16 srcChainId, bytes indexed srcAddress, uint64 nonce);\n\n constructor(\n address tokenAddress_,\n uint8 sharedDecimals_,\n address lzEndpoint_,\n address oracle_\n ) BaseXVSProxyOFT(tokenAddress_, sharedDecimals_, lzEndpoint_, oracle_) {}\n\n /**\n * @notice Clear failed messages from the storage.\n * @param srcChainId_ Chain id of source\n * @param srcAddress_ Address of source followed by current bridge address\n * @param nonce_ Nonce_ of the transaction\n * @custom:access Only owner\n * @custom:event Emits DropFailedMessage on clearance of failed message.\n */\n function dropFailedMessage(uint16 srcChainId_, bytes memory srcAddress_, uint64 nonce_) external onlyOwner {\n failedMessages[srcChainId_][srcAddress_][nonce_] = bytes32(0);\n emit DropFailedMessage(srcChainId_, srcAddress_, nonce_);\n }\n\n /**\n * @notice Returns the total circulating supply of the token on the destination chain i.e (total supply).\n * @return total circulating supply of the token on the destination chain.\n */\n function circulatingSupply() public view override returns (uint256) {\n return innerToken.totalSupply();\n }\n\n /**\n * @notice Debit tokens from the given address\n * @param from_ Address from which tokens to be debited\n * @param dstChainId_ Destination chain id\n * @param amount_ Amount of tokens to be debited\n * @return Actual amount debited\n */\n function _debitFrom(\n address from_,\n uint16 dstChainId_,\n bytes32,\n uint256 amount_\n ) internal override whenNotPaused returns (uint256) {\n require(from_ == _msgSender(), \"ProxyOFT: owner is not send caller\");\n _isEligibleToSend(from_, dstChainId_, amount_);\n IXVS(address(innerToken)).burn(from_, amount_);\n return amount_;\n }\n\n /**\n * @notice Credit tokens in the given account\n * @param srcChainId_ Source chain id\n * @param toAddress_ Address on which token will be credited\n * @param amount_ Amount of tokens to be credited\n * @return Actual amount credited\n */\n function _creditTo(\n uint16 srcChainId_,\n address toAddress_,\n uint256 amount_\n ) internal override whenNotPaused returns (uint256) {\n _isEligibleToReceive(toAddress_, srcChainId_, amount_);\n IXVS(address(innerToken)).mint(toAddress_, amount_);\n return amount_;\n }\n}\n" + }, + "contracts/Bridge/XVSProxyOFTSrc.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.13;\n\nimport { SafeERC20, IERC20 } from \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\nimport { BaseXVSProxyOFT } from \"./BaseXVSProxyOFT.sol\";\n\n/**\n * @title XVSProxyOFTSrc\n * @author Venus\n * @notice XVSProxyOFTSrc contract serves as a crucial component for cross-chain token transactions,\n * focusing on the source side of these transactions.\n * It monitors the total amount transferred to other chains, ensuring it complies with defined limits,\n * and provides functions for transferring tokens while maintaining control over the circulating supply on the source chain.\n */\n\ncontract XVSProxyOFTSrc is BaseXVSProxyOFT {\n using SafeERC20 for IERC20;\n /**\n * @notice Total amount that is transferred from this chain to other chains.\n */\n uint256 public outboundAmount;\n\n /**\n * @notice Emits when locked token released manually by owner.\n */\n event FallbackWithdraw(address indexed to, uint256 amount);\n /**\n * @notice Emits when stored message dropped without successful retrying.\n */\n event DropFailedMessage(uint16 srcChainId, bytes indexed srcAddress, uint64 nonce);\n /**\n * @notice Event emitted when tokens are forcefully locked.\n */\n event FallbackDeposit(address indexed from, uint256 amount_);\n\n constructor(\n address tokenAddress_,\n uint8 sharedDecimals_,\n address lzEndpoint_,\n address oracle_\n ) BaseXVSProxyOFT(tokenAddress_, sharedDecimals_, lzEndpoint_, oracle_) {}\n\n /**\n * @notice Only call it when there is no way to recover the failed message.\n * `dropFailedMessage` must be called first if transaction is from remote->local chain to avoid double spending.\n * @param to_ The address to withdraw to\n * @param amount_ The amount of withdrawal\n * @custom:access Only owner.\n * @custom:event Emits FallbackWithdraw, once done with transfer.\n */\n function fallbackWithdraw(address to_, uint256 amount_) external onlyOwner {\n require(outboundAmount >= amount_, \"Withdraw amount should be less than outbound amount\");\n unchecked {\n outboundAmount -= amount_;\n }\n _transferFrom(address(this), to_, amount_);\n emit FallbackWithdraw(to_, amount_);\n }\n\n /**\n * @notice Forces the lock of tokens by increasing outbound amount and transferring tokens from the sender to the contract.\n * @param amount_ The amount of tokens to lock.\n * @param depositor_ Address of the depositor.\n * @custom:access Only owner.\n * @custom:event Emits FallbackDeposit, once done with transfer.\n */\n function fallbackDeposit(address depositor_, uint256 amount_) external onlyOwner {\n (uint256 actualAmount, ) = _removeDust(amount_);\n\n outboundAmount += actualAmount;\n uint256 cap = _sd2ld(type(uint64).max);\n require(cap >= outboundAmount, \"ProxyOFT: outboundAmount overflow\");\n\n _transferFrom(depositor_, address(this), actualAmount);\n\n emit FallbackDeposit(depositor_, actualAmount);\n }\n\n /**\n * @notice Clear failed messages from the storage.\n * @param srcChainId_ Chain id of source\n * @param srcAddress_ Address of source followed by current bridge address\n * @param nonce_ Nonce_ of the transaction\n * @custom:access Only owner.\n * @custom:event Emits DropFailedMessage on clearance of failed message.\n */\n function dropFailedMessage(uint16 srcChainId_, bytes memory srcAddress_, uint64 nonce_) external onlyOwner {\n failedMessages[srcChainId_][srcAddress_][nonce_] = bytes32(0);\n emit DropFailedMessage(srcChainId_, srcAddress_, nonce_);\n }\n\n /**\n * @notice Returns the total circulating supply of the token on the source chain i.e (total supply - locked in this contract).\n * @return Returns difference in total supply and the outbound amount.\n */\n function circulatingSupply() public view override returns (uint256) {\n return innerToken.totalSupply() - outboundAmount;\n }\n\n /**\n * @notice Debit tokens from the given address\n * @param from_ Address from which tokens to be debited\n * @param dstChainId_ Destination chain id\n * @param amount_ Amount of tokens to be debited\n * @return Actual amount debited\n */\n function _debitFrom(\n address from_,\n uint16 dstChainId_,\n bytes32,\n uint256 amount_\n ) internal override whenNotPaused returns (uint256) {\n require(from_ == _msgSender(), \"ProxyOFT: owner is not send caller\");\n _isEligibleToSend(from_, dstChainId_, amount_);\n\n uint256 amount = _transferFrom(from_, address(this), amount_);\n\n outboundAmount += amount;\n uint256 cap = _sd2ld(type(uint64).max);\n require(cap >= outboundAmount, \"ProxyOFT: outboundAmount overflow\");\n\n return amount;\n }\n\n /**\n * @notice Credit tokens in the given account\n * @param srcChainId_ Source chain id\n * @param toAddress_ Address on which token will be credited\n * @param amount_ Amount of tokens to be credited\n * @return Actual amount credited\n */\n function _creditTo(\n uint16 srcChainId_,\n address toAddress_,\n uint256 amount_\n ) internal override whenNotPaused returns (uint256) {\n _isEligibleToReceive(toAddress_, srcChainId_, amount_);\n outboundAmount -= amount_;\n // tokens are already in this contract, so no need to transfer\n if (toAddress_ == address(this)) {\n return amount_;\n }\n\n return _transferFrom(address(this), toAddress_, amount_);\n }\n}\n" + }, + "contracts/test/MockToken.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/ERC20.sol)\n\npragma solidity ^0.8.0;\n\nimport { ERC20 } from \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport { LZEndpointMock } from \"@layerzerolabs/solidity-examples/contracts/lzApp/mocks/LZEndpointMock.sol\";\nimport { AccessControlManager } from \"@venusprotocol/governance-contracts/contracts/Governance/AccessControlManager.sol\";\n\ncontract MockToken is ERC20 {\n uint8 private immutable _decimals;\n\n constructor(string memory name_, string memory symbol_, uint8 decimals_) ERC20(name_, symbol_) {\n _decimals = decimals_;\n }\n\n function faucet(uint256 amount) external {\n _mint(msg.sender, amount);\n }\n\n function decimals() public view virtual override returns (uint8) {\n return _decimals;\n }\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 200, + "details": { + "yul": true + } + }, + "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 082044e..1ca68c0 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -139,6 +139,18 @@ const config: HardhatUserConfig = { mnemonic: process.env.MNEMONIC || "", }, }, + arbitrumsepolia: { + url: process.env.ARCHIVE_NODE_arbitrumsepolia || "https://sepolia-rollup.arbitrum.io/rpc", + chainId: 421614, + live: true, + accounts: DEPLOYER_PRIVATE_KEY ? [`0x${DEPLOYER_PRIVATE_KEY}`] : [], + }, + arbitrumone: { + url: process.env.ARCHIVE_NODE_arbitrumone || "https://arb1.arbitrum.io/rpc", + chainId: 42161, + live: true, + accounts: DEPLOYER_PRIVATE_KEY ? [`0x${DEPLOYER_PRIVATE_KEY}`] : [], + }, }, gasReporter: { enabled: process.env.REPORT_GAS !== undefined, @@ -194,6 +206,22 @@ const config: HardhatUserConfig = { browserURL: "https://opbnbscan.com/", }, }, + { + network: "arbitrumsepolia", + chainId: 421614, + urls: { + apiURL: `https://api-sepolia.arbiscan.io/api`, + browserURL: "https://sepolia.arbiscan.io/", + }, + }, + { + network: "arbitrumone", + chainId: 42161, + urls: { + apiURL: `https://api.arbiscan.io/api/`, + browserURL: "https://arbiscan.io/", + }, + }, ], apiKey: { bscmainnet: process.env.ETHERSCAN_API_KEY || "ETHERSCAN_API_KEY", @@ -202,6 +230,8 @@ const config: HardhatUserConfig = { ethereum: process.env.ETHERSCAN_API_KEY || "ETHERSCAN_API_KEY", opbnbtestnet: process.env.ETHERSCAN_API_KEY || "ETHERSCAN_API_KEY", opbnbmainnet: process.env.ETHERSCAN_API_KEY || "ETHERSCAN_API_KEY", + arbitrumsepolia: process.env.ETHERSCAN_API_KEY || "ETHERSCAN_API_KEY", + arbitrumone: process.env.ETHERSCAN_API_KEY || "ETHERSCAN_API_KEY", }, }, paths: { diff --git a/helpers/deploymentConfig.ts b/helpers/deploymentConfig.ts index 3f93d42..df311bd 100644 --- a/helpers/deploymentConfig.ts +++ b/helpers/deploymentConfig.ts @@ -10,6 +10,8 @@ const SEPOLIA_MULTISIG = "0x94fa6078b6b8a26f0b6edffbe6501b22a10470fb"; const OPBNB_TESTNET_MULTISIG = "0xb15f6EfEbC276A3b9805df81b5FB3D50C2A62BDf"; const OPBNB_MAINNET_MULTISIG = "0xC46796a21a3A9FAB6546aF3434F2eBfFd0604207"; const ETHEREUM_MULTISIG = "0x285960C5B22fD66A736C7136967A3eB15e93CC67"; +const ARBITRUM_SEPOLIA_MULTISIG = "0x1426A5Ae009c4443188DA8793751024E358A61C2"; +const ARBITRUM_ONE_MULTISIG = "0x14e0E151b33f9802b3e75b621c1457afc44DcAA0"; export const preconfiguredAddresses = { bsctestnet: { @@ -46,6 +48,20 @@ export const preconfiguredAddresses = { LzEndpoint: "0xb6319cC6c8c27A8F5dAF0dD3DF91EA35C4720dd7", LzVirtualChainId: "202", }, + arbitrumsepolia: { + NormalTimelock: ARBITRUM_SEPOLIA_MULTISIG, + FastTrackTimelock: ARBITRUM_SEPOLIA_MULTISIG, + CriticalTimelock: ARBITRUM_SEPOLIA_MULTISIG, + LzEndpoint: "0x6098e96a28E02f27B1e6BD381f870F1C8Bd169d3", + LzVirtualChainId: "10231", + }, + arbitrumone: { + NormalTimelock: ARBITRUM_ONE_MULTISIG, + FastTrackTimelock: ARBITRUM_ONE_MULTISIG, + CriticalTimelock: ARBITRUM_ONE_MULTISIG, + LzEndpoint: "0x3c2269811836af69497E5F486A85D7316753cf62", + LzVirtualChainId: "110", + }, }; export const xvsBridgeMethodsSrc = [ @@ -161,6 +177,24 @@ export const bridgeConfig: BridgeConfig = { { method: "setMaxSingleReceiveTransactionLimit(uint16,uint256)", args: [102, "10000000000000000000000"] }, ], }, + arbitrumsepolia: { + methods: [ + { method: "setMinDstGas(uint16,uint16,uint256)", args: [10231, 0, "300000"] }, + { method: "setMaxDailyLimit(uint16,uint256)", args: [10231, "50000000000000000000000"] }, + { method: "setMaxSingleTransactionLimit(uint16,uint256)", args: [10231, "10000000000000000000000"] }, + { method: "setMaxDailyReceiveLimit(uint16,uint256)", args: [10231, "50000000000000000000000"] }, + { method: "setMaxSingleReceiveTransactionLimit(uint16,uint256)", args: [10231, "10000000000000000000000"] }, + ], + }, + arbitrumone: { + methods: [ + { method: "setMinDstGas(uint16,uint16,uint256)", args: [110, 0, "300000"] }, + { method: "setMaxDailyLimit(uint16,uint256)", args: [110, "50000000000000000000000"] }, + { method: "setMaxSingleTransactionLimit(uint16,uint256)", args: [110, "10000000000000000000000"] }, + { method: "setMaxDailyReceiveLimit(uint16,uint256)", args: [110, "50000000000000000000000"] }, + { method: "setMaxSingleReceiveTransactionLimit(uint16,uint256)", args: [110, "10000000000000000000000"] }, + ], + }, }; export async function getPreConfiguredAddresses(networkName: string): Promise { @@ -177,6 +211,10 @@ export async function getPreConfiguredAddresses(networkName: string): Promise Date: Tue, 26 Mar 2024 10:15:33 +0000 Subject: [PATCH 02/12] feat: updating deployment files --- deployments/arbitrumone.json | 5 + deployments/arbitrumone_addresses.json | 5 + deployments/arbitrumsepolia.json | 3726 ++++++++++++++++++++ deployments/arbitrumsepolia_addresses.json | 12 + 4 files changed, 3748 insertions(+) create mode 100644 deployments/arbitrumone.json create mode 100644 deployments/arbitrumone_addresses.json create mode 100644 deployments/arbitrumsepolia.json create mode 100644 deployments/arbitrumsepolia_addresses.json diff --git a/deployments/arbitrumone.json b/deployments/arbitrumone.json new file mode 100644 index 0000000..4e3a56a --- /dev/null +++ b/deployments/arbitrumone.json @@ -0,0 +1,5 @@ +{ + "name": "arbitrumone", + "chainId": "42161", + "contracts": {} +} diff --git a/deployments/arbitrumone_addresses.json b/deployments/arbitrumone_addresses.json new file mode 100644 index 0000000..e65d709 --- /dev/null +++ b/deployments/arbitrumone_addresses.json @@ -0,0 +1,5 @@ +{ + "name": "arbitrumone", + "chainId": "42161", + "addresses": {} +} diff --git a/deployments/arbitrumsepolia.json b/deployments/arbitrumsepolia.json new file mode 100644 index 0000000..2951d2e --- /dev/null +++ b/deployments/arbitrumsepolia.json @@ -0,0 +1,3726 @@ +{ + "name": "arbitrumsepolia", + "chainId": "421614", + "contracts": { + "DefaultProxyAdmin": { + "address": "0xA78A1Df376c3CEeBC5Fab574fe6EdDbbF76fd03e", + "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" + } + ] + }, + "XVS": { + "address": "0x8f377098e488D227e809BD56D30C9Fd8388245D3", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "accessControlManager_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "AccountBlacklisted", + "type": "error" + }, + { + "inputs": [], + "name": "AddressesMustDiffer", + "type": "error" + }, + { + "inputs": [], + "name": "MintLimitExceed", + "type": "error" + }, + { + "inputs": [], + "name": "MintedAmountExceed", + "type": "error" + }, + { + "inputs": [], + "name": "NewCapNotGreaterThanMintedTokens", + "type": "error" + }, + { + "inputs": [], + "name": "Unauthorized", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddressNotAllowed", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "value", + "type": "bool" + } + ], + "name": "BlacklistUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "minter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "MintCapChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "minter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newLimit", + "type": "uint256" + } + ], + "name": "MintLimitDecreased", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "minter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newLimit", + "type": "uint256" + } + ], + "name": "MintLimitIncreased", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "source", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "destination", + "type": "address" + } + ], + "name": "MintedTokensMigrated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldAccessControlManager", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newAccessControlManager", + "type": "address" + } + ], + "name": "NewAccessControlManager", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "inputs": [], + "name": "accessControlManager", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount_", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user_", + "type": "address" + } + ], + "name": "isBlackListed", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "source_", + "type": "address" + }, + { + "internalType": "address", + "name": "destination_", + "type": "address" + } + ], + "name": "migrateMinterTokens", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount_", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "minterToCap", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "minterToMintedAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newAccessControlAddress_", + "type": "address" + } + ], + "name": "setAccessControlManager", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "minter_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount_", + "type": "uint256" + } + ], + "name": "setMintCap", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user_", + "type": "address" + }, + { + "internalType": "bool", + "name": "value_", + "type": "bool" + } + ], + "name": "updateBlacklist", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ] + }, + "XVSBridgeAdmin": { + "address": "0x649c35088bAd6847fF163B15d0e7A00943D7FD40", + "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": [ + { + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "changeAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "implementation", + "outputs": [ + { + "internalType": "address", + "name": "implementation_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "calledContract", + "type": "address" + }, + { + "internalType": "string", + "name": "methodSignature", + "type": "string" + } + ], + "name": "Unauthorized", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddressNotAllowed", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "signature", + "type": "string" + }, + { + "indexed": false, + "internalType": "bool", + "name": "active", + "type": "bool" + } + ], + "name": "FunctionRegistryChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldAccessControlManager", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAccessControlManager", + "type": "address" + } + ], + "name": "NewAccessControlManager", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "inputs": [], + "name": "XVSBridge", + "outputs": [ + { + "internalType": "contract IXVSProxyOFT", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "accessControlManager", + "outputs": [ + { + "internalType": "contract IAccessControlManagerV8", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "name": "functionRegistry", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "accessControlManager_", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "remoteChainId_", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "remoteAddress_", + "type": "bytes" + } + ], + "name": "isTrustedRemote", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pendingOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "accessControlManager_", + "type": "address" + } + ], + "name": "setAccessControlManager", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "remoteChainId_", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "remoteAddress_", + "type": "bytes" + } + ], + "name": "setTrustedRemoteAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner_", + "type": "address" + } + ], + "name": "transferBridgeOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string[]", + "name": "signatures_", + "type": "string[]" + }, + { + "internalType": "bool[]", + "name": "active_", + "type": "bool[]" + } + ], + "name": "upsertSignature", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "address", + "name": "admin_", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + } + ] + }, + "XVSBridgeAdmin_Implementation": { + "address": "0xcAcDfB7Cba8B0f4b4f6C842f4d19b03EF1453235", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "XVSBridge_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "calledContract", + "type": "address" + }, + { + "internalType": "string", + "name": "methodSignature", + "type": "string" + } + ], + "name": "Unauthorized", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddressNotAllowed", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "signature", + "type": "string" + }, + { + "indexed": false, + "internalType": "bool", + "name": "active", + "type": "bool" + } + ], + "name": "FunctionRegistryChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldAccessControlManager", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAccessControlManager", + "type": "address" + } + ], + "name": "NewAccessControlManager", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "stateMutability": "nonpayable", + "type": "fallback" + }, + { + "inputs": [], + "name": "XVSBridge", + "outputs": [ + { + "internalType": "contract IXVSProxyOFT", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "accessControlManager", + "outputs": [ + { + "internalType": "contract IAccessControlManagerV8", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "name": "functionRegistry", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "accessControlManager_", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "remoteChainId_", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "remoteAddress_", + "type": "bytes" + } + ], + "name": "isTrustedRemote", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pendingOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "accessControlManager_", + "type": "address" + } + ], + "name": "setAccessControlManager", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "remoteChainId_", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "remoteAddress_", + "type": "bytes" + } + ], + "name": "setTrustedRemoteAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner_", + "type": "address" + } + ], + "name": "transferBridgeOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string[]", + "name": "signatures_", + "type": "string[]" + }, + { + "internalType": "bool[]", + "name": "active_", + "type": "bool[]" + } + ], + "name": "upsertSignature", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ] + }, + "XVSBridgeAdmin_Proxy": { + "address": "0x649c35088bAd6847fF163B15d0e7A00943D7FD40", + "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": [ + { + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "changeAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "implementation", + "outputs": [ + { + "internalType": "address", + "name": "implementation_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ] + }, + "XVSProxyOFTDest": { + "address": "0x8A5580d7154F9abb01836655b8594f94719b265C", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "tokenAddress_", + "type": "address" + }, + { + "internalType": "uint8", + "name": "sharedDecimals_", + "type": "uint8" + }, + { + "internalType": "address", + "name": "lzEndpoint_", + "type": "address" + }, + { + "internalType": "address", + "name": "oracle_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "sweepAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + } + ], + "name": "InsufficientBalance", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddressNotAllowed", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "_nonce", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "_hash", + "type": "bytes32" + } + ], + "name": "CallOFTReceivedSuccess", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "srcChainId", + "type": "uint16" + }, + { + "indexed": true, + "internalType": "bytes", + "name": "srcAddress", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "nonce", + "type": "uint64" + } + ], + "name": "DropFailedMessage", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "innerToken", + "type": "address" + } + ], + "name": "InnerTokenAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "_nonce", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_payload", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_reason", + "type": "bytes" + } + ], + "name": "MessageFailed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "_address", + "type": "address" + } + ], + "name": "NonContractAddress", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldOracle", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOracle", + "type": "address" + } + ], + "name": "OracleChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "indexed": true, + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "ReceiveFromChain", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "_nonce", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "_payloadHash", + "type": "bytes32" + } + ], + "name": "RetryMessageSuccess", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "indexed": true, + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "_toAddress", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "SendToChain", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "chainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oldMaxLimit", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newMaxLimit", + "type": "uint256" + } + ], + "name": "SetMaxDailyLimit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "chainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oldMaxLimit", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newMaxLimit", + "type": "uint256" + } + ], + "name": "SetMaxDailyReceiveLimit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "chainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oldMaxLimit", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newMaxLimit", + "type": "uint256" + } + ], + "name": "SetMaxSingleReceiveTransactionLimit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "chainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oldMaxLimit", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newMaxLimit", + "type": "uint256" + } + ], + "name": "SetMaxSingleTransactionLimit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "uint16", + "name": "_type", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_minDstGas", + "type": "uint256" + } + ], + "name": "SetMinDstGas", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "precrime", + "type": "address" + } + ], + "name": "SetPrecrime", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "_remoteChainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_path", + "type": "bytes" + } + ], + "name": "SetTrustedRemote", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "_remoteChainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_remoteAddress", + "type": "bytes" + } + ], + "name": "SetTrustedRemoteAddress", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "addr", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "isWhitelist", + "type": "bool" + } + ], + "name": "SetWhitelist", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "sweepAmount", + "type": "uint256" + } + ], + "name": "SweepToken", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "chainId", + "type": "uint16" + } + ], + "name": "TrustedRemoteRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bool", + "name": "enabled", + "type": "bool" + } + ], + "name": "UpdateSendAndCallEnabled", + "type": "event" + }, + { + "inputs": [], + "name": "DEFAULT_PAYLOAD_SIZE_LIMIT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "NO_EXTRA_GAS", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PT_SEND", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PT_SEND_AND_CALL", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "_nonce", + "type": "uint64" + }, + { + "internalType": "bytes32", + "name": "_from", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "_payload", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "_gasForCall", + "type": "uint256" + } + ], + "name": "callOnOFTReceived", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "chainIdToLast24HourReceiveWindowStart", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "chainIdToLast24HourReceived", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "chainIdToLast24HourTransferred", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "chainIdToLast24HourWindowStart", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "chainIdToMaxDailyLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "chainIdToMaxDailyReceiveLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "chainIdToMaxSingleReceiveTransactionLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "chainIdToMaxSingleTransactionLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "circulatingSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "name": "creditedPackets", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "srcChainId_", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "srcAddress_", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "nonce_", + "type": "uint64" + } + ], + "name": "dropFailedMessage", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "internalType": "bytes32", + "name": "_toAddress", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "_payload", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "_dstGasForCall", + "type": "uint64" + }, + { + "internalType": "bool", + "name": "_useZro", + "type": "bool" + }, + { + "internalType": "bytes", + "name": "_adapterParams", + "type": "bytes" + } + ], + "name": "estimateSendAndCallFee", + "outputs": [ + { + "internalType": "uint256", + "name": "nativeFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "zroFee", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "internalType": "bytes32", + "name": "_toAddress", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "_useZro", + "type": "bool" + }, + { + "internalType": "bytes", + "name": "_adapterParams", + "type": "bytes" + } + ], + "name": "estimateSendFee", + "outputs": [ + { + "internalType": "uint256", + "name": "nativeFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "zroFee", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "name": "failedMessages", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + } + ], + "name": "forceResumeReceive", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_version", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "_chainId", + "type": "uint16" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_configType", + "type": "uint256" + } + ], + "name": "getConfig", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_remoteChainId", + "type": "uint16" + } + ], + "name": "getTrustedRemoteAddress", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from_", + "type": "address" + }, + { + "internalType": "uint16", + "name": "dstChainId_", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "amount_", + "type": "uint256" + } + ], + "name": "isEligibleToSend", + "outputs": [ + { + "internalType": "bool", + "name": "eligibleToSend", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "maxSingleTransactionLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxDailyLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountInUsd", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "transferredInWindow", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "last24HourWindowStart", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "isWhiteListedUser", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + } + ], + "name": "isTrustedRemote", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "lzEndpoint", + "outputs": [ + { + "internalType": "contract ILayerZeroEndpoint", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "_nonce", + "type": "uint64" + }, + { + "internalType": "bytes", + "name": "_payload", + "type": "bytes" + } + ], + "name": "lzReceive", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "minDstGasLookup", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "_nonce", + "type": "uint64" + }, + { + "internalType": "bytes", + "name": "_payload", + "type": "bytes" + } + ], + "name": "nonblockingLzReceive", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "oracle", + "outputs": [ + { + "internalType": "contract ResilientOracleInterface", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "payloadSizeLimitLookup", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "precrime", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "remoteChainId_", + "type": "uint16" + } + ], + "name": "removeTrustedRemote", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "_nonce", + "type": "uint64" + }, + { + "internalType": "bytes", + "name": "_payload", + "type": "bytes" + } + ], + "name": "retryMessage", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from_", + "type": "address" + }, + { + "internalType": "uint16", + "name": "dstChainId_", + "type": "uint16" + }, + { + "internalType": "bytes32", + "name": "toAddress_", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "amount_", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "payload_", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "dstGasForCall_", + "type": "uint64" + }, + { + "components": [ + { + "internalType": "address payable", + "name": "refundAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "zroPaymentAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "adapterParams", + "type": "bytes" + } + ], + "internalType": "struct ICommonOFT.LzCallParams", + "name": "callparams_", + "type": "tuple" + } + ], + "name": "sendAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "sendAndCallEnabled", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "internalType": "bytes32", + "name": "_toAddress", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address payable", + "name": "refundAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "zroPaymentAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "adapterParams", + "type": "bytes" + } + ], + "internalType": "struct ICommonOFT.LzCallParams", + "name": "_callParams", + "type": "tuple" + } + ], + "name": "sendFrom", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_version", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "_chainId", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "_configType", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "_config", + "type": "bytes" + } + ], + "name": "setConfig", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "chainId_", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "limit_", + "type": "uint256" + } + ], + "name": "setMaxDailyLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "chainId_", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "limit_", + "type": "uint256" + } + ], + "name": "setMaxDailyReceiveLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "chainId_", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "limit_", + "type": "uint256" + } + ], + "name": "setMaxSingleReceiveTransactionLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "chainId_", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "limit_", + "type": "uint256" + } + ], + "name": "setMaxSingleTransactionLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "_packetType", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "_minGas", + "type": "uint256" + } + ], + "name": "setMinDstGas", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "oracleAddress_", + "type": "address" + } + ], + "name": "setOracle", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "_size", + "type": "uint256" + } + ], + "name": "setPayloadSizeLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_precrime", + "type": "address" + } + ], + "name": "setPrecrime", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_version", + "type": "uint16" + } + ], + "name": "setReceiveVersion", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_version", + "type": "uint16" + } + ], + "name": "setSendVersion", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_remoteChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_path", + "type": "bytes" + } + ], + "name": "setTrustedRemote", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_remoteChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_remoteAddress", + "type": "bytes" + } + ], + "name": "setTrustedRemoteAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user_", + "type": "address" + }, + { + "internalType": "bool", + "name": "val_", + "type": "bool" + } + ], + "name": "setWhitelist", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "sharedDecimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "token_", + "type": "address" + }, + { + "internalType": "address", + "name": "to_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount_", + "type": "uint256" + } + ], + "name": "sweepToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "token", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "trustedRemoteLookup", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "enabled_", + "type": "bool" + } + ], + "name": "updateSendAndCallEnabled", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "whitelist", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ] + } + } +} diff --git a/deployments/arbitrumsepolia_addresses.json b/deployments/arbitrumsepolia_addresses.json new file mode 100644 index 0000000..17b19d7 --- /dev/null +++ b/deployments/arbitrumsepolia_addresses.json @@ -0,0 +1,12 @@ +{ + "name": "arbitrumsepolia", + "chainId": "421614", + "addresses": { + "DefaultProxyAdmin": "0xA78A1Df376c3CEeBC5Fab574fe6EdDbbF76fd03e", + "XVS": "0x8f377098e488D227e809BD56D30C9Fd8388245D3", + "XVSBridgeAdmin": "0x649c35088bAd6847fF163B15d0e7A00943D7FD40", + "XVSBridgeAdmin_Implementation": "0xcAcDfB7Cba8B0f4b4f6C842f4d19b03EF1453235", + "XVSBridgeAdmin_Proxy": "0x649c35088bAd6847fF163B15d0e7A00943D7FD40", + "XVSProxyOFTDest": "0x8A5580d7154F9abb01836655b8594f94719b265C" + } +} From da5de5982a5c83ad74a540d658faa927e587bfa7 Mon Sep 17 00:00:00 2001 From: Debugger022 Date: Tue, 26 Mar 2024 16:30:38 +0530 Subject: [PATCH 03/12] refactor: change tx single and daily tx limits for bsctestnet, opbnbtestnet and sepolia --- helpers/deploymentConfig.ts | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/helpers/deploymentConfig.ts b/helpers/deploymentConfig.ts index df311bd..4d9dff5 100644 --- a/helpers/deploymentConfig.ts +++ b/helpers/deploymentConfig.ts @@ -126,10 +126,10 @@ export const bridgeConfig: BridgeConfig = { bsctestnet: { methods: [ { method: "setMinDstGas(uint16,uint16,uint256)", args: [10161, 0, "300000"] }, - { method: "setMaxDailyLimit(uint16,uint256)", args: [10161, "500000000000000000000"] }, - { method: "setMaxSingleTransactionLimit(uint16,uint256)", args: [10161, "10000000000000000000"] }, - { method: "setMaxDailyReceiveLimit(uint16,uint256)", args: [10161, "500000000000000000000"] }, - { method: "setMaxSingleReceiveTransactionLimit(uint16,uint256)", args: [10161, "10000000000000000000"] }, + { method: "setMaxDailyLimit(uint16,uint256)", args: [10161, "50000000000000000000000"] }, + { method: "setMaxSingleTransactionLimit(uint16,uint256)", args: [10161, "10000000000000000000000"] }, + { method: "setMaxDailyReceiveLimit(uint16,uint256)", args: [10161, "50000000000000000000000"] }, + { method: "setMaxSingleReceiveTransactionLimit(uint16,uint256)", args: [10161, "10000000000000000000000"] }, ], }, bscmainnet: { @@ -144,10 +144,10 @@ export const bridgeConfig: BridgeConfig = { sepolia: { methods: [ { method: "setMinDstGas(uint16,uint16,uint256)", args: [10102, 0, "300000"] }, - { method: "setMaxDailyLimit(uint16,uint256)", args: [10102, "500000000000000000000"] }, - { method: "setMaxSingleTransactionLimit(uint16,uint256)", args: [10102, "10000000000000000000"] }, - { method: "setMaxDailyReceiveLimit(uint16,uint256)", args: [10102, "500000000000000000000"] }, - { method: "setMaxSingleReceiveTransactionLimit(uint16,uint256)", args: [10102, "10000000000000000000"] }, + { method: "setMaxDailyLimit(uint16,uint256)", args: [10102, "50000000000000000000000"] }, + { method: "setMaxSingleTransactionLimit(uint16,uint256)", args: [10102, "10000000000000000000000"] }, + { method: "setMaxDailyReceiveLimit(uint16,uint256)", args: [10102, "50000000000000000000000"] }, + { method: "setMaxSingleReceiveTransactionLimit(uint16,uint256)", args: [10102, "10000000000000000000000"] }, ], }, ethereum: { @@ -162,10 +162,10 @@ export const bridgeConfig: BridgeConfig = { opbnbtestnet: { methods: [ { method: "setMinDstGas(uint16,uint16,uint256)", args: [10102, 0, "300000"] }, - { method: "setMaxDailyLimit(uint16,uint256)", args: [10102, "500000000000000000000"] }, - { method: "setMaxSingleTransactionLimit(uint16,uint256)", args: [10102, "10000000000000000000"] }, - { method: "setMaxDailyReceiveLimit(uint16,uint256)", args: [10102, "500000000000000000000"] }, - { method: "setMaxSingleReceiveTransactionLimit(uint16,uint256)", args: [10102, "10000000000000000000"] }, + { method: "setMaxDailyLimit(uint16,uint256)", args: [10102, "50000000000000000000000"] }, + { method: "setMaxSingleTransactionLimit(uint16,uint256)", args: [10102, "10000000000000000000000"] }, + { method: "setMaxDailyReceiveLimit(uint16,uint256)", args: [10102, "50000000000000000000000"] }, + { method: "setMaxSingleReceiveTransactionLimit(uint16,uint256)", args: [10102, "10000000000000000000000"] }, ], }, opbnbmainnet: { From 5e7bdc9c34f003f0ed08aaf0e80511e652dae434 Mon Sep 17 00:00:00 2001 From: Debugger022 Date: Tue, 26 Mar 2024 17:31:09 +0530 Subject: [PATCH 04/12] refactor: argument chain id for bridge commands and update deployments --- deployments/arbitrumsepolia/XVS.json | 32 +++---- .../arbitrumsepolia/XVSBridgeAdmin.json | 86 +++++++++---------- .../XVSBridgeAdmin_Implementation.json | 34 ++++---- .../arbitrumsepolia/XVSBridgeAdmin_Proxy.json | 84 +++++++++--------- .../arbitrumsepolia/XVSProxyOFTDest.json | 60 ++++++------- helpers/deploymentConfig.ts | 20 ++--- 6 files changed, 158 insertions(+), 158 deletions(-) diff --git a/deployments/arbitrumsepolia/XVS.json b/deployments/arbitrumsepolia/XVS.json index eea1988..a48fc03 100644 --- a/deployments/arbitrumsepolia/XVS.json +++ b/deployments/arbitrumsepolia/XVS.json @@ -1,5 +1,5 @@ { - "address": "0x8f377098e488D227e809BD56D30C9Fd8388245D3", + "address": "0x47fA6E9F717c9eB081c4734FfB5a1EcD70508891", "abi": [ { "inputs": [ @@ -716,34 +716,34 @@ "type": "function" } ], - "transactionHash": "0xa4451e8b4ee611bccdbd94595874f92344f3c1be9ec4dc27759c713994b33746", + "transactionHash": "0x8f6f0164031904dac588c17a82a178bf480d95a4054ac385fccffda339d93356", "receipt": { "to": null, "from": "0x638Eb8DFfF094Fd1d52c5A198b44984806C521E5", - "contractAddress": "0x8f377098e488D227e809BD56D30C9Fd8388245D3", - "transactionIndex": 3, - "gasUsed": "1646166", - "logsBloom": "0x00000000000000000000000200000000000000000000000400800000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000200000000000020800000000000000000800000000000000000000000000000000400000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xde62f7d261145afe999ab2b38c474a89bdd042a5a696a858d6ff4d3998259933", - "transactionHash": "0xa4451e8b4ee611bccdbd94595874f92344f3c1be9ec4dc27759c713994b33746", + "contractAddress": "0x47fA6E9F717c9eB081c4734FfB5a1EcD70508891", + "transactionIndex": 1, + "gasUsed": "2883252", + "logsBloom": "0x00000000000000000000000200000000000000000000000400800000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001004000000000000000000000000000000000020000000000000000000800000000000000000000000000000000400000800000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x588eec9e1599140a788294fd42247c4347f91fa5a24ba98a1e8397af7fe2ac84", + "transactionHash": "0x8f6f0164031904dac588c17a82a178bf480d95a4054ac385fccffda339d93356", "logs": [ { - "transactionIndex": 3, - "blockNumber": 27104878, - "transactionHash": "0xa4451e8b4ee611bccdbd94595874f92344f3c1be9ec4dc27759c713994b33746", - "address": "0x8f377098e488D227e809BD56D30C9Fd8388245D3", + "transactionIndex": 1, + "blockNumber": 27132235, + "transactionHash": "0x8f6f0164031904dac588c17a82a178bf480d95a4054ac385fccffda339d93356", + "address": "0x47fA6E9F717c9eB081c4734FfB5a1EcD70508891", "topics": [ "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x000000000000000000000000638eb8dfff094fd1d52c5a198b44984806c521e5" ], "data": "0x", - "logIndex": 19, - "blockHash": "0xde62f7d261145afe999ab2b38c474a89bdd042a5a696a858d6ff4d3998259933" + "logIndex": 0, + "blockHash": "0x588eec9e1599140a788294fd42247c4347f91fa5a24ba98a1e8397af7fe2ac84" } ], - "blockNumber": 27104878, - "cumulativeGasUsed": "3274704", + "blockNumber": 27132235, + "cumulativeGasUsed": "2883252", "status": 1, "byzantium": true }, diff --git a/deployments/arbitrumsepolia/XVSBridgeAdmin.json b/deployments/arbitrumsepolia/XVSBridgeAdmin.json index 655e631..838c466 100644 --- a/deployments/arbitrumsepolia/XVSBridgeAdmin.json +++ b/deployments/arbitrumsepolia/XVSBridgeAdmin.json @@ -1,5 +1,5 @@ { - "address": "0x649c35088bAd6847fF163B15d0e7A00943D7FD40", + "address": "0x0DC3d6717727FD5a023e41bA8134640ca18f3E48", "abi": [ { "anonymous": false, @@ -458,82 +458,82 @@ "type": "constructor" } ], - "transactionHash": "0x00847afebb038e883d2e493d8e0dd53315661a1378b772a9d0ad9b7800cf956d", + "transactionHash": "0xb63f1d8df57502b4f58552865096a179a74b158ede50c27deff17a6fcb6adb17", "receipt": { "to": null, "from": "0x638Eb8DFfF094Fd1d52c5A198b44984806C521E5", - "contractAddress": "0x649c35088bAd6847fF163B15d0e7A00943D7FD40", - "transactionIndex": 5, - "gasUsed": "921541", - "logsBloom": "0x00000000000000000000000200000000400000000000000400800000000000040000000000000000000000000000000000200000000000000000000000008000000000000000000000000000000002000001000000000000000000000000000000000000020000000000000000000840000000800000000000000000000000400000000000000000000000000000000000000000000080000000000010800000000000000000000000000000000400000000000000800000000000000000000000000022000000000000100000040000000000000400000000000000000020000000000000000000000000000000000000000800000000000000000000000000", - "blockHash": "0xf1a2ac69f9fbfc2157e069168b0ca9a46480549e21d7e5c709be3fb15589df7f", - "transactionHash": "0x00847afebb038e883d2e493d8e0dd53315661a1378b772a9d0ad9b7800cf956d", + "contractAddress": "0x0DC3d6717727FD5a023e41bA8134640ca18f3E48", + "transactionIndex": 2, + "gasUsed": "1679305", + "logsBloom": "0x00000000000000000000000200000040400020000000000400800000000000040000000000000000000000000000000000000000000000000000000000008000000000000000004000000000000002000001000000000000000000000000000000000000020000040000000000000800000000800000000000000000000000400000000000000000000000000000000000000000000080000000000000800000000000000000000000000001000400000000000000800000000000000000000000000020000000000000000000040000000000000400000000000000000020000200000000000000000000000000000000000800000000000000000000000000", + "blockHash": "0xd4fb8336770134ab82a80135f27f86255bfeed6ca616c6c7b8a38a25819d8a32", + "transactionHash": "0xb63f1d8df57502b4f58552865096a179a74b158ede50c27deff17a6fcb6adb17", "logs": [ { - "transactionIndex": 5, - "blockNumber": 27104954, - "transactionHash": "0x00847afebb038e883d2e493d8e0dd53315661a1378b772a9d0ad9b7800cf956d", - "address": "0x649c35088bAd6847fF163B15d0e7A00943D7FD40", + "transactionIndex": 2, + "blockNumber": 27132301, + "transactionHash": "0xb63f1d8df57502b4f58552865096a179a74b158ede50c27deff17a6fcb6adb17", + "address": "0x0DC3d6717727FD5a023e41bA8134640ca18f3E48", "topics": [ "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", - "0x000000000000000000000000cacdfb7cba8b0f4b4f6c842f4d19b03ef1453235" + "0x000000000000000000000000d2048bd9e1d9a515cc57e270d0928b1127348ae1" ], "data": "0x", - "logIndex": 10, - "blockHash": "0xf1a2ac69f9fbfc2157e069168b0ca9a46480549e21d7e5c709be3fb15589df7f" + "logIndex": 4, + "blockHash": "0xd4fb8336770134ab82a80135f27f86255bfeed6ca616c6c7b8a38a25819d8a32" }, { - "transactionIndex": 5, - "blockNumber": 27104954, - "transactionHash": "0x00847afebb038e883d2e493d8e0dd53315661a1378b772a9d0ad9b7800cf956d", - "address": "0x649c35088bAd6847fF163B15d0e7A00943D7FD40", + "transactionIndex": 2, + "blockNumber": 27132301, + "transactionHash": "0xb63f1d8df57502b4f58552865096a179a74b158ede50c27deff17a6fcb6adb17", + "address": "0x0DC3d6717727FD5a023e41bA8134640ca18f3E48", "topics": [ "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x000000000000000000000000638eb8dfff094fd1d52c5a198b44984806c521e5" ], "data": "0x", - "logIndex": 11, - "blockHash": "0xf1a2ac69f9fbfc2157e069168b0ca9a46480549e21d7e5c709be3fb15589df7f" + "logIndex": 5, + "blockHash": "0xd4fb8336770134ab82a80135f27f86255bfeed6ca616c6c7b8a38a25819d8a32" }, { - "transactionIndex": 5, - "blockNumber": 27104954, - "transactionHash": "0x00847afebb038e883d2e493d8e0dd53315661a1378b772a9d0ad9b7800cf956d", - "address": "0x649c35088bAd6847fF163B15d0e7A00943D7FD40", + "transactionIndex": 2, + "blockNumber": 27132301, + "transactionHash": "0xb63f1d8df57502b4f58552865096a179a74b158ede50c27deff17a6fcb6adb17", + "address": "0x0DC3d6717727FD5a023e41bA8134640ca18f3E48", "topics": ["0x66fd58e82f7b31a2a5c30e0888f3093efe4e111b00cd2b0c31fe014601293aa0"], "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a36ad96441cb931d8dfeaaac97d3fab4b39e590f", - "logIndex": 12, - "blockHash": "0xf1a2ac69f9fbfc2157e069168b0ca9a46480549e21d7e5c709be3fb15589df7f" + "logIndex": 6, + "blockHash": "0xd4fb8336770134ab82a80135f27f86255bfeed6ca616c6c7b8a38a25819d8a32" }, { - "transactionIndex": 5, - "blockNumber": 27104954, - "transactionHash": "0x00847afebb038e883d2e493d8e0dd53315661a1378b772a9d0ad9b7800cf956d", - "address": "0x649c35088bAd6847fF163B15d0e7A00943D7FD40", + "transactionIndex": 2, + "blockNumber": 27132301, + "transactionHash": "0xb63f1d8df57502b4f58552865096a179a74b158ede50c27deff17a6fcb6adb17", + "address": "0x0DC3d6717727FD5a023e41bA8134640ca18f3E48", "topics": ["0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498"], "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 13, - "blockHash": "0xf1a2ac69f9fbfc2157e069168b0ca9a46480549e21d7e5c709be3fb15589df7f" + "logIndex": 7, + "blockHash": "0xd4fb8336770134ab82a80135f27f86255bfeed6ca616c6c7b8a38a25819d8a32" }, { - "transactionIndex": 5, - "blockNumber": 27104954, - "transactionHash": "0x00847afebb038e883d2e493d8e0dd53315661a1378b772a9d0ad9b7800cf956d", - "address": "0x649c35088bAd6847fF163B15d0e7A00943D7FD40", + "transactionIndex": 2, + "blockNumber": 27132301, + "transactionHash": "0xb63f1d8df57502b4f58552865096a179a74b158ede50c27deff17a6fcb6adb17", + "address": "0x0DC3d6717727FD5a023e41bA8134640ca18f3E48", "topics": ["0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f"], "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a78a1df376c3ceebc5fab574fe6eddbbf76fd03e", - "logIndex": 14, - "blockHash": "0xf1a2ac69f9fbfc2157e069168b0ca9a46480549e21d7e5c709be3fb15589df7f" + "logIndex": 8, + "blockHash": "0xd4fb8336770134ab82a80135f27f86255bfeed6ca616c6c7b8a38a25819d8a32" } ], - "blockNumber": 27104954, - "cumulativeGasUsed": "2395016", + "blockNumber": 27132301, + "cumulativeGasUsed": "3399219", "status": 1, "byzantium": true }, "args": [ - "0xcAcDfB7Cba8B0f4b4f6C842f4d19b03EF1453235", + "0xd2048bD9e1D9A515cc57E270D0928B1127348ae1", "0xA78A1Df376c3CEeBC5Fab574fe6EdDbbF76fd03e", "0xc4d66de8000000000000000000000000a36ad96441cb931d8dfeaaac97d3fab4b39e590f" ], @@ -546,7 +546,7 @@ "methodName": "initialize", "args": ["0xa36AD96441cB931D8dFEAAaC97D3FaB4B39E590F"] }, - "implementation": "0xcAcDfB7Cba8B0f4b4f6C842f4d19b03EF1453235", + "implementation": "0xd2048bD9e1D9A515cc57E270D0928B1127348ae1", "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.", "kind": "dev", diff --git a/deployments/arbitrumsepolia/XVSBridgeAdmin_Implementation.json b/deployments/arbitrumsepolia/XVSBridgeAdmin_Implementation.json index c1dea6e..3d90a5f 100644 --- a/deployments/arbitrumsepolia/XVSBridgeAdmin_Implementation.json +++ b/deployments/arbitrumsepolia/XVSBridgeAdmin_Implementation.json @@ -1,5 +1,5 @@ { - "address": "0xcAcDfB7Cba8B0f4b4f6C842f4d19b03EF1453235", + "address": "0xd2048bD9e1D9A515cc57E270D0928B1127348ae1", "abi": [ { "inputs": [ @@ -329,34 +329,34 @@ "type": "function" } ], - "transactionHash": "0x06fc510c4442619cab163901c33cc571ee30189320559aac202a5a5ff9e1c360", + "transactionHash": "0x4dfe6686fb9890a60513d16b09040dd4859a2907964ee4fd300c43d1cf74cfed", "receipt": { "to": null, "from": "0x638Eb8DFfF094Fd1d52c5A198b44984806C521E5", - "contractAddress": "0xcAcDfB7Cba8B0f4b4f6C842f4d19b03EF1453235", - "transactionIndex": 2, - "gasUsed": "1417014", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080010000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000", - "blockHash": "0xf9c24f53bccdd04a09907818d68da24ccbb3a427bb56392140102590267d2cc9", - "transactionHash": "0x06fc510c4442619cab163901c33cc571ee30189320559aac202a5a5ff9e1c360", + "contractAddress": "0xd2048bD9e1D9A515cc57E270D0928B1127348ae1", + "transactionIndex": 3, + "gasUsed": "2496583", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000200000800400000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000", + "blockHash": "0x7ab0ebc08e18039f5ba3a0a03d07fccb15aa35f801a14cc59b44b9306e555581", + "transactionHash": "0x4dfe6686fb9890a60513d16b09040dd4859a2907964ee4fd300c43d1cf74cfed", "logs": [ { - "transactionIndex": 2, - "blockNumber": 27104932, - "transactionHash": "0x06fc510c4442619cab163901c33cc571ee30189320559aac202a5a5ff9e1c360", - "address": "0xcAcDfB7Cba8B0f4b4f6C842f4d19b03EF1453235", + "transactionIndex": 3, + "blockNumber": 27132283, + "transactionHash": "0x4dfe6686fb9890a60513d16b09040dd4859a2907964ee4fd300c43d1cf74cfed", + "address": "0xd2048bD9e1D9A515cc57E270D0928B1127348ae1", "topics": ["0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498"], "data": "0x00000000000000000000000000000000000000000000000000000000000000ff", - "logIndex": 3, - "blockHash": "0xf9c24f53bccdd04a09907818d68da24ccbb3a427bb56392140102590267d2cc9" + "logIndex": 6, + "blockHash": "0x7ab0ebc08e18039f5ba3a0a03d07fccb15aa35f801a14cc59b44b9306e555581" } ], - "blockNumber": 27104932, - "cumulativeGasUsed": "2537511", + "blockNumber": 27132283, + "cumulativeGasUsed": "4260614", "status": 1, "byzantium": true }, - "args": ["0x8A5580d7154F9abb01836655b8594f94719b265C"], + "args": ["0xE9B66800E63888DE29c4c9131faadbDbDCfae917"], "numDeployments": 1, "solcInputHash": "f2046c3ab03975d1be43bca1cf657398", "metadata": "{\"compiler\":{\"version\":\"0.8.13+commit.abaa5c0e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"XVSBridge_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"calledContract\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"methodSignature\",\"type\":\"string\"}],\"name\":\"Unauthorized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddressNotAllowed\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"signature\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"active\",\"type\":\"bool\"}],\"name\":\"FunctionRegistryChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldAccessControlManager\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAccessControlManager\",\"type\":\"address\"}],\"name\":\"NewAccessControlManager\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"stateMutability\":\"nonpayable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"XVSBridge\",\"outputs\":[{\"internalType\":\"contract IXVSProxyOFT\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"accessControlManager\",\"outputs\":[{\"internalType\":\"contract IAccessControlManagerV8\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"name\":\"functionRegistry\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"accessControlManager_\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"remoteChainId_\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"remoteAddress_\",\"type\":\"bytes\"}],\"name\":\"isTrustedRemote\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pendingOwner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"accessControlManager_\",\"type\":\"address\"}],\"name\":\"setAccessControlManager\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"remoteChainId_\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"remoteAddress_\",\"type\":\"bytes\"}],\"name\":\"setTrustedRemoteAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner_\",\"type\":\"address\"}],\"name\":\"transferBridgeOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string[]\",\"name\":\"signatures_\",\"type\":\"string[]\"},{\"internalType\":\"bool[]\",\"name\":\"active_\",\"type\":\"bool[]\"}],\"name\":\"upsertSignature\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Venus\",\"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 contract.\"}},\"isTrustedRemote(uint16,bytes)\":{\"custom:error\":\"ZeroAddressNotAllowed is thrown when remoteAddress_ contract address is zero.\",\"params\":{\"remoteAddress_\":\"Address of the destination bridge.\",\"remoteChainId_\":\"Chain Id of the destination chain.\"},\"returns\":{\"_0\":\"Bool indicating whether the remote chain is trusted or not.\"}},\"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:error\":\"ZeroAddressNotAllowed is thrown when remoteAddress_ contract address is zero.\",\"params\":{\"remoteAddress_\":\"Address of the destination bridge.\",\"remoteChainId_\":\"Chain Id of the destination chain.\"}},\"transferBridgeOwnership(address)\":{\"custom:access\":\"Controlled by AccessControlManager.\",\"params\":{\"newOwner_\":\"New owner of the XVS Bridge.\"}},\"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.\",\"custom:event\":\"Emits FunctionRegistryChanged if bool value of function changes.\",\"params\":{\"active_\":\"bool value, should be true to add function.\",\"signatures_\":\"Function signature to be added or removed.\"}}},\"stateVariables\":{\"XVSBridge\":{\"custom:oz-upgrades-unsafe-allow\":\"state-variable-immutable\"}},\"title\":\"XVSBridgeAdmin\",\"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\":\"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\":\"A mapping keeps track of function signature associated with function name string.\"},\"isTrustedRemote(uint16,bytes)\":{\"notice\":\"Returns true if remote address is trustedRemote corresponds to chainId_.\"},\"renounceOwnership()\":{\"notice\":\"Empty implementation of renounce ownership to avoid any mishappening.\"},\"setAccessControlManager(address)\":{\"notice\":\"Sets the address of AccessControlManager\"},\"setTrustedRemoteAddress(uint16,bytes)\":{\"notice\":\"Sets trusted remote on particular chain.\"},\"transferBridgeOwnership(address)\":{\"notice\":\"This function transfers the ownership of the bridge from this contract to new owner.\"},\"upsertSignature(string[],bool[])\":{\"notice\":\"A setter for the registry of functions that are allowed to be executed from proposals.\"}},\"notice\":\"The XVSBridgeAdmin contract extends a parent contract AccessControlledV8 for access control, and it manages an external contract called XVSProxyOFT. It maintains a registry of function signatures and names, allowing for dynamic function handling i.e checking of access control of interaction with only owner functions.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/Bridge/XVSBridgeAdmin.sol\":\"XVSBridgeAdmin\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.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() public virtual {\\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\":\"0x84efb8889801b0ac817324aff6acc691d07bbee816b671817132911d287a8c63\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.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. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby disabling 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\":\"0x4075622496acc77fd6d4de4cc30a8577a744d5c75afad33fdeacf1704d6eda98\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (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 * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\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\":\"0x89be10e757d242e9b18d5a32c9fbe2019f6d63052bbe46397a430a1d60d7f794\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.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 * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\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://consensys.net/diligence/blog/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.8.0/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(address target, bytes memory data, uint256 value) 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 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 (bool success, bytes memory returndata) = target.delegatecall(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\":\"0x9c80f545915582e63fe206c6ce27cbe85a86fc10b9cd2a0e8c9488fb7c2ee422\",\"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/governance-contracts/contracts/Governance/AccessControlledV8.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.13;\\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\":\"0x1b805a5d09990e2c4f7839afe7726a02f8452261eb3d0d488e24129ec0a7736d\",\"license\":\"BSD-3-Clause\"},\"@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV8.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.13;\\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\":\"0x8adbe291d659987faf4de606736227ad9d8e1a0e284a33a6ca12b30ab2a504b2\",\"license\":\"BSD-3-Clause\"},\"@venusprotocol/solidity-utilities/contracts/validators.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.13;\\n\\n/// @notice Thrown if the supplied address is a zero address where it is not allowed\\nerror ZeroAddressNotAllowed();\\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\",\"keccak256\":\"0x909eb76841ebd57d8f53686b76b1a09da7bbbbcddb29510c41674d5aa84c713e\",\"license\":\"BSD-3-Clause\"},\"contracts/Bridge/XVSBridgeAdmin.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\n\\npragma solidity 0.8.13;\\n\\nimport { AccessControlledV8 } from \\\"@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV8.sol\\\";\\nimport { ensureNonzeroAddress } from \\\"@venusprotocol/solidity-utilities/contracts/validators.sol\\\";\\nimport { IXVSProxyOFT } from \\\"./interfaces/IXVSProxyOFT.sol\\\";\\n\\n/**\\n * @title XVSBridgeAdmin\\n * @author Venus\\n * @notice The XVSBridgeAdmin contract extends a parent contract AccessControlledV8 for access control, and it manages an external contract called XVSProxyOFT.\\n * It maintains a registry of function signatures and names,\\n * allowing for dynamic function handling i.e checking of access control of interaction with only owner functions.\\n */\\ncontract XVSBridgeAdmin is AccessControlledV8 {\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n IXVSProxyOFT public immutable XVSBridge;\\n /**\\n * @notice A mapping keeps track of function signature associated with function name string.\\n */\\n mapping(bytes4 => string) public functionRegistry;\\n\\n /**\\n * @notice emitted when function registry updated\\n */\\n event FunctionRegistryChanged(string signature, bool active);\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor(address XVSBridge_) {\\n ensureNonzeroAddress(XVSBridge_);\\n XVSBridge = IXVSProxyOFT(XVSBridge_);\\n _disableInitializers();\\n }\\n\\n /**\\n * @param accessControlManager_ Address of access control manager contract.\\n */\\n function initialize(address accessControlManager_) external initializer {\\n __AccessControlled_init(accessControlManager_);\\n }\\n\\n /**\\n * @notice Invoked when called function does not exist in the contract.\\n * @return Response of low level call.\\n * @custom:access Controlled by AccessControlManager.\\n */\\n fallback(bytes calldata data) external returns (bytes memory) {\\n string memory fun = _getFunctionName(msg.sig);\\n require(bytes(fun).length != 0, \\\"Function not found\\\");\\n _checkAccessAllowed(fun);\\n (bool ok, bytes memory res) = address(XVSBridge).call(data);\\n require(ok, \\\"call failed\\\");\\n return res;\\n }\\n\\n /**\\n * @notice Sets trusted remote on particular chain.\\n * @param remoteChainId_ Chain Id of the destination chain.\\n * @param remoteAddress_ Address of the destination bridge.\\n * @custom:access Controlled by AccessControlManager.\\n * @custom:error ZeroAddressNotAllowed is thrown when remoteAddress_ contract address is zero.\\n */\\n function setTrustedRemoteAddress(uint16 remoteChainId_, bytes calldata remoteAddress_) external {\\n _checkAccessAllowed(\\\"setTrustedRemoteAddress(uint16,bytes)\\\");\\n require(remoteChainId_ != 0, \\\"ChainId must not be zero\\\");\\n ensureNonzeroAddress(bytesToAddress(remoteAddress_));\\n XVSBridge.setTrustedRemoteAddress(remoteChainId_, remoteAddress_);\\n }\\n\\n /**\\n * @notice A setter for the 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 * @custom:event Emits FunctionRegistryChanged if bool value of function changes.\\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; ) {\\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 unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /**\\n * @notice This function transfers the ownership of the bridge from this contract to new owner.\\n * @param newOwner_ New owner of the XVS Bridge.\\n * @custom:access Controlled by AccessControlManager.\\n */\\n function transferBridgeOwnership(address newOwner_) external {\\n _checkAccessAllowed(\\\"transferBridgeOwnership(address)\\\");\\n XVSBridge.transferOwnership(newOwner_);\\n }\\n\\n /**\\n * @notice Returns true if remote address is trustedRemote corresponds to chainId_.\\n * @param remoteChainId_ Chain Id of the destination chain.\\n * @param remoteAddress_ Address of the destination bridge.\\n * @custom:error ZeroAddressNotAllowed is thrown when remoteAddress_ contract address is zero.\\n * @return Bool indicating whether the remote chain is trusted or not.\\n */\\n function isTrustedRemote(uint16 remoteChainId_, bytes calldata remoteAddress_) external returns (bool) {\\n require(remoteChainId_ != 0, \\\"ChainId must not be zero\\\");\\n ensureNonzeroAddress(bytesToAddress(remoteAddress_));\\n return XVSBridge.isTrustedRemote(remoteChainId_, remoteAddress_);\\n }\\n\\n /**\\n * @notice Empty implementation of renounce ownership to avoid any mishappening.\\n */\\n function renounceOwnership() public override {}\\n\\n /**\\n * @dev Returns function name string associated with function signature.\\n * @param signature_ Four bytes of function signature.\\n * @return Function signature corresponding to its hash.\\n */\\n function _getFunctionName(bytes4 signature_) internal view returns (string memory) {\\n return functionRegistry[signature_];\\n }\\n\\n /**\\n * @notice Converts given bytes into address.\\n * @param b Bytes to be converted into address.\\n * @return Converted address of given bytes.\\n */\\n function bytesToAddress(bytes calldata b) private pure returns (address) {\\n return address(uint160(bytes20(b)));\\n }\\n}\\n\",\"keccak256\":\"0x3ba34b95f911e1772aca61e6daa00c4ebdb5bee61fc072ffba9e7ff3dc1262cd\",\"license\":\"BSD-3-Clause\"},\"contracts/Bridge/interfaces/IXVSProxyOFT.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.13;\\n\\n/**\\n * @title IXVSProxyOFT\\n * @author Venus\\n * @notice Interface implemented by `XVSProxyOFT`.\\n */\\ninterface IXVSProxyOFT {\\n function transferOwnership(address addr) external;\\n\\n function setTrustedRemoteAddress(uint16 remoteChainId, bytes calldata srcAddress) external;\\n\\n function isTrustedRemote(uint16 remoteChainId, bytes calldata srcAddress) external returns (bool);\\n}\\n\",\"keccak256\":\"0x854518f3e4c2270ca52184e63dc1f9d27f2893388216ee6153e6ab8cf2d7c960\",\"license\":\"BSD-3-Clause\"}},\"version\":1}", diff --git a/deployments/arbitrumsepolia/XVSBridgeAdmin_Proxy.json b/deployments/arbitrumsepolia/XVSBridgeAdmin_Proxy.json index b962385..d9c4842 100644 --- a/deployments/arbitrumsepolia/XVSBridgeAdmin_Proxy.json +++ b/deployments/arbitrumsepolia/XVSBridgeAdmin_Proxy.json @@ -1,5 +1,5 @@ { - "address": "0x649c35088bAd6847fF163B15d0e7A00943D7FD40", + "address": "0x0DC3d6717727FD5a023e41bA8134640ca18f3E48", "abi": [ { "inputs": [ @@ -146,82 +146,82 @@ "type": "receive" } ], - "transactionHash": "0x00847afebb038e883d2e493d8e0dd53315661a1378b772a9d0ad9b7800cf956d", + "transactionHash": "0xb63f1d8df57502b4f58552865096a179a74b158ede50c27deff17a6fcb6adb17", "receipt": { "to": null, "from": "0x638Eb8DFfF094Fd1d52c5A198b44984806C521E5", - "contractAddress": "0x649c35088bAd6847fF163B15d0e7A00943D7FD40", - "transactionIndex": 5, - "gasUsed": "921541", - "logsBloom": "0x00000000000000000000000200000000400000000000000400800000000000040000000000000000000000000000000000200000000000000000000000008000000000000000000000000000000002000001000000000000000000000000000000000000020000000000000000000840000000800000000000000000000000400000000000000000000000000000000000000000000080000000000010800000000000000000000000000000000400000000000000800000000000000000000000000022000000000000100000040000000000000400000000000000000020000000000000000000000000000000000000000800000000000000000000000000", - "blockHash": "0xf1a2ac69f9fbfc2157e069168b0ca9a46480549e21d7e5c709be3fb15589df7f", - "transactionHash": "0x00847afebb038e883d2e493d8e0dd53315661a1378b772a9d0ad9b7800cf956d", + "contractAddress": "0x0DC3d6717727FD5a023e41bA8134640ca18f3E48", + "transactionIndex": 2, + "gasUsed": "1679305", + "logsBloom": "0x00000000000000000000000200000040400020000000000400800000000000040000000000000000000000000000000000000000000000000000000000008000000000000000004000000000000002000001000000000000000000000000000000000000020000040000000000000800000000800000000000000000000000400000000000000000000000000000000000000000000080000000000000800000000000000000000000000001000400000000000000800000000000000000000000000020000000000000000000040000000000000400000000000000000020000200000000000000000000000000000000000800000000000000000000000000", + "blockHash": "0xd4fb8336770134ab82a80135f27f86255bfeed6ca616c6c7b8a38a25819d8a32", + "transactionHash": "0xb63f1d8df57502b4f58552865096a179a74b158ede50c27deff17a6fcb6adb17", "logs": [ { - "transactionIndex": 5, - "blockNumber": 27104954, - "transactionHash": "0x00847afebb038e883d2e493d8e0dd53315661a1378b772a9d0ad9b7800cf956d", - "address": "0x649c35088bAd6847fF163B15d0e7A00943D7FD40", + "transactionIndex": 2, + "blockNumber": 27132301, + "transactionHash": "0xb63f1d8df57502b4f58552865096a179a74b158ede50c27deff17a6fcb6adb17", + "address": "0x0DC3d6717727FD5a023e41bA8134640ca18f3E48", "topics": [ "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", - "0x000000000000000000000000cacdfb7cba8b0f4b4f6c842f4d19b03ef1453235" + "0x000000000000000000000000d2048bd9e1d9a515cc57e270d0928b1127348ae1" ], "data": "0x", - "logIndex": 10, - "blockHash": "0xf1a2ac69f9fbfc2157e069168b0ca9a46480549e21d7e5c709be3fb15589df7f" + "logIndex": 4, + "blockHash": "0xd4fb8336770134ab82a80135f27f86255bfeed6ca616c6c7b8a38a25819d8a32" }, { - "transactionIndex": 5, - "blockNumber": 27104954, - "transactionHash": "0x00847afebb038e883d2e493d8e0dd53315661a1378b772a9d0ad9b7800cf956d", - "address": "0x649c35088bAd6847fF163B15d0e7A00943D7FD40", + "transactionIndex": 2, + "blockNumber": 27132301, + "transactionHash": "0xb63f1d8df57502b4f58552865096a179a74b158ede50c27deff17a6fcb6adb17", + "address": "0x0DC3d6717727FD5a023e41bA8134640ca18f3E48", "topics": [ "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x000000000000000000000000638eb8dfff094fd1d52c5a198b44984806c521e5" ], "data": "0x", - "logIndex": 11, - "blockHash": "0xf1a2ac69f9fbfc2157e069168b0ca9a46480549e21d7e5c709be3fb15589df7f" + "logIndex": 5, + "blockHash": "0xd4fb8336770134ab82a80135f27f86255bfeed6ca616c6c7b8a38a25819d8a32" }, { - "transactionIndex": 5, - "blockNumber": 27104954, - "transactionHash": "0x00847afebb038e883d2e493d8e0dd53315661a1378b772a9d0ad9b7800cf956d", - "address": "0x649c35088bAd6847fF163B15d0e7A00943D7FD40", + "transactionIndex": 2, + "blockNumber": 27132301, + "transactionHash": "0xb63f1d8df57502b4f58552865096a179a74b158ede50c27deff17a6fcb6adb17", + "address": "0x0DC3d6717727FD5a023e41bA8134640ca18f3E48", "topics": ["0x66fd58e82f7b31a2a5c30e0888f3093efe4e111b00cd2b0c31fe014601293aa0"], "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a36ad96441cb931d8dfeaaac97d3fab4b39e590f", - "logIndex": 12, - "blockHash": "0xf1a2ac69f9fbfc2157e069168b0ca9a46480549e21d7e5c709be3fb15589df7f" + "logIndex": 6, + "blockHash": "0xd4fb8336770134ab82a80135f27f86255bfeed6ca616c6c7b8a38a25819d8a32" }, { - "transactionIndex": 5, - "blockNumber": 27104954, - "transactionHash": "0x00847afebb038e883d2e493d8e0dd53315661a1378b772a9d0ad9b7800cf956d", - "address": "0x649c35088bAd6847fF163B15d0e7A00943D7FD40", + "transactionIndex": 2, + "blockNumber": 27132301, + "transactionHash": "0xb63f1d8df57502b4f58552865096a179a74b158ede50c27deff17a6fcb6adb17", + "address": "0x0DC3d6717727FD5a023e41bA8134640ca18f3E48", "topics": ["0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498"], "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 13, - "blockHash": "0xf1a2ac69f9fbfc2157e069168b0ca9a46480549e21d7e5c709be3fb15589df7f" + "logIndex": 7, + "blockHash": "0xd4fb8336770134ab82a80135f27f86255bfeed6ca616c6c7b8a38a25819d8a32" }, { - "transactionIndex": 5, - "blockNumber": 27104954, - "transactionHash": "0x00847afebb038e883d2e493d8e0dd53315661a1378b772a9d0ad9b7800cf956d", - "address": "0x649c35088bAd6847fF163B15d0e7A00943D7FD40", + "transactionIndex": 2, + "blockNumber": 27132301, + "transactionHash": "0xb63f1d8df57502b4f58552865096a179a74b158ede50c27deff17a6fcb6adb17", + "address": "0x0DC3d6717727FD5a023e41bA8134640ca18f3E48", "topics": ["0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f"], "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a78a1df376c3ceebc5fab574fe6eddbbf76fd03e", - "logIndex": 14, - "blockHash": "0xf1a2ac69f9fbfc2157e069168b0ca9a46480549e21d7e5c709be3fb15589df7f" + "logIndex": 8, + "blockHash": "0xd4fb8336770134ab82a80135f27f86255bfeed6ca616c6c7b8a38a25819d8a32" } ], - "blockNumber": 27104954, - "cumulativeGasUsed": "2395016", + "blockNumber": 27132301, + "cumulativeGasUsed": "3399219", "status": 1, "byzantium": true }, "args": [ - "0xcAcDfB7Cba8B0f4b4f6C842f4d19b03EF1453235", + "0xd2048bD9e1D9A515cc57E270D0928B1127348ae1", "0xA78A1Df376c3CEeBC5Fab574fe6EdDbbF76fd03e", "0xc4d66de8000000000000000000000000a36ad96441cb931d8dfeaaac97d3fab4b39e590f" ], diff --git a/deployments/arbitrumsepolia/XVSProxyOFTDest.json b/deployments/arbitrumsepolia/XVSProxyOFTDest.json index e5aa17e..eaeacb0 100644 --- a/deployments/arbitrumsepolia/XVSProxyOFTDest.json +++ b/deployments/arbitrumsepolia/XVSProxyOFTDest.json @@ -1,5 +1,5 @@ { - "address": "0x8A5580d7154F9abb01836655b8594f94719b265C", + "address": "0xE9B66800E63888DE29c4c9131faadbDbDCfae917", "abi": [ { "inputs": [ @@ -1891,66 +1891,66 @@ "type": "function" } ], - "transactionHash": "0xd869f101af2cabc5dea707d49d25380f2e44a9c0988d31d2c9c8662e57151aec", + "transactionHash": "0x2c8ea2c43da6fbfc9ceb99680d2e3ab9ceae078c07ac66c19d98e3575c2431ea", "receipt": { "to": null, "from": "0x638Eb8DFfF094Fd1d52c5A198b44984806C521E5", - "contractAddress": "0x8A5580d7154F9abb01836655b8594f94719b265C", - "transactionIndex": 1, - "gasUsed": "5402923", - "logsBloom": "0x00000000000000000000000200000000000000000004000400800000000000040000000000000000000010000000000008000000000000000000200000000000000000000000000000080000000000000001000020000000000000800000010000000000020000000000000000000800020000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080400000000000000000000000100000000000000010000000040000000000000000000000000000000000000000000000000000000000000000000000000020000000800000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xc9c8255102fae4cb8d12714da1ce03075589b611e50e66ba942e21e005af76b7", - "transactionHash": "0xd869f101af2cabc5dea707d49d25380f2e44a9c0988d31d2c9c8662e57151aec", + "contractAddress": "0xE9B66800E63888DE29c4c9131faadbDbDCfae917", + "transactionIndex": 3, + "gasUsed": "9090719", + "logsBloom": "0x00000000000000000000000200000000000000000000000400800000000000040000000000000000000000000000000008000000000000000000200000000000000000000000000000080000000000000001000020000000000000000000000000000000020000000000000000000800000000000000000000000000800000400000000000000000000000000000000000000000100000000000000000000080400000000000000000080000100000000000002010000000040000000000000000000000000000000000000000000000000000000200000000000000000020000000000000000000000000400000000000000000000000000000000000000000", + "blockHash": "0xd1e95873b5672aabc7655eeac7b98236263e78e84239aaef04b75a308c71efed", + "transactionHash": "0x2c8ea2c43da6fbfc9ceb99680d2e3ab9ceae078c07ac66c19d98e3575c2431ea", "logs": [ { - "transactionIndex": 1, - "blockNumber": 27104908, - "transactionHash": "0xd869f101af2cabc5dea707d49d25380f2e44a9c0988d31d2c9c8662e57151aec", - "address": "0x8A5580d7154F9abb01836655b8594f94719b265C", + "transactionIndex": 3, + "blockNumber": 27132260, + "transactionHash": "0x2c8ea2c43da6fbfc9ceb99680d2e3ab9ceae078c07ac66c19d98e3575c2431ea", + "address": "0xE9B66800E63888DE29c4c9131faadbDbDCfae917", "topics": [ "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x000000000000000000000000638eb8dfff094fd1d52c5a198b44984806c521e5" ], "data": "0x", - "logIndex": 0, - "blockHash": "0xc9c8255102fae4cb8d12714da1ce03075589b611e50e66ba942e21e005af76b7" + "logIndex": 20, + "blockHash": "0xd1e95873b5672aabc7655eeac7b98236263e78e84239aaef04b75a308c71efed" }, { - "transactionIndex": 1, - "blockNumber": 27104908, - "transactionHash": "0xd869f101af2cabc5dea707d49d25380f2e44a9c0988d31d2c9c8662e57151aec", - "address": "0x8A5580d7154F9abb01836655b8594f94719b265C", + "transactionIndex": 3, + "blockNumber": 27132260, + "transactionHash": "0x2c8ea2c43da6fbfc9ceb99680d2e3ab9ceae078c07ac66c19d98e3575c2431ea", + "address": "0xE9B66800E63888DE29c4c9131faadbDbDCfae917", "topics": [ "0x0b673f021ff9a27bbe58f282908695869e130b3103029190387b83650806c2c3", - "0x0000000000000000000000008f377098e488d227e809bd56d30c9fd8388245d3" + "0x00000000000000000000000047fa6e9f717c9eb081c4734ffb5a1ecd70508891" ], "data": "0x", - "logIndex": 1, - "blockHash": "0xc9c8255102fae4cb8d12714da1ce03075589b611e50e66ba942e21e005af76b7" + "logIndex": 21, + "blockHash": "0xd1e95873b5672aabc7655eeac7b98236263e78e84239aaef04b75a308c71efed" }, { - "transactionIndex": 1, - "blockNumber": 27104908, - "transactionHash": "0xd869f101af2cabc5dea707d49d25380f2e44a9c0988d31d2c9c8662e57151aec", - "address": "0x8A5580d7154F9abb01836655b8594f94719b265C", + "transactionIndex": 3, + "blockNumber": 27132260, + "transactionHash": "0x2c8ea2c43da6fbfc9ceb99680d2e3ab9ceae078c07ac66c19d98e3575c2431ea", + "address": "0xE9B66800E63888DE29c4c9131faadbDbDCfae917", "topics": [ "0x05cd89403c6bdeac21c2ff33de395121a31fa1bc2bf3adf4825f1f86e79969dd", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000006708bad042916b47311c8078b29d7f432342102f" ], "data": "0x", - "logIndex": 2, - "blockHash": "0xc9c8255102fae4cb8d12714da1ce03075589b611e50e66ba942e21e005af76b7" + "logIndex": 22, + "blockHash": "0xd1e95873b5672aabc7655eeac7b98236263e78e84239aaef04b75a308c71efed" } ], - "blockNumber": 27104908, - "cumulativeGasUsed": "5402923", + "blockNumber": 27132260, + "cumulativeGasUsed": "10502621", "status": 1, "byzantium": true }, "args": [ - "0x8f377098e488D227e809BD56D30C9Fd8388245D3", + "0x47fA6E9F717c9eB081c4734FfB5a1EcD70508891", 8, "0x6098e96a28E02f27B1e6BD381f870F1C8Bd169d3", "0x6708bAd042916B47311c8078b29d7f432342102F" diff --git a/helpers/deploymentConfig.ts b/helpers/deploymentConfig.ts index 4d9dff5..d4d4e36 100644 --- a/helpers/deploymentConfig.ts +++ b/helpers/deploymentConfig.ts @@ -179,20 +179,20 @@ export const bridgeConfig: BridgeConfig = { }, arbitrumsepolia: { methods: [ - { method: "setMinDstGas(uint16,uint16,uint256)", args: [10231, 0, "300000"] }, - { method: "setMaxDailyLimit(uint16,uint256)", args: [10231, "50000000000000000000000"] }, - { method: "setMaxSingleTransactionLimit(uint16,uint256)", args: [10231, "10000000000000000000000"] }, - { method: "setMaxDailyReceiveLimit(uint16,uint256)", args: [10231, "50000000000000000000000"] }, - { method: "setMaxSingleReceiveTransactionLimit(uint16,uint256)", args: [10231, "10000000000000000000000"] }, + { method: "setMinDstGas(uint16,uint16,uint256)", args: [10102, 0, "300000"] }, + { method: "setMaxDailyLimit(uint16,uint256)", args: [10102, "50000000000000000000000"] }, + { method: "setMaxSingleTransactionLimit(uint16,uint256)", args: [10102, "10000000000000000000000"] }, + { method: "setMaxDailyReceiveLimit(uint16,uint256)", args: [10102, "50000000000000000000000"] }, + { method: "setMaxSingleReceiveTransactionLimit(uint16,uint256)", args: [10102, "10000000000000000000000"] }, ], }, arbitrumone: { methods: [ - { method: "setMinDstGas(uint16,uint16,uint256)", args: [110, 0, "300000"] }, - { method: "setMaxDailyLimit(uint16,uint256)", args: [110, "50000000000000000000000"] }, - { method: "setMaxSingleTransactionLimit(uint16,uint256)", args: [110, "10000000000000000000000"] }, - { method: "setMaxDailyReceiveLimit(uint16,uint256)", args: [110, "50000000000000000000000"] }, - { method: "setMaxSingleReceiveTransactionLimit(uint16,uint256)", args: [110, "10000000000000000000000"] }, + { method: "setMinDstGas(uint16,uint16,uint256)", args: [102, 0, "300000"] }, + { method: "setMaxDailyLimit(uint16,uint256)", args: [102, "50000000000000000000000"] }, + { method: "setMaxSingleTransactionLimit(uint16,uint256)", args: [102, "10000000000000000000000"] }, + { method: "setMaxDailyReceiveLimit(uint16,uint256)", args: [102, "50000000000000000000000"] }, + { method: "setMaxSingleReceiveTransactionLimit(uint16,uint256)", args: [102, "10000000000000000000000"] }, ], }, }; From a763f74f996d4fbc1f805660c8c9c7415409a03a Mon Sep 17 00:00:00 2001 From: Debugger022 Date: Tue, 26 Mar 2024 12:02:15 +0000 Subject: [PATCH 05/12] feat: updating deployment files --- deployments/arbitrumsepolia.json | 10 +++++----- deployments/arbitrumsepolia_addresses.json | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/deployments/arbitrumsepolia.json b/deployments/arbitrumsepolia.json index 2951d2e..f5bb774 100644 --- a/deployments/arbitrumsepolia.json +++ b/deployments/arbitrumsepolia.json @@ -168,7 +168,7 @@ ] }, "XVS": { - "address": "0x8f377098e488D227e809BD56D30C9Fd8388245D3", + "address": "0x47fA6E9F717c9eB081c4734FfB5a1EcD70508891", "abi": [ { "inputs": [ @@ -887,7 +887,7 @@ ] }, "XVSBridgeAdmin": { - "address": "0x649c35088bAd6847fF163B15d0e7A00943D7FD40", + "address": "0x0DC3d6717727FD5a023e41bA8134640ca18f3E48", "abi": [ { "anonymous": false, @@ -1348,7 +1348,7 @@ ] }, "XVSBridgeAdmin_Implementation": { - "address": "0xcAcDfB7Cba8B0f4b4f6C842f4d19b03EF1453235", + "address": "0xd2048bD9e1D9A515cc57E270D0928B1127348ae1", "abi": [ { "inputs": [ @@ -1680,7 +1680,7 @@ ] }, "XVSBridgeAdmin_Proxy": { - "address": "0x649c35088bAd6847fF163B15d0e7A00943D7FD40", + "address": "0x0DC3d6717727FD5a023e41bA8134640ca18f3E48", "abi": [ { "inputs": [ @@ -1829,7 +1829,7 @@ ] }, "XVSProxyOFTDest": { - "address": "0x8A5580d7154F9abb01836655b8594f94719b265C", + "address": "0xE9B66800E63888DE29c4c9131faadbDbDCfae917", "abi": [ { "inputs": [ diff --git a/deployments/arbitrumsepolia_addresses.json b/deployments/arbitrumsepolia_addresses.json index 17b19d7..f895629 100644 --- a/deployments/arbitrumsepolia_addresses.json +++ b/deployments/arbitrumsepolia_addresses.json @@ -3,10 +3,10 @@ "chainId": "421614", "addresses": { "DefaultProxyAdmin": "0xA78A1Df376c3CEeBC5Fab574fe6EdDbbF76fd03e", - "XVS": "0x8f377098e488D227e809BD56D30C9Fd8388245D3", - "XVSBridgeAdmin": "0x649c35088bAd6847fF163B15d0e7A00943D7FD40", - "XVSBridgeAdmin_Implementation": "0xcAcDfB7Cba8B0f4b4f6C842f4d19b03EF1453235", - "XVSBridgeAdmin_Proxy": "0x649c35088bAd6847fF163B15d0e7A00943D7FD40", - "XVSProxyOFTDest": "0x8A5580d7154F9abb01836655b8594f94719b265C" + "XVS": "0x47fA6E9F717c9eB081c4734FfB5a1EcD70508891", + "XVSBridgeAdmin": "0x0DC3d6717727FD5a023e41bA8134640ca18f3E48", + "XVSBridgeAdmin_Implementation": "0xd2048bD9e1D9A515cc57E270D0928B1127348ae1", + "XVSBridgeAdmin_Proxy": "0x0DC3d6717727FD5a023e41bA8134640ca18f3E48", + "XVSProxyOFTDest": "0xE9B66800E63888DE29c4c9131faadbDbDCfae917" } } From c16f8f99ca35ff2a6464a04f369ada4b3e3bf5db Mon Sep 17 00:00:00 2001 From: Debugger022 Date: Wed, 17 Apr 2024 18:26:42 +0530 Subject: [PATCH 06/12] refactor: add bridgeConfig for all networks --- helpers/deploymentConfig.ts | 92 +++++++++++++++---------------------- 1 file changed, 36 insertions(+), 56 deletions(-) diff --git a/helpers/deploymentConfig.ts b/helpers/deploymentConfig.ts index d4d4e36..b55372a 100644 --- a/helpers/deploymentConfig.ts +++ b/helpers/deploymentConfig.ts @@ -1,3 +1,6 @@ +import { BigNumber } from "ethers"; +import { parseUnits } from "ethers/lib/utils"; + export type PreconfiguredAddresses = { [contract: string]: string }; interface BridgeConfig { @@ -6,6 +9,11 @@ interface BridgeConfig { }; } +type MethodEntry = { + method: string; + args: (BigNumber | number)[]; +}; + const SEPOLIA_MULTISIG = "0x94fa6078b6b8a26f0b6edffbe6501b22a10470fb"; const OPBNB_TESTNET_MULTISIG = "0xb15f6EfEbC276A3b9805df81b5FB3D50C2A62BDf"; const OPBNB_MAINNET_MULTISIG = "0xC46796a21a3A9FAB6546aF3434F2eBfFd0604207"; @@ -124,76 +132,28 @@ export const xvsTokenPermissions = ["mint(address,uint256)", "burn(address,uint2 export const bridgeConfig: BridgeConfig = { bsctestnet: { - methods: [ - { method: "setMinDstGas(uint16,uint16,uint256)", args: [10161, 0, "300000"] }, - { method: "setMaxDailyLimit(uint16,uint256)", args: [10161, "50000000000000000000000"] }, - { method: "setMaxSingleTransactionLimit(uint16,uint256)", args: [10161, "10000000000000000000000"] }, - { method: "setMaxDailyReceiveLimit(uint16,uint256)", args: [10161, "50000000000000000000000"] }, - { method: "setMaxSingleReceiveTransactionLimit(uint16,uint256)", args: [10161, "10000000000000000000000"] }, - ], + methods: [...createMethodEntries(10161), ...createMethodEntries(10202), ...createMethodEntries(10231)], }, bscmainnet: { - methods: [ - { method: "setMinDstGas(uint16,uint16,uint256)", args: [101, 0, "300000"] }, - { method: "setMaxDailyLimit(uint16,uint256)", args: [101, "50000000000000000000000"] }, - { method: "setMaxSingleTransactionLimit(uint16,uint256)", args: [101, "10000000000000000000000"] }, - { method: "setMaxDailyReceiveLimit(uint16,uint256)", args: [101, "50000000000000000000000"] }, - { method: "setMaxSingleReceiveTransactionLimit(uint16,uint256)", args: [101, "10000000000000000000000"] }, - ], + methods: [...createMethodEntries(101), ...createMethodEntries(202), ...createMethodEntries(110)], }, sepolia: { - methods: [ - { method: "setMinDstGas(uint16,uint16,uint256)", args: [10102, 0, "300000"] }, - { method: "setMaxDailyLimit(uint16,uint256)", args: [10102, "50000000000000000000000"] }, - { method: "setMaxSingleTransactionLimit(uint16,uint256)", args: [10102, "10000000000000000000000"] }, - { method: "setMaxDailyReceiveLimit(uint16,uint256)", args: [10102, "50000000000000000000000"] }, - { method: "setMaxSingleReceiveTransactionLimit(uint16,uint256)", args: [10102, "10000000000000000000000"] }, - ], + methods: [...createMethodEntries(10102), ...createMethodEntries(10202), ...createMethodEntries(10231)], }, ethereum: { - methods: [ - { method: "setMinDstGas(uint16,uint16,uint256)", args: [102, 0, "300000"] }, - { method: "setMaxDailyLimit(uint16,uint256)", args: [102, "50000000000000000000000"] }, - { method: "setMaxSingleTransactionLimit(uint16,uint256)", args: [102, "10000000000000000000000"] }, - { method: "setMaxDailyReceiveLimit(uint16,uint256)", args: [102, "50000000000000000000000"] }, - { method: "setMaxSingleReceiveTransactionLimit(uint16,uint256)", args: [102, "10000000000000000000000"] }, - ], + methods: [...createMethodEntries(102), ...createMethodEntries(202), ...createMethodEntries(110)], }, opbnbtestnet: { - methods: [ - { method: "setMinDstGas(uint16,uint16,uint256)", args: [10102, 0, "300000"] }, - { method: "setMaxDailyLimit(uint16,uint256)", args: [10102, "50000000000000000000000"] }, - { method: "setMaxSingleTransactionLimit(uint16,uint256)", args: [10102, "10000000000000000000000"] }, - { method: "setMaxDailyReceiveLimit(uint16,uint256)", args: [10102, "50000000000000000000000"] }, - { method: "setMaxSingleReceiveTransactionLimit(uint16,uint256)", args: [10102, "10000000000000000000000"] }, - ], + methods: [...createMethodEntries(10102), ...createMethodEntries(10161), ...createMethodEntries(10231)], }, opbnbmainnet: { - methods: [ - { method: "setMinDstGas(uint16,uint16,uint256)", args: [102, 0, "300000"] }, - { method: "setMaxDailyLimit(uint16,uint256)", args: [102, "50000000000000000000000"] }, - { method: "setMaxSingleTransactionLimit(uint16,uint256)", args: [102, "10000000000000000000000"] }, - { method: "setMaxDailyReceiveLimit(uint16,uint256)", args: [102, "50000000000000000000000"] }, - { method: "setMaxSingleReceiveTransactionLimit(uint16,uint256)", args: [102, "10000000000000000000000"] }, - ], + methods: [...createMethodEntries(102), ...createMethodEntries(101), ...createMethodEntries(110)], }, arbitrumsepolia: { - methods: [ - { method: "setMinDstGas(uint16,uint16,uint256)", args: [10102, 0, "300000"] }, - { method: "setMaxDailyLimit(uint16,uint256)", args: [10102, "50000000000000000000000"] }, - { method: "setMaxSingleTransactionLimit(uint16,uint256)", args: [10102, "10000000000000000000000"] }, - { method: "setMaxDailyReceiveLimit(uint16,uint256)", args: [10102, "50000000000000000000000"] }, - { method: "setMaxSingleReceiveTransactionLimit(uint16,uint256)", args: [10102, "10000000000000000000000"] }, - ], + methods: [...createMethodEntries(10102), ...createMethodEntries(10202), ...createMethodEntries(10231)], }, arbitrumone: { - methods: [ - { method: "setMinDstGas(uint16,uint16,uint256)", args: [102, 0, "300000"] }, - { method: "setMaxDailyLimit(uint16,uint256)", args: [102, "50000000000000000000000"] }, - { method: "setMaxSingleTransactionLimit(uint16,uint256)", args: [102, "10000000000000000000000"] }, - { method: "setMaxDailyReceiveLimit(uint16,uint256)", args: [102, "50000000000000000000000"] }, - { method: "setMaxSingleReceiveTransactionLimit(uint16,uint256)", args: [102, "10000000000000000000000"] }, - ], + methods: [...createMethodEntries(102), ...createMethodEntries(101), ...createMethodEntries(202)], }, }; @@ -219,3 +179,23 @@ export async function getPreConfiguredAddresses(networkName: string): Promise Date: Thu, 18 Apr 2024 11:34:11 +0530 Subject: [PATCH 07/12] fix: chain id for arbitrumsepolia methods --- helpers/deploymentConfig.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helpers/deploymentConfig.ts b/helpers/deploymentConfig.ts index b55372a..02bc379 100644 --- a/helpers/deploymentConfig.ts +++ b/helpers/deploymentConfig.ts @@ -150,7 +150,7 @@ export const bridgeConfig: BridgeConfig = { methods: [...createMethodEntries(102), ...createMethodEntries(101), ...createMethodEntries(110)], }, arbitrumsepolia: { - methods: [...createMethodEntries(10102), ...createMethodEntries(10202), ...createMethodEntries(10231)], + methods: [...createMethodEntries(10102), ...createMethodEntries(10202), ...createMethodEntries(10161)], }, arbitrumone: { methods: [...createMethodEntries(102), ...createMethodEntries(101), ...createMethodEntries(202)], From 2ee72586b7e0741221d4c84ec4543407f0fab748 Mon Sep 17 00:00:00 2001 From: Debugger022 Date: Mon, 22 Apr 2024 11:18:49 +0530 Subject: [PATCH 08/12] chore: add new deployments with new solidity version --- deployments/arbitrumsepolia/XVS.json | 70 ++++---- .../arbitrumsepolia/XVSBridgeAdmin.json | 74 ++++----- .../XVSBridgeAdmin_Implementation.json | 67 ++++---- .../arbitrumsepolia/XVSBridgeAdmin_Proxy.json | 72 ++++----- .../arbitrumsepolia/XVSProxyOFTDest.json | 114 +++++++------ .../15770bc3af16acbd95d8914f14cae6d7.json | 151 ++++++++++++++++++ ... => c5caaaafd4ca2aaf0d7d76349c623fb6.json} | 50 ++---- hardhat.config.ts | 4 + 8 files changed, 382 insertions(+), 220 deletions(-) create mode 100644 deployments/arbitrumsepolia/solcInputs/15770bc3af16acbd95d8914f14cae6d7.json rename deployments/arbitrumsepolia/solcInputs/{f2046c3ab03975d1be43bca1cf657398.json => c5caaaafd4ca2aaf0d7d76349c623fb6.json} (77%) diff --git a/deployments/arbitrumsepolia/XVS.json b/deployments/arbitrumsepolia/XVS.json index a48fc03..f03ffc7 100644 --- a/deployments/arbitrumsepolia/XVS.json +++ b/deployments/arbitrumsepolia/XVS.json @@ -1,5 +1,5 @@ { - "address": "0x47fA6E9F717c9eB081c4734FfB5a1EcD70508891", + "address": "0x877Dc896e7b13096D3827872e396927BbE704407", "abi": [ { "inputs": [ @@ -716,22 +716,22 @@ "type": "function" } ], - "transactionHash": "0x8f6f0164031904dac588c17a82a178bf480d95a4054ac385fccffda339d93356", + "transactionHash": "0xc7ba0dc4ae1b4577981fbacdacf8700d30bed0180d3055994ef32abe98945425", "receipt": { "to": null, "from": "0x638Eb8DFfF094Fd1d52c5A198b44984806C521E5", - "contractAddress": "0x47fA6E9F717c9eB081c4734FfB5a1EcD70508891", + "contractAddress": "0x877Dc896e7b13096D3827872e396927BbE704407", "transactionIndex": 1, - "gasUsed": "2883252", - "logsBloom": "0x00000000000000000000000200000000000000000000000400800000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001004000000000000000000000000000000000020000000000000000000800000000000000000000000000000000400000800000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x588eec9e1599140a788294fd42247c4347f91fa5a24ba98a1e8397af7fe2ac84", - "transactionHash": "0x8f6f0164031904dac588c17a82a178bf480d95a4054ac385fccffda339d93356", + "gasUsed": "1442332", + "logsBloom": "0x00000000008000000000000200000000000000000000000400800000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000010000000000000000000020000000000000000000800000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080020000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xadf70ec3fe01bb630008ec822af3505af4902fea385fc549f4f9c5ae05d9cf8e", + "transactionHash": "0xc7ba0dc4ae1b4577981fbacdacf8700d30bed0180d3055994ef32abe98945425", "logs": [ { "transactionIndex": 1, - "blockNumber": 27132235, - "transactionHash": "0x8f6f0164031904dac588c17a82a178bf480d95a4054ac385fccffda339d93356", - "address": "0x47fA6E9F717c9eB081c4734FfB5a1EcD70508891", + "blockNumber": 36234761, + "transactionHash": "0xc7ba0dc4ae1b4577981fbacdacf8700d30bed0180d3055994ef32abe98945425", + "address": "0x877Dc896e7b13096D3827872e396927BbE704407", "topics": [ "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", "0x0000000000000000000000000000000000000000000000000000000000000000", @@ -739,22 +739,36 @@ ], "data": "0x", "logIndex": 0, - "blockHash": "0x588eec9e1599140a788294fd42247c4347f91fa5a24ba98a1e8397af7fe2ac84" + "blockHash": "0xadf70ec3fe01bb630008ec822af3505af4902fea385fc549f4f9c5ae05d9cf8e" } ], - "blockNumber": 27132235, - "cumulativeGasUsed": "2883252", + "blockNumber": 36234761, + "cumulativeGasUsed": "1442332", "status": 1, "byzantium": true }, "args": ["0xa36AD96441cB931D8dFEAAaC97D3FaB4B39E590F"], "numDeployments": 1, - "solcInputHash": "f2046c3ab03975d1be43bca1cf657398", - "metadata": "{\"compiler\":{\"version\":\"0.8.13+commit.abaa5c0e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"accessControlManager_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"}],\"name\":\"AccountBlacklisted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"AddressesMustDiffer\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MintLimitExceed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MintedAmountExceed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NewCapNotGreaterThanMintedTokens\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Unauthorized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddressNotAllowed\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"value\",\"type\":\"bool\"}],\"name\":\"BlacklistUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"minter\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"MintCapChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"minter\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newLimit\",\"type\":\"uint256\"}],\"name\":\"MintLimitDecreased\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"minter\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newLimit\",\"type\":\"uint256\"}],\"name\":\"MintLimitIncreased\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"source\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"}],\"name\":\"MintedTokensMigrated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"oldAccessControlManager\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newAccessControlManager\",\"type\":\"address\"}],\"name\":\"NewAccessControlManager\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"accessControlManager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account_\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount_\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user_\",\"type\":\"address\"}],\"name\":\"isBlackListed\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"source_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"destination_\",\"type\":\"address\"}],\"name\":\"migrateMinterTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account_\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount_\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"minterToCap\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"minterToMintedAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAccessControlAddress_\",\"type\":\"address\"}],\"name\":\"setAccessControlManager\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"minter_\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount_\",\"type\":\"uint256\"}],\"name\":\"setMintCap\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user_\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"value_\",\"type\":\"bool\"}],\"name\":\"updateBlacklist\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Venus\",\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"burn(address,uint256)\":{\"custom:access\":\"Controlled by AccessControlManager.\",\"custom:event\":\"Emits MintLimitIncreased with new available limit.\",\"params\":{\"account_\":\"Address from which tokens be destroyed.\",\"amount_\":\"Amount of tokens to be destroyed.\"}},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the default value returned by this function, unless it's overridden. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.\"},\"isBlackListed(address)\":{\"params\":{\"user_\":\"Address of user to check blacklist status.\"},\"returns\":{\"_0\":\"bool status of blacklist.\"}},\"migrateMinterTokens(address,address)\":{\"custom:access\":\"Controlled by AccessControlManager.\",\"custom:error\":\"MintLimitExceed is thrown when the minting limit exceeds the cap after migration.AddressesMustDiffer is thrown when the source_ and destination_ addresses are the same.\",\"custom:event\":\"Emits MintLimitIncreased and MintLimitDecreased events for 'source' and 'destination'.Emits MintedTokensMigrated.\",\"params\":{\"destination_\":\"Minter address to migrate tokens to.\",\"source_\":\"Minter address to migrate tokens from.\"}},\"mint(address,uint256)\":{\"custom:access\":\"Controlled by AccessControlManager.\",\"custom:error\":\"MintLimitExceed is thrown when minting amount exceeds the maximum cap.\",\"custom:event\":\"Emits MintLimitDecreased with new available limit.\",\"params\":{\"account_\":\"Address to which tokens are assigned.\",\"amount_\":\"Amount of tokens to be assigned.\"}},\"name()\":{\"details\":\"Returns the name of the token.\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"pause()\":{\"custom:access\":\"Controlled by AccessControlManager.\"},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.\"},\"setAccessControlManager(address)\":{\"custom:access\":\"Only owner.\",\"custom:error\":\"ZeroAddressNotAllowed is thrown when newAccessControlAddress_ contract address is zero.\",\"custom:event\":\"Emits NewAccessControlManager.\",\"details\":\"Admin function to set the access control address.\",\"params\":{\"newAccessControlAddress_\":\"New address for the access control.\"}},\"setMintCap(address,uint256)\":{\"custom:access\":\"Controlled by AccessControlManager.\",\"custom:event\":\"Emits MintCapChanged.\",\"params\":{\"amount_\":\"Cap for the minter.\",\"minter_\":\"Minter address.\"}},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `amount`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `amount`. - the caller must have allowance for ``from``'s tokens of at least `amount`.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"unpause()\":{\"custom:access\":\"Controlled by AccessControlManager.\"},\"updateBlacklist(address,bool)\":{\"custom:access\":\"Controlled by AccessControlManager.\",\"custom:event\":\"Emits BlacklistUpdated event.\",\"params\":{\"user_\":\"User address to be affected.\",\"value_\":\"Boolean to toggle value.\"}}},\"title\":\"XVS\",\"version\":1},\"userdoc\":{\"errors\":{\"AccountBlacklisted(address)\":[{\"notice\":\"This error is used to indicate that `mint` `burn` and `transfer` actions are not allowed for the user address.\"}],\"AddressesMustDiffer()\":[{\"notice\":\"This error is used to indicate that the addresses must be different.\"}],\"MintLimitExceed()\":[{\"notice\":\"This error is used to indicate that the minting limit has been exceeded. It is typically thrown when a minting operation would surpass the defined cap.\"}],\"MintedAmountExceed()\":[{\"notice\":\"This error is used to indicate that the minter did not mint the required amount of tokens.\"}],\"NewCapNotGreaterThanMintedTokens()\":[{\"notice\":\"This error is used to indicate that the new cap is greater than the previously minted tokens for the minter.\"}],\"Unauthorized()\":[{\"notice\":\"This error is used to indicate that sender is not allowed to perform this action.\"}],\"ZeroAddressNotAllowed()\":[{\"notice\":\"Thrown if the supplied address is a zero address where it is not allowed\"}]},\"events\":{\"BlacklistUpdated(address,bool)\":{\"notice\":\"Emitted when the blacklist status of a user is updated.\"},\"MintCapChanged(address,uint256)\":{\"notice\":\"Emitted when the minting cap for a minter is changed.\"},\"MintLimitDecreased(address,uint256)\":{\"notice\":\"Emitted when the minting limit for a minter is decreased.\"},\"MintLimitIncreased(address,uint256)\":{\"notice\":\"Emitted when the minting limit for a minter is increased.\"},\"MintedTokensMigrated(address,address)\":{\"notice\":\"Emitted when all minted tokens are migrated from one minter to another.\"},\"NewAccessControlManager(address,address)\":{\"notice\":\"Emitted when the address of the access control manager of the contract is updated.\"}},\"kind\":\"user\",\"methods\":{\"accessControlManager()\":{\"notice\":\"Access control manager contract address.\"},\"burn(address,uint256)\":{\"notice\":\"Destroys `amount_` tokens from `account_`, reducing the total supply. Checks access and eligibility.\"},\"isBlackListed(address)\":{\"notice\":\"Returns the blacklist status of the address.\"},\"migrateMinterTokens(address,address)\":{\"notice\":\"Migrates all minted tokens from one minter to another. This function is useful when we want to permanent take down a bridge.\"},\"mint(address,uint256)\":{\"notice\":\"Creates `amount_` tokens and assigns them to `account_`, increasing the total supply. Checks access and eligibility.\"},\"minterToCap(address)\":{\"notice\":\"A mapping is used to keep track of the maximum amount a minter is permitted to mint.\"},\"minterToMintedAmount(address)\":{\"notice\":\"A Mapping used to keep track of the amount i.e already minted by minter.\"},\"pause()\":{\"notice\":\"Pauses Token\"},\"setAccessControlManager(address)\":{\"notice\":\"Sets the address of the access control manager of this contract.\"},\"setMintCap(address,uint256)\":{\"notice\":\"Sets the minting cap for minter.\"},\"unpause()\":{\"notice\":\"Resumes Token\"},\"updateBlacklist(address,bool)\":{\"notice\":\"Function to update blacklist.\"}},\"notice\":\"XVS contract serves as a customized ERC-20 token with additional minting and burning functionality. It also incorporates access control features provided by the \\\"TokenController\\\" contract to ensure proper governance and restrictions on minting and burning operations.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/Bridge/token/XVS.sol\":\"XVS\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"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\"},\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.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. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby disabling 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\":\"0xba43b97fba0d32eb4254f6a5a297b39a19a247082a02d6e69349e071e2946218\",\"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/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/ERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"./extensions/IERC20Metadata.sol\\\";\\nimport \\\"../../utils/Context.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * The default value of {decimals} is 18. To change this, you should override\\n * this function so it returns a different value.\\n *\\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\\n * instead returning `false` on failure. This behavior is nonetheless\\n * conventional and does not conflict with the expectations of ERC20\\n * applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20 is Context, IERC20, IERC20Metadata {\\n mapping(address => uint256) private _balances;\\n\\n mapping(address => mapping(address => uint256)) private _allowances;\\n\\n uint256 private _totalSupply;\\n\\n string private _name;\\n string private _symbol;\\n\\n /**\\n * @dev Sets the values for {name} and {symbol}.\\n *\\n * All two of these values are immutable: they can only be set once during\\n * construction.\\n */\\n constructor(string memory name_, string memory symbol_) {\\n _name = name_;\\n _symbol = symbol_;\\n }\\n\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() public view virtual override returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev Returns the symbol of the token, usually a shorter version of the\\n * name.\\n */\\n function symbol() public view virtual override returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev Returns the number of decimals used to get its user representation.\\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\\n *\\n * Tokens usually opt for a value of 18, imitating the relationship between\\n * Ether and Wei. This is the default value returned by this function, unless\\n * it's overridden.\\n *\\n * NOTE: This information is only used for _display_ purposes: it in\\n * no way affects any of the arithmetic of the contract, including\\n * {IERC20-balanceOf} and {IERC20-transfer}.\\n */\\n function decimals() public view virtual override returns (uint8) {\\n return 18;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return _balances[account];\\n }\\n\\n /**\\n * @dev See {IERC20-transfer}.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address to, uint256 amount) public virtual override returns (bool) {\\n address owner = _msgSender();\\n _transfer(owner, to, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-allowance}.\\n */\\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n return _allowances[owner][spender];\\n }\\n\\n /**\\n * @dev See {IERC20-approve}.\\n *\\n * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on\\n * `transferFrom`. This is semantically equivalent to an infinite approval.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-transferFrom}.\\n *\\n * Emits an {Approval} event indicating the updated allowance. This is not\\n * required by the EIP. See the note at the beginning of {ERC20}.\\n *\\n * NOTE: Does not update the allowance if the current allowance\\n * is the maximum `uint256`.\\n *\\n * Requirements:\\n *\\n * - `from` and `to` cannot be the zero address.\\n * - `from` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``from``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) {\\n address spender = _msgSender();\\n _spendAllowance(from, spender, amount);\\n _transfer(from, to, amount);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, allowance(owner, spender) + addedValue);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `spender` must have allowance for the caller of at least\\n * `subtractedValue`.\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n address owner = _msgSender();\\n uint256 currentAllowance = allowance(owner, spender);\\n require(currentAllowance >= subtractedValue, \\\"ERC20: decreased allowance below zero\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - subtractedValue);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Moves `amount` of tokens from `from` to `to`.\\n *\\n * This internal function is equivalent to {transfer}, and can be used to\\n * e.g. implement automatic token fees, slashing mechanisms, etc.\\n *\\n * Emits a {Transfer} event.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `from` must have a balance of at least `amount`.\\n */\\n function _transfer(address from, address to, uint256 amount) internal virtual {\\n require(from != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(to != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(from, to, amount);\\n\\n uint256 fromBalance = _balances[from];\\n require(fromBalance >= amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n unchecked {\\n _balances[from] = fromBalance - amount;\\n // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by\\n // decrementing then incrementing.\\n _balances[to] += amount;\\n }\\n\\n emit Transfer(from, to, amount);\\n\\n _afterTokenTransfer(from, to, amount);\\n }\\n\\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n * the total supply.\\n *\\n * Emits a {Transfer} event with `from` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function _mint(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: mint to the zero address\\\");\\n\\n _beforeTokenTransfer(address(0), account, amount);\\n\\n _totalSupply += amount;\\n unchecked {\\n // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.\\n _balances[account] += amount;\\n }\\n emit Transfer(address(0), account, amount);\\n\\n _afterTokenTransfer(address(0), account, amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, reducing the\\n * total supply.\\n *\\n * Emits a {Transfer} event with `to` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n * - `account` must have at least `amount` tokens.\\n */\\n function _burn(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n uint256 accountBalance = _balances[account];\\n require(accountBalance >= amount, \\\"ERC20: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[account] = accountBalance - amount;\\n // Overflow not possible: amount <= accountBalance <= totalSupply.\\n _totalSupply -= amount;\\n }\\n\\n emit Transfer(account, address(0), amount);\\n\\n _afterTokenTransfer(account, address(0), amount);\\n }\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n *\\n * This internal function is equivalent to `approve`, and can be used to\\n * e.g. set automatic allowances for certain subsystems, etc.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `owner` cannot be the zero address.\\n * - `spender` cannot be the zero address.\\n */\\n function _approve(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the zero address\\\");\\n\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n }\\n\\n /**\\n * @dev Updates `owner` s allowance for `spender` based on spent `amount`.\\n *\\n * Does not update the allowance amount in case of infinite allowance.\\n * Revert if not enough allowance is available.\\n *\\n * Might emit an {Approval} event.\\n */\\n function _spendAllowance(address owner, address spender, uint256 amount) internal virtual {\\n uint256 currentAllowance = allowance(owner, spender);\\n if (currentAllowance != type(uint256).max) {\\n require(currentAllowance >= amount, \\\"ERC20: insufficient allowance\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - amount);\\n }\\n }\\n }\\n\\n /**\\n * @dev Hook that is called before any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * will be transferred to `to`.\\n * - when `from` is zero, `amount` tokens will be minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * has been transferred to `to`.\\n * - when `from` is zero, `amount` tokens have been minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(address from, address to, uint256 amount) internal virtual {}\\n}\\n\",\"keccak256\":\"0xa56ca923f70c1748830700250b19c61b70db9a683516dc5e216694a50445d99c\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the optional metadata functions from the ERC20 standard.\\n *\\n * _Available since v4.1._\\n */\\ninterface IERC20Metadata is IERC20 {\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the symbol of the token.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the decimals places of the token.\\n */\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x8de418a5503946cabe331f35fe242d3201a73f67f77aaeb7110acb1f30423aca\",\"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/governance-contracts/contracts/Governance/IAccessControlManagerV8.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.13;\\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\":\"0x8adbe291d659987faf4de606736227ad9d8e1a0e284a33a6ca12b30ab2a504b2\",\"license\":\"BSD-3-Clause\"},\"@venusprotocol/solidity-utilities/contracts/validators.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.13;\\n\\n/// @notice Thrown if the supplied address is a zero address where it is not allowed\\nerror ZeroAddressNotAllowed();\\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\",\"keccak256\":\"0x909eb76841ebd57d8f53686b76b1a09da7bbbbcddb29510c41674d5aa84c713e\",\"license\":\"BSD-3-Clause\"},\"contracts/Bridge/token/TokenController.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.13;\\nimport { IAccessControlManagerV8 } from \\\"@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV8.sol\\\";\\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\\\";\\n\\n/**\\n * @title TokenController\\n * @author Venus\\n * @notice TokenController contract acts as a governance and access control mechanism,\\n * allowing the owner to manage minting restrictions and blacklist certain addresses to maintain control and security within the token ecosystem.\\n * It provides a flexible framework for token-related operations.\\n */\\n\\ncontract TokenController is Ownable, Pausable {\\n /**\\n * @notice Access control manager contract address.\\n */\\n address public accessControlManager;\\n /**\\n * @notice A Mapping used to keep track of the blacklist status of addresses.\\n */\\n mapping(address => bool) internal _blacklist;\\n /**\\n * @notice A mapping is used to keep track of the maximum amount a minter is permitted to mint.\\n */\\n mapping(address => uint256) public minterToCap;\\n /**\\n * @notice A Mapping used to keep track of the amount i.e already minted by minter.\\n */\\n mapping(address => uint256) public minterToMintedAmount;\\n\\n /**\\n * @notice Emitted when the blacklist status of a user is updated.\\n */\\n event BlacklistUpdated(address indexed user, bool value);\\n /**\\n * @notice Emitted when the minting limit for a minter is increased.\\n */\\n event MintLimitIncreased(address indexed minter, uint256 newLimit);\\n /**\\n * @notice Emitted when the minting limit for a minter is decreased.\\n */\\n event MintLimitDecreased(address indexed minter, uint256 newLimit);\\n /**\\n * @notice Emitted when the minting cap for a minter is changed.\\n */\\n event MintCapChanged(address indexed minter, uint256 amount);\\n /**\\n * @notice Emitted when the address of the access control manager of the contract is updated.\\n */\\n event NewAccessControlManager(address indexed oldAccessControlManager, address indexed newAccessControlManager);\\n /**\\n * @notice Emitted when all minted tokens are migrated from one minter to another.\\n */\\n event MintedTokensMigrated(address indexed source, address indexed destination);\\n\\n /**\\n * @notice This error is used to indicate that the minting limit has been exceeded. It is typically thrown when a minting operation would surpass the defined cap.\\n */\\n error MintLimitExceed();\\n /**\\n * @notice This error is used to indicate that `mint` `burn` and `transfer` actions are not allowed for the user address.\\n */\\n error AccountBlacklisted(address user);\\n /**\\n * @notice This error is used to indicate that sender is not allowed to perform this action.\\n */\\n error Unauthorized();\\n /**\\n * @notice This error is used to indicate that the new cap is greater than the previously minted tokens for the minter.\\n */\\n error NewCapNotGreaterThanMintedTokens();\\n /**\\n * @notice This error is used to indicate that the addresses must be different.\\n */\\n error AddressesMustDiffer();\\n /**\\n * @notice This error is used to indicate that the minter did not mint the required amount of tokens.\\n */\\n error MintedAmountExceed();\\n\\n /**\\n * @param accessControlManager_ Address of access control manager contract.\\n * @custom:error ZeroAddressNotAllowed is thrown when accessControlManager contract address is zero.\\n */\\n constructor(address accessControlManager_) {\\n ensureNonzeroAddress(accessControlManager_);\\n accessControlManager = accessControlManager_;\\n }\\n\\n /**\\n * @notice Pauses Token\\n * @custom:access Controlled by AccessControlManager.\\n */\\n function pause() external {\\n _ensureAllowed(\\\"pause()\\\");\\n _pause();\\n }\\n\\n /**\\n * @notice Resumes Token\\n * @custom:access Controlled by AccessControlManager.\\n */\\n function unpause() external {\\n _ensureAllowed(\\\"unpause()\\\");\\n _unpause();\\n }\\n\\n /**\\n * @notice Function to update blacklist.\\n * @param user_ User address to be affected.\\n * @param value_ Boolean to toggle value.\\n * @custom:access Controlled by AccessControlManager.\\n * @custom:event Emits BlacklistUpdated event.\\n */\\n function updateBlacklist(address user_, bool value_) external {\\n _ensureAllowed(\\\"updateBlacklist(address,bool)\\\");\\n _blacklist[user_] = value_;\\n emit BlacklistUpdated(user_, value_);\\n }\\n\\n /**\\n * @notice Sets the minting cap for minter.\\n * @param minter_ Minter address.\\n * @param amount_ Cap for the minter.\\n * @custom:access Controlled by AccessControlManager.\\n * @custom:event Emits MintCapChanged.\\n */\\n function setMintCap(address minter_, uint256 amount_) external {\\n _ensureAllowed(\\\"setMintCap(address,uint256)\\\");\\n\\n if (amount_ < minterToMintedAmount[minter_]) {\\n revert NewCapNotGreaterThanMintedTokens();\\n }\\n\\n minterToCap[minter_] = amount_;\\n emit MintCapChanged(minter_, amount_);\\n }\\n\\n /**\\n * @notice Sets the address of the access control manager of this contract.\\n * @dev Admin function to set the access control address.\\n * @param newAccessControlAddress_ New address for the access control.\\n * @custom:access Only owner.\\n * @custom:event Emits NewAccessControlManager.\\n * @custom:error ZeroAddressNotAllowed is thrown when newAccessControlAddress_ contract address is zero.\\n */\\n function setAccessControlManager(address newAccessControlAddress_) external onlyOwner {\\n ensureNonzeroAddress(newAccessControlAddress_);\\n emit NewAccessControlManager(accessControlManager, newAccessControlAddress_);\\n accessControlManager = newAccessControlAddress_;\\n }\\n\\n /**\\n * @notice Migrates all minted tokens from one minter to another. This function is useful when we want to permanent take down a bridge.\\n * @param source_ Minter address to migrate tokens from.\\n * @param destination_ Minter address to migrate tokens to.\\n * @custom:access Controlled by AccessControlManager.\\n * @custom:error MintLimitExceed is thrown when the minting limit exceeds the cap after migration.\\n * @custom:error AddressesMustDiffer is thrown when the source_ and destination_ addresses are the same.\\n * @custom:event Emits MintLimitIncreased and MintLimitDecreased events for 'source' and 'destination'.\\n * @custom:event Emits MintedTokensMigrated.\\n */\\n function migrateMinterTokens(address source_, address destination_) external {\\n _ensureAllowed(\\\"migrateMinterTokens(address,address)\\\");\\n\\n if (source_ == destination_) {\\n revert AddressesMustDiffer();\\n }\\n\\n uint256 sourceCap = minterToCap[source_];\\n uint256 destinationCap = minterToCap[destination_];\\n\\n uint256 sourceMinted = minterToMintedAmount[source_];\\n uint256 destinationMinted = minterToMintedAmount[destination_];\\n uint256 newDestinationMinted = destinationMinted + sourceMinted;\\n\\n if (newDestinationMinted > destinationCap) {\\n revert MintLimitExceed();\\n }\\n\\n minterToMintedAmount[source_] = 0;\\n minterToMintedAmount[destination_] = newDestinationMinted;\\n uint256 availableLimit;\\n unchecked {\\n availableLimit = destinationCap - newDestinationMinted;\\n }\\n\\n emit MintLimitDecreased(destination_, availableLimit);\\n emit MintLimitIncreased(source_, sourceCap);\\n emit MintedTokensMigrated(source_, destination_);\\n }\\n\\n /**\\n * @notice Returns the blacklist status of the address.\\n * @param user_ Address of user to check blacklist status.\\n * @return bool status of blacklist.\\n */\\n function isBlackListed(address user_) external view returns (bool) {\\n return _blacklist[user_];\\n }\\n\\n /**\\n * @dev Checks the minter cap and eligibility of receiver to receive tokens.\\n * @param from_ Minter address.\\n * @param to_ Receiver address.\\n * @param amount_ Amount to be mint.\\n * @custom:error MintLimitExceed is thrown when minting limit exceeds the cap.\\n * @custom:event Emits MintLimitDecreased with minter address and available limits.\\n */\\n function _isEligibleToMint(address from_, address to_, uint256 amount_) internal {\\n uint256 mintingCap = minterToCap[from_];\\n uint256 totalMintedOld = minterToMintedAmount[from_];\\n uint256 totalMintedNew = totalMintedOld + amount_;\\n\\n if (totalMintedNew > mintingCap) {\\n revert MintLimitExceed();\\n }\\n minterToMintedAmount[from_] = totalMintedNew;\\n uint256 availableLimit;\\n unchecked {\\n availableLimit = mintingCap - totalMintedNew;\\n }\\n emit MintLimitDecreased(from_, availableLimit);\\n }\\n\\n /**\\n * @dev This is post hook of burn function, increases minting limit of the minter.\\n * @param from_ Minter address.\\n * @param amount_ Amount burned.\\n * @custom:error MintedAmountExceed is thrown when `amount_` is greater than the tokens minted by `from_`.\\n * @custom:event Emits MintLimitIncreased with minter address and availabe limit.\\n */\\n function _increaseMintLimit(address from_, uint256 amount_) internal {\\n uint256 totalMintedOld = minterToMintedAmount[from_];\\n\\n if (totalMintedOld < amount_) {\\n revert MintedAmountExceed();\\n }\\n\\n uint256 totalMintedNew;\\n unchecked {\\n totalMintedNew = totalMintedOld - amount_;\\n }\\n minterToMintedAmount[from_] = totalMintedNew;\\n uint256 availableLimit = minterToCap[from_] - totalMintedNew;\\n emit MintLimitIncreased(from_, availableLimit);\\n }\\n\\n /**\\n * @dev Checks the caller is allowed to call the specified fuction.\\n * @param functionSig_ Function signatureon which access is to be checked.\\n * @custom:error Unauthorized, thrown when unauthorised user try to access function.\\n */\\n function _ensureAllowed(string memory functionSig_) internal view {\\n if (!IAccessControlManagerV8(accessControlManager).isAllowedToCall(msg.sender, functionSig_)) {\\n revert Unauthorized();\\n }\\n }\\n}\\n\",\"keccak256\":\"0xc17ede791bb2160af4c2741f0d80a7340ab8352cb32581beb1d05a2a6a24ac71\",\"license\":\"BSD-3-Clause\"},\"contracts/Bridge/token/XVS.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.13;\\n\\nimport { ERC20 } from \\\"@openzeppelin/contracts/token/ERC20/ERC20.sol\\\";\\n\\nimport { TokenController } from \\\"./TokenController.sol\\\";\\n\\n/**\\n * @title XVS\\n * @author Venus\\n * @notice XVS contract serves as a customized ERC-20 token with additional minting and burning functionality.\\n * It also incorporates access control features provided by the \\\"TokenController\\\" contract to ensure proper governance and restrictions on minting and burning operations.\\n */\\n\\ncontract XVS is ERC20, TokenController {\\n constructor(address accessControlManager_) ERC20(\\\"Venus XVS\\\", \\\"XVS\\\") TokenController(accessControlManager_) {}\\n\\n /**\\n * @notice Creates `amount_` tokens and assigns them to `account_`, increasing\\n * the total supply. Checks access and eligibility.\\n * @param account_ Address to which tokens are assigned.\\n * @param amount_ Amount of tokens to be assigned.\\n * @custom:access Controlled by AccessControlManager.\\n * @custom:event Emits MintLimitDecreased with new available limit.\\n * @custom:error MintLimitExceed is thrown when minting amount exceeds the maximum cap.\\n */\\n function mint(address account_, uint256 amount_) external whenNotPaused {\\n _ensureAllowed(\\\"mint(address,uint256)\\\");\\n _isEligibleToMint(msg.sender, account_, amount_);\\n _mint(account_, amount_);\\n }\\n\\n /**\\n * @notice Destroys `amount_` tokens from `account_`, reducing the\\n * total supply. Checks access and eligibility.\\n * @param account_ Address from which tokens be destroyed.\\n * @param amount_ Amount of tokens to be destroyed.\\n * @custom:access Controlled by AccessControlManager.\\n * @custom:event Emits MintLimitIncreased with new available limit.\\n */\\n function burn(address account_, uint256 amount_) external whenNotPaused {\\n _ensureAllowed(\\\"burn(address,uint256)\\\");\\n _burn(account_, amount_);\\n _increaseMintLimit(msg.sender, amount_);\\n }\\n\\n /**\\n * @notice Hook that is called before any transfer of tokens. This includes\\n * minting and burning.\\n * @param from_ Address of account from which tokens are to be transferred.\\n * @param to_ Address of the account to which tokens are to be transferred.\\n * @param amount_ The amount of tokens to be transferred.\\n * @custom:error AccountBlacklisted is thrown when either `from` or `to` address is blacklisted.\\n */\\n function _beforeTokenTransfer(address from_, address to_, uint256 amount_) internal override whenNotPaused {\\n if (_blacklist[to_]) {\\n revert AccountBlacklisted(to_);\\n }\\n if (_blacklist[from_]) {\\n revert AccountBlacklisted(from_);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf26fd5d1197124598105b0b2c6d3e260cb7d3e73ba07ad9dcf81f5c027075962\",\"license\":\"BSD-3-Clause\"}},\"version\":1}", - "bytecode": "0x60806040523480156200001157600080fd5b50604051620019e4380380620019e483398101604081905262000034916200021b565b604080518082018252600981526856656e75732058565360b81b6020808301918252835180850190945260038085526258565360e81b91850191909152825185949262000082929162000175565b5080516200009890600490602084019062000175565b505050620000b5620000af620000f460201b60201c565b620000f8565b6005805460ff60a01b19169055620000cd816200014a565b600680546001600160a01b0319166001600160a01b03929092169190911790555062000289565b3390565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b03811662000172576040516342bcdf7f60e11b815260040160405180910390fd5b50565b82805462000183906200024d565b90600052602060002090601f016020900481019282620001a75760008555620001f2565b82601f10620001c257805160ff1916838001178555620001f2565b82800160010185558215620001f2579182015b82811115620001f2578251825591602001919060010190620001d5565b506200020092915062000204565b5090565b5b8082111562000200576000815560010162000205565b6000602082840312156200022e57600080fd5b81516001600160a01b03811681146200024657600080fd5b9392505050565b600181811c908216806200026257607f821691505b6020821081036200028357634e487b7160e01b600052602260045260246000fd5b50919050565b61174b80620002996000396000f3fe608060405234801561001057600080fd5b50600436106101a95760003560e01c80637b517334116100f9578063a9059cbb11610097578063d89e2dac11610071578063d89e2dac14610390578063dd62ed3e146103a3578063e47d6060146103b6578063f2fde38b146103e257600080fd5b8063a9059cbb14610357578063b4a0bdf31461036a578063c06abe771461037d57600080fd5b80639155e083116100d35780639155e0831461031657806395d89b41146103295780639dc29fac14610331578063a457c2d71461034457600080fd5b80637b517334146102c95780638456cb59146102e95780638da5cb5b146102f157600080fd5b8063391efe121161016657806340c10f191161014057806340c10f19146102735780635c975abb1461028657806370a0823114610298578063715018a6146102c157600080fd5b8063391efe121461023857806339509351146102585780633f4ba83a1461026b57600080fd5b806306fdde03146101ae578063095ea7b3146101cc5780630e32cb86146101ef57806318160ddd1461020457806323b872dd14610216578063313ce56714610229575b600080fd5b6101b66103f5565b6040516101c391906114fa565b60405180910390f35b6101df6101da366004611530565b610487565b60405190151581526020016101c3565b6102026101fd36600461155a565b61049f565b005b6002545b6040519081526020016101c3565b6101df610224366004611575565b61050c565b604051601281526020016101c3565b61020861024636600461155a565b60086020526000908152604090205481565b6101df610266366004611530565b610530565b610202610552565b610202610281366004611530565b610586565b600554600160a01b900460ff166101df565b6102086102a636600461155a565b6001600160a01b031660009081526020819052604090205490565b6102026105dd565b6102086102d736600461155a565b60096020526000908152604090205481565b6102026105ef565b6005546001600160a01b03165b6040516001600160a01b0390911681526020016101c3565b6102026103243660046115bf565b61061f565b6101b66106bd565b61020261033f366004611530565b6106cc565b6101df610352366004611530565b61071e565b6101df610365366004611530565b61079e565b6006546102fe906001600160a01b031681565b61020261038b366004611530565b6107ac565b61020261039e3660046115f6565b610870565b6102086103b13660046115f6565b610a18565b6101df6103c436600461155a565b6001600160a01b031660009081526007602052604090205460ff1690565b6102026103f036600461155a565b610a43565b60606003805461040490611629565b80601f016020809104026020016040519081016040528092919081815260200182805461043090611629565b801561047d5780601f106104525761010080835404028352916020019161047d565b820191906000526020600020905b81548152906001019060200180831161046057829003601f168201915b5050505050905090565b600033610495818585610abc565b5060019392505050565b6104a7610be1565b6104b081610c3b565b6006546040516001600160a01b038084169216907f66fd58e82f7b31a2a5c30e0888f3093efe4e111b00cd2b0c31fe014601293aa090600090a3600680546001600160a01b0319166001600160a01b0392909216919091179055565b60003361051a858285610c62565b610525858585610cdc565b506001949350505050565b6000336104958185856105438383610a18565b61054d9190611679565b610abc565b61057c60405180604001604052806009815260200168756e7061757365282960b81b815250610e8b565b610584610f1a565b565b61058e610f6f565b6105c4604051806040016040528060158152602001746d696e7428616464726573732c75696e743235362960581b815250610e8b565b6105cf338383610fbc565b6105d98282611072565b5050565b6105e5610be1565b610584600061113d565b610617604051806040016040528060078152602001667061757365282960c81b815250610e8b565b61058461118f565b61065d6040518060400160405280601d81526020017f757064617465426c61636b6c69737428616464726573732c626f6f6c29000000815250610e8b565b6001600160a01b038216600081815260076020908152604091829020805460ff191685151590811790915591519182527f6a12b3df6cba4203bd7fd06b816789f87de8c594299aed5717ae070fac781bac91015b60405180910390a25050565b60606004805461040490611629565b6106d4610f6f565b61070a604051806040016040528060158152602001746275726e28616464726573732c75696e743235362960581b815250610e8b565b61071482826111d2565b6105d9338261130d565b6000338161072c8286610a18565b9050838110156107915760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6105258286868403610abc565b600033610495818585610cdc565b6107ea6040518060400160405280601b81526020017f7365744d696e7443617028616464726573732c75696e74323536290000000000815250610e8b565b6001600160a01b0382166000908152600960205260409020548110156108235760405163ce89973d60e01b815260040160405180910390fd5b6001600160a01b03821660008181526008602052604090819020839055517f01a85f4ecff52e70907e25b863010bca98a9458d9f2fe9b3efb4c47d197e6448906106b19084815260200190565b6108916040518060600160405280602481526020016116f260249139610e8b565b806001600160a01b0316826001600160a01b0316036108c3576040516380ae98f560e01b815260040160405180910390fd5b6001600160a01b038083166000818152600860209081526040808320549486168084528184205494845260099092528083205491835282205490916109088383611679565b90508381111561092b57604051634f2dbd1d60e01b815260040160405180910390fd5b6001600160a01b038781166000908152600960209081526040808320839055928916808352918390208490559151838703808252927fbe214d1fa2403a39be9a36c9f4b45125eba30bf27a8b56a619baf00493ad3e61910160405180910390a2876001600160a01b03167f0831a8ba59684daef8a957d2bd2d943e233993771429e9a17b71ddb1cea35cdb876040516109c691815260200190565b60405180910390a2866001600160a01b0316886001600160a01b03167f63ce671e4a37975f0a9e340f6f72320c617a5f728b83e3860b03aa847dc26ebb60405160405180910390a35050505050505050565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b610a4b610be1565b6001600160a01b038116610ab05760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610788565b610ab98161113d565b50565b6001600160a01b038316610b1e5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610788565b6001600160a01b038216610b7f5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610788565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b6005546001600160a01b031633146105845760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610788565b6001600160a01b038116610ab9576040516342bcdf7f60e11b815260040160405180910390fd5b6000610c6e8484610a18565b90506000198114610cd65781811015610cc95760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610788565b610cd68484848403610abc565b50505050565b6001600160a01b038316610d405760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610788565b6001600160a01b038216610da25760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610788565b610dad8383836113cb565b6001600160a01b03831660009081526020819052604090205481811015610e255760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610788565b6001600160a01b03848116600081815260208181526040808320878703905593871680835291849020805487019055925185815290927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3610cd6565b6006546040516318c5e8ab60e01b81526001600160a01b03909116906318c5e8ab90610ebd9033908590600401611691565b602060405180830381865afa158015610eda573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610efe91906116bd565b610ab9576040516282b42960e81b815260040160405180910390fd5b610f2261145d565b6005805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600554600160a01b900460ff16156105845760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610788565b6001600160a01b03831660009081526008602090815260408083205460099092528220549091610fec8483611679565b90508281111561100f57604051634f2dbd1d60e01b815260040160405180910390fd5b6001600160a01b038616600081815260096020526040908190208390555182850391907fbe214d1fa2403a39be9a36c9f4b45125eba30bf27a8b56a619baf00493ad3e61906110619084815260200190565b60405180910390a250505050505050565b6001600160a01b0382166110c85760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610788565b6110d4600083836113cb565b80600260008282546110e69190611679565b90915550506001600160a01b038216600081815260208181526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b611197610f6f565b6005805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610f523390565b6001600160a01b0382166112325760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610788565b61123e826000836113cb565b6001600160a01b038216600090815260208190526040902054818110156112b25760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610788565b6001600160a01b0383166000818152602081815260408083208686039055600280548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9101610bd4565b505050565b6001600160a01b03821660009081526009602052604090205481811015611347576040516348af2f2960e11b815260040160405180910390fd5b6001600160a01b038316600090815260096020908152604080832085850390819055600890925282205490919061137f9083906116da565b9050846001600160a01b03167f0831a8ba59684daef8a957d2bd2d943e233993771429e9a17b71ddb1cea35cdb826040516113bc91815260200190565b60405180910390a25050505050565b6113d3610f6f565b6001600160a01b03821660009081526007602052604090205460ff16156114185760405163571f7b4960e01b81526001600160a01b0383166004820152602401610788565b6001600160a01b03831660009081526007602052604090205460ff16156113085760405163571f7b4960e01b81526001600160a01b0384166004820152602401610788565b600554600160a01b900460ff166105845760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610788565b6000815180845260005b818110156114d3576020818501810151868301820152016114b7565b818111156114e5576000602083870101525b50601f01601f19169290920160200192915050565b60208152600061150d60208301846114ad565b9392505050565b80356001600160a01b038116811461152b57600080fd5b919050565b6000806040838503121561154357600080fd5b61154c83611514565b946020939093013593505050565b60006020828403121561156c57600080fd5b61150d82611514565b60008060006060848603121561158a57600080fd5b61159384611514565b92506115a160208501611514565b9150604084013590509250925092565b8015158114610ab957600080fd5b600080604083850312156115d257600080fd5b6115db83611514565b915060208301356115eb816115b1565b809150509250929050565b6000806040838503121561160957600080fd5b61161283611514565b915061162060208401611514565b90509250929050565b600181811c9082168061163d57607f821691505b60208210810361165d57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b6000821982111561168c5761168c611663565b500190565b6001600160a01b03831681526040602082018190526000906116b5908301846114ad565b949350505050565b6000602082840312156116cf57600080fd5b815161150d816115b1565b6000828210156116ec576116ec611663565b50039056fe6d6967726174654d696e746572546f6b656e7328616464726573732c6164647265737329a26469706673582212202dd502ad7f111f919097342862e006098fd7d7236fbb113e5b8a2648ff94916664736f6c634300080d0033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101a95760003560e01c80637b517334116100f9578063a9059cbb11610097578063d89e2dac11610071578063d89e2dac14610390578063dd62ed3e146103a3578063e47d6060146103b6578063f2fde38b146103e257600080fd5b8063a9059cbb14610357578063b4a0bdf31461036a578063c06abe771461037d57600080fd5b80639155e083116100d35780639155e0831461031657806395d89b41146103295780639dc29fac14610331578063a457c2d71461034457600080fd5b80637b517334146102c95780638456cb59146102e95780638da5cb5b146102f157600080fd5b8063391efe121161016657806340c10f191161014057806340c10f19146102735780635c975abb1461028657806370a0823114610298578063715018a6146102c157600080fd5b8063391efe121461023857806339509351146102585780633f4ba83a1461026b57600080fd5b806306fdde03146101ae578063095ea7b3146101cc5780630e32cb86146101ef57806318160ddd1461020457806323b872dd14610216578063313ce56714610229575b600080fd5b6101b66103f5565b6040516101c391906114fa565b60405180910390f35b6101df6101da366004611530565b610487565b60405190151581526020016101c3565b6102026101fd36600461155a565b61049f565b005b6002545b6040519081526020016101c3565b6101df610224366004611575565b61050c565b604051601281526020016101c3565b61020861024636600461155a565b60086020526000908152604090205481565b6101df610266366004611530565b610530565b610202610552565b610202610281366004611530565b610586565b600554600160a01b900460ff166101df565b6102086102a636600461155a565b6001600160a01b031660009081526020819052604090205490565b6102026105dd565b6102086102d736600461155a565b60096020526000908152604090205481565b6102026105ef565b6005546001600160a01b03165b6040516001600160a01b0390911681526020016101c3565b6102026103243660046115bf565b61061f565b6101b66106bd565b61020261033f366004611530565b6106cc565b6101df610352366004611530565b61071e565b6101df610365366004611530565b61079e565b6006546102fe906001600160a01b031681565b61020261038b366004611530565b6107ac565b61020261039e3660046115f6565b610870565b6102086103b13660046115f6565b610a18565b6101df6103c436600461155a565b6001600160a01b031660009081526007602052604090205460ff1690565b6102026103f036600461155a565b610a43565b60606003805461040490611629565b80601f016020809104026020016040519081016040528092919081815260200182805461043090611629565b801561047d5780601f106104525761010080835404028352916020019161047d565b820191906000526020600020905b81548152906001019060200180831161046057829003601f168201915b5050505050905090565b600033610495818585610abc565b5060019392505050565b6104a7610be1565b6104b081610c3b565b6006546040516001600160a01b038084169216907f66fd58e82f7b31a2a5c30e0888f3093efe4e111b00cd2b0c31fe014601293aa090600090a3600680546001600160a01b0319166001600160a01b0392909216919091179055565b60003361051a858285610c62565b610525858585610cdc565b506001949350505050565b6000336104958185856105438383610a18565b61054d9190611679565b610abc565b61057c60405180604001604052806009815260200168756e7061757365282960b81b815250610e8b565b610584610f1a565b565b61058e610f6f565b6105c4604051806040016040528060158152602001746d696e7428616464726573732c75696e743235362960581b815250610e8b565b6105cf338383610fbc565b6105d98282611072565b5050565b6105e5610be1565b610584600061113d565b610617604051806040016040528060078152602001667061757365282960c81b815250610e8b565b61058461118f565b61065d6040518060400160405280601d81526020017f757064617465426c61636b6c69737428616464726573732c626f6f6c29000000815250610e8b565b6001600160a01b038216600081815260076020908152604091829020805460ff191685151590811790915591519182527f6a12b3df6cba4203bd7fd06b816789f87de8c594299aed5717ae070fac781bac91015b60405180910390a25050565b60606004805461040490611629565b6106d4610f6f565b61070a604051806040016040528060158152602001746275726e28616464726573732c75696e743235362960581b815250610e8b565b61071482826111d2565b6105d9338261130d565b6000338161072c8286610a18565b9050838110156107915760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6105258286868403610abc565b600033610495818585610cdc565b6107ea6040518060400160405280601b81526020017f7365744d696e7443617028616464726573732c75696e74323536290000000000815250610e8b565b6001600160a01b0382166000908152600960205260409020548110156108235760405163ce89973d60e01b815260040160405180910390fd5b6001600160a01b03821660008181526008602052604090819020839055517f01a85f4ecff52e70907e25b863010bca98a9458d9f2fe9b3efb4c47d197e6448906106b19084815260200190565b6108916040518060600160405280602481526020016116f260249139610e8b565b806001600160a01b0316826001600160a01b0316036108c3576040516380ae98f560e01b815260040160405180910390fd5b6001600160a01b038083166000818152600860209081526040808320549486168084528184205494845260099092528083205491835282205490916109088383611679565b90508381111561092b57604051634f2dbd1d60e01b815260040160405180910390fd5b6001600160a01b038781166000908152600960209081526040808320839055928916808352918390208490559151838703808252927fbe214d1fa2403a39be9a36c9f4b45125eba30bf27a8b56a619baf00493ad3e61910160405180910390a2876001600160a01b03167f0831a8ba59684daef8a957d2bd2d943e233993771429e9a17b71ddb1cea35cdb876040516109c691815260200190565b60405180910390a2866001600160a01b0316886001600160a01b03167f63ce671e4a37975f0a9e340f6f72320c617a5f728b83e3860b03aa847dc26ebb60405160405180910390a35050505050505050565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b610a4b610be1565b6001600160a01b038116610ab05760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610788565b610ab98161113d565b50565b6001600160a01b038316610b1e5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610788565b6001600160a01b038216610b7f5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610788565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b6005546001600160a01b031633146105845760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610788565b6001600160a01b038116610ab9576040516342bcdf7f60e11b815260040160405180910390fd5b6000610c6e8484610a18565b90506000198114610cd65781811015610cc95760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610788565b610cd68484848403610abc565b50505050565b6001600160a01b038316610d405760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610788565b6001600160a01b038216610da25760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610788565b610dad8383836113cb565b6001600160a01b03831660009081526020819052604090205481811015610e255760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610788565b6001600160a01b03848116600081815260208181526040808320878703905593871680835291849020805487019055925185815290927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3610cd6565b6006546040516318c5e8ab60e01b81526001600160a01b03909116906318c5e8ab90610ebd9033908590600401611691565b602060405180830381865afa158015610eda573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610efe91906116bd565b610ab9576040516282b42960e81b815260040160405180910390fd5b610f2261145d565b6005805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600554600160a01b900460ff16156105845760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610788565b6001600160a01b03831660009081526008602090815260408083205460099092528220549091610fec8483611679565b90508281111561100f57604051634f2dbd1d60e01b815260040160405180910390fd5b6001600160a01b038616600081815260096020526040908190208390555182850391907fbe214d1fa2403a39be9a36c9f4b45125eba30bf27a8b56a619baf00493ad3e61906110619084815260200190565b60405180910390a250505050505050565b6001600160a01b0382166110c85760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610788565b6110d4600083836113cb565b80600260008282546110e69190611679565b90915550506001600160a01b038216600081815260208181526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b611197610f6f565b6005805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610f523390565b6001600160a01b0382166112325760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610788565b61123e826000836113cb565b6001600160a01b038216600090815260208190526040902054818110156112b25760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610788565b6001600160a01b0383166000818152602081815260408083208686039055600280548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9101610bd4565b505050565b6001600160a01b03821660009081526009602052604090205481811015611347576040516348af2f2960e11b815260040160405180910390fd5b6001600160a01b038316600090815260096020908152604080832085850390819055600890925282205490919061137f9083906116da565b9050846001600160a01b03167f0831a8ba59684daef8a957d2bd2d943e233993771429e9a17b71ddb1cea35cdb826040516113bc91815260200190565b60405180910390a25050505050565b6113d3610f6f565b6001600160a01b03821660009081526007602052604090205460ff16156114185760405163571f7b4960e01b81526001600160a01b0383166004820152602401610788565b6001600160a01b03831660009081526007602052604090205460ff16156113085760405163571f7b4960e01b81526001600160a01b0384166004820152602401610788565b600554600160a01b900460ff166105845760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610788565b6000815180845260005b818110156114d3576020818501810151868301820152016114b7565b818111156114e5576000602083870101525b50601f01601f19169290920160200192915050565b60208152600061150d60208301846114ad565b9392505050565b80356001600160a01b038116811461152b57600080fd5b919050565b6000806040838503121561154357600080fd5b61154c83611514565b946020939093013593505050565b60006020828403121561156c57600080fd5b61150d82611514565b60008060006060848603121561158a57600080fd5b61159384611514565b92506115a160208501611514565b9150604084013590509250925092565b8015158114610ab957600080fd5b600080604083850312156115d257600080fd5b6115db83611514565b915060208301356115eb816115b1565b809150509250929050565b6000806040838503121561160957600080fd5b61161283611514565b915061162060208401611514565b90509250929050565b600181811c9082168061163d57607f821691505b60208210810361165d57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b6000821982111561168c5761168c611663565b500190565b6001600160a01b03831681526040602082018190526000906116b5908301846114ad565b949350505050565b6000602082840312156116cf57600080fd5b815161150d816115b1565b6000828210156116ec576116ec611663565b50039056fe6d6967726174654d696e746572546f6b656e7328616464726573732c6164647265737329a26469706673582212202dd502ad7f111f919097342862e006098fd7d7236fbb113e5b8a2648ff94916664736f6c634300080d0033", + "solcInputHash": "c5caaaafd4ca2aaf0d7d76349c623fb6", + "metadata": "{\"compiler\":{\"version\":\"0.8.25+commit.b61c2a91\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"accessControlManager_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"}],\"name\":\"AccountBlacklisted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"AddressesMustDiffer\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MintLimitExceed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MintedAmountExceed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NewCapNotGreaterThanMintedTokens\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Unauthorized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddressNotAllowed\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"value\",\"type\":\"bool\"}],\"name\":\"BlacklistUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"minter\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"MintCapChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"minter\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newLimit\",\"type\":\"uint256\"}],\"name\":\"MintLimitDecreased\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"minter\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newLimit\",\"type\":\"uint256\"}],\"name\":\"MintLimitIncreased\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"source\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"}],\"name\":\"MintedTokensMigrated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"oldAccessControlManager\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newAccessControlManager\",\"type\":\"address\"}],\"name\":\"NewAccessControlManager\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"accessControlManager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account_\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount_\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user_\",\"type\":\"address\"}],\"name\":\"isBlackListed\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"source_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"destination_\",\"type\":\"address\"}],\"name\":\"migrateMinterTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account_\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount_\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"minterToCap\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"minterToMintedAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAccessControlAddress_\",\"type\":\"address\"}],\"name\":\"setAccessControlManager\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"minter_\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount_\",\"type\":\"uint256\"}],\"name\":\"setMintCap\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user_\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"value_\",\"type\":\"bool\"}],\"name\":\"updateBlacklist\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Venus\",\"events\":{\"Approval(address,address,uint256)\":{\"details\":\"Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance.\"},\"Paused(address)\":{\"details\":\"Emitted when the pause is triggered by `account`.\"},\"Transfer(address,address,uint256)\":{\"details\":\"Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero.\"},\"Unpaused(address)\":{\"details\":\"Emitted when the pause is lifted by `account`.\"}},\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"burn(address,uint256)\":{\"custom:access\":\"Controlled by AccessControlManager.\",\"custom:event\":\"Emits MintLimitIncreased with new available limit.\",\"params\":{\"account_\":\"Address from which tokens be destroyed.\",\"amount_\":\"Amount of tokens to be destroyed.\"}},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the default value returned by this function, unless it's overridden. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.\"},\"isBlackListed(address)\":{\"params\":{\"user_\":\"Address of user to check blacklist status.\"},\"returns\":{\"_0\":\"bool status of blacklist.\"}},\"migrateMinterTokens(address,address)\":{\"custom:access\":\"Controlled by AccessControlManager.\",\"custom:error\":\"MintLimitExceed is thrown when the minting limit exceeds the cap after migration.AddressesMustDiffer is thrown when the source_ and destination_ addresses are the same.\",\"custom:event\":\"Emits MintLimitIncreased and MintLimitDecreased events for 'source' and 'destination'.Emits MintedTokensMigrated.\",\"params\":{\"destination_\":\"Minter address to migrate tokens to.\",\"source_\":\"Minter address to migrate tokens from.\"}},\"mint(address,uint256)\":{\"custom:access\":\"Controlled by AccessControlManager.\",\"custom:error\":\"MintLimitExceed is thrown when minting amount exceeds the maximum cap.\",\"custom:event\":\"Emits MintLimitDecreased with new available limit.\",\"params\":{\"account_\":\"Address to which tokens are assigned.\",\"amount_\":\"Amount of tokens to be assigned.\"}},\"name()\":{\"details\":\"Returns the name of the token.\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"pause()\":{\"custom:access\":\"Controlled by AccessControlManager.\"},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.\"},\"setAccessControlManager(address)\":{\"custom:access\":\"Only owner.\",\"custom:error\":\"ZeroAddressNotAllowed is thrown when newAccessControlAddress_ contract address is zero.\",\"custom:event\":\"Emits NewAccessControlManager.\",\"details\":\"Admin function to set the access control address.\",\"params\":{\"newAccessControlAddress_\":\"New address for the access control.\"}},\"setMintCap(address,uint256)\":{\"custom:access\":\"Controlled by AccessControlManager.\",\"custom:event\":\"Emits MintCapChanged.\",\"params\":{\"amount_\":\"Cap for the minter.\",\"minter_\":\"Minter address.\"}},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `amount`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `amount`. - the caller must have allowance for ``from``'s tokens of at least `amount`.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"unpause()\":{\"custom:access\":\"Controlled by AccessControlManager.\"},\"updateBlacklist(address,bool)\":{\"custom:access\":\"Controlled by AccessControlManager.\",\"custom:event\":\"Emits BlacklistUpdated event.\",\"params\":{\"user_\":\"User address to be affected.\",\"value_\":\"Boolean to toggle value.\"}}},\"title\":\"XVS\",\"version\":1},\"userdoc\":{\"errors\":{\"AccountBlacklisted(address)\":[{\"notice\":\"This error is used to indicate that `mint` `burn` and `transfer` actions are not allowed for the user address.\"}],\"AddressesMustDiffer()\":[{\"notice\":\"This error is used to indicate that the addresses must be different.\"}],\"MintLimitExceed()\":[{\"notice\":\"This error is used to indicate that the minting limit has been exceeded. It is typically thrown when a minting operation would surpass the defined cap.\"}],\"MintedAmountExceed()\":[{\"notice\":\"This error is used to indicate that the minter did not mint the required amount of tokens.\"}],\"NewCapNotGreaterThanMintedTokens()\":[{\"notice\":\"This error is used to indicate that the new cap is greater than the previously minted tokens for the minter.\"}],\"Unauthorized()\":[{\"notice\":\"This error is used to indicate that sender is not allowed to perform this action.\"}],\"ZeroAddressNotAllowed()\":[{\"notice\":\"Thrown if the supplied address is a zero address where it is not allowed\"}]},\"events\":{\"BlacklistUpdated(address,bool)\":{\"notice\":\"Emitted when the blacklist status of a user is updated.\"},\"MintCapChanged(address,uint256)\":{\"notice\":\"Emitted when the minting cap for a minter is changed.\"},\"MintLimitDecreased(address,uint256)\":{\"notice\":\"Emitted when the minting limit for a minter is decreased.\"},\"MintLimitIncreased(address,uint256)\":{\"notice\":\"Emitted when the minting limit for a minter is increased.\"},\"MintedTokensMigrated(address,address)\":{\"notice\":\"Emitted when all minted tokens are migrated from one minter to another.\"},\"NewAccessControlManager(address,address)\":{\"notice\":\"Emitted when the address of the access control manager of the contract is updated.\"}},\"kind\":\"user\",\"methods\":{\"accessControlManager()\":{\"notice\":\"Access control manager contract address.\"},\"burn(address,uint256)\":{\"notice\":\"Destroys `amount_` tokens from `account_`, reducing the total supply. Checks access and eligibility.\"},\"isBlackListed(address)\":{\"notice\":\"Returns the blacklist status of the address.\"},\"migrateMinterTokens(address,address)\":{\"notice\":\"Migrates all minted tokens from one minter to another. This function is useful when we want to permanent take down a bridge.\"},\"mint(address,uint256)\":{\"notice\":\"Creates `amount_` tokens and assigns them to `account_`, increasing the total supply. Checks access and eligibility.\"},\"minterToCap(address)\":{\"notice\":\"A mapping is used to keep track of the maximum amount a minter is permitted to mint.\"},\"minterToMintedAmount(address)\":{\"notice\":\"A Mapping used to keep track of the amount i.e already minted by minter.\"},\"pause()\":{\"notice\":\"Pauses Token\"},\"setAccessControlManager(address)\":{\"notice\":\"Sets the address of the access control manager of this contract.\"},\"setMintCap(address,uint256)\":{\"notice\":\"Sets the minting cap for minter.\"},\"unpause()\":{\"notice\":\"Resumes Token\"},\"updateBlacklist(address,bool)\":{\"notice\":\"Function to update blacklist.\"}},\"notice\":\"XVS contract serves as a customized ERC-20 token with additional minting and burning functionality. It also incorporates access control features provided by the \\\"TokenController\\\" contract to ensure proper governance and restrictions on minting and burning operations.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/Bridge/token/XVS.sol\":\"XVS\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"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\"},\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.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. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby disabling 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\":\"0xba43b97fba0d32eb4254f6a5a297b39a19a247082a02d6e69349e071e2946218\",\"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/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/ERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"./extensions/IERC20Metadata.sol\\\";\\nimport \\\"../../utils/Context.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * The default value of {decimals} is 18. To change this, you should override\\n * this function so it returns a different value.\\n *\\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\\n * instead returning `false` on failure. This behavior is nonetheless\\n * conventional and does not conflict with the expectations of ERC20\\n * applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20 is Context, IERC20, IERC20Metadata {\\n mapping(address => uint256) private _balances;\\n\\n mapping(address => mapping(address => uint256)) private _allowances;\\n\\n uint256 private _totalSupply;\\n\\n string private _name;\\n string private _symbol;\\n\\n /**\\n * @dev Sets the values for {name} and {symbol}.\\n *\\n * All two of these values are immutable: they can only be set once during\\n * construction.\\n */\\n constructor(string memory name_, string memory symbol_) {\\n _name = name_;\\n _symbol = symbol_;\\n }\\n\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() public view virtual override returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev Returns the symbol of the token, usually a shorter version of the\\n * name.\\n */\\n function symbol() public view virtual override returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev Returns the number of decimals used to get its user representation.\\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\\n *\\n * Tokens usually opt for a value of 18, imitating the relationship between\\n * Ether and Wei. This is the default value returned by this function, unless\\n * it's overridden.\\n *\\n * NOTE: This information is only used for _display_ purposes: it in\\n * no way affects any of the arithmetic of the contract, including\\n * {IERC20-balanceOf} and {IERC20-transfer}.\\n */\\n function decimals() public view virtual override returns (uint8) {\\n return 18;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return _balances[account];\\n }\\n\\n /**\\n * @dev See {IERC20-transfer}.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address to, uint256 amount) public virtual override returns (bool) {\\n address owner = _msgSender();\\n _transfer(owner, to, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-allowance}.\\n */\\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n return _allowances[owner][spender];\\n }\\n\\n /**\\n * @dev See {IERC20-approve}.\\n *\\n * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on\\n * `transferFrom`. This is semantically equivalent to an infinite approval.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-transferFrom}.\\n *\\n * Emits an {Approval} event indicating the updated allowance. This is not\\n * required by the EIP. See the note at the beginning of {ERC20}.\\n *\\n * NOTE: Does not update the allowance if the current allowance\\n * is the maximum `uint256`.\\n *\\n * Requirements:\\n *\\n * - `from` and `to` cannot be the zero address.\\n * - `from` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``from``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) {\\n address spender = _msgSender();\\n _spendAllowance(from, spender, amount);\\n _transfer(from, to, amount);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, allowance(owner, spender) + addedValue);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `spender` must have allowance for the caller of at least\\n * `subtractedValue`.\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n address owner = _msgSender();\\n uint256 currentAllowance = allowance(owner, spender);\\n require(currentAllowance >= subtractedValue, \\\"ERC20: decreased allowance below zero\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - subtractedValue);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Moves `amount` of tokens from `from` to `to`.\\n *\\n * This internal function is equivalent to {transfer}, and can be used to\\n * e.g. implement automatic token fees, slashing mechanisms, etc.\\n *\\n * Emits a {Transfer} event.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `from` must have a balance of at least `amount`.\\n */\\n function _transfer(address from, address to, uint256 amount) internal virtual {\\n require(from != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(to != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(from, to, amount);\\n\\n uint256 fromBalance = _balances[from];\\n require(fromBalance >= amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n unchecked {\\n _balances[from] = fromBalance - amount;\\n // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by\\n // decrementing then incrementing.\\n _balances[to] += amount;\\n }\\n\\n emit Transfer(from, to, amount);\\n\\n _afterTokenTransfer(from, to, amount);\\n }\\n\\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n * the total supply.\\n *\\n * Emits a {Transfer} event with `from` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function _mint(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: mint to the zero address\\\");\\n\\n _beforeTokenTransfer(address(0), account, amount);\\n\\n _totalSupply += amount;\\n unchecked {\\n // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.\\n _balances[account] += amount;\\n }\\n emit Transfer(address(0), account, amount);\\n\\n _afterTokenTransfer(address(0), account, amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, reducing the\\n * total supply.\\n *\\n * Emits a {Transfer} event with `to` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n * - `account` must have at least `amount` tokens.\\n */\\n function _burn(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n uint256 accountBalance = _balances[account];\\n require(accountBalance >= amount, \\\"ERC20: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[account] = accountBalance - amount;\\n // Overflow not possible: amount <= accountBalance <= totalSupply.\\n _totalSupply -= amount;\\n }\\n\\n emit Transfer(account, address(0), amount);\\n\\n _afterTokenTransfer(account, address(0), amount);\\n }\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n *\\n * This internal function is equivalent to `approve`, and can be used to\\n * e.g. set automatic allowances for certain subsystems, etc.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `owner` cannot be the zero address.\\n * - `spender` cannot be the zero address.\\n */\\n function _approve(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the zero address\\\");\\n\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n }\\n\\n /**\\n * @dev Updates `owner` s allowance for `spender` based on spent `amount`.\\n *\\n * Does not update the allowance amount in case of infinite allowance.\\n * Revert if not enough allowance is available.\\n *\\n * Might emit an {Approval} event.\\n */\\n function _spendAllowance(address owner, address spender, uint256 amount) internal virtual {\\n uint256 currentAllowance = allowance(owner, spender);\\n if (currentAllowance != type(uint256).max) {\\n require(currentAllowance >= amount, \\\"ERC20: insufficient allowance\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - amount);\\n }\\n }\\n }\\n\\n /**\\n * @dev Hook that is called before any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * will be transferred to `to`.\\n * - when `from` is zero, `amount` tokens will be minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * has been transferred to `to`.\\n * - when `from` is zero, `amount` tokens have been minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(address from, address to, uint256 amount) internal virtual {}\\n}\\n\",\"keccak256\":\"0xa56ca923f70c1748830700250b19c61b70db9a683516dc5e216694a50445d99c\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the optional metadata functions from the ERC20 standard.\\n *\\n * _Available since v4.1._\\n */\\ninterface IERC20Metadata is IERC20 {\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the symbol of the token.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the decimals places of the token.\\n */\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x8de418a5503946cabe331f35fe242d3201a73f67f77aaeb7110acb1f30423aca\",\"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/governance-contracts/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\"},\"@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/Bridge/token/TokenController.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.25;\\n\\nimport { IAccessControlManagerV8 } from \\\"@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV8.sol\\\";\\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\\\";\\n\\n/**\\n * @title TokenController\\n * @author Venus\\n * @notice TokenController contract acts as a governance and access control mechanism,\\n * allowing the owner to manage minting restrictions and blacklist certain addresses to maintain control and security within the token ecosystem.\\n * It provides a flexible framework for token-related operations.\\n */\\n\\ncontract TokenController is Ownable, Pausable {\\n /**\\n * @notice Access control manager contract address.\\n */\\n address public accessControlManager;\\n /**\\n * @notice A Mapping used to keep track of the blacklist status of addresses.\\n */\\n mapping(address => bool) internal _blacklist;\\n /**\\n * @notice A mapping is used to keep track of the maximum amount a minter is permitted to mint.\\n */\\n mapping(address => uint256) public minterToCap;\\n /**\\n * @notice A Mapping used to keep track of the amount i.e already minted by minter.\\n */\\n mapping(address => uint256) public minterToMintedAmount;\\n\\n /**\\n * @notice Emitted when the blacklist status of a user is updated.\\n */\\n event BlacklistUpdated(address indexed user, bool value);\\n /**\\n * @notice Emitted when the minting limit for a minter is increased.\\n */\\n event MintLimitIncreased(address indexed minter, uint256 newLimit);\\n /**\\n * @notice Emitted when the minting limit for a minter is decreased.\\n */\\n event MintLimitDecreased(address indexed minter, uint256 newLimit);\\n /**\\n * @notice Emitted when the minting cap for a minter is changed.\\n */\\n event MintCapChanged(address indexed minter, uint256 amount);\\n /**\\n * @notice Emitted when the address of the access control manager of the contract is updated.\\n */\\n event NewAccessControlManager(address indexed oldAccessControlManager, address indexed newAccessControlManager);\\n /**\\n * @notice Emitted when all minted tokens are migrated from one minter to another.\\n */\\n event MintedTokensMigrated(address indexed source, address indexed destination);\\n\\n /**\\n * @notice This error is used to indicate that the minting limit has been exceeded. It is typically thrown when a minting operation would surpass the defined cap.\\n */\\n error MintLimitExceed();\\n /**\\n * @notice This error is used to indicate that `mint` `burn` and `transfer` actions are not allowed for the user address.\\n */\\n error AccountBlacklisted(address user);\\n /**\\n * @notice This error is used to indicate that sender is not allowed to perform this action.\\n */\\n error Unauthorized();\\n /**\\n * @notice This error is used to indicate that the new cap is greater than the previously minted tokens for the minter.\\n */\\n error NewCapNotGreaterThanMintedTokens();\\n /**\\n * @notice This error is used to indicate that the addresses must be different.\\n */\\n error AddressesMustDiffer();\\n /**\\n * @notice This error is used to indicate that the minter did not mint the required amount of tokens.\\n */\\n error MintedAmountExceed();\\n\\n /**\\n * @param accessControlManager_ Address of access control manager contract.\\n * @custom:error ZeroAddressNotAllowed is thrown when accessControlManager contract address is zero.\\n */\\n constructor(address accessControlManager_) {\\n ensureNonzeroAddress(accessControlManager_);\\n accessControlManager = accessControlManager_;\\n }\\n\\n /**\\n * @notice Pauses Token\\n * @custom:access Controlled by AccessControlManager.\\n */\\n function pause() external {\\n _ensureAllowed(\\\"pause()\\\");\\n _pause();\\n }\\n\\n /**\\n * @notice Resumes Token\\n * @custom:access Controlled by AccessControlManager.\\n */\\n function unpause() external {\\n _ensureAllowed(\\\"unpause()\\\");\\n _unpause();\\n }\\n\\n /**\\n * @notice Function to update blacklist.\\n * @param user_ User address to be affected.\\n * @param value_ Boolean to toggle value.\\n * @custom:access Controlled by AccessControlManager.\\n * @custom:event Emits BlacklistUpdated event.\\n */\\n function updateBlacklist(address user_, bool value_) external {\\n _ensureAllowed(\\\"updateBlacklist(address,bool)\\\");\\n _blacklist[user_] = value_;\\n emit BlacklistUpdated(user_, value_);\\n }\\n\\n /**\\n * @notice Sets the minting cap for minter.\\n * @param minter_ Minter address.\\n * @param amount_ Cap for the minter.\\n * @custom:access Controlled by AccessControlManager.\\n * @custom:event Emits MintCapChanged.\\n */\\n function setMintCap(address minter_, uint256 amount_) external {\\n _ensureAllowed(\\\"setMintCap(address,uint256)\\\");\\n\\n if (amount_ < minterToMintedAmount[minter_]) {\\n revert NewCapNotGreaterThanMintedTokens();\\n }\\n\\n minterToCap[minter_] = amount_;\\n emit MintCapChanged(minter_, amount_);\\n }\\n\\n /**\\n * @notice Sets the address of the access control manager of this contract.\\n * @dev Admin function to set the access control address.\\n * @param newAccessControlAddress_ New address for the access control.\\n * @custom:access Only owner.\\n * @custom:event Emits NewAccessControlManager.\\n * @custom:error ZeroAddressNotAllowed is thrown when newAccessControlAddress_ contract address is zero.\\n */\\n function setAccessControlManager(address newAccessControlAddress_) external onlyOwner {\\n ensureNonzeroAddress(newAccessControlAddress_);\\n emit NewAccessControlManager(accessControlManager, newAccessControlAddress_);\\n accessControlManager = newAccessControlAddress_;\\n }\\n\\n /**\\n * @notice Migrates all minted tokens from one minter to another. This function is useful when we want to permanent take down a bridge.\\n * @param source_ Minter address to migrate tokens from.\\n * @param destination_ Minter address to migrate tokens to.\\n * @custom:access Controlled by AccessControlManager.\\n * @custom:error MintLimitExceed is thrown when the minting limit exceeds the cap after migration.\\n * @custom:error AddressesMustDiffer is thrown when the source_ and destination_ addresses are the same.\\n * @custom:event Emits MintLimitIncreased and MintLimitDecreased events for 'source' and 'destination'.\\n * @custom:event Emits MintedTokensMigrated.\\n */\\n function migrateMinterTokens(address source_, address destination_) external {\\n _ensureAllowed(\\\"migrateMinterTokens(address,address)\\\");\\n\\n if (source_ == destination_) {\\n revert AddressesMustDiffer();\\n }\\n\\n uint256 sourceCap = minterToCap[source_];\\n uint256 destinationCap = minterToCap[destination_];\\n\\n uint256 sourceMinted = minterToMintedAmount[source_];\\n uint256 destinationMinted = minterToMintedAmount[destination_];\\n uint256 newDestinationMinted = destinationMinted + sourceMinted;\\n\\n if (newDestinationMinted > destinationCap) {\\n revert MintLimitExceed();\\n }\\n\\n minterToMintedAmount[source_] = 0;\\n minterToMintedAmount[destination_] = newDestinationMinted;\\n uint256 availableLimit;\\n unchecked {\\n availableLimit = destinationCap - newDestinationMinted;\\n }\\n\\n emit MintLimitDecreased(destination_, availableLimit);\\n emit MintLimitIncreased(source_, sourceCap);\\n emit MintedTokensMigrated(source_, destination_);\\n }\\n\\n /**\\n * @notice Returns the blacklist status of the address.\\n * @param user_ Address of user to check blacklist status.\\n * @return bool status of blacklist.\\n */\\n function isBlackListed(address user_) external view returns (bool) {\\n return _blacklist[user_];\\n }\\n\\n /**\\n * @dev Checks the minter cap and eligibility of receiver to receive tokens.\\n * @param from_ Minter address.\\n * @param to_ Receiver address.\\n * @param amount_ Amount to be mint.\\n * @custom:error MintLimitExceed is thrown when minting limit exceeds the cap.\\n * @custom:event Emits MintLimitDecreased with minter address and available limits.\\n */\\n function _isEligibleToMint(address from_, address to_, uint256 amount_) internal {\\n uint256 mintingCap = minterToCap[from_];\\n uint256 totalMintedOld = minterToMintedAmount[from_];\\n uint256 totalMintedNew = totalMintedOld + amount_;\\n\\n if (totalMintedNew > mintingCap) {\\n revert MintLimitExceed();\\n }\\n minterToMintedAmount[from_] = totalMintedNew;\\n uint256 availableLimit;\\n unchecked {\\n availableLimit = mintingCap - totalMintedNew;\\n }\\n emit MintLimitDecreased(from_, availableLimit);\\n }\\n\\n /**\\n * @dev This is post hook of burn function, increases minting limit of the minter.\\n * @param from_ Minter address.\\n * @param amount_ Amount burned.\\n * @custom:error MintedAmountExceed is thrown when `amount_` is greater than the tokens minted by `from_`.\\n * @custom:event Emits MintLimitIncreased with minter address and availabe limit.\\n */\\n function _increaseMintLimit(address from_, uint256 amount_) internal {\\n uint256 totalMintedOld = minterToMintedAmount[from_];\\n\\n if (totalMintedOld < amount_) {\\n revert MintedAmountExceed();\\n }\\n\\n uint256 totalMintedNew;\\n unchecked {\\n totalMintedNew = totalMintedOld - amount_;\\n }\\n minterToMintedAmount[from_] = totalMintedNew;\\n uint256 availableLimit = minterToCap[from_] - totalMintedNew;\\n emit MintLimitIncreased(from_, availableLimit);\\n }\\n\\n /**\\n * @dev Checks the caller is allowed to call the specified fuction.\\n * @param functionSig_ Function signatureon which access is to be checked.\\n * @custom:error Unauthorized, thrown when unauthorised user try to access function.\\n */\\n function _ensureAllowed(string memory functionSig_) internal view {\\n if (!IAccessControlManagerV8(accessControlManager).isAllowedToCall(msg.sender, functionSig_)) {\\n revert Unauthorized();\\n }\\n }\\n}\\n\",\"keccak256\":\"0xae9daea7f260ac111e0855fc1f9c904623f3ab8a253fb3b060519a8384f95667\",\"license\":\"BSD-3-Clause\"},\"contracts/Bridge/token/XVS.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.25;\\n\\nimport { ERC20 } from \\\"@openzeppelin/contracts/token/ERC20/ERC20.sol\\\";\\n\\nimport { TokenController } from \\\"./TokenController.sol\\\";\\n\\n/**\\n * @title XVS\\n * @author Venus\\n * @notice XVS contract serves as a customized ERC-20 token with additional minting and burning functionality.\\n * It also incorporates access control features provided by the \\\"TokenController\\\" contract to ensure proper governance and restrictions on minting and burning operations.\\n */\\n\\ncontract XVS is ERC20, TokenController {\\n constructor(address accessControlManager_) ERC20(\\\"Venus XVS\\\", \\\"XVS\\\") TokenController(accessControlManager_) {}\\n\\n /**\\n * @notice Creates `amount_` tokens and assigns them to `account_`, increasing\\n * the total supply. Checks access and eligibility.\\n * @param account_ Address to which tokens are assigned.\\n * @param amount_ Amount of tokens to be assigned.\\n * @custom:access Controlled by AccessControlManager.\\n * @custom:event Emits MintLimitDecreased with new available limit.\\n * @custom:error MintLimitExceed is thrown when minting amount exceeds the maximum cap.\\n */\\n function mint(address account_, uint256 amount_) external whenNotPaused {\\n _ensureAllowed(\\\"mint(address,uint256)\\\");\\n _isEligibleToMint(msg.sender, account_, amount_);\\n _mint(account_, amount_);\\n }\\n\\n /**\\n * @notice Destroys `amount_` tokens from `account_`, reducing the\\n * total supply. Checks access and eligibility.\\n * @param account_ Address from which tokens be destroyed.\\n * @param amount_ Amount of tokens to be destroyed.\\n * @custom:access Controlled by AccessControlManager.\\n * @custom:event Emits MintLimitIncreased with new available limit.\\n */\\n function burn(address account_, uint256 amount_) external whenNotPaused {\\n _ensureAllowed(\\\"burn(address,uint256)\\\");\\n _burn(account_, amount_);\\n _increaseMintLimit(msg.sender, amount_);\\n }\\n\\n /**\\n * @notice Hook that is called before any transfer of tokens. This includes\\n * minting and burning.\\n * @param from_ Address of account from which tokens are to be transferred.\\n * @param to_ Address of the account to which tokens are to be transferred.\\n * @param amount_ The amount of tokens to be transferred.\\n * @custom:error AccountBlacklisted is thrown when either `from` or `to` address is blacklisted.\\n */\\n function _beforeTokenTransfer(address from_, address to_, uint256 amount_) internal override whenNotPaused {\\n if (_blacklist[to_]) {\\n revert AccountBlacklisted(to_);\\n }\\n if (_blacklist[from_]) {\\n revert AccountBlacklisted(from_);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xd268c178725dee5da810df33bb1fae7e118df2773af3aed0acac29582b63ef52\",\"license\":\"BSD-3-Clause\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50604051611a3b380380611a3b83398101604081905261002f9161015f565b806040518060400160405280600981526020016856656e75732058565360b81b8152506040518060400160405280600381526020016258565360e81b815250816003908161007d9190610230565b50600461008a8282610230565b5050506100a361009e6100df60201b60201c565b6100e3565b6005805460ff60a01b191690556100b981610135565b600680546001600160a01b0319166001600160a01b0392909216919091179055506102ef565b3390565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b03811661015c576040516342bcdf7f60e11b815260040160405180910390fd5b50565b60006020828403121561017157600080fd5b81516001600160a01b038116811461018857600080fd5b9392505050565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806101b957607f821691505b6020821081036101d957634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111561022b576000816000526020600020601f850160051c810160208610156102085750805b601f850160051c820191505b8181101561022757828155600101610214565b5050505b505050565b81516001600160401b038111156102495761024961018f565b61025d8161025784546101a5565b846101df565b602080601f831160018114610292576000841561027a5750858301515b600019600386901b1c1916600185901b178555610227565b600085815260208120601f198616915b828110156102c1578886015182559484019460019091019084016102a2565b50858210156102df5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b61173d806102fe6000396000f3fe608060405234801561001057600080fd5b50600436106101a95760003560e01c80637b517334116100f9578063a9059cbb11610097578063d89e2dac11610071578063d89e2dac14610390578063dd62ed3e146103a3578063e47d6060146103b6578063f2fde38b146103e257600080fd5b8063a9059cbb14610357578063b4a0bdf31461036a578063c06abe771461037d57600080fd5b80639155e083116100d35780639155e0831461031657806395d89b41146103295780639dc29fac14610331578063a457c2d71461034457600080fd5b80637b517334146102c95780638456cb59146102e95780638da5cb5b146102f157600080fd5b8063391efe121161016657806340c10f191161014057806340c10f19146102735780635c975abb1461028657806370a0823114610298578063715018a6146102c157600080fd5b8063391efe121461023857806339509351146102585780633f4ba83a1461026b57600080fd5b806306fdde03146101ae578063095ea7b3146101cc5780630e32cb86146101ef57806318160ddd1461020457806323b872dd14610216578063313ce56714610229575b600080fd5b6101b66103f5565b6040516101c391906114f5565b60405180910390f35b6101df6101da36600461152b565b610487565b60405190151581526020016101c3565b6102026101fd366004611555565b6104a1565b005b6002545b6040519081526020016101c3565b6101df610224366004611570565b61050e565b604051601281526020016101c3565b610208610246366004611555565b60086020526000908152604090205481565b6101df61026636600461152b565b610532565b610202610554565b61020261028136600461152b565b610588565b600554600160a01b900460ff166101df565b6102086102a6366004611555565b6001600160a01b031660009081526020819052604090205490565b6102026105df565b6102086102d7366004611555565b60096020526000908152604090205481565b6102026105f1565b6005546001600160a01b03165b6040516001600160a01b0390911681526020016101c3565b6102026103243660046115ba565b610621565b6101b66106bf565b61020261033f36600461152b565b6106ce565b6101df61035236600461152b565b610720565b6101df61036536600461152b565b6107a0565b6006546102fe906001600160a01b031681565b61020261038b36600461152b565b6107ae565b61020261039e3660046115f1565b610872565b6102086103b13660046115f1565b610a1a565b6101df6103c4366004611555565b6001600160a01b031660009081526007602052604090205460ff1690565b6102026103f0366004611555565b610a45565b60606003805461040490611624565b80601f016020809104026020016040519081016040528092919081815260200182805461043090611624565b801561047d5780601f106104525761010080835404028352916020019161047d565b820191906000526020600020905b81548152906001019060200180831161046057829003601f168201915b5050505050905090565b600033610495818585610abe565b60019150505b92915050565b6104a9610be3565b6104b281610c3d565b6006546040516001600160a01b038084169216907f66fd58e82f7b31a2a5c30e0888f3093efe4e111b00cd2b0c31fe014601293aa090600090a3600680546001600160a01b0319166001600160a01b0392909216919091179055565b60003361051c858285610c64565b610527858585610cde565b506001949350505050565b6000336104958185856105458383610a1a565b61054f9190611674565b610abe565b61057e60405180604001604052806009815260200168756e7061757365282960b81b815250610e8d565b610586610f1c565b565b610590610f71565b6105c6604051806040016040528060158152602001746d696e7428616464726573732c75696e743235362960581b815250610e8d565b6105d1338383610fbe565b6105db8282611074565b5050565b6105e7610be3565b610586600061113f565b610619604051806040016040528060078152602001667061757365282960c81b815250610e8d565b610586611191565b61065f6040518060400160405280601d81526020017f757064617465426c61636b6c69737428616464726573732c626f6f6c29000000815250610e8d565b6001600160a01b038216600081815260076020908152604091829020805460ff191685151590811790915591519182527f6a12b3df6cba4203bd7fd06b816789f87de8c594299aed5717ae070fac781bac91015b60405180910390a25050565b60606004805461040490611624565b6106d6610f71565b61070c604051806040016040528060158152602001746275726e28616464726573732c75696e743235362960581b815250610e8d565b61071682826111d4565b6105db338261130f565b6000338161072e8286610a1a565b9050838110156107935760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6105278286868403610abe565b600033610495818585610cde565b6107ec6040518060400160405280601b81526020017f7365744d696e7443617028616464726573732c75696e74323536290000000000815250610e8d565b6001600160a01b0382166000908152600960205260409020548110156108255760405163ce89973d60e01b815260040160405180910390fd5b6001600160a01b03821660008181526008602052604090819020839055517f01a85f4ecff52e70907e25b863010bca98a9458d9f2fe9b3efb4c47d197e6448906106b39084815260200190565b6108936040518060600160405280602481526020016116e460249139610e8d565b806001600160a01b0316826001600160a01b0316036108c5576040516380ae98f560e01b815260040160405180910390fd5b6001600160a01b0380831660008181526008602090815260408083205494861680845281842054948452600990925280832054918352822054909161090a8383611674565b90508381111561092d57604051634f2dbd1d60e01b815260040160405180910390fd5b6001600160a01b038781166000908152600960209081526040808320839055928916808352918390208490559151838703808252927fbe214d1fa2403a39be9a36c9f4b45125eba30bf27a8b56a619baf00493ad3e61910160405180910390a2876001600160a01b03167f0831a8ba59684daef8a957d2bd2d943e233993771429e9a17b71ddb1cea35cdb876040516109c891815260200190565b60405180910390a2866001600160a01b0316886001600160a01b03167f63ce671e4a37975f0a9e340f6f72320c617a5f728b83e3860b03aa847dc26ebb60405160405180910390a35050505050505050565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b610a4d610be3565b6001600160a01b038116610ab25760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161078a565b610abb8161113f565b50565b6001600160a01b038316610b205760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161078a565b6001600160a01b038216610b815760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161078a565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b6005546001600160a01b031633146105865760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161078a565b6001600160a01b038116610abb576040516342bcdf7f60e11b815260040160405180910390fd5b6000610c708484610a1a565b90506000198114610cd85781811015610ccb5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000604482015260640161078a565b610cd88484848403610abe565b50505050565b6001600160a01b038316610d425760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161078a565b6001600160a01b038216610da45760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161078a565b610daf8383836113cd565b6001600160a01b03831660009081526020819052604090205481811015610e275760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b606482015260840161078a565b6001600160a01b03848116600081815260208181526040808320878703905593871680835291849020805487019055925185815290927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3610cd8565b6006546040516318c5e8ab60e01b81526001600160a01b03909116906318c5e8ab90610ebf9033908590600401611687565b602060405180830381865afa158015610edc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f0091906116b3565b610abb576040516282b42960e81b815260040160405180910390fd5b610f2461145f565b6005805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600554600160a01b900460ff16156105865760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015260640161078a565b6001600160a01b03831660009081526008602090815260408083205460099092528220549091610fee8483611674565b90508281111561101157604051634f2dbd1d60e01b815260040160405180910390fd5b6001600160a01b038616600081815260096020526040908190208390555182850391907fbe214d1fa2403a39be9a36c9f4b45125eba30bf27a8b56a619baf00493ad3e61906110639084815260200190565b60405180910390a250505050505050565b6001600160a01b0382166110ca5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640161078a565b6110d6600083836113cd565b80600260008282546110e89190611674565b90915550506001600160a01b038216600081815260208181526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b611199610f71565b6005805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610f543390565b6001600160a01b0382166112345760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b606482015260840161078a565b611240826000836113cd565b6001600160a01b038216600090815260208190526040902054818110156112b45760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b606482015260840161078a565b6001600160a01b0383166000818152602081815260408083208686039055600280548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9101610bd6565b505050565b6001600160a01b03821660009081526009602052604090205481811015611349576040516348af2f2960e11b815260040160405180910390fd5b6001600160a01b03831660009081526009602090815260408083208585039081905560089092528220549091906113819083906116d0565b9050846001600160a01b03167f0831a8ba59684daef8a957d2bd2d943e233993771429e9a17b71ddb1cea35cdb826040516113be91815260200190565b60405180910390a25050505050565b6113d5610f71565b6001600160a01b03821660009081526007602052604090205460ff161561141a5760405163571f7b4960e01b81526001600160a01b038316600482015260240161078a565b6001600160a01b03831660009081526007602052604090205460ff161561130a5760405163571f7b4960e01b81526001600160a01b038416600482015260240161078a565b600554600160a01b900460ff166105865760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015260640161078a565b6000815180845260005b818110156114d5576020818501810151868301820152016114b9565b506000602082860101526020601f19601f83011685010191505092915050565b60208152600061150860208301846114af565b9392505050565b80356001600160a01b038116811461152657600080fd5b919050565b6000806040838503121561153e57600080fd5b6115478361150f565b946020939093013593505050565b60006020828403121561156757600080fd5b6115088261150f565b60008060006060848603121561158557600080fd5b61158e8461150f565b925061159c6020850161150f565b9150604084013590509250925092565b8015158114610abb57600080fd5b600080604083850312156115cd57600080fd5b6115d68361150f565b915060208301356115e6816115ac565b809150509250929050565b6000806040838503121561160457600080fd5b61160d8361150f565b915061161b6020840161150f565b90509250929050565b600181811c9082168061163857607f821691505b60208210810361165857634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b8082018082111561049b5761049b61165e565b6001600160a01b03831681526040602082018190526000906116ab908301846114af565b949350505050565b6000602082840312156116c557600080fd5b8151611508816115ac565b8181038181111561049b5761049b61165e56fe6d6967726174654d696e746572546f6b656e7328616464726573732c6164647265737329a2646970667358221220a1e16fcdda42e36f69f1b86faae54c70a14c6a62109fffaf251650ec2be02ca664736f6c63430008190033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101a95760003560e01c80637b517334116100f9578063a9059cbb11610097578063d89e2dac11610071578063d89e2dac14610390578063dd62ed3e146103a3578063e47d6060146103b6578063f2fde38b146103e257600080fd5b8063a9059cbb14610357578063b4a0bdf31461036a578063c06abe771461037d57600080fd5b80639155e083116100d35780639155e0831461031657806395d89b41146103295780639dc29fac14610331578063a457c2d71461034457600080fd5b80637b517334146102c95780638456cb59146102e95780638da5cb5b146102f157600080fd5b8063391efe121161016657806340c10f191161014057806340c10f19146102735780635c975abb1461028657806370a0823114610298578063715018a6146102c157600080fd5b8063391efe121461023857806339509351146102585780633f4ba83a1461026b57600080fd5b806306fdde03146101ae578063095ea7b3146101cc5780630e32cb86146101ef57806318160ddd1461020457806323b872dd14610216578063313ce56714610229575b600080fd5b6101b66103f5565b6040516101c391906114f5565b60405180910390f35b6101df6101da36600461152b565b610487565b60405190151581526020016101c3565b6102026101fd366004611555565b6104a1565b005b6002545b6040519081526020016101c3565b6101df610224366004611570565b61050e565b604051601281526020016101c3565b610208610246366004611555565b60086020526000908152604090205481565b6101df61026636600461152b565b610532565b610202610554565b61020261028136600461152b565b610588565b600554600160a01b900460ff166101df565b6102086102a6366004611555565b6001600160a01b031660009081526020819052604090205490565b6102026105df565b6102086102d7366004611555565b60096020526000908152604090205481565b6102026105f1565b6005546001600160a01b03165b6040516001600160a01b0390911681526020016101c3565b6102026103243660046115ba565b610621565b6101b66106bf565b61020261033f36600461152b565b6106ce565b6101df61035236600461152b565b610720565b6101df61036536600461152b565b6107a0565b6006546102fe906001600160a01b031681565b61020261038b36600461152b565b6107ae565b61020261039e3660046115f1565b610872565b6102086103b13660046115f1565b610a1a565b6101df6103c4366004611555565b6001600160a01b031660009081526007602052604090205460ff1690565b6102026103f0366004611555565b610a45565b60606003805461040490611624565b80601f016020809104026020016040519081016040528092919081815260200182805461043090611624565b801561047d5780601f106104525761010080835404028352916020019161047d565b820191906000526020600020905b81548152906001019060200180831161046057829003601f168201915b5050505050905090565b600033610495818585610abe565b60019150505b92915050565b6104a9610be3565b6104b281610c3d565b6006546040516001600160a01b038084169216907f66fd58e82f7b31a2a5c30e0888f3093efe4e111b00cd2b0c31fe014601293aa090600090a3600680546001600160a01b0319166001600160a01b0392909216919091179055565b60003361051c858285610c64565b610527858585610cde565b506001949350505050565b6000336104958185856105458383610a1a565b61054f9190611674565b610abe565b61057e60405180604001604052806009815260200168756e7061757365282960b81b815250610e8d565b610586610f1c565b565b610590610f71565b6105c6604051806040016040528060158152602001746d696e7428616464726573732c75696e743235362960581b815250610e8d565b6105d1338383610fbe565b6105db8282611074565b5050565b6105e7610be3565b610586600061113f565b610619604051806040016040528060078152602001667061757365282960c81b815250610e8d565b610586611191565b61065f6040518060400160405280601d81526020017f757064617465426c61636b6c69737428616464726573732c626f6f6c29000000815250610e8d565b6001600160a01b038216600081815260076020908152604091829020805460ff191685151590811790915591519182527f6a12b3df6cba4203bd7fd06b816789f87de8c594299aed5717ae070fac781bac91015b60405180910390a25050565b60606004805461040490611624565b6106d6610f71565b61070c604051806040016040528060158152602001746275726e28616464726573732c75696e743235362960581b815250610e8d565b61071682826111d4565b6105db338261130f565b6000338161072e8286610a1a565b9050838110156107935760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6105278286868403610abe565b600033610495818585610cde565b6107ec6040518060400160405280601b81526020017f7365744d696e7443617028616464726573732c75696e74323536290000000000815250610e8d565b6001600160a01b0382166000908152600960205260409020548110156108255760405163ce89973d60e01b815260040160405180910390fd5b6001600160a01b03821660008181526008602052604090819020839055517f01a85f4ecff52e70907e25b863010bca98a9458d9f2fe9b3efb4c47d197e6448906106b39084815260200190565b6108936040518060600160405280602481526020016116e460249139610e8d565b806001600160a01b0316826001600160a01b0316036108c5576040516380ae98f560e01b815260040160405180910390fd5b6001600160a01b0380831660008181526008602090815260408083205494861680845281842054948452600990925280832054918352822054909161090a8383611674565b90508381111561092d57604051634f2dbd1d60e01b815260040160405180910390fd5b6001600160a01b038781166000908152600960209081526040808320839055928916808352918390208490559151838703808252927fbe214d1fa2403a39be9a36c9f4b45125eba30bf27a8b56a619baf00493ad3e61910160405180910390a2876001600160a01b03167f0831a8ba59684daef8a957d2bd2d943e233993771429e9a17b71ddb1cea35cdb876040516109c891815260200190565b60405180910390a2866001600160a01b0316886001600160a01b03167f63ce671e4a37975f0a9e340f6f72320c617a5f728b83e3860b03aa847dc26ebb60405160405180910390a35050505050505050565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b610a4d610be3565b6001600160a01b038116610ab25760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161078a565b610abb8161113f565b50565b6001600160a01b038316610b205760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161078a565b6001600160a01b038216610b815760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161078a565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b6005546001600160a01b031633146105865760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161078a565b6001600160a01b038116610abb576040516342bcdf7f60e11b815260040160405180910390fd5b6000610c708484610a1a565b90506000198114610cd85781811015610ccb5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000604482015260640161078a565b610cd88484848403610abe565b50505050565b6001600160a01b038316610d425760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161078a565b6001600160a01b038216610da45760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161078a565b610daf8383836113cd565b6001600160a01b03831660009081526020819052604090205481811015610e275760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b606482015260840161078a565b6001600160a01b03848116600081815260208181526040808320878703905593871680835291849020805487019055925185815290927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3610cd8565b6006546040516318c5e8ab60e01b81526001600160a01b03909116906318c5e8ab90610ebf9033908590600401611687565b602060405180830381865afa158015610edc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f0091906116b3565b610abb576040516282b42960e81b815260040160405180910390fd5b610f2461145f565b6005805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600554600160a01b900460ff16156105865760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015260640161078a565b6001600160a01b03831660009081526008602090815260408083205460099092528220549091610fee8483611674565b90508281111561101157604051634f2dbd1d60e01b815260040160405180910390fd5b6001600160a01b038616600081815260096020526040908190208390555182850391907fbe214d1fa2403a39be9a36c9f4b45125eba30bf27a8b56a619baf00493ad3e61906110639084815260200190565b60405180910390a250505050505050565b6001600160a01b0382166110ca5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640161078a565b6110d6600083836113cd565b80600260008282546110e89190611674565b90915550506001600160a01b038216600081815260208181526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b611199610f71565b6005805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610f543390565b6001600160a01b0382166112345760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b606482015260840161078a565b611240826000836113cd565b6001600160a01b038216600090815260208190526040902054818110156112b45760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b606482015260840161078a565b6001600160a01b0383166000818152602081815260408083208686039055600280548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9101610bd6565b505050565b6001600160a01b03821660009081526009602052604090205481811015611349576040516348af2f2960e11b815260040160405180910390fd5b6001600160a01b03831660009081526009602090815260408083208585039081905560089092528220549091906113819083906116d0565b9050846001600160a01b03167f0831a8ba59684daef8a957d2bd2d943e233993771429e9a17b71ddb1cea35cdb826040516113be91815260200190565b60405180910390a25050505050565b6113d5610f71565b6001600160a01b03821660009081526007602052604090205460ff161561141a5760405163571f7b4960e01b81526001600160a01b038316600482015260240161078a565b6001600160a01b03831660009081526007602052604090205460ff161561130a5760405163571f7b4960e01b81526001600160a01b038416600482015260240161078a565b600554600160a01b900460ff166105865760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015260640161078a565b6000815180845260005b818110156114d5576020818501810151868301820152016114b9565b506000602082860101526020601f19601f83011685010191505092915050565b60208152600061150860208301846114af565b9392505050565b80356001600160a01b038116811461152657600080fd5b919050565b6000806040838503121561153e57600080fd5b6115478361150f565b946020939093013593505050565b60006020828403121561156757600080fd5b6115088261150f565b60008060006060848603121561158557600080fd5b61158e8461150f565b925061159c6020850161150f565b9150604084013590509250925092565b8015158114610abb57600080fd5b600080604083850312156115cd57600080fd5b6115d68361150f565b915060208301356115e6816115ac565b809150509250929050565b6000806040838503121561160457600080fd5b61160d8361150f565b915061161b6020840161150f565b90509250929050565b600181811c9082168061163857607f821691505b60208210810361165857634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b8082018082111561049b5761049b61165e565b6001600160a01b03831681526040602082018190526000906116ab908301846114af565b949350505050565b6000602082840312156116c557600080fd5b8151611508816115ac565b8181038181111561049b5761049b61165e56fe6d6967726174654d696e746572546f6b656e7328616464726573732c6164647265737329a2646970667358221220a1e16fcdda42e36f69f1b86faae54c70a14c6a62109fffaf251650ec2be02ca664736f6c63430008190033", "devdoc": { "author": "Venus", + "events": { + "Approval(address,address,uint256)": { + "details": "Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance." + }, + "Paused(address)": { + "details": "Emitted when the pause is triggered by `account`." + }, + "Transfer(address,address,uint256)": { + "details": "Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero." + }, + "Unpaused(address)": { + "details": "Emitted when the pause is lifted by `account`." + } + }, "kind": "dev", "methods": { "allowance(address,address)": { @@ -974,7 +988,7 @@ "storageLayout": { "storage": [ { - "astId": 5612, + "astId": 4833, "contract": "contracts/Bridge/token/XVS.sol:XVS", "label": "_balances", "offset": 0, @@ -982,7 +996,7 @@ "type": "t_mapping(t_address,t_uint256)" }, { - "astId": 5618, + "astId": 4839, "contract": "contracts/Bridge/token/XVS.sol:XVS", "label": "_allowances", "offset": 0, @@ -990,7 +1004,7 @@ "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" }, { - "astId": 5620, + "astId": 4841, "contract": "contracts/Bridge/token/XVS.sol:XVS", "label": "_totalSupply", "offset": 0, @@ -998,7 +1012,7 @@ "type": "t_uint256" }, { - "astId": 5622, + "astId": 4843, "contract": "contracts/Bridge/token/XVS.sol:XVS", "label": "_name", "offset": 0, @@ -1006,7 +1020,7 @@ "type": "t_string_storage" }, { - "astId": 5624, + "astId": 4845, "contract": "contracts/Bridge/token/XVS.sol:XVS", "label": "_symbol", "offset": 0, @@ -1014,7 +1028,7 @@ "type": "t_string_storage" }, { - "astId": 5383, + "astId": 4604, "contract": "contracts/Bridge/token/XVS.sol:XVS", "label": "_owner", "offset": 0, @@ -1022,7 +1036,7 @@ "type": "t_address" }, { - "astId": 5506, + "astId": 4727, "contract": "contracts/Bridge/token/XVS.sol:XVS", "label": "_paused", "offset": 20, @@ -1030,7 +1044,7 @@ "type": "t_bool" }, { - "astId": 11266, + "astId": 9550, "contract": "contracts/Bridge/token/XVS.sol:XVS", "label": "accessControlManager", "offset": 0, @@ -1038,7 +1052,7 @@ "type": "t_address" }, { - "astId": 11271, + "astId": 9555, "contract": "contracts/Bridge/token/XVS.sol:XVS", "label": "_blacklist", "offset": 0, @@ -1046,7 +1060,7 @@ "type": "t_mapping(t_address,t_bool)" }, { - "astId": 11276, + "astId": 9560, "contract": "contracts/Bridge/token/XVS.sol:XVS", "label": "minterToCap", "offset": 0, @@ -1054,7 +1068,7 @@ "type": "t_mapping(t_address,t_uint256)" }, { - "astId": 11281, + "astId": 9565, "contract": "contracts/Bridge/token/XVS.sol:XVS", "label": "minterToMintedAmount", "offset": 0, diff --git a/deployments/arbitrumsepolia/XVSBridgeAdmin.json b/deployments/arbitrumsepolia/XVSBridgeAdmin.json index 838c466..8572cb5 100644 --- a/deployments/arbitrumsepolia/XVSBridgeAdmin.json +++ b/deployments/arbitrumsepolia/XVSBridgeAdmin.json @@ -1,5 +1,5 @@ { - "address": "0x0DC3d6717727FD5a023e41bA8134640ca18f3E48", + "address": "0xc94578caCC89a29B044a0a1D54d20d48A645E5C8", "abi": [ { "anonymous": false, @@ -458,82 +458,82 @@ "type": "constructor" } ], - "transactionHash": "0xb63f1d8df57502b4f58552865096a179a74b158ede50c27deff17a6fcb6adb17", + "transactionHash": "0x9a6dd34ffe5012028fb3d0b00d4629f535ce47e7e22efa422061bb58cd35c57d", "receipt": { "to": null, "from": "0x638Eb8DFfF094Fd1d52c5A198b44984806C521E5", - "contractAddress": "0x0DC3d6717727FD5a023e41bA8134640ca18f3E48", + "contractAddress": "0xc94578caCC89a29B044a0a1D54d20d48A645E5C8", "transactionIndex": 2, - "gasUsed": "1679305", - "logsBloom": "0x00000000000000000000000200000040400020000000000400800000000000040000000000000000000000000000000000000000000000000000000000008000000000000000004000000000000002000001000000000000000000000000000000000000020000040000000000000800000000800000000000000000000000400000000000000000000000000000000000000000000080000000000000800000000000000000000000000001000400000000000000800000000000000000000000000020000000000000000000040000000000000400000000000000000020000200000000000000000000000000000000000800000000000000000000000000", - "blockHash": "0xd4fb8336770134ab82a80135f27f86255bfeed6ca616c6c7b8a38a25819d8a32", - "transactionHash": "0xb63f1d8df57502b4f58552865096a179a74b158ede50c27deff17a6fcb6adb17", + "gasUsed": "796839", + "logsBloom": "0x00000000000000000000000200000000400000000000000400800000000000040000000000000020000000000000010000000000000000000000000000008100000000000000000000000000000002000001000000000000000000000000000000000000020000000000000000000800000000800000000000000000000000400000000000000000020000000000000000000000000080000000000000800000000000000000000000000000000400000000000000800000000000000000000000000020000000000000000000040000000000000400000000000000000020000000000000000000000000000000000000000800000000400000000001000000", + "blockHash": "0xc7e0dfe3107e808507d63110a4b12e2408e7d0df4278fec1fbba0ba5e0d09c41", + "transactionHash": "0x9a6dd34ffe5012028fb3d0b00d4629f535ce47e7e22efa422061bb58cd35c57d", "logs": [ { "transactionIndex": 2, - "blockNumber": 27132301, - "transactionHash": "0xb63f1d8df57502b4f58552865096a179a74b158ede50c27deff17a6fcb6adb17", - "address": "0x0DC3d6717727FD5a023e41bA8134640ca18f3E48", + "blockNumber": 36234810, + "transactionHash": "0x9a6dd34ffe5012028fb3d0b00d4629f535ce47e7e22efa422061bb58cd35c57d", + "address": "0xc94578caCC89a29B044a0a1D54d20d48A645E5C8", "topics": [ "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", - "0x000000000000000000000000d2048bd9e1d9a515cc57e270d0928b1127348ae1" + "0x0000000000000000000000003514fb2bbaf4d749af5908311b4c1867beb349cb" ], "data": "0x", - "logIndex": 4, - "blockHash": "0xd4fb8336770134ab82a80135f27f86255bfeed6ca616c6c7b8a38a25819d8a32" + "logIndex": 1, + "blockHash": "0xc7e0dfe3107e808507d63110a4b12e2408e7d0df4278fec1fbba0ba5e0d09c41" }, { "transactionIndex": 2, - "blockNumber": 27132301, - "transactionHash": "0xb63f1d8df57502b4f58552865096a179a74b158ede50c27deff17a6fcb6adb17", - "address": "0x0DC3d6717727FD5a023e41bA8134640ca18f3E48", + "blockNumber": 36234810, + "transactionHash": "0x9a6dd34ffe5012028fb3d0b00d4629f535ce47e7e22efa422061bb58cd35c57d", + "address": "0xc94578caCC89a29B044a0a1D54d20d48A645E5C8", "topics": [ "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x000000000000000000000000638eb8dfff094fd1d52c5a198b44984806c521e5" ], "data": "0x", - "logIndex": 5, - "blockHash": "0xd4fb8336770134ab82a80135f27f86255bfeed6ca616c6c7b8a38a25819d8a32" + "logIndex": 2, + "blockHash": "0xc7e0dfe3107e808507d63110a4b12e2408e7d0df4278fec1fbba0ba5e0d09c41" }, { "transactionIndex": 2, - "blockNumber": 27132301, - "transactionHash": "0xb63f1d8df57502b4f58552865096a179a74b158ede50c27deff17a6fcb6adb17", - "address": "0x0DC3d6717727FD5a023e41bA8134640ca18f3E48", + "blockNumber": 36234810, + "transactionHash": "0x9a6dd34ffe5012028fb3d0b00d4629f535ce47e7e22efa422061bb58cd35c57d", + "address": "0xc94578caCC89a29B044a0a1D54d20d48A645E5C8", "topics": ["0x66fd58e82f7b31a2a5c30e0888f3093efe4e111b00cd2b0c31fe014601293aa0"], "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a36ad96441cb931d8dfeaaac97d3fab4b39e590f", - "logIndex": 6, - "blockHash": "0xd4fb8336770134ab82a80135f27f86255bfeed6ca616c6c7b8a38a25819d8a32" + "logIndex": 3, + "blockHash": "0xc7e0dfe3107e808507d63110a4b12e2408e7d0df4278fec1fbba0ba5e0d09c41" }, { "transactionIndex": 2, - "blockNumber": 27132301, - "transactionHash": "0xb63f1d8df57502b4f58552865096a179a74b158ede50c27deff17a6fcb6adb17", - "address": "0x0DC3d6717727FD5a023e41bA8134640ca18f3E48", + "blockNumber": 36234810, + "transactionHash": "0x9a6dd34ffe5012028fb3d0b00d4629f535ce47e7e22efa422061bb58cd35c57d", + "address": "0xc94578caCC89a29B044a0a1D54d20d48A645E5C8", "topics": ["0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498"], "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 7, - "blockHash": "0xd4fb8336770134ab82a80135f27f86255bfeed6ca616c6c7b8a38a25819d8a32" + "logIndex": 4, + "blockHash": "0xc7e0dfe3107e808507d63110a4b12e2408e7d0df4278fec1fbba0ba5e0d09c41" }, { "transactionIndex": 2, - "blockNumber": 27132301, - "transactionHash": "0xb63f1d8df57502b4f58552865096a179a74b158ede50c27deff17a6fcb6adb17", - "address": "0x0DC3d6717727FD5a023e41bA8134640ca18f3E48", + "blockNumber": 36234810, + "transactionHash": "0x9a6dd34ffe5012028fb3d0b00d4629f535ce47e7e22efa422061bb58cd35c57d", + "address": "0xc94578caCC89a29B044a0a1D54d20d48A645E5C8", "topics": ["0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f"], "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a78a1df376c3ceebc5fab574fe6eddbbf76fd03e", - "logIndex": 8, - "blockHash": "0xd4fb8336770134ab82a80135f27f86255bfeed6ca616c6c7b8a38a25819d8a32" + "logIndex": 5, + "blockHash": "0xc7e0dfe3107e808507d63110a4b12e2408e7d0df4278fec1fbba0ba5e0d09c41" } ], - "blockNumber": 27132301, - "cumulativeGasUsed": "3399219", + "blockNumber": 36234810, + "cumulativeGasUsed": "823530", "status": 1, "byzantium": true }, "args": [ - "0xd2048bD9e1D9A515cc57E270D0928B1127348ae1", + "0x3514FB2bbAf4D749af5908311B4c1867Beb349cb", "0xA78A1Df376c3CEeBC5Fab574fe6EdDbbF76fd03e", "0xc4d66de8000000000000000000000000a36ad96441cb931d8dfeaaac97d3fab4b39e590f" ], @@ -546,7 +546,7 @@ "methodName": "initialize", "args": ["0xa36AD96441cB931D8dFEAAaC97D3FaB4B39E590F"] }, - "implementation": "0xd2048bD9e1D9A515cc57E270D0928B1127348ae1", + "implementation": "0x3514FB2bbAf4D749af5908311B4c1867Beb349cb", "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.", "kind": "dev", diff --git a/deployments/arbitrumsepolia/XVSBridgeAdmin_Implementation.json b/deployments/arbitrumsepolia/XVSBridgeAdmin_Implementation.json index 3d90a5f..989732f 100644 --- a/deployments/arbitrumsepolia/XVSBridgeAdmin_Implementation.json +++ b/deployments/arbitrumsepolia/XVSBridgeAdmin_Implementation.json @@ -1,5 +1,5 @@ { - "address": "0xd2048bD9e1D9A515cc57E270D0928B1127348ae1", + "address": "0x3514FB2bbAf4D749af5908311B4c1867Beb349cb", "abi": [ { "inputs": [ @@ -329,41 +329,46 @@ "type": "function" } ], - "transactionHash": "0x4dfe6686fb9890a60513d16b09040dd4859a2907964ee4fd300c43d1cf74cfed", + "transactionHash": "0xe01d58e6470218f16ec0022bd3dae987a9fd162e06a9404ac6f55c832d21f942", "receipt": { "to": null, "from": "0x638Eb8DFfF094Fd1d52c5A198b44984806C521E5", - "contractAddress": "0xd2048bD9e1D9A515cc57E270D0928B1127348ae1", + "contractAddress": "0x3514FB2bbAf4D749af5908311B4c1867Beb349cb", "transactionIndex": 3, - "gasUsed": "2496583", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000200000800400000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000", - "blockHash": "0x7ab0ebc08e18039f5ba3a0a03d07fccb15aa35f801a14cc59b44b9306e555581", - "transactionHash": "0x4dfe6686fb9890a60513d16b09040dd4859a2907964ee4fd300c43d1cf74cfed", + "gasUsed": "1274969", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000008000000000200000000000000000000400000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000", + "blockHash": "0x19868139232d977b619021f60f9a8656067932a34f2bf698d7d313ceea4cf0d5", + "transactionHash": "0xe01d58e6470218f16ec0022bd3dae987a9fd162e06a9404ac6f55c832d21f942", "logs": [ { "transactionIndex": 3, - "blockNumber": 27132283, - "transactionHash": "0x4dfe6686fb9890a60513d16b09040dd4859a2907964ee4fd300c43d1cf74cfed", - "address": "0xd2048bD9e1D9A515cc57E270D0928B1127348ae1", + "blockNumber": 36234797, + "transactionHash": "0xe01d58e6470218f16ec0022bd3dae987a9fd162e06a9404ac6f55c832d21f942", + "address": "0x3514FB2bbAf4D749af5908311B4c1867Beb349cb", "topics": ["0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498"], "data": "0x00000000000000000000000000000000000000000000000000000000000000ff", - "logIndex": 6, - "blockHash": "0x7ab0ebc08e18039f5ba3a0a03d07fccb15aa35f801a14cc59b44b9306e555581" + "logIndex": 4, + "blockHash": "0x19868139232d977b619021f60f9a8656067932a34f2bf698d7d313ceea4cf0d5" } ], - "blockNumber": 27132283, - "cumulativeGasUsed": "4260614", + "blockNumber": 36234797, + "cumulativeGasUsed": "2420675", "status": 1, "byzantium": true }, - "args": ["0xE9B66800E63888DE29c4c9131faadbDbDCfae917"], + "args": ["0xFdC5cEC63FD167DA46cF006585b30D03B104eFD4"], "numDeployments": 1, - "solcInputHash": "f2046c3ab03975d1be43bca1cf657398", - "metadata": "{\"compiler\":{\"version\":\"0.8.13+commit.abaa5c0e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"XVSBridge_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"calledContract\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"methodSignature\",\"type\":\"string\"}],\"name\":\"Unauthorized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddressNotAllowed\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"signature\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"active\",\"type\":\"bool\"}],\"name\":\"FunctionRegistryChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldAccessControlManager\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAccessControlManager\",\"type\":\"address\"}],\"name\":\"NewAccessControlManager\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"stateMutability\":\"nonpayable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"XVSBridge\",\"outputs\":[{\"internalType\":\"contract IXVSProxyOFT\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"accessControlManager\",\"outputs\":[{\"internalType\":\"contract IAccessControlManagerV8\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"name\":\"functionRegistry\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"accessControlManager_\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"remoteChainId_\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"remoteAddress_\",\"type\":\"bytes\"}],\"name\":\"isTrustedRemote\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pendingOwner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"accessControlManager_\",\"type\":\"address\"}],\"name\":\"setAccessControlManager\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"remoteChainId_\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"remoteAddress_\",\"type\":\"bytes\"}],\"name\":\"setTrustedRemoteAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner_\",\"type\":\"address\"}],\"name\":\"transferBridgeOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string[]\",\"name\":\"signatures_\",\"type\":\"string[]\"},{\"internalType\":\"bool[]\",\"name\":\"active_\",\"type\":\"bool[]\"}],\"name\":\"upsertSignature\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Venus\",\"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 contract.\"}},\"isTrustedRemote(uint16,bytes)\":{\"custom:error\":\"ZeroAddressNotAllowed is thrown when remoteAddress_ contract address is zero.\",\"params\":{\"remoteAddress_\":\"Address of the destination bridge.\",\"remoteChainId_\":\"Chain Id of the destination chain.\"},\"returns\":{\"_0\":\"Bool indicating whether the remote chain is trusted or not.\"}},\"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:error\":\"ZeroAddressNotAllowed is thrown when remoteAddress_ contract address is zero.\",\"params\":{\"remoteAddress_\":\"Address of the destination bridge.\",\"remoteChainId_\":\"Chain Id of the destination chain.\"}},\"transferBridgeOwnership(address)\":{\"custom:access\":\"Controlled by AccessControlManager.\",\"params\":{\"newOwner_\":\"New owner of the XVS Bridge.\"}},\"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.\",\"custom:event\":\"Emits FunctionRegistryChanged if bool value of function changes.\",\"params\":{\"active_\":\"bool value, should be true to add function.\",\"signatures_\":\"Function signature to be added or removed.\"}}},\"stateVariables\":{\"XVSBridge\":{\"custom:oz-upgrades-unsafe-allow\":\"state-variable-immutable\"}},\"title\":\"XVSBridgeAdmin\",\"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\":\"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\":\"A mapping keeps track of function signature associated with function name string.\"},\"isTrustedRemote(uint16,bytes)\":{\"notice\":\"Returns true if remote address is trustedRemote corresponds to chainId_.\"},\"renounceOwnership()\":{\"notice\":\"Empty implementation of renounce ownership to avoid any mishappening.\"},\"setAccessControlManager(address)\":{\"notice\":\"Sets the address of AccessControlManager\"},\"setTrustedRemoteAddress(uint16,bytes)\":{\"notice\":\"Sets trusted remote on particular chain.\"},\"transferBridgeOwnership(address)\":{\"notice\":\"This function transfers the ownership of the bridge from this contract to new owner.\"},\"upsertSignature(string[],bool[])\":{\"notice\":\"A setter for the registry of functions that are allowed to be executed from proposals.\"}},\"notice\":\"The XVSBridgeAdmin contract extends a parent contract AccessControlledV8 for access control, and it manages an external contract called XVSProxyOFT. It maintains a registry of function signatures and names, allowing for dynamic function handling i.e checking of access control of interaction with only owner functions.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/Bridge/XVSBridgeAdmin.sol\":\"XVSBridgeAdmin\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.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() public virtual {\\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\":\"0x84efb8889801b0ac817324aff6acc691d07bbee816b671817132911d287a8c63\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.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. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby disabling 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\":\"0x4075622496acc77fd6d4de4cc30a8577a744d5c75afad33fdeacf1704d6eda98\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (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 * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\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\":\"0x89be10e757d242e9b18d5a32c9fbe2019f6d63052bbe46397a430a1d60d7f794\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.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 * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\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://consensys.net/diligence/blog/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.8.0/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(address target, bytes memory data, uint256 value) 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 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 (bool success, bytes memory returndata) = target.delegatecall(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\":\"0x9c80f545915582e63fe206c6ce27cbe85a86fc10b9cd2a0e8c9488fb7c2ee422\",\"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/governance-contracts/contracts/Governance/AccessControlledV8.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.13;\\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\":\"0x1b805a5d09990e2c4f7839afe7726a02f8452261eb3d0d488e24129ec0a7736d\",\"license\":\"BSD-3-Clause\"},\"@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV8.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.13;\\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\":\"0x8adbe291d659987faf4de606736227ad9d8e1a0e284a33a6ca12b30ab2a504b2\",\"license\":\"BSD-3-Clause\"},\"@venusprotocol/solidity-utilities/contracts/validators.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.13;\\n\\n/// @notice Thrown if the supplied address is a zero address where it is not allowed\\nerror ZeroAddressNotAllowed();\\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\",\"keccak256\":\"0x909eb76841ebd57d8f53686b76b1a09da7bbbbcddb29510c41674d5aa84c713e\",\"license\":\"BSD-3-Clause\"},\"contracts/Bridge/XVSBridgeAdmin.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\n\\npragma solidity 0.8.13;\\n\\nimport { AccessControlledV8 } from \\\"@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV8.sol\\\";\\nimport { ensureNonzeroAddress } from \\\"@venusprotocol/solidity-utilities/contracts/validators.sol\\\";\\nimport { IXVSProxyOFT } from \\\"./interfaces/IXVSProxyOFT.sol\\\";\\n\\n/**\\n * @title XVSBridgeAdmin\\n * @author Venus\\n * @notice The XVSBridgeAdmin contract extends a parent contract AccessControlledV8 for access control, and it manages an external contract called XVSProxyOFT.\\n * It maintains a registry of function signatures and names,\\n * allowing for dynamic function handling i.e checking of access control of interaction with only owner functions.\\n */\\ncontract XVSBridgeAdmin is AccessControlledV8 {\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n IXVSProxyOFT public immutable XVSBridge;\\n /**\\n * @notice A mapping keeps track of function signature associated with function name string.\\n */\\n mapping(bytes4 => string) public functionRegistry;\\n\\n /**\\n * @notice emitted when function registry updated\\n */\\n event FunctionRegistryChanged(string signature, bool active);\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor(address XVSBridge_) {\\n ensureNonzeroAddress(XVSBridge_);\\n XVSBridge = IXVSProxyOFT(XVSBridge_);\\n _disableInitializers();\\n }\\n\\n /**\\n * @param accessControlManager_ Address of access control manager contract.\\n */\\n function initialize(address accessControlManager_) external initializer {\\n __AccessControlled_init(accessControlManager_);\\n }\\n\\n /**\\n * @notice Invoked when called function does not exist in the contract.\\n * @return Response of low level call.\\n * @custom:access Controlled by AccessControlManager.\\n */\\n fallback(bytes calldata data) external returns (bytes memory) {\\n string memory fun = _getFunctionName(msg.sig);\\n require(bytes(fun).length != 0, \\\"Function not found\\\");\\n _checkAccessAllowed(fun);\\n (bool ok, bytes memory res) = address(XVSBridge).call(data);\\n require(ok, \\\"call failed\\\");\\n return res;\\n }\\n\\n /**\\n * @notice Sets trusted remote on particular chain.\\n * @param remoteChainId_ Chain Id of the destination chain.\\n * @param remoteAddress_ Address of the destination bridge.\\n * @custom:access Controlled by AccessControlManager.\\n * @custom:error ZeroAddressNotAllowed is thrown when remoteAddress_ contract address is zero.\\n */\\n function setTrustedRemoteAddress(uint16 remoteChainId_, bytes calldata remoteAddress_) external {\\n _checkAccessAllowed(\\\"setTrustedRemoteAddress(uint16,bytes)\\\");\\n require(remoteChainId_ != 0, \\\"ChainId must not be zero\\\");\\n ensureNonzeroAddress(bytesToAddress(remoteAddress_));\\n XVSBridge.setTrustedRemoteAddress(remoteChainId_, remoteAddress_);\\n }\\n\\n /**\\n * @notice A setter for the 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 * @custom:event Emits FunctionRegistryChanged if bool value of function changes.\\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; ) {\\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 unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /**\\n * @notice This function transfers the ownership of the bridge from this contract to new owner.\\n * @param newOwner_ New owner of the XVS Bridge.\\n * @custom:access Controlled by AccessControlManager.\\n */\\n function transferBridgeOwnership(address newOwner_) external {\\n _checkAccessAllowed(\\\"transferBridgeOwnership(address)\\\");\\n XVSBridge.transferOwnership(newOwner_);\\n }\\n\\n /**\\n * @notice Returns true if remote address is trustedRemote corresponds to chainId_.\\n * @param remoteChainId_ Chain Id of the destination chain.\\n * @param remoteAddress_ Address of the destination bridge.\\n * @custom:error ZeroAddressNotAllowed is thrown when remoteAddress_ contract address is zero.\\n * @return Bool indicating whether the remote chain is trusted or not.\\n */\\n function isTrustedRemote(uint16 remoteChainId_, bytes calldata remoteAddress_) external returns (bool) {\\n require(remoteChainId_ != 0, \\\"ChainId must not be zero\\\");\\n ensureNonzeroAddress(bytesToAddress(remoteAddress_));\\n return XVSBridge.isTrustedRemote(remoteChainId_, remoteAddress_);\\n }\\n\\n /**\\n * @notice Empty implementation of renounce ownership to avoid any mishappening.\\n */\\n function renounceOwnership() public override {}\\n\\n /**\\n * @dev Returns function name string associated with function signature.\\n * @param signature_ Four bytes of function signature.\\n * @return Function signature corresponding to its hash.\\n */\\n function _getFunctionName(bytes4 signature_) internal view returns (string memory) {\\n return functionRegistry[signature_];\\n }\\n\\n /**\\n * @notice Converts given bytes into address.\\n * @param b Bytes to be converted into address.\\n * @return Converted address of given bytes.\\n */\\n function bytesToAddress(bytes calldata b) private pure returns (address) {\\n return address(uint160(bytes20(b)));\\n }\\n}\\n\",\"keccak256\":\"0x3ba34b95f911e1772aca61e6daa00c4ebdb5bee61fc072ffba9e7ff3dc1262cd\",\"license\":\"BSD-3-Clause\"},\"contracts/Bridge/interfaces/IXVSProxyOFT.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.13;\\n\\n/**\\n * @title IXVSProxyOFT\\n * @author Venus\\n * @notice Interface implemented by `XVSProxyOFT`.\\n */\\ninterface IXVSProxyOFT {\\n function transferOwnership(address addr) external;\\n\\n function setTrustedRemoteAddress(uint16 remoteChainId, bytes calldata srcAddress) external;\\n\\n function isTrustedRemote(uint16 remoteChainId, bytes calldata srcAddress) external returns (bool);\\n}\\n\",\"keccak256\":\"0x854518f3e4c2270ca52184e63dc1f9d27f2893388216ee6153e6ab8cf2d7c960\",\"license\":\"BSD-3-Clause\"}},\"version\":1}", - "bytecode": "0x60a06040523480156200001157600080fd5b50604051620016ac380380620016ac833981016040819052620000349162000149565b6200003f816200005d565b6001600160a01b0381166080526200005662000088565b506200017b565b6001600160a01b03811662000085576040516342bcdf7f60e11b815260040160405180910390fd5b50565b600054610100900460ff1615620000f55760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff9081161462000147576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6000602082840312156200015c57600080fd5b81516001600160a01b03811681146200017457600080fd5b9392505050565b6080516114f9620001b3600039600081816101610152818161026c015281816105d6015281816106b70152610b2a01526114f96000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c806379ba50971161008c578063b4a0bdf311610066578063b4a0bdf31461031b578063c4d66de81461032c578063e30c39781461033f578063f2fde38b14610350576100ea565b806379ba5097146102ef5780638da5cb5b146102f7578063a6c3d16514610308576100ea565b80633d8b38f6116100c85780633d8b38f6146102a65780633f90b540146102c95780634bb7453e146102dc578063715018a61461023c576100ea565b80630e32cb8614610229578063180d295c1461023e57806327a020ef14610267575b600036606060006101066000356001600160e01b031916610363565b905080516000036101535760405162461bcd60e51b8152602060048201526012602482015271119d5b98dd1a5bdb881b9bdd08199bdd5b9960721b60448201526064015b60405180910390fd5b61015c81610410565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316868660405161019992919061106b565b6000604051808303816000865af19150503d80600081146101d6576040519150601f19603f3d011682016040523d82523d6000602084013e6101db565b606091505b50915091508161021b5760405162461bcd60e51b815260206004820152600b60248201526a18d85b1b0819985a5b195960aa1b604482015260640161014a565b805195506020019350505050f35b61023c61023736600461107b565b6104ae565b005b61025161024c3660046110ab565b6104c2565b60405161025e9190611122565b60405180910390f35b61028e7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161025e565b6102b96102b4366004611135565b61055c565b604051901515815260200161025e565b61023c6102d736600461107b565b61065a565b61023c6102ea36600461120d565b610716565b61023c610a1f565b6033546001600160a01b031661028e565b61023c610316366004611135565b610a96565b6097546001600160a01b031661028e565b61023c61033a36600461107b565b610b9a565b6065546001600160a01b031661028e565b61023c61035e36600461107b565b610cad565b6001600160e01b03198116600090815260c96020526040902080546060919061038b90611279565b80601f01602080910402602001604051908101604052809291908181526020018280546103b790611279565b80156104045780601f106103d957610100808354040283529160200191610404565b820191906000526020600020905b8154815290600101906020018083116103e757829003601f168201915b50505050509050919050565b6097546040516318c5e8ab60e01b81526000916001600160a01b0316906318c5e8ab9061044390339086906004016112b3565b602060405180830381865afa158015610460573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061048491906112e5565b9050806104aa57333083604051634a3fa29360e01b815260040161014a93929190611302565b5050565b6104b6610d1e565b6104bf81610d78565b50565b60c960205260009081526040902080546104db90611279565b80601f016020809104026020016040519081016040528092919081815260200182805461050790611279565b80156105545780601f1061052957610100808354040283529160200191610554565b820191906000526020600020905b81548152906001019060200180831161053757829003601f168201915b505050505081565b60008361ffff166000036105ad5760405162461bcd60e51b8152602060048201526018602482015277436861696e4964206d757374206e6f74206265207a65726f60401b604482015260640161014a565b6105bf6105ba8484610e36565b610e4c565b604051631ec59c7b60e11b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690633d8b38f69061060f90879087908790600401611360565b6020604051808303816000875af115801561062e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061065291906112e5565b949350505050565b6106986040518060400160405280602081526020017f7472616e736665724272696467654f776e657273686970286164647265737329815250610410565b60405163f2fde38b60e01b81526001600160a01b0382811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063f2fde38b90602401600060405180830381600087803b1580156106fb57600080fd5b505af115801561070f573d6000803e3d6000fd5b5050505050565b61071e610d1e565b8281811461077d5760405162461bcd60e51b815260206004820152602660248201527f496e70757420617272617973206d7573742068617665207468652073616d65206044820152650d8cadccee8d60d31b606482015260840161014a565b60005b81811015610a1557600086868381811061079c5761079c61137e565b90506020028101906107ae9190611394565b6040516107bc92919061106b565b60408051918290039091206001600160e01b03198116600090815260c96020529182208054919350906107ee90611279565b80601f016020809104026020016040519081016040528092919081815260200182805461081a90611279565b80156108675780601f1061083c57610100808354040283529160200191610867565b820191906000526020600020905b81548152906001019060200180831161084a57829003601f168201915b505050505090508585848181106108805761088061137e565b905060200201602081019061089591906113db565b80156108a057508051155b15610951578787848181106108b7576108b761137e565b90506020028101906108c99190611394565b6001600160e01b03198416600090815260c9602052604090206108ed929091610f9c565b507f9d424e54f4d851aabd288f6cc4946e5726d6b5c0e66ea4ef159a3c40bcc470fa8888858181106109215761092161137e565b90506020028101906109339190611394565b6001604051610944939291906113f8565b60405180910390a1610a0b565b8585848181106109635761096361137e565b905060200201602081019061097891906113db565b1580156109855750805115155b15610a0b576001600160e01b03198216600090815260c9602052604081206109ac91611020565b7f9d424e54f4d851aabd288f6cc4946e5726d6b5c0e66ea4ef159a3c40bcc470fa8888858181106109df576109df61137e565b90506020028101906109f19190611394565b6000604051610a02939291906113f8565b60405180910390a15b5050600101610780565b505050505050565b565b60655433906001600160a01b03168114610a8d5760405162461bcd60e51b815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f7420746865206044820152683732bb9037bbb732b960b91b606482015260840161014a565b6104bf81610e73565b610ab760405180606001604052806025815260200161149f60259139610410565b8261ffff16600003610b065760405162461bcd60e51b8152602060048201526018602482015277436861696e4964206d757374206e6f74206265207a65726f60401b604482015260640161014a565b610b136105ba8383610e36565b60405163a6c3d16560e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063a6c3d16590610b6390869086908690600401611360565b600060405180830381600087803b158015610b7d57600080fd5b505af1158015610b91573d6000803e3d6000fd5b50505050505050565b600054610100900460ff1615808015610bba5750600054600160ff909116105b80610bd45750303b158015610bd4575060005460ff166001145b610c375760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161014a565b6000805460ff191660011790558015610c5a576000805461ff0019166101001790555b610c6382610e8c565b80156104aa576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a15050565b610cb5610d1e565b606580546001600160a01b0383166001600160a01b03199091168117909155610ce66033546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b6033546001600160a01b03163314610a1d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161014a565b6001600160a01b038116610ddc5760405162461bcd60e51b815260206004820152602560248201527f696e76616c696420616365737320636f6e74726f6c206d616e61676572206164604482015264647265737360d81b606482015260840161014a565b609780546001600160a01b038381166001600160a01b031983168117909355604080519190921680825260208201939093527f66fd58e82f7b31a2a5c30e0888f3093efe4e111b00cd2b0c31fe014601293aa09101610ca1565b6000610e42828461141e565b60601c9392505050565b6001600160a01b0381166104bf576040516342bcdf7f60e11b815260040160405180910390fd5b606580546001600160a01b03191690556104bf81610ec4565b600054610100900460ff16610eb35760405162461bcd60e51b815260040161014a90611453565b610ebb610f16565b6104bf81610f45565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16610f3d5760405162461bcd60e51b815260040161014a90611453565b610a1d610f6c565b600054610100900460ff166104b65760405162461bcd60e51b815260040161014a90611453565b600054610100900460ff16610f935760405162461bcd60e51b815260040161014a90611453565b610a1d33610e73565b828054610fa890611279565b90600052602060002090601f016020900481019282610fca5760008555611010565b82601f10610fe35782800160ff19823516178555611010565b82800160010185558215611010579182015b82811115611010578235825591602001919060010190610ff5565b5061101c929150611056565b5090565b50805461102c90611279565b6000825580601f1061103c575050565b601f0160209004906000526020600020908101906104bf91905b5b8082111561101c5760008155600101611057565b8183823760009101908152919050565b60006020828403121561108d57600080fd5b81356001600160a01b03811681146110a457600080fd5b9392505050565b6000602082840312156110bd57600080fd5b81356001600160e01b0319811681146110a457600080fd5b6000815180845260005b818110156110fb576020818501810151868301820152016110df565b8181111561110d576000602083870101525b50601f01601f19169290920160200192915050565b6020815260006110a460208301846110d5565b60008060006040848603121561114a57600080fd5b833561ffff8116811461115c57600080fd5b9250602084013567ffffffffffffffff8082111561117957600080fd5b818601915086601f83011261118d57600080fd5b81358181111561119c57600080fd5b8760208285010111156111ae57600080fd5b6020830194508093505050509250925092565b60008083601f8401126111d357600080fd5b50813567ffffffffffffffff8111156111eb57600080fd5b6020830191508360208260051b850101111561120657600080fd5b9250929050565b6000806000806040858703121561122357600080fd5b843567ffffffffffffffff8082111561123b57600080fd5b611247888389016111c1565b9096509450602087013591508082111561126057600080fd5b5061126d878288016111c1565b95989497509550505050565b600181811c9082168061128d57607f821691505b6020821081036112ad57634e487b7160e01b600052602260045260246000fd5b50919050565b6001600160a01b0383168152604060208201819052600090610652908301846110d5565b80151581146104bf57600080fd5b6000602082840312156112f757600080fd5b81516110a4816112d7565b6001600160a01b0384811682528316602082015260606040820181905260009061132e908301846110d5565b95945050505050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b61ffff8416815260406020820152600061132e604083018486611337565b634e487b7160e01b600052603260045260246000fd5b6000808335601e198436030181126113ab57600080fd5b83018035915067ffffffffffffffff8211156113c657600080fd5b60200191503681900382131561120657600080fd5b6000602082840312156113ed57600080fd5b81356110a4816112d7565b60408152600061140c604083018587611337565b90508215156020830152949350505050565b6bffffffffffffffffffffffff19813581811691601485101561144b5780818660140360031b1b83161692505b505092915050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b60608201526080019056fe7365745472757374656452656d6f7465416464726573732875696e7431362c627974657329a2646970667358221220ac99e6bde2c9eb9bdd52a744515930950de54cf45081e77327e35b07ad11a96064736f6c634300080d0033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100ea5760003560e01c806379ba50971161008c578063b4a0bdf311610066578063b4a0bdf31461031b578063c4d66de81461032c578063e30c39781461033f578063f2fde38b14610350576100ea565b806379ba5097146102ef5780638da5cb5b146102f7578063a6c3d16514610308576100ea565b80633d8b38f6116100c85780633d8b38f6146102a65780633f90b540146102c95780634bb7453e146102dc578063715018a61461023c576100ea565b80630e32cb8614610229578063180d295c1461023e57806327a020ef14610267575b600036606060006101066000356001600160e01b031916610363565b905080516000036101535760405162461bcd60e51b8152602060048201526012602482015271119d5b98dd1a5bdb881b9bdd08199bdd5b9960721b60448201526064015b60405180910390fd5b61015c81610410565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316868660405161019992919061106b565b6000604051808303816000865af19150503d80600081146101d6576040519150601f19603f3d011682016040523d82523d6000602084013e6101db565b606091505b50915091508161021b5760405162461bcd60e51b815260206004820152600b60248201526a18d85b1b0819985a5b195960aa1b604482015260640161014a565b805195506020019350505050f35b61023c61023736600461107b565b6104ae565b005b61025161024c3660046110ab565b6104c2565b60405161025e9190611122565b60405180910390f35b61028e7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161025e565b6102b96102b4366004611135565b61055c565b604051901515815260200161025e565b61023c6102d736600461107b565b61065a565b61023c6102ea36600461120d565b610716565b61023c610a1f565b6033546001600160a01b031661028e565b61023c610316366004611135565b610a96565b6097546001600160a01b031661028e565b61023c61033a36600461107b565b610b9a565b6065546001600160a01b031661028e565b61023c61035e36600461107b565b610cad565b6001600160e01b03198116600090815260c96020526040902080546060919061038b90611279565b80601f01602080910402602001604051908101604052809291908181526020018280546103b790611279565b80156104045780601f106103d957610100808354040283529160200191610404565b820191906000526020600020905b8154815290600101906020018083116103e757829003601f168201915b50505050509050919050565b6097546040516318c5e8ab60e01b81526000916001600160a01b0316906318c5e8ab9061044390339086906004016112b3565b602060405180830381865afa158015610460573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061048491906112e5565b9050806104aa57333083604051634a3fa29360e01b815260040161014a93929190611302565b5050565b6104b6610d1e565b6104bf81610d78565b50565b60c960205260009081526040902080546104db90611279565b80601f016020809104026020016040519081016040528092919081815260200182805461050790611279565b80156105545780601f1061052957610100808354040283529160200191610554565b820191906000526020600020905b81548152906001019060200180831161053757829003601f168201915b505050505081565b60008361ffff166000036105ad5760405162461bcd60e51b8152602060048201526018602482015277436861696e4964206d757374206e6f74206265207a65726f60401b604482015260640161014a565b6105bf6105ba8484610e36565b610e4c565b604051631ec59c7b60e11b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690633d8b38f69061060f90879087908790600401611360565b6020604051808303816000875af115801561062e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061065291906112e5565b949350505050565b6106986040518060400160405280602081526020017f7472616e736665724272696467654f776e657273686970286164647265737329815250610410565b60405163f2fde38b60e01b81526001600160a01b0382811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063f2fde38b90602401600060405180830381600087803b1580156106fb57600080fd5b505af115801561070f573d6000803e3d6000fd5b5050505050565b61071e610d1e565b8281811461077d5760405162461bcd60e51b815260206004820152602660248201527f496e70757420617272617973206d7573742068617665207468652073616d65206044820152650d8cadccee8d60d31b606482015260840161014a565b60005b81811015610a1557600086868381811061079c5761079c61137e565b90506020028101906107ae9190611394565b6040516107bc92919061106b565b60408051918290039091206001600160e01b03198116600090815260c96020529182208054919350906107ee90611279565b80601f016020809104026020016040519081016040528092919081815260200182805461081a90611279565b80156108675780601f1061083c57610100808354040283529160200191610867565b820191906000526020600020905b81548152906001019060200180831161084a57829003601f168201915b505050505090508585848181106108805761088061137e565b905060200201602081019061089591906113db565b80156108a057508051155b15610951578787848181106108b7576108b761137e565b90506020028101906108c99190611394565b6001600160e01b03198416600090815260c9602052604090206108ed929091610f9c565b507f9d424e54f4d851aabd288f6cc4946e5726d6b5c0e66ea4ef159a3c40bcc470fa8888858181106109215761092161137e565b90506020028101906109339190611394565b6001604051610944939291906113f8565b60405180910390a1610a0b565b8585848181106109635761096361137e565b905060200201602081019061097891906113db565b1580156109855750805115155b15610a0b576001600160e01b03198216600090815260c9602052604081206109ac91611020565b7f9d424e54f4d851aabd288f6cc4946e5726d6b5c0e66ea4ef159a3c40bcc470fa8888858181106109df576109df61137e565b90506020028101906109f19190611394565b6000604051610a02939291906113f8565b60405180910390a15b5050600101610780565b505050505050565b565b60655433906001600160a01b03168114610a8d5760405162461bcd60e51b815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f7420746865206044820152683732bb9037bbb732b960b91b606482015260840161014a565b6104bf81610e73565b610ab760405180606001604052806025815260200161149f60259139610410565b8261ffff16600003610b065760405162461bcd60e51b8152602060048201526018602482015277436861696e4964206d757374206e6f74206265207a65726f60401b604482015260640161014a565b610b136105ba8383610e36565b60405163a6c3d16560e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063a6c3d16590610b6390869086908690600401611360565b600060405180830381600087803b158015610b7d57600080fd5b505af1158015610b91573d6000803e3d6000fd5b50505050505050565b600054610100900460ff1615808015610bba5750600054600160ff909116105b80610bd45750303b158015610bd4575060005460ff166001145b610c375760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161014a565b6000805460ff191660011790558015610c5a576000805461ff0019166101001790555b610c6382610e8c565b80156104aa576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a15050565b610cb5610d1e565b606580546001600160a01b0383166001600160a01b03199091168117909155610ce66033546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b6033546001600160a01b03163314610a1d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161014a565b6001600160a01b038116610ddc5760405162461bcd60e51b815260206004820152602560248201527f696e76616c696420616365737320636f6e74726f6c206d616e61676572206164604482015264647265737360d81b606482015260840161014a565b609780546001600160a01b038381166001600160a01b031983168117909355604080519190921680825260208201939093527f66fd58e82f7b31a2a5c30e0888f3093efe4e111b00cd2b0c31fe014601293aa09101610ca1565b6000610e42828461141e565b60601c9392505050565b6001600160a01b0381166104bf576040516342bcdf7f60e11b815260040160405180910390fd5b606580546001600160a01b03191690556104bf81610ec4565b600054610100900460ff16610eb35760405162461bcd60e51b815260040161014a90611453565b610ebb610f16565b6104bf81610f45565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16610f3d5760405162461bcd60e51b815260040161014a90611453565b610a1d610f6c565b600054610100900460ff166104b65760405162461bcd60e51b815260040161014a90611453565b600054610100900460ff16610f935760405162461bcd60e51b815260040161014a90611453565b610a1d33610e73565b828054610fa890611279565b90600052602060002090601f016020900481019282610fca5760008555611010565b82601f10610fe35782800160ff19823516178555611010565b82800160010185558215611010579182015b82811115611010578235825591602001919060010190610ff5565b5061101c929150611056565b5090565b50805461102c90611279565b6000825580601f1061103c575050565b601f0160209004906000526020600020908101906104bf91905b5b8082111561101c5760008155600101611057565b8183823760009101908152919050565b60006020828403121561108d57600080fd5b81356001600160a01b03811681146110a457600080fd5b9392505050565b6000602082840312156110bd57600080fd5b81356001600160e01b0319811681146110a457600080fd5b6000815180845260005b818110156110fb576020818501810151868301820152016110df565b8181111561110d576000602083870101525b50601f01601f19169290920160200192915050565b6020815260006110a460208301846110d5565b60008060006040848603121561114a57600080fd5b833561ffff8116811461115c57600080fd5b9250602084013567ffffffffffffffff8082111561117957600080fd5b818601915086601f83011261118d57600080fd5b81358181111561119c57600080fd5b8760208285010111156111ae57600080fd5b6020830194508093505050509250925092565b60008083601f8401126111d357600080fd5b50813567ffffffffffffffff8111156111eb57600080fd5b6020830191508360208260051b850101111561120657600080fd5b9250929050565b6000806000806040858703121561122357600080fd5b843567ffffffffffffffff8082111561123b57600080fd5b611247888389016111c1565b9096509450602087013591508082111561126057600080fd5b5061126d878288016111c1565b95989497509550505050565b600181811c9082168061128d57607f821691505b6020821081036112ad57634e487b7160e01b600052602260045260246000fd5b50919050565b6001600160a01b0383168152604060208201819052600090610652908301846110d5565b80151581146104bf57600080fd5b6000602082840312156112f757600080fd5b81516110a4816112d7565b6001600160a01b0384811682528316602082015260606040820181905260009061132e908301846110d5565b95945050505050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b61ffff8416815260406020820152600061132e604083018486611337565b634e487b7160e01b600052603260045260246000fd5b6000808335601e198436030181126113ab57600080fd5b83018035915067ffffffffffffffff8211156113c657600080fd5b60200191503681900382131561120657600080fd5b6000602082840312156113ed57600080fd5b81356110a4816112d7565b60408152600061140c604083018587611337565b90508215156020830152949350505050565b6bffffffffffffffffffffffff19813581811691601485101561144b5780818660140360031b1b83161692505b505092915050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b60608201526080019056fe7365745472757374656452656d6f7465416464726573732875696e7431362c627974657329a2646970667358221220ac99e6bde2c9eb9bdd52a744515930950de54cf45081e77327e35b07ad11a96064736f6c634300080d0033", + "solcInputHash": "15770bc3af16acbd95d8914f14cae6d7", + "metadata": "{\"compiler\":{\"version\":\"0.8.25+commit.b61c2a91\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"XVSBridge_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"calledContract\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"methodSignature\",\"type\":\"string\"}],\"name\":\"Unauthorized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddressNotAllowed\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"signature\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"active\",\"type\":\"bool\"}],\"name\":\"FunctionRegistryChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldAccessControlManager\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAccessControlManager\",\"type\":\"address\"}],\"name\":\"NewAccessControlManager\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"stateMutability\":\"nonpayable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"XVSBridge\",\"outputs\":[{\"internalType\":\"contract IXVSProxyOFT\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"accessControlManager\",\"outputs\":[{\"internalType\":\"contract IAccessControlManagerV8\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"name\":\"functionRegistry\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"accessControlManager_\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"remoteChainId_\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"remoteAddress_\",\"type\":\"bytes\"}],\"name\":\"isTrustedRemote\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pendingOwner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"accessControlManager_\",\"type\":\"address\"}],\"name\":\"setAccessControlManager\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"remoteChainId_\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"remoteAddress_\",\"type\":\"bytes\"}],\"name\":\"setTrustedRemoteAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner_\",\"type\":\"address\"}],\"name\":\"transferBridgeOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string[]\",\"name\":\"signatures_\",\"type\":\"string[]\"},{\"internalType\":\"bool[]\",\"name\":\"active_\",\"type\":\"bool[]\"}],\"name\":\"upsertSignature\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Venus\",\"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 contract.\"}},\"isTrustedRemote(uint16,bytes)\":{\"custom:error\":\"ZeroAddressNotAllowed is thrown when remoteAddress_ contract address is zero.\",\"params\":{\"remoteAddress_\":\"Address of the destination bridge.\",\"remoteChainId_\":\"Chain Id of the destination chain.\"},\"returns\":{\"_0\":\"Bool indicating whether the remote chain is trusted or not.\"}},\"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:error\":\"ZeroAddressNotAllowed is thrown when remoteAddress_ contract address is zero.\",\"params\":{\"remoteAddress_\":\"Address of the destination bridge.\",\"remoteChainId_\":\"Chain Id of the destination chain.\"}},\"transferBridgeOwnership(address)\":{\"custom:access\":\"Controlled by AccessControlManager.\",\"params\":{\"newOwner_\":\"New owner of the XVS Bridge.\"}},\"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.\",\"custom:event\":\"Emits FunctionRegistryChanged if bool value of function changes.\",\"params\":{\"active_\":\"bool value, should be true to add function.\",\"signatures_\":\"Function signature to be added or removed.\"}}},\"stateVariables\":{\"XVSBridge\":{\"custom:oz-upgrades-unsafe-allow\":\"state-variable-immutable\"}},\"title\":\"XVSBridgeAdmin\",\"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\":\"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\":\"A mapping keeps track of function signature associated with function name string.\"},\"isTrustedRemote(uint16,bytes)\":{\"notice\":\"Returns true if remote address is trustedRemote corresponds to chainId_.\"},\"renounceOwnership()\":{\"notice\":\"Empty implementation of renounce ownership to avoid any mishappening.\"},\"setAccessControlManager(address)\":{\"notice\":\"Sets the address of AccessControlManager\"},\"setTrustedRemoteAddress(uint16,bytes)\":{\"notice\":\"Sets trusted remote on particular chain.\"},\"transferBridgeOwnership(address)\":{\"notice\":\"This function transfers the ownership of the bridge from this contract to new owner.\"},\"upsertSignature(string[],bool[])\":{\"notice\":\"A setter for the registry of functions that are allowed to be executed from proposals.\"}},\"notice\":\"The XVSBridgeAdmin contract extends a parent contract AccessControlledV8 for access control, and it manages an external contract called XVSProxyOFT. It maintains a registry of function signatures and names, allowing for dynamic function handling i.e checking of access control of interaction with only owner functions.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/Bridge/XVSBridgeAdmin.sol\":\"XVSBridgeAdmin\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.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() public virtual {\\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\":\"0x84efb8889801b0ac817324aff6acc691d07bbee816b671817132911d287a8c63\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.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. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby disabling 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\":\"0x4075622496acc77fd6d4de4cc30a8577a744d5c75afad33fdeacf1704d6eda98\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (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 * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\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\":\"0x89be10e757d242e9b18d5a32c9fbe2019f6d63052bbe46397a430a1d60d7f794\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.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 * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\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://consensys.net/diligence/blog/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.8.0/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(address target, bytes memory data, uint256 value) 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 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 (bool success, bytes memory returndata) = target.delegatecall(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\":\"0x9c80f545915582e63fe206c6ce27cbe85a86fc10b9cd2a0e8c9488fb7c2ee422\",\"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/governance-contracts/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\"},\"@venusprotocol/governance-contracts/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\"},\"@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/Bridge/XVSBridgeAdmin.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.25;\\n\\nimport { AccessControlledV8 } from \\\"@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV8.sol\\\";\\nimport { ensureNonzeroAddress } from \\\"@venusprotocol/solidity-utilities/contracts/validators.sol\\\";\\nimport { IXVSProxyOFT } from \\\"./interfaces/IXVSProxyOFT.sol\\\";\\n\\n/**\\n * @title XVSBridgeAdmin\\n * @author Venus\\n * @notice The XVSBridgeAdmin contract extends a parent contract AccessControlledV8 for access control, and it manages an external contract called XVSProxyOFT.\\n * It maintains a registry of function signatures and names,\\n * allowing for dynamic function handling i.e checking of access control of interaction with only owner functions.\\n */\\ncontract XVSBridgeAdmin is AccessControlledV8 {\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n IXVSProxyOFT public immutable XVSBridge;\\n /**\\n * @notice A mapping keeps track of function signature associated with function name string.\\n */\\n mapping(bytes4 => string) public functionRegistry;\\n\\n /**\\n * @notice emitted when function registry updated\\n */\\n event FunctionRegistryChanged(string signature, bool active);\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor(address XVSBridge_) {\\n ensureNonzeroAddress(XVSBridge_);\\n XVSBridge = IXVSProxyOFT(XVSBridge_);\\n _disableInitializers();\\n }\\n\\n /**\\n * @param accessControlManager_ Address of access control manager contract.\\n */\\n function initialize(address accessControlManager_) external initializer {\\n __AccessControlled_init(accessControlManager_);\\n }\\n\\n /**\\n * @notice Invoked when called function does not exist in the contract.\\n * @return Response of low level call.\\n * @custom:access Controlled by AccessControlManager.\\n */\\n fallback(bytes calldata data) external returns (bytes memory) {\\n string memory fun = _getFunctionName(msg.sig);\\n require(bytes(fun).length != 0, \\\"Function not found\\\");\\n _checkAccessAllowed(fun);\\n (bool ok, bytes memory res) = address(XVSBridge).call(data);\\n require(ok, \\\"call failed\\\");\\n return res;\\n }\\n\\n /**\\n * @notice Sets trusted remote on particular chain.\\n * @param remoteChainId_ Chain Id of the destination chain.\\n * @param remoteAddress_ Address of the destination bridge.\\n * @custom:access Controlled by AccessControlManager.\\n * @custom:error ZeroAddressNotAllowed is thrown when remoteAddress_ contract address is zero.\\n */\\n function setTrustedRemoteAddress(uint16 remoteChainId_, bytes calldata remoteAddress_) external {\\n _checkAccessAllowed(\\\"setTrustedRemoteAddress(uint16,bytes)\\\");\\n require(remoteChainId_ != 0, \\\"ChainId must not be zero\\\");\\n ensureNonzeroAddress(bytesToAddress(remoteAddress_));\\n XVSBridge.setTrustedRemoteAddress(remoteChainId_, remoteAddress_);\\n }\\n\\n /**\\n * @notice A setter for the 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 * @custom:event Emits FunctionRegistryChanged if bool value of function changes.\\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; ) {\\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 unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /**\\n * @notice This function transfers the ownership of the bridge from this contract to new owner.\\n * @param newOwner_ New owner of the XVS Bridge.\\n * @custom:access Controlled by AccessControlManager.\\n */\\n function transferBridgeOwnership(address newOwner_) external {\\n _checkAccessAllowed(\\\"transferBridgeOwnership(address)\\\");\\n XVSBridge.transferOwnership(newOwner_);\\n }\\n\\n /**\\n * @notice Returns true if remote address is trustedRemote corresponds to chainId_.\\n * @param remoteChainId_ Chain Id of the destination chain.\\n * @param remoteAddress_ Address of the destination bridge.\\n * @custom:error ZeroAddressNotAllowed is thrown when remoteAddress_ contract address is zero.\\n * @return Bool indicating whether the remote chain is trusted or not.\\n */\\n function isTrustedRemote(uint16 remoteChainId_, bytes calldata remoteAddress_) external returns (bool) {\\n require(remoteChainId_ != 0, \\\"ChainId must not be zero\\\");\\n ensureNonzeroAddress(bytesToAddress(remoteAddress_));\\n return XVSBridge.isTrustedRemote(remoteChainId_, remoteAddress_);\\n }\\n\\n /**\\n * @notice Empty implementation of renounce ownership to avoid any mishappening.\\n */\\n function renounceOwnership() public override {}\\n\\n /**\\n * @dev Returns function name string associated with function signature.\\n * @param signature_ Four bytes of function signature.\\n * @return Function signature corresponding to its hash.\\n */\\n function _getFunctionName(bytes4 signature_) internal view returns (string memory) {\\n return functionRegistry[signature_];\\n }\\n\\n /**\\n * @notice Converts given bytes into address.\\n * @param b Bytes to be converted into address.\\n * @return Converted address of given bytes.\\n */\\n function bytesToAddress(bytes calldata b) private pure returns (address) {\\n return address(uint160(bytes20(b)));\\n }\\n}\\n\",\"keccak256\":\"0x7a353b13a255e1bc73a8f482a8fc4ae1c5785400bf4795cb12eee4a2cb7fbb45\",\"license\":\"BSD-3-Clause\"},\"contracts/Bridge/interfaces/IXVSProxyOFT.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity ^0.8.25;\\n\\n/**\\n * @title IXVSProxyOFT\\n * @author Venus\\n * @notice Interface implemented by `XVSProxyOFT`.\\n */\\ninterface IXVSProxyOFT {\\n function transferOwnership(address addr) external;\\n\\n function setTrustedRemoteAddress(uint16 remoteChainId, bytes calldata srcAddress) external;\\n\\n function isTrustedRemote(uint16 remoteChainId, bytes calldata srcAddress) external returns (bool);\\n}\\n\",\"keccak256\":\"0xe72963d6cb0c35c473dbc43d5c761a8814015fc0f25c1d4490ef3273d5ed40b1\",\"license\":\"BSD-3-Clause\"}},\"version\":1}", + "bytecode": "0x60a060405234801561001057600080fd5b5060405161173838038061173883398101604081905261002f9161013c565b61003881610053565b6001600160a01b03811660805261004d61007d565b5061016c565b6001600160a01b03811661007a576040516342bcdf7f60e11b815260040160405180910390fd5b50565b600054610100900460ff16156100e95760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff9081161461013a576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b60006020828403121561014e57600080fd5b81516001600160a01b038116811461016557600080fd5b9392505050565b6080516115956101a3600039600081816101610152818161026c015281816105d6015281816106b70152610b2b01526115956000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c806379ba50971161008c578063b4a0bdf311610066578063b4a0bdf31461031b578063c4d66de81461032c578063e30c39781461033f578063f2fde38b14610350576100ea565b806379ba5097146102ef5780638da5cb5b146102f7578063a6c3d16514610308576100ea565b80633d8b38f6116100c85780633d8b38f6146102a65780633f90b540146102c95780634bb7453e146102dc578063715018a61461023c576100ea565b80630e32cb8614610229578063180d295c1461023e57806327a020ef14610267575b600036606060006101066000356001600160e01b031916610363565b905080516000036101535760405162461bcd60e51b8152602060048201526012602482015271119d5b98dd1a5bdb881b9bdd08199bdd5b9960721b60448201526064015b60405180910390fd5b61015c81610410565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168686604051610199929190610feb565b6000604051808303816000865af19150503d80600081146101d6576040519150601f19603f3d011682016040523d82523d6000602084013e6101db565b606091505b50915091508161021b5760405162461bcd60e51b815260206004820152600b60248201526a18d85b1b0819985a5b195960aa1b604482015260640161014a565b805195506020019350505050f35b61023c610237366004610ffb565b6104ae565b005b61025161024c36600461102b565b6104c2565b60405161025e919061109b565b60405180910390f35b61028e7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161025e565b6102b96102b43660046110ae565b61055c565b604051901515815260200161025e565b61023c6102d7366004610ffb565b61065a565b61023c6102ea366004611186565b610716565b61023c610a20565b6033546001600160a01b031661028e565b61023c6103163660046110ae565b610a97565b6097546001600160a01b031661028e565b61023c61033a366004610ffb565b610b9b565b6065546001600160a01b031661028e565b61023c61035e366004610ffb565b610cae565b6001600160e01b03198116600090815260c96020526040902080546060919061038b906111f2565b80601f01602080910402602001604051908101604052809291908181526020018280546103b7906111f2565b80156104045780601f106103d957610100808354040283529160200191610404565b820191906000526020600020905b8154815290600101906020018083116103e757829003601f168201915b50505050509050919050565b6097546040516318c5e8ab60e01b81526000916001600160a01b0316906318c5e8ab90610443903390869060040161122c565b602060405180830381865afa158015610460573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610484919061125e565b9050806104aa57333083604051634a3fa29360e01b815260040161014a9392919061127b565b5050565b6104b6610d1f565b6104bf81610d79565b50565b60c960205260009081526040902080546104db906111f2565b80601f0160208091040260200160405190810160405280929190818152602001828054610507906111f2565b80156105545780601f1061052957610100808354040283529160200191610554565b820191906000526020600020905b81548152906001019060200180831161053757829003601f168201915b505050505081565b60008361ffff166000036105ad5760405162461bcd60e51b8152602060048201526018602482015277436861696e4964206d757374206e6f74206265207a65726f60401b604482015260640161014a565b6105bf6105ba8484610e37565b610e4d565b604051631ec59c7b60e11b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690633d8b38f69061060f908790879087906004016112d9565b6020604051808303816000875af115801561062e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610652919061125e565b949350505050565b6106986040518060400160405280602081526020017f7472616e736665724272696467654f776e657273686970286164647265737329815250610410565b60405163f2fde38b60e01b81526001600160a01b0382811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063f2fde38b90602401600060405180830381600087803b1580156106fb57600080fd5b505af115801561070f573d6000803e3d6000fd5b5050505050565b61071e610d1f565b8281811461077d5760405162461bcd60e51b815260206004820152602660248201527f496e70757420617272617973206d7573742068617665207468652073616d65206044820152650d8cadccee8d60d31b606482015260840161014a565b60005b81811015610a1657600086868381811061079c5761079c6112f7565b90506020028101906107ae919061130d565b6040516107bc929190610feb565b60408051918290039091206001600160e01b03198116600090815260c96020529182208054919350906107ee906111f2565b80601f016020809104026020016040519081016040528092919081815260200182805461081a906111f2565b80156108675780601f1061083c57610100808354040283529160200191610867565b820191906000526020600020905b81548152906001019060200180831161084a57829003601f168201915b50505050509050858584818110610880576108806112f7565b90506020020160208101906108959190611354565b80156108a057508051155b15610952578787848181106108b7576108b76112f7565b90506020028101906108c9919061130d565b6001600160e01b03198416600090815260c960205260409020916108ee9190836113d4565b507f9d424e54f4d851aabd288f6cc4946e5726d6b5c0e66ea4ef159a3c40bcc470fa888885818110610922576109226112f7565b9050602002810190610934919061130d565b600160405161094593929190611494565b60405180910390a1610a0c565b858584818110610964576109646112f7565b90506020020160208101906109799190611354565b1580156109865750805115155b15610a0c576001600160e01b03198216600090815260c9602052604081206109ad91610f9d565b7f9d424e54f4d851aabd288f6cc4946e5726d6b5c0e66ea4ef159a3c40bcc470fa8888858181106109e0576109e06112f7565b90506020028101906109f2919061130d565b6000604051610a0393929190611494565b60405180910390a15b5050600101610780565b505050505050565b565b60655433906001600160a01b03168114610a8e5760405162461bcd60e51b815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f7420746865206044820152683732bb9037bbb732b960b91b606482015260840161014a565b6104bf81610e74565b610ab860405180606001604052806025815260200161153b60259139610410565b8261ffff16600003610b075760405162461bcd60e51b8152602060048201526018602482015277436861696e4964206d757374206e6f74206265207a65726f60401b604482015260640161014a565b610b146105ba8383610e37565b60405163a6c3d16560e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063a6c3d16590610b64908690869086906004016112d9565b600060405180830381600087803b158015610b7e57600080fd5b505af1158015610b92573d6000803e3d6000fd5b50505050505050565b600054610100900460ff1615808015610bbb5750600054600160ff909116105b80610bd55750303b158015610bd5575060005460ff166001145b610c385760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161014a565b6000805460ff191660011790558015610c5b576000805461ff0019166101001790555b610c6482610e8d565b80156104aa576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a15050565b610cb6610d1f565b606580546001600160a01b0383166001600160a01b03199091168117909155610ce76033546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b6033546001600160a01b03163314610a1e5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161014a565b6001600160a01b038116610ddd5760405162461bcd60e51b815260206004820152602560248201527f696e76616c696420616365737320636f6e74726f6c206d616e61676572206164604482015264647265737360d81b606482015260840161014a565b609780546001600160a01b038381166001600160a01b031983168117909355604080519190921680825260208201939093527f66fd58e82f7b31a2a5c30e0888f3093efe4e111b00cd2b0c31fe014601293aa09101610ca2565b6000610e4382846114ba565b60601c9392505050565b6001600160a01b0381166104bf576040516342bcdf7f60e11b815260040160405180910390fd5b606580546001600160a01b03191690556104bf81610ec5565b600054610100900460ff16610eb45760405162461bcd60e51b815260040161014a906114ef565b610ebc610f17565b6104bf81610f46565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16610f3e5760405162461bcd60e51b815260040161014a906114ef565b610a1e610f6d565b600054610100900460ff166104b65760405162461bcd60e51b815260040161014a906114ef565b600054610100900460ff16610f945760405162461bcd60e51b815260040161014a906114ef565b610a1e33610e74565b508054610fa9906111f2565b6000825580601f10610fb9575050565b601f0160209004906000526020600020908101906104bf91905b80821115610fe75760008155600101610fd3565b5090565b8183823760009101908152919050565b60006020828403121561100d57600080fd5b81356001600160a01b038116811461102457600080fd5b9392505050565b60006020828403121561103d57600080fd5b81356001600160e01b03198116811461102457600080fd5b6000815180845260005b8181101561107b5760208185018101518683018201520161105f565b506000602082860101526020601f19601f83011685010191505092915050565b6020815260006110246020830184611055565b6000806000604084860312156110c357600080fd5b833561ffff811681146110d557600080fd5b9250602084013567ffffffffffffffff808211156110f257600080fd5b818601915086601f83011261110657600080fd5b81358181111561111557600080fd5b87602082850101111561112757600080fd5b6020830194508093505050509250925092565b60008083601f84011261114c57600080fd5b50813567ffffffffffffffff81111561116457600080fd5b6020830191508360208260051b850101111561117f57600080fd5b9250929050565b6000806000806040858703121561119c57600080fd5b843567ffffffffffffffff808211156111b457600080fd5b6111c08883890161113a565b909650945060208701359150808211156111d957600080fd5b506111e68782880161113a565b95989497509550505050565b600181811c9082168061120657607f821691505b60208210810361122657634e487b7160e01b600052602260045260246000fd5b50919050565b6001600160a01b038316815260406020820181905260009061065290830184611055565b80151581146104bf57600080fd5b60006020828403121561127057600080fd5b815161102481611250565b6001600160a01b038481168252831660208201526060604082018190526000906112a790830184611055565b95945050505050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b61ffff841681526040602082015260006112a76040830184866112b0565b634e487b7160e01b600052603260045260246000fd5b6000808335601e1984360301811261132457600080fd5b83018035915067ffffffffffffffff82111561133f57600080fd5b60200191503681900382131561117f57600080fd5b60006020828403121561136657600080fd5b813561102481611250565b634e487b7160e01b600052604160045260246000fd5b601f8211156113cf576000816000526020600020601f850160051c810160208610156113b05750805b601f850160051c820191505b81811015610a16578281556001016113bc565b505050565b67ffffffffffffffff8311156113ec576113ec611371565b611400836113fa83546111f2565b83611387565b6000601f841160018114611434576000851561141c5750838201355b600019600387901b1c1916600186901b17835561070f565b600083815260209020601f19861690835b828110156114655786850135825560209485019460019092019101611445565b50868210156114825760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b6040815260006114a86040830185876112b0565b90508215156020830152949350505050565b6bffffffffffffffffffffffff1981358181169160148510156114e75780818660140360031b1b83161692505b505092915050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b60608201526080019056fe7365745472757374656452656d6f7465416464726573732875696e7431362c627974657329a264697066735822122071305fbafcd92775815df4985c46a13c15aabb4d1b88605c4f0e967df9f657df64736f6c63430008190033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100ea5760003560e01c806379ba50971161008c578063b4a0bdf311610066578063b4a0bdf31461031b578063c4d66de81461032c578063e30c39781461033f578063f2fde38b14610350576100ea565b806379ba5097146102ef5780638da5cb5b146102f7578063a6c3d16514610308576100ea565b80633d8b38f6116100c85780633d8b38f6146102a65780633f90b540146102c95780634bb7453e146102dc578063715018a61461023c576100ea565b80630e32cb8614610229578063180d295c1461023e57806327a020ef14610267575b600036606060006101066000356001600160e01b031916610363565b905080516000036101535760405162461bcd60e51b8152602060048201526012602482015271119d5b98dd1a5bdb881b9bdd08199bdd5b9960721b60448201526064015b60405180910390fd5b61015c81610410565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168686604051610199929190610feb565b6000604051808303816000865af19150503d80600081146101d6576040519150601f19603f3d011682016040523d82523d6000602084013e6101db565b606091505b50915091508161021b5760405162461bcd60e51b815260206004820152600b60248201526a18d85b1b0819985a5b195960aa1b604482015260640161014a565b805195506020019350505050f35b61023c610237366004610ffb565b6104ae565b005b61025161024c36600461102b565b6104c2565b60405161025e919061109b565b60405180910390f35b61028e7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161025e565b6102b96102b43660046110ae565b61055c565b604051901515815260200161025e565b61023c6102d7366004610ffb565b61065a565b61023c6102ea366004611186565b610716565b61023c610a20565b6033546001600160a01b031661028e565b61023c6103163660046110ae565b610a97565b6097546001600160a01b031661028e565b61023c61033a366004610ffb565b610b9b565b6065546001600160a01b031661028e565b61023c61035e366004610ffb565b610cae565b6001600160e01b03198116600090815260c96020526040902080546060919061038b906111f2565b80601f01602080910402602001604051908101604052809291908181526020018280546103b7906111f2565b80156104045780601f106103d957610100808354040283529160200191610404565b820191906000526020600020905b8154815290600101906020018083116103e757829003601f168201915b50505050509050919050565b6097546040516318c5e8ab60e01b81526000916001600160a01b0316906318c5e8ab90610443903390869060040161122c565b602060405180830381865afa158015610460573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610484919061125e565b9050806104aa57333083604051634a3fa29360e01b815260040161014a9392919061127b565b5050565b6104b6610d1f565b6104bf81610d79565b50565b60c960205260009081526040902080546104db906111f2565b80601f0160208091040260200160405190810160405280929190818152602001828054610507906111f2565b80156105545780601f1061052957610100808354040283529160200191610554565b820191906000526020600020905b81548152906001019060200180831161053757829003601f168201915b505050505081565b60008361ffff166000036105ad5760405162461bcd60e51b8152602060048201526018602482015277436861696e4964206d757374206e6f74206265207a65726f60401b604482015260640161014a565b6105bf6105ba8484610e37565b610e4d565b604051631ec59c7b60e11b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690633d8b38f69061060f908790879087906004016112d9565b6020604051808303816000875af115801561062e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610652919061125e565b949350505050565b6106986040518060400160405280602081526020017f7472616e736665724272696467654f776e657273686970286164647265737329815250610410565b60405163f2fde38b60e01b81526001600160a01b0382811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063f2fde38b90602401600060405180830381600087803b1580156106fb57600080fd5b505af115801561070f573d6000803e3d6000fd5b5050505050565b61071e610d1f565b8281811461077d5760405162461bcd60e51b815260206004820152602660248201527f496e70757420617272617973206d7573742068617665207468652073616d65206044820152650d8cadccee8d60d31b606482015260840161014a565b60005b81811015610a1657600086868381811061079c5761079c6112f7565b90506020028101906107ae919061130d565b6040516107bc929190610feb565b60408051918290039091206001600160e01b03198116600090815260c96020529182208054919350906107ee906111f2565b80601f016020809104026020016040519081016040528092919081815260200182805461081a906111f2565b80156108675780601f1061083c57610100808354040283529160200191610867565b820191906000526020600020905b81548152906001019060200180831161084a57829003601f168201915b50505050509050858584818110610880576108806112f7565b90506020020160208101906108959190611354565b80156108a057508051155b15610952578787848181106108b7576108b76112f7565b90506020028101906108c9919061130d565b6001600160e01b03198416600090815260c960205260409020916108ee9190836113d4565b507f9d424e54f4d851aabd288f6cc4946e5726d6b5c0e66ea4ef159a3c40bcc470fa888885818110610922576109226112f7565b9050602002810190610934919061130d565b600160405161094593929190611494565b60405180910390a1610a0c565b858584818110610964576109646112f7565b90506020020160208101906109799190611354565b1580156109865750805115155b15610a0c576001600160e01b03198216600090815260c9602052604081206109ad91610f9d565b7f9d424e54f4d851aabd288f6cc4946e5726d6b5c0e66ea4ef159a3c40bcc470fa8888858181106109e0576109e06112f7565b90506020028101906109f2919061130d565b6000604051610a0393929190611494565b60405180910390a15b5050600101610780565b505050505050565b565b60655433906001600160a01b03168114610a8e5760405162461bcd60e51b815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f7420746865206044820152683732bb9037bbb732b960b91b606482015260840161014a565b6104bf81610e74565b610ab860405180606001604052806025815260200161153b60259139610410565b8261ffff16600003610b075760405162461bcd60e51b8152602060048201526018602482015277436861696e4964206d757374206e6f74206265207a65726f60401b604482015260640161014a565b610b146105ba8383610e37565b60405163a6c3d16560e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063a6c3d16590610b64908690869086906004016112d9565b600060405180830381600087803b158015610b7e57600080fd5b505af1158015610b92573d6000803e3d6000fd5b50505050505050565b600054610100900460ff1615808015610bbb5750600054600160ff909116105b80610bd55750303b158015610bd5575060005460ff166001145b610c385760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161014a565b6000805460ff191660011790558015610c5b576000805461ff0019166101001790555b610c6482610e8d565b80156104aa576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a15050565b610cb6610d1f565b606580546001600160a01b0383166001600160a01b03199091168117909155610ce76033546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b6033546001600160a01b03163314610a1e5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161014a565b6001600160a01b038116610ddd5760405162461bcd60e51b815260206004820152602560248201527f696e76616c696420616365737320636f6e74726f6c206d616e61676572206164604482015264647265737360d81b606482015260840161014a565b609780546001600160a01b038381166001600160a01b031983168117909355604080519190921680825260208201939093527f66fd58e82f7b31a2a5c30e0888f3093efe4e111b00cd2b0c31fe014601293aa09101610ca2565b6000610e4382846114ba565b60601c9392505050565b6001600160a01b0381166104bf576040516342bcdf7f60e11b815260040160405180910390fd5b606580546001600160a01b03191690556104bf81610ec5565b600054610100900460ff16610eb45760405162461bcd60e51b815260040161014a906114ef565b610ebc610f17565b6104bf81610f46565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16610f3e5760405162461bcd60e51b815260040161014a906114ef565b610a1e610f6d565b600054610100900460ff166104b65760405162461bcd60e51b815260040161014a906114ef565b600054610100900460ff16610f945760405162461bcd60e51b815260040161014a906114ef565b610a1e33610e74565b508054610fa9906111f2565b6000825580601f10610fb9575050565b601f0160209004906000526020600020908101906104bf91905b80821115610fe75760008155600101610fd3565b5090565b8183823760009101908152919050565b60006020828403121561100d57600080fd5b81356001600160a01b038116811461102457600080fd5b9392505050565b60006020828403121561103d57600080fd5b81356001600160e01b03198116811461102457600080fd5b6000815180845260005b8181101561107b5760208185018101518683018201520161105f565b506000602082860101526020601f19601f83011685010191505092915050565b6020815260006110246020830184611055565b6000806000604084860312156110c357600080fd5b833561ffff811681146110d557600080fd5b9250602084013567ffffffffffffffff808211156110f257600080fd5b818601915086601f83011261110657600080fd5b81358181111561111557600080fd5b87602082850101111561112757600080fd5b6020830194508093505050509250925092565b60008083601f84011261114c57600080fd5b50813567ffffffffffffffff81111561116457600080fd5b6020830191508360208260051b850101111561117f57600080fd5b9250929050565b6000806000806040858703121561119c57600080fd5b843567ffffffffffffffff808211156111b457600080fd5b6111c08883890161113a565b909650945060208701359150808211156111d957600080fd5b506111e68782880161113a565b95989497509550505050565b600181811c9082168061120657607f821691505b60208210810361122657634e487b7160e01b600052602260045260246000fd5b50919050565b6001600160a01b038316815260406020820181905260009061065290830184611055565b80151581146104bf57600080fd5b60006020828403121561127057600080fd5b815161102481611250565b6001600160a01b038481168252831660208201526060604082018190526000906112a790830184611055565b95945050505050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b61ffff841681526040602082015260006112a76040830184866112b0565b634e487b7160e01b600052603260045260246000fd5b6000808335601e1984360301811261132457600080fd5b83018035915067ffffffffffffffff82111561133f57600080fd5b60200191503681900382131561117f57600080fd5b60006020828403121561136657600080fd5b813561102481611250565b634e487b7160e01b600052604160045260246000fd5b601f8211156113cf576000816000526020600020601f850160051c810160208610156113b05750805b601f850160051c820191505b81811015610a16578281556001016113bc565b505050565b67ffffffffffffffff8311156113ec576113ec611371565b611400836113fa83546111f2565b83611387565b6000601f841160018114611434576000851561141c5750838201355b600019600387901b1c1916600186901b17835561070f565b600083815260209020601f19861690835b828110156114655786850135825560209485019460019092019101611445565b50868210156114825760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b6040815260006114a86040830185876112b0565b90508215156020830152949350505050565b6bffffffffffffffffffffffff1981358181169160148510156114e75780818660140360031b1b83161692505b505092915050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b60608201526080019056fe7365745472757374656452656d6f7465416464726573732875696e7431362c627974657329a264697066735822122071305fbafcd92775815df4985c46a13c15aabb4d1b88605c4f0e967df9f657df64736f6c63430008190033", "devdoc": { "author": "Venus", + "events": { + "Initialized(uint8)": { + "details": "Triggered when the contract has been initialized or reinitialized." + } + }, "kind": "dev", "methods": { "acceptOwnership()": { @@ -489,7 +494,7 @@ "storageLayout": { "storage": [ { - "astId": 4452, + "astId": 2909, "contract": "contracts/Bridge/XVSBridgeAdmin.sol:XVSBridgeAdmin", "label": "_initialized", "offset": 0, @@ -497,7 +502,7 @@ "type": "t_uint8" }, { - "astId": 4455, + "astId": 2912, "contract": "contracts/Bridge/XVSBridgeAdmin.sol:XVSBridgeAdmin", "label": "_initializing", "offset": 1, @@ -505,7 +510,7 @@ "type": "t_bool" }, { - "astId": 4985, + "astId": 3442, "contract": "contracts/Bridge/XVSBridgeAdmin.sol:XVSBridgeAdmin", "label": "__gap", "offset": 0, @@ -513,7 +518,7 @@ "type": "t_array(t_uint256)50_storage" }, { - "astId": 4324, + "astId": 2781, "contract": "contracts/Bridge/XVSBridgeAdmin.sol:XVSBridgeAdmin", "label": "_owner", "offset": 0, @@ -521,7 +526,7 @@ "type": "t_address" }, { - "astId": 4444, + "astId": 2901, "contract": "contracts/Bridge/XVSBridgeAdmin.sol:XVSBridgeAdmin", "label": "__gap", "offset": 0, @@ -529,7 +534,7 @@ "type": "t_array(t_uint256)49_storage" }, { - "astId": 4233, + "astId": 2690, "contract": "contracts/Bridge/XVSBridgeAdmin.sol:XVSBridgeAdmin", "label": "_pendingOwner", "offset": 0, @@ -537,7 +542,7 @@ "type": "t_address" }, { - "astId": 4312, + "astId": 2769, "contract": "contracts/Bridge/XVSBridgeAdmin.sol:XVSBridgeAdmin", "label": "__gap", "offset": 0, @@ -545,15 +550,15 @@ "type": "t_array(t_uint256)49_storage" }, { - "astId": 8479, + "astId": 4629, "contract": "contracts/Bridge/XVSBridgeAdmin.sol:XVSBridgeAdmin", "label": "_accessControlManager", "offset": 0, "slot": "151", - "type": "t_contract(IAccessControlManagerV8)8664" + "type": "t_contract(IAccessControlManagerV8)4814" }, { - "astId": 8484, + "astId": 4634, "contract": "contracts/Bridge/XVSBridgeAdmin.sol:XVSBridgeAdmin", "label": "__gap", "offset": 0, @@ -561,7 +566,7 @@ "type": "t_array(t_uint256)49_storage" }, { - "astId": 10420, + "astId": 6592, "contract": "contracts/Bridge/XVSBridgeAdmin.sol:XVSBridgeAdmin", "label": "functionRegistry", "offset": 0, @@ -597,7 +602,7 @@ "label": "bytes4", "numberOfBytes": "4" }, - "t_contract(IAccessControlManagerV8)8664": { + "t_contract(IAccessControlManagerV8)4814": { "encoding": "inplace", "label": "contract IAccessControlManagerV8", "numberOfBytes": "20" diff --git a/deployments/arbitrumsepolia/XVSBridgeAdmin_Proxy.json b/deployments/arbitrumsepolia/XVSBridgeAdmin_Proxy.json index d9c4842..cb7953c 100644 --- a/deployments/arbitrumsepolia/XVSBridgeAdmin_Proxy.json +++ b/deployments/arbitrumsepolia/XVSBridgeAdmin_Proxy.json @@ -1,5 +1,5 @@ { - "address": "0x0DC3d6717727FD5a023e41bA8134640ca18f3E48", + "address": "0xc94578caCC89a29B044a0a1D54d20d48A645E5C8", "abi": [ { "inputs": [ @@ -146,82 +146,82 @@ "type": "receive" } ], - "transactionHash": "0xb63f1d8df57502b4f58552865096a179a74b158ede50c27deff17a6fcb6adb17", + "transactionHash": "0x9a6dd34ffe5012028fb3d0b00d4629f535ce47e7e22efa422061bb58cd35c57d", "receipt": { "to": null, "from": "0x638Eb8DFfF094Fd1d52c5A198b44984806C521E5", - "contractAddress": "0x0DC3d6717727FD5a023e41bA8134640ca18f3E48", + "contractAddress": "0xc94578caCC89a29B044a0a1D54d20d48A645E5C8", "transactionIndex": 2, - "gasUsed": "1679305", - "logsBloom": "0x00000000000000000000000200000040400020000000000400800000000000040000000000000000000000000000000000000000000000000000000000008000000000000000004000000000000002000001000000000000000000000000000000000000020000040000000000000800000000800000000000000000000000400000000000000000000000000000000000000000000080000000000000800000000000000000000000000001000400000000000000800000000000000000000000000020000000000000000000040000000000000400000000000000000020000200000000000000000000000000000000000800000000000000000000000000", - "blockHash": "0xd4fb8336770134ab82a80135f27f86255bfeed6ca616c6c7b8a38a25819d8a32", - "transactionHash": "0xb63f1d8df57502b4f58552865096a179a74b158ede50c27deff17a6fcb6adb17", + "gasUsed": "796839", + "logsBloom": "0x00000000000000000000000200000000400000000000000400800000000000040000000000000020000000000000010000000000000000000000000000008100000000000000000000000000000002000001000000000000000000000000000000000000020000000000000000000800000000800000000000000000000000400000000000000000020000000000000000000000000080000000000000800000000000000000000000000000000400000000000000800000000000000000000000000020000000000000000000040000000000000400000000000000000020000000000000000000000000000000000000000800000000400000000001000000", + "blockHash": "0xc7e0dfe3107e808507d63110a4b12e2408e7d0df4278fec1fbba0ba5e0d09c41", + "transactionHash": "0x9a6dd34ffe5012028fb3d0b00d4629f535ce47e7e22efa422061bb58cd35c57d", "logs": [ { "transactionIndex": 2, - "blockNumber": 27132301, - "transactionHash": "0xb63f1d8df57502b4f58552865096a179a74b158ede50c27deff17a6fcb6adb17", - "address": "0x0DC3d6717727FD5a023e41bA8134640ca18f3E48", + "blockNumber": 36234810, + "transactionHash": "0x9a6dd34ffe5012028fb3d0b00d4629f535ce47e7e22efa422061bb58cd35c57d", + "address": "0xc94578caCC89a29B044a0a1D54d20d48A645E5C8", "topics": [ "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", - "0x000000000000000000000000d2048bd9e1d9a515cc57e270d0928b1127348ae1" + "0x0000000000000000000000003514fb2bbaf4d749af5908311b4c1867beb349cb" ], "data": "0x", - "logIndex": 4, - "blockHash": "0xd4fb8336770134ab82a80135f27f86255bfeed6ca616c6c7b8a38a25819d8a32" + "logIndex": 1, + "blockHash": "0xc7e0dfe3107e808507d63110a4b12e2408e7d0df4278fec1fbba0ba5e0d09c41" }, { "transactionIndex": 2, - "blockNumber": 27132301, - "transactionHash": "0xb63f1d8df57502b4f58552865096a179a74b158ede50c27deff17a6fcb6adb17", - "address": "0x0DC3d6717727FD5a023e41bA8134640ca18f3E48", + "blockNumber": 36234810, + "transactionHash": "0x9a6dd34ffe5012028fb3d0b00d4629f535ce47e7e22efa422061bb58cd35c57d", + "address": "0xc94578caCC89a29B044a0a1D54d20d48A645E5C8", "topics": [ "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x000000000000000000000000638eb8dfff094fd1d52c5a198b44984806c521e5" ], "data": "0x", - "logIndex": 5, - "blockHash": "0xd4fb8336770134ab82a80135f27f86255bfeed6ca616c6c7b8a38a25819d8a32" + "logIndex": 2, + "blockHash": "0xc7e0dfe3107e808507d63110a4b12e2408e7d0df4278fec1fbba0ba5e0d09c41" }, { "transactionIndex": 2, - "blockNumber": 27132301, - "transactionHash": "0xb63f1d8df57502b4f58552865096a179a74b158ede50c27deff17a6fcb6adb17", - "address": "0x0DC3d6717727FD5a023e41bA8134640ca18f3E48", + "blockNumber": 36234810, + "transactionHash": "0x9a6dd34ffe5012028fb3d0b00d4629f535ce47e7e22efa422061bb58cd35c57d", + "address": "0xc94578caCC89a29B044a0a1D54d20d48A645E5C8", "topics": ["0x66fd58e82f7b31a2a5c30e0888f3093efe4e111b00cd2b0c31fe014601293aa0"], "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a36ad96441cb931d8dfeaaac97d3fab4b39e590f", - "logIndex": 6, - "blockHash": "0xd4fb8336770134ab82a80135f27f86255bfeed6ca616c6c7b8a38a25819d8a32" + "logIndex": 3, + "blockHash": "0xc7e0dfe3107e808507d63110a4b12e2408e7d0df4278fec1fbba0ba5e0d09c41" }, { "transactionIndex": 2, - "blockNumber": 27132301, - "transactionHash": "0xb63f1d8df57502b4f58552865096a179a74b158ede50c27deff17a6fcb6adb17", - "address": "0x0DC3d6717727FD5a023e41bA8134640ca18f3E48", + "blockNumber": 36234810, + "transactionHash": "0x9a6dd34ffe5012028fb3d0b00d4629f535ce47e7e22efa422061bb58cd35c57d", + "address": "0xc94578caCC89a29B044a0a1D54d20d48A645E5C8", "topics": ["0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498"], "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 7, - "blockHash": "0xd4fb8336770134ab82a80135f27f86255bfeed6ca616c6c7b8a38a25819d8a32" + "logIndex": 4, + "blockHash": "0xc7e0dfe3107e808507d63110a4b12e2408e7d0df4278fec1fbba0ba5e0d09c41" }, { "transactionIndex": 2, - "blockNumber": 27132301, - "transactionHash": "0xb63f1d8df57502b4f58552865096a179a74b158ede50c27deff17a6fcb6adb17", - "address": "0x0DC3d6717727FD5a023e41bA8134640ca18f3E48", + "blockNumber": 36234810, + "transactionHash": "0x9a6dd34ffe5012028fb3d0b00d4629f535ce47e7e22efa422061bb58cd35c57d", + "address": "0xc94578caCC89a29B044a0a1D54d20d48A645E5C8", "topics": ["0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f"], "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a78a1df376c3ceebc5fab574fe6eddbbf76fd03e", - "logIndex": 8, - "blockHash": "0xd4fb8336770134ab82a80135f27f86255bfeed6ca616c6c7b8a38a25819d8a32" + "logIndex": 5, + "blockHash": "0xc7e0dfe3107e808507d63110a4b12e2408e7d0df4278fec1fbba0ba5e0d09c41" } ], - "blockNumber": 27132301, - "cumulativeGasUsed": "3399219", + "blockNumber": 36234810, + "cumulativeGasUsed": "823530", "status": 1, "byzantium": true }, "args": [ - "0xd2048bD9e1D9A515cc57E270D0928B1127348ae1", + "0x3514FB2bbAf4D749af5908311B4c1867Beb349cb", "0xA78A1Df376c3CEeBC5Fab574fe6EdDbbF76fd03e", "0xc4d66de8000000000000000000000000a36ad96441cb931d8dfeaaac97d3fab4b39e590f" ], diff --git a/deployments/arbitrumsepolia/XVSProxyOFTDest.json b/deployments/arbitrumsepolia/XVSProxyOFTDest.json index eaeacb0..c1065e4 100644 --- a/deployments/arbitrumsepolia/XVSProxyOFTDest.json +++ b/deployments/arbitrumsepolia/XVSProxyOFTDest.json @@ -1,5 +1,5 @@ { - "address": "0xE9B66800E63888DE29c4c9131faadbDbDCfae917", + "address": "0xFdC5cEC63FD167DA46cF006585b30D03B104eFD4", "abi": [ { "inputs": [ @@ -1891,77 +1891,91 @@ "type": "function" } ], - "transactionHash": "0x2c8ea2c43da6fbfc9ceb99680d2e3ab9ceae078c07ac66c19d98e3575c2431ea", + "transactionHash": "0x2030a4a82692364c0fa775792e6df52ac3747b0a5c6b732f922f581d968939bd", "receipt": { "to": null, "from": "0x638Eb8DFfF094Fd1d52c5A198b44984806C521E5", - "contractAddress": "0xE9B66800E63888DE29c4c9131faadbDbDCfae917", - "transactionIndex": 3, - "gasUsed": "9090719", - "logsBloom": "0x00000000000000000000000200000000000000000000000400800000000000040000000000000000000000000000000008000000000000000000200000000000000000000000000000080000000000000001000020000000000000000000000000000000020000000000000000000800000000000000000000000000800000400000000000000000000000000000000000000000100000000000000000000080400000000000000000080000100000000000002010000000040000000000000000000000000000000000000000000000000000000200000000000000000020000000000000000000000000400000000000000000000000000000000000000000", - "blockHash": "0xd1e95873b5672aabc7655eeac7b98236263e78e84239aaef04b75a308c71efed", - "transactionHash": "0x2c8ea2c43da6fbfc9ceb99680d2e3ab9ceae078c07ac66c19d98e3575c2431ea", + "contractAddress": "0xFdC5cEC63FD167DA46cF006585b30D03B104eFD4", + "transactionIndex": 1, + "gasUsed": "4834652", + "logsBloom": "0x00000000000080000000000200000000000000000000004400800000000000040000000000000000000000000000000008000000000000000000200040000800000000000000000000080000000000000001000020000000000000000000000002000000020000000000000000000800000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080400000000000000000000000100000000000000010000000040008000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xa0508fe3d67ef2e809aebf91e112555e923f00e94cf0408215aaa81aa9a21b11", + "transactionHash": "0x2030a4a82692364c0fa775792e6df52ac3747b0a5c6b732f922f581d968939bd", "logs": [ { - "transactionIndex": 3, - "blockNumber": 27132260, - "transactionHash": "0x2c8ea2c43da6fbfc9ceb99680d2e3ab9ceae078c07ac66c19d98e3575c2431ea", - "address": "0xE9B66800E63888DE29c4c9131faadbDbDCfae917", + "transactionIndex": 1, + "blockNumber": 36234780, + "transactionHash": "0x2030a4a82692364c0fa775792e6df52ac3747b0a5c6b732f922f581d968939bd", + "address": "0xFdC5cEC63FD167DA46cF006585b30D03B104eFD4", "topics": [ "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x000000000000000000000000638eb8dfff094fd1d52c5a198b44984806c521e5" ], "data": "0x", - "logIndex": 20, - "blockHash": "0xd1e95873b5672aabc7655eeac7b98236263e78e84239aaef04b75a308c71efed" + "logIndex": 0, + "blockHash": "0xa0508fe3d67ef2e809aebf91e112555e923f00e94cf0408215aaa81aa9a21b11" }, { - "transactionIndex": 3, - "blockNumber": 27132260, - "transactionHash": "0x2c8ea2c43da6fbfc9ceb99680d2e3ab9ceae078c07ac66c19d98e3575c2431ea", - "address": "0xE9B66800E63888DE29c4c9131faadbDbDCfae917", + "transactionIndex": 1, + "blockNumber": 36234780, + "transactionHash": "0x2030a4a82692364c0fa775792e6df52ac3747b0a5c6b732f922f581d968939bd", + "address": "0xFdC5cEC63FD167DA46cF006585b30D03B104eFD4", "topics": [ "0x0b673f021ff9a27bbe58f282908695869e130b3103029190387b83650806c2c3", - "0x00000000000000000000000047fa6e9f717c9eb081c4734ffb5a1ecd70508891" + "0x000000000000000000000000877dc896e7b13096d3827872e396927bbe704407" ], "data": "0x", - "logIndex": 21, - "blockHash": "0xd1e95873b5672aabc7655eeac7b98236263e78e84239aaef04b75a308c71efed" + "logIndex": 1, + "blockHash": "0xa0508fe3d67ef2e809aebf91e112555e923f00e94cf0408215aaa81aa9a21b11" }, { - "transactionIndex": 3, - "blockNumber": 27132260, - "transactionHash": "0x2c8ea2c43da6fbfc9ceb99680d2e3ab9ceae078c07ac66c19d98e3575c2431ea", - "address": "0xE9B66800E63888DE29c4c9131faadbDbDCfae917", + "transactionIndex": 1, + "blockNumber": 36234780, + "transactionHash": "0x2030a4a82692364c0fa775792e6df52ac3747b0a5c6b732f922f581d968939bd", + "address": "0xFdC5cEC63FD167DA46cF006585b30D03B104eFD4", "topics": [ "0x05cd89403c6bdeac21c2ff33de395121a31fa1bc2bf3adf4825f1f86e79969dd", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000006708bad042916b47311c8078b29d7f432342102f" ], "data": "0x", - "logIndex": 22, - "blockHash": "0xd1e95873b5672aabc7655eeac7b98236263e78e84239aaef04b75a308c71efed" + "logIndex": 2, + "blockHash": "0xa0508fe3d67ef2e809aebf91e112555e923f00e94cf0408215aaa81aa9a21b11" } ], - "blockNumber": 27132260, - "cumulativeGasUsed": "10502621", + "blockNumber": 36234780, + "cumulativeGasUsed": "4834652", "status": 1, "byzantium": true }, "args": [ - "0x47fA6E9F717c9eB081c4734FfB5a1EcD70508891", + "0x877Dc896e7b13096D3827872e396927BbE704407", 8, "0x6098e96a28E02f27B1e6BD381f870F1C8Bd169d3", "0x6708bAd042916B47311c8078b29d7f432342102F" ], "numDeployments": 1, - "solcInputHash": "f2046c3ab03975d1be43bca1cf657398", - "metadata": "{\"compiler\":{\"version\":\"0.8.13+commit.abaa5c0e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress_\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"sharedDecimals_\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"lzEndpoint_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"oracle_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"sweepAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"balance\",\"type\":\"uint256\"}],\"name\":\"InsufficientBalance\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddressNotAllowed\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_nonce\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_hash\",\"type\":\"bytes32\"}],\"name\":\"CallOFTReceivedSuccess\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"srcChainId\",\"type\":\"uint16\"},{\"indexed\":true,\"internalType\":\"bytes\",\"name\":\"srcAddress\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"nonce\",\"type\":\"uint64\"}],\"name\":\"DropFailedMessage\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"innerToken\",\"type\":\"address\"}],\"name\":\"InnerTokenAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_nonce\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_payload\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_reason\",\"type\":\"bytes\"}],\"name\":\"MessageFailed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"NonContractAddress\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"oldOracle\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOracle\",\"type\":\"address\"}],\"name\":\"OracleChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"ReceiveFromChain\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_nonce\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_payloadHash\",\"type\":\"bytes32\"}],\"name\":\"RetryMessageSuccess\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"_toAddress\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"SendToChain\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"chainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldMaxLimit\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newMaxLimit\",\"type\":\"uint256\"}],\"name\":\"SetMaxDailyLimit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"chainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldMaxLimit\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newMaxLimit\",\"type\":\"uint256\"}],\"name\":\"SetMaxDailyReceiveLimit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"chainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldMaxLimit\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newMaxLimit\",\"type\":\"uint256\"}],\"name\":\"SetMaxSingleReceiveTransactionLimit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"chainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldMaxLimit\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newMaxLimit\",\"type\":\"uint256\"}],\"name\":\"SetMaxSingleTransactionLimit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"_type\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_minDstGas\",\"type\":\"uint256\"}],\"name\":\"SetMinDstGas\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"precrime\",\"type\":\"address\"}],\"name\":\"SetPrecrime\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"_remoteChainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_path\",\"type\":\"bytes\"}],\"name\":\"SetTrustedRemote\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"_remoteChainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_remoteAddress\",\"type\":\"bytes\"}],\"name\":\"SetTrustedRemoteAddress\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"isWhitelist\",\"type\":\"bool\"}],\"name\":\"SetWhitelist\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"sweepAmount\",\"type\":\"uint256\"}],\"name\":\"SweepToken\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"chainId\",\"type\":\"uint16\"}],\"name\":\"TrustedRemoteRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bool\",\"name\":\"enabled\",\"type\":\"bool\"}],\"name\":\"UpdateSendAndCallEnabled\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_PAYLOAD_SIZE_LIMIT\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"NO_EXTRA_GAS\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PT_SEND\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PT_SEND_AND_CALL\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"_nonce\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"_from\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_payload\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"_gasForCall\",\"type\":\"uint256\"}],\"name\":\"callOnOFTReceived\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"chainIdToLast24HourReceiveWindowStart\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"chainIdToLast24HourReceived\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"chainIdToLast24HourTransferred\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"chainIdToLast24HourWindowStart\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"chainIdToMaxDailyLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"chainIdToMaxDailyReceiveLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"chainIdToMaxSingleReceiveTransactionLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"chainIdToMaxSingleTransactionLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"circulatingSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"name\":\"creditedPackets\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"srcChainId_\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"srcAddress_\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"nonce_\",\"type\":\"uint64\"}],\"name\":\"dropFailedMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes32\",\"name\":\"_toAddress\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_payload\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"_dstGasForCall\",\"type\":\"uint64\"},{\"internalType\":\"bool\",\"name\":\"_useZro\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"_adapterParams\",\"type\":\"bytes\"}],\"name\":\"estimateSendAndCallFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"nativeFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"zroFee\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes32\",\"name\":\"_toAddress\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"_useZro\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"_adapterParams\",\"type\":\"bytes\"}],\"name\":\"estimateSendFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"nativeFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"zroFee\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"name\":\"failedMessages\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"}],\"name\":\"forceResumeReceive\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_version\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"_chainId\",\"type\":\"uint16\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_configType\",\"type\":\"uint256\"}],\"name\":\"getConfig\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_remoteChainId\",\"type\":\"uint16\"}],\"name\":\"getTrustedRemoteAddress\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from_\",\"type\":\"address\"},{\"internalType\":\"uint16\",\"name\":\"dstChainId_\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"amount_\",\"type\":\"uint256\"}],\"name\":\"isEligibleToSend\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"eligibleToSend\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"maxSingleTransactionLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxDailyLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountInUsd\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"transferredInWindow\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"last24HourWindowStart\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"isWhiteListedUser\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"}],\"name\":\"isTrustedRemote\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lzEndpoint\",\"outputs\":[{\"internalType\":\"contract ILayerZeroEndpoint\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"_nonce\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"_payload\",\"type\":\"bytes\"}],\"name\":\"lzReceive\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"minDstGasLookup\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"_nonce\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"_payload\",\"type\":\"bytes\"}],\"name\":\"nonblockingLzReceive\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"oracle\",\"outputs\":[{\"internalType\":\"contract ResilientOracleInterface\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"payloadSizeLimitLookup\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"precrime\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"remoteChainId_\",\"type\":\"uint16\"}],\"name\":\"removeTrustedRemote\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"_nonce\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"_payload\",\"type\":\"bytes\"}],\"name\":\"retryMessage\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from_\",\"type\":\"address\"},{\"internalType\":\"uint16\",\"name\":\"dstChainId_\",\"type\":\"uint16\"},{\"internalType\":\"bytes32\",\"name\":\"toAddress_\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"amount_\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"payload_\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"dstGasForCall_\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"address payable\",\"name\":\"refundAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"zroPaymentAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"adapterParams\",\"type\":\"bytes\"}],\"internalType\":\"struct ICommonOFT.LzCallParams\",\"name\":\"callparams_\",\"type\":\"tuple\"}],\"name\":\"sendAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sendAndCallEnabled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes32\",\"name\":\"_toAddress\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"address payable\",\"name\":\"refundAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"zroPaymentAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"adapterParams\",\"type\":\"bytes\"}],\"internalType\":\"struct ICommonOFT.LzCallParams\",\"name\":\"_callParams\",\"type\":\"tuple\"}],\"name\":\"sendFrom\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_version\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"_chainId\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"_configType\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_config\",\"type\":\"bytes\"}],\"name\":\"setConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"chainId_\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"limit_\",\"type\":\"uint256\"}],\"name\":\"setMaxDailyLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"chainId_\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"limit_\",\"type\":\"uint256\"}],\"name\":\"setMaxDailyReceiveLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"chainId_\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"limit_\",\"type\":\"uint256\"}],\"name\":\"setMaxSingleReceiveTransactionLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"chainId_\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"limit_\",\"type\":\"uint256\"}],\"name\":\"setMaxSingleTransactionLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"_packetType\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"_minGas\",\"type\":\"uint256\"}],\"name\":\"setMinDstGas\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"oracleAddress_\",\"type\":\"address\"}],\"name\":\"setOracle\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"_size\",\"type\":\"uint256\"}],\"name\":\"setPayloadSizeLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_precrime\",\"type\":\"address\"}],\"name\":\"setPrecrime\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_version\",\"type\":\"uint16\"}],\"name\":\"setReceiveVersion\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_version\",\"type\":\"uint16\"}],\"name\":\"setSendVersion\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_remoteChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_path\",\"type\":\"bytes\"}],\"name\":\"setTrustedRemote\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_remoteChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_remoteAddress\",\"type\":\"bytes\"}],\"name\":\"setTrustedRemoteAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user_\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"val_\",\"type\":\"bool\"}],\"name\":\"setWhitelist\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sharedDecimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"token_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to_\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount_\",\"type\":\"uint256\"}],\"name\":\"sweepToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"token\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"trustedRemoteLookup\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"enabled_\",\"type\":\"bool\"}],\"name\":\"updateSendAndCallEnabled\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"whitelist\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Venus\",\"kind\":\"dev\",\"methods\":{\"circulatingSupply()\":{\"returns\":{\"_0\":\"total circulating supply of the token on the destination chain.\"}},\"dropFailedMessage(uint16,bytes,uint64)\":{\"custom:access\":\"Only owner\",\"custom:event\":\"Emits DropFailedMessage on clearance of failed message.\",\"params\":{\"nonce_\":\"Nonce_ of the transaction\",\"srcAddress_\":\"Address of source followed by current bridge address\",\"srcChainId_\":\"Chain id of source\"}},\"estimateSendFee(uint16,bytes32,uint256,bool,bytes)\":{\"details\":\"estimate send token `_tokenId` to (`_dstChainId`, `_toAddress`) _dstChainId - L0 defined chain id to send tokens too _toAddress - dynamic bytes array which contains the address to whom you are sending tokens to on the dstChain _amount - amount of the tokens to transfer _useZro - indicates to use zro to pay L0 fees _adapterParam - flexible bytes array to indicate messaging adapter services in L0\"},\"isEligibleToSend(address,uint16,uint256)\":{\"details\":\"This external view function assesses whether the specified sender is eligible to transfer the given amount to the specified destination chain. It considers factors such as whitelisting, transaction limits, and a 24-hour window.\",\"params\":{\"amount_\":\"The quantity of tokens to be transferred.\",\"dstChainId_\":\"Indicates destination chain.\",\"from_\":\"The sender's address initiating the transfer.\"},\"returns\":{\"amountInUsd\":\"The equivalent amount in USD based on the oracle price.\",\"eligibleToSend\":\"A boolean indicating whether the sender is eligible to transfer the tokens.\",\"isWhiteListedUser\":\"A boolean indicating whether the sender is whitelisted.\",\"last24HourWindowStart\":\"The timestamp when the current 24-hour window started.\",\"maxDailyLimit\":\"The maximum daily limit for transactions.\",\"maxSingleTransactionLimit\":\"The maximum limit for a single transaction.\",\"transferredInWindow\":\"The total amount transferred in the current 24-hour window.\"}},\"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.\"},\"removeTrustedRemote(uint16)\":{\"custom:access\":\"Only owner.\",\"custom:event\":\"Emits TrustedRemoteRemoved once chain id is removed from trusted remote.\",\"params\":{\"remoteChainId_\":\"The chain's id corresponds to setting the trusted remote to empty.\"}},\"sendAndCall(address,uint16,bytes32,uint256,bytes,uint64,(address,address,bytes))\":{\"details\":\"This internal override function enables the contract to send tokens and invoke calls on the specified destination chain. It checks whether the sendAndCall feature is enabled before proceeding with the transfer.\",\"params\":{\"amount_\":\"Amount of tokens that will be transferred.\",\"callparams_\":\"Additional parameters, including refund address, ZRO payment address, and adapter params.\",\"dstChainId_\":\"Destination chain id on which tokens will be send.\",\"dstGasForCall_\":\"The amount of gas allocated for the call on the destination chain.\",\"from_\":\"Address from which tokens will be debited.\",\"payload_\":\"Additional data payload for the call on the destination chain.\",\"toAddress_\":\"Address on which tokens will be credited on destination chain.\"}},\"sendFrom(address,uint16,bytes32,uint256,(address,address,bytes))\":{\"details\":\"send `_amount` amount of token to (`_dstChainId`, `_toAddress`) from `_from` `_from` the owner of token `_dstChainId` the destination chain identifier `_toAddress` can be any size depending on the `dstChainId`. `_amount` the quantity of tokens in wei `_refundAddress` the address LayerZero refunds if too much message fee is sent `_zroPaymentAddress` set to address(0x0) if not paying in ZRO (LayerZero Token) `_adapterParams` is a flexible bytes array to indicate messaging adapter services\"},\"setMaxDailyLimit(uint16,uint256)\":{\"custom:access\":\"Only owner.\",\"custom:event\":\"Emits setMaxDailyLimit with old and new limit associated with chain id.\",\"params\":{\"chainId_\":\"Destination chain id.\",\"limit_\":\"Amount in USD(scaled with 18 decimals).\"}},\"setMaxDailyReceiveLimit(uint16,uint256)\":{\"custom:access\":\"Only owner.\",\"custom:event\":\"Emits setMaxDailyReceiveLimit with old and new limit associated with chain id.\",\"params\":{\"chainId_\":\"The destination chain ID.\",\"limit_\":\"The new maximum daily limit in USD(scaled with 18 decimals).\"}},\"setMaxSingleReceiveTransactionLimit(uint16,uint256)\":{\"custom:access\":\"Only owner.\",\"custom:event\":\"Emits setMaxSingleReceiveTransactionLimit with old and new limit associated with chain id.\",\"params\":{\"chainId_\":\"The destination chain ID.\",\"limit_\":\"The new maximum limit in USD(scaled with 18 decimals).\"}},\"setMaxSingleTransactionLimit(uint16,uint256)\":{\"custom:access\":\"Only owner.\",\"custom:event\":\"Emits SetMaxSingleTransactionLimit with old and new limit associated with chain id.\",\"params\":{\"chainId_\":\"Destination chain id.\",\"limit_\":\"Amount in USD(scaled with 18 decimals).\"}},\"setOracle(address)\":{\"custom:access\":\"Only owner.\",\"custom:event\":\"Emits OracleChanged with old and new oracle address.\",\"details\":\"Reverts if the new address is zero.\",\"params\":{\"oracleAddress_\":\"The new address of the ResilientOracle contract.\"}},\"setWhitelist(address,bool)\":{\"custom:access\":\"Only owner.\",\"custom:event\":\"Emits setWhitelist.\",\"params\":{\"user_\":\"Address to be add in whitelist.\",\"val_\":\"Boolean to be set (true for user_ address is whitelisted).\"}},\"sweepToken(address,address,uint256)\":{\"custom:access\":\"Only Owner\",\"custom:error\":\"Throw InsufficientBalance if amount_ is greater than the available balance of the token in the contract\",\"custom:event\":\"Emits SweepToken event\",\"params\":{\"amount_\":\"The amount of tokens needs to transfer\",\"to_\":\"The address of the recipient\",\"token_\":\"The address of the ERC-20 token to sweep\"}},\"token()\":{\"returns\":{\"_0\":\"Address of the inner token of this bridge.\"}},\"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.\"},\"updateSendAndCallEnabled(bool)\":{\"params\":{\"enabled_\":\"Boolean indicating whether the sendAndCall function should be enabled or disabled.\"}}},\"title\":\"XVSProxyOFTDest\",\"version\":1},\"userdoc\":{\"errors\":{\"InsufficientBalance(uint256,uint256)\":[{\"notice\":\"Error thrown when this contract balance is less than sweep amount\"}],\"ZeroAddressNotAllowed()\":[{\"notice\":\"Thrown if the supplied address is a zero address where it is not allowed\"}]},\"events\":{\"DropFailedMessage(uint16,bytes,uint64)\":{\"notice\":\"Emits when stored message dropped without successful retrying.\"},\"InnerTokenAdded(address)\":{\"notice\":\"Event emitted when inner token set successfully.\"},\"OracleChanged(address,address)\":{\"notice\":\"Event emitted when oracle is modified.\"},\"SetMaxDailyLimit(uint16,uint256,uint256)\":{\"notice\":\"Emitted when the maximum daily limit of transactions from local chain is modified.\"},\"SetMaxDailyReceiveLimit(uint16,uint256,uint256)\":{\"notice\":\"Emitted when the maximum daily limit for receiving transactions from remote chain is modified.\"},\"SetMaxSingleReceiveTransactionLimit(uint16,uint256,uint256)\":{\"notice\":\"Emitted when the maximum limit for a single receive transaction from remote chain is modified.\"},\"SetMaxSingleTransactionLimit(uint16,uint256,uint256)\":{\"notice\":\"Emitted when the maximum limit for a single transaction from local chain is modified.\"},\"SetWhitelist(address,bool)\":{\"notice\":\"Emitted when address is added to whitelist.\"},\"SweepToken(address,address,uint256)\":{\"notice\":\"Emitted on sweep token success\"},\"TrustedRemoteRemoved(uint16)\":{\"notice\":\"Event emitted when trusted remote sets to empty.\"},\"UpdateSendAndCallEnabled(bool)\":{\"notice\":\"Event emitted when SendAndCallEnabled updated successfully.\"}},\"kind\":\"user\",\"methods\":{\"chainIdToLast24HourReceiveWindowStart(uint16)\":{\"notice\":\"Timestamp when the last 24-hour window started from remote chain.\"},\"chainIdToLast24HourReceived(uint16)\":{\"notice\":\"Total received amount in USD(scaled with 18 decimals) within the last 24-hour window from remote chain.\"},\"chainIdToLast24HourTransferred(uint16)\":{\"notice\":\"Total sent amount in USD(scaled with 18 decimals) within the last 24-hour window from local chain.\"},\"chainIdToLast24HourWindowStart(uint16)\":{\"notice\":\"Timestamp when the last 24-hour window started from local chain.\"},\"chainIdToMaxDailyLimit(uint16)\":{\"notice\":\"Maximum daily limit for transactions in USD(scaled with 18 decimals) from local chain.\"},\"chainIdToMaxDailyReceiveLimit(uint16)\":{\"notice\":\"Maximum daily limit for receiving transactions in USD(scaled with 18 decimals) from remote chain.\"},\"chainIdToMaxSingleReceiveTransactionLimit(uint16)\":{\"notice\":\"Maximum limit for a single receive transaction in USD(scaled with 18 decimals) from remote chain.\"},\"chainIdToMaxSingleTransactionLimit(uint16)\":{\"notice\":\"Maximum limit for a single transaction in USD(scaled with 18 decimals) from local chain.\"},\"circulatingSupply()\":{\"notice\":\"Returns the total circulating supply of the token on the destination chain i.e (total supply).\"},\"dropFailedMessage(uint16,bytes,uint64)\":{\"notice\":\"Clear failed messages from the storage.\"},\"isEligibleToSend(address,uint16,uint256)\":{\"notice\":\"Checks the eligibility of a sender to initiate a cross-chain token transfer.\"},\"oracle()\":{\"notice\":\"The address of ResilientOracle contract wrapped in its interface.\"},\"pause()\":{\"notice\":\"Triggers stopped state of the bridge.\"},\"removeTrustedRemote(uint16)\":{\"notice\":\"Remove trusted remote from storage.\"},\"renounceOwnership()\":{\"notice\":\"Empty implementation of renounce ownership to avoid any mishappening.\"},\"sendAndCall(address,uint16,bytes32,uint256,bytes,uint64,(address,address,bytes))\":{\"notice\":\"Initiates a cross-chain token transfer and triggers a call on the destination chain.\"},\"setMaxDailyLimit(uint16,uint256)\":{\"notice\":\"Sets the limit of daily (24 Hour) transactions amount.\"},\"setMaxDailyReceiveLimit(uint16,uint256)\":{\"notice\":\"Sets the maximum daily limit for receiving transactions.\"},\"setMaxSingleReceiveTransactionLimit(uint16,uint256)\":{\"notice\":\"Sets the maximum limit for a single receive transaction.\"},\"setMaxSingleTransactionLimit(uint16,uint256)\":{\"notice\":\"Sets the limit of single transaction amount.\"},\"setOracle(address)\":{\"notice\":\"Set the address of the ResilientOracle contract.\"},\"setWhitelist(address,bool)\":{\"notice\":\"Sets the whitelist address to skip checks on transaction limit.\"},\"sweepToken(address,address,uint256)\":{\"notice\":\"A public function to sweep accidental ERC-20 transfers to this contract. Tokens are sent to user\"},\"token()\":{\"notice\":\"Return's the address of the inner token of this bridge.\"},\"unpause()\":{\"notice\":\"Triggers resume state of the bridge.\"},\"updateSendAndCallEnabled(bool)\":{\"notice\":\"It enables or disables sendAndCall functionality for the bridge.\"},\"whitelist(address)\":{\"notice\":\"Address on which cap check and bound limit is not applicable.\"}},\"notice\":\"XVSProxyOFTDest contract builds upon the functionality of its parent contract, BaseXVSProxyOFT, and focuses on managing token transfers to the destination chain. It provides functions to check eligibility and perform the actual token transfers while maintaining strict access controls and pausing mechanisms.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/Bridge/XVSProxyOFTDest.sol\":\"XVSProxyOFTDest\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"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 // try-catch all errors/exceptions\\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\":\"0x612ff1f2a158b7e64e873885b5ff08afa348998fd9005f384d555d643ba7968d\",\"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\"},\"@layerzerolabs/solidity-examples/contracts/token/oft/v2/BaseOFTV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./OFTCoreV2.sol\\\";\\nimport \\\"./interfaces/IOFTV2.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/introspection/ERC165.sol\\\";\\n\\nabstract contract BaseOFTV2 is OFTCoreV2, ERC165, IOFTV2 {\\n constructor(uint8 _sharedDecimals, address _lzEndpoint) OFTCoreV2(_sharedDecimals, _lzEndpoint) {}\\n\\n /************************************************************************\\n * public functions\\n ************************************************************************/\\n function sendFrom(\\n address _from,\\n uint16 _dstChainId,\\n bytes32 _toAddress,\\n uint _amount,\\n LzCallParams calldata _callParams\\n ) public payable virtual override {\\n _send(_from, _dstChainId, _toAddress, _amount, _callParams.refundAddress, _callParams.zroPaymentAddress, _callParams.adapterParams);\\n }\\n\\n function sendAndCall(\\n address _from,\\n uint16 _dstChainId,\\n bytes32 _toAddress,\\n uint _amount,\\n bytes calldata _payload,\\n uint64 _dstGasForCall,\\n LzCallParams calldata _callParams\\n ) public payable virtual override {\\n _sendAndCall(\\n _from,\\n _dstChainId,\\n _toAddress,\\n _amount,\\n _payload,\\n _dstGasForCall,\\n _callParams.refundAddress,\\n _callParams.zroPaymentAddress,\\n _callParams.adapterParams\\n );\\n }\\n\\n /************************************************************************\\n * public view functions\\n ************************************************************************/\\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\\n return interfaceId == type(IOFTV2).interfaceId || super.supportsInterface(interfaceId);\\n }\\n\\n function estimateSendFee(\\n uint16 _dstChainId,\\n bytes32 _toAddress,\\n uint _amount,\\n bool _useZro,\\n bytes calldata _adapterParams\\n ) public view virtual override returns (uint nativeFee, uint zroFee) {\\n return _estimateSendFee(_dstChainId, _toAddress, _amount, _useZro, _adapterParams);\\n }\\n\\n function estimateSendAndCallFee(\\n uint16 _dstChainId,\\n bytes32 _toAddress,\\n uint _amount,\\n bytes calldata _payload,\\n uint64 _dstGasForCall,\\n bool _useZro,\\n bytes calldata _adapterParams\\n ) public view virtual override returns (uint nativeFee, uint zroFee) {\\n return _estimateSendAndCallFee(_dstChainId, _toAddress, _amount, _payload, _dstGasForCall, _useZro, _adapterParams);\\n }\\n\\n function circulatingSupply() public view virtual override returns (uint);\\n\\n function token() public view virtual override returns (address);\\n}\\n\",\"keccak256\":\"0x59d2d32dd14a4f58232b126a7d69608a85f82137bd56d8ce0fc28ff646cba943\",\"license\":\"MIT\"},\"@layerzerolabs/solidity-examples/contracts/token/oft/v2/OFTCoreV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../../lzApp/NonblockingLzApp.sol\\\";\\nimport \\\"../../../libraries/ExcessivelySafeCall.sol\\\";\\nimport \\\"./interfaces/ICommonOFT.sol\\\";\\nimport \\\"./interfaces/IOFTReceiverV2.sol\\\";\\n\\nabstract contract OFTCoreV2 is NonblockingLzApp {\\n using BytesLib for bytes;\\n using ExcessivelySafeCall for address;\\n\\n uint public constant NO_EXTRA_GAS = 0;\\n\\n // packet type\\n uint8 public constant PT_SEND = 0;\\n uint8 public constant PT_SEND_AND_CALL = 1;\\n\\n uint8 public immutable sharedDecimals;\\n\\n mapping(uint16 => mapping(bytes => mapping(uint64 => bool))) public creditedPackets;\\n\\n /**\\n * @dev Emitted when `_amount` tokens are moved from the `_sender` to (`_dstChainId`, `_toAddress`)\\n * `_nonce` is the outbound nonce\\n */\\n event SendToChain(uint16 indexed _dstChainId, address indexed _from, bytes32 indexed _toAddress, uint _amount);\\n\\n /**\\n * @dev Emitted when `_amount` tokens are received from `_srcChainId` into the `_toAddress` on the local chain.\\n * `_nonce` is the inbound nonce.\\n */\\n event ReceiveFromChain(uint16 indexed _srcChainId, address indexed _to, uint _amount);\\n\\n event CallOFTReceivedSuccess(uint16 indexed _srcChainId, bytes _srcAddress, uint64 _nonce, bytes32 _hash);\\n\\n event NonContractAddress(address _address);\\n\\n // _sharedDecimals should be the minimum decimals on all chains\\n constructor(uint8 _sharedDecimals, address _lzEndpoint) NonblockingLzApp(_lzEndpoint) {\\n sharedDecimals = _sharedDecimals;\\n }\\n\\n /************************************************************************\\n * public functions\\n ************************************************************************/\\n function callOnOFTReceived(\\n uint16 _srcChainId,\\n bytes calldata _srcAddress,\\n uint64 _nonce,\\n bytes32 _from,\\n address _to,\\n uint _amount,\\n bytes calldata _payload,\\n uint _gasForCall\\n ) public virtual {\\n require(_msgSender() == address(this), \\\"OFTCore: caller must be OFTCore\\\");\\n\\n // send\\n _amount = _transferFrom(address(this), _to, _amount);\\n emit ReceiveFromChain(_srcChainId, _to, _amount);\\n\\n // call\\n IOFTReceiverV2(_to).onOFTReceived{gas: _gasForCall}(_srcChainId, _srcAddress, _nonce, _from, _amount, _payload);\\n }\\n\\n /************************************************************************\\n * internal functions\\n ************************************************************************/\\n function _estimateSendFee(\\n uint16 _dstChainId,\\n bytes32 _toAddress,\\n uint _amount,\\n bool _useZro,\\n bytes memory _adapterParams\\n ) internal view virtual returns (uint nativeFee, uint zroFee) {\\n // mock the payload for sendFrom()\\n bytes memory payload = _encodeSendPayload(_toAddress, _ld2sd(_amount));\\n return lzEndpoint.estimateFees(_dstChainId, address(this), payload, _useZro, _adapterParams);\\n }\\n\\n function _estimateSendAndCallFee(\\n uint16 _dstChainId,\\n bytes32 _toAddress,\\n uint _amount,\\n bytes memory _payload,\\n uint64 _dstGasForCall,\\n bool _useZro,\\n bytes memory _adapterParams\\n ) internal view virtual returns (uint nativeFee, uint zroFee) {\\n // mock the payload for sendAndCall()\\n bytes memory payload = _encodeSendAndCallPayload(msg.sender, _toAddress, _ld2sd(_amount), _payload, _dstGasForCall);\\n return lzEndpoint.estimateFees(_dstChainId, address(this), payload, _useZro, _adapterParams);\\n }\\n\\n function _nonblockingLzReceive(\\n uint16 _srcChainId,\\n bytes memory _srcAddress,\\n uint64 _nonce,\\n bytes memory _payload\\n ) internal virtual override {\\n uint8 packetType = _payload.toUint8(0);\\n\\n if (packetType == PT_SEND) {\\n _sendAck(_srcChainId, _srcAddress, _nonce, _payload);\\n } else if (packetType == PT_SEND_AND_CALL) {\\n _sendAndCallAck(_srcChainId, _srcAddress, _nonce, _payload);\\n } else {\\n revert(\\\"OFTCore: unknown packet type\\\");\\n }\\n }\\n\\n function _send(\\n address _from,\\n uint16 _dstChainId,\\n bytes32 _toAddress,\\n uint _amount,\\n address payable _refundAddress,\\n address _zroPaymentAddress,\\n bytes memory _adapterParams\\n ) internal virtual returns (uint amount) {\\n _checkGasLimit(_dstChainId, PT_SEND, _adapterParams, NO_EXTRA_GAS);\\n\\n (amount, ) = _removeDust(_amount);\\n amount = _debitFrom(_from, _dstChainId, _toAddress, amount); // amount returned should not have dust\\n require(amount > 0, \\\"OFTCore: amount too small\\\");\\n\\n bytes memory lzPayload = _encodeSendPayload(_toAddress, _ld2sd(amount));\\n _lzSend(_dstChainId, lzPayload, _refundAddress, _zroPaymentAddress, _adapterParams, msg.value);\\n\\n emit SendToChain(_dstChainId, _from, _toAddress, amount);\\n }\\n\\n function _sendAck(\\n uint16 _srcChainId,\\n bytes memory,\\n uint64,\\n bytes memory _payload\\n ) internal virtual {\\n (address to, uint64 amountSD) = _decodeSendPayload(_payload);\\n if (to == address(0)) {\\n to = address(0xdead);\\n }\\n\\n uint amount = _sd2ld(amountSD);\\n amount = _creditTo(_srcChainId, to, amount);\\n\\n emit ReceiveFromChain(_srcChainId, to, amount);\\n }\\n\\n function _sendAndCall(\\n address _from,\\n uint16 _dstChainId,\\n bytes32 _toAddress,\\n uint _amount,\\n bytes memory _payload,\\n uint64 _dstGasForCall,\\n address payable _refundAddress,\\n address _zroPaymentAddress,\\n bytes memory _adapterParams\\n ) internal virtual returns (uint amount) {\\n _checkGasLimit(_dstChainId, PT_SEND_AND_CALL, _adapterParams, _dstGasForCall);\\n\\n (amount, ) = _removeDust(_amount);\\n amount = _debitFrom(_from, _dstChainId, _toAddress, amount);\\n require(amount > 0, \\\"OFTCore: amount too small\\\");\\n\\n // encode the msg.sender into the payload instead of _from\\n bytes memory lzPayload = _encodeSendAndCallPayload(msg.sender, _toAddress, _ld2sd(amount), _payload, _dstGasForCall);\\n _lzSend(_dstChainId, lzPayload, _refundAddress, _zroPaymentAddress, _adapterParams, msg.value);\\n\\n emit SendToChain(_dstChainId, _from, _toAddress, amount);\\n }\\n\\n function _sendAndCallAck(\\n uint16 _srcChainId,\\n bytes memory _srcAddress,\\n uint64 _nonce,\\n bytes memory _payload\\n ) internal virtual {\\n (bytes32 from, address to, uint64 amountSD, bytes memory payloadForCall, uint64 gasForCall) = _decodeSendAndCallPayload(_payload);\\n\\n bool credited = creditedPackets[_srcChainId][_srcAddress][_nonce];\\n uint amount = _sd2ld(amountSD);\\n\\n // credit to this contract first, and then transfer to receiver only if callOnOFTReceived() succeeds\\n if (!credited) {\\n amount = _creditTo(_srcChainId, address(this), amount);\\n creditedPackets[_srcChainId][_srcAddress][_nonce] = true;\\n }\\n\\n if (!_isContract(to)) {\\n emit NonContractAddress(to);\\n return;\\n }\\n\\n // workaround for stack too deep\\n uint16 srcChainId = _srcChainId;\\n bytes memory srcAddress = _srcAddress;\\n uint64 nonce = _nonce;\\n bytes memory payload = _payload;\\n bytes32 from_ = from;\\n address to_ = to;\\n uint amount_ = amount;\\n bytes memory payloadForCall_ = payloadForCall;\\n\\n // no gas limit for the call if retry\\n uint gas = credited ? gasleft() : gasForCall;\\n (bool success, bytes memory reason) = address(this).excessivelySafeCall(\\n gasleft(),\\n 150,\\n abi.encodeWithSelector(this.callOnOFTReceived.selector, srcChainId, srcAddress, nonce, from_, to_, amount_, payloadForCall_, gas)\\n );\\n\\n if (success) {\\n bytes32 hash = keccak256(payload);\\n emit CallOFTReceivedSuccess(srcChainId, srcAddress, nonce, hash);\\n } else {\\n // store the failed message into the nonblockingLzApp\\n _storeFailedMessage(srcChainId, srcAddress, nonce, payload, reason);\\n }\\n }\\n\\n function _isContract(address _account) internal view returns (bool) {\\n return _account.code.length > 0;\\n }\\n\\n function _ld2sd(uint _amount) internal view virtual returns (uint64) {\\n uint amountSD = _amount / _ld2sdRate();\\n require(amountSD <= type(uint64).max, \\\"OFTCore: amountSD overflow\\\");\\n return uint64(amountSD);\\n }\\n\\n function _sd2ld(uint64 _amountSD) internal view virtual returns (uint) {\\n return _amountSD * _ld2sdRate();\\n }\\n\\n function _removeDust(uint _amount) internal view virtual returns (uint amountAfter, uint dust) {\\n dust = _amount % _ld2sdRate();\\n amountAfter = _amount - dust;\\n }\\n\\n function _encodeSendPayload(bytes32 _toAddress, uint64 _amountSD) internal view virtual returns (bytes memory) {\\n return abi.encodePacked(PT_SEND, _toAddress, _amountSD);\\n }\\n\\n function _decodeSendPayload(bytes memory _payload) internal view virtual returns (address to, uint64 amountSD) {\\n require(_payload.toUint8(0) == PT_SEND && _payload.length == 41, \\\"OFTCore: invalid payload\\\");\\n\\n to = _payload.toAddress(13); // drop the first 12 bytes of bytes32\\n amountSD = _payload.toUint64(33);\\n }\\n\\n function _encodeSendAndCallPayload(\\n address _from,\\n bytes32 _toAddress,\\n uint64 _amountSD,\\n bytes memory _payload,\\n uint64 _dstGasForCall\\n ) internal view virtual returns (bytes memory) {\\n return abi.encodePacked(PT_SEND_AND_CALL, _toAddress, _amountSD, _addressToBytes32(_from), _dstGasForCall, _payload);\\n }\\n\\n function _decodeSendAndCallPayload(bytes memory _payload)\\n internal\\n view\\n virtual\\n returns (\\n bytes32 from,\\n address to,\\n uint64 amountSD,\\n bytes memory payload,\\n uint64 dstGasForCall\\n )\\n {\\n require(_payload.toUint8(0) == PT_SEND_AND_CALL, \\\"OFTCore: invalid payload\\\");\\n\\n to = _payload.toAddress(13); // drop the first 12 bytes of bytes32\\n amountSD = _payload.toUint64(33);\\n from = _payload.toBytes32(41);\\n dstGasForCall = _payload.toUint64(73);\\n payload = _payload.slice(81, _payload.length - 81);\\n }\\n\\n function _addressToBytes32(address _address) internal pure virtual returns (bytes32) {\\n return bytes32(uint(uint160(_address)));\\n }\\n\\n function _debitFrom(\\n address _from,\\n uint16 _dstChainId,\\n bytes32 _toAddress,\\n uint _amount\\n ) internal virtual returns (uint);\\n\\n function _creditTo(\\n uint16 _srcChainId,\\n address _toAddress,\\n uint _amount\\n ) internal virtual returns (uint);\\n\\n function _transferFrom(\\n address _from,\\n address _to,\\n uint _amount\\n ) internal virtual returns (uint);\\n\\n function _ld2sdRate() internal view virtual returns (uint);\\n}\\n\",\"keccak256\":\"0x96cf7a10c5af4243822d25e77985a4a46d12264f839593ded5378cd6519a8df0\",\"license\":\"MIT\"},\"@layerzerolabs/solidity-examples/contracts/token/oft/v2/interfaces/ICommonOFT.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.5.0;\\n\\nimport \\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Interface of the IOFT core standard\\n */\\ninterface ICommonOFT is IERC165 {\\n\\n struct LzCallParams {\\n address payable refundAddress;\\n address zroPaymentAddress;\\n bytes adapterParams;\\n }\\n\\n /**\\n * @dev estimate send token `_tokenId` to (`_dstChainId`, `_toAddress`)\\n * _dstChainId - L0 defined chain id to send tokens too\\n * _toAddress - dynamic bytes array which contains the address to whom you are sending tokens to on the dstChain\\n * _amount - amount of the tokens to transfer\\n * _useZro - indicates to use zro to pay L0 fees\\n * _adapterParam - flexible bytes array to indicate messaging adapter services in L0\\n */\\n function estimateSendFee(uint16 _dstChainId, bytes32 _toAddress, uint _amount, bool _useZro, bytes calldata _adapterParams) external view returns (uint nativeFee, uint zroFee);\\n\\n function estimateSendAndCallFee(uint16 _dstChainId, bytes32 _toAddress, uint _amount, bytes calldata _payload, uint64 _dstGasForCall, bool _useZro, bytes calldata _adapterParams) external view returns (uint nativeFee, uint zroFee);\\n\\n /**\\n * @dev returns the circulating amount of tokens on current chain\\n */\\n function circulatingSupply() external view returns (uint);\\n\\n /**\\n * @dev returns the address of the ERC20 token\\n */\\n function token() external view returns (address);\\n}\\n\",\"keccak256\":\"0x1d034ba786436c1fce8057352c87373098bd1d8026b24c8fbc7be28636d0c15d\",\"license\":\"MIT\"},\"@layerzerolabs/solidity-examples/contracts/token/oft/v2/interfaces/IOFTReceiverV2.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity >=0.5.0;\\n\\ninterface IOFTReceiverV2 {\\n /**\\n * @dev Called by the OFT contract when tokens are received from source chain.\\n * @param _srcChainId The chain id of the source chain.\\n * @param _srcAddress The address of the OFT token contract on the source chain.\\n * @param _nonce The nonce of the transaction on the source chain.\\n * @param _from The address of the account who calls the sendAndCall() on the source chain.\\n * @param _amount The amount of tokens to transfer.\\n * @param _payload Additional data with no specified format.\\n */\\n function onOFTReceived(uint16 _srcChainId, bytes calldata _srcAddress, uint64 _nonce, bytes32 _from, uint _amount, bytes calldata _payload) external;\\n}\\n\",\"keccak256\":\"0xf57e437ced3bc10bb333123bb49475dab47c7615b86401c4d872c29ad4928fd5\",\"license\":\"BUSL-1.1\"},\"@layerzerolabs/solidity-examples/contracts/token/oft/v2/interfaces/IOFTV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.5.0;\\n\\nimport \\\"./ICommonOFT.sol\\\";\\n\\n/**\\n * @dev Interface of the IOFT core standard\\n */\\ninterface IOFTV2 is ICommonOFT {\\n\\n /**\\n * @dev send `_amount` amount of token to (`_dstChainId`, `_toAddress`) from `_from`\\n * `_from` the owner of token\\n * `_dstChainId` the destination chain identifier\\n * `_toAddress` can be any size depending on the `dstChainId`.\\n * `_amount` the quantity of tokens in wei\\n * `_refundAddress` the address LayerZero refunds if too much message fee is sent\\n * `_zroPaymentAddress` set to address(0x0) if not paying in ZRO (LayerZero Token)\\n * `_adapterParams` is a flexible bytes array to indicate messaging adapter services\\n */\\n function sendFrom(address _from, uint16 _dstChainId, bytes32 _toAddress, uint _amount, LzCallParams calldata _callParams) external payable;\\n\\n function sendAndCall(address _from, uint16 _dstChainId, bytes32 _toAddress, uint _amount, bytes calldata _payload, uint64 _dstGasForCall, LzCallParams calldata _callParams) external payable;\\n}\\n\",\"keccak256\":\"0xb1d31f341715347d49db4e2c0de27c49bbd70b5b3d9b0adb1050b2b3a305ab87\",\"license\":\"MIT\"},\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.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. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby disabling 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\":\"0xba43b97fba0d32eb4254f6a5a297b39a19a247082a02d6e69349e071e2946218\",\"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/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/IERC20Permit.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\\n *\\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\\n * need to send a transaction, and thus is not required to hold Ether at all.\\n */\\ninterface IERC20Permit {\\n /**\\n * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\\n * given ``owner``'s signed approval.\\n *\\n * IMPORTANT: The same issues {IERC20-approve} has related to transaction\\n * ordering also apply here.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `deadline` must be a timestamp in the future.\\n * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\\n * over the EIP712-formatted function arguments.\\n * - the signature must use ``owner``'s current nonce (see {nonces}).\\n *\\n * For more information on the signature format, see the\\n * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\\n * section].\\n */\\n function permit(\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external;\\n\\n /**\\n * @dev Returns the current nonce for `owner`. This value must be\\n * included whenever a signature is generated for {permit}.\\n *\\n * Every successful call to {permit} increases ``owner``'s nonce by one. This\\n * prevents a signature from being used multiple times.\\n */\\n function nonces(address owner) external view returns (uint256);\\n\\n /**\\n * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0xec63854014a5b4f2b3290ab9103a21bdf902a508d0f41a8573fea49e98bf571a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\nimport \\\"../extensions/IERC20Permit.sol\\\";\\nimport \\\"../../../utils/Address.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20 {\\n using Address for address;\\n\\n /**\\n * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n /**\\n * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the\\n * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.\\n */\\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n }\\n\\n /**\\n * @dev Deprecated. This function has issues similar to the ones found in\\n * {IERC20-approve}, and its usage is discouraged.\\n *\\n * Whenever possible, use {safeIncreaseAllowance} and\\n * {safeDecreaseAllowance} instead.\\n */\\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\\n // safeApprove should only be called when setting an initial allowance,\\n // or when resetting it to zero. To increase and decrease it, use\\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\\n require(\\n (value == 0) || (token.allowance(address(this), spender) == 0),\\n \\\"SafeERC20: approve from non-zero to non-zero allowance\\\"\\n );\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\\n }\\n\\n /**\\n * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));\\n }\\n\\n /**\\n * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n unchecked {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n require(oldAllowance >= value, \\\"SafeERC20: decreased allowance below zero\\\");\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));\\n }\\n }\\n\\n /**\\n * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval\\n * to be set to zero before setting it to a non-zero value, such as USDT.\\n */\\n function forceApprove(IERC20 token, address spender, uint256 value) internal {\\n bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);\\n\\n if (!_callOptionalReturnBool(token, approvalCall)) {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));\\n _callOptionalReturn(token, approvalCall);\\n }\\n }\\n\\n /**\\n * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.\\n * Revert on invalid signature.\\n */\\n function safePermit(\\n IERC20Permit token,\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal {\\n uint256 nonceBefore = token.nonces(owner);\\n token.permit(owner, spender, value, deadline, v, r, s);\\n uint256 nonceAfter = token.nonces(owner);\\n require(nonceAfter == nonceBefore + 1, \\\"SafeERC20: permit did not succeed\\\");\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n */\\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that\\n // the target address contains contract code and also asserts for success in the low-level call.\\n\\n bytes memory returndata = address(token).functionCall(data, \\\"SafeERC20: low-level call failed\\\");\\n require(returndata.length == 0 || abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n *\\n * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.\\n */\\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false\\n // and not revert is the subcall reverts.\\n\\n (bool success, bytes memory returndata) = address(token).call(data);\\n return\\n success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token));\\n }\\n}\\n\",\"keccak256\":\"0xabefac93435967b4d36a4fabcbdbb918d1f0b7ae3c3d85bc30923b326c927ed1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.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 * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\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://consensys.net/diligence/blog/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.8.0/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(address target, bytes memory data, uint256 value) 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 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 (bool success, bytes memory returndata) = target.delegatecall(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\":\"0x006dd67219697fe68d7fbfdea512e7c4cb64a43565ed86171d67e844982da6fa\",\"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/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\"},\"@venusprotocol/oracle/contracts/interfaces/OracleInterface.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.13;\\n\\ninterface OracleInterface {\\n function getPrice(address asset) external view returns (uint256);\\n}\\n\\ninterface ResilientOracleInterface is OracleInterface {\\n function updatePrice(address vToken) external;\\n\\n function updateAssetPrice(address asset) external;\\n\\n function getUnderlyingPrice(address vToken) external view returns (uint256);\\n}\\n\\ninterface TwapInterface is OracleInterface {\\n function updateTwap(address asset) external returns (uint256);\\n}\\n\\ninterface BoundValidatorInterface {\\n function validatePriceWithAnchorPrice(\\n address asset,\\n uint256 reporterPrice,\\n uint256 anchorPrice\\n ) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x40031b19684ca0c912e794d08c2c0b0d8be77d3c1bdc937830a0658eff899650\",\"license\":\"BSD-3-Clause\"},\"@venusprotocol/solidity-utilities/contracts/ExponentialNoError.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.13;\\n\\nimport { EXP_SCALE as EXP_SCALE_, MANTISSA_ONE as MANTISSA_ONE_ } from \\\"./constants.sol\\\";\\n\\n/**\\n * @title Exponential module for storing fixed-precision decimals\\n * @author Compound\\n * @notice Exp is a struct which stores decimals with a fixed precision of 18 decimal places.\\n * Thus, if we wanted to store the 5.1, mantissa would store 5.1e18. That is:\\n * `Exp({mantissa: 5100000000000000000})`.\\n */\\ncontract ExponentialNoError {\\n struct Exp {\\n uint256 mantissa;\\n }\\n\\n struct Double {\\n uint256 mantissa;\\n }\\n\\n uint256 internal constant EXP_SCALE = EXP_SCALE_;\\n uint256 internal constant DOUBLE_SCALE = 1e36;\\n uint256 internal constant HALF_EXP_SCALE = EXP_SCALE / 2;\\n uint256 internal constant MANTISSA_ONE = MANTISSA_ONE_;\\n\\n /**\\n * @dev Truncates the given exp to a whole number value.\\n * For example, truncate(Exp{mantissa: 15 * EXP_SCALE}) = 15\\n */\\n function truncate(Exp memory exp) internal pure returns (uint256) {\\n // Note: We are not using careful math here as we're performing a division that cannot fail\\n return exp.mantissa / EXP_SCALE;\\n }\\n\\n /**\\n * @dev Multiply an Exp by a scalar, then truncate to return an unsigned integer.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function mul_ScalarTruncate(Exp memory a, uint256 scalar) internal pure returns (uint256) {\\n Exp memory product = mul_(a, scalar);\\n return truncate(product);\\n }\\n\\n /**\\n * @dev Multiply an Exp by a scalar, truncate, then add an to an unsigned integer, returning an unsigned integer.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function mul_ScalarTruncateAddUInt(Exp memory a, uint256 scalar, uint256 addend) internal pure returns (uint256) {\\n Exp memory product = mul_(a, scalar);\\n return add_(truncate(product), addend);\\n }\\n\\n /**\\n * @dev Checks if first Exp is less than second Exp.\\n */\\n function lessThanExp(Exp memory left, Exp memory right) internal pure returns (bool) {\\n return left.mantissa < right.mantissa;\\n }\\n\\n function safe224(uint256 n, string memory errorMessage) internal pure returns (uint224) {\\n require(n <= type(uint224).max, errorMessage);\\n return uint224(n);\\n }\\n\\n function safe32(uint256 n, string memory errorMessage) internal pure returns (uint32) {\\n require(n <= type(uint32).max, errorMessage);\\n return uint32(n);\\n }\\n\\n function add_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\\n return Exp({ mantissa: add_(a.mantissa, b.mantissa) });\\n }\\n\\n function add_(Double memory a, Double memory b) internal pure returns (Double memory) {\\n return Double({ mantissa: add_(a.mantissa, b.mantissa) });\\n }\\n\\n function add_(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a + b;\\n }\\n\\n function sub_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\\n return Exp({ mantissa: sub_(a.mantissa, b.mantissa) });\\n }\\n\\n function sub_(Double memory a, Double memory b) internal pure returns (Double memory) {\\n return Double({ mantissa: sub_(a.mantissa, b.mantissa) });\\n }\\n\\n function sub_(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a - b;\\n }\\n\\n function mul_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\\n return Exp({ mantissa: mul_(a.mantissa, b.mantissa) / EXP_SCALE });\\n }\\n\\n function mul_(Exp memory a, uint256 b) internal pure returns (Exp memory) {\\n return Exp({ mantissa: mul_(a.mantissa, b) });\\n }\\n\\n function mul_(uint256 a, Exp memory b) internal pure returns (uint256) {\\n return mul_(a, b.mantissa) / EXP_SCALE;\\n }\\n\\n function mul_(Double memory a, Double memory b) internal pure returns (Double memory) {\\n return Double({ mantissa: mul_(a.mantissa, b.mantissa) / DOUBLE_SCALE });\\n }\\n\\n function mul_(Double memory a, uint256 b) internal pure returns (Double memory) {\\n return Double({ mantissa: mul_(a.mantissa, b) });\\n }\\n\\n function mul_(uint256 a, Double memory b) internal pure returns (uint256) {\\n return mul_(a, b.mantissa) / DOUBLE_SCALE;\\n }\\n\\n function mul_(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a * b;\\n }\\n\\n function div_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\\n return Exp({ mantissa: div_(mul_(a.mantissa, EXP_SCALE), b.mantissa) });\\n }\\n\\n function div_(Exp memory a, uint256 b) internal pure returns (Exp memory) {\\n return Exp({ mantissa: div_(a.mantissa, b) });\\n }\\n\\n function div_(uint256 a, Exp memory b) internal pure returns (uint256) {\\n return div_(mul_(a, EXP_SCALE), b.mantissa);\\n }\\n\\n function div_(Double memory a, Double memory b) internal pure returns (Double memory) {\\n return Double({ mantissa: div_(mul_(a.mantissa, DOUBLE_SCALE), b.mantissa) });\\n }\\n\\n function div_(Double memory a, uint256 b) internal pure returns (Double memory) {\\n return Double({ mantissa: div_(a.mantissa, b) });\\n }\\n\\n function div_(uint256 a, Double memory b) internal pure returns (uint256) {\\n return div_(mul_(a, DOUBLE_SCALE), b.mantissa);\\n }\\n\\n function div_(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a / b;\\n }\\n\\n function fraction(uint256 a, uint256 b) internal pure returns (Double memory) {\\n return Double({ mantissa: div_(mul_(a, DOUBLE_SCALE), b) });\\n }\\n}\\n\",\"keccak256\":\"0x6cf5430c2db151ab24ef0f567ed443c0b75b8b6051a62cacbe83f28b16834605\",\"license\":\"BSD-3-Clause\"},\"@venusprotocol/solidity-utilities/contracts/constants.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.13;\\n\\n/// @dev Base unit for computations, usually used in scaling (multiplications, divisions)\\nuint256 constant EXP_SCALE = 1e18;\\n\\n/// @dev A unit (literal one) in EXP_SCALE, usually used in additions/subtractions\\nuint256 constant MANTISSA_ONE = EXP_SCALE;\\n\",\"keccak256\":\"0x44de02d7837ee1d4dcf6e9f5e783e9d9e0bec0154f23f5661fb54810cff9f892\",\"license\":\"BSD-3-Clause\"},\"@venusprotocol/solidity-utilities/contracts/validators.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.13;\\n\\n/// @notice Thrown if the supplied address is a zero address where it is not allowed\\nerror ZeroAddressNotAllowed();\\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\",\"keccak256\":\"0x909eb76841ebd57d8f53686b76b1a09da7bbbbcddb29510c41674d5aa84c713e\",\"license\":\"BSD-3-Clause\"},\"contracts/Bridge/BaseXVSProxyOFT.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.13;\\n\\nimport { SafeERC20, IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport { ResilientOracleInterface } from \\\"@venusprotocol/oracle/contracts/interfaces/OracleInterface.sol\\\";\\nimport { Pausable } from \\\"@openzeppelin/contracts/security/Pausable.sol\\\";\\nimport { BaseOFTV2 } from \\\"@layerzerolabs/solidity-examples/contracts/token/oft/v2/BaseOFTV2.sol\\\";\\nimport { ensureNonzeroAddress } from \\\"@venusprotocol/solidity-utilities/contracts/validators.sol\\\";\\nimport { ExponentialNoError } from \\\"@venusprotocol/solidity-utilities/contracts/ExponentialNoError.sol\\\";\\n\\n/**\\n * @title BaseXVSProxyOFT\\n * @author Venus\\n * @notice The BaseXVSProxyOFT contract is tailored for facilitating cross-chain transactions with an ERC20 token.\\n * It manages transaction limits of a single and daily transactions.\\n * This contract inherits key functionalities from other contracts, including pausing capabilities and error handling.\\n * It holds state variables for the inner token and maps for tracking transaction limits and statistics across various chains and addresses.\\n * The contract allows the owner to configure limits, set whitelists, and control pausing.\\n * Internal functions conduct eligibility check of transactions, making the contract a fundamental component for cross-chain token management.\\n */\\n\\nabstract contract BaseXVSProxyOFT is Pausable, ExponentialNoError, BaseOFTV2 {\\n using SafeERC20 for IERC20;\\n IERC20 internal immutable innerToken;\\n uint256 internal immutable ld2sdRate;\\n bool public sendAndCallEnabled;\\n\\n /**\\n * @notice The address of ResilientOracle contract wrapped in its interface.\\n */\\n ResilientOracleInterface public oracle;\\n /**\\n * @notice Maximum limit for a single transaction in USD(scaled with 18 decimals) from local chain.\\n */\\n mapping(uint16 => uint256) public chainIdToMaxSingleTransactionLimit;\\n /**\\n * @notice Maximum daily limit for transactions in USD(scaled with 18 decimals) from local chain.\\n */\\n mapping(uint16 => uint256) public chainIdToMaxDailyLimit;\\n /**\\n * @notice Total sent amount in USD(scaled with 18 decimals) within the last 24-hour window from local chain.\\n */\\n mapping(uint16 => uint256) public chainIdToLast24HourTransferred;\\n /**\\n * @notice Timestamp when the last 24-hour window started from local chain.\\n */\\n mapping(uint16 => uint256) public chainIdToLast24HourWindowStart;\\n /**\\n * @notice Maximum limit for a single receive transaction in USD(scaled with 18 decimals) from remote chain.\\n */\\n mapping(uint16 => uint256) public chainIdToMaxSingleReceiveTransactionLimit;\\n /**\\n * @notice Maximum daily limit for receiving transactions in USD(scaled with 18 decimals) from remote chain.\\n */\\n mapping(uint16 => uint256) public chainIdToMaxDailyReceiveLimit;\\n /**\\n * @notice Total received amount in USD(scaled with 18 decimals) within the last 24-hour window from remote chain.\\n */\\n mapping(uint16 => uint256) public chainIdToLast24HourReceived;\\n /**\\n * @notice Timestamp when the last 24-hour window started from remote chain.\\n */\\n mapping(uint16 => uint256) public chainIdToLast24HourReceiveWindowStart;\\n /**\\n * @notice Address on which cap check and bound limit is not applicable.\\n */\\n mapping(address => bool) public whitelist;\\n\\n /**\\n * @notice Emitted when address is added to whitelist.\\n */\\n event SetWhitelist(address indexed addr, bool isWhitelist);\\n /**\\n * @notice Emitted when the maximum limit for a single transaction from local chain is modified.\\n */\\n event SetMaxSingleTransactionLimit(uint16 chainId, uint256 oldMaxLimit, uint256 newMaxLimit);\\n /**\\n * @notice Emitted when the maximum daily limit of transactions from local chain is modified.\\n */\\n event SetMaxDailyLimit(uint16 chainId, uint256 oldMaxLimit, uint256 newMaxLimit);\\n /**\\n * @notice Emitted when the maximum limit for a single receive transaction from remote chain is modified.\\n */\\n event SetMaxSingleReceiveTransactionLimit(uint16 chainId, uint256 oldMaxLimit, uint256 newMaxLimit);\\n /**\\n * @notice Emitted when the maximum daily limit for receiving transactions from remote chain is modified.\\n */\\n event SetMaxDailyReceiveLimit(uint16 chainId, uint256 oldMaxLimit, uint256 newMaxLimit);\\n /**\\n * @notice Event emitted when oracle is modified.\\n */\\n event OracleChanged(address indexed oldOracle, address indexed newOracle);\\n /**\\n * @notice Event emitted when trusted remote sets to empty.\\n */\\n event TrustedRemoteRemoved(uint16 chainId);\\n /**\\n * @notice Event emitted when inner token set successfully.\\n */\\n event InnerTokenAdded(address indexed innerToken);\\n /**\\n *@notice Emitted on sweep token success\\n */\\n event SweepToken(address indexed token, address indexed to, uint256 sweepAmount);\\n /**\\n * @notice Event emitted when SendAndCallEnabled updated successfully.\\n */\\n event UpdateSendAndCallEnabled(bool indexed enabled);\\n /**\\n *@notice Error thrown when this contract balance is less than sweep amount\\n */\\n error InsufficientBalance(uint256 sweepAmount, uint256 balance);\\n\\n /**\\n * @param tokenAddress_ Address of the inner token.\\n * @param sharedDecimals_ Number of shared decimals.\\n * @param lzEndpoint_ Address of the layer zero endpoint contract.\\n * @param oracle_ Address of the price oracle.\\n * @custom:error ZeroAddressNotAllowed is thrown when token contract address is zero.\\n * @custom:error ZeroAddressNotAllowed is thrown when lzEndpoint contract address is zero.\\n * @custom:error ZeroAddressNotAllowed is thrown when oracle contract address is zero.\\n * @custom:event Emits InnerTokenAdded with token address.\\n * @custom:event Emits OracleChanged with zero address and oracle address.\\n */\\n constructor(\\n address tokenAddress_,\\n uint8 sharedDecimals_,\\n address lzEndpoint_,\\n address oracle_\\n ) BaseOFTV2(sharedDecimals_, lzEndpoint_) {\\n ensureNonzeroAddress(tokenAddress_);\\n ensureNonzeroAddress(lzEndpoint_);\\n ensureNonzeroAddress(oracle_);\\n\\n innerToken = IERC20(tokenAddress_);\\n\\n (bool success, bytes memory data) = tokenAddress_.staticcall(abi.encodeWithSignature(\\\"decimals()\\\"));\\n require(success, \\\"ProxyOFT: failed to get token decimals\\\");\\n uint8 decimals = abi.decode(data, (uint8));\\n\\n require(sharedDecimals_ <= decimals, \\\"ProxyOFT: sharedDecimals must be <= decimals\\\");\\n ld2sdRate = 10 ** (decimals - sharedDecimals_);\\n\\n emit InnerTokenAdded(tokenAddress_);\\n emit OracleChanged(address(0), oracle_);\\n\\n oracle = ResilientOracleInterface(oracle_);\\n }\\n\\n /**\\n * @notice Set the address of the ResilientOracle contract.\\n * @dev Reverts if the new address is zero.\\n * @param oracleAddress_ The new address of the ResilientOracle contract.\\n * @custom:access Only owner.\\n * @custom:event Emits OracleChanged with old and new oracle address.\\n */\\n function setOracle(address oracleAddress_) external onlyOwner {\\n ensureNonzeroAddress(oracleAddress_);\\n emit OracleChanged(address(oracle), oracleAddress_);\\n oracle = ResilientOracleInterface(oracleAddress_);\\n }\\n\\n /**\\n * @notice Sets the limit of single transaction amount.\\n * @param chainId_ Destination chain id.\\n * @param limit_ Amount in USD(scaled with 18 decimals).\\n * @custom:access Only owner.\\n * @custom:event Emits SetMaxSingleTransactionLimit with old and new limit associated with chain id.\\n */\\n function setMaxSingleTransactionLimit(uint16 chainId_, uint256 limit_) external onlyOwner {\\n require(limit_ <= chainIdToMaxDailyLimit[chainId_], \\\"Single transaction limit > Daily limit\\\");\\n emit SetMaxSingleTransactionLimit(chainId_, chainIdToMaxSingleTransactionLimit[chainId_], limit_);\\n chainIdToMaxSingleTransactionLimit[chainId_] = limit_;\\n }\\n\\n /**\\n * @notice Sets the limit of daily (24 Hour) transactions amount.\\n * @param chainId_ Destination chain id.\\n * @param limit_ Amount in USD(scaled with 18 decimals).\\n * @custom:access Only owner.\\n * @custom:event Emits setMaxDailyLimit with old and new limit associated with chain id.\\n */\\n function setMaxDailyLimit(uint16 chainId_, uint256 limit_) external onlyOwner {\\n require(limit_ >= chainIdToMaxSingleTransactionLimit[chainId_], \\\"Daily limit < single transaction limit\\\");\\n emit SetMaxDailyLimit(chainId_, chainIdToMaxDailyLimit[chainId_], limit_);\\n chainIdToMaxDailyLimit[chainId_] = limit_;\\n }\\n\\n /**\\n * @notice Sets the maximum limit for a single receive transaction.\\n * @param chainId_ The destination chain ID.\\n * @param limit_ The new maximum limit in USD(scaled with 18 decimals).\\n * @custom:access Only owner.\\n * @custom:event Emits setMaxSingleReceiveTransactionLimit with old and new limit associated with chain id.\\n */\\n function setMaxSingleReceiveTransactionLimit(uint16 chainId_, uint256 limit_) external onlyOwner {\\n require(limit_ <= chainIdToMaxDailyReceiveLimit[chainId_], \\\"single receive transaction limit > Daily limit\\\");\\n emit SetMaxSingleReceiveTransactionLimit(chainId_, chainIdToMaxSingleReceiveTransactionLimit[chainId_], limit_);\\n chainIdToMaxSingleReceiveTransactionLimit[chainId_] = limit_;\\n }\\n\\n /**\\n * @notice Sets the maximum daily limit for receiving transactions.\\n * @param chainId_ The destination chain ID.\\n * @param limit_ The new maximum daily limit in USD(scaled with 18 decimals).\\n * @custom:access Only owner.\\n * @custom:event Emits setMaxDailyReceiveLimit with old and new limit associated with chain id.\\n */\\n function setMaxDailyReceiveLimit(uint16 chainId_, uint256 limit_) external onlyOwner {\\n require(\\n limit_ >= chainIdToMaxSingleReceiveTransactionLimit[chainId_],\\n \\\"Daily limit < single receive transaction limit\\\"\\n );\\n emit SetMaxDailyReceiveLimit(chainId_, chainIdToMaxDailyReceiveLimit[chainId_], limit_);\\n chainIdToMaxDailyReceiveLimit[chainId_] = limit_;\\n }\\n\\n /**\\n * @notice Sets the whitelist address to skip checks on transaction limit.\\n * @param user_ Address to be add in whitelist.\\n * @param val_ Boolean to be set (true for user_ address is whitelisted).\\n * @custom:access Only owner.\\n * @custom:event Emits setWhitelist.\\n */\\n function setWhitelist(address user_, bool val_) external onlyOwner {\\n emit SetWhitelist(user_, val_);\\n whitelist[user_] = val_;\\n }\\n\\n /**\\n * @notice Triggers stopped state of the bridge.\\n * @custom:access Only owner.\\n */\\n function pause() external onlyOwner {\\n _pause();\\n }\\n\\n /**\\n * @notice Triggers resume state of the bridge.\\n * @custom:access Only owner.\\n */\\n function unpause() external onlyOwner {\\n _unpause();\\n }\\n\\n /**\\n * @notice A public function to sweep accidental ERC-20 transfers to this contract. Tokens are sent to user\\n * @param token_ The address of the ERC-20 token to sweep\\n * @param to_ The address of the recipient\\n * @param amount_ The amount of tokens needs to transfer\\n * @custom:event Emits SweepToken event\\n * @custom:error Throw InsufficientBalance if amount_ is greater than the available balance of the token in the contract\\n * @custom:access Only Owner\\n */\\n function sweepToken(IERC20 token_, address to_, uint256 amount_) external onlyOwner {\\n uint256 balance = token_.balanceOf(address(this));\\n if (amount_ > balance) {\\n revert InsufficientBalance(amount_, balance);\\n }\\n\\n emit SweepToken(address(token_), to_, amount_);\\n\\n token_.safeTransfer(to_, amount_);\\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 Only owner.\\n * @custom:event Emits TrustedRemoteRemoved once chain id is removed from trusted remote.\\n */\\n function removeTrustedRemote(uint16 remoteChainId_) external onlyOwner {\\n delete trustedRemoteLookup[remoteChainId_];\\n emit TrustedRemoteRemoved(remoteChainId_);\\n }\\n\\n /**\\n * @notice It enables or disables sendAndCall functionality for the bridge.\\n * @param enabled_ Boolean indicating whether the sendAndCall function should be enabled or disabled.\\n */\\n function updateSendAndCallEnabled(bool enabled_) external onlyOwner {\\n sendAndCallEnabled = enabled_;\\n emit UpdateSendAndCallEnabled(enabled_);\\n }\\n\\n /**\\n * @notice Checks the eligibility of a sender to initiate a cross-chain token transfer.\\n * @dev This external view function assesses whether the specified sender is eligible to transfer the given amount\\n * to the specified destination chain. It considers factors such as whitelisting, transaction limits, and a 24-hour window.\\n * @param from_ The sender's address initiating the transfer.\\n * @param dstChainId_ Indicates destination chain.\\n * @param amount_ The quantity of tokens to be transferred.\\n * @return eligibleToSend A boolean indicating whether the sender is eligible to transfer the tokens.\\n * @return maxSingleTransactionLimit The maximum limit for a single transaction.\\n * @return maxDailyLimit The maximum daily limit for transactions.\\n * @return amountInUsd The equivalent amount in USD based on the oracle price.\\n * @return transferredInWindow The total amount transferred in the current 24-hour window.\\n * @return last24HourWindowStart The timestamp when the current 24-hour window started.\\n * @return isWhiteListedUser A boolean indicating whether the sender is whitelisted.\\n */\\n function isEligibleToSend(\\n address from_,\\n uint16 dstChainId_,\\n uint256 amount_\\n )\\n external\\n view\\n returns (\\n bool eligibleToSend,\\n uint256 maxSingleTransactionLimit,\\n uint256 maxDailyLimit,\\n uint256 amountInUsd,\\n uint256 transferredInWindow,\\n uint256 last24HourWindowStart,\\n bool isWhiteListedUser\\n )\\n {\\n // Check if the sender's address is whitelisted\\n isWhiteListedUser = whitelist[from_];\\n\\n // Calculate the amount in USD using the oracle price\\n Exp memory oraclePrice = Exp({ mantissa: oracle.getPrice(token()) });\\n amountInUsd = mul_ScalarTruncate(oraclePrice, amount_);\\n\\n // Load values for the 24-hour window checks\\n uint256 currentBlockTimestamp = block.timestamp;\\n last24HourWindowStart = chainIdToLast24HourWindowStart[dstChainId_];\\n transferredInWindow = chainIdToLast24HourTransferred[dstChainId_];\\n maxSingleTransactionLimit = chainIdToMaxSingleTransactionLimit[dstChainId_];\\n maxDailyLimit = chainIdToMaxDailyLimit[dstChainId_];\\n if (currentBlockTimestamp - last24HourWindowStart > 1 days) {\\n transferredInWindow = amountInUsd;\\n last24HourWindowStart = currentBlockTimestamp;\\n } else {\\n transferredInWindow += amountInUsd;\\n }\\n eligibleToSend = (isWhiteListedUser ||\\n ((amountInUsd <= maxSingleTransactionLimit) && (transferredInWindow <= maxDailyLimit)));\\n }\\n\\n /**\\n * @notice Initiates a cross-chain token transfer and triggers a call on the destination chain.\\n * @dev This internal override function enables the contract to send tokens and invoke calls on the specified\\n * destination chain. It checks whether the sendAndCall feature is enabled before proceeding with the transfer.\\n * @param from_ Address from which tokens will be debited.\\n * @param dstChainId_ Destination chain id on which tokens will be send.\\n * @param toAddress_ Address on which tokens will be credited on destination chain.\\n * @param amount_ Amount of tokens that will be transferred.\\n * @param payload_ Additional data payload for the call on the destination chain.\\n * @param dstGasForCall_ The amount of gas allocated for the call on the destination chain.\\n * @param callparams_ Additional parameters, including refund address, ZRO payment address,\\n * and adapter params.\\n */\\n function sendAndCall(\\n address from_,\\n uint16 dstChainId_,\\n bytes32 toAddress_,\\n uint256 amount_,\\n bytes calldata payload_,\\n uint64 dstGasForCall_,\\n LzCallParams calldata callparams_\\n ) public payable override {\\n require(sendAndCallEnabled, \\\"sendAndCall is disabled\\\");\\n\\n super.sendAndCall(from_, dstChainId_, toAddress_, amount_, payload_, dstGasForCall_, callparams_);\\n }\\n\\n function retryMessage(\\n uint16 _srcChainId,\\n bytes calldata _srcAddress,\\n uint64 _nonce,\\n bytes calldata _payload\\n ) public payable override {\\n bytes memory trustedRemote = trustedRemoteLookup[_srcChainId];\\n // it will still block the message pathway from (srcChainId, srcAddress). should not receive message from untrusted remote.\\n require(\\n _srcAddress.length == trustedRemote.length &&\\n trustedRemote.length > 0 &&\\n keccak256(_srcAddress) == keccak256(trustedRemote),\\n \\\"LzApp: invalid source sending contract\\\"\\n );\\n super.retryMessage(_srcChainId, _srcAddress, _nonce, _payload);\\n }\\n\\n /**\\n * @notice Empty implementation of renounce ownership to avoid any mishappening.\\n */\\n function renounceOwnership() public override {}\\n\\n /**\\n * @notice Return's the address of the inner token of this bridge.\\n * @return Address of the inner token of this bridge.\\n */\\n function token() public view override returns (address) {\\n return address(innerToken);\\n }\\n\\n /**\\n * @notice Checks if the sender is eligible to send tokens\\n * @param from_ Sender's address sending tokens\\n * @param dstChainId_ Chain id on which tokens should be sent\\n * @param amount_ Amount of tokens to be sent\\n */\\n function _isEligibleToSend(address from_, uint16 dstChainId_, uint256 amount_) internal {\\n // Check if the sender's address is whitelisted\\n bool isWhiteListedUser = whitelist[from_];\\n // Check if the user is whitelisted and return if true\\n if (isWhiteListedUser) {\\n return;\\n }\\n\\n // Calculate the amount in USD using the oracle price\\n uint256 amountInUsd;\\n Exp memory oraclePrice = Exp({ mantissa: oracle.getPrice(token()) });\\n amountInUsd = mul_ScalarTruncate(oraclePrice, amount_);\\n\\n // Load values for the 24-hour window checks\\n uint256 currentBlockTimestamp = block.timestamp;\\n uint256 lastDayWindowStart = chainIdToLast24HourWindowStart[dstChainId_];\\n uint256 transferredInWindow = chainIdToLast24HourTransferred[dstChainId_];\\n uint256 maxSingleTransactionLimit = chainIdToMaxSingleTransactionLimit[dstChainId_];\\n uint256 maxDailyLimit = chainIdToMaxDailyLimit[dstChainId_];\\n\\n // Revert if the amount exceeds the single transaction limit\\n require(amountInUsd <= maxSingleTransactionLimit, \\\"Single Transaction Limit Exceed\\\");\\n\\n // Check if the time window has changed (more than 24 hours have passed)\\n if (currentBlockTimestamp - lastDayWindowStart > 1 days) {\\n transferredInWindow = amountInUsd;\\n chainIdToLast24HourWindowStart[dstChainId_] = currentBlockTimestamp;\\n } else {\\n transferredInWindow += amountInUsd;\\n }\\n\\n // Revert if the amount exceeds the daily limit\\n require(transferredInWindow <= maxDailyLimit, \\\"Daily Transaction Limit Exceed\\\");\\n\\n // Update the amount for the 24-hour window\\n chainIdToLast24HourTransferred[dstChainId_] = transferredInWindow;\\n }\\n\\n /**\\n * @notice Checks if receiver is able to receive tokens\\n * @param toAddress_ Receiver address\\n * @param srcChainId_ Source chain id from which token is send\\n * @param receivedAmount_ Amount of tokens received\\n */\\n function _isEligibleToReceive(address toAddress_, uint16 srcChainId_, uint256 receivedAmount_) internal {\\n // Check if the recipient's address is whitelisted\\n bool isWhiteListedUser = whitelist[toAddress_];\\n // Check if the user is whitelisted and return if true\\n if (isWhiteListedUser) {\\n return;\\n }\\n\\n // Calculate the received amount in USD using the oracle price\\n uint256 receivedAmountInUsd;\\n Exp memory oraclePrice = Exp({ mantissa: oracle.getPrice(address(token())) });\\n receivedAmountInUsd = mul_ScalarTruncate(oraclePrice, receivedAmount_);\\n\\n uint256 currentBlockTimestamp = block.timestamp;\\n\\n // Load values for the 24-hour window checks for receiving\\n uint256 lastDayReceiveWindowStart = chainIdToLast24HourReceiveWindowStart[srcChainId_];\\n uint256 receivedInWindow = chainIdToLast24HourReceived[srcChainId_];\\n uint256 maxSingleReceiveTransactionLimit = chainIdToMaxSingleReceiveTransactionLimit[srcChainId_];\\n uint256 maxDailyReceiveLimit = chainIdToMaxDailyReceiveLimit[srcChainId_];\\n\\n // Check if the received amount exceeds the single transaction limit\\n require(receivedAmountInUsd <= maxSingleReceiveTransactionLimit, \\\"Single Transaction Limit Exceed\\\");\\n\\n // Check if the time window has changed (more than 24 hours have passed)\\n if (currentBlockTimestamp - lastDayReceiveWindowStart > 1 days) {\\n receivedInWindow = receivedAmountInUsd;\\n chainIdToLast24HourReceiveWindowStart[srcChainId_] = currentBlockTimestamp;\\n } else {\\n receivedInWindow += receivedAmountInUsd;\\n }\\n\\n // Revert if the received amount exceeds the daily limit\\n require(receivedInWindow <= maxDailyReceiveLimit, \\\"Daily Transaction Limit Exceed\\\");\\n\\n // Update the received amount for the 24-hour window\\n chainIdToLast24HourReceived[srcChainId_] = receivedInWindow;\\n }\\n\\n /**\\n * @notice Transfer tokens from sender to receiver account.\\n * @param from_ Address from which token has to be transferred(Sender).\\n * @param to_ Address on which token will be tranferred(Receiver).\\n * @param amount_ Amount of token to be transferred.\\n * @return Actual balance difference.\\n */\\n function _transferFrom(\\n address from_,\\n address to_,\\n uint256 amount_\\n ) internal override whenNotPaused returns (uint256) {\\n uint256 before = innerToken.balanceOf(to_);\\n if (from_ == address(this)) {\\n innerToken.safeTransfer(to_, amount_);\\n } else {\\n innerToken.safeTransferFrom(from_, to_, amount_);\\n }\\n return innerToken.balanceOf(to_) - before;\\n }\\n\\n /**\\n * @notice Returns Conversion rate factor from large decimals to shared decimals.\\n * @return Conversion rate factor.\\n */\\n function _ld2sdRate() internal view override returns (uint256) {\\n return ld2sdRate;\\n }\\n}\\n\",\"keccak256\":\"0x75d98574e674d1c3f35ac92c9e930d0238059b540d3385abeb14b20ef03cb13c\",\"license\":\"BSD-3-Clause\"},\"contracts/Bridge/XVSProxyOFTDest.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.13;\\n\\nimport { IXVS } from \\\"./interfaces/IXVS.sol\\\";\\nimport { BaseXVSProxyOFT } from \\\"./BaseXVSProxyOFT.sol\\\";\\n\\n/**\\n * @title XVSProxyOFTDest\\n * @author Venus\\n * @notice XVSProxyOFTDest contract builds upon the functionality of its parent contract, BaseXVSProxyOFT,\\n * and focuses on managing token transfers to the destination chain.\\n * It provides functions to check eligibility and perform the actual token transfers while maintaining strict access controls and pausing mechanisms.\\n */\\n\\ncontract XVSProxyOFTDest is BaseXVSProxyOFT {\\n /**\\n * @notice Emits when stored message dropped without successful retrying.\\n */\\n event DropFailedMessage(uint16 srcChainId, bytes indexed srcAddress, uint64 nonce);\\n\\n constructor(\\n address tokenAddress_,\\n uint8 sharedDecimals_,\\n address lzEndpoint_,\\n address oracle_\\n ) BaseXVSProxyOFT(tokenAddress_, sharedDecimals_, lzEndpoint_, oracle_) {}\\n\\n /**\\n * @notice Clear failed messages from the storage.\\n * @param srcChainId_ Chain id of source\\n * @param srcAddress_ Address of source followed by current bridge address\\n * @param nonce_ Nonce_ of the transaction\\n * @custom:access Only owner\\n * @custom:event Emits DropFailedMessage on clearance of failed message.\\n */\\n function dropFailedMessage(uint16 srcChainId_, bytes memory srcAddress_, uint64 nonce_) external onlyOwner {\\n failedMessages[srcChainId_][srcAddress_][nonce_] = bytes32(0);\\n emit DropFailedMessage(srcChainId_, srcAddress_, nonce_);\\n }\\n\\n /**\\n * @notice Returns the total circulating supply of the token on the destination chain i.e (total supply).\\n * @return total circulating supply of the token on the destination chain.\\n */\\n function circulatingSupply() public view override returns (uint256) {\\n return innerToken.totalSupply();\\n }\\n\\n /**\\n * @notice Debit tokens from the given address\\n * @param from_ Address from which tokens to be debited\\n * @param dstChainId_ Destination chain id\\n * @param amount_ Amount of tokens to be debited\\n * @return Actual amount debited\\n */\\n function _debitFrom(\\n address from_,\\n uint16 dstChainId_,\\n bytes32,\\n uint256 amount_\\n ) internal override whenNotPaused returns (uint256) {\\n require(from_ == _msgSender(), \\\"ProxyOFT: owner is not send caller\\\");\\n _isEligibleToSend(from_, dstChainId_, amount_);\\n IXVS(address(innerToken)).burn(from_, amount_);\\n return amount_;\\n }\\n\\n /**\\n * @notice Credit tokens in the given account\\n * @param srcChainId_ Source chain id\\n * @param toAddress_ Address on which token will be credited\\n * @param amount_ Amount of tokens to be credited\\n * @return Actual amount credited\\n */\\n function _creditTo(\\n uint16 srcChainId_,\\n address toAddress_,\\n uint256 amount_\\n ) internal override whenNotPaused returns (uint256) {\\n _isEligibleToReceive(toAddress_, srcChainId_, amount_);\\n IXVS(address(innerToken)).mint(toAddress_, amount_);\\n return amount_;\\n }\\n}\\n\",\"keccak256\":\"0x4a4bf23d37f26b82877c24326d81699f0ca217a593599fa179d45db8be919e50\",\"license\":\"BSD-3-Clause\"},\"contracts/Bridge/interfaces/IXVS.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.13;\\n\\n/**\\n * @title IXVS\\n * @author Venus\\n * @notice Interface implemented by `XVS` token.\\n */\\ninterface IXVS {\\n function mint(address to, uint256 amount) external;\\n\\n function burn(address from, uint256 amount) external;\\n}\\n\",\"keccak256\":\"0x55c954155c4499e8ef1915ad28c5567c247e4397dc12ba553b33c5edb1114dba\",\"license\":\"BSD-3-Clause\"}},\"version\":1}", - "bytecode": "0x6101006040523480156200001257600080fd5b5060405162005adf38038062005adf833981016040819052620000359162000379565b6000805460ff19169055838383838282818180806200005433620002c6565b6001600160a01b0316608052505060ff1660a05250620000769050846200031f565b62000081826200031f565b6200008c816200031f565b6001600160a01b03841660c081905260408051600481526024810182526020810180516001600160e01b031663313ce56760e01b179052905160009283929091620000d89190620003d6565b600060405180830381855afa9150503d806000811462000115576040519150601f19603f3d011682016040523d82523d6000602084013e6200011a565b606091505b509150915081620001815760405162461bcd60e51b815260206004820152602660248201527f50726f78794f46543a206661696c656420746f2067657420746f6b656e20646560448201526563696d616c7360d01b60648201526084015b60405180910390fd5b60008180602001905181019062000199919062000414565b90508060ff168660ff161115620002085760405162461bcd60e51b815260206004820152602c60248201527f50726f78794f46543a20736861726564446563696d616c73206d75737420626560448201526b203c3d20646563696d616c7360a01b606482015260840162000178565b6200021486826200044f565b6200022190600a62000574565b60e0526040516001600160a01b038816907f0b673f021ff9a27bbe58f282908695869e130b3103029190387b83650806c2c390600090a26040516001600160a01b038516906000907f05cd89403c6bdeac21c2ff33de395121a31fa1bc2bf3adf4825f1f86e79969dd908290a35050600780546001600160a01b0390931661010002610100600160a81b03199093169290921790915550620005859650505050505050565b600080546001600160a01b03838116610100818102610100600160a81b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b6001600160a01b03811662000347576040516342bcdf7f60e11b815260040160405180910390fd5b50565b80516001600160a01b03811681146200036257600080fd5b919050565b805160ff811681146200036257600080fd5b600080600080608085870312156200039057600080fd5b6200039b856200034a565b9350620003ab6020860162000367565b9250620003bb604086016200034a565b9150620003cb606086016200034a565b905092959194509250565b6000825160005b81811015620003f95760208186018101518583015201620003dd565b8181111562000409576000828501525b509190910192915050565b6000602082840312156200042757600080fd5b620004328262000367565b9392505050565b634e487b7160e01b600052601160045260246000fd5b600060ff821660ff8416808210156200046c576200046c62000439565b90039392505050565b600181815b80851115620004b65781600019048211156200049a576200049a62000439565b80851615620004a857918102915b93841c93908002906200047a565b509250929050565b600082620004cf575060016200056e565b81620004de575060006200056e565b8160018114620004f75760028114620005025762000522565b60019150506200056e565b60ff84111562000516576200051662000439565b50506001821b6200056e565b5060208310610133831016604e8410600b841016171562000547575081810a6200056e565b62000553838362000475565b80600019048211156200056a576200056a62000439565b0290505b92915050565b60006200043260ff841683620004be565b60805160a05160c05160e05161548d62000652600039600081816130d4015281816136470152613b82015260008181610ca10152818161106801528181611ba701528181612d7501528181612e0101528181612e3a01528181612e830152818161371d01528181613beb01528181613db401526141e4015260006108be015260008181610abe01528181610cf501528181610f3c01528181610fe40152818161142601528181611ed9015281816123cc015281816125a701528181612aa501526138ab015261548d6000f3fe6080604052600436106103b75760003560e01c80637dc0d1d0116101f2578063baf3292d1161010d578063df2a5b3b116100a0578063f2fde38b1161006f578063f2fde38b14610c52578063f5ecbdbc14610c72578063fc0c546a14610c92578063fdff235b14610cc557600080fd5b8063df2a5b3b14610bdd578063e6a20ae614610bfd578063eaffd49a14610c12578063eb8d72b714610c3257600080fd5b8063cc01e9b6116100dc578063cc01e9b614610b50578063cc7015ae14610b70578063d1deba1f14610b9d578063d708a46814610bb057600080fd5b8063baf3292d14610ae0578063c1e9132e14610b00578063c446183414610b1a578063cbed8b9c14610b3057600080fd5b806393a61d6c116101855780639f38369a116101545780639f38369a14610a4c578063a4c51df514610a6c578063a6c3d16514610a8c578063b353aaa714610aac57600080fd5b806393a61d6c1461097d578063950c8a74146109aa5780639b19251a146109ca5780639bdb9812146109fa57600080fd5b80638cfd8f5c116101c15780638cfd8f5c146108e05780638da5cb5b14610918578063904365671461093b5780639358928b1461096857600080fd5b80637dc0d1d01461083a5780638456cb591461087757806384e69c691461088c578063857749b0146108ac57600080fd5b80634c42899a116102e257806364aff9ec11610275578063715018a611610244578063715018a6146107ce5780637533d788146107da57806376203b48146108075780637adbf9731461081a57600080fd5b806364aff9ec1461075b57806366ad5c8a1461077b578063695ef6bf1461079b57806369c1e7b8146107ae57600080fd5b806353489d6c116102b157806353489d6c146106b457806353d6fd59146106d45780635b8c41e6146106f45780635c975abb1461074357600080fd5b80634c42899a146106135780634cec62561461063a5780634ed2c662146106675780634f4ba0f41461068757600080fd5b80632dbbec081161035a5780633f1f4fa4116103295780633f1f4fa41461059c5780633f4ba83a146105c957806342d65a8d146105de57806344770515146105fe57600080fd5b80632dbbec08146104ec578063365260b41461050c5780633c4ec39b146105415780633d8b38f61461057c57600080fd5b80630df37483116103965780630df374831461043357806310ddb13714610453578063182b4b89146104735780632488eec8146104cc57600080fd5b80621d3567146103bc57806301ffc9a7146103de57806307e0db1714610413575b600080fd5b3480156103c857600080fd5b506103dc6103d736600461466d565b610cf2565b005b3480156103ea57600080fd5b506103fe6103f9366004614700565b610ee4565b60405190151581526020015b60405180910390f35b34801561041f57600080fd5b506103dc61042e36600461472a565b610f1b565b34801561043f57600080fd5b506103dc61044e366004614745565b610fa4565b34801561045f57600080fd5b506103dc61046e36600461472a565b610fc3565b34801561047f57600080fd5b5061049361048e366004614784565b61101b565b6040805197151588526020880196909652948601939093526060850191909152608084015260a0830152151560c082015260e00161040a565b3480156104d857600080fd5b506103dc6104e7366004614745565b611191565b3480156104f857600080fd5b506103dc61050736600461472a565b611275565b34801561051857600080fd5b5061052c6105273660046147d0565b6112d4565b6040805192835260208301919091520161040a565b34801561054d57600080fd5b5061056e61055c36600461472a565b600d6020526000908152604090205481565b60405190815260200161040a565b34801561058857600080fd5b506103fe610597366004614837565b611329565b3480156105a857600080fd5b5061056e6105b736600461472a565b60036020526000908152604090205481565b3480156105d557600080fd5b506103dc6113f5565b3480156105ea57600080fd5b506103dc6105f9366004614837565b611407565b34801561060a57600080fd5b5061056e600081565b34801561061f57600080fd5b50610628600081565b60405160ff909116815260200161040a565b34801561064657600080fd5b5061056e61065536600461472a565b600a6020526000908152604090205481565b34801561067357600080fd5b506103dc610682366004614889565b61148d565b34801561069357600080fd5b5061056e6106a236600461472a565b60096020526000908152604090205481565b3480156106c057600080fd5b506103dc6106cf366004614745565b6114d2565b3480156106e057600080fd5b506103dc6106ef3660046148a6565b6115b6565b34801561070057600080fd5b5061056e61070f36600461494c565b6005602090815260009384526040808520845180860184018051928152908401958401959095209452929052825290205481565b34801561074f57600080fd5b5060005460ff166103fe565b34801561076757600080fd5b506103dc6107763660046149ec565b61162e565b34801561078757600080fd5b506103dc61079636600461466d565b611735565b6103dc6107a9366004614a45565b611811565b3480156107ba57600080fd5b506103dc6107c9366004614745565b61187c565b3480156103dc57600080fd5b3480156107e657600080fd5b506107fa6107f536600461472a565b611968565b60405161040a9190614b10565b6103dc610815366004614b23565b611a02565b34801561082657600080fd5b506103dc610835366004614bd5565b611a6e565b34801561084657600080fd5b5060075461085f9061010090046001600160a01b031681565b6040516001600160a01b03909116815260200161040a565b34801561088357600080fd5b506103dc611ae6565b34801561089857600080fd5b506103dc6108a736600461494c565b611af6565b3480156108b857600080fd5b506106287f000000000000000000000000000000000000000000000000000000000000000081565b3480156108ec57600080fd5b5061056e6108fb366004614bf2565b600260209081526000928352604080842090915290825290205481565b34801561092457600080fd5b5060005461010090046001600160a01b031661085f565b34801561094757600080fd5b5061056e61095636600461472a565b600c6020526000908152604090205481565b34801561097457600080fd5b5061056e611ba3565b34801561098957600080fd5b5061056e61099836600461472a565b600b6020526000908152604090205481565b3480156109b657600080fd5b5060045461085f906001600160a01b031681565b3480156109d657600080fd5b506103fe6109e5366004614bd5565b60106020526000908152604090205460ff1681565b348015610a0657600080fd5b506103fe610a1536600461494c565b6006602090815260009384526040808520845180860184018051928152908401958401959095209452929052825290205460ff1681565b348015610a5857600080fd5b506107fa610a6736600461472a565b611c2c565b348015610a7857600080fd5b5061052c610a87366004614c25565b611d42565b348015610a9857600080fd5b506103dc610aa7366004614837565b611dd1565b348015610ab857600080fd5b5061085f7f000000000000000000000000000000000000000000000000000000000000000081565b348015610aec57600080fd5b506103dc610afb366004614bd5565b611e64565b348015610b0c57600080fd5b506007546103fe9060ff1681565b348015610b2657600080fd5b5061056e61271081565b348015610b3c57600080fd5b506103dc610b4b366004614ce2565b611eba565b348015610b5c57600080fd5b506103dc610b6b366004614745565b611f4f565b348015610b7c57600080fd5b5061056e610b8b36600461472a565b60086020526000908152604090205481565b6103dc610bab36600461466d565b61203b565b348015610bbc57600080fd5b5061056e610bcb36600461472a565b600e6020526000908152604090205481565b348015610be957600080fd5b506103dc610bf8366004614d50565b61213f565b348015610c0957600080fd5b50610628600181565b348015610c1e57600080fd5b506103dc610c2d366004614d6e565b6121a9565b348015610c3e57600080fd5b506103dc610c4d366004614837565b6122c8565b348015610c5e57600080fd5b506103dc610c6d366004614bd5565b612322565b348015610c7e57600080fd5b506107fa610c8d366004614e36565b61239b565b348015610c9e57600080fd5b507f000000000000000000000000000000000000000000000000000000000000000061085f565b348015610cd157600080fd5b5061056e610ce036600461472a565b600f6020526000908152604090205481565b337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610d6f5760405162461bcd60e51b815260206004820152601e60248201527f4c7a4170703a20696e76616c696420656e64706f696e742063616c6c6572000060448201526064015b60405180910390fd5b61ffff861660009081526001602052604081208054610d8d90614e83565b80601f0160208091040260200160405190810160405280929190818152602001828054610db990614e83565b8015610e065780601f10610ddb57610100808354040283529160200191610e06565b820191906000526020600020905b815481529060010190602001808311610de957829003601f168201915b50505050509050805186869050148015610e21575060008151115b8015610e49575080516020820120604051610e3f9088908890614eb7565b6040518091039020145b610e655760405162461bcd60e51b8152600401610d6690614ec7565b610edb8787878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8a018190048102820181019092528881528a93509150889088908190840183828082843760009201919091525061244e92505050565b50505050505050565b60006001600160e01b03198216631f7ecdf760e01b1480610f1557506301ffc9a760e01b6001600160e01b03198316145b92915050565b610f236124c7565b6040516307e0db1760e01b815261ffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906307e0db17906024015b600060405180830381600087803b158015610f8957600080fd5b505af1158015610f9d573d6000803e3d6000fd5b5050505050565b610fac6124c7565b61ffff909116600090815260036020526040902055565b610fcb6124c7565b6040516310ddb13760e01b815261ffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906310ddb13790602401610f6f565b6001600160a01b03838116600090815260106020908152604080832054815192830190915260075492938493849384938493849360ff909216928492909182916101009004166341976e097f00000000000000000000000000000000000000000000000000000000000000006040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa1580156110cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110ef9190614f0d565b905290506110fd818a612527565b61ffff8b166000908152600b6020908152604080832054600a835281842054600884528285205460099094529190932054919a509098509196509094509250426201518061114b8583614f3c565b111561115c57859450809350611169565b6111668686614f53565b94505b828061118057508786111580156111805750868511155b985050509397509397509397909450565b6111996124c7565b61ffff821660009081526008602052604090205481101561120b5760405162461bcd60e51b815260206004820152602660248201527f4461696c79206c696d6974203c2073696e676c65207472616e73616374696f6e604482015265081b1a5b5a5d60d21b6064820152608401610d66565b61ffff82166000818152600960209081526040918290205482519384529083015281018290527f4dd31065e259d5284e44d1f9265710da72eafcf78dc925e3881189fc3b71f6939060600160405180910390a161ffff909116600090815260096020526040902055565b61127d6124c7565b61ffff81166000908152600160205260408120611299916144b0565b60405161ffff821681527f6d5075c81d4d9e75bec6052f4e44f58f8a8cf1327544addbbf015fb06f83bd37906020015b60405180910390a150565b60008061131a8888888888888080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061253f92505050565b91509150965096945050505050565b61ffff83166000908152600160205260408120805482919061134a90614e83565b80601f016020809104026020016040519081016040528092919081815260200182805461137690614e83565b80156113c35780601f10611398576101008083540402835291602001916113c3565b820191906000526020600020905b8154815290600101906020018083116113a657829003601f168201915b5050505050905083836040516113da929190614eb7565b60405180910390208180519060200120149150509392505050565b6113fd6124c7565b611405612633565b565b61140f6124c7565b6040516342d65a8d60e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906342d65a8d9061145f90869086908690600401614f94565b600060405180830381600087803b15801561147957600080fd5b505af1158015610edb573d6000803e3d6000fd5b6114956124c7565b6007805460ff19168215159081179091556040517fe628f01c6f4e6340598d3a2913390db68e8859379eebff349e170f2b16baed0090600090a250565b6114da6124c7565b61ffff821660009081526009602052604090205481111561154c5760405162461bcd60e51b815260206004820152602660248201527f53696e676c65207472616e73616374696f6e206c696d6974203e204461696c79604482015265081b1a5b5a5d60d21b6064820152608401610d66565b61ffff82166000818152600860209081526040918290205482519384529083015281018290527f7babeac42ccbb33537ee421fedc4db7b5f251b5d2a3fa5c0ff4b35b2d783be879060600160405180910390a161ffff909116600090815260086020526040902055565b6115be6124c7565b816001600160a01b03167ff6019ec0a78d156d249a1ec7579e2321f6ac7521d6e1d2eacf90ba4a184dcceb826040516115fb911515815260200190565b60405180910390a26001600160a01b03919091166000908152601060205260409020805460ff1916911515919091179055565b6116366124c7565b6040516370a0823160e01b81523060048201526000906001600160a01b038516906370a0823190602401602060405180830381865afa15801561167d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116a19190614f0d565b9050808211156116ce5760405163cf47918160e01b81526004810183905260248101829052604401610d66565b826001600160a01b0316846001600160a01b03167f6d25be279134f4ecaa4770aff0c3d916d9e7c5ef37b65ed95dbdba411f5d54d58460405161171391815260200190565b60405180910390a361172f6001600160a01b0385168484612685565b50505050565b3330146117935760405162461bcd60e51b815260206004820152602660248201527f4e6f6e626c6f636b696e674c7a4170703a2063616c6c6572206d7573742062656044820152650204c7a4170760d41b6064820152608401610d66565b6118098686868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8901819004810282018101909252878152899350915087908790819084018382808284376000920191909152506126ed92505050565b505050505050565b611809858585856118256020870187614bd5565b6118356040880160208901614bd5565b6118426040890189614fb2565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061277492505050565b6118846124c7565b61ffff82166000908152600c60205260409020548110156118fe5760405162461bcd60e51b815260206004820152602e60248201527f4461696c79206c696d6974203c2073696e676c6520726563656976652074726160448201526d1b9cd858dd1a5bdb881b1a5b5a5d60921b6064820152608401610d66565b61ffff82166000818152600d60209081526040918290205482519384529083015281018290527f95dc51094cd27cf4ee3fd0dbb50cf96f8df1629c822f5434c4a34d7eb03c97249060600160405180910390a161ffff9091166000908152600d6020526040902055565b6001602052600090815260409020805461198190614e83565b80601f01602080910402602001604051908101604052809291908181526020018280546119ad90614e83565b80156119fa5780601f106119cf576101008083540402835291602001916119fa565b820191906000526020600020905b8154815290600101906020018083116119dd57829003601f168201915b505050505081565b60075460ff16611a545760405162461bcd60e51b815260206004820152601760248201527f73656e64416e6443616c6c2069732064697361626c65640000000000000000006044820152606401610d66565b611a64888888888888888861285c565b5050505050505050565b611a766124c7565b611a7f81612900565b6007546040516001600160a01b0380841692610100900416907f05cd89403c6bdeac21c2ff33de395121a31fa1bc2bf3adf4825f1f86e79969dd90600090a3600780546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b611aee6124c7565b611405612927565b611afe6124c7565b61ffff83166000908152600560205260408082209051611b1f908590614ff8565b9081526040805191829003602090810183206001600160401b038616600090815291522091909155611b52908390614ff8565b6040805191829003822061ffff861683526001600160401b0384166020840152917f48a980eea4ea1c540209e2f9f32a4c2edf51fab37b1d21f453868301ecb6e2ee910160405180910390a2505050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611c03573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c279190614f0d565b905090565b61ffff8116600090815260016020526040812080546060929190611c4f90614e83565b80601f0160208091040260200160405190810160405280929190818152602001828054611c7b90614e83565b8015611cc85780601f10611c9d57610100808354040283529160200191611cc8565b820191906000526020600020905b815481529060010190602001808311611cab57829003601f168201915b505050505090508051600003611d205760405162461bcd60e51b815260206004820152601d60248201527f4c7a4170703a206e6f20747275737465642070617468207265636f72640000006044820152606401610d66565b611d3b600060148351611d339190614f3c565b839190612964565b9392505050565b600080611dbf8b8b8b8b8b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8d018190048102820181019092528b81528e93508d9250908c908c9081908401838280828437600092019190915250612a7192505050565b91509150995099975050505050505050565b611dd96124c7565b818130604051602001611dee93929190615014565b60408051601f1981840301815291815261ffff85166000908152600160209081529190208251611e23939192909101906144ea565b507f8c0400cfe2d1199b1a725c78960bcc2a344d869b80590d0f2bd005db15a572ce838383604051611e5793929190614f94565b60405180910390a1505050565b611e6c6124c7565b600480546001600160a01b0319166001600160a01b0383169081179091556040519081527f5db758e995a17ec1ad84bdef7e8c3293a0bd6179bcce400dff5d4c3d87db726b906020016112c9565b611ec26124c7565b6040516332fb62e760e21b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063cbed8b9c90611f16908890889088908890889060040161503a565b600060405180830381600087803b158015611f3057600080fd5b505af1158015611f44573d6000803e3d6000fd5b505050505050505050565b611f576124c7565b61ffff82166000908152600d6020526040902054811115611fd15760405162461bcd60e51b815260206004820152602e60248201527f73696e676c652072656365697665207472616e73616374696f6e206c696d697460448201526d080f8811185a5b1e481b1a5b5a5d60921b6064820152608401610d66565b61ffff82166000818152600c60209081526040918290205482519384529083015281018290527f2c42997a938a029910a78e7c28d762b349c28e70f3a89c1fbccbb1a46020b1599060600160405180910390a161ffff9091166000908152600c6020526040902055565b61ffff86166000908152600160205260408120805461205990614e83565b80601f016020809104026020016040519081016040528092919081815260200182805461208590614e83565b80156120d25780601f106120a7576101008083540402835291602001916120d2565b820191906000526020600020905b8154815290600101906020018083116120b557829003601f168201915b505050505090508051868690501480156120ed575060008151115b801561211557508051602082012060405161210b9088908890614eb7565b6040518091039020145b6121315760405162461bcd60e51b8152600401610d6690614ec7565b610edb878787878787612b33565b6121476124c7565b61ffff83811660008181526002602090815260408083209487168084529482529182902085905581519283528201929092529081018290527f9d5c7c0b934da8fefa9c7760c98383778a12dfbfc0c3b3106518f43fb9508ac090606001611e57565b3330146121f85760405162461bcd60e51b815260206004820152601f60248201527f4f4654436f72653a2063616c6c6572206d757374206265204f4654436f7265006044820152606401610d66565b612203308686612d49565b9350846001600160a01b03168a61ffff167fbf551ec93859b170f9b2141bd9298bf3f64322c6f7beb2543a0cb669834118bf8660405161224591815260200190565b60405180910390a3604051633fe79aed60e11b81526001600160a01b03861690637fcf35da908390612289908e908e908e908e908e908d908d908d90600401615068565b600060405180830381600088803b1580156122a357600080fd5b5087f11580156122b7573d6000803e3d6000fd5b505050505050505050505050505050565b6122d06124c7565b61ffff831660009081526001602052604090206122ee90838361456e565b507ffa41487ad5d6728f0b19276fa1eddc16558578f5109fc39d2dc33c3230470dab838383604051611e5793929190614f94565b61232a6124c7565b6001600160a01b03811661238f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610d66565b61239881612f03565b50565b604051633d7b2f6f60e21b815261ffff808616600483015284166024820152306044820152606481018290526060907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063f5ecbdbc90608401600060405180830381865afa15801561241b573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261244391908101906150c3565b90505b949350505050565b6000806124b15a60966366ad5c8a60e01b898989896040516024016124769493929190615130565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915230929190612f5c565b9150915081611809576118098686868685612fe6565b6000546001600160a01b036101009091041633146114055760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610d66565b6000806125348484613083565b9050612446816130b4565b600080600061258d87612551886130cc565b6040805160006020820152602181019390935260c09190911b6001600160c01b0319166041830152805160298184030181526049909201905290565b60405163040a7bb160e41b81529091506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906340a7bb10906125e4908b90309086908b908b9060040161516e565b6040805180830381865afa158015612600573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061262491906151c2565b92509250509550959350505050565b61263b613152565b6000805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6040516001600160a01b0383166024820152604481018290526126e890849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915261319b565b505050565b60006126f98282613270565b905060ff81166127145761270f858585856132cc565b610f9d565b60001960ff82160161272c5761270f8585858561335c565b60405162461bcd60e51b815260206004820152601c60248201527f4f4654436f72653a20756e6b6e6f776e207061636b65742074797065000000006044820152606401610d66565b60006127828782848161356a565b61278b8561363f565b50905061279a8888888461367f565b9050600081116127e85760405162461bcd60e51b815260206004820152601960248201527813d19510dbdc994e88185b5bdd5b9d081d1bdbc81cdb585b1b603a1b6044820152606401610d66565b60006127f787612551846130cc565b9050612807888287878734613782565b86896001600160a01b03168961ffff167fd81fc9b8523134ed613870ed029d6170cbb73aa6a6bc311b9a642689fb9df59a8560405161284891815260200190565b60405180910390a450979650505050505050565b611f448888888888888080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508a92506128a99150506020890189614bd5565b6128b960408a0160208b01614bd5565b6128c660408b018b614fb2565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061392792505050565b6001600160a01b038116612398576040516342bcdf7f60e11b815260040160405180910390fd5b61292f613a1c565b6000805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586126683390565b60608161297281601f614f53565b10156129b15760405162461bcd60e51b815260206004820152600e60248201526d736c6963655f6f766572666c6f7760901b6044820152606401610d66565b6129bb8284614f53565b845110156129ff5760405162461bcd60e51b8152602060048201526011602482015270736c6963655f6f75744f66426f756e647360781b6044820152606401610d66565b606082158015612a1e5760405191506000825260208201604052612a68565b6040519150601f8416801560200281840101858101878315602002848b0101015b81831015612a57578051835260209283019201612a3f565b5050858452601f01601f1916604052505b50949350505050565b6000806000612a8b338a612a848b6130cc565b8a8a613a62565b60405163040a7bb160e41b81529091506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906340a7bb1090612ae2908d90309086908b908b9060040161516e565b6040805180830381865afa158015612afe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b2291906151c2565b925092505097509795505050505050565b61ffff86166000908152600560205260408082209051612b569088908890614eb7565b90815260408051602092819003830190206001600160401b03871660009081529252902054905080612bd65760405162461bcd60e51b815260206004820152602360248201527f4e6f6e626c6f636b696e674c7a4170703a206e6f2073746f726564206d65737360448201526261676560e81b6064820152608401610d66565b808383604051612be7929190614eb7565b604051809103902014612c465760405162461bcd60e51b815260206004820152602160248201527f4e6f6e626c6f636b696e674c7a4170703a20696e76616c6964207061796c6f616044820152601960fa1b6064820152608401610d66565b61ffff87166000908152600560205260408082209051612c699089908990614eb7565b90815260408051602092819003830181206001600160401b038916600090815290845282902093909355601f88018290048202830182019052868252612d01918991899089908190840183828082843760009201919091525050604080516020601f8a018190048102820181019092528881528a9350915088908890819084018382808284376000920191909152506126ed92505050565b7fc264d91f3adc5588250e1551f547752ca0cfa8f6b530d243b9f9f4cab10ea8e58787878785604051612d389594939291906151e6565b60405180910390a150505050505050565b6000612d53613a1c565b6040516370a0823160e01b81526001600160a01b0384811660048301526000917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa158015612dbe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612de29190614f0d565b9050306001600160a01b03861603612e2d57612e286001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168585612685565b612e62565b612e626001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016868686613aa3565b6040516370a0823160e01b81526001600160a01b03858116600483015282917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa158015612ecc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ef09190614f0d565b612efa9190614f3c565b95945050505050565b600080546001600160a01b03838116610100818102610100600160a81b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b6000606060008060008661ffff166001600160401b03811115612f8157612f816148df565b6040519080825280601f01601f191660200182016040528015612fab576020820181803683370190505b50905060008087516020890160008d8df191503d925086831115612fcd578692505b828152826000602083013e909890975095505050505050565b8180519060200120600560008761ffff1661ffff168152602001908152602001600020856040516130179190614ff8565b9081526040805191829003602090810183206001600160401b0388166000908152915220919091557fe183f33de2837795525b4792ca4cd60535bd77c53b7e7030060bfcf5734d6b0c906130749087908790879087908790615221565b60405180910390a15050505050565b60408051602081019091526000815260405180602001604052806130ab856000015185613adb565b90529392505050565b8051600090610f1590670de0b6b3a764000090615289565b6000806130f97f000000000000000000000000000000000000000000000000000000000000000084615289565b90506001600160401b03811115610f155760405162461bcd60e51b815260206004820152601a60248201527f4f4654436f72653a20616d6f756e745344206f766572666c6f770000000000006044820152606401610d66565b60005460ff166114055760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610d66565b60006131f0826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316613ae79092919063ffffffff16565b9050805160001480613211575080806020019051810190613211919061529d565b6126e85760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610d66565b600061327d826001614f53565b835110156132c35760405162461bcd60e51b8152602060048201526013602482015272746f55696e74385f6f75744f66426f756e647360681b6044820152606401610d66565b50016001015190565b6000806132d883613af6565b90925090506001600160a01b0382166132f15761dead91505b60006132fc82613b7b565b9050613309878483613bb0565b9050826001600160a01b03168761ffff167fbf551ec93859b170f9b2141bd9298bf3f64322c6f7beb2543a0cb669834118bf8360405161334b91815260200190565b60405180910390a350505050505050565b600080600080600061336d86613c4f565b945094509450945094506000600660008b61ffff1661ffff168152602001908152602001600020896040516133a29190614ff8565b90815260408051602092819003830190206001600160401b038b166000908152925281205460ff1691506133d585613b7b565b905081613443576133e78b3083613bb0565b61ffff8c1660009081526006602052604090819020905191925060019161340f908d90614ff8565b90815260408051602092819003830190206001600160401b038d16600090815292529020805460ff19169115159190911790555b6001600160a01b0386163b61349a576040516001600160a01b03871681527f9aedf5fdba8716db3b6705ca00150643309995d4f818a249ed6dde6677e7792d9060200160405180910390a15050505050505061172f565b8a8a8a8a8a8a868a60008a6134b8578b6001600160401b03166134ba565b5a5b90506000806134ec5a609663eaffd49a60e01b8e8e8e8d8d8d8d8d6040516024016124769897969594939291906152ba565b915091508115613545578751602089012060405161ffff8d16907fb8890edbfc1c74692f527444645f95489c3703cc2df42e4a366f5d06fa6cd88490613537908e908e90869061532e565b60405180910390a250613552565b6135528b8b8b8b85612fe6565b50505050505050505050505050505050505050505050565b600061357583613d06565b61ffff808716600090815260026020908152604080832093891683529290522054909150806135e65760405162461bcd60e51b815260206004820152601a60248201527f4c7a4170703a206d696e4761734c696d6974206e6f74207365740000000000006044820152606401610d66565b6135f08382614f53565b8210156118095760405162461bcd60e51b815260206004820152601b60248201527f4c7a4170703a20676173206c696d697420697320746f6f206c6f7700000000006044820152606401610d66565b60008061366c7f00000000000000000000000000000000000000000000000000000000000000008461535c565b90506136788184614f3c565b9150915091565b6000613689613a1c565b6001600160a01b03851633146136ec5760405162461bcd60e51b815260206004820152602260248201527f50726f78794f46543a206f776e6572206973206e6f742073656e642063616c6c60448201526132b960f11b6064820152608401610d66565b6136f7858584613d62565b604051632770a7eb60e21b81526001600160a01b038681166004830152602482018490527f00000000000000000000000000000000000000000000000000000000000000001690639dc29fac90604401600060405180830381600087803b15801561376157600080fd5b505af1158015613775573d6000803e3d6000fd5b5093979650505050505050565b61ffff8616600090815260016020526040812080546137a090614e83565b80601f01602080910402602001604051908101604052809291908181526020018280546137cc90614e83565b80156138195780601f106137ee57610100808354040283529160200191613819565b820191906000526020600020905b8154815290600101906020018083116137fc57829003601f168201915b50505050509050805160000361388a5760405162461bcd60e51b815260206004820152603060248201527f4c7a4170703a2064657374696e6174696f6e20636861696e206973206e6f742060448201526f61207472757374656420736f7572636560801b6064820152608401610d66565b613895878751613f84565b60405162c5803160e81b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063c58031009084906138ec908b9086908c908c908c908c90600401615370565b6000604051808303818588803b15801561390557600080fd5b505af1158015613919573d6000803e3d6000fd5b505050505050505050505050565b600061393f896001846001600160401b03891661356a565b6139488761363f565b5090506139578a8a8a8461367f565b9050600081116139a55760405162461bcd60e51b815260206004820152601960248201527813d19510dbdc994e88185b5bdd5b9d081d1bdbc81cdb585b1b603a1b6044820152606401610d66565b60006139b5338a612a84856130cc565b90506139c58a8287878734613782565b888b6001600160a01b03168b61ffff167fd81fc9b8523134ed613870ed029d6170cbb73aa6a6bc311b9a642689fb9df59a85604051613a0691815260200190565b60405180910390a4509998505050505050505050565b60005460ff16156114055760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610d66565b6060600185856001600160a01b0389168587604051602001613a89969594939291906153d7565b604051602081830303815290604052905095945050505050565b6040516001600160a01b038085166024830152831660448201526064810182905261172f9085906323b872dd60e01b906084016126b1565b6000611d3b8284615438565b60606124468484600085613ff5565b60008080613b048482613270565b60ff16148015613b15575082516029145b613b5c5760405162461bcd60e51b815260206004820152601860248201527713d19510dbdc994e881a5b9d985b1a59081c185e5b1bd85960421b6044820152606401610d66565b613b6783600d6140d0565b9150613b74836021614135565b9050915091565b6000610f157f00000000000000000000000000000000000000000000000000000000000000006001600160401b038416615438565b6000613bba613a1c565b613bc5838584614192565b6040516340c10f1960e01b81526001600160a01b038481166004830152602482018490527f000000000000000000000000000000000000000000000000000000000000000016906340c10f1990604401600060405180830381600087803b158015613c2f57600080fd5b505af1158015613c43573d6000803e3d6000fd5b50939695505050505050565b600080806060816001613c628783613270565b60ff1614613cad5760405162461bcd60e51b815260206004820152601860248201527713d19510dbdc994e881a5b9d985b1a59081c185e5b1bd85960421b6044820152606401610d66565b613cb886600d6140d0565b9350613cc5866021614135565b9250613cd28660296143b4565b9450613cdf866049614135565b9050613cfb6051808851613cf39190614f3c565b889190612964565b915091939590929450565b6000602282511015613d5a5760405162461bcd60e51b815260206004820152601c60248201527f4c7a4170703a20696e76616c69642061646170746572506172616d73000000006044820152606401610d66565b506022015190565b6001600160a01b03831660009081526010602052604090205460ff168015613d8a5750505050565b60408051602081019091526007546000918291819061010090046001600160a01b03166341976e097f00000000000000000000000000000000000000000000000000000000000000006040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015613e17573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613e3b9190614f0d565b90529050613e498185612527565b61ffff86166000908152600b6020908152604080832054600a835281842054600884528285205460099094529190932054939550429390919081871115613ed25760405162461bcd60e51b815260206004820152601f60248201527f53696e676c65205472616e73616374696f6e204c696d697420457863656564006044820152606401610d66565b62015180613ee08587614f3c565b1115613f045761ffff8a166000908152600b60205260409020859055869250613f11565b613f0e8784614f53565b92505b80831115613f615760405162461bcd60e51b815260206004820152601e60248201527f4461696c79205472616e73616374696f6e204c696d69742045786365656400006044820152606401610d66565b505061ffff9097166000908152600a602052604090209690965550505050505050565b61ffff821660009081526003602052604081205490819003613fa557506127105b808211156126e85760405162461bcd60e51b815260206004820181905260248201527f4c7a4170703a207061796c6f61642073697a6520697320746f6f206c617267656044820152606401610d66565b6060824710156140565760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610d66565b600080866001600160a01b031685876040516140729190614ff8565b60006040518083038185875af1925050503d80600081146140af576040519150601f19603f3d011682016040523d82523d6000602084013e6140b4565b606091505b50915091506140c587838387614412565b979650505050505050565b60006140dd826014614f53565b835110156141255760405162461bcd60e51b8152602060048201526015602482015274746f416464726573735f6f75744f66426f756e647360581b6044820152606401610d66565b500160200151600160601b900490565b6000614142826008614f53565b835110156141895760405162461bcd60e51b8152602060048201526014602482015273746f55696e7436345f6f75744f66426f756e647360601b6044820152606401610d66565b50016008015190565b6001600160a01b03831660009081526010602052604090205460ff1680156141ba5750505050565b60408051602081019091526007546000918291819061010090046001600160a01b03166341976e097f00000000000000000000000000000000000000000000000000000000000000006040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015614247573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061426b9190614f0d565b905290506142798185612527565b61ffff86166000908152600f6020908152604080832054600e835281842054600c845282852054600d90945291909320549395504293909190818711156143025760405162461bcd60e51b815260206004820152601f60248201527f53696e676c65205472616e73616374696f6e204c696d697420457863656564006044820152606401610d66565b620151806143108587614f3c565b11156143345761ffff8a166000908152600f60205260409020859055869250614341565b61433e8784614f53565b92505b808311156143915760405162461bcd60e51b815260206004820152601e60248201527f4461696c79205472616e73616374696f6e204c696d69742045786365656400006044820152606401610d66565b505061ffff9097166000908152600e602052604090209690965550505050505050565b60006143c1826020614f53565b835110156144095760405162461bcd60e51b8152602060048201526015602482015274746f427974657333325f6f75744f66426f756e647360581b6044820152606401610d66565b50016020015190565b6060831561448157825160000361447a576001600160a01b0385163b61447a5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610d66565b5081612446565b61244683838151156144965781518083602001fd5b8060405162461bcd60e51b8152600401610d669190614b10565b5080546144bc90614e83565b6000825580601f106144cc575050565b601f01602090049060005260206000209081019061239891906145e2565b8280546144f690614e83565b90600052602060002090601f016020900481019282614518576000855561455e565b82601f1061453157805160ff191683800117855561455e565b8280016001018555821561455e579182015b8281111561455e578251825591602001919060010190614543565b5061456a9291506145e2565b5090565b82805461457a90614e83565b90600052602060002090601f01602090048101928261459c576000855561455e565b82601f106145b55782800160ff1982351617855561455e565b8280016001018555821561455e579182015b8281111561455e5782358255916020019190600101906145c7565b5b8082111561456a57600081556001016145e3565b803561ffff8116811461460957600080fd5b919050565b60008083601f84011261462057600080fd5b5081356001600160401b0381111561463757600080fd5b60208301915083602082850101111561464f57600080fd5b9250929050565b80356001600160401b038116811461460957600080fd5b6000806000806000806080878903121561468657600080fd5b61468f876145f7565b955060208701356001600160401b03808211156146ab57600080fd5b6146b78a838b0161460e565b90975095508591506146cb60408a01614656565b945060608901359150808211156146e157600080fd5b506146ee89828a0161460e565b979a9699509497509295939492505050565b60006020828403121561471257600080fd5b81356001600160e01b031981168114611d3b57600080fd5b60006020828403121561473c57600080fd5b611d3b826145f7565b6000806040838503121561475857600080fd5b614761836145f7565b946020939093013593505050565b6001600160a01b038116811461239857600080fd5b60008060006060848603121561479957600080fd5b83356147a48161476f565b92506147b2602085016145f7565b9150604084013590509250925092565b801515811461239857600080fd5b60008060008060008060a087890312156147e957600080fd5b6147f2876145f7565b955060208701359450604087013593506060870135614810816147c2565b925060808701356001600160401b0381111561482b57600080fd5b6146ee89828a0161460e565b60008060006040848603121561484c57600080fd5b614855846145f7565b925060208401356001600160401b0381111561487057600080fd5b61487c8682870161460e565b9497909650939450505050565b60006020828403121561489b57600080fd5b8135611d3b816147c2565b600080604083850312156148b957600080fd5b82356148c48161476f565b915060208301356148d4816147c2565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171561491d5761491d6148df565b604052919050565b60006001600160401b0382111561493e5761493e6148df565b50601f01601f191660200190565b60008060006060848603121561496157600080fd5b61496a846145f7565b925060208401356001600160401b0381111561498557600080fd5b8401601f8101861361499657600080fd5b80356149a96149a482614925565b6148f5565b8181528760208385010111156149be57600080fd5b816020840160208301376000602083830101528094505050506149e360408501614656565b90509250925092565b600080600060608486031215614a0157600080fd5b8335614a0c8161476f565b92506020840135614a1c8161476f565b929592945050506040919091013590565b600060608284031215614a3f57600080fd5b50919050565b600080600080600060a08688031215614a5d57600080fd5b8535614a688161476f565b9450614a76602087016145f7565b9350604086013592506060860135915060808601356001600160401b03811115614a9f57600080fd5b614aab88828901614a2d565b9150509295509295909350565b60005b83811015614ad3578181015183820152602001614abb565b8381111561172f5750506000910152565b60008151808452614afc816020860160208601614ab8565b601f01601f19169290920160200192915050565b602081526000611d3b6020830184614ae4565b60008060008060008060008060e0898b031215614b3f57600080fd5b8835614b4a8161476f565b9750614b5860208a016145f7565b9650604089013595506060890135945060808901356001600160401b0380821115614b8257600080fd5b614b8e8c838d0161460e565b9096509450849150614ba260a08c01614656565b935060c08b0135915080821115614bb857600080fd5b50614bc58b828c01614a2d565b9150509295985092959890939650565b600060208284031215614be757600080fd5b8135611d3b8161476f565b60008060408385031215614c0557600080fd5b614c0e836145f7565b9150614c1c602084016145f7565b90509250929050565b600080600080600080600080600060e08a8c031215614c4357600080fd5b614c4c8a6145f7565b985060208a0135975060408a0135965060608a01356001600160401b0380821115614c7657600080fd5b614c828d838e0161460e565b9098509650869150614c9660808d01614656565b955060a08c01359150614ca8826147c2565b90935060c08b01359080821115614cbe57600080fd5b50614ccb8c828d0161460e565b915080935050809150509295985092959850929598565b600080600080600060808688031215614cfa57600080fd5b614d03866145f7565b9450614d11602087016145f7565b93506040860135925060608601356001600160401b03811115614d3357600080fd5b614d3f8882890161460e565b969995985093965092949392505050565b600080600060608486031215614d6557600080fd5b6147a4846145f7565b6000806000806000806000806000806101008b8d031215614d8e57600080fd5b614d978b6145f7565b995060208b01356001600160401b0380821115614db357600080fd5b614dbf8e838f0161460e565b909b509950899150614dd360408e01614656565b985060608d0135975060808d01359150614dec8261476f565b90955060a08c0135945060c08c01359080821115614e0957600080fd5b50614e168d828e0161460e565b9150809450508092505060e08b013590509295989b9194979a5092959850565b60008060008060808587031215614e4c57600080fd5b614e55856145f7565b9350614e63602086016145f7565b92506040850135614e738161476f565b9396929550929360600135925050565b600181811c90821680614e9757607f821691505b602082108103614a3f57634e487b7160e01b600052602260045260246000fd5b8183823760009101908152919050565b60208082526026908201527f4c7a4170703a20696e76616c696420736f757263652073656e64696e6720636f6040820152651b9d1c9858dd60d21b606082015260800190565b600060208284031215614f1f57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b600082821015614f4e57614f4e614f26565b500390565b60008219821115614f6657614f66614f26565b500190565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b61ffff84168152604060208201526000612443604083018486614f6b565b6000808335601e19843603018112614fc957600080fd5b8301803591506001600160401b03821115614fe357600080fd5b60200191503681900382131561464f57600080fd5b6000825161500a818460208701614ab8565b9190910192915050565b8284823760609190911b6bffffffffffffffffffffffff19169101908152601401919050565b600061ffff8088168352808716602084015250846040830152608060608301526140c5608083018486614f6b565b61ffff8916815260c06020820152600061508660c08301898b614f6b565b6001600160401b038816604084015286606084015285608084015282810360a08401526150b4818587614f6b565b9b9a5050505050505050505050565b6000602082840312156150d557600080fd5b81516001600160401b038111156150eb57600080fd5b8201601f810184136150fc57600080fd5b805161510a6149a482614925565b81815285602083850101111561511f57600080fd5b612efa826020830160208601614ab8565b61ffff8516815260806020820152600061514d6080830186614ae4565b6001600160401b038516604084015282810360608401526140c58185614ae4565b61ffff861681526001600160a01b038516602082015260a06040820181905260009061519c90830186614ae4565b841515606084015282810360808401526151b68185614ae4565b98975050505050505050565b600080604083850312156151d557600080fd5b505080516020909101519092909150565b61ffff86168152608060208201526000615204608083018688614f6b565b6001600160401b0394909416604083015250606001529392505050565b61ffff8616815260a06020820152600061523e60a0830187614ae4565b6001600160401b0386166040840152828103606084015261525f8186614ae4565b905082810360808401526151b68185614ae4565b634e487b7160e01b600052601260045260246000fd5b60008261529857615298615273565b500490565b6000602082840312156152af57600080fd5b8151611d3b816147c2565b600061010061ffff8b1683528060208401526152d88184018b614ae4565b6001600160401b038a166040850152606084018990526001600160a01b038816608085015260a0840187905283810360c085015290506153188186614ae4565b9150508260e08301529998505050505050505050565b6060815260006153416060830186614ae4565b6001600160401b039490941660208301525060400152919050565b60008261536b5761536b615273565b500690565b61ffff8716815260c06020820152600061538d60c0830188614ae4565b828103604084015261539f8188614ae4565b6001600160a01b0387811660608601528616608085015283810360a085015290506153ca8185614ae4565b9998505050505050505050565b60ff60f81b8760f81b16815285600182015260006001600160401b0360c01b808760c01b166021840152856029840152808560c01b166049840152508251615426816051850160208701614ab8565b91909101605101979650505050505050565b600081600019048311821515161561545257615452614f26565b50029056fea264697066735822122002e85e39cd4c45156c727cd464d515ec143b5814676650286110a986cc477f2264736f6c634300080d0033", - "deployedBytecode": "0x6080604052600436106103b75760003560e01c80637dc0d1d0116101f2578063baf3292d1161010d578063df2a5b3b116100a0578063f2fde38b1161006f578063f2fde38b14610c52578063f5ecbdbc14610c72578063fc0c546a14610c92578063fdff235b14610cc557600080fd5b8063df2a5b3b14610bdd578063e6a20ae614610bfd578063eaffd49a14610c12578063eb8d72b714610c3257600080fd5b8063cc01e9b6116100dc578063cc01e9b614610b50578063cc7015ae14610b70578063d1deba1f14610b9d578063d708a46814610bb057600080fd5b8063baf3292d14610ae0578063c1e9132e14610b00578063c446183414610b1a578063cbed8b9c14610b3057600080fd5b806393a61d6c116101855780639f38369a116101545780639f38369a14610a4c578063a4c51df514610a6c578063a6c3d16514610a8c578063b353aaa714610aac57600080fd5b806393a61d6c1461097d578063950c8a74146109aa5780639b19251a146109ca5780639bdb9812146109fa57600080fd5b80638cfd8f5c116101c15780638cfd8f5c146108e05780638da5cb5b14610918578063904365671461093b5780639358928b1461096857600080fd5b80637dc0d1d01461083a5780638456cb591461087757806384e69c691461088c578063857749b0146108ac57600080fd5b80634c42899a116102e257806364aff9ec11610275578063715018a611610244578063715018a6146107ce5780637533d788146107da57806376203b48146108075780637adbf9731461081a57600080fd5b806364aff9ec1461075b57806366ad5c8a1461077b578063695ef6bf1461079b57806369c1e7b8146107ae57600080fd5b806353489d6c116102b157806353489d6c146106b457806353d6fd59146106d45780635b8c41e6146106f45780635c975abb1461074357600080fd5b80634c42899a146106135780634cec62561461063a5780634ed2c662146106675780634f4ba0f41461068757600080fd5b80632dbbec081161035a5780633f1f4fa4116103295780633f1f4fa41461059c5780633f4ba83a146105c957806342d65a8d146105de57806344770515146105fe57600080fd5b80632dbbec08146104ec578063365260b41461050c5780633c4ec39b146105415780633d8b38f61461057c57600080fd5b80630df37483116103965780630df374831461043357806310ddb13714610453578063182b4b89146104735780632488eec8146104cc57600080fd5b80621d3567146103bc57806301ffc9a7146103de57806307e0db1714610413575b600080fd5b3480156103c857600080fd5b506103dc6103d736600461466d565b610cf2565b005b3480156103ea57600080fd5b506103fe6103f9366004614700565b610ee4565b60405190151581526020015b60405180910390f35b34801561041f57600080fd5b506103dc61042e36600461472a565b610f1b565b34801561043f57600080fd5b506103dc61044e366004614745565b610fa4565b34801561045f57600080fd5b506103dc61046e36600461472a565b610fc3565b34801561047f57600080fd5b5061049361048e366004614784565b61101b565b6040805197151588526020880196909652948601939093526060850191909152608084015260a0830152151560c082015260e00161040a565b3480156104d857600080fd5b506103dc6104e7366004614745565b611191565b3480156104f857600080fd5b506103dc61050736600461472a565b611275565b34801561051857600080fd5b5061052c6105273660046147d0565b6112d4565b6040805192835260208301919091520161040a565b34801561054d57600080fd5b5061056e61055c36600461472a565b600d6020526000908152604090205481565b60405190815260200161040a565b34801561058857600080fd5b506103fe610597366004614837565b611329565b3480156105a857600080fd5b5061056e6105b736600461472a565b60036020526000908152604090205481565b3480156105d557600080fd5b506103dc6113f5565b3480156105ea57600080fd5b506103dc6105f9366004614837565b611407565b34801561060a57600080fd5b5061056e600081565b34801561061f57600080fd5b50610628600081565b60405160ff909116815260200161040a565b34801561064657600080fd5b5061056e61065536600461472a565b600a6020526000908152604090205481565b34801561067357600080fd5b506103dc610682366004614889565b61148d565b34801561069357600080fd5b5061056e6106a236600461472a565b60096020526000908152604090205481565b3480156106c057600080fd5b506103dc6106cf366004614745565b6114d2565b3480156106e057600080fd5b506103dc6106ef3660046148a6565b6115b6565b34801561070057600080fd5b5061056e61070f36600461494c565b6005602090815260009384526040808520845180860184018051928152908401958401959095209452929052825290205481565b34801561074f57600080fd5b5060005460ff166103fe565b34801561076757600080fd5b506103dc6107763660046149ec565b61162e565b34801561078757600080fd5b506103dc61079636600461466d565b611735565b6103dc6107a9366004614a45565b611811565b3480156107ba57600080fd5b506103dc6107c9366004614745565b61187c565b3480156103dc57600080fd5b3480156107e657600080fd5b506107fa6107f536600461472a565b611968565b60405161040a9190614b10565b6103dc610815366004614b23565b611a02565b34801561082657600080fd5b506103dc610835366004614bd5565b611a6e565b34801561084657600080fd5b5060075461085f9061010090046001600160a01b031681565b6040516001600160a01b03909116815260200161040a565b34801561088357600080fd5b506103dc611ae6565b34801561089857600080fd5b506103dc6108a736600461494c565b611af6565b3480156108b857600080fd5b506106287f000000000000000000000000000000000000000000000000000000000000000081565b3480156108ec57600080fd5b5061056e6108fb366004614bf2565b600260209081526000928352604080842090915290825290205481565b34801561092457600080fd5b5060005461010090046001600160a01b031661085f565b34801561094757600080fd5b5061056e61095636600461472a565b600c6020526000908152604090205481565b34801561097457600080fd5b5061056e611ba3565b34801561098957600080fd5b5061056e61099836600461472a565b600b6020526000908152604090205481565b3480156109b657600080fd5b5060045461085f906001600160a01b031681565b3480156109d657600080fd5b506103fe6109e5366004614bd5565b60106020526000908152604090205460ff1681565b348015610a0657600080fd5b506103fe610a1536600461494c565b6006602090815260009384526040808520845180860184018051928152908401958401959095209452929052825290205460ff1681565b348015610a5857600080fd5b506107fa610a6736600461472a565b611c2c565b348015610a7857600080fd5b5061052c610a87366004614c25565b611d42565b348015610a9857600080fd5b506103dc610aa7366004614837565b611dd1565b348015610ab857600080fd5b5061085f7f000000000000000000000000000000000000000000000000000000000000000081565b348015610aec57600080fd5b506103dc610afb366004614bd5565b611e64565b348015610b0c57600080fd5b506007546103fe9060ff1681565b348015610b2657600080fd5b5061056e61271081565b348015610b3c57600080fd5b506103dc610b4b366004614ce2565b611eba565b348015610b5c57600080fd5b506103dc610b6b366004614745565b611f4f565b348015610b7c57600080fd5b5061056e610b8b36600461472a565b60086020526000908152604090205481565b6103dc610bab36600461466d565b61203b565b348015610bbc57600080fd5b5061056e610bcb36600461472a565b600e6020526000908152604090205481565b348015610be957600080fd5b506103dc610bf8366004614d50565b61213f565b348015610c0957600080fd5b50610628600181565b348015610c1e57600080fd5b506103dc610c2d366004614d6e565b6121a9565b348015610c3e57600080fd5b506103dc610c4d366004614837565b6122c8565b348015610c5e57600080fd5b506103dc610c6d366004614bd5565b612322565b348015610c7e57600080fd5b506107fa610c8d366004614e36565b61239b565b348015610c9e57600080fd5b507f000000000000000000000000000000000000000000000000000000000000000061085f565b348015610cd157600080fd5b5061056e610ce036600461472a565b600f6020526000908152604090205481565b337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610d6f5760405162461bcd60e51b815260206004820152601e60248201527f4c7a4170703a20696e76616c696420656e64706f696e742063616c6c6572000060448201526064015b60405180910390fd5b61ffff861660009081526001602052604081208054610d8d90614e83565b80601f0160208091040260200160405190810160405280929190818152602001828054610db990614e83565b8015610e065780601f10610ddb57610100808354040283529160200191610e06565b820191906000526020600020905b815481529060010190602001808311610de957829003601f168201915b50505050509050805186869050148015610e21575060008151115b8015610e49575080516020820120604051610e3f9088908890614eb7565b6040518091039020145b610e655760405162461bcd60e51b8152600401610d6690614ec7565b610edb8787878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8a018190048102820181019092528881528a93509150889088908190840183828082843760009201919091525061244e92505050565b50505050505050565b60006001600160e01b03198216631f7ecdf760e01b1480610f1557506301ffc9a760e01b6001600160e01b03198316145b92915050565b610f236124c7565b6040516307e0db1760e01b815261ffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906307e0db17906024015b600060405180830381600087803b158015610f8957600080fd5b505af1158015610f9d573d6000803e3d6000fd5b5050505050565b610fac6124c7565b61ffff909116600090815260036020526040902055565b610fcb6124c7565b6040516310ddb13760e01b815261ffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906310ddb13790602401610f6f565b6001600160a01b03838116600090815260106020908152604080832054815192830190915260075492938493849384938493849360ff909216928492909182916101009004166341976e097f00000000000000000000000000000000000000000000000000000000000000006040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa1580156110cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110ef9190614f0d565b905290506110fd818a612527565b61ffff8b166000908152600b6020908152604080832054600a835281842054600884528285205460099094529190932054919a509098509196509094509250426201518061114b8583614f3c565b111561115c57859450809350611169565b6111668686614f53565b94505b828061118057508786111580156111805750868511155b985050509397509397509397909450565b6111996124c7565b61ffff821660009081526008602052604090205481101561120b5760405162461bcd60e51b815260206004820152602660248201527f4461696c79206c696d6974203c2073696e676c65207472616e73616374696f6e604482015265081b1a5b5a5d60d21b6064820152608401610d66565b61ffff82166000818152600960209081526040918290205482519384529083015281018290527f4dd31065e259d5284e44d1f9265710da72eafcf78dc925e3881189fc3b71f6939060600160405180910390a161ffff909116600090815260096020526040902055565b61127d6124c7565b61ffff81166000908152600160205260408120611299916144b0565b60405161ffff821681527f6d5075c81d4d9e75bec6052f4e44f58f8a8cf1327544addbbf015fb06f83bd37906020015b60405180910390a150565b60008061131a8888888888888080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061253f92505050565b91509150965096945050505050565b61ffff83166000908152600160205260408120805482919061134a90614e83565b80601f016020809104026020016040519081016040528092919081815260200182805461137690614e83565b80156113c35780601f10611398576101008083540402835291602001916113c3565b820191906000526020600020905b8154815290600101906020018083116113a657829003601f168201915b5050505050905083836040516113da929190614eb7565b60405180910390208180519060200120149150509392505050565b6113fd6124c7565b611405612633565b565b61140f6124c7565b6040516342d65a8d60e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906342d65a8d9061145f90869086908690600401614f94565b600060405180830381600087803b15801561147957600080fd5b505af1158015610edb573d6000803e3d6000fd5b6114956124c7565b6007805460ff19168215159081179091556040517fe628f01c6f4e6340598d3a2913390db68e8859379eebff349e170f2b16baed0090600090a250565b6114da6124c7565b61ffff821660009081526009602052604090205481111561154c5760405162461bcd60e51b815260206004820152602660248201527f53696e676c65207472616e73616374696f6e206c696d6974203e204461696c79604482015265081b1a5b5a5d60d21b6064820152608401610d66565b61ffff82166000818152600860209081526040918290205482519384529083015281018290527f7babeac42ccbb33537ee421fedc4db7b5f251b5d2a3fa5c0ff4b35b2d783be879060600160405180910390a161ffff909116600090815260086020526040902055565b6115be6124c7565b816001600160a01b03167ff6019ec0a78d156d249a1ec7579e2321f6ac7521d6e1d2eacf90ba4a184dcceb826040516115fb911515815260200190565b60405180910390a26001600160a01b03919091166000908152601060205260409020805460ff1916911515919091179055565b6116366124c7565b6040516370a0823160e01b81523060048201526000906001600160a01b038516906370a0823190602401602060405180830381865afa15801561167d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116a19190614f0d565b9050808211156116ce5760405163cf47918160e01b81526004810183905260248101829052604401610d66565b826001600160a01b0316846001600160a01b03167f6d25be279134f4ecaa4770aff0c3d916d9e7c5ef37b65ed95dbdba411f5d54d58460405161171391815260200190565b60405180910390a361172f6001600160a01b0385168484612685565b50505050565b3330146117935760405162461bcd60e51b815260206004820152602660248201527f4e6f6e626c6f636b696e674c7a4170703a2063616c6c6572206d7573742062656044820152650204c7a4170760d41b6064820152608401610d66565b6118098686868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8901819004810282018101909252878152899350915087908790819084018382808284376000920191909152506126ed92505050565b505050505050565b611809858585856118256020870187614bd5565b6118356040880160208901614bd5565b6118426040890189614fb2565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061277492505050565b6118846124c7565b61ffff82166000908152600c60205260409020548110156118fe5760405162461bcd60e51b815260206004820152602e60248201527f4461696c79206c696d6974203c2073696e676c6520726563656976652074726160448201526d1b9cd858dd1a5bdb881b1a5b5a5d60921b6064820152608401610d66565b61ffff82166000818152600d60209081526040918290205482519384529083015281018290527f95dc51094cd27cf4ee3fd0dbb50cf96f8df1629c822f5434c4a34d7eb03c97249060600160405180910390a161ffff9091166000908152600d6020526040902055565b6001602052600090815260409020805461198190614e83565b80601f01602080910402602001604051908101604052809291908181526020018280546119ad90614e83565b80156119fa5780601f106119cf576101008083540402835291602001916119fa565b820191906000526020600020905b8154815290600101906020018083116119dd57829003601f168201915b505050505081565b60075460ff16611a545760405162461bcd60e51b815260206004820152601760248201527f73656e64416e6443616c6c2069732064697361626c65640000000000000000006044820152606401610d66565b611a64888888888888888861285c565b5050505050505050565b611a766124c7565b611a7f81612900565b6007546040516001600160a01b0380841692610100900416907f05cd89403c6bdeac21c2ff33de395121a31fa1bc2bf3adf4825f1f86e79969dd90600090a3600780546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b611aee6124c7565b611405612927565b611afe6124c7565b61ffff83166000908152600560205260408082209051611b1f908590614ff8565b9081526040805191829003602090810183206001600160401b038616600090815291522091909155611b52908390614ff8565b6040805191829003822061ffff861683526001600160401b0384166020840152917f48a980eea4ea1c540209e2f9f32a4c2edf51fab37b1d21f453868301ecb6e2ee910160405180910390a2505050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611c03573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c279190614f0d565b905090565b61ffff8116600090815260016020526040812080546060929190611c4f90614e83565b80601f0160208091040260200160405190810160405280929190818152602001828054611c7b90614e83565b8015611cc85780601f10611c9d57610100808354040283529160200191611cc8565b820191906000526020600020905b815481529060010190602001808311611cab57829003601f168201915b505050505090508051600003611d205760405162461bcd60e51b815260206004820152601d60248201527f4c7a4170703a206e6f20747275737465642070617468207265636f72640000006044820152606401610d66565b611d3b600060148351611d339190614f3c565b839190612964565b9392505050565b600080611dbf8b8b8b8b8b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8d018190048102820181019092528b81528e93508d9250908c908c9081908401838280828437600092019190915250612a7192505050565b91509150995099975050505050505050565b611dd96124c7565b818130604051602001611dee93929190615014565b60408051601f1981840301815291815261ffff85166000908152600160209081529190208251611e23939192909101906144ea565b507f8c0400cfe2d1199b1a725c78960bcc2a344d869b80590d0f2bd005db15a572ce838383604051611e5793929190614f94565b60405180910390a1505050565b611e6c6124c7565b600480546001600160a01b0319166001600160a01b0383169081179091556040519081527f5db758e995a17ec1ad84bdef7e8c3293a0bd6179bcce400dff5d4c3d87db726b906020016112c9565b611ec26124c7565b6040516332fb62e760e21b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063cbed8b9c90611f16908890889088908890889060040161503a565b600060405180830381600087803b158015611f3057600080fd5b505af1158015611f44573d6000803e3d6000fd5b505050505050505050565b611f576124c7565b61ffff82166000908152600d6020526040902054811115611fd15760405162461bcd60e51b815260206004820152602e60248201527f73696e676c652072656365697665207472616e73616374696f6e206c696d697460448201526d080f8811185a5b1e481b1a5b5a5d60921b6064820152608401610d66565b61ffff82166000818152600c60209081526040918290205482519384529083015281018290527f2c42997a938a029910a78e7c28d762b349c28e70f3a89c1fbccbb1a46020b1599060600160405180910390a161ffff9091166000908152600c6020526040902055565b61ffff86166000908152600160205260408120805461205990614e83565b80601f016020809104026020016040519081016040528092919081815260200182805461208590614e83565b80156120d25780601f106120a7576101008083540402835291602001916120d2565b820191906000526020600020905b8154815290600101906020018083116120b557829003601f168201915b505050505090508051868690501480156120ed575060008151115b801561211557508051602082012060405161210b9088908890614eb7565b6040518091039020145b6121315760405162461bcd60e51b8152600401610d6690614ec7565b610edb878787878787612b33565b6121476124c7565b61ffff83811660008181526002602090815260408083209487168084529482529182902085905581519283528201929092529081018290527f9d5c7c0b934da8fefa9c7760c98383778a12dfbfc0c3b3106518f43fb9508ac090606001611e57565b3330146121f85760405162461bcd60e51b815260206004820152601f60248201527f4f4654436f72653a2063616c6c6572206d757374206265204f4654436f7265006044820152606401610d66565b612203308686612d49565b9350846001600160a01b03168a61ffff167fbf551ec93859b170f9b2141bd9298bf3f64322c6f7beb2543a0cb669834118bf8660405161224591815260200190565b60405180910390a3604051633fe79aed60e11b81526001600160a01b03861690637fcf35da908390612289908e908e908e908e908e908d908d908d90600401615068565b600060405180830381600088803b1580156122a357600080fd5b5087f11580156122b7573d6000803e3d6000fd5b505050505050505050505050505050565b6122d06124c7565b61ffff831660009081526001602052604090206122ee90838361456e565b507ffa41487ad5d6728f0b19276fa1eddc16558578f5109fc39d2dc33c3230470dab838383604051611e5793929190614f94565b61232a6124c7565b6001600160a01b03811661238f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610d66565b61239881612f03565b50565b604051633d7b2f6f60e21b815261ffff808616600483015284166024820152306044820152606481018290526060907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063f5ecbdbc90608401600060405180830381865afa15801561241b573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261244391908101906150c3565b90505b949350505050565b6000806124b15a60966366ad5c8a60e01b898989896040516024016124769493929190615130565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915230929190612f5c565b9150915081611809576118098686868685612fe6565b6000546001600160a01b036101009091041633146114055760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610d66565b6000806125348484613083565b9050612446816130b4565b600080600061258d87612551886130cc565b6040805160006020820152602181019390935260c09190911b6001600160c01b0319166041830152805160298184030181526049909201905290565b60405163040a7bb160e41b81529091506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906340a7bb10906125e4908b90309086908b908b9060040161516e565b6040805180830381865afa158015612600573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061262491906151c2565b92509250509550959350505050565b61263b613152565b6000805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6040516001600160a01b0383166024820152604481018290526126e890849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915261319b565b505050565b60006126f98282613270565b905060ff81166127145761270f858585856132cc565b610f9d565b60001960ff82160161272c5761270f8585858561335c565b60405162461bcd60e51b815260206004820152601c60248201527f4f4654436f72653a20756e6b6e6f776e207061636b65742074797065000000006044820152606401610d66565b60006127828782848161356a565b61278b8561363f565b50905061279a8888888461367f565b9050600081116127e85760405162461bcd60e51b815260206004820152601960248201527813d19510dbdc994e88185b5bdd5b9d081d1bdbc81cdb585b1b603a1b6044820152606401610d66565b60006127f787612551846130cc565b9050612807888287878734613782565b86896001600160a01b03168961ffff167fd81fc9b8523134ed613870ed029d6170cbb73aa6a6bc311b9a642689fb9df59a8560405161284891815260200190565b60405180910390a450979650505050505050565b611f448888888888888080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508a92506128a99150506020890189614bd5565b6128b960408a0160208b01614bd5565b6128c660408b018b614fb2565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061392792505050565b6001600160a01b038116612398576040516342bcdf7f60e11b815260040160405180910390fd5b61292f613a1c565b6000805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586126683390565b60608161297281601f614f53565b10156129b15760405162461bcd60e51b815260206004820152600e60248201526d736c6963655f6f766572666c6f7760901b6044820152606401610d66565b6129bb8284614f53565b845110156129ff5760405162461bcd60e51b8152602060048201526011602482015270736c6963655f6f75744f66426f756e647360781b6044820152606401610d66565b606082158015612a1e5760405191506000825260208201604052612a68565b6040519150601f8416801560200281840101858101878315602002848b0101015b81831015612a57578051835260209283019201612a3f565b5050858452601f01601f1916604052505b50949350505050565b6000806000612a8b338a612a848b6130cc565b8a8a613a62565b60405163040a7bb160e41b81529091506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906340a7bb1090612ae2908d90309086908b908b9060040161516e565b6040805180830381865afa158015612afe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b2291906151c2565b925092505097509795505050505050565b61ffff86166000908152600560205260408082209051612b569088908890614eb7565b90815260408051602092819003830190206001600160401b03871660009081529252902054905080612bd65760405162461bcd60e51b815260206004820152602360248201527f4e6f6e626c6f636b696e674c7a4170703a206e6f2073746f726564206d65737360448201526261676560e81b6064820152608401610d66565b808383604051612be7929190614eb7565b604051809103902014612c465760405162461bcd60e51b815260206004820152602160248201527f4e6f6e626c6f636b696e674c7a4170703a20696e76616c6964207061796c6f616044820152601960fa1b6064820152608401610d66565b61ffff87166000908152600560205260408082209051612c699089908990614eb7565b90815260408051602092819003830181206001600160401b038916600090815290845282902093909355601f88018290048202830182019052868252612d01918991899089908190840183828082843760009201919091525050604080516020601f8a018190048102820181019092528881528a9350915088908890819084018382808284376000920191909152506126ed92505050565b7fc264d91f3adc5588250e1551f547752ca0cfa8f6b530d243b9f9f4cab10ea8e58787878785604051612d389594939291906151e6565b60405180910390a150505050505050565b6000612d53613a1c565b6040516370a0823160e01b81526001600160a01b0384811660048301526000917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa158015612dbe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612de29190614f0d565b9050306001600160a01b03861603612e2d57612e286001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168585612685565b612e62565b612e626001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016868686613aa3565b6040516370a0823160e01b81526001600160a01b03858116600483015282917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa158015612ecc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ef09190614f0d565b612efa9190614f3c565b95945050505050565b600080546001600160a01b03838116610100818102610100600160a81b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b6000606060008060008661ffff166001600160401b03811115612f8157612f816148df565b6040519080825280601f01601f191660200182016040528015612fab576020820181803683370190505b50905060008087516020890160008d8df191503d925086831115612fcd578692505b828152826000602083013e909890975095505050505050565b8180519060200120600560008761ffff1661ffff168152602001908152602001600020856040516130179190614ff8565b9081526040805191829003602090810183206001600160401b0388166000908152915220919091557fe183f33de2837795525b4792ca4cd60535bd77c53b7e7030060bfcf5734d6b0c906130749087908790879087908790615221565b60405180910390a15050505050565b60408051602081019091526000815260405180602001604052806130ab856000015185613adb565b90529392505050565b8051600090610f1590670de0b6b3a764000090615289565b6000806130f97f000000000000000000000000000000000000000000000000000000000000000084615289565b90506001600160401b03811115610f155760405162461bcd60e51b815260206004820152601a60248201527f4f4654436f72653a20616d6f756e745344206f766572666c6f770000000000006044820152606401610d66565b60005460ff166114055760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610d66565b60006131f0826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316613ae79092919063ffffffff16565b9050805160001480613211575080806020019051810190613211919061529d565b6126e85760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610d66565b600061327d826001614f53565b835110156132c35760405162461bcd60e51b8152602060048201526013602482015272746f55696e74385f6f75744f66426f756e647360681b6044820152606401610d66565b50016001015190565b6000806132d883613af6565b90925090506001600160a01b0382166132f15761dead91505b60006132fc82613b7b565b9050613309878483613bb0565b9050826001600160a01b03168761ffff167fbf551ec93859b170f9b2141bd9298bf3f64322c6f7beb2543a0cb669834118bf8360405161334b91815260200190565b60405180910390a350505050505050565b600080600080600061336d86613c4f565b945094509450945094506000600660008b61ffff1661ffff168152602001908152602001600020896040516133a29190614ff8565b90815260408051602092819003830190206001600160401b038b166000908152925281205460ff1691506133d585613b7b565b905081613443576133e78b3083613bb0565b61ffff8c1660009081526006602052604090819020905191925060019161340f908d90614ff8565b90815260408051602092819003830190206001600160401b038d16600090815292529020805460ff19169115159190911790555b6001600160a01b0386163b61349a576040516001600160a01b03871681527f9aedf5fdba8716db3b6705ca00150643309995d4f818a249ed6dde6677e7792d9060200160405180910390a15050505050505061172f565b8a8a8a8a8a8a868a60008a6134b8578b6001600160401b03166134ba565b5a5b90506000806134ec5a609663eaffd49a60e01b8e8e8e8d8d8d8d8d6040516024016124769897969594939291906152ba565b915091508115613545578751602089012060405161ffff8d16907fb8890edbfc1c74692f527444645f95489c3703cc2df42e4a366f5d06fa6cd88490613537908e908e90869061532e565b60405180910390a250613552565b6135528b8b8b8b85612fe6565b50505050505050505050505050505050505050505050565b600061357583613d06565b61ffff808716600090815260026020908152604080832093891683529290522054909150806135e65760405162461bcd60e51b815260206004820152601a60248201527f4c7a4170703a206d696e4761734c696d6974206e6f74207365740000000000006044820152606401610d66565b6135f08382614f53565b8210156118095760405162461bcd60e51b815260206004820152601b60248201527f4c7a4170703a20676173206c696d697420697320746f6f206c6f7700000000006044820152606401610d66565b60008061366c7f00000000000000000000000000000000000000000000000000000000000000008461535c565b90506136788184614f3c565b9150915091565b6000613689613a1c565b6001600160a01b03851633146136ec5760405162461bcd60e51b815260206004820152602260248201527f50726f78794f46543a206f776e6572206973206e6f742073656e642063616c6c60448201526132b960f11b6064820152608401610d66565b6136f7858584613d62565b604051632770a7eb60e21b81526001600160a01b038681166004830152602482018490527f00000000000000000000000000000000000000000000000000000000000000001690639dc29fac90604401600060405180830381600087803b15801561376157600080fd5b505af1158015613775573d6000803e3d6000fd5b5093979650505050505050565b61ffff8616600090815260016020526040812080546137a090614e83565b80601f01602080910402602001604051908101604052809291908181526020018280546137cc90614e83565b80156138195780601f106137ee57610100808354040283529160200191613819565b820191906000526020600020905b8154815290600101906020018083116137fc57829003601f168201915b50505050509050805160000361388a5760405162461bcd60e51b815260206004820152603060248201527f4c7a4170703a2064657374696e6174696f6e20636861696e206973206e6f742060448201526f61207472757374656420736f7572636560801b6064820152608401610d66565b613895878751613f84565b60405162c5803160e81b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063c58031009084906138ec908b9086908c908c908c908c90600401615370565b6000604051808303818588803b15801561390557600080fd5b505af1158015613919573d6000803e3d6000fd5b505050505050505050505050565b600061393f896001846001600160401b03891661356a565b6139488761363f565b5090506139578a8a8a8461367f565b9050600081116139a55760405162461bcd60e51b815260206004820152601960248201527813d19510dbdc994e88185b5bdd5b9d081d1bdbc81cdb585b1b603a1b6044820152606401610d66565b60006139b5338a612a84856130cc565b90506139c58a8287878734613782565b888b6001600160a01b03168b61ffff167fd81fc9b8523134ed613870ed029d6170cbb73aa6a6bc311b9a642689fb9df59a85604051613a0691815260200190565b60405180910390a4509998505050505050505050565b60005460ff16156114055760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610d66565b6060600185856001600160a01b0389168587604051602001613a89969594939291906153d7565b604051602081830303815290604052905095945050505050565b6040516001600160a01b038085166024830152831660448201526064810182905261172f9085906323b872dd60e01b906084016126b1565b6000611d3b8284615438565b60606124468484600085613ff5565b60008080613b048482613270565b60ff16148015613b15575082516029145b613b5c5760405162461bcd60e51b815260206004820152601860248201527713d19510dbdc994e881a5b9d985b1a59081c185e5b1bd85960421b6044820152606401610d66565b613b6783600d6140d0565b9150613b74836021614135565b9050915091565b6000610f157f00000000000000000000000000000000000000000000000000000000000000006001600160401b038416615438565b6000613bba613a1c565b613bc5838584614192565b6040516340c10f1960e01b81526001600160a01b038481166004830152602482018490527f000000000000000000000000000000000000000000000000000000000000000016906340c10f1990604401600060405180830381600087803b158015613c2f57600080fd5b505af1158015613c43573d6000803e3d6000fd5b50939695505050505050565b600080806060816001613c628783613270565b60ff1614613cad5760405162461bcd60e51b815260206004820152601860248201527713d19510dbdc994e881a5b9d985b1a59081c185e5b1bd85960421b6044820152606401610d66565b613cb886600d6140d0565b9350613cc5866021614135565b9250613cd28660296143b4565b9450613cdf866049614135565b9050613cfb6051808851613cf39190614f3c565b889190612964565b915091939590929450565b6000602282511015613d5a5760405162461bcd60e51b815260206004820152601c60248201527f4c7a4170703a20696e76616c69642061646170746572506172616d73000000006044820152606401610d66565b506022015190565b6001600160a01b03831660009081526010602052604090205460ff168015613d8a5750505050565b60408051602081019091526007546000918291819061010090046001600160a01b03166341976e097f00000000000000000000000000000000000000000000000000000000000000006040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015613e17573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613e3b9190614f0d565b90529050613e498185612527565b61ffff86166000908152600b6020908152604080832054600a835281842054600884528285205460099094529190932054939550429390919081871115613ed25760405162461bcd60e51b815260206004820152601f60248201527f53696e676c65205472616e73616374696f6e204c696d697420457863656564006044820152606401610d66565b62015180613ee08587614f3c565b1115613f045761ffff8a166000908152600b60205260409020859055869250613f11565b613f0e8784614f53565b92505b80831115613f615760405162461bcd60e51b815260206004820152601e60248201527f4461696c79205472616e73616374696f6e204c696d69742045786365656400006044820152606401610d66565b505061ffff9097166000908152600a602052604090209690965550505050505050565b61ffff821660009081526003602052604081205490819003613fa557506127105b808211156126e85760405162461bcd60e51b815260206004820181905260248201527f4c7a4170703a207061796c6f61642073697a6520697320746f6f206c617267656044820152606401610d66565b6060824710156140565760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610d66565b600080866001600160a01b031685876040516140729190614ff8565b60006040518083038185875af1925050503d80600081146140af576040519150601f19603f3d011682016040523d82523d6000602084013e6140b4565b606091505b50915091506140c587838387614412565b979650505050505050565b60006140dd826014614f53565b835110156141255760405162461bcd60e51b8152602060048201526015602482015274746f416464726573735f6f75744f66426f756e647360581b6044820152606401610d66565b500160200151600160601b900490565b6000614142826008614f53565b835110156141895760405162461bcd60e51b8152602060048201526014602482015273746f55696e7436345f6f75744f66426f756e647360601b6044820152606401610d66565b50016008015190565b6001600160a01b03831660009081526010602052604090205460ff1680156141ba5750505050565b60408051602081019091526007546000918291819061010090046001600160a01b03166341976e097f00000000000000000000000000000000000000000000000000000000000000006040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015614247573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061426b9190614f0d565b905290506142798185612527565b61ffff86166000908152600f6020908152604080832054600e835281842054600c845282852054600d90945291909320549395504293909190818711156143025760405162461bcd60e51b815260206004820152601f60248201527f53696e676c65205472616e73616374696f6e204c696d697420457863656564006044820152606401610d66565b620151806143108587614f3c565b11156143345761ffff8a166000908152600f60205260409020859055869250614341565b61433e8784614f53565b92505b808311156143915760405162461bcd60e51b815260206004820152601e60248201527f4461696c79205472616e73616374696f6e204c696d69742045786365656400006044820152606401610d66565b505061ffff9097166000908152600e602052604090209690965550505050505050565b60006143c1826020614f53565b835110156144095760405162461bcd60e51b8152602060048201526015602482015274746f427974657333325f6f75744f66426f756e647360581b6044820152606401610d66565b50016020015190565b6060831561448157825160000361447a576001600160a01b0385163b61447a5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610d66565b5081612446565b61244683838151156144965781518083602001fd5b8060405162461bcd60e51b8152600401610d669190614b10565b5080546144bc90614e83565b6000825580601f106144cc575050565b601f01602090049060005260206000209081019061239891906145e2565b8280546144f690614e83565b90600052602060002090601f016020900481019282614518576000855561455e565b82601f1061453157805160ff191683800117855561455e565b8280016001018555821561455e579182015b8281111561455e578251825591602001919060010190614543565b5061456a9291506145e2565b5090565b82805461457a90614e83565b90600052602060002090601f01602090048101928261459c576000855561455e565b82601f106145b55782800160ff1982351617855561455e565b8280016001018555821561455e579182015b8281111561455e5782358255916020019190600101906145c7565b5b8082111561456a57600081556001016145e3565b803561ffff8116811461460957600080fd5b919050565b60008083601f84011261462057600080fd5b5081356001600160401b0381111561463757600080fd5b60208301915083602082850101111561464f57600080fd5b9250929050565b80356001600160401b038116811461460957600080fd5b6000806000806000806080878903121561468657600080fd5b61468f876145f7565b955060208701356001600160401b03808211156146ab57600080fd5b6146b78a838b0161460e565b90975095508591506146cb60408a01614656565b945060608901359150808211156146e157600080fd5b506146ee89828a0161460e565b979a9699509497509295939492505050565b60006020828403121561471257600080fd5b81356001600160e01b031981168114611d3b57600080fd5b60006020828403121561473c57600080fd5b611d3b826145f7565b6000806040838503121561475857600080fd5b614761836145f7565b946020939093013593505050565b6001600160a01b038116811461239857600080fd5b60008060006060848603121561479957600080fd5b83356147a48161476f565b92506147b2602085016145f7565b9150604084013590509250925092565b801515811461239857600080fd5b60008060008060008060a087890312156147e957600080fd5b6147f2876145f7565b955060208701359450604087013593506060870135614810816147c2565b925060808701356001600160401b0381111561482b57600080fd5b6146ee89828a0161460e565b60008060006040848603121561484c57600080fd5b614855846145f7565b925060208401356001600160401b0381111561487057600080fd5b61487c8682870161460e565b9497909650939450505050565b60006020828403121561489b57600080fd5b8135611d3b816147c2565b600080604083850312156148b957600080fd5b82356148c48161476f565b915060208301356148d4816147c2565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171561491d5761491d6148df565b604052919050565b60006001600160401b0382111561493e5761493e6148df565b50601f01601f191660200190565b60008060006060848603121561496157600080fd5b61496a846145f7565b925060208401356001600160401b0381111561498557600080fd5b8401601f8101861361499657600080fd5b80356149a96149a482614925565b6148f5565b8181528760208385010111156149be57600080fd5b816020840160208301376000602083830101528094505050506149e360408501614656565b90509250925092565b600080600060608486031215614a0157600080fd5b8335614a0c8161476f565b92506020840135614a1c8161476f565b929592945050506040919091013590565b600060608284031215614a3f57600080fd5b50919050565b600080600080600060a08688031215614a5d57600080fd5b8535614a688161476f565b9450614a76602087016145f7565b9350604086013592506060860135915060808601356001600160401b03811115614a9f57600080fd5b614aab88828901614a2d565b9150509295509295909350565b60005b83811015614ad3578181015183820152602001614abb565b8381111561172f5750506000910152565b60008151808452614afc816020860160208601614ab8565b601f01601f19169290920160200192915050565b602081526000611d3b6020830184614ae4565b60008060008060008060008060e0898b031215614b3f57600080fd5b8835614b4a8161476f565b9750614b5860208a016145f7565b9650604089013595506060890135945060808901356001600160401b0380821115614b8257600080fd5b614b8e8c838d0161460e565b9096509450849150614ba260a08c01614656565b935060c08b0135915080821115614bb857600080fd5b50614bc58b828c01614a2d565b9150509295985092959890939650565b600060208284031215614be757600080fd5b8135611d3b8161476f565b60008060408385031215614c0557600080fd5b614c0e836145f7565b9150614c1c602084016145f7565b90509250929050565b600080600080600080600080600060e08a8c031215614c4357600080fd5b614c4c8a6145f7565b985060208a0135975060408a0135965060608a01356001600160401b0380821115614c7657600080fd5b614c828d838e0161460e565b9098509650869150614c9660808d01614656565b955060a08c01359150614ca8826147c2565b90935060c08b01359080821115614cbe57600080fd5b50614ccb8c828d0161460e565b915080935050809150509295985092959850929598565b600080600080600060808688031215614cfa57600080fd5b614d03866145f7565b9450614d11602087016145f7565b93506040860135925060608601356001600160401b03811115614d3357600080fd5b614d3f8882890161460e565b969995985093965092949392505050565b600080600060608486031215614d6557600080fd5b6147a4846145f7565b6000806000806000806000806000806101008b8d031215614d8e57600080fd5b614d978b6145f7565b995060208b01356001600160401b0380821115614db357600080fd5b614dbf8e838f0161460e565b909b509950899150614dd360408e01614656565b985060608d0135975060808d01359150614dec8261476f565b90955060a08c0135945060c08c01359080821115614e0957600080fd5b50614e168d828e0161460e565b9150809450508092505060e08b013590509295989b9194979a5092959850565b60008060008060808587031215614e4c57600080fd5b614e55856145f7565b9350614e63602086016145f7565b92506040850135614e738161476f565b9396929550929360600135925050565b600181811c90821680614e9757607f821691505b602082108103614a3f57634e487b7160e01b600052602260045260246000fd5b8183823760009101908152919050565b60208082526026908201527f4c7a4170703a20696e76616c696420736f757263652073656e64696e6720636f6040820152651b9d1c9858dd60d21b606082015260800190565b600060208284031215614f1f57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b600082821015614f4e57614f4e614f26565b500390565b60008219821115614f6657614f66614f26565b500190565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b61ffff84168152604060208201526000612443604083018486614f6b565b6000808335601e19843603018112614fc957600080fd5b8301803591506001600160401b03821115614fe357600080fd5b60200191503681900382131561464f57600080fd5b6000825161500a818460208701614ab8565b9190910192915050565b8284823760609190911b6bffffffffffffffffffffffff19169101908152601401919050565b600061ffff8088168352808716602084015250846040830152608060608301526140c5608083018486614f6b565b61ffff8916815260c06020820152600061508660c08301898b614f6b565b6001600160401b038816604084015286606084015285608084015282810360a08401526150b4818587614f6b565b9b9a5050505050505050505050565b6000602082840312156150d557600080fd5b81516001600160401b038111156150eb57600080fd5b8201601f810184136150fc57600080fd5b805161510a6149a482614925565b81815285602083850101111561511f57600080fd5b612efa826020830160208601614ab8565b61ffff8516815260806020820152600061514d6080830186614ae4565b6001600160401b038516604084015282810360608401526140c58185614ae4565b61ffff861681526001600160a01b038516602082015260a06040820181905260009061519c90830186614ae4565b841515606084015282810360808401526151b68185614ae4565b98975050505050505050565b600080604083850312156151d557600080fd5b505080516020909101519092909150565b61ffff86168152608060208201526000615204608083018688614f6b565b6001600160401b0394909416604083015250606001529392505050565b61ffff8616815260a06020820152600061523e60a0830187614ae4565b6001600160401b0386166040840152828103606084015261525f8186614ae4565b905082810360808401526151b68185614ae4565b634e487b7160e01b600052601260045260246000fd5b60008261529857615298615273565b500490565b6000602082840312156152af57600080fd5b8151611d3b816147c2565b600061010061ffff8b1683528060208401526152d88184018b614ae4565b6001600160401b038a166040850152606084018990526001600160a01b038816608085015260a0840187905283810360c085015290506153188186614ae4565b9150508260e08301529998505050505050505050565b6060815260006153416060830186614ae4565b6001600160401b039490941660208301525060400152919050565b60008261536b5761536b615273565b500690565b61ffff8716815260c06020820152600061538d60c0830188614ae4565b828103604084015261539f8188614ae4565b6001600160a01b0387811660608601528616608085015283810360a085015290506153ca8185614ae4565b9998505050505050505050565b60ff60f81b8760f81b16815285600182015260006001600160401b0360c01b808760c01b166021840152856029840152808560c01b166049840152508251615426816051850160208701614ab8565b91909101605101979650505050505050565b600081600019048311821515161561545257615452614f26565b50029056fea264697066735822122002e85e39cd4c45156c727cd464d515ec143b5814676650286110a986cc477f2264736f6c634300080d0033", + "solcInputHash": "15770bc3af16acbd95d8914f14cae6d7", + "metadata": "{\"compiler\":{\"version\":\"0.8.25+commit.b61c2a91\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress_\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"sharedDecimals_\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"lzEndpoint_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"oracle_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"sweepAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"balance\",\"type\":\"uint256\"}],\"name\":\"InsufficientBalance\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddressNotAllowed\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_nonce\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_hash\",\"type\":\"bytes32\"}],\"name\":\"CallOFTReceivedSuccess\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"srcChainId\",\"type\":\"uint16\"},{\"indexed\":true,\"internalType\":\"bytes\",\"name\":\"srcAddress\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"nonce\",\"type\":\"uint64\"}],\"name\":\"DropFailedMessage\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"innerToken\",\"type\":\"address\"}],\"name\":\"InnerTokenAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_nonce\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_payload\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_reason\",\"type\":\"bytes\"}],\"name\":\"MessageFailed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"NonContractAddress\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"oldOracle\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOracle\",\"type\":\"address\"}],\"name\":\"OracleChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"ReceiveFromChain\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_nonce\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_payloadHash\",\"type\":\"bytes32\"}],\"name\":\"RetryMessageSuccess\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"_toAddress\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"SendToChain\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"chainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldMaxLimit\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newMaxLimit\",\"type\":\"uint256\"}],\"name\":\"SetMaxDailyLimit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"chainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldMaxLimit\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newMaxLimit\",\"type\":\"uint256\"}],\"name\":\"SetMaxDailyReceiveLimit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"chainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldMaxLimit\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newMaxLimit\",\"type\":\"uint256\"}],\"name\":\"SetMaxSingleReceiveTransactionLimit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"chainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldMaxLimit\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newMaxLimit\",\"type\":\"uint256\"}],\"name\":\"SetMaxSingleTransactionLimit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"_type\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_minDstGas\",\"type\":\"uint256\"}],\"name\":\"SetMinDstGas\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"precrime\",\"type\":\"address\"}],\"name\":\"SetPrecrime\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"_remoteChainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_path\",\"type\":\"bytes\"}],\"name\":\"SetTrustedRemote\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"_remoteChainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_remoteAddress\",\"type\":\"bytes\"}],\"name\":\"SetTrustedRemoteAddress\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"isWhitelist\",\"type\":\"bool\"}],\"name\":\"SetWhitelist\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"sweepAmount\",\"type\":\"uint256\"}],\"name\":\"SweepToken\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"chainId\",\"type\":\"uint16\"}],\"name\":\"TrustedRemoteRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bool\",\"name\":\"enabled\",\"type\":\"bool\"}],\"name\":\"UpdateSendAndCallEnabled\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_PAYLOAD_SIZE_LIMIT\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"NO_EXTRA_GAS\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PT_SEND\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PT_SEND_AND_CALL\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"_nonce\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"_from\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_payload\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"_gasForCall\",\"type\":\"uint256\"}],\"name\":\"callOnOFTReceived\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"chainIdToLast24HourReceiveWindowStart\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"chainIdToLast24HourReceived\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"chainIdToLast24HourTransferred\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"chainIdToLast24HourWindowStart\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"chainIdToMaxDailyLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"chainIdToMaxDailyReceiveLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"chainIdToMaxSingleReceiveTransactionLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"chainIdToMaxSingleTransactionLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"circulatingSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"name\":\"creditedPackets\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"srcChainId_\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"srcAddress_\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"nonce_\",\"type\":\"uint64\"}],\"name\":\"dropFailedMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes32\",\"name\":\"_toAddress\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_payload\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"_dstGasForCall\",\"type\":\"uint64\"},{\"internalType\":\"bool\",\"name\":\"_useZro\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"_adapterParams\",\"type\":\"bytes\"}],\"name\":\"estimateSendAndCallFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"nativeFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"zroFee\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes32\",\"name\":\"_toAddress\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"_useZro\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"_adapterParams\",\"type\":\"bytes\"}],\"name\":\"estimateSendFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"nativeFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"zroFee\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"name\":\"failedMessages\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"}],\"name\":\"forceResumeReceive\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_version\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"_chainId\",\"type\":\"uint16\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_configType\",\"type\":\"uint256\"}],\"name\":\"getConfig\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_remoteChainId\",\"type\":\"uint16\"}],\"name\":\"getTrustedRemoteAddress\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from_\",\"type\":\"address\"},{\"internalType\":\"uint16\",\"name\":\"dstChainId_\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"amount_\",\"type\":\"uint256\"}],\"name\":\"isEligibleToSend\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"eligibleToSend\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"maxSingleTransactionLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxDailyLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountInUsd\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"transferredInWindow\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"last24HourWindowStart\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"isWhiteListedUser\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"}],\"name\":\"isTrustedRemote\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lzEndpoint\",\"outputs\":[{\"internalType\":\"contract ILayerZeroEndpoint\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"_nonce\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"_payload\",\"type\":\"bytes\"}],\"name\":\"lzReceive\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"minDstGasLookup\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"_nonce\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"_payload\",\"type\":\"bytes\"}],\"name\":\"nonblockingLzReceive\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"oracle\",\"outputs\":[{\"internalType\":\"contract ResilientOracleInterface\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"payloadSizeLimitLookup\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"precrime\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"remoteChainId_\",\"type\":\"uint16\"}],\"name\":\"removeTrustedRemote\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"_nonce\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"_payload\",\"type\":\"bytes\"}],\"name\":\"retryMessage\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from_\",\"type\":\"address\"},{\"internalType\":\"uint16\",\"name\":\"dstChainId_\",\"type\":\"uint16\"},{\"internalType\":\"bytes32\",\"name\":\"toAddress_\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"amount_\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"payload_\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"dstGasForCall_\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"address payable\",\"name\":\"refundAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"zroPaymentAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"adapterParams\",\"type\":\"bytes\"}],\"internalType\":\"struct ICommonOFT.LzCallParams\",\"name\":\"callparams_\",\"type\":\"tuple\"}],\"name\":\"sendAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sendAndCallEnabled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes32\",\"name\":\"_toAddress\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"address payable\",\"name\":\"refundAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"zroPaymentAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"adapterParams\",\"type\":\"bytes\"}],\"internalType\":\"struct ICommonOFT.LzCallParams\",\"name\":\"_callParams\",\"type\":\"tuple\"}],\"name\":\"sendFrom\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_version\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"_chainId\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"_configType\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_config\",\"type\":\"bytes\"}],\"name\":\"setConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"chainId_\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"limit_\",\"type\":\"uint256\"}],\"name\":\"setMaxDailyLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"chainId_\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"limit_\",\"type\":\"uint256\"}],\"name\":\"setMaxDailyReceiveLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"chainId_\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"limit_\",\"type\":\"uint256\"}],\"name\":\"setMaxSingleReceiveTransactionLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"chainId_\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"limit_\",\"type\":\"uint256\"}],\"name\":\"setMaxSingleTransactionLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"_packetType\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"_minGas\",\"type\":\"uint256\"}],\"name\":\"setMinDstGas\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"oracleAddress_\",\"type\":\"address\"}],\"name\":\"setOracle\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"_size\",\"type\":\"uint256\"}],\"name\":\"setPayloadSizeLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_precrime\",\"type\":\"address\"}],\"name\":\"setPrecrime\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_version\",\"type\":\"uint16\"}],\"name\":\"setReceiveVersion\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_version\",\"type\":\"uint16\"}],\"name\":\"setSendVersion\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_remoteChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_path\",\"type\":\"bytes\"}],\"name\":\"setTrustedRemote\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_remoteChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_remoteAddress\",\"type\":\"bytes\"}],\"name\":\"setTrustedRemoteAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user_\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"val_\",\"type\":\"bool\"}],\"name\":\"setWhitelist\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sharedDecimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"token_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to_\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount_\",\"type\":\"uint256\"}],\"name\":\"sweepToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"token\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"trustedRemoteLookup\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"enabled_\",\"type\":\"bool\"}],\"name\":\"updateSendAndCallEnabled\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"whitelist\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Venus\",\"events\":{\"Paused(address)\":{\"details\":\"Emitted when the pause is triggered by `account`.\"},\"ReceiveFromChain(uint16,address,uint256)\":{\"details\":\"Emitted when `_amount` tokens are received from `_srcChainId` into the `_toAddress` on the local chain. `_nonce` is the inbound nonce.\"},\"SendToChain(uint16,address,bytes32,uint256)\":{\"details\":\"Emitted when `_amount` tokens are moved from the `_sender` to (`_dstChainId`, `_toAddress`) `_nonce` is the outbound nonce\"},\"Unpaused(address)\":{\"details\":\"Emitted when the pause is lifted by `account`.\"}},\"kind\":\"dev\",\"methods\":{\"circulatingSupply()\":{\"returns\":{\"_0\":\"total circulating supply of the token on the destination chain.\"}},\"dropFailedMessage(uint16,bytes,uint64)\":{\"custom:access\":\"Only owner\",\"custom:event\":\"Emits DropFailedMessage on clearance of failed message.\",\"params\":{\"nonce_\":\"Nonce_ of the transaction\",\"srcAddress_\":\"Address of source followed by current bridge address\",\"srcChainId_\":\"Chain id of source\"}},\"estimateSendFee(uint16,bytes32,uint256,bool,bytes)\":{\"details\":\"estimate send token `_tokenId` to (`_dstChainId`, `_toAddress`) _dstChainId - L0 defined chain id to send tokens too _toAddress - dynamic bytes array which contains the address to whom you are sending tokens to on the dstChain _amount - amount of the tokens to transfer _useZro - indicates to use zro to pay L0 fees _adapterParam - flexible bytes array to indicate messaging adapter services in L0\"},\"isEligibleToSend(address,uint16,uint256)\":{\"details\":\"This external view function assesses whether the specified sender is eligible to transfer the given amount to the specified destination chain. It considers factors such as whitelisting, transaction limits, and a 24-hour window.\",\"params\":{\"amount_\":\"The quantity of tokens to be transferred.\",\"dstChainId_\":\"Indicates destination chain.\",\"from_\":\"The sender's address initiating the transfer.\"},\"returns\":{\"amountInUsd\":\"The equivalent amount in USD based on the oracle price.\",\"eligibleToSend\":\"A boolean indicating whether the sender is eligible to transfer the tokens.\",\"isWhiteListedUser\":\"A boolean indicating whether the sender is whitelisted.\",\"last24HourWindowStart\":\"The timestamp when the current 24-hour window started.\",\"maxDailyLimit\":\"The maximum daily limit for transactions.\",\"maxSingleTransactionLimit\":\"The maximum limit for a single transaction.\",\"transferredInWindow\":\"The total amount transferred in the current 24-hour window.\"}},\"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.\"},\"removeTrustedRemote(uint16)\":{\"custom:access\":\"Only owner.\",\"custom:event\":\"Emits TrustedRemoteRemoved once chain id is removed from trusted remote.\",\"params\":{\"remoteChainId_\":\"The chain's id corresponds to setting the trusted remote to empty.\"}},\"sendAndCall(address,uint16,bytes32,uint256,bytes,uint64,(address,address,bytes))\":{\"details\":\"This internal override function enables the contract to send tokens and invoke calls on the specified destination chain. It checks whether the sendAndCall feature is enabled before proceeding with the transfer.\",\"params\":{\"amount_\":\"Amount of tokens that will be transferred.\",\"callparams_\":\"Additional parameters, including refund address, ZRO payment address, and adapter params.\",\"dstChainId_\":\"Destination chain id on which tokens will be send.\",\"dstGasForCall_\":\"The amount of gas allocated for the call on the destination chain.\",\"from_\":\"Address from which tokens will be debited.\",\"payload_\":\"Additional data payload for the call on the destination chain.\",\"toAddress_\":\"Address on which tokens will be credited on destination chain.\"}},\"sendFrom(address,uint16,bytes32,uint256,(address,address,bytes))\":{\"details\":\"send `_amount` amount of token to (`_dstChainId`, `_toAddress`) from `_from` `_from` the owner of token `_dstChainId` the destination chain identifier `_toAddress` can be any size depending on the `dstChainId`. `_amount` the quantity of tokens in wei `_refundAddress` the address LayerZero refunds if too much message fee is sent `_zroPaymentAddress` set to address(0x0) if not paying in ZRO (LayerZero Token) `_adapterParams` is a flexible bytes array to indicate messaging adapter services\"},\"setMaxDailyLimit(uint16,uint256)\":{\"custom:access\":\"Only owner.\",\"custom:event\":\"Emits setMaxDailyLimit with old and new limit associated with chain id.\",\"params\":{\"chainId_\":\"Destination chain id.\",\"limit_\":\"Amount in USD(scaled with 18 decimals).\"}},\"setMaxDailyReceiveLimit(uint16,uint256)\":{\"custom:access\":\"Only owner.\",\"custom:event\":\"Emits setMaxDailyReceiveLimit with old and new limit associated with chain id.\",\"params\":{\"chainId_\":\"The destination chain ID.\",\"limit_\":\"The new maximum daily limit in USD(scaled with 18 decimals).\"}},\"setMaxSingleReceiveTransactionLimit(uint16,uint256)\":{\"custom:access\":\"Only owner.\",\"custom:event\":\"Emits setMaxSingleReceiveTransactionLimit with old and new limit associated with chain id.\",\"params\":{\"chainId_\":\"The destination chain ID.\",\"limit_\":\"The new maximum limit in USD(scaled with 18 decimals).\"}},\"setMaxSingleTransactionLimit(uint16,uint256)\":{\"custom:access\":\"Only owner.\",\"custom:event\":\"Emits SetMaxSingleTransactionLimit with old and new limit associated with chain id.\",\"params\":{\"chainId_\":\"Destination chain id.\",\"limit_\":\"Amount in USD(scaled with 18 decimals).\"}},\"setOracle(address)\":{\"custom:access\":\"Only owner.\",\"custom:event\":\"Emits OracleChanged with old and new oracle address.\",\"details\":\"Reverts if the new address is zero.\",\"params\":{\"oracleAddress_\":\"The new address of the ResilientOracle contract.\"}},\"setWhitelist(address,bool)\":{\"custom:access\":\"Only owner.\",\"custom:event\":\"Emits setWhitelist.\",\"params\":{\"user_\":\"Address to be add in whitelist.\",\"val_\":\"Boolean to be set (true for user_ address is whitelisted).\"}},\"sweepToken(address,address,uint256)\":{\"custom:access\":\"Only Owner\",\"custom:error\":\"Throw InsufficientBalance if amount_ is greater than the available balance of the token in the contract\",\"custom:event\":\"Emits SweepToken event\",\"params\":{\"amount_\":\"The amount of tokens needs to transfer\",\"to_\":\"The address of the recipient\",\"token_\":\"The address of the ERC-20 token to sweep\"}},\"token()\":{\"returns\":{\"_0\":\"Address of the inner token of this bridge.\"}},\"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.\"},\"updateSendAndCallEnabled(bool)\":{\"params\":{\"enabled_\":\"Boolean indicating whether the sendAndCall function should be enabled or disabled.\"}}},\"title\":\"XVSProxyOFTDest\",\"version\":1},\"userdoc\":{\"errors\":{\"InsufficientBalance(uint256,uint256)\":[{\"notice\":\"Error thrown when this contract balance is less than sweep amount\"}],\"ZeroAddressNotAllowed()\":[{\"notice\":\"Thrown if the supplied address is a zero address where it is not allowed\"}]},\"events\":{\"DropFailedMessage(uint16,bytes,uint64)\":{\"notice\":\"Emits when stored message dropped without successful retrying.\"},\"InnerTokenAdded(address)\":{\"notice\":\"Event emitted when inner token set successfully.\"},\"OracleChanged(address,address)\":{\"notice\":\"Event emitted when oracle is modified.\"},\"SetMaxDailyLimit(uint16,uint256,uint256)\":{\"notice\":\"Emitted when the maximum daily limit of transactions from local chain is modified.\"},\"SetMaxDailyReceiveLimit(uint16,uint256,uint256)\":{\"notice\":\"Emitted when the maximum daily limit for receiving transactions from remote chain is modified.\"},\"SetMaxSingleReceiveTransactionLimit(uint16,uint256,uint256)\":{\"notice\":\"Emitted when the maximum limit for a single receive transaction from remote chain is modified.\"},\"SetMaxSingleTransactionLimit(uint16,uint256,uint256)\":{\"notice\":\"Emitted when the maximum limit for a single transaction from local chain is modified.\"},\"SetWhitelist(address,bool)\":{\"notice\":\"Emitted when address is added to whitelist.\"},\"SweepToken(address,address,uint256)\":{\"notice\":\"Emitted on sweep token success\"},\"TrustedRemoteRemoved(uint16)\":{\"notice\":\"Event emitted when trusted remote sets to empty.\"},\"UpdateSendAndCallEnabled(bool)\":{\"notice\":\"Event emitted when SendAndCallEnabled updated successfully.\"}},\"kind\":\"user\",\"methods\":{\"chainIdToLast24HourReceiveWindowStart(uint16)\":{\"notice\":\"Timestamp when the last 24-hour window started from remote chain.\"},\"chainIdToLast24HourReceived(uint16)\":{\"notice\":\"Total received amount in USD(scaled with 18 decimals) within the last 24-hour window from remote chain.\"},\"chainIdToLast24HourTransferred(uint16)\":{\"notice\":\"Total sent amount in USD(scaled with 18 decimals) within the last 24-hour window from local chain.\"},\"chainIdToLast24HourWindowStart(uint16)\":{\"notice\":\"Timestamp when the last 24-hour window started from local chain.\"},\"chainIdToMaxDailyLimit(uint16)\":{\"notice\":\"Maximum daily limit for transactions in USD(scaled with 18 decimals) from local chain.\"},\"chainIdToMaxDailyReceiveLimit(uint16)\":{\"notice\":\"Maximum daily limit for receiving transactions in USD(scaled with 18 decimals) from remote chain.\"},\"chainIdToMaxSingleReceiveTransactionLimit(uint16)\":{\"notice\":\"Maximum limit for a single receive transaction in USD(scaled with 18 decimals) from remote chain.\"},\"chainIdToMaxSingleTransactionLimit(uint16)\":{\"notice\":\"Maximum limit for a single transaction in USD(scaled with 18 decimals) from local chain.\"},\"circulatingSupply()\":{\"notice\":\"Returns the total circulating supply of the token on the destination chain i.e (total supply).\"},\"dropFailedMessage(uint16,bytes,uint64)\":{\"notice\":\"Clear failed messages from the storage.\"},\"isEligibleToSend(address,uint16,uint256)\":{\"notice\":\"Checks the eligibility of a sender to initiate a cross-chain token transfer.\"},\"oracle()\":{\"notice\":\"The address of ResilientOracle contract wrapped in its interface.\"},\"pause()\":{\"notice\":\"Triggers stopped state of the bridge.\"},\"removeTrustedRemote(uint16)\":{\"notice\":\"Remove trusted remote from storage.\"},\"renounceOwnership()\":{\"notice\":\"Empty implementation of renounce ownership to avoid any mishappening.\"},\"sendAndCall(address,uint16,bytes32,uint256,bytes,uint64,(address,address,bytes))\":{\"notice\":\"Initiates a cross-chain token transfer and triggers a call on the destination chain.\"},\"setMaxDailyLimit(uint16,uint256)\":{\"notice\":\"Sets the limit of daily (24 Hour) transactions amount.\"},\"setMaxDailyReceiveLimit(uint16,uint256)\":{\"notice\":\"Sets the maximum daily limit for receiving transactions.\"},\"setMaxSingleReceiveTransactionLimit(uint16,uint256)\":{\"notice\":\"Sets the maximum limit for a single receive transaction.\"},\"setMaxSingleTransactionLimit(uint16,uint256)\":{\"notice\":\"Sets the limit of single transaction amount.\"},\"setOracle(address)\":{\"notice\":\"Set the address of the ResilientOracle contract.\"},\"setWhitelist(address,bool)\":{\"notice\":\"Sets the whitelist address to skip checks on transaction limit.\"},\"sweepToken(address,address,uint256)\":{\"notice\":\"A public function to sweep accidental ERC-20 transfers to this contract. Tokens are sent to user\"},\"token()\":{\"notice\":\"Return's the address of the inner token of this bridge.\"},\"unpause()\":{\"notice\":\"Triggers resume state of the bridge.\"},\"updateSendAndCallEnabled(bool)\":{\"notice\":\"It enables or disables sendAndCall functionality for the bridge.\"},\"whitelist(address)\":{\"notice\":\"Address on which cap check and bound limit is not applicable.\"}},\"notice\":\"XVSProxyOFTDest contract builds upon the functionality of its parent contract, BaseXVSProxyOFT, and focuses on managing token transfers to the destination chain. It provides functions to check eligibility and perform the actual token transfers while maintaining strict access controls and pausing mechanisms.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/Bridge/XVSProxyOFTDest.sol\":\"XVSProxyOFTDest\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"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 // try-catch all errors/exceptions\\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\":\"0x612ff1f2a158b7e64e873885b5ff08afa348998fd9005f384d555d643ba7968d\",\"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\"},\"@layerzerolabs/solidity-examples/contracts/token/oft/v2/BaseOFTV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./OFTCoreV2.sol\\\";\\nimport \\\"./interfaces/IOFTV2.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/introspection/ERC165.sol\\\";\\n\\nabstract contract BaseOFTV2 is OFTCoreV2, ERC165, IOFTV2 {\\n constructor(uint8 _sharedDecimals, address _lzEndpoint) OFTCoreV2(_sharedDecimals, _lzEndpoint) {}\\n\\n /************************************************************************\\n * public functions\\n ************************************************************************/\\n function sendFrom(\\n address _from,\\n uint16 _dstChainId,\\n bytes32 _toAddress,\\n uint _amount,\\n LzCallParams calldata _callParams\\n ) public payable virtual override {\\n _send(_from, _dstChainId, _toAddress, _amount, _callParams.refundAddress, _callParams.zroPaymentAddress, _callParams.adapterParams);\\n }\\n\\n function sendAndCall(\\n address _from,\\n uint16 _dstChainId,\\n bytes32 _toAddress,\\n uint _amount,\\n bytes calldata _payload,\\n uint64 _dstGasForCall,\\n LzCallParams calldata _callParams\\n ) public payable virtual override {\\n _sendAndCall(\\n _from,\\n _dstChainId,\\n _toAddress,\\n _amount,\\n _payload,\\n _dstGasForCall,\\n _callParams.refundAddress,\\n _callParams.zroPaymentAddress,\\n _callParams.adapterParams\\n );\\n }\\n\\n /************************************************************************\\n * public view functions\\n ************************************************************************/\\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\\n return interfaceId == type(IOFTV2).interfaceId || super.supportsInterface(interfaceId);\\n }\\n\\n function estimateSendFee(\\n uint16 _dstChainId,\\n bytes32 _toAddress,\\n uint _amount,\\n bool _useZro,\\n bytes calldata _adapterParams\\n ) public view virtual override returns (uint nativeFee, uint zroFee) {\\n return _estimateSendFee(_dstChainId, _toAddress, _amount, _useZro, _adapterParams);\\n }\\n\\n function estimateSendAndCallFee(\\n uint16 _dstChainId,\\n bytes32 _toAddress,\\n uint _amount,\\n bytes calldata _payload,\\n uint64 _dstGasForCall,\\n bool _useZro,\\n bytes calldata _adapterParams\\n ) public view virtual override returns (uint nativeFee, uint zroFee) {\\n return _estimateSendAndCallFee(_dstChainId, _toAddress, _amount, _payload, _dstGasForCall, _useZro, _adapterParams);\\n }\\n\\n function circulatingSupply() public view virtual override returns (uint);\\n\\n function token() public view virtual override returns (address);\\n}\\n\",\"keccak256\":\"0x59d2d32dd14a4f58232b126a7d69608a85f82137bd56d8ce0fc28ff646cba943\",\"license\":\"MIT\"},\"@layerzerolabs/solidity-examples/contracts/token/oft/v2/OFTCoreV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../../lzApp/NonblockingLzApp.sol\\\";\\nimport \\\"../../../libraries/ExcessivelySafeCall.sol\\\";\\nimport \\\"./interfaces/ICommonOFT.sol\\\";\\nimport \\\"./interfaces/IOFTReceiverV2.sol\\\";\\n\\nabstract contract OFTCoreV2 is NonblockingLzApp {\\n using BytesLib for bytes;\\n using ExcessivelySafeCall for address;\\n\\n uint public constant NO_EXTRA_GAS = 0;\\n\\n // packet type\\n uint8 public constant PT_SEND = 0;\\n uint8 public constant PT_SEND_AND_CALL = 1;\\n\\n uint8 public immutable sharedDecimals;\\n\\n mapping(uint16 => mapping(bytes => mapping(uint64 => bool))) public creditedPackets;\\n\\n /**\\n * @dev Emitted when `_amount` tokens are moved from the `_sender` to (`_dstChainId`, `_toAddress`)\\n * `_nonce` is the outbound nonce\\n */\\n event SendToChain(uint16 indexed _dstChainId, address indexed _from, bytes32 indexed _toAddress, uint _amount);\\n\\n /**\\n * @dev Emitted when `_amount` tokens are received from `_srcChainId` into the `_toAddress` on the local chain.\\n * `_nonce` is the inbound nonce.\\n */\\n event ReceiveFromChain(uint16 indexed _srcChainId, address indexed _to, uint _amount);\\n\\n event CallOFTReceivedSuccess(uint16 indexed _srcChainId, bytes _srcAddress, uint64 _nonce, bytes32 _hash);\\n\\n event NonContractAddress(address _address);\\n\\n // _sharedDecimals should be the minimum decimals on all chains\\n constructor(uint8 _sharedDecimals, address _lzEndpoint) NonblockingLzApp(_lzEndpoint) {\\n sharedDecimals = _sharedDecimals;\\n }\\n\\n /************************************************************************\\n * public functions\\n ************************************************************************/\\n function callOnOFTReceived(\\n uint16 _srcChainId,\\n bytes calldata _srcAddress,\\n uint64 _nonce,\\n bytes32 _from,\\n address _to,\\n uint _amount,\\n bytes calldata _payload,\\n uint _gasForCall\\n ) public virtual {\\n require(_msgSender() == address(this), \\\"OFTCore: caller must be OFTCore\\\");\\n\\n // send\\n _amount = _transferFrom(address(this), _to, _amount);\\n emit ReceiveFromChain(_srcChainId, _to, _amount);\\n\\n // call\\n IOFTReceiverV2(_to).onOFTReceived{gas: _gasForCall}(_srcChainId, _srcAddress, _nonce, _from, _amount, _payload);\\n }\\n\\n /************************************************************************\\n * internal functions\\n ************************************************************************/\\n function _estimateSendFee(\\n uint16 _dstChainId,\\n bytes32 _toAddress,\\n uint _amount,\\n bool _useZro,\\n bytes memory _adapterParams\\n ) internal view virtual returns (uint nativeFee, uint zroFee) {\\n // mock the payload for sendFrom()\\n bytes memory payload = _encodeSendPayload(_toAddress, _ld2sd(_amount));\\n return lzEndpoint.estimateFees(_dstChainId, address(this), payload, _useZro, _adapterParams);\\n }\\n\\n function _estimateSendAndCallFee(\\n uint16 _dstChainId,\\n bytes32 _toAddress,\\n uint _amount,\\n bytes memory _payload,\\n uint64 _dstGasForCall,\\n bool _useZro,\\n bytes memory _adapterParams\\n ) internal view virtual returns (uint nativeFee, uint zroFee) {\\n // mock the payload for sendAndCall()\\n bytes memory payload = _encodeSendAndCallPayload(msg.sender, _toAddress, _ld2sd(_amount), _payload, _dstGasForCall);\\n return lzEndpoint.estimateFees(_dstChainId, address(this), payload, _useZro, _adapterParams);\\n }\\n\\n function _nonblockingLzReceive(\\n uint16 _srcChainId,\\n bytes memory _srcAddress,\\n uint64 _nonce,\\n bytes memory _payload\\n ) internal virtual override {\\n uint8 packetType = _payload.toUint8(0);\\n\\n if (packetType == PT_SEND) {\\n _sendAck(_srcChainId, _srcAddress, _nonce, _payload);\\n } else if (packetType == PT_SEND_AND_CALL) {\\n _sendAndCallAck(_srcChainId, _srcAddress, _nonce, _payload);\\n } else {\\n revert(\\\"OFTCore: unknown packet type\\\");\\n }\\n }\\n\\n function _send(\\n address _from,\\n uint16 _dstChainId,\\n bytes32 _toAddress,\\n uint _amount,\\n address payable _refundAddress,\\n address _zroPaymentAddress,\\n bytes memory _adapterParams\\n ) internal virtual returns (uint amount) {\\n _checkGasLimit(_dstChainId, PT_SEND, _adapterParams, NO_EXTRA_GAS);\\n\\n (amount, ) = _removeDust(_amount);\\n amount = _debitFrom(_from, _dstChainId, _toAddress, amount); // amount returned should not have dust\\n require(amount > 0, \\\"OFTCore: amount too small\\\");\\n\\n bytes memory lzPayload = _encodeSendPayload(_toAddress, _ld2sd(amount));\\n _lzSend(_dstChainId, lzPayload, _refundAddress, _zroPaymentAddress, _adapterParams, msg.value);\\n\\n emit SendToChain(_dstChainId, _from, _toAddress, amount);\\n }\\n\\n function _sendAck(\\n uint16 _srcChainId,\\n bytes memory,\\n uint64,\\n bytes memory _payload\\n ) internal virtual {\\n (address to, uint64 amountSD) = _decodeSendPayload(_payload);\\n if (to == address(0)) {\\n to = address(0xdead);\\n }\\n\\n uint amount = _sd2ld(amountSD);\\n amount = _creditTo(_srcChainId, to, amount);\\n\\n emit ReceiveFromChain(_srcChainId, to, amount);\\n }\\n\\n function _sendAndCall(\\n address _from,\\n uint16 _dstChainId,\\n bytes32 _toAddress,\\n uint _amount,\\n bytes memory _payload,\\n uint64 _dstGasForCall,\\n address payable _refundAddress,\\n address _zroPaymentAddress,\\n bytes memory _adapterParams\\n ) internal virtual returns (uint amount) {\\n _checkGasLimit(_dstChainId, PT_SEND_AND_CALL, _adapterParams, _dstGasForCall);\\n\\n (amount, ) = _removeDust(_amount);\\n amount = _debitFrom(_from, _dstChainId, _toAddress, amount);\\n require(amount > 0, \\\"OFTCore: amount too small\\\");\\n\\n // encode the msg.sender into the payload instead of _from\\n bytes memory lzPayload = _encodeSendAndCallPayload(msg.sender, _toAddress, _ld2sd(amount), _payload, _dstGasForCall);\\n _lzSend(_dstChainId, lzPayload, _refundAddress, _zroPaymentAddress, _adapterParams, msg.value);\\n\\n emit SendToChain(_dstChainId, _from, _toAddress, amount);\\n }\\n\\n function _sendAndCallAck(\\n uint16 _srcChainId,\\n bytes memory _srcAddress,\\n uint64 _nonce,\\n bytes memory _payload\\n ) internal virtual {\\n (bytes32 from, address to, uint64 amountSD, bytes memory payloadForCall, uint64 gasForCall) = _decodeSendAndCallPayload(_payload);\\n\\n bool credited = creditedPackets[_srcChainId][_srcAddress][_nonce];\\n uint amount = _sd2ld(amountSD);\\n\\n // credit to this contract first, and then transfer to receiver only if callOnOFTReceived() succeeds\\n if (!credited) {\\n amount = _creditTo(_srcChainId, address(this), amount);\\n creditedPackets[_srcChainId][_srcAddress][_nonce] = true;\\n }\\n\\n if (!_isContract(to)) {\\n emit NonContractAddress(to);\\n return;\\n }\\n\\n // workaround for stack too deep\\n uint16 srcChainId = _srcChainId;\\n bytes memory srcAddress = _srcAddress;\\n uint64 nonce = _nonce;\\n bytes memory payload = _payload;\\n bytes32 from_ = from;\\n address to_ = to;\\n uint amount_ = amount;\\n bytes memory payloadForCall_ = payloadForCall;\\n\\n // no gas limit for the call if retry\\n uint gas = credited ? gasleft() : gasForCall;\\n (bool success, bytes memory reason) = address(this).excessivelySafeCall(\\n gasleft(),\\n 150,\\n abi.encodeWithSelector(this.callOnOFTReceived.selector, srcChainId, srcAddress, nonce, from_, to_, amount_, payloadForCall_, gas)\\n );\\n\\n if (success) {\\n bytes32 hash = keccak256(payload);\\n emit CallOFTReceivedSuccess(srcChainId, srcAddress, nonce, hash);\\n } else {\\n // store the failed message into the nonblockingLzApp\\n _storeFailedMessage(srcChainId, srcAddress, nonce, payload, reason);\\n }\\n }\\n\\n function _isContract(address _account) internal view returns (bool) {\\n return _account.code.length > 0;\\n }\\n\\n function _ld2sd(uint _amount) internal view virtual returns (uint64) {\\n uint amountSD = _amount / _ld2sdRate();\\n require(amountSD <= type(uint64).max, \\\"OFTCore: amountSD overflow\\\");\\n return uint64(amountSD);\\n }\\n\\n function _sd2ld(uint64 _amountSD) internal view virtual returns (uint) {\\n return _amountSD * _ld2sdRate();\\n }\\n\\n function _removeDust(uint _amount) internal view virtual returns (uint amountAfter, uint dust) {\\n dust = _amount % _ld2sdRate();\\n amountAfter = _amount - dust;\\n }\\n\\n function _encodeSendPayload(bytes32 _toAddress, uint64 _amountSD) internal view virtual returns (bytes memory) {\\n return abi.encodePacked(PT_SEND, _toAddress, _amountSD);\\n }\\n\\n function _decodeSendPayload(bytes memory _payload) internal view virtual returns (address to, uint64 amountSD) {\\n require(_payload.toUint8(0) == PT_SEND && _payload.length == 41, \\\"OFTCore: invalid payload\\\");\\n\\n to = _payload.toAddress(13); // drop the first 12 bytes of bytes32\\n amountSD = _payload.toUint64(33);\\n }\\n\\n function _encodeSendAndCallPayload(\\n address _from,\\n bytes32 _toAddress,\\n uint64 _amountSD,\\n bytes memory _payload,\\n uint64 _dstGasForCall\\n ) internal view virtual returns (bytes memory) {\\n return abi.encodePacked(PT_SEND_AND_CALL, _toAddress, _amountSD, _addressToBytes32(_from), _dstGasForCall, _payload);\\n }\\n\\n function _decodeSendAndCallPayload(bytes memory _payload)\\n internal\\n view\\n virtual\\n returns (\\n bytes32 from,\\n address to,\\n uint64 amountSD,\\n bytes memory payload,\\n uint64 dstGasForCall\\n )\\n {\\n require(_payload.toUint8(0) == PT_SEND_AND_CALL, \\\"OFTCore: invalid payload\\\");\\n\\n to = _payload.toAddress(13); // drop the first 12 bytes of bytes32\\n amountSD = _payload.toUint64(33);\\n from = _payload.toBytes32(41);\\n dstGasForCall = _payload.toUint64(73);\\n payload = _payload.slice(81, _payload.length - 81);\\n }\\n\\n function _addressToBytes32(address _address) internal pure virtual returns (bytes32) {\\n return bytes32(uint(uint160(_address)));\\n }\\n\\n function _debitFrom(\\n address _from,\\n uint16 _dstChainId,\\n bytes32 _toAddress,\\n uint _amount\\n ) internal virtual returns (uint);\\n\\n function _creditTo(\\n uint16 _srcChainId,\\n address _toAddress,\\n uint _amount\\n ) internal virtual returns (uint);\\n\\n function _transferFrom(\\n address _from,\\n address _to,\\n uint _amount\\n ) internal virtual returns (uint);\\n\\n function _ld2sdRate() internal view virtual returns (uint);\\n}\\n\",\"keccak256\":\"0x96cf7a10c5af4243822d25e77985a4a46d12264f839593ded5378cd6519a8df0\",\"license\":\"MIT\"},\"@layerzerolabs/solidity-examples/contracts/token/oft/v2/interfaces/ICommonOFT.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.5.0;\\n\\nimport \\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Interface of the IOFT core standard\\n */\\ninterface ICommonOFT is IERC165 {\\n\\n struct LzCallParams {\\n address payable refundAddress;\\n address zroPaymentAddress;\\n bytes adapterParams;\\n }\\n\\n /**\\n * @dev estimate send token `_tokenId` to (`_dstChainId`, `_toAddress`)\\n * _dstChainId - L0 defined chain id to send tokens too\\n * _toAddress - dynamic bytes array which contains the address to whom you are sending tokens to on the dstChain\\n * _amount - amount of the tokens to transfer\\n * _useZro - indicates to use zro to pay L0 fees\\n * _adapterParam - flexible bytes array to indicate messaging adapter services in L0\\n */\\n function estimateSendFee(uint16 _dstChainId, bytes32 _toAddress, uint _amount, bool _useZro, bytes calldata _adapterParams) external view returns (uint nativeFee, uint zroFee);\\n\\n function estimateSendAndCallFee(uint16 _dstChainId, bytes32 _toAddress, uint _amount, bytes calldata _payload, uint64 _dstGasForCall, bool _useZro, bytes calldata _adapterParams) external view returns (uint nativeFee, uint zroFee);\\n\\n /**\\n * @dev returns the circulating amount of tokens on current chain\\n */\\n function circulatingSupply() external view returns (uint);\\n\\n /**\\n * @dev returns the address of the ERC20 token\\n */\\n function token() external view returns (address);\\n}\\n\",\"keccak256\":\"0x1d034ba786436c1fce8057352c87373098bd1d8026b24c8fbc7be28636d0c15d\",\"license\":\"MIT\"},\"@layerzerolabs/solidity-examples/contracts/token/oft/v2/interfaces/IOFTReceiverV2.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity >=0.5.0;\\n\\ninterface IOFTReceiverV2 {\\n /**\\n * @dev Called by the OFT contract when tokens are received from source chain.\\n * @param _srcChainId The chain id of the source chain.\\n * @param _srcAddress The address of the OFT token contract on the source chain.\\n * @param _nonce The nonce of the transaction on the source chain.\\n * @param _from The address of the account who calls the sendAndCall() on the source chain.\\n * @param _amount The amount of tokens to transfer.\\n * @param _payload Additional data with no specified format.\\n */\\n function onOFTReceived(uint16 _srcChainId, bytes calldata _srcAddress, uint64 _nonce, bytes32 _from, uint _amount, bytes calldata _payload) external;\\n}\\n\",\"keccak256\":\"0xf57e437ced3bc10bb333123bb49475dab47c7615b86401c4d872c29ad4928fd5\",\"license\":\"BUSL-1.1\"},\"@layerzerolabs/solidity-examples/contracts/token/oft/v2/interfaces/IOFTV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.5.0;\\n\\nimport \\\"./ICommonOFT.sol\\\";\\n\\n/**\\n * @dev Interface of the IOFT core standard\\n */\\ninterface IOFTV2 is ICommonOFT {\\n\\n /**\\n * @dev send `_amount` amount of token to (`_dstChainId`, `_toAddress`) from `_from`\\n * `_from` the owner of token\\n * `_dstChainId` the destination chain identifier\\n * `_toAddress` can be any size depending on the `dstChainId`.\\n * `_amount` the quantity of tokens in wei\\n * `_refundAddress` the address LayerZero refunds if too much message fee is sent\\n * `_zroPaymentAddress` set to address(0x0) if not paying in ZRO (LayerZero Token)\\n * `_adapterParams` is a flexible bytes array to indicate messaging adapter services\\n */\\n function sendFrom(address _from, uint16 _dstChainId, bytes32 _toAddress, uint _amount, LzCallParams calldata _callParams) external payable;\\n\\n function sendAndCall(address _from, uint16 _dstChainId, bytes32 _toAddress, uint _amount, bytes calldata _payload, uint64 _dstGasForCall, LzCallParams calldata _callParams) external payable;\\n}\\n\",\"keccak256\":\"0xb1d31f341715347d49db4e2c0de27c49bbd70b5b3d9b0adb1050b2b3a305ab87\",\"license\":\"MIT\"},\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.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. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby disabling 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\":\"0xba43b97fba0d32eb4254f6a5a297b39a19a247082a02d6e69349e071e2946218\",\"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/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/IERC20Permit.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\\n *\\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\\n * need to send a transaction, and thus is not required to hold Ether at all.\\n */\\ninterface IERC20Permit {\\n /**\\n * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\\n * given ``owner``'s signed approval.\\n *\\n * IMPORTANT: The same issues {IERC20-approve} has related to transaction\\n * ordering also apply here.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `deadline` must be a timestamp in the future.\\n * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\\n * over the EIP712-formatted function arguments.\\n * - the signature must use ``owner``'s current nonce (see {nonces}).\\n *\\n * For more information on the signature format, see the\\n * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\\n * section].\\n */\\n function permit(\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external;\\n\\n /**\\n * @dev Returns the current nonce for `owner`. This value must be\\n * included whenever a signature is generated for {permit}.\\n *\\n * Every successful call to {permit} increases ``owner``'s nonce by one. This\\n * prevents a signature from being used multiple times.\\n */\\n function nonces(address owner) external view returns (uint256);\\n\\n /**\\n * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0xec63854014a5b4f2b3290ab9103a21bdf902a508d0f41a8573fea49e98bf571a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\nimport \\\"../extensions/IERC20Permit.sol\\\";\\nimport \\\"../../../utils/Address.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20 {\\n using Address for address;\\n\\n /**\\n * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n /**\\n * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the\\n * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.\\n */\\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n }\\n\\n /**\\n * @dev Deprecated. This function has issues similar to the ones found in\\n * {IERC20-approve}, and its usage is discouraged.\\n *\\n * Whenever possible, use {safeIncreaseAllowance} and\\n * {safeDecreaseAllowance} instead.\\n */\\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\\n // safeApprove should only be called when setting an initial allowance,\\n // or when resetting it to zero. To increase and decrease it, use\\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\\n require(\\n (value == 0) || (token.allowance(address(this), spender) == 0),\\n \\\"SafeERC20: approve from non-zero to non-zero allowance\\\"\\n );\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\\n }\\n\\n /**\\n * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));\\n }\\n\\n /**\\n * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n unchecked {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n require(oldAllowance >= value, \\\"SafeERC20: decreased allowance below zero\\\");\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));\\n }\\n }\\n\\n /**\\n * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval\\n * to be set to zero before setting it to a non-zero value, such as USDT.\\n */\\n function forceApprove(IERC20 token, address spender, uint256 value) internal {\\n bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);\\n\\n if (!_callOptionalReturnBool(token, approvalCall)) {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));\\n _callOptionalReturn(token, approvalCall);\\n }\\n }\\n\\n /**\\n * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.\\n * Revert on invalid signature.\\n */\\n function safePermit(\\n IERC20Permit token,\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal {\\n uint256 nonceBefore = token.nonces(owner);\\n token.permit(owner, spender, value, deadline, v, r, s);\\n uint256 nonceAfter = token.nonces(owner);\\n require(nonceAfter == nonceBefore + 1, \\\"SafeERC20: permit did not succeed\\\");\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n */\\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that\\n // the target address contains contract code and also asserts for success in the low-level call.\\n\\n bytes memory returndata = address(token).functionCall(data, \\\"SafeERC20: low-level call failed\\\");\\n require(returndata.length == 0 || abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n *\\n * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.\\n */\\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false\\n // and not revert is the subcall reverts.\\n\\n (bool success, bytes memory returndata) = address(token).call(data);\\n return\\n success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token));\\n }\\n}\\n\",\"keccak256\":\"0xabefac93435967b4d36a4fabcbdbb918d1f0b7ae3c3d85bc30923b326c927ed1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.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 * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\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://consensys.net/diligence/blog/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.8.0/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(address target, bytes memory data, uint256 value) 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 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 (bool success, bytes memory returndata) = target.delegatecall(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\":\"0x006dd67219697fe68d7fbfdea512e7c4cb64a43565ed86171d67e844982da6fa\",\"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/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\"},\"@venusprotocol/oracle/contracts/interfaces/OracleInterface.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity ^0.8.25;\\n\\ninterface OracleInterface {\\n function getPrice(address asset) external view returns (uint256);\\n}\\n\\ninterface ResilientOracleInterface is OracleInterface {\\n function updatePrice(address vToken) external;\\n\\n function updateAssetPrice(address asset) external;\\n\\n function getUnderlyingPrice(address vToken) external view returns (uint256);\\n}\\n\\ninterface TwapInterface is OracleInterface {\\n function updateTwap(address asset) external returns (uint256);\\n}\\n\\ninterface BoundValidatorInterface {\\n function validatePriceWithAnchorPrice(\\n address asset,\\n uint256 reporterPrice,\\n uint256 anchorPrice\\n ) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x2432799b0d824fc701beb4c30146e912b9aeecf77b5c1635dde6c5fbe6bfc3a7\",\"license\":\"BSD-3-Clause\"},\"@venusprotocol/solidity-utilities/contracts/ExponentialNoError.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.25;\\n\\nimport { EXP_SCALE as EXP_SCALE_, MANTISSA_ONE as MANTISSA_ONE_ } from \\\"./constants.sol\\\";\\n\\n/**\\n * @title Exponential module for storing fixed-precision decimals\\n * @author Compound\\n * @notice Exp is a struct which stores decimals with a fixed precision of 18 decimal places.\\n * Thus, if we wanted to store the 5.1, mantissa would store 5.1e18. That is:\\n * `Exp({mantissa: 5100000000000000000})`.\\n */\\ncontract ExponentialNoError {\\n struct Exp {\\n uint256 mantissa;\\n }\\n\\n struct Double {\\n uint256 mantissa;\\n }\\n\\n uint256 internal constant EXP_SCALE = EXP_SCALE_;\\n uint256 internal constant DOUBLE_SCALE = 1e36;\\n uint256 internal constant HALF_EXP_SCALE = EXP_SCALE / 2;\\n uint256 internal constant MANTISSA_ONE = MANTISSA_ONE_;\\n\\n /**\\n * @dev Truncates the given exp to a whole number value.\\n * For example, truncate(Exp{mantissa: 15 * EXP_SCALE}) = 15\\n */\\n function truncate(Exp memory exp) internal pure returns (uint256) {\\n // Note: We are not using careful math here as we're performing a division that cannot fail\\n return exp.mantissa / EXP_SCALE;\\n }\\n\\n /**\\n * @dev Multiply an Exp by a scalar, then truncate to return an unsigned integer.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function mul_ScalarTruncate(Exp memory a, uint256 scalar) internal pure returns (uint256) {\\n Exp memory product = mul_(a, scalar);\\n return truncate(product);\\n }\\n\\n /**\\n * @dev Multiply an Exp by a scalar, truncate, then add an to an unsigned integer, returning an unsigned integer.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function mul_ScalarTruncateAddUInt(Exp memory a, uint256 scalar, uint256 addend) internal pure returns (uint256) {\\n Exp memory product = mul_(a, scalar);\\n return add_(truncate(product), addend);\\n }\\n\\n /**\\n * @dev Checks if first Exp is less than second Exp.\\n */\\n function lessThanExp(Exp memory left, Exp memory right) internal pure returns (bool) {\\n return left.mantissa < right.mantissa;\\n }\\n\\n function safe224(uint256 n, string memory errorMessage) internal pure returns (uint224) {\\n require(n <= type(uint224).max, errorMessage);\\n return uint224(n);\\n }\\n\\n function safe32(uint256 n, string memory errorMessage) internal pure returns (uint32) {\\n require(n <= type(uint32).max, errorMessage);\\n return uint32(n);\\n }\\n\\n function add_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\\n return Exp({ mantissa: add_(a.mantissa, b.mantissa) });\\n }\\n\\n function add_(Double memory a, Double memory b) internal pure returns (Double memory) {\\n return Double({ mantissa: add_(a.mantissa, b.mantissa) });\\n }\\n\\n function add_(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a + b;\\n }\\n\\n function sub_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\\n return Exp({ mantissa: sub_(a.mantissa, b.mantissa) });\\n }\\n\\n function sub_(Double memory a, Double memory b) internal pure returns (Double memory) {\\n return Double({ mantissa: sub_(a.mantissa, b.mantissa) });\\n }\\n\\n function sub_(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a - b;\\n }\\n\\n function mul_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\\n return Exp({ mantissa: mul_(a.mantissa, b.mantissa) / EXP_SCALE });\\n }\\n\\n function mul_(Exp memory a, uint256 b) internal pure returns (Exp memory) {\\n return Exp({ mantissa: mul_(a.mantissa, b) });\\n }\\n\\n function mul_(uint256 a, Exp memory b) internal pure returns (uint256) {\\n return mul_(a, b.mantissa) / EXP_SCALE;\\n }\\n\\n function mul_(Double memory a, Double memory b) internal pure returns (Double memory) {\\n return Double({ mantissa: mul_(a.mantissa, b.mantissa) / DOUBLE_SCALE });\\n }\\n\\n function mul_(Double memory a, uint256 b) internal pure returns (Double memory) {\\n return Double({ mantissa: mul_(a.mantissa, b) });\\n }\\n\\n function mul_(uint256 a, Double memory b) internal pure returns (uint256) {\\n return mul_(a, b.mantissa) / DOUBLE_SCALE;\\n }\\n\\n function mul_(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a * b;\\n }\\n\\n function div_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\\n return Exp({ mantissa: div_(mul_(a.mantissa, EXP_SCALE), b.mantissa) });\\n }\\n\\n function div_(Exp memory a, uint256 b) internal pure returns (Exp memory) {\\n return Exp({ mantissa: div_(a.mantissa, b) });\\n }\\n\\n function div_(uint256 a, Exp memory b) internal pure returns (uint256) {\\n return div_(mul_(a, EXP_SCALE), b.mantissa);\\n }\\n\\n function div_(Double memory a, Double memory b) internal pure returns (Double memory) {\\n return Double({ mantissa: div_(mul_(a.mantissa, DOUBLE_SCALE), b.mantissa) });\\n }\\n\\n function div_(Double memory a, uint256 b) internal pure returns (Double memory) {\\n return Double({ mantissa: div_(a.mantissa, b) });\\n }\\n\\n function div_(uint256 a, Double memory b) internal pure returns (uint256) {\\n return div_(mul_(a, DOUBLE_SCALE), b.mantissa);\\n }\\n\\n function div_(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a / b;\\n }\\n\\n function fraction(uint256 a, uint256 b) internal pure returns (Double memory) {\\n return Double({ mantissa: div_(mul_(a, DOUBLE_SCALE), b) });\\n }\\n}\\n\",\"keccak256\":\"0x1b5378848f1472660fd33c260fa9b00bf59e7c2066c27cc592230d7c86a6a9f9\",\"license\":\"BSD-3-Clause\"},\"@venusprotocol/solidity-utilities/contracts/constants.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity ^0.8.25;\\n\\n/// @dev Base unit for computations, usually used in scaling (multiplications, divisions)\\nuint256 constant EXP_SCALE = 1e18;\\n\\n/// @dev A unit (literal one) in EXP_SCALE, usually used in additions/subtractions\\nuint256 constant MANTISSA_ONE = EXP_SCALE;\\n\\n/// @dev The approximate number of seconds per year\\nuint256 constant SECONDS_PER_YEAR = 31_536_000;\\n\",\"keccak256\":\"0x14de93ead464da249af31bea0e3bcfb62ec693bea3475fb4d90f055ac81dc5eb\",\"license\":\"BSD-3-Clause\"},\"@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/Bridge/BaseXVSProxyOFT.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.25;\\n\\nimport { SafeERC20, IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport { ResilientOracleInterface } from \\\"@venusprotocol/oracle/contracts/interfaces/OracleInterface.sol\\\";\\nimport { Pausable } from \\\"@openzeppelin/contracts/security/Pausable.sol\\\";\\nimport { BaseOFTV2 } from \\\"@layerzerolabs/solidity-examples/contracts/token/oft/v2/BaseOFTV2.sol\\\";\\nimport { ensureNonzeroAddress } from \\\"@venusprotocol/solidity-utilities/contracts/validators.sol\\\";\\nimport { ExponentialNoError } from \\\"@venusprotocol/solidity-utilities/contracts/ExponentialNoError.sol\\\";\\n\\n/**\\n * @title BaseXVSProxyOFT\\n * @author Venus\\n * @notice The BaseXVSProxyOFT contract is tailored for facilitating cross-chain transactions with an ERC20 token.\\n * It manages transaction limits of a single and daily transactions.\\n * This contract inherits key functionalities from other contracts, including pausing capabilities and error handling.\\n * It holds state variables for the inner token and maps for tracking transaction limits and statistics across various chains and addresses.\\n * The contract allows the owner to configure limits, set whitelists, and control pausing.\\n * Internal functions conduct eligibility check of transactions, making the contract a fundamental component for cross-chain token management.\\n */\\n\\nabstract contract BaseXVSProxyOFT is Pausable, ExponentialNoError, BaseOFTV2 {\\n using SafeERC20 for IERC20;\\n IERC20 internal immutable innerToken;\\n uint256 internal immutable ld2sdRate;\\n bool public sendAndCallEnabled;\\n\\n /**\\n * @notice The address of ResilientOracle contract wrapped in its interface.\\n */\\n ResilientOracleInterface public oracle;\\n /**\\n * @notice Maximum limit for a single transaction in USD(scaled with 18 decimals) from local chain.\\n */\\n mapping(uint16 => uint256) public chainIdToMaxSingleTransactionLimit;\\n /**\\n * @notice Maximum daily limit for transactions in USD(scaled with 18 decimals) from local chain.\\n */\\n mapping(uint16 => uint256) public chainIdToMaxDailyLimit;\\n /**\\n * @notice Total sent amount in USD(scaled with 18 decimals) within the last 24-hour window from local chain.\\n */\\n mapping(uint16 => uint256) public chainIdToLast24HourTransferred;\\n /**\\n * @notice Timestamp when the last 24-hour window started from local chain.\\n */\\n mapping(uint16 => uint256) public chainIdToLast24HourWindowStart;\\n /**\\n * @notice Maximum limit for a single receive transaction in USD(scaled with 18 decimals) from remote chain.\\n */\\n mapping(uint16 => uint256) public chainIdToMaxSingleReceiveTransactionLimit;\\n /**\\n * @notice Maximum daily limit for receiving transactions in USD(scaled with 18 decimals) from remote chain.\\n */\\n mapping(uint16 => uint256) public chainIdToMaxDailyReceiveLimit;\\n /**\\n * @notice Total received amount in USD(scaled with 18 decimals) within the last 24-hour window from remote chain.\\n */\\n mapping(uint16 => uint256) public chainIdToLast24HourReceived;\\n /**\\n * @notice Timestamp when the last 24-hour window started from remote chain.\\n */\\n mapping(uint16 => uint256) public chainIdToLast24HourReceiveWindowStart;\\n /**\\n * @notice Address on which cap check and bound limit is not applicable.\\n */\\n mapping(address => bool) public whitelist;\\n\\n /**\\n * @notice Emitted when address is added to whitelist.\\n */\\n event SetWhitelist(address indexed addr, bool isWhitelist);\\n /**\\n * @notice Emitted when the maximum limit for a single transaction from local chain is modified.\\n */\\n event SetMaxSingleTransactionLimit(uint16 chainId, uint256 oldMaxLimit, uint256 newMaxLimit);\\n /**\\n * @notice Emitted when the maximum daily limit of transactions from local chain is modified.\\n */\\n event SetMaxDailyLimit(uint16 chainId, uint256 oldMaxLimit, uint256 newMaxLimit);\\n /**\\n * @notice Emitted when the maximum limit for a single receive transaction from remote chain is modified.\\n */\\n event SetMaxSingleReceiveTransactionLimit(uint16 chainId, uint256 oldMaxLimit, uint256 newMaxLimit);\\n /**\\n * @notice Emitted when the maximum daily limit for receiving transactions from remote chain is modified.\\n */\\n event SetMaxDailyReceiveLimit(uint16 chainId, uint256 oldMaxLimit, uint256 newMaxLimit);\\n /**\\n * @notice Event emitted when oracle is modified.\\n */\\n event OracleChanged(address indexed oldOracle, address indexed newOracle);\\n /**\\n * @notice Event emitted when trusted remote sets to empty.\\n */\\n event TrustedRemoteRemoved(uint16 chainId);\\n /**\\n * @notice Event emitted when inner token set successfully.\\n */\\n event InnerTokenAdded(address indexed innerToken);\\n /**\\n *@notice Emitted on sweep token success\\n */\\n event SweepToken(address indexed token, address indexed to, uint256 sweepAmount);\\n /**\\n * @notice Event emitted when SendAndCallEnabled updated successfully.\\n */\\n event UpdateSendAndCallEnabled(bool indexed enabled);\\n /**\\n *@notice Error thrown when this contract balance is less than sweep amount\\n */\\n error InsufficientBalance(uint256 sweepAmount, uint256 balance);\\n\\n /**\\n * @param tokenAddress_ Address of the inner token.\\n * @param sharedDecimals_ Number of shared decimals.\\n * @param lzEndpoint_ Address of the layer zero endpoint contract.\\n * @param oracle_ Address of the price oracle.\\n * @custom:error ZeroAddressNotAllowed is thrown when token contract address is zero.\\n * @custom:error ZeroAddressNotAllowed is thrown when lzEndpoint contract address is zero.\\n * @custom:error ZeroAddressNotAllowed is thrown when oracle contract address is zero.\\n * @custom:event Emits InnerTokenAdded with token address.\\n * @custom:event Emits OracleChanged with zero address and oracle address.\\n */\\n constructor(\\n address tokenAddress_,\\n uint8 sharedDecimals_,\\n address lzEndpoint_,\\n address oracle_\\n ) BaseOFTV2(sharedDecimals_, lzEndpoint_) {\\n ensureNonzeroAddress(tokenAddress_);\\n ensureNonzeroAddress(lzEndpoint_);\\n ensureNonzeroAddress(oracle_);\\n\\n innerToken = IERC20(tokenAddress_);\\n\\n (bool success, bytes memory data) = tokenAddress_.staticcall(abi.encodeWithSignature(\\\"decimals()\\\"));\\n require(success, \\\"ProxyOFT: failed to get token decimals\\\");\\n uint8 decimals = abi.decode(data, (uint8));\\n\\n require(sharedDecimals_ <= decimals, \\\"ProxyOFT: sharedDecimals must be <= decimals\\\");\\n ld2sdRate = 10 ** (decimals - sharedDecimals_);\\n\\n emit InnerTokenAdded(tokenAddress_);\\n emit OracleChanged(address(0), oracle_);\\n\\n oracle = ResilientOracleInterface(oracle_);\\n }\\n\\n /**\\n * @notice Set the address of the ResilientOracle contract.\\n * @dev Reverts if the new address is zero.\\n * @param oracleAddress_ The new address of the ResilientOracle contract.\\n * @custom:access Only owner.\\n * @custom:event Emits OracleChanged with old and new oracle address.\\n */\\n function setOracle(address oracleAddress_) external onlyOwner {\\n ensureNonzeroAddress(oracleAddress_);\\n emit OracleChanged(address(oracle), oracleAddress_);\\n oracle = ResilientOracleInterface(oracleAddress_);\\n }\\n\\n /**\\n * @notice Sets the limit of single transaction amount.\\n * @param chainId_ Destination chain id.\\n * @param limit_ Amount in USD(scaled with 18 decimals).\\n * @custom:access Only owner.\\n * @custom:event Emits SetMaxSingleTransactionLimit with old and new limit associated with chain id.\\n */\\n function setMaxSingleTransactionLimit(uint16 chainId_, uint256 limit_) external onlyOwner {\\n require(limit_ <= chainIdToMaxDailyLimit[chainId_], \\\"Single transaction limit > Daily limit\\\");\\n emit SetMaxSingleTransactionLimit(chainId_, chainIdToMaxSingleTransactionLimit[chainId_], limit_);\\n chainIdToMaxSingleTransactionLimit[chainId_] = limit_;\\n }\\n\\n /**\\n * @notice Sets the limit of daily (24 Hour) transactions amount.\\n * @param chainId_ Destination chain id.\\n * @param limit_ Amount in USD(scaled with 18 decimals).\\n * @custom:access Only owner.\\n * @custom:event Emits setMaxDailyLimit with old and new limit associated with chain id.\\n */\\n function setMaxDailyLimit(uint16 chainId_, uint256 limit_) external onlyOwner {\\n require(limit_ >= chainIdToMaxSingleTransactionLimit[chainId_], \\\"Daily limit < single transaction limit\\\");\\n emit SetMaxDailyLimit(chainId_, chainIdToMaxDailyLimit[chainId_], limit_);\\n chainIdToMaxDailyLimit[chainId_] = limit_;\\n }\\n\\n /**\\n * @notice Sets the maximum limit for a single receive transaction.\\n * @param chainId_ The destination chain ID.\\n * @param limit_ The new maximum limit in USD(scaled with 18 decimals).\\n * @custom:access Only owner.\\n * @custom:event Emits setMaxSingleReceiveTransactionLimit with old and new limit associated with chain id.\\n */\\n function setMaxSingleReceiveTransactionLimit(uint16 chainId_, uint256 limit_) external onlyOwner {\\n require(limit_ <= chainIdToMaxDailyReceiveLimit[chainId_], \\\"single receive transaction limit > Daily limit\\\");\\n emit SetMaxSingleReceiveTransactionLimit(chainId_, chainIdToMaxSingleReceiveTransactionLimit[chainId_], limit_);\\n chainIdToMaxSingleReceiveTransactionLimit[chainId_] = limit_;\\n }\\n\\n /**\\n * @notice Sets the maximum daily limit for receiving transactions.\\n * @param chainId_ The destination chain ID.\\n * @param limit_ The new maximum daily limit in USD(scaled with 18 decimals).\\n * @custom:access Only owner.\\n * @custom:event Emits setMaxDailyReceiveLimit with old and new limit associated with chain id.\\n */\\n function setMaxDailyReceiveLimit(uint16 chainId_, uint256 limit_) external onlyOwner {\\n require(\\n limit_ >= chainIdToMaxSingleReceiveTransactionLimit[chainId_],\\n \\\"Daily limit < single receive transaction limit\\\"\\n );\\n emit SetMaxDailyReceiveLimit(chainId_, chainIdToMaxDailyReceiveLimit[chainId_], limit_);\\n chainIdToMaxDailyReceiveLimit[chainId_] = limit_;\\n }\\n\\n /**\\n * @notice Sets the whitelist address to skip checks on transaction limit.\\n * @param user_ Address to be add in whitelist.\\n * @param val_ Boolean to be set (true for user_ address is whitelisted).\\n * @custom:access Only owner.\\n * @custom:event Emits setWhitelist.\\n */\\n function setWhitelist(address user_, bool val_) external onlyOwner {\\n emit SetWhitelist(user_, val_);\\n whitelist[user_] = val_;\\n }\\n\\n /**\\n * @notice Triggers stopped state of the bridge.\\n * @custom:access Only owner.\\n */\\n function pause() external onlyOwner {\\n _pause();\\n }\\n\\n /**\\n * @notice Triggers resume state of the bridge.\\n * @custom:access Only owner.\\n */\\n function unpause() external onlyOwner {\\n _unpause();\\n }\\n\\n /**\\n * @notice A public function to sweep accidental ERC-20 transfers to this contract. Tokens are sent to user\\n * @param token_ The address of the ERC-20 token to sweep\\n * @param to_ The address of the recipient\\n * @param amount_ The amount of tokens needs to transfer\\n * @custom:event Emits SweepToken event\\n * @custom:error Throw InsufficientBalance if amount_ is greater than the available balance of the token in the contract\\n * @custom:access Only Owner\\n */\\n function sweepToken(IERC20 token_, address to_, uint256 amount_) external onlyOwner {\\n uint256 balance = token_.balanceOf(address(this));\\n if (amount_ > balance) {\\n revert InsufficientBalance(amount_, balance);\\n }\\n\\n emit SweepToken(address(token_), to_, amount_);\\n\\n token_.safeTransfer(to_, amount_);\\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 Only owner.\\n * @custom:event Emits TrustedRemoteRemoved once chain id is removed from trusted remote.\\n */\\n function removeTrustedRemote(uint16 remoteChainId_) external onlyOwner {\\n delete trustedRemoteLookup[remoteChainId_];\\n emit TrustedRemoteRemoved(remoteChainId_);\\n }\\n\\n /**\\n * @notice It enables or disables sendAndCall functionality for the bridge.\\n * @param enabled_ Boolean indicating whether the sendAndCall function should be enabled or disabled.\\n */\\n function updateSendAndCallEnabled(bool enabled_) external onlyOwner {\\n sendAndCallEnabled = enabled_;\\n emit UpdateSendAndCallEnabled(enabled_);\\n }\\n\\n /**\\n * @notice Checks the eligibility of a sender to initiate a cross-chain token transfer.\\n * @dev This external view function assesses whether the specified sender is eligible to transfer the given amount\\n * to the specified destination chain. It considers factors such as whitelisting, transaction limits, and a 24-hour window.\\n * @param from_ The sender's address initiating the transfer.\\n * @param dstChainId_ Indicates destination chain.\\n * @param amount_ The quantity of tokens to be transferred.\\n * @return eligibleToSend A boolean indicating whether the sender is eligible to transfer the tokens.\\n * @return maxSingleTransactionLimit The maximum limit for a single transaction.\\n * @return maxDailyLimit The maximum daily limit for transactions.\\n * @return amountInUsd The equivalent amount in USD based on the oracle price.\\n * @return transferredInWindow The total amount transferred in the current 24-hour window.\\n * @return last24HourWindowStart The timestamp when the current 24-hour window started.\\n * @return isWhiteListedUser A boolean indicating whether the sender is whitelisted.\\n */\\n function isEligibleToSend(\\n address from_,\\n uint16 dstChainId_,\\n uint256 amount_\\n )\\n external\\n view\\n returns (\\n bool eligibleToSend,\\n uint256 maxSingleTransactionLimit,\\n uint256 maxDailyLimit,\\n uint256 amountInUsd,\\n uint256 transferredInWindow,\\n uint256 last24HourWindowStart,\\n bool isWhiteListedUser\\n )\\n {\\n // Check if the sender's address is whitelisted\\n isWhiteListedUser = whitelist[from_];\\n\\n // Calculate the amount in USD using the oracle price\\n Exp memory oraclePrice = Exp({ mantissa: oracle.getPrice(token()) });\\n amountInUsd = mul_ScalarTruncate(oraclePrice, amount_);\\n\\n // Load values for the 24-hour window checks\\n uint256 currentBlockTimestamp = block.timestamp;\\n last24HourWindowStart = chainIdToLast24HourWindowStart[dstChainId_];\\n transferredInWindow = chainIdToLast24HourTransferred[dstChainId_];\\n maxSingleTransactionLimit = chainIdToMaxSingleTransactionLimit[dstChainId_];\\n maxDailyLimit = chainIdToMaxDailyLimit[dstChainId_];\\n if (currentBlockTimestamp - last24HourWindowStart > 1 days) {\\n transferredInWindow = amountInUsd;\\n last24HourWindowStart = currentBlockTimestamp;\\n } else {\\n transferredInWindow += amountInUsd;\\n }\\n eligibleToSend = (isWhiteListedUser ||\\n ((amountInUsd <= maxSingleTransactionLimit) && (transferredInWindow <= maxDailyLimit)));\\n }\\n\\n /**\\n * @notice Initiates a cross-chain token transfer and triggers a call on the destination chain.\\n * @dev This internal override function enables the contract to send tokens and invoke calls on the specified\\n * destination chain. It checks whether the sendAndCall feature is enabled before proceeding with the transfer.\\n * @param from_ Address from which tokens will be debited.\\n * @param dstChainId_ Destination chain id on which tokens will be send.\\n * @param toAddress_ Address on which tokens will be credited on destination chain.\\n * @param amount_ Amount of tokens that will be transferred.\\n * @param payload_ Additional data payload for the call on the destination chain.\\n * @param dstGasForCall_ The amount of gas allocated for the call on the destination chain.\\n * @param callparams_ Additional parameters, including refund address, ZRO payment address,\\n * and adapter params.\\n */\\n function sendAndCall(\\n address from_,\\n uint16 dstChainId_,\\n bytes32 toAddress_,\\n uint256 amount_,\\n bytes calldata payload_,\\n uint64 dstGasForCall_,\\n LzCallParams calldata callparams_\\n ) public payable override {\\n require(sendAndCallEnabled, \\\"sendAndCall is disabled\\\");\\n\\n super.sendAndCall(from_, dstChainId_, toAddress_, amount_, payload_, dstGasForCall_, callparams_);\\n }\\n\\n function retryMessage(\\n uint16 _srcChainId,\\n bytes calldata _srcAddress,\\n uint64 _nonce,\\n bytes calldata _payload\\n ) public payable override {\\n bytes memory trustedRemote = trustedRemoteLookup[_srcChainId];\\n // it will still block the message pathway from (srcChainId, srcAddress). should not receive message from untrusted remote.\\n require(\\n _srcAddress.length == trustedRemote.length &&\\n trustedRemote.length > 0 &&\\n keccak256(_srcAddress) == keccak256(trustedRemote),\\n \\\"LzApp: invalid source sending contract\\\"\\n );\\n super.retryMessage(_srcChainId, _srcAddress, _nonce, _payload);\\n }\\n\\n /**\\n * @notice Empty implementation of renounce ownership to avoid any mishappening.\\n */\\n function renounceOwnership() public override {}\\n\\n /**\\n * @notice Return's the address of the inner token of this bridge.\\n * @return Address of the inner token of this bridge.\\n */\\n function token() public view override returns (address) {\\n return address(innerToken);\\n }\\n\\n /**\\n * @notice Checks if the sender is eligible to send tokens\\n * @param from_ Sender's address sending tokens\\n * @param dstChainId_ Chain id on which tokens should be sent\\n * @param amount_ Amount of tokens to be sent\\n */\\n function _isEligibleToSend(address from_, uint16 dstChainId_, uint256 amount_) internal {\\n // Check if the sender's address is whitelisted\\n bool isWhiteListedUser = whitelist[from_];\\n // Check if the user is whitelisted and return if true\\n if (isWhiteListedUser) {\\n return;\\n }\\n\\n // Calculate the amount in USD using the oracle price\\n uint256 amountInUsd;\\n Exp memory oraclePrice = Exp({ mantissa: oracle.getPrice(token()) });\\n amountInUsd = mul_ScalarTruncate(oraclePrice, amount_);\\n\\n // Load values for the 24-hour window checks\\n uint256 currentBlockTimestamp = block.timestamp;\\n uint256 lastDayWindowStart = chainIdToLast24HourWindowStart[dstChainId_];\\n uint256 transferredInWindow = chainIdToLast24HourTransferred[dstChainId_];\\n uint256 maxSingleTransactionLimit = chainIdToMaxSingleTransactionLimit[dstChainId_];\\n uint256 maxDailyLimit = chainIdToMaxDailyLimit[dstChainId_];\\n\\n // Revert if the amount exceeds the single transaction limit\\n require(amountInUsd <= maxSingleTransactionLimit, \\\"Single Transaction Limit Exceed\\\");\\n\\n // Check if the time window has changed (more than 24 hours have passed)\\n if (currentBlockTimestamp - lastDayWindowStart > 1 days) {\\n transferredInWindow = amountInUsd;\\n chainIdToLast24HourWindowStart[dstChainId_] = currentBlockTimestamp;\\n } else {\\n transferredInWindow += amountInUsd;\\n }\\n\\n // Revert if the amount exceeds the daily limit\\n require(transferredInWindow <= maxDailyLimit, \\\"Daily Transaction Limit Exceed\\\");\\n\\n // Update the amount for the 24-hour window\\n chainIdToLast24HourTransferred[dstChainId_] = transferredInWindow;\\n }\\n\\n /**\\n * @notice Checks if receiver is able to receive tokens\\n * @param toAddress_ Receiver address\\n * @param srcChainId_ Source chain id from which token is send\\n * @param receivedAmount_ Amount of tokens received\\n */\\n function _isEligibleToReceive(address toAddress_, uint16 srcChainId_, uint256 receivedAmount_) internal {\\n // Check if the recipient's address is whitelisted\\n bool isWhiteListedUser = whitelist[toAddress_];\\n // Check if the user is whitelisted and return if true\\n if (isWhiteListedUser) {\\n return;\\n }\\n\\n // Calculate the received amount in USD using the oracle price\\n uint256 receivedAmountInUsd;\\n Exp memory oraclePrice = Exp({ mantissa: oracle.getPrice(address(token())) });\\n receivedAmountInUsd = mul_ScalarTruncate(oraclePrice, receivedAmount_);\\n\\n uint256 currentBlockTimestamp = block.timestamp;\\n\\n // Load values for the 24-hour window checks for receiving\\n uint256 lastDayReceiveWindowStart = chainIdToLast24HourReceiveWindowStart[srcChainId_];\\n uint256 receivedInWindow = chainIdToLast24HourReceived[srcChainId_];\\n uint256 maxSingleReceiveTransactionLimit = chainIdToMaxSingleReceiveTransactionLimit[srcChainId_];\\n uint256 maxDailyReceiveLimit = chainIdToMaxDailyReceiveLimit[srcChainId_];\\n\\n // Check if the received amount exceeds the single transaction limit\\n require(receivedAmountInUsd <= maxSingleReceiveTransactionLimit, \\\"Single Transaction Limit Exceed\\\");\\n\\n // Check if the time window has changed (more than 24 hours have passed)\\n if (currentBlockTimestamp - lastDayReceiveWindowStart > 1 days) {\\n receivedInWindow = receivedAmountInUsd;\\n chainIdToLast24HourReceiveWindowStart[srcChainId_] = currentBlockTimestamp;\\n } else {\\n receivedInWindow += receivedAmountInUsd;\\n }\\n\\n // Revert if the received amount exceeds the daily limit\\n require(receivedInWindow <= maxDailyReceiveLimit, \\\"Daily Transaction Limit Exceed\\\");\\n\\n // Update the received amount for the 24-hour window\\n chainIdToLast24HourReceived[srcChainId_] = receivedInWindow;\\n }\\n\\n /**\\n * @notice Transfer tokens from sender to receiver account.\\n * @param from_ Address from which token has to be transferred(Sender).\\n * @param to_ Address on which token will be tranferred(Receiver).\\n * @param amount_ Amount of token to be transferred.\\n * @return Actual balance difference.\\n */\\n function _transferFrom(\\n address from_,\\n address to_,\\n uint256 amount_\\n ) internal override whenNotPaused returns (uint256) {\\n uint256 before = innerToken.balanceOf(to_);\\n if (from_ == address(this)) {\\n innerToken.safeTransfer(to_, amount_);\\n } else {\\n innerToken.safeTransferFrom(from_, to_, amount_);\\n }\\n return innerToken.balanceOf(to_) - before;\\n }\\n\\n /**\\n * @notice Returns Conversion rate factor from large decimals to shared decimals.\\n * @return Conversion rate factor.\\n */\\n function _ld2sdRate() internal view override returns (uint256) {\\n return ld2sdRate;\\n }\\n}\\n\",\"keccak256\":\"0x7e60e0dad246890a0f4b796aeb3fa730cd7cfde1f5616f4b10611b2f469d1e10\",\"license\":\"BSD-3-Clause\"},\"contracts/Bridge/XVSProxyOFTDest.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.25;\\n\\nimport { IXVS } from \\\"./interfaces/IXVS.sol\\\";\\nimport { BaseXVSProxyOFT } from \\\"./BaseXVSProxyOFT.sol\\\";\\n\\n/**\\n * @title XVSProxyOFTDest\\n * @author Venus\\n * @notice XVSProxyOFTDest contract builds upon the functionality of its parent contract, BaseXVSProxyOFT,\\n * and focuses on managing token transfers to the destination chain.\\n * It provides functions to check eligibility and perform the actual token transfers while maintaining strict access controls and pausing mechanisms.\\n */\\n\\ncontract XVSProxyOFTDest is BaseXVSProxyOFT {\\n /**\\n * @notice Emits when stored message dropped without successful retrying.\\n */\\n event DropFailedMessage(uint16 srcChainId, bytes indexed srcAddress, uint64 nonce);\\n\\n constructor(\\n address tokenAddress_,\\n uint8 sharedDecimals_,\\n address lzEndpoint_,\\n address oracle_\\n ) BaseXVSProxyOFT(tokenAddress_, sharedDecimals_, lzEndpoint_, oracle_) {}\\n\\n /**\\n * @notice Clear failed messages from the storage.\\n * @param srcChainId_ Chain id of source\\n * @param srcAddress_ Address of source followed by current bridge address\\n * @param nonce_ Nonce_ of the transaction\\n * @custom:access Only owner\\n * @custom:event Emits DropFailedMessage on clearance of failed message.\\n */\\n function dropFailedMessage(uint16 srcChainId_, bytes memory srcAddress_, uint64 nonce_) external onlyOwner {\\n failedMessages[srcChainId_][srcAddress_][nonce_] = bytes32(0);\\n emit DropFailedMessage(srcChainId_, srcAddress_, nonce_);\\n }\\n\\n /**\\n * @notice Returns the total circulating supply of the token on the destination chain i.e (total supply).\\n * @return total circulating supply of the token on the destination chain.\\n */\\n function circulatingSupply() public view override returns (uint256) {\\n return innerToken.totalSupply();\\n }\\n\\n /**\\n * @notice Debit tokens from the given address\\n * @param from_ Address from which tokens to be debited\\n * @param dstChainId_ Destination chain id\\n * @param amount_ Amount of tokens to be debited\\n * @return Actual amount debited\\n */\\n function _debitFrom(\\n address from_,\\n uint16 dstChainId_,\\n bytes32,\\n uint256 amount_\\n ) internal override whenNotPaused returns (uint256) {\\n require(from_ == _msgSender(), \\\"ProxyOFT: owner is not send caller\\\");\\n _isEligibleToSend(from_, dstChainId_, amount_);\\n IXVS(address(innerToken)).burn(from_, amount_);\\n return amount_;\\n }\\n\\n /**\\n * @notice Credit tokens in the given account\\n * @param srcChainId_ Source chain id\\n * @param toAddress_ Address on which token will be credited\\n * @param amount_ Amount of tokens to be credited\\n * @return Actual amount credited\\n */\\n function _creditTo(\\n uint16 srcChainId_,\\n address toAddress_,\\n uint256 amount_\\n ) internal override whenNotPaused returns (uint256) {\\n _isEligibleToReceive(toAddress_, srcChainId_, amount_);\\n IXVS(address(innerToken)).mint(toAddress_, amount_);\\n return amount_;\\n }\\n}\\n\",\"keccak256\":\"0x127d20692944707c3d5f08bb1872f83015731705a7905cf93161cd6c7d0c10df\",\"license\":\"BSD-3-Clause\"},\"contracts/Bridge/interfaces/IXVS.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity ^0.8.25;\\n\\n/**\\n * @title IXVS\\n * @author Venus\\n * @notice Interface implemented by `XVS` token.\\n */\\ninterface IXVS {\\n function mint(address to, uint256 amount) external;\\n\\n function burn(address from, uint256 amount) external;\\n}\\n\",\"keccak256\":\"0xd3e26dcde753c28be8f826806c18fbf92918baa0f4f972a96916a15831ce5d03\",\"license\":\"BSD-3-Clause\"}},\"version\":1}", + "bytecode": "0x61010060405234801561001157600080fd5b50604051615b2b380380615b2b8339810160408190526100309161035b565b6000805460ff191690558383838382828181808061004d336102ab565b6001600160a01b0316608052505060ff1660a0525061006d905084610304565b61007682610304565b61007f81610304565b6001600160a01b03841660c081905260408051600481526024810182526020810180516001600160e01b031663313ce56760e01b1790529051600092839290916100c991906103af565b600060405180830381855afa9150503d8060008114610104576040519150601f19603f3d011682016040523d82523d6000602084013e610109565b606091505b50915091508161016f5760405162461bcd60e51b815260206004820152602660248201527f50726f78794f46543a206661696c656420746f2067657420746f6b656e20646560448201526563696d616c7360d01b60648201526084015b60405180910390fd5b60008180602001905181019061018591906103de565b90508060ff168660ff1611156101f25760405162461bcd60e51b815260206004820152602c60248201527f50726f78794f46543a20736861726564446563696d616c73206d75737420626560448201526b203c3d20646563696d616c7360a01b6064820152608401610166565b6101fc8682610416565b61020790600a610519565b60e0526040516001600160a01b038816907f0b673f021ff9a27bbe58f282908695869e130b3103029190387b83650806c2c390600090a26040516001600160a01b038516906000907f05cd89403c6bdeac21c2ff33de395121a31fa1bc2bf3adf4825f1f86e79969dd908290a35050600780546001600160a01b0390931661010002610100600160a81b031990931692909217909155506105289650505050505050565b600080546001600160a01b03838116610100818102610100600160a81b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b6001600160a01b03811661032b576040516342bcdf7f60e11b815260040160405180910390fd5b50565b80516001600160a01b038116811461034557600080fd5b919050565b805160ff8116811461034557600080fd5b6000806000806080858703121561037157600080fd5b61037a8561032e565b93506103886020860161034a565b92506103966040860161032e565b91506103a46060860161032e565b905092959194509250565b6000825160005b818110156103d057602081860181015185830152016103b6565b506000920191825250919050565b6000602082840312156103f057600080fd5b6103f98261034a565b9392505050565b634e487b7160e01b600052601160045260246000fd5b60ff828116828216039081111561042f5761042f610400565b92915050565b600181815b8085111561047057816000190482111561045657610456610400565b8085161561046357918102915b93841c939080029061043a565b509250929050565b6000826104875750600161042f565b816104945750600061042f565b81600181146104aa57600281146104b4576104d0565b600191505061042f565b60ff8411156104c5576104c5610400565b50506001821b61042f565b5060208310610133831016604e8410600b84101617156104f3575081810a61042f565b6104fd8383610435565b806000190482111561051157610511610400565b029392505050565b60006103f960ff841683610478565b60805160a05160c05160e0516155376105f4600039600081816130ca0152818161363d0152613b78015260008181610ca10152818161106801528181611ba701528181612d6b01528181612df701528181612e3001528181612e790152818161371301528181613be101528181613daa01526141da015260006108be015260008181610abe01528181610cf501528181610f3c01528181610fe40152818161142601528181611ecf015281816123c20152818161259d01528181612a9b01526138a101526155376000f3fe6080604052600436106103b75760003560e01c80637dc0d1d0116101f2578063baf3292d1161010d578063df2a5b3b116100a0578063f2fde38b1161006f578063f2fde38b14610c52578063f5ecbdbc14610c72578063fc0c546a14610c92578063fdff235b14610cc557600080fd5b8063df2a5b3b14610bdd578063e6a20ae614610bfd578063eaffd49a14610c12578063eb8d72b714610c3257600080fd5b8063cc01e9b6116100dc578063cc01e9b614610b50578063cc7015ae14610b70578063d1deba1f14610b9d578063d708a46814610bb057600080fd5b8063baf3292d14610ae0578063c1e9132e14610b00578063c446183414610b1a578063cbed8b9c14610b3057600080fd5b806393a61d6c116101855780639f38369a116101545780639f38369a14610a4c578063a4c51df514610a6c578063a6c3d16514610a8c578063b353aaa714610aac57600080fd5b806393a61d6c1461097d578063950c8a74146109aa5780639b19251a146109ca5780639bdb9812146109fa57600080fd5b80638cfd8f5c116101c15780638cfd8f5c146108e05780638da5cb5b14610918578063904365671461093b5780639358928b1461096857600080fd5b80637dc0d1d01461083a5780638456cb591461087757806384e69c691461088c578063857749b0146108ac57600080fd5b80634c42899a116102e257806364aff9ec11610275578063715018a611610244578063715018a6146107ce5780637533d788146107da57806376203b48146108075780637adbf9731461081a57600080fd5b806364aff9ec1461075b57806366ad5c8a1461077b578063695ef6bf1461079b57806369c1e7b8146107ae57600080fd5b806353489d6c116102b157806353489d6c146106b457806353d6fd59146106d45780635b8c41e6146106f45780635c975abb1461074357600080fd5b80634c42899a146106135780634cec62561461063a5780634ed2c662146106675780634f4ba0f41461068757600080fd5b80632dbbec081161035a5780633f1f4fa4116103295780633f1f4fa41461059c5780633f4ba83a146105c957806342d65a8d146105de57806344770515146105fe57600080fd5b80632dbbec08146104ec578063365260b41461050c5780633c4ec39b146105415780633d8b38f61461057c57600080fd5b80630df37483116103965780630df374831461043357806310ddb13714610453578063182b4b89146104735780632488eec8146104cc57600080fd5b80621d3567146103bc57806301ffc9a7146103de57806307e0db1714610413575b600080fd5b3480156103c857600080fd5b506103dc6103d736600461456a565b610cf2565b005b3480156103ea57600080fd5b506103fe6103f93660046145fd565b610ee4565b60405190151581526020015b60405180910390f35b34801561041f57600080fd5b506103dc61042e366004614627565b610f1b565b34801561043f57600080fd5b506103dc61044e366004614642565b610fa4565b34801561045f57600080fd5b506103dc61046e366004614627565b610fc3565b34801561047f57600080fd5b5061049361048e366004614681565b61101b565b6040805197151588526020880196909652948601939093526060850191909152608084015260a0830152151560c082015260e00161040a565b3480156104d857600080fd5b506103dc6104e7366004614642565b611191565b3480156104f857600080fd5b506103dc610507366004614627565b611275565b34801561051857600080fd5b5061052c6105273660046146cd565b6112d4565b6040805192835260208301919091520161040a565b34801561054d57600080fd5b5061056e61055c366004614627565b600d6020526000908152604090205481565b60405190815260200161040a565b34801561058857600080fd5b506103fe610597366004614734565b611329565b3480156105a857600080fd5b5061056e6105b7366004614627565b60036020526000908152604090205481565b3480156105d557600080fd5b506103dc6113f5565b3480156105ea57600080fd5b506103dc6105f9366004614734565b611407565b34801561060a57600080fd5b5061056e600081565b34801561061f57600080fd5b50610628600081565b60405160ff909116815260200161040a565b34801561064657600080fd5b5061056e610655366004614627565b600a6020526000908152604090205481565b34801561067357600080fd5b506103dc610682366004614786565b61148d565b34801561069357600080fd5b5061056e6106a2366004614627565b60096020526000908152604090205481565b3480156106c057600080fd5b506103dc6106cf366004614642565b6114d2565b3480156106e057600080fd5b506103dc6106ef3660046147a3565b6115b6565b34801561070057600080fd5b5061056e61070f366004614849565b6005602090815260009384526040808520845180860184018051928152908401958401959095209452929052825290205481565b34801561074f57600080fd5b5060005460ff166103fe565b34801561076757600080fd5b506103dc6107763660046148e9565b61162e565b34801561078757600080fd5b506103dc61079636600461456a565b611735565b6103dc6107a9366004614942565b611811565b3480156107ba57600080fd5b506103dc6107c9366004614642565b61187c565b3480156103dc57600080fd5b3480156107e657600080fd5b506107fa6107f5366004614627565b611968565b60405161040a9190614a05565b6103dc610815366004614a18565b611a02565b34801561082657600080fd5b506103dc610835366004614aca565b611a6e565b34801561084657600080fd5b5060075461085f9061010090046001600160a01b031681565b6040516001600160a01b03909116815260200161040a565b34801561088357600080fd5b506103dc611ae6565b34801561089857600080fd5b506103dc6108a7366004614849565b611af6565b3480156108b857600080fd5b506106287f000000000000000000000000000000000000000000000000000000000000000081565b3480156108ec57600080fd5b5061056e6108fb366004614ae7565b600260209081526000928352604080842090915290825290205481565b34801561092457600080fd5b5060005461010090046001600160a01b031661085f565b34801561094757600080fd5b5061056e610956366004614627565b600c6020526000908152604090205481565b34801561097457600080fd5b5061056e611ba3565b34801561098957600080fd5b5061056e610998366004614627565b600b6020526000908152604090205481565b3480156109b657600080fd5b5060045461085f906001600160a01b031681565b3480156109d657600080fd5b506103fe6109e5366004614aca565b60106020526000908152604090205460ff1681565b348015610a0657600080fd5b506103fe610a15366004614849565b6006602090815260009384526040808520845180860184018051928152908401958401959095209452929052825290205460ff1681565b348015610a5857600080fd5b506107fa610a67366004614627565b611c2c565b348015610a7857600080fd5b5061052c610a87366004614b1a565b611d42565b348015610a9857600080fd5b506103dc610aa7366004614734565b611dd1565b348015610ab857600080fd5b5061085f7f000000000000000000000000000000000000000000000000000000000000000081565b348015610aec57600080fd5b506103dc610afb366004614aca565b611e5a565b348015610b0c57600080fd5b506007546103fe9060ff1681565b348015610b2657600080fd5b5061056e61271081565b348015610b3c57600080fd5b506103dc610b4b366004614bd7565b611eb0565b348015610b5c57600080fd5b506103dc610b6b366004614642565b611f45565b348015610b7c57600080fd5b5061056e610b8b366004614627565b60086020526000908152604090205481565b6103dc610bab36600461456a565b612031565b348015610bbc57600080fd5b5061056e610bcb366004614627565b600e6020526000908152604090205481565b348015610be957600080fd5b506103dc610bf8366004614c45565b612135565b348015610c0957600080fd5b50610628600181565b348015610c1e57600080fd5b506103dc610c2d366004614c63565b61219f565b348015610c3e57600080fd5b506103dc610c4d366004614734565b6122be565b348015610c5e57600080fd5b506103dc610c6d366004614aca565b612318565b348015610c7e57600080fd5b506107fa610c8d366004614d2b565b612391565b348015610c9e57600080fd5b507f000000000000000000000000000000000000000000000000000000000000000061085f565b348015610cd157600080fd5b5061056e610ce0366004614627565b600f6020526000908152604090205481565b337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610d6f5760405162461bcd60e51b815260206004820152601e60248201527f4c7a4170703a20696e76616c696420656e64706f696e742063616c6c6572000060448201526064015b60405180910390fd5b61ffff861660009081526001602052604081208054610d8d90614d78565b80601f0160208091040260200160405190810160405280929190818152602001828054610db990614d78565b8015610e065780601f10610ddb57610100808354040283529160200191610e06565b820191906000526020600020905b815481529060010190602001808311610de957829003601f168201915b50505050509050805186869050148015610e21575060008151115b8015610e49575080516020820120604051610e3f9088908890614dac565b6040518091039020145b610e655760405162461bcd60e51b8152600401610d6690614dbc565b610edb8787878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8a018190048102820181019092528881528a93509150889088908190840183828082843760009201919091525061244492505050565b50505050505050565b60006001600160e01b03198216631f7ecdf760e01b1480610f1557506301ffc9a760e01b6001600160e01b03198316145b92915050565b610f236124bd565b6040516307e0db1760e01b815261ffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906307e0db17906024015b600060405180830381600087803b158015610f8957600080fd5b505af1158015610f9d573d6000803e3d6000fd5b5050505050565b610fac6124bd565b61ffff909116600090815260036020526040902055565b610fcb6124bd565b6040516310ddb13760e01b815261ffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906310ddb13790602401610f6f565b6001600160a01b03838116600090815260106020908152604080832054815192830190915260075492938493849384938493849360ff909216928492909182916101009004166341976e097f00000000000000000000000000000000000000000000000000000000000000006040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa1580156110cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110ef9190614e02565b905290506110fd818a61251d565b61ffff8b166000908152600b6020908152604080832054600a835281842054600884528285205460099094529190932054919a509098509196509094509250426201518061114b8583614e31565b111561115c57859450809350611169565b6111668686614e44565b94505b828061118057508786111580156111805750868511155b985050509397509397509397909450565b6111996124bd565b61ffff821660009081526008602052604090205481101561120b5760405162461bcd60e51b815260206004820152602660248201527f4461696c79206c696d6974203c2073696e676c65207472616e73616374696f6e604482015265081b1a5b5a5d60d21b6064820152608401610d66565b61ffff82166000818152600960209081526040918290205482519384529083015281018290527f4dd31065e259d5284e44d1f9265710da72eafcf78dc925e3881189fc3b71f6939060600160405180910390a161ffff909116600090815260096020526040902055565b61127d6124bd565b61ffff81166000908152600160205260408120611299916144a6565b60405161ffff821681527f6d5075c81d4d9e75bec6052f4e44f58f8a8cf1327544addbbf015fb06f83bd37906020015b60405180910390a150565b60008061131a8888888888888080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061253592505050565b91509150965096945050505050565b61ffff83166000908152600160205260408120805482919061134a90614d78565b80601f016020809104026020016040519081016040528092919081815260200182805461137690614d78565b80156113c35780601f10611398576101008083540402835291602001916113c3565b820191906000526020600020905b8154815290600101906020018083116113a657829003601f168201915b5050505050905083836040516113da929190614dac565b60405180910390208180519060200120149150509392505050565b6113fd6124bd565b611405612629565b565b61140f6124bd565b6040516342d65a8d60e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906342d65a8d9061145f90869086908690600401614e80565b600060405180830381600087803b15801561147957600080fd5b505af1158015610edb573d6000803e3d6000fd5b6114956124bd565b6007805460ff19168215159081179091556040517fe628f01c6f4e6340598d3a2913390db68e8859379eebff349e170f2b16baed0090600090a250565b6114da6124bd565b61ffff821660009081526009602052604090205481111561154c5760405162461bcd60e51b815260206004820152602660248201527f53696e676c65207472616e73616374696f6e206c696d6974203e204461696c79604482015265081b1a5b5a5d60d21b6064820152608401610d66565b61ffff82166000818152600860209081526040918290205482519384529083015281018290527f7babeac42ccbb33537ee421fedc4db7b5f251b5d2a3fa5c0ff4b35b2d783be879060600160405180910390a161ffff909116600090815260086020526040902055565b6115be6124bd565b816001600160a01b03167ff6019ec0a78d156d249a1ec7579e2321f6ac7521d6e1d2eacf90ba4a184dcceb826040516115fb911515815260200190565b60405180910390a26001600160a01b03919091166000908152601060205260409020805460ff1916911515919091179055565b6116366124bd565b6040516370a0823160e01b81523060048201526000906001600160a01b038516906370a0823190602401602060405180830381865afa15801561167d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116a19190614e02565b9050808211156116ce5760405163cf47918160e01b81526004810183905260248101829052604401610d66565b826001600160a01b0316846001600160a01b03167f6d25be279134f4ecaa4770aff0c3d916d9e7c5ef37b65ed95dbdba411f5d54d58460405161171391815260200190565b60405180910390a361172f6001600160a01b038516848461267b565b50505050565b3330146117935760405162461bcd60e51b815260206004820152602660248201527f4e6f6e626c6f636b696e674c7a4170703a2063616c6c6572206d7573742062656044820152650204c7a4170760d41b6064820152608401610d66565b6118098686868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8901819004810282018101909252878152899350915087908790819084018382808284376000920191909152506126e392505050565b505050505050565b611809858585856118256020870187614aca565b6118356040880160208901614aca565b6118426040890189614e9e565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061276a92505050565b6118846124bd565b61ffff82166000908152600c60205260409020548110156118fe5760405162461bcd60e51b815260206004820152602e60248201527f4461696c79206c696d6974203c2073696e676c6520726563656976652074726160448201526d1b9cd858dd1a5bdb881b1a5b5a5d60921b6064820152608401610d66565b61ffff82166000818152600d60209081526040918290205482519384529083015281018290527f95dc51094cd27cf4ee3fd0dbb50cf96f8df1629c822f5434c4a34d7eb03c97249060600160405180910390a161ffff9091166000908152600d6020526040902055565b6001602052600090815260409020805461198190614d78565b80601f01602080910402602001604051908101604052809291908181526020018280546119ad90614d78565b80156119fa5780601f106119cf576101008083540402835291602001916119fa565b820191906000526020600020905b8154815290600101906020018083116119dd57829003601f168201915b505050505081565b60075460ff16611a545760405162461bcd60e51b815260206004820152601760248201527f73656e64416e6443616c6c2069732064697361626c65640000000000000000006044820152606401610d66565b611a648888888888888888612852565b5050505050505050565b611a766124bd565b611a7f816128f6565b6007546040516001600160a01b0380841692610100900416907f05cd89403c6bdeac21c2ff33de395121a31fa1bc2bf3adf4825f1f86e79969dd90600090a3600780546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b611aee6124bd565b61140561291d565b611afe6124bd565b61ffff83166000908152600560205260408082209051611b1f908590614ee4565b9081526040805191829003602090810183206001600160401b038616600090815291522091909155611b52908390614ee4565b6040805191829003822061ffff861683526001600160401b0384166020840152917f48a980eea4ea1c540209e2f9f32a4c2edf51fab37b1d21f453868301ecb6e2ee910160405180910390a2505050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611c03573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c279190614e02565b905090565b61ffff8116600090815260016020526040812080546060929190611c4f90614d78565b80601f0160208091040260200160405190810160405280929190818152602001828054611c7b90614d78565b8015611cc85780601f10611c9d57610100808354040283529160200191611cc8565b820191906000526020600020905b815481529060010190602001808311611cab57829003601f168201915b505050505090508051600003611d205760405162461bcd60e51b815260206004820152601d60248201527f4c7a4170703a206e6f20747275737465642070617468207265636f72640000006044820152606401610d66565b611d3b600060148351611d339190614e31565b83919061295a565b9392505050565b600080611dbf8b8b8b8b8b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8d018190048102820181019092528b81528e93508d9250908c908c9081908401838280828437600092019190915250612a6792505050565b91509150995099975050505050505050565b611dd96124bd565b818130604051602001611dee93929190614f00565b60408051601f1981840301815291815261ffff8516600090815260016020522090611e199082614f6e565b507f8c0400cfe2d1199b1a725c78960bcc2a344d869b80590d0f2bd005db15a572ce838383604051611e4d93929190614e80565b60405180910390a1505050565b611e626124bd565b600480546001600160a01b0319166001600160a01b0383169081179091556040519081527f5db758e995a17ec1ad84bdef7e8c3293a0bd6179bcce400dff5d4c3d87db726b906020016112c9565b611eb86124bd565b6040516332fb62e760e21b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063cbed8b9c90611f0c908890889088908890889060040161502d565b600060405180830381600087803b158015611f2657600080fd5b505af1158015611f3a573d6000803e3d6000fd5b505050505050505050565b611f4d6124bd565b61ffff82166000908152600d6020526040902054811115611fc75760405162461bcd60e51b815260206004820152602e60248201527f73696e676c652072656365697665207472616e73616374696f6e206c696d697460448201526d080f8811185a5b1e481b1a5b5a5d60921b6064820152608401610d66565b61ffff82166000818152600c60209081526040918290205482519384529083015281018290527f2c42997a938a029910a78e7c28d762b349c28e70f3a89c1fbccbb1a46020b1599060600160405180910390a161ffff9091166000908152600c6020526040902055565b61ffff86166000908152600160205260408120805461204f90614d78565b80601f016020809104026020016040519081016040528092919081815260200182805461207b90614d78565b80156120c85780601f1061209d576101008083540402835291602001916120c8565b820191906000526020600020905b8154815290600101906020018083116120ab57829003601f168201915b505050505090508051868690501480156120e3575060008151115b801561210b5750805160208201206040516121019088908890614dac565b6040518091039020145b6121275760405162461bcd60e51b8152600401610d6690614dbc565b610edb878787878787612b29565b61213d6124bd565b61ffff83811660008181526002602090815260408083209487168084529482529182902085905581519283528201929092529081018290527f9d5c7c0b934da8fefa9c7760c98383778a12dfbfc0c3b3106518f43fb9508ac090606001611e4d565b3330146121ee5760405162461bcd60e51b815260206004820152601f60248201527f4f4654436f72653a2063616c6c6572206d757374206265204f4654436f7265006044820152606401610d66565b6121f9308686612d3f565b9350846001600160a01b03168a61ffff167fbf551ec93859b170f9b2141bd9298bf3f64322c6f7beb2543a0cb669834118bf8660405161223b91815260200190565b60405180910390a3604051633fe79aed60e11b81526001600160a01b03861690637fcf35da90839061227f908e908e908e908e908e908d908d908d9060040161505b565b600060405180830381600088803b15801561229957600080fd5b5087f11580156122ad573d6000803e3d6000fd5b505050505050505050505050505050565b6122c66124bd565b61ffff831660009081526001602052604090206122e48284836150b6565b507ffa41487ad5d6728f0b19276fa1eddc16558578f5109fc39d2dc33c3230470dab838383604051611e4d93929190614e80565b6123206124bd565b6001600160a01b0381166123855760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610d66565b61238e81612ef9565b50565b604051633d7b2f6f60e21b815261ffff808616600483015284166024820152306044820152606481018290526060907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063f5ecbdbc90608401600060405180830381865afa158015612411573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526124399190810190615175565b90505b949350505050565b6000806124a75a60966366ad5c8a60e01b8989898960405160240161246c94939291906151e2565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915230929190612f52565b9150915081611809576118098686868685612fdc565b6000546001600160a01b036101009091041633146114055760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610d66565b60008061252a8484613079565b905061243c816130aa565b600080600061258387612547886130c2565b6040805160006020820152602181019390935260c09190911b6001600160c01b0319166041830152805160298184030181526049909201905290565b60405163040a7bb160e41b81529091506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906340a7bb10906125da908b90309086908b908b90600401615220565b6040805180830381865afa1580156125f6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061261a9190615274565b92509250509550959350505050565b612631613148565b6000805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6040516001600160a01b0383166024820152604481018290526126de90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152613191565b505050565b60006126ef8282613266565b905060ff811661270a57612705858585856132c2565b610f9d565b60001960ff8216016127225761270585858585613352565b60405162461bcd60e51b815260206004820152601c60248201527f4f4654436f72653a20756e6b6e6f776e207061636b65742074797065000000006044820152606401610d66565b600061277887828481613560565b61278185613635565b50905061279088888884613675565b9050600081116127de5760405162461bcd60e51b815260206004820152601960248201527813d19510dbdc994e88185b5bdd5b9d081d1bdbc81cdb585b1b603a1b6044820152606401610d66565b60006127ed87612547846130c2565b90506127fd888287878734613778565b86896001600160a01b03168961ffff167fd81fc9b8523134ed613870ed029d6170cbb73aa6a6bc311b9a642689fb9df59a8560405161283e91815260200190565b60405180910390a450979650505050505050565b611f3a8888888888888080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508a925061289f9150506020890189614aca565b6128af60408a0160208b01614aca565b6128bc60408b018b614e9e565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061391d92505050565b6001600160a01b03811661238e576040516342bcdf7f60e11b815260040160405180910390fd5b612925613a12565b6000805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861265e3390565b60608161296881601f614e44565b10156129a75760405162461bcd60e51b815260206004820152600e60248201526d736c6963655f6f766572666c6f7760901b6044820152606401610d66565b6129b18284614e44565b845110156129f55760405162461bcd60e51b8152602060048201526011602482015270736c6963655f6f75744f66426f756e647360781b6044820152606401610d66565b606082158015612a145760405191506000825260208201604052612a5e565b6040519150601f8416801560200281840101858101878315602002848b0101015b81831015612a4d578051835260209283019201612a35565b5050858452601f01601f1916604052505b50949350505050565b6000806000612a81338a612a7a8b6130c2565b8a8a613a58565b60405163040a7bb160e41b81529091506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906340a7bb1090612ad8908d90309086908b908b90600401615220565b6040805180830381865afa158015612af4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b189190615274565b925092505097509795505050505050565b61ffff86166000908152600560205260408082209051612b4c9088908890614dac565b90815260408051602092819003830190206001600160401b03871660009081529252902054905080612bcc5760405162461bcd60e51b815260206004820152602360248201527f4e6f6e626c6f636b696e674c7a4170703a206e6f2073746f726564206d65737360448201526261676560e81b6064820152608401610d66565b808383604051612bdd929190614dac565b604051809103902014612c3c5760405162461bcd60e51b815260206004820152602160248201527f4e6f6e626c6f636b696e674c7a4170703a20696e76616c6964207061796c6f616044820152601960fa1b6064820152608401610d66565b61ffff87166000908152600560205260408082209051612c5f9089908990614dac565b90815260408051602092819003830181206001600160401b038916600090815290845282902093909355601f88018290048202830182019052868252612cf7918991899089908190840183828082843760009201919091525050604080516020601f8a018190048102820181019092528881528a9350915088908890819084018382808284376000920191909152506126e392505050565b7fc264d91f3adc5588250e1551f547752ca0cfa8f6b530d243b9f9f4cab10ea8e58787878785604051612d2e959493929190615298565b60405180910390a150505050505050565b6000612d49613a12565b6040516370a0823160e01b81526001600160a01b0384811660048301526000917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa158015612db4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612dd89190614e02565b9050306001600160a01b03861603612e2357612e1e6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016858561267b565b612e58565b612e586001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016868686613a99565b6040516370a0823160e01b81526001600160a01b03858116600483015282917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa158015612ec2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ee69190614e02565b612ef09190614e31565b95945050505050565b600080546001600160a01b03838116610100818102610100600160a81b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b6000606060008060008661ffff166001600160401b03811115612f7757612f776147dc565b6040519080825280601f01601f191660200182016040528015612fa1576020820181803683370190505b50905060008087516020890160008d8df191503d925086831115612fc3578692505b828152826000602083013e909890975095505050505050565b8180519060200120600560008761ffff1661ffff1681526020019081526020016000208560405161300d9190614ee4565b9081526040805191829003602090810183206001600160401b0388166000908152915220919091557fe183f33de2837795525b4792ca4cd60535bd77c53b7e7030060bfcf5734d6b0c9061306a90879087908790879087906152d3565b60405180910390a15050505050565b60408051602081019091526000815260405180602001604052806130a1856000015185613ad1565b90529392505050565b8051600090610f1590670de0b6b3a76400009061533b565b6000806130ef7f00000000000000000000000000000000000000000000000000000000000000008461533b565b90506001600160401b03811115610f155760405162461bcd60e51b815260206004820152601a60248201527f4f4654436f72653a20616d6f756e745344206f766572666c6f770000000000006044820152606401610d66565b60005460ff166114055760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610d66565b60006131e6826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316613add9092919063ffffffff16565b9050805160001480613207575080806020019051810190613207919061534f565b6126de5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610d66565b6000613273826001614e44565b835110156132b95760405162461bcd60e51b8152602060048201526013602482015272746f55696e74385f6f75744f66426f756e647360681b6044820152606401610d66565b50016001015190565b6000806132ce83613aec565b90925090506001600160a01b0382166132e75761dead91505b60006132f282613b71565b90506132ff878483613ba6565b9050826001600160a01b03168761ffff167fbf551ec93859b170f9b2141bd9298bf3f64322c6f7beb2543a0cb669834118bf8360405161334191815260200190565b60405180910390a350505050505050565b600080600080600061336386613c45565b945094509450945094506000600660008b61ffff1661ffff168152602001908152602001600020896040516133989190614ee4565b90815260408051602092819003830190206001600160401b038b166000908152925281205460ff1691506133cb85613b71565b905081613439576133dd8b3083613ba6565b61ffff8c16600090815260066020526040908190209051919250600191613405908d90614ee4565b90815260408051602092819003830190206001600160401b038d16600090815292529020805460ff19169115159190911790555b6001600160a01b0386163b613490576040516001600160a01b03871681527f9aedf5fdba8716db3b6705ca00150643309995d4f818a249ed6dde6677e7792d9060200160405180910390a15050505050505061172f565b8a8a8a8a8a8a868a60008a6134ae578b6001600160401b03166134b0565b5a5b90506000806134e25a609663eaffd49a60e01b8e8e8e8d8d8d8d8d60405160240161246c98979695949392919061536c565b91509150811561353b578751602089012060405161ffff8d16907fb8890edbfc1c74692f527444645f95489c3703cc2df42e4a366f5d06fa6cd8849061352d908e908e9086906153e0565b60405180910390a250613548565b6135488b8b8b8b85612fdc565b50505050505050505050505050505050505050505050565b600061356b83613cfc565b61ffff808716600090815260026020908152604080832093891683529290522054909150806135dc5760405162461bcd60e51b815260206004820152601a60248201527f4c7a4170703a206d696e4761734c696d6974206e6f74207365740000000000006044820152606401610d66565b6135e68382614e44565b8210156118095760405162461bcd60e51b815260206004820152601b60248201527f4c7a4170703a20676173206c696d697420697320746f6f206c6f7700000000006044820152606401610d66565b6000806136627f00000000000000000000000000000000000000000000000000000000000000008461540e565b905061366e8184614e31565b9150915091565b600061367f613a12565b6001600160a01b03851633146136e25760405162461bcd60e51b815260206004820152602260248201527f50726f78794f46543a206f776e6572206973206e6f742073656e642063616c6c60448201526132b960f11b6064820152608401610d66565b6136ed858584613d58565b604051632770a7eb60e21b81526001600160a01b038681166004830152602482018490527f00000000000000000000000000000000000000000000000000000000000000001690639dc29fac90604401600060405180830381600087803b15801561375757600080fd5b505af115801561376b573d6000803e3d6000fd5b5093979650505050505050565b61ffff86166000908152600160205260408120805461379690614d78565b80601f01602080910402602001604051908101604052809291908181526020018280546137c290614d78565b801561380f5780601f106137e45761010080835404028352916020019161380f565b820191906000526020600020905b8154815290600101906020018083116137f257829003601f168201915b5050505050905080516000036138805760405162461bcd60e51b815260206004820152603060248201527f4c7a4170703a2064657374696e6174696f6e20636861696e206973206e6f742060448201526f61207472757374656420736f7572636560801b6064820152608401610d66565b61388b878751613f7a565b60405162c5803160e81b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063c58031009084906138e2908b9086908c908c908c908c90600401615422565b6000604051808303818588803b1580156138fb57600080fd5b505af115801561390f573d6000803e3d6000fd5b505050505050505050505050565b6000613935896001846001600160401b038916613560565b61393e87613635565b50905061394d8a8a8a84613675565b90506000811161399b5760405162461bcd60e51b815260206004820152601960248201527813d19510dbdc994e88185b5bdd5b9d081d1bdbc81cdb585b1b603a1b6044820152606401610d66565b60006139ab338a612a7a856130c2565b90506139bb8a8287878734613778565b888b6001600160a01b03168b61ffff167fd81fc9b8523134ed613870ed029d6170cbb73aa6a6bc311b9a642689fb9df59a856040516139fc91815260200190565b60405180910390a4509998505050505050505050565b60005460ff16156114055760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610d66565b6060600185856001600160a01b0389168587604051602001613a7f96959493929190615489565b604051602081830303815290604052905095945050505050565b6040516001600160a01b038085166024830152831660448201526064810182905261172f9085906323b872dd60e01b906084016126a7565b6000611d3b82846154ea565b606061243c8484600085613feb565b60008080613afa8482613266565b60ff16148015613b0b575082516029145b613b525760405162461bcd60e51b815260206004820152601860248201527713d19510dbdc994e881a5b9d985b1a59081c185e5b1bd85960421b6044820152606401610d66565b613b5d83600d6140c6565b9150613b6a83602161412b565b9050915091565b6000610f157f00000000000000000000000000000000000000000000000000000000000000006001600160401b0384166154ea565b6000613bb0613a12565b613bbb838584614188565b6040516340c10f1960e01b81526001600160a01b038481166004830152602482018490527f000000000000000000000000000000000000000000000000000000000000000016906340c10f1990604401600060405180830381600087803b158015613c2557600080fd5b505af1158015613c39573d6000803e3d6000fd5b50939695505050505050565b600080806060816001613c588783613266565b60ff1614613ca35760405162461bcd60e51b815260206004820152601860248201527713d19510dbdc994e881a5b9d985b1a59081c185e5b1bd85960421b6044820152606401610d66565b613cae86600d6140c6565b9350613cbb86602161412b565b9250613cc88660296143aa565b9450613cd586604961412b565b9050613cf16051808851613ce99190614e31565b88919061295a565b915091939590929450565b6000602282511015613d505760405162461bcd60e51b815260206004820152601c60248201527f4c7a4170703a20696e76616c69642061646170746572506172616d73000000006044820152606401610d66565b506022015190565b6001600160a01b03831660009081526010602052604090205460ff168015613d805750505050565b60408051602081019091526007546000918291819061010090046001600160a01b03166341976e097f00000000000000000000000000000000000000000000000000000000000000006040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015613e0d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613e319190614e02565b90529050613e3f818561251d565b61ffff86166000908152600b6020908152604080832054600a835281842054600884528285205460099094529190932054939550429390919081871115613ec85760405162461bcd60e51b815260206004820152601f60248201527f53696e676c65205472616e73616374696f6e204c696d697420457863656564006044820152606401610d66565b62015180613ed68587614e31565b1115613efa5761ffff8a166000908152600b60205260409020859055869250613f07565b613f048784614e44565b92505b80831115613f575760405162461bcd60e51b815260206004820152601e60248201527f4461696c79205472616e73616374696f6e204c696d69742045786365656400006044820152606401610d66565b505061ffff9097166000908152600a602052604090209690965550505050505050565b61ffff821660009081526003602052604081205490819003613f9b57506127105b808211156126de5760405162461bcd60e51b815260206004820181905260248201527f4c7a4170703a207061796c6f61642073697a6520697320746f6f206c617267656044820152606401610d66565b60608247101561404c5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610d66565b600080866001600160a01b031685876040516140689190614ee4565b60006040518083038185875af1925050503d80600081146140a5576040519150601f19603f3d011682016040523d82523d6000602084013e6140aa565b606091505b50915091506140bb87838387614408565b979650505050505050565b60006140d3826014614e44565b8351101561411b5760405162461bcd60e51b8152602060048201526015602482015274746f416464726573735f6f75744f66426f756e647360581b6044820152606401610d66565b500160200151600160601b900490565b6000614138826008614e44565b8351101561417f5760405162461bcd60e51b8152602060048201526014602482015273746f55696e7436345f6f75744f66426f756e647360601b6044820152606401610d66565b50016008015190565b6001600160a01b03831660009081526010602052604090205460ff1680156141b05750505050565b60408051602081019091526007546000918291819061010090046001600160a01b03166341976e097f00000000000000000000000000000000000000000000000000000000000000006040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa15801561423d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906142619190614e02565b9052905061426f818561251d565b61ffff86166000908152600f6020908152604080832054600e835281842054600c845282852054600d90945291909320549395504293909190818711156142f85760405162461bcd60e51b815260206004820152601f60248201527f53696e676c65205472616e73616374696f6e204c696d697420457863656564006044820152606401610d66565b620151806143068587614e31565b111561432a5761ffff8a166000908152600f60205260409020859055869250614337565b6143348784614e44565b92505b808311156143875760405162461bcd60e51b815260206004820152601e60248201527f4461696c79205472616e73616374696f6e204c696d69742045786365656400006044820152606401610d66565b505061ffff9097166000908152600e602052604090209690965550505050505050565b60006143b7826020614e44565b835110156143ff5760405162461bcd60e51b8152602060048201526015602482015274746f427974657333325f6f75744f66426f756e647360581b6044820152606401610d66565b50016020015190565b60608315614477578251600003614470576001600160a01b0385163b6144705760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610d66565b508161243c565b61243c838381511561448c5781518083602001fd5b8060405162461bcd60e51b8152600401610d669190614a05565b5080546144b290614d78565b6000825580601f106144c2575050565b601f01602090049060005260206000209081019061238e91905b808211156144f057600081556001016144dc565b5090565b803561ffff8116811461450657600080fd5b919050565b60008083601f84011261451d57600080fd5b5081356001600160401b0381111561453457600080fd5b60208301915083602082850101111561454c57600080fd5b9250929050565b80356001600160401b038116811461450657600080fd5b6000806000806000806080878903121561458357600080fd5b61458c876144f4565b955060208701356001600160401b03808211156145a857600080fd5b6145b48a838b0161450b565b90975095508591506145c860408a01614553565b945060608901359150808211156145de57600080fd5b506145eb89828a0161450b565b979a9699509497509295939492505050565b60006020828403121561460f57600080fd5b81356001600160e01b031981168114611d3b57600080fd5b60006020828403121561463957600080fd5b611d3b826144f4565b6000806040838503121561465557600080fd5b61465e836144f4565b946020939093013593505050565b6001600160a01b038116811461238e57600080fd5b60008060006060848603121561469657600080fd5b83356146a18161466c565b92506146af602085016144f4565b9150604084013590509250925092565b801515811461238e57600080fd5b60008060008060008060a087890312156146e657600080fd5b6146ef876144f4565b95506020870135945060408701359350606087013561470d816146bf565b925060808701356001600160401b0381111561472857600080fd5b6145eb89828a0161450b565b60008060006040848603121561474957600080fd5b614752846144f4565b925060208401356001600160401b0381111561476d57600080fd5b6147798682870161450b565b9497909650939450505050565b60006020828403121561479857600080fd5b8135611d3b816146bf565b600080604083850312156147b657600080fd5b82356147c18161466c565b915060208301356147d1816146bf565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171561481a5761481a6147dc565b604052919050565b60006001600160401b0382111561483b5761483b6147dc565b50601f01601f191660200190565b60008060006060848603121561485e57600080fd5b614867846144f4565b925060208401356001600160401b0381111561488257600080fd5b8401601f8101861361489357600080fd5b80356148a66148a182614822565b6147f2565b8181528760208385010111156148bb57600080fd5b816020840160208301376000602083830101528094505050506148e060408501614553565b90509250925092565b6000806000606084860312156148fe57600080fd5b83356149098161466c565b925060208401356149198161466c565b929592945050506040919091013590565b60006060828403121561493c57600080fd5b50919050565b600080600080600060a0868803121561495a57600080fd5b85356149658161466c565b9450614973602087016144f4565b9350604086013592506060860135915060808601356001600160401b0381111561499c57600080fd5b6149a88882890161492a565b9150509295509295909350565b60005b838110156149d05781810151838201526020016149b8565b50506000910152565b600081518084526149f18160208601602086016149b5565b601f01601f19169290920160200192915050565b602081526000611d3b60208301846149d9565b60008060008060008060008060e0898b031215614a3457600080fd5b8835614a3f8161466c565b9750614a4d60208a016144f4565b9650604089013595506060890135945060808901356001600160401b0380821115614a7757600080fd5b614a838c838d0161450b565b9096509450849150614a9760a08c01614553565b935060c08b0135915080821115614aad57600080fd5b50614aba8b828c0161492a565b9150509295985092959890939650565b600060208284031215614adc57600080fd5b8135611d3b8161466c565b60008060408385031215614afa57600080fd5b614b03836144f4565b9150614b11602084016144f4565b90509250929050565b600080600080600080600080600060e08a8c031215614b3857600080fd5b614b418a6144f4565b985060208a0135975060408a0135965060608a01356001600160401b0380821115614b6b57600080fd5b614b778d838e0161450b565b9098509650869150614b8b60808d01614553565b955060a08c01359150614b9d826146bf565b90935060c08b01359080821115614bb357600080fd5b50614bc08c828d0161450b565b915080935050809150509295985092959850929598565b600080600080600060808688031215614bef57600080fd5b614bf8866144f4565b9450614c06602087016144f4565b93506040860135925060608601356001600160401b03811115614c2857600080fd5b614c348882890161450b565b969995985093965092949392505050565b600080600060608486031215614c5a57600080fd5b6146a1846144f4565b6000806000806000806000806000806101008b8d031215614c8357600080fd5b614c8c8b6144f4565b995060208b01356001600160401b0380821115614ca857600080fd5b614cb48e838f0161450b565b909b509950899150614cc860408e01614553565b985060608d0135975060808d01359150614ce18261466c565b90955060a08c0135945060c08c01359080821115614cfe57600080fd5b50614d0b8d828e0161450b565b9150809450508092505060e08b013590509295989b9194979a5092959850565b60008060008060808587031215614d4157600080fd5b614d4a856144f4565b9350614d58602086016144f4565b92506040850135614d688161466c565b9396929550929360600135925050565b600181811c90821680614d8c57607f821691505b60208210810361493c57634e487b7160e01b600052602260045260246000fd5b8183823760009101908152919050565b60208082526026908201527f4c7a4170703a20696e76616c696420736f757263652073656e64696e6720636f6040820152651b9d1c9858dd60d21b606082015260800190565b600060208284031215614e1457600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b81810381811115610f1557610f15614e1b565b80820180821115610f1557610f15614e1b565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b61ffff84168152604060208201526000612439604083018486614e57565b6000808335601e19843603018112614eb557600080fd5b8301803591506001600160401b03821115614ecf57600080fd5b60200191503681900382131561454c57600080fd5b60008251614ef68184602087016149b5565b9190910192915050565b8284823760609190911b6bffffffffffffffffffffffff19169101908152601401919050565b601f8211156126de576000816000526020600020601f850160051c81016020861015614f4f5750805b601f850160051c820191505b8181101561180957828155600101614f5b565b81516001600160401b03811115614f8757614f876147dc565b614f9b81614f958454614d78565b84614f26565b602080601f831160018114614fd05760008415614fb85750858301515b600019600386901b1c1916600185901b178555611809565b600085815260208120601f198616915b82811015614fff57888601518255948401946001909101908401614fe0565b508582101561501d5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600061ffff8088168352808716602084015250846040830152608060608301526140bb608083018486614e57565b61ffff8916815260c06020820152600061507960c08301898b614e57565b6001600160401b038816604084015286606084015285608084015282810360a08401526150a7818587614e57565b9b9a5050505050505050505050565b6001600160401b038311156150cd576150cd6147dc565b6150e1836150db8354614d78565b83614f26565b6000601f84116001811461511557600085156150fd5750838201355b600019600387901b1c1916600186901b178355610f9d565b600083815260209020601f19861690835b828110156151465786850135825560209485019460019092019101615126565b50868210156151635760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b60006020828403121561518757600080fd5b81516001600160401b0381111561519d57600080fd5b8201601f810184136151ae57600080fd5b80516151bc6148a182614822565b8181528560208385010111156151d157600080fd5b612ef08260208301602086016149b5565b61ffff851681526080602082015260006151ff60808301866149d9565b6001600160401b038516604084015282810360608401526140bb81856149d9565b61ffff861681526001600160a01b038516602082015260a06040820181905260009061524e908301866149d9565b8415156060840152828103608084015261526881856149d9565b98975050505050505050565b6000806040838503121561528757600080fd5b505080516020909101519092909150565b61ffff861681526080602082015260006152b6608083018688614e57565b6001600160401b0394909416604083015250606001529392505050565b61ffff8616815260a0602082015260006152f060a08301876149d9565b6001600160401b0386166040840152828103606084015261531181866149d9565b9050828103608084015261526881856149d9565b634e487b7160e01b600052601260045260246000fd5b60008261534a5761534a615325565b500490565b60006020828403121561536157600080fd5b8151611d3b816146bf565b600061010061ffff8b16835280602084015261538a8184018b6149d9565b6001600160401b038a166040850152606084018990526001600160a01b038816608085015260a0840187905283810360c085015290506153ca81866149d9565b9150508260e08301529998505050505050505050565b6060815260006153f360608301866149d9565b6001600160401b039490941660208301525060400152919050565b60008261541d5761541d615325565b500690565b61ffff8716815260c06020820152600061543f60c08301886149d9565b828103604084015261545181886149d9565b6001600160a01b0387811660608601528616608085015283810360a0850152905061547c81856149d9565b9998505050505050505050565b60ff60f81b8760f81b16815285600182015260006001600160401b0360c01b808760c01b166021840152856029840152808560c01b1660498401525082516154d88160518501602087016149b5565b91909101605101979650505050505050565b8082028115828204841417610f1557610f15614e1b56fea264697066735822122078a20abcb22d7cb1fa2db0ea891c1e652ab0382a5180ce86b54f25c83dc77a1264736f6c63430008190033", + "deployedBytecode": "0x6080604052600436106103b75760003560e01c80637dc0d1d0116101f2578063baf3292d1161010d578063df2a5b3b116100a0578063f2fde38b1161006f578063f2fde38b14610c52578063f5ecbdbc14610c72578063fc0c546a14610c92578063fdff235b14610cc557600080fd5b8063df2a5b3b14610bdd578063e6a20ae614610bfd578063eaffd49a14610c12578063eb8d72b714610c3257600080fd5b8063cc01e9b6116100dc578063cc01e9b614610b50578063cc7015ae14610b70578063d1deba1f14610b9d578063d708a46814610bb057600080fd5b8063baf3292d14610ae0578063c1e9132e14610b00578063c446183414610b1a578063cbed8b9c14610b3057600080fd5b806393a61d6c116101855780639f38369a116101545780639f38369a14610a4c578063a4c51df514610a6c578063a6c3d16514610a8c578063b353aaa714610aac57600080fd5b806393a61d6c1461097d578063950c8a74146109aa5780639b19251a146109ca5780639bdb9812146109fa57600080fd5b80638cfd8f5c116101c15780638cfd8f5c146108e05780638da5cb5b14610918578063904365671461093b5780639358928b1461096857600080fd5b80637dc0d1d01461083a5780638456cb591461087757806384e69c691461088c578063857749b0146108ac57600080fd5b80634c42899a116102e257806364aff9ec11610275578063715018a611610244578063715018a6146107ce5780637533d788146107da57806376203b48146108075780637adbf9731461081a57600080fd5b806364aff9ec1461075b57806366ad5c8a1461077b578063695ef6bf1461079b57806369c1e7b8146107ae57600080fd5b806353489d6c116102b157806353489d6c146106b457806353d6fd59146106d45780635b8c41e6146106f45780635c975abb1461074357600080fd5b80634c42899a146106135780634cec62561461063a5780634ed2c662146106675780634f4ba0f41461068757600080fd5b80632dbbec081161035a5780633f1f4fa4116103295780633f1f4fa41461059c5780633f4ba83a146105c957806342d65a8d146105de57806344770515146105fe57600080fd5b80632dbbec08146104ec578063365260b41461050c5780633c4ec39b146105415780633d8b38f61461057c57600080fd5b80630df37483116103965780630df374831461043357806310ddb13714610453578063182b4b89146104735780632488eec8146104cc57600080fd5b80621d3567146103bc57806301ffc9a7146103de57806307e0db1714610413575b600080fd5b3480156103c857600080fd5b506103dc6103d736600461456a565b610cf2565b005b3480156103ea57600080fd5b506103fe6103f93660046145fd565b610ee4565b60405190151581526020015b60405180910390f35b34801561041f57600080fd5b506103dc61042e366004614627565b610f1b565b34801561043f57600080fd5b506103dc61044e366004614642565b610fa4565b34801561045f57600080fd5b506103dc61046e366004614627565b610fc3565b34801561047f57600080fd5b5061049361048e366004614681565b61101b565b6040805197151588526020880196909652948601939093526060850191909152608084015260a0830152151560c082015260e00161040a565b3480156104d857600080fd5b506103dc6104e7366004614642565b611191565b3480156104f857600080fd5b506103dc610507366004614627565b611275565b34801561051857600080fd5b5061052c6105273660046146cd565b6112d4565b6040805192835260208301919091520161040a565b34801561054d57600080fd5b5061056e61055c366004614627565b600d6020526000908152604090205481565b60405190815260200161040a565b34801561058857600080fd5b506103fe610597366004614734565b611329565b3480156105a857600080fd5b5061056e6105b7366004614627565b60036020526000908152604090205481565b3480156105d557600080fd5b506103dc6113f5565b3480156105ea57600080fd5b506103dc6105f9366004614734565b611407565b34801561060a57600080fd5b5061056e600081565b34801561061f57600080fd5b50610628600081565b60405160ff909116815260200161040a565b34801561064657600080fd5b5061056e610655366004614627565b600a6020526000908152604090205481565b34801561067357600080fd5b506103dc610682366004614786565b61148d565b34801561069357600080fd5b5061056e6106a2366004614627565b60096020526000908152604090205481565b3480156106c057600080fd5b506103dc6106cf366004614642565b6114d2565b3480156106e057600080fd5b506103dc6106ef3660046147a3565b6115b6565b34801561070057600080fd5b5061056e61070f366004614849565b6005602090815260009384526040808520845180860184018051928152908401958401959095209452929052825290205481565b34801561074f57600080fd5b5060005460ff166103fe565b34801561076757600080fd5b506103dc6107763660046148e9565b61162e565b34801561078757600080fd5b506103dc61079636600461456a565b611735565b6103dc6107a9366004614942565b611811565b3480156107ba57600080fd5b506103dc6107c9366004614642565b61187c565b3480156103dc57600080fd5b3480156107e657600080fd5b506107fa6107f5366004614627565b611968565b60405161040a9190614a05565b6103dc610815366004614a18565b611a02565b34801561082657600080fd5b506103dc610835366004614aca565b611a6e565b34801561084657600080fd5b5060075461085f9061010090046001600160a01b031681565b6040516001600160a01b03909116815260200161040a565b34801561088357600080fd5b506103dc611ae6565b34801561089857600080fd5b506103dc6108a7366004614849565b611af6565b3480156108b857600080fd5b506106287f000000000000000000000000000000000000000000000000000000000000000081565b3480156108ec57600080fd5b5061056e6108fb366004614ae7565b600260209081526000928352604080842090915290825290205481565b34801561092457600080fd5b5060005461010090046001600160a01b031661085f565b34801561094757600080fd5b5061056e610956366004614627565b600c6020526000908152604090205481565b34801561097457600080fd5b5061056e611ba3565b34801561098957600080fd5b5061056e610998366004614627565b600b6020526000908152604090205481565b3480156109b657600080fd5b5060045461085f906001600160a01b031681565b3480156109d657600080fd5b506103fe6109e5366004614aca565b60106020526000908152604090205460ff1681565b348015610a0657600080fd5b506103fe610a15366004614849565b6006602090815260009384526040808520845180860184018051928152908401958401959095209452929052825290205460ff1681565b348015610a5857600080fd5b506107fa610a67366004614627565b611c2c565b348015610a7857600080fd5b5061052c610a87366004614b1a565b611d42565b348015610a9857600080fd5b506103dc610aa7366004614734565b611dd1565b348015610ab857600080fd5b5061085f7f000000000000000000000000000000000000000000000000000000000000000081565b348015610aec57600080fd5b506103dc610afb366004614aca565b611e5a565b348015610b0c57600080fd5b506007546103fe9060ff1681565b348015610b2657600080fd5b5061056e61271081565b348015610b3c57600080fd5b506103dc610b4b366004614bd7565b611eb0565b348015610b5c57600080fd5b506103dc610b6b366004614642565b611f45565b348015610b7c57600080fd5b5061056e610b8b366004614627565b60086020526000908152604090205481565b6103dc610bab36600461456a565b612031565b348015610bbc57600080fd5b5061056e610bcb366004614627565b600e6020526000908152604090205481565b348015610be957600080fd5b506103dc610bf8366004614c45565b612135565b348015610c0957600080fd5b50610628600181565b348015610c1e57600080fd5b506103dc610c2d366004614c63565b61219f565b348015610c3e57600080fd5b506103dc610c4d366004614734565b6122be565b348015610c5e57600080fd5b506103dc610c6d366004614aca565b612318565b348015610c7e57600080fd5b506107fa610c8d366004614d2b565b612391565b348015610c9e57600080fd5b507f000000000000000000000000000000000000000000000000000000000000000061085f565b348015610cd157600080fd5b5061056e610ce0366004614627565b600f6020526000908152604090205481565b337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610d6f5760405162461bcd60e51b815260206004820152601e60248201527f4c7a4170703a20696e76616c696420656e64706f696e742063616c6c6572000060448201526064015b60405180910390fd5b61ffff861660009081526001602052604081208054610d8d90614d78565b80601f0160208091040260200160405190810160405280929190818152602001828054610db990614d78565b8015610e065780601f10610ddb57610100808354040283529160200191610e06565b820191906000526020600020905b815481529060010190602001808311610de957829003601f168201915b50505050509050805186869050148015610e21575060008151115b8015610e49575080516020820120604051610e3f9088908890614dac565b6040518091039020145b610e655760405162461bcd60e51b8152600401610d6690614dbc565b610edb8787878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8a018190048102820181019092528881528a93509150889088908190840183828082843760009201919091525061244492505050565b50505050505050565b60006001600160e01b03198216631f7ecdf760e01b1480610f1557506301ffc9a760e01b6001600160e01b03198316145b92915050565b610f236124bd565b6040516307e0db1760e01b815261ffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906307e0db17906024015b600060405180830381600087803b158015610f8957600080fd5b505af1158015610f9d573d6000803e3d6000fd5b5050505050565b610fac6124bd565b61ffff909116600090815260036020526040902055565b610fcb6124bd565b6040516310ddb13760e01b815261ffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906310ddb13790602401610f6f565b6001600160a01b03838116600090815260106020908152604080832054815192830190915260075492938493849384938493849360ff909216928492909182916101009004166341976e097f00000000000000000000000000000000000000000000000000000000000000006040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa1580156110cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110ef9190614e02565b905290506110fd818a61251d565b61ffff8b166000908152600b6020908152604080832054600a835281842054600884528285205460099094529190932054919a509098509196509094509250426201518061114b8583614e31565b111561115c57859450809350611169565b6111668686614e44565b94505b828061118057508786111580156111805750868511155b985050509397509397509397909450565b6111996124bd565b61ffff821660009081526008602052604090205481101561120b5760405162461bcd60e51b815260206004820152602660248201527f4461696c79206c696d6974203c2073696e676c65207472616e73616374696f6e604482015265081b1a5b5a5d60d21b6064820152608401610d66565b61ffff82166000818152600960209081526040918290205482519384529083015281018290527f4dd31065e259d5284e44d1f9265710da72eafcf78dc925e3881189fc3b71f6939060600160405180910390a161ffff909116600090815260096020526040902055565b61127d6124bd565b61ffff81166000908152600160205260408120611299916144a6565b60405161ffff821681527f6d5075c81d4d9e75bec6052f4e44f58f8a8cf1327544addbbf015fb06f83bd37906020015b60405180910390a150565b60008061131a8888888888888080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061253592505050565b91509150965096945050505050565b61ffff83166000908152600160205260408120805482919061134a90614d78565b80601f016020809104026020016040519081016040528092919081815260200182805461137690614d78565b80156113c35780601f10611398576101008083540402835291602001916113c3565b820191906000526020600020905b8154815290600101906020018083116113a657829003601f168201915b5050505050905083836040516113da929190614dac565b60405180910390208180519060200120149150509392505050565b6113fd6124bd565b611405612629565b565b61140f6124bd565b6040516342d65a8d60e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906342d65a8d9061145f90869086908690600401614e80565b600060405180830381600087803b15801561147957600080fd5b505af1158015610edb573d6000803e3d6000fd5b6114956124bd565b6007805460ff19168215159081179091556040517fe628f01c6f4e6340598d3a2913390db68e8859379eebff349e170f2b16baed0090600090a250565b6114da6124bd565b61ffff821660009081526009602052604090205481111561154c5760405162461bcd60e51b815260206004820152602660248201527f53696e676c65207472616e73616374696f6e206c696d6974203e204461696c79604482015265081b1a5b5a5d60d21b6064820152608401610d66565b61ffff82166000818152600860209081526040918290205482519384529083015281018290527f7babeac42ccbb33537ee421fedc4db7b5f251b5d2a3fa5c0ff4b35b2d783be879060600160405180910390a161ffff909116600090815260086020526040902055565b6115be6124bd565b816001600160a01b03167ff6019ec0a78d156d249a1ec7579e2321f6ac7521d6e1d2eacf90ba4a184dcceb826040516115fb911515815260200190565b60405180910390a26001600160a01b03919091166000908152601060205260409020805460ff1916911515919091179055565b6116366124bd565b6040516370a0823160e01b81523060048201526000906001600160a01b038516906370a0823190602401602060405180830381865afa15801561167d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116a19190614e02565b9050808211156116ce5760405163cf47918160e01b81526004810183905260248101829052604401610d66565b826001600160a01b0316846001600160a01b03167f6d25be279134f4ecaa4770aff0c3d916d9e7c5ef37b65ed95dbdba411f5d54d58460405161171391815260200190565b60405180910390a361172f6001600160a01b038516848461267b565b50505050565b3330146117935760405162461bcd60e51b815260206004820152602660248201527f4e6f6e626c6f636b696e674c7a4170703a2063616c6c6572206d7573742062656044820152650204c7a4170760d41b6064820152608401610d66565b6118098686868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8901819004810282018101909252878152899350915087908790819084018382808284376000920191909152506126e392505050565b505050505050565b611809858585856118256020870187614aca565b6118356040880160208901614aca565b6118426040890189614e9e565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061276a92505050565b6118846124bd565b61ffff82166000908152600c60205260409020548110156118fe5760405162461bcd60e51b815260206004820152602e60248201527f4461696c79206c696d6974203c2073696e676c6520726563656976652074726160448201526d1b9cd858dd1a5bdb881b1a5b5a5d60921b6064820152608401610d66565b61ffff82166000818152600d60209081526040918290205482519384529083015281018290527f95dc51094cd27cf4ee3fd0dbb50cf96f8df1629c822f5434c4a34d7eb03c97249060600160405180910390a161ffff9091166000908152600d6020526040902055565b6001602052600090815260409020805461198190614d78565b80601f01602080910402602001604051908101604052809291908181526020018280546119ad90614d78565b80156119fa5780601f106119cf576101008083540402835291602001916119fa565b820191906000526020600020905b8154815290600101906020018083116119dd57829003601f168201915b505050505081565b60075460ff16611a545760405162461bcd60e51b815260206004820152601760248201527f73656e64416e6443616c6c2069732064697361626c65640000000000000000006044820152606401610d66565b611a648888888888888888612852565b5050505050505050565b611a766124bd565b611a7f816128f6565b6007546040516001600160a01b0380841692610100900416907f05cd89403c6bdeac21c2ff33de395121a31fa1bc2bf3adf4825f1f86e79969dd90600090a3600780546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b611aee6124bd565b61140561291d565b611afe6124bd565b61ffff83166000908152600560205260408082209051611b1f908590614ee4565b9081526040805191829003602090810183206001600160401b038616600090815291522091909155611b52908390614ee4565b6040805191829003822061ffff861683526001600160401b0384166020840152917f48a980eea4ea1c540209e2f9f32a4c2edf51fab37b1d21f453868301ecb6e2ee910160405180910390a2505050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611c03573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c279190614e02565b905090565b61ffff8116600090815260016020526040812080546060929190611c4f90614d78565b80601f0160208091040260200160405190810160405280929190818152602001828054611c7b90614d78565b8015611cc85780601f10611c9d57610100808354040283529160200191611cc8565b820191906000526020600020905b815481529060010190602001808311611cab57829003601f168201915b505050505090508051600003611d205760405162461bcd60e51b815260206004820152601d60248201527f4c7a4170703a206e6f20747275737465642070617468207265636f72640000006044820152606401610d66565b611d3b600060148351611d339190614e31565b83919061295a565b9392505050565b600080611dbf8b8b8b8b8b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8d018190048102820181019092528b81528e93508d9250908c908c9081908401838280828437600092019190915250612a6792505050565b91509150995099975050505050505050565b611dd96124bd565b818130604051602001611dee93929190614f00565b60408051601f1981840301815291815261ffff8516600090815260016020522090611e199082614f6e565b507f8c0400cfe2d1199b1a725c78960bcc2a344d869b80590d0f2bd005db15a572ce838383604051611e4d93929190614e80565b60405180910390a1505050565b611e626124bd565b600480546001600160a01b0319166001600160a01b0383169081179091556040519081527f5db758e995a17ec1ad84bdef7e8c3293a0bd6179bcce400dff5d4c3d87db726b906020016112c9565b611eb86124bd565b6040516332fb62e760e21b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063cbed8b9c90611f0c908890889088908890889060040161502d565b600060405180830381600087803b158015611f2657600080fd5b505af1158015611f3a573d6000803e3d6000fd5b505050505050505050565b611f4d6124bd565b61ffff82166000908152600d6020526040902054811115611fc75760405162461bcd60e51b815260206004820152602e60248201527f73696e676c652072656365697665207472616e73616374696f6e206c696d697460448201526d080f8811185a5b1e481b1a5b5a5d60921b6064820152608401610d66565b61ffff82166000818152600c60209081526040918290205482519384529083015281018290527f2c42997a938a029910a78e7c28d762b349c28e70f3a89c1fbccbb1a46020b1599060600160405180910390a161ffff9091166000908152600c6020526040902055565b61ffff86166000908152600160205260408120805461204f90614d78565b80601f016020809104026020016040519081016040528092919081815260200182805461207b90614d78565b80156120c85780601f1061209d576101008083540402835291602001916120c8565b820191906000526020600020905b8154815290600101906020018083116120ab57829003601f168201915b505050505090508051868690501480156120e3575060008151115b801561210b5750805160208201206040516121019088908890614dac565b6040518091039020145b6121275760405162461bcd60e51b8152600401610d6690614dbc565b610edb878787878787612b29565b61213d6124bd565b61ffff83811660008181526002602090815260408083209487168084529482529182902085905581519283528201929092529081018290527f9d5c7c0b934da8fefa9c7760c98383778a12dfbfc0c3b3106518f43fb9508ac090606001611e4d565b3330146121ee5760405162461bcd60e51b815260206004820152601f60248201527f4f4654436f72653a2063616c6c6572206d757374206265204f4654436f7265006044820152606401610d66565b6121f9308686612d3f565b9350846001600160a01b03168a61ffff167fbf551ec93859b170f9b2141bd9298bf3f64322c6f7beb2543a0cb669834118bf8660405161223b91815260200190565b60405180910390a3604051633fe79aed60e11b81526001600160a01b03861690637fcf35da90839061227f908e908e908e908e908e908d908d908d9060040161505b565b600060405180830381600088803b15801561229957600080fd5b5087f11580156122ad573d6000803e3d6000fd5b505050505050505050505050505050565b6122c66124bd565b61ffff831660009081526001602052604090206122e48284836150b6565b507ffa41487ad5d6728f0b19276fa1eddc16558578f5109fc39d2dc33c3230470dab838383604051611e4d93929190614e80565b6123206124bd565b6001600160a01b0381166123855760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610d66565b61238e81612ef9565b50565b604051633d7b2f6f60e21b815261ffff808616600483015284166024820152306044820152606481018290526060907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063f5ecbdbc90608401600060405180830381865afa158015612411573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526124399190810190615175565b90505b949350505050565b6000806124a75a60966366ad5c8a60e01b8989898960405160240161246c94939291906151e2565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915230929190612f52565b9150915081611809576118098686868685612fdc565b6000546001600160a01b036101009091041633146114055760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610d66565b60008061252a8484613079565b905061243c816130aa565b600080600061258387612547886130c2565b6040805160006020820152602181019390935260c09190911b6001600160c01b0319166041830152805160298184030181526049909201905290565b60405163040a7bb160e41b81529091506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906340a7bb10906125da908b90309086908b908b90600401615220565b6040805180830381865afa1580156125f6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061261a9190615274565b92509250509550959350505050565b612631613148565b6000805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6040516001600160a01b0383166024820152604481018290526126de90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152613191565b505050565b60006126ef8282613266565b905060ff811661270a57612705858585856132c2565b610f9d565b60001960ff8216016127225761270585858585613352565b60405162461bcd60e51b815260206004820152601c60248201527f4f4654436f72653a20756e6b6e6f776e207061636b65742074797065000000006044820152606401610d66565b600061277887828481613560565b61278185613635565b50905061279088888884613675565b9050600081116127de5760405162461bcd60e51b815260206004820152601960248201527813d19510dbdc994e88185b5bdd5b9d081d1bdbc81cdb585b1b603a1b6044820152606401610d66565b60006127ed87612547846130c2565b90506127fd888287878734613778565b86896001600160a01b03168961ffff167fd81fc9b8523134ed613870ed029d6170cbb73aa6a6bc311b9a642689fb9df59a8560405161283e91815260200190565b60405180910390a450979650505050505050565b611f3a8888888888888080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508a925061289f9150506020890189614aca565b6128af60408a0160208b01614aca565b6128bc60408b018b614e9e565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061391d92505050565b6001600160a01b03811661238e576040516342bcdf7f60e11b815260040160405180910390fd5b612925613a12565b6000805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861265e3390565b60608161296881601f614e44565b10156129a75760405162461bcd60e51b815260206004820152600e60248201526d736c6963655f6f766572666c6f7760901b6044820152606401610d66565b6129b18284614e44565b845110156129f55760405162461bcd60e51b8152602060048201526011602482015270736c6963655f6f75744f66426f756e647360781b6044820152606401610d66565b606082158015612a145760405191506000825260208201604052612a5e565b6040519150601f8416801560200281840101858101878315602002848b0101015b81831015612a4d578051835260209283019201612a35565b5050858452601f01601f1916604052505b50949350505050565b6000806000612a81338a612a7a8b6130c2565b8a8a613a58565b60405163040a7bb160e41b81529091506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906340a7bb1090612ad8908d90309086908b908b90600401615220565b6040805180830381865afa158015612af4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b189190615274565b925092505097509795505050505050565b61ffff86166000908152600560205260408082209051612b4c9088908890614dac565b90815260408051602092819003830190206001600160401b03871660009081529252902054905080612bcc5760405162461bcd60e51b815260206004820152602360248201527f4e6f6e626c6f636b696e674c7a4170703a206e6f2073746f726564206d65737360448201526261676560e81b6064820152608401610d66565b808383604051612bdd929190614dac565b604051809103902014612c3c5760405162461bcd60e51b815260206004820152602160248201527f4e6f6e626c6f636b696e674c7a4170703a20696e76616c6964207061796c6f616044820152601960fa1b6064820152608401610d66565b61ffff87166000908152600560205260408082209051612c5f9089908990614dac565b90815260408051602092819003830181206001600160401b038916600090815290845282902093909355601f88018290048202830182019052868252612cf7918991899089908190840183828082843760009201919091525050604080516020601f8a018190048102820181019092528881528a9350915088908890819084018382808284376000920191909152506126e392505050565b7fc264d91f3adc5588250e1551f547752ca0cfa8f6b530d243b9f9f4cab10ea8e58787878785604051612d2e959493929190615298565b60405180910390a150505050505050565b6000612d49613a12565b6040516370a0823160e01b81526001600160a01b0384811660048301526000917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa158015612db4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612dd89190614e02565b9050306001600160a01b03861603612e2357612e1e6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016858561267b565b612e58565b612e586001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016868686613a99565b6040516370a0823160e01b81526001600160a01b03858116600483015282917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa158015612ec2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ee69190614e02565b612ef09190614e31565b95945050505050565b600080546001600160a01b03838116610100818102610100600160a81b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b6000606060008060008661ffff166001600160401b03811115612f7757612f776147dc565b6040519080825280601f01601f191660200182016040528015612fa1576020820181803683370190505b50905060008087516020890160008d8df191503d925086831115612fc3578692505b828152826000602083013e909890975095505050505050565b8180519060200120600560008761ffff1661ffff1681526020019081526020016000208560405161300d9190614ee4565b9081526040805191829003602090810183206001600160401b0388166000908152915220919091557fe183f33de2837795525b4792ca4cd60535bd77c53b7e7030060bfcf5734d6b0c9061306a90879087908790879087906152d3565b60405180910390a15050505050565b60408051602081019091526000815260405180602001604052806130a1856000015185613ad1565b90529392505050565b8051600090610f1590670de0b6b3a76400009061533b565b6000806130ef7f00000000000000000000000000000000000000000000000000000000000000008461533b565b90506001600160401b03811115610f155760405162461bcd60e51b815260206004820152601a60248201527f4f4654436f72653a20616d6f756e745344206f766572666c6f770000000000006044820152606401610d66565b60005460ff166114055760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610d66565b60006131e6826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316613add9092919063ffffffff16565b9050805160001480613207575080806020019051810190613207919061534f565b6126de5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610d66565b6000613273826001614e44565b835110156132b95760405162461bcd60e51b8152602060048201526013602482015272746f55696e74385f6f75744f66426f756e647360681b6044820152606401610d66565b50016001015190565b6000806132ce83613aec565b90925090506001600160a01b0382166132e75761dead91505b60006132f282613b71565b90506132ff878483613ba6565b9050826001600160a01b03168761ffff167fbf551ec93859b170f9b2141bd9298bf3f64322c6f7beb2543a0cb669834118bf8360405161334191815260200190565b60405180910390a350505050505050565b600080600080600061336386613c45565b945094509450945094506000600660008b61ffff1661ffff168152602001908152602001600020896040516133989190614ee4565b90815260408051602092819003830190206001600160401b038b166000908152925281205460ff1691506133cb85613b71565b905081613439576133dd8b3083613ba6565b61ffff8c16600090815260066020526040908190209051919250600191613405908d90614ee4565b90815260408051602092819003830190206001600160401b038d16600090815292529020805460ff19169115159190911790555b6001600160a01b0386163b613490576040516001600160a01b03871681527f9aedf5fdba8716db3b6705ca00150643309995d4f818a249ed6dde6677e7792d9060200160405180910390a15050505050505061172f565b8a8a8a8a8a8a868a60008a6134ae578b6001600160401b03166134b0565b5a5b90506000806134e25a609663eaffd49a60e01b8e8e8e8d8d8d8d8d60405160240161246c98979695949392919061536c565b91509150811561353b578751602089012060405161ffff8d16907fb8890edbfc1c74692f527444645f95489c3703cc2df42e4a366f5d06fa6cd8849061352d908e908e9086906153e0565b60405180910390a250613548565b6135488b8b8b8b85612fdc565b50505050505050505050505050505050505050505050565b600061356b83613cfc565b61ffff808716600090815260026020908152604080832093891683529290522054909150806135dc5760405162461bcd60e51b815260206004820152601a60248201527f4c7a4170703a206d696e4761734c696d6974206e6f74207365740000000000006044820152606401610d66565b6135e68382614e44565b8210156118095760405162461bcd60e51b815260206004820152601b60248201527f4c7a4170703a20676173206c696d697420697320746f6f206c6f7700000000006044820152606401610d66565b6000806136627f00000000000000000000000000000000000000000000000000000000000000008461540e565b905061366e8184614e31565b9150915091565b600061367f613a12565b6001600160a01b03851633146136e25760405162461bcd60e51b815260206004820152602260248201527f50726f78794f46543a206f776e6572206973206e6f742073656e642063616c6c60448201526132b960f11b6064820152608401610d66565b6136ed858584613d58565b604051632770a7eb60e21b81526001600160a01b038681166004830152602482018490527f00000000000000000000000000000000000000000000000000000000000000001690639dc29fac90604401600060405180830381600087803b15801561375757600080fd5b505af115801561376b573d6000803e3d6000fd5b5093979650505050505050565b61ffff86166000908152600160205260408120805461379690614d78565b80601f01602080910402602001604051908101604052809291908181526020018280546137c290614d78565b801561380f5780601f106137e45761010080835404028352916020019161380f565b820191906000526020600020905b8154815290600101906020018083116137f257829003601f168201915b5050505050905080516000036138805760405162461bcd60e51b815260206004820152603060248201527f4c7a4170703a2064657374696e6174696f6e20636861696e206973206e6f742060448201526f61207472757374656420736f7572636560801b6064820152608401610d66565b61388b878751613f7a565b60405162c5803160e81b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063c58031009084906138e2908b9086908c908c908c908c90600401615422565b6000604051808303818588803b1580156138fb57600080fd5b505af115801561390f573d6000803e3d6000fd5b505050505050505050505050565b6000613935896001846001600160401b038916613560565b61393e87613635565b50905061394d8a8a8a84613675565b90506000811161399b5760405162461bcd60e51b815260206004820152601960248201527813d19510dbdc994e88185b5bdd5b9d081d1bdbc81cdb585b1b603a1b6044820152606401610d66565b60006139ab338a612a7a856130c2565b90506139bb8a8287878734613778565b888b6001600160a01b03168b61ffff167fd81fc9b8523134ed613870ed029d6170cbb73aa6a6bc311b9a642689fb9df59a856040516139fc91815260200190565b60405180910390a4509998505050505050505050565b60005460ff16156114055760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610d66565b6060600185856001600160a01b0389168587604051602001613a7f96959493929190615489565b604051602081830303815290604052905095945050505050565b6040516001600160a01b038085166024830152831660448201526064810182905261172f9085906323b872dd60e01b906084016126a7565b6000611d3b82846154ea565b606061243c8484600085613feb565b60008080613afa8482613266565b60ff16148015613b0b575082516029145b613b525760405162461bcd60e51b815260206004820152601860248201527713d19510dbdc994e881a5b9d985b1a59081c185e5b1bd85960421b6044820152606401610d66565b613b5d83600d6140c6565b9150613b6a83602161412b565b9050915091565b6000610f157f00000000000000000000000000000000000000000000000000000000000000006001600160401b0384166154ea565b6000613bb0613a12565b613bbb838584614188565b6040516340c10f1960e01b81526001600160a01b038481166004830152602482018490527f000000000000000000000000000000000000000000000000000000000000000016906340c10f1990604401600060405180830381600087803b158015613c2557600080fd5b505af1158015613c39573d6000803e3d6000fd5b50939695505050505050565b600080806060816001613c588783613266565b60ff1614613ca35760405162461bcd60e51b815260206004820152601860248201527713d19510dbdc994e881a5b9d985b1a59081c185e5b1bd85960421b6044820152606401610d66565b613cae86600d6140c6565b9350613cbb86602161412b565b9250613cc88660296143aa565b9450613cd586604961412b565b9050613cf16051808851613ce99190614e31565b88919061295a565b915091939590929450565b6000602282511015613d505760405162461bcd60e51b815260206004820152601c60248201527f4c7a4170703a20696e76616c69642061646170746572506172616d73000000006044820152606401610d66565b506022015190565b6001600160a01b03831660009081526010602052604090205460ff168015613d805750505050565b60408051602081019091526007546000918291819061010090046001600160a01b03166341976e097f00000000000000000000000000000000000000000000000000000000000000006040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015613e0d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613e319190614e02565b90529050613e3f818561251d565b61ffff86166000908152600b6020908152604080832054600a835281842054600884528285205460099094529190932054939550429390919081871115613ec85760405162461bcd60e51b815260206004820152601f60248201527f53696e676c65205472616e73616374696f6e204c696d697420457863656564006044820152606401610d66565b62015180613ed68587614e31565b1115613efa5761ffff8a166000908152600b60205260409020859055869250613f07565b613f048784614e44565b92505b80831115613f575760405162461bcd60e51b815260206004820152601e60248201527f4461696c79205472616e73616374696f6e204c696d69742045786365656400006044820152606401610d66565b505061ffff9097166000908152600a602052604090209690965550505050505050565b61ffff821660009081526003602052604081205490819003613f9b57506127105b808211156126de5760405162461bcd60e51b815260206004820181905260248201527f4c7a4170703a207061796c6f61642073697a6520697320746f6f206c617267656044820152606401610d66565b60608247101561404c5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610d66565b600080866001600160a01b031685876040516140689190614ee4565b60006040518083038185875af1925050503d80600081146140a5576040519150601f19603f3d011682016040523d82523d6000602084013e6140aa565b606091505b50915091506140bb87838387614408565b979650505050505050565b60006140d3826014614e44565b8351101561411b5760405162461bcd60e51b8152602060048201526015602482015274746f416464726573735f6f75744f66426f756e647360581b6044820152606401610d66565b500160200151600160601b900490565b6000614138826008614e44565b8351101561417f5760405162461bcd60e51b8152602060048201526014602482015273746f55696e7436345f6f75744f66426f756e647360601b6044820152606401610d66565b50016008015190565b6001600160a01b03831660009081526010602052604090205460ff1680156141b05750505050565b60408051602081019091526007546000918291819061010090046001600160a01b03166341976e097f00000000000000000000000000000000000000000000000000000000000000006040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa15801561423d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906142619190614e02565b9052905061426f818561251d565b61ffff86166000908152600f6020908152604080832054600e835281842054600c845282852054600d90945291909320549395504293909190818711156142f85760405162461bcd60e51b815260206004820152601f60248201527f53696e676c65205472616e73616374696f6e204c696d697420457863656564006044820152606401610d66565b620151806143068587614e31565b111561432a5761ffff8a166000908152600f60205260409020859055869250614337565b6143348784614e44565b92505b808311156143875760405162461bcd60e51b815260206004820152601e60248201527f4461696c79205472616e73616374696f6e204c696d69742045786365656400006044820152606401610d66565b505061ffff9097166000908152600e602052604090209690965550505050505050565b60006143b7826020614e44565b835110156143ff5760405162461bcd60e51b8152602060048201526015602482015274746f427974657333325f6f75744f66426f756e647360581b6044820152606401610d66565b50016020015190565b60608315614477578251600003614470576001600160a01b0385163b6144705760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610d66565b508161243c565b61243c838381511561448c5781518083602001fd5b8060405162461bcd60e51b8152600401610d669190614a05565b5080546144b290614d78565b6000825580601f106144c2575050565b601f01602090049060005260206000209081019061238e91905b808211156144f057600081556001016144dc565b5090565b803561ffff8116811461450657600080fd5b919050565b60008083601f84011261451d57600080fd5b5081356001600160401b0381111561453457600080fd5b60208301915083602082850101111561454c57600080fd5b9250929050565b80356001600160401b038116811461450657600080fd5b6000806000806000806080878903121561458357600080fd5b61458c876144f4565b955060208701356001600160401b03808211156145a857600080fd5b6145b48a838b0161450b565b90975095508591506145c860408a01614553565b945060608901359150808211156145de57600080fd5b506145eb89828a0161450b565b979a9699509497509295939492505050565b60006020828403121561460f57600080fd5b81356001600160e01b031981168114611d3b57600080fd5b60006020828403121561463957600080fd5b611d3b826144f4565b6000806040838503121561465557600080fd5b61465e836144f4565b946020939093013593505050565b6001600160a01b038116811461238e57600080fd5b60008060006060848603121561469657600080fd5b83356146a18161466c565b92506146af602085016144f4565b9150604084013590509250925092565b801515811461238e57600080fd5b60008060008060008060a087890312156146e657600080fd5b6146ef876144f4565b95506020870135945060408701359350606087013561470d816146bf565b925060808701356001600160401b0381111561472857600080fd5b6145eb89828a0161450b565b60008060006040848603121561474957600080fd5b614752846144f4565b925060208401356001600160401b0381111561476d57600080fd5b6147798682870161450b565b9497909650939450505050565b60006020828403121561479857600080fd5b8135611d3b816146bf565b600080604083850312156147b657600080fd5b82356147c18161466c565b915060208301356147d1816146bf565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171561481a5761481a6147dc565b604052919050565b60006001600160401b0382111561483b5761483b6147dc565b50601f01601f191660200190565b60008060006060848603121561485e57600080fd5b614867846144f4565b925060208401356001600160401b0381111561488257600080fd5b8401601f8101861361489357600080fd5b80356148a66148a182614822565b6147f2565b8181528760208385010111156148bb57600080fd5b816020840160208301376000602083830101528094505050506148e060408501614553565b90509250925092565b6000806000606084860312156148fe57600080fd5b83356149098161466c565b925060208401356149198161466c565b929592945050506040919091013590565b60006060828403121561493c57600080fd5b50919050565b600080600080600060a0868803121561495a57600080fd5b85356149658161466c565b9450614973602087016144f4565b9350604086013592506060860135915060808601356001600160401b0381111561499c57600080fd5b6149a88882890161492a565b9150509295509295909350565b60005b838110156149d05781810151838201526020016149b8565b50506000910152565b600081518084526149f18160208601602086016149b5565b601f01601f19169290920160200192915050565b602081526000611d3b60208301846149d9565b60008060008060008060008060e0898b031215614a3457600080fd5b8835614a3f8161466c565b9750614a4d60208a016144f4565b9650604089013595506060890135945060808901356001600160401b0380821115614a7757600080fd5b614a838c838d0161450b565b9096509450849150614a9760a08c01614553565b935060c08b0135915080821115614aad57600080fd5b50614aba8b828c0161492a565b9150509295985092959890939650565b600060208284031215614adc57600080fd5b8135611d3b8161466c565b60008060408385031215614afa57600080fd5b614b03836144f4565b9150614b11602084016144f4565b90509250929050565b600080600080600080600080600060e08a8c031215614b3857600080fd5b614b418a6144f4565b985060208a0135975060408a0135965060608a01356001600160401b0380821115614b6b57600080fd5b614b778d838e0161450b565b9098509650869150614b8b60808d01614553565b955060a08c01359150614b9d826146bf565b90935060c08b01359080821115614bb357600080fd5b50614bc08c828d0161450b565b915080935050809150509295985092959850929598565b600080600080600060808688031215614bef57600080fd5b614bf8866144f4565b9450614c06602087016144f4565b93506040860135925060608601356001600160401b03811115614c2857600080fd5b614c348882890161450b565b969995985093965092949392505050565b600080600060608486031215614c5a57600080fd5b6146a1846144f4565b6000806000806000806000806000806101008b8d031215614c8357600080fd5b614c8c8b6144f4565b995060208b01356001600160401b0380821115614ca857600080fd5b614cb48e838f0161450b565b909b509950899150614cc860408e01614553565b985060608d0135975060808d01359150614ce18261466c565b90955060a08c0135945060c08c01359080821115614cfe57600080fd5b50614d0b8d828e0161450b565b9150809450508092505060e08b013590509295989b9194979a5092959850565b60008060008060808587031215614d4157600080fd5b614d4a856144f4565b9350614d58602086016144f4565b92506040850135614d688161466c565b9396929550929360600135925050565b600181811c90821680614d8c57607f821691505b60208210810361493c57634e487b7160e01b600052602260045260246000fd5b8183823760009101908152919050565b60208082526026908201527f4c7a4170703a20696e76616c696420736f757263652073656e64696e6720636f6040820152651b9d1c9858dd60d21b606082015260800190565b600060208284031215614e1457600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b81810381811115610f1557610f15614e1b565b80820180821115610f1557610f15614e1b565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b61ffff84168152604060208201526000612439604083018486614e57565b6000808335601e19843603018112614eb557600080fd5b8301803591506001600160401b03821115614ecf57600080fd5b60200191503681900382131561454c57600080fd5b60008251614ef68184602087016149b5565b9190910192915050565b8284823760609190911b6bffffffffffffffffffffffff19169101908152601401919050565b601f8211156126de576000816000526020600020601f850160051c81016020861015614f4f5750805b601f850160051c820191505b8181101561180957828155600101614f5b565b81516001600160401b03811115614f8757614f876147dc565b614f9b81614f958454614d78565b84614f26565b602080601f831160018114614fd05760008415614fb85750858301515b600019600386901b1c1916600185901b178555611809565b600085815260208120601f198616915b82811015614fff57888601518255948401946001909101908401614fe0565b508582101561501d5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600061ffff8088168352808716602084015250846040830152608060608301526140bb608083018486614e57565b61ffff8916815260c06020820152600061507960c08301898b614e57565b6001600160401b038816604084015286606084015285608084015282810360a08401526150a7818587614e57565b9b9a5050505050505050505050565b6001600160401b038311156150cd576150cd6147dc565b6150e1836150db8354614d78565b83614f26565b6000601f84116001811461511557600085156150fd5750838201355b600019600387901b1c1916600186901b178355610f9d565b600083815260209020601f19861690835b828110156151465786850135825560209485019460019092019101615126565b50868210156151635760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b60006020828403121561518757600080fd5b81516001600160401b0381111561519d57600080fd5b8201601f810184136151ae57600080fd5b80516151bc6148a182614822565b8181528560208385010111156151d157600080fd5b612ef08260208301602086016149b5565b61ffff851681526080602082015260006151ff60808301866149d9565b6001600160401b038516604084015282810360608401526140bb81856149d9565b61ffff861681526001600160a01b038516602082015260a06040820181905260009061524e908301866149d9565b8415156060840152828103608084015261526881856149d9565b98975050505050505050565b6000806040838503121561528757600080fd5b505080516020909101519092909150565b61ffff861681526080602082015260006152b6608083018688614e57565b6001600160401b0394909416604083015250606001529392505050565b61ffff8616815260a0602082015260006152f060a08301876149d9565b6001600160401b0386166040840152828103606084015261531181866149d9565b9050828103608084015261526881856149d9565b634e487b7160e01b600052601260045260246000fd5b60008261534a5761534a615325565b500490565b60006020828403121561536157600080fd5b8151611d3b816146bf565b600061010061ffff8b16835280602084015261538a8184018b6149d9565b6001600160401b038a166040850152606084018990526001600160a01b038816608085015260a0840187905283810360c085015290506153ca81866149d9565b9150508260e08301529998505050505050505050565b6060815260006153f360608301866149d9565b6001600160401b039490941660208301525060400152919050565b60008261541d5761541d615325565b500690565b61ffff8716815260c06020820152600061543f60c08301886149d9565b828103604084015261545181886149d9565b6001600160a01b0387811660608601528616608085015283810360a0850152905061547c81856149d9565b9998505050505050505050565b60ff60f81b8760f81b16815285600182015260006001600160401b0360c01b808760c01b166021840152856029840152808560c01b1660498401525082516154d88160518501602087016149b5565b91909101605101979650505050505050565b8082028115828204841417610f1557610f15614e1b56fea264697066735822122078a20abcb22d7cb1fa2db0ea891c1e652ab0382a5180ce86b54f25c83dc77a1264736f6c63430008190033", "devdoc": { "author": "Venus", + "events": { + "Paused(address)": { + "details": "Emitted when the pause is triggered by `account`." + }, + "ReceiveFromChain(uint16,address,uint256)": { + "details": "Emitted when `_amount` tokens are received from `_srcChainId` into the `_toAddress` on the local chain. `_nonce` is the inbound nonce." + }, + "SendToChain(uint16,address,bytes32,uint256)": { + "details": "Emitted when `_amount` tokens are moved from the `_sender` to (`_dstChainId`, `_toAddress`) `_nonce` is the outbound nonce" + }, + "Unpaused(address)": { + "details": "Emitted when the pause is lifted by `account`." + } + }, "kind": "dev", "methods": { "circulatingSupply()": { @@ -2245,7 +2259,7 @@ "storageLayout": { "storage": [ { - "astId": 5506, + "astId": 3647, "contract": "contracts/Bridge/XVSProxyOFTDest.sol:XVSProxyOFTDest", "label": "_paused", "offset": 0, @@ -2253,7 +2267,7 @@ "type": "t_bool" }, { - "astId": 5383, + "astId": 3524, "contract": "contracts/Bridge/XVSProxyOFTDest.sol:XVSProxyOFTDest", "label": "_owner", "offset": 1, @@ -2301,7 +2315,7 @@ "type": "t_mapping(t_uint16,t_mapping(t_bytes_memory_ptr,t_mapping(t_uint64,t_bytes32)))" }, { - "astId": 3161, + "astId": 1618, "contract": "contracts/Bridge/XVSProxyOFTDest.sol:XVSProxyOFTDest", "label": "creditedPackets", "offset": 0, @@ -2309,7 +2323,7 @@ "type": "t_mapping(t_uint16,t_mapping(t_bytes_memory_ptr,t_mapping(t_uint64,t_bool)))" }, { - "astId": 9369, + "astId": 5541, "contract": "contracts/Bridge/XVSProxyOFTDest.sol:XVSProxyOFTDest", "label": "sendAndCallEnabled", "offset": 0, @@ -2317,15 +2331,15 @@ "type": "t_bool" }, { - "astId": 9373, + "astId": 5545, "contract": "contracts/Bridge/XVSProxyOFTDest.sol:XVSProxyOFTDest", "label": "oracle", "offset": 1, "slot": "7", - "type": "t_contract(ResilientOracleInterface)8694" + "type": "t_contract(ResilientOracleInterface)4844" }, { - "astId": 9378, + "astId": 5550, "contract": "contracts/Bridge/XVSProxyOFTDest.sol:XVSProxyOFTDest", "label": "chainIdToMaxSingleTransactionLimit", "offset": 0, @@ -2333,7 +2347,7 @@ "type": "t_mapping(t_uint16,t_uint256)" }, { - "astId": 9383, + "astId": 5555, "contract": "contracts/Bridge/XVSProxyOFTDest.sol:XVSProxyOFTDest", "label": "chainIdToMaxDailyLimit", "offset": 0, @@ -2341,7 +2355,7 @@ "type": "t_mapping(t_uint16,t_uint256)" }, { - "astId": 9388, + "astId": 5560, "contract": "contracts/Bridge/XVSProxyOFTDest.sol:XVSProxyOFTDest", "label": "chainIdToLast24HourTransferred", "offset": 0, @@ -2349,7 +2363,7 @@ "type": "t_mapping(t_uint16,t_uint256)" }, { - "astId": 9393, + "astId": 5565, "contract": "contracts/Bridge/XVSProxyOFTDest.sol:XVSProxyOFTDest", "label": "chainIdToLast24HourWindowStart", "offset": 0, @@ -2357,7 +2371,7 @@ "type": "t_mapping(t_uint16,t_uint256)" }, { - "astId": 9398, + "astId": 5570, "contract": "contracts/Bridge/XVSProxyOFTDest.sol:XVSProxyOFTDest", "label": "chainIdToMaxSingleReceiveTransactionLimit", "offset": 0, @@ -2365,7 +2379,7 @@ "type": "t_mapping(t_uint16,t_uint256)" }, { - "astId": 9403, + "astId": 5575, "contract": "contracts/Bridge/XVSProxyOFTDest.sol:XVSProxyOFTDest", "label": "chainIdToMaxDailyReceiveLimit", "offset": 0, @@ -2373,7 +2387,7 @@ "type": "t_mapping(t_uint16,t_uint256)" }, { - "astId": 9408, + "astId": 5580, "contract": "contracts/Bridge/XVSProxyOFTDest.sol:XVSProxyOFTDest", "label": "chainIdToLast24HourReceived", "offset": 0, @@ -2381,7 +2395,7 @@ "type": "t_mapping(t_uint16,t_uint256)" }, { - "astId": 9413, + "astId": 5585, "contract": "contracts/Bridge/XVSProxyOFTDest.sol:XVSProxyOFTDest", "label": "chainIdToLast24HourReceiveWindowStart", "offset": 0, @@ -2389,7 +2403,7 @@ "type": "t_mapping(t_uint16,t_uint256)" }, { - "astId": 9418, + "astId": 5590, "contract": "contracts/Bridge/XVSProxyOFTDest.sol:XVSProxyOFTDest", "label": "whitelist", "offset": 0, @@ -2423,7 +2437,7 @@ "label": "bytes", "numberOfBytes": "32" }, - "t_contract(ResilientOracleInterface)8694": { + "t_contract(ResilientOracleInterface)4844": { "encoding": "inplace", "label": "contract ResilientOracleInterface", "numberOfBytes": "20" diff --git a/deployments/arbitrumsepolia/solcInputs/15770bc3af16acbd95d8914f14cae6d7.json b/deployments/arbitrumsepolia/solcInputs/15770bc3af16acbd95d8914f14cae6d7.json new file mode 100644 index 0000000..04f14e3 --- /dev/null +++ b/deployments/arbitrumsepolia/solcInputs/15770bc3af16acbd95d8914f14cae6d7.json @@ -0,0 +1,151 @@ +{ + "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/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/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 // try-catch all errors/exceptions\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" + }, + "@layerzerolabs/solidity-examples/contracts/token/oft/v2/BaseOFTV2.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./OFTCoreV2.sol\";\nimport \"./interfaces/IOFTV2.sol\";\nimport \"@openzeppelin/contracts/utils/introspection/ERC165.sol\";\n\nabstract contract BaseOFTV2 is OFTCoreV2, ERC165, IOFTV2 {\n constructor(uint8 _sharedDecimals, address _lzEndpoint) OFTCoreV2(_sharedDecimals, _lzEndpoint) {}\n\n /************************************************************************\n * public functions\n ************************************************************************/\n function sendFrom(\n address _from,\n uint16 _dstChainId,\n bytes32 _toAddress,\n uint _amount,\n LzCallParams calldata _callParams\n ) public payable virtual override {\n _send(_from, _dstChainId, _toAddress, _amount, _callParams.refundAddress, _callParams.zroPaymentAddress, _callParams.adapterParams);\n }\n\n function sendAndCall(\n address _from,\n uint16 _dstChainId,\n bytes32 _toAddress,\n uint _amount,\n bytes calldata _payload,\n uint64 _dstGasForCall,\n LzCallParams calldata _callParams\n ) public payable virtual override {\n _sendAndCall(\n _from,\n _dstChainId,\n _toAddress,\n _amount,\n _payload,\n _dstGasForCall,\n _callParams.refundAddress,\n _callParams.zroPaymentAddress,\n _callParams.adapterParams\n );\n }\n\n /************************************************************************\n * public view functions\n ************************************************************************/\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\n return interfaceId == type(IOFTV2).interfaceId || super.supportsInterface(interfaceId);\n }\n\n function estimateSendFee(\n uint16 _dstChainId,\n bytes32 _toAddress,\n uint _amount,\n bool _useZro,\n bytes calldata _adapterParams\n ) public view virtual override returns (uint nativeFee, uint zroFee) {\n return _estimateSendFee(_dstChainId, _toAddress, _amount, _useZro, _adapterParams);\n }\n\n function estimateSendAndCallFee(\n uint16 _dstChainId,\n bytes32 _toAddress,\n uint _amount,\n bytes calldata _payload,\n uint64 _dstGasForCall,\n bool _useZro,\n bytes calldata _adapterParams\n ) public view virtual override returns (uint nativeFee, uint zroFee) {\n return _estimateSendAndCallFee(_dstChainId, _toAddress, _amount, _payload, _dstGasForCall, _useZro, _adapterParams);\n }\n\n function circulatingSupply() public view virtual override returns (uint);\n\n function token() public view virtual override returns (address);\n}\n" + }, + "@layerzerolabs/solidity-examples/contracts/token/oft/v2/interfaces/ICommonOFT.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.5.0;\n\nimport \"@openzeppelin/contracts/utils/introspection/IERC165.sol\";\n\n/**\n * @dev Interface of the IOFT core standard\n */\ninterface ICommonOFT is IERC165 {\n\n struct LzCallParams {\n address payable refundAddress;\n address zroPaymentAddress;\n bytes adapterParams;\n }\n\n /**\n * @dev estimate send token `_tokenId` to (`_dstChainId`, `_toAddress`)\n * _dstChainId - L0 defined chain id to send tokens too\n * _toAddress - dynamic bytes array which contains the address to whom you are sending tokens to on the dstChain\n * _amount - amount of the tokens to transfer\n * _useZro - indicates to use zro to pay L0 fees\n * _adapterParam - flexible bytes array to indicate messaging adapter services in L0\n */\n function estimateSendFee(uint16 _dstChainId, bytes32 _toAddress, uint _amount, bool _useZro, bytes calldata _adapterParams) external view returns (uint nativeFee, uint zroFee);\n\n function estimateSendAndCallFee(uint16 _dstChainId, bytes32 _toAddress, uint _amount, bytes calldata _payload, uint64 _dstGasForCall, bool _useZro, bytes calldata _adapterParams) external view returns (uint nativeFee, uint zroFee);\n\n /**\n * @dev returns the circulating amount of tokens on current chain\n */\n function circulatingSupply() external view returns (uint);\n\n /**\n * @dev returns the address of the ERC20 token\n */\n function token() external view returns (address);\n}\n" + }, + "@layerzerolabs/solidity-examples/contracts/token/oft/v2/interfaces/IOFTReceiverV2.sol": { + "content": "// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity >=0.5.0;\n\ninterface IOFTReceiverV2 {\n /**\n * @dev Called by the OFT contract when tokens are received from source chain.\n * @param _srcChainId The chain id of the source chain.\n * @param _srcAddress The address of the OFT token contract on the source chain.\n * @param _nonce The nonce of the transaction on the source chain.\n * @param _from The address of the account who calls the sendAndCall() on the source chain.\n * @param _amount The amount of tokens to transfer.\n * @param _payload Additional data with no specified format.\n */\n function onOFTReceived(uint16 _srcChainId, bytes calldata _srcAddress, uint64 _nonce, bytes32 _from, uint _amount, bytes calldata _payload) external;\n}\n" + }, + "@layerzerolabs/solidity-examples/contracts/token/oft/v2/interfaces/IOFTV2.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.5.0;\n\nimport \"./ICommonOFT.sol\";\n\n/**\n * @dev Interface of the IOFT core standard\n */\ninterface IOFTV2 is ICommonOFT {\n\n /**\n * @dev send `_amount` amount of token to (`_dstChainId`, `_toAddress`) from `_from`\n * `_from` the owner of token\n * `_dstChainId` the destination chain identifier\n * `_toAddress` can be any size depending on the `dstChainId`.\n * `_amount` the quantity of tokens in wei\n * `_refundAddress` the address LayerZero refunds if too much message fee is sent\n * `_zroPaymentAddress` set to address(0x0) if not paying in ZRO (LayerZero Token)\n * `_adapterParams` is a flexible bytes array to indicate messaging adapter services\n */\n function sendFrom(address _from, uint16 _dstChainId, bytes32 _toAddress, uint _amount, LzCallParams calldata _callParams) external payable;\n\n function sendAndCall(address _from, uint16 _dstChainId, bytes32 _toAddress, uint _amount, bytes calldata _payload, uint64 _dstGasForCall, LzCallParams calldata _callParams) external payable;\n}\n" + }, + "@layerzerolabs/solidity-examples/contracts/token/oft/v2/OFTCoreV2.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../../../lzApp/NonblockingLzApp.sol\";\nimport \"../../../libraries/ExcessivelySafeCall.sol\";\nimport \"./interfaces/ICommonOFT.sol\";\nimport \"./interfaces/IOFTReceiverV2.sol\";\n\nabstract contract OFTCoreV2 is NonblockingLzApp {\n using BytesLib for bytes;\n using ExcessivelySafeCall for address;\n\n uint public constant NO_EXTRA_GAS = 0;\n\n // packet type\n uint8 public constant PT_SEND = 0;\n uint8 public constant PT_SEND_AND_CALL = 1;\n\n uint8 public immutable sharedDecimals;\n\n mapping(uint16 => mapping(bytes => mapping(uint64 => bool))) public creditedPackets;\n\n /**\n * @dev Emitted when `_amount` tokens are moved from the `_sender` to (`_dstChainId`, `_toAddress`)\n * `_nonce` is the outbound nonce\n */\n event SendToChain(uint16 indexed _dstChainId, address indexed _from, bytes32 indexed _toAddress, uint _amount);\n\n /**\n * @dev Emitted when `_amount` tokens are received from `_srcChainId` into the `_toAddress` on the local chain.\n * `_nonce` is the inbound nonce.\n */\n event ReceiveFromChain(uint16 indexed _srcChainId, address indexed _to, uint _amount);\n\n event CallOFTReceivedSuccess(uint16 indexed _srcChainId, bytes _srcAddress, uint64 _nonce, bytes32 _hash);\n\n event NonContractAddress(address _address);\n\n // _sharedDecimals should be the minimum decimals on all chains\n constructor(uint8 _sharedDecimals, address _lzEndpoint) NonblockingLzApp(_lzEndpoint) {\n sharedDecimals = _sharedDecimals;\n }\n\n /************************************************************************\n * public functions\n ************************************************************************/\n function callOnOFTReceived(\n uint16 _srcChainId,\n bytes calldata _srcAddress,\n uint64 _nonce,\n bytes32 _from,\n address _to,\n uint _amount,\n bytes calldata _payload,\n uint _gasForCall\n ) public virtual {\n require(_msgSender() == address(this), \"OFTCore: caller must be OFTCore\");\n\n // send\n _amount = _transferFrom(address(this), _to, _amount);\n emit ReceiveFromChain(_srcChainId, _to, _amount);\n\n // call\n IOFTReceiverV2(_to).onOFTReceived{gas: _gasForCall}(_srcChainId, _srcAddress, _nonce, _from, _amount, _payload);\n }\n\n /************************************************************************\n * internal functions\n ************************************************************************/\n function _estimateSendFee(\n uint16 _dstChainId,\n bytes32 _toAddress,\n uint _amount,\n bool _useZro,\n bytes memory _adapterParams\n ) internal view virtual returns (uint nativeFee, uint zroFee) {\n // mock the payload for sendFrom()\n bytes memory payload = _encodeSendPayload(_toAddress, _ld2sd(_amount));\n return lzEndpoint.estimateFees(_dstChainId, address(this), payload, _useZro, _adapterParams);\n }\n\n function _estimateSendAndCallFee(\n uint16 _dstChainId,\n bytes32 _toAddress,\n uint _amount,\n bytes memory _payload,\n uint64 _dstGasForCall,\n bool _useZro,\n bytes memory _adapterParams\n ) internal view virtual returns (uint nativeFee, uint zroFee) {\n // mock the payload for sendAndCall()\n bytes memory payload = _encodeSendAndCallPayload(msg.sender, _toAddress, _ld2sd(_amount), _payload, _dstGasForCall);\n return lzEndpoint.estimateFees(_dstChainId, address(this), payload, _useZro, _adapterParams);\n }\n\n function _nonblockingLzReceive(\n uint16 _srcChainId,\n bytes memory _srcAddress,\n uint64 _nonce,\n bytes memory _payload\n ) internal virtual override {\n uint8 packetType = _payload.toUint8(0);\n\n if (packetType == PT_SEND) {\n _sendAck(_srcChainId, _srcAddress, _nonce, _payload);\n } else if (packetType == PT_SEND_AND_CALL) {\n _sendAndCallAck(_srcChainId, _srcAddress, _nonce, _payload);\n } else {\n revert(\"OFTCore: unknown packet type\");\n }\n }\n\n function _send(\n address _from,\n uint16 _dstChainId,\n bytes32 _toAddress,\n uint _amount,\n address payable _refundAddress,\n address _zroPaymentAddress,\n bytes memory _adapterParams\n ) internal virtual returns (uint amount) {\n _checkGasLimit(_dstChainId, PT_SEND, _adapterParams, NO_EXTRA_GAS);\n\n (amount, ) = _removeDust(_amount);\n amount = _debitFrom(_from, _dstChainId, _toAddress, amount); // amount returned should not have dust\n require(amount > 0, \"OFTCore: amount too small\");\n\n bytes memory lzPayload = _encodeSendPayload(_toAddress, _ld2sd(amount));\n _lzSend(_dstChainId, lzPayload, _refundAddress, _zroPaymentAddress, _adapterParams, msg.value);\n\n emit SendToChain(_dstChainId, _from, _toAddress, amount);\n }\n\n function _sendAck(\n uint16 _srcChainId,\n bytes memory,\n uint64,\n bytes memory _payload\n ) internal virtual {\n (address to, uint64 amountSD) = _decodeSendPayload(_payload);\n if (to == address(0)) {\n to = address(0xdead);\n }\n\n uint amount = _sd2ld(amountSD);\n amount = _creditTo(_srcChainId, to, amount);\n\n emit ReceiveFromChain(_srcChainId, to, amount);\n }\n\n function _sendAndCall(\n address _from,\n uint16 _dstChainId,\n bytes32 _toAddress,\n uint _amount,\n bytes memory _payload,\n uint64 _dstGasForCall,\n address payable _refundAddress,\n address _zroPaymentAddress,\n bytes memory _adapterParams\n ) internal virtual returns (uint amount) {\n _checkGasLimit(_dstChainId, PT_SEND_AND_CALL, _adapterParams, _dstGasForCall);\n\n (amount, ) = _removeDust(_amount);\n amount = _debitFrom(_from, _dstChainId, _toAddress, amount);\n require(amount > 0, \"OFTCore: amount too small\");\n\n // encode the msg.sender into the payload instead of _from\n bytes memory lzPayload = _encodeSendAndCallPayload(msg.sender, _toAddress, _ld2sd(amount), _payload, _dstGasForCall);\n _lzSend(_dstChainId, lzPayload, _refundAddress, _zroPaymentAddress, _adapterParams, msg.value);\n\n emit SendToChain(_dstChainId, _from, _toAddress, amount);\n }\n\n function _sendAndCallAck(\n uint16 _srcChainId,\n bytes memory _srcAddress,\n uint64 _nonce,\n bytes memory _payload\n ) internal virtual {\n (bytes32 from, address to, uint64 amountSD, bytes memory payloadForCall, uint64 gasForCall) = _decodeSendAndCallPayload(_payload);\n\n bool credited = creditedPackets[_srcChainId][_srcAddress][_nonce];\n uint amount = _sd2ld(amountSD);\n\n // credit to this contract first, and then transfer to receiver only if callOnOFTReceived() succeeds\n if (!credited) {\n amount = _creditTo(_srcChainId, address(this), amount);\n creditedPackets[_srcChainId][_srcAddress][_nonce] = true;\n }\n\n if (!_isContract(to)) {\n emit NonContractAddress(to);\n return;\n }\n\n // workaround for stack too deep\n uint16 srcChainId = _srcChainId;\n bytes memory srcAddress = _srcAddress;\n uint64 nonce = _nonce;\n bytes memory payload = _payload;\n bytes32 from_ = from;\n address to_ = to;\n uint amount_ = amount;\n bytes memory payloadForCall_ = payloadForCall;\n\n // no gas limit for the call if retry\n uint gas = credited ? gasleft() : gasForCall;\n (bool success, bytes memory reason) = address(this).excessivelySafeCall(\n gasleft(),\n 150,\n abi.encodeWithSelector(this.callOnOFTReceived.selector, srcChainId, srcAddress, nonce, from_, to_, amount_, payloadForCall_, gas)\n );\n\n if (success) {\n bytes32 hash = keccak256(payload);\n emit CallOFTReceivedSuccess(srcChainId, srcAddress, nonce, hash);\n } else {\n // store the failed message into the nonblockingLzApp\n _storeFailedMessage(srcChainId, srcAddress, nonce, payload, reason);\n }\n }\n\n function _isContract(address _account) internal view returns (bool) {\n return _account.code.length > 0;\n }\n\n function _ld2sd(uint _amount) internal view virtual returns (uint64) {\n uint amountSD = _amount / _ld2sdRate();\n require(amountSD <= type(uint64).max, \"OFTCore: amountSD overflow\");\n return uint64(amountSD);\n }\n\n function _sd2ld(uint64 _amountSD) internal view virtual returns (uint) {\n return _amountSD * _ld2sdRate();\n }\n\n function _removeDust(uint _amount) internal view virtual returns (uint amountAfter, uint dust) {\n dust = _amount % _ld2sdRate();\n amountAfter = _amount - dust;\n }\n\n function _encodeSendPayload(bytes32 _toAddress, uint64 _amountSD) internal view virtual returns (bytes memory) {\n return abi.encodePacked(PT_SEND, _toAddress, _amountSD);\n }\n\n function _decodeSendPayload(bytes memory _payload) internal view virtual returns (address to, uint64 amountSD) {\n require(_payload.toUint8(0) == PT_SEND && _payload.length == 41, \"OFTCore: invalid payload\");\n\n to = _payload.toAddress(13); // drop the first 12 bytes of bytes32\n amountSD = _payload.toUint64(33);\n }\n\n function _encodeSendAndCallPayload(\n address _from,\n bytes32 _toAddress,\n uint64 _amountSD,\n bytes memory _payload,\n uint64 _dstGasForCall\n ) internal view virtual returns (bytes memory) {\n return abi.encodePacked(PT_SEND_AND_CALL, _toAddress, _amountSD, _addressToBytes32(_from), _dstGasForCall, _payload);\n }\n\n function _decodeSendAndCallPayload(bytes memory _payload)\n internal\n view\n virtual\n returns (\n bytes32 from,\n address to,\n uint64 amountSD,\n bytes memory payload,\n uint64 dstGasForCall\n )\n {\n require(_payload.toUint8(0) == PT_SEND_AND_CALL, \"OFTCore: invalid payload\");\n\n to = _payload.toAddress(13); // drop the first 12 bytes of bytes32\n amountSD = _payload.toUint64(33);\n from = _payload.toBytes32(41);\n dstGasForCall = _payload.toUint64(73);\n payload = _payload.slice(81, _payload.length - 81);\n }\n\n function _addressToBytes32(address _address) internal pure virtual returns (bytes32) {\n return bytes32(uint(uint160(_address)));\n }\n\n function _debitFrom(\n address _from,\n uint16 _dstChainId,\n bytes32 _toAddress,\n uint _amount\n ) internal virtual returns (uint);\n\n function _creditTo(\n uint16 _srcChainId,\n address _toAddress,\n uint _amount\n ) internal virtual returns (uint);\n\n function _transferFrom(\n address _from,\n address _to,\n uint _amount\n ) internal virtual returns (uint);\n\n function _ld2sdRate() internal view virtual returns (uint);\n}\n" + }, + "@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.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() public virtual {\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.9.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. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby disabling 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.9.0) (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 * ```solidity\n * contract MyToken is ERC20Upgradeable {\n * function initialize() initializer public {\n * __ERC20_init(\"MyToken\", \"MTK\");\n * }\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.9.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 * Furthermore, `isContract` will also return true if the target contract within\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\n * which only has an effect at the end of a transaction.\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://consensys.net/diligence/blog/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.8.0/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(address target, bytes memory data, uint256 value) 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 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 (bool success, bytes memory returndata) = target.delegatecall(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/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.9.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. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby disabling 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/token/ERC20/extensions/IERC20Permit.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/IERC20Permit.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\n *\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\n * need to send a transaction, and thus is not required to hold Ether at all.\n */\ninterface IERC20Permit {\n /**\n * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\n * given ``owner``'s signed approval.\n *\n * IMPORTANT: The same issues {IERC20-approve} has related to transaction\n * ordering also apply here.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `deadline` must be a timestamp in the future.\n * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\n * over the EIP712-formatted function arguments.\n * - the signature must use ``owner``'s current nonce (see {nonces}).\n *\n * For more information on the signature format, see the\n * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\n * section].\n */\n function permit(\n address owner,\n address spender,\n uint256 value,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external;\n\n /**\n * @dev Returns the current nonce for `owner`. This value must be\n * included whenever a signature is generated for {permit}.\n *\n * Every successful call to {permit} increases ``owner``'s nonce by one. This\n * prevents a signature from being used multiple times.\n */\n function nonces(address owner) external view returns (uint256);\n\n /**\n * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\n */\n // solhint-disable-next-line func-name-mixedcase\n function DOMAIN_SEPARATOR() external view returns (bytes32);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/IERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `to`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address to, uint256 amount) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `from` to `to` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20.sol\";\nimport \"../extensions/IERC20Permit.sol\";\nimport \"../../../utils/Address.sol\";\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\n * contract returns false). Tokens that return no value (and instead revert or\n * throw on failure) are also supported, non-reverting calls are assumed to be\n * successful.\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeERC20 {\n using Address for address;\n\n /**\n * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,\n * non-reverting calls are assumed to be successful.\n */\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\n }\n\n /**\n * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the\n * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.\n */\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\n }\n\n /**\n * @dev Deprecated. This function has issues similar to the ones found in\n * {IERC20-approve}, and its usage is discouraged.\n *\n * Whenever possible, use {safeIncreaseAllowance} and\n * {safeDecreaseAllowance} instead.\n */\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\n // safeApprove should only be called when setting an initial allowance,\n // or when resetting it to zero. To increase and decrease it, use\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\n require(\n (value == 0) || (token.allowance(address(this), spender) == 0),\n \"SafeERC20: approve from non-zero to non-zero allowance\"\n );\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\n }\n\n /**\n * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\n * non-reverting calls are assumed to be successful.\n */\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n uint256 oldAllowance = token.allowance(address(this), spender);\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));\n }\n\n /**\n * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\n * non-reverting calls are assumed to be successful.\n */\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n unchecked {\n uint256 oldAllowance = token.allowance(address(this), spender);\n require(oldAllowance >= value, \"SafeERC20: decreased allowance below zero\");\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));\n }\n }\n\n /**\n * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,\n * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval\n * to be set to zero before setting it to a non-zero value, such as USDT.\n */\n function forceApprove(IERC20 token, address spender, uint256 value) internal {\n bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);\n\n if (!_callOptionalReturnBool(token, approvalCall)) {\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));\n _callOptionalReturn(token, approvalCall);\n }\n }\n\n /**\n * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.\n * Revert on invalid signature.\n */\n function safePermit(\n IERC20Permit token,\n address owner,\n address spender,\n uint256 value,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal {\n uint256 nonceBefore = token.nonces(owner);\n token.permit(owner, spender, value, deadline, v, r, s);\n uint256 nonceAfter = token.nonces(owner);\n require(nonceAfter == nonceBefore + 1, \"SafeERC20: permit did not succeed\");\n }\n\n /**\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n * on the return value: the return value is optional (but if data is returned, it must not be false).\n * @param token The token targeted by the call.\n * @param data The call data (encoded using abi.encode or one of its variants).\n */\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\n // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that\n // the target address contains contract code and also asserts for success in the low-level call.\n\n bytes memory returndata = address(token).functionCall(data, \"SafeERC20: low-level call failed\");\n require(returndata.length == 0 || abi.decode(returndata, (bool)), \"SafeERC20: ERC20 operation did not succeed\");\n }\n\n /**\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n * on the return value: the return value is optional (but if data is returned, it must not be false).\n * @param token The token targeted by the call.\n * @param data The call data (encoded using abi.encode or one of its variants).\n *\n * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.\n */\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\n // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false\n // and not revert is the subcall reverts.\n\n (bool success, bytes memory returndata) = address(token).call(data);\n return\n success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token));\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Address.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.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 * Furthermore, `isContract` will also return true if the target contract within\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\n * which only has an effect at the end of a transaction.\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://consensys.net/diligence/blog/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.8.0/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(address target, bytes memory data, uint256 value) 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 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 (bool success, bytes memory returndata) = target.delegatecall(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/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" + }, + "@venusprotocol/governance-contracts/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" + }, + "@venusprotocol/governance-contracts/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" + }, + "@venusprotocol/oracle/contracts/interfaces/OracleInterface.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity ^0.8.25;\n\ninterface OracleInterface {\n function getPrice(address asset) external view returns (uint256);\n}\n\ninterface ResilientOracleInterface is OracleInterface {\n function updatePrice(address vToken) external;\n\n function updateAssetPrice(address asset) external;\n\n function getUnderlyingPrice(address vToken) external view returns (uint256);\n}\n\ninterface TwapInterface is OracleInterface {\n function updateTwap(address asset) external returns (uint256);\n}\n\ninterface BoundValidatorInterface {\n function validatePriceWithAnchorPrice(\n address asset,\n uint256 reporterPrice,\n uint256 anchorPrice\n ) external view returns (bool);\n}\n" + }, + "@venusprotocol/solidity-utilities/contracts/constants.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity ^0.8.25;\n\n/// @dev Base unit for computations, usually used in scaling (multiplications, divisions)\nuint256 constant EXP_SCALE = 1e18;\n\n/// @dev A unit (literal one) in EXP_SCALE, usually used in additions/subtractions\nuint256 constant MANTISSA_ONE = EXP_SCALE;\n\n/// @dev The approximate number of seconds per year\nuint256 constant SECONDS_PER_YEAR = 31_536_000;\n" + }, + "@venusprotocol/solidity-utilities/contracts/ExponentialNoError.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.25;\n\nimport { EXP_SCALE as EXP_SCALE_, MANTISSA_ONE as MANTISSA_ONE_ } from \"./constants.sol\";\n\n/**\n * @title Exponential module for storing fixed-precision decimals\n * @author Compound\n * @notice Exp is a struct which stores decimals with a fixed precision of 18 decimal places.\n * Thus, if we wanted to store the 5.1, mantissa would store 5.1e18. That is:\n * `Exp({mantissa: 5100000000000000000})`.\n */\ncontract ExponentialNoError {\n struct Exp {\n uint256 mantissa;\n }\n\n struct Double {\n uint256 mantissa;\n }\n\n uint256 internal constant EXP_SCALE = EXP_SCALE_;\n uint256 internal constant DOUBLE_SCALE = 1e36;\n uint256 internal constant HALF_EXP_SCALE = EXP_SCALE / 2;\n uint256 internal constant MANTISSA_ONE = MANTISSA_ONE_;\n\n /**\n * @dev Truncates the given exp to a whole number value.\n * For example, truncate(Exp{mantissa: 15 * EXP_SCALE}) = 15\n */\n function truncate(Exp memory exp) internal pure returns (uint256) {\n // Note: We are not using careful math here as we're performing a division that cannot fail\n return exp.mantissa / EXP_SCALE;\n }\n\n /**\n * @dev Multiply an Exp by a scalar, then truncate to return an unsigned integer.\n */\n // solhint-disable-next-line func-name-mixedcase\n function mul_ScalarTruncate(Exp memory a, uint256 scalar) internal pure returns (uint256) {\n Exp memory product = mul_(a, scalar);\n return truncate(product);\n }\n\n /**\n * @dev Multiply an Exp by a scalar, truncate, then add an to an unsigned integer, returning an unsigned integer.\n */\n // solhint-disable-next-line func-name-mixedcase\n function mul_ScalarTruncateAddUInt(Exp memory a, uint256 scalar, uint256 addend) internal pure returns (uint256) {\n Exp memory product = mul_(a, scalar);\n return add_(truncate(product), addend);\n }\n\n /**\n * @dev Checks if first Exp is less than second Exp.\n */\n function lessThanExp(Exp memory left, Exp memory right) internal pure returns (bool) {\n return left.mantissa < right.mantissa;\n }\n\n function safe224(uint256 n, string memory errorMessage) internal pure returns (uint224) {\n require(n <= type(uint224).max, errorMessage);\n return uint224(n);\n }\n\n function safe32(uint256 n, string memory errorMessage) internal pure returns (uint32) {\n require(n <= type(uint32).max, errorMessage);\n return uint32(n);\n }\n\n function add_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\n return Exp({ mantissa: add_(a.mantissa, b.mantissa) });\n }\n\n function add_(Double memory a, Double memory b) internal pure returns (Double memory) {\n return Double({ mantissa: add_(a.mantissa, b.mantissa) });\n }\n\n function add_(uint256 a, uint256 b) internal pure returns (uint256) {\n return a + b;\n }\n\n function sub_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\n return Exp({ mantissa: sub_(a.mantissa, b.mantissa) });\n }\n\n function sub_(Double memory a, Double memory b) internal pure returns (Double memory) {\n return Double({ mantissa: sub_(a.mantissa, b.mantissa) });\n }\n\n function sub_(uint256 a, uint256 b) internal pure returns (uint256) {\n return a - b;\n }\n\n function mul_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\n return Exp({ mantissa: mul_(a.mantissa, b.mantissa) / EXP_SCALE });\n }\n\n function mul_(Exp memory a, uint256 b) internal pure returns (Exp memory) {\n return Exp({ mantissa: mul_(a.mantissa, b) });\n }\n\n function mul_(uint256 a, Exp memory b) internal pure returns (uint256) {\n return mul_(a, b.mantissa) / EXP_SCALE;\n }\n\n function mul_(Double memory a, Double memory b) internal pure returns (Double memory) {\n return Double({ mantissa: mul_(a.mantissa, b.mantissa) / DOUBLE_SCALE });\n }\n\n function mul_(Double memory a, uint256 b) internal pure returns (Double memory) {\n return Double({ mantissa: mul_(a.mantissa, b) });\n }\n\n function mul_(uint256 a, Double memory b) internal pure returns (uint256) {\n return mul_(a, b.mantissa) / DOUBLE_SCALE;\n }\n\n function mul_(uint256 a, uint256 b) internal pure returns (uint256) {\n return a * b;\n }\n\n function div_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\n return Exp({ mantissa: div_(mul_(a.mantissa, EXP_SCALE), b.mantissa) });\n }\n\n function div_(Exp memory a, uint256 b) internal pure returns (Exp memory) {\n return Exp({ mantissa: div_(a.mantissa, b) });\n }\n\n function div_(uint256 a, Exp memory b) internal pure returns (uint256) {\n return div_(mul_(a, EXP_SCALE), b.mantissa);\n }\n\n function div_(Double memory a, Double memory b) internal pure returns (Double memory) {\n return Double({ mantissa: div_(mul_(a.mantissa, DOUBLE_SCALE), b.mantissa) });\n }\n\n function div_(Double memory a, uint256 b) internal pure returns (Double memory) {\n return Double({ mantissa: div_(a.mantissa, b) });\n }\n\n function div_(uint256 a, Double memory b) internal pure returns (uint256) {\n return div_(mul_(a, DOUBLE_SCALE), b.mantissa);\n }\n\n function div_(uint256 a, uint256 b) internal pure returns (uint256) {\n return a / b;\n }\n\n function fraction(uint256 a, uint256 b) internal pure returns (Double memory) {\n return Double({ mantissa: div_(mul_(a, DOUBLE_SCALE), b) });\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/Bridge/BaseXVSProxyOFT.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.25;\n\nimport { SafeERC20, IERC20 } from \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\nimport { ResilientOracleInterface } from \"@venusprotocol/oracle/contracts/interfaces/OracleInterface.sol\";\nimport { Pausable } from \"@openzeppelin/contracts/security/Pausable.sol\";\nimport { BaseOFTV2 } from \"@layerzerolabs/solidity-examples/contracts/token/oft/v2/BaseOFTV2.sol\";\nimport { ensureNonzeroAddress } from \"@venusprotocol/solidity-utilities/contracts/validators.sol\";\nimport { ExponentialNoError } from \"@venusprotocol/solidity-utilities/contracts/ExponentialNoError.sol\";\n\n/**\n * @title BaseXVSProxyOFT\n * @author Venus\n * @notice The BaseXVSProxyOFT contract is tailored for facilitating cross-chain transactions with an ERC20 token.\n * It manages transaction limits of a single and daily transactions.\n * This contract inherits key functionalities from other contracts, including pausing capabilities and error handling.\n * It holds state variables for the inner token and maps for tracking transaction limits and statistics across various chains and addresses.\n * The contract allows the owner to configure limits, set whitelists, and control pausing.\n * Internal functions conduct eligibility check of transactions, making the contract a fundamental component for cross-chain token management.\n */\n\nabstract contract BaseXVSProxyOFT is Pausable, ExponentialNoError, BaseOFTV2 {\n using SafeERC20 for IERC20;\n IERC20 internal immutable innerToken;\n uint256 internal immutable ld2sdRate;\n bool public sendAndCallEnabled;\n\n /**\n * @notice The address of ResilientOracle contract wrapped in its interface.\n */\n ResilientOracleInterface public oracle;\n /**\n * @notice Maximum limit for a single transaction in USD(scaled with 18 decimals) from local chain.\n */\n mapping(uint16 => uint256) public chainIdToMaxSingleTransactionLimit;\n /**\n * @notice Maximum daily limit for transactions in USD(scaled with 18 decimals) from local chain.\n */\n mapping(uint16 => uint256) public chainIdToMaxDailyLimit;\n /**\n * @notice Total sent amount in USD(scaled with 18 decimals) within the last 24-hour window from local chain.\n */\n mapping(uint16 => uint256) public chainIdToLast24HourTransferred;\n /**\n * @notice Timestamp when the last 24-hour window started from local chain.\n */\n mapping(uint16 => uint256) public chainIdToLast24HourWindowStart;\n /**\n * @notice Maximum limit for a single receive transaction in USD(scaled with 18 decimals) from remote chain.\n */\n mapping(uint16 => uint256) public chainIdToMaxSingleReceiveTransactionLimit;\n /**\n * @notice Maximum daily limit for receiving transactions in USD(scaled with 18 decimals) from remote chain.\n */\n mapping(uint16 => uint256) public chainIdToMaxDailyReceiveLimit;\n /**\n * @notice Total received amount in USD(scaled with 18 decimals) within the last 24-hour window from remote chain.\n */\n mapping(uint16 => uint256) public chainIdToLast24HourReceived;\n /**\n * @notice Timestamp when the last 24-hour window started from remote chain.\n */\n mapping(uint16 => uint256) public chainIdToLast24HourReceiveWindowStart;\n /**\n * @notice Address on which cap check and bound limit is not applicable.\n */\n mapping(address => bool) public whitelist;\n\n /**\n * @notice Emitted when address is added to whitelist.\n */\n event SetWhitelist(address indexed addr, bool isWhitelist);\n /**\n * @notice Emitted when the maximum limit for a single transaction from local chain is modified.\n */\n event SetMaxSingleTransactionLimit(uint16 chainId, uint256 oldMaxLimit, uint256 newMaxLimit);\n /**\n * @notice Emitted when the maximum daily limit of transactions from local chain is modified.\n */\n event SetMaxDailyLimit(uint16 chainId, uint256 oldMaxLimit, uint256 newMaxLimit);\n /**\n * @notice Emitted when the maximum limit for a single receive transaction from remote chain is modified.\n */\n event SetMaxSingleReceiveTransactionLimit(uint16 chainId, uint256 oldMaxLimit, uint256 newMaxLimit);\n /**\n * @notice Emitted when the maximum daily limit for receiving transactions from remote chain is modified.\n */\n event SetMaxDailyReceiveLimit(uint16 chainId, uint256 oldMaxLimit, uint256 newMaxLimit);\n /**\n * @notice Event emitted when oracle is modified.\n */\n event OracleChanged(address indexed oldOracle, address indexed newOracle);\n /**\n * @notice Event emitted when trusted remote sets to empty.\n */\n event TrustedRemoteRemoved(uint16 chainId);\n /**\n * @notice Event emitted when inner token set successfully.\n */\n event InnerTokenAdded(address indexed innerToken);\n /**\n *@notice Emitted on sweep token success\n */\n event SweepToken(address indexed token, address indexed to, uint256 sweepAmount);\n /**\n * @notice Event emitted when SendAndCallEnabled updated successfully.\n */\n event UpdateSendAndCallEnabled(bool indexed enabled);\n /**\n *@notice Error thrown when this contract balance is less than sweep amount\n */\n error InsufficientBalance(uint256 sweepAmount, uint256 balance);\n\n /**\n * @param tokenAddress_ Address of the inner token.\n * @param sharedDecimals_ Number of shared decimals.\n * @param lzEndpoint_ Address of the layer zero endpoint contract.\n * @param oracle_ Address of the price oracle.\n * @custom:error ZeroAddressNotAllowed is thrown when token contract address is zero.\n * @custom:error ZeroAddressNotAllowed is thrown when lzEndpoint contract address is zero.\n * @custom:error ZeroAddressNotAllowed is thrown when oracle contract address is zero.\n * @custom:event Emits InnerTokenAdded with token address.\n * @custom:event Emits OracleChanged with zero address and oracle address.\n */\n constructor(\n address tokenAddress_,\n uint8 sharedDecimals_,\n address lzEndpoint_,\n address oracle_\n ) BaseOFTV2(sharedDecimals_, lzEndpoint_) {\n ensureNonzeroAddress(tokenAddress_);\n ensureNonzeroAddress(lzEndpoint_);\n ensureNonzeroAddress(oracle_);\n\n innerToken = IERC20(tokenAddress_);\n\n (bool success, bytes memory data) = tokenAddress_.staticcall(abi.encodeWithSignature(\"decimals()\"));\n require(success, \"ProxyOFT: failed to get token decimals\");\n uint8 decimals = abi.decode(data, (uint8));\n\n require(sharedDecimals_ <= decimals, \"ProxyOFT: sharedDecimals must be <= decimals\");\n ld2sdRate = 10 ** (decimals - sharedDecimals_);\n\n emit InnerTokenAdded(tokenAddress_);\n emit OracleChanged(address(0), oracle_);\n\n oracle = ResilientOracleInterface(oracle_);\n }\n\n /**\n * @notice Set the address of the ResilientOracle contract.\n * @dev Reverts if the new address is zero.\n * @param oracleAddress_ The new address of the ResilientOracle contract.\n * @custom:access Only owner.\n * @custom:event Emits OracleChanged with old and new oracle address.\n */\n function setOracle(address oracleAddress_) external onlyOwner {\n ensureNonzeroAddress(oracleAddress_);\n emit OracleChanged(address(oracle), oracleAddress_);\n oracle = ResilientOracleInterface(oracleAddress_);\n }\n\n /**\n * @notice Sets the limit of single transaction amount.\n * @param chainId_ Destination chain id.\n * @param limit_ Amount in USD(scaled with 18 decimals).\n * @custom:access Only owner.\n * @custom:event Emits SetMaxSingleTransactionLimit with old and new limit associated with chain id.\n */\n function setMaxSingleTransactionLimit(uint16 chainId_, uint256 limit_) external onlyOwner {\n require(limit_ <= chainIdToMaxDailyLimit[chainId_], \"Single transaction limit > Daily limit\");\n emit SetMaxSingleTransactionLimit(chainId_, chainIdToMaxSingleTransactionLimit[chainId_], limit_);\n chainIdToMaxSingleTransactionLimit[chainId_] = limit_;\n }\n\n /**\n * @notice Sets the limit of daily (24 Hour) transactions amount.\n * @param chainId_ Destination chain id.\n * @param limit_ Amount in USD(scaled with 18 decimals).\n * @custom:access Only owner.\n * @custom:event Emits setMaxDailyLimit with old and new limit associated with chain id.\n */\n function setMaxDailyLimit(uint16 chainId_, uint256 limit_) external onlyOwner {\n require(limit_ >= chainIdToMaxSingleTransactionLimit[chainId_], \"Daily limit < single transaction limit\");\n emit SetMaxDailyLimit(chainId_, chainIdToMaxDailyLimit[chainId_], limit_);\n chainIdToMaxDailyLimit[chainId_] = limit_;\n }\n\n /**\n * @notice Sets the maximum limit for a single receive transaction.\n * @param chainId_ The destination chain ID.\n * @param limit_ The new maximum limit in USD(scaled with 18 decimals).\n * @custom:access Only owner.\n * @custom:event Emits setMaxSingleReceiveTransactionLimit with old and new limit associated with chain id.\n */\n function setMaxSingleReceiveTransactionLimit(uint16 chainId_, uint256 limit_) external onlyOwner {\n require(limit_ <= chainIdToMaxDailyReceiveLimit[chainId_], \"single receive transaction limit > Daily limit\");\n emit SetMaxSingleReceiveTransactionLimit(chainId_, chainIdToMaxSingleReceiveTransactionLimit[chainId_], limit_);\n chainIdToMaxSingleReceiveTransactionLimit[chainId_] = limit_;\n }\n\n /**\n * @notice Sets the maximum daily limit for receiving transactions.\n * @param chainId_ The destination chain ID.\n * @param limit_ The new maximum daily limit in USD(scaled with 18 decimals).\n * @custom:access Only owner.\n * @custom:event Emits setMaxDailyReceiveLimit with old and new limit associated with chain id.\n */\n function setMaxDailyReceiveLimit(uint16 chainId_, uint256 limit_) external onlyOwner {\n require(\n limit_ >= chainIdToMaxSingleReceiveTransactionLimit[chainId_],\n \"Daily limit < single receive transaction limit\"\n );\n emit SetMaxDailyReceiveLimit(chainId_, chainIdToMaxDailyReceiveLimit[chainId_], limit_);\n chainIdToMaxDailyReceiveLimit[chainId_] = limit_;\n }\n\n /**\n * @notice Sets the whitelist address to skip checks on transaction limit.\n * @param user_ Address to be add in whitelist.\n * @param val_ Boolean to be set (true for user_ address is whitelisted).\n * @custom:access Only owner.\n * @custom:event Emits setWhitelist.\n */\n function setWhitelist(address user_, bool val_) external onlyOwner {\n emit SetWhitelist(user_, val_);\n whitelist[user_] = val_;\n }\n\n /**\n * @notice Triggers stopped state of the bridge.\n * @custom:access Only owner.\n */\n function pause() external onlyOwner {\n _pause();\n }\n\n /**\n * @notice Triggers resume state of the bridge.\n * @custom:access Only owner.\n */\n function unpause() external onlyOwner {\n _unpause();\n }\n\n /**\n * @notice A public function to sweep accidental ERC-20 transfers to this contract. Tokens are sent to user\n * @param token_ The address of the ERC-20 token to sweep\n * @param to_ The address of the recipient\n * @param amount_ The amount of tokens needs to transfer\n * @custom:event Emits SweepToken event\n * @custom:error Throw InsufficientBalance if amount_ is greater than the available balance of the token in the contract\n * @custom:access Only Owner\n */\n function sweepToken(IERC20 token_, address to_, uint256 amount_) external onlyOwner {\n uint256 balance = token_.balanceOf(address(this));\n if (amount_ > balance) {\n revert InsufficientBalance(amount_, balance);\n }\n\n emit SweepToken(address(token_), to_, amount_);\n\n token_.safeTransfer(to_, amount_);\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 Only owner.\n * @custom:event Emits TrustedRemoteRemoved once chain id is removed from trusted remote.\n */\n function removeTrustedRemote(uint16 remoteChainId_) external onlyOwner {\n delete trustedRemoteLookup[remoteChainId_];\n emit TrustedRemoteRemoved(remoteChainId_);\n }\n\n /**\n * @notice It enables or disables sendAndCall functionality for the bridge.\n * @param enabled_ Boolean indicating whether the sendAndCall function should be enabled or disabled.\n */\n function updateSendAndCallEnabled(bool enabled_) external onlyOwner {\n sendAndCallEnabled = enabled_;\n emit UpdateSendAndCallEnabled(enabled_);\n }\n\n /**\n * @notice Checks the eligibility of a sender to initiate a cross-chain token transfer.\n * @dev This external view function assesses whether the specified sender is eligible to transfer the given amount\n * to the specified destination chain. It considers factors such as whitelisting, transaction limits, and a 24-hour window.\n * @param from_ The sender's address initiating the transfer.\n * @param dstChainId_ Indicates destination chain.\n * @param amount_ The quantity of tokens to be transferred.\n * @return eligibleToSend A boolean indicating whether the sender is eligible to transfer the tokens.\n * @return maxSingleTransactionLimit The maximum limit for a single transaction.\n * @return maxDailyLimit The maximum daily limit for transactions.\n * @return amountInUsd The equivalent amount in USD based on the oracle price.\n * @return transferredInWindow The total amount transferred in the current 24-hour window.\n * @return last24HourWindowStart The timestamp when the current 24-hour window started.\n * @return isWhiteListedUser A boolean indicating whether the sender is whitelisted.\n */\n function isEligibleToSend(\n address from_,\n uint16 dstChainId_,\n uint256 amount_\n )\n external\n view\n returns (\n bool eligibleToSend,\n uint256 maxSingleTransactionLimit,\n uint256 maxDailyLimit,\n uint256 amountInUsd,\n uint256 transferredInWindow,\n uint256 last24HourWindowStart,\n bool isWhiteListedUser\n )\n {\n // Check if the sender's address is whitelisted\n isWhiteListedUser = whitelist[from_];\n\n // Calculate the amount in USD using the oracle price\n Exp memory oraclePrice = Exp({ mantissa: oracle.getPrice(token()) });\n amountInUsd = mul_ScalarTruncate(oraclePrice, amount_);\n\n // Load values for the 24-hour window checks\n uint256 currentBlockTimestamp = block.timestamp;\n last24HourWindowStart = chainIdToLast24HourWindowStart[dstChainId_];\n transferredInWindow = chainIdToLast24HourTransferred[dstChainId_];\n maxSingleTransactionLimit = chainIdToMaxSingleTransactionLimit[dstChainId_];\n maxDailyLimit = chainIdToMaxDailyLimit[dstChainId_];\n if (currentBlockTimestamp - last24HourWindowStart > 1 days) {\n transferredInWindow = amountInUsd;\n last24HourWindowStart = currentBlockTimestamp;\n } else {\n transferredInWindow += amountInUsd;\n }\n eligibleToSend = (isWhiteListedUser ||\n ((amountInUsd <= maxSingleTransactionLimit) && (transferredInWindow <= maxDailyLimit)));\n }\n\n /**\n * @notice Initiates a cross-chain token transfer and triggers a call on the destination chain.\n * @dev This internal override function enables the contract to send tokens and invoke calls on the specified\n * destination chain. It checks whether the sendAndCall feature is enabled before proceeding with the transfer.\n * @param from_ Address from which tokens will be debited.\n * @param dstChainId_ Destination chain id on which tokens will be send.\n * @param toAddress_ Address on which tokens will be credited on destination chain.\n * @param amount_ Amount of tokens that will be transferred.\n * @param payload_ Additional data payload for the call on the destination chain.\n * @param dstGasForCall_ The amount of gas allocated for the call on the destination chain.\n * @param callparams_ Additional parameters, including refund address, ZRO payment address,\n * and adapter params.\n */\n function sendAndCall(\n address from_,\n uint16 dstChainId_,\n bytes32 toAddress_,\n uint256 amount_,\n bytes calldata payload_,\n uint64 dstGasForCall_,\n LzCallParams calldata callparams_\n ) public payable override {\n require(sendAndCallEnabled, \"sendAndCall is disabled\");\n\n super.sendAndCall(from_, dstChainId_, toAddress_, amount_, payload_, dstGasForCall_, callparams_);\n }\n\n function retryMessage(\n uint16 _srcChainId,\n bytes calldata _srcAddress,\n uint64 _nonce,\n bytes calldata _payload\n ) public payable override {\n bytes memory trustedRemote = trustedRemoteLookup[_srcChainId];\n // it will still block the message pathway from (srcChainId, srcAddress). should not receive message from untrusted remote.\n require(\n _srcAddress.length == trustedRemote.length &&\n trustedRemote.length > 0 &&\n keccak256(_srcAddress) == keccak256(trustedRemote),\n \"LzApp: invalid source sending contract\"\n );\n super.retryMessage(_srcChainId, _srcAddress, _nonce, _payload);\n }\n\n /**\n * @notice Empty implementation of renounce ownership to avoid any mishappening.\n */\n function renounceOwnership() public override {}\n\n /**\n * @notice Return's the address of the inner token of this bridge.\n * @return Address of the inner token of this bridge.\n */\n function token() public view override returns (address) {\n return address(innerToken);\n }\n\n /**\n * @notice Checks if the sender is eligible to send tokens\n * @param from_ Sender's address sending tokens\n * @param dstChainId_ Chain id on which tokens should be sent\n * @param amount_ Amount of tokens to be sent\n */\n function _isEligibleToSend(address from_, uint16 dstChainId_, uint256 amount_) internal {\n // Check if the sender's address is whitelisted\n bool isWhiteListedUser = whitelist[from_];\n // Check if the user is whitelisted and return if true\n if (isWhiteListedUser) {\n return;\n }\n\n // Calculate the amount in USD using the oracle price\n uint256 amountInUsd;\n Exp memory oraclePrice = Exp({ mantissa: oracle.getPrice(token()) });\n amountInUsd = mul_ScalarTruncate(oraclePrice, amount_);\n\n // Load values for the 24-hour window checks\n uint256 currentBlockTimestamp = block.timestamp;\n uint256 lastDayWindowStart = chainIdToLast24HourWindowStart[dstChainId_];\n uint256 transferredInWindow = chainIdToLast24HourTransferred[dstChainId_];\n uint256 maxSingleTransactionLimit = chainIdToMaxSingleTransactionLimit[dstChainId_];\n uint256 maxDailyLimit = chainIdToMaxDailyLimit[dstChainId_];\n\n // Revert if the amount exceeds the single transaction limit\n require(amountInUsd <= maxSingleTransactionLimit, \"Single Transaction Limit Exceed\");\n\n // Check if the time window has changed (more than 24 hours have passed)\n if (currentBlockTimestamp - lastDayWindowStart > 1 days) {\n transferredInWindow = amountInUsd;\n chainIdToLast24HourWindowStart[dstChainId_] = currentBlockTimestamp;\n } else {\n transferredInWindow += amountInUsd;\n }\n\n // Revert if the amount exceeds the daily limit\n require(transferredInWindow <= maxDailyLimit, \"Daily Transaction Limit Exceed\");\n\n // Update the amount for the 24-hour window\n chainIdToLast24HourTransferred[dstChainId_] = transferredInWindow;\n }\n\n /**\n * @notice Checks if receiver is able to receive tokens\n * @param toAddress_ Receiver address\n * @param srcChainId_ Source chain id from which token is send\n * @param receivedAmount_ Amount of tokens received\n */\n function _isEligibleToReceive(address toAddress_, uint16 srcChainId_, uint256 receivedAmount_) internal {\n // Check if the recipient's address is whitelisted\n bool isWhiteListedUser = whitelist[toAddress_];\n // Check if the user is whitelisted and return if true\n if (isWhiteListedUser) {\n return;\n }\n\n // Calculate the received amount in USD using the oracle price\n uint256 receivedAmountInUsd;\n Exp memory oraclePrice = Exp({ mantissa: oracle.getPrice(address(token())) });\n receivedAmountInUsd = mul_ScalarTruncate(oraclePrice, receivedAmount_);\n\n uint256 currentBlockTimestamp = block.timestamp;\n\n // Load values for the 24-hour window checks for receiving\n uint256 lastDayReceiveWindowStart = chainIdToLast24HourReceiveWindowStart[srcChainId_];\n uint256 receivedInWindow = chainIdToLast24HourReceived[srcChainId_];\n uint256 maxSingleReceiveTransactionLimit = chainIdToMaxSingleReceiveTransactionLimit[srcChainId_];\n uint256 maxDailyReceiveLimit = chainIdToMaxDailyReceiveLimit[srcChainId_];\n\n // Check if the received amount exceeds the single transaction limit\n require(receivedAmountInUsd <= maxSingleReceiveTransactionLimit, \"Single Transaction Limit Exceed\");\n\n // Check if the time window has changed (more than 24 hours have passed)\n if (currentBlockTimestamp - lastDayReceiveWindowStart > 1 days) {\n receivedInWindow = receivedAmountInUsd;\n chainIdToLast24HourReceiveWindowStart[srcChainId_] = currentBlockTimestamp;\n } else {\n receivedInWindow += receivedAmountInUsd;\n }\n\n // Revert if the received amount exceeds the daily limit\n require(receivedInWindow <= maxDailyReceiveLimit, \"Daily Transaction Limit Exceed\");\n\n // Update the received amount for the 24-hour window\n chainIdToLast24HourReceived[srcChainId_] = receivedInWindow;\n }\n\n /**\n * @notice Transfer tokens from sender to receiver account.\n * @param from_ Address from which token has to be transferred(Sender).\n * @param to_ Address on which token will be tranferred(Receiver).\n * @param amount_ Amount of token to be transferred.\n * @return Actual balance difference.\n */\n function _transferFrom(\n address from_,\n address to_,\n uint256 amount_\n ) internal override whenNotPaused returns (uint256) {\n uint256 before = innerToken.balanceOf(to_);\n if (from_ == address(this)) {\n innerToken.safeTransfer(to_, amount_);\n } else {\n innerToken.safeTransferFrom(from_, to_, amount_);\n }\n return innerToken.balanceOf(to_) - before;\n }\n\n /**\n * @notice Returns Conversion rate factor from large decimals to shared decimals.\n * @return Conversion rate factor.\n */\n function _ld2sdRate() internal view override returns (uint256) {\n return ld2sdRate;\n }\n}\n" + }, + "contracts/Bridge/interfaces/IXVS.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity ^0.8.25;\n\n/**\n * @title IXVS\n * @author Venus\n * @notice Interface implemented by `XVS` token.\n */\ninterface IXVS {\n function mint(address to, uint256 amount) external;\n\n function burn(address from, uint256 amount) external;\n}\n" + }, + "contracts/Bridge/interfaces/IXVSProxyOFT.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity ^0.8.25;\n\n/**\n * @title IXVSProxyOFT\n * @author Venus\n * @notice Interface implemented by `XVSProxyOFT`.\n */\ninterface IXVSProxyOFT {\n function transferOwnership(address addr) external;\n\n function setTrustedRemoteAddress(uint16 remoteChainId, bytes calldata srcAddress) external;\n\n function isTrustedRemote(uint16 remoteChainId, bytes calldata srcAddress) external returns (bool);\n}\n" + }, + "contracts/Bridge/XVSBridgeAdmin.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.25;\n\nimport { AccessControlledV8 } from \"@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV8.sol\";\nimport { ensureNonzeroAddress } from \"@venusprotocol/solidity-utilities/contracts/validators.sol\";\nimport { IXVSProxyOFT } from \"./interfaces/IXVSProxyOFT.sol\";\n\n/**\n * @title XVSBridgeAdmin\n * @author Venus\n * @notice The XVSBridgeAdmin contract extends a parent contract AccessControlledV8 for access control, and it manages an external contract called XVSProxyOFT.\n * It maintains a registry of function signatures and names,\n * allowing for dynamic function handling i.e checking of access control of interaction with only owner functions.\n */\ncontract XVSBridgeAdmin is AccessControlledV8 {\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n IXVSProxyOFT public immutable XVSBridge;\n /**\n * @notice A mapping keeps track of function signature associated with function name string.\n */\n mapping(bytes4 => string) public functionRegistry;\n\n /**\n * @notice emitted when function registry updated\n */\n event FunctionRegistryChanged(string signature, bool active);\n\n /// @custom:oz-upgrades-unsafe-allow constructor\n constructor(address XVSBridge_) {\n ensureNonzeroAddress(XVSBridge_);\n XVSBridge = IXVSProxyOFT(XVSBridge_);\n _disableInitializers();\n }\n\n /**\n * @param accessControlManager_ Address of access control manager contract.\n */\n function initialize(address accessControlManager_) external initializer {\n __AccessControlled_init(accessControlManager_);\n }\n\n /**\n * @notice Invoked when called function does not exist in the contract.\n * @return Response of low level call.\n * @custom:access Controlled by AccessControlManager.\n */\n fallback(bytes calldata data) external returns (bytes memory) {\n string memory fun = _getFunctionName(msg.sig);\n require(bytes(fun).length != 0, \"Function not found\");\n _checkAccessAllowed(fun);\n (bool ok, bytes memory res) = address(XVSBridge).call(data);\n require(ok, \"call failed\");\n return res;\n }\n\n /**\n * @notice Sets trusted remote on particular chain.\n * @param remoteChainId_ Chain Id of the destination chain.\n * @param remoteAddress_ Address of the destination bridge.\n * @custom:access Controlled by AccessControlManager.\n * @custom:error ZeroAddressNotAllowed is thrown when remoteAddress_ contract address is zero.\n */\n function setTrustedRemoteAddress(uint16 remoteChainId_, bytes calldata remoteAddress_) external {\n _checkAccessAllowed(\"setTrustedRemoteAddress(uint16,bytes)\");\n require(remoteChainId_ != 0, \"ChainId must not be zero\");\n ensureNonzeroAddress(bytesToAddress(remoteAddress_));\n XVSBridge.setTrustedRemoteAddress(remoteChainId_, remoteAddress_);\n }\n\n /**\n * @notice A setter for the 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 * @custom:event Emits FunctionRegistryChanged if bool value of function changes.\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; ) {\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 unchecked {\n ++i;\n }\n }\n }\n\n /**\n * @notice This function transfers the ownership of the bridge from this contract to new owner.\n * @param newOwner_ New owner of the XVS Bridge.\n * @custom:access Controlled by AccessControlManager.\n */\n function transferBridgeOwnership(address newOwner_) external {\n _checkAccessAllowed(\"transferBridgeOwnership(address)\");\n XVSBridge.transferOwnership(newOwner_);\n }\n\n /**\n * @notice Returns true if remote address is trustedRemote corresponds to chainId_.\n * @param remoteChainId_ Chain Id of the destination chain.\n * @param remoteAddress_ Address of the destination bridge.\n * @custom:error ZeroAddressNotAllowed is thrown when remoteAddress_ contract address is zero.\n * @return Bool indicating whether the remote chain is trusted or not.\n */\n function isTrustedRemote(uint16 remoteChainId_, bytes calldata remoteAddress_) external returns (bool) {\n require(remoteChainId_ != 0, \"ChainId must not be zero\");\n ensureNonzeroAddress(bytesToAddress(remoteAddress_));\n return XVSBridge.isTrustedRemote(remoteChainId_, remoteAddress_);\n }\n\n /**\n * @notice Empty implementation of renounce ownership to avoid any mishappening.\n */\n function renounceOwnership() public override {}\n\n /**\n * @dev Returns function name string associated with function signature.\n * @param signature_ Four bytes of function signature.\n * @return Function signature corresponding to its hash.\n */\n function _getFunctionName(bytes4 signature_) internal view returns (string memory) {\n return functionRegistry[signature_];\n }\n\n /**\n * @notice Converts given bytes into address.\n * @param b Bytes to be converted into address.\n * @return Converted address of given bytes.\n */\n function bytesToAddress(bytes calldata b) private pure returns (address) {\n return address(uint160(bytes20(b)));\n }\n}\n" + }, + "contracts/Bridge/XVSProxyOFTDest.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.25;\n\nimport { IXVS } from \"./interfaces/IXVS.sol\";\nimport { BaseXVSProxyOFT } from \"./BaseXVSProxyOFT.sol\";\n\n/**\n * @title XVSProxyOFTDest\n * @author Venus\n * @notice XVSProxyOFTDest contract builds upon the functionality of its parent contract, BaseXVSProxyOFT,\n * and focuses on managing token transfers to the destination chain.\n * It provides functions to check eligibility and perform the actual token transfers while maintaining strict access controls and pausing mechanisms.\n */\n\ncontract XVSProxyOFTDest is BaseXVSProxyOFT {\n /**\n * @notice Emits when stored message dropped without successful retrying.\n */\n event DropFailedMessage(uint16 srcChainId, bytes indexed srcAddress, uint64 nonce);\n\n constructor(\n address tokenAddress_,\n uint8 sharedDecimals_,\n address lzEndpoint_,\n address oracle_\n ) BaseXVSProxyOFT(tokenAddress_, sharedDecimals_, lzEndpoint_, oracle_) {}\n\n /**\n * @notice Clear failed messages from the storage.\n * @param srcChainId_ Chain id of source\n * @param srcAddress_ Address of source followed by current bridge address\n * @param nonce_ Nonce_ of the transaction\n * @custom:access Only owner\n * @custom:event Emits DropFailedMessage on clearance of failed message.\n */\n function dropFailedMessage(uint16 srcChainId_, bytes memory srcAddress_, uint64 nonce_) external onlyOwner {\n failedMessages[srcChainId_][srcAddress_][nonce_] = bytes32(0);\n emit DropFailedMessage(srcChainId_, srcAddress_, nonce_);\n }\n\n /**\n * @notice Returns the total circulating supply of the token on the destination chain i.e (total supply).\n * @return total circulating supply of the token on the destination chain.\n */\n function circulatingSupply() public view override returns (uint256) {\n return innerToken.totalSupply();\n }\n\n /**\n * @notice Debit tokens from the given address\n * @param from_ Address from which tokens to be debited\n * @param dstChainId_ Destination chain id\n * @param amount_ Amount of tokens to be debited\n * @return Actual amount debited\n */\n function _debitFrom(\n address from_,\n uint16 dstChainId_,\n bytes32,\n uint256 amount_\n ) internal override whenNotPaused returns (uint256) {\n require(from_ == _msgSender(), \"ProxyOFT: owner is not send caller\");\n _isEligibleToSend(from_, dstChainId_, amount_);\n IXVS(address(innerToken)).burn(from_, amount_);\n return amount_;\n }\n\n /**\n * @notice Credit tokens in the given account\n * @param srcChainId_ Source chain id\n * @param toAddress_ Address on which token will be credited\n * @param amount_ Amount of tokens to be credited\n * @return Actual amount credited\n */\n function _creditTo(\n uint16 srcChainId_,\n address toAddress_,\n uint256 amount_\n ) internal override whenNotPaused returns (uint256) {\n _isEligibleToReceive(toAddress_, srcChainId_, amount_);\n IXVS(address(innerToken)).mint(toAddress_, amount_);\n return amount_;\n }\n}\n" + }, + "contracts/Bridge/XVSProxyOFTSrc.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.25;\n\nimport { SafeERC20, IERC20 } from \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\nimport { BaseXVSProxyOFT } from \"./BaseXVSProxyOFT.sol\";\n\n/**\n * @title XVSProxyOFTSrc\n * @author Venus\n * @notice XVSProxyOFTSrc contract serves as a crucial component for cross-chain token transactions,\n * focusing on the source side of these transactions.\n * It monitors the total amount transferred to other chains, ensuring it complies with defined limits,\n * and provides functions for transferring tokens while maintaining control over the circulating supply on the source chain.\n */\n\ncontract XVSProxyOFTSrc is BaseXVSProxyOFT {\n using SafeERC20 for IERC20;\n /**\n * @notice Total amount that is transferred from this chain to other chains.\n */\n uint256 public outboundAmount;\n\n /**\n * @notice Emits when locked token released manually by owner.\n */\n event FallbackWithdraw(address indexed to, uint256 amount);\n /**\n * @notice Emits when stored message dropped without successful retrying.\n */\n event DropFailedMessage(uint16 srcChainId, bytes indexed srcAddress, uint64 nonce);\n /**\n * @notice Event emitted when tokens are forcefully locked.\n */\n event FallbackDeposit(address indexed from, uint256 amount_);\n\n constructor(\n address tokenAddress_,\n uint8 sharedDecimals_,\n address lzEndpoint_,\n address oracle_\n ) BaseXVSProxyOFT(tokenAddress_, sharedDecimals_, lzEndpoint_, oracle_) {}\n\n /**\n * @notice Only call it when there is no way to recover the failed message.\n * `dropFailedMessage` must be called first if transaction is from remote->local chain to avoid double spending.\n * @param to_ The address to withdraw to\n * @param amount_ The amount of withdrawal\n * @custom:access Only owner.\n * @custom:event Emits FallbackWithdraw, once done with transfer.\n */\n function fallbackWithdraw(address to_, uint256 amount_) external onlyOwner {\n require(outboundAmount >= amount_, \"Withdraw amount should be less than outbound amount\");\n unchecked {\n outboundAmount -= amount_;\n }\n _transferFrom(address(this), to_, amount_);\n emit FallbackWithdraw(to_, amount_);\n }\n\n /**\n * @notice Forces the lock of tokens by increasing outbound amount and transferring tokens from the sender to the contract.\n * @param amount_ The amount of tokens to lock.\n * @param depositor_ Address of the depositor.\n * @custom:access Only owner.\n * @custom:event Emits FallbackDeposit, once done with transfer.\n */\n function fallbackDeposit(address depositor_, uint256 amount_) external onlyOwner {\n (uint256 actualAmount, ) = _removeDust(amount_);\n\n outboundAmount += actualAmount;\n uint256 cap = _sd2ld(type(uint64).max);\n require(cap >= outboundAmount, \"ProxyOFT: outboundAmount overflow\");\n\n _transferFrom(depositor_, address(this), actualAmount);\n\n emit FallbackDeposit(depositor_, actualAmount);\n }\n\n /**\n * @notice Clear failed messages from the storage.\n * @param srcChainId_ Chain id of source\n * @param srcAddress_ Address of source followed by current bridge address\n * @param nonce_ Nonce_ of the transaction\n * @custom:access Only owner.\n * @custom:event Emits DropFailedMessage on clearance of failed message.\n */\n function dropFailedMessage(uint16 srcChainId_, bytes memory srcAddress_, uint64 nonce_) external onlyOwner {\n failedMessages[srcChainId_][srcAddress_][nonce_] = bytes32(0);\n emit DropFailedMessage(srcChainId_, srcAddress_, nonce_);\n }\n\n /**\n * @notice Returns the total circulating supply of the token on the source chain i.e (total supply - locked in this contract).\n * @return Returns difference in total supply and the outbound amount.\n */\n function circulatingSupply() public view override returns (uint256) {\n return innerToken.totalSupply() - outboundAmount;\n }\n\n /**\n * @notice Debit tokens from the given address\n * @param from_ Address from which tokens to be debited\n * @param dstChainId_ Destination chain id\n * @param amount_ Amount of tokens to be debited\n * @return Actual amount debited\n */\n function _debitFrom(\n address from_,\n uint16 dstChainId_,\n bytes32,\n uint256 amount_\n ) internal override whenNotPaused returns (uint256) {\n require(from_ == _msgSender(), \"ProxyOFT: owner is not send caller\");\n _isEligibleToSend(from_, dstChainId_, amount_);\n\n uint256 amount = _transferFrom(from_, address(this), amount_);\n\n outboundAmount += amount;\n uint256 cap = _sd2ld(type(uint64).max);\n require(cap >= outboundAmount, \"ProxyOFT: outboundAmount overflow\");\n\n return amount;\n }\n\n /**\n * @notice Credit tokens in the given account\n * @param srcChainId_ Source chain id\n * @param toAddress_ Address on which token will be credited\n * @param amount_ Amount of tokens to be credited\n * @return Actual amount credited\n */\n function _creditTo(\n uint16 srcChainId_,\n address toAddress_,\n uint256 amount_\n ) internal override whenNotPaused returns (uint256) {\n _isEligibleToReceive(toAddress_, srcChainId_, amount_);\n outboundAmount -= amount_;\n // tokens are already in this contract, so no need to transfer\n if (toAddress_ == address(this)) {\n return amount_;\n }\n\n return _transferFrom(address(this), toAddress_, amount_);\n }\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 200, + "details": { + "yul": true + } + }, + "evmVersion": "paris", + "outputSelection": { + "*": { + "*": [ + "storageLayout", + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "evm.gasEstimates" + ], + "": ["ast"] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} diff --git a/deployments/arbitrumsepolia/solcInputs/f2046c3ab03975d1be43bca1cf657398.json b/deployments/arbitrumsepolia/solcInputs/c5caaaafd4ca2aaf0d7d76349c623fb6.json similarity index 77% rename from deployments/arbitrumsepolia/solcInputs/f2046c3ab03975d1be43bca1cf657398.json rename to deployments/arbitrumsepolia/solcInputs/c5caaaafd4ca2aaf0d7d76349c623fb6.json index 556e3c9..32332bd 100644 --- a/deployments/arbitrumsepolia/solcInputs/f2046c3ab03975d1be43bca1cf657398.json +++ b/deployments/arbitrumsepolia/solcInputs/c5caaaafd4ca2aaf0d7d76349c623fb6.json @@ -43,21 +43,6 @@ "@layerzerolabs/solidity-examples/contracts/token/oft/v2/OFTCoreV2.sol": { "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../../../lzApp/NonblockingLzApp.sol\";\nimport \"../../../libraries/ExcessivelySafeCall.sol\";\nimport \"./interfaces/ICommonOFT.sol\";\nimport \"./interfaces/IOFTReceiverV2.sol\";\n\nabstract contract OFTCoreV2 is NonblockingLzApp {\n using BytesLib for bytes;\n using ExcessivelySafeCall for address;\n\n uint public constant NO_EXTRA_GAS = 0;\n\n // packet type\n uint8 public constant PT_SEND = 0;\n uint8 public constant PT_SEND_AND_CALL = 1;\n\n uint8 public immutable sharedDecimals;\n\n mapping(uint16 => mapping(bytes => mapping(uint64 => bool))) public creditedPackets;\n\n /**\n * @dev Emitted when `_amount` tokens are moved from the `_sender` to (`_dstChainId`, `_toAddress`)\n * `_nonce` is the outbound nonce\n */\n event SendToChain(uint16 indexed _dstChainId, address indexed _from, bytes32 indexed _toAddress, uint _amount);\n\n /**\n * @dev Emitted when `_amount` tokens are received from `_srcChainId` into the `_toAddress` on the local chain.\n * `_nonce` is the inbound nonce.\n */\n event ReceiveFromChain(uint16 indexed _srcChainId, address indexed _to, uint _amount);\n\n event CallOFTReceivedSuccess(uint16 indexed _srcChainId, bytes _srcAddress, uint64 _nonce, bytes32 _hash);\n\n event NonContractAddress(address _address);\n\n // _sharedDecimals should be the minimum decimals on all chains\n constructor(uint8 _sharedDecimals, address _lzEndpoint) NonblockingLzApp(_lzEndpoint) {\n sharedDecimals = _sharedDecimals;\n }\n\n /************************************************************************\n * public functions\n ************************************************************************/\n function callOnOFTReceived(\n uint16 _srcChainId,\n bytes calldata _srcAddress,\n uint64 _nonce,\n bytes32 _from,\n address _to,\n uint _amount,\n bytes calldata _payload,\n uint _gasForCall\n ) public virtual {\n require(_msgSender() == address(this), \"OFTCore: caller must be OFTCore\");\n\n // send\n _amount = _transferFrom(address(this), _to, _amount);\n emit ReceiveFromChain(_srcChainId, _to, _amount);\n\n // call\n IOFTReceiverV2(_to).onOFTReceived{gas: _gasForCall}(_srcChainId, _srcAddress, _nonce, _from, _amount, _payload);\n }\n\n /************************************************************************\n * internal functions\n ************************************************************************/\n function _estimateSendFee(\n uint16 _dstChainId,\n bytes32 _toAddress,\n uint _amount,\n bool _useZro,\n bytes memory _adapterParams\n ) internal view virtual returns (uint nativeFee, uint zroFee) {\n // mock the payload for sendFrom()\n bytes memory payload = _encodeSendPayload(_toAddress, _ld2sd(_amount));\n return lzEndpoint.estimateFees(_dstChainId, address(this), payload, _useZro, _adapterParams);\n }\n\n function _estimateSendAndCallFee(\n uint16 _dstChainId,\n bytes32 _toAddress,\n uint _amount,\n bytes memory _payload,\n uint64 _dstGasForCall,\n bool _useZro,\n bytes memory _adapterParams\n ) internal view virtual returns (uint nativeFee, uint zroFee) {\n // mock the payload for sendAndCall()\n bytes memory payload = _encodeSendAndCallPayload(msg.sender, _toAddress, _ld2sd(_amount), _payload, _dstGasForCall);\n return lzEndpoint.estimateFees(_dstChainId, address(this), payload, _useZro, _adapterParams);\n }\n\n function _nonblockingLzReceive(\n uint16 _srcChainId,\n bytes memory _srcAddress,\n uint64 _nonce,\n bytes memory _payload\n ) internal virtual override {\n uint8 packetType = _payload.toUint8(0);\n\n if (packetType == PT_SEND) {\n _sendAck(_srcChainId, _srcAddress, _nonce, _payload);\n } else if (packetType == PT_SEND_AND_CALL) {\n _sendAndCallAck(_srcChainId, _srcAddress, _nonce, _payload);\n } else {\n revert(\"OFTCore: unknown packet type\");\n }\n }\n\n function _send(\n address _from,\n uint16 _dstChainId,\n bytes32 _toAddress,\n uint _amount,\n address payable _refundAddress,\n address _zroPaymentAddress,\n bytes memory _adapterParams\n ) internal virtual returns (uint amount) {\n _checkGasLimit(_dstChainId, PT_SEND, _adapterParams, NO_EXTRA_GAS);\n\n (amount, ) = _removeDust(_amount);\n amount = _debitFrom(_from, _dstChainId, _toAddress, amount); // amount returned should not have dust\n require(amount > 0, \"OFTCore: amount too small\");\n\n bytes memory lzPayload = _encodeSendPayload(_toAddress, _ld2sd(amount));\n _lzSend(_dstChainId, lzPayload, _refundAddress, _zroPaymentAddress, _adapterParams, msg.value);\n\n emit SendToChain(_dstChainId, _from, _toAddress, amount);\n }\n\n function _sendAck(\n uint16 _srcChainId,\n bytes memory,\n uint64,\n bytes memory _payload\n ) internal virtual {\n (address to, uint64 amountSD) = _decodeSendPayload(_payload);\n if (to == address(0)) {\n to = address(0xdead);\n }\n\n uint amount = _sd2ld(amountSD);\n amount = _creditTo(_srcChainId, to, amount);\n\n emit ReceiveFromChain(_srcChainId, to, amount);\n }\n\n function _sendAndCall(\n address _from,\n uint16 _dstChainId,\n bytes32 _toAddress,\n uint _amount,\n bytes memory _payload,\n uint64 _dstGasForCall,\n address payable _refundAddress,\n address _zroPaymentAddress,\n bytes memory _adapterParams\n ) internal virtual returns (uint amount) {\n _checkGasLimit(_dstChainId, PT_SEND_AND_CALL, _adapterParams, _dstGasForCall);\n\n (amount, ) = _removeDust(_amount);\n amount = _debitFrom(_from, _dstChainId, _toAddress, amount);\n require(amount > 0, \"OFTCore: amount too small\");\n\n // encode the msg.sender into the payload instead of _from\n bytes memory lzPayload = _encodeSendAndCallPayload(msg.sender, _toAddress, _ld2sd(amount), _payload, _dstGasForCall);\n _lzSend(_dstChainId, lzPayload, _refundAddress, _zroPaymentAddress, _adapterParams, msg.value);\n\n emit SendToChain(_dstChainId, _from, _toAddress, amount);\n }\n\n function _sendAndCallAck(\n uint16 _srcChainId,\n bytes memory _srcAddress,\n uint64 _nonce,\n bytes memory _payload\n ) internal virtual {\n (bytes32 from, address to, uint64 amountSD, bytes memory payloadForCall, uint64 gasForCall) = _decodeSendAndCallPayload(_payload);\n\n bool credited = creditedPackets[_srcChainId][_srcAddress][_nonce];\n uint amount = _sd2ld(amountSD);\n\n // credit to this contract first, and then transfer to receiver only if callOnOFTReceived() succeeds\n if (!credited) {\n amount = _creditTo(_srcChainId, address(this), amount);\n creditedPackets[_srcChainId][_srcAddress][_nonce] = true;\n }\n\n if (!_isContract(to)) {\n emit NonContractAddress(to);\n return;\n }\n\n // workaround for stack too deep\n uint16 srcChainId = _srcChainId;\n bytes memory srcAddress = _srcAddress;\n uint64 nonce = _nonce;\n bytes memory payload = _payload;\n bytes32 from_ = from;\n address to_ = to;\n uint amount_ = amount;\n bytes memory payloadForCall_ = payloadForCall;\n\n // no gas limit for the call if retry\n uint gas = credited ? gasleft() : gasForCall;\n (bool success, bytes memory reason) = address(this).excessivelySafeCall(\n gasleft(),\n 150,\n abi.encodeWithSelector(this.callOnOFTReceived.selector, srcChainId, srcAddress, nonce, from_, to_, amount_, payloadForCall_, gas)\n );\n\n if (success) {\n bytes32 hash = keccak256(payload);\n emit CallOFTReceivedSuccess(srcChainId, srcAddress, nonce, hash);\n } else {\n // store the failed message into the nonblockingLzApp\n _storeFailedMessage(srcChainId, srcAddress, nonce, payload, reason);\n }\n }\n\n function _isContract(address _account) internal view returns (bool) {\n return _account.code.length > 0;\n }\n\n function _ld2sd(uint _amount) internal view virtual returns (uint64) {\n uint amountSD = _amount / _ld2sdRate();\n require(amountSD <= type(uint64).max, \"OFTCore: amountSD overflow\");\n return uint64(amountSD);\n }\n\n function _sd2ld(uint64 _amountSD) internal view virtual returns (uint) {\n return _amountSD * _ld2sdRate();\n }\n\n function _removeDust(uint _amount) internal view virtual returns (uint amountAfter, uint dust) {\n dust = _amount % _ld2sdRate();\n amountAfter = _amount - dust;\n }\n\n function _encodeSendPayload(bytes32 _toAddress, uint64 _amountSD) internal view virtual returns (bytes memory) {\n return abi.encodePacked(PT_SEND, _toAddress, _amountSD);\n }\n\n function _decodeSendPayload(bytes memory _payload) internal view virtual returns (address to, uint64 amountSD) {\n require(_payload.toUint8(0) == PT_SEND && _payload.length == 41, \"OFTCore: invalid payload\");\n\n to = _payload.toAddress(13); // drop the first 12 bytes of bytes32\n amountSD = _payload.toUint64(33);\n }\n\n function _encodeSendAndCallPayload(\n address _from,\n bytes32 _toAddress,\n uint64 _amountSD,\n bytes memory _payload,\n uint64 _dstGasForCall\n ) internal view virtual returns (bytes memory) {\n return abi.encodePacked(PT_SEND_AND_CALL, _toAddress, _amountSD, _addressToBytes32(_from), _dstGasForCall, _payload);\n }\n\n function _decodeSendAndCallPayload(bytes memory _payload)\n internal\n view\n virtual\n returns (\n bytes32 from,\n address to,\n uint64 amountSD,\n bytes memory payload,\n uint64 dstGasForCall\n )\n {\n require(_payload.toUint8(0) == PT_SEND_AND_CALL, \"OFTCore: invalid payload\");\n\n to = _payload.toAddress(13); // drop the first 12 bytes of bytes32\n amountSD = _payload.toUint64(33);\n from = _payload.toBytes32(41);\n dstGasForCall = _payload.toUint64(73);\n payload = _payload.slice(81, _payload.length - 81);\n }\n\n function _addressToBytes32(address _address) internal pure virtual returns (bytes32) {\n return bytes32(uint(uint160(_address)));\n }\n\n function _debitFrom(\n address _from,\n uint16 _dstChainId,\n bytes32 _toAddress,\n uint _amount\n ) internal virtual returns (uint);\n\n function _creditTo(\n uint16 _srcChainId,\n address _toAddress,\n uint _amount\n ) internal virtual returns (uint);\n\n function _transferFrom(\n address _from,\n address _to,\n uint _amount\n ) internal virtual returns (uint);\n\n function _ld2sdRate() internal view virtual returns (uint);\n}\n" }, - "@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.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() public virtual {\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.9.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. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby disabling 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.9.0) (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 * ```solidity\n * contract MyToken is ERC20Upgradeable {\n * function initialize() initializer public {\n * __ERC20_init(\"MyToken\", \"MTK\");\n * }\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.9.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 * Furthermore, `isContract` will also return true if the target contract within\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\n * which only has an effect at the end of a transaction.\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://consensys.net/diligence/blog/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.8.0/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(address target, bytes memory data, uint256 value) 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 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 (bool success, bytes memory returndata) = target.delegatecall(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.9.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 * ```solidity\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 * ```solidity\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. We recommend using {AccessControlDefaultAdminRules}\n * to enforce additional security measures for this role.\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" }, @@ -106,50 +91,38 @@ "@openzeppelin/contracts/utils/Strings.sol": { "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./math/Math.sol\";\nimport \"./math/SignedMath.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 `int256` to its ASCII `string` decimal representation.\n */\n function toString(int256 value) internal pure returns (string memory) {\n return string(abi.encodePacked(value < 0 ? \"-\" : \"\", toString(SignedMath.abs(value))));\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 /**\n * @dev Returns true if the two strings are equal.\n */\n function equal(string memory a, string memory b) internal pure returns (bool) {\n return keccak256(bytes(a)) == keccak256(bytes(b));\n }\n}\n" }, - "@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV8.sol": { - "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.13;\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" - }, "@venusprotocol/governance-contracts/contracts/Governance/AccessControlManager.sol": { - "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.13;\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" + "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" }, "@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV8.sol": { - "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.13;\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" + "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" }, "@venusprotocol/oracle/contracts/interfaces/OracleInterface.sol": { - "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.13;\n\ninterface OracleInterface {\n function getPrice(address asset) external view returns (uint256);\n}\n\ninterface ResilientOracleInterface is OracleInterface {\n function updatePrice(address vToken) external;\n\n function updateAssetPrice(address asset) external;\n\n function getUnderlyingPrice(address vToken) external view returns (uint256);\n}\n\ninterface TwapInterface is OracleInterface {\n function updateTwap(address asset) external returns (uint256);\n}\n\ninterface BoundValidatorInterface {\n function validatePriceWithAnchorPrice(\n address asset,\n uint256 reporterPrice,\n uint256 anchorPrice\n ) external view returns (bool);\n}\n" + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity ^0.8.25;\n\ninterface OracleInterface {\n function getPrice(address asset) external view returns (uint256);\n}\n\ninterface ResilientOracleInterface is OracleInterface {\n function updatePrice(address vToken) external;\n\n function updateAssetPrice(address asset) external;\n\n function getUnderlyingPrice(address vToken) external view returns (uint256);\n}\n\ninterface TwapInterface is OracleInterface {\n function updateTwap(address asset) external returns (uint256);\n}\n\ninterface BoundValidatorInterface {\n function validatePriceWithAnchorPrice(\n address asset,\n uint256 reporterPrice,\n uint256 anchorPrice\n ) external view returns (bool);\n}\n" }, "@venusprotocol/solidity-utilities/contracts/constants.sol": { - "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.13;\n\n/// @dev Base unit for computations, usually used in scaling (multiplications, divisions)\nuint256 constant EXP_SCALE = 1e18;\n\n/// @dev A unit (literal one) in EXP_SCALE, usually used in additions/subtractions\nuint256 constant MANTISSA_ONE = EXP_SCALE;\n" + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity ^0.8.25;\n\n/// @dev Base unit for computations, usually used in scaling (multiplications, divisions)\nuint256 constant EXP_SCALE = 1e18;\n\n/// @dev A unit (literal one) in EXP_SCALE, usually used in additions/subtractions\nuint256 constant MANTISSA_ONE = EXP_SCALE;\n\n/// @dev The approximate number of seconds per year\nuint256 constant SECONDS_PER_YEAR = 31_536_000;\n" }, "@venusprotocol/solidity-utilities/contracts/ExponentialNoError.sol": { - "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.13;\n\nimport { EXP_SCALE as EXP_SCALE_, MANTISSA_ONE as MANTISSA_ONE_ } from \"./constants.sol\";\n\n/**\n * @title Exponential module for storing fixed-precision decimals\n * @author Compound\n * @notice Exp is a struct which stores decimals with a fixed precision of 18 decimal places.\n * Thus, if we wanted to store the 5.1, mantissa would store 5.1e18. That is:\n * `Exp({mantissa: 5100000000000000000})`.\n */\ncontract ExponentialNoError {\n struct Exp {\n uint256 mantissa;\n }\n\n struct Double {\n uint256 mantissa;\n }\n\n uint256 internal constant EXP_SCALE = EXP_SCALE_;\n uint256 internal constant DOUBLE_SCALE = 1e36;\n uint256 internal constant HALF_EXP_SCALE = EXP_SCALE / 2;\n uint256 internal constant MANTISSA_ONE = MANTISSA_ONE_;\n\n /**\n * @dev Truncates the given exp to a whole number value.\n * For example, truncate(Exp{mantissa: 15 * EXP_SCALE}) = 15\n */\n function truncate(Exp memory exp) internal pure returns (uint256) {\n // Note: We are not using careful math here as we're performing a division that cannot fail\n return exp.mantissa / EXP_SCALE;\n }\n\n /**\n * @dev Multiply an Exp by a scalar, then truncate to return an unsigned integer.\n */\n // solhint-disable-next-line func-name-mixedcase\n function mul_ScalarTruncate(Exp memory a, uint256 scalar) internal pure returns (uint256) {\n Exp memory product = mul_(a, scalar);\n return truncate(product);\n }\n\n /**\n * @dev Multiply an Exp by a scalar, truncate, then add an to an unsigned integer, returning an unsigned integer.\n */\n // solhint-disable-next-line func-name-mixedcase\n function mul_ScalarTruncateAddUInt(Exp memory a, uint256 scalar, uint256 addend) internal pure returns (uint256) {\n Exp memory product = mul_(a, scalar);\n return add_(truncate(product), addend);\n }\n\n /**\n * @dev Checks if first Exp is less than second Exp.\n */\n function lessThanExp(Exp memory left, Exp memory right) internal pure returns (bool) {\n return left.mantissa < right.mantissa;\n }\n\n function safe224(uint256 n, string memory errorMessage) internal pure returns (uint224) {\n require(n <= type(uint224).max, errorMessage);\n return uint224(n);\n }\n\n function safe32(uint256 n, string memory errorMessage) internal pure returns (uint32) {\n require(n <= type(uint32).max, errorMessage);\n return uint32(n);\n }\n\n function add_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\n return Exp({ mantissa: add_(a.mantissa, b.mantissa) });\n }\n\n function add_(Double memory a, Double memory b) internal pure returns (Double memory) {\n return Double({ mantissa: add_(a.mantissa, b.mantissa) });\n }\n\n function add_(uint256 a, uint256 b) internal pure returns (uint256) {\n return a + b;\n }\n\n function sub_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\n return Exp({ mantissa: sub_(a.mantissa, b.mantissa) });\n }\n\n function sub_(Double memory a, Double memory b) internal pure returns (Double memory) {\n return Double({ mantissa: sub_(a.mantissa, b.mantissa) });\n }\n\n function sub_(uint256 a, uint256 b) internal pure returns (uint256) {\n return a - b;\n }\n\n function mul_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\n return Exp({ mantissa: mul_(a.mantissa, b.mantissa) / EXP_SCALE });\n }\n\n function mul_(Exp memory a, uint256 b) internal pure returns (Exp memory) {\n return Exp({ mantissa: mul_(a.mantissa, b) });\n }\n\n function mul_(uint256 a, Exp memory b) internal pure returns (uint256) {\n return mul_(a, b.mantissa) / EXP_SCALE;\n }\n\n function mul_(Double memory a, Double memory b) internal pure returns (Double memory) {\n return Double({ mantissa: mul_(a.mantissa, b.mantissa) / DOUBLE_SCALE });\n }\n\n function mul_(Double memory a, uint256 b) internal pure returns (Double memory) {\n return Double({ mantissa: mul_(a.mantissa, b) });\n }\n\n function mul_(uint256 a, Double memory b) internal pure returns (uint256) {\n return mul_(a, b.mantissa) / DOUBLE_SCALE;\n }\n\n function mul_(uint256 a, uint256 b) internal pure returns (uint256) {\n return a * b;\n }\n\n function div_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\n return Exp({ mantissa: div_(mul_(a.mantissa, EXP_SCALE), b.mantissa) });\n }\n\n function div_(Exp memory a, uint256 b) internal pure returns (Exp memory) {\n return Exp({ mantissa: div_(a.mantissa, b) });\n }\n\n function div_(uint256 a, Exp memory b) internal pure returns (uint256) {\n return div_(mul_(a, EXP_SCALE), b.mantissa);\n }\n\n function div_(Double memory a, Double memory b) internal pure returns (Double memory) {\n return Double({ mantissa: div_(mul_(a.mantissa, DOUBLE_SCALE), b.mantissa) });\n }\n\n function div_(Double memory a, uint256 b) internal pure returns (Double memory) {\n return Double({ mantissa: div_(a.mantissa, b) });\n }\n\n function div_(uint256 a, Double memory b) internal pure returns (uint256) {\n return div_(mul_(a, DOUBLE_SCALE), b.mantissa);\n }\n\n function div_(uint256 a, uint256 b) internal pure returns (uint256) {\n return a / b;\n }\n\n function fraction(uint256 a, uint256 b) internal pure returns (Double memory) {\n return Double({ mantissa: div_(mul_(a, DOUBLE_SCALE), b) });\n }\n}\n" + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.25;\n\nimport { EXP_SCALE as EXP_SCALE_, MANTISSA_ONE as MANTISSA_ONE_ } from \"./constants.sol\";\n\n/**\n * @title Exponential module for storing fixed-precision decimals\n * @author Compound\n * @notice Exp is a struct which stores decimals with a fixed precision of 18 decimal places.\n * Thus, if we wanted to store the 5.1, mantissa would store 5.1e18. That is:\n * `Exp({mantissa: 5100000000000000000})`.\n */\ncontract ExponentialNoError {\n struct Exp {\n uint256 mantissa;\n }\n\n struct Double {\n uint256 mantissa;\n }\n\n uint256 internal constant EXP_SCALE = EXP_SCALE_;\n uint256 internal constant DOUBLE_SCALE = 1e36;\n uint256 internal constant HALF_EXP_SCALE = EXP_SCALE / 2;\n uint256 internal constant MANTISSA_ONE = MANTISSA_ONE_;\n\n /**\n * @dev Truncates the given exp to a whole number value.\n * For example, truncate(Exp{mantissa: 15 * EXP_SCALE}) = 15\n */\n function truncate(Exp memory exp) internal pure returns (uint256) {\n // Note: We are not using careful math here as we're performing a division that cannot fail\n return exp.mantissa / EXP_SCALE;\n }\n\n /**\n * @dev Multiply an Exp by a scalar, then truncate to return an unsigned integer.\n */\n // solhint-disable-next-line func-name-mixedcase\n function mul_ScalarTruncate(Exp memory a, uint256 scalar) internal pure returns (uint256) {\n Exp memory product = mul_(a, scalar);\n return truncate(product);\n }\n\n /**\n * @dev Multiply an Exp by a scalar, truncate, then add an to an unsigned integer, returning an unsigned integer.\n */\n // solhint-disable-next-line func-name-mixedcase\n function mul_ScalarTruncateAddUInt(Exp memory a, uint256 scalar, uint256 addend) internal pure returns (uint256) {\n Exp memory product = mul_(a, scalar);\n return add_(truncate(product), addend);\n }\n\n /**\n * @dev Checks if first Exp is less than second Exp.\n */\n function lessThanExp(Exp memory left, Exp memory right) internal pure returns (bool) {\n return left.mantissa < right.mantissa;\n }\n\n function safe224(uint256 n, string memory errorMessage) internal pure returns (uint224) {\n require(n <= type(uint224).max, errorMessage);\n return uint224(n);\n }\n\n function safe32(uint256 n, string memory errorMessage) internal pure returns (uint32) {\n require(n <= type(uint32).max, errorMessage);\n return uint32(n);\n }\n\n function add_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\n return Exp({ mantissa: add_(a.mantissa, b.mantissa) });\n }\n\n function add_(Double memory a, Double memory b) internal pure returns (Double memory) {\n return Double({ mantissa: add_(a.mantissa, b.mantissa) });\n }\n\n function add_(uint256 a, uint256 b) internal pure returns (uint256) {\n return a + b;\n }\n\n function sub_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\n return Exp({ mantissa: sub_(a.mantissa, b.mantissa) });\n }\n\n function sub_(Double memory a, Double memory b) internal pure returns (Double memory) {\n return Double({ mantissa: sub_(a.mantissa, b.mantissa) });\n }\n\n function sub_(uint256 a, uint256 b) internal pure returns (uint256) {\n return a - b;\n }\n\n function mul_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\n return Exp({ mantissa: mul_(a.mantissa, b.mantissa) / EXP_SCALE });\n }\n\n function mul_(Exp memory a, uint256 b) internal pure returns (Exp memory) {\n return Exp({ mantissa: mul_(a.mantissa, b) });\n }\n\n function mul_(uint256 a, Exp memory b) internal pure returns (uint256) {\n return mul_(a, b.mantissa) / EXP_SCALE;\n }\n\n function mul_(Double memory a, Double memory b) internal pure returns (Double memory) {\n return Double({ mantissa: mul_(a.mantissa, b.mantissa) / DOUBLE_SCALE });\n }\n\n function mul_(Double memory a, uint256 b) internal pure returns (Double memory) {\n return Double({ mantissa: mul_(a.mantissa, b) });\n }\n\n function mul_(uint256 a, Double memory b) internal pure returns (uint256) {\n return mul_(a, b.mantissa) / DOUBLE_SCALE;\n }\n\n function mul_(uint256 a, uint256 b) internal pure returns (uint256) {\n return a * b;\n }\n\n function div_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\n return Exp({ mantissa: div_(mul_(a.mantissa, EXP_SCALE), b.mantissa) });\n }\n\n function div_(Exp memory a, uint256 b) internal pure returns (Exp memory) {\n return Exp({ mantissa: div_(a.mantissa, b) });\n }\n\n function div_(uint256 a, Exp memory b) internal pure returns (uint256) {\n return div_(mul_(a, EXP_SCALE), b.mantissa);\n }\n\n function div_(Double memory a, Double memory b) internal pure returns (Double memory) {\n return Double({ mantissa: div_(mul_(a.mantissa, DOUBLE_SCALE), b.mantissa) });\n }\n\n function div_(Double memory a, uint256 b) internal pure returns (Double memory) {\n return Double({ mantissa: div_(a.mantissa, b) });\n }\n\n function div_(uint256 a, Double memory b) internal pure returns (uint256) {\n return div_(mul_(a, DOUBLE_SCALE), b.mantissa);\n }\n\n function div_(uint256 a, uint256 b) internal pure returns (uint256) {\n return a / b;\n }\n\n function fraction(uint256 a, uint256 b) internal pure returns (Double memory) {\n return Double({ mantissa: div_(mul_(a, DOUBLE_SCALE), b) });\n }\n}\n" }, "@venusprotocol/solidity-utilities/contracts/validators.sol": { - "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.13;\n\n/// @notice Thrown if the supplied address is a zero address where it is not allowed\nerror ZeroAddressNotAllowed();\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" + "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/Bridge/BaseXVSProxyOFT.sol": { - "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.13;\n\nimport { SafeERC20, IERC20 } from \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\nimport { ResilientOracleInterface } from \"@venusprotocol/oracle/contracts/interfaces/OracleInterface.sol\";\nimport { Pausable } from \"@openzeppelin/contracts/security/Pausable.sol\";\nimport { BaseOFTV2 } from \"@layerzerolabs/solidity-examples/contracts/token/oft/v2/BaseOFTV2.sol\";\nimport { ensureNonzeroAddress } from \"@venusprotocol/solidity-utilities/contracts/validators.sol\";\nimport { ExponentialNoError } from \"@venusprotocol/solidity-utilities/contracts/ExponentialNoError.sol\";\n\n/**\n * @title BaseXVSProxyOFT\n * @author Venus\n * @notice The BaseXVSProxyOFT contract is tailored for facilitating cross-chain transactions with an ERC20 token.\n * It manages transaction limits of a single and daily transactions.\n * This contract inherits key functionalities from other contracts, including pausing capabilities and error handling.\n * It holds state variables for the inner token and maps for tracking transaction limits and statistics across various chains and addresses.\n * The contract allows the owner to configure limits, set whitelists, and control pausing.\n * Internal functions conduct eligibility check of transactions, making the contract a fundamental component for cross-chain token management.\n */\n\nabstract contract BaseXVSProxyOFT is Pausable, ExponentialNoError, BaseOFTV2 {\n using SafeERC20 for IERC20;\n IERC20 internal immutable innerToken;\n uint256 internal immutable ld2sdRate;\n bool public sendAndCallEnabled;\n\n /**\n * @notice The address of ResilientOracle contract wrapped in its interface.\n */\n ResilientOracleInterface public oracle;\n /**\n * @notice Maximum limit for a single transaction in USD(scaled with 18 decimals) from local chain.\n */\n mapping(uint16 => uint256) public chainIdToMaxSingleTransactionLimit;\n /**\n * @notice Maximum daily limit for transactions in USD(scaled with 18 decimals) from local chain.\n */\n mapping(uint16 => uint256) public chainIdToMaxDailyLimit;\n /**\n * @notice Total sent amount in USD(scaled with 18 decimals) within the last 24-hour window from local chain.\n */\n mapping(uint16 => uint256) public chainIdToLast24HourTransferred;\n /**\n * @notice Timestamp when the last 24-hour window started from local chain.\n */\n mapping(uint16 => uint256) public chainIdToLast24HourWindowStart;\n /**\n * @notice Maximum limit for a single receive transaction in USD(scaled with 18 decimals) from remote chain.\n */\n mapping(uint16 => uint256) public chainIdToMaxSingleReceiveTransactionLimit;\n /**\n * @notice Maximum daily limit for receiving transactions in USD(scaled with 18 decimals) from remote chain.\n */\n mapping(uint16 => uint256) public chainIdToMaxDailyReceiveLimit;\n /**\n * @notice Total received amount in USD(scaled with 18 decimals) within the last 24-hour window from remote chain.\n */\n mapping(uint16 => uint256) public chainIdToLast24HourReceived;\n /**\n * @notice Timestamp when the last 24-hour window started from remote chain.\n */\n mapping(uint16 => uint256) public chainIdToLast24HourReceiveWindowStart;\n /**\n * @notice Address on which cap check and bound limit is not applicable.\n */\n mapping(address => bool) public whitelist;\n\n /**\n * @notice Emitted when address is added to whitelist.\n */\n event SetWhitelist(address indexed addr, bool isWhitelist);\n /**\n * @notice Emitted when the maximum limit for a single transaction from local chain is modified.\n */\n event SetMaxSingleTransactionLimit(uint16 chainId, uint256 oldMaxLimit, uint256 newMaxLimit);\n /**\n * @notice Emitted when the maximum daily limit of transactions from local chain is modified.\n */\n event SetMaxDailyLimit(uint16 chainId, uint256 oldMaxLimit, uint256 newMaxLimit);\n /**\n * @notice Emitted when the maximum limit for a single receive transaction from remote chain is modified.\n */\n event SetMaxSingleReceiveTransactionLimit(uint16 chainId, uint256 oldMaxLimit, uint256 newMaxLimit);\n /**\n * @notice Emitted when the maximum daily limit for receiving transactions from remote chain is modified.\n */\n event SetMaxDailyReceiveLimit(uint16 chainId, uint256 oldMaxLimit, uint256 newMaxLimit);\n /**\n * @notice Event emitted when oracle is modified.\n */\n event OracleChanged(address indexed oldOracle, address indexed newOracle);\n /**\n * @notice Event emitted when trusted remote sets to empty.\n */\n event TrustedRemoteRemoved(uint16 chainId);\n /**\n * @notice Event emitted when inner token set successfully.\n */\n event InnerTokenAdded(address indexed innerToken);\n /**\n *@notice Emitted on sweep token success\n */\n event SweepToken(address indexed token, address indexed to, uint256 sweepAmount);\n /**\n * @notice Event emitted when SendAndCallEnabled updated successfully.\n */\n event UpdateSendAndCallEnabled(bool indexed enabled);\n /**\n *@notice Error thrown when this contract balance is less than sweep amount\n */\n error InsufficientBalance(uint256 sweepAmount, uint256 balance);\n\n /**\n * @param tokenAddress_ Address of the inner token.\n * @param sharedDecimals_ Number of shared decimals.\n * @param lzEndpoint_ Address of the layer zero endpoint contract.\n * @param oracle_ Address of the price oracle.\n * @custom:error ZeroAddressNotAllowed is thrown when token contract address is zero.\n * @custom:error ZeroAddressNotAllowed is thrown when lzEndpoint contract address is zero.\n * @custom:error ZeroAddressNotAllowed is thrown when oracle contract address is zero.\n * @custom:event Emits InnerTokenAdded with token address.\n * @custom:event Emits OracleChanged with zero address and oracle address.\n */\n constructor(\n address tokenAddress_,\n uint8 sharedDecimals_,\n address lzEndpoint_,\n address oracle_\n ) BaseOFTV2(sharedDecimals_, lzEndpoint_) {\n ensureNonzeroAddress(tokenAddress_);\n ensureNonzeroAddress(lzEndpoint_);\n ensureNonzeroAddress(oracle_);\n\n innerToken = IERC20(tokenAddress_);\n\n (bool success, bytes memory data) = tokenAddress_.staticcall(abi.encodeWithSignature(\"decimals()\"));\n require(success, \"ProxyOFT: failed to get token decimals\");\n uint8 decimals = abi.decode(data, (uint8));\n\n require(sharedDecimals_ <= decimals, \"ProxyOFT: sharedDecimals must be <= decimals\");\n ld2sdRate = 10 ** (decimals - sharedDecimals_);\n\n emit InnerTokenAdded(tokenAddress_);\n emit OracleChanged(address(0), oracle_);\n\n oracle = ResilientOracleInterface(oracle_);\n }\n\n /**\n * @notice Set the address of the ResilientOracle contract.\n * @dev Reverts if the new address is zero.\n * @param oracleAddress_ The new address of the ResilientOracle contract.\n * @custom:access Only owner.\n * @custom:event Emits OracleChanged with old and new oracle address.\n */\n function setOracle(address oracleAddress_) external onlyOwner {\n ensureNonzeroAddress(oracleAddress_);\n emit OracleChanged(address(oracle), oracleAddress_);\n oracle = ResilientOracleInterface(oracleAddress_);\n }\n\n /**\n * @notice Sets the limit of single transaction amount.\n * @param chainId_ Destination chain id.\n * @param limit_ Amount in USD(scaled with 18 decimals).\n * @custom:access Only owner.\n * @custom:event Emits SetMaxSingleTransactionLimit with old and new limit associated with chain id.\n */\n function setMaxSingleTransactionLimit(uint16 chainId_, uint256 limit_) external onlyOwner {\n require(limit_ <= chainIdToMaxDailyLimit[chainId_], \"Single transaction limit > Daily limit\");\n emit SetMaxSingleTransactionLimit(chainId_, chainIdToMaxSingleTransactionLimit[chainId_], limit_);\n chainIdToMaxSingleTransactionLimit[chainId_] = limit_;\n }\n\n /**\n * @notice Sets the limit of daily (24 Hour) transactions amount.\n * @param chainId_ Destination chain id.\n * @param limit_ Amount in USD(scaled with 18 decimals).\n * @custom:access Only owner.\n * @custom:event Emits setMaxDailyLimit with old and new limit associated with chain id.\n */\n function setMaxDailyLimit(uint16 chainId_, uint256 limit_) external onlyOwner {\n require(limit_ >= chainIdToMaxSingleTransactionLimit[chainId_], \"Daily limit < single transaction limit\");\n emit SetMaxDailyLimit(chainId_, chainIdToMaxDailyLimit[chainId_], limit_);\n chainIdToMaxDailyLimit[chainId_] = limit_;\n }\n\n /**\n * @notice Sets the maximum limit for a single receive transaction.\n * @param chainId_ The destination chain ID.\n * @param limit_ The new maximum limit in USD(scaled with 18 decimals).\n * @custom:access Only owner.\n * @custom:event Emits setMaxSingleReceiveTransactionLimit with old and new limit associated with chain id.\n */\n function setMaxSingleReceiveTransactionLimit(uint16 chainId_, uint256 limit_) external onlyOwner {\n require(limit_ <= chainIdToMaxDailyReceiveLimit[chainId_], \"single receive transaction limit > Daily limit\");\n emit SetMaxSingleReceiveTransactionLimit(chainId_, chainIdToMaxSingleReceiveTransactionLimit[chainId_], limit_);\n chainIdToMaxSingleReceiveTransactionLimit[chainId_] = limit_;\n }\n\n /**\n * @notice Sets the maximum daily limit for receiving transactions.\n * @param chainId_ The destination chain ID.\n * @param limit_ The new maximum daily limit in USD(scaled with 18 decimals).\n * @custom:access Only owner.\n * @custom:event Emits setMaxDailyReceiveLimit with old and new limit associated with chain id.\n */\n function setMaxDailyReceiveLimit(uint16 chainId_, uint256 limit_) external onlyOwner {\n require(\n limit_ >= chainIdToMaxSingleReceiveTransactionLimit[chainId_],\n \"Daily limit < single receive transaction limit\"\n );\n emit SetMaxDailyReceiveLimit(chainId_, chainIdToMaxDailyReceiveLimit[chainId_], limit_);\n chainIdToMaxDailyReceiveLimit[chainId_] = limit_;\n }\n\n /**\n * @notice Sets the whitelist address to skip checks on transaction limit.\n * @param user_ Address to be add in whitelist.\n * @param val_ Boolean to be set (true for user_ address is whitelisted).\n * @custom:access Only owner.\n * @custom:event Emits setWhitelist.\n */\n function setWhitelist(address user_, bool val_) external onlyOwner {\n emit SetWhitelist(user_, val_);\n whitelist[user_] = val_;\n }\n\n /**\n * @notice Triggers stopped state of the bridge.\n * @custom:access Only owner.\n */\n function pause() external onlyOwner {\n _pause();\n }\n\n /**\n * @notice Triggers resume state of the bridge.\n * @custom:access Only owner.\n */\n function unpause() external onlyOwner {\n _unpause();\n }\n\n /**\n * @notice A public function to sweep accidental ERC-20 transfers to this contract. Tokens are sent to user\n * @param token_ The address of the ERC-20 token to sweep\n * @param to_ The address of the recipient\n * @param amount_ The amount of tokens needs to transfer\n * @custom:event Emits SweepToken event\n * @custom:error Throw InsufficientBalance if amount_ is greater than the available balance of the token in the contract\n * @custom:access Only Owner\n */\n function sweepToken(IERC20 token_, address to_, uint256 amount_) external onlyOwner {\n uint256 balance = token_.balanceOf(address(this));\n if (amount_ > balance) {\n revert InsufficientBalance(amount_, balance);\n }\n\n emit SweepToken(address(token_), to_, amount_);\n\n token_.safeTransfer(to_, amount_);\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 Only owner.\n * @custom:event Emits TrustedRemoteRemoved once chain id is removed from trusted remote.\n */\n function removeTrustedRemote(uint16 remoteChainId_) external onlyOwner {\n delete trustedRemoteLookup[remoteChainId_];\n emit TrustedRemoteRemoved(remoteChainId_);\n }\n\n /**\n * @notice It enables or disables sendAndCall functionality for the bridge.\n * @param enabled_ Boolean indicating whether the sendAndCall function should be enabled or disabled.\n */\n function updateSendAndCallEnabled(bool enabled_) external onlyOwner {\n sendAndCallEnabled = enabled_;\n emit UpdateSendAndCallEnabled(enabled_);\n }\n\n /**\n * @notice Checks the eligibility of a sender to initiate a cross-chain token transfer.\n * @dev This external view function assesses whether the specified sender is eligible to transfer the given amount\n * to the specified destination chain. It considers factors such as whitelisting, transaction limits, and a 24-hour window.\n * @param from_ The sender's address initiating the transfer.\n * @param dstChainId_ Indicates destination chain.\n * @param amount_ The quantity of tokens to be transferred.\n * @return eligibleToSend A boolean indicating whether the sender is eligible to transfer the tokens.\n * @return maxSingleTransactionLimit The maximum limit for a single transaction.\n * @return maxDailyLimit The maximum daily limit for transactions.\n * @return amountInUsd The equivalent amount in USD based on the oracle price.\n * @return transferredInWindow The total amount transferred in the current 24-hour window.\n * @return last24HourWindowStart The timestamp when the current 24-hour window started.\n * @return isWhiteListedUser A boolean indicating whether the sender is whitelisted.\n */\n function isEligibleToSend(\n address from_,\n uint16 dstChainId_,\n uint256 amount_\n )\n external\n view\n returns (\n bool eligibleToSend,\n uint256 maxSingleTransactionLimit,\n uint256 maxDailyLimit,\n uint256 amountInUsd,\n uint256 transferredInWindow,\n uint256 last24HourWindowStart,\n bool isWhiteListedUser\n )\n {\n // Check if the sender's address is whitelisted\n isWhiteListedUser = whitelist[from_];\n\n // Calculate the amount in USD using the oracle price\n Exp memory oraclePrice = Exp({ mantissa: oracle.getPrice(token()) });\n amountInUsd = mul_ScalarTruncate(oraclePrice, amount_);\n\n // Load values for the 24-hour window checks\n uint256 currentBlockTimestamp = block.timestamp;\n last24HourWindowStart = chainIdToLast24HourWindowStart[dstChainId_];\n transferredInWindow = chainIdToLast24HourTransferred[dstChainId_];\n maxSingleTransactionLimit = chainIdToMaxSingleTransactionLimit[dstChainId_];\n maxDailyLimit = chainIdToMaxDailyLimit[dstChainId_];\n if (currentBlockTimestamp - last24HourWindowStart > 1 days) {\n transferredInWindow = amountInUsd;\n last24HourWindowStart = currentBlockTimestamp;\n } else {\n transferredInWindow += amountInUsd;\n }\n eligibleToSend = (isWhiteListedUser ||\n ((amountInUsd <= maxSingleTransactionLimit) && (transferredInWindow <= maxDailyLimit)));\n }\n\n /**\n * @notice Initiates a cross-chain token transfer and triggers a call on the destination chain.\n * @dev This internal override function enables the contract to send tokens and invoke calls on the specified\n * destination chain. It checks whether the sendAndCall feature is enabled before proceeding with the transfer.\n * @param from_ Address from which tokens will be debited.\n * @param dstChainId_ Destination chain id on which tokens will be send.\n * @param toAddress_ Address on which tokens will be credited on destination chain.\n * @param amount_ Amount of tokens that will be transferred.\n * @param payload_ Additional data payload for the call on the destination chain.\n * @param dstGasForCall_ The amount of gas allocated for the call on the destination chain.\n * @param callparams_ Additional parameters, including refund address, ZRO payment address,\n * and adapter params.\n */\n function sendAndCall(\n address from_,\n uint16 dstChainId_,\n bytes32 toAddress_,\n uint256 amount_,\n bytes calldata payload_,\n uint64 dstGasForCall_,\n LzCallParams calldata callparams_\n ) public payable override {\n require(sendAndCallEnabled, \"sendAndCall is disabled\");\n\n super.sendAndCall(from_, dstChainId_, toAddress_, amount_, payload_, dstGasForCall_, callparams_);\n }\n\n function retryMessage(\n uint16 _srcChainId,\n bytes calldata _srcAddress,\n uint64 _nonce,\n bytes calldata _payload\n ) public payable override {\n bytes memory trustedRemote = trustedRemoteLookup[_srcChainId];\n // it will still block the message pathway from (srcChainId, srcAddress). should not receive message from untrusted remote.\n require(\n _srcAddress.length == trustedRemote.length &&\n trustedRemote.length > 0 &&\n keccak256(_srcAddress) == keccak256(trustedRemote),\n \"LzApp: invalid source sending contract\"\n );\n super.retryMessage(_srcChainId, _srcAddress, _nonce, _payload);\n }\n\n /**\n * @notice Empty implementation of renounce ownership to avoid any mishappening.\n */\n function renounceOwnership() public override {}\n\n /**\n * @notice Return's the address of the inner token of this bridge.\n * @return Address of the inner token of this bridge.\n */\n function token() public view override returns (address) {\n return address(innerToken);\n }\n\n /**\n * @notice Checks if the sender is eligible to send tokens\n * @param from_ Sender's address sending tokens\n * @param dstChainId_ Chain id on which tokens should be sent\n * @param amount_ Amount of tokens to be sent\n */\n function _isEligibleToSend(address from_, uint16 dstChainId_, uint256 amount_) internal {\n // Check if the sender's address is whitelisted\n bool isWhiteListedUser = whitelist[from_];\n // Check if the user is whitelisted and return if true\n if (isWhiteListedUser) {\n return;\n }\n\n // Calculate the amount in USD using the oracle price\n uint256 amountInUsd;\n Exp memory oraclePrice = Exp({ mantissa: oracle.getPrice(token()) });\n amountInUsd = mul_ScalarTruncate(oraclePrice, amount_);\n\n // Load values for the 24-hour window checks\n uint256 currentBlockTimestamp = block.timestamp;\n uint256 lastDayWindowStart = chainIdToLast24HourWindowStart[dstChainId_];\n uint256 transferredInWindow = chainIdToLast24HourTransferred[dstChainId_];\n uint256 maxSingleTransactionLimit = chainIdToMaxSingleTransactionLimit[dstChainId_];\n uint256 maxDailyLimit = chainIdToMaxDailyLimit[dstChainId_];\n\n // Revert if the amount exceeds the single transaction limit\n require(amountInUsd <= maxSingleTransactionLimit, \"Single Transaction Limit Exceed\");\n\n // Check if the time window has changed (more than 24 hours have passed)\n if (currentBlockTimestamp - lastDayWindowStart > 1 days) {\n transferredInWindow = amountInUsd;\n chainIdToLast24HourWindowStart[dstChainId_] = currentBlockTimestamp;\n } else {\n transferredInWindow += amountInUsd;\n }\n\n // Revert if the amount exceeds the daily limit\n require(transferredInWindow <= maxDailyLimit, \"Daily Transaction Limit Exceed\");\n\n // Update the amount for the 24-hour window\n chainIdToLast24HourTransferred[dstChainId_] = transferredInWindow;\n }\n\n /**\n * @notice Checks if receiver is able to receive tokens\n * @param toAddress_ Receiver address\n * @param srcChainId_ Source chain id from which token is send\n * @param receivedAmount_ Amount of tokens received\n */\n function _isEligibleToReceive(address toAddress_, uint16 srcChainId_, uint256 receivedAmount_) internal {\n // Check if the recipient's address is whitelisted\n bool isWhiteListedUser = whitelist[toAddress_];\n // Check if the user is whitelisted and return if true\n if (isWhiteListedUser) {\n return;\n }\n\n // Calculate the received amount in USD using the oracle price\n uint256 receivedAmountInUsd;\n Exp memory oraclePrice = Exp({ mantissa: oracle.getPrice(address(token())) });\n receivedAmountInUsd = mul_ScalarTruncate(oraclePrice, receivedAmount_);\n\n uint256 currentBlockTimestamp = block.timestamp;\n\n // Load values for the 24-hour window checks for receiving\n uint256 lastDayReceiveWindowStart = chainIdToLast24HourReceiveWindowStart[srcChainId_];\n uint256 receivedInWindow = chainIdToLast24HourReceived[srcChainId_];\n uint256 maxSingleReceiveTransactionLimit = chainIdToMaxSingleReceiveTransactionLimit[srcChainId_];\n uint256 maxDailyReceiveLimit = chainIdToMaxDailyReceiveLimit[srcChainId_];\n\n // Check if the received amount exceeds the single transaction limit\n require(receivedAmountInUsd <= maxSingleReceiveTransactionLimit, \"Single Transaction Limit Exceed\");\n\n // Check if the time window has changed (more than 24 hours have passed)\n if (currentBlockTimestamp - lastDayReceiveWindowStart > 1 days) {\n receivedInWindow = receivedAmountInUsd;\n chainIdToLast24HourReceiveWindowStart[srcChainId_] = currentBlockTimestamp;\n } else {\n receivedInWindow += receivedAmountInUsd;\n }\n\n // Revert if the received amount exceeds the daily limit\n require(receivedInWindow <= maxDailyReceiveLimit, \"Daily Transaction Limit Exceed\");\n\n // Update the received amount for the 24-hour window\n chainIdToLast24HourReceived[srcChainId_] = receivedInWindow;\n }\n\n /**\n * @notice Transfer tokens from sender to receiver account.\n * @param from_ Address from which token has to be transferred(Sender).\n * @param to_ Address on which token will be tranferred(Receiver).\n * @param amount_ Amount of token to be transferred.\n * @return Actual balance difference.\n */\n function _transferFrom(\n address from_,\n address to_,\n uint256 amount_\n ) internal override whenNotPaused returns (uint256) {\n uint256 before = innerToken.balanceOf(to_);\n if (from_ == address(this)) {\n innerToken.safeTransfer(to_, amount_);\n } else {\n innerToken.safeTransferFrom(from_, to_, amount_);\n }\n return innerToken.balanceOf(to_) - before;\n }\n\n /**\n * @notice Returns Conversion rate factor from large decimals to shared decimals.\n * @return Conversion rate factor.\n */\n function _ld2sdRate() internal view override returns (uint256) {\n return ld2sdRate;\n }\n}\n" + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.25;\n\nimport { SafeERC20, IERC20 } from \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\nimport { ResilientOracleInterface } from \"@venusprotocol/oracle/contracts/interfaces/OracleInterface.sol\";\nimport { Pausable } from \"@openzeppelin/contracts/security/Pausable.sol\";\nimport { BaseOFTV2 } from \"@layerzerolabs/solidity-examples/contracts/token/oft/v2/BaseOFTV2.sol\";\nimport { ensureNonzeroAddress } from \"@venusprotocol/solidity-utilities/contracts/validators.sol\";\nimport { ExponentialNoError } from \"@venusprotocol/solidity-utilities/contracts/ExponentialNoError.sol\";\n\n/**\n * @title BaseXVSProxyOFT\n * @author Venus\n * @notice The BaseXVSProxyOFT contract is tailored for facilitating cross-chain transactions with an ERC20 token.\n * It manages transaction limits of a single and daily transactions.\n * This contract inherits key functionalities from other contracts, including pausing capabilities and error handling.\n * It holds state variables for the inner token and maps for tracking transaction limits and statistics across various chains and addresses.\n * The contract allows the owner to configure limits, set whitelists, and control pausing.\n * Internal functions conduct eligibility check of transactions, making the contract a fundamental component for cross-chain token management.\n */\n\nabstract contract BaseXVSProxyOFT is Pausable, ExponentialNoError, BaseOFTV2 {\n using SafeERC20 for IERC20;\n IERC20 internal immutable innerToken;\n uint256 internal immutable ld2sdRate;\n bool public sendAndCallEnabled;\n\n /**\n * @notice The address of ResilientOracle contract wrapped in its interface.\n */\n ResilientOracleInterface public oracle;\n /**\n * @notice Maximum limit for a single transaction in USD(scaled with 18 decimals) from local chain.\n */\n mapping(uint16 => uint256) public chainIdToMaxSingleTransactionLimit;\n /**\n * @notice Maximum daily limit for transactions in USD(scaled with 18 decimals) from local chain.\n */\n mapping(uint16 => uint256) public chainIdToMaxDailyLimit;\n /**\n * @notice Total sent amount in USD(scaled with 18 decimals) within the last 24-hour window from local chain.\n */\n mapping(uint16 => uint256) public chainIdToLast24HourTransferred;\n /**\n * @notice Timestamp when the last 24-hour window started from local chain.\n */\n mapping(uint16 => uint256) public chainIdToLast24HourWindowStart;\n /**\n * @notice Maximum limit for a single receive transaction in USD(scaled with 18 decimals) from remote chain.\n */\n mapping(uint16 => uint256) public chainIdToMaxSingleReceiveTransactionLimit;\n /**\n * @notice Maximum daily limit for receiving transactions in USD(scaled with 18 decimals) from remote chain.\n */\n mapping(uint16 => uint256) public chainIdToMaxDailyReceiveLimit;\n /**\n * @notice Total received amount in USD(scaled with 18 decimals) within the last 24-hour window from remote chain.\n */\n mapping(uint16 => uint256) public chainIdToLast24HourReceived;\n /**\n * @notice Timestamp when the last 24-hour window started from remote chain.\n */\n mapping(uint16 => uint256) public chainIdToLast24HourReceiveWindowStart;\n /**\n * @notice Address on which cap check and bound limit is not applicable.\n */\n mapping(address => bool) public whitelist;\n\n /**\n * @notice Emitted when address is added to whitelist.\n */\n event SetWhitelist(address indexed addr, bool isWhitelist);\n /**\n * @notice Emitted when the maximum limit for a single transaction from local chain is modified.\n */\n event SetMaxSingleTransactionLimit(uint16 chainId, uint256 oldMaxLimit, uint256 newMaxLimit);\n /**\n * @notice Emitted when the maximum daily limit of transactions from local chain is modified.\n */\n event SetMaxDailyLimit(uint16 chainId, uint256 oldMaxLimit, uint256 newMaxLimit);\n /**\n * @notice Emitted when the maximum limit for a single receive transaction from remote chain is modified.\n */\n event SetMaxSingleReceiveTransactionLimit(uint16 chainId, uint256 oldMaxLimit, uint256 newMaxLimit);\n /**\n * @notice Emitted when the maximum daily limit for receiving transactions from remote chain is modified.\n */\n event SetMaxDailyReceiveLimit(uint16 chainId, uint256 oldMaxLimit, uint256 newMaxLimit);\n /**\n * @notice Event emitted when oracle is modified.\n */\n event OracleChanged(address indexed oldOracle, address indexed newOracle);\n /**\n * @notice Event emitted when trusted remote sets to empty.\n */\n event TrustedRemoteRemoved(uint16 chainId);\n /**\n * @notice Event emitted when inner token set successfully.\n */\n event InnerTokenAdded(address indexed innerToken);\n /**\n *@notice Emitted on sweep token success\n */\n event SweepToken(address indexed token, address indexed to, uint256 sweepAmount);\n /**\n * @notice Event emitted when SendAndCallEnabled updated successfully.\n */\n event UpdateSendAndCallEnabled(bool indexed enabled);\n /**\n *@notice Error thrown when this contract balance is less than sweep amount\n */\n error InsufficientBalance(uint256 sweepAmount, uint256 balance);\n\n /**\n * @param tokenAddress_ Address of the inner token.\n * @param sharedDecimals_ Number of shared decimals.\n * @param lzEndpoint_ Address of the layer zero endpoint contract.\n * @param oracle_ Address of the price oracle.\n * @custom:error ZeroAddressNotAllowed is thrown when token contract address is zero.\n * @custom:error ZeroAddressNotAllowed is thrown when lzEndpoint contract address is zero.\n * @custom:error ZeroAddressNotAllowed is thrown when oracle contract address is zero.\n * @custom:event Emits InnerTokenAdded with token address.\n * @custom:event Emits OracleChanged with zero address and oracle address.\n */\n constructor(\n address tokenAddress_,\n uint8 sharedDecimals_,\n address lzEndpoint_,\n address oracle_\n ) BaseOFTV2(sharedDecimals_, lzEndpoint_) {\n ensureNonzeroAddress(tokenAddress_);\n ensureNonzeroAddress(lzEndpoint_);\n ensureNonzeroAddress(oracle_);\n\n innerToken = IERC20(tokenAddress_);\n\n (bool success, bytes memory data) = tokenAddress_.staticcall(abi.encodeWithSignature(\"decimals()\"));\n require(success, \"ProxyOFT: failed to get token decimals\");\n uint8 decimals = abi.decode(data, (uint8));\n\n require(sharedDecimals_ <= decimals, \"ProxyOFT: sharedDecimals must be <= decimals\");\n ld2sdRate = 10 ** (decimals - sharedDecimals_);\n\n emit InnerTokenAdded(tokenAddress_);\n emit OracleChanged(address(0), oracle_);\n\n oracle = ResilientOracleInterface(oracle_);\n }\n\n /**\n * @notice Set the address of the ResilientOracle contract.\n * @dev Reverts if the new address is zero.\n * @param oracleAddress_ The new address of the ResilientOracle contract.\n * @custom:access Only owner.\n * @custom:event Emits OracleChanged with old and new oracle address.\n */\n function setOracle(address oracleAddress_) external onlyOwner {\n ensureNonzeroAddress(oracleAddress_);\n emit OracleChanged(address(oracle), oracleAddress_);\n oracle = ResilientOracleInterface(oracleAddress_);\n }\n\n /**\n * @notice Sets the limit of single transaction amount.\n * @param chainId_ Destination chain id.\n * @param limit_ Amount in USD(scaled with 18 decimals).\n * @custom:access Only owner.\n * @custom:event Emits SetMaxSingleTransactionLimit with old and new limit associated with chain id.\n */\n function setMaxSingleTransactionLimit(uint16 chainId_, uint256 limit_) external onlyOwner {\n require(limit_ <= chainIdToMaxDailyLimit[chainId_], \"Single transaction limit > Daily limit\");\n emit SetMaxSingleTransactionLimit(chainId_, chainIdToMaxSingleTransactionLimit[chainId_], limit_);\n chainIdToMaxSingleTransactionLimit[chainId_] = limit_;\n }\n\n /**\n * @notice Sets the limit of daily (24 Hour) transactions amount.\n * @param chainId_ Destination chain id.\n * @param limit_ Amount in USD(scaled with 18 decimals).\n * @custom:access Only owner.\n * @custom:event Emits setMaxDailyLimit with old and new limit associated with chain id.\n */\n function setMaxDailyLimit(uint16 chainId_, uint256 limit_) external onlyOwner {\n require(limit_ >= chainIdToMaxSingleTransactionLimit[chainId_], \"Daily limit < single transaction limit\");\n emit SetMaxDailyLimit(chainId_, chainIdToMaxDailyLimit[chainId_], limit_);\n chainIdToMaxDailyLimit[chainId_] = limit_;\n }\n\n /**\n * @notice Sets the maximum limit for a single receive transaction.\n * @param chainId_ The destination chain ID.\n * @param limit_ The new maximum limit in USD(scaled with 18 decimals).\n * @custom:access Only owner.\n * @custom:event Emits setMaxSingleReceiveTransactionLimit with old and new limit associated with chain id.\n */\n function setMaxSingleReceiveTransactionLimit(uint16 chainId_, uint256 limit_) external onlyOwner {\n require(limit_ <= chainIdToMaxDailyReceiveLimit[chainId_], \"single receive transaction limit > Daily limit\");\n emit SetMaxSingleReceiveTransactionLimit(chainId_, chainIdToMaxSingleReceiveTransactionLimit[chainId_], limit_);\n chainIdToMaxSingleReceiveTransactionLimit[chainId_] = limit_;\n }\n\n /**\n * @notice Sets the maximum daily limit for receiving transactions.\n * @param chainId_ The destination chain ID.\n * @param limit_ The new maximum daily limit in USD(scaled with 18 decimals).\n * @custom:access Only owner.\n * @custom:event Emits setMaxDailyReceiveLimit with old and new limit associated with chain id.\n */\n function setMaxDailyReceiveLimit(uint16 chainId_, uint256 limit_) external onlyOwner {\n require(\n limit_ >= chainIdToMaxSingleReceiveTransactionLimit[chainId_],\n \"Daily limit < single receive transaction limit\"\n );\n emit SetMaxDailyReceiveLimit(chainId_, chainIdToMaxDailyReceiveLimit[chainId_], limit_);\n chainIdToMaxDailyReceiveLimit[chainId_] = limit_;\n }\n\n /**\n * @notice Sets the whitelist address to skip checks on transaction limit.\n * @param user_ Address to be add in whitelist.\n * @param val_ Boolean to be set (true for user_ address is whitelisted).\n * @custom:access Only owner.\n * @custom:event Emits setWhitelist.\n */\n function setWhitelist(address user_, bool val_) external onlyOwner {\n emit SetWhitelist(user_, val_);\n whitelist[user_] = val_;\n }\n\n /**\n * @notice Triggers stopped state of the bridge.\n * @custom:access Only owner.\n */\n function pause() external onlyOwner {\n _pause();\n }\n\n /**\n * @notice Triggers resume state of the bridge.\n * @custom:access Only owner.\n */\n function unpause() external onlyOwner {\n _unpause();\n }\n\n /**\n * @notice A public function to sweep accidental ERC-20 transfers to this contract. Tokens are sent to user\n * @param token_ The address of the ERC-20 token to sweep\n * @param to_ The address of the recipient\n * @param amount_ The amount of tokens needs to transfer\n * @custom:event Emits SweepToken event\n * @custom:error Throw InsufficientBalance if amount_ is greater than the available balance of the token in the contract\n * @custom:access Only Owner\n */\n function sweepToken(IERC20 token_, address to_, uint256 amount_) external onlyOwner {\n uint256 balance = token_.balanceOf(address(this));\n if (amount_ > balance) {\n revert InsufficientBalance(amount_, balance);\n }\n\n emit SweepToken(address(token_), to_, amount_);\n\n token_.safeTransfer(to_, amount_);\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 Only owner.\n * @custom:event Emits TrustedRemoteRemoved once chain id is removed from trusted remote.\n */\n function removeTrustedRemote(uint16 remoteChainId_) external onlyOwner {\n delete trustedRemoteLookup[remoteChainId_];\n emit TrustedRemoteRemoved(remoteChainId_);\n }\n\n /**\n * @notice It enables or disables sendAndCall functionality for the bridge.\n * @param enabled_ Boolean indicating whether the sendAndCall function should be enabled or disabled.\n */\n function updateSendAndCallEnabled(bool enabled_) external onlyOwner {\n sendAndCallEnabled = enabled_;\n emit UpdateSendAndCallEnabled(enabled_);\n }\n\n /**\n * @notice Checks the eligibility of a sender to initiate a cross-chain token transfer.\n * @dev This external view function assesses whether the specified sender is eligible to transfer the given amount\n * to the specified destination chain. It considers factors such as whitelisting, transaction limits, and a 24-hour window.\n * @param from_ The sender's address initiating the transfer.\n * @param dstChainId_ Indicates destination chain.\n * @param amount_ The quantity of tokens to be transferred.\n * @return eligibleToSend A boolean indicating whether the sender is eligible to transfer the tokens.\n * @return maxSingleTransactionLimit The maximum limit for a single transaction.\n * @return maxDailyLimit The maximum daily limit for transactions.\n * @return amountInUsd The equivalent amount in USD based on the oracle price.\n * @return transferredInWindow The total amount transferred in the current 24-hour window.\n * @return last24HourWindowStart The timestamp when the current 24-hour window started.\n * @return isWhiteListedUser A boolean indicating whether the sender is whitelisted.\n */\n function isEligibleToSend(\n address from_,\n uint16 dstChainId_,\n uint256 amount_\n )\n external\n view\n returns (\n bool eligibleToSend,\n uint256 maxSingleTransactionLimit,\n uint256 maxDailyLimit,\n uint256 amountInUsd,\n uint256 transferredInWindow,\n uint256 last24HourWindowStart,\n bool isWhiteListedUser\n )\n {\n // Check if the sender's address is whitelisted\n isWhiteListedUser = whitelist[from_];\n\n // Calculate the amount in USD using the oracle price\n Exp memory oraclePrice = Exp({ mantissa: oracle.getPrice(token()) });\n amountInUsd = mul_ScalarTruncate(oraclePrice, amount_);\n\n // Load values for the 24-hour window checks\n uint256 currentBlockTimestamp = block.timestamp;\n last24HourWindowStart = chainIdToLast24HourWindowStart[dstChainId_];\n transferredInWindow = chainIdToLast24HourTransferred[dstChainId_];\n maxSingleTransactionLimit = chainIdToMaxSingleTransactionLimit[dstChainId_];\n maxDailyLimit = chainIdToMaxDailyLimit[dstChainId_];\n if (currentBlockTimestamp - last24HourWindowStart > 1 days) {\n transferredInWindow = amountInUsd;\n last24HourWindowStart = currentBlockTimestamp;\n } else {\n transferredInWindow += amountInUsd;\n }\n eligibleToSend = (isWhiteListedUser ||\n ((amountInUsd <= maxSingleTransactionLimit) && (transferredInWindow <= maxDailyLimit)));\n }\n\n /**\n * @notice Initiates a cross-chain token transfer and triggers a call on the destination chain.\n * @dev This internal override function enables the contract to send tokens and invoke calls on the specified\n * destination chain. It checks whether the sendAndCall feature is enabled before proceeding with the transfer.\n * @param from_ Address from which tokens will be debited.\n * @param dstChainId_ Destination chain id on which tokens will be send.\n * @param toAddress_ Address on which tokens will be credited on destination chain.\n * @param amount_ Amount of tokens that will be transferred.\n * @param payload_ Additional data payload for the call on the destination chain.\n * @param dstGasForCall_ The amount of gas allocated for the call on the destination chain.\n * @param callparams_ Additional parameters, including refund address, ZRO payment address,\n * and adapter params.\n */\n function sendAndCall(\n address from_,\n uint16 dstChainId_,\n bytes32 toAddress_,\n uint256 amount_,\n bytes calldata payload_,\n uint64 dstGasForCall_,\n LzCallParams calldata callparams_\n ) public payable override {\n require(sendAndCallEnabled, \"sendAndCall is disabled\");\n\n super.sendAndCall(from_, dstChainId_, toAddress_, amount_, payload_, dstGasForCall_, callparams_);\n }\n\n function retryMessage(\n uint16 _srcChainId,\n bytes calldata _srcAddress,\n uint64 _nonce,\n bytes calldata _payload\n ) public payable override {\n bytes memory trustedRemote = trustedRemoteLookup[_srcChainId];\n // it will still block the message pathway from (srcChainId, srcAddress). should not receive message from untrusted remote.\n require(\n _srcAddress.length == trustedRemote.length &&\n trustedRemote.length > 0 &&\n keccak256(_srcAddress) == keccak256(trustedRemote),\n \"LzApp: invalid source sending contract\"\n );\n super.retryMessage(_srcChainId, _srcAddress, _nonce, _payload);\n }\n\n /**\n * @notice Empty implementation of renounce ownership to avoid any mishappening.\n */\n function renounceOwnership() public override {}\n\n /**\n * @notice Return's the address of the inner token of this bridge.\n * @return Address of the inner token of this bridge.\n */\n function token() public view override returns (address) {\n return address(innerToken);\n }\n\n /**\n * @notice Checks if the sender is eligible to send tokens\n * @param from_ Sender's address sending tokens\n * @param dstChainId_ Chain id on which tokens should be sent\n * @param amount_ Amount of tokens to be sent\n */\n function _isEligibleToSend(address from_, uint16 dstChainId_, uint256 amount_) internal {\n // Check if the sender's address is whitelisted\n bool isWhiteListedUser = whitelist[from_];\n // Check if the user is whitelisted and return if true\n if (isWhiteListedUser) {\n return;\n }\n\n // Calculate the amount in USD using the oracle price\n uint256 amountInUsd;\n Exp memory oraclePrice = Exp({ mantissa: oracle.getPrice(token()) });\n amountInUsd = mul_ScalarTruncate(oraclePrice, amount_);\n\n // Load values for the 24-hour window checks\n uint256 currentBlockTimestamp = block.timestamp;\n uint256 lastDayWindowStart = chainIdToLast24HourWindowStart[dstChainId_];\n uint256 transferredInWindow = chainIdToLast24HourTransferred[dstChainId_];\n uint256 maxSingleTransactionLimit = chainIdToMaxSingleTransactionLimit[dstChainId_];\n uint256 maxDailyLimit = chainIdToMaxDailyLimit[dstChainId_];\n\n // Revert if the amount exceeds the single transaction limit\n require(amountInUsd <= maxSingleTransactionLimit, \"Single Transaction Limit Exceed\");\n\n // Check if the time window has changed (more than 24 hours have passed)\n if (currentBlockTimestamp - lastDayWindowStart > 1 days) {\n transferredInWindow = amountInUsd;\n chainIdToLast24HourWindowStart[dstChainId_] = currentBlockTimestamp;\n } else {\n transferredInWindow += amountInUsd;\n }\n\n // Revert if the amount exceeds the daily limit\n require(transferredInWindow <= maxDailyLimit, \"Daily Transaction Limit Exceed\");\n\n // Update the amount for the 24-hour window\n chainIdToLast24HourTransferred[dstChainId_] = transferredInWindow;\n }\n\n /**\n * @notice Checks if receiver is able to receive tokens\n * @param toAddress_ Receiver address\n * @param srcChainId_ Source chain id from which token is send\n * @param receivedAmount_ Amount of tokens received\n */\n function _isEligibleToReceive(address toAddress_, uint16 srcChainId_, uint256 receivedAmount_) internal {\n // Check if the recipient's address is whitelisted\n bool isWhiteListedUser = whitelist[toAddress_];\n // Check if the user is whitelisted and return if true\n if (isWhiteListedUser) {\n return;\n }\n\n // Calculate the received amount in USD using the oracle price\n uint256 receivedAmountInUsd;\n Exp memory oraclePrice = Exp({ mantissa: oracle.getPrice(address(token())) });\n receivedAmountInUsd = mul_ScalarTruncate(oraclePrice, receivedAmount_);\n\n uint256 currentBlockTimestamp = block.timestamp;\n\n // Load values for the 24-hour window checks for receiving\n uint256 lastDayReceiveWindowStart = chainIdToLast24HourReceiveWindowStart[srcChainId_];\n uint256 receivedInWindow = chainIdToLast24HourReceived[srcChainId_];\n uint256 maxSingleReceiveTransactionLimit = chainIdToMaxSingleReceiveTransactionLimit[srcChainId_];\n uint256 maxDailyReceiveLimit = chainIdToMaxDailyReceiveLimit[srcChainId_];\n\n // Check if the received amount exceeds the single transaction limit\n require(receivedAmountInUsd <= maxSingleReceiveTransactionLimit, \"Single Transaction Limit Exceed\");\n\n // Check if the time window has changed (more than 24 hours have passed)\n if (currentBlockTimestamp - lastDayReceiveWindowStart > 1 days) {\n receivedInWindow = receivedAmountInUsd;\n chainIdToLast24HourReceiveWindowStart[srcChainId_] = currentBlockTimestamp;\n } else {\n receivedInWindow += receivedAmountInUsd;\n }\n\n // Revert if the received amount exceeds the daily limit\n require(receivedInWindow <= maxDailyReceiveLimit, \"Daily Transaction Limit Exceed\");\n\n // Update the received amount for the 24-hour window\n chainIdToLast24HourReceived[srcChainId_] = receivedInWindow;\n }\n\n /**\n * @notice Transfer tokens from sender to receiver account.\n * @param from_ Address from which token has to be transferred(Sender).\n * @param to_ Address on which token will be tranferred(Receiver).\n * @param amount_ Amount of token to be transferred.\n * @return Actual balance difference.\n */\n function _transferFrom(\n address from_,\n address to_,\n uint256 amount_\n ) internal override whenNotPaused returns (uint256) {\n uint256 before = innerToken.balanceOf(to_);\n if (from_ == address(this)) {\n innerToken.safeTransfer(to_, amount_);\n } else {\n innerToken.safeTransferFrom(from_, to_, amount_);\n }\n return innerToken.balanceOf(to_) - before;\n }\n\n /**\n * @notice Returns Conversion rate factor from large decimals to shared decimals.\n * @return Conversion rate factor.\n */\n function _ld2sdRate() internal view override returns (uint256) {\n return ld2sdRate;\n }\n}\n" }, "contracts/Bridge/interfaces/IXVS.sol": { - "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.13;\n\n/**\n * @title IXVS\n * @author Venus\n * @notice Interface implemented by `XVS` token.\n */\ninterface IXVS {\n function mint(address to, uint256 amount) external;\n\n function burn(address from, uint256 amount) external;\n}\n" + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity ^0.8.25;\n\n/**\n * @title IXVS\n * @author Venus\n * @notice Interface implemented by `XVS` token.\n */\ninterface IXVS {\n function mint(address to, uint256 amount) external;\n\n function burn(address from, uint256 amount) external;\n}\n" }, "contracts/Bridge/interfaces/IXVSProxyOFT.sol": { - "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.13;\n\n/**\n * @title IXVSProxyOFT\n * @author Venus\n * @notice Interface implemented by `XVSProxyOFT`.\n */\ninterface IXVSProxyOFT {\n function transferOwnership(address addr) external;\n\n function setTrustedRemoteAddress(uint16 remoteChainId, bytes calldata srcAddress) external;\n\n function isTrustedRemote(uint16 remoteChainId, bytes calldata srcAddress) external returns (bool);\n}\n" + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity ^0.8.25;\n\n/**\n * @title IXVSProxyOFT\n * @author Venus\n * @notice Interface implemented by `XVSProxyOFT`.\n */\ninterface IXVSProxyOFT {\n function transferOwnership(address addr) external;\n\n function setTrustedRemoteAddress(uint16 remoteChainId, bytes calldata srcAddress) external;\n\n function isTrustedRemote(uint16 remoteChainId, bytes calldata srcAddress) external returns (bool);\n}\n" }, "contracts/Bridge/token/TokenController.sol": { - "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.13;\nimport { IAccessControlManagerV8 } from \"@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV8.sol\";\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\";\n\n/**\n * @title TokenController\n * @author Venus\n * @notice TokenController contract acts as a governance and access control mechanism,\n * allowing the owner to manage minting restrictions and blacklist certain addresses to maintain control and security within the token ecosystem.\n * It provides a flexible framework for token-related operations.\n */\n\ncontract TokenController is Ownable, Pausable {\n /**\n * @notice Access control manager contract address.\n */\n address public accessControlManager;\n /**\n * @notice A Mapping used to keep track of the blacklist status of addresses.\n */\n mapping(address => bool) internal _blacklist;\n /**\n * @notice A mapping is used to keep track of the maximum amount a minter is permitted to mint.\n */\n mapping(address => uint256) public minterToCap;\n /**\n * @notice A Mapping used to keep track of the amount i.e already minted by minter.\n */\n mapping(address => uint256) public minterToMintedAmount;\n\n /**\n * @notice Emitted when the blacklist status of a user is updated.\n */\n event BlacklistUpdated(address indexed user, bool value);\n /**\n * @notice Emitted when the minting limit for a minter is increased.\n */\n event MintLimitIncreased(address indexed minter, uint256 newLimit);\n /**\n * @notice Emitted when the minting limit for a minter is decreased.\n */\n event MintLimitDecreased(address indexed minter, uint256 newLimit);\n /**\n * @notice Emitted when the minting cap for a minter is changed.\n */\n event MintCapChanged(address indexed minter, uint256 amount);\n /**\n * @notice Emitted when the address of the access control manager of the contract is updated.\n */\n event NewAccessControlManager(address indexed oldAccessControlManager, address indexed newAccessControlManager);\n /**\n * @notice Emitted when all minted tokens are migrated from one minter to another.\n */\n event MintedTokensMigrated(address indexed source, address indexed destination);\n\n /**\n * @notice This error is used to indicate that the minting limit has been exceeded. It is typically thrown when a minting operation would surpass the defined cap.\n */\n error MintLimitExceed();\n /**\n * @notice This error is used to indicate that `mint` `burn` and `transfer` actions are not allowed for the user address.\n */\n error AccountBlacklisted(address user);\n /**\n * @notice This error is used to indicate that sender is not allowed to perform this action.\n */\n error Unauthorized();\n /**\n * @notice This error is used to indicate that the new cap is greater than the previously minted tokens for the minter.\n */\n error NewCapNotGreaterThanMintedTokens();\n /**\n * @notice This error is used to indicate that the addresses must be different.\n */\n error AddressesMustDiffer();\n /**\n * @notice This error is used to indicate that the minter did not mint the required amount of tokens.\n */\n error MintedAmountExceed();\n\n /**\n * @param accessControlManager_ Address of access control manager contract.\n * @custom:error ZeroAddressNotAllowed is thrown when accessControlManager contract address is zero.\n */\n constructor(address accessControlManager_) {\n ensureNonzeroAddress(accessControlManager_);\n accessControlManager = accessControlManager_;\n }\n\n /**\n * @notice Pauses Token\n * @custom:access Controlled by AccessControlManager.\n */\n function pause() external {\n _ensureAllowed(\"pause()\");\n _pause();\n }\n\n /**\n * @notice Resumes Token\n * @custom:access Controlled by AccessControlManager.\n */\n function unpause() external {\n _ensureAllowed(\"unpause()\");\n _unpause();\n }\n\n /**\n * @notice Function to update blacklist.\n * @param user_ User address to be affected.\n * @param value_ Boolean to toggle value.\n * @custom:access Controlled by AccessControlManager.\n * @custom:event Emits BlacklistUpdated event.\n */\n function updateBlacklist(address user_, bool value_) external {\n _ensureAllowed(\"updateBlacklist(address,bool)\");\n _blacklist[user_] = value_;\n emit BlacklistUpdated(user_, value_);\n }\n\n /**\n * @notice Sets the minting cap for minter.\n * @param minter_ Minter address.\n * @param amount_ Cap for the minter.\n * @custom:access Controlled by AccessControlManager.\n * @custom:event Emits MintCapChanged.\n */\n function setMintCap(address minter_, uint256 amount_) external {\n _ensureAllowed(\"setMintCap(address,uint256)\");\n\n if (amount_ < minterToMintedAmount[minter_]) {\n revert NewCapNotGreaterThanMintedTokens();\n }\n\n minterToCap[minter_] = amount_;\n emit MintCapChanged(minter_, amount_);\n }\n\n /**\n * @notice Sets the address of the access control manager of this contract.\n * @dev Admin function to set the access control address.\n * @param newAccessControlAddress_ New address for the access control.\n * @custom:access Only owner.\n * @custom:event Emits NewAccessControlManager.\n * @custom:error ZeroAddressNotAllowed is thrown when newAccessControlAddress_ contract address is zero.\n */\n function setAccessControlManager(address newAccessControlAddress_) external onlyOwner {\n ensureNonzeroAddress(newAccessControlAddress_);\n emit NewAccessControlManager(accessControlManager, newAccessControlAddress_);\n accessControlManager = newAccessControlAddress_;\n }\n\n /**\n * @notice Migrates all minted tokens from one minter to another. This function is useful when we want to permanent take down a bridge.\n * @param source_ Minter address to migrate tokens from.\n * @param destination_ Minter address to migrate tokens to.\n * @custom:access Controlled by AccessControlManager.\n * @custom:error MintLimitExceed is thrown when the minting limit exceeds the cap after migration.\n * @custom:error AddressesMustDiffer is thrown when the source_ and destination_ addresses are the same.\n * @custom:event Emits MintLimitIncreased and MintLimitDecreased events for 'source' and 'destination'.\n * @custom:event Emits MintedTokensMigrated.\n */\n function migrateMinterTokens(address source_, address destination_) external {\n _ensureAllowed(\"migrateMinterTokens(address,address)\");\n\n if (source_ == destination_) {\n revert AddressesMustDiffer();\n }\n\n uint256 sourceCap = minterToCap[source_];\n uint256 destinationCap = minterToCap[destination_];\n\n uint256 sourceMinted = minterToMintedAmount[source_];\n uint256 destinationMinted = minterToMintedAmount[destination_];\n uint256 newDestinationMinted = destinationMinted + sourceMinted;\n\n if (newDestinationMinted > destinationCap) {\n revert MintLimitExceed();\n }\n\n minterToMintedAmount[source_] = 0;\n minterToMintedAmount[destination_] = newDestinationMinted;\n uint256 availableLimit;\n unchecked {\n availableLimit = destinationCap - newDestinationMinted;\n }\n\n emit MintLimitDecreased(destination_, availableLimit);\n emit MintLimitIncreased(source_, sourceCap);\n emit MintedTokensMigrated(source_, destination_);\n }\n\n /**\n * @notice Returns the blacklist status of the address.\n * @param user_ Address of user to check blacklist status.\n * @return bool status of blacklist.\n */\n function isBlackListed(address user_) external view returns (bool) {\n return _blacklist[user_];\n }\n\n /**\n * @dev Checks the minter cap and eligibility of receiver to receive tokens.\n * @param from_ Minter address.\n * @param to_ Receiver address.\n * @param amount_ Amount to be mint.\n * @custom:error MintLimitExceed is thrown when minting limit exceeds the cap.\n * @custom:event Emits MintLimitDecreased with minter address and available limits.\n */\n function _isEligibleToMint(address from_, address to_, uint256 amount_) internal {\n uint256 mintingCap = minterToCap[from_];\n uint256 totalMintedOld = minterToMintedAmount[from_];\n uint256 totalMintedNew = totalMintedOld + amount_;\n\n if (totalMintedNew > mintingCap) {\n revert MintLimitExceed();\n }\n minterToMintedAmount[from_] = totalMintedNew;\n uint256 availableLimit;\n unchecked {\n availableLimit = mintingCap - totalMintedNew;\n }\n emit MintLimitDecreased(from_, availableLimit);\n }\n\n /**\n * @dev This is post hook of burn function, increases minting limit of the minter.\n * @param from_ Minter address.\n * @param amount_ Amount burned.\n * @custom:error MintedAmountExceed is thrown when `amount_` is greater than the tokens minted by `from_`.\n * @custom:event Emits MintLimitIncreased with minter address and availabe limit.\n */\n function _increaseMintLimit(address from_, uint256 amount_) internal {\n uint256 totalMintedOld = minterToMintedAmount[from_];\n\n if (totalMintedOld < amount_) {\n revert MintedAmountExceed();\n }\n\n uint256 totalMintedNew;\n unchecked {\n totalMintedNew = totalMintedOld - amount_;\n }\n minterToMintedAmount[from_] = totalMintedNew;\n uint256 availableLimit = minterToCap[from_] - totalMintedNew;\n emit MintLimitIncreased(from_, availableLimit);\n }\n\n /**\n * @dev Checks the caller is allowed to call the specified fuction.\n * @param functionSig_ Function signatureon which access is to be checked.\n * @custom:error Unauthorized, thrown when unauthorised user try to access function.\n */\n function _ensureAllowed(string memory functionSig_) internal view {\n if (!IAccessControlManagerV8(accessControlManager).isAllowedToCall(msg.sender, functionSig_)) {\n revert Unauthorized();\n }\n }\n}\n" + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.25;\n\nimport { IAccessControlManagerV8 } from \"@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV8.sol\";\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\";\n\n/**\n * @title TokenController\n * @author Venus\n * @notice TokenController contract acts as a governance and access control mechanism,\n * allowing the owner to manage minting restrictions and blacklist certain addresses to maintain control and security within the token ecosystem.\n * It provides a flexible framework for token-related operations.\n */\n\ncontract TokenController is Ownable, Pausable {\n /**\n * @notice Access control manager contract address.\n */\n address public accessControlManager;\n /**\n * @notice A Mapping used to keep track of the blacklist status of addresses.\n */\n mapping(address => bool) internal _blacklist;\n /**\n * @notice A mapping is used to keep track of the maximum amount a minter is permitted to mint.\n */\n mapping(address => uint256) public minterToCap;\n /**\n * @notice A Mapping used to keep track of the amount i.e already minted by minter.\n */\n mapping(address => uint256) public minterToMintedAmount;\n\n /**\n * @notice Emitted when the blacklist status of a user is updated.\n */\n event BlacklistUpdated(address indexed user, bool value);\n /**\n * @notice Emitted when the minting limit for a minter is increased.\n */\n event MintLimitIncreased(address indexed minter, uint256 newLimit);\n /**\n * @notice Emitted when the minting limit for a minter is decreased.\n */\n event MintLimitDecreased(address indexed minter, uint256 newLimit);\n /**\n * @notice Emitted when the minting cap for a minter is changed.\n */\n event MintCapChanged(address indexed minter, uint256 amount);\n /**\n * @notice Emitted when the address of the access control manager of the contract is updated.\n */\n event NewAccessControlManager(address indexed oldAccessControlManager, address indexed newAccessControlManager);\n /**\n * @notice Emitted when all minted tokens are migrated from one minter to another.\n */\n event MintedTokensMigrated(address indexed source, address indexed destination);\n\n /**\n * @notice This error is used to indicate that the minting limit has been exceeded. It is typically thrown when a minting operation would surpass the defined cap.\n */\n error MintLimitExceed();\n /**\n * @notice This error is used to indicate that `mint` `burn` and `transfer` actions are not allowed for the user address.\n */\n error AccountBlacklisted(address user);\n /**\n * @notice This error is used to indicate that sender is not allowed to perform this action.\n */\n error Unauthorized();\n /**\n * @notice This error is used to indicate that the new cap is greater than the previously minted tokens for the minter.\n */\n error NewCapNotGreaterThanMintedTokens();\n /**\n * @notice This error is used to indicate that the addresses must be different.\n */\n error AddressesMustDiffer();\n /**\n * @notice This error is used to indicate that the minter did not mint the required amount of tokens.\n */\n error MintedAmountExceed();\n\n /**\n * @param accessControlManager_ Address of access control manager contract.\n * @custom:error ZeroAddressNotAllowed is thrown when accessControlManager contract address is zero.\n */\n constructor(address accessControlManager_) {\n ensureNonzeroAddress(accessControlManager_);\n accessControlManager = accessControlManager_;\n }\n\n /**\n * @notice Pauses Token\n * @custom:access Controlled by AccessControlManager.\n */\n function pause() external {\n _ensureAllowed(\"pause()\");\n _pause();\n }\n\n /**\n * @notice Resumes Token\n * @custom:access Controlled by AccessControlManager.\n */\n function unpause() external {\n _ensureAllowed(\"unpause()\");\n _unpause();\n }\n\n /**\n * @notice Function to update blacklist.\n * @param user_ User address to be affected.\n * @param value_ Boolean to toggle value.\n * @custom:access Controlled by AccessControlManager.\n * @custom:event Emits BlacklistUpdated event.\n */\n function updateBlacklist(address user_, bool value_) external {\n _ensureAllowed(\"updateBlacklist(address,bool)\");\n _blacklist[user_] = value_;\n emit BlacklistUpdated(user_, value_);\n }\n\n /**\n * @notice Sets the minting cap for minter.\n * @param minter_ Minter address.\n * @param amount_ Cap for the minter.\n * @custom:access Controlled by AccessControlManager.\n * @custom:event Emits MintCapChanged.\n */\n function setMintCap(address minter_, uint256 amount_) external {\n _ensureAllowed(\"setMintCap(address,uint256)\");\n\n if (amount_ < minterToMintedAmount[minter_]) {\n revert NewCapNotGreaterThanMintedTokens();\n }\n\n minterToCap[minter_] = amount_;\n emit MintCapChanged(minter_, amount_);\n }\n\n /**\n * @notice Sets the address of the access control manager of this contract.\n * @dev Admin function to set the access control address.\n * @param newAccessControlAddress_ New address for the access control.\n * @custom:access Only owner.\n * @custom:event Emits NewAccessControlManager.\n * @custom:error ZeroAddressNotAllowed is thrown when newAccessControlAddress_ contract address is zero.\n */\n function setAccessControlManager(address newAccessControlAddress_) external onlyOwner {\n ensureNonzeroAddress(newAccessControlAddress_);\n emit NewAccessControlManager(accessControlManager, newAccessControlAddress_);\n accessControlManager = newAccessControlAddress_;\n }\n\n /**\n * @notice Migrates all minted tokens from one minter to another. This function is useful when we want to permanent take down a bridge.\n * @param source_ Minter address to migrate tokens from.\n * @param destination_ Minter address to migrate tokens to.\n * @custom:access Controlled by AccessControlManager.\n * @custom:error MintLimitExceed is thrown when the minting limit exceeds the cap after migration.\n * @custom:error AddressesMustDiffer is thrown when the source_ and destination_ addresses are the same.\n * @custom:event Emits MintLimitIncreased and MintLimitDecreased events for 'source' and 'destination'.\n * @custom:event Emits MintedTokensMigrated.\n */\n function migrateMinterTokens(address source_, address destination_) external {\n _ensureAllowed(\"migrateMinterTokens(address,address)\");\n\n if (source_ == destination_) {\n revert AddressesMustDiffer();\n }\n\n uint256 sourceCap = minterToCap[source_];\n uint256 destinationCap = minterToCap[destination_];\n\n uint256 sourceMinted = minterToMintedAmount[source_];\n uint256 destinationMinted = minterToMintedAmount[destination_];\n uint256 newDestinationMinted = destinationMinted + sourceMinted;\n\n if (newDestinationMinted > destinationCap) {\n revert MintLimitExceed();\n }\n\n minterToMintedAmount[source_] = 0;\n minterToMintedAmount[destination_] = newDestinationMinted;\n uint256 availableLimit;\n unchecked {\n availableLimit = destinationCap - newDestinationMinted;\n }\n\n emit MintLimitDecreased(destination_, availableLimit);\n emit MintLimitIncreased(source_, sourceCap);\n emit MintedTokensMigrated(source_, destination_);\n }\n\n /**\n * @notice Returns the blacklist status of the address.\n * @param user_ Address of user to check blacklist status.\n * @return bool status of blacklist.\n */\n function isBlackListed(address user_) external view returns (bool) {\n return _blacklist[user_];\n }\n\n /**\n * @dev Checks the minter cap and eligibility of receiver to receive tokens.\n * @param from_ Minter address.\n * @param to_ Receiver address.\n * @param amount_ Amount to be mint.\n * @custom:error MintLimitExceed is thrown when minting limit exceeds the cap.\n * @custom:event Emits MintLimitDecreased with minter address and available limits.\n */\n function _isEligibleToMint(address from_, address to_, uint256 amount_) internal {\n uint256 mintingCap = minterToCap[from_];\n uint256 totalMintedOld = minterToMintedAmount[from_];\n uint256 totalMintedNew = totalMintedOld + amount_;\n\n if (totalMintedNew > mintingCap) {\n revert MintLimitExceed();\n }\n minterToMintedAmount[from_] = totalMintedNew;\n uint256 availableLimit;\n unchecked {\n availableLimit = mintingCap - totalMintedNew;\n }\n emit MintLimitDecreased(from_, availableLimit);\n }\n\n /**\n * @dev This is post hook of burn function, increases minting limit of the minter.\n * @param from_ Minter address.\n * @param amount_ Amount burned.\n * @custom:error MintedAmountExceed is thrown when `amount_` is greater than the tokens minted by `from_`.\n * @custom:event Emits MintLimitIncreased with minter address and availabe limit.\n */\n function _increaseMintLimit(address from_, uint256 amount_) internal {\n uint256 totalMintedOld = minterToMintedAmount[from_];\n\n if (totalMintedOld < amount_) {\n revert MintedAmountExceed();\n }\n\n uint256 totalMintedNew;\n unchecked {\n totalMintedNew = totalMintedOld - amount_;\n }\n minterToMintedAmount[from_] = totalMintedNew;\n uint256 availableLimit = minterToCap[from_] - totalMintedNew;\n emit MintLimitIncreased(from_, availableLimit);\n }\n\n /**\n * @dev Checks the caller is allowed to call the specified fuction.\n * @param functionSig_ Function signatureon which access is to be checked.\n * @custom:error Unauthorized, thrown when unauthorised user try to access function.\n */\n function _ensureAllowed(string memory functionSig_) internal view {\n if (!IAccessControlManagerV8(accessControlManager).isAllowedToCall(msg.sender, functionSig_)) {\n revert Unauthorized();\n }\n }\n}\n" }, "contracts/Bridge/token/XVS.sol": { - "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.13;\n\nimport { ERC20 } from \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\n\nimport { TokenController } from \"./TokenController.sol\";\n\n/**\n * @title XVS\n * @author Venus\n * @notice XVS contract serves as a customized ERC-20 token with additional minting and burning functionality.\n * It also incorporates access control features provided by the \"TokenController\" contract to ensure proper governance and restrictions on minting and burning operations.\n */\n\ncontract XVS is ERC20, TokenController {\n constructor(address accessControlManager_) ERC20(\"Venus XVS\", \"XVS\") TokenController(accessControlManager_) {}\n\n /**\n * @notice Creates `amount_` tokens and assigns them to `account_`, increasing\n * the total supply. Checks access and eligibility.\n * @param account_ Address to which tokens are assigned.\n * @param amount_ Amount of tokens to be assigned.\n * @custom:access Controlled by AccessControlManager.\n * @custom:event Emits MintLimitDecreased with new available limit.\n * @custom:error MintLimitExceed is thrown when minting amount exceeds the maximum cap.\n */\n function mint(address account_, uint256 amount_) external whenNotPaused {\n _ensureAllowed(\"mint(address,uint256)\");\n _isEligibleToMint(msg.sender, account_, amount_);\n _mint(account_, amount_);\n }\n\n /**\n * @notice Destroys `amount_` tokens from `account_`, reducing the\n * total supply. Checks access and eligibility.\n * @param account_ Address from which tokens be destroyed.\n * @param amount_ Amount of tokens to be destroyed.\n * @custom:access Controlled by AccessControlManager.\n * @custom:event Emits MintLimitIncreased with new available limit.\n */\n function burn(address account_, uint256 amount_) external whenNotPaused {\n _ensureAllowed(\"burn(address,uint256)\");\n _burn(account_, amount_);\n _increaseMintLimit(msg.sender, amount_);\n }\n\n /**\n * @notice Hook that is called before any transfer of tokens. This includes\n * minting and burning.\n * @param from_ Address of account from which tokens are to be transferred.\n * @param to_ Address of the account to which tokens are to be transferred.\n * @param amount_ The amount of tokens to be transferred.\n * @custom:error AccountBlacklisted is thrown when either `from` or `to` address is blacklisted.\n */\n function _beforeTokenTransfer(address from_, address to_, uint256 amount_) internal override whenNotPaused {\n if (_blacklist[to_]) {\n revert AccountBlacklisted(to_);\n }\n if (_blacklist[from_]) {\n revert AccountBlacklisted(from_);\n }\n }\n}\n" - }, - "contracts/Bridge/XVSBridgeAdmin.sol": { - "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.8.13;\n\nimport { AccessControlledV8 } from \"@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV8.sol\";\nimport { ensureNonzeroAddress } from \"@venusprotocol/solidity-utilities/contracts/validators.sol\";\nimport { IXVSProxyOFT } from \"./interfaces/IXVSProxyOFT.sol\";\n\n/**\n * @title XVSBridgeAdmin\n * @author Venus\n * @notice The XVSBridgeAdmin contract extends a parent contract AccessControlledV8 for access control, and it manages an external contract called XVSProxyOFT.\n * It maintains a registry of function signatures and names,\n * allowing for dynamic function handling i.e checking of access control of interaction with only owner functions.\n */\ncontract XVSBridgeAdmin is AccessControlledV8 {\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n IXVSProxyOFT public immutable XVSBridge;\n /**\n * @notice A mapping keeps track of function signature associated with function name string.\n */\n mapping(bytes4 => string) public functionRegistry;\n\n /**\n * @notice emitted when function registry updated\n */\n event FunctionRegistryChanged(string signature, bool active);\n\n /// @custom:oz-upgrades-unsafe-allow constructor\n constructor(address XVSBridge_) {\n ensureNonzeroAddress(XVSBridge_);\n XVSBridge = IXVSProxyOFT(XVSBridge_);\n _disableInitializers();\n }\n\n /**\n * @param accessControlManager_ Address of access control manager contract.\n */\n function initialize(address accessControlManager_) external initializer {\n __AccessControlled_init(accessControlManager_);\n }\n\n /**\n * @notice Invoked when called function does not exist in the contract.\n * @return Response of low level call.\n * @custom:access Controlled by AccessControlManager.\n */\n fallback(bytes calldata data) external returns (bytes memory) {\n string memory fun = _getFunctionName(msg.sig);\n require(bytes(fun).length != 0, \"Function not found\");\n _checkAccessAllowed(fun);\n (bool ok, bytes memory res) = address(XVSBridge).call(data);\n require(ok, \"call failed\");\n return res;\n }\n\n /**\n * @notice Sets trusted remote on particular chain.\n * @param remoteChainId_ Chain Id of the destination chain.\n * @param remoteAddress_ Address of the destination bridge.\n * @custom:access Controlled by AccessControlManager.\n * @custom:error ZeroAddressNotAllowed is thrown when remoteAddress_ contract address is zero.\n */\n function setTrustedRemoteAddress(uint16 remoteChainId_, bytes calldata remoteAddress_) external {\n _checkAccessAllowed(\"setTrustedRemoteAddress(uint16,bytes)\");\n require(remoteChainId_ != 0, \"ChainId must not be zero\");\n ensureNonzeroAddress(bytesToAddress(remoteAddress_));\n XVSBridge.setTrustedRemoteAddress(remoteChainId_, remoteAddress_);\n }\n\n /**\n * @notice A setter for the 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 * @custom:event Emits FunctionRegistryChanged if bool value of function changes.\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; ) {\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 unchecked {\n ++i;\n }\n }\n }\n\n /**\n * @notice This function transfers the ownership of the bridge from this contract to new owner.\n * @param newOwner_ New owner of the XVS Bridge.\n * @custom:access Controlled by AccessControlManager.\n */\n function transferBridgeOwnership(address newOwner_) external {\n _checkAccessAllowed(\"transferBridgeOwnership(address)\");\n XVSBridge.transferOwnership(newOwner_);\n }\n\n /**\n * @notice Returns true if remote address is trustedRemote corresponds to chainId_.\n * @param remoteChainId_ Chain Id of the destination chain.\n * @param remoteAddress_ Address of the destination bridge.\n * @custom:error ZeroAddressNotAllowed is thrown when remoteAddress_ contract address is zero.\n * @return Bool indicating whether the remote chain is trusted or not.\n */\n function isTrustedRemote(uint16 remoteChainId_, bytes calldata remoteAddress_) external returns (bool) {\n require(remoteChainId_ != 0, \"ChainId must not be zero\");\n ensureNonzeroAddress(bytesToAddress(remoteAddress_));\n return XVSBridge.isTrustedRemote(remoteChainId_, remoteAddress_);\n }\n\n /**\n * @notice Empty implementation of renounce ownership to avoid any mishappening.\n */\n function renounceOwnership() public override {}\n\n /**\n * @dev Returns function name string associated with function signature.\n * @param signature_ Four bytes of function signature.\n * @return Function signature corresponding to its hash.\n */\n function _getFunctionName(bytes4 signature_) internal view returns (string memory) {\n return functionRegistry[signature_];\n }\n\n /**\n * @notice Converts given bytes into address.\n * @param b Bytes to be converted into address.\n * @return Converted address of given bytes.\n */\n function bytesToAddress(bytes calldata b) private pure returns (address) {\n return address(uint160(bytes20(b)));\n }\n}\n" - }, - "contracts/Bridge/XVSProxyOFTDest.sol": { - "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.13;\n\nimport { IXVS } from \"./interfaces/IXVS.sol\";\nimport { BaseXVSProxyOFT } from \"./BaseXVSProxyOFT.sol\";\n\n/**\n * @title XVSProxyOFTDest\n * @author Venus\n * @notice XVSProxyOFTDest contract builds upon the functionality of its parent contract, BaseXVSProxyOFT,\n * and focuses on managing token transfers to the destination chain.\n * It provides functions to check eligibility and perform the actual token transfers while maintaining strict access controls and pausing mechanisms.\n */\n\ncontract XVSProxyOFTDest is BaseXVSProxyOFT {\n /**\n * @notice Emits when stored message dropped without successful retrying.\n */\n event DropFailedMessage(uint16 srcChainId, bytes indexed srcAddress, uint64 nonce);\n\n constructor(\n address tokenAddress_,\n uint8 sharedDecimals_,\n address lzEndpoint_,\n address oracle_\n ) BaseXVSProxyOFT(tokenAddress_, sharedDecimals_, lzEndpoint_, oracle_) {}\n\n /**\n * @notice Clear failed messages from the storage.\n * @param srcChainId_ Chain id of source\n * @param srcAddress_ Address of source followed by current bridge address\n * @param nonce_ Nonce_ of the transaction\n * @custom:access Only owner\n * @custom:event Emits DropFailedMessage on clearance of failed message.\n */\n function dropFailedMessage(uint16 srcChainId_, bytes memory srcAddress_, uint64 nonce_) external onlyOwner {\n failedMessages[srcChainId_][srcAddress_][nonce_] = bytes32(0);\n emit DropFailedMessage(srcChainId_, srcAddress_, nonce_);\n }\n\n /**\n * @notice Returns the total circulating supply of the token on the destination chain i.e (total supply).\n * @return total circulating supply of the token on the destination chain.\n */\n function circulatingSupply() public view override returns (uint256) {\n return innerToken.totalSupply();\n }\n\n /**\n * @notice Debit tokens from the given address\n * @param from_ Address from which tokens to be debited\n * @param dstChainId_ Destination chain id\n * @param amount_ Amount of tokens to be debited\n * @return Actual amount debited\n */\n function _debitFrom(\n address from_,\n uint16 dstChainId_,\n bytes32,\n uint256 amount_\n ) internal override whenNotPaused returns (uint256) {\n require(from_ == _msgSender(), \"ProxyOFT: owner is not send caller\");\n _isEligibleToSend(from_, dstChainId_, amount_);\n IXVS(address(innerToken)).burn(from_, amount_);\n return amount_;\n }\n\n /**\n * @notice Credit tokens in the given account\n * @param srcChainId_ Source chain id\n * @param toAddress_ Address on which token will be credited\n * @param amount_ Amount of tokens to be credited\n * @return Actual amount credited\n */\n function _creditTo(\n uint16 srcChainId_,\n address toAddress_,\n uint256 amount_\n ) internal override whenNotPaused returns (uint256) {\n _isEligibleToReceive(toAddress_, srcChainId_, amount_);\n IXVS(address(innerToken)).mint(toAddress_, amount_);\n return amount_;\n }\n}\n" - }, - "contracts/Bridge/XVSProxyOFTSrc.sol": { - "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.13;\n\nimport { SafeERC20, IERC20 } from \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\nimport { BaseXVSProxyOFT } from \"./BaseXVSProxyOFT.sol\";\n\n/**\n * @title XVSProxyOFTSrc\n * @author Venus\n * @notice XVSProxyOFTSrc contract serves as a crucial component for cross-chain token transactions,\n * focusing on the source side of these transactions.\n * It monitors the total amount transferred to other chains, ensuring it complies with defined limits,\n * and provides functions for transferring tokens while maintaining control over the circulating supply on the source chain.\n */\n\ncontract XVSProxyOFTSrc is BaseXVSProxyOFT {\n using SafeERC20 for IERC20;\n /**\n * @notice Total amount that is transferred from this chain to other chains.\n */\n uint256 public outboundAmount;\n\n /**\n * @notice Emits when locked token released manually by owner.\n */\n event FallbackWithdraw(address indexed to, uint256 amount);\n /**\n * @notice Emits when stored message dropped without successful retrying.\n */\n event DropFailedMessage(uint16 srcChainId, bytes indexed srcAddress, uint64 nonce);\n /**\n * @notice Event emitted when tokens are forcefully locked.\n */\n event FallbackDeposit(address indexed from, uint256 amount_);\n\n constructor(\n address tokenAddress_,\n uint8 sharedDecimals_,\n address lzEndpoint_,\n address oracle_\n ) BaseXVSProxyOFT(tokenAddress_, sharedDecimals_, lzEndpoint_, oracle_) {}\n\n /**\n * @notice Only call it when there is no way to recover the failed message.\n * `dropFailedMessage` must be called first if transaction is from remote->local chain to avoid double spending.\n * @param to_ The address to withdraw to\n * @param amount_ The amount of withdrawal\n * @custom:access Only owner.\n * @custom:event Emits FallbackWithdraw, once done with transfer.\n */\n function fallbackWithdraw(address to_, uint256 amount_) external onlyOwner {\n require(outboundAmount >= amount_, \"Withdraw amount should be less than outbound amount\");\n unchecked {\n outboundAmount -= amount_;\n }\n _transferFrom(address(this), to_, amount_);\n emit FallbackWithdraw(to_, amount_);\n }\n\n /**\n * @notice Forces the lock of tokens by increasing outbound amount and transferring tokens from the sender to the contract.\n * @param amount_ The amount of tokens to lock.\n * @param depositor_ Address of the depositor.\n * @custom:access Only owner.\n * @custom:event Emits FallbackDeposit, once done with transfer.\n */\n function fallbackDeposit(address depositor_, uint256 amount_) external onlyOwner {\n (uint256 actualAmount, ) = _removeDust(amount_);\n\n outboundAmount += actualAmount;\n uint256 cap = _sd2ld(type(uint64).max);\n require(cap >= outboundAmount, \"ProxyOFT: outboundAmount overflow\");\n\n _transferFrom(depositor_, address(this), actualAmount);\n\n emit FallbackDeposit(depositor_, actualAmount);\n }\n\n /**\n * @notice Clear failed messages from the storage.\n * @param srcChainId_ Chain id of source\n * @param srcAddress_ Address of source followed by current bridge address\n * @param nonce_ Nonce_ of the transaction\n * @custom:access Only owner.\n * @custom:event Emits DropFailedMessage on clearance of failed message.\n */\n function dropFailedMessage(uint16 srcChainId_, bytes memory srcAddress_, uint64 nonce_) external onlyOwner {\n failedMessages[srcChainId_][srcAddress_][nonce_] = bytes32(0);\n emit DropFailedMessage(srcChainId_, srcAddress_, nonce_);\n }\n\n /**\n * @notice Returns the total circulating supply of the token on the source chain i.e (total supply - locked in this contract).\n * @return Returns difference in total supply and the outbound amount.\n */\n function circulatingSupply() public view override returns (uint256) {\n return innerToken.totalSupply() - outboundAmount;\n }\n\n /**\n * @notice Debit tokens from the given address\n * @param from_ Address from which tokens to be debited\n * @param dstChainId_ Destination chain id\n * @param amount_ Amount of tokens to be debited\n * @return Actual amount debited\n */\n function _debitFrom(\n address from_,\n uint16 dstChainId_,\n bytes32,\n uint256 amount_\n ) internal override whenNotPaused returns (uint256) {\n require(from_ == _msgSender(), \"ProxyOFT: owner is not send caller\");\n _isEligibleToSend(from_, dstChainId_, amount_);\n\n uint256 amount = _transferFrom(from_, address(this), amount_);\n\n outboundAmount += amount;\n uint256 cap = _sd2ld(type(uint64).max);\n require(cap >= outboundAmount, \"ProxyOFT: outboundAmount overflow\");\n\n return amount;\n }\n\n /**\n * @notice Credit tokens in the given account\n * @param srcChainId_ Source chain id\n * @param toAddress_ Address on which token will be credited\n * @param amount_ Amount of tokens to be credited\n * @return Actual amount credited\n */\n function _creditTo(\n uint16 srcChainId_,\n address toAddress_,\n uint256 amount_\n ) internal override whenNotPaused returns (uint256) {\n _isEligibleToReceive(toAddress_, srcChainId_, amount_);\n outboundAmount -= amount_;\n // tokens are already in this contract, so no need to transfer\n if (toAddress_ == address(this)) {\n return amount_;\n }\n\n return _transferFrom(address(this), toAddress_, amount_);\n }\n}\n" + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.25;\n\nimport { ERC20 } from \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\n\nimport { TokenController } from \"./TokenController.sol\";\n\n/**\n * @title XVS\n * @author Venus\n * @notice XVS contract serves as a customized ERC-20 token with additional minting and burning functionality.\n * It also incorporates access control features provided by the \"TokenController\" contract to ensure proper governance and restrictions on minting and burning operations.\n */\n\ncontract XVS is ERC20, TokenController {\n constructor(address accessControlManager_) ERC20(\"Venus XVS\", \"XVS\") TokenController(accessControlManager_) {}\n\n /**\n * @notice Creates `amount_` tokens and assigns them to `account_`, increasing\n * the total supply. Checks access and eligibility.\n * @param account_ Address to which tokens are assigned.\n * @param amount_ Amount of tokens to be assigned.\n * @custom:access Controlled by AccessControlManager.\n * @custom:event Emits MintLimitDecreased with new available limit.\n * @custom:error MintLimitExceed is thrown when minting amount exceeds the maximum cap.\n */\n function mint(address account_, uint256 amount_) external whenNotPaused {\n _ensureAllowed(\"mint(address,uint256)\");\n _isEligibleToMint(msg.sender, account_, amount_);\n _mint(account_, amount_);\n }\n\n /**\n * @notice Destroys `amount_` tokens from `account_`, reducing the\n * total supply. Checks access and eligibility.\n * @param account_ Address from which tokens be destroyed.\n * @param amount_ Amount of tokens to be destroyed.\n * @custom:access Controlled by AccessControlManager.\n * @custom:event Emits MintLimitIncreased with new available limit.\n */\n function burn(address account_, uint256 amount_) external whenNotPaused {\n _ensureAllowed(\"burn(address,uint256)\");\n _burn(account_, amount_);\n _increaseMintLimit(msg.sender, amount_);\n }\n\n /**\n * @notice Hook that is called before any transfer of tokens. This includes\n * minting and burning.\n * @param from_ Address of account from which tokens are to be transferred.\n * @param to_ Address of the account to which tokens are to be transferred.\n * @param amount_ The amount of tokens to be transferred.\n * @custom:error AccountBlacklisted is thrown when either `from` or `to` address is blacklisted.\n */\n function _beforeTokenTransfer(address from_, address to_, uint256 amount_) internal override whenNotPaused {\n if (_blacklist[to_]) {\n revert AccountBlacklisted(to_);\n }\n if (_blacklist[from_]) {\n revert AccountBlacklisted(from_);\n }\n }\n}\n" }, "contracts/test/MockToken.sol": { "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/ERC20.sol)\n\npragma solidity ^0.8.0;\n\nimport { ERC20 } from \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport { LZEndpointMock } from \"@layerzerolabs/solidity-examples/contracts/lzApp/mocks/LZEndpointMock.sol\";\nimport { AccessControlManager } from \"@venusprotocol/governance-contracts/contracts/Governance/AccessControlManager.sol\";\n\ncontract MockToken is ERC20 {\n uint8 private immutable _decimals;\n\n constructor(string memory name_, string memory symbol_, uint8 decimals_) ERC20(name_, symbol_) {\n _decimals = decimals_;\n }\n\n function faucet(uint256 amount) external {\n _mint(msg.sender, amount);\n }\n\n function decimals() public view virtual override returns (uint8) {\n return _decimals;\n }\n}\n" @@ -163,6 +136,7 @@ "yul": true } }, + "evmVersion": "paris", "outputSelection": { "*": { "*": [ diff --git a/hardhat.config.ts b/hardhat.config.ts index fcb8189..31409ed 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -49,6 +49,10 @@ extendConfig((config: HardhatConfig) => { "node_modules/@venusprotocol/governance-contracts/deployments/ethereum", "node_modules/@venusprotocol/oracle/deployments/ethereum", ], + arbitrumsepolia: [ + "node_modules/@venusprotocol/governance-contracts/deployments/arbitrumsepolia", + "node_modules/@venusprotocol/oracle/deployments/arbitrumsepolia", + ], }, }; } From 565029087632e93024bc61f1cb029bdb078a7bd2 Mon Sep 17 00:00:00 2001 From: Debugger022 Date: Mon, 22 Apr 2024 05:49:52 +0000 Subject: [PATCH 09/12] feat: updating deployment files --- deployments/arbitrumsepolia.json | 10 +++++----- deployments/arbitrumsepolia_addresses.json | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/deployments/arbitrumsepolia.json b/deployments/arbitrumsepolia.json index f5bb774..17746d4 100644 --- a/deployments/arbitrumsepolia.json +++ b/deployments/arbitrumsepolia.json @@ -168,7 +168,7 @@ ] }, "XVS": { - "address": "0x47fA6E9F717c9eB081c4734FfB5a1EcD70508891", + "address": "0x877Dc896e7b13096D3827872e396927BbE704407", "abi": [ { "inputs": [ @@ -887,7 +887,7 @@ ] }, "XVSBridgeAdmin": { - "address": "0x0DC3d6717727FD5a023e41bA8134640ca18f3E48", + "address": "0xc94578caCC89a29B044a0a1D54d20d48A645E5C8", "abi": [ { "anonymous": false, @@ -1348,7 +1348,7 @@ ] }, "XVSBridgeAdmin_Implementation": { - "address": "0xd2048bD9e1D9A515cc57E270D0928B1127348ae1", + "address": "0x3514FB2bbAf4D749af5908311B4c1867Beb349cb", "abi": [ { "inputs": [ @@ -1680,7 +1680,7 @@ ] }, "XVSBridgeAdmin_Proxy": { - "address": "0x0DC3d6717727FD5a023e41bA8134640ca18f3E48", + "address": "0xc94578caCC89a29B044a0a1D54d20d48A645E5C8", "abi": [ { "inputs": [ @@ -1829,7 +1829,7 @@ ] }, "XVSProxyOFTDest": { - "address": "0xE9B66800E63888DE29c4c9131faadbDbDCfae917", + "address": "0xFdC5cEC63FD167DA46cF006585b30D03B104eFD4", "abi": [ { "inputs": [ diff --git a/deployments/arbitrumsepolia_addresses.json b/deployments/arbitrumsepolia_addresses.json index f895629..4212857 100644 --- a/deployments/arbitrumsepolia_addresses.json +++ b/deployments/arbitrumsepolia_addresses.json @@ -3,10 +3,10 @@ "chainId": "421614", "addresses": { "DefaultProxyAdmin": "0xA78A1Df376c3CEeBC5Fab574fe6EdDbbF76fd03e", - "XVS": "0x47fA6E9F717c9eB081c4734FfB5a1EcD70508891", - "XVSBridgeAdmin": "0x0DC3d6717727FD5a023e41bA8134640ca18f3E48", - "XVSBridgeAdmin_Implementation": "0xd2048bD9e1D9A515cc57E270D0928B1127348ae1", - "XVSBridgeAdmin_Proxy": "0x0DC3d6717727FD5a023e41bA8134640ca18f3E48", - "XVSProxyOFTDest": "0xE9B66800E63888DE29c4c9131faadbDbDCfae917" + "XVS": "0x877Dc896e7b13096D3827872e396927BbE704407", + "XVSBridgeAdmin": "0xc94578caCC89a29B044a0a1D54d20d48A645E5C8", + "XVSBridgeAdmin_Implementation": "0x3514FB2bbAf4D749af5908311B4c1867Beb349cb", + "XVSBridgeAdmin_Proxy": "0xc94578caCC89a29B044a0a1D54d20d48A645E5C8", + "XVSProxyOFTDest": "0xFdC5cEC63FD167DA46cF006585b30D03B104eFD4" } } From 345f9bb8b6188fee6fcf36464574eb7bd91c1913 Mon Sep 17 00:00:00 2001 From: Debugger022 Date: Wed, 24 Apr 2024 15:55:29 +0530 Subject: [PATCH 10/12] refactor: update maxDailyReceiveLimit and maxSingleReceiveTransactionLimit values --- helpers/deploymentConfig.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/helpers/deploymentConfig.ts b/helpers/deploymentConfig.ts index 02bc379..153236a 100644 --- a/helpers/deploymentConfig.ts +++ b/helpers/deploymentConfig.ts @@ -185,8 +185,8 @@ function createMethodEntries( minDstGas: number = 300000, maxDailyLimit: BigNumber = parseUnits("50000", 18), maxSingleTransactionLimit: BigNumber = parseUnits("10000", 18), - maxDailyReceiveLimit: BigNumber = parseUnits("50000", 18), - maxSingleReceiveTransactionLimit: BigNumber = parseUnits("10000", 18), + maxDailyReceiveLimit: BigNumber = parseUnits("51000", 18), + maxSingleReceiveTransactionLimit: BigNumber = parseUnits("10200", 18), ): MethodEntry[] { return [ { method: "setMinDstGas(uint16,uint16,uint256)", args: [chainId, 0, minDstGas] }, From d28836dd2d0be9aaee55ec9e537114ea5a01cd04 Mon Sep 17 00:00:00 2001 From: Debugger022 Date: Thu, 25 Apr 2024 11:43:45 +0530 Subject: [PATCH 11/12] chore: update oracle package version --- package.json | 2 +- yarn.lock | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 8c2d491..94b311d 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,7 @@ "@typescript-eslint/eslint-plugin": "^5.27.1", "@typescript-eslint/parser": "^5.27.1", "@venusprotocol/governance-contracts": "^2.0.0", - "@venusprotocol/oracle": "^2.0.0", + "@venusprotocol/oracle": "^2.2.0-dev.3", "@venusprotocol/solidity-utilities": "2.0.0", "bignumber.js": "9.0.0", "chai": "^4.3.6", diff --git a/yarn.lock b/yarn.lock index 0e7f433..cb1512b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3074,9 +3074,9 @@ __metadata: languageName: node linkType: hard -"@venusprotocol/oracle@npm:^2.0.0": - version: 2.0.0 - resolution: "@venusprotocol/oracle@npm:2.0.0" +"@venusprotocol/oracle@npm:^2.2.0-dev.3": + version: 2.2.0-dev.3 + resolution: "@venusprotocol/oracle@npm:2.2.0-dev.3" dependencies: "@chainlink/contracts": ^0.5.1 "@defi-wonderland/smock": ^2.3.4 @@ -3091,7 +3091,7 @@ __metadata: hardhat-deploy: ^0.11.14 module-alias: ^2.2.2 solidity-docgen: ^0.6.0-beta.29 - checksum: 00673550cdc63244eba2872b32253454a3b2062c2759075c68449b2923f2bb645e971d5ca0cbfd288bddd092d346a5f3e49d10bbb97d743fb33f9ece14179723 + checksum: f35d0b83f7b4af21fbfb76e595c612cbdbcd96041bc55f17371b6638b73a3376e658e42022af6c050b1f8ce37dc1a3bca40657ffd392734523bfa91de3f06210 languageName: node linkType: hard @@ -3161,7 +3161,7 @@ __metadata: "@typescript-eslint/eslint-plugin": ^5.27.1 "@typescript-eslint/parser": ^5.27.1 "@venusprotocol/governance-contracts": ^2.0.0 - "@venusprotocol/oracle": ^2.0.0 + "@venusprotocol/oracle": ^2.2.0-dev.3 "@venusprotocol/solidity-utilities": 2.0.0 bignumber.js: 9.0.0 chai: ^4.3.6 From 9978ea562aef78df585c2cc3dd49792ace4afc8d Mon Sep 17 00:00:00 2001 From: Debugger022 Date: Thu, 25 Apr 2024 16:30:35 +0530 Subject: [PATCH 12/12] chore: update oracle package version --- package.json | 2 +- yarn.lock | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 94b311d..dc438ba 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,7 @@ "@typescript-eslint/eslint-plugin": "^5.27.1", "@typescript-eslint/parser": "^5.27.1", "@venusprotocol/governance-contracts": "^2.0.0", - "@venusprotocol/oracle": "^2.2.0-dev.3", + "@venusprotocol/oracle": "^2.2.0", "@venusprotocol/solidity-utilities": "2.0.0", "bignumber.js": "9.0.0", "chai": "^4.3.6", diff --git a/yarn.lock b/yarn.lock index cb1512b..aac8c0f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3074,9 +3074,9 @@ __metadata: languageName: node linkType: hard -"@venusprotocol/oracle@npm:^2.2.0-dev.3": - version: 2.2.0-dev.3 - resolution: "@venusprotocol/oracle@npm:2.2.0-dev.3" +"@venusprotocol/oracle@npm:^2.2.0": + version: 2.2.0 + resolution: "@venusprotocol/oracle@npm:2.2.0" dependencies: "@chainlink/contracts": ^0.5.1 "@defi-wonderland/smock": ^2.3.4 @@ -3091,7 +3091,7 @@ __metadata: hardhat-deploy: ^0.11.14 module-alias: ^2.2.2 solidity-docgen: ^0.6.0-beta.29 - checksum: f35d0b83f7b4af21fbfb76e595c612cbdbcd96041bc55f17371b6638b73a3376e658e42022af6c050b1f8ce37dc1a3bca40657ffd392734523bfa91de3f06210 + checksum: 5ff2e0af88dbbe077c423b62f9c92cd0a9173f4a618f79bc9aec9df8b96e6e908e565adc82175dbe78b200c3d77abeb48878506fd85ada2c8c87b8d568dc1a3e languageName: node linkType: hard @@ -3161,7 +3161,7 @@ __metadata: "@typescript-eslint/eslint-plugin": ^5.27.1 "@typescript-eslint/parser": ^5.27.1 "@venusprotocol/governance-contracts": ^2.0.0 - "@venusprotocol/oracle": ^2.2.0-dev.3 + "@venusprotocol/oracle": ^2.2.0 "@venusprotocol/solidity-utilities": 2.0.0 bignumber.js: 9.0.0 chai: ^4.3.6