Contract 0xf9d64d54d32ee2bdceaabfa60c4c438e224427d0 16

 
Txn Hash Method
Block
From
To
Value
0xa4d959d4631cb61d011fcf8f130fc1d884be04d010224b9ddd16c654928dbdaeSponsored Call V...132306092024-04-16 6:56:0528 secs ago0x417b4adc279743fc49f047c323fc668db9e600d8 IN  0xf9d64d54d32ee2bdceaabfa60c4c438e224427d00 ETH0.0000017286290.017280507
0x8aa1adef817b8922ba64eb827d64eaaab1f99b0ac9fcfea33e31763946f363faSponsored Call V...132305662024-04-16 6:54:391 min ago0xba9a3c0a22baebe8c4926227bde32d6edc0d5d28 IN  0xf9d64d54d32ee2bdceaabfa60c4c438e224427d00 ETH0.0000075421360.018473648
0xf52fcd70d5eedcdd44656795f4daf8fd6dac4f7f18cb59866654ebc6ec370cc8Sponsored Call V...132305012024-04-16 6:52:294 mins ago0x417b4adc279743fc49f047c323fc668db9e600d8 IN  0xf9d64d54d32ee2bdceaabfa60c4c438e224427d00 ETH0.0000112605810.018318857
0xdfbd13d2fb466074571557934704907d77bf37bd49d6e5260d426c788725434dSponsored Call V...132304942024-04-16 6:52:154 mins ago0xba9a3c0a22baebe8c4926227bde32d6edc0d5d28 IN  0xf9d64d54d32ee2bdceaabfa60c4c438e224427d00 ETH0.0000074271110.018269035
0x48576b96e7210b8def47ad8de49453b62b13af71d1cb704e1bf28aba9700c7fbSponsored Call V...132304912024-04-16 6:52:094 mins ago0x417b4adc279743fc49f047c323fc668db9e600d8 IN  0xf9d64d54d32ee2bdceaabfa60c4c438e224427d00 ETH0.0000074450360.018315542
0xc492c82af9806c35f49f2416c8b84b6890f4ed7cee5c72e06bf98b468f2e1627Sponsored Call V...132304702024-04-16 6:51:275 mins ago0xba9a3c0a22baebe8c4926227bde32d6edc0d5d28 IN  0xf9d64d54d32ee2bdceaabfa60c4c438e224427d00 ETH0.0000133163310.018991631
0xfcce3ffc004ad115d6ce77de4416151de81f05858df37f805d5ccb23cd4f7836Sponsored Call V...132303762024-04-16 6:48:198 mins ago0xba9a3c0a22baebe8c4926227bde32d6edc0d5d28 IN  0xf9d64d54d32ee2bdceaabfa60c4c438e224427d00 ETH0.0000037585290.018623112
0xd147e23e3041fa0b47b97ea1f79b0d9b426908f5647592aff6505a9671e7f10dSponsored Call V...132303762024-04-16 6:48:198 mins ago0x417b4adc279743fc49f047c323fc668db9e600d8 IN  0xf9d64d54d32ee2bdceaabfa60c4c438e224427d00 ETH0.0000062693720.019222243
0x2f69d8b8ac011048de3bd520f5c16e446111047e143c8fcddfc00ed1b55579adSponsored Call V...132303762024-04-16 6:48:198 mins ago0x417b4adc279743fc49f047c323fc668db9e600d8 IN  0xf9d64d54d32ee2bdceaabfa60c4c438e224427d00 ETH0.0000024094020.019133672
0xe7c8c95088acc7d3aa6c6cbfa4b8162c1a7481779129e0cdb68987ba71612879Sponsored Call V...132303752024-04-16 6:48:178 mins ago0x417b4adc279743fc49f047c323fc668db9e600d8 IN  0xf9d64d54d32ee2bdceaabfa60c4c438e224427d00 ETH0.0000024982740.019110157
0x1ef22cf5cb8177f187c6b25ba71cd8f97862b26b55f8b27d93dcbaa304a0b419Sponsored Call V...132303742024-04-16 6:48:158 mins ago0xba9a3c0a22baebe8c4926227bde32d6edc0d5d28 IN  0xf9d64d54d32ee2bdceaabfa60c4c438e224427d00 ETH0.0000075430540.01858244
0x709ec29bb303fdfe6475821ba6300e6299aaa099cb09ba89a787ac24952714ecSponsored Call V...132303662024-04-16 6:47:598 mins ago0x417b4adc279743fc49f047c323fc668db9e600d8 IN  0xf9d64d54d32ee2bdceaabfa60c4c438e224427d00 ETH0.0000249675580.019108421
0x8ec184c48a0e5b57e32404ee2d61af797f6fb07941f94cfca1d89e59b087793bSponsored Call V...132303642024-04-16 6:47:558 mins ago0x417b4adc279743fc49f047c323fc668db9e600d8 IN  0xf9d64d54d32ee2bdceaabfa60c4c438e224427d00 ETH0.000024987710.019122514
0x8e2cae3bfb34204b7377f234fd88723ac3e9745ced9f4fa695ad81d966f93b12Sponsored Call V...132303582024-04-16 6:47:438 mins ago0x417b4adc279743fc49f047c323fc668db9e600d8 IN  0xf9d64d54d32ee2bdceaabfa60c4c438e224427d00 ETH0.0000246617110.018989218
0x0eb6b9e9ca1c584bbfaf80df5acf6a411acd455b645fe2b4c352a7dc22eecf6cSponsored Call V...132303542024-04-16 6:47:358 mins ago0xba9a3c0a22baebe8c4926227bde32d6edc0d5d28 IN  0xf9d64d54d32ee2bdceaabfa60c4c438e224427d00 ETH0.0000182807580.018936554
0x689f8287771a66881c3a4afa1760eec01aafbbad09a743cb596bd7a91623e613Sponsored Call V...132303502024-04-16 6:47:279 mins ago0x417b4adc279743fc49f047c323fc668db9e600d8 IN  0xf9d64d54d32ee2bdceaabfa60c4c438e224427d00 ETH0.0000215160290.018961176
0xfe2ba88cab3eccb63967f8c4da0c10e7af1e9658ff10b6a9ccf5704c9faac7c1Sponsored Call V...132303492024-04-16 6:47:259 mins ago0x417b4adc279743fc49f047c323fc668db9e600d8 IN  0xf9d64d54d32ee2bdceaabfa60c4c438e224427d00 ETH0.0000219773950.018999028
0x83be6aa438e56a8e6872c294d0fbe1f29b77783b1fa50eae7a78bf9ec0fee636Sponsored Call V...132303412024-04-16 6:47:099 mins ago0x417b4adc279743fc49f047c323fc668db9e600d8 IN  0xf9d64d54d32ee2bdceaabfa60c4c438e224427d00 ETH0.0000081374820.019106882
0xb8ed9b7039c44572eccb37c87442731096c39e7b29b2fedc2b9dd2c639aca104Sponsored Call V...132303042024-04-16 6:45:5510 mins ago0xba9a3c0a22baebe8c4926227bde32d6edc0d5d28 IN  0xf9d64d54d32ee2bdceaabfa60c4c438e224427d00 ETH0.0000078326950.019294627
0xcebf3de267ed3ab133fe4ae828c682f4091a150733c396eca4ab56521d3e1f3eSponsored Call V...132302042024-04-16 6:42:3513 mins ago0xba9a3c0a22baebe8c4926227bde32d6edc0d5d28 IN  0xf9d64d54d32ee2bdceaabfa60c4c438e224427d00 ETH0.0000085423730.020010468
0xed83a24ecedce1f845bbece690fb010f95366e478fa63404d0536484cfbb450bSponsored Call V...132302012024-04-16 6:42:2914 mins ago0x417b4adc279743fc49f047c323fc668db9e600d8 IN  0xf9d64d54d32ee2bdceaabfa60c4c438e224427d00 ETH0.0000056703550.019917367
0x732c946a5b519107511d5c636fc76441cd29edac9ba3fe6acbf458ee38d10516Sponsored Call V...132301742024-04-16 6:41:3514 mins ago0xba9a3c0a22baebe8c4926227bde32d6edc0d5d28 IN  0xf9d64d54d32ee2bdceaabfa60c4c438e224427d00 ETH0.0000166513810.019597724
0x5e3d3c7a0387df9444cb49fa7529f7d9855e66dc95c7459aa616e7ab2f1bbfb9Sponsored Call V...132301652024-04-16 6:41:1715 mins ago0xba9a3c0a22baebe8c4926227bde32d6edc0d5d28 IN  0xf9d64d54d32ee2bdceaabfa60c4c438e224427d00 ETH0.000006013080.019932477
0xe2e7458494fb2cadc21f7ed7d61e83d1e61ec9642ca23e251240e48db79f4920Sponsored Call V...132301592024-04-16 6:41:0515 mins ago0xba9a3c0a22baebe8c4926227bde32d6edc0d5d28 IN  0xf9d64d54d32ee2bdceaabfa60c4c438e224427d00 ETH0.0000081763630.020098423
0xada0c7c3a646c8b3cb5af59afbd7607b1970af72ba94e58989e9fbd2bb35b438Sponsored Call V...132301262024-04-16 6:39:5916 mins ago0xba9a3c0a22baebe8c4926227bde32d6edc0d5d28 IN  0xf9d64d54d32ee2bdceaabfa60c4c438e224427d00 ETH0.0000078644870.019361809
[ Download CSV Export 
Latest 1 internal transaction
Parent Txn Hash Block From To Value
0xfae8669c3162bd1660bfcde563ae582a6b5fe152fe39f575a43e17d34dfde1ce99530712024-01-31 10:04:4975 days 20 hrs ago 0x4e59b44847b379578588920ca78fbf26c0b4956c  Contract Creation0 ETH
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
GelatoRelay1BalanceV2

Compiler Version
v0.8.20+commit.a1b79de6

Optimization Enabled:
Yes with 999999 runs

Other Settings:
paris EvmVersion, MIT license
File 1 of 5 : GelatoRelay1BalanceV2.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.20;

import {IGelatoRelay1BalanceV2} from "./interfaces/IGelatoRelay1BalanceV2.sol";
import {IGelato1BalanceV2} from "./interfaces/IGelato1BalanceV2.sol";
import {GelatoCallUtils} from "./lib/GelatoCallUtils.sol";

/// @title  Gelato Relay V2 contract
/// @notice This contract deals with Gelato 1Balance payments
/// @dev    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 GelatoRelay1BalanceV2 is IGelatoRelay1BalanceV2, IGelato1BalanceV2 {
    using GelatoCallUtils for address;

    /// @notice Relay call + One Balance payment - with sponsor authentication
    /// @dev    This method can be called directly without passing through the diamond
    /// @dev    The validity of the emitted LogUseGelato1BalanceV2 event must be verified off-chain
    /// @dev    Payment is handled with off-chain accounting using Gelato's 1Balance system
    /// @param _target Relay call target
    /// @param _data Relay call data
    /// @param _correlationId Unique task identifier generated by gelato
    /// Signature is split into `r` and `vs` - See https://eips.ethereum.org/EIPS/eip-2098
    /// @param _r Checker signature
    /// @param _vs Checker signature
    function sponsoredCallV2(
        address _target,
        bytes calldata _data,
        bytes32 _correlationId,
        bytes32 _r,
        bytes32 _vs
    ) external {
        // These parameters are decoded from calldata
        (_correlationId);
        (_r);
        (_vs);

        // INTERACTIONS
        _target.revertingContractCall(_data, "GelatoRelay.sponsoredCallV2:");

        emit LogUseGelato1BalanceV2();
    }
}

