Address Contract Verified
Address
0xe729fE3c368B36F7dEa0Ed545426ff7c6bFA4c0D
Balance
0 ETH
Nonce
1
Code Size
2373 bytes
Creator
0x55fBBeef...20AD at tx 0x279c30f6...2fa0c2
Indexed Transactions
1 (24,417,316 → 24,417,316)
Gas Used (indexed)
58,654
Contract Bytecode
2373 bytes
0x608060405234801561001057600080fd5b50600436106100885760003560e01c8063705d53041161005b578063705d5304146101005780638da5cb5b1461012b5780639c42e17c1461013e578063f2fde38b1461015157600080fd5b806312045b201461008d57806313b30a98146100aa57806315113b72146100d85780631d95ab29146100ed575b600080fd5b610095610164565b60405190151581526020015b60405180910390f35b6100ca6100b8366004610622565b60016020526000908152604090205481565b6040519081526020016100a1565b6100eb6100e6366004610644565b610285565b005b6100956100fb366004610733565b610399565b600054610113906001600160a01b031681565b6040516001600160a01b0390911681526020016100a1565b600254610113906001600160a01b031681565b61009561014c366004610733565b61047e565b6100eb61015f366004610622565b610557565b336000908152600160205260408120546101b65760405162461bcd60e51b815260206004820152600e60248201526d2737903637b1b5b2b21022a1a79760911b60448201526064015b60405180910390fd5b336000818152600160205260408082208054908390559154905163a9059cbb60e01b815260048101939093526024830182905290916001600160a01b039091169063a9059cbb906044016020604051808303816000875af115801561021f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061024391906107f3565b5060408051338152602081018390527fd5a75cc87550805ad26ecd94a9f97e7ffe9f9829bd2c70afe1b8e48f8472f7f3910160405180910390a1600191505090565b6002546001600160a01b031633146102af5760405162461bcd60e51b81526004016101ad90610815565b600081116102ff5760405162461bcd60e51b815260206004820181905260248201527f416d6f756e74206d7573742062652067726561746572207468616e207a65726f60448201526064016101ad565b600054604051630852cd8d60e31b8152600481018390526001600160a01b03909116906342966c6890602401600060405180830381600087803b15801561034557600080fd5b505af1158015610359573d6000803e3d6000fd5b505050507f76b6d6cb5d3d18942c54ee43ab07a303a77091c9be59b8188e2218f0d966544b8160405161038e91815260200190565b60405180910390a150565b6002546000906001600160a01b031633146103c65760405162461bcd60e51b81526004016101ad90610815565b81518351146103e75760405162461bcd60e51b81526004016101ad90610857565b60005b835181101561047257828181518110610405576104056108a4565b602002602001015160016000868481518110610423576104236108a4565b60200260200101516001600160a01b03166001600160a01b03168152602001908152602001600020600082825461045a91906108d0565b9091555081905061046a816108e3565b9150506103ea565b50600190505b92915050565b6002546000906001600160a01b031633146104ab5760405162461bcd60e51b81526004016101ad90610815565b81518351146104cc5760405162461bcd60e51b81526004016101ad90610857565b60005b8351811015610472578281815181106104ea576104ea6108a4565b602002602001015160016000868481518110610508576105086108a4565b60200260200101516001600160a01b03166001600160a01b03168152602001908152602001600020600082825461053f91906108fc565b9091555081905061054f816108e3565b9150506104cf565b6002546001600160a01b031633146105815760405162461bcd60e51b81526004016101ad90610815565b6001600160a01b0381166105d75760405162461bcd60e51b815260206004820152601d60248201527f4e6577206f776e657220697320746865207a65726f206164647265737300000060448201526064016101ad565b6002805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b80356001600160a01b038116811461061d57600080fd5b919050565b60006020828403121561063457600080fd5b61063d82610606565b9392505050565b60006020828403121561065657600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561069c5761069c61065d565b604052919050565b600067ffffffffffffffff8211156106be576106be61065d565b5060051b60200190565b600082601f8301126106d957600080fd5b813560206106ee6106e9836106a4565b610673565b82815260059290921b8401810191818101908684111561070d57600080fd5b8286015b848110156107285780358352918301918301610711565b509695505050505050565b6000806040838503121561074657600080fd5b823567ffffffffffffffff8082111561075e57600080fd5b818501915085601f83011261077257600080fd5b813560206107826106e9836106a4565b82815260059290921b840181019181810190898411156107a157600080fd5b948201945b838610156107c6576107b786610606565b825294820194908201906107a6565b965050860135925050808211156107dc57600080fd5b506107e9858286016106c8565b9150509250929050565b60006020828403121561080557600080fd5b8151801515811461063d57600080fd5b60208082526022908201527f4f6e6c79206f776e65722063616e2063616c6c20746869732066756e6374696f604082015261371760f11b606082015260800190565b6020808252602d908201527f546865206c656e677468206f66207468652074776f20617272617973206d757360408201526c74206265207468652073616d6560981b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b80820180821115610478576104786108ba565b6000600182016108f5576108f56108ba565b5060010190565b81810381811115610478576104786108ba56fea2646970667358221220f65716486428935760343bb94bf3cf4ed545521edc17a54b84b99c45ee0b363764736f6c63430008140033
Verified Source Code Full Match
Compiler: v0.8.20+commit.a1b79de6
EVM: istanbul
Optimization: Yes (300 runs)
IERC20.sol 78 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.0;
/**
* @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 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 `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, 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 `from` to `to` 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 from, address to, uint256 amount) external returns (bool);
}
ECOLock.sol 74 lines
// SPDX-License-Identifier: MIT
// Compatible with OpenZeppelin Contracts ^5.0.0
pragma solidity ^0.8.20;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
interface IERC20Burnable is IERC20 {
function burn(uint256 amount) external;
}
contract ECOLock {
/// @notice ECO token
IERC20Burnable public ecoToken;
/// @notice Emitted when ECO is claimed
event EcoClaimed(address account, uint totalAmount);
/// @notice Emitted when ECO is burned
event EcoBurned(uint256 amount);
// @notice ECO list of every account
mapping (address => uint256) public ecolist;
// @notice contract admin
address public owner;
constructor(address _ecoToken) public {
owner = msg.sender;
ecoToken = IERC20Burnable(_ecoToken);
}
modifier onlyOwner() {
require(msg.sender == owner, "Only owner can call this function.");
_;
}
function setEcoAmountAdd(address[] memory _to, uint256[] memory _amount) onlyOwner public returns (bool) {
require(_to.length == _amount.length, "The length of the two arrays must be the same");
for (uint256 i = 0; i < _to.length; i++) {
ecolist[_to[i]] += _amount[i];
}
return true;
}
function setEcoAmountSub(address[] memory _to, uint256[] memory _amount) onlyOwner public returns (bool) {
require(_to.length == _amount.length, "The length of the two arrays must be the same");
for (uint256 i = 0; i < _to.length; i++) {
ecolist[_to[i]] -= _amount[i];
}
return true;
}
function ecoClaim() public returns (bool) {
require(ecolist[msg.sender] > 0, "No locked ECO.");
uint256 totalAmount = ecolist[msg.sender];
ecolist[msg.sender] = 0;
ecoToken.transfer(msg.sender, totalAmount);
emit EcoClaimed(msg.sender, totalAmount);
return true;
}
function burnEco(uint256 amount) external onlyOwner {
require(amount > 0, "Amount must be greater than zero");
ecoToken.burn(amount);
emit EcoBurned(amount);
}
function transferOwnership(address newOwner) onlyOwner public {
require(newOwner != address(0), "New owner is the zero address");
owner = newOwner;
}
}
Read Contract
ecoToken 0x705d5304 → address
ecolist 0x13b30a98 → uint256
owner 0x8da5cb5b → address
Write Contract 5 functions
These functions modify contract state and require a wallet transaction to execute.
burnEco 0x15113b72
uint256 amount
ecoClaim 0x12045b20
No parameters
returns: bool
setEcoAmountAdd 0x1d95ab29
address[] _to
uint256[] _amount
returns: bool
setEcoAmountSub 0x9c42e17c
address[] _to
uint256[] _amount
returns: bool
transferOwnership 0xf2fde38b
address newOwner
Top Interactions
| Address | Txns | Sent | Received |
|---|---|---|---|
| 0xF65A6ce0...1223 | 1 | 1 |
Recent Transactions
|
| Hash | Block | Age | From/To | Value | |
|---|---|---|---|---|---|
| 0x8d48487b...cff3b7 | 24,417,316 | IN | 0xF65A6ce0...1223 | 0 ETH |