Source Code
Overview
ETH Balance
0 ETH
More Info
ContractCreator
Multichain Info
N/A
Loading...
Loading
Contract Name:
FxBridgeMigrateLogic
Compiler Version
v0.8.2+commit.661d1103
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma experimental ABIEncoderV2; pragma solidity ^0.8.0; import {SafeMathUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/math/SafeMathUpgradeable.sol"; import {IERC20MetadataUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20MetadataUpgradeable.sol"; import {SafeERC20Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol"; import {AddressUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol"; import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; import {PausableUpgradeable} from "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol"; import {ReentrancyGuardUpgradeable} from "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol"; import {IERC20ExtensionsUpgradeable} from "./IERC20ExtensionsUpgradeable.sol"; /* solhint-disable custom-errors */ contract FxBridgeMigrateLogic is ReentrancyGuardUpgradeable, OwnableUpgradeable, PausableUpgradeable { using SafeMathUpgradeable for uint256; using SafeERC20Upgradeable for IERC20MetadataUpgradeable; using AddressUpgradeable for address; /* solhint-disable var-name-mixedcase */ bytes32 public state_fxBridgeId; uint256 public state_powerThreshold; uint256 public state_lastEventNonce; bytes32 public state_lastOracleSetCheckpoint; uint256 public state_lastOracleSetNonce; mapping(address => uint256) public state_lastBatchNonces; address[] public bridgeTokens; mapping(address => TokenStatus) public tokenStatus; string public version; struct TokenStatus { bool isOriginated; bool isActive; bool isExist; } struct TransferInfo { uint256 amount; address destination; uint256 fee; address exchange; uint256 minExchange; } struct BridgeToken { address addr; string name; string symbol; uint8 decimals; } /* =============== INIT =============== */ function init( bytes32 _fxBridgeId, uint256 _powerThreshold, uint256 _lastEventNonce, bytes32 _lastOracleSetCheckpoint, uint256 _lastOracleSetNonce, address[] memory _bridgeTokens, uint256[] memory _lastBatchNonces, TokenStatus[] memory _tokenStatuses ) public initializer { __Pausable_init(); __Ownable_init(); __ReentrancyGuard_init(); require( _lastBatchNonces.length == _bridgeTokens.length && _bridgeTokens.length == _tokenStatuses.length, "Malformed last batch token information." ); state_fxBridgeId = _fxBridgeId; state_powerThreshold = _powerThreshold; state_lastEventNonce = _lastEventNonce; state_lastOracleSetCheckpoint = _lastOracleSetCheckpoint; state_lastOracleSetNonce = _lastOracleSetNonce; for (uint256 i = 0; i < _bridgeTokens.length; i++) { bridgeTokens.push(_bridgeTokens[i]); state_lastBatchNonces[_bridgeTokens[i]] = _lastBatchNonces[i]; tokenStatus[_bridgeTokens[i]] = _tokenStatuses[i]; } version = "1.0.0"; } /* =============== MUTATIVE FUNCTIONS =============== */ function addBridgeToken( address _tokenAddr, bytes32 _channelIBC, bool _isOriginated ) public onlyOwner returns (bool) { require(_tokenAddr != address(0), "Invalid token address"); require( tokenStatus[_tokenAddr].isExist == false, "Bridge token already exists" ); _handlerAddBridgeToken( _tokenAddr, TokenStatus(_isOriginated, true, true) ); emit AddBridgeTokenEvent( _tokenAddr, IERC20MetadataUpgradeable(_tokenAddr).name(), IERC20MetadataUpgradeable(_tokenAddr).symbol(), IERC20MetadataUpgradeable(_tokenAddr).decimals(), state_lastEventNonce, _channelIBC ); return true; } function _handlerAddBridgeToken( address _tokenAddr, TokenStatus memory _tokenStatus ) internal { bridgeTokens.push(_tokenAddr); tokenStatus[_tokenAddr] = _tokenStatus; state_lastEventNonce = state_lastEventNonce.add(1); } function pauseBridgeToken( address _tokenAddr ) public onlyOwner returns (bool) { require( tokenStatus[_tokenAddr].isExist == true, "Bridge token doesn't exists" ); require( tokenStatus[_tokenAddr].isActive == true, "Bridge token already paused" ); tokenStatus[_tokenAddr].isActive = false; return true; } function activeBridgeToken( address _tokenAddr ) public onlyOwner returns (bool) { require( tokenStatus[_tokenAddr].isExist == true, "Bridge token doesn't exists" ); require( tokenStatus[_tokenAddr].isActive == false, "Bridge token already actived" ); tokenStatus[_tokenAddr].isActive = true; return true; } function updateOracleSet( address[] memory _newOracles, uint256[] memory _newPowers, uint256 _newOracleSetNonce, address[] memory _currentOracles, uint256[] memory _currentPowers, uint256 _currentOracleSetNonce, uint8[] memory _v, bytes32[] memory _r, bytes32[] memory _s ) public whenNotPaused { require( _newOracleSetNonce > _currentOracleSetNonce, "New oracle set nonce must be greater than the current nonce" ); require( _newOracles.length == _newPowers.length, "Malformed new oracle set" ); require( _currentOracles.length == _currentPowers.length && _currentOracles.length == _v.length && _currentOracles.length == _r.length && _currentOracles.length == _s.length, "Malformed current oracle set" ); require( makeCheckpoint( _currentOracles, _currentPowers, _currentOracleSetNonce, state_fxBridgeId ) == state_lastOracleSetCheckpoint, "Supplied current oracles and powers do not match checkpoint." ); bytes32 newCheckpoint = makeCheckpoint( _newOracles, _newPowers, _newOracleSetNonce, state_fxBridgeId ); checkOracleSignatures( _currentOracles, _currentPowers, _v, _r, _s, newCheckpoint, state_powerThreshold ); state_lastOracleSetCheckpoint = newCheckpoint; state_lastOracleSetNonce = _newOracleSetNonce; state_lastEventNonce = state_lastEventNonce.add(1); emit OracleSetUpdatedEvent( _newOracleSetNonce, state_lastEventNonce, _newOracles, _newPowers ); } function sendToFx( address _tokenContract, bytes32 _destination, bytes32 _targetIBC, uint256 _amount ) public payable nonReentrant whenNotPaused { require(_amount > 0, "amount should be greater than zero "); TokenStatus memory _tokenStatus = tokenStatus[_tokenContract]; require(_tokenStatus.isExist, "Unsupported token address"); require(_tokenStatus.isActive, "token was paused"); IERC20MetadataUpgradeable(_tokenContract).safeTransferFrom( msg.sender, address(this), _amount ); if (_tokenStatus.isOriginated == true) { IERC20ExtensionsUpgradeable(_tokenContract).burn(_amount); } state_lastEventNonce = state_lastEventNonce.add(1); emit SendToFxEvent( _tokenContract, msg.sender, _destination, _targetIBC, _amount, state_lastEventNonce ); } function submitBatch( address[] memory _currentOracles, uint256[] memory _currentPowers, uint8[] memory _v, bytes32[] memory _r, bytes32[] memory _s, uint256[] memory _amounts, address[] memory _destinations, uint256[] memory _fees, uint256[2] memory _nonceArray, address _tokenContract, uint256 _batchTimeout, address _feeReceive ) public nonReentrant whenNotPaused { { TokenStatus memory _tokenStatus = tokenStatus[_tokenContract]; require(_tokenStatus.isExist, "Unsupported token address"); require(_tokenStatus.isActive, "Token was paused"); require( state_lastBatchNonces[_tokenContract] < _nonceArray[1], "New batch nonce must be greater than the current nonce." ); require( block.number < _batchTimeout, "Batch timeout must be greater than the current block height." ); require( _currentOracles.length == _currentPowers.length && _currentOracles.length == _v.length && _currentOracles.length == _r.length && _currentOracles.length == _s.length, "Malformed current oracle set." ); require( makeCheckpoint( _currentOracles, _currentPowers, _nonceArray[0], state_fxBridgeId ) == state_lastOracleSetCheckpoint, "Supplied current oracles and powers do not match checkpoint." ); require( _amounts.length == _destinations.length && _amounts.length == _fees.length, "Malformed batch of transactions." ); checkOracleSignatures( _currentOracles, _currentPowers, _v, _r, _s, keccak256( abi.encode( state_fxBridgeId, // bytes32 encoding of "transactionBatch" 0x7472616e73616374696f6e426174636800000000000000000000000000000000, _amounts, _destinations, _fees, _nonceArray[1], _tokenContract, _batchTimeout, _feeReceive ) ), state_powerThreshold ); state_lastBatchNonces[_tokenContract] = _nonceArray[1]; { uint256 totalFee; for (uint256 i = 0; i < _amounts.length; i++) { totalFee = totalFee.add(_fees[i]); if (_tokenStatus.isOriginated == true) { IERC20ExtensionsUpgradeable(_tokenContract).mint( address(this), _amounts[i] ); } IERC20MetadataUpgradeable(_tokenContract).safeTransfer( _destinations[i], _amounts[i] ); } if (_tokenStatus.isOriginated == true) { IERC20ExtensionsUpgradeable(_tokenContract).mint( address(this), totalFee ); } IERC20MetadataUpgradeable(_tokenContract).safeTransfer( _feeReceive, totalFee ); } } { state_lastEventNonce = state_lastEventNonce.add(1); emit TransactionBatchExecutedEvent( _nonceArray[1], _tokenContract, state_lastEventNonce ); } } function transferOwner( address _token, address _newOwner ) public onlyOwner returns (bool) { IERC20ExtensionsUpgradeable(_token).transferOwnership(_newOwner); emit TransferOwnerEvent(_token, _newOwner); return true; } /* =============== QUERY FUNCTIONS =============== */ function lastBatchNonce( address _erc20Address ) public view returns (uint256) { return state_lastBatchNonces[_erc20Address]; } function checkAssetStatus(address _tokenAddr) public view returns (bool) { return tokenStatus[_tokenAddr].isExist; } /* ============== HELP FUNCTIONS =============== */ function verifySig( address _signer, bytes32 _theHash, uint8 _v, bytes32 _r, bytes32 _s ) private pure returns (bool) { bytes32 messageDigest = keccak256( abi.encodePacked("\x19Ethereum Signed Message:\n32", _theHash) ); return _signer == ecrecover(messageDigest, _v, _r, _s); } function makeCheckpoint( address[] memory _oracles, uint256[] memory _powers, uint256 _oracleSetNonce, bytes32 _fxBridgeId ) public pure returns (bytes32) { // bytes32 encoding of the string "checkpoint" bytes32 methodName = 0x636865636b706f696e7400000000000000000000000000000000000000000000; return keccak256( abi.encode( _fxBridgeId, methodName, _oracleSetNonce, _oracles, _powers ) ); } function checkOracleSignatures( address[] memory _currentOracles, uint256[] memory _currentPowers, uint8[] memory _v, bytes32[] memory _r, bytes32[] memory _s, bytes32 _theHash, uint256 _powerThreshold ) public pure { uint256 cumulativePower = 0; for (uint256 i = 0; i < _currentOracles.length; i++) { if (_v[i] != 0) { require( verifySig( _currentOracles[i], _theHash, _v[i], _r[i], _s[i] ), "Oracle signature does not match." ); cumulativePower = cumulativePower + _currentPowers[i]; if (cumulativePower > _powerThreshold) { break; } } } require( cumulativePower > _powerThreshold, "Submitted oracle set signatures do not have enough power." ); } function pause() public onlyOwner whenNotPaused { _pause(); } function unpause() public onlyOwner whenPaused { _unpause(); } function getBridgeTokenList() public view returns (BridgeToken[] memory) { BridgeToken[] memory result = new BridgeToken[](bridgeTokens.length); for (uint256 i = 0; i < bridgeTokens.length; i++) { address _tokenAddr = address(bridgeTokens[i]); BridgeToken memory bridgeToken = BridgeToken( _tokenAddr, IERC20MetadataUpgradeable(_tokenAddr).name(), IERC20MetadataUpgradeable(_tokenAddr).symbol(), IERC20MetadataUpgradeable(_tokenAddr).decimals() ); result[i] = bridgeToken; } return result; } /* =============== EVENTS =============== */ event TransactionBatchExecutedEvent( uint256 indexed _batchNonce, address indexed _token, uint256 _eventNonce ); event SendToFxEvent( address indexed _tokenContract, address indexed _sender, bytes32 indexed _destination, bytes32 _targetIBC, uint256 _amount, uint256 _eventNonce ); event AddBridgeTokenEvent( address indexed _tokenContract, string _name, string _symbol, uint8 _decimals, uint256 _eventNonce, bytes32 _channelIBC ); event OracleSetUpdatedEvent( uint256 indexed _newOracleSetNonce, uint256 _eventNonce, address[] _oracles, uint256[] _powers ); event TransferOwnerEvent(address _token, address _newOwner); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/ContextUpgradeable.sol"; import "../proxy/utils/Initializable.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ function __Ownable_init() internal onlyInitializing { __Ownable_init_unchained(); } function __Ownable_init_unchained() internal onlyInitializing { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev 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. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.1) (proxy/utils/Initializable.sol) pragma solidity ^0.8.2; import "../../utils/AddressUpgradeable.sol"; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in * case an upgrade adds a module that needs to be initialized. * * For example: * * [.hljs-theme-light.nopadding] * ``` * contract MyToken is ERC20Upgradeable { * function initialize() initializer public { * __ERC20_init("MyToken", "MTK"); * } * } * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable { * function initializeV2() reinitializer(2) public { * __ERC20Permit_init("MyToken"); * } * } * ``` * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. * * [CAUTION] * ==== * Avoid leaving a contract uninitialized. * * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() { * _disableInitializers(); * } * ``` * ==== */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. * @custom:oz-retyped-from bool */ uint8 private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Triggered when the contract has been initialized or reinitialized. */ event Initialized(uint8 version); /** * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope, * `onlyInitializing` functions can be used to initialize parent contracts. * * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a * constructor. * * Emits an {Initialized} event. */ modifier initializer() { bool isTopLevelCall = !_initializing; require( (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1), "Initializable: contract is already initialized" ); _initialized = 1; if (isTopLevelCall) { _initializing = true; } _; if (isTopLevelCall) { _initializing = false; emit Initialized(1); } } /** * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be * used to initialize parent contracts. * * A reinitializer may be used after the original initialization step. This is essential to configure modules that * are added through upgrades and that require initialization. * * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer` * cannot be nested. If one is invoked in the context of another, execution will revert. * * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in * a contract, executing them in the right order is up to the developer or operator. * * WARNING: setting the version to 255 will prevent any future reinitialization. * * Emits an {Initialized} event. */ modifier reinitializer(uint8 version) { require(!_initializing && _initialized < version, "Initializable: contract is already initialized"); _initialized = version; _initializing = true; _; _initializing = false; emit Initialized(version); } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} and {reinitializer} modifiers, directly or indirectly. */ modifier onlyInitializing() { require(_initializing, "Initializable: contract is not initializing"); _; } /** * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call. * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized * to any version. It is recommended to use this to lock implementation contracts that are designed to be called * through proxies. * * Emits an {Initialized} event the first time it is successfully executed. */ function _disableInitializers() internal virtual { require(!_initializing, "Initializable: contract is initializing"); if (_initialized < type(uint8).max) { _initialized = type(uint8).max; emit Initialized(type(uint8).max); } } /** * @dev Returns the highest version that has been initialized. See {reinitializer}. */ function _getInitializedVersion() internal view returns (uint8) { return _initialized; } /** * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}. */ function _isInitializing() internal view returns (bool) { return _initializing; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol) pragma solidity ^0.8.0; import "../utils/ContextUpgradeable.sol"; import "../proxy/utils/Initializable.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract PausableUpgradeable is Initializable, ContextUpgradeable { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ function __Pausable_init() internal onlyInitializing { __Pausable_init_unchained(); } function __Pausable_init_unchained() internal onlyInitializing { _paused = false; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { _requireNotPaused(); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { _requirePaused(); _; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Throws if the contract is paused. */ function _requireNotPaused() internal view virtual { require(!paused(), "Pausable: paused"); } /** * @dev Throws if the contract is not paused. */ function _requirePaused() internal view virtual { require(paused(), "Pausable: not paused"); } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; import "../proxy/utils/Initializable.sol"; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuardUpgradeable is Initializable { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; function __ReentrancyGuard_init() internal onlyInitializing { __ReentrancyGuard_init_unchained(); } function __ReentrancyGuard_init_unchained() internal onlyInitializing { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { // On the first call to nonReentrant, _status will be _NOT_ENTERED require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; } function _nonReentrantAfter() private { // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. */ interface IERC20PermitUpgradeable { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol) pragma solidity ^0.8.0; import "../IERC20Upgradeable.sol"; /** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */ interface IERC20MetadataUpgradeable is IERC20Upgradeable { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20Upgradeable { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20Upgradeable.sol"; import "../extensions/draft-IERC20PermitUpgradeable.sol"; import "../../../utils/AddressUpgradeable.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20Upgradeable { using AddressUpgradeable for address; function safeTransfer( IERC20Upgradeable token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20Upgradeable token, address from, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20Upgradeable token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IERC20Upgradeable token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20Upgradeable token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } function safePermit( IERC20PermitUpgradeable token, address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) internal { uint256 nonceBefore = token.nonces(owner); token.permit(owner, spender, value, deadline, v, r, s); uint256 nonceAfter = token.nonces(owner); require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed"); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20Upgradeable token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library AddressUpgradeable { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; import "../proxy/utils/Initializable.sol"; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract ContextUpgradeable is Initializable { function __Context_init() internal onlyInitializing { } function __Context_init_unchained() internal onlyInitializing { } function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (utils/math/SafeMath.sol) pragma solidity ^0.8.0; // CAUTION // This version of SafeMath should only be used with Solidity 0.8 or later, // because it relies on the compiler's built in overflow checks. /** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */ library SafeMathUpgradeable { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the subtraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { return a + b; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { return a * b; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b <= a, errorMessage); return a - b; } } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a / b; } } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a % b; } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface IERC20ExtensionsUpgradeable { /** * @dev Destroys `amount` tokens from the caller. * * See {ERC20-_burn}. */ function burn(uint256 amount) external; /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. */ function mint(address account, uint256 amount) external; /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) external; }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_tokenContract","type":"address"},{"indexed":false,"internalType":"string","name":"_name","type":"string"},{"indexed":false,"internalType":"string","name":"_symbol","type":"string"},{"indexed":false,"internalType":"uint8","name":"_decimals","type":"uint8"},{"indexed":false,"internalType":"uint256","name":"_eventNonce","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"_channelIBC","type":"bytes32"}],"name":"AddBridgeTokenEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"_newOracleSetNonce","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_eventNonce","type":"uint256"},{"indexed":false,"internalType":"address[]","name":"_oracles","type":"address[]"},{"indexed":false,"internalType":"uint256[]","name":"_powers","type":"uint256[]"}],"name":"OracleSetUpdatedEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_tokenContract","type":"address"},{"indexed":true,"internalType":"address","name":"_sender","type":"address"},{"indexed":true,"internalType":"bytes32","name":"_destination","type":"bytes32"},{"indexed":false,"internalType":"bytes32","name":"_targetIBC","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_eventNonce","type":"uint256"}],"name":"SendToFxEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"_batchNonce","type":"uint256"},{"indexed":true,"internalType":"address","name":"_token","type":"address"},{"indexed":false,"internalType":"uint256","name":"_eventNonce","type":"uint256"}],"name":"TransactionBatchExecutedEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_token","type":"address"},{"indexed":false,"internalType":"address","name":"_newOwner","type":"address"}],"name":"TransferOwnerEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[{"internalType":"address","name":"_tokenAddr","type":"address"}],"name":"activeBridgeToken","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_tokenAddr","type":"address"},{"internalType":"bytes32","name":"_channelIBC","type":"bytes32"},{"internalType":"bool","name":"_isOriginated","type":"bool"}],"name":"addBridgeToken","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"bridgeTokens","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_tokenAddr","type":"address"}],"name":"checkAssetStatus","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_currentOracles","type":"address[]"},{"internalType":"uint256[]","name":"_currentPowers","type":"uint256[]"},{"internalType":"uint8[]","name":"_v","type":"uint8[]"},{"internalType":"bytes32[]","name":"_r","type":"bytes32[]"},{"internalType":"bytes32[]","name":"_s","type":"bytes32[]"},{"internalType":"bytes32","name":"_theHash","type":"bytes32"},{"internalType":"uint256","name":"_powerThreshold","type":"uint256"}],"name":"checkOracleSignatures","outputs":[],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"getBridgeTokenList","outputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"uint8","name":"decimals","type":"uint8"}],"internalType":"struct FxBridgeMigrateLogic.BridgeToken[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_fxBridgeId","type":"bytes32"},{"internalType":"uint256","name":"_powerThreshold","type":"uint256"},{"internalType":"uint256","name":"_lastEventNonce","type":"uint256"},{"internalType":"bytes32","name":"_lastOracleSetCheckpoint","type":"bytes32"},{"internalType":"uint256","name":"_lastOracleSetNonce","type":"uint256"},{"internalType":"address[]","name":"_bridgeTokens","type":"address[]"},{"internalType":"uint256[]","name":"_lastBatchNonces","type":"uint256[]"},{"components":[{"internalType":"bool","name":"isOriginated","type":"bool"},{"internalType":"bool","name":"isActive","type":"bool"},{"internalType":"bool","name":"isExist","type":"bool"}],"internalType":"struct FxBridgeMigrateLogic.TokenStatus[]","name":"_tokenStatuses","type":"tuple[]"}],"name":"init","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_erc20Address","type":"address"}],"name":"lastBatchNonce","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_oracles","type":"address[]"},{"internalType":"uint256[]","name":"_powers","type":"uint256[]"},{"internalType":"uint256","name":"_oracleSetNonce","type":"uint256"},{"internalType":"bytes32","name":"_fxBridgeId","type":"bytes32"}],"name":"makeCheckpoint","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_tokenAddr","type":"address"}],"name":"pauseBridgeToken","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_tokenContract","type":"address"},{"internalType":"bytes32","name":"_destination","type":"bytes32"},{"internalType":"bytes32","name":"_targetIBC","type":"bytes32"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"sendToFx","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"state_fxBridgeId","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"state_lastBatchNonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"state_lastEventNonce","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"state_lastOracleSetCheckpoint","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"state_lastOracleSetNonce","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"state_powerThreshold","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_currentOracles","type":"address[]"},{"internalType":"uint256[]","name":"_currentPowers","type":"uint256[]"},{"internalType":"uint8[]","name":"_v","type":"uint8[]"},{"internalType":"bytes32[]","name":"_r","type":"bytes32[]"},{"internalType":"bytes32[]","name":"_s","type":"bytes32[]"},{"internalType":"uint256[]","name":"_amounts","type":"uint256[]"},{"internalType":"address[]","name":"_destinations","type":"address[]"},{"internalType":"uint256[]","name":"_fees","type":"uint256[]"},{"internalType":"uint256[2]","name":"_nonceArray","type":"uint256[2]"},{"internalType":"address","name":"_tokenContract","type":"address"},{"internalType":"uint256","name":"_batchTimeout","type":"uint256"},{"internalType":"address","name":"_feeReceive","type":"address"}],"name":"submitBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"tokenStatus","outputs":[{"internalType":"bool","name":"isOriginated","type":"bool"},{"internalType":"bool","name":"isActive","type":"bool"},{"internalType":"bool","name":"isExist","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_newOwner","type":"address"}],"name":"transferOwner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_newOracles","type":"address[]"},{"internalType":"uint256[]","name":"_newPowers","type":"uint256[]"},{"internalType":"uint256","name":"_newOracleSetNonce","type":"uint256"},{"internalType":"address[]","name":"_currentOracles","type":"address[]"},{"internalType":"uint256[]","name":"_currentPowers","type":"uint256[]"},{"internalType":"uint256","name":"_currentOracleSetNonce","type":"uint256"},{"internalType":"uint8[]","name":"_v","type":"uint8[]"},{"internalType":"bytes32[]","name":"_r","type":"bytes32[]"},{"internalType":"bytes32[]","name":"_s","type":"bytes32[]"}],"name":"updateOracleSet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b506134e2806100206000396000f3fe6080604052600436106101b75760003560e01c8063715018a6116100ec578063dde65aea1161008a578063ee09517511610064578063ee0951751461050b578063f1099f611461052b578063f2fde38b1461054b578063f92367fd1461056b576101b7565b8063dde65aea146104a8578063df97174b146104c8578063e5a2b5d2146104f5576101b7565b80638456cb59116100c65780638456cb591461043f5780638da5cb5b14610454578063a36a4ab014610472578063bb83bf9614610492576101b7565b8063715018a6146103f457806371cbf3811461040957806373b2054714610429576101b7565b80633f4ba83a116101595780635c975abb116101335780635c975abb1461037b5780636189d1071461039357806370a0eb94146103a657806370e5a898146103bc576101b7565b80633f4ba83a14610305578063474d561c1461031a57806354fd4d5014610359576101b7565b8063285a190a11610195578063285a190a1461027357806331678cf614610295578063332caa1f146102c55780633a08e299146102e5576101b7565b8063011b2174146101bc5780630acac942146101ef578063283040b414610251575b600080fd5b3480156101c857600080fd5b506101dc6101d73660046129ab565b610581565b6040519081526020015b60405180910390f35b3480156101fb57600080fd5b5061023261020a3660046129ab565b60d06020526000908152604090205460ff808216916101008104821691620100009091041683565b60408051931515845291151560208401521515908201526060016101e6565b34801561025d57600080fd5b506102666105a0565b6040516101e691906130d9565b34801561027f57600080fd5b5061029361028e366004612c18565b610859565b005b3480156102a157600080fd5b506102b56102b03660046129c5565b610a66565b60405190151581526020016101e6565b3480156102d157600080fd5b506102936102e0366004612a6e565b610b18565b3480156102f157600080fd5b50610293610300366004612cf6565b61111f565b34801561031157600080fd5b5061029361131c565b34801561032657600080fd5b506102b56103353660046129ab565b6001600160a01b0316600090815260d0602052604090205462010000900460ff1690565b34801561036557600080fd5b5061036e611336565b6040516101e69190613240565b34801561038757600080fd5b5060975460ff166102b5565b6102936103a1366004612a36565b6113c4565b3480156103b257600080fd5b506101dc60cc5481565b3480156103c857600080fd5b506103dc6103d7366004612feb565b6115fd565b6040516001600160a01b0390911681526020016101e6565b34801561040057600080fd5b50610293611627565b34801561041557600080fd5b506101dc610424366004612e1c565b611639565b34801561043557600080fd5b506101dc60cb5481565b34801561044b57600080fd5b50610293611686565b34801561046057600080fd5b506065546001600160a01b03166103dc565b34801561047e57600080fd5b506102b561048d3660046129ab565b61169e565b34801561049e57600080fd5b506101dc60cd5481565b3480156104b457600080fd5b506102b56104c33660046129ab565b6117b4565b3480156104d457600080fd5b506101dc6104e33660046129ab565b60ce6020526000908152604090205481565b34801561050157600080fd5b506101dc60ca5481565b34801561051757600080fd5b50610293610526366004612ea8565b6118c9565b34801561053757600080fd5b506102b56105463660046129f7565b611c4f565b34801561055757600080fd5b506102936105663660046129ab565b611eef565b34801561057757600080fd5b506101dc60c95481565b6001600160a01b038116600090815260ce60205260409020545b919050565b60cf546060906000906001600160401b038111156105ce57634e487b7160e01b600052604160045260246000fd5b60405190808252806020026020018201604052801561063657816020015b610623604051806080016040528060006001600160a01b031681526020016060815260200160608152602001600060ff1681525090565b8152602001906001900390816105ec5790505b50905060005b60cf5481101561085357600060cf828154811061066957634e487b7160e01b600052603260045260246000fd5b9060005260206000200160009054906101000a90046001600160a01b0316905060006040518060800160405280836001600160a01b03168152602001836001600160a01b03166306fdde036040518163ffffffff1660e01b815260040160006040518083038186803b1580156106de57600080fd5b505afa1580156106f2573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261071a9190810190612f5c565b8152602001836001600160a01b03166395d89b416040518163ffffffff1660e01b815260040160006040518083038186803b15801561075857600080fd5b505afa15801561076c573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526107949190810190612f5c565b8152602001836001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b1580156107d257600080fd5b505afa1580156107e6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061080a9190613003565b60ff1681525090508084848151811061083357634e487b7160e01b600052603260045260246000fd5b60200260200101819052505050808061084b90613448565b91505061063c565b50905090565b6000805b88518110156109e65786818151811061088657634e487b7160e01b600052603260045260246000fd5b602002602001015160ff166000146109d4576109418982815181106108bb57634e487b7160e01b600052603260045260246000fd5b6020026020010151858984815181106108e457634e487b7160e01b600052603260045260246000fd5b602002602001015189858151811061090c57634e487b7160e01b600052603260045260246000fd5b602002602001015189868151811061093457634e487b7160e01b600052603260045260246000fd5b6020026020010151611f68565b6109925760405162461bcd60e51b815260206004820181905260248201527f4f7261636c65207369676e617475726520646f6573206e6f74206d617463682e60448201526064015b60405180910390fd5b8781815181106109b257634e487b7160e01b600052603260045260246000fd5b6020026020010151826109c591906133c9565b9150828211156109d4576109e6565b806109de81613448565b91505061085d565b50818111610a5c5760405162461bcd60e51b815260206004820152603960248201527f5375626d6974746564206f7261636c6520736574207369676e6174757265732060448201527f646f206e6f74206861766520656e6f75676820706f7765722e000000000000006064820152608401610989565b5050505050505050565b6000610a70612032565b60405163f2fde38b60e01b81526001600160a01b03838116600483015284169063f2fde38b90602401600060405180830381600087803b158015610ab357600080fd5b505af1158015610ac7573d6000803e3d6000fd5b5050604080516001600160a01b038088168252861660208201527fb0f1bf050fff9d249d22389b0f2673295260c8deca341a2755d95318f9fbc699935001905060405180910390a150600192915050565b610b2061208c565b610b286120e6565b6001600160a01b038316600090815260d060209081526040918290208251606081018452905460ff8082161515835261010082048116151593830193909352620100009004909116151591810182905290610bc15760405162461bcd60e51b8152602060048201526019602482015278556e737570706f7274656420746f6b656e206164647265737360381b6044820152606401610989565b8060200151610c055760405162461bcd60e51b815260206004820152601060248201526f151bdad95b881dd85cc81c185d5cd95960821b6044820152606401610989565b6020808601516001600160a01b038616600090815260ce90925260409091205410610c985760405162461bcd60e51b815260206004820152603760248201527f4e6577206261746368206e6f6e6365206d75737420626520677265617465722060448201527f7468616e207468652063757272656e74206e6f6e63652e0000000000000000006064820152608401610989565b824310610d0d5760405162461bcd60e51b815260206004820152603c60248201527f42617463682074696d656f7574206d757374206265206772656174657220746860448201527f616e207468652063757272656e7420626c6f636b206865696768742e000000006064820152608401610989565b8b518d51148015610d1f57508a518d51145b8015610d2c575089518d51145b8015610d39575088518d51145b610d855760405162461bcd60e51b815260206004820152601d60248201527f4d616c666f726d65642063757272656e74206f7261636c65207365742e0000006044820152606401610989565b60cc54610d9d8e8e886000602002015160c954611639565b14610dba5760405162461bcd60e51b815260040161098990613299565b86518851148015610dcc575085518851145b610e185760405162461bcd60e51b815260206004820181905260248201527f4d616c666f726d6564206261746368206f66207472616e73616374696f6e732e6044820152606401610989565b610e998d8d8d8d8d60c9546f0e8e4c2dce6c2c6e8d2dedc84c2e8c6d60831b8f8f8f8f600160028110610e5b57634e487b7160e01b600052603260045260246000fd5b60200201518f8f8f604051602001610e7b999897969594939291906131c3565b6040516020818303038152906040528051906020012060ca54610859565b6020808601516001600160a01b038616600090815260ce9092526040822055805b895181101561102657610efd888281518110610ee657634e487b7160e01b600052603260045260246000fd5b60200260200101518361212c90919063ffffffff16565b8351909250151560011415610fa857856001600160a01b03166340c10f19308c8481518110610f3c57634e487b7160e01b600052603260045260246000fd5b60200260200101516040518363ffffffff1660e01b8152600401610f759291906001600160a01b03929092168252602082015260400190565b600060405180830381600087803b158015610f8f57600080fd5b505af1158015610fa3573d6000803e3d6000fd5b505050505b611014898281518110610fcb57634e487b7160e01b600052603260045260246000fd5b60200260200101518b8381518110610ff357634e487b7160e01b600052603260045260246000fd5b6020026020010151886001600160a01b031661213f9092919063ffffffff16565b8061101e81613448565b915050610eba565b508151151560011415611094576040516340c10f1960e01b8152306004820152602481018290526001600160a01b038616906340c10f1990604401600060405180830381600087803b15801561107b57600080fd5b505af115801561108f573d6000803e3d6000fd5b505050505b6110a86001600160a01b038616848361213f565b505060cb546110b890600161212c565b60cb556001600160a01b03831684600160200201517f02c7e81975f8edb86e2a0c038b7b86a49c744236abf0f6177ff5afc6986ab70860cb5460405161110091815260200190565b60405180910390a361111160018055565b505050505050505050505050565b6111276120e6565b83871161119c5760405162461bcd60e51b815260206004820152603b60248201527f4e6577206f7261636c6520736574206e6f6e6365206d7573742062652067726560448201527f61746572207468616e207468652063757272656e74206e6f6e636500000000006064820152608401610989565b87518951146111ed5760405162461bcd60e51b815260206004820152601860248201527f4d616c666f726d6564206e6577206f7261636c652073657400000000000000006044820152606401610989565b845186511480156111ff575082518651145b801561120c575081518651145b8015611219575080518651145b6112655760405162461bcd60e51b815260206004820152601c60248201527f4d616c666f726d65642063757272656e74206f7261636c6520736574000000006044820152606401610989565b60cc5461127687878760c954611639565b146112935760405162461bcd60e51b815260040161098990613299565b60006112a38a8a8a60c954611639565b90506112b687878686868660ca54610859565b60cc81905560cd88905560cb546112ce90600161212c565b60cb81905560405189917f36c6022aad02313069de85ca9645431c7dd5e8e7a21685586461c4b25e2374b39161130891908e908e90613341565b60405180910390a250505050505050505050565b611324612032565b61132c6121ad565b6113346121f6565b565b60d180546113439061340d565b80601f016020809104026020016040519081016040528092919081815260200182805461136f9061340d565b80156113bc5780601f10611391576101008083540402835291602001916113bc565b820191906000526020600020905b81548152906001019060200180831161139f57829003601f168201915b505050505081565b6113cc61208c565b6113d46120e6565b600081116114305760405162461bcd60e51b815260206004820152602360248201527f616d6f756e742073686f756c642062652067726561746572207468616e207a6560448201526203937960ed1b6064820152608401610989565b6001600160a01b038416600090815260d060209081526040918290208251606081018452905460ff80821615158352610100820481161515938301939093526201000090049091161515918101829052906114c95760405162461bcd60e51b8152602060048201526019602482015278556e737570706f7274656420746f6b656e206164647265737360381b6044820152606401610989565b806020015161150d5760405162461bcd60e51b815260206004820152601060248201526f1d1bdad95b881dd85cc81c185d5cd95960821b6044820152606401610989565b6115226001600160a01b038616333085612248565b805115156001141561158957604051630852cd8d60e31b8152600481018390526001600160a01b038616906342966c6890602401600060405180830381600087803b15801561157057600080fd5b505af1158015611584573d6000803e3d6000fd5b505050505b60cb5461159790600161212c565b60cb819055604080518581526020810185905290810191909152849033906001600160a01b038816907f034c5b22dd525a50d0a6b15549df0a6ac83b833a6c3da57ea16890832c72507c9060600160405180910390a4506115f760018055565b50505050565b60cf818154811061160d57600080fd5b6000918252602090912001546001600160a01b0316905081565b61162f612032565b6113346000612280565b6040516000906918da1958dadc1bda5b9d60b21b90611664908490839087908a908a90602001613180565b604051602081830303815290604052805190602001209150505b949350505050565b61168e612032565b6116966120e6565b6113346122d2565b60006116a8612032565b6001600160a01b038216600090815260d0602052604090205462010000900460ff16151560011461171b5760405162461bcd60e51b815260206004820152601b60248201527f42726964676520746f6b656e20646f65736e27742065786973747300000000006044820152606401610989565b6001600160a01b038216600090815260d0602052604090205460ff61010090910416151560011461178e5760405162461bcd60e51b815260206004820152601b60248201527f42726964676520746f6b656e20616c72656164792070617573656400000000006044820152606401610989565b506001600160a01b0316600090815260d060205260409020805461ff0019169055600190565b60006117be612032565b6001600160a01b038216600090815260d0602052604090205462010000900460ff1615156001146118315760405162461bcd60e51b815260206004820152601b60248201527f42726964676520746f6b656e20646f65736e27742065786973747300000000006044820152606401610989565b6001600160a01b038216600090815260d06020526040902054610100900460ff161561189f5760405162461bcd60e51b815260206004820152601c60248201527f42726964676520746f6b656e20616c72656164792061637469766564000000006044820152606401610989565b506001600160a01b0316600090815260d060205260409020805461ff001916610100179055600190565b600054610100900460ff16158080156118e95750600054600160ff909116105b806119035750303b158015611903575060005460ff166001145b6119665760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610989565b6000805460ff191660011790558015611989576000805461ff0019166101001790555b61199161230f565b61199961233e565b6119a161236d565b835183511480156119b3575081518451145b611a0f5760405162461bcd60e51b815260206004820152602760248201527f4d616c666f726d6564206c61737420626174636820746f6b656e20696e666f7260448201526636b0ba34b7b71760c91b6064820152608401610989565b60c989905560ca88905560cb87905560cc86905560cd85905560005b8451811015611bd05760cf858281518110611a5657634e487b7160e01b600052603260045260246000fd5b60209081029190910181015182546001810184556000938452919092200180546001600160a01b0319166001600160a01b039092169190911790558351849082908110611ab357634e487b7160e01b600052603260045260246000fd5b602002602001015160ce6000878481518110611adf57634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002081905550828181518110611b2b57634e487b7160e01b600052603260045260246000fd5b602002602001015160d06000878481518110611b5757634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160a01b031682528181019290925260409081016000208351815493850151949092015160ff199093169115159190911761ff001916610100931515939093029290921762ff00001916620100009115159190910217905580611bc881613448565b915050611a2b565b50604080518082019091526005808252640312e302e360dc1b6020909201918252611bfd9160d1916126c4565b508015611c44576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050505050505050565b6000611c59612032565b6001600160a01b038416611ca75760405162461bcd60e51b8152602060048201526015602482015274496e76616c696420746f6b656e206164647265737360581b6044820152606401610989565b6001600160a01b038416600090815260d0602052604090205462010000900460ff1615611d165760405162461bcd60e51b815260206004820152601b60248201527f42726964676520746f6b656e20616c72656164792065786973747300000000006044820152606401610989565b611d4284604051806060016040528085151581526020016001151581526020016001151581525061239c565b836001600160a01b03167f2da8f37eaabc4d44ba4fcc438e404bbed3344322280d6c67497e9c668c87ec0f856001600160a01b03166306fdde036040518163ffffffff1660e01b815260040160006040518083038186803b158015611da657600080fd5b505afa158015611dba573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611de29190810190612f5c565b866001600160a01b03166395d89b416040518163ffffffff1660e01b815260040160006040518083038186803b158015611e1b57600080fd5b505afa158015611e2f573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611e579190810190612f5c565b876001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b158015611e9057600080fd5b505afa158015611ea4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ec89190613003565b60cb5488604051611edd959493929190613253565b60405180910390a25060019392505050565b611ef7612032565b6001600160a01b038116611f5c5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610989565b611f6581612280565b50565b6040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c81018590526000908190605c0160408051601f1981840301815282825280516020918201206000845290830180835281905260ff8816918301919091526060820186905260808201859052915060019060a0016020604051602081039080840390855afa158015612008573d6000803e3d6000fd5b505050602060405103516001600160a01b0316876001600160a01b03161491505095945050505050565b6065546001600160a01b031633146113345760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610989565b600260015414156120df5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610989565b6002600155565b60975460ff16156113345760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610989565b600061213882846133c9565b9392505050565b6040516001600160a01b0383166024820152604481018290526121a290849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152612448565b505050565b60018055565b60975460ff166113345760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610989565b6121fe6121ad565b6097805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6040516001600160a01b03808516602483015283166044820152606481018290526115f79085906323b872dd60e01b9060840161216b565b606580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6122da6120e6565b6097805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861222b3390565b600054610100900460ff166123365760405162461bcd60e51b8152600401610989906132f6565b61133461251a565b600054610100900460ff166123655760405162461bcd60e51b8152600401610989906132f6565b61133461254d565b600054610100900460ff166123945760405162461bcd60e51b8152600401610989906132f6565b61133461257d565b60cf805460018082019092557facb8d954e2cfef495862221e91bd7523613cf8808827cb33edfe4904cc51bf290180546001600160a01b0319166001600160a01b038516908117909155600090815260d0602090815260409182902084518154928601519386015160ff199093169015151761ff001916610100931515939093029290921762ff00001916620100009115159190910217905560cb546124419161212c565b60cb555050565b600061249d826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166125a49092919063ffffffff16565b8051909150156121a257808060200190518101906124bb9190612e8c565b6121a25760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610989565b600054610100900460ff166125415760405162461bcd60e51b8152600401610989906132f6565b6097805460ff19169055565b600054610100900460ff166125745760405162461bcd60e51b8152600401610989906132f6565b61133433612280565b600054610100900460ff166121a75760405162461bcd60e51b8152600401610989906132f6565b606061167e848460008585600080866001600160a01b031685876040516125cb91906130bd565b60006040518083038185875af1925050503d8060008114612608576040519150601f19603f3d011682016040523d82523d6000602084013e61260d565b606091505b509150915061261e87838387612629565b979650505050505050565b6060831561269557825161268e576001600160a01b0385163b61268e5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610989565b508161167e565b61167e83838151156126aa5781518083602001fd5b8060405162461bcd60e51b81526004016109899190613240565b8280546126d09061340d565b90600052602060002090601f0160209004810192826126f25760008555612738565b82601f1061270b57805160ff1916838001178555612738565b82800160010185558215612738579182015b8281111561273857825182559160200191906001019061271d565b50612744929150612748565b5090565b5b808211156127445760008155600101612749565b80356001600160a01b038116811461059b57600080fd5b600082601f830112612784578081fd5b81356020612799612794836133a6565b613376565b82815281810190858301838502870184018810156127b5578586fd5b855b858110156127da576127c88261275d565b845292840192908401906001016127b7565b5090979650505050505050565b600082601f8301126127f7578081fd5b81356020612807612794836133a6565b8281528181019085830183850287018401881015612823578586fd5b855b858110156127da57813584529284019290840190600101612825565b600082601f830112612851578081fd5b81356020612861612794836133a6565b8281528181019085830160608086028801850189101561287f578687fd5b865b868110156128e35781838b031215612897578788fd5b6128a082613376565b83356128ab8161348f565b8152838701356128ba8161348f565b818801526040848101356128cd8161348f565b9082015285529385019391810191600101612881565b509198975050505050505050565b600082601f830112612901578081fd5b61290b6040613376565b80838560408601111561291c578384fd5b835b600281101561293d57813584526020938401939091019060010161291e565b509095945050505050565b600082601f830112612958578081fd5b81356020612968612794836133a6565b8281528181019085830183850287018401881015612984578586fd5b855b858110156127da5781356129998161349d565b84529284019290840190600101612986565b6000602082840312156129bc578081fd5b6121388261275d565b600080604083850312156129d7578081fd5b6129e08361275d565b91506129ee6020840161275d565b90509250929050565b600080600060608486031215612a0b578081fd5b612a148461275d565b9250602084013591506040840135612a2b8161348f565b809150509250925092565b60008060008060808587031215612a4b578182fd5b612a548561275d565b966020860135965060408601359560600135945092505050565b6000806000806000806000806000806000806101a08d8f031215612a9057898afd5b6001600160401b038d351115612aa457898afd5b612ab18e8e358f01612774565b9b506001600160401b0360208e01351115612aca57898afd5b612ada8e60208f01358f016127e7565b9a506001600160401b0360408e01351115612af357898afd5b612b038e60408f01358f01612948565b99506001600160401b0360608e01351115612b1c578788fd5b612b2c8e60608f01358f016127e7565b98506001600160401b0360808e01351115612b45578788fd5b612b558e60808f01358f016127e7565b97506001600160401b0360a08e01351115612b6e578687fd5b612b7e8e60a08f01358f016127e7565b96506001600160401b0360c08e01351115612b97578586fd5b612ba78e60c08f01358f01612774565b95506001600160401b0360e08e01351115612bc0578485fd5b612bd08e60e08f01358f016127e7565b9450612be08e6101008f016128f1565b9350612bef6101408e0161275d565b92506101608d01359150612c066101808e0161275d565b90509295989b509295989b509295989b565b600080600080600080600060e0888a031215612c32578081fd5b87356001600160401b0380821115612c48578283fd5b612c548b838c01612774565b985060208a0135915080821115612c69578283fd5b612c758b838c016127e7565b975060408a0135915080821115612c8a578283fd5b612c968b838c01612948565b965060608a0135915080821115612cab578283fd5b612cb78b838c016127e7565b955060808a0135915080821115612ccc578283fd5b50612cd98a828b016127e7565b93505060a0880135915060c0880135905092959891949750929550565b60008060008060008060008060006101208a8c031215612d14578283fd5b89356001600160401b0380821115612d2a578485fd5b612d368d838e01612774565b9a5060208c0135915080821115612d4b578485fd5b612d578d838e016127e7565b995060408c0135985060608c0135915080821115612d73578485fd5b612d7f8d838e01612774565b975060808c0135915080821115612d94578485fd5b612da08d838e016127e7565b965060a08c0135955060c08c0135915080821115612dbc578485fd5b612dc88d838e01612948565b945060e08c0135915080821115612ddd578384fd5b612de98d838e016127e7565b93506101008c0135915080821115612dff578283fd5b50612e0c8c828d016127e7565b9150509295985092959850929598565b60008060008060808587031215612e31578182fd5b84356001600160401b0380821115612e47578384fd5b612e5388838901612774565b95506020870135915080821115612e68578384fd5b50612e75878288016127e7565b949794965050505060408301359260600135919050565b600060208284031215612e9d578081fd5b81516121388161348f565b600080600080600080600080610100898b031215612ec4578182fd5b883597506020890135965060408901359550606089013594506080890135935060a08901356001600160401b0380821115612efd578384fd5b612f098c838d01612774565b945060c08b0135915080821115612f1e578384fd5b612f2a8c838d016127e7565b935060e08b0135915080821115612f3f578283fd5b50612f4c8b828c01612841565b9150509295985092959890939650565b600060208284031215612f6d578081fd5b81516001600160401b0380821115612f83578283fd5b818401915084601f830112612f96578283fd5b815181811115612fa857612fa8613479565b612fbb601f8201601f1916602001613376565b9150808252856020828501011115612fd1578384fd5b612fe28160208401602086016133e1565b50949350505050565b600060208284031215612ffc578081fd5b5035919050565b600060208284031215613014578081fd5b81516121388161349d565b6000815180845260208085019450808401835b838110156130575781516001600160a01b031687529582019590820190600101613032565b509495945050505050565b6000815180845260208085019450808401835b8381101561305757815187529582019590820190600101613075565b600081518084526130a98160208601602086016133e1565b601f01601f19169290920160200192915050565b600082516130cf8184602087016133e1565b9190910192915050565b60208082528251828201819052600091906040908185019080840286018301878501865b8381101561317257888303603f19018552815180516001600160a01b031684528781015160808986018190529061313682870182613091565b915050878201518582038987015261314e8282613091565b60609384015160ff16969093019590955250948701949250908601906001016130fd565b509098975050505050505050565b600086825285602083015284604083015260a060608301526131a560a083018561301f565b82810360808401526131b78185613062565b98975050505050505050565b60006101208b83528a60208401528060408401526131e38184018b613062565b905082810360608401526131f7818a61301f565b9050828103608084015261320b8189613062565b60a084019790975250506001600160a01b0393841660c082015260e08101929092529091166101009091015295945050505050565b6000602082526121386020830184613091565b600060a0825261326660a0830188613091565b82810360208401526132788188613091565b60ff9690961660408401525050606081019290925260809091015292915050565b6020808252603c908201527f537570706c6965642063757272656e74206f7261636c657320616e6420706f7760408201527f65727320646f206e6f74206d6174636820636865636b706f696e742e00000000606082015260800190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60008482526060602083015261335a606083018561301f565b828103604084015261336c8185613062565b9695505050505050565b604051601f8201601f191681016001600160401b038111828210171561339e5761339e613479565b604052919050565b60006001600160401b038211156133bf576133bf613479565b5060209081020190565b600082198211156133dc576133dc613463565b500190565b60005b838110156133fc5781810151838201526020016133e4565b838111156115f75750506000910152565b60028104600182168061342157607f821691505b6020821081141561344257634e487b7160e01b600052602260045260246000fd5b50919050565b600060001982141561345c5761345c613463565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b8015158114611f6557600080fd5b60ff81168114611f6557600080fdfea26469706673582212209fd6e7a81d7ceeb8731fc1abe2b5e1af72f77147c4fdf0f3fcbb36a47e2ca42164736f6c63430008020033
Deployed Bytecode
0x6080604052600436106101b75760003560e01c8063715018a6116100ec578063dde65aea1161008a578063ee09517511610064578063ee0951751461050b578063f1099f611461052b578063f2fde38b1461054b578063f92367fd1461056b576101b7565b8063dde65aea146104a8578063df97174b146104c8578063e5a2b5d2146104f5576101b7565b80638456cb59116100c65780638456cb591461043f5780638da5cb5b14610454578063a36a4ab014610472578063bb83bf9614610492576101b7565b8063715018a6146103f457806371cbf3811461040957806373b2054714610429576101b7565b80633f4ba83a116101595780635c975abb116101335780635c975abb1461037b5780636189d1071461039357806370a0eb94146103a657806370e5a898146103bc576101b7565b80633f4ba83a14610305578063474d561c1461031a57806354fd4d5014610359576101b7565b8063285a190a11610195578063285a190a1461027357806331678cf614610295578063332caa1f146102c55780633a08e299146102e5576101b7565b8063011b2174146101bc5780630acac942146101ef578063283040b414610251575b600080fd5b3480156101c857600080fd5b506101dc6101d73660046129ab565b610581565b6040519081526020015b60405180910390f35b3480156101fb57600080fd5b5061023261020a3660046129ab565b60d06020526000908152604090205460ff808216916101008104821691620100009091041683565b60408051931515845291151560208401521515908201526060016101e6565b34801561025d57600080fd5b506102666105a0565b6040516101e691906130d9565b34801561027f57600080fd5b5061029361028e366004612c18565b610859565b005b3480156102a157600080fd5b506102b56102b03660046129c5565b610a66565b60405190151581526020016101e6565b3480156102d157600080fd5b506102936102e0366004612a6e565b610b18565b3480156102f157600080fd5b50610293610300366004612cf6565b61111f565b34801561031157600080fd5b5061029361131c565b34801561032657600080fd5b506102b56103353660046129ab565b6001600160a01b0316600090815260d0602052604090205462010000900460ff1690565b34801561036557600080fd5b5061036e611336565b6040516101e69190613240565b34801561038757600080fd5b5060975460ff166102b5565b6102936103a1366004612a36565b6113c4565b3480156103b257600080fd5b506101dc60cc5481565b3480156103c857600080fd5b506103dc6103d7366004612feb565b6115fd565b6040516001600160a01b0390911681526020016101e6565b34801561040057600080fd5b50610293611627565b34801561041557600080fd5b506101dc610424366004612e1c565b611639565b34801561043557600080fd5b506101dc60cb5481565b34801561044b57600080fd5b50610293611686565b34801561046057600080fd5b506065546001600160a01b03166103dc565b34801561047e57600080fd5b506102b561048d3660046129ab565b61169e565b34801561049e57600080fd5b506101dc60cd5481565b3480156104b457600080fd5b506102b56104c33660046129ab565b6117b4565b3480156104d457600080fd5b506101dc6104e33660046129ab565b60ce6020526000908152604090205481565b34801561050157600080fd5b506101dc60ca5481565b34801561051757600080fd5b50610293610526366004612ea8565b6118c9565b34801561053757600080fd5b506102b56105463660046129f7565b611c4f565b34801561055757600080fd5b506102936105663660046129ab565b611eef565b34801561057757600080fd5b506101dc60c95481565b6001600160a01b038116600090815260ce60205260409020545b919050565b60cf546060906000906001600160401b038111156105ce57634e487b7160e01b600052604160045260246000fd5b60405190808252806020026020018201604052801561063657816020015b610623604051806080016040528060006001600160a01b031681526020016060815260200160608152602001600060ff1681525090565b8152602001906001900390816105ec5790505b50905060005b60cf5481101561085357600060cf828154811061066957634e487b7160e01b600052603260045260246000fd5b9060005260206000200160009054906101000a90046001600160a01b0316905060006040518060800160405280836001600160a01b03168152602001836001600160a01b03166306fdde036040518163ffffffff1660e01b815260040160006040518083038186803b1580156106de57600080fd5b505afa1580156106f2573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261071a9190810190612f5c565b8152602001836001600160a01b03166395d89b416040518163ffffffff1660e01b815260040160006040518083038186803b15801561075857600080fd5b505afa15801561076c573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526107949190810190612f5c565b8152602001836001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b1580156107d257600080fd5b505afa1580156107e6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061080a9190613003565b60ff1681525090508084848151811061083357634e487b7160e01b600052603260045260246000fd5b60200260200101819052505050808061084b90613448565b91505061063c565b50905090565b6000805b88518110156109e65786818151811061088657634e487b7160e01b600052603260045260246000fd5b602002602001015160ff166000146109d4576109418982815181106108bb57634e487b7160e01b600052603260045260246000fd5b6020026020010151858984815181106108e457634e487b7160e01b600052603260045260246000fd5b602002602001015189858151811061090c57634e487b7160e01b600052603260045260246000fd5b602002602001015189868151811061093457634e487b7160e01b600052603260045260246000fd5b6020026020010151611f68565b6109925760405162461bcd60e51b815260206004820181905260248201527f4f7261636c65207369676e617475726520646f6573206e6f74206d617463682e60448201526064015b60405180910390fd5b8781815181106109b257634e487b7160e01b600052603260045260246000fd5b6020026020010151826109c591906133c9565b9150828211156109d4576109e6565b806109de81613448565b91505061085d565b50818111610a5c5760405162461bcd60e51b815260206004820152603960248201527f5375626d6974746564206f7261636c6520736574207369676e6174757265732060448201527f646f206e6f74206861766520656e6f75676820706f7765722e000000000000006064820152608401610989565b5050505050505050565b6000610a70612032565b60405163f2fde38b60e01b81526001600160a01b03838116600483015284169063f2fde38b90602401600060405180830381600087803b158015610ab357600080fd5b505af1158015610ac7573d6000803e3d6000fd5b5050604080516001600160a01b038088168252861660208201527fb0f1bf050fff9d249d22389b0f2673295260c8deca341a2755d95318f9fbc699935001905060405180910390a150600192915050565b610b2061208c565b610b286120e6565b6001600160a01b038316600090815260d060209081526040918290208251606081018452905460ff8082161515835261010082048116151593830193909352620100009004909116151591810182905290610bc15760405162461bcd60e51b8152602060048201526019602482015278556e737570706f7274656420746f6b656e206164647265737360381b6044820152606401610989565b8060200151610c055760405162461bcd60e51b815260206004820152601060248201526f151bdad95b881dd85cc81c185d5cd95960821b6044820152606401610989565b6020808601516001600160a01b038616600090815260ce90925260409091205410610c985760405162461bcd60e51b815260206004820152603760248201527f4e6577206261746368206e6f6e6365206d75737420626520677265617465722060448201527f7468616e207468652063757272656e74206e6f6e63652e0000000000000000006064820152608401610989565b824310610d0d5760405162461bcd60e51b815260206004820152603c60248201527f42617463682074696d656f7574206d757374206265206772656174657220746860448201527f616e207468652063757272656e7420626c6f636b206865696768742e000000006064820152608401610989565b8b518d51148015610d1f57508a518d51145b8015610d2c575089518d51145b8015610d39575088518d51145b610d855760405162461bcd60e51b815260206004820152601d60248201527f4d616c666f726d65642063757272656e74206f7261636c65207365742e0000006044820152606401610989565b60cc54610d9d8e8e886000602002015160c954611639565b14610dba5760405162461bcd60e51b815260040161098990613299565b86518851148015610dcc575085518851145b610e185760405162461bcd60e51b815260206004820181905260248201527f4d616c666f726d6564206261746368206f66207472616e73616374696f6e732e6044820152606401610989565b610e998d8d8d8d8d60c9546f0e8e4c2dce6c2c6e8d2dedc84c2e8c6d60831b8f8f8f8f600160028110610e5b57634e487b7160e01b600052603260045260246000fd5b60200201518f8f8f604051602001610e7b999897969594939291906131c3565b6040516020818303038152906040528051906020012060ca54610859565b6020808601516001600160a01b038616600090815260ce9092526040822055805b895181101561102657610efd888281518110610ee657634e487b7160e01b600052603260045260246000fd5b60200260200101518361212c90919063ffffffff16565b8351909250151560011415610fa857856001600160a01b03166340c10f19308c8481518110610f3c57634e487b7160e01b600052603260045260246000fd5b60200260200101516040518363ffffffff1660e01b8152600401610f759291906001600160a01b03929092168252602082015260400190565b600060405180830381600087803b158015610f8f57600080fd5b505af1158015610fa3573d6000803e3d6000fd5b505050505b611014898281518110610fcb57634e487b7160e01b600052603260045260246000fd5b60200260200101518b8381518110610ff357634e487b7160e01b600052603260045260246000fd5b6020026020010151886001600160a01b031661213f9092919063ffffffff16565b8061101e81613448565b915050610eba565b508151151560011415611094576040516340c10f1960e01b8152306004820152602481018290526001600160a01b038616906340c10f1990604401600060405180830381600087803b15801561107b57600080fd5b505af115801561108f573d6000803e3d6000fd5b505050505b6110a86001600160a01b038616848361213f565b505060cb546110b890600161212c565b60cb556001600160a01b03831684600160200201517f02c7e81975f8edb86e2a0c038b7b86a49c744236abf0f6177ff5afc6986ab70860cb5460405161110091815260200190565b60405180910390a361111160018055565b505050505050505050505050565b6111276120e6565b83871161119c5760405162461bcd60e51b815260206004820152603b60248201527f4e6577206f7261636c6520736574206e6f6e6365206d7573742062652067726560448201527f61746572207468616e207468652063757272656e74206e6f6e636500000000006064820152608401610989565b87518951146111ed5760405162461bcd60e51b815260206004820152601860248201527f4d616c666f726d6564206e6577206f7261636c652073657400000000000000006044820152606401610989565b845186511480156111ff575082518651145b801561120c575081518651145b8015611219575080518651145b6112655760405162461bcd60e51b815260206004820152601c60248201527f4d616c666f726d65642063757272656e74206f7261636c6520736574000000006044820152606401610989565b60cc5461127687878760c954611639565b146112935760405162461bcd60e51b815260040161098990613299565b60006112a38a8a8a60c954611639565b90506112b687878686868660ca54610859565b60cc81905560cd88905560cb546112ce90600161212c565b60cb81905560405189917f36c6022aad02313069de85ca9645431c7dd5e8e7a21685586461c4b25e2374b39161130891908e908e90613341565b60405180910390a250505050505050505050565b611324612032565b61132c6121ad565b6113346121f6565b565b60d180546113439061340d565b80601f016020809104026020016040519081016040528092919081815260200182805461136f9061340d565b80156113bc5780601f10611391576101008083540402835291602001916113bc565b820191906000526020600020905b81548152906001019060200180831161139f57829003601f168201915b505050505081565b6113cc61208c565b6113d46120e6565b600081116114305760405162461bcd60e51b815260206004820152602360248201527f616d6f756e742073686f756c642062652067726561746572207468616e207a6560448201526203937960ed1b6064820152608401610989565b6001600160a01b038416600090815260d060209081526040918290208251606081018452905460ff80821615158352610100820481161515938301939093526201000090049091161515918101829052906114c95760405162461bcd60e51b8152602060048201526019602482015278556e737570706f7274656420746f6b656e206164647265737360381b6044820152606401610989565b806020015161150d5760405162461bcd60e51b815260206004820152601060248201526f1d1bdad95b881dd85cc81c185d5cd95960821b6044820152606401610989565b6115226001600160a01b038616333085612248565b805115156001141561158957604051630852cd8d60e31b8152600481018390526001600160a01b038616906342966c6890602401600060405180830381600087803b15801561157057600080fd5b505af1158015611584573d6000803e3d6000fd5b505050505b60cb5461159790600161212c565b60cb819055604080518581526020810185905290810191909152849033906001600160a01b038816907f034c5b22dd525a50d0a6b15549df0a6ac83b833a6c3da57ea16890832c72507c9060600160405180910390a4506115f760018055565b50505050565b60cf818154811061160d57600080fd5b6000918252602090912001546001600160a01b0316905081565b61162f612032565b6113346000612280565b6040516000906918da1958dadc1bda5b9d60b21b90611664908490839087908a908a90602001613180565b604051602081830303815290604052805190602001209150505b949350505050565b61168e612032565b6116966120e6565b6113346122d2565b60006116a8612032565b6001600160a01b038216600090815260d0602052604090205462010000900460ff16151560011461171b5760405162461bcd60e51b815260206004820152601b60248201527f42726964676520746f6b656e20646f65736e27742065786973747300000000006044820152606401610989565b6001600160a01b038216600090815260d0602052604090205460ff61010090910416151560011461178e5760405162461bcd60e51b815260206004820152601b60248201527f42726964676520746f6b656e20616c72656164792070617573656400000000006044820152606401610989565b506001600160a01b0316600090815260d060205260409020805461ff0019169055600190565b60006117be612032565b6001600160a01b038216600090815260d0602052604090205462010000900460ff1615156001146118315760405162461bcd60e51b815260206004820152601b60248201527f42726964676520746f6b656e20646f65736e27742065786973747300000000006044820152606401610989565b6001600160a01b038216600090815260d06020526040902054610100900460ff161561189f5760405162461bcd60e51b815260206004820152601c60248201527f42726964676520746f6b656e20616c72656164792061637469766564000000006044820152606401610989565b506001600160a01b0316600090815260d060205260409020805461ff001916610100179055600190565b600054610100900460ff16158080156118e95750600054600160ff909116105b806119035750303b158015611903575060005460ff166001145b6119665760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610989565b6000805460ff191660011790558015611989576000805461ff0019166101001790555b61199161230f565b61199961233e565b6119a161236d565b835183511480156119b3575081518451145b611a0f5760405162461bcd60e51b815260206004820152602760248201527f4d616c666f726d6564206c61737420626174636820746f6b656e20696e666f7260448201526636b0ba34b7b71760c91b6064820152608401610989565b60c989905560ca88905560cb87905560cc86905560cd85905560005b8451811015611bd05760cf858281518110611a5657634e487b7160e01b600052603260045260246000fd5b60209081029190910181015182546001810184556000938452919092200180546001600160a01b0319166001600160a01b039092169190911790558351849082908110611ab357634e487b7160e01b600052603260045260246000fd5b602002602001015160ce6000878481518110611adf57634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002081905550828181518110611b2b57634e487b7160e01b600052603260045260246000fd5b602002602001015160d06000878481518110611b5757634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160a01b031682528181019290925260409081016000208351815493850151949092015160ff199093169115159190911761ff001916610100931515939093029290921762ff00001916620100009115159190910217905580611bc881613448565b915050611a2b565b50604080518082019091526005808252640312e302e360dc1b6020909201918252611bfd9160d1916126c4565b508015611c44576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050505050505050565b6000611c59612032565b6001600160a01b038416611ca75760405162461bcd60e51b8152602060048201526015602482015274496e76616c696420746f6b656e206164647265737360581b6044820152606401610989565b6001600160a01b038416600090815260d0602052604090205462010000900460ff1615611d165760405162461bcd60e51b815260206004820152601b60248201527f42726964676520746f6b656e20616c72656164792065786973747300000000006044820152606401610989565b611d4284604051806060016040528085151581526020016001151581526020016001151581525061239c565b836001600160a01b03167f2da8f37eaabc4d44ba4fcc438e404bbed3344322280d6c67497e9c668c87ec0f856001600160a01b03166306fdde036040518163ffffffff1660e01b815260040160006040518083038186803b158015611da657600080fd5b505afa158015611dba573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611de29190810190612f5c565b866001600160a01b03166395d89b416040518163ffffffff1660e01b815260040160006040518083038186803b158015611e1b57600080fd5b505afa158015611e2f573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611e579190810190612f5c565b876001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b158015611e9057600080fd5b505afa158015611ea4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ec89190613003565b60cb5488604051611edd959493929190613253565b60405180910390a25060019392505050565b611ef7612032565b6001600160a01b038116611f5c5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610989565b611f6581612280565b50565b6040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c81018590526000908190605c0160408051601f1981840301815282825280516020918201206000845290830180835281905260ff8816918301919091526060820186905260808201859052915060019060a0016020604051602081039080840390855afa158015612008573d6000803e3d6000fd5b505050602060405103516001600160a01b0316876001600160a01b03161491505095945050505050565b6065546001600160a01b031633146113345760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610989565b600260015414156120df5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610989565b6002600155565b60975460ff16156113345760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610989565b600061213882846133c9565b9392505050565b6040516001600160a01b0383166024820152604481018290526121a290849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152612448565b505050565b60018055565b60975460ff166113345760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610989565b6121fe6121ad565b6097805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6040516001600160a01b03808516602483015283166044820152606481018290526115f79085906323b872dd60e01b9060840161216b565b606580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6122da6120e6565b6097805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861222b3390565b600054610100900460ff166123365760405162461bcd60e51b8152600401610989906132f6565b61133461251a565b600054610100900460ff166123655760405162461bcd60e51b8152600401610989906132f6565b61133461254d565b600054610100900460ff166123945760405162461bcd60e51b8152600401610989906132f6565b61133461257d565b60cf805460018082019092557facb8d954e2cfef495862221e91bd7523613cf8808827cb33edfe4904cc51bf290180546001600160a01b0319166001600160a01b038516908117909155600090815260d0602090815260409182902084518154928601519386015160ff199093169015151761ff001916610100931515939093029290921762ff00001916620100009115159190910217905560cb546124419161212c565b60cb555050565b600061249d826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166125a49092919063ffffffff16565b8051909150156121a257808060200190518101906124bb9190612e8c565b6121a25760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610989565b600054610100900460ff166125415760405162461bcd60e51b8152600401610989906132f6565b6097805460ff19169055565b600054610100900460ff166125745760405162461bcd60e51b8152600401610989906132f6565b61133433612280565b600054610100900460ff166121a75760405162461bcd60e51b8152600401610989906132f6565b606061167e848460008585600080866001600160a01b031685876040516125cb91906130bd565b60006040518083038185875af1925050503d8060008114612608576040519150601f19603f3d011682016040523d82523d6000602084013e61260d565b606091505b509150915061261e87838387612629565b979650505050505050565b6060831561269557825161268e576001600160a01b0385163b61268e5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610989565b508161167e565b61167e83838151156126aa5781518083602001fd5b8060405162461bcd60e51b81526004016109899190613240565b8280546126d09061340d565b90600052602060002090601f0160209004810192826126f25760008555612738565b82601f1061270b57805160ff1916838001178555612738565b82800160010185558215612738579182015b8281111561273857825182559160200191906001019061271d565b50612744929150612748565b5090565b5b808211156127445760008155600101612749565b80356001600160a01b038116811461059b57600080fd5b600082601f830112612784578081fd5b81356020612799612794836133a6565b613376565b82815281810190858301838502870184018810156127b5578586fd5b855b858110156127da576127c88261275d565b845292840192908401906001016127b7565b5090979650505050505050565b600082601f8301126127f7578081fd5b81356020612807612794836133a6565b8281528181019085830183850287018401881015612823578586fd5b855b858110156127da57813584529284019290840190600101612825565b600082601f830112612851578081fd5b81356020612861612794836133a6565b8281528181019085830160608086028801850189101561287f578687fd5b865b868110156128e35781838b031215612897578788fd5b6128a082613376565b83356128ab8161348f565b8152838701356128ba8161348f565b818801526040848101356128cd8161348f565b9082015285529385019391810191600101612881565b509198975050505050505050565b600082601f830112612901578081fd5b61290b6040613376565b80838560408601111561291c578384fd5b835b600281101561293d57813584526020938401939091019060010161291e565b509095945050505050565b600082601f830112612958578081fd5b81356020612968612794836133a6565b8281528181019085830183850287018401881015612984578586fd5b855b858110156127da5781356129998161349d565b84529284019290840190600101612986565b6000602082840312156129bc578081fd5b6121388261275d565b600080604083850312156129d7578081fd5b6129e08361275d565b91506129ee6020840161275d565b90509250929050565b600080600060608486031215612a0b578081fd5b612a148461275d565b9250602084013591506040840135612a2b8161348f565b809150509250925092565b60008060008060808587031215612a4b578182fd5b612a548561275d565b966020860135965060408601359560600135945092505050565b6000806000806000806000806000806000806101a08d8f031215612a9057898afd5b6001600160401b038d351115612aa457898afd5b612ab18e8e358f01612774565b9b506001600160401b0360208e01351115612aca57898afd5b612ada8e60208f01358f016127e7565b9a506001600160401b0360408e01351115612af357898afd5b612b038e60408f01358f01612948565b99506001600160401b0360608e01351115612b1c578788fd5b612b2c8e60608f01358f016127e7565b98506001600160401b0360808e01351115612b45578788fd5b612b558e60808f01358f016127e7565b97506001600160401b0360a08e01351115612b6e578687fd5b612b7e8e60a08f01358f016127e7565b96506001600160401b0360c08e01351115612b97578586fd5b612ba78e60c08f01358f01612774565b95506001600160401b0360e08e01351115612bc0578485fd5b612bd08e60e08f01358f016127e7565b9450612be08e6101008f016128f1565b9350612bef6101408e0161275d565b92506101608d01359150612c066101808e0161275d565b90509295989b509295989b509295989b565b600080600080600080600060e0888a031215612c32578081fd5b87356001600160401b0380821115612c48578283fd5b612c548b838c01612774565b985060208a0135915080821115612c69578283fd5b612c758b838c016127e7565b975060408a0135915080821115612c8a578283fd5b612c968b838c01612948565b965060608a0135915080821115612cab578283fd5b612cb78b838c016127e7565b955060808a0135915080821115612ccc578283fd5b50612cd98a828b016127e7565b93505060a0880135915060c0880135905092959891949750929550565b60008060008060008060008060006101208a8c031215612d14578283fd5b89356001600160401b0380821115612d2a578485fd5b612d368d838e01612774565b9a5060208c0135915080821115612d4b578485fd5b612d578d838e016127e7565b995060408c0135985060608c0135915080821115612d73578485fd5b612d7f8d838e01612774565b975060808c0135915080821115612d94578485fd5b612da08d838e016127e7565b965060a08c0135955060c08c0135915080821115612dbc578485fd5b612dc88d838e01612948565b945060e08c0135915080821115612ddd578384fd5b612de98d838e016127e7565b93506101008c0135915080821115612dff578283fd5b50612e0c8c828d016127e7565b9150509295985092959850929598565b60008060008060808587031215612e31578182fd5b84356001600160401b0380821115612e47578384fd5b612e5388838901612774565b95506020870135915080821115612e68578384fd5b50612e75878288016127e7565b949794965050505060408301359260600135919050565b600060208284031215612e9d578081fd5b81516121388161348f565b600080600080600080600080610100898b031215612ec4578182fd5b883597506020890135965060408901359550606089013594506080890135935060a08901356001600160401b0380821115612efd578384fd5b612f098c838d01612774565b945060c08b0135915080821115612f1e578384fd5b612f2a8c838d016127e7565b935060e08b0135915080821115612f3f578283fd5b50612f4c8b828c01612841565b9150509295985092959890939650565b600060208284031215612f6d578081fd5b81516001600160401b0380821115612f83578283fd5b818401915084601f830112612f96578283fd5b815181811115612fa857612fa8613479565b612fbb601f8201601f1916602001613376565b9150808252856020828501011115612fd1578384fd5b612fe28160208401602086016133e1565b50949350505050565b600060208284031215612ffc578081fd5b5035919050565b600060208284031215613014578081fd5b81516121388161349d565b6000815180845260208085019450808401835b838110156130575781516001600160a01b031687529582019590820190600101613032565b509495945050505050565b6000815180845260208085019450808401835b8381101561305757815187529582019590820190600101613075565b600081518084526130a98160208601602086016133e1565b601f01601f19169290920160200192915050565b600082516130cf8184602087016133e1565b9190910192915050565b60208082528251828201819052600091906040908185019080840286018301878501865b8381101561317257888303603f19018552815180516001600160a01b031684528781015160808986018190529061313682870182613091565b915050878201518582038987015261314e8282613091565b60609384015160ff16969093019590955250948701949250908601906001016130fd565b509098975050505050505050565b600086825285602083015284604083015260a060608301526131a560a083018561301f565b82810360808401526131b78185613062565b98975050505050505050565b60006101208b83528a60208401528060408401526131e38184018b613062565b905082810360608401526131f7818a61301f565b9050828103608084015261320b8189613062565b60a084019790975250506001600160a01b0393841660c082015260e08101929092529091166101009091015295945050505050565b6000602082526121386020830184613091565b600060a0825261326660a0830188613091565b82810360208401526132788188613091565b60ff9690961660408401525050606081019290925260809091015292915050565b6020808252603c908201527f537570706c6965642063757272656e74206f7261636c657320616e6420706f7760408201527f65727320646f206e6f74206d6174636820636865636b706f696e742e00000000606082015260800190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60008482526060602083015261335a606083018561301f565b828103604084015261336c8185613062565b9695505050505050565b604051601f8201601f191681016001600160401b038111828210171561339e5761339e613479565b604052919050565b60006001600160401b038211156133bf576133bf613479565b5060209081020190565b600082198211156133dc576133dc613463565b500190565b60005b838110156133fc5781810151838201526020016133e4565b838111156115f75750506000910152565b60028104600182168061342157607f821691505b6020821081141561344257634e487b7160e01b600052602260045260246000fd5b50919050565b600060001982141561345c5761345c613463565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b8015158114611f6557600080fd5b60ff81168114611f6557600080fdfea26469706673582212209fd6e7a81d7ceeb8731fc1abe2b5e1af72f77147c4fdf0f3fcbb36a47e2ca42164736f6c63430008020033
Loading...
Loading
Loading...
Loading
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.