Arbitrum Sepolia Testnet

Contract

0xe6D6bB5Fa796baA8c1ADc439Ac0fd66fd2A1858b

Overview

ETH Balance

0 ETH

Multichain Info

N/A
Transaction Hash
Method
Block
From
To
Submit Data Paym...1076899462024-12-16 23:39:05127 days ago1734392345IN
0xe6D6bB5F...fd2A1858b
0 ETH0.000008560.1
Submit Data Paym...1076899402024-12-16 23:39:04127 days ago1734392344IN
0xe6D6bB5F...fd2A1858b
0 ETH0.000008560.1
Submit Data Paym...1076899042024-12-16 23:38:55127 days ago1734392335IN
0xe6D6bB5F...fd2A1858b
0 ETH0.000007480.1
Submit Data Paym...1076898932024-12-16 23:38:52127 days ago1734392332IN
0xe6D6bB5F...fd2A1858b
0 ETH0.000007470.1
Submit Data Paym...1076898642024-12-16 23:38:45127 days ago1734392325IN
0xe6D6bB5F...fd2A1858b
0 ETH0.000008560.1
Submit Data Paym...1076898532024-12-16 23:38:42127 days ago1734392322IN
0xe6D6bB5F...fd2A1858b
0 ETH0.000008560.1
Submit Data Paym...1076898222024-12-16 23:38:34127 days ago1734392314IN
0xe6D6bB5F...fd2A1858b
0 ETH0.000007480.1
Submit Data Paym...1076898122024-12-16 23:38:32127 days ago1734392312IN
0xe6D6bB5F...fd2A1858b
0 ETH0.000007480.1
Submit Data Paym...1076897852024-12-16 23:38:24127 days ago1734392304IN
0xe6D6bB5F...fd2A1858b
0 ETH0.000008560.1
Submit Data Paym...1076897762024-12-16 23:38:22127 days ago1734392302IN
0xe6D6bB5F...fd2A1858b
0 ETH0.000008560.1
Submit Data Paym...1076897422024-12-16 23:38:13127 days ago1734392293IN
0xe6D6bB5F...fd2A1858b
0 ETH0.000007470.1
Submit Data Paym...1076897352024-12-16 23:38:11127 days ago1734392291IN
0xe6D6bB5F...fd2A1858b
0 ETH0.000007480.1
Submit Data Paym...1076897012024-12-16 23:38:03127 days ago1734392283IN
0xe6D6bB5F...fd2A1858b
0 ETH0.000008560.1
Submit Data Paym...1076896962024-12-16 23:38:02127 days ago1734392282IN
0xe6D6bB5F...fd2A1858b
0 ETH0.000008560.1
Submit Data Paym...1076896592024-12-16 23:37:52127 days ago1734392272IN
0xe6D6bB5F...fd2A1858b
0 ETH0.000007480.1
Submit Data Paym...1076896542024-12-16 23:37:51127 days ago1734392271IN
0xe6D6bB5F...fd2A1858b
0 ETH0.000007470.1
Submit Data Paym...1076896182024-12-16 23:37:42127 days ago1734392262IN
0xe6D6bB5F...fd2A1858b
0 ETH0.000008560.1
Submit Data Paym...1076896152024-12-16 23:37:41127 days ago1734392261IN
0xe6D6bB5F...fd2A1858b
0 ETH0.000008560.1
Submit Data Paym...1076895772024-12-16 23:37:31127 days ago1734392251IN
0xe6D6bB5F...fd2A1858b
0 ETH0.000007480.1
Submit Data Paym...1076895742024-12-16 23:37:31127 days ago1734392251IN
0xe6D6bB5F...fd2A1858b
0 ETH0.000007470.1
Submit Data Paym...1076895382024-12-16 23:37:22127 days ago1734392242IN
0xe6D6bB5F...fd2A1858b
0 ETH0.000008560.1
Submit Data Paym...1076895332024-12-16 23:37:20127 days ago1734392240IN
0xe6D6bB5F...fd2A1858b
0 ETH0.000008560.1
Submit Data Paym...1076894962024-12-16 23:37:11127 days ago1734392231IN
0xe6D6bB5F...fd2A1858b
0 ETH0.000007470.1
Submit Data Paym...1076894902024-12-16 23:37:10127 days ago1734392230IN
0xe6D6bB5F...fd2A1858b
0 ETH0.000007480.1
Submit Data Paym...1076894542024-12-16 23:37:01127 days ago1734392221IN
0xe6D6bB5F...fd2A1858b
0 ETH0.000008560.1
View all transactions

