Polygon Sponsored slots available. Book your slot here!
Contract Overview
My Name Tag:
Not Available, login to update
[ Download CSV Export ]
Contract Name:
LeancoinFaucet
Compiler Version
v0.8.0+commit.c7dfd78e
Contract Source Code (Solidity)
/** *Submitted for verification at polygonscan.com on 2022-04-09 */ // File: @openzeppelin/contracts/token/ERC20/IERC20.sol pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @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 `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, 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 `sender` to `recipient` 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 sender, address recipient, uint256 amount ) external returns (bool); /** * @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); } // File: LeancoinFaucet.sol pragma solidity ^0.8.0; contract LeancoinFaucet { address payable owner; IERC20 private _token; uint256 public withdrawalAmount = 10 * (10 ** 18); event Withdrawal(address indexed to, uint amount); event Deposit(address indexed from, uint amount); constructor (IERC20 token) { _token = token; owner = payable(msg.sender); } // Accept any incoming amount receive() external payable { emit Deposit(msg.sender, msg.value); } // Give out ether to anyone who asks function withdraw() public { // Limit withdrawal amount to 100 tokens require( withdrawalAmount <= 100 * (10 ** 18), "Request exceeds maximum withdrawal amount of 100 SIPLEAN" ); require( _token.balanceOf(address(this)) >= withdrawalAmount, "Insufficient balance in faucet for withdrawal request" ); require( msg.sender != address(0), "Request must not originate from a zero account" ); // Send the amount to the address that requested it _token.transfer(msg.sender, withdrawalAmount); } // setter for withdrawl amount function setWithdrawalAmount(uint256 amount) public onlyOwner { // Limit max withdrawal amount to 100 tokens require(amount <= 100 * (10 ** 18)); withdrawalAmount = amount * (10 ** 18); } // Contract destructor function destroy() public onlyOwner { selfdestruct(owner); } // Access control modifier modifier onlyOwner { require(msg.sender == owner, "Only the contract owner can call this function"); _; } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdrawal","type":"event"},{"inputs":[],"name":"destroy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"setWithdrawalAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawalAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
6080604052678ac7230489e8000060025534801561001c57600080fd5b50604051610b10380380610b10833981810160405281019061003e91906100da565b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505061015e565b6000815190506100d481610147565b92915050565b6000602082840312156100ec57600080fd5b60006100fa848285016100c5565b91505092915050565b600061010e82610127565b9050919050565b600061012082610103565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b61015081610115565b811461015b57600080fd5b50565b6109a38061016d6000396000f3fe6080604052600436106100435760003560e01c8063168ee33a1461009d5780633ccfd60b146100c657806383197ef0146100dd578063e6e268f4146100f457610098565b36610098573373ffffffffffffffffffffffffffffffffffffffff167fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c3460405161008e9190610842565b60405180910390a2005b600080fd5b3480156100a957600080fd5b506100c460048036038101906100bf9190610576565b61011f565b005b3480156100d257600080fd5b506100db6101e0565b005b3480156100e957600080fd5b506100f2610441565b005b34801561010057600080fd5b50610109610508565b6040516101169190610842565b60405180910390f35b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146101ad576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101a4906107e2565b60405180910390fd5b68056bc75e2d631000008111156101c357600080fd5b670de0b6b3a7640000816101d7919061086e565b60028190555050565b68056bc75e2d63100000600254111561022e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610225906107c2565b60405180910390fd5b600254600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b815260040161028c919061077e565b60206040518083038186803b1580156102a457600080fd5b505afa1580156102b8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102dc919061059f565b101561031d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161031490610822565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561038d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161038490610802565b60405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb336002546040518363ffffffff1660e01b81526004016103ec929190610799565b602060405180830381600087803b15801561040657600080fd5b505af115801561041a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061043e919061054d565b50565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146104cf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104c6906107e2565b60405180910390fd5b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16ff5b60025481565b60008151905061051d8161093f565b92915050565b60008135905061053281610956565b92915050565b60008151905061054781610956565b92915050565b60006020828403121561055f57600080fd5b600061056d8482850161050e565b91505092915050565b60006020828403121561058857600080fd5b600061059684828501610523565b91505092915050565b6000602082840312156105b157600080fd5b60006105bf84828501610538565b91505092915050565b6105d1816108c8565b82525050565b60006105e460388361085d565b91507f526571756573742065786365656473206d6178696d756d20776974686472617760008301527f616c20616d6f756e74206f6620313030205349504c45414e00000000000000006020830152604082019050919050565b600061064a602e8361085d565b91507f4f6e6c792074686520636f6e7472616374206f776e65722063616e2063616c6c60008301527f20746869732066756e6374696f6e0000000000000000000000000000000000006020830152604082019050919050565b60006106b0602e8361085d565b91507f52657175657374206d757374206e6f74206f726967696e6174652066726f6d2060008301527f61207a65726f206163636f756e740000000000000000000000000000000000006020830152604082019050919050565b600061071660358361085d565b91507f496e73756666696369656e742062616c616e636520696e20666175636574206660008301527f6f72207769746864726177616c207265717565737400000000000000000000006020830152604082019050919050565b61077881610906565b82525050565b600060208201905061079360008301846105c8565b92915050565b60006040820190506107ae60008301856105c8565b6107bb602083018461076f565b9392505050565b600060208201905081810360008301526107db816105d7565b9050919050565b600060208201905081810360008301526107fb8161063d565b9050919050565b6000602082019050818103600083015261081b816106a3565b9050919050565b6000602082019050818103600083015261083b81610709565b9050919050565b6000602082019050610857600083018461076f565b92915050565b600082825260208201905092915050565b600061087982610906565b915061088483610906565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156108bd576108bc610910565b5b828202905092915050565b60006108d3826108e6565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b610948816108da565b811461095357600080fd5b50565b61095f81610906565b811461096a57600080fd5b5056fea2646970667358221220d024ccdc44b45b10eef86c801dd98f8920347a1d4a08400d23339a31b6d5c56e64736f6c6343000800003300000000000000000000000064bc251b0eb9200948c9155573cd459c5e17c6a4
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000064bc251b0eb9200948c9155573cd459c5e17c6a4
-----Decoded View---------------
Arg [0] : token (address): 0x64bc251b0eb9200948c9155573cd459c5e17c6a4
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 00000000000000000000000064bc251b0eb9200948c9155573cd459c5e17c6a4
Deployed ByteCode Sourcemap
2901:1733:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3351:10;3343:30;;;3363:9;3343:30;;;;;;:::i;:::-;;;;;;;;2901:1733;;;;;4134:219;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;3431:659;;;;;;;;;;;;;:::i;:::-;;4389:74;;;;;;;;;;;;;:::i;:::-;;2988:49;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;4134:219;4555:5;;;;;;;;;;4541:19;;:10;:19;;;4533:78;;;;;;;;;;;;:::i;:::-;;;;;;;;;4279:16:::1;4269:6;:26;;4261:35;;;::::0;::::1;;4336:8;4326:6;:19;;;;:::i;:::-;4307:16;:38;;;;4134:219:::0;:::o;3431:659::-;3561:16;3541;;:36;;3519:144;;;;;;;;;;;;:::i;:::-;;;;;;;;;3733:16;;3698:6;;;;;;;;;;;:16;;;3723:4;3698:31;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:51;;3676:154;;;;;;;;;;;;:::i;:::-;;;;;;;;;3887:1;3865:24;;:10;:24;;;;3843:120;;;;;;;;;;;;:::i;:::-;;;;;;;;;4037:6;;;;;;;;;;;:15;;;4053:10;4065:16;;4037:45;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;3431:659::o;4389:74::-;4555:5;;;;;;;;;;4541:19;;:10;:19;;;4533:78;;;;;;;;;;;;:::i;:::-;;;;;;;;;4449:5:::1;::::0;::::1;;;;;;;;4436:19;;;2988:49:::0;;;;:::o;7:137:1:-;;92:6;86:13;77:22;;108:30;132:5;108:30;:::i;:::-;67:77;;;;:::o;150:139::-;;234:6;221:20;212:29;;250:33;277:5;250:33;:::i;:::-;202:87;;;;:::o;295:143::-;;383:6;377:13;368:22;;399:33;426:5;399:33;:::i;:::-;358:80;;;;:::o;444:278::-;;560:2;548:9;539:7;535:23;531:32;528:2;;;576:1;573;566:12;528:2;619:1;644:61;697:7;688:6;677:9;673:22;644:61;:::i;:::-;634:71;;590:125;518:204;;;;:::o;728:262::-;;836:2;824:9;815:7;811:23;807:32;804:2;;;852:1;849;842:12;804:2;895:1;920:53;965:7;956:6;945:9;941:22;920:53;:::i;:::-;910:63;;866:117;794:196;;;;:::o;996:284::-;;1115:2;1103:9;1094:7;1090:23;1086:32;1083:2;;;1131:1;1128;1121:12;1083:2;1174:1;1199:64;1255:7;1246:6;1235:9;1231:22;1199:64;:::i;:::-;1189:74;;1145:128;1073:207;;;;:::o;1286:118::-;1373:24;1391:5;1373:24;:::i;:::-;1368:3;1361:37;1351:53;;:::o;1410:388::-;;1573:67;1637:2;1632:3;1573:67;:::i;:::-;1566:74;;1670:34;1666:1;1661:3;1657:11;1650:55;1736:26;1731:2;1726:3;1722:12;1715:48;1789:2;1784:3;1780:12;1773:19;;1556:242;;;:::o;1804:378::-;;1967:67;2031:2;2026:3;1967:67;:::i;:::-;1960:74;;2064:34;2060:1;2055:3;2051:11;2044:55;2130:16;2125:2;2120:3;2116:12;2109:38;2173:2;2168:3;2164:12;2157:19;;1950:232;;;:::o;2188:378::-;;2351:67;2415:2;2410:3;2351:67;:::i;:::-;2344:74;;2448:34;2444:1;2439:3;2435:11;2428:55;2514:16;2509:2;2504:3;2500:12;2493:38;2557:2;2552:3;2548:12;2541:19;;2334:232;;;:::o;2572:385::-;;2735:67;2799:2;2794:3;2735:67;:::i;:::-;2728:74;;2832:34;2828:1;2823:3;2819:11;2812:55;2898:23;2893:2;2888:3;2884:12;2877:45;2948:2;2943:3;2939:12;2932:19;;2718:239;;;:::o;2963:118::-;3050:24;3068:5;3050:24;:::i;:::-;3045:3;3038:37;3028:53;;:::o;3087:222::-;;3218:2;3207:9;3203:18;3195:26;;3231:71;3299:1;3288:9;3284:17;3275:6;3231:71;:::i;:::-;3185:124;;;;:::o;3315:332::-;;3474:2;3463:9;3459:18;3451:26;;3487:71;3555:1;3544:9;3540:17;3531:6;3487:71;:::i;:::-;3568:72;3636:2;3625:9;3621:18;3612:6;3568:72;:::i;:::-;3441:206;;;;;:::o;3653:419::-;;3857:2;3846:9;3842:18;3834:26;;3906:9;3900:4;3896:20;3892:1;3881:9;3877:17;3870:47;3934:131;4060:4;3934:131;:::i;:::-;3926:139;;3824:248;;;:::o;4078:419::-;;4282:2;4271:9;4267:18;4259:26;;4331:9;4325:4;4321:20;4317:1;4306:9;4302:17;4295:47;4359:131;4485:4;4359:131;:::i;:::-;4351:139;;4249:248;;;:::o;4503:419::-;;4707:2;4696:9;4692:18;4684:26;;4756:9;4750:4;4746:20;4742:1;4731:9;4727:17;4720:47;4784:131;4910:4;4784:131;:::i;:::-;4776:139;;4674:248;;;:::o;4928:419::-;;5132:2;5121:9;5117:18;5109:26;;5181:9;5175:4;5171:20;5167:1;5156:9;5152:17;5145:47;5209:131;5335:4;5209:131;:::i;:::-;5201:139;;5099:248;;;:::o;5353:222::-;;5484:2;5473:9;5469:18;5461:26;;5497:71;5565:1;5554:9;5550:17;5541:6;5497:71;:::i;:::-;5451:124;;;;:::o;5581:169::-;;5699:6;5694:3;5687:19;5739:4;5734:3;5730:14;5715:29;;5677:73;;;;:::o;5756:348::-;;5819:20;5837:1;5819:20;:::i;:::-;5814:25;;5853:20;5871:1;5853:20;:::i;:::-;5848:25;;6041:1;5973:66;5969:74;5966:1;5963:81;5958:1;5951:9;5944:17;5940:105;5937:2;;;6048:18;;:::i;:::-;5937:2;6096:1;6093;6089:9;6078:20;;5804:300;;;;:::o;6110:96::-;;6176:24;6194:5;6176:24;:::i;:::-;6165:35;;6155:51;;;:::o;6212:90::-;;6289:5;6282:13;6275:21;6264:32;;6254:48;;;:::o;6308:126::-;;6385:42;6378:5;6374:54;6363:65;;6353:81;;;:::o;6440:77::-;;6506:5;6495:16;;6485:32;;;:::o;6523:180::-;6571:77;6568:1;6561:88;6668:4;6665:1;6658:15;6692:4;6689:1;6682:15;6709:116;6779:21;6794:5;6779:21;:::i;:::-;6772:5;6769:32;6759:2;;6815:1;6812;6805:12;6759:2;6749:76;:::o;6831:122::-;6904:24;6922:5;6904:24;:::i;:::-;6897:5;6894:35;6884:2;;6943:1;6940;6933:12;6884:2;6874:79;:::o
Swarm Source
ipfs://d024ccdc44b45b10eef86c801dd98f8920347a1d4a08400d23339a31b6d5c56e
Age | Block | Fee Address | BC Fee Address | Voting Power | Jailed | Incoming |
---|
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.