{ "address": "0xCf44918f615C3De017bc85EC0232b410C914b52a", "abi": [ { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "token", "type": "address" }, { "indexed": true, "internalType": "address", "name": "exitor", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "nonce", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "localChainId", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "targetChainId", "type": "uint256" } ], "name": "Enter", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "token", "type": "address" }, { "indexed": true, "internalType": "address", "name": "exitor", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" }, { "indexed": false, "internalType": "bytes32", "name": "commitment", "type": "bytes32" }, { "indexed": false, "internalType": "uint256", "name": "localChainId", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "extChainId", "type": "uint256" } ], "name": "Exit", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "previousOwner", "type": "address" }, { "indexed": true, "internalType": "address", "name": "newOwner", "type": "address" } ], "name": "OwnershipTransferred", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", "name": "account", "type": "address" } ], "name": "Paused", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", "name": "account", "type": "address" } ], "name": "Unpaused", "type": "event" }, { "inputs": [], "name": "VERSION", "outputs": [ { "internalType": "uint8", "name": "", "type": "uint8" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "cosignerManager", "outputs": [ { "internalType": "contract IBridgeCosignerManager", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "token", "type": "address" }, { "internalType": "uint256", "name": "amount", "type": "uint256" }, { "internalType": "uint256", "name": "targetChainId", "type": "uint256" } ], "name": "enter", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "targetChainId", "type": "uint256" } ], "name": "enterETH", "outputs": [], "stateMutability": "payable", "type": "function" }, { "inputs": [ { "internalType": "bytes", "name": "data", "type": "bytes" }, { "internalType": "bytes[]", "name": "signatures", "type": "bytes[]" } ], "name": "exit", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "contract IBridgeCosignerManager", "name": "cosignerManager_", "type": "address" }, { "internalType": "contract IBridgeTokenManager", "name": "tokenManager_", "type": "address" } ], "name": "initialize", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "owner", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "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": "newCosignerManager", "type": "address" } ], "name": "setCosignerManager", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "newTokenManager", "type": "address" } ], "name": "setTokenManager", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "tokenManager", "outputs": [ { "internalType": "contract IBridgeTokenManager", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "newOwner", "type": "address" } ], "name": "transferOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "token", "type": "address" }, { "internalType": "address", "name": "newOwner", "type": "address" } ], "name": "transferTokenOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "token", "type": "address" }, { "internalType": "string", "name": "newName", "type": "string" }, { "internalType": "string", "name": "newSymbol", "type": "string" }, { "internalType": "uint8", "name": "newDecimals", "type": "uint8" } ], "name": "updateTokenInfo", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "stateMutability": "payable", "type": "receive" } ], "transactionHash": "0xac8f2e8ae5ba6b7602241fe45db9fca41ccdeacd4fa9872b15301651d183a9ff", "receipt": { "to": null, "from": "0x50A58167e17a2a57aBD945e1Bd4df22131Dee5dF", "contractAddress": "0xCf44918f615C3De017bc85EC0232b410C914b52a", "transactionIndex": 48, "gasUsed": "1917593", "logsBloom": "0x00000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000008000000000000000000000000000000004000000000000000000000000800000000000000000000100000000000000000008000000000000000000100000000000000000000080000000000000000000000000000000800000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000004000000000040000000001000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000100000", "blockHash": "0xdaff6454e6a4e3911b58765649e1913300ff0c7803acbffe5468b960851bb379", "transactionHash": "0xac8f2e8ae5ba6b7602241fe45db9fca41ccdeacd4fa9872b15301651d183a9ff", "logs": [ { "transactionIndex": 48, "blockNumber": 22325842, "transactionHash": "0xac8f2e8ae5ba6b7602241fe45db9fca41ccdeacd4fa9872b15301651d183a9ff", "address": "0x0000000000000000000000000000000000001010", "topics": [ "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", "0x0000000000000000000000000000000000000000000000000000000000001010", "0x00000000000000000000000050a58167e17a2a57abd945e1bd4df22131dee5df", "0x0000000000000000000000007b5000af8ab69fd59eb0d4f5762bff57c9c04385" ], "data": "0x00000000000000000000000000000000000000000000000000cc61385fa9cc000000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000000000000000000000000b2430b08570d89441e660000000000000000000000000000000000000000000000000d14557b47ba340000000000000000000000000000000000000000000000b2430bd4b845e8edea66", "logIndex": 465, "blockHash": "0xdaff6454e6a4e3911b58765649e1913300ff0c7803acbffe5468b960851bb379" } ], "blockNumber": 22325842, "cumulativeGasUsed": "10347262", "status": 1, "byzantium": true }, "args": [], "solcInputHash": "4b226e48919e387d495ca981a6b5bf20", "metadata": "{\"compiler\":{\"version\":\"0.8.4+commit.c7e474f2\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"exitor\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"localChainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"targetChainId\",\"type\":\"uint256\"}],\"name\":\"Enter\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"exitor\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"commitment\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"localChainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"extChainId\",\"type\":\"uint256\"}],\"name\":\"Exit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"VERSION\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"cosignerManager\",\"outputs\":[{\"internalType\":\"contract IBridgeCosignerManager\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"targetChainId\",\"type\":\"uint256\"}],\"name\":\"enter\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"targetChainId\",\"type\":\"uint256\"}],\"name\":\"enterETH\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"bytes[]\",\"name\":\"signatures\",\"type\":\"bytes[]\"}],\"name\":\"exit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IBridgeCosignerManager\",\"name\":\"cosignerManager_\",\"type\":\"address\"},{\"internalType\":\"contract IBridgeTokenManager\",\"name\":\"tokenManager_\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"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\":\"newCosignerManager\",\"type\":\"address\"}],\"name\":\"setCosignerManager\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newTokenManager\",\"type\":\"address\"}],\"name\":\"setTokenManager\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"tokenManager\",\"outputs\":[{\"internalType\":\"contract IBridgeTokenManager\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferTokenOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"newName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"newSymbol\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"newDecimals\",\"type\":\"uint8\"}],\"name\":\"updateTokenInfo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"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 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.\"},\"setCosignerManager(address)\":{\"details\":\"This should be the contract responsible for sign by behalf of the payloads\",\"params\":{\"newCosignerManager\":\"address of cosigner manager contract\"}},\"setTokenManager(address)\":{\"details\":\"This should be the contract responsible for checking and add tokens to crosschain mapping\",\"params\":{\"newTokenManager\":\"address of token manager contract\"}},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"transferTokenOwnership(address,address)\":{\"details\":\"This token should be ownable in order to do this\",\"params\":{\"newOwner\":\"new token owner\",\"token\":\"address of bridged token\"}},\"updateTokenInfo(address,string,string,uint8)\":{\"details\":\"This token should be bridged in order to do this\",\"params\":{\"newDecimals\":\"a new decimal of token\",\"newName\":\"a new name of token\",\"newSymbol\":\"a new symbol of token\",\"token\":\"address of bridged token\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"setCosignerManager(address)\":{\"notice\":\"Set the cosigner manager, callable only by cosigners\"},\"setTokenManager(address)\":{\"notice\":\"Set the token manager, callable only by cosigners\"},\"transferTokenOwnership(address,address)\":{\"notice\":\"Update token ownership (bor token upgrade and maintenance)\"},\"updateTokenInfo(address,string,string,uint8)\":{\"notice\":\"Update token info in case of mistake or name re-branding\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/BridgeRouter.sol\":\"BridgeRouter\"},\"evmVersion\":\"berlin\",\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 initializer {\\n __Context_init_unchained();\\n __Ownable_init_unchained();\\n }\\n\\n function __Ownable_init_unchained() internal initializer {\\n _setOwner(_msgSender());\\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 _setOwner(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 _setOwner(newOwner);\\n }\\n\\n function _setOwner(address newOwner) private {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x35b09b69aca3bc2633da8f47382a81ecf367efe57167a2114f60f9ec81988afa\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\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 a proxied contract can't have 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 */\\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 require(_initializing || !_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\",\"keccak256\":\"0x8b2abd85d0ece7e866e100e9d47ca9cbec93c87cf71a8d267b2b93eb81f7d5e9\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.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 PausableUpgradeable is Initializable, ContextUpgradeable {\\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 function __Pausable_init() internal initializer {\\n __Context_init_unchained();\\n __Pausable_init_unchained();\\n }\\n\\n function __Pausable_init_unchained() internal initializer {\\n _paused = false;\\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 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 require(!paused(), \\\"Pausable: paused\\\");\\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 require(paused(), \\\"Pausable: not paused\\\");\\n _;\\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 uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x742c0fbab73bf595ca40025f6e81cb48dbd5e133950717f7befd062a925c0148\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuardUpgradeable is Initializable {\\n // Booleans are more expensive than uint256 or any type that takes up a full\\n // word because each write operation emits an extra SLOAD to first read the\\n // slot's contents, replace the bits taken up by the boolean, and then write\\n // back. This is the compiler's defense against contract upgrades and\\n // pointer aliasing, and it cannot be disabled.\\n\\n // The values being non-zero value makes deployment a bit more expensive,\\n // but in exchange the refund on every call to nonReentrant will be lower in\\n // amount. Since refunds are capped to a percentage of the total\\n // transaction's gas, it is best to keep them low in cases like this one, to\\n // increase the likelihood of the full refund coming into effect.\\n uint256 private constant _NOT_ENTERED = 1;\\n uint256 private constant _ENTERED = 2;\\n\\n uint256 private _status;\\n\\n function __ReentrancyGuard_init() internal initializer {\\n __ReentrancyGuard_init_unchained();\\n }\\n\\n function __ReentrancyGuard_init_unchained() internal initializer {\\n _status = _NOT_ENTERED;\\n }\\n\\n /**\\n * @dev Prevents a contract from calling itself, directly or indirectly.\\n * Calling a `nonReentrant` function from another `nonReentrant`\\n * function is not supported. It is possible to prevent this from happening\\n * by making the `nonReentrant` function external, and make it call a\\n * `private` function that does the actual work.\\n */\\n modifier nonReentrant() {\\n // On the first call to nonReentrant, _notEntered will be true\\n require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n _status = _ENTERED;\\n\\n _;\\n\\n // By storing the original value once again, a refund is triggered (see\\n // https://eips.ethereum.org/EIPS/eip-2200)\\n _status = _NOT_ENTERED;\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x89fa60d14355f7ae06af11e28fce2bb90c5c6186645d681a30e1b36234a4c210\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 initializer {\\n __Context_init_unchained();\\n }\\n\\n function __Context_init_unchained() internal initializer {\\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 uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x062b5a0f7cc6b0528fa350033759f3a15ba42afb57423d7c593753860f2c82e0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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 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 `recipient`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address recipient, 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 `sender` to `recipient` 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(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) external returns (bool);\\n\\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\",\"keccak256\":\"0x027b891937d20ccf213fdb9c31531574256de774bda99d3a70ecef6e1913ed2a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.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 function safeTransfer(\\n IERC20 token,\\n address to,\\n uint256 value\\n ) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n function safeTransferFrom(\\n IERC20 token,\\n address from,\\n address to,\\n uint256 value\\n ) 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(\\n IERC20 token,\\n address spender,\\n uint256 value\\n ) 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 function safeIncreaseAllowance(\\n IERC20 token,\\n address spender,\\n uint256 value\\n ) internal {\\n uint256 newAllowance = token.allowance(address(this), spender) + value;\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n }\\n\\n function safeDecreaseAllowance(\\n IERC20 token,\\n address spender,\\n uint256 value\\n ) internal {\\n unchecked {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n require(oldAllowance >= value, \\\"SafeERC20: decreased allowance below zero\\\");\\n uint256 newAllowance = oldAllowance - value;\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n }\\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 if (returndata.length > 0) {\\n // Return data is optional\\n require(abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n }\\n}\\n\",\"keccak256\":\"0x02348b2e4b9f3200c7e3907c5c2661643a6d8520e9f79939fbb9b4005a54894d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\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 function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 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\":\"0x3336baae5cf23e94274d75336e2d412193be508504aee185e61dc7d58cd05c8a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\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\":\"0x90565a39ae45c80f0468dc96c7b20d0afc3055f344c8203a0c9258239f350b9f\",\"license\":\"MIT\"},\"contracts/BridgeRouter.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.4;\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\n\\nimport \\\"./library/RLPReader.sol\\\";\\nimport \\\"./library/RToken.sol\\\";\\nimport \\\"./versions/Version0.sol\\\";\\nimport \\\"./interfaces/IBridgeCosignerManager.sol\\\";\\nimport \\\"./interfaces/IBridgeToken.sol\\\";\\nimport \\\"./interfaces/IBridgeTokenManager.sol\\\";\\nimport \\\"./interfaces/IWETH.sol\\\";\\nimport \\\"./interfaces/IOwnable.sol\\\";\\n\\ncontract BridgeRouter is\\n Version0,\\n OwnableUpgradeable,\\n ReentrancyGuardUpgradeable,\\n PausableUpgradeable\\n{\\n using RLPReader for bytes;\\n using RLPReader for RLPReader.RLPItem;\\n using RToken for RToken.Token;\\n\\n mapping(address => uint256) internal _nonces;\\n mapping(bytes32 => bool) internal _commitments;\\n\\n // ===== initialize override =====\\n IBridgeCosignerManager public cosignerManager;\\n IBridgeTokenManager public tokenManager;\\n uint256 internal _chainId;\\n\\n // ===== signing =====\\n bytes32 internal constant ENTER_EVENT_SIG =\\n keccak256(\\\"Enter(address,address,uint256,uint256,uint256,uint256)\\\");\\n\\n // ===== proxy =====\\n\\n uint256[49] private __gap;\\n\\n // ===== fallbacks =====\\n\\n receive() external payable {}\\n\\n // ===== events =====\\n\\n event Enter(\\n address indexed token,\\n address indexed exitor,\\n uint256 amount,\\n uint256 nonce,\\n uint256 localChainId,\\n uint256 targetChainId\\n );\\n\\n event Exit(\\n address indexed token,\\n address indexed exitor,\\n uint256 amount,\\n bytes32 commitment,\\n uint256 localChainId,\\n uint256 extChainId\\n );\\n\\n function emitEnter(\\n address token,\\n address from,\\n uint256 amount,\\n uint256 targetChainId\\n ) internal {\\n emit Enter(token, from, amount, _nonces[from], _chainId, targetChainId);\\n _nonces[from]++;\\n }\\n\\n function emitExit(\\n address token,\\n address to,\\n bytes32 commitment,\\n uint256 amount,\\n uint256 extChainId\\n ) internal {\\n emit Exit(token, to, amount, commitment, _chainId, extChainId);\\n }\\n\\n // ===== functionality to update =====\\n\\n /**\\n * @notice Set the token manager, callable only by cosigners\\n * @dev This should be the contract responsible for checking and add tokens to crosschain mapping\\n * @param newTokenManager address of token manager contract\\n */\\n function setTokenManager(address newTokenManager) external onlyOwner {\\n require(newTokenManager != address(0), \\\"BR: ZERO_ADDRESS\\\");\\n tokenManager = IBridgeTokenManager(newTokenManager);\\n }\\n\\n /**\\n * @notice Set the cosigner manager, callable only by cosigners\\n * @dev This should be the contract responsible for sign by behalf of the payloads\\n * @param newCosignerManager address of cosigner manager contract\\n */\\n function setCosignerManager(address newCosignerManager) external onlyOwner {\\n require(newCosignerManager != address(0), \\\"BR: ZERO_ADDRESS\\\");\\n cosignerManager = IBridgeCosignerManager(newCosignerManager);\\n }\\n\\n /**\\n * @notice Update token info in case of mistake or name re-branding\\n * @dev This token should be bridged in order to do this\\n * @param token address of bridged token\\n * @param newName a new name of token\\n * @param newSymbol a new symbol of token\\n * @param newDecimals a new decimal of token\\n */\\n function updateTokenInfo(\\n address token,\\n string calldata newName,\\n string calldata newSymbol,\\n uint8 newDecimals\\n ) external onlyOwner {\\n IBridgeToken(token).updateTokenInfo(newName, newSymbol, newDecimals);\\n }\\n\\n /**\\n * @notice Update token ownership (bor token upgrade and maintenance)\\n * @dev This token should be ownable in order to do this\\n * @param token address of bridged token\\n * @param newOwner new token owner\\n */\\n function transferTokenOwnership(address token, address newOwner)\\n external\\n onlyOwner\\n {\\n IOwnable(token).transferOwnership(newOwner);\\n }\\n\\n // Initialize function for proxy constructor. Must be used atomically\\n function initialize(\\n IBridgeCosignerManager cosignerManager_,\\n IBridgeTokenManager tokenManager_\\n ) public initializer {\\n cosignerManager = cosignerManager_;\\n tokenManager = tokenManager_;\\n assembly {\\n sstore(_chainId.slot, chainid())\\n }\\n\\n // proxy inits\\n __Context_init_unchained();\\n __Ownable_init_unchained();\\n __Pausable_init_unchained();\\n __ReentrancyGuard_init_unchained();\\n }\\n\\n // enter amount of tokens to protocol\\n function enter(\\n address token,\\n uint256 amount,\\n uint256 targetChainId\\n ) external nonReentrant whenNotPaused {\\n require(token != address(0), \\\"BR: ZERO_ADDRESS\\\");\\n require(amount != 0, \\\"BR: ZERO_AMOUNT\\\");\\n\\n RToken.Token memory localToken = tokenManager\\n .getLocal(token, targetChainId)\\n .enter(_msgSender(), address(this), amount);\\n emitEnter(localToken.addr, _msgSender(), amount, targetChainId);\\n }\\n\\n // enter amount of system currency to protocol\\n function enterETH(uint256 targetChainId)\\n external\\n payable\\n nonReentrant\\n whenNotPaused\\n {\\n require(msg.value != 0, \\\"BR: ZERO_AMOUNT\\\");\\n require(tokenManager.isZero(targetChainId), \\\"BR: NOT_FOUND\\\");\\n\\n emitEnter(address(0), _msgSender(), msg.value, targetChainId);\\n }\\n\\n // exit amount of tokens from protocol\\n function exit(bytes calldata data, bytes[] calldata signatures)\\n external\\n nonReentrant\\n whenNotPaused\\n {\\n RLPReader.RLPItem[] memory logRLPList = data.toRlpItem().toList();\\n RLPReader.RLPItem[] memory logTopicRLPList = logRLPList[1].toList(); // topics\\n\\n require(\\n bytes32(logTopicRLPList[0].toUint()) == ENTER_EVENT_SIG, // topic0 is event sig\\n \\\"BR: INVALID_EVT\\\"\\n );\\n\\n address extTokenAddr = logTopicRLPList[1].toAddress();\\n address exitor = logTopicRLPList[2].toAddress();\\n require(exitor == _msgSender(), \\\"BR: NOT_ONWER\\\");\\n\\n uint256 amount = logRLPList[2].toUint();\\n require(amount != 0, \\\"BR: ZERO_AMOUNT\\\");\\n\\n uint256 localChainId = logRLPList[5].toUint();\\n require(localChainId == _chainId, \\\"BR: WRONG_TARGET_CHAIN\\\");\\n\\n uint256 extChainId = logRLPList[4].toUint();\\n require(extChainId != _chainId, \\\"BR: WRONG_SOURCE_CHAIN\\\");\\n\\n // protected from replay on another network\\n bytes32 commitment = keccak256(data);\\n\\n require(!_commitments[commitment], \\\"BR: COMMITMENT_KNOWN\\\");\\n _commitments[commitment] = true;\\n require(\\n cosignerManager.verify(commitment, extChainId, signatures),\\n \\\"BR: INVALID_SIGNATURES\\\"\\n );\\n\\n RToken.Token memory localToken = tokenManager\\n .getLocal(extTokenAddr, _chainId)\\n .exit(address(this), exitor, amount);\\n emitExit(localToken.addr, exitor, commitment, amount, extChainId);\\n }\\n}\\n\",\"keccak256\":\"0x92c9ed5a15e6d705089ce8b6607d69f2b1d767f5a33a168ccc7c356717716153\",\"license\":\"MIT\"},\"contracts/interfaces/IBridgeCosignerManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.4;\\n\\ninterface IBridgeCosignerManager {\\n event CosignerAdded(address indexed cosaddr, uint256 chainId);\\n event CosignerRemoved(address indexed cosaddr, uint256 chainId);\\n struct Cosigner {\\n address addr;\\n uint256 chainId;\\n uint256 index;\\n bool active;\\n }\\n\\n function addCosigner(address cosaddr, uint256 chainId) external;\\n\\n function addCosignerBatch(address[] calldata cosaddrs, uint256 chainId)\\n external;\\n\\n function removeCosigner(address cosaddr) external;\\n\\n function removeCosignerBatch(address[] calldata cosaddrs) external;\\n\\n function getCosigners(uint256 chainId)\\n external\\n view\\n returns (address[] memory);\\n\\n function getCosignCount(uint256 chainId) external view returns (uint8);\\n\\n function verify(\\n bytes32 commitment,\\n uint256 chainId,\\n bytes[] calldata signatures\\n ) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xfabdd8ef3a89d2a7a561c731347028ccdb596e05154054c61e51908f402b0dde\",\"license\":\"MIT\"},\"contracts/interfaces/IBridgeToken.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.4;\\n\\ninterface IBridgeToken {\\n function burn(address from, uint256 amount) external;\\n\\n function mint(address to, uint256 amount) external;\\n\\n function updateTokenInfo(\\n string calldata _newName,\\n string calldata _newSymbol,\\n uint8 _newDecimals\\n ) external;\\n}\\n\",\"keccak256\":\"0x408cc04fffb0e645bbc0399143bb763f12456a2d203891cea8952fdeb00631d9\",\"license\":\"MIT\"},\"contracts/interfaces/IBridgeTokenManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.4;\\n\\nimport \\\"../library/RToken.sol\\\";\\n\\ninterface IBridgeTokenManager {\\n event TokenAdded(address indexed addr, uint256 chainId);\\n event TokenRemoved(address indexed addr, uint256 chainId);\\n\\n function issue(\\n address[] calldata tokens,\\n RToken.IssueType[] calldata issueTypes,\\n uint256 targetChainId\\n ) external;\\n\\n function revoke(address targetAddr) external;\\n\\n function getLocal(address sourceAddr, uint256 targetChainId)\\n external\\n view\\n returns (RToken.Token memory token);\\n\\n function isZero(uint256 targetChainId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x36bfbca4f6ba1f8e8fc0f2effa6a1d43d22a83bda9c189d109ae72f67f9b4fd6\",\"license\":\"MIT\"},\"contracts/interfaces/IOwnable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.4;\\n\\ninterface IOwnable {\\n function transferOwnership(address newOwner) external;\\n}\\n\",\"keccak256\":\"0xd1f7e0d61a7a58ab4b8d5eb0116fab6ca88dddd497a8ba4f8576141ed90246cf\",\"license\":\"MIT\"},\"contracts/interfaces/IWETH.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.6.0 <0.9.0;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\ninterface IWETH is IERC20 {\\n event Deposit(address indexed dst, uint256 wad);\\n event Withdrawal(address indexed src, uint256 wad);\\n\\n function deposit() external payable;\\n\\n function withdraw(uint256) external;\\n}\\n\",\"keccak256\":\"0x8f559d34b550babeca68580b00d0544481b9f0349326891af2d3db25af278b25\",\"license\":\"MIT\"},\"contracts/library/RLPReader.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.4;\\n\\nlibrary RLPReader {\\n uint8 constant STRING_SHORT_START = 0x80;\\n uint8 constant STRING_LONG_START = 0xb8;\\n uint8 constant LIST_SHORT_START = 0xc0;\\n uint8 constant LIST_LONG_START = 0xf8;\\n uint8 constant WORD_SIZE = 32;\\n\\n struct RLPItem {\\n uint256 len;\\n uint256 memPtr;\\n }\\n\\n struct Iterator {\\n RLPItem item; // Item that's being iterated over.\\n uint256 nextPtr; // Position of the next item in the list.\\n }\\n\\n /*\\n * @dev Returns the next element in the iteration. Reverts if it has not next element.\\n * @param self The iterator.\\n * @return The next element in the iteration.\\n */\\n function next(Iterator memory self) internal pure returns (RLPItem memory) {\\n require(hasNext(self));\\n\\n uint256 ptr = self.nextPtr;\\n uint256 itemLength = _itemLength(ptr);\\n self.nextPtr = ptr + itemLength;\\n\\n return RLPItem(itemLength, ptr);\\n }\\n\\n /*\\n * @dev Returns true if the iteration has more elements.\\n * @param self The iterator.\\n * @return true if the iteration has more elements.\\n */\\n function hasNext(Iterator memory self) internal pure returns (bool) {\\n RLPItem memory item = self.item;\\n return self.nextPtr < item.memPtr + item.len;\\n }\\n\\n /*\\n * @param item RLP encoded bytes\\n */\\n function toRlpItem(bytes memory item)\\n internal\\n pure\\n returns (RLPItem memory)\\n {\\n uint256 memPtr;\\n assembly {\\n memPtr := add(item, 0x20)\\n }\\n\\n return RLPItem(item.length, memPtr);\\n }\\n\\n /*\\n * @dev Create an iterator. Reverts if item is not a list.\\n * @param self The RLP item.\\n * @return An 'Iterator' over the item.\\n */\\n function iterator(RLPItem memory self)\\n internal\\n pure\\n returns (Iterator memory)\\n {\\n require(isList(self));\\n\\n uint256 ptr = self.memPtr + _payloadOffset(self.memPtr);\\n return Iterator(self, ptr);\\n }\\n\\n /*\\n * @param the RLP item.\\n */\\n function rlpLen(RLPItem memory item) internal pure returns (uint256) {\\n return item.len;\\n }\\n\\n /*\\n * @param the RLP item.\\n * @return (memPtr, len) pair: location of the item's payload in memory.\\n */\\n function payloadLocation(RLPItem memory item)\\n internal\\n pure\\n returns (uint256, uint256)\\n {\\n uint256 offset = _payloadOffset(item.memPtr);\\n uint256 memPtr = item.memPtr + offset;\\n uint256 len = item.len - offset; // data length\\n return (memPtr, len);\\n }\\n\\n /*\\n * @param the RLP item.\\n */\\n function payloadLen(RLPItem memory item) internal pure returns (uint256) {\\n (, uint256 len) = payloadLocation(item);\\n return len;\\n }\\n\\n /*\\n * @param the RLP item containing the encoded list.\\n */\\n function toList(RLPItem memory item)\\n internal\\n pure\\n returns (RLPItem[] memory)\\n {\\n require(isList(item));\\n\\n uint256 items = numItems(item);\\n RLPItem[] memory result = new RLPItem[](items);\\n\\n uint256 memPtr = item.memPtr + _payloadOffset(item.memPtr);\\n uint256 dataLen;\\n for (uint256 i = 0; i < items; i++) {\\n dataLen = _itemLength(memPtr);\\n result[i] = RLPItem(dataLen, memPtr);\\n memPtr = memPtr + dataLen;\\n }\\n\\n return result;\\n }\\n\\n // @return indicator whether encoded payload is a list. negate this function call for isData.\\n function isList(RLPItem memory item) internal pure returns (bool) {\\n if (item.len == 0) return false;\\n\\n uint8 byte0;\\n uint256 memPtr = item.memPtr;\\n assembly {\\n byte0 := byte(0, mload(memPtr))\\n }\\n\\n if (byte0 < LIST_SHORT_START) return false;\\n return true;\\n }\\n\\n /*\\n * @dev A cheaper version of keccak256(toRlpBytes(item)) that avoids copying memory.\\n * @return keccak256 hash of RLP encoded bytes.\\n */\\n function rlpBytesKeccak256(RLPItem memory item)\\n internal\\n pure\\n returns (bytes32)\\n {\\n uint256 ptr = item.memPtr;\\n uint256 len = item.len;\\n bytes32 result;\\n assembly {\\n result := keccak256(ptr, len)\\n }\\n return result;\\n }\\n\\n /*\\n * @dev A cheaper version of keccak256(toBytes(item)) that avoids copying memory.\\n * @return keccak256 hash of the item payload.\\n */\\n function payloadKeccak256(RLPItem memory item)\\n internal\\n pure\\n returns (bytes32)\\n {\\n (uint256 memPtr, uint256 len) = payloadLocation(item);\\n bytes32 result;\\n assembly {\\n result := keccak256(memPtr, len)\\n }\\n return result;\\n }\\n\\n /** RLPItem conversions into data types **/\\n\\n // @returns raw rlp encoding in bytes\\n function toRlpBytes(RLPItem memory item)\\n internal\\n pure\\n returns (bytes memory)\\n {\\n bytes memory result = new bytes(item.len);\\n if (result.length == 0) return result;\\n\\n uint256 ptr;\\n assembly {\\n ptr := add(0x20, result)\\n }\\n\\n copy(item.memPtr, ptr, item.len);\\n return result;\\n }\\n\\n // any non-zero byte except \\\"0x80\\\" is considered true\\n function toBoolean(RLPItem memory item) internal pure returns (bool) {\\n require(item.len == 1);\\n uint256 result;\\n uint256 memPtr = item.memPtr;\\n assembly {\\n result := byte(0, mload(memPtr))\\n }\\n\\n // SEE Github Issue #5.\\n // Summary: Most commonly used RLP libraries (i.e Geth) will encode\\n // \\\"0\\\" as \\\"0x80\\\" instead of as \\\"0\\\". We handle this edge case explicitly\\n // here.\\n if (result == 0 || result == STRING_SHORT_START) {\\n return false;\\n } else {\\n return true;\\n }\\n }\\n\\n function toAddress(RLPItem memory item) internal pure returns (address) {\\n // 1 byte for the length prefix\\n require(item.len == 21);\\n\\n return address(uint160(toUint(item)));\\n }\\n\\n function toUint(RLPItem memory item) internal pure returns (uint256) {\\n require(item.len > 0 && item.len <= 33);\\n\\n (uint256 memPtr, uint256 len) = payloadLocation(item);\\n\\n uint256 result;\\n assembly {\\n result := mload(memPtr)\\n\\n // shfit to the correct location if neccesary\\n if lt(len, 32) {\\n result := div(result, exp(256, sub(32, len)))\\n }\\n }\\n\\n return result;\\n }\\n\\n // enforces 32 byte length\\n function toUintStrict(RLPItem memory item) internal pure returns (uint256) {\\n // one byte prefix\\n require(item.len == 33);\\n\\n uint256 result;\\n uint256 memPtr = item.memPtr + 1;\\n assembly {\\n result := mload(memPtr)\\n }\\n\\n return result;\\n }\\n\\n function toBytes(RLPItem memory item) internal pure returns (bytes memory) {\\n require(item.len > 0);\\n\\n (uint256 memPtr, uint256 len) = payloadLocation(item);\\n bytes memory result = new bytes(len);\\n\\n uint256 destPtr;\\n assembly {\\n destPtr := add(0x20, result)\\n }\\n\\n copy(memPtr, destPtr, len);\\n return result;\\n }\\n\\n /*\\n * Private Helpers\\n */\\n\\n // @return number of payload items inside an encoded list.\\n function numItems(RLPItem memory item) private pure returns (uint256) {\\n if (item.len == 0) return 0;\\n\\n uint256 count = 0;\\n uint256 currPtr = item.memPtr + _payloadOffset(item.memPtr);\\n uint256 endPtr = item.memPtr + item.len;\\n while (currPtr < endPtr) {\\n currPtr = currPtr + _itemLength(currPtr); // skip over an item\\n count++;\\n }\\n\\n return count;\\n }\\n\\n // @return entire rlp item byte length\\n function _itemLength(uint256 memPtr) private pure returns (uint256) {\\n uint256 itemLen;\\n uint256 byte0;\\n assembly {\\n byte0 := byte(0, mload(memPtr))\\n }\\n\\n if (byte0 < STRING_SHORT_START) itemLen = 1;\\n else if (byte0 < STRING_LONG_START)\\n itemLen = byte0 - STRING_SHORT_START + 1;\\n else if (byte0 < LIST_SHORT_START) {\\n assembly {\\n let byteLen := sub(byte0, 0xb7) // # of bytes the actual length is\\n memPtr := add(memPtr, 1) // skip over the first byte\\n\\n /* 32 byte word size */\\n let dataLen := div(mload(memPtr), exp(256, sub(32, byteLen))) // right shifting to get the len\\n itemLen := add(dataLen, add(byteLen, 1))\\n }\\n } else if (byte0 < LIST_LONG_START) {\\n itemLen = byte0 - LIST_SHORT_START + 1;\\n } else {\\n assembly {\\n let byteLen := sub(byte0, 0xf7)\\n memPtr := add(memPtr, 1)\\n\\n let dataLen := div(mload(memPtr), exp(256, sub(32, byteLen))) // right shifting to the correct length\\n itemLen := add(dataLen, add(byteLen, 1))\\n }\\n }\\n\\n return itemLen;\\n }\\n\\n // @return number of bytes until the data\\n function _payloadOffset(uint256 memPtr) private pure returns (uint256) {\\n uint256 byte0;\\n assembly {\\n byte0 := byte(0, mload(memPtr))\\n }\\n\\n if (byte0 < STRING_SHORT_START) return 0;\\n else if (\\n byte0 < STRING_LONG_START ||\\n (byte0 >= LIST_SHORT_START && byte0 < LIST_LONG_START)\\n ) return 1;\\n else if (byte0 < LIST_SHORT_START)\\n // being explicit\\n return byte0 - (STRING_LONG_START - 1) + 1;\\n else return byte0 - (LIST_LONG_START - 1) + 1;\\n }\\n\\n /*\\n * @param src Pointer to source\\n * @param dest Pointer to destination\\n * @param len Amount of memory to copy from the source\\n */\\n function copy(\\n uint256 src,\\n uint256 dest,\\n uint256 len\\n ) private pure {\\n if (len == 0) return;\\n\\n // copy as many word sizes as possible\\n for (; len >= WORD_SIZE; len -= WORD_SIZE) {\\n assembly {\\n mstore(dest, mload(src))\\n }\\n\\n src += WORD_SIZE;\\n dest += WORD_SIZE;\\n }\\n\\n if (len > 0) {\\n // left over bytes. Mask is used to remove unwanted bytes from the word\\n uint256 mask = 256**(WORD_SIZE - len) - 1;\\n assembly {\\n let srcpart := and(mload(src), not(mask)) // zero out src\\n let destpart := and(mload(dest), mask) // retrieve the bytes\\n mstore(dest, or(destpart, srcpart))\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x082636e1e83173379251205fb69fb87c9b74db93331fccb74d5b458cf285737d\",\"license\":\"MIT\"},\"contracts/library/RToken.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.4;\\n\\nimport \\\"@openzeppelin/contracts/utils/Context.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport \\\"../interfaces/IBridgeToken.sol\\\";\\n\\nlibrary RToken {\\n using SafeERC20 for IERC20;\\n\\n enum IssueType {\\n DEFAULT,\\n MINTABLE\\n }\\n\\n struct Token {\\n address addr;\\n uint256 chainId;\\n IssueType issueType;\\n bool exist;\\n }\\n\\n function unsafeTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal {\\n require(from.balance >= amount, \\\"RT: INSUFFICIENT_BALANCE\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls, avoid-call-value\\n (bool success, ) = to.call{value: amount}(\\\"\\\");\\n require(success, \\\"RT: SEND_REVERT\\\");\\n }\\n\\n function enter(\\n Token memory token,\\n address from,\\n address to,\\n uint256 amount\\n ) internal returns (Token memory) {\\n require(token.exist, \\\"RT: NOT_LISTED\\\");\\n if (token.issueType == IssueType.MINTABLE) {\\n IBridgeToken(token.addr).burn(from, amount);\\n } else if (token.issueType == IssueType.DEFAULT) {\\n IERC20(token.addr).safeTransferFrom(from, to, amount);\\n } else {\\n assert(false);\\n }\\n return token;\\n }\\n\\n function exit(\\n Token memory token,\\n address from,\\n address to,\\n uint256 amount\\n ) internal returns (Token memory) {\\n require(token.exist, \\\"RT: NOT_LISTED\\\");\\n if (token.addr == address(0)) {\\n unsafeTransfer(from, to, amount);\\n } else if (token.issueType == IssueType.MINTABLE) {\\n IBridgeToken(token.addr).mint(to, amount);\\n } else if (token.issueType == IssueType.DEFAULT) {\\n IERC20(token.addr).safeTransfer(to, amount);\\n } else {\\n assert(false);\\n }\\n return token;\\n }\\n}\\n\",\"keccak256\":\"0x90ddd994ec4c16499929a0fb2f68543cdba5aabe8ad11235dd944697939f1d72\",\"license\":\"MIT\"},\"contracts/versions/Version0.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.4;\\n\\n/**\\n * @title Version0\\n * @notice Version getter for contracts\\n **/\\ncontract Version0 {\\n uint8 public constant VERSION = 0;\\n}\\n\",\"keccak256\":\"0x73ec3f2a0f75d0009238e599818fda21bbc06516085c3d3679c8789c25977bda\",\"license\":\"MIT\"}},\"version\":1}", "bytecode": "0x608060405234801561001057600080fd5b506121bb806100206000396000f3fe6080604052600436106100ec5760003560e01c80638da5cb5b1161008a578063ce18acd411610059578063ce18acd41461026d578063d5804bd414610280578063f2fde38b146102a0578063ffa1ad74146102c057600080fd5b80638da5cb5b146101ef578063ac7cffa61461020d578063ae8f4f3a1461022d578063b0c8bd041461024d57600080fd5b8063485cc955116100c6578063485cc955146101775780635c975abb14610197578063715018a6146101ba5780637cb2b79c146101cf57600080fd5b8063271f7b99146100f85780632a709b141461011a578063383fe4671461015757600080fd5b366100f357005b600080fd5b34801561010457600080fd5b50610118610113366004611bf0565b6102e7565b005b34801561012657600080fd5b5060cc5461013a906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561016357600080fd5b50610118610172366004611bb8565b610388565b34801561018357600080fd5b50610118610192366004611d69565b610411565b3480156101a357600080fd5b5060975460ff16604051901515815260200161014e565b3480156101c657600080fd5b506101186104d3565b3480156101db57600080fd5b506101186101ea366004611b9c565b610509565b3480156101fb57600080fd5b506033546001600160a01b031661013a565b34801561021957600080fd5b5060cb5461013a906001600160a01b031681565b34801561023957600080fd5b50610118610248366004611cd5565b61057b565b34801561025957600080fd5b50610118610268366004611b9c565b610ac3565b61011861027b366004611e03565b610b35565b34801561028c57600080fd5b5061011861029b366004611c87565b610c6a565b3480156102ac57600080fd5b506101186102bb366004611b9c565b610da9565b3480156102cc57600080fd5b506102d5600081565b60405160ff909116815260200161014e565b6033546001600160a01b0316331461031a5760405162461bcd60e51b81526004016103119061202c565b60405180910390fd5b604051632ef18fbd60e11b81526001600160a01b03871690635de31f7a9061034e9088908890889088908890600401611f1a565b600060405180830381600087803b15801561036857600080fd5b505af115801561037c573d6000803e3d6000fd5b50505050505050505050565b6033546001600160a01b031633146103b25760405162461bcd60e51b81526004016103119061202c565b60405163f2fde38b60e01b81526001600160a01b03828116600483015283169063f2fde38b90602401600060405180830381600087803b1580156103f557600080fd5b505af1158015610409573d6000803e3d6000fd5b505050505050565b600054610100900460ff168061042a575060005460ff16155b6104465760405162461bcd60e51b815260040161031190611fb4565b600054610100900460ff16158015610468576000805461ffff19166101011790555b60cb80546001600160a01b038086166001600160a01b03199283161790925560cc8054928516929091169190911790554660cd556104a4610e44565b6104ac610eaf565b6104b4610f0f565b6104bc610f84565b80156104ce576000805461ff00191690555b505050565b6033546001600160a01b031633146104fd5760405162461bcd60e51b81526004016103119061202c565b6105076000610ff4565b565b6033546001600160a01b031633146105335760405162461bcd60e51b81526004016103119061202c565b6001600160a01b0381166105595760405162461bcd60e51b815260040161031190612002565b60cc80546001600160a01b0319166001600160a01b0392909216919091179055565b6002606554141561059e5760405162461bcd60e51b81526004016103119061208a565b600260655560975460ff16156105c65760405162461bcd60e51b815260040161031190611f8a565b600061060f61060a86868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061104692505050565b611073565b905060006106448260018151811061063757634e487b7160e01b600052603260045260246000fd5b6020026020010151611073565b90507f553685c68db2f1e0adf08d56c06ec87ff411232298a59276dbdb1b032c38151e6106988260008151811061068b57634e487b7160e01b600052603260045260246000fd5b60200260200101516111a5565b146106d75760405162461bcd60e51b815260206004820152600f60248201526e10948e881253959053125117d15595608a1b6044820152606401610311565b600061070a826001815181106106fd57634e487b7160e01b600052603260045260246000fd5b60200260200101516111f3565b90506000610732836002815181106106fd57634e487b7160e01b600052603260045260246000fd5b90506001600160a01b038116331461077c5760405162461bcd60e51b815260206004820152600d60248201526c21291d102727aa2fa7a72ba2a960991b6044820152606401610311565b60006107a28560028151811061068b57634e487b7160e01b600052603260045260246000fd5b9050806107c15760405162461bcd60e51b815260040161031190612061565b60006107e78660058151811061068b57634e487b7160e01b600052603260045260246000fd5b905060cd5481146108335760405162461bcd60e51b815260206004820152601660248201527521291d102ba927a723afaa20a923a2aa2fa1a420a4a760511b6044820152606401610311565b60006108598760048151811061068b57634e487b7160e01b600052603260045260246000fd5b905060cd548114156108a65760405162461bcd60e51b815260206004820152601660248201527521291d102ba927a723afa9a7aaa921a2afa1a420a4a760511b6044820152606401610311565b60008b8b6040516108b8929190611e44565b6040805191829003909120600081815260ca602052919091205490915060ff161561091c5760405162461bcd60e51b815260206004820152601460248201527321291d1021a7a6a6a4aa26a2a72a2fa5a727aba760611b6044820152606401610311565b600081815260ca602052604090819020805460ff1916600117905560cb5490516307cdd1ed60e31b81526001600160a01b0390911690633e6e8f689061096c90849086908f908f90600401611e70565b60206040518083038186803b15801561098457600080fd5b505afa158015610998573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109bc9190611cbb565b610a015760405162461bcd60e51b815260206004820152601660248201527542523a20494e56414c49445f5349474e41545552455360501b6044820152606401610311565b60cc5460cd5460405163707af71960e11b81526001600160a01b0389811660048301526024820192909252600092610a9c9230928a928a92169063e0f5ee329060440160806040518083038186803b158015610a5c57600080fd5b505afa158015610a70573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a949190611d7b565b929190611213565b9050610aaf816000015187848887611390565b505060016065555050505050505050505050565b6033546001600160a01b03163314610aed5760405162461bcd60e51b81526004016103119061202c565b6001600160a01b038116610b135760405162461bcd60e51b815260040161031190612002565b60cb80546001600160a01b0319166001600160a01b0392909216919091179055565b60026065541415610b585760405162461bcd60e51b81526004016103119061208a565b600260655560975460ff1615610b805760405162461bcd60e51b815260040161031190611f8a565b34610b9d5760405162461bcd60e51b815260040161031190612061565b60cc54604051637a38f9eb60e01b8152600481018390526001600160a01b0390911690637a38f9eb9060240160206040518083038186803b158015610be157600080fd5b505afa158015610bf5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c199190611cbb565b610c555760405162461bcd60e51b815260206004820152600d60248201526c10948e881393d517d193d55391609a1b6044820152606401610311565b610c626000333484611400565b506001606555565b60026065541415610c8d5760405162461bcd60e51b81526004016103119061208a565b600260655560975460ff1615610cb55760405162461bcd60e51b815260040161031190611f8a565b6001600160a01b038316610cdb5760405162461bcd60e51b815260040161031190612002565b81610cf85760405162461bcd60e51b815260040161031190612061565b6000610d8d3360cc5460405163707af71960e11b81526001600160a01b038881166004830152602482018790523092889291169063e0f5ee329060440160806040518083038186803b158015610d4d57600080fd5b505afa158015610d61573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d859190611d7b565b929190611498565b8051909150610d9e90338585611400565b505060016065555050565b6033546001600160a01b03163314610dd35760405162461bcd60e51b81526004016103119061202c565b6001600160a01b038116610e385760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610311565b610e4181610ff4565b50565b600054610100900460ff1680610e5d575060005460ff16155b610e795760405162461bcd60e51b815260040161031190611fb4565b600054610100900460ff16158015610e9b576000805461ffff19166101011790555b8015610e41576000805461ff001916905550565b600054610100900460ff1680610ec8575060005460ff16155b610ee45760405162461bcd60e51b815260040161031190611fb4565b600054610100900460ff16158015610f06576000805461ffff19166101011790555b610e9b33610ff4565b600054610100900460ff1680610f28575060005460ff16155b610f445760405162461bcd60e51b815260040161031190611fb4565b600054610100900460ff16158015610f66576000805461ffff19166101011790555b6097805460ff191690558015610e41576000805461ff001916905550565b600054610100900460ff1680610f9d575060005460ff16155b610fb95760405162461bcd60e51b815260040161031190611fb4565b600054610100900460ff16158015610fdb576000805461ffff19166101011790555b60016065558015610e41576000805461ff001916905550565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60408051808201825260008082526020918201528151808301909252825182529182019181019190915290565b606061107e826115a5565b61108757600080fd5b6000611092836115de565b905060008167ffffffffffffffff8111156110bd57634e487b7160e01b600052604160045260246000fd5b60405190808252806020026020018201604052801561110257816020015b60408051808201909152600080825260208201528152602001906001900390816110db5790505b50905060006111148560200151611661565b856020015161112391906120c1565b90506000805b8481101561119a5761113a836116e3565b915060405180604001604052808381526020018481525084828151811061117157634e487b7160e01b600052603260045260246000fd5b602090810291909101015261118682846120c1565b9250806111928161213f565b915050611129565b509195945050505050565b8051600090158015906111ba57508151602110155b6111c357600080fd5b6000806111cf8461178c565b8151919350915060208210156111eb5760208290036101000a90045b949350505050565b805160009060151461120457600080fd5b61120d826111a5565b92915050565b60408051608081018252600080825260208201819052918101829052606081019190915284606001516112795760405162461bcd60e51b815260206004820152600e60248201526d14950e881393d517d31254d5115160921b6044820152606401610311565b84516001600160a01b0316611298576112938484846117d3565b611387565b6001856040015160018111156112be57634e487b7160e01b600052602160045260246000fd5b141561132f5784516040516340c10f1960e01b81526001600160a01b03858116600483015260248201859052909116906340c10f19906044015b600060405180830381600087803b15801561131257600080fd5b505af1158015611326573d6000803e3d6000fd5b50505050611387565b60008560400151600181111561135557634e487b7160e01b600052602160045260246000fd5b1415611371578451611293906001600160a01b031684846118c8565b634e487b7160e01b600052600160045260246000fd5b50929392505050565b836001600160a01b0316856001600160a01b03167f812815d6ddc266545cbe93cd74cdaec6517a81842a230a1773c976e78389ad2e848660cd54866040516113f1949392919093845260208401929092526040830152606082015260800190565b60405180910390a35050505050565b6001600160a01b03838116600081815260c960209081526040918290205460cd548351888152928301919091528183015260608101859052905191928716917f553685c68db2f1e0adf08d56c06ec87ff411232298a59276dbdb1b032c38151e9181900360800190a36001600160a01b038316600090815260c96020526040812080549161148d8361213f565b919050555050505050565b60408051608081018252600080825260208201819052918101829052606081019190915284606001516114fe5760405162461bcd60e51b815260206004820152600e60248201526d14950e881393d517d31254d5115160921b6044820152606401610311565b60018560400151600181111561152457634e487b7160e01b600052602160045260246000fd5b1415611562578451604051632770a7eb60e21b81526001600160a01b0386811660048301526024820185905290911690639dc29fac906044016112f8565b60008560400151600181111561158857634e487b7160e01b600052602160045260246000fd5b1415611371578451611293906001600160a01b031685858561192b565b80516000906115b657506000919050565b6020820151805160001a9060c08210156115d4575060009392505050565b5060019392505050565b80516000906115ef57506000919050565b6000806115ff8460200151611661565b846020015161160e91906120c1565b905060008460000151856020015161162691906120c1565b90505b808210156116585761163a826116e3565b61164490836120c1565b9150826116508161213f565b935050611629565b50909392505050565b8051600090811a608081101561167a5750600092915050565b60b8811080611695575060c08110801590611695575060f881105b156116a35750600192915050565b60c08110156116d7576116b8600160b86120f0565b6116c59060ff16826120d9565b6116d09060016120c1565b9392505050565b6116b8600160f86120f0565b80516000908190811a60808110156116fe5760019150611785565b60b8811015611724576117126080826120d9565b61171d9060016120c1565b9150611785565b60c08110156117515760b78103600185019450806020036101000a85510460018201810193505050611785565b60f88110156117655761171260c0826120d9565b60f78103600185019450806020036101000a855104600182018101935050505b5092915050565b600080600061179e8460200151611661565b905060008185602001516117b291906120c1565b905060008286600001516117c691906120d9565b9196919550909350505050565b80836001600160a01b031631101561182d5760405162461bcd60e51b815260206004820152601860248201527f52543a20494e53554646494349454e545f42414c414e434500000000000000006044820152606401610311565b6000826001600160a01b03168260405160006040518083038185875af1925050503d806000811461187a576040519150601f19603f3d011682016040523d82523d6000602084013e61187f565b606091505b50509050806118c25760405162461bcd60e51b815260206004820152600f60248201526e14950e8814d1539117d49155915495608a1b6044820152606401610311565b50505050565b6040516001600160a01b0383166024820152604481018290526104ce90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611963565b6040516001600160a01b03808516602483015283166044820152606481018290526118c29085906323b872dd60e01b906084016118f4565b60006119b8826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611a359092919063ffffffff16565b8051909150156104ce57808060200190518101906119d69190611cbb565b6104ce5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610311565b60606111eb848460008585843b611a8e5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610311565b600080866001600160a01b03168587604051611aaa9190611e54565b60006040518083038185875af1925050503d8060008114611ae7576040519150601f19603f3d011682016040523d82523d6000602084013e611aec565b606091505b5091509150611afc828286611b07565b979650505050505050565b60608315611b165750816116d0565b825115611b265782518084602001fd5b8160405162461bcd60e51b81526004016103119190611f57565b80518015158114611b5057600080fd5b919050565b60008083601f840112611b66578182fd5b50813567ffffffffffffffff811115611b7d578182fd5b602083019150836020828501011115611b9557600080fd5b9250929050565b600060208284031215611bad578081fd5b81356116d081612170565b60008060408385031215611bca578081fd5b8235611bd581612170565b91506020830135611be581612170565b809150509250929050565b60008060008060008060808789031215611c08578182fd5b8635611c1381612170565b9550602087013567ffffffffffffffff80821115611c2f578384fd5b611c3b8a838b01611b55565b90975095506040890135915080821115611c53578384fd5b50611c6089828a01611b55565b909450925050606087013560ff81168114611c79578182fd5b809150509295509295509295565b600080600060608486031215611c9b578283fd5b8335611ca681612170565b95602085013595506040909401359392505050565b600060208284031215611ccc578081fd5b6116d082611b40565b60008060008060408587031215611cea578384fd5b843567ffffffffffffffff80821115611d01578586fd5b611d0d88838901611b55565b90965094506020870135915080821115611d25578384fd5b818701915087601f830112611d38578384fd5b813581811115611d46578485fd5b8860208260051b8501011115611d5a578485fd5b95989497505060200194505050565b60008060408385031215611bca578182fd5b600060808284031215611d8c578081fd5b6040516080810181811067ffffffffffffffff82111715611dbb57634e487b7160e01b83526041600452602483fd5b6040528251611dc981612170565b815260208381015190820152604083015160028110611de6578283fd5b6040820152611df760608401611b40565b60608201529392505050565b600060208284031215611e14578081fd5b5035919050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b8183823760009101908152919050565b60008251611e66818460208701612113565b9190910192915050565b60006060820186835260208681850152606060408501528185835260808501905060808660051b860101925086845b87811015611f0b57868503607f190183528135368a9003601e19018112611ec4578687fd5b8901803567ffffffffffffffff811115611edc578788fd5b8036038b1315611eea578788fd5b611ef78782888501611e1b565b965050509183019190830190600101611e9f565b50929998505050505050505050565b606081526000611f2e606083018789611e1b565b8281036020840152611f41818688611e1b565b91505060ff831660408301529695505050505050565b6020815260008251806020840152611f76816040850160208701612113565b601f01601f19169190910160400192915050565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b60208082526010908201526f42523a205a45524f5f4144445245535360801b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252600f908201526e10948e8816915493d7d05353d55395608a1b604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b600082198211156120d4576120d461215a565b500190565b6000828210156120eb576120eb61215a565b500390565b600060ff821660ff84168082101561210a5761210a61215a565b90039392505050565b60005b8381101561212e578181015183820152602001612116565b838111156118c25750506000910152565b60006000198214156121535761215361215a565b5060010190565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b0381168114610e4157600080fdfea2646970667358221220dc1be1a24e20792b5641cc582ed1a4109a77a5c8235cc92db739a455a4ebee0f64736f6c63430008040033", "deployedBytecode": "0x6080604052600436106100ec5760003560e01c80638da5cb5b1161008a578063ce18acd411610059578063ce18acd41461026d578063d5804bd414610280578063f2fde38b146102a0578063ffa1ad74146102c057600080fd5b80638da5cb5b146101ef578063ac7cffa61461020d578063ae8f4f3a1461022d578063b0c8bd041461024d57600080fd5b8063485cc955116100c6578063485cc955146101775780635c975abb14610197578063715018a6146101ba5780637cb2b79c146101cf57600080fd5b8063271f7b99146100f85780632a709b141461011a578063383fe4671461015757600080fd5b366100f357005b600080fd5b34801561010457600080fd5b50610118610113366004611bf0565b6102e7565b005b34801561012657600080fd5b5060cc5461013a906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561016357600080fd5b50610118610172366004611bb8565b610388565b34801561018357600080fd5b50610118610192366004611d69565b610411565b3480156101a357600080fd5b5060975460ff16604051901515815260200161014e565b3480156101c657600080fd5b506101186104d3565b3480156101db57600080fd5b506101186101ea366004611b9c565b610509565b3480156101fb57600080fd5b506033546001600160a01b031661013a565b34801561021957600080fd5b5060cb5461013a906001600160a01b031681565b34801561023957600080fd5b50610118610248366004611cd5565b61057b565b34801561025957600080fd5b50610118610268366004611b9c565b610ac3565b61011861027b366004611e03565b610b35565b34801561028c57600080fd5b5061011861029b366004611c87565b610c6a565b3480156102ac57600080fd5b506101186102bb366004611b9c565b610da9565b3480156102cc57600080fd5b506102d5600081565b60405160ff909116815260200161014e565b6033546001600160a01b0316331461031a5760405162461bcd60e51b81526004016103119061202c565b60405180910390fd5b604051632ef18fbd60e11b81526001600160a01b03871690635de31f7a9061034e9088908890889088908890600401611f1a565b600060405180830381600087803b15801561036857600080fd5b505af115801561037c573d6000803e3d6000fd5b50505050505050505050565b6033546001600160a01b031633146103b25760405162461bcd60e51b81526004016103119061202c565b60405163f2fde38b60e01b81526001600160a01b03828116600483015283169063f2fde38b90602401600060405180830381600087803b1580156103f557600080fd5b505af1158015610409573d6000803e3d6000fd5b505050505050565b600054610100900460ff168061042a575060005460ff16155b6104465760405162461bcd60e51b815260040161031190611fb4565b600054610100900460ff16158015610468576000805461ffff19166101011790555b60cb80546001600160a01b038086166001600160a01b03199283161790925560cc8054928516929091169190911790554660cd556104a4610e44565b6104ac610eaf565b6104b4610f0f565b6104bc610f84565b80156104ce576000805461ff00191690555b505050565b6033546001600160a01b031633146104fd5760405162461bcd60e51b81526004016103119061202c565b6105076000610ff4565b565b6033546001600160a01b031633146105335760405162461bcd60e51b81526004016103119061202c565b6001600160a01b0381166105595760405162461bcd60e51b815260040161031190612002565b60cc80546001600160a01b0319166001600160a01b0392909216919091179055565b6002606554141561059e5760405162461bcd60e51b81526004016103119061208a565b600260655560975460ff16156105c65760405162461bcd60e51b815260040161031190611f8a565b600061060f61060a86868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061104692505050565b611073565b905060006106448260018151811061063757634e487b7160e01b600052603260045260246000fd5b6020026020010151611073565b90507f553685c68db2f1e0adf08d56c06ec87ff411232298a59276dbdb1b032c38151e6106988260008151811061068b57634e487b7160e01b600052603260045260246000fd5b60200260200101516111a5565b146106d75760405162461bcd60e51b815260206004820152600f60248201526e10948e881253959053125117d15595608a1b6044820152606401610311565b600061070a826001815181106106fd57634e487b7160e01b600052603260045260246000fd5b60200260200101516111f3565b90506000610732836002815181106106fd57634e487b7160e01b600052603260045260246000fd5b90506001600160a01b038116331461077c5760405162461bcd60e51b815260206004820152600d60248201526c21291d102727aa2fa7a72ba2a960991b6044820152606401610311565b60006107a28560028151811061068b57634e487b7160e01b600052603260045260246000fd5b9050806107c15760405162461bcd60e51b815260040161031190612061565b60006107e78660058151811061068b57634e487b7160e01b600052603260045260246000fd5b905060cd5481146108335760405162461bcd60e51b815260206004820152601660248201527521291d102ba927a723afaa20a923a2aa2fa1a420a4a760511b6044820152606401610311565b60006108598760048151811061068b57634e487b7160e01b600052603260045260246000fd5b905060cd548114156108a65760405162461bcd60e51b815260206004820152601660248201527521291d102ba927a723afa9a7aaa921a2afa1a420a4a760511b6044820152606401610311565b60008b8b6040516108b8929190611e44565b6040805191829003909120600081815260ca602052919091205490915060ff161561091c5760405162461bcd60e51b815260206004820152601460248201527321291d1021a7a6a6a4aa26a2a72a2fa5a727aba760611b6044820152606401610311565b600081815260ca602052604090819020805460ff1916600117905560cb5490516307cdd1ed60e31b81526001600160a01b0390911690633e6e8f689061096c90849086908f908f90600401611e70565b60206040518083038186803b15801561098457600080fd5b505afa158015610998573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109bc9190611cbb565b610a015760405162461bcd60e51b815260206004820152601660248201527542523a20494e56414c49445f5349474e41545552455360501b6044820152606401610311565b60cc5460cd5460405163707af71960e11b81526001600160a01b0389811660048301526024820192909252600092610a9c9230928a928a92169063e0f5ee329060440160806040518083038186803b158015610a5c57600080fd5b505afa158015610a70573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a949190611d7b565b929190611213565b9050610aaf816000015187848887611390565b505060016065555050505050505050505050565b6033546001600160a01b03163314610aed5760405162461bcd60e51b81526004016103119061202c565b6001600160a01b038116610b135760405162461bcd60e51b815260040161031190612002565b60cb80546001600160a01b0319166001600160a01b0392909216919091179055565b60026065541415610b585760405162461bcd60e51b81526004016103119061208a565b600260655560975460ff1615610b805760405162461bcd60e51b815260040161031190611f8a565b34610b9d5760405162461bcd60e51b815260040161031190612061565b60cc54604051637a38f9eb60e01b8152600481018390526001600160a01b0390911690637a38f9eb9060240160206040518083038186803b158015610be157600080fd5b505afa158015610bf5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c199190611cbb565b610c555760405162461bcd60e51b815260206004820152600d60248201526c10948e881393d517d193d55391609a1b6044820152606401610311565b610c626000333484611400565b506001606555565b60026065541415610c8d5760405162461bcd60e51b81526004016103119061208a565b600260655560975460ff1615610cb55760405162461bcd60e51b815260040161031190611f8a565b6001600160a01b038316610cdb5760405162461bcd60e51b815260040161031190612002565b81610cf85760405162461bcd60e51b815260040161031190612061565b6000610d8d3360cc5460405163707af71960e11b81526001600160a01b038881166004830152602482018790523092889291169063e0f5ee329060440160806040518083038186803b158015610d4d57600080fd5b505afa158015610d61573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d859190611d7b565b929190611498565b8051909150610d9e90338585611400565b505060016065555050565b6033546001600160a01b03163314610dd35760405162461bcd60e51b81526004016103119061202c565b6001600160a01b038116610e385760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610311565b610e4181610ff4565b50565b600054610100900460ff1680610e5d575060005460ff16155b610e795760405162461bcd60e51b815260040161031190611fb4565b600054610100900460ff16158015610e9b576000805461ffff19166101011790555b8015610e41576000805461ff001916905550565b600054610100900460ff1680610ec8575060005460ff16155b610ee45760405162461bcd60e51b815260040161031190611fb4565b600054610100900460ff16158015610f06576000805461ffff19166101011790555b610e9b33610ff4565b600054610100900460ff1680610f28575060005460ff16155b610f445760405162461bcd60e51b815260040161031190611fb4565b600054610100900460ff16158015610f66576000805461ffff19166101011790555b6097805460ff191690558015610e41576000805461ff001916905550565b600054610100900460ff1680610f9d575060005460ff16155b610fb95760405162461bcd60e51b815260040161031190611fb4565b600054610100900460ff16158015610fdb576000805461ffff19166101011790555b60016065558015610e41576000805461ff001916905550565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60408051808201825260008082526020918201528151808301909252825182529182019181019190915290565b606061107e826115a5565b61108757600080fd5b6000611092836115de565b905060008167ffffffffffffffff8111156110bd57634e487b7160e01b600052604160045260246000fd5b60405190808252806020026020018201604052801561110257816020015b60408051808201909152600080825260208201528152602001906001900390816110db5790505b50905060006111148560200151611661565b856020015161112391906120c1565b90506000805b8481101561119a5761113a836116e3565b915060405180604001604052808381526020018481525084828151811061117157634e487b7160e01b600052603260045260246000fd5b602090810291909101015261118682846120c1565b9250806111928161213f565b915050611129565b509195945050505050565b8051600090158015906111ba57508151602110155b6111c357600080fd5b6000806111cf8461178c565b8151919350915060208210156111eb5760208290036101000a90045b949350505050565b805160009060151461120457600080fd5b61120d826111a5565b92915050565b60408051608081018252600080825260208201819052918101829052606081019190915284606001516112795760405162461bcd60e51b815260206004820152600e60248201526d14950e881393d517d31254d5115160921b6044820152606401610311565b84516001600160a01b0316611298576112938484846117d3565b611387565b6001856040015160018111156112be57634e487b7160e01b600052602160045260246000fd5b141561132f5784516040516340c10f1960e01b81526001600160a01b03858116600483015260248201859052909116906340c10f19906044015b600060405180830381600087803b15801561131257600080fd5b505af1158015611326573d6000803e3d6000fd5b50505050611387565b60008560400151600181111561135557634e487b7160e01b600052602160045260246000fd5b1415611371578451611293906001600160a01b031684846118c8565b634e487b7160e01b600052600160045260246000fd5b50929392505050565b836001600160a01b0316856001600160a01b03167f812815d6ddc266545cbe93cd74cdaec6517a81842a230a1773c976e78389ad2e848660cd54866040516113f1949392919093845260208401929092526040830152606082015260800190565b60405180910390a35050505050565b6001600160a01b03838116600081815260c960209081526040918290205460cd548351888152928301919091528183015260608101859052905191928716917f553685c68db2f1e0adf08d56c06ec87ff411232298a59276dbdb1b032c38151e9181900360800190a36001600160a01b038316600090815260c96020526040812080549161148d8361213f565b919050555050505050565b60408051608081018252600080825260208201819052918101829052606081019190915284606001516114fe5760405162461bcd60e51b815260206004820152600e60248201526d14950e881393d517d31254d5115160921b6044820152606401610311565b60018560400151600181111561152457634e487b7160e01b600052602160045260246000fd5b1415611562578451604051632770a7eb60e21b81526001600160a01b0386811660048301526024820185905290911690639dc29fac906044016112f8565b60008560400151600181111561158857634e487b7160e01b600052602160045260246000fd5b1415611371578451611293906001600160a01b031685858561192b565b80516000906115b657506000919050565b6020820151805160001a9060c08210156115d4575060009392505050565b5060019392505050565b80516000906115ef57506000919050565b6000806115ff8460200151611661565b846020015161160e91906120c1565b905060008460000151856020015161162691906120c1565b90505b808210156116585761163a826116e3565b61164490836120c1565b9150826116508161213f565b935050611629565b50909392505050565b8051600090811a608081101561167a5750600092915050565b60b8811080611695575060c08110801590611695575060f881105b156116a35750600192915050565b60c08110156116d7576116b8600160b86120f0565b6116c59060ff16826120d9565b6116d09060016120c1565b9392505050565b6116b8600160f86120f0565b80516000908190811a60808110156116fe5760019150611785565b60b8811015611724576117126080826120d9565b61171d9060016120c1565b9150611785565b60c08110156117515760b78103600185019450806020036101000a85510460018201810193505050611785565b60f88110156117655761171260c0826120d9565b60f78103600185019450806020036101000a855104600182018101935050505b5092915050565b600080600061179e8460200151611661565b905060008185602001516117b291906120c1565b905060008286600001516117c691906120d9565b9196919550909350505050565b80836001600160a01b031631101561182d5760405162461bcd60e51b815260206004820152601860248201527f52543a20494e53554646494349454e545f42414c414e434500000000000000006044820152606401610311565b6000826001600160a01b03168260405160006040518083038185875af1925050503d806000811461187a576040519150601f19603f3d011682016040523d82523d6000602084013e61187f565b606091505b50509050806118c25760405162461bcd60e51b815260206004820152600f60248201526e14950e8814d1539117d49155915495608a1b6044820152606401610311565b50505050565b6040516001600160a01b0383166024820152604481018290526104ce90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611963565b6040516001600160a01b03808516602483015283166044820152606481018290526118c29085906323b872dd60e01b906084016118f4565b60006119b8826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611a359092919063ffffffff16565b8051909150156104ce57808060200190518101906119d69190611cbb565b6104ce5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610311565b60606111eb848460008585843b611a8e5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610311565b600080866001600160a01b03168587604051611aaa9190611e54565b60006040518083038185875af1925050503d8060008114611ae7576040519150601f19603f3d011682016040523d82523d6000602084013e611aec565b606091505b5091509150611afc828286611b07565b979650505050505050565b60608315611b165750816116d0565b825115611b265782518084602001fd5b8160405162461bcd60e51b81526004016103119190611f57565b80518015158114611b5057600080fd5b919050565b60008083601f840112611b66578182fd5b50813567ffffffffffffffff811115611b7d578182fd5b602083019150836020828501011115611b9557600080fd5b9250929050565b600060208284031215611bad578081fd5b81356116d081612170565b60008060408385031215611bca578081fd5b8235611bd581612170565b91506020830135611be581612170565b809150509250929050565b60008060008060008060808789031215611c08578182fd5b8635611c1381612170565b9550602087013567ffffffffffffffff80821115611c2f578384fd5b611c3b8a838b01611b55565b90975095506040890135915080821115611c53578384fd5b50611c6089828a01611b55565b909450925050606087013560ff81168114611c79578182fd5b809150509295509295509295565b600080600060608486031215611c9b578283fd5b8335611ca681612170565b95602085013595506040909401359392505050565b600060208284031215611ccc578081fd5b6116d082611b40565b60008060008060408587031215611cea578384fd5b843567ffffffffffffffff80821115611d01578586fd5b611d0d88838901611b55565b90965094506020870135915080821115611d25578384fd5b818701915087601f830112611d38578384fd5b813581811115611d46578485fd5b8860208260051b8501011115611d5a578485fd5b95989497505060200194505050565b60008060408385031215611bca578182fd5b600060808284031215611d8c578081fd5b6040516080810181811067ffffffffffffffff82111715611dbb57634e487b7160e01b83526041600452602483fd5b6040528251611dc981612170565b815260208381015190820152604083015160028110611de6578283fd5b6040820152611df760608401611b40565b60608201529392505050565b600060208284031215611e14578081fd5b5035919050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b8183823760009101908152919050565b60008251611e66818460208701612113565b9190910192915050565b60006060820186835260208681850152606060408501528185835260808501905060808660051b860101925086845b87811015611f0b57868503607f190183528135368a9003601e19018112611ec4578687fd5b8901803567ffffffffffffffff811115611edc578788fd5b8036038b1315611eea578788fd5b611ef78782888501611e1b565b965050509183019190830190600101611e9f565b50929998505050505050505050565b606081526000611f2e606083018789611e1b565b8281036020840152611f41818688611e1b565b91505060ff831660408301529695505050505050565b6020815260008251806020840152611f76816040850160208701612113565b601f01601f19169190910160400192915050565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b60208082526010908201526f42523a205a45524f5f4144445245535360801b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252600f908201526e10948e8816915493d7d05353d55395608a1b604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b600082198211156120d4576120d461215a565b500190565b6000828210156120eb576120eb61215a565b500390565b600060ff821660ff84168082101561210a5761210a61215a565b90039392505050565b60005b8381101561212e578181015183820152602001612116565b838111156118c25750506000910152565b60006000198214156121535761215361215a565b5060010190565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b0381168114610e4157600080fdfea2646970667358221220dc1be1a24e20792b5641cc582ed1a4109a77a5c8235cc92db739a455a4ebee0f64736f6c63430008040033", "devdoc": { "kind": "dev", "methods": { "owner()": { "details": "Returns the address of the current owner." }, "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 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." }, "setCosignerManager(address)": { "details": "This should be the contract responsible for sign by behalf of the payloads", "params": { "newCosignerManager": "address of cosigner manager contract" } }, "setTokenManager(address)": { "details": "This should be the contract responsible for checking and add tokens to crosschain mapping", "params": { "newTokenManager": "address of token manager contract" } }, "transferOwnership(address)": { "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." }, "transferTokenOwnership(address,address)": { "details": "This token should be ownable in order to do this", "params": { "newOwner": "new token owner", "token": "address of bridged token" } }, "updateTokenInfo(address,string,string,uint8)": { "details": "This token should be bridged in order to do this", "params": { "newDecimals": "a new decimal of token", "newName": "a new name of token", "newSymbol": "a new symbol of token", "token": "address of bridged token" } } }, "version": 1 }, "userdoc": { "kind": "user", "methods": { "setCosignerManager(address)": { "notice": "Set the cosigner manager, callable only by cosigners" }, "setTokenManager(address)": { "notice": "Set the token manager, callable only by cosigners" }, "transferTokenOwnership(address,address)": { "notice": "Update token ownership (bor token upgrade and maintenance)" }, "updateTokenInfo(address,string,string,uint8)": { "notice": "Update token info in case of mistake or name re-branding" } }, "version": 1 }, "storageLayout": { "storage": [ { "astId": 130, "contract": "contracts/BridgeRouter.sol:BridgeRouter", "label": "_initialized", "offset": 0, "slot": "0", "type": "t_bool" }, { "astId": 133, "contract": "contracts/BridgeRouter.sol:BridgeRouter", "label": "_initializing", "offset": 1, "slot": "0", "type": "t_bool" }, { "astId": 1060, "contract": "contracts/BridgeRouter.sol:BridgeRouter", "label": "__gap", "offset": 0, "slot": "1", "type": "t_array(t_uint256)50_storage" }, { "astId": 10, "contract": "contracts/BridgeRouter.sol:BridgeRouter", "label": "_owner", "offset": 0, "slot": "51", "type": "t_address" }, { "astId": 123, "contract": "contracts/BridgeRouter.sol:BridgeRouter", "label": "__gap", "offset": 0, "slot": "52", "type": "t_array(t_uint256)49_storage" }, { "astId": 297, "contract": "contracts/BridgeRouter.sol:BridgeRouter", "label": "_status", "offset": 0, "slot": "101", "type": "t_uint256" }, { "astId": 340, "contract": "contracts/BridgeRouter.sol:BridgeRouter", "label": "__gap", "offset": 0, "slot": "102", "type": "t_array(t_uint256)49_storage" }, { "astId": 191, "contract": "contracts/BridgeRouter.sol:BridgeRouter", "label": "_paused", "offset": 0, "slot": "151", "type": "t_bool" }, { "astId": 282, "contract": "contracts/BridgeRouter.sol:BridgeRouter", "label": "__gap", "offset": 0, "slot": "152", "type": "t_array(t_uint256)49_storage" }, { "astId": 2262, "contract": "contracts/BridgeRouter.sol:BridgeRouter", "label": "_nonces", "offset": 0, "slot": "201", "type": "t_mapping(t_address,t_uint256)" }, { "astId": 2266, "contract": "contracts/BridgeRouter.sol:BridgeRouter", "label": "_commitments", "offset": 0, "slot": "202", "type": "t_mapping(t_bytes32,t_bool)" }, { "astId": 2269, "contract": "contracts/BridgeRouter.sol:BridgeRouter", "label": "cosignerManager", "offset": 0, "slot": "203", "type": "t_contract(IBridgeCosignerManager)2845" }, { "astId": 2272, "contract": "contracts/BridgeRouter.sol:BridgeRouter", "label": "tokenManager", "offset": 0, "slot": "204", "type": "t_contract(IBridgeTokenManager)2921" }, { "astId": 2274, "contract": "contracts/BridgeRouter.sol:BridgeRouter", "label": "_chainId", "offset": 0, "slot": "205", "type": "t_uint256" }, { "astId": 2283, "contract": "contracts/BridgeRouter.sol:BridgeRouter", "label": "__gap", "offset": 0, "slot": "206", "type": "t_array(t_uint256)49_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_bytes32": { "encoding": "inplace", "label": "bytes32", "numberOfBytes": "32" }, "t_contract(IBridgeCosignerManager)2845": { "encoding": "inplace", "label": "contract IBridgeCosignerManager", "numberOfBytes": "20" }, "t_contract(IBridgeTokenManager)2921": { "encoding": "inplace", "label": "contract IBridgeTokenManager", "numberOfBytes": "20" }, "t_mapping(t_address,t_uint256)": { "encoding": "mapping", "key": "t_address", "label": "mapping(address => uint256)", "numberOfBytes": "32", "value": "t_uint256" }, "t_mapping(t_bytes32,t_bool)": { "encoding": "mapping", "key": "t_bytes32", "label": "mapping(bytes32 => bool)", "numberOfBytes": "32", "value": "t_bool" }, "t_uint256": { "encoding": "inplace", "label": "uint256", "numberOfBytes": "32" } } } }