Contract Overview
Balance:
0 BTT
Token:
My Name Tag:
Not Available
[ Download CSV Export ]
Latest 19 internal transactions
[ Download CSV Export ]
Similar Match Source Code
Note: This contract matches the deployed ByteCode of the Source Code for Contract 0xeDCf2f457f3AD2bb50B6dc5e70dAf29c57b0c00C
Contract Name:
ELKTesnetFaucet
Compiler Version
v0.8.19+commit.7dd6d404
Contract Source Code (Solidity)
/** *Submitted for verification at testnet.bttcscan.com on 2023-04-15 */ //For testnet use only. ELK Received is not real ELK- Contract Address of testnet ELK: 0xeEeEEb57642040bE42185f49C52F7E9B38f8eeeE pragma solidity ^0.8.0; // File: @openzeppelin/contracts/token/ERC20/IERC20.sol // OpenZeppelin Contracts (last updated v4.6.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); } // File: Faucet.sol pragma solidity ^0.8.0; contract ELKTesnetFaucet { IERC20 public token; mapping(address => bool) public claimed; uint256 public immutable tokensPerClaim; constructor(address _tokenAddress, uint256 _tokensPerClaim) { token = IERC20(_tokenAddress); tokensPerClaim = _tokensPerClaim; } function claimTokens() public { require(!claimed[msg.sender], "Tokens already claimed"); claimed[msg.sender] = true; token.transfer(msg.sender, tokensPerClaim); } }
[{"inputs":[{"internalType":"address","name":"_tokenAddress","type":"address"},{"internalType":"uint256","name":"_tokensPerClaim","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"claimTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"claimed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokensPerClaim","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60a060405234801561001057600080fd5b506040516103ac3803806103ac83398101604081905261002f91610058565b600080546001600160a01b0319166001600160a01b039390931692909217909155608052610092565b6000806040838503121561006b57600080fd5b82516001600160a01b038116811461008257600080fd5b6020939093015192949293505050565b6080516102f96100b360003960008181609801526101da01526102f96000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c806348c54b9d14610051578063c884ef831461005b578063f35a138614610093578063fc0c546a146100c8575b600080fd5b61005961010d565b005b61007e610069366004610264565b60016020526000908152604090205460ff1681565b60405190151581526020015b60405180910390f35b6100ba7f000000000000000000000000000000000000000000000000000000000000000081565b60405190815260200161008a565b6000546100e89073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161008a565b3360009081526001602052604090205460ff161561018b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f546f6b656e7320616c726561647920636c61696d656400000000000000000000604482015260640160405180910390fd5b336000818152600160208190526040808320805460ff1916909217909155905490517fa9059cbb00000000000000000000000000000000000000000000000000000000815260048101929092527f0000000000000000000000000000000000000000000000000000000000000000602483015273ffffffffffffffffffffffffffffffffffffffff169063a9059cbb906044016020604051808303816000875af115801561023d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061026191906102a1565b50565b60006020828403121561027657600080fd5b813573ffffffffffffffffffffffffffffffffffffffff8116811461029a57600080fd5b9392505050565b6000602082840312156102b357600080fd5b8151801515811461029a57600080fdfea26469706673582212202a19fcc050e443935d2ffc2b51c77110bcdd3a8055d9aca3359bb81bbe70736164736f6c63430008130033000000000000000000000000eeeeeb57642040be42185f49c52f7e9b38f8eeee00000000000000000000000000000000000000000000003635c9adc5dea00000
Deployed ByteCode Sourcemap
3091:508:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3402:194;;;:::i;:::-;;3149:39;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;493:14:1;;486:22;468:41;;456:2;441:18;3149:39:0;;;;;;;;3195;;;;;;;;666:25:1;;;654:2;639:18;3195:39:0;520:177:1;3123:19:0;;;;;;;;;;;;891:42:1;879:55;;;861:74;;849:2;834:18;3123:19:0;702:239:1;3402:194:0;3460:10;3452:19;;;;:7;:19;;;;;;;;3451:20;3443:55;;;;;;;1148:2:1;3443:55:0;;;1130:21:1;1187:2;1167:18;;;1160:30;1226:24;1206:18;;;1199:52;1268:18;;3443:55:0;;;;;;;;3517:10;3509:19;;;;3531:4;3509:19;;;;;;;;:26;;-1:-1:-1;;3509:26:0;;;;;;;3546:5;;:42;;;;;;;;1471:74:1;;;;3573:14:0;1561:18:1;;;1554:34;3509:19:0;3546:5;;:14;;1444:18:1;;3546:42:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;3402:194::o;14:309:1:-;73:6;126:2;114:9;105:7;101:23;97:32;94:52;;;142:1;139;132:12;94:52;181:9;168:23;231:42;224:5;220:54;213:5;210:65;200:93;;289:1;286;279:12;200:93;312:5;14:309;-1:-1:-1;;;14:309:1:o;1599:277::-;1666:6;1719:2;1707:9;1698:7;1694:23;1690:32;1687:52;;;1735:1;1732;1725:12;1687:52;1767:9;1761:16;1820:5;1813:13;1806:21;1799:5;1796:32;1786:60;;1842:1;1839;1832:12
Swarm Source
ipfs://2a19fcc050e443935d2ffc2b51c77110bcdd3a8055d9aca3359bb81bbe707361
Age | Block | Fee Address | BC Fee Address | Voting Power | Jailed | Incoming |
---|