Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
MintGatewayLogicV2
Compiler Version
v0.5.17+commit.d19bba13
Optimization Enabled:
No with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
pragma solidity ^0.5.17; import "@openzeppelin/upgrades/contracts/Initializable.sol"; import "@openzeppelin/contracts-ethereum-package/contracts/math/SafeMath.sol"; import "@openzeppelin/contracts-ethereum-package/contracts/cryptography/ECDSA.sol"; import "@openzeppelin/upgrades/contracts/upgradeability/InitializableAdminUpgradeabilityProxy.sol"; import "../Governance/Claimable.sol"; import "../libraries/String.sol"; import "./RenERC20.sol"; import "./interfaces/IGateway.sol"; import "../libraries/CanReclaimTokens.sol"; import "./MintGatewayV1.sol"; contract MintGatewayStateV2 { struct Burn { uint256 _blocknumber; bytes _to; uint256 _amount; // Optional string _chain; bytes _payload; } mapping(uint256 => Burn) internal burns; bytes32 public selectorHash; } /// @notice Gateway handles verifying mint and burn requests. A mintAuthority /// approves new assets to be minted by providing a digital signature. An owner /// of an asset can request for it to be burnt. contract MintGatewayLogicV2 is Initializable, Claimable, CanReclaimTokens, IGateway, MintGatewayStateV1, MintGatewayStateV2 { using SafeMath for uint256; event LogMintAuthorityUpdated(address indexed _newMintAuthority); event LogMint( address indexed _to, uint256 _amount, uint256 indexed _n, // Log the nHash instead of sHash so that it can be queried without // knowing the sHash. bytes32 indexed _nHash ); event LogBurn( bytes _to, uint256 _amount, uint256 indexed _n, bytes indexed _indexedTo ); /// @notice Only allow the Darknode Payment contract. modifier onlyOwnerOrMintAuthority() { require( msg.sender == mintAuthority || msg.sender == owner(), "MintGateway: caller is not the owner or mint authority" ); _; } /// @param _token The RenERC20 this Gateway is responsible for. /// @param _feeRecipient The recipient of burning and minting fees. /// @param _mintAuthority The address of the key that can sign mint /// requests. /// @param _mintFee The amount subtracted each mint request and /// forwarded to the feeRecipient. In BIPS. /// @param _burnFee The amount subtracted each burn request and /// forwarded to the feeRecipient. In BIPS. function initialize( RenERC20LogicV1 _token, address _feeRecipient, address _mintAuthority, uint16 _mintFee, uint16 _burnFee, uint256 _minimumBurnAmount ) public initializer { Claimable.initialize(msg.sender); CanReclaimTokens.initialize(msg.sender); minimumBurnAmount = _minimumBurnAmount; token = _token; mintFee = _mintFee; burnFee = _burnFee; updateMintAuthority(_mintAuthority); updateFeeRecipient(_feeRecipient); } /// @param _selectorHash Hash of the token and chain selector. /// The hash should calculated from /// `SHA256(4 bytes of selector length, selector)` function updateSelectorHash(bytes32 _selectorHash) public onlyOwner { selectorHash = _selectorHash; } /// @notice Allow the owner to update the token symbol. function updateSymbol(string memory symbol) public onlyOwner { token.updateSymbol(symbol); } // Public functions //////////////////////////////////////////////////////// /// @notice Claims ownership of the token passed in to the constructor. /// `transferStoreOwnership` must have previously been called. /// Anyone can call this function. function claimTokenOwnership() public { token.claimOwnership(); } /// @notice Allow the owner to update the owner of the RenERC20 token. function transferTokenOwnership(MintGatewayLogicV2 _nextTokenOwner) public onlyOwner { token.transferOwnership(address(_nextTokenOwner)); _nextTokenOwner.claimTokenOwnership(); } /// @notice Allow the owner to update the mint authority. /// /// @param _nextMintAuthority The new mint authority address. function updateMintAuthority(address _nextMintAuthority) public onlyOwnerOrMintAuthority { // The mint authority should not be set to 0, which is the result // returned by ecrecover for an invalid signature. require( _nextMintAuthority != address(0), "MintGateway: mintAuthority cannot be set to address zero" ); mintAuthority = _nextMintAuthority; emit LogMintAuthorityUpdated(mintAuthority); } /// @notice Allow the owner to update the minimum burn amount. /// /// @param _minimumBurnAmount The new min burn amount. function updateMinimumBurnAmount(uint256 _minimumBurnAmount) public onlyOwner { minimumBurnAmount = _minimumBurnAmount; } /// @notice Allow the owner to update the fee recipient. /// /// @param _nextFeeRecipient The address to start paying fees to. function updateFeeRecipient(address _nextFeeRecipient) public onlyOwner { // 'mint' and 'burn' will fail if the feeRecipient is 0x0 require( _nextFeeRecipient != address(0x0), "MintGateway: fee recipient cannot be 0x0" ); feeRecipient = _nextFeeRecipient; } /// @notice Allow the owner to update the 'mint' fee. /// /// @param _nextMintFee The new fee for minting and burning. function updateMintFee(uint16 _nextMintFee) public onlyOwner { mintFee = _nextMintFee; } /// @notice Allow the owner to update the burn fee. /// /// @param _nextBurnFee The new fee for minting and burning. function updateBurnFee(uint16 _nextBurnFee) public onlyOwner { burnFee = _nextBurnFee; } /// @notice Allow the owner to update the mint and burn fees. /// /// @param _nextMintFee The new fee for minting and burning. /// @param _nextBurnFee The new fee for minting and burning. function updateFees(uint16 _nextMintFee, uint16 _nextBurnFee) public onlyOwner { mintFee = _nextMintFee; burnFee = _nextBurnFee; } /// @notice mint verifies a mint approval signature from RenVM and creates /// tokens after taking a fee for the `_feeRecipient`. /// /// @param _pHash (payload hash) The hash of the payload associated with the /// mint. /// @param _amountUnderlying The amount of the token being minted, in its smallest /// value. (e.g. satoshis for BTC). /// @param _nHash (nonce hash) The hash of the nonce, amount and pHash. /// @param _sig The signature of the hash of the following values: /// (pHash, amount, msg.sender, nHash), signed by the mintAuthority. function mint( bytes32 _pHash, uint256 _amountUnderlying, bytes32 _nHash, bytes memory _sig ) public returns (uint256) { // Calculate the hash signed by RenVM. bytes32 sigHash = hashForSignature(_pHash, _amountUnderlying, msg.sender, _nHash); // Calculate the v0.2 signature hash for backwards-compatibility. bytes32 legacySigHash = _legacy_hashForSignature( _pHash, _amountUnderlying, msg.sender, _nHash ); // Check that neither signature has been redeemed. require( status[sigHash] == false && status[legacySigHash] == false, "MintGateway: nonce hash already spent" ); // If both signatures fail verification, throw an error. If any one of // them passed the verification, continue. if ( !verifySignature(sigHash, _sig) && !verifySignature(legacySigHash, _sig) ) { // Return a detailed string containing the hash and recovered // signer. This is somewhat costly but is only run in the revert // branch. revert( String.add8( "MintGateway: invalid signature. pHash: ", String.fromBytes32(_pHash), ", amount: ", String.fromUint(_amountUnderlying), ", msg.sender: ", String.fromAddress(msg.sender), ", _nHash: ", String.fromBytes32(_nHash) ) ); } // Update the status for both signature hashes. This is to ensure that // legacy signatures can't be re-redeemed if `updateSelectorHash` is // ever called - thus changing the result of `sigHash` but not // `legacySigHash`. status[sigHash] = true; status[legacySigHash] = true; uint256 amountScaled = token.fromUnderlying(_amountUnderlying); // Mint `amount - fee` for the recipient and mint `fee` for the minter uint256 absoluteFeeScaled = amountScaled.mul(mintFee).div(BIPS_DENOMINATOR); uint256 receivedAmountScaled = amountScaled.sub( absoluteFeeScaled, "MintGateway: fee exceeds amount" ); // Mint amount minus the fee token.mint(msg.sender, receivedAmountScaled); // Mint the fee if (absoluteFeeScaled > 0) { token.mint(feeRecipient, absoluteFeeScaled); } // Emit a log with a unique identifier 'n'. uint256 receivedAmountUnderlying = token.toUnderlying(receivedAmountScaled); emit LogMint(msg.sender, receivedAmountUnderlying, nextN, _nHash); nextN += 1; return receivedAmountScaled; } /// @notice burn destroys tokens after taking a fee for the `_feeRecipient`, /// allowing the associated assets to be released on their native /// chain. /// /// @param _to The address to receive the un-bridged asset. The format of /// this address should be of the destination chain. /// For example, when burning to Bitcoin, _to should be a /// Bitcoin address. /// @param _amount The amount of the token being burnt, in its /// smallest value. (e.g. satoshis for BTC) function burn(bytes memory _to, uint256 _amount) public returns (uint256) { // The recipient must not be empty. Better validation is possible, // but would need to be customized for each destination ledger. require(_to.length != 0, "MintGateway: to address is empty"); // Calculate fee, subtract it from amount being burnt. uint256 fee = _amount.mul(burnFee).div(BIPS_DENOMINATOR); uint256 amountAfterFee = _amount.sub(fee, "MintGateway: fee exceeds amount"); // If the scaled token can represent more precision than the underlying // token, the difference is lost. This won't exceed 1 sat, so is // negligible compared to burning and transaction fees. uint256 amountAfterFeeUnderlying = token.toUnderlying(amountAfterFee); // Burn the whole amount, and then re-mint the fee. token.burn(msg.sender, _amount); if (fee > 0) { token.mint(feeRecipient, fee); } require( // Must be strictly greater, to that the release transaction is of // at least one unit. amountAfterFeeUnderlying > minimumBurnAmount, "MintGateway: amount is less than the minimum burn amount" ); emit LogBurn(_to, amountAfterFeeUnderlying, nextN, _to); // Store burn so that it can be looked up instead of relying on event // logs. bytes memory payload; MintGatewayStateV2.burns[nextN] = Burn({ _blocknumber: block.number, _to: _to, _amount: amountAfterFeeUnderlying, _chain: "", _payload: payload }); nextN += 1; return amountAfterFeeUnderlying; } function getBurn(uint256 _n) public view returns ( uint256 _blocknumber, bytes memory _to, uint256 _amount, // Optional string memory _chain, bytes memory _payload ) { Burn memory burnStruct = MintGatewayStateV2.burns[_n]; require(burnStruct._to.length > 0, "MintGateway: burn not found"); return ( burnStruct._blocknumber, burnStruct._to, burnStruct._amount, burnStruct._chain, burnStruct._payload ); } /// @notice verifySignature checks the the provided signature matches the /// provided parameters. function verifySignature(bytes32 _sigHash, bytes memory _sig) public view returns (bool) { return mintAuthority == ECDSA.recover(_sigHash, _sig); } /// @notice hashForSignature hashes the parameters so that they can be /// signed. function hashForSignature( bytes32 _pHash, uint256 _amount, address _to, bytes32 _nHash ) public view returns (bytes32) { return keccak256(abi.encode(_pHash, _amount, selectorHash, _to, _nHash)); } /// @notice _legacy_hashForSignature calculates the signature hash used by /// the 0.2 version of RenVM. It's kept here for backwards-compatibility. function _legacy_hashForSignature( bytes32 _pHash, uint256 _amount, address _to, bytes32 _nHash ) public view returns (bytes32) { return keccak256(abi.encode(_pHash, _amount, address(token), _to, _nHash)); } } /* solium-disable-next-line no-empty-blocks */ contract MintGatewayProxy is InitializableAdminUpgradeabilityProxy { }
pragma solidity >=0.4.24 <0.7.0; /** * @title Initializable * * @dev Helper contract to support initializer functions. To use it, replace * the constructor with a function that has the `initializer` modifier. * WARNING: Unlike constructors, initializer functions must be manually * invoked. This applies both to deploying an Initializable contract, as well * as extending an Initializable contract via inheritance. * WARNING: When used with inheritance, manual care must be taken to not invoke * a parent initializer twice, or ensure that all initializers are idempotent, * because this is not dealt with automatically as with constructors. */ contract Initializable { /** * @dev Indicates that the contract has been initialized. */ bool private initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private initializing; /** * @dev Modifier to use in the initializer function of a contract. */ modifier initializer() { require(initializing || isConstructor() || !initialized, "Contract instance has already been initialized"); bool isTopLevelCall = !initializing; if (isTopLevelCall) { initializing = true; initialized = true; } _; if (isTopLevelCall) { initializing = false; } } /// @dev Returns true if and only if the function is running in the constructor function isConstructor() private view returns (bool) { // extcodesize checks the size of the code stored in an address, and // address returns the current address. Since the code is still not // deployed when running a constructor, any checks on its code size will // yield zero, making it an effective way to detect if a contract is // under construction or not. address self = address(this); uint256 cs; assembly { cs := extcodesize(self) } return cs == 0; } // Reserved storage space to allow for layout changes in the future. uint256[50] private ______gap; }
pragma solidity ^0.5.0; /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @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) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @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 sub(a, b, "SafeMath: subtraction overflow"); } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot overflow. * * _Available since v2.4.0._ */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } /** * @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) { // 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 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers. Reverts 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) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } /** * @dev Returns the integer division of two unsigned integers. Reverts 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. * * _Available since v2.4.0._ */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts 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 mod(a, b, "SafeMath: modulo by zero"); } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message 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. * * _Available since v2.4.0._ */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } }
pragma solidity ^0.5.0; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSA { /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * NOTE: This call _does not revert_ if the signature is invalid, or * if the signer is otherwise unable to be retrieved. In those scenarios, * the zero address is returned. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { // Check the signature length if (signature.length != 65) { revert("ECDSA: signature length is invalid"); } // Divide the signature in r, s and v variables bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. // solhint-disable-next-line no-inline-assembly assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (281): 0 < s < secp256k1n ÷ 2 + 1, and for v in (282): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { revert("ECDSA: signature.s is in the wrong range"); } if (v != 27 && v != 28) { revert("ECDSA: signature.v is in the wrong range"); } // If the signature is valid (and not malleable), return the signer address return ecrecover(hash, v, r, s); } /** * @dev Returns an Ethereum Signed Message, created from a `hash`. This * replicates the behavior of the * https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_sign[`eth_sign`] * JSON-RPC method. * * See {recover}. */ function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) { // 32 is the length in bytes of hash, // enforced by the type signature above return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)); } }
pragma solidity ^0.5.0; import './BaseAdminUpgradeabilityProxy.sol'; import './InitializableUpgradeabilityProxy.sol'; /** * @title InitializableAdminUpgradeabilityProxy * @dev Extends from BaseAdminUpgradeabilityProxy with an initializer for * initializing the implementation, admin, and init data. */ contract InitializableAdminUpgradeabilityProxy is BaseAdminUpgradeabilityProxy, InitializableUpgradeabilityProxy { /** * Contract initializer. * @param _logic address of the initial implementation. * @param _admin Address of the proxy administrator. * @param _data Data to send as msg.data to the implementation to initialize the proxied contract. * It should include the signature and the parameters of the function to be called, as described in * https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding. * This parameter is optional, if no data is given the initialization call to proxied contract will be skipped. */ function initialize(address _logic, address _admin, bytes memory _data) public payable { require(_implementation() == address(0)); InitializableUpgradeabilityProxy.initialize(_logic, _data); assert(ADMIN_SLOT == bytes32(uint256(keccak256('eip1967.proxy.admin')) - 1)); _setAdmin(_admin); } }
pragma solidity ^0.5.17; import "@openzeppelin/contracts-ethereum-package/contracts/ownership/Ownable.sol"; import "@openzeppelin/upgrades/contracts/Initializable.sol"; /** * @title Claimable * @dev Extension for the Ownable contract, where the ownership needs to be claimed. * This allows the new owner to accept the transfer. */ contract Claimable is Initializable, Ownable { address public pendingOwner; function initialize(address _nextOwner) public initializer { Ownable.initialize(_nextOwner); } modifier onlyPendingOwner() { require( _msgSender() == pendingOwner, "Claimable: caller is not the pending owner" ); _; } function transferOwnership(address newOwner) public onlyOwner { require( newOwner != owner() && newOwner != pendingOwner, "Claimable: invalid new owner" ); pendingOwner = newOwner; } // Allow skipping two-step transfer if the recipient is known to be a valid // owner, for use in smart-contracts only. function _directTransferOwnership(address newOwner) public onlyOwner { _transferOwnership(newOwner); } function claimOwnership() public onlyPendingOwner { _transferOwnership(pendingOwner); delete pendingOwner; } }
pragma solidity ^0.5.17; library String { /// @notice Convert a uint value to its decimal string representation // solium-disable-next-line security/no-assign-params function fromUint(uint256 _i) internal pure returns (string memory) { if (_i == 0) { return "0"; } uint256 j = _i; uint256 len; while (j != 0) { len++; j /= 10; } bytes memory bstr = new bytes(len); uint256 k = len - 1; while (_i != 0) { bstr[k--] = bytes1(uint8(48 + (_i % 10))); _i /= 10; } return string(bstr); } /// @notice Convert a bytes32 value to its hex string representation. function fromBytes32(bytes32 _value) internal pure returns (string memory) { bytes memory alphabet = "0123456789abcdef"; bytes memory str = new bytes(32 * 2 + 2); str[0] = "0"; str[1] = "x"; for (uint256 i = 0; i < 32; i++) { str[2 + i * 2] = alphabet[uint256(uint8(_value[i] >> 4))]; str[3 + i * 2] = alphabet[uint256(uint8(_value[i] & 0x0f))]; } return string(str); } /// @notice Convert an address to its hex string representation. function fromAddress(address _addr) internal pure returns (string memory) { bytes32 value = bytes32(uint256(_addr)); bytes memory alphabet = "0123456789abcdef"; bytes memory str = new bytes(20 * 2 + 2); str[0] = "0"; str[1] = "x"; for (uint256 i = 0; i < 20; i++) { str[2 + i * 2] = alphabet[uint256(uint8(value[i + 12] >> 4))]; str[3 + i * 2] = alphabet[uint256(uint8(value[i + 12] & 0x0f))]; } return string(str); } /// @notice Append eight strings. function add8( string memory a, string memory b, string memory c, string memory d, string memory e, string memory f, string memory g, string memory h ) internal pure returns (string memory) { return string(abi.encodePacked(a, b, c, d, e, f, g, h)); } }
pragma solidity ^0.5.16; import "@openzeppelin/contracts-ethereum-package/contracts/ownership/Ownable.sol"; import "@openzeppelin/upgrades/contracts/upgradeability/InitializableAdminUpgradeabilityProxy.sol"; import "@openzeppelin/upgrades/contracts/Initializable.sol"; import "@openzeppelin/contracts-ethereum-package/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts-ethereum-package/contracts/token/ERC20/ERC20Detailed.sol"; import "../Governance/Claimable.sol"; import "../libraries/CanReclaimTokens.sol"; import "./ERC20WithRate.sol"; import "./ERC20WithPermit.sol"; /// @notice RenERC20 represents a digital asset that has been bridged on to /// the Ethereum ledger. It exposes mint and burn functions that can only be /// called by it's associated Gateway contract. contract RenERC20LogicV1 is Initializable, ERC20, ERC20Detailed, ERC20WithRate, ERC20WithPermit, Claimable, CanReclaimTokens { /* solium-disable-next-line no-empty-blocks */ function initialize( uint256 _chainId, address _nextOwner, uint256 _initialRate, string memory _version, string memory _name, string memory _symbol, uint8 _decimals ) public initializer { ERC20Detailed.initialize(_name, _symbol, _decimals); ERC20WithRate.initialize(_nextOwner, _initialRate); ERC20WithPermit.initialize( _chainId, _version, _name, _symbol, _decimals ); Claimable.initialize(_nextOwner); CanReclaimTokens.initialize(_nextOwner); } function updateSymbol(string memory symbol) public onlyOwner { ERC20Detailed._symbol = symbol; } /// @notice mint can only be called by the tokens' associated Gateway /// contract. See Gateway's mint function instead. function mint(address _to, uint256 _amount) public onlyOwner { _mint(_to, _amount); } /// @notice burn can only be called by the tokens' associated Gateway /// contract. See Gateway's burn functions instead. function burn(address _from, uint256 _amount) public onlyOwner { _burn(_from, _amount); } function transfer(address recipient, uint256 amount) public returns (bool) { // Disallow sending tokens to the ERC20 contract address - a common // mistake caused by the Ethereum transaction's `to` needing to be // the token's address. require( recipient != address(this), "RenERC20: can't transfer to token address" ); return super.transfer(recipient, amount); } function transferFrom( address sender, address recipient, uint256 amount ) public returns (bool) { // Disallow sending tokens to the ERC20 contract address (see comment // in `transfer`). require( recipient != address(this), "RenERC20: can't transfer to token address" ); return super.transferFrom(sender, recipient, amount); } } /* solium-disable-next-line no-empty-blocks */ contract RenERC20Proxy is InitializableAdminUpgradeabilityProxy { }
pragma solidity ^0.5.17; interface IMintGateway { function mint( bytes32 _pHash, uint256 _amount, bytes32 _nHash, bytes calldata _sig ) external returns (uint256); function mintFee() external view returns (uint256); } interface IBurnGateway { function burn(bytes calldata _to, uint256 _amountScaled) external returns (uint256); function burnFee() external view returns (uint256); } // TODO: In ^0.6.0, should be `interface IGateway is IMintGateway,IBurnGateway {}` interface IGateway { // is IMintGateway function mint( bytes32 _pHash, uint256 _amount, bytes32 _nHash, bytes calldata _sig ) external returns (uint256); function mintFee() external view returns (uint256); // is IBurnGateway function burn(bytes calldata _to, uint256 _amountScaled) external returns (uint256); function burnFee() external view returns (uint256); }
pragma solidity ^0.5.17; import "@openzeppelin/contracts-ethereum-package/contracts/ownership/Ownable.sol"; import "@openzeppelin/contracts-ethereum-package/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts-ethereum-package/contracts/token/ERC20/SafeERC20.sol"; import "@openzeppelin/upgrades/contracts/Initializable.sol"; import "../Governance/Claimable.sol"; contract CanReclaimTokens is Claimable { using SafeERC20 for ERC20; mapping(address => bool) private recoverableTokensBlacklist; function initialize(address _nextOwner) public initializer { Claimable.initialize(_nextOwner); } function blacklistRecoverableToken(address _token) public onlyOwner { recoverableTokensBlacklist[_token] = true; } /// @notice Allow the owner of the contract to recover funds accidentally /// sent to the contract. To withdraw ETH, the token should be set to `0x0`. function recoverTokens(address _token) external onlyOwner { require( !recoverableTokensBlacklist[_token], "CanReclaimTokens: token is not recoverable" ); if (_token == address(0x0)) { msg.sender.transfer(address(this).balance); } else { ERC20(_token).safeTransfer( msg.sender, ERC20(_token).balanceOf(address(this)) ); } } }
pragma solidity 0.5.17; import "@openzeppelin/upgrades/contracts/Initializable.sol"; import "@openzeppelin/contracts-ethereum-package/contracts/math/SafeMath.sol"; import "@openzeppelin/contracts-ethereum-package/contracts/cryptography/ECDSA.sol"; import "@openzeppelin/upgrades/contracts/upgradeability/InitializableAdminUpgradeabilityProxy.sol"; import "../Governance/Claimable.sol"; import "../libraries/String.sol"; import "./RenERC20.sol"; import "./interfaces/IGateway.sol"; import "../libraries/CanReclaimTokens.sol"; contract MintGatewayStateV1 { uint256 constant BIPS_DENOMINATOR = 10000; uint256 public minimumBurnAmount; /// @notice Each Gateway is tied to a specific RenERC20 token. RenERC20LogicV1 public token; /// @notice The mintAuthority is an address that can sign mint requests. address public mintAuthority; /// @dev feeRecipient is assumed to be an address (or a contract) that can /// accept erc20 payments it cannot be 0x0. /// @notice When tokens are mint or burnt, a portion of the tokens are /// forwarded to a fee recipient. address public feeRecipient; /// @notice The mint fee in bips. uint16 public mintFee; /// @notice The burn fee in bips. uint16 public burnFee; /// @notice Each signature can only be seen once. mapping(bytes32 => bool) public status; // LogMint and LogBurn contain a unique `n` that identifies // the mint or burn event. uint256 public nextN = 0; } /// @notice Gateway handles verifying mint and burn requests. A mintAuthority /// approves new assets to be minted by providing a digital signature. An owner /// of an asset can request for it to be burnt. contract MintGatewayLogicV1 is Initializable, Claimable, CanReclaimTokens, IGateway, MintGatewayStateV1 { using SafeMath for uint256; event LogMintAuthorityUpdated(address indexed _newMintAuthority); event LogMint( address indexed _to, uint256 _amount, uint256 indexed _n, bytes32 indexed _signedMessageHash ); event LogBurn( bytes _to, uint256 _amount, uint256 indexed _n, bytes indexed _indexedTo ); /// @notice Only allow the Darknode Payment contract. modifier onlyOwnerOrMintAuthority() { require( msg.sender == mintAuthority || msg.sender == owner(), "Gateway: caller is not the owner or mint authority" ); _; } /// @param _token The RenERC20 this Gateway is responsible for. /// @param _feeRecipient The recipient of burning and minting fees. /// @param _mintAuthority The address of the key that can sign mint /// requests. /// @param _mintFee The amount subtracted each mint request and /// forwarded to the feeRecipient. In BIPS. /// @param _burnFee The amount subtracted each burn request and /// forwarded to the feeRecipient. In BIPS. function initialize( RenERC20LogicV1 _token, address _feeRecipient, address _mintAuthority, uint16 _mintFee, uint16 _burnFee, uint256 _minimumBurnAmount ) public initializer { Claimable.initialize(msg.sender); CanReclaimTokens.initialize(msg.sender); minimumBurnAmount = _minimumBurnAmount; token = _token; mintFee = _mintFee; burnFee = _burnFee; updateMintAuthority(_mintAuthority); updateFeeRecipient(_feeRecipient); } // Public functions //////////////////////////////////////////////////////// /// @notice Claims ownership of the token passed in to the constructor. /// `transferStoreOwnership` must have previously been called. /// Anyone can call this function. function claimTokenOwnership() public { token.claimOwnership(); } /// @notice Allow the owner to update the owner of the RenERC20 token. function transferTokenOwnership(MintGatewayLogicV1 _nextTokenOwner) public onlyOwner { token.transferOwnership(address(_nextTokenOwner)); _nextTokenOwner.claimTokenOwnership(); } /// @notice Allow the owner to update the mint authority. /// /// @param _nextMintAuthority The new mint authority address. function updateMintAuthority(address _nextMintAuthority) public onlyOwnerOrMintAuthority { // The mint authority should not be set to 0, which is the result // returned by ecrecover for an invalid signature. require( _nextMintAuthority != address(0), "Gateway: mintAuthority cannot be set to address zero" ); mintAuthority = _nextMintAuthority; emit LogMintAuthorityUpdated(mintAuthority); } /// @notice Allow the owner to update the minimum burn amount. /// /// @param _minimumBurnAmount The new min burn amount. function updateMinimumBurnAmount(uint256 _minimumBurnAmount) public onlyOwner { minimumBurnAmount = _minimumBurnAmount; } /// @notice Allow the owner to update the fee recipient. /// /// @param _nextFeeRecipient The address to start paying fees to. function updateFeeRecipient(address _nextFeeRecipient) public onlyOwner { // 'mint' and 'burn' will fail if the feeRecipient is 0x0 require( _nextFeeRecipient != address(0x0), "Gateway: fee recipient cannot be 0x0" ); feeRecipient = _nextFeeRecipient; } /// @notice Allow the owner to update the 'mint' fee. /// /// @param _nextMintFee The new fee for minting and burning. function updateMintFee(uint16 _nextMintFee) public onlyOwner { mintFee = _nextMintFee; } /// @notice Allow the owner to update the burn fee. /// /// @param _nextBurnFee The new fee for minting and burning. function updateBurnFee(uint16 _nextBurnFee) public onlyOwner { burnFee = _nextBurnFee; } /// @notice mint verifies a mint approval signature from RenVM and creates /// tokens after taking a fee for the `_feeRecipient`. /// /// @param _pHash (payload hash) The hash of the payload associated with the /// mint. /// @param _amountUnderlying The amount of the token being minted, in its smallest /// value. (e.g. satoshis for BTC). /// @param _nHash (nonce hash) The hash of the nonce, amount and pHash. /// @param _sig The signature of the hash of the following values: /// (pHash, amount, msg.sender, nHash), signed by the mintAuthority. function mint( bytes32 _pHash, uint256 _amountUnderlying, bytes32 _nHash, bytes memory _sig ) public returns (uint256) { // Calculate the hash signed by RenVM. bytes32 sigHash = hashForSignature(_pHash, _amountUnderlying, msg.sender, _nHash); // // Check that the signature hasn't been redeemed. require(status[sigHash] == false, "Gateway: nonce hash already spent"); // If the signature fails verification, throw an error. If any one of // them passed the verification, continue. if (!verifySignature(sigHash, _sig)) { // Return a detailed string containing the hash and recovered // signer. This is somewhat costly but is only run in the revert // branch. revert( String.add8( "Gateway: invalid signature. pHash: ", String.fromBytes32(_pHash), ", amount: ", String.fromUint(_amountUnderlying), ", msg.sender: ", String.fromAddress(msg.sender), ", _nHash: ", String.fromBytes32(_nHash) ) ); } // Update the status for the signature hash so that it can't be used // again. status[sigHash] = true; uint256 amountScaled = token.fromUnderlying(_amountUnderlying); // Mint `amount - fee` for the recipient and mint `fee` for the minter uint256 absoluteFeeScaled = amountScaled.mul(mintFee).div(BIPS_DENOMINATOR); uint256 receivedAmountScaled = amountScaled.sub(absoluteFeeScaled, "Gateway: fee exceeds amount"); // Mint amount minus the fee token.mint(msg.sender, receivedAmountScaled); // Mint the fee token.mint(feeRecipient, absoluteFeeScaled); // Emit a log with a unique identifier 'n'. uint256 receivedAmountUnderlying = token.toUnderlying(receivedAmountScaled); emit LogMint(msg.sender, receivedAmountUnderlying, nextN, sigHash); nextN += 1; return receivedAmountScaled; } /// @notice burn destroys tokens after taking a fee for the `_feeRecipient`, /// allowing the associated assets to be released on their native /// chain. /// /// @param _to The address to receive the un-bridged asset. The format of /// this address should be of the destination chain. /// For example, when burning to Bitcoin, _to should be a /// Bitcoin address. /// @param _amount The amount of the token being burnt, in its /// smallest value. (e.g. satoshis for BTC) function burn(bytes memory _to, uint256 _amount) public returns (uint256) { // The recipient must not be empty. Better validation is possible, // but would need to be customized for each destination ledger. require(_to.length != 0, "Gateway: to address is empty"); // Calculate fee, subtract it from amount being burnt. uint256 fee = _amount.mul(burnFee).div(BIPS_DENOMINATOR); uint256 amountAfterFee = _amount.sub(fee, "Gateway: fee exceeds amount"); // If the scaled token can represent more precision than the underlying // token, the difference is lost. This won't exceed 1 sat, so is // negligible compared to burning and transaction fees. uint256 amountAfterFeeUnderlying = token.toUnderlying(amountAfterFee); // Burn the whole amount, and then re-mint the fee. token.burn(msg.sender, _amount); token.mint(feeRecipient, fee); require( // Must be strictly greater, to that the release transaction is of // at least one unit. amountAfterFeeUnderlying > minimumBurnAmount, "Gateway: amount is less than the minimum burn amount" ); emit LogBurn(_to, amountAfterFeeUnderlying, nextN, _to); nextN += 1; return amountAfterFeeUnderlying; } /// @notice verifySignature checks the the provided signature matches the /// provided parameters. function verifySignature(bytes32 _sigHash, bytes memory _sig) public view returns (bool) { return mintAuthority == ECDSA.recover(_sigHash, _sig); } /// @notice hashForSignature hashes the parameters so that they can be /// signed. function hashForSignature( bytes32 _pHash, uint256 _amount, address _to, bytes32 _nHash ) public view returns (bytes32) { return keccak256(abi.encode(_pHash, _amount, address(token), _to, _nHash)); } } contract BTCGateway is InitializableAdminUpgradeabilityProxy {} contract ZECGateway is InitializableAdminUpgradeabilityProxy {} contract BCHGateway is InitializableAdminUpgradeabilityProxy {}
pragma solidity ^0.5.0; import './UpgradeabilityProxy.sol'; /** * @title BaseAdminUpgradeabilityProxy * @dev This contract combines an upgradeability proxy with an authorization * mechanism for administrative tasks. * All external functions in this contract must be guarded by the * `ifAdmin` modifier. See ethereum/solidity#3864 for a Solidity * feature proposal that would enable this to be done automatically. */ contract BaseAdminUpgradeabilityProxy is BaseUpgradeabilityProxy { /** * @dev Emitted when the administration has been transferred. * @param previousAdmin Address of the previous admin. * @param newAdmin Address of the new admin. */ event AdminChanged(address previousAdmin, address newAdmin); /** * @dev Storage slot with the admin of the contract. * This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103; /** * @dev Modifier to check whether the `msg.sender` is the admin. * If it is, it will run the function. Otherwise, it will delegate the call * to the implementation. */ modifier ifAdmin() { if (msg.sender == _admin()) { _; } else { _fallback(); } } /** * @return The address of the proxy admin. */ function admin() external ifAdmin returns (address) { return _admin(); } /** * @return The address of the implementation. */ function implementation() external ifAdmin returns (address) { return _implementation(); } /** * @dev Changes the admin of the proxy. * Only the current admin can call this function. * @param newAdmin Address to transfer proxy administration to. */ function changeAdmin(address newAdmin) external ifAdmin { require(newAdmin != address(0), "Cannot change the admin of a proxy to the zero address"); emit AdminChanged(_admin(), newAdmin); _setAdmin(newAdmin); } /** * @dev Upgrade the backing implementation of the proxy. * Only the admin can call this function. * @param newImplementation Address of the new implementation. */ function upgradeTo(address newImplementation) external ifAdmin { _upgradeTo(newImplementation); } /** * @dev Upgrade the backing implementation of the proxy and call a function * on the new implementation. * This is useful to initialize the proxied contract. * @param newImplementation Address of the new implementation. * @param data Data to send as msg.data in the low level call. * It should include the signature and the parameters of the function to be called, as described in * https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding. */ function upgradeToAndCall(address newImplementation, bytes calldata data) payable external ifAdmin { _upgradeTo(newImplementation); (bool success,) = newImplementation.delegatecall(data); require(success); } /** * @return The admin slot. */ function _admin() internal view returns (address adm) { bytes32 slot = ADMIN_SLOT; assembly { adm := sload(slot) } } /** * @dev Sets the address of the proxy admin. * @param newAdmin Address of the new proxy admin. */ function _setAdmin(address newAdmin) internal { bytes32 slot = ADMIN_SLOT; assembly { sstore(slot, newAdmin) } } /** * @dev Only fall back when the sender is not the admin. */ function _willFallback() internal { require(msg.sender != _admin(), "Cannot call fallback function from the proxy admin"); super._willFallback(); } }
pragma solidity ^0.5.0; import './BaseUpgradeabilityProxy.sol'; /** * @title InitializableUpgradeabilityProxy * @dev Extends BaseUpgradeabilityProxy with an initializer for initializing * implementation and init data. */ contract InitializableUpgradeabilityProxy is BaseUpgradeabilityProxy { /** * @dev Contract initializer. * @param _logic Address of the initial implementation. * @param _data Data to send as msg.data to the implementation to initialize the proxied contract. * It should include the signature and the parameters of the function to be called, as described in * https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding. * This parameter is optional, if no data is given the initialization call to proxied contract will be skipped. */ function initialize(address _logic, bytes memory _data) public payable { require(_implementation() == address(0)); assert(IMPLEMENTATION_SLOT == bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)); _setImplementation(_logic); if(_data.length > 0) { (bool success,) = _logic.delegatecall(_data); require(success); } } }
pragma solidity ^0.5.0; import './BaseUpgradeabilityProxy.sol'; /** * @title UpgradeabilityProxy * @dev Extends BaseUpgradeabilityProxy with a constructor for initializing * implementation and init data. */ contract UpgradeabilityProxy is BaseUpgradeabilityProxy { /** * @dev Contract constructor. * @param _logic Address of the initial implementation. * @param _data Data to send as msg.data to the implementation to initialize the proxied contract. * It should include the signature and the parameters of the function to be called, as described in * https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding. * This parameter is optional, if no data is given the initialization call to proxied contract will be skipped. */ constructor(address _logic, bytes memory _data) public payable { assert(IMPLEMENTATION_SLOT == bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)); _setImplementation(_logic); if(_data.length > 0) { (bool success,) = _logic.delegatecall(_data); require(success); } } }
pragma solidity ^0.5.0; import './Proxy.sol'; import '../utils/Address.sol'; /** * @title BaseUpgradeabilityProxy * @dev This contract implements a proxy that allows to change the * implementation address to which it will delegate. * Such a change is called an implementation upgrade. */ contract BaseUpgradeabilityProxy is Proxy { /** * @dev Emitted when the implementation is upgraded. * @param implementation Address of the new implementation. */ event Upgraded(address indexed implementation); /** * @dev Storage slot with the address of the current implementation. * This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; /** * @dev Returns the current implementation. * @return Address of the current implementation */ function _implementation() internal view returns (address impl) { bytes32 slot = IMPLEMENTATION_SLOT; assembly { impl := sload(slot) } } /** * @dev Upgrades the proxy to a new implementation. * @param newImplementation Address of the new implementation. */ function _upgradeTo(address newImplementation) internal { _setImplementation(newImplementation); emit Upgraded(newImplementation); } /** * @dev Sets the implementation address of the proxy. * @param newImplementation Address of the new implementation. */ function _setImplementation(address newImplementation) internal { require(OpenZeppelinUpgradesAddress.isContract(newImplementation), "Cannot set a proxy implementation to a non-contract address"); bytes32 slot = IMPLEMENTATION_SLOT; assembly { sstore(slot, newImplementation) } } }
pragma solidity ^0.5.0; /** * @title Proxy * @dev Implements delegation of calls to other contracts, with proper * forwarding of return values and bubbling of failures. * It defines a fallback function that delegates all calls to the address * returned by the abstract _implementation() internal function. */ contract Proxy { /** * @dev Fallback function. * Implemented entirely in `_fallback`. */ function () payable external { _fallback(); } /** * @return The Address of the implementation. */ function _implementation() internal view returns (address); /** * @dev Delegates execution to an implementation contract. * This is a low level function that doesn't return to its internal call site. * It will return to the external caller whatever the implementation returns. * @param implementation Address to delegate. */ function _delegate(address implementation) internal { assembly { // Copy msg.data. We take full control of memory in this inline assembly // block because it will not return to Solidity code. We overwrite the // Solidity scratch pad at memory position 0. calldatacopy(0, 0, calldatasize) // Call the implementation. // out and outsize are 0 because we don't know the size yet. let result := delegatecall(gas, implementation, 0, calldatasize, 0, 0) // Copy the returned data. returndatacopy(0, 0, returndatasize) switch result // delegatecall returns 0 on error. case 0 { revert(0, returndatasize) } default { return(0, returndatasize) } } } /** * @dev Function that is run as the first thing in the fallback function. * Can be redefined in derived contracts to add functionality. * Redefinitions must call super._willFallback(). */ function _willFallback() internal { } /** * @dev fallback implementation. * Extracted to enable manual triggering. */ function _fallback() internal { _willFallback(); _delegate(_implementation()); } }
pragma solidity ^0.5.0; /** * Utility library of inline functions on addresses * * Source https://raw.githubusercontent.com/OpenZeppelin/openzeppelin-solidity/v2.1.3/contracts/utils/Address.sol * This contract is copied here and renamed from the original to avoid clashes in the compiled artifacts * when the user imports a zos-lib contract (that transitively causes this contract to be compiled and added to the * build/artifacts folder) as well as the vanilla Address implementation from an openzeppelin version. */ library OpenZeppelinUpgradesAddress { /** * Returns whether the target address is a contract * @dev This function will return false if invoked during the constructor of a contract, * as the code is not actually created until after the constructor finishes. * @param account address of the account to check * @return whether the target address is a contract */ function isContract(address account) internal view returns (bool) { uint256 size; // XXX Currently there is no better way to check if there is a contract in an address // than to check the size of the code at that address. // See https://ethereum.stackexchange.com/a/14016/36603 // for more details about how this works. // TODO Check this again before the Serenity release, because all addresses will be // contracts then. // solhint-disable-next-line no-inline-assembly assembly { size := extcodesize(account) } return size > 0; } }
pragma solidity ^0.5.0; import "@openzeppelin/upgrades/contracts/Initializable.sol"; import "../GSN/Context.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. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be aplied to your functions to restrict their use to * the owner. */ contract Ownable is Initializable, Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ function initialize(address sender) public initializer { _owner = sender; emit OwnershipTransferred(address(0), _owner); } /** * @dev Returns the address of the current owner. */ function owner() public view returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(isOwner(), "Ownable: caller is not the owner"); _; } /** * @dev Returns true if the caller is the current owner. */ function isOwner() public view returns (bool) { return _msgSender() == _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 onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = 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 onlyOwner { _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). */ function _transferOwnership(address newOwner) internal { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } uint256[50] private ______gap; }
pragma solidity ^0.5.0; import "@openzeppelin/upgrades/contracts/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 GSN 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. */ contract Context is Initializable { // Empty internal constructor, to prevent people from mistakenly deploying // an instance of this contract, which should be used via inheritance. constructor () internal { } // solhint-disable-previous-line no-empty-blocks function _msgSender() internal view returns (address payable) { return msg.sender; } function _msgData() internal view returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } }
pragma solidity ^0.5.0; import "@openzeppelin/upgrades/contracts/Initializable.sol"; import "../../GSN/Context.sol"; import "./IERC20.sol"; import "../../math/SafeMath.sol"; /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20Mintable}. * * TIP: For a detailed writeup see our guide * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * We have followed general OpenZeppelin guidelines: functions revert instead * of returning `false` on failure. This behavior is nonetheless conventional * and does not conflict with the expectations of ERC20 applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract ERC20 is Initializable, Context, IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address recipient, uint256 amount) public returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public returns (bool) { _approve(_msgSender(), spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}; * * Requirements: * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. * - the caller must have allowance for `sender`'s tokens of at least * `amount`. */ function transferFrom(address sender, address recipient, uint256 amount) public returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue)); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero")); return true; } /** * @dev Moves tokens `amount` from `sender` to `recipient`. * * This is internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `sender` cannot be the zero address. * - `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. */ function _transfer(address sender, address recipient, uint256 amount) internal { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance"); _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements * * - `to` cannot be the zero address. */ function _mint(address account, uint256 amount) internal { require(account != address(0), "ERC20: mint to the zero address"); _totalSupply = _totalSupply.add(amount); _balances[account] = _balances[account].add(amount); emit Transfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal { require(account != address(0), "ERC20: burn from the zero address"); _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance"); _totalSupply = _totalSupply.sub(amount); emit Transfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens. * * This is internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve(address owner, address spender, uint256 amount) internal { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Destroys `amount` tokens from `account`.`amount` is then deducted * from the caller's allowance. * * See {_burn} and {_approve}. */ function _burnFrom(address account, uint256 amount) internal { _burn(account, amount); _approve(account, _msgSender(), _allowances[account][_msgSender()].sub(amount, "ERC20: burn amount exceeds allowance")); } uint256[50] private ______gap; }
pragma solidity ^0.5.0; import "@openzeppelin/upgrades/contracts/Initializable.sol"; import "./IERC20.sol"; /** * @dev Optional functions from the ERC20 standard. */ contract ERC20Detailed is Initializable, IERC20 { string private _name; string internal _symbol; uint8 private _decimals; /** * @dev Sets the values for `name`, `symbol`, and `decimals`. All three of * these values are immutable: they can only be set once during * construction. */ function initialize(string memory name, string memory symbol, uint8 decimals) public initializer { _name = name; _symbol = symbol; _decimals = decimals; } /** * @dev Returns the name of the token. */ function name() public view returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5,05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view returns (uint8) { return _decimals; } uint256[50] private ______gap; }
pragma solidity ^0.5.17; import "@openzeppelin/upgrades/contracts/Initializable.sol"; import "@openzeppelin/contracts-ethereum-package/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts-ethereum-package/contracts/math/SafeMath.sol"; import "../Governance/Claimable.sol"; /// @notice ERC20WithRate allows for a more dynamic fee model by storing a rate /// that tracks the number of the underlying asset's unit represented by a /// single ERC20 token. contract ERC20WithRate is Initializable, Ownable, ERC20 { using SafeMath for uint256; uint256 public constant _rateScale = 1e18; uint256 internal _rate; event LogRateChanged(uint256 indexed _rate); /* solium-disable-next-line no-empty-blocks */ function initialize(address _nextOwner, uint256 _initialRate) public initializer { Ownable.initialize(_nextOwner); _setRate(_initialRate); } function setExchangeRate(uint256 _nextRate) public onlyOwner { _setRate(_nextRate); } function exchangeRateCurrent() public view returns (uint256) { require(_rate != 0, "ERC20WithRate: rate has not been initialized"); return _rate; } function _setRate(uint256 _nextRate) internal { require(_nextRate > 0, "ERC20WithRate: rate must be greater than zero"); _rate = _nextRate; } function balanceOfUnderlying(address _account) public view returns (uint256) { return toUnderlying(balanceOf(_account)); } function toUnderlying(uint256 _amount) public view returns (uint256) { return _amount.mul(_rate).div(_rateScale); } function fromUnderlying(uint256 _amountUnderlying) public view returns (uint256) { return _amountUnderlying.mul(_rateScale).div(_rate); } }
pragma solidity ^0.5.17; import "@openzeppelin/upgrades/contracts/Initializable.sol"; import "@openzeppelin/contracts-ethereum-package/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts-ethereum-package/contracts/math/SafeMath.sol"; import "@openzeppelin/contracts-ethereum-package/contracts/token/ERC20/ERC20Detailed.sol"; /// @notice Taken from the DAI token. contract ERC20WithPermit is Initializable, ERC20, ERC20Detailed { using SafeMath for uint256; mapping(address => uint256) public nonces; // If the token is redeployed, the version is increased to prevent a permit // signature being used on both token instances. string public version; // --- EIP712 niceties --- bytes32 public DOMAIN_SEPARATOR; // PERMIT_TYPEHASH is the value returned from // keccak256("Permit(address holder,address spender,uint256 nonce,uint256 expiry,bool allowed)") bytes32 public constant PERMIT_TYPEHASH = 0xea2aa0a1be11a07ed86d755c93467f4f82362b452371d1ba94d1715123511acb; function initialize( uint256 _chainId, string memory _version, string memory _name, string memory _symbol, uint8 _decimals ) public initializer { ERC20Detailed.initialize(_name, _symbol, _decimals); version = _version; DOMAIN_SEPARATOR = keccak256( abi.encode( keccak256( "EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)" ), keccak256(bytes(name())), keccak256(bytes(version)), _chainId, address(this) ) ); } // --- Approve by signature --- function permit( address holder, address spender, uint256 nonce, uint256 expiry, bool allowed, uint8 v, bytes32 r, bytes32 s ) external { bytes32 digest = keccak256( abi.encodePacked( "\x19\x01", DOMAIN_SEPARATOR, keccak256( abi.encode( PERMIT_TYPEHASH, holder, spender, nonce, expiry, allowed ) ) ) ); require(holder != address(0), "ERC20WithRate: address must not be 0x0"); require( holder == ecrecover(digest, v, r, s), "ERC20WithRate: invalid signature" ); require( expiry == 0 || now <= expiry, "ERC20WithRate: permit has expired" ); require(nonce == nonces[holder]++, "ERC20WithRate: invalid nonce"); uint256 amount = allowed ? uint256(-1) : 0; _approve(holder, spender, amount); } }
pragma solidity ^0.5.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. Does not include * the optional functions; to access them see {ERC20Detailed}. */ interface IERC20 { /** * @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 `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, 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 `sender` to `recipient` 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 sender, address recipient, uint256 amount) external returns (bool); /** * @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); }
pragma solidity ^0.5.0; import "./IERC20.sol"; import "../../math/SafeMath.sol"; import "../../utils/Address.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 ERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using SafeMath for uint256; using Address for address; function safeTransfer(IERC20 token, address to, uint256 value) internal { callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } function safeApprove(IERC20 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' // solhint-disable-next-line max-line-length 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(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).add(value); callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero"); callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } /** * @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(IERC20 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. // A Solidity high level call has three parts: // 1. The target address is checked to verify it contains contract code // 2. The call itself is made, and success asserted // 3. The return value is decoded, which in turn checks the size of the returned data. // solhint-disable-next-line max-line-length require(address(token).isContract(), "SafeERC20: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = address(token).call(data); require(success, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional // solhint-disable-next-line max-line-length require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
pragma solidity ^0.5.5; /** * @dev Collection of functions related to the address type */ library Address { /** * @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 * ==== */ function isContract(address account) internal view returns (bool) { // According to EIP-1052, 0x0 is the value returned for not-yet created accounts // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned // for accounts without code, i.e. `keccak256('')` bytes32 codehash; bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; // solhint-disable-next-line no-inline-assembly assembly { codehash := extcodehash(account) } return (codehash != accountHash && codehash != 0x0); } /** * @dev Converts an `address` into `address payable`. Note that this is * simply a type cast: the actual underlying value is not changed. * * _Available since v2.4.0._ */ function toPayable(address account) internal pure returns (address payable) { return address(uint160(account)); } /** * @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]. * * _Available since v2.4.0._ */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-call-value (bool success, ) = recipient.call.value(amount)(""); require(success, "Address: unable to send value, recipient may have reverted"); } }
{ "optimizer": { "enabled": false, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes","name":"_to","type":"bytes"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"_n","type":"uint256"},{"indexed":true,"internalType":"bytes","name":"_indexedTo","type":"bytes"}],"name":"LogBurn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_to","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"_n","type":"uint256"},{"indexed":true,"internalType":"bytes32","name":"_nHash","type":"bytes32"}],"name":"LogMint","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_newMintAuthority","type":"address"}],"name":"LogMintAuthorityUpdated","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"},{"constant":false,"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"_directTransferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"_pHash","type":"bytes32"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"bytes32","name":"_nHash","type":"bytes32"}],"name":"_legacy_hashForSignature","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"blacklistRecoverableToken","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes","name":"_to","type":"bytes"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"burn","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"burnFee","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"claimOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"claimTokenOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"feeRecipient","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"_n","type":"uint256"}],"name":"getBurn","outputs":[{"internalType":"uint256","name":"_blocknumber","type":"uint256"},{"internalType":"bytes","name":"_to","type":"bytes"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"string","name":"_chain","type":"string"},{"internalType":"bytes","name":"_payload","type":"bytes"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"_pHash","type":"bytes32"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"bytes32","name":"_nHash","type":"bytes32"}],"name":"hashForSignature","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"contract RenERC20LogicV1","name":"_token","type":"address"},{"internalType":"address","name":"_feeRecipient","type":"address"},{"internalType":"address","name":"_mintAuthority","type":"address"},{"internalType":"uint16","name":"_mintFee","type":"uint16"},{"internalType":"uint16","name":"_burnFee","type":"uint16"},{"internalType":"uint256","name":"_minimumBurnAmount","type":"uint256"}],"name":"initialize","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_nextOwner","type":"address"}],"name":"initialize","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"isOwner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"minimumBurnAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"_pHash","type":"bytes32"},{"internalType":"uint256","name":"_amountUnderlying","type":"uint256"},{"internalType":"bytes32","name":"_nHash","type":"bytes32"},{"internalType":"bytes","name":"_sig","type":"bytes"}],"name":"mint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"mintAuthority","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"mintFee","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"nextN","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"pendingOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"recoverTokens","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"renounceOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"selectorHash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"status","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"token","outputs":[{"internalType":"contract RenERC20LogicV1","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"contract MintGatewayLogicV2","name":"_nextTokenOwner","type":"address"}],"name":"transferTokenOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint16","name":"_nextBurnFee","type":"uint16"}],"name":"updateBurnFee","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_nextFeeRecipient","type":"address"}],"name":"updateFeeRecipient","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint16","name":"_nextMintFee","type":"uint16"},{"internalType":"uint16","name":"_nextBurnFee","type":"uint16"}],"name":"updateFees","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_minimumBurnAmount","type":"uint256"}],"name":"updateMinimumBurnAmount","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_nextMintAuthority","type":"address"}],"name":"updateMintAuthority","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint16","name":"_nextMintFee","type":"uint16"}],"name":"updateMintFee","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"_selectorHash","type":"bytes32"}],"name":"updateSelectorHash","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"string","name":"symbol","type":"string"}],"name":"updateSymbol","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"_sigHash","type":"bytes32"},{"internalType":"bytes","name":"_sig","type":"bytes"}],"name":"verifySignature","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"}]
Contract Creation Code
60806040526000606d55614dde806100186000396000f3fe608060405234801561001057600080fd5b506004361061021c5760003560e01c80635cc6610611610125578063c91441ca116100ad578063f2fde38b1161007c578063f2fde38b14610d28578063f3d2350e14610d6c578063f65d901c14610dac578063fc0c546a14610df0578063fce589d814610e3a5761021c565b8063c91441ca14610b47578063daca6f7814610bbd578063e30c397814610c9a578063f160d36914610ce45761021c565b80639340b21e116100f45780639340b21e146109d357806394c238ac14610a1d578063a2999beb14610a3b578063aa4df9ad14610ae5578063c4d66de814610b035761021c565b80635cc661061461092b578063715018a61461095d5780638da5cb5b146109675780638f32d59b146109b15761021c565b80632eb3f49b116101a85780634e71e0c8116101775780634e71e0c8146107785780635219a5661461078257806352ad0d5e146107f8578063537f53121461083e57806359c9176c146108f95761021c565b80632eb3f49b1461049a57806338463cff146106275780633a521b8d14610700578063469048401461072e5761021c565b8063159ab14d116101ef578063159ab14d146102c357806316114acd146103b057806321e6b53d146103f4578063238e5bc814610438578063297629761461047c5761021c565b80630130a33b146102215780630d3afe4c1461026557806310731a651461029357806313966db51461029d575b600080fd5b6102636004803603602081101561023757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610e60565b005b6102916004803603602081101561027b57600080fd5b8101908080359060200190929190505050611072565b005b61029b6110f6565b005b6102a561117a565b604051808261ffff1661ffff16815260200191505060405180910390f35b61039a600480360360808110156102d957600080fd5b810190808035906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561031457600080fd5b82018360208201111561032657600080fd5b8035906020019184600183028401116401000000008311171561034857600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050919291929050505061118e565b6040518082815260200191505060405180910390f35b6103f2600480360360208110156103c657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611872565b005b6104366004803603602081101561040a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611af6565b005b61047a6004803603602081101561044e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611c8c565b005b610484611d12565b6040518082815260200191505060405180910390f35b6104c6600480360360208110156104b057600080fd5b8101908080359060200190929190505050611d18565b60405180868152602001806020018581526020018060200180602001848103845288818151815260200191508051906020019080838360005b8381101561051a5780820151818401526020810190506104ff565b50505050905090810190601f1680156105475780820380516001836020036101000a031916815260200191505b50848103835286818151815260200191508051906020019080838360005b83811015610580578082015181840152602081019050610565565b50505050905090810190601f1680156105ad5780820380516001836020036101000a031916815260200191505b50848103825285818151815260200191508051906020019080838360005b838110156105e65780820151818401526020810190506105cb565b50505050905090810190601f1680156106135780820380516001836020036101000a031916815260200191505b509850505050505050505060405180910390f35b6106ea6004803603604081101561063d57600080fd5b810190808035906020019064010000000081111561065a57600080fd5b82018360208201111561066c57600080fd5b8035906020019184600183028401116401000000008311171561068e57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050919291929080359060200190929190505050611ff4565b6040518082815260200191505060405180910390f35b61072c6004803603602081101561071657600080fd5b8101908080359060200190929190505050612595565b005b610736612619565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61078061263f565b005b6107e26004803603608081101561079857600080fd5b810190808035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061273e565b6040518082815260200191505060405180910390f35b6108246004803603602081101561080e57600080fd5b81019080803590602001909291905050506127bf565b604051808215151515815260200191505060405180910390f35b6108f76004803603602081101561085457600080fd5b810190808035906020019064010000000081111561087157600080fd5b82018360208201111561088357600080fd5b803590602001918460018302840111640100000000831117156108a557600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192905050506127df565b005b6109296004803603602081101561090f57600080fd5b81019080803561ffff16906020019092919050505061294e565b005b61095b6004803603602081101561094157600080fd5b81019080803561ffff1690602001909291905050506129e8565b005b610965612a82565b005b61096f612bbd565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6109b9612be7565b604051808215151515815260200191505060405180910390f35b6109db612c46565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610a25612c6c565b6040518082815260200191505060405180910390f35b610ae3600480360360c0811015610a5157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803561ffff169060200190929190803561ffff16906020019092919080359060200190929190505050612c72565b005b610aed612e1d565b6040518082815260200191505060405180910390f35b610b4560048036036020811015610b1957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612e23565b005b610ba760048036036080811015610b5d57600080fd5b810190808035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612f2c565b6040518082815260200191505060405180910390f35b610c8060048036036040811015610bd357600080fd5b810190808035906020019092919080359060200190640100000000811115610bfa57600080fd5b820183602082011115610c0c57600080fd5b80359060200191846001830284011164010000000083111715610c2e57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050612ff9565b604051808215151515815260200191505060405180910390f35b610ca261305d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610d2660048036036020811015610cfa57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613083565b005b610d6a60048036036020811015610d3e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506131c7565b005b610daa60048036036040811015610d8257600080fd5b81019080803561ffff169060200190929190803561ffff169060200190929190505050613388565b005b610dee60048036036020811015610dc257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613440565b005b610df8613515565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610e4261353b565b604051808261ffff1661ffff16815260200191505060405180910390f35b606a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480610eee5750610ebf612bbd565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b610f43576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526036815260200180614bff6036913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610fc9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526038815260200180614c356038913960400191505060405180910390fd5b80606a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550606a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167ff0f08e606c1dd3a2c220ada53422fd9fe0aa75614b27db0549f649de3ad2072a60405160405180910390a250565b61107a612be7565b6110ec576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80606f8190555050565b606960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16634e71e0c86040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561116057600080fd5b505af1158015611174573d6000803e3d6000fd5b50505050565b606b60149054906101000a900461ffff1681565b60008061119d8686338761273e565b905060006111ad87873388612f2c565b905060001515606c600084815260200190815260200160002060009054906101000a900460ff161515148015611207575060001515606c600083815260200190815260200160002060009054906101000a900460ff161515145b61125c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180614b786025913960400191505060405180910390fd5b6112668285612ff9565b15801561127a57506112788185612ff9565b155b1561140757611366604051806060016040528060278152602001614b2b602791396112a48961354f565b6040518060400160405280600a81526020017f2c20616d6f756e743a20000000000000000000000000000000000000000000008152506112e38a6137aa565b6040518060400160405280600e81526020017f2c206d73672e73656e6465723a20000000000000000000000000000000000000815250611322336138d7565b6040518060400160405280600a81526020017f2c205f6e486173683a20000000000000000000000000000000000000000000008152506113618d61354f565b613b58565b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156113cc5780820151818401526020810190506113b1565b50505050905090810190601f1680156113f95780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b6001606c600084815260200190815260200160002060006101000a81548160ff0219169083151502179055506001606c600083815260200190815260200160002060006101000a81548160ff0219169083151502179055506000606960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a173b2f6886040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b1580156114d457600080fd5b505afa1580156114e8573d6000803e3d6000fd5b505050506040513d60208110156114fe57600080fd5b81019080805190602001909291905050509050600061154e612710611540606b60149054906101000a900461ffff1661ffff1685613e1890919063ffffffff16565b613e9e90919063ffffffff16565b9050600061159c826040518060400160405280601f81526020017f4d696e74476174657761793a20666565206578636565647320616d6f756e740081525085613ee89092919063ffffffff16565b9050606960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166340c10f1933836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b15801561164757600080fd5b505af115801561165b573d6000803e3d6000fd5b50505050600082111561174c57606960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166340c10f19606b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b15801561173357600080fd5b505af1158015611747573d6000803e3d6000fd5b505050505b6000606960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663eb438fc2836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b1580156117c157600080fd5b505afa1580156117d5573d6000803e3d6000fd5b505050506040513d60208110156117eb57600080fd5b8101908080519060200190929190505050905088606d543373ffffffffffffffffffffffffffffffffffffffff167fa58ba939eb08dab7eaf8ad09c16e7405ee88e5153e15da62d5481296a9f727fa846040518082815260200191505060405180910390a46001606d60008282540192505081905550819650505050505050949350505050565b61187a612be7565b6118ec576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b606760008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161561198f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180614b9d602a913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611a10573373ffffffffffffffffffffffffffffffffffffffff166108fc479081150290604051600060405180830381858888f19350505050158015611a0a573d6000803e3d6000fd5b50611af3565b611af2338273ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611a9157600080fd5b505afa158015611aa5573d6000803e3d6000fd5b505050506040513d6020811015611abb57600080fd5b81019080805190602001909291905050508373ffffffffffffffffffffffffffffffffffffffff16613fa89092919063ffffffff16565b5b50565b611afe612be7565b611b70576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b606960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f2fde38b826040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050600060405180830381600087803b158015611c1157600080fd5b505af1158015611c25573d6000803e3d6000fd5b505050508073ffffffffffffffffffffffffffffffffffffffff166310731a656040518163ffffffff1660e01b8152600401600060405180830381600087803b158015611c7157600080fd5b505af1158015611c85573d6000803e3d6000fd5b5050505050565b611c94612be7565b611d06576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b611d0f81614079565b50565b606f5481565b600060606000606080611d296149d6565b606e60008881526020019081526020016000206040518060a001604052908160008201548152602001600182018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611dea5780601f10611dbf57610100808354040283529160200191611dea565b820191906000526020600020905b815481529060010190602001808311611dcd57829003601f168201915b5050505050815260200160028201548152602001600382018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611e965780601f10611e6b57610100808354040283529160200191611e96565b820191906000526020600020905b815481529060010190602001808311611e7957829003601f168201915b50505050508152602001600482018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611f385780601f10611f0d57610100808354040283529160200191611f38565b820191906000526020600020905b815481529060010190602001808311611f1b57829003601f168201915b5050505050815250509050600081602001515111611fbe576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f4d696e74476174657761793a206275726e206e6f7420666f756e64000000000081525060200191505060405180910390fd5b80600001518160200151826040015183606001518460800151839350819150809050955095509550955095505091939590929450565b6000808351141561206d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4d696e74476174657761793a20746f206164647265737320697320656d70747981525060200191505060405180910390fd5b60006120aa61271061209c606b60169054906101000a900461ffff1661ffff1686613e1890919063ffffffff16565b613e9e90919063ffffffff16565b905060006120f8826040518060400160405280601f81526020017f4d696e74476174657761793a20666565206578636565647320616d6f756e740081525086613ee89092919063ffffffff16565b90506000606960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663eb438fc2836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561216f57600080fd5b505afa158015612183573d6000803e3d6000fd5b505050506040513d602081101561219957600080fd5b81019080805190602001909291905050509050606960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16639dc29fac33876040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b15801561225557600080fd5b505af1158015612269573d6000803e3d6000fd5b50505050600083111561235a57606960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166340c10f19606b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16856040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b15801561234157600080fd5b505af1158015612355573d6000803e3d6000fd5b505050505b60685481116123b4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526038815260200180614bc76038913960400191505060405180910390fd5b856040518082805190602001908083835b602083106123e857805182526020820191506020810190506020830392506123c5565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040518091039020606d547f1619fc95050ffb8c94c9077c82b3e1ebbf8d571b6234241c55ba0aaf40da019e88846040518080602001838152602001828103825284818151815260200191508051906020019080838360005b83811015612481578082015181840152602081019050612466565b50505050905090810190601f1680156124ae5780820380516001836020036101000a031916815260200191505b50935050505060405180910390a360606040518060a0016040528043815260200188815260200183815260200160405180602001604052806000815250815260200182815250606e6000606d54815260200190815260200160002060008201518160000155602082015181600101908051906020019061252f929190614a05565b50604082015181600201556060820151816003019080519060200190612556929190614a85565b506080820151816004019080519060200190612573929190614a05565b509050506001606d600082825401925050819055508194505050505092915050565b61259d612be7565b61260f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b8060688190555050565b606b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b606660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166126806141bf565b73ffffffffffffffffffffffffffffffffffffffff16146126ec576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180614ce4602a913960400191505060405180910390fd5b612717606660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16614079565b606660006101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055565b60008484606f548585604051602001808681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200195505050505050604051602081830303815290604052805190602001209050949350505050565b606c6020528060005260406000206000915054906101000a900460ff1681565b6127e7612be7565b612859576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b606960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663537f5312826040518263ffffffff1660e01b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156128e75780820151818401526020810190506128cc565b50505050905090810190601f1680156129145780820380516001836020036101000a031916815260200191505b5092505050600060405180830381600087803b15801561293357600080fd5b505af1158015612947573d6000803e3d6000fd5b5050505050565b612956612be7565b6129c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80606b60166101000a81548161ffff021916908361ffff16021790555050565b6129f0612be7565b612a62576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80606b60146101000a81548161ffff021916908361ffff16021790555050565b612a8a612be7565b612afc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36000603360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16612c2a6141bf565b73ffffffffffffffffffffffffffffffffffffffff1614905090565b606a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60685481565b600060019054906101000a900460ff1680612c915750612c906141c7565b5b80612ca857506000809054906101000a900460ff16155b612cfd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180614cb6602e913960400191505060405180910390fd5b60008060019054906101000a900460ff161590508015612d4d576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b612d56336141de565b612d5f33612e23565b8160688190555086606960006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083606b60146101000a81548161ffff021916908361ffff16021790555082606b60166101000a81548161ffff021916908361ffff160217905550612dea85610e60565b612df386613083565b8015612e145760008060016101000a81548160ff0219169083151502179055505b50505050505050565b606d5481565b600060019054906101000a900460ff1680612e425750612e416141c7565b5b80612e5957506000809054906101000a900460ff16155b612eae576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180614cb6602e913960400191505060405180910390fd5b60008060019054906101000a900460ff161590508015612efe576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b612f07826141de565b8015612f285760008060016101000a81548160ff0219169083151502179055505b5050565b60008484606960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168585604051602001808681526020018581526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200195505050505050604051602081830303815290604052805190602001209050949350505050565b600061300583836142e7565b73ffffffffffffffffffffffffffffffffffffffff16606a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614905092915050565b606660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61308b612be7565b6130fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415613183576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526028815260200180614d826028913960400191505060405180910390fd5b80606b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6131cf612be7565b613241576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b613249612bbd565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141580156132d25750606660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614155b613344576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f436c61696d61626c653a20696e76616c6964206e6577206f776e65720000000081525060200191505060405180910390fd5b80606660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b613390612be7565b613402576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b81606b60146101000a81548161ffff021916908361ffff16021790555080606b60166101000a81548161ffff021916908361ffff1602179055505050565b613448612be7565b6134ba576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b6001606760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b606960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b606b60169054906101000a900461ffff1681565b6060806040518060400160405280601081526020017f30313233343536373839616263646566000000000000000000000000000000008152509050606060426040519080825280601f01601f1916602001820160405280156135c05781602001600182028038833980820191505090505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106135f157fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f78000000000000000000000000000000000000000000000000000000000000008160018151811061364e57fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060008090505b602081101561379f5782600486836020811061369b57fe5b1a60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c60f81c60ff16815181106136d357fe5b602001015160f81c60f81b8260028302600201815181106136f057fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535082600f60f81b86836020811061373157fe5b1a60f81b1660f81c60ff168151811061374657fe5b602001015160f81c60f81b82600283026003018151811061376357fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508080600101915050613683565b508092505050919050565b606060008214156137f2576040518060400160405280600181526020017f300000000000000000000000000000000000000000000000000000000000000081525090506138d2565b600082905060005b6000821461381c578080600101915050600a828161381457fe5b0491506137fa565b6060816040519080825280601f01601f1916602001820160405280156138515781602001600182028038833980820191505090505b50905060006001830390505b600086146138ca57600a868161386f57fe5b0660300160f81b8282806001900393508151811061388957fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a86816138c257fe5b04955061385d565b819450505050505b919050565b606060008273ffffffffffffffffffffffffffffffffffffffff1660001b905060606040518060400160405280601081526020017f303132333435363738396162636465660000000000000000000000000000000081525090506060602a6040519080825280601f01601f1916602001820160405280156139675781602001600182028038833980820191505090505b5090507f30000000000000000000000000000000000000000000000000000000000000008160008151811061399857fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106139f557fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060008090505b6014811015613b4c5782600485600c840160208110613a4557fe5b1a60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c60f81c60ff1681518110613a7d57fe5b602001015160f81c60f81b826002830260020181518110613a9a57fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535082600f60f81b85600c840160208110613ade57fe5b1a60f81b1660f81c60ff1681518110613af357fe5b602001015160f81c60f81b826002830260030181518110613b1057fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508080600101915050613a2a565b50809350505050919050565b606088888888888888886040516020018089805190602001908083835b60208310613b985780518252602082019150602081019050602083039250613b75565b6001836020036101000a03801982511681845116808217855250505050505090500188805190602001908083835b60208310613be95780518252602082019150602081019050602083039250613bc6565b6001836020036101000a03801982511681845116808217855250505050505090500187805190602001908083835b60208310613c3a5780518252602082019150602081019050602083039250613c17565b6001836020036101000a03801982511681845116808217855250505050505090500186805190602001908083835b60208310613c8b5780518252602082019150602081019050602083039250613c68565b6001836020036101000a03801982511681845116808217855250505050505090500185805190602001908083835b60208310613cdc5780518252602082019150602081019050602083039250613cb9565b6001836020036101000a03801982511681845116808217855250505050505090500184805190602001908083835b60208310613d2d5780518252602082019150602081019050602083039250613d0a565b6001836020036101000a03801982511681845116808217855250505050505090500183805190602001908083835b60208310613d7e5780518252602082019150602081019050602083039250613d5b565b6001836020036101000a03801982511681845116808217855250505050505090500182805190602001908083835b60208310613dcf5780518252602082019150602081019050602083039250613dac565b6001836020036101000a03801982511681845116808217855250505050505090500198505050505050505050604051602081830303815290604052905098975050505050505050565b600080831415613e2b5760009050613e98565b6000828402905082848281613e3c57fe5b0414613e93576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180614c956021913960400191505060405180910390fd5b809150505b92915050565b6000613ee083836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506144bc565b905092915050565b6000838311158290613f95576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015613f5a578082015181840152602081019050613f3f565b50505050905090810190601f168015613f875780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b614074838473ffffffffffffffffffffffffffffffffffffffff1663a9059cbb905060e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050614582565b505050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156140ff576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180614b526026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a380603360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600033905090565b6000803090506000813b9050600081149250505090565b600060019054906101000a900460ff16806141fd57506141fc6141c7565b5b8061421457506000809054906101000a900460ff16155b614269576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180614cb6602e913960400191505060405180910390fd5b60008060019054906101000a900460ff1615905080156142b9576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b6142c2826147cd565b80156142e35760008060016101000a81548160ff0219169083151502179055505b5050565b60006041825114614343576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180614d0e6022913960400191505060405180910390fd5b60008060006020850151925060408501519150606085015160001a90507f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08260001c11156143dc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526028815260200180614d306028913960400191505060405180910390fd5b601b8160ff16141580156143f45750601c8160ff1614155b1561444a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526028815260200180614c6d6028913960400191505060405180910390fd5b60018682858560405160008152602001604052604051808581526020018460ff1660ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa1580156144a7573d6000803e3d6000fd5b50505060206040510351935050505092915050565b60008083118290614568576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561452d578082015181840152602081019050614512565b50505050905090810190601f16801561455a5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161457457fe5b049050809150509392505050565b6145a18273ffffffffffffffffffffffffffffffffffffffff1661498b565b614613576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b60208310614662578051825260208201915060208101905060208303925061463f565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146146c4576040519150601f19603f3d011682016040523d82523d6000602084013e6146c9565b606091505b509150915081614741576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b6000815111156147c75780806020019051602081101561476057600080fd5b81019080805190602001909291905050506147c6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180614d58602a913960400191505060405180910390fd5b5b50505050565b600060019054906101000a900460ff16806147ec57506147eb6141c7565b5b8061480357506000809054906101000a900460ff16155b614858576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180614cb6602e913960400191505060405180910390fd5b60008060019054906101000a900460ff1615905080156148a8576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b81603360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a380156149875760008060016101000a81548160ff0219169083151502179055505b5050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f91508082141580156149cd57506000801b8214155b92505050919050565b6040518060a0016040528060008152602001606081526020016000815260200160608152602001606081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10614a4657805160ff1916838001178555614a74565b82800160010185558215614a74579182015b82811115614a73578251825591602001919060010190614a58565b5b509050614a819190614b05565b5090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10614ac657805160ff1916838001178555614af4565b82800160010185558215614af4579182015b82811115614af3578251825591602001919060010190614ad8565b5b509050614b019190614b05565b5090565b614b2791905b80821115614b23576000816000905550600101614b0b565b5090565b9056fe4d696e74476174657761793a20696e76616c6964207369676e61747572652e2070486173683a204f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734d696e74476174657761793a206e6f6e6365206861736820616c7265616479207370656e7443616e5265636c61696d546f6b656e733a20746f6b656e206973206e6f74207265636f76657261626c654d696e74476174657761793a20616d6f756e74206973206c657373207468616e20746865206d696e696d756d206275726e20616d6f756e744d696e74476174657761793a2063616c6c6572206973206e6f7420746865206f776e6572206f72206d696e7420617574686f726974794d696e74476174657761793a206d696e74417574686f726974792063616e6e6f742062652073657420746f2061646472657373207a65726f45434453413a207369676e61747572652e7620697320696e207468652077726f6e672072616e6765536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77436f6e747261637420696e7374616e63652068617320616c7265616479206265656e20696e697469616c697a6564436c61696d61626c653a2063616c6c6572206973206e6f74207468652070656e64696e67206f776e657245434453413a207369676e6174757265206c656e67746820697320696e76616c696445434453413a207369676e61747572652e7320697320696e207468652077726f6e672072616e67655361666545524332303a204552433230206f7065726174696f6e20646964206e6f7420737563636565644d696e74476174657761793a2066656520726563697069656e742063616e6e6f7420626520307830a265627a7a72315820ed11c99db91e1c877646a4bcf536ebbf7cab6dd23f74bd87262b10bd3e55c9f464736f6c63430005110032
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061021c5760003560e01c80635cc6610611610125578063c91441ca116100ad578063f2fde38b1161007c578063f2fde38b14610d28578063f3d2350e14610d6c578063f65d901c14610dac578063fc0c546a14610df0578063fce589d814610e3a5761021c565b8063c91441ca14610b47578063daca6f7814610bbd578063e30c397814610c9a578063f160d36914610ce45761021c565b80639340b21e116100f45780639340b21e146109d357806394c238ac14610a1d578063a2999beb14610a3b578063aa4df9ad14610ae5578063c4d66de814610b035761021c565b80635cc661061461092b578063715018a61461095d5780638da5cb5b146109675780638f32d59b146109b15761021c565b80632eb3f49b116101a85780634e71e0c8116101775780634e71e0c8146107785780635219a5661461078257806352ad0d5e146107f8578063537f53121461083e57806359c9176c146108f95761021c565b80632eb3f49b1461049a57806338463cff146106275780633a521b8d14610700578063469048401461072e5761021c565b8063159ab14d116101ef578063159ab14d146102c357806316114acd146103b057806321e6b53d146103f4578063238e5bc814610438578063297629761461047c5761021c565b80630130a33b146102215780630d3afe4c1461026557806310731a651461029357806313966db51461029d575b600080fd5b6102636004803603602081101561023757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610e60565b005b6102916004803603602081101561027b57600080fd5b8101908080359060200190929190505050611072565b005b61029b6110f6565b005b6102a561117a565b604051808261ffff1661ffff16815260200191505060405180910390f35b61039a600480360360808110156102d957600080fd5b810190808035906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561031457600080fd5b82018360208201111561032657600080fd5b8035906020019184600183028401116401000000008311171561034857600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050919291929050505061118e565b6040518082815260200191505060405180910390f35b6103f2600480360360208110156103c657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611872565b005b6104366004803603602081101561040a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611af6565b005b61047a6004803603602081101561044e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611c8c565b005b610484611d12565b6040518082815260200191505060405180910390f35b6104c6600480360360208110156104b057600080fd5b8101908080359060200190929190505050611d18565b60405180868152602001806020018581526020018060200180602001848103845288818151815260200191508051906020019080838360005b8381101561051a5780820151818401526020810190506104ff565b50505050905090810190601f1680156105475780820380516001836020036101000a031916815260200191505b50848103835286818151815260200191508051906020019080838360005b83811015610580578082015181840152602081019050610565565b50505050905090810190601f1680156105ad5780820380516001836020036101000a031916815260200191505b50848103825285818151815260200191508051906020019080838360005b838110156105e65780820151818401526020810190506105cb565b50505050905090810190601f1680156106135780820380516001836020036101000a031916815260200191505b509850505050505050505060405180910390f35b6106ea6004803603604081101561063d57600080fd5b810190808035906020019064010000000081111561065a57600080fd5b82018360208201111561066c57600080fd5b8035906020019184600183028401116401000000008311171561068e57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050919291929080359060200190929190505050611ff4565b6040518082815260200191505060405180910390f35b61072c6004803603602081101561071657600080fd5b8101908080359060200190929190505050612595565b005b610736612619565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61078061263f565b005b6107e26004803603608081101561079857600080fd5b810190808035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061273e565b6040518082815260200191505060405180910390f35b6108246004803603602081101561080e57600080fd5b81019080803590602001909291905050506127bf565b604051808215151515815260200191505060405180910390f35b6108f76004803603602081101561085457600080fd5b810190808035906020019064010000000081111561087157600080fd5b82018360208201111561088357600080fd5b803590602001918460018302840111640100000000831117156108a557600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192905050506127df565b005b6109296004803603602081101561090f57600080fd5b81019080803561ffff16906020019092919050505061294e565b005b61095b6004803603602081101561094157600080fd5b81019080803561ffff1690602001909291905050506129e8565b005b610965612a82565b005b61096f612bbd565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6109b9612be7565b604051808215151515815260200191505060405180910390f35b6109db612c46565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610a25612c6c565b6040518082815260200191505060405180910390f35b610ae3600480360360c0811015610a5157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803561ffff169060200190929190803561ffff16906020019092919080359060200190929190505050612c72565b005b610aed612e1d565b6040518082815260200191505060405180910390f35b610b4560048036036020811015610b1957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612e23565b005b610ba760048036036080811015610b5d57600080fd5b810190808035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612f2c565b6040518082815260200191505060405180910390f35b610c8060048036036040811015610bd357600080fd5b810190808035906020019092919080359060200190640100000000811115610bfa57600080fd5b820183602082011115610c0c57600080fd5b80359060200191846001830284011164010000000083111715610c2e57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050612ff9565b604051808215151515815260200191505060405180910390f35b610ca261305d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610d2660048036036020811015610cfa57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613083565b005b610d6a60048036036020811015610d3e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506131c7565b005b610daa60048036036040811015610d8257600080fd5b81019080803561ffff169060200190929190803561ffff169060200190929190505050613388565b005b610dee60048036036020811015610dc257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613440565b005b610df8613515565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610e4261353b565b604051808261ffff1661ffff16815260200191505060405180910390f35b606a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480610eee5750610ebf612bbd565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b610f43576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526036815260200180614bff6036913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610fc9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526038815260200180614c356038913960400191505060405180910390fd5b80606a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550606a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167ff0f08e606c1dd3a2c220ada53422fd9fe0aa75614b27db0549f649de3ad2072a60405160405180910390a250565b61107a612be7565b6110ec576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80606f8190555050565b606960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16634e71e0c86040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561116057600080fd5b505af1158015611174573d6000803e3d6000fd5b50505050565b606b60149054906101000a900461ffff1681565b60008061119d8686338761273e565b905060006111ad87873388612f2c565b905060001515606c600084815260200190815260200160002060009054906101000a900460ff161515148015611207575060001515606c600083815260200190815260200160002060009054906101000a900460ff161515145b61125c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180614b786025913960400191505060405180910390fd5b6112668285612ff9565b15801561127a57506112788185612ff9565b155b1561140757611366604051806060016040528060278152602001614b2b602791396112a48961354f565b6040518060400160405280600a81526020017f2c20616d6f756e743a20000000000000000000000000000000000000000000008152506112e38a6137aa565b6040518060400160405280600e81526020017f2c206d73672e73656e6465723a20000000000000000000000000000000000000815250611322336138d7565b6040518060400160405280600a81526020017f2c205f6e486173683a20000000000000000000000000000000000000000000008152506113618d61354f565b613b58565b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156113cc5780820151818401526020810190506113b1565b50505050905090810190601f1680156113f95780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b6001606c600084815260200190815260200160002060006101000a81548160ff0219169083151502179055506001606c600083815260200190815260200160002060006101000a81548160ff0219169083151502179055506000606960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a173b2f6886040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b1580156114d457600080fd5b505afa1580156114e8573d6000803e3d6000fd5b505050506040513d60208110156114fe57600080fd5b81019080805190602001909291905050509050600061154e612710611540606b60149054906101000a900461ffff1661ffff1685613e1890919063ffffffff16565b613e9e90919063ffffffff16565b9050600061159c826040518060400160405280601f81526020017f4d696e74476174657761793a20666565206578636565647320616d6f756e740081525085613ee89092919063ffffffff16565b9050606960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166340c10f1933836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b15801561164757600080fd5b505af115801561165b573d6000803e3d6000fd5b50505050600082111561174c57606960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166340c10f19606b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b15801561173357600080fd5b505af1158015611747573d6000803e3d6000fd5b505050505b6000606960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663eb438fc2836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b1580156117c157600080fd5b505afa1580156117d5573d6000803e3d6000fd5b505050506040513d60208110156117eb57600080fd5b8101908080519060200190929190505050905088606d543373ffffffffffffffffffffffffffffffffffffffff167fa58ba939eb08dab7eaf8ad09c16e7405ee88e5153e15da62d5481296a9f727fa846040518082815260200191505060405180910390a46001606d60008282540192505081905550819650505050505050949350505050565b61187a612be7565b6118ec576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b606760008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161561198f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180614b9d602a913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611a10573373ffffffffffffffffffffffffffffffffffffffff166108fc479081150290604051600060405180830381858888f19350505050158015611a0a573d6000803e3d6000fd5b50611af3565b611af2338273ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611a9157600080fd5b505afa158015611aa5573d6000803e3d6000fd5b505050506040513d6020811015611abb57600080fd5b81019080805190602001909291905050508373ffffffffffffffffffffffffffffffffffffffff16613fa89092919063ffffffff16565b5b50565b611afe612be7565b611b70576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b606960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f2fde38b826040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050600060405180830381600087803b158015611c1157600080fd5b505af1158015611c25573d6000803e3d6000fd5b505050508073ffffffffffffffffffffffffffffffffffffffff166310731a656040518163ffffffff1660e01b8152600401600060405180830381600087803b158015611c7157600080fd5b505af1158015611c85573d6000803e3d6000fd5b5050505050565b611c94612be7565b611d06576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b611d0f81614079565b50565b606f5481565b600060606000606080611d296149d6565b606e60008881526020019081526020016000206040518060a001604052908160008201548152602001600182018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611dea5780601f10611dbf57610100808354040283529160200191611dea565b820191906000526020600020905b815481529060010190602001808311611dcd57829003601f168201915b5050505050815260200160028201548152602001600382018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611e965780601f10611e6b57610100808354040283529160200191611e96565b820191906000526020600020905b815481529060010190602001808311611e7957829003601f168201915b50505050508152602001600482018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611f385780601f10611f0d57610100808354040283529160200191611f38565b820191906000526020600020905b815481529060010190602001808311611f1b57829003601f168201915b5050505050815250509050600081602001515111611fbe576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f4d696e74476174657761793a206275726e206e6f7420666f756e64000000000081525060200191505060405180910390fd5b80600001518160200151826040015183606001518460800151839350819150809050955095509550955095505091939590929450565b6000808351141561206d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4d696e74476174657761793a20746f206164647265737320697320656d70747981525060200191505060405180910390fd5b60006120aa61271061209c606b60169054906101000a900461ffff1661ffff1686613e1890919063ffffffff16565b613e9e90919063ffffffff16565b905060006120f8826040518060400160405280601f81526020017f4d696e74476174657761793a20666565206578636565647320616d6f756e740081525086613ee89092919063ffffffff16565b90506000606960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663eb438fc2836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561216f57600080fd5b505afa158015612183573d6000803e3d6000fd5b505050506040513d602081101561219957600080fd5b81019080805190602001909291905050509050606960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16639dc29fac33876040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b15801561225557600080fd5b505af1158015612269573d6000803e3d6000fd5b50505050600083111561235a57606960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166340c10f19606b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16856040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b15801561234157600080fd5b505af1158015612355573d6000803e3d6000fd5b505050505b60685481116123b4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526038815260200180614bc76038913960400191505060405180910390fd5b856040518082805190602001908083835b602083106123e857805182526020820191506020810190506020830392506123c5565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040518091039020606d547f1619fc95050ffb8c94c9077c82b3e1ebbf8d571b6234241c55ba0aaf40da019e88846040518080602001838152602001828103825284818151815260200191508051906020019080838360005b83811015612481578082015181840152602081019050612466565b50505050905090810190601f1680156124ae5780820380516001836020036101000a031916815260200191505b50935050505060405180910390a360606040518060a0016040528043815260200188815260200183815260200160405180602001604052806000815250815260200182815250606e6000606d54815260200190815260200160002060008201518160000155602082015181600101908051906020019061252f929190614a05565b50604082015181600201556060820151816003019080519060200190612556929190614a85565b506080820151816004019080519060200190612573929190614a05565b509050506001606d600082825401925050819055508194505050505092915050565b61259d612be7565b61260f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b8060688190555050565b606b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b606660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166126806141bf565b73ffffffffffffffffffffffffffffffffffffffff16146126ec576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180614ce4602a913960400191505060405180910390fd5b612717606660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16614079565b606660006101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055565b60008484606f548585604051602001808681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200195505050505050604051602081830303815290604052805190602001209050949350505050565b606c6020528060005260406000206000915054906101000a900460ff1681565b6127e7612be7565b612859576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b606960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663537f5312826040518263ffffffff1660e01b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156128e75780820151818401526020810190506128cc565b50505050905090810190601f1680156129145780820380516001836020036101000a031916815260200191505b5092505050600060405180830381600087803b15801561293357600080fd5b505af1158015612947573d6000803e3d6000fd5b5050505050565b612956612be7565b6129c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80606b60166101000a81548161ffff021916908361ffff16021790555050565b6129f0612be7565b612a62576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80606b60146101000a81548161ffff021916908361ffff16021790555050565b612a8a612be7565b612afc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36000603360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16612c2a6141bf565b73ffffffffffffffffffffffffffffffffffffffff1614905090565b606a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60685481565b600060019054906101000a900460ff1680612c915750612c906141c7565b5b80612ca857506000809054906101000a900460ff16155b612cfd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180614cb6602e913960400191505060405180910390fd5b60008060019054906101000a900460ff161590508015612d4d576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b612d56336141de565b612d5f33612e23565b8160688190555086606960006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083606b60146101000a81548161ffff021916908361ffff16021790555082606b60166101000a81548161ffff021916908361ffff160217905550612dea85610e60565b612df386613083565b8015612e145760008060016101000a81548160ff0219169083151502179055505b50505050505050565b606d5481565b600060019054906101000a900460ff1680612e425750612e416141c7565b5b80612e5957506000809054906101000a900460ff16155b612eae576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180614cb6602e913960400191505060405180910390fd5b60008060019054906101000a900460ff161590508015612efe576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b612f07826141de565b8015612f285760008060016101000a81548160ff0219169083151502179055505b5050565b60008484606960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168585604051602001808681526020018581526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200195505050505050604051602081830303815290604052805190602001209050949350505050565b600061300583836142e7565b73ffffffffffffffffffffffffffffffffffffffff16606a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614905092915050565b606660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61308b612be7565b6130fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415613183576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526028815260200180614d826028913960400191505060405180910390fd5b80606b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6131cf612be7565b613241576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b613249612bbd565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141580156132d25750606660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614155b613344576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f436c61696d61626c653a20696e76616c6964206e6577206f776e65720000000081525060200191505060405180910390fd5b80606660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b613390612be7565b613402576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b81606b60146101000a81548161ffff021916908361ffff16021790555080606b60166101000a81548161ffff021916908361ffff1602179055505050565b613448612be7565b6134ba576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b6001606760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b606960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b606b60169054906101000a900461ffff1681565b6060806040518060400160405280601081526020017f30313233343536373839616263646566000000000000000000000000000000008152509050606060426040519080825280601f01601f1916602001820160405280156135c05781602001600182028038833980820191505090505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106135f157fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f78000000000000000000000000000000000000000000000000000000000000008160018151811061364e57fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060008090505b602081101561379f5782600486836020811061369b57fe5b1a60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c60f81c60ff16815181106136d357fe5b602001015160f81c60f81b8260028302600201815181106136f057fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535082600f60f81b86836020811061373157fe5b1a60f81b1660f81c60ff168151811061374657fe5b602001015160f81c60f81b82600283026003018151811061376357fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508080600101915050613683565b508092505050919050565b606060008214156137f2576040518060400160405280600181526020017f300000000000000000000000000000000000000000000000000000000000000081525090506138d2565b600082905060005b6000821461381c578080600101915050600a828161381457fe5b0491506137fa565b6060816040519080825280601f01601f1916602001820160405280156138515781602001600182028038833980820191505090505b50905060006001830390505b600086146138ca57600a868161386f57fe5b0660300160f81b8282806001900393508151811061388957fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a86816138c257fe5b04955061385d565b819450505050505b919050565b606060008273ffffffffffffffffffffffffffffffffffffffff1660001b905060606040518060400160405280601081526020017f303132333435363738396162636465660000000000000000000000000000000081525090506060602a6040519080825280601f01601f1916602001820160405280156139675781602001600182028038833980820191505090505b5090507f30000000000000000000000000000000000000000000000000000000000000008160008151811061399857fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106139f557fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060008090505b6014811015613b4c5782600485600c840160208110613a4557fe5b1a60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c60f81c60ff1681518110613a7d57fe5b602001015160f81c60f81b826002830260020181518110613a9a57fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535082600f60f81b85600c840160208110613ade57fe5b1a60f81b1660f81c60ff1681518110613af357fe5b602001015160f81c60f81b826002830260030181518110613b1057fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508080600101915050613a2a565b50809350505050919050565b606088888888888888886040516020018089805190602001908083835b60208310613b985780518252602082019150602081019050602083039250613b75565b6001836020036101000a03801982511681845116808217855250505050505090500188805190602001908083835b60208310613be95780518252602082019150602081019050602083039250613bc6565b6001836020036101000a03801982511681845116808217855250505050505090500187805190602001908083835b60208310613c3a5780518252602082019150602081019050602083039250613c17565b6001836020036101000a03801982511681845116808217855250505050505090500186805190602001908083835b60208310613c8b5780518252602082019150602081019050602083039250613c68565b6001836020036101000a03801982511681845116808217855250505050505090500185805190602001908083835b60208310613cdc5780518252602082019150602081019050602083039250613cb9565b6001836020036101000a03801982511681845116808217855250505050505090500184805190602001908083835b60208310613d2d5780518252602082019150602081019050602083039250613d0a565b6001836020036101000a03801982511681845116808217855250505050505090500183805190602001908083835b60208310613d7e5780518252602082019150602081019050602083039250613d5b565b6001836020036101000a03801982511681845116808217855250505050505090500182805190602001908083835b60208310613dcf5780518252602082019150602081019050602083039250613dac565b6001836020036101000a03801982511681845116808217855250505050505090500198505050505050505050604051602081830303815290604052905098975050505050505050565b600080831415613e2b5760009050613e98565b6000828402905082848281613e3c57fe5b0414613e93576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180614c956021913960400191505060405180910390fd5b809150505b92915050565b6000613ee083836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506144bc565b905092915050565b6000838311158290613f95576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015613f5a578082015181840152602081019050613f3f565b50505050905090810190601f168015613f875780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b614074838473ffffffffffffffffffffffffffffffffffffffff1663a9059cbb905060e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050614582565b505050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156140ff576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180614b526026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a380603360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600033905090565b6000803090506000813b9050600081149250505090565b600060019054906101000a900460ff16806141fd57506141fc6141c7565b5b8061421457506000809054906101000a900460ff16155b614269576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180614cb6602e913960400191505060405180910390fd5b60008060019054906101000a900460ff1615905080156142b9576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b6142c2826147cd565b80156142e35760008060016101000a81548160ff0219169083151502179055505b5050565b60006041825114614343576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180614d0e6022913960400191505060405180910390fd5b60008060006020850151925060408501519150606085015160001a90507f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08260001c11156143dc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526028815260200180614d306028913960400191505060405180910390fd5b601b8160ff16141580156143f45750601c8160ff1614155b1561444a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526028815260200180614c6d6028913960400191505060405180910390fd5b60018682858560405160008152602001604052604051808581526020018460ff1660ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa1580156144a7573d6000803e3d6000fd5b50505060206040510351935050505092915050565b60008083118290614568576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561452d578082015181840152602081019050614512565b50505050905090810190601f16801561455a5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161457457fe5b049050809150509392505050565b6145a18273ffffffffffffffffffffffffffffffffffffffff1661498b565b614613576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b60208310614662578051825260208201915060208101905060208303925061463f565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146146c4576040519150601f19603f3d011682016040523d82523d6000602084013e6146c9565b606091505b509150915081614741576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b6000815111156147c75780806020019051602081101561476057600080fd5b81019080805190602001909291905050506147c6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180614d58602a913960400191505060405180910390fd5b5b50505050565b600060019054906101000a900460ff16806147ec57506147eb6141c7565b5b8061480357506000809054906101000a900460ff16155b614858576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180614cb6602e913960400191505060405180910390fd5b60008060019054906101000a900460ff1615905080156148a8576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b81603360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a380156149875760008060016101000a81548160ff0219169083151502179055505b5050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f91508082141580156149cd57506000801b8214155b92505050919050565b6040518060a0016040528060008152602001606081526020016000815260200160608152602001606081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10614a4657805160ff1916838001178555614a74565b82800160010185558215614a74579182015b82811115614a73578251825591602001919060010190614a58565b5b509050614a819190614b05565b5090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10614ac657805160ff1916838001178555614af4565b82800160010185558215614af4579182015b82811115614af3578251825591602001919060010190614ad8565b5b509050614b019190614b05565b5090565b614b2791905b80821115614b23576000816000905550600101614b0b565b5090565b9056fe4d696e74476174657761793a20696e76616c6964207369676e61747572652e2070486173683a204f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734d696e74476174657761793a206e6f6e6365206861736820616c7265616479207370656e7443616e5265636c61696d546f6b656e733a20746f6b656e206973206e6f74207265636f76657261626c654d696e74476174657761793a20616d6f756e74206973206c657373207468616e20746865206d696e696d756d206275726e20616d6f756e744d696e74476174657761793a2063616c6c6572206973206e6f7420746865206f776e6572206f72206d696e7420617574686f726974794d696e74476174657761793a206d696e74417574686f726974792063616e6e6f742062652073657420746f2061646472657373207a65726f45434453413a207369676e61747572652e7620697320696e207468652077726f6e672072616e6765536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77436f6e747261637420696e7374616e63652068617320616c7265616479206265656e20696e697469616c697a6564436c61696d61626c653a2063616c6c6572206973206e6f74207468652070656e64696e67206f776e657245434453413a207369676e6174757265206c656e67746820697320696e76616c696445434453413a207369676e61747572652e7320697320696e207468652077726f6e672072616e67655361666545524332303a204552433230206f7065726174696f6e20646964206e6f7420737563636565644d696e74476174657761793a2066656520726563697069656e742063616e6e6f7420626520307830a265627a7a72315820ed11c99db91e1c877646a4bcf536ebbf7cab6dd23f74bd87262b10bd3e55c9f464736f6c63430005110032
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 26 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
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.