File 2 of 5 : IGelato1BalanceV2.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.20;

interface IGelato1BalanceV2 {
    event LogUseGelato1BalanceV2();
}

File 3 of 5 : IGelatoRelay1BalanceV2.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.20;

interface IGelatoRelay1BalanceV2 {
    function sponsoredCallV2(
        address _target,
        bytes calldata _data,
        bytes32 _correlationId,
        bytes32 _r,
        bytes32 _vs
    ) external;
}

File 4 of 5 : GelatoBytes.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.20;

library GelatoBytes {
    function calldataSliceSelector(
        bytes calldata _bytes
    ) internal pure returns (bytes4 selector) {
        selector =
            _bytes[0] |
            (bytes4(_bytes[1]) >> 8) |
            (bytes4(_bytes[2]) >> 16) |
            (bytes4(_bytes[3]) >> 24);
    }

    function memorySliceSelector(
        bytes memory _bytes
    ) internal pure returns (bytes4 selector) {
        selector =
            _bytes[0] |
            (bytes4(_bytes[1]) >> 8) |
            (bytes4(_bytes[2]) >> 16) |
            (bytes4(_bytes[3]) >> 24);
    }

    function revertWithError(
        bytes memory _bytes,
        string memory _tracingInfo
    ) internal pure {
        // 68: 32-location, 32-length, 4-ErrorSelector, UTF-8 err
        if (_bytes.length % 32 == 4) {
            bytes4 selector;
            assembly {
                selector := mload(add(0x20, _bytes))
            }
            if (selector == 0x08c379a0) {
                // Function selector for Error(string)
                assembly {
                    _bytes := add(_bytes, 68)
                }
                revert(string(abi.encodePacked(_tracingInfo, string(_bytes))));
            } else {
                revert(
                    string(abi.encodePacked(_tracingInfo, "NoErrorSelector"))
                );
            }
        } else {
            revert(
                string(abi.encodePacked(_tracingInfo, "UnexpectedReturndata"))
            );
        }
    }

    function returnError(
        bytes memory _bytes,
        string memory _tracingInfo
    ) internal pure returns (string memory) {
        // 68: 32-location, 32-length, 4-ErrorSelector, UTF-8 err
        if (_bytes.length % 32 == 4) {
            bytes4 selector;
            assembly {
                selector := mload(add(0x20, _bytes))
            }
            if (selector == 0x08c379a0) {
                // Function selector for Error(string)
                assembly {
                    _bytes := add(_bytes, 68)
                }
                return string(abi.encodePacked(_tracingInfo, string(_bytes)));
            } else {
                return
                    string(abi.encodePacked(_tracingInfo, "NoErrorSelector"));
            }
        } else {
            return
                string(abi.encodePacked(_tracingInfo, "UnexpectedReturndata"));
        }
    }
}