Advanced mode:
Parent Transaction Hash Block From To
View All Internal Transactions

Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
DataPayments

Compiler Version
v0.8.24+commit.e11b9ed9

Optimization Enabled:
Yes with 200 runs

Other Settings:
paris EvmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 2 : DataPayments.sol
// SPDX-License-Identifier: Unlicensed
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

contract DataPayments {
    address public immutable PAYMENT_TOKEN_ADDRESS;

    struct DataPayment {
        address rewardsAddress;
        uint256 amount;
        bytes32 quoteHash;
    }

    event DataPaymentMade(
        address indexed rewardsAddress,
        uint256 indexed amount,
        bytes32 indexed quoteHash
    );

    constructor(address _tokenAddress) {
        require(_tokenAddress != address(0), "Token address cannot be zero address");

        PAYMENT_TOKEN_ADDRESS = _tokenAddress;
    }

    function submitDataPayments(DataPayment[] calldata dataPayments) external {
        for (uint256 i = 0; i < dataPayments.length; i++) {
            DataPayment calldata dataPayment = dataPayments[i];

            // Send tokens to the reward address
            _sendTokens(msg.sender, dataPayment.rewardsAddress, dataPayment.amount);

            // Emit events that can be listened to and will be stored in the transaction
            emit DataPaymentMade(dataPayment.rewardsAddress, dataPayment.amount, dataPayment.quoteHash);
        }
    }

    function _sendTokens(address from, address to, uint256 amount) internal {
        require(IERC20(PAYMENT_TOKEN_ADDRESS).balanceOf(from) >= amount, "Wallet does not have enough tokens");

        if (from != address(this)) {
            require(IERC20(PAYMENT_TOKEN_ADDRESS).allowance(from, address(this)) >= amount, "Contract is not allowed to spend enough tokens");
        }

        IERC20(PAYMENT_TOKEN_ADDRESS).transferFrom(from, to, amount);
    }
}

