ETH Price: $3,261.38 (-0.75%)

Contract

0x6a74545d40Eb238255233fF66C6fd8C3F64653cc
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Withdraw213669182024-12-09 19:04:5940 days ago1733771099IN
0x6a74545d...3F64653cc
0 ETH0.0014380529.47024525
Claim213659542024-12-09 15:51:1140 days ago1733759471IN
0x6a74545d...3F64653cc
0 ETH0.0041713434.12588867
Claim213648102024-12-09 12:00:5940 days ago1733745659IN
0x6a74545d...3F64653cc
0 ETH0.0039234332.09770263
Withdraw213646392024-12-09 11:26:4740 days ago1733743607IN
0x6a74545d...3F64653cc
0 ETH0.0007094610.03526157
Claim213646352024-12-09 11:25:5940 days ago1733743559IN
0x6a74545d...3F64653cc
0 ETH0.001212529.91972602
Claim213645152024-12-09 11:01:5940 days ago1733742119IN
0x6a74545d...3F64653cc
0 ETH0.0013258610.84695479
Claim213644412024-12-09 10:46:5940 days ago1733741219IN
0x6a74545d...3F64653cc
0 ETH0.0014473911.84117744
Claim213643352024-12-09 10:25:3540 days ago1733739935IN
0x6a74545d...3F64653cc
0 ETH0.0014424311.80060931
Claim213643252024-12-09 10:23:3540 days ago1733739815IN
0x6a74545d...3F64653cc
0 ETH0.0012748410.4295569
Claim213642782024-12-09 10:14:1140 days ago1733739251IN
0x6a74545d...3F64653cc
0 ETH0.0026875811.7929192
Claim213642532024-12-09 10:09:1140 days ago1733738951IN
0x6a74545d...3F64653cc
0 ETH0.0013307410.88682707
Claim213642232024-12-09 10:03:1140 days ago1733738591IN
0x6a74545d...3F64653cc
0 ETH0.0014260711.66677028
Claim213642232024-12-09 10:03:1140 days ago1733738591IN
0x6a74545d...3F64653cc
0 ETH0.001436111.74878245
Claim213642112024-12-09 10:00:4740 days ago1733738447IN
0x6a74545d...3F64653cc
0 ETH0.0013828611.31328075
Claim213641372024-12-09 9:45:5940 days ago1733737559IN
0x6a74545d...3F64653cc
0 ETH0.0015812412.9362301
Claim213641242024-12-09 9:43:2340 days ago1733737403IN
0x6a74545d...3F64653cc
0 ETH0.0014889712.18130998
Claim213641022024-12-09 9:38:5940 days ago1733737139IN
0x6a74545d...3F64653cc
0 ETH0.0017093613.98436895
Claim213640762024-12-09 9:33:4740 days ago1733736827IN
0x6a74545d...3F64653cc
0 ETH0.0035820313.24173227
Claim213640632024-12-09 9:31:1140 days ago1733736671IN
0x6a74545d...3F64653cc
0 ETH0.0017032613.9345004
Claim213640472024-12-09 9:27:5940 days ago1733736479IN
0x6a74545d...3F64653cc
0 ETH0.0015828712.94955918
Claim213640432024-12-09 9:27:1140 days ago1733736431IN
0x6a74545d...3F64653cc
0 ETH0.0015995913.08630473
Claim213640182024-12-09 9:22:1140 days ago1733736131IN
0x6a74545d...3F64653cc
0 ETH0.0014796512.10509187
Claim213639972024-12-09 9:17:5940 days ago1733735879IN
0x6a74545d...3F64653cc
0 ETH0.0013219910.81529393
Claim213639562024-12-09 9:09:4740 days ago1733735387IN
0x6a74545d...3F64653cc
0 ETH0.0016577313.56197395
Claim213639342024-12-09 9:05:2340 days ago1733735123IN
0x6a74545d...3F64653cc
0 ETH0.0015876312.98849746
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
ChampzClaim

