Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 219 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Withdraw | 15865770 | 706 days ago | IN | 0 ETH | 0.00068384 | ||||
Withdraw | 15307050 | 788 days ago | IN | 0 ETH | 0.00084925 | ||||
Withdraw | 15307036 | 788 days ago | IN | 0 ETH | 0.00107424 | ||||
Withdraw | 15263800 | 795 days ago | IN | 0 ETH | 0.00210659 | ||||
Withdraw | 15260022 | 796 days ago | IN | 0 ETH | 0.0009573 | ||||
Withdraw | 15223405 | 801 days ago | IN | 0 ETH | 0.00052916 | ||||
Withdraw | 15072427 | 825 days ago | IN | 0 ETH | 0.00128373 | ||||
Withdraw | 15015113 | 835 days ago | IN | 0 ETH | 0.00402548 | ||||
Withdraw | 14992000 | 839 days ago | IN | 0 ETH | 0.00150785 | ||||
Withdraw | 14991941 | 839 days ago | IN | 0 ETH | 0.00232147 | ||||
Withdraw | 14949636 | 846 days ago | IN | 0 ETH | 0.00146267 | ||||
Withdraw | 14904060 | 854 days ago | IN | 0 ETH | 0.00475877 | ||||
Withdraw | 14867951 | 860 days ago | IN | 0 ETH | 0.00229512 | ||||
Withdraw | 14862872 | 861 days ago | IN | 0 ETH | 0.00119032 | ||||
Withdraw | 14824447 | 867 days ago | IN | 0 ETH | 0.00127911 | ||||
Withdraw | 14814791 | 869 days ago | IN | 0 ETH | 0.0013571 | ||||
Withdraw | 14811843 | 869 days ago | IN | 0 ETH | 0.00331069 | ||||
Withdraw | 14810638 | 869 days ago | IN | 0 ETH | 0.00181442 | ||||
Withdraw | 14808326 | 870 days ago | IN | 0 ETH | 0.00239005 | ||||
Withdraw | 14796854 | 872 days ago | IN | 0 ETH | 0.00178655 | ||||
Withdraw | 14659981 | 893 days ago | IN | 0 ETH | 0.00234088 | ||||
Withdraw | 14659013 | 893 days ago | IN | 0 ETH | 0.00635181 | ||||
Withdraw | 14651313 | 895 days ago | IN | 0 ETH | 0.00238177 | ||||
Withdraw | 14650126 | 895 days ago | IN | 0 ETH | 0.00250524 | ||||
Withdraw | 14648021 | 895 days ago | IN | 0 ETH | 0.00334479 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
RewardBox
Compiler Version
v0.8.9+commit.e5eed63a
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import "@openzeppelin/contracts/access/Ownable.sol"; interface IBatt { function mint(address account, uint amount) external; } contract RewardBox is Ownable { string public constant CONTRACT_NAME = "RewardBox"; bytes32 public constant DOMAIN_TYPEHASH = keccak256("EIP712Domain(string name,uint256 chainId,address verifyingContract)"); bytes32 public constant WITHDRAW_TYPEHASH = keccak256("Withdraw(uint256[] withdrawalIds,uint256[] amounts,address user)"); IBatt public batt; address public admin = 0x719deC089084C98d505695A2cdC82238024D0bAD; mapping(uint256 => bool) public withdrawal; event Withdraw(uint256 withdrawalId, uint256 amount, address user); constructor() {} function setBatt(IBatt _batt) external onlyOwner { batt = _batt; } function changeAdmin(address newAdmin) external onlyOwner { admin = newAdmin; } function withdraw(uint256[] calldata withdrawalIds, uint256[] calldata amounts, address user, uint8 v, bytes32 r, bytes32 s) external { bytes32 domainSeparator = keccak256(abi.encode(DOMAIN_TYPEHASH, keccak256(bytes(CONTRACT_NAME)), getChainId(), address(this))); bytes32 structHash = keccak256(abi.encode( WITHDRAW_TYPEHASH, keccak256(abi.encodePacked(withdrawalIds)), keccak256(abi.encodePacked(amounts)), user )); bytes32 digest = keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); address signatory = ecrecover(digest, v, r, s); require(signatory == admin, "Invalid signatory"); uint256 total = 0; for (uint256 i = 0; i < withdrawalIds.length; i++) { uint256 id = withdrawalIds[i]; if (!withdrawal[id] && amounts[i] > 0) { total += amounts[i]; withdrawal[id] = true; emit Withdraw(id, amounts[i], user); } } if (total > 0) { batt.mint(user, total); } } function getChainId() internal view returns (uint) { uint chainId; assembly { chainId := chainid() } return chainId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @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 Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { 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); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (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; } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"withdrawalId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"address","name":"user","type":"address"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"CONTRACT_NAME","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DOMAIN_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WITHDRAW_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"admin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"batt","outputs":[{"internalType":"contract IBatt","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newAdmin","type":"address"}],"name":"changeAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IBatt","name":"_batt","type":"address"}],"name":"setBatt","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"withdrawalIds","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"address","name":"user","type":"address"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"withdrawal","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
6080604052600280546001600160a01b03191673719dec089084c98d505695a2cdc82238024d0bad17905534801561003657600080fd5b5061004033610045565b610095565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b610a63806100a46000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c8063835fc6ca11610071578063835fc6ca146101975780638da5cb5b146101ca5780638f283970146101db578063bc4b0131146101ee578063f2fde38b14610201578063f851a4401461021457600080fd5b806318db20cf146100b957806320606b70146100e95780634513c3b91461011e578063614d08f814610133578063715018a61461016857806376c5d75814610170575b600080fd5b6001546100cc906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b6101107f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a86681565b6040519081526020016100e0565b61013161012c36600461082e565b610227565b005b61015b604051806040016040528060098152602001680a4caeec2e4c884def60bb1b81525081565b6040516100e091906108db565b610131610614565b6101107fed6b774f59851971481dd8ebaa874da6ec51a447fb37b2654104731774b278e281565b6101ba6101a5366004610930565b60036020526000908152604090205460ff1681565b60405190151581526020016100e0565b6000546001600160a01b03166100cc565b6101316101e9366004610949565b61064a565b6101316101fc366004610949565b610696565b61013161020f366004610949565b6106e2565b6002546100cc906001600160a01b031681565b6040805180820190915260098152680a4caeec2e4c884def60bb1b60209091015260007f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a8667f41c5ea6871791b874267853161dfdbf241ebfef1250d4e5525dbce5cba9786c446604080516020810194909452830191909152606082015230608082015260a00160405160208183030381529060405280519060200120905060007fed6b774f59851971481dd8ebaa874da6ec51a447fb37b2654104731774b278e28a8a6040516020016102fb92919061096d565b60405160208183030381529060405280519060200120898960405160200161032492919061096d565b60408051601f1981840301815282825280516020918201209083019490945281019190915260608101919091526001600160a01b038716608082015260a001604051602081830303815290604052805190602001209050600082826040516020016103a692919061190160f01b81526002810192909252602282015260420190565b60408051601f198184030181528282528051602091820120600080855291840180845281905260ff8a169284019290925260608301889052608083018790529092509060019060a0016020604051602081039080840390855afa158015610411573d6000803e3d6000fd5b5050604051601f1901516002549092506001600160a01b0380841691161490506104765760405162461bcd60e51b8152602060048201526011602482015270496e76616c6964207369676e61746f727960781b60448201526064015b60405180910390fd5b6000805b8c8110156105975760008e8e8381811061049657610496610999565b60209081029290920135600081815260039093526040909220549192505060ff161580156104dc575060008d8d848181106104d3576104d3610999565b90506020020135115b15610584578c8c838181106104f3576104f3610999565b905060200201358361050591906109c5565b6000828152600360205260409020805460ff1916600117905592507f71ef96c43343734b1d843bb85d52ef329f5e9143e4d35827771e3b0dd90c5f84818e8e8581811061055457610554610999565b604080519485526020918202939093013590840152506001600160a01b038e169082015260600160405180910390a15b508061058f816109dd565b91505061047a565b508015610605576001546040516340c10f1960e01b81526001600160a01b038b8116600483015260248201849052909116906340c10f1990604401600060405180830381600087803b1580156105ec57600080fd5b505af1158015610600573d6000803e3d6000fd5b505050505b50505050505050505050505050565b6000546001600160a01b0316331461063e5760405162461bcd60e51b815260040161046d906109f8565b610648600061077d565b565b6000546001600160a01b031633146106745760405162461bcd60e51b815260040161046d906109f8565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146106c05760405162461bcd60e51b815260040161046d906109f8565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b0316331461070c5760405162461bcd60e51b815260040161046d906109f8565b6001600160a01b0381166107715760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161046d565b61077a8161077d565b50565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60008083601f8401126107df57600080fd5b50813567ffffffffffffffff8111156107f757600080fd5b6020830191508360208260051b850101111561081257600080fd5b9250929050565b6001600160a01b038116811461077a57600080fd5b60008060008060008060008060c0898b03121561084a57600080fd5b883567ffffffffffffffff8082111561086257600080fd5b61086e8c838d016107cd565b909a50985060208b013591508082111561088757600080fd5b506108948b828c016107cd565b90975095505060408901356108a881610819565b9350606089013560ff811681146108be57600080fd5b979a969950949793969295929450505060808201359160a0013590565b600060208083528351808285015260005b81811015610908578581018301518582016040015282016108ec565b8181111561091a576000604083870101525b50601f01601f1916929092016040019392505050565b60006020828403121561094257600080fd5b5035919050565b60006020828403121561095b57600080fd5b813561096681610819565b9392505050565b60006001600160fb1b0383111561098357600080fd5b8260051b80858437600092019182525092915050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600082198211156109d8576109d86109af565b500190565b60006000198214156109f1576109f16109af565b5060010190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260408201526060019056fea264697066735822122011e6d9efc9e7aef01a1074245f840a86cc8a71c2a898fe672fd338ccdd69a40364736f6c63430008090033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100b45760003560e01c8063835fc6ca11610071578063835fc6ca146101975780638da5cb5b146101ca5780638f283970146101db578063bc4b0131146101ee578063f2fde38b14610201578063f851a4401461021457600080fd5b806318db20cf146100b957806320606b70146100e95780634513c3b91461011e578063614d08f814610133578063715018a61461016857806376c5d75814610170575b600080fd5b6001546100cc906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b6101107f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a86681565b6040519081526020016100e0565b61013161012c36600461082e565b610227565b005b61015b604051806040016040528060098152602001680a4caeec2e4c884def60bb1b81525081565b6040516100e091906108db565b610131610614565b6101107fed6b774f59851971481dd8ebaa874da6ec51a447fb37b2654104731774b278e281565b6101ba6101a5366004610930565b60036020526000908152604090205460ff1681565b60405190151581526020016100e0565b6000546001600160a01b03166100cc565b6101316101e9366004610949565b61064a565b6101316101fc366004610949565b610696565b61013161020f366004610949565b6106e2565b6002546100cc906001600160a01b031681565b6040805180820190915260098152680a4caeec2e4c884def60bb1b60209091015260007f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a8667f41c5ea6871791b874267853161dfdbf241ebfef1250d4e5525dbce5cba9786c446604080516020810194909452830191909152606082015230608082015260a00160405160208183030381529060405280519060200120905060007fed6b774f59851971481dd8ebaa874da6ec51a447fb37b2654104731774b278e28a8a6040516020016102fb92919061096d565b60405160208183030381529060405280519060200120898960405160200161032492919061096d565b60408051601f1981840301815282825280516020918201209083019490945281019190915260608101919091526001600160a01b038716608082015260a001604051602081830303815290604052805190602001209050600082826040516020016103a692919061190160f01b81526002810192909252602282015260420190565b60408051601f198184030181528282528051602091820120600080855291840180845281905260ff8a169284019290925260608301889052608083018790529092509060019060a0016020604051602081039080840390855afa158015610411573d6000803e3d6000fd5b5050604051601f1901516002549092506001600160a01b0380841691161490506104765760405162461bcd60e51b8152602060048201526011602482015270496e76616c6964207369676e61746f727960781b60448201526064015b60405180910390fd5b6000805b8c8110156105975760008e8e8381811061049657610496610999565b60209081029290920135600081815260039093526040909220549192505060ff161580156104dc575060008d8d848181106104d3576104d3610999565b90506020020135115b15610584578c8c838181106104f3576104f3610999565b905060200201358361050591906109c5565b6000828152600360205260409020805460ff1916600117905592507f71ef96c43343734b1d843bb85d52ef329f5e9143e4d35827771e3b0dd90c5f84818e8e8581811061055457610554610999565b604080519485526020918202939093013590840152506001600160a01b038e169082015260600160405180910390a15b508061058f816109dd565b91505061047a565b508015610605576001546040516340c10f1960e01b81526001600160a01b038b8116600483015260248201849052909116906340c10f1990604401600060405180830381600087803b1580156105ec57600080fd5b505af1158015610600573d6000803e3d6000fd5b505050505b50505050505050505050505050565b6000546001600160a01b0316331461063e5760405162461bcd60e51b815260040161046d906109f8565b610648600061077d565b565b6000546001600160a01b031633146106745760405162461bcd60e51b815260040161046d906109f8565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146106c05760405162461bcd60e51b815260040161046d906109f8565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b0316331461070c5760405162461bcd60e51b815260040161046d906109f8565b6001600160a01b0381166107715760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161046d565b61077a8161077d565b50565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60008083601f8401126107df57600080fd5b50813567ffffffffffffffff8111156107f757600080fd5b6020830191508360208260051b850101111561081257600080fd5b9250929050565b6001600160a01b038116811461077a57600080fd5b60008060008060008060008060c0898b03121561084a57600080fd5b883567ffffffffffffffff8082111561086257600080fd5b61086e8c838d016107cd565b909a50985060208b013591508082111561088757600080fd5b506108948b828c016107cd565b90975095505060408901356108a881610819565b9350606089013560ff811681146108be57600080fd5b979a969950949793969295929450505060808201359160a0013590565b600060208083528351808285015260005b81811015610908578581018301518582016040015282016108ec565b8181111561091a576000604083870101525b50601f01601f1916929092016040019392505050565b60006020828403121561094257600080fd5b5035919050565b60006020828403121561095b57600080fd5b813561096681610819565b9392505050565b60006001600160fb1b0383111561098357600080fd5b8260051b80858437600092019182525092915050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600082198211156109d8576109d86109af565b500190565b60006000198214156109f1576109f16109af565b5060010190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260408201526060019056fea264697066735822122011e6d9efc9e7aef01a1074245f840a86cc8a71c2a898fe672fd338ccdd69a40364736f6c63430008090033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 27 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
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.