More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 9,299 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Execute | 38443773 | 7 days ago | IN | 0 xDAI | 0.00258242 | ||||
Execute | 38299363 | 16 days ago | IN | 0 xDAI | 0.00087256 | ||||
Execute | 38299361 | 16 days ago | IN | 0 xDAI | 0.00011838 | ||||
Execute | 38299340 | 16 days ago | IN | 0 xDAI | 0.00122718 | ||||
Execute | 38290264 | 16 days ago | IN | 0 xDAI | 0.00261135 | ||||
Execute | 38269109 | 18 days ago | IN | 0 xDAI | 0.0012314 | ||||
Execute | 38260223 | 18 days ago | IN | 0 xDAI | 0.0026113 | ||||
Execute | 38259224 | 18 days ago | IN | 0 xDAI | 0.00263312 | ||||
Execute | 38257695 | 18 days ago | IN | 0 xDAI | 0.0025857 | ||||
Execute | 38217219 | 21 days ago | IN | 0 xDAI | 0.00261467 | ||||
Execute | 38192489 | 22 days ago | IN | 0 xDAI | 0.00258897 | ||||
Execute | 38184848 | 23 days ago | IN | 0 xDAI | 0.00266923 | ||||
Execute | 38179999 | 23 days ago | IN | 0 xDAI | 0.00258569 | ||||
Execute | 38174178 | 23 days ago | IN | 0 xDAI | 0.00309403 | ||||
Execute | 38174156 | 23 days ago | IN | 0 xDAI | 0.00301543 | ||||
Execute | 38174153 | 23 days ago | IN | 0 xDAI | 0.00306638 | ||||
Execute | 38173946 | 23 days ago | IN | 0 xDAI | 0.00287336 | ||||
Execute | 38172932 | 23 days ago | IN | 0 xDAI | 0.00261465 | ||||
Execute | 38161005 | 24 days ago | IN | 0 xDAI | 0.00258902 | ||||
Execute | 38156507 | 24 days ago | IN | 0 xDAI | 0.00302762 | ||||
Execute | 38150424 | 25 days ago | IN | 0 xDAI | 0.0012314 | ||||
Execute | 38134274 | 26 days ago | IN | 0 xDAI | 0.00087245 | ||||
Execute | 38134272 | 26 days ago | IN | 0 xDAI | 0.00011842 | ||||
Execute | 38118167 | 27 days ago | IN | 0 xDAI | 0.00300496 | ||||
Execute | 38117740 | 27 days ago | IN | 0 xDAI | 0.00332695 |
View more zero value Internal Transactions in Advanced View mode
Loading...
Loading
Contract Name:
GrappaForwarder
Compiler Version
v0.8.12+commit.f00d7308
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import '@opengsn/contracts/src/forwarder/Forwarder.sol'; contract GrappaForwarder is Forwarder {}
// solhint-disable not-rely-on-time // SPDX-License-Identifier: GPL-3.0-only pragma solidity ^0.8.0; pragma abicoder v2; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/utils/introspection/ERC165.sol"; // #if ENABLE_CONSOLE_LOG // #endif import "./IForwarder.sol"; /** * @title The Forwarder Implementation * @notice This implementation of the `IForwarder` interface uses ERC-712 signatures and stored nonces for verification. */ contract Forwarder is IForwarder, ERC165 { using ECDSA for bytes32; address private constant DRY_RUN_ADDRESS = 0x0000000000000000000000000000000000000000; string public constant GENERIC_PARAMS = "address from,address to,uint256 value,uint256 gas,uint256 nonce,bytes data,uint256 validUntilTime"; string public constant EIP712_DOMAIN_TYPE = "EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"; mapping(bytes32 => bool) public typeHashes; mapping(bytes32 => bool) public domains; // Nonces of senders, used to prevent replay attacks mapping(address => uint256) private nonces; // solhint-disable-next-line no-empty-blocks receive() external payable {} /// @inheritdoc IForwarder function getNonce(address from) public view override returns (uint256) { return nonces[from]; } constructor() { string memory requestType = string(abi.encodePacked("ForwardRequest(", GENERIC_PARAMS, ")")); registerRequestTypeInternal(requestType); } /// @inheritdoc IERC165 function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC165) returns (bool) { return interfaceId == type(IForwarder).interfaceId || super.supportsInterface(interfaceId); } /// @inheritdoc IForwarder function verify( ForwardRequest calldata req, bytes32 domainSeparator, bytes32 requestTypeHash, bytes calldata suffixData, bytes calldata sig) external override view { _verifyNonce(req); _verifySig(req, domainSeparator, requestTypeHash, suffixData, sig); } /// @inheritdoc IForwarder function execute( ForwardRequest calldata req, bytes32 domainSeparator, bytes32 requestTypeHash, bytes calldata suffixData, bytes calldata sig ) external payable override returns (bool success, bytes memory ret) { _verifySig(req, domainSeparator, requestTypeHash, suffixData, sig); _verifyAndUpdateNonce(req); require(req.validUntilTime == 0 || req.validUntilTime > block.timestamp, "FWD: request expired"); uint256 gasForTransfer = 0; if ( req.value != 0 ) { gasForTransfer = 40000; //buffer in case we need to move eth after the transaction. } bytes memory callData = abi.encodePacked(req.data, req.from); require(gasleft()*63/64 >= req.gas + gasForTransfer, "FWD: insufficient gas"); // solhint-disable-next-line avoid-low-level-calls (success,ret) = req.to.call{gas : req.gas, value : req.value}(callData); // #if ENABLE_CONSOLE_LOG // #endif if ( req.value != 0 && address(this).balance>0 ) { // can't fail: req.from signed (off-chain) the request, so it must be an EOA... payable(req.from).transfer(address(this).balance); } return (success,ret); } function _verifyNonce(ForwardRequest calldata req) internal view { require(nonces[req.from] == req.nonce, "FWD: nonce mismatch"); } function _verifyAndUpdateNonce(ForwardRequest calldata req) internal { require(nonces[req.from]++ == req.nonce, "FWD: nonce mismatch"); } /// @inheritdoc IForwarder function registerRequestType(string calldata typeName, string calldata typeSuffix) external override { for (uint256 i = 0; i < bytes(typeName).length; i++) { bytes1 c = bytes(typeName)[i]; require(c != "(" && c != ")", "FWD: invalid typename"); } string memory requestType = string(abi.encodePacked(typeName, "(", GENERIC_PARAMS, ",", typeSuffix)); registerRequestTypeInternal(requestType); } /// @inheritdoc IForwarder function registerDomainSeparator(string calldata name, string calldata version) external override { uint256 chainId; /* solhint-disable-next-line no-inline-assembly */ assembly { chainId := chainid() } bytes memory domainValue = abi.encode( keccak256(bytes(EIP712_DOMAIN_TYPE)), keccak256(bytes(name)), keccak256(bytes(version)), chainId, address(this)); bytes32 domainHash = keccak256(domainValue); domains[domainHash] = true; emit DomainRegistered(domainHash, domainValue); } function registerRequestTypeInternal(string memory requestType) internal { bytes32 requestTypehash = keccak256(bytes(requestType)); typeHashes[requestTypehash] = true; emit RequestTypeRegistered(requestTypehash, requestType); } function _verifySig( ForwardRequest calldata req, bytes32 domainSeparator, bytes32 requestTypeHash, bytes calldata suffixData, bytes calldata sig) internal virtual view { require(domains[domainSeparator], "FWD: unregistered domain sep."); require(typeHashes[requestTypeHash], "FWD: unregistered typehash"); bytes32 digest = keccak256(abi.encodePacked( "\x19\x01", domainSeparator, keccak256(_getEncoded(req, requestTypeHash, suffixData)) )); // solhint-disable-next-line avoid-tx-origin require(tx.origin == DRY_RUN_ADDRESS || digest.recover(sig) == req.from, "FWD: signature mismatch"); } /** * @notice Creates a byte array that is a valid ABI encoding of a request of a `RequestType` type. See `execute()`. */ function _getEncoded( ForwardRequest calldata req, bytes32 requestTypeHash, bytes calldata suffixData ) public pure returns ( bytes memory ) { // we use encodePacked since we append suffixData as-is, not as dynamic param. // still, we must make sure all first params are encoded as abi.encode() // would encode them - as 256-bit-wide params. return abi.encodePacked( requestTypeHash, uint256(uint160(req.from)), uint256(uint160(req.to)), req.value, req.gas, req.nonce, keccak256(req.data), req.validUntilTime, suffixData ); } }
// SPDX-License-Identifier: GPL-3.0-only pragma solidity >=0.7.6; pragma abicoder v2; import "@openzeppelin/contracts/interfaces/IERC165.sol"; /** * @title The Forwarder Interface * @notice The contracts implementing this interface take a role of authorization, authentication and replay protection * for contracts that choose to trust a `Forwarder`, instead of relying on a mechanism built into the Ethereum protocol. * * @notice if the `Forwarder` contract decides that an incoming `ForwardRequest` is valid, it must append 20 bytes that * represent the caller to the `data` field of the request and send this new data to the target address (the `to` field) * * :warning: **Warning** :warning: The Forwarder can have a full control over a `Recipient` contract. * Any vulnerability in a `Forwarder` implementation can make all of its `Recipient` contracts susceptible! * Recipient contracts should only trust forwarders that passed through security audit, * otherwise they are susceptible to identity theft. */ interface IForwarder is IERC165 { /** * @notice A representation of a request for a `Forwarder` to send `data` on behalf of a `from` to a target (`to`). */ struct ForwardRequest { address from; address to; uint256 value; uint256 gas; uint256 nonce; bytes data; uint256 validUntilTime; } event DomainRegistered(bytes32 indexed domainSeparator, bytes domainValue); event RequestTypeRegistered(bytes32 indexed typeHash, string typeStr); /** * @param from The address of a sender. * @return The nonce for this address. */ function getNonce(address from) external view returns(uint256); /** * @notice Verify the transaction is valid and can be executed. * Implementations must validate the signature and the nonce of the request are correct. * Does not revert and returns successfully if the input is valid. * Reverts if any validation has failed. For instance, if either signature or nonce are incorrect. * Reverts if `domainSeparator` or `requestTypeHash` are not registered as well. */ function verify( ForwardRequest calldata forwardRequest, bytes32 domainSeparator, bytes32 requestTypeHash, bytes calldata suffixData, bytes calldata signature ) external view; /** * @notice Executes a transaction specified by the `ForwardRequest`. * The transaction is first verified and then executed. * The success flag and returned bytes array of the `CALL` are returned as-is. * * This method would revert only in case of a verification error. * * All the target errors are reported using the returned success flag and returned bytes array. * * @param forwardRequest All requested transaction parameters. * @param domainSeparator The domain used when signing this request. * @param requestTypeHash The request type used when signing this request. * @param suffixData The ABI-encoded extension data for the current `RequestType` used when signing this request. * @param signature The client signature to be validated. * * @return success The success flag of the underlying `CALL` to the target address. * @return ret The byte array returned by the underlying `CALL` to the target address. */ function execute( ForwardRequest calldata forwardRequest, bytes32 domainSeparator, bytes32 requestTypeHash, bytes calldata suffixData, bytes calldata signature ) external payable returns (bool success, bytes memory ret); /** * @notice Register a new Request typehash. * * @notice This is necessary for the Forwarder to be able to verify the signatures conforming to the ERC-712. * * @param typeName The name of the request type. * @param typeSuffix Any extra data after the generic params. Must contain add at least one param. * The generic ForwardRequest type is always registered by the constructor. */ function registerRequestType(string calldata typeName, string calldata typeSuffix) external; /** * @notice Register a new domain separator. * * @notice This is necessary for the Forwarder to be able to verify the signatures conforming to the ERC-712. * * @notice The domain separator must have the following fields: `name`, `version`, `chainId`, `verifyingContract`. * The `chainId` is the current network's `chainId`, and the `verifyingContract` is this Forwarder's address. * This method accepts the domain name and version to create and register the domain separator value. * @param name The domain's display name. * @param version The domain/protocol version. */ function registerDomainSeparator(string calldata name, string calldata version) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (interfaces/IERC165.sol) pragma solidity ^0.8.0; import "../utils/introspection/IERC165.sol";
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/ECDSA.sol) pragma solidity ^0.8.0; import "../Strings.sol"; /** * @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 { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS, InvalidSignatureV // Deprecated in v4.8 } function _throwError(RecoverError error) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert("ECDSA: invalid signature"); } else if (error == RecoverError.InvalidSignatureLength) { revert("ECDSA: invalid signature length"); } else if (error == RecoverError.InvalidSignatureS) { revert("ECDSA: invalid signature 's' value"); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature` or error string. 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. * * Documentation for signature generation: * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] * * _Available since v4.3._ */ function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) { if (signature.length == 65) { bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. /// @solidity memory-safe-assembly assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } return tryRecover(hash, v, r, s); } else { return (address(0), RecoverError.InvalidSignatureLength); } } /** * @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) { (address recovered, RecoverError error) = tryRecover(hash, signature); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. * * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] * * _Available since v4.3._ */ function tryRecover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address, RecoverError) { bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff); uint8 v = uint8((uint256(vs) >> 255) + 27); return tryRecover(hash, v, r, s); } /** * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. * * _Available since v4.2._ */ function recover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, r, vs); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. * * _Available since v4.3._ */ function tryRecover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address, RecoverError) { // 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 (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): 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) { return (address(0), RecoverError.InvalidSignatureS); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); if (signer == address(0)) { return (address(0), RecoverError.InvalidSignature); } return (signer, RecoverError.NoError); } /** * @dev Overload of {ECDSA-recover} that receives the `v`, * `r` and `s` signature fields separately. */ function recover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, v, r, s); _throwError(error); return recovered; } /** * @dev Returns an Ethereum Signed Message, created from a `hash`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * 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)); } /** * @dev Returns an Ethereum Signed Message, created from `s`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s)); } /** * @dev Returns an Ethereum Signed Typed Data, created from a * `domainSeparator` and a `structHash`. This produces hash corresponding * to the one signed with the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] * JSON-RPC method as part of EIP-712. * * See {recover}. */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { enum Rounding { Down, // Toward negative infinity Up, // Toward infinity Zero // Toward zero } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) * with further edits by Uniswap Labs also under MIT license. */ function mulDiv( uint256 x, uint256 y, uint256 denominator ) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. require(denominator > prod1); /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1. // See https://cs.stackexchange.com/q/138556/92363. // Does not overflow because the denominator cannot be zero at this stage in the function. uint256 twos = denominator & (~denominator + 1); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works // in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv( uint256 x, uint256 y, uint256 denominator, Rounding rounding ) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (rounding == Rounding.Up && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2, rounded down, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10, rounded down, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10**64) { value /= 10**64; result += 64; } if (value >= 10**32) { value /= 10**32; result += 32; } if (value >= 10**16) { value /= 10**16; result += 16; } if (value >= 10**8) { value /= 10**8; result += 8; } if (value >= 10**4) { value /= 10**4; result += 4; } if (value >= 10**2) { value /= 10**2; result += 2; } if (value >= 10**1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0); } } /** * @dev Return the log in base 256, rounded down, of a positive value. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol) pragma solidity ^0.8.0; import "./math/Math.sol"; /** * @dev String operations. */ library Strings { bytes16 private constant _SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), _SYMBOLS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"domainSeparator","type":"bytes32"},{"indexed":false,"internalType":"bytes","name":"domainValue","type":"bytes"}],"name":"DomainRegistered","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"typeHash","type":"bytes32"},{"indexed":false,"internalType":"string","name":"typeStr","type":"string"}],"name":"RequestTypeRegistered","type":"event"},{"inputs":[],"name":"EIP712_DOMAIN_TYPE","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"GENERIC_PARAMS","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"gas","type":"uint256"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"uint256","name":"validUntilTime","type":"uint256"}],"internalType":"struct IForwarder.ForwardRequest","name":"req","type":"tuple"},{"internalType":"bytes32","name":"requestTypeHash","type":"bytes32"},{"internalType":"bytes","name":"suffixData","type":"bytes"}],"name":"_getEncoded","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"domains","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"gas","type":"uint256"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"uint256","name":"validUntilTime","type":"uint256"}],"internalType":"struct IForwarder.ForwardRequest","name":"req","type":"tuple"},{"internalType":"bytes32","name":"domainSeparator","type":"bytes32"},{"internalType":"bytes32","name":"requestTypeHash","type":"bytes32"},{"internalType":"bytes","name":"suffixData","type":"bytes"},{"internalType":"bytes","name":"sig","type":"bytes"}],"name":"execute","outputs":[{"internalType":"bool","name":"success","type":"bool"},{"internalType":"bytes","name":"ret","type":"bytes"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"}],"name":"getNonce","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"version","type":"string"}],"name":"registerDomainSeparator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"typeName","type":"string"},{"internalType":"string","name":"typeSuffix","type":"string"}],"name":"registerRequestType","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"typeHashes","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"gas","type":"uint256"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"uint256","name":"validUntilTime","type":"uint256"}],"internalType":"struct IForwarder.ForwardRequest","name":"req","type":"tuple"},{"internalType":"bytes32","name":"domainSeparator","type":"bytes32"},{"internalType":"bytes32","name":"requestTypeHash","type":"bytes32"},{"internalType":"bytes","name":"suffixData","type":"bytes"},{"internalType":"bytes","name":"sig","type":"bytes"}],"name":"verify","outputs":[],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
60806040523480156200001157600080fd5b5060006040518060a00160405280606181526020016200147560619139604051602001620000409190620000fb565b60408051601f1981840301815291905290506200005d8162000064565b5062000174565b8051602080830191909120600081815291829052604091829020805460ff19166001179055905181907f64d6bce64323458c44643c51fe45113efc882082f7b7fd5f09f0d69d2eedb20290620000bc9085906200013f565b60405180910390a25050565b60005b83811015620000e5578181015183820152602001620000cb565b83811115620000f5576000848401525b50505050565b6e08cdee4eec2e4c8a4cae2eacae6e85608b1b8152600082516200012781600f850160208701620000c8565b602960f81b600f939091019283015250601001919050565b602081526000825180602084015262000160816040850160208701620000c8565b601f01601f19169190910160400192915050565b6112f180620001846000396000f3fe6080604052600436106100a05760003560e01c8063ad9f99c711610064578063ad9f99c714610199578063c3f28abd146101b9578063c722f177146101ce578063d9210be5146101fe578063e024dc7f1461021e578063e2b62f2d1461023f57600080fd5b806301ffc9a7146100ac578063066a310c146100e157806321fe98df146101035780632d0335ab146101335780639c7b45921461017757600080fd5b366100a757005b600080fd5b3480156100b857600080fd5b506100cc6100c7366004610d4b565b61025f565b60405190151581526020015b60405180910390f35b3480156100ed57600080fd5b506100f6610296565b6040516100d89190610dd8565b34801561010f57600080fd5b506100cc61011e366004610deb565b60006020819052908152604090205460ff1681565b34801561013f57600080fd5b5061016961014e366004610e04565b6001600160a01b031660009081526002602052604090205490565b6040519081526020016100d8565b34801561018357600080fd5b50610197610192366004610e6f565b6102b2565b005b3480156101a557600080fd5b506101976101b4366004610ef3565b6103a9565b3480156101c557600080fd5b506100f66103ca565b3480156101da57600080fd5b506100cc6101e9366004610deb565b60016020526000908152604090205460ff1681565b34801561020a57600080fd5b50610197610219366004610e6f565b6103e6565b61023161022c366004610ef3565b6104e9565b6040516100d8929190610f9b565b34801561024b57600080fd5b506100f661025a366004610fbe565b610700565b60006001600160e01b031982166309788f9960e21b148061029057506301ffc9a760e01b6001600160e01b03198316145b92915050565b6040518060a00160405280606181526020016112096061913981565b6000469050600060405180608001604052806052815260200161126a605291398051906020012086866040516102e9929190611015565b60405180910390208585604051610301929190611015565b6040805191829003822060208301949094528101919091526060810191909152608081018390523060a082015260c00160408051601f198184030181528282528051602080830191909120600081815260019283905293909320805460ff1916909117905592509081907f4bc68689cbe89a4a6333a3ab0a70093874da3e5bfb71e93102027f3f073687d890610398908590610dd8565b60405180910390a250505050505050565b6103b28761079a565b6103c187878787878787610817565b50505050505050565b60405180608001604052806052815260200161126a6052913981565b60005b8381101561049457600085858381811061040557610405611025565b909101356001600160f81b031916915050600560fb1b81148015906104385750602960f81b6001600160f81b0319821614155b6104815760405162461bcd60e51b81526020600482015260156024820152744657443a20696e76616c696420747970656e616d6560581b60448201526064015b60405180910390fd5b508061048c81611051565b9150506103e9565b50600084846040518060a00160405280606181526020016112096061913985856040516020016104c895949392919061106c565b60405160208183030381529060405290506104e2816109e9565b5050505050565b600060606104fc89898989898989610817565b61050589610a4b565b60c089013515806105195750428960c00135115b61055c5760405162461bcd60e51b81526020600482015260146024820152731195d10e881c995c5d595cdd08195e1c1a5c995960621b6044820152606401610478565b600060408a01351561056d5750619c405b600061057c60a08c018c6110be565b61058960208e018e610e04565b60405160200161059b93929190611105565b60408051601f1981840301815291905290506105bb8260608d013561112b565b60405a6105c990603f611143565b6105d39190611162565b10156106195760405162461bcd60e51b81526020600482015260156024820152744657443a20696e73756666696369656e742067617360581b6044820152606401610478565b61062960408c0160208d01610e04565b6001600160a01b03168b606001358c604001358360405161064a9190611184565b600060405180830381858888f193505050503d8060008114610688576040519150601f19603f3d011682016040523d82523d6000602084013e61068d565b606091505b50909450925060408b0135158015906106a65750600047115b156106f2576106b860208c018c610e04565b6001600160a01b03166108fc479081150290604051600060405180830381858888f193505050501580156106f0573d6000803e3d6000fd5b505b505097509795505050505050565b6060836107106020870187610e04565b6001600160a01b03166107296040880160208901610e04565b6001600160a01b03166040880135606089013560808a013561074e60a08c018c6110be565b60405161075c929190611015565b6040519081900381206107819796959493929160c08e0135908c908c906020016111a0565b6040516020818303038152906040529050949350505050565b6080810135600260006107b06020850185610e04565b6001600160a01b03166001600160a01b0316815260200190815260200160002054146108145760405162461bcd60e51b815260206004820152601360248201527208cae887440dcdedcc6ca40dad2e6dac2e8c6d606b1b6044820152606401610478565b50565b60008681526001602052604090205460ff166108755760405162461bcd60e51b815260206004820152601d60248201527f4657443a20756e7265676973746572656420646f6d61696e207365702e0000006044820152606401610478565b60008581526020819052604090205460ff166108d35760405162461bcd60e51b815260206004820152601a60248201527f4657443a20756e726567697374657265642074797065686173680000000000006044820152606401610478565b6000866108e289888888610700565b805160209182012060405161090e93920161190160f01b81526002810192909252602282015260420190565b60408051601f1981840301815291905280516020909101209050321580610993575061093d6020890189610e04565b6001600160a01b031661098884848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508693925050610acf9050565b6001600160a01b0316145b6109df5760405162461bcd60e51b815260206004820152601760248201527f4657443a207369676e6174757265206d69736d617463680000000000000000006044820152606401610478565b5050505050505050565b8051602080830191909120600081815291829052604091829020805460ff19166001179055905181907f64d6bce64323458c44643c51fe45113efc882082f7b7fd5f09f0d69d2eedb20290610a3f908590610dd8565b60405180910390a25050565b608081013560026000610a616020850185610e04565b6001600160a01b0316815260208101919091526040016000908120805491610a8883611051565b91905055146108145760405162461bcd60e51b815260206004820152601360248201527208cae887440dcdedcc6ca40dad2e6dac2e8c6d606b1b6044820152606401610478565b6000806000610ade8585610af3565b91509150610aeb81610b39565b509392505050565b600080825160411415610b2a5760208301516040840151606085015160001a610b1e87828585610c87565b94509450505050610b32565b506000905060025b9250929050565b6000816004811115610b4d57610b4d6111f2565b1415610b565750565b6001816004811115610b6a57610b6a6111f2565b1415610bb85760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610478565b6002816004811115610bcc57610bcc6111f2565b1415610c1a5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610478565b6003816004811115610c2e57610c2e6111f2565b14156108145760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610478565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115610cbe5750600090506003610d42565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015610d12573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610d3b57600060019250925050610d42565b9150600090505b94509492505050565b600060208284031215610d5d57600080fd5b81356001600160e01b031981168114610d7557600080fd5b9392505050565b60005b83811015610d97578181015183820152602001610d7f565b83811115610da6576000848401525b50505050565b60008151808452610dc4816020860160208601610d7c565b601f01601f19169290920160200192915050565b602081526000610d756020830184610dac565b600060208284031215610dfd57600080fd5b5035919050565b600060208284031215610e1657600080fd5b81356001600160a01b0381168114610d7557600080fd5b60008083601f840112610e3f57600080fd5b50813567ffffffffffffffff811115610e5757600080fd5b602083019150836020828501011115610b3257600080fd5b60008060008060408587031215610e8557600080fd5b843567ffffffffffffffff80821115610e9d57600080fd5b610ea988838901610e2d565b90965094506020870135915080821115610ec257600080fd5b50610ecf87828801610e2d565b95989497509550505050565b600060e08284031215610eed57600080fd5b50919050565b600080600080600080600060a0888a031215610f0e57600080fd5b873567ffffffffffffffff80821115610f2657600080fd5b610f328b838c01610edb565b985060208a0135975060408a0135965060608a0135915080821115610f5657600080fd5b610f628b838c01610e2d565b909650945060808a0135915080821115610f7b57600080fd5b50610f888a828b01610e2d565b989b979a50959850939692959293505050565b8215158152604060208201526000610fb66040830184610dac565b949350505050565b60008060008060608587031215610fd457600080fd5b843567ffffffffffffffff80821115610fec57600080fd5b610ff888838901610edb565b9550602087013594506040870135915080821115610ec257600080fd5b8183823760009101908152919050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006000198214156110655761106561103b565b5060010190565b84868237600085820160008152600560fb1b81528551611093816001840160208a01610d7c565b600b60fa1b600192909101918201528385600283013760009301600201928352509095945050505050565b6000808335601e198436030181126110d557600080fd5b83018035915067ffffffffffffffff8211156110f057600080fd5b602001915036819003821315610b3257600080fd5b8284823760609190911b6bffffffffffffffffffffffff19169101908152601401919050565b6000821982111561113e5761113e61103b565b500190565b600081600019048311821515161561115d5761115d61103b565b500290565b60008261117f57634e487b7160e01b600052601260045260246000fd5b500490565b60008251611196818460208701610d7c565b9190910192915050565b8a81528960208201528860408201528760608201528660808201528560a08201528460c08201528360e082015260006101008385828501376000929093019092019081529a9950505050505050505050565b634e487b7160e01b600052602160045260246000fdfe616464726573732066726f6d2c6164647265737320746f2c75696e743235362076616c75652c75696e74323536206761732c75696e74323536206e6f6e63652c627974657320646174612c75696e743235362076616c6964556e74696c54696d65454950373132446f6d61696e28737472696e67206e616d652c737472696e672076657273696f6e2c75696e7432353620636861696e49642c6164647265737320766572696679696e67436f6e747261637429a26469706673582212205a6d3eba1e8d7a5d42258abefed7b9a78c4bbd4c1dd435d538cd45390e4e5beb64736f6c634300080c0033616464726573732066726f6d2c6164647265737320746f2c75696e743235362076616c75652c75696e74323536206761732c75696e74323536206e6f6e63652c627974657320646174612c75696e743235362076616c6964556e74696c54696d65
Deployed Bytecode
0x6080604052600436106100a05760003560e01c8063ad9f99c711610064578063ad9f99c714610199578063c3f28abd146101b9578063c722f177146101ce578063d9210be5146101fe578063e024dc7f1461021e578063e2b62f2d1461023f57600080fd5b806301ffc9a7146100ac578063066a310c146100e157806321fe98df146101035780632d0335ab146101335780639c7b45921461017757600080fd5b366100a757005b600080fd5b3480156100b857600080fd5b506100cc6100c7366004610d4b565b61025f565b60405190151581526020015b60405180910390f35b3480156100ed57600080fd5b506100f6610296565b6040516100d89190610dd8565b34801561010f57600080fd5b506100cc61011e366004610deb565b60006020819052908152604090205460ff1681565b34801561013f57600080fd5b5061016961014e366004610e04565b6001600160a01b031660009081526002602052604090205490565b6040519081526020016100d8565b34801561018357600080fd5b50610197610192366004610e6f565b6102b2565b005b3480156101a557600080fd5b506101976101b4366004610ef3565b6103a9565b3480156101c557600080fd5b506100f66103ca565b3480156101da57600080fd5b506100cc6101e9366004610deb565b60016020526000908152604090205460ff1681565b34801561020a57600080fd5b50610197610219366004610e6f565b6103e6565b61023161022c366004610ef3565b6104e9565b6040516100d8929190610f9b565b34801561024b57600080fd5b506100f661025a366004610fbe565b610700565b60006001600160e01b031982166309788f9960e21b148061029057506301ffc9a760e01b6001600160e01b03198316145b92915050565b6040518060a00160405280606181526020016112096061913981565b6000469050600060405180608001604052806052815260200161126a605291398051906020012086866040516102e9929190611015565b60405180910390208585604051610301929190611015565b6040805191829003822060208301949094528101919091526060810191909152608081018390523060a082015260c00160408051601f198184030181528282528051602080830191909120600081815260019283905293909320805460ff1916909117905592509081907f4bc68689cbe89a4a6333a3ab0a70093874da3e5bfb71e93102027f3f073687d890610398908590610dd8565b60405180910390a250505050505050565b6103b28761079a565b6103c187878787878787610817565b50505050505050565b60405180608001604052806052815260200161126a6052913981565b60005b8381101561049457600085858381811061040557610405611025565b909101356001600160f81b031916915050600560fb1b81148015906104385750602960f81b6001600160f81b0319821614155b6104815760405162461bcd60e51b81526020600482015260156024820152744657443a20696e76616c696420747970656e616d6560581b60448201526064015b60405180910390fd5b508061048c81611051565b9150506103e9565b50600084846040518060a00160405280606181526020016112096061913985856040516020016104c895949392919061106c565b60405160208183030381529060405290506104e2816109e9565b5050505050565b600060606104fc89898989898989610817565b61050589610a4b565b60c089013515806105195750428960c00135115b61055c5760405162461bcd60e51b81526020600482015260146024820152731195d10e881c995c5d595cdd08195e1c1a5c995960621b6044820152606401610478565b600060408a01351561056d5750619c405b600061057c60a08c018c6110be565b61058960208e018e610e04565b60405160200161059b93929190611105565b60408051601f1981840301815291905290506105bb8260608d013561112b565b60405a6105c990603f611143565b6105d39190611162565b10156106195760405162461bcd60e51b81526020600482015260156024820152744657443a20696e73756666696369656e742067617360581b6044820152606401610478565b61062960408c0160208d01610e04565b6001600160a01b03168b606001358c604001358360405161064a9190611184565b600060405180830381858888f193505050503d8060008114610688576040519150601f19603f3d011682016040523d82523d6000602084013e61068d565b606091505b50909450925060408b0135158015906106a65750600047115b156106f2576106b860208c018c610e04565b6001600160a01b03166108fc479081150290604051600060405180830381858888f193505050501580156106f0573d6000803e3d6000fd5b505b505097509795505050505050565b6060836107106020870187610e04565b6001600160a01b03166107296040880160208901610e04565b6001600160a01b03166040880135606089013560808a013561074e60a08c018c6110be565b60405161075c929190611015565b6040519081900381206107819796959493929160c08e0135908c908c906020016111a0565b6040516020818303038152906040529050949350505050565b6080810135600260006107b06020850185610e04565b6001600160a01b03166001600160a01b0316815260200190815260200160002054146108145760405162461bcd60e51b815260206004820152601360248201527208cae887440dcdedcc6ca40dad2e6dac2e8c6d606b1b6044820152606401610478565b50565b60008681526001602052604090205460ff166108755760405162461bcd60e51b815260206004820152601d60248201527f4657443a20756e7265676973746572656420646f6d61696e207365702e0000006044820152606401610478565b60008581526020819052604090205460ff166108d35760405162461bcd60e51b815260206004820152601a60248201527f4657443a20756e726567697374657265642074797065686173680000000000006044820152606401610478565b6000866108e289888888610700565b805160209182012060405161090e93920161190160f01b81526002810192909252602282015260420190565b60408051601f1981840301815291905280516020909101209050321580610993575061093d6020890189610e04565b6001600160a01b031661098884848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508693925050610acf9050565b6001600160a01b0316145b6109df5760405162461bcd60e51b815260206004820152601760248201527f4657443a207369676e6174757265206d69736d617463680000000000000000006044820152606401610478565b5050505050505050565b8051602080830191909120600081815291829052604091829020805460ff19166001179055905181907f64d6bce64323458c44643c51fe45113efc882082f7b7fd5f09f0d69d2eedb20290610a3f908590610dd8565b60405180910390a25050565b608081013560026000610a616020850185610e04565b6001600160a01b0316815260208101919091526040016000908120805491610a8883611051565b91905055146108145760405162461bcd60e51b815260206004820152601360248201527208cae887440dcdedcc6ca40dad2e6dac2e8c6d606b1b6044820152606401610478565b6000806000610ade8585610af3565b91509150610aeb81610b39565b509392505050565b600080825160411415610b2a5760208301516040840151606085015160001a610b1e87828585610c87565b94509450505050610b32565b506000905060025b9250929050565b6000816004811115610b4d57610b4d6111f2565b1415610b565750565b6001816004811115610b6a57610b6a6111f2565b1415610bb85760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610478565b6002816004811115610bcc57610bcc6111f2565b1415610c1a5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610478565b6003816004811115610c2e57610c2e6111f2565b14156108145760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610478565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115610cbe5750600090506003610d42565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015610d12573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610d3b57600060019250925050610d42565b9150600090505b94509492505050565b600060208284031215610d5d57600080fd5b81356001600160e01b031981168114610d7557600080fd5b9392505050565b60005b83811015610d97578181015183820152602001610d7f565b83811115610da6576000848401525b50505050565b60008151808452610dc4816020860160208601610d7c565b601f01601f19169290920160200192915050565b602081526000610d756020830184610dac565b600060208284031215610dfd57600080fd5b5035919050565b600060208284031215610e1657600080fd5b81356001600160a01b0381168114610d7557600080fd5b60008083601f840112610e3f57600080fd5b50813567ffffffffffffffff811115610e5757600080fd5b602083019150836020828501011115610b3257600080fd5b60008060008060408587031215610e8557600080fd5b843567ffffffffffffffff80821115610e9d57600080fd5b610ea988838901610e2d565b90965094506020870135915080821115610ec257600080fd5b50610ecf87828801610e2d565b95989497509550505050565b600060e08284031215610eed57600080fd5b50919050565b600080600080600080600060a0888a031215610f0e57600080fd5b873567ffffffffffffffff80821115610f2657600080fd5b610f328b838c01610edb565b985060208a0135975060408a0135965060608a0135915080821115610f5657600080fd5b610f628b838c01610e2d565b909650945060808a0135915080821115610f7b57600080fd5b50610f888a828b01610e2d565b989b979a50959850939692959293505050565b8215158152604060208201526000610fb66040830184610dac565b949350505050565b60008060008060608587031215610fd457600080fd5b843567ffffffffffffffff80821115610fec57600080fd5b610ff888838901610edb565b9550602087013594506040870135915080821115610ec257600080fd5b8183823760009101908152919050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006000198214156110655761106561103b565b5060010190565b84868237600085820160008152600560fb1b81528551611093816001840160208a01610d7c565b600b60fa1b600192909101918201528385600283013760009301600201928352509095945050505050565b6000808335601e198436030181126110d557600080fd5b83018035915067ffffffffffffffff8211156110f057600080fd5b602001915036819003821315610b3257600080fd5b8284823760609190911b6bffffffffffffffffffffffff19169101908152601401919050565b6000821982111561113e5761113e61103b565b500190565b600081600019048311821515161561115d5761115d61103b565b500290565b60008261117f57634e487b7160e01b600052601260045260246000fd5b500490565b60008251611196818460208701610d7c565b9190910192915050565b8a81528960208201528860408201528760608201528660808201528560a08201528460c08201528360e082015260006101008385828501376000929093019092019081529a9950505050505050505050565b634e487b7160e01b600052602160045260246000fdfe616464726573732066726f6d2c6164647265737320746f2c75696e743235362076616c75652c75696e74323536206761732c75696e74323536206e6f6e63652c627974657320646174612c75696e743235362076616c6964556e74696c54696d65454950373132446f6d61696e28737472696e67206e616d652c737472696e672076657273696f6e2c75696e7432353620636861696e49642c6164647265737320766572696679696e67436f6e747261637429a26469706673582212205a6d3eba1e8d7a5d42258abefed7b9a78c4bbd4c1dd435d538cd45390e4e5beb64736f6c634300080c0033
Loading...
Loading
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 31 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.