File 2 of 2 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.20;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @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);

    /**
     * @dev Returns the value of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the value of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves a `value` amount of tokens from the caller's account to `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 value) 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 a `value` amount of tokens 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 value) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to` using the
     * allowance mechanism. `value` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address from, address to, uint256 value) external returns (bool);
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "evmVersion": "paris",
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  }
}

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"_tokenAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"rewardsAddress","type":"address"},{"indexed":true,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":true,"internalType":"bytes32","name":"quoteHash","type":"bytes32"}],"name":"DataPaymentMade","type":"event"},{"inputs":[],"name":"PAYMENT_TOKEN_ADDRESS","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"rewardsAddress","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes32","name":"quoteHash","type":"bytes32"}],"internalType":"struct DataPayments.DataPayment[]","name":"dataPayments","type":"tuple[]"}],"name":"submitDataPayments","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60a060405234801561001057600080fd5b506040516105f73803806105f783398101604081905261002f916100a6565b6001600160a01b0381166100955760405162461bcd60e51b8152602060048201526024808201527f546f6b656e20616464726573732063616e6e6f74206265207a65726f206164646044820152637265737360e01b606482015260840160405180910390fd5b6001600160a01b03166080526100d6565b6000602082840312156100b857600080fd5b81516001600160a01b03811681146100cf57600080fd5b9392505050565b6080516104f26101056000396000818160400152818161015101528181610253015261035301526104f26000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80635c0d32861461003b578063dee1dfa01461007e575b600080fd5b6100627f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200160405180910390f35b61009161008c3660046103c6565b610093565b005b60005b8181101561012b57368383838181106100b1576100b161043b565b6060029190910191506100d79050336100cd6020840184610451565b8360200135610130565b6040810135602082018035906100ed9084610451565b6001600160a01b03167ff998960b1c6f0e0e89b7bbe6b6fbf3e03e6f08eee5b8430877d8adb8e149d58060405160405180910390a450600101610096565b505050565b6040516370a0823160e01b81526001600160a01b03848116600483015282917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa15801561019a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101be9190610481565b101561021c5760405162461bcd60e51b815260206004820152602260248201527f57616c6c657420646f6573206e6f74206861766520656e6f75676820746f6b656044820152616e7360f01b60648201526084015b60405180910390fd5b6001600160a01b038316301461032557604051636eb1769f60e11b81526001600160a01b03848116600483015230602483015282917f00000000000000000000000000000000000000000000000000000000000000009091169063dd62ed3e90604401602060405180830381865afa15801561029c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102c09190610481565b10156103255760405162461bcd60e51b815260206004820152602e60248201527f436f6e7472616374206973206e6f7420616c6c6f77656420746f207370656e6460448201526d20656e6f75676820746f6b656e7360901b6064820152608401610213565b6040516323b872dd60e01b81526001600160a01b0384811660048301528381166024830152604482018390527f000000000000000000000000000000000000000000000000000000000000000016906323b872dd906064016020604051808303816000875af115801561039c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103c0919061049a565b50505050565b600080602083850312156103d957600080fd5b823567ffffffffffffffff808211156103f157600080fd5b818501915085601f83011261040557600080fd5b81358181111561041457600080fd5b86602060608302850101111561042957600080fd5b60209290920196919550909350505050565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561046357600080fd5b81356001600160a01b038116811461047a57600080fd5b9392505050565b60006020828403121561049357600080fd5b5051919050565b6000602082840312156104ac57600080fd5b8151801515811461047a57600080fdfea26469706673582212206f3a305284dc687832455d7d49b202dcf22b32d76aff5ccd14c3c8539596bcf464736f6c634300081800330000000000000000000000004bc1ace0e66170375462cb4e6af42ad4d5ec689c

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100365760003560e01c80635c0d32861461003b578063dee1dfa01461007e575b600080fd5b6100627f0000000000000000000000004bc1ace0e66170375462cb4e6af42ad4d5ec689c81565b6040516001600160a01b03909116815260200160405180910390f35b61009161008c3660046103c6565b610093565b005b60005b8181101561012b57368383838181106100b1576100b161043b565b6060029190910191506100d79050336100cd6020840184610451565b8360200135610130565b6040810135602082018035906100ed9084610451565b6001600160a01b03167ff998960b1c6f0e0e89b7bbe6b6fbf3e03e6f08eee5b8430877d8adb8e149d58060405160405180910390a450600101610096565b505050565b6040516370a0823160e01b81526001600160a01b03848116600483015282917f0000000000000000000000004bc1ace0e66170375462cb4e6af42ad4d5ec689c909116906370a0823190602401602060405180830381865afa15801561019a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101be9190610481565b101561021c5760405162461bcd60e51b815260206004820152602260248201527f57616c6c657420646f6573206e6f74206861766520656e6f75676820746f6b656044820152616e7360f01b60648201526084015b60405180910390fd5b6001600160a01b038316301461032557604051636eb1769f60e11b81526001600160a01b03848116600483015230602483015282917f0000000000000000000000004bc1ace0e66170375462cb4e6af42ad4d5ec689c9091169063dd62ed3e90604401602060405180830381865afa15801561029c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102c09190610481565b10156103255760405162461bcd60e51b815260206004820152602e60248201527f436f6e7472616374206973206e6f7420616c6c6f77656420746f207370656e6460448201526d20656e6f75676820746f6b656e7360901b6064820152608401610213565b6040516323b872dd60e01b81526001600160a01b0384811660048301528381166024830152604482018390527f0000000000000000000000004bc1ace0e66170375462cb4e6af42ad4d5ec689c16906323b872dd906064016020604051808303816000875af115801561039c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103c0919061049a565b50505050565b600080602083850312156103d957600080fd5b823567ffffffffffffffff808211156103f157600080fd5b818501915085601f83011261040557600080fd5b81358181111561041457600080fd5b86602060608302850101111561042957600080fd5b60209290920196919550909350505050565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561046357600080fd5b81356001600160a01b038116811461047a57600080fd5b9392505050565b60006020828403121561049357600080fd5b5051919050565b6000602082840312156104ac57600080fd5b8151801515811461047a57600080fdfea26469706673582212206f3a305284dc687832455d7d49b202dcf22b32d76aff5ccd14c3c8539596bcf464736f6c63430008180033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

0000000000000000000000004bc1ace0e66170375462cb4e6af42ad4d5ec689c

-----Decoded View---------------
Arg [0] : _tokenAddress (address): 0x4bc1aCE0E66170375462cB4E6Af42Ad4D5EC689C

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000004bc1ace0e66170375462cb4e6af42ad4d5ec689c


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.