File 5 of 5 : GelatoCallUtils.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.20;

import {GelatoBytes} from "./GelatoBytes.sol";

library GelatoCallUtils {
    using GelatoBytes for bytes;

    function revertingContractCall(
        address _contract,
        bytes memory _data,
        string memory _errorMsg
    ) internal returns (bytes memory returndata) {
        bool success;
        (success, returndata) = _contract.call(_data);

        // solhint-disable-next-line max-line-length
        // https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable/blob/f9b6fc3fdab7aca33a9cfa8837c5cd7f67e176be/contracts/utils/AddressUpgradeable.sol#L177
        if (success) {
            if (returndata.length == 0) {
                // only check isContract if the call was successful and the return data is empty
                // otherwise we already know that it was a contract
                require(
                    isContract(_contract),
                    string(abi.encodePacked(_errorMsg, "Call to non contract"))
                );
            }
        } else {
            returndata.revertWithError(_errorMsg);
        }
    }

    // solhint-disable-next-line max-line-length
    // https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable/blob/f9b6fc3fdab7aca33a9cfa8837c5cd7f67e176be/contracts/utils/AddressUpgradeable.sol#L36
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }
}

Settings
{
  "evmVersion": "paris",
  "libraries": {},
  "metadata": {
    "bytecodeHash": "ipfs",
    "useLiteralContent": true
  },
  "optimizer": {
    "enabled": true,
    "runs": 999999
  },
  "remappings": [],
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

[{"anonymous":false,"inputs":[],"name":"LogUseGelato1BalanceV2","type":"event"},{"inputs":[{"internalType":"address","name":"_target","type":"address"},{"internalType":"bytes","name":"_data","type":"bytes"},{"internalType":"bytes32","name":"_correlationId","type":"bytes32"},{"internalType":"bytes32","name":"_r","type":"bytes32"},{"internalType":"bytes32","name":"_vs","type":"bytes32"}],"name":"sponsoredCallV2","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b506105bb806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063ad718d2a14610030575b600080fd5b61004361003e366004610312565b610045565b005b6100d185858080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505060408051808201909152601c81527f47656c61746f52656c61792e73706f6e736f72656443616c6c56323a00000000602082015273ffffffffffffffffffffffffffffffffffffffff8b169392509050610103565b506040517f8e4f8b7f1299a63a6b46587ec357933d2006e5697cd46d99297e670cee1dbeb190600090a1505050505050565b606060008473ffffffffffffffffffffffffffffffffffffffff168460405161012c91906103eb565b6000604051808303816000865af19150503d8060008114610169576040519150601f19603f3d011682016040523d82523d6000602084013e61016e565b606091505b509250905080156102045781516000036101ff5773ffffffffffffffffffffffffffffffffffffffff85163b1515836040516020016101ad9190610407565b604051602081830303815290604052906101fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101f49190610448565b60405180910390fd5b505b61020e565b61020e8284610216565b509392505050565b602082516102249190610499565b6004036103015760208201517fffffffff0000000000000000000000000000000000000000000000000000000081167f08c379a000000000000000000000000000000000000000000000000000000000036102f05760448301925081836040516020016102929291906104d4565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152908290527f08c379a00000000000000000000000000000000000000000000000000000000082526101f491600401610448565b816040516020016102929190610503565b806040516020016102929190610544565b60008060008060008060a0878903121561032b57600080fd5b863573ffffffffffffffffffffffffffffffffffffffff8116811461034f57600080fd5b9550602087013567ffffffffffffffff8082111561036c57600080fd5b818901915089601f83011261038057600080fd5b81358181111561038f57600080fd5b8a60208285010111156103a157600080fd5b979a60209290920199509697604081013597506060810135965060800135945092505050565b60005b838110156103e25781810151838201526020016103ca565b50506000910152565b600082516103fd8184602087016103c7565b9190910192915050565b600082516104198184602087016103c7565b7f43616c6c20746f206e6f6e20636f6e7472616374000000000000000000000000920191825250601401919050565b60208152600082518060208401526104678160408501602087016103c7565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b6000826104cf577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500690565b600083516104e68184602088016103c7565b8351908301906104fa8183602088016103c7565b01949350505050565b600082516105158184602087016103c7565b7f4e6f4572726f7253656c6563746f720000000000000000000000000000000000920191825250600f01919050565b600082516105568184602087016103c7565b7f556e657870656374656452657475726e6461746100000000000000000000000092019182525060140191905056fea2646970667358221220582610a37287a07756e82c4742887f464821fa0391645f7cf8c1a59deaf80aa564736f6c63430008140033

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061002b5760003560e01c8063ad718d2a14610030575b600080fd5b61004361003e366004610312565b610045565b005b6100d185858080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505060408051808201909152601c81527f47656c61746f52656c61792e73706f6e736f72656443616c6c56323a00000000602082015273ffffffffffffffffffffffffffffffffffffffff8b169392509050610103565b506040517f8e4f8b7f1299a63a6b46587ec357933d2006e5697cd46d99297e670cee1dbeb190600090a1505050505050565b606060008473ffffffffffffffffffffffffffffffffffffffff168460405161012c91906103eb565b6000604051808303816000865af19150503d8060008114610169576040519150601f19603f3d011682016040523d82523d6000602084013e61016e565b606091505b509250905080156102045781516000036101ff5773ffffffffffffffffffffffffffffffffffffffff85163b1515836040516020016101ad9190610407565b604051602081830303815290604052906101fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101f49190610448565b60405180910390fd5b505b61020e565b61020e8284610216565b509392505050565b602082516102249190610499565b6004036103015760208201517fffffffff0000000000000000000000000000000000000000000000000000000081167f08c379a000000000000000000000000000000000000000000000000000000000036102f05760448301925081836040516020016102929291906104d4565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152908290527f08c379a00000000000000000000000000000000000000000000000000000000082526101f491600401610448565b816040516020016102929190610503565b806040516020016102929190610544565b60008060008060008060a0878903121561032b57600080fd5b863573ffffffffffffffffffffffffffffffffffffffff8116811461034f57600080fd5b9550602087013567ffffffffffffffff8082111561036c57600080fd5b818901915089601f83011261038057600080fd5b81358181111561038f57600080fd5b8a60208285010111156103a157600080fd5b979a60209290920199509697604081013597506060810135965060800135945092505050565b60005b838110156103e25781810151838201526020016103ca565b50506000910152565b600082516103fd8184602087016103c7565b9190910192915050565b600082516104198184602087016103c7565b7f43616c6c20746f206e6f6e20636f6e7472616374000000000000000000000000920191825250601401919050565b60208152600082518060208401526104678160408501602087016103c7565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b6000826104cf577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500690565b600083516104e68184602088016103c7565b8351908301906104fa8183602088016103c7565b01949350505050565b600082516105158184602087016103c7565b7f4e6f4572726f7253656c6563746f720000000000000000000000000000000000920191825250600f01919050565b600082516105568184602087016103c7565b7f556e657870656374656452657475726e6461746100000000000000000000000092019182525060140191905056fea2646970667358221220582610a37287a07756e82c4742887f464821fa0391645f7cf8c1a59deaf80aa564736f6c63430008140033

Block Transaction Difficulty Gas Used Reward
Block Uncle Number Difficulty Gas Used Reward
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.