Compiler Version
v0.8.26+commit.8a97fa7a

Optimization Enabled:
Yes with 200 runs

Other Settings:
paris EvmVersion
File 1 of 1 : ChampzClaim.sol
// SPDX-License-Identifier: MIT
//
pragma solidity 0.8.26;

interface ERC20 {
    function totalSupply() external view returns (uint256);
    function decimals() external view returns (uint8);
    function symbol() external view returns (string memory);
    function name() external view returns (string memory);
    function getOwner() external view returns (address);
    function balanceOf(address account) external view returns (uint256);
    function transfer(address recipient, uint256 amount) external returns (bool);
    function allowance(address _owner, address spender) external view returns (uint256);
    function approve(address spender, uint256 amount) external returns (bool);
    function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
    event Transfer(address indexed from, address indexed to, uint256 value);
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

abstract contract Context {
    
    function _msgSender() internal view virtual returns (address payable) {
        return payable(msg.sender);
    }

    function _msgData() internal view virtual returns (bytes memory) {
        this;
        return msg.data;
    }
}

contract Ownable is Context {
    address public _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    constructor () {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

    function owner() public view returns (address) {
        return _owner;
    }

    modifier onlyOwner() {
        require(_owner == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    function renounceOwnership() public virtual onlyOwner {
        emit OwnershipTransferred(_owner, address(0));
        _owner = address(0);
    }

    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}





contract ChampzClaim is Ownable {

  event Claimed(address indexed user, uint256 amount);

  ERC20 public oldToken;
  ERC20 public newToken;


  constructor(address _oldToken, address _newToken) {
    oldToken = ERC20(_oldToken);
    newToken = ERC20(_newToken);
  }

  function deposit(uint256 amount) public onlyOwner {
    newToken.transferFrom(msg.sender, address(this), amount);
  }

  function withdraw(address token, uint256 amount) public onlyOwner {
    ERC20(token).transfer(msg.sender, amount);
  }

  function claim() public {
    uint256 amount = oldToken.balanceOf(msg.sender);

    require(amount > 0, "No old token balance (user)");
    require(oldToken.allowance(msg.sender, address(this)) >= amount, "Insufficient allowance");
    require(newToken.balanceOf(address(this)) >= amount, "Insufficient new token balance (contract)");
    require(oldToken.transferFrom(msg.sender, address(this), amount), "Could not transfer old token");
    require(newToken.transfer(msg.sender, amount), "Could not transfer new token");
    
    emit Claimed(msg.sender, amount);
  }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_oldToken","type":"address"},{"internalType":"address","name":"_newToken","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Claimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[],"name":"_owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"newToken","outputs":[{"internalType":"contract ERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"oldToken","outputs":[{"internalType":"contract ERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b50604051610a1b380380610a1b83398101604081905261002f916100bd565b600080546001600160a01b031916339081178255604051909182917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350600180546001600160a01b039384166001600160a01b031991821617909155600280549290931691161790556100f0565b80516001600160a01b03811681146100b857600080fd5b919050565b600080604083850312156100d057600080fd5b6100d9836100a1565b91506100e7602084016100a1565b90509250929050565b61091c806100ff6000396000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c8063b31c710a11610066578063b31c710a146100e6578063b6b55f25146100f9578063c42bd05a1461010c578063f2fde38b1461011f578063f3fef3a31461013257600080fd5b80634e71d92d14610098578063715018a6146100a25780638da5cb5b146100aa578063b2bdfa7b146100d3575b600080fd5b6100a0610145565b005b6100a061054e565b6000546001600160a01b03165b6040516001600160a01b03909116815260200160405180910390f35b6000546100b7906001600160a01b031681565b6001546100b7906001600160a01b031681565b6100a06101073660046107f5565b6105c2565b6002546100b7906001600160a01b031681565b6100a061012d36600461082a565b61066b565b6100a061014036600461084c565b610755565b6001546040516370a0823160e01b81523360048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa15801561018e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101b29190610876565b9050600081116102095760405162461bcd60e51b815260206004820152601b60248201527f4e6f206f6c6420746f6b656e2062616c616e636520287573657229000000000060448201526064015b60405180910390fd5b600154604051636eb1769f60e11b815233600482015230602482015282916001600160a01b03169063dd62ed3e90604401602060405180830381865afa158015610257573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061027b9190610876565b10156102c25760405162461bcd60e51b8152602060048201526016602482015275496e73756666696369656e7420616c6c6f77616e636560501b6044820152606401610200565b6002546040516370a0823160e01b815230600482015282916001600160a01b0316906370a0823190602401602060405180830381865afa15801561030a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061032e9190610876565b101561038e5760405162461bcd60e51b815260206004820152602960248201527f496e73756666696369656e74206e657720746f6b656e2062616c616e63652028604482015268636f6e74726163742960b81b6064820152608401610200565b6001546040516323b872dd60e01b8152336004820152306024820152604481018390526001600160a01b03909116906323b872dd906064016020604051808303816000875af11580156103e5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610409919061088f565b6104555760405162461bcd60e51b815260206004820152601c60248201527f436f756c64206e6f74207472616e73666572206f6c6420746f6b656e000000006044820152606401610200565b60025460405163a9059cbb60e01b8152336004820152602481018390526001600160a01b039091169063a9059cbb906044016020604051808303816000875af11580156104a6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104ca919061088f565b6105165760405162461bcd60e51b815260206004820152601c60248201527f436f756c64206e6f74207472616e73666572206e657720746f6b656e000000006044820152606401610200565b60405181815233907fd8138f8a3f377c5259ca548e70e4c2de94f129f5a11036a15b69513cba2b426a9060200160405180910390a250565b6000546001600160a01b031633146105785760405162461bcd60e51b8152600401610200906108b1565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146105ec5760405162461bcd60e51b8152600401610200906108b1565b6002546040516323b872dd60e01b8152336004820152306024820152604481018390526001600160a01b03909116906323b872dd906064016020604051808303816000875af1158015610643573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610667919061088f565b5050565b6000546001600160a01b031633146106955760405162461bcd60e51b8152600401610200906108b1565b6001600160a01b0381166106fa5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610200565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b0316331461077f5760405162461bcd60e51b8152600401610200906108b1565b60405163a9059cbb60e01b8152336004820152602481018290526001600160a01b0383169063a9059cbb906044016020604051808303816000875af11580156107cc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107f0919061088f565b505050565b60006020828403121561080757600080fd5b5035919050565b80356001600160a01b038116811461082557600080fd5b919050565b60006020828403121561083c57600080fd5b6108458261080e565b9392505050565b6000806040838503121561085f57600080fd5b6108688361080e565b946020939093013593505050565b60006020828403121561088857600080fd5b5051919050565b6000602082840312156108a157600080fd5b8151801515811461084557600080fd5b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260408201526060019056fea2646970667358221220260af22d132742151f18886ee018626733cb92d29487317bbc98aeb54d3c1c5e64736f6c634300081a0033000000000000000000000000571e21a545842c6ce596663cda5caa8196ac1c7a000000000000000000000000e07a836f5201a46f376934a8a4a17185df1708c4

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100935760003560e01c8063b31c710a11610066578063b31c710a146100e6578063b6b55f25146100f9578063c42bd05a1461010c578063f2fde38b1461011f578063f3fef3a31461013257600080fd5b80634e71d92d14610098578063715018a6146100a25780638da5cb5b146100aa578063b2bdfa7b146100d3575b600080fd5b6100a0610145565b005b6100a061054e565b6000546001600160a01b03165b6040516001600160a01b03909116815260200160405180910390f35b6000546100b7906001600160a01b031681565b6001546100b7906001600160a01b031681565b6100a06101073660046107f5565b6105c2565b6002546100b7906001600160a01b031681565b6100a061012d36600461082a565b61066b565b6100a061014036600461084c565b610755565b6001546040516370a0823160e01b81523360048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa15801561018e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101b29190610876565b9050600081116102095760405162461bcd60e51b815260206004820152601b60248201527f4e6f206f6c6420746f6b656e2062616c616e636520287573657229000000000060448201526064015b60405180910390fd5b600154604051636eb1769f60e11b815233600482015230602482015282916001600160a01b03169063dd62ed3e90604401602060405180830381865afa158015610257573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061027b9190610876565b10156102c25760405162461bcd60e51b8152602060048201526016602482015275496e73756666696369656e7420616c6c6f77616e636560501b6044820152606401610200565b6002546040516370a0823160e01b815230600482015282916001600160a01b0316906370a0823190602401602060405180830381865afa15801561030a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061032e9190610876565b101561038e5760405162461bcd60e51b815260206004820152602960248201527f496e73756666696369656e74206e657720746f6b656e2062616c616e63652028604482015268636f6e74726163742960b81b6064820152608401610200565b6001546040516323b872dd60e01b8152336004820152306024820152604481018390526001600160a01b03909116906323b872dd906064016020604051808303816000875af11580156103e5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610409919061088f565b6104555760405162461bcd60e51b815260206004820152601c60248201527f436f756c64206e6f74207472616e73666572206f6c6420746f6b656e000000006044820152606401610200565b60025460405163a9059cbb60e01b8152336004820152602481018390526001600160a01b039091169063a9059cbb906044016020604051808303816000875af11580156104a6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104ca919061088f565b6105165760405162461bcd60e51b815260206004820152601c60248201527f436f756c64206e6f74207472616e73666572206e657720746f6b656e000000006044820152606401610200565b60405181815233907fd8138f8a3f377c5259ca548e70e4c2de94f129f5a11036a15b69513cba2b426a9060200160405180910390a250565b6000546001600160a01b031633146105785760405162461bcd60e51b8152600401610200906108b1565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146105ec5760405162461bcd60e51b8152600401610200906108b1565b6002546040516323b872dd60e01b8152336004820152306024820152604481018390526001600160a01b03909116906323b872dd906064016020604051808303816000875af1158015610643573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610667919061088f565b5050565b6000546001600160a01b031633146106955760405162461bcd60e51b8152600401610200906108b1565b6001600160a01b0381166106fa5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610200565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b0316331461077f5760405162461bcd60e51b8152600401610200906108b1565b60405163a9059cbb60e01b8152336004820152602481018290526001600160a01b0383169063a9059cbb906044016020604051808303816000875af11580156107cc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107f0919061088f565b505050565b60006020828403121561080757600080fd5b5035919050565b80356001600160a01b038116811461082557600080fd5b919050565b60006020828403121561083c57600080fd5b6108458261080e565b9392505050565b6000806040838503121561085f57600080fd5b6108688361080e565b946020939093013593505050565b60006020828403121561088857600080fd5b5051919050565b6000602082840312156108a157600080fd5b8151801515811461084557600080fd5b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260408201526060019056fea2646970667358221220260af22d132742151f18886ee018626733cb92d29487317bbc98aeb54d3c1c5e64736f6c634300081a0033

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

000000000000000000000000571e21a545842c6ce596663cda5caa8196ac1c7a000000000000000000000000e07a836f5201a46f376934a8a4a17185df1708c4

-----Decoded View---------------
Arg [0] : _oldToken (address): 0x571E21a545842C6CE596663cdA5CaA8196AC1c7A
Arg [1] : _newToken (address): 0xe07A836f5201A46f376934A8A4a17185Df1708c4

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000571e21a545842c6ce596663cda5caa8196ac1c7a
Arg [1] : 000000000000000000000000e07a836f5201a46f376934a8a4a17185df1708c4


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
[ 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.