Contract
0x36225733276425f5dba88977aef45f042bacb953
6
Contract Overview
Balance:
0 MOVR
MOVR Value:
$0.00
My Name Tag:
Not Available, login to update
Txn Hash | Method |
Block
|
From
|
To
|
Value | [Txn Fee] | |||
---|---|---|---|---|---|---|---|---|---|
0xb86bc245bcfeb99f1848f56202aae8f1f6bc99702604228f2b2cd3279afa1051 | 0x60c06040 | 2164476 | 448 days 21 hrs ago | 0x6fde30a7f4709a1739a32a8235af651c038cedf9 | IN | Create: GelatoRelayForwarder | 0 MOVR | 0.002277761115 |
[ Download CSV Export ]
Contract Name:
GelatoRelayForwarder
Compiler Version
v0.8.13+commit.abaa5c0e
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (proxy/utils/Initializable.sol) pragma solidity ^0.8.0; import "../../utils/AddressUpgradeable.sol"; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. * * [CAUTION] * ==== * Avoid leaving a contract uninitialized. * * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation * contract, which may impact the proxy. To initialize the implementation contract, you can either invoke the * initializer manually, or you can include a constructor to automatically mark it as initialized when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() initializer {} * ``` * ==== */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. */ bool private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Modifier to protect an initializer function from being invoked twice. */ modifier initializer() { // If the contract is initializing we ignore whether _initialized is set in order to support multiple // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the // contract may have been reentered. require(_initializing ? _isConstructor() : !_initialized, "Initializable: contract is already initialized"); bool isTopLevelCall = !_initializing; if (isTopLevelCall) { _initializing = true; _initialized = true; } _; if (isTopLevelCall) { _initializing = false; } } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} modifier, directly or indirectly. */ modifier onlyInitializing() { require(_initializing, "Initializable: contract is not initializing"); _; } function _isConstructor() private view returns (bool) { return !AddressUpgradeable.isContract(address(this)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Address.sol) pragma solidity ^0.8.0; /** * @dev Collection of functions related to the address type */ library AddressUpgradeable { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ 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; 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"); (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"); (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"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // 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 assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; function safeTransfer( IERC20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20 token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Address.sol) pragma solidity ^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; 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"); (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"); (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"); (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"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // 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 assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @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] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (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 } 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"); } else if (error == RecoverError.InvalidSignatureV) { revert("ECDSA: invalid signature 'v' 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) { // Check the signature length // - case 65: r,s,v signature (standard) // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._ 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. 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 if (signature.length == 64) { bytes32 r; bytes32 vs; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) vs := mload(add(signature, 0x40)) } return tryRecover(hash, r, vs); } 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; uint8 v; assembly { s := and(vs, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff) v := add(shr(255, vs), 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 (v != 27 && v != 28) { return (address(0), RecoverError.InvalidSignatureV); } // 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 pragma solidity 0.8.13; import {ForwardRequest} from "./structs/RequestTypes.sol"; import {GelatoRelayForwarderBase} from "./base/GelatoRelayForwarderBase.sol"; import {GelatoCallUtils} from "./gelato/GelatoCallUtils.sol"; import {GelatoTokenUtils} from "./gelato/GelatoTokenUtils.sol"; import {Proxied} from "./vendor/hardhat-deploy/Proxied.sol"; import { Initializable } from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; /// @title Gelato Relay Forwarder contract /// @notice This contract must NEVER hold funds! /// @dev Maliciously crafted transaction payloads could wipe out any funds left here. // solhint-disable-next-line max-states-count contract GelatoRelayForwarder is Proxied, Initializable, GelatoRelayForwarderBase { address public immutable gelato; uint256 public immutable chainId; mapping(address => uint256) public nonce; mapping(bytes32 => bool) public messageDelivered; address public gasTank; address public gasTankAdmin; event LogForwardCallSyncFee( address indexed target, address feeToken, uint256 fee, bytes32 taskId ); event LogForwardRequestAsyncGasTankFee( address indexed sponsor, address indexed target, uint256 sponsorChainId, address feeToken, uint256 fee, bytes32 taskId ); event LogForwardRequestSyncGasTankFee( address indexed sponsor, address indexed target, address feeToken, uint256 fee, bytes32 taskId ); event LogSetGasTank(address oldGasTank, address newGasTank); event LogSetGasTankAdmin(address oldGasTankAdmin, address newGasTankAdmin); event LogUseGelato1Balance( address indexed sponsor, address indexed service, address indexed feeToken, uint256 sponsorChainId, uint256 nativeToFeeTokenXRateNumerator, uint256 nativeToFeeTokenXRateDenominator ); modifier onlyGelato() { require(msg.sender == gelato, "Only callable by gelato"); _; } modifier onlyGasTankAdmin() { require(msg.sender == gasTankAdmin, "Only callable by gasTankAdmin"); _; } constructor(address _gelato) { gelato = _gelato; uint256 _chainId; // solhint-disable-next-line no-inline-assembly assembly { _chainId := chainid() } chainId = _chainId; } function init(address _gasTankAdmin) external initializer { gasTankAdmin = _gasTankAdmin; emit LogSetGasTankAdmin(address(0), _gasTankAdmin); } function setGasTank(address _gasTank) external onlyGasTankAdmin { require(_gasTank != address(0), "Invalid gasTank address"); emit LogSetGasTank(gasTank, _gasTank); gasTank = _gasTank; } function setGasTankAdmin(address _gasTankAdmin) external onlyGasTankAdmin { require(_gasTankAdmin != address(0), "Invalid gasTankAdmin address"); emit LogSetGasTankAdmin(gasTankAdmin, _gasTankAdmin); gasTankAdmin = _gasTankAdmin; } function forwardCallSyncFee( address _target, bytes calldata _data, address _feeToken, uint256 _gas, uint256 _gelatoFee, bytes32 _taskId ) external onlyGelato { uint256 preBalance = GelatoTokenUtils.getBalance( _feeToken, address(this) ); require(_target != gasTank, "target address cannot be gasTank"); GelatoCallUtils.safeExternalCall(_target, _data, _gas); uint256 postBalance = GelatoTokenUtils.getBalance( _feeToken, address(this) ); uint256 amount = postBalance - preBalance; require(amount >= _gelatoFee, "Insufficient fee"); // TODO: change fee collector GelatoTokenUtils.transferToGelato(gelato, _feeToken, amount); emit LogForwardCallSyncFee(_target, _feeToken, amount, _taskId); } // solhint-disable-next-line function-max-lines function forwardRequestGasTankFee( ForwardRequest calldata _req, bytes calldata _sponsorSignature, uint256 _gelatoFee, uint256 _nativeToFeeTokenXRateNumerator, uint256 _nativeToFeeTokenXRateDenominator, bytes32 _taskId ) external onlyGelato { require(_req.chainId == chainId, "Wrong chainId"); require( _req.paymentType == 1 || _req.paymentType == 2, "paymentType must be 1 or 2" ); require(_gelatoFee <= _req.maxFee, "Gelato executor over-charged"); // Verify and increment sponsor's nonce // We assume that all security is enforced on _req.target address, // hence we allow the sponsor to submit multiple transactions concurrently // In case one reverts, it won't stop the following ones from being executed // Optionally, the dApp may not want to track smart contract nonces // We allow this option, BUT MAKE SURE _req.target IMPLEMENTS STRONG REPLAY PROTECTION!! if (_req.enforceSponsorNonce) { if (_req.enforceSponsorNonceOrdering) { // Enforce ordering on nonces, // If tx with nonce n reverts, so will txs with nonce n+1. require(_req.nonce == nonce[_req.sponsor], "Invalid nonce"); nonce[_req.sponsor] = _req.nonce + 1; _verifyForwardRequestSignature( _req, _sponsorSignature, _req.sponsor ); } else { // Do not enforce ordering on nonces, // but still enforce replay protection // via uniqueness of message bytes32 message = _verifyForwardRequestSignature( _req, _sponsorSignature, _req.sponsor ); require(!messageDelivered[message], "Task already executed"); messageDelivered[message] = true; } } else { _verifyForwardRequestSignature( _req, _sponsorSignature, _req.sponsor ); } require(_req.target != gasTank, "target address cannot be gasTank"); GelatoCallUtils.safeExternalCall(_req.target, _req.data, _req.gas); if (_req.paymentType == 1) { // GasTank payment with asynchronous fee crediting emit LogForwardRequestAsyncGasTankFee( _req.sponsor, _req.target, _req.sponsorChainId == 0 ? chainId : _req.sponsorChainId, _req.feeToken, _gelatoFee, _taskId ); emit LogUseGelato1Balance( _req.sponsor, address(this), _req.feeToken, chainId, _nativeToFeeTokenXRateNumerator, _nativeToFeeTokenXRateDenominator ); } else { // TODO: deduct balance from GasTank // Credit GasTank fee emit LogForwardRequestSyncGasTankFee( _req.sponsor, _req.target, _req.feeToken, _gelatoFee, _taskId ); } } function getDomainSeparator() public view returns (bytes32) { return _getDomainSeparator(chainId); } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.13; import {ForwardRequest} from "../structs/RequestTypes.sol"; import {ECDSA} from "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; abstract contract GelatoRelayForwarderBase { bytes32 public constant FORWARD_REQUEST_TYPEHASH = keccak256( bytes( // solhint-disable-next-line max-line-length "ForwardRequest(uint256 chainId,address target,bytes data,address feeToken,uint256 paymentType,uint256 maxFee,uint256 gas,address sponsor,uint256 sponsorChainId,uint256 nonce,bool enforceSponsorNonce,bool enforceSponsorNonceOrdering)" ) ); // solhint-disable-next-line max-line-length string public constant EIP712_DOMAIN_TYPE = "EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"; function _getDomainSeparator(uint256 _chainId) internal view returns (bytes32) { return keccak256( abi.encode( keccak256(bytes(EIP712_DOMAIN_TYPE)), keccak256(bytes("GelatoRelayForwarder")), keccak256(bytes("V1")), bytes32(_chainId), address(this) ) ); } function _verifyForwardRequestSignature( ForwardRequest calldata _req, bytes calldata _signature, address _expectedSigner ) internal view returns (bytes32) { bytes32 domainSeparator = _getDomainSeparator(_req.chainId); bytes32 digest = keccak256( abi.encodePacked( "\x19\x01", domainSeparator, keccak256(_abiEncodeForwardRequest(_req)) ) ); (address recovered, ECDSA.RecoverError error) = ECDSA.tryRecover( digest, _signature ); require( error == ECDSA.RecoverError.NoError && recovered == _expectedSigner, "Invalid signature" ); return digest; } function _abiEncodeForwardRequest(ForwardRequest calldata _req) internal pure returns (bytes memory encodedReq) { encodedReq = abi.encode( FORWARD_REQUEST_TYPEHASH, _req.chainId, _req.target, keccak256(_req.data), _req.feeToken, _req.paymentType, _req.maxFee, _req.gas, _req.sponsor, _req.sponsorChainId, _req.nonce, _req.enforceSponsorNonce, _req.enforceSponsorNonceOrdering ); } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.13; address constant NATIVE_TOKEN = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;
// SPDX-License-Identifier: MIT pragma solidity 0.8.13; library GelatoCallUtils { function safeExternalCall( address _dest, bytes calldata _data, uint256 _gas ) internal { require( _dest.code.length > 0, "GelatoCallUtils.safeExternalCall: _dest cannot be EOA" ); (bool success, ) = _dest.call{gas: _gas}(_data); require( success, "GelatoCallUtils.safeExternalCall: External call failed" ); } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.13; import {NATIVE_TOKEN} from "../constants/Tokens.sol"; import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; library GelatoTokenUtils { function transferToGelato( address _gelato, address _token, uint256 _amount ) internal { if (_amount == 0) return; if (_token == NATIVE_TOKEN) { (bool success, ) = _gelato.call{value: _amount}(""); require(success, "transferGelato: Gelato ETH transfer failed"); } else { SafeERC20.safeTransfer(IERC20(_token), _gelato, _amount); } } function getBalance(address token, address user) internal view returns (uint256) { return token == NATIVE_TOKEN ? user.balance : IERC20(token).balanceOf(user); } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.13; // Relay request with built-in MetaTx support with signature verification on behalf of user // In case a sponsor (other than user) wants to pay for the tx, // we will also need to verify sponsor's signature struct MetaTxRequest { uint256 chainId; address target; bytes data; address feeToken; uint256 paymentType; uint256 maxFee; uint256 gas; address user; address sponsor; // could be same as user uint256 sponsorChainId; uint256 nonce; uint256 deadline; } // Similar to MetaTxRequest, but no need to implement user-specific signature verification logic // Only sponsor signature is verified in order to ensure integrity of fee payments struct ForwardRequest { uint256 chainId; address target; bytes data; address feeToken; uint256 paymentType; uint256 maxFee; uint256 gas; address sponsor; uint256 sponsorChainId; uint256 nonce; bool enforceSponsorNonce; bool enforceSponsorNonceOrdering; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; abstract contract Proxied { // solhint-disable-next-line max-line-length /// @notice to be used by initialisation / postUpgrade function so that only the proxy's admin can execute them /// It also allows these functions to be called inside a contructor /// even if the contract is meant to be used without proxy modifier proxied() { address proxyAdminAddress = _proxyAdmin(); // With hardhat-deploy proxies // the proxyAdminAddress is zero only for the implementation contract // if the implementation contract want to be used as a standalone/immutable contract // it simply has to execute the `proxied` function // This ensure the proxyAdminAddress is never zero post deployment // And allow you to keep the same code for both proxied contract and immutable contract if (proxyAdminAddress == address(0)) { // ensure can not be called twice when used outside of proxy : no admin // solhint-disable-next-line security/no-inline-assembly assembly { sstore( 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF ) } } else { require(msg.sender == proxyAdminAddress); } _; } modifier onlyProxyAdmin() { require(msg.sender == _proxyAdmin(), "NOT_AUTHORIZED"); _; } function _proxyAdmin() internal view returns (address ownerAddress) { // solhint-disable-next-line security/no-inline-assembly assembly { ownerAddress := sload( 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103 ) } } }
{ "evmVersion": "london", "libraries": {}, "metadata": { "bytecodeHash": "ipfs", "useLiteralContent": true }, "optimizer": { "enabled": true, "runs": 200000 }, "remappings": [], "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
[{"inputs":[{"internalType":"address","name":"_gelato","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"target","type":"address"},{"indexed":false,"internalType":"address","name":"feeToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"fee","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"taskId","type":"bytes32"}],"name":"LogForwardCallSyncFee","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sponsor","type":"address"},{"indexed":true,"internalType":"address","name":"target","type":"address"},{"indexed":false,"internalType":"uint256","name":"sponsorChainId","type":"uint256"},{"indexed":false,"internalType":"address","name":"feeToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"fee","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"taskId","type":"bytes32"}],"name":"LogForwardRequestAsyncGasTankFee","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sponsor","type":"address"},{"indexed":true,"internalType":"address","name":"target","type":"address"},{"indexed":false,"internalType":"address","name":"feeToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"fee","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"taskId","type":"bytes32"}],"name":"LogForwardRequestSyncGasTankFee","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldGasTank","type":"address"},{"indexed":false,"internalType":"address","name":"newGasTank","type":"address"}],"name":"LogSetGasTank","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldGasTankAdmin","type":"address"},{"indexed":false,"internalType":"address","name":"newGasTankAdmin","type":"address"}],"name":"LogSetGasTankAdmin","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sponsor","type":"address"},{"indexed":true,"internalType":"address","name":"service","type":"address"},{"indexed":true,"internalType":"address","name":"feeToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"sponsorChainId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"nativeToFeeTokenXRateNumerator","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"nativeToFeeTokenXRateDenominator","type":"uint256"}],"name":"LogUseGelato1Balance","type":"event"},{"inputs":[],"name":"EIP712_DOMAIN_TYPE","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"FORWARD_REQUEST_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"chainId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_target","type":"address"},{"internalType":"bytes","name":"_data","type":"bytes"},{"internalType":"address","name":"_feeToken","type":"address"},{"internalType":"uint256","name":"_gas","type":"uint256"},{"internalType":"uint256","name":"_gelatoFee","type":"uint256"},{"internalType":"bytes32","name":"_taskId","type":"bytes32"}],"name":"forwardCallSyncFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"address","name":"target","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"address","name":"feeToken","type":"address"},{"internalType":"uint256","name":"paymentType","type":"uint256"},{"internalType":"uint256","name":"maxFee","type":"uint256"},{"internalType":"uint256","name":"gas","type":"uint256"},{"internalType":"address","name":"sponsor","type":"address"},{"internalType":"uint256","name":"sponsorChainId","type":"uint256"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"bool","name":"enforceSponsorNonce","type":"bool"},{"internalType":"bool","name":"enforceSponsorNonceOrdering","type":"bool"}],"internalType":"struct ForwardRequest","name":"_req","type":"tuple"},{"internalType":"bytes","name":"_sponsorSignature","type":"bytes"},{"internalType":"uint256","name":"_gelatoFee","type":"uint256"},{"internalType":"uint256","name":"_nativeToFeeTokenXRateNumerator","type":"uint256"},{"internalType":"uint256","name":"_nativeToFeeTokenXRateDenominator","type":"uint256"},{"internalType":"bytes32","name":"_taskId","type":"bytes32"}],"name":"forwardRequestGasTankFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"gasTank","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"gasTankAdmin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"gelato","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getDomainSeparator","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_gasTankAdmin","type":"address"}],"name":"init","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"messageDelivered","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"nonce","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_gasTank","type":"address"}],"name":"setGasTank","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_gasTankAdmin","type":"address"}],"name":"setGasTankAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60c060405234801561001057600080fd5b50604051620024c5380380620024c583398101604081905261003191610046565b6001600160a01b03166080524660a052610076565b60006020828403121561005857600080fd5b81516001600160a01b038116811461006f57600080fd5b9392505050565b60805160a0516123f8620000cd6000396000818161022901528181610a7f01528181610f950152818161103e0152611198015260008181610199015281816105df0152818161079101526109f401526123f86000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c80637be52e591161008c578063ac4cae3a11610066578063ac4cae3a1461024b578063c390fec91461025e578063c3f28abd14610271578063ed24911d1461028657600080fd5b80637be52e59146101fc578063956309681461021c5780639a8a05921461022457600080fd5b806348271fa0116100c857806348271fa01461014f578063573ea5751461019457806365d7f199146101bb57806370ae92d2146101ce57600080fd5b806319ab453c146100ef5780632329f9bb1461010457806343e297b21461013c575b600080fd5b6101026100fd366004611efe565b61028e565b005b610127610112366004611f19565b60026020526000908152604090205460ff1681565b60405190151581526020015b60405180910390f35b61010261014a366004611efe565b61042e565b60045461016f9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610133565b61016f7f000000000000000000000000000000000000000000000000000000000000000081565b6101026101c9366004611f74565b6105c7565b6101ee6101dc366004611efe565b60016020526000908152604090205481565b604051908152602001610133565b60035461016f9073ffffffffffffffffffffffffffffffffffffffff1681565b6101ee61081f565b6101ee7f000000000000000000000000000000000000000000000000000000000000000081565b610102610259366004611efe565b610843565b61010261026c366004611ff4565b6109dc565b610279611175565b60405161013391906120b5565b6101ee611191565b600054610100900460ff166102a95760005460ff16156102ad565b303b155b61033e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084015b60405180910390fd5b600054610100900460ff1615801561037d57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000166101011790555b600480547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8416908117909155604080516000815260208101929092527f7b4314d7a370be44c4e81707ded97705e0bd63e6bd46d7bbe386155e94436419910160405180910390a1801561042a57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1690555b5050565b60045473ffffffffffffffffffffffffffffffffffffffff1633146104af576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4f6e6c792063616c6c61626c652062792067617354616e6b41646d696e0000006044820152606401610335565b73ffffffffffffffffffffffffffffffffffffffff811661052c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f496e76616c69642067617354616e6b20616464726573730000000000000000006044820152606401610335565b6003546040805173ffffffffffffffffffffffffffffffffffffffff928316815291831660208301527f646b74924371efeac02b8806e41f72490eaa858cf528e6f59768d6bbcea84fba910160405180910390a1600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610666576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f4f6e6c792063616c6c61626c652062792067656c61746f0000000000000000006044820152606401610335565b600061067285306111c1565b60035490915073ffffffffffffffffffffffffffffffffffffffff908116908916036106fa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f74617267657420616464726573732063616e6e6f742062652067617354616e6b6044820152606401610335565b610706888888876112a9565b600061071286306111c1565b905060006107208383612135565b90508481101561078c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f496e73756666696369656e7420666565000000000000000000000000000000006044820152606401610335565b6107b77f00000000000000000000000000000000000000000000000000000000000000008883611455565b6040805173ffffffffffffffffffffffffffffffffffffffff898116825260208201849052918101869052908b16907f1618dc761784eda45de355d3b21a8e1b76070c7cebc7479971350f6ac0f55be59060600160405180910390a250505050505050505050565b60405180610120016040528060e8815260200161228960e891398051906020012081565b60045473ffffffffffffffffffffffffffffffffffffffff1633146108c4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4f6e6c792063616c6c61626c652062792067617354616e6b41646d696e0000006044820152606401610335565b73ffffffffffffffffffffffffffffffffffffffff8116610941576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f496e76616c69642067617354616e6b41646d696e2061646472657373000000006044820152606401610335565b6004546040805173ffffffffffffffffffffffffffffffffffffffff928316815291831660208301527f7b4314d7a370be44c4e81707ded97705e0bd63e6bd46d7bbe386155e94436419910160405180910390a1600480547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610a7b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f4f6e6c792063616c6c61626c652062792067656c61746f0000000000000000006044820152606401610335565b86357f000000000000000000000000000000000000000000000000000000000000000014610b05576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f57726f6e6720636861696e4964000000000000000000000000000000000000006044820152606401610335565b866080013560011480610b1c575086608001356002145b610b82576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f7061796d656e7454797065206d7573742062652031206f7220320000000000006044820152606401610335565b8660a00135841115610bf0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f47656c61746f206578656375746f72206f7665722d63686172676564000000006044820152606401610335565b610c026101608801610140890161215d565b15610e1a57610c196101808801610160890161215d565b15610d495760016000610c336101008a0160e08b01611efe565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205487610120013514610cdb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f496e76616c6964206e6f6e6365000000000000000000000000000000000000006044820152606401610335565b610ceb610120880135600161217a565b60016000610d006101008b0160e08c01611efe565b73ffffffffffffffffffffffffffffffffffffffff168152602081019190915260400160002055610d43878787610d3e610100840160e08501611efe565b6115a5565b50610e33565b6000610d62888888610d3e610100840160e08501611efe565b60008181526002602052604090205490915060ff1615610dde576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f5461736b20616c726561647920657865637574656400000000000000000000006044820152606401610335565b600090815260026020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055610e33565b610e31878787610d3e610100840160e08501611efe565b505b60035473ffffffffffffffffffffffffffffffffffffffff16610e5c6040890160208a01611efe565b73ffffffffffffffffffffffffffffffffffffffff1603610ed9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f74617267657420616464726573732063616e6e6f742062652067617354616e6b6044820152606401610335565b610f03610eec6040890160208a01611efe565b610ef960408a018a612192565b8a60c001356112a9565b86608001356001036110b857610f1f6040880160208901611efe565b73ffffffffffffffffffffffffffffffffffffffff16610f46610100890160e08a01611efe565b73ffffffffffffffffffffffffffffffffffffffff167f65896ccac284fcb1ee73c45d950853d73d66cd1c55f61ba945159377d14067736101008a013515610f9357896101000135610fb5565b7f00000000000000000000000000000000000000000000000000000000000000005b610fc560808c0160608d01611efe565b6040805192835273ffffffffffffffffffffffffffffffffffffffff909116602083015281018890526060810185905260800160405180910390a36110106080880160608901611efe565b73ffffffffffffffffffffffffffffffffffffffff16306110386101008a0160e08b01611efe565b604080517f000000000000000000000000000000000000000000000000000000000000000081526020810188905290810186905273ffffffffffffffffffffffffffffffffffffffff91909116907f650ffd1260298f9776a28c58c2cffa095b1d4f723e5523e55015387c2f56c5619060600160405180910390a461116c565b6110c86040880160208901611efe565b73ffffffffffffffffffffffffffffffffffffffff166110ef610100890160e08a01611efe565b73ffffffffffffffffffffffffffffffffffffffff167f143674915c965337534cbf757620018597dc069ea1fa7d79ef405cd9f1554eb161113660808b0160608c01611efe565b6040805173ffffffffffffffffffffffffffffffffffffffff909216825260208201899052810185905260600160405180910390a35b50505050505050565b6040518060800160405280605281526020016123716052913981565b60006111bc7f0000000000000000000000000000000000000000000000000000000000000000611726565b905090565b600073ffffffffffffffffffffffffffffffffffffffff831673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14611289576040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83811660048301528416906370a0823190602401602060405180830381865afa158015611260573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061128491906121f7565b6112a2565b8173ffffffffffffffffffffffffffffffffffffffff16315b9392505050565b60008473ffffffffffffffffffffffffffffffffffffffff163b11611350576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603560248201527f47656c61746f43616c6c5574696c732e7361666545787465726e616c43616c6c60448201527f3a205f646573742063616e6e6f7420626520454f4100000000000000000000006064820152608401610335565b60008473ffffffffffffffffffffffffffffffffffffffff1682858560405161137a929190612210565b60006040518083038160008787f1925050503d80600081146113b8576040519150601f19603f3d011682016040523d82523d6000602084013e6113bd565b606091505b505090508061144e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603660248201527f47656c61746f43616c6c5574696c732e7361666545787465726e616c43616c6c60448201527f3a2045787465726e616c2063616c6c206661696c6564000000000000000000006064820152608401610335565b5050505050565b8060000361146257505050565b7fffffffffffffffffffffffff111111111111111111111111111111111111111273ffffffffffffffffffffffffffffffffffffffff8316016115955760008373ffffffffffffffffffffffffffffffffffffffff168260405160006040518083038185875af1925050503d80600081146114f9576040519150601f19603f3d011682016040523d82523d6000602084013e6114fe565b606091505b505090508061158f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f7472616e7366657247656c61746f3a2047656c61746f20455448207472616e7360448201527f666572206661696c6564000000000000000000000000000000000000000000006064820152608401610335565b50505050565b6115a082848361182c565b505050565b6000806115b28635611726565b90506000816115c0886118b9565b80516020918201206040516116079392017f190100000000000000000000000000000000000000000000000000000000000081526002810192909252602282015260420190565b6040516020818303038152906040528051906020012090506000806116628389898080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611a1192505050565b9092509050600081600481111561167b5761167b612220565b1480156116b357508573ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b611719576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f496e76616c6964207369676e61747572650000000000000000000000000000006044820152606401610335565b5090979650505050505050565b6000604051806080016040528060528152602001612371605291398051602091820120604080518082018252601481527f47656c61746f52656c6179466f727761726465720000000000000000000000009084015280518082018252600281527f5631000000000000000000000000000000000000000000000000000000000000908401528051928301919091527f7234c7d9c507fe929abbaaae19187746b78bd8de7bfcbbfe07aa7aef1a476fb3908201527f4c23426613a5dc69e08fbd2787e6210aa679d4522e95a89d4dd88c4fd13a22836060820152608081018390523060a082015260c001604051602081830303815290604052805190602001209050919050565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb000000000000000000000000000000000000000000000000000000001790526115a0908490611a7f565b606060405180610120016040528060e8815260200161228960e891398051602091820120908335906118f19060408601908601611efe565b6118fe6040860186612192565b60405161190c929190612210565b6040519081900390206119256080870160608801611efe565b608087013560a088013560c08901356119456101008b0160e08c01611efe565b6101008b01356101208c01356119636101608e016101408f0161215d565b8d610160016020810190611977919061215d565b60408051602081019e909e528d019b909b5273ffffffffffffffffffffffffffffffffffffffff998a1660608d015260808c019890985295881660a08b015260c08a019490945260e0890192909252610100880152909316610120860152610140850192909252610160840191909152151561018083015215156101a08201526101c0016040516020818303038152906040529050919050565b6000808251604103611a475760208301516040840151606085015160001a611a3b87828585611b8b565b94509450505050611a78565b8251604003611a705760208301516040840151611a65868383611ca3565b935093505050611a78565b506000905060025b9250929050565b6000611ae1826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16611ceb9092919063ffffffff16565b8051909150156115a05780806020019051810190611aff919061224f565b6115a0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610335565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115611bc25750600090506003611c9a565b8460ff16601b14158015611bda57508460ff16601c14155b15611beb5750600090506004611c9a565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015611c3f573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff8116611c9357600060019250925050611c9a565b9150600090505b94509492505050565b6000807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff831660ff84901c601b01611cdd87828885611b8b565b935093505050935093915050565b6060611cfa8484600085611d02565b949350505050565b606082471015611d94576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610335565b843b611dfc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610335565b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051611e25919061226c565b60006040518083038185875af1925050503d8060008114611e62576040519150601f19603f3d011682016040523d82523d6000602084013e611e67565b606091505b5091509150611e77828286611e82565b979650505050505050565b60608315611e915750816112a2565b825115611ea15782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161033591906120b5565b803573ffffffffffffffffffffffffffffffffffffffff81168114611ef957600080fd5b919050565b600060208284031215611f1057600080fd5b6112a282611ed5565b600060208284031215611f2b57600080fd5b5035919050565b60008083601f840112611f4457600080fd5b50813567ffffffffffffffff811115611f5c57600080fd5b602083019150836020828501011115611a7857600080fd5b600080600080600080600060c0888a031215611f8f57600080fd5b611f9888611ed5565b9650602088013567ffffffffffffffff811115611fb457600080fd5b611fc08a828b01611f32565b9097509550611fd3905060408901611ed5565b969995985093966060810135956080820135955060a0909101359350915050565b600080600080600080600060c0888a03121561200f57600080fd5b873567ffffffffffffffff8082111561202757600080fd5b90890190610180828c03121561203c57600080fd5b9097506020890135908082111561205257600080fd5b5061205f8a828b01611f32565b989b909a509798604081013598606082013598506080820135975060a09091013595509350505050565b60005b838110156120a457818101518382015260200161208c565b8381111561158f5750506000910152565b60208152600082518060208401526120d4816040850160208701612089565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008282101561214757612147612106565b500390565b801515811461215a57600080fd5b50565b60006020828403121561216f57600080fd5b81356112a28161214c565b6000821982111561218d5761218d612106565b500190565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18436030181126121c757600080fd5b83018035915067ffffffffffffffff8211156121e257600080fd5b602001915036819003821315611a7857600080fd5b60006020828403121561220957600080fd5b5051919050565b8183823760009101908152919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60006020828403121561226157600080fd5b81516112a28161214c565b6000825161227e818460208701612089565b919091019291505056fe466f7277617264526571756573742875696e7432353620636861696e49642c61646472657373207461726765742c627974657320646174612c6164647265737320666565546f6b656e2c75696e74323536207061796d656e74547970652c75696e74323536206d61784665652c75696e74323536206761732c616464726573732073706f6e736f722c75696e743235362073706f6e736f72436861696e49642c75696e74323536206e6f6e63652c626f6f6c20656e666f72636553706f6e736f724e6f6e63652c626f6f6c20656e666f72636553706f6e736f724e6f6e63654f72646572696e6729454950373132446f6d61696e28737472696e67206e616d652c737472696e672076657273696f6e2c75696e7432353620636861696e49642c6164647265737320766572696679696e67436f6e747261637429a2646970667358221220384d108b1fe5dd8ba8f60e68fc52f2c1855e3c4646a7e06a7213e7594a0bc08664736f6c634300080d003300000000000000000000000091f2a140ca47ddf438b9c583b7e71987525019bb
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000091f2a140ca47ddf438b9c583b7e71987525019bb
-----Decoded View---------------
Arg [0] : _gelato (address): 0x91f2a140ca47ddf438b9c583b7e71987525019bb
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 00000000000000000000000091f2a140ca47ddf438b9c583b7e71987525019bb
Age | Block | Fee Address | BC Fee Address | Voting Power | Jailed | Incoming |
---|
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.