Source Code
Overview
ETH Balance
0 ETH
More Info
ContractCreator
Multichain Info
N/A
Latest 1 internal transaction
Advanced mode:
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
12199718 | 167 days ago | Contract Creation | 0 ETH |
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0xB4231Caf...46917D7b7 The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
TokenFaucet
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
Yes with 200 runs
Other Settings:
london EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// Copyright (C) Polytope Labs Ltd. // SPDX-License-Identifier: Apache-2.0 // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. pragma solidity 0.8.17; import {IERC6160Ext20} from "ERC6160/interfaces/IERC6160Ext20.sol"; /// Allows access to a fixed amount of tokens to users on a daily basis contract TokenFaucet { mapping(address => uint256) private consumers; address private token; constructor(address _token) { token = _token; } /// Will only drip tokens, once per day function drip() public { uint256 lastDrip = consumers[msg.sender]; uint256 delay = block.timestamp - lastDrip; if (delay < 86400) { revert("Can only request tokens once daily"); } consumers[msg.sender] = block.timestamp; IERC6160Ext20(token).mint(msg.sender, 1000 * 1e18, ""); } }
pragma solidity ^0.8.17; import {IERC_ACL_CORE} from "./IERCAclCore.sol"; // The EIP-165 identifier of this interface is 0xd0017968 interface IERC5679Ext20 { function mint(address _to, uint256 _amount, bytes calldata _data) external; function burn(address _from, uint256 _amount, bytes calldata _data) external; } /** * @dev Interface of the ERC6160 standard, as defined in * https://github.com/polytope-labs/EIPs/blob/master/EIPS/eip-6160.md. * * @author Polytope Labs * * The EIP-165 identifier of this interface is 0xbbb8b47e */ interface IERC6160Ext20 is IERC5679Ext20, IERC_ACL_CORE {}
pragma solidity ^0.8.17; /** * @dev Interface of the EIP5982 standard, as defined in * https://github.com/polytope-labs/EIPs/blob/master/EIPS/eip-5982.md * * The EIP-165 identifier of this interface is 0x6bb9cd16 */ interface IERC_ACL_CORE { function hasRole(bytes32 role, address account) external view returns (bool); function grantRole(bytes32 role, address account) external; function revokeRole(bytes32 role, address account) external; }
{ "remappings": [ "ismp/=lib/ismp-solidity/src/", "openzeppelin/=lib/openzeppelin-contracts/contracts/", "solidity-merkle-trees/=lib/solidity-merkle-trees/src/", "ERC6160/=lib/ERC6160/src/", "stringutils/=lib/solidity-stringutils/src/", "ds-test/=lib/forge-std/lib/ds-test/src/", "erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/", "forge-std/=lib/forge-std/src/", "ismp-solidity/=lib/ismp-solidity/src/", "openzeppelin-contracts/=lib/openzeppelin-contracts/", "solidity-stringutils/=lib/solidity-stringutils/" ], "optimizer": { "enabled": true, "runs": 200 }, "metadata": { "useLiteralContent": false, "bytecodeHash": "ipfs" }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "london", "libraries": { "lib/solidity-merkle-trees/src/MerklePatricia.sol": { "MerklePatricia": "0x5eab4a0c707f687b87cbdeb70615a9a0bfa6817e" }, "lib/solidity-merkle-trees/src/trie/ethereum/EthereumTrieDB.sol": { "EthereumTrieDB": "0xd2c8a837165dcb1138a6463997066adb743cd910" } } }
[{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"drip","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061002b5760003560e01c80639f678cca14610030575b600080fd5b61003861003a565b005b3360009081526020819052604081205490610055824261014a565b9050620151808110156100b95760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c79207265717565737420746f6b656e73206f6e6365206461696044820152616c7960f01b606482015260840160405180910390fd5b3360008181526020819052604080822042905560015490516394d008ef60e01b81526004810193909352683635c9adc5dea0000060248401526060604484015260648301919091526001600160a01b0316906394d008ef90608401600060405180830381600087803b15801561012e57600080fd5b505af1158015610142573d6000803e3d6000fd5b505050505050565b8181038181111561016b57634e487b7160e01b600052601160045260246000fd5b9291505056fea264697066735822122081c73ba5f6157e24d86f05fa0727276ed7a464fa42d0ce8dc8d78f47d6310b6064736f6c63430008110033
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.