Polygon Sponsored slots available. Book your slot here!
More Info
Private Name Tags
ContractCreator
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Latest 1 internal transaction
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
16284463 | 1294 days ago | Contract Creation | 0 POL |
Loading...
Loading
Contract Name:
ForwarderRegistry
Compiler Version
v0.7.6+commit.7338295f
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.7.6; import "../_lib/openzeppelin/contracts/utils/Address.sol"; import "../_lib/openzeppelin/contracts/cryptography/ECDSA.sol"; import "./solc_0.7/ERC2771/IERC2771.sol"; import "./solc_0.7/ERC2771/UsingAppendedCallData.sol"; interface ERC1271 { function isValidSignature(bytes calldata data, bytes calldata signature) external view returns (bytes4 magicValue); } interface ERC1654 { function isValidSignature(bytes32 hash, bytes calldata signature) external view returns (bytes4 magicValue); } /// @notice Universal Meta Transaction Forwarder Registry. /// Users can record specific forwarder that will be allowed to forward meta transactions on their behalf. contract ForwarderRegistry is UsingAppendedCallData, IERC2771 { using Address for address; using ECDSA for bytes32; enum SignatureType {DIRECT, EIP1654, EIP1271} bytes4 internal constant ERC1271_MAGICVALUE = 0x20c13b0b; bytes4 internal constant ERC1654_MAGICVALUE = 0x1626ba7e; bytes32 internal constant EIP712DOMAIN_NAME = keccak256("ForwarderRegistry"); bytes32 internal constant APPROVAL_TYPEHASH = keccak256("ApproveForwarder(address forwarder,bool approved,uint256 nonce)"); uint256 private immutable _deploymentChainId; bytes32 private immutable _deploymentDomainSeparator; struct Forwarder { uint248 nonce; bool approved; } mapping(address => mapping(address => Forwarder)) internal _forwarders; /// @notice emitted for each Forwarder Approval or Disaproval. event ForwarderApproved(address indexed signer, address indexed forwarder, bool approved, uint256 nonce); constructor() { uint256 chainId; //solhint-disable-next-line no-inline-assembly assembly { chainId := chainid() } _deploymentChainId = chainId; _deploymentDomainSeparator = _calculateDomainSeparator(chainId); } /// @notice The ForwarderRegistry supports every EIP-2771 compliant forwarder. function isTrustedForwarder(address) external pure override returns (bool) { return true; } /// @notice Forward the meta tx (assuming caller has been approved by the signer as forwarder). /// @param target destination of the call (that will receive the meta transaction). /// @param data the content of the call (the signer address will be appended to it). function forward(address target, bytes calldata data) external payable { address signer = _lastAppendedDataAsSender(); require(_forwarders[signer][msg.sender].approved, "NOT_AUTHORIZED_FORWARDER"); target.functionCallWithValue(abi.encodePacked(data, signer), msg.value); } /// @notice return the current nonce for the signer/forwarder pair. function getNonce(address signer, address forwarder) external view returns (uint256) { return uint256(_forwarders[signer][forwarder].nonce); } /// @notice return whether a forwarder is approved by a particular signer. /// @param signer signer who authorized or not the forwarder. /// @param forwarder meta transaction forwarder contract address. function isForwarderFor(address signer, address forwarder) external view returns (bool) { return forwarder == address(this) || _forwarders[signer][forwarder].approved; } /// @notice approve forwarder using the forwarder (which is msg.sender). /// @param approved whether to approve or disapprove (if previously approved) the forwarder. /// @param signature signature by signer for approving forwarder. function approveForwarder( bool approved, bytes calldata signature, SignatureType signatureType ) external { _approveForwarder(_lastAppendedDataAsSender(), approved, signature, signatureType); } /// @notice approve and forward the meta transaction in one call. /// @param signature signature by signer for approving forwarder. /// @param target destination of the call (that will receive the meta transaction). /// @param data the content of the call (the signer address will be appended to it). function approveAndForward( bytes calldata signature, SignatureType signatureType, address target, bytes calldata data ) external payable { address signer = _lastAppendedDataAsSender(); _approveForwarder(signer, true, signature, signatureType); target.functionCallWithValue(abi.encodePacked(data, signer), msg.value); } /// @notice check approval (but do not record it) and forward the meta transaction in one call. /// @param signature signature by signer for approving forwarder. /// @param target destination of the call (that will receive the meta transaction). /// @param data the content of the call (the signer address will be appended to it). function checkApprovalAndForward( bytes calldata signature, SignatureType signatureType, address target, bytes calldata data ) external payable { address signer = _lastAppendedDataAsSender(); address forwarder = msg.sender; _requireValidSignature( signer, forwarder, true, uint256(_forwarders[signer][forwarder].nonce), signature, signatureType ); target.functionCallWithValue(abi.encodePacked(data, signer), msg.value); } /// @dev Return the DOMAIN_SEPARATOR. function DOMAIN_SEPARATOR() external view returns (bytes32) { return _DOMAIN_SEPARATOR(); } // -------------------------------------------------------- INTERNAL -------------------------------------------------------------------- /// @dev Return the DOMAIN_SEPARATOR. function _DOMAIN_SEPARATOR() internal view returns (bytes32) { uint256 chainId; //solhint-disable-next-line no-inline-assembly assembly { chainId := chainid() } // in case a fork happen, to support the chain that had to change its chainId,, we compue the domain operator return chainId == _deploymentChainId ? _deploymentDomainSeparator : _calculateDomainSeparator(chainId); } /// @dev Calculate the DOMAIN_SEPARATOR. function _calculateDomainSeparator(uint256 chainId) private view returns (bytes32) { return keccak256( abi.encode( keccak256("EIP712Domain(string name,uint256 chainId,address verifyingContract)"), EIP712DOMAIN_NAME, chainId, address(this) ) ); } function _encodeMessage( address forwarder, bool approved, uint256 nonce ) internal view returns (bytes memory) { return abi.encodePacked( "\x19\x01", _DOMAIN_SEPARATOR(), keccak256(abi.encode(APPROVAL_TYPEHASH, forwarder, approved, nonce)) ); } function _requireValidSignature( address signer, address forwarder, bool approved, uint256 nonce, bytes memory signature, SignatureType signatureType ) internal view { bytes memory dataToHash = _encodeMessage(forwarder, approved, nonce); if (signatureType == SignatureType.EIP1271) { require( ERC1271(signer).isValidSignature(dataToHash, signature) == ERC1271_MAGICVALUE, "SIGNATURE_1271_INVALID" ); } else if (signatureType == SignatureType.EIP1654) { require( ERC1654(signer).isValidSignature(keccak256(dataToHash), signature) == ERC1654_MAGICVALUE, "SIGNATURE_1654_INVALID" ); } else { address actualSigner = keccak256(dataToHash).recover(signature); require(signer == actualSigner, "SIGNATURE_WRONG_SIGNER"); } } function _approveForwarder( address signer, bool approved, bytes memory signature, SignatureType signatureType ) internal { address forwarder = msg.sender; Forwarder storage forwarderData = _forwarders[signer][forwarder]; uint256 nonce = uint256(forwarderData.nonce); _requireValidSignature(signer, forwarder, approved, nonce, signature, signatureType); forwarderData.approved = approved; forwarderData.nonce = uint248(nonce + 1); emit ForwarderApproved(signer, forwarder, approved, nonce); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.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. * * 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: invalid signature length"); } // 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))) } return recover(hash, v, r, s); } /** * @dev Overload of {ECDSA-recover-bytes32-bytes-} that receives the `v`, * `r` and `s` signature fields separately. */ function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) { // 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. require(uint256(s) <= 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0, "ECDSA: invalid signature 's' value"); require(v == 27 || v == 28, "ECDSA: invalid signature 'v' value"); // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); require(signer != address(0), "ECDSA: invalid signature"); return signer; } /** * @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)); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.2 <0.8.0; /** * @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) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; // solhint-disable-next-line no-inline-assembly assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain`call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: value }(data); return _verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.staticcall(data); return _verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.delegatecall(data); return _verifyCallResult(success, returndata, errorMessage); } function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.7.0; interface IERC2771 { function isTrustedForwarder(address forwarder) external view returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity ^0.7.0; abstract contract UsingAppendedCallData { function _lastAppendedDataAsSender() internal pure virtual returns (address payable sender) { // Copied from openzeppelin : https://github.com/OpenZeppelin/openzeppelin-contracts/blob/9d5f77db9da0604ce0b25148898a94ae2c20d70f/contracts/metatx/ERC2771Context.sol1 // The assembly code is more direct than the Solidity version using `abi.decode`. // solhint-disable-next-line no-inline-assembly assembly { sender := shr(96, calldataload(sub(calldatasize(), 20))) } } function _msgDataAssuming20BytesAppendedData() internal pure virtual returns (bytes calldata) { return msg.data[:msg.data.length - 20]; } }
{ "evmVersion": "istanbul", "libraries": {}, "metadata": { "bytecodeHash": "ipfs", "useLiteralContent": true }, "optimizer": { "enabled": false, "runs": 200 }, "remappings": [], "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"signer","type":"address"},{"indexed":true,"internalType":"address","name":"forwarder","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"},{"indexed":false,"internalType":"uint256","name":"nonce","type":"uint256"}],"name":"ForwarderApproved","type":"event"},{"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"signature","type":"bytes"},{"internalType":"enum ForwarderRegistry.SignatureType","name":"signatureType","type":"uint8"},{"internalType":"address","name":"target","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"approveAndForward","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bool","name":"approved","type":"bool"},{"internalType":"bytes","name":"signature","type":"bytes"},{"internalType":"enum ForwarderRegistry.SignatureType","name":"signatureType","type":"uint8"}],"name":"approveForwarder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"signature","type":"bytes"},{"internalType":"enum ForwarderRegistry.SignatureType","name":"signatureType","type":"uint8"},{"internalType":"address","name":"target","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"checkApprovalAndForward","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"target","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"forward","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"signer","type":"address"},{"internalType":"address","name":"forwarder","type":"address"}],"name":"getNonce","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"signer","type":"address"},{"internalType":"address","name":"forwarder","type":"address"}],"name":"isForwarderFor","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isTrustedForwarder","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"}]
Contract Creation Code
60c060405234801561001057600080fd5b506000469050806080818152505061002d8161003a60201b60201c565b60a08181525050506100d8565b60007f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a8667f06a520fda4ca688235391b02e357c6a65eb2a3bb40a69c0199f3f7f9cccee0418330604051602001808581526020018481526020018381526020018273ffffffffffffffffffffffffffffffffffffffff168152602001945050505050604051602081830303815290604052805190602001209050919050565b60805160a051611a4c6100fb600039806112b452508061127f5250611a4c6000f3fe60806040526004361061007b5760003560e01c80636fadcf721161004e5780636fadcf72146102ac578063d828435d14610345578063e55ae5e2146103ca578063e60125d6146104c55761007b565b80631d095a691461008057806335297d1b1461011f5780633644e5151461021a578063572b6c0514610245575b600080fd5b34801561008c57600080fd5b5061011d600480360360608110156100a357600080fd5b81019080803515159060200190929190803590602001906401000000008111156100cc57600080fd5b8201836020820111156100de57600080fd5b8035906020019184600183028401116401000000008311171561010057600080fd5b9091929391929390803560ff16906020019092919050505061054c565b005b6102186004803603608081101561013557600080fd5b810190808035906020019064010000000081111561015257600080fd5b82018360208201111561016457600080fd5b8035906020019184600183028401116401000000008311171561018657600080fd5b9091929391929390803560ff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001906401000000008111156101d457600080fd5b8201836020820111156101e657600080fd5b8035906020019184600183028401116401000000008311171561020857600080fd5b90919293919293905050506105a9565b005b34801561022657600080fd5b5061022f610756565b6040518082815260200191505060405180910390f35b34801561025157600080fd5b506102946004803603602081101561026857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610765565b60405180821515815260200191505060405180910390f35b610343600480360360408110156102c257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001906401000000008111156102ff57600080fd5b82018360208201111561031157600080fd5b8035906020019184600183028401116401000000008311171561033357600080fd5b9091929391929390505050610770565b005b34801561035157600080fd5b506103b46004803603604081101561036857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506108f5565b6040518082815260200191505060405180910390f35b6104c3600480360360808110156103e057600080fd5b81019080803590602001906401000000008111156103fd57600080fd5b82018360208201111561040f57600080fd5b8035906020019184600183028401116401000000008311171561043157600080fd5b9091929391929390803560ff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019064010000000081111561047f57600080fd5b82018360208201111561049157600080fd5b803590602001918460018302840111640100000000831117156104b357600080fd5b90919293919293905050506109ca565b005b3480156104d157600080fd5b50610534600480360360408110156104e857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610aa5565b60405180821515815260200191505060405180910390f35b6105a3610557610b71565b8585858080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505084610b80565b50505050565b60006105b3610b71565b905060003390506106d7828260016000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a90047effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff168c8c8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508b610d57565b61074b84848460405160200180848480828437808301925050508273ffffffffffffffffffffffffffffffffffffffff1660601b81526014019350505050604051602081830303815290604052348773ffffffffffffffffffffffffffffffffffffffff166112489092919063ffffffff16565b505050505050505050565b6000610760611277565b905090565b600060019050919050565b600061077a610b71565b90506000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001601f9054906101000a900460ff1661087a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f4e4f545f415554484f52495a45445f464f52574152444552000000000000000081525060200191505060405180910390fd5b6108ee83838360405160200180848480828437808301925050508273ffffffffffffffffffffffffffffffffffffffff1660601b81526014019350505050604051602081830303815290604052348673ffffffffffffffffffffffffffffffffffffffff166112489092919063ffffffff16565b5050505050565b60008060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a90047effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff16905092915050565b60006109d4610b71565b9050610a2781600189898080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505088610b80565b610a9b83838360405160200180848480828437808301925050508273ffffffffffffffffffffffffffffffffffffffff1660601b81526014019350505050604051602081830303815290604052348673ffffffffffffffffffffffffffffffffffffffff166112489092919063ffffffff16565b5050505050505050565b60003073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161480610b6957506000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001601f9054906101000a900460ff165b905092915050565b6000601436033560601c905090565b600033905060008060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905060008160000160009054906101000a90047effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff169050610c67878488848989610d57565b8582600001601f6101000a81548160ff021916908315150217905550600181018260000160006101000a8154817effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff02191690837effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1602179055508273ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167f26eeb9a45fc0ed1a714977219563a1ae73a8da96bc19e08479dab98729dec65a88846040518083151581526020018281526020019250505060405180910390a350505050505050565b6000610d648686866112da565b9050600280811115610d7257fe5b826002811115610d7e57fe5b1415610fa0576320c13b0b60e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168773ffffffffffffffffffffffffffffffffffffffff166320c13b0b83866040518363ffffffff1660e01b8152600401808060200180602001838103835285818151815260200191508051906020019080838360005b83811015610e1c578082015181840152602081019050610e01565b50505050905090810190601f168015610e495780820380516001836020036101000a031916815260200191505b50838103825284818151815260200191508051906020019080838360005b83811015610e82578082015181840152602081019050610e67565b50505050905090810190601f168015610eaf5780820380516001836020036101000a031916815260200191505b5094505050505060206040518083038186803b158015610ece57600080fd5b505afa158015610ee2573d6000803e3d6000fd5b505050506040513d6020811015610ef857600080fd5b81019080805190602001909291905050507bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614610f9b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f5349474e41545552455f313237315f494e56414c49440000000000000000000081525060200191505060405180910390fd5b61123f565b60016002811115610fad57fe5b826002811115610fb957fe5b141561117d57631626ba7e60e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168773ffffffffffffffffffffffffffffffffffffffff16631626ba7e8380519060200120866040518363ffffffff1660e01b81526004018083815260200180602001828103825283818151815260200191508051906020019080838360005b83811015611060578082015181840152602081019050611045565b50505050905090810190601f16801561108d5780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b1580156110ab57600080fd5b505afa1580156110bf573d6000803e3d6000fd5b505050506040513d60208110156110d557600080fd5b81019080805190602001909291905050507bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614611178576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f5349474e41545552455f313635345f494e56414c49440000000000000000000081525060200191505060405180910390fd5b61123e565b60006111998483805190602001206113b290919063ffffffff16565b90508073ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff161461123c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f5349474e41545552455f57524f4e475f5349474e45520000000000000000000081525060200191505060405180910390fd5b505b5b50505050505050565b606061126e8484846040518060600160405280602981526020016119ee6029913961145f565b90509392505050565b6000804690507f000000000000000000000000000000000000000000000000000000000000000081146112b2576112ad81611607565b6112d4565b7f00000000000000000000000000000000000000000000000000000000000000005b91505090565b60606112e4611277565b7f9a9934e308f412c61ed88f4935ffd5a85e07384c7daec62cf23534d1ccc6a814858585604051602001808581526020018473ffffffffffffffffffffffffffffffffffffffff16815260200183151581526020018281526020019450505050506040516020818303038152906040528051906020012060405160200180807f19010000000000000000000000000000000000000000000000000000000000008152506002018381526020018281526020019250505060405160208183030381529060405290509392505050565b6000604182511461142b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f45434453413a20696e76616c6964207369676e6174757265206c656e6774680081525060200191505060405180910390fd5b60008060006020850151925060408501519150606085015160001a9050611454868285856116a5565b935050505092915050565b6060824710156114ba576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806119a66026913960400191505060405180910390fd5b6114c3856118a4565b611535576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000081525060200191505060405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040518082805190602001908083835b602083106115845780518252602082019150602081019050602083039250611561565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146115e6576040519150601f19603f3d011682016040523d82523d6000602084013e6115eb565b606091505b50915091506115fb8282866118b7565b92505050949350505050565b60007f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a8667f06a520fda4ca688235391b02e357c6a65eb2a3bb40a69c0199f3f7f9cccee0418330604051602001808581526020018481526020018381526020018273ffffffffffffffffffffffffffffffffffffffff168152602001945050505050604051602081830303815290604052805190602001209050919050565b60007f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08260001c1115611723576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806119846022913960400191505060405180910390fd5b601b8460ff1614806117385750601c8460ff16145b61178d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806119cc6022913960400191505060405180910390fd5b600060018686868660405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa1580156117e9573d6000803e3d6000fd5b505050602060405103519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611898576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f45434453413a20696e76616c6964207369676e6174757265000000000000000081525060200191505060405180910390fd5b80915050949350505050565b600080823b905060008111915050919050565b606083156118c75782905061197c565b6000835111156118da5782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611941578082015181840152602081019050611926565b50505050905090810190601f16801561196e5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b939250505056fe45434453413a20696e76616c6964207369676e6174757265202773272076616c7565416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c45434453413a20696e76616c6964207369676e6174757265202776272076616c7565416464726573733a206c6f772d6c6576656c2063616c6c20776974682076616c7565206661696c6564a264697066735822122045691c2077f28e5c2af218a605e6b87fdbdbe86a63d846b02280b1cd467fba3364736f6c63430007060033
Deployed Bytecode
0x60806040526004361061007b5760003560e01c80636fadcf721161004e5780636fadcf72146102ac578063d828435d14610345578063e55ae5e2146103ca578063e60125d6146104c55761007b565b80631d095a691461008057806335297d1b1461011f5780633644e5151461021a578063572b6c0514610245575b600080fd5b34801561008c57600080fd5b5061011d600480360360608110156100a357600080fd5b81019080803515159060200190929190803590602001906401000000008111156100cc57600080fd5b8201836020820111156100de57600080fd5b8035906020019184600183028401116401000000008311171561010057600080fd5b9091929391929390803560ff16906020019092919050505061054c565b005b6102186004803603608081101561013557600080fd5b810190808035906020019064010000000081111561015257600080fd5b82018360208201111561016457600080fd5b8035906020019184600183028401116401000000008311171561018657600080fd5b9091929391929390803560ff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001906401000000008111156101d457600080fd5b8201836020820111156101e657600080fd5b8035906020019184600183028401116401000000008311171561020857600080fd5b90919293919293905050506105a9565b005b34801561022657600080fd5b5061022f610756565b6040518082815260200191505060405180910390f35b34801561025157600080fd5b506102946004803603602081101561026857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610765565b60405180821515815260200191505060405180910390f35b610343600480360360408110156102c257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001906401000000008111156102ff57600080fd5b82018360208201111561031157600080fd5b8035906020019184600183028401116401000000008311171561033357600080fd5b9091929391929390505050610770565b005b34801561035157600080fd5b506103b46004803603604081101561036857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506108f5565b6040518082815260200191505060405180910390f35b6104c3600480360360808110156103e057600080fd5b81019080803590602001906401000000008111156103fd57600080fd5b82018360208201111561040f57600080fd5b8035906020019184600183028401116401000000008311171561043157600080fd5b9091929391929390803560ff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019064010000000081111561047f57600080fd5b82018360208201111561049157600080fd5b803590602001918460018302840111640100000000831117156104b357600080fd5b90919293919293905050506109ca565b005b3480156104d157600080fd5b50610534600480360360408110156104e857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610aa5565b60405180821515815260200191505060405180910390f35b6105a3610557610b71565b8585858080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505084610b80565b50505050565b60006105b3610b71565b905060003390506106d7828260016000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a90047effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff168c8c8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508b610d57565b61074b84848460405160200180848480828437808301925050508273ffffffffffffffffffffffffffffffffffffffff1660601b81526014019350505050604051602081830303815290604052348773ffffffffffffffffffffffffffffffffffffffff166112489092919063ffffffff16565b505050505050505050565b6000610760611277565b905090565b600060019050919050565b600061077a610b71565b90506000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001601f9054906101000a900460ff1661087a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f4e4f545f415554484f52495a45445f464f52574152444552000000000000000081525060200191505060405180910390fd5b6108ee83838360405160200180848480828437808301925050508273ffffffffffffffffffffffffffffffffffffffff1660601b81526014019350505050604051602081830303815290604052348673ffffffffffffffffffffffffffffffffffffffff166112489092919063ffffffff16565b5050505050565b60008060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a90047effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff16905092915050565b60006109d4610b71565b9050610a2781600189898080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505088610b80565b610a9b83838360405160200180848480828437808301925050508273ffffffffffffffffffffffffffffffffffffffff1660601b81526014019350505050604051602081830303815290604052348673ffffffffffffffffffffffffffffffffffffffff166112489092919063ffffffff16565b5050505050505050565b60003073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161480610b6957506000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001601f9054906101000a900460ff165b905092915050565b6000601436033560601c905090565b600033905060008060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905060008160000160009054906101000a90047effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff169050610c67878488848989610d57565b8582600001601f6101000a81548160ff021916908315150217905550600181018260000160006101000a8154817effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff02191690837effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1602179055508273ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167f26eeb9a45fc0ed1a714977219563a1ae73a8da96bc19e08479dab98729dec65a88846040518083151581526020018281526020019250505060405180910390a350505050505050565b6000610d648686866112da565b9050600280811115610d7257fe5b826002811115610d7e57fe5b1415610fa0576320c13b0b60e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168773ffffffffffffffffffffffffffffffffffffffff166320c13b0b83866040518363ffffffff1660e01b8152600401808060200180602001838103835285818151815260200191508051906020019080838360005b83811015610e1c578082015181840152602081019050610e01565b50505050905090810190601f168015610e495780820380516001836020036101000a031916815260200191505b50838103825284818151815260200191508051906020019080838360005b83811015610e82578082015181840152602081019050610e67565b50505050905090810190601f168015610eaf5780820380516001836020036101000a031916815260200191505b5094505050505060206040518083038186803b158015610ece57600080fd5b505afa158015610ee2573d6000803e3d6000fd5b505050506040513d6020811015610ef857600080fd5b81019080805190602001909291905050507bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614610f9b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f5349474e41545552455f313237315f494e56414c49440000000000000000000081525060200191505060405180910390fd5b61123f565b60016002811115610fad57fe5b826002811115610fb957fe5b141561117d57631626ba7e60e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168773ffffffffffffffffffffffffffffffffffffffff16631626ba7e8380519060200120866040518363ffffffff1660e01b81526004018083815260200180602001828103825283818151815260200191508051906020019080838360005b83811015611060578082015181840152602081019050611045565b50505050905090810190601f16801561108d5780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b1580156110ab57600080fd5b505afa1580156110bf573d6000803e3d6000fd5b505050506040513d60208110156110d557600080fd5b81019080805190602001909291905050507bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614611178576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f5349474e41545552455f313635345f494e56414c49440000000000000000000081525060200191505060405180910390fd5b61123e565b60006111998483805190602001206113b290919063ffffffff16565b90508073ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff161461123c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f5349474e41545552455f57524f4e475f5349474e45520000000000000000000081525060200191505060405180910390fd5b505b5b50505050505050565b606061126e8484846040518060600160405280602981526020016119ee6029913961145f565b90509392505050565b6000804690507f000000000000000000000000000000000000000000000000000000000000008981146112b2576112ad81611607565b6112d4565b7fc9f0bc8718b2d6b5315d23184702f19239f496b4163614396793b4bd014e71085b91505090565b60606112e4611277565b7f9a9934e308f412c61ed88f4935ffd5a85e07384c7daec62cf23534d1ccc6a814858585604051602001808581526020018473ffffffffffffffffffffffffffffffffffffffff16815260200183151581526020018281526020019450505050506040516020818303038152906040528051906020012060405160200180807f19010000000000000000000000000000000000000000000000000000000000008152506002018381526020018281526020019250505060405160208183030381529060405290509392505050565b6000604182511461142b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f45434453413a20696e76616c6964207369676e6174757265206c656e6774680081525060200191505060405180910390fd5b60008060006020850151925060408501519150606085015160001a9050611454868285856116a5565b935050505092915050565b6060824710156114ba576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806119a66026913960400191505060405180910390fd5b6114c3856118a4565b611535576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000081525060200191505060405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040518082805190602001908083835b602083106115845780518252602082019150602081019050602083039250611561565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146115e6576040519150601f19603f3d011682016040523d82523d6000602084013e6115eb565b606091505b50915091506115fb8282866118b7565b92505050949350505050565b60007f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a8667f06a520fda4ca688235391b02e357c6a65eb2a3bb40a69c0199f3f7f9cccee0418330604051602001808581526020018481526020018381526020018273ffffffffffffffffffffffffffffffffffffffff168152602001945050505050604051602081830303815290604052805190602001209050919050565b60007f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08260001c1115611723576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806119846022913960400191505060405180910390fd5b601b8460ff1614806117385750601c8460ff16145b61178d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806119cc6022913960400191505060405180910390fd5b600060018686868660405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa1580156117e9573d6000803e3d6000fd5b505050602060405103519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611898576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f45434453413a20696e76616c6964207369676e6174757265000000000000000081525060200191505060405180910390fd5b80915050949350505050565b600080823b905060008111915050919050565b606083156118c75782905061197c565b6000835111156118da5782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611941578082015181840152602081019050611926565b50505050905090810190601f16801561196e5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b939250505056fe45434453413a20696e76616c6964207369676e6174757265202773272076616c7565416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c45434453413a20696e76616c6964207369676e6174757265202776272076616c7565416464726573733a206c6f772d6c6576656c2063616c6c20776974682076616c7565206661696c6564a264697066735822122045691c2077f28e5c2af218a605e6b87fdbdbe86a63d846b02280b1cd467fba3364736f6c63430007060033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
[ 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.