Polygon Sponsored slots available. Book your slot here!
Contract Overview
Balance:
0 MATIC
MATIC Value:
$0.00
My Name Tag:
Not Available, login to update
Txn Hash |
Method
|
Block
|
From
|
To
|
Value | [Txn Fee] | |||
---|---|---|---|---|---|---|---|---|---|
0x9120b1af8330440c00be323ede613a99f44fdb7b31532b209208b05b62808319 | Set Seed | 36895852 | 173 days 19 hrs ago | Lympo: Deployer | IN | 0xbe706581c91f9ff4a73141da5cda7a3a09315388 | 0 MATIC | 0.00334543713 | |
0x70b329954bae0522953ab817f418c6f614823aba9a86afb33d5fe9062a0d87a8 | 0x60806040 | 36895833 | 173 days 19 hrs ago | Lympo: Deployer | IN | Create: LKFRewardRandomizer | 0 MATIC | 0.034982921901 |
[ Download CSV Export ]
Contract Source Code Verified (Exact Match)
Contract Name:
LKFRewardRandomizer
Compiler Version
v0.8.17+commit.8df45f5f
Contract Source Code (Solidity)
/** *Submitted for verification at polygonscan.com on 2022-12-16 */ // File: @openzeppelin/contracts/utils/Context.sol // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @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; } } // File: @openzeppelin/contracts/access/Ownable.sol // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; /** * @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. * * By default, the owner account will be the one that deploys the contract. 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; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @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 { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing 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 { require(newOwner != address(0), "Ownable: new owner is the zero address"); _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); } } // File: contracts/LKFRewardWinners.sol pragma solidity 0.8.17; contract LKFRewardRandomizer is Ownable { uint public seed; function getData(address[] memory wallets) public view returns(uint[] memory res) { res = new uint[](wallets.length); for(uint i = 0; i < wallets.length; i++) { uint random = getRandom(wallets[i]); if(random < 10) { res[i] = 70; continue; } if(random < 50) { res[i] = 10; continue; } res[i] = 3; } } function getRandom(address userAddress) public view returns (uint) { uint randomHash = uint(keccak256(abi.encodePacked(userAddress, seed))); return randomHash % 100; } function setSeed() public onlyOwner { require(seed == 0, "seed already set"); seed = uint(keccak256(abi.encodePacked(block.difficulty, block.timestamp))); } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[{"internalType":"address[]","name":"wallets","type":"address[]"}],"name":"getData","outputs":[{"internalType":"uint256[]","name":"res","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"userAddress","type":"address"}],"name":"getRandom","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"seed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"setSeed","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b5061001a3361001f565b61006f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6106148061007e6000396000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c8063715018a61161005b578063715018a6146100d65780637d94792a146100de5780638da5cb5b146100e7578063f2fde38b1461010257600080fd5b806343083f0e146100825780635ffab0e31461008c57806366f83e91146100b5575b600080fd5b61008a610115565b005b61009f61009a36600461045b565b610197565b6040516100ac9190610520565b60405180910390f35b6100c86100c3366004610564565b610297565b6040519081526020016100ac565b61008a6102f2565b6100c860015481565b6000546040516001600160a01b0390911681526020016100ac565b61008a610110366004610564565b610306565b61011d61037f565b600154156101655760405162461bcd60e51b815260206004820152601060248201526f1cd9595908185b1c9958591e481cd95d60821b60448201526064015b60405180910390fd5b60408051446020820152429181019190915260600160408051601f198184030181529190528051602090910120600155565b6060815167ffffffffffffffff8111156101b3576101b3610429565b6040519080825280602002602001820160405280156101dc578160200160208202803683370190505b50905060005b825181101561029157600061020f8483815181106102025761020261057f565b6020026020010151610297565b9050600a81101561024057604683838151811061022e5761022e61057f565b6020026020010181815250505061027f565b603281101561025d57600a83838151811061022e5761022e61057f565b60038383815181106102715761027161057f565b602002602001018181525050505b8061028981610595565b9150506101e2565b50919050565b6001546040516bffffffffffffffffffffffff19606084901b1660208201526034810191909152600090819060540160408051601f19818403018152919052805160209091012090506102eb6064826105bc565b9392505050565b6102fa61037f565b61030460006103d9565b565b61030e61037f565b6001600160a01b0381166103735760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161015c565b61037c816103d9565b50565b6000546001600160a01b031633146103045760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161015c565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b634e487b7160e01b600052604160045260246000fd5b80356001600160a01b038116811461045657600080fd5b919050565b6000602080838503121561046e57600080fd5b823567ffffffffffffffff8082111561048657600080fd5b818501915085601f83011261049a57600080fd5b8135818111156104ac576104ac610429565b8060051b604051601f19603f830116810181811085821117156104d1576104d1610429565b6040529182528482019250838101850191888311156104ef57600080fd5b938501935b82851015610514576105058561043f565b845293850193928501926104f4565b98975050505050505050565b6020808252825182820181905260009190848201906040850190845b818110156105585783518352928401929184019160010161053c565b50909695505050505050565b60006020828403121561057657600080fd5b6102eb8261043f565b634e487b7160e01b600052603260045260246000fd5b6000600182016105b557634e487b7160e01b600052601160045260246000fd5b5060010190565b6000826105d957634e487b7160e01b600052601260045260246000fd5b50069056fea2646970667358221220e24090c3034633a3ff9673f1f0266d06fefbf92ffb3a82755f92aac1122f57d764736f6c63430008110033
Deployed ByteCode Sourcemap
3667:964:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4448:179;;;:::i;:::-;;3741:501;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;4250:190;;;;;;:::i;:::-;;:::i;:::-;;;2424:25:1;;;2412:2;2397:18;4250:190:0;2278:177:1;2776:103:0;;;:::i;3716:16::-;;;;;;2128:87;2174:7;2201:6;2128:87;;-1:-1:-1;;;;;2201:6:0;;;2606:51:1;;2594:2;2579:18;2128:87:0;2460:203:1;3034:201:0;;;;;;:::i;:::-;;:::i;4448:179::-;2014:13;:11;:13::i;:::-;4503:4:::1;::::0;:9;4495:38:::1;;;::::0;-1:-1:-1;;;4495:38:0;;2870:2:1;4495:38:0::1;::::0;::::1;2852:21:1::0;2909:2;2889:18;;;2882:30;-1:-1:-1;;;2928:18:1;;;2921:46;2984:18;;4495:38:0::1;;;;;;;;;4566:51;::::0;;4583:16:::1;4566:51;::::0;::::1;3170:19:1::0;4601:15:0::1;3205:12:1::0;;;3198:28;;;;3242:12;;4566:51:0::1;::::0;;-1:-1:-1;;4566:51:0;;::::1;::::0;;;;;;4556:62;;4566:51:::1;4556:62:::0;;::::1;::::0;4544:4:::1;:75:::0;4448:179::o;3741:501::-;3804:17;3851:7;:14;3840:26;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3840:26:0;;3834:32;;3883:6;3879:356;3899:7;:14;3895:1;:18;3879:356;;;3935:11;3949:21;3959:7;3967:1;3959:10;;;;;;;;:::i;:::-;;;;;;;3949:9;:21::i;:::-;3935:35;;4013:2;4004:6;:11;4001:89;;;4045:2;4036:3;4040:1;4036:6;;;;;;;;:::i;:::-;;;;;;:11;;;;;4066:8;;;4001:89;4118:2;4109:6;:11;4106:89;;;4150:2;4141:3;4145:1;4141:6;;;;;;;;:::i;4106:89::-;4220:1;4211:3;4215:1;4211:6;;;;;;;;:::i;:::-;;;;;;:10;;;;;3920:315;3879:356;3915:3;;;;:::i;:::-;;;;3879:356;;;;3741:501;;;:::o;4250:190::-;4391:4;;4361:35;;-1:-1:-1;;3811:2:1;3807:15;;;3803:53;4361:35:0;;;3791:66:1;3873:12;;;3866:28;;;;4311:4:0;;;;3910:12:1;;4361:35:0;;;-1:-1:-1;;4361:35:0;;;;;;;;;4351:46;;4361:35;4351:46;;;;;-1:-1:-1;4416:16:0;4429:3;4351:46;4416:16;:::i;:::-;4409:23;4250:190;-1:-1:-1;;;4250:190:0:o;2776:103::-;2014:13;:11;:13::i;:::-;2841:30:::1;2868:1;2841:18;:30::i;:::-;2776:103::o:0;3034:201::-;2014:13;:11;:13::i;:::-;-1:-1:-1;;;;;3123:22:0;::::1;3115:73;;;::::0;-1:-1:-1;;;3115:73:0;;4349:2:1;3115:73:0::1;::::0;::::1;4331:21:1::0;4388:2;4368:18;;;4361:30;4427:34;4407:18;;;4400:62;-1:-1:-1;;;4478:18:1;;;4471:36;4524:19;;3115:73:0::1;4147:402:1::0;3115:73:0::1;3199:28;3218:8;3199:18;:28::i;:::-;3034:201:::0;:::o;2293:132::-;2174:7;2201:6;-1:-1:-1;;;;;2201:6:0;759:10;2357:23;2349:68;;;;-1:-1:-1;;;2349:68:0;;4756:2:1;2349:68:0;;;4738:21:1;;;4775:18;;;4768:30;4834:34;4814:18;;;4807:62;4886:18;;2349:68:0;4554:356:1;3395:191:0;3469:16;3488:6;;-1:-1:-1;;;;;3505:17:0;;;-1:-1:-1;;;;;;3505:17:0;;;;;;3538:40;;3488:6;;;;;;;3538:40;;3469:16;3538:40;3458:128;3395:191;:::o;14:127:1:-;75:10;70:3;66:20;63:1;56:31;106:4;103:1;96:15;130:4;127:1;120:15;146:173;214:20;;-1:-1:-1;;;;;263:31:1;;253:42;;243:70;;309:1;306;299:12;243:70;146:173;;;:::o;324:1121::-;408:6;439:2;482;470:9;461:7;457:23;453:32;450:52;;;498:1;495;488:12;450:52;538:9;525:23;567:18;608:2;600:6;597:14;594:34;;;624:1;621;614:12;594:34;662:6;651:9;647:22;637:32;;707:7;700:4;696:2;692:13;688:27;678:55;;729:1;726;719:12;678:55;765:2;752:16;787:2;783;780:10;777:36;;;793:18;;:::i;:::-;839:2;836:1;832:10;871:2;865:9;934:2;930:7;925:2;921;917:11;913:25;905:6;901:38;989:6;977:10;974:22;969:2;957:10;954:18;951:46;948:72;;;1000:18;;:::i;:::-;1036:2;1029:22;1086:18;;;1120:15;;;;-1:-1:-1;1162:11:1;;;1158:20;;;1190:19;;;1187:39;;;1222:1;1219;1212:12;1187:39;1246:11;;;;1266:148;1282:6;1277:3;1274:15;1266:148;;;1348:23;1367:3;1348:23;:::i;:::-;1336:36;;1299:12;;;;1392;;;;1266:148;;;1433:6;324:1121;-1:-1:-1;;;;;;;;324:1121:1:o;1450:632::-;1621:2;1673:21;;;1743:13;;1646:18;;;1765:22;;;1592:4;;1621:2;1844:15;;;;1818:2;1803:18;;;1592:4;1887:169;1901:6;1898:1;1895:13;1887:169;;;1962:13;;1950:26;;2031:15;;;;1996:12;;;;1923:1;1916:9;1887:169;;;-1:-1:-1;2073:3:1;;1450:632;-1:-1:-1;;;;;;1450:632:1:o;2087:186::-;2146:6;2199:2;2187:9;2178:7;2174:23;2170:32;2167:52;;;2215:1;2212;2205:12;2167:52;2238:29;2257:9;2238:29;:::i;3265:127::-;3326:10;3321:3;3317:20;3314:1;3307:31;3357:4;3354:1;3347:15;3381:4;3378:1;3371:15;3397:232;3436:3;3457:17;;;3454:140;;3516:10;3511:3;3507:20;3504:1;3497:31;3551:4;3548:1;3541:15;3579:4;3576:1;3569:15;3454:140;-1:-1:-1;3621:1:1;3610:13;;3397:232::o;3933:209::-;3965:1;3991;3981:132;;4035:10;4030:3;4026:20;4023:1;4016:31;4070:4;4067:1;4060:15;4098:4;4095:1;4088:15;3981:132;-1:-1:-1;4127:9:1;;3933:209::o
Swarm Source
ipfs://e24090c3034633a3ff9673f1f0266d06fefbf92ffb3a82755f92aac1122f57d7
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.