Feature Tip: Add private address tag to any address under My Name Tag !
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
NDXRewardsSchedule
Compiler Version
v0.6.12+commit.27d51765
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.6.12; import "@openzeppelin/contracts/access/Ownable.sol"; import "./interfaces/IRewardsSchedule.sol"; /** * @dev Rewards schedule that distributes 1,500,000 tokens over two years using a linear * decay that distributes roughly 1.7 tokens in the first block for every 0.3 tokens in the * last block. * * A value of 13.2 seconds was selected as the average block time to set 4778182 as the number * of blocks in 2 years. This has been a stable block time for roughly a year at the time of * writing. */ contract NDXRewardsSchedule is Ownable, IRewardsSchedule { uint256 public immutable override startBlock; uint256 public override endBlock; constructor(uint256 startBlock_) public Ownable() { startBlock = startBlock_; endBlock = startBlock_ + 4778181; } /** * @dev Set an early end block for rewards. * Note: This can only be called once. */ function setEarlyEndBlock(uint256 earlyEndBlock) external override onlyOwner { uint256 endBlock_ = endBlock; require(endBlock_ == startBlock + 4778181, "Early end block already set"); require(earlyEndBlock > block.number && earlyEndBlock > startBlock, "End block too early"); require(earlyEndBlock < endBlock_, "End block too late"); endBlock = earlyEndBlock; emit EarlyEndBlockSet(earlyEndBlock); } function getRewardsForBlockRange(uint256 from, uint256 to) external view override returns (uint256) { require(to >= from, "Bad block range"); uint256 endBlock_ = endBlock; // If queried range is entirely outside of reward blocks, return 0 if (from >= endBlock_ || to <= startBlock) return 0; // Use start/end values where from/to are OOB if (to > endBlock_) to = endBlock_; if (from < startBlock) from = startBlock; uint256 x = from - startBlock; uint256 y = to - startBlock; // This formula is the definite integral of the following function: // rewards(b) = 0.5336757788 - 0.00000009198010879*b; b >= 0; b < 4778182 // where b is the block number offset from {startBlock} and the output is multiplied by 1e18. return (45990054395 * x**2) + (5336757788e8 * (y - x)) - (45990054395 * y**2); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <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 () internal { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), 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 { emit OwnershipTransferred(_owner, address(0)); _owner = 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"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <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 GSN 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 payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } }
// SPDX-License-Identifier: MIT pragma solidity 0.6.12; interface IRewardsSchedule { event EarlyEndBlockSet(uint256 earlyEndBlock); function startBlock() external view returns (uint256); function endBlock() external view returns (uint256); function getRewardsForBlockRange(uint256 from, uint256 to) external view returns (uint256); function setEarlyEndBlock(uint256 earlyEndBlock) external; }
{ "evmVersion": "istanbul", "libraries": {}, "metadata": { "bytecodeHash": "none", "useLiteralContent": true }, "optimizer": { "enabled": true, "runs": 800 }, "remappings": [], "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"uint256","name":"startBlock_","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"earlyEndBlock","type":"uint256"}],"name":"EarlyEndBlockSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[],"name":"endBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"from","type":"uint256"},{"internalType":"uint256","name":"to","type":"uint256"}],"name":"getRewardsForBlockRange","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":[{"internalType":"uint256","name":"earlyEndBlock","type":"uint256"}],"name":"setEarlyEndBlock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60a060405234801561001057600080fd5b506040516107de3803806107de8339818101604052602081101561003357600080fd5b5051600061003f61009b565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a35060808190526248e8c50160015561009f565b3390565b6080516107026100dc6000398061014052806102a252806102e2528061030a52806103305280610357528061054952806105c852506107026000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c80638da5cb5b1161005b5780638da5cb5b146100ae578063a2778311146100d2578063f2fde38b146100f5578063f787f16e1461011b5761007d565b8063083c63231461008257806348cd4cb11461009c578063715018a6146100a4575b600080fd5b61008a610138565b60408051918252519081900360200190f35b61008a61013e565b6100ac610162565b005b6100b661022d565b604080516001600160a01b039092168252519081900360200190f35b61008a600480360360408110156100e857600080fd5b508035906020013561023c565b6100ac6004803603602081101561010b57600080fd5b50356001600160a01b03166103ab565b6100ac6004803603602081101561013157600080fd5b50356104cc565b60015481565b7f000000000000000000000000000000000000000000000000000000000000000081565b61016a6106cb565b6001600160a01b031661017b61022d565b6001600160a01b0316146101d6576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a36000805473ffffffffffffffffffffffffffffffffffffffff19169055565b6000546001600160a01b031690565b600082821015610293576040805162461bcd60e51b815260206004820152600f60248201527f42616420626c6f636b2072616e67650000000000000000000000000000000000604482015290519081900360640190fd5b60015480841015806102c557507f00000000000000000000000000000000000000000000000000000000000000008311155b156102d45760009150506103a5565b808311156102e0578092505b7f000000000000000000000000000000000000000000000000000000000000000084101561032c577f000000000000000000000000000000000000000000000000000000000000000093505b60007f00000000000000000000000000000000000000000000000000000000000000008503905060007f0000000000000000000000000000000000000000000000000000000000000000850390506002810a640ab53889fb02828203670767ff4b149a9c00026002840a640ab53889fb02010393505050505b92915050565b6103b36106cb565b6001600160a01b03166103c461022d565b6001600160a01b03161461041f576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b0381166104645760405162461bcd60e51b81526004018080602001828103825260268152602001806106d06026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6104d46106cb565b6001600160a01b03166104e561022d565b6001600160a01b031614610540576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001546248e8c57f00000000000000000000000000000000000000000000000000000000000000000181146105bc576040805162461bcd60e51b815260206004820152601b60248201527f4561726c7920656e6420626c6f636b20616c7265616479207365740000000000604482015290519081900360640190fd5b43821180156105ea57507f000000000000000000000000000000000000000000000000000000000000000082115b61063b576040805162461bcd60e51b815260206004820152601360248201527f456e6420626c6f636b20746f6f206561726c7900000000000000000000000000604482015290519081900360640190fd5b80821061068f576040805162461bcd60e51b815260206004820152601260248201527f456e6420626c6f636b20746f6f206c6174650000000000000000000000000000604482015290519081900360640190fd5b60018290556040805183815290517fbc5ae45eab309a295b8b628bf7c1e3aa926a35a0fe82083c6ac8da8f0a9cca259181900360200190a15050565b339056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373a164736f6c634300060c000a0000000000000000000000000000000000000000000000000000000000be0870
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061007d5760003560e01c80638da5cb5b1161005b5780638da5cb5b146100ae578063a2778311146100d2578063f2fde38b146100f5578063f787f16e1461011b5761007d565b8063083c63231461008257806348cd4cb11461009c578063715018a6146100a4575b600080fd5b61008a610138565b60408051918252519081900360200190f35b61008a61013e565b6100ac610162565b005b6100b661022d565b604080516001600160a01b039092168252519081900360200190f35b61008a600480360360408110156100e857600080fd5b508035906020013561023c565b6100ac6004803603602081101561010b57600080fd5b50356001600160a01b03166103ab565b6100ac6004803603602081101561013157600080fd5b50356104cc565b60015481565b7f0000000000000000000000000000000000000000000000000000000000be087081565b61016a6106cb565b6001600160a01b031661017b61022d565b6001600160a01b0316146101d6576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a36000805473ffffffffffffffffffffffffffffffffffffffff19169055565b6000546001600160a01b031690565b600082821015610293576040805162461bcd60e51b815260206004820152600f60248201527f42616420626c6f636b2072616e67650000000000000000000000000000000000604482015290519081900360640190fd5b60015480841015806102c557507f0000000000000000000000000000000000000000000000000000000000be08708311155b156102d45760009150506103a5565b808311156102e0578092505b7f0000000000000000000000000000000000000000000000000000000000be087084101561032c577f0000000000000000000000000000000000000000000000000000000000be087093505b60007f0000000000000000000000000000000000000000000000000000000000be08708503905060007f0000000000000000000000000000000000000000000000000000000000be0870850390506002810a640ab53889fb02828203670767ff4b149a9c00026002840a640ab53889fb02010393505050505b92915050565b6103b36106cb565b6001600160a01b03166103c461022d565b6001600160a01b03161461041f576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b0381166104645760405162461bcd60e51b81526004018080602001828103825260268152602001806106d06026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6104d46106cb565b6001600160a01b03166104e561022d565b6001600160a01b031614610540576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001546248e8c57f0000000000000000000000000000000000000000000000000000000000be08700181146105bc576040805162461bcd60e51b815260206004820152601b60248201527f4561726c7920656e6420626c6f636b20616c7265616479207365740000000000604482015290519081900360640190fd5b43821180156105ea57507f0000000000000000000000000000000000000000000000000000000000be087082115b61063b576040805162461bcd60e51b815260206004820152601360248201527f456e6420626c6f636b20746f6f206561726c7900000000000000000000000000604482015290519081900360640190fd5b80821061068f576040805162461bcd60e51b815260206004820152601260248201527f456e6420626c6f636b20746f6f206c6174650000000000000000000000000000604482015290519081900360640190fd5b60018290556040805183815290517fbc5ae45eab309a295b8b628bf7c1e3aa926a35a0fe82083c6ac8da8f0a9cca259181900360200190a15050565b339056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373a164736f6c634300060c000a
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000000000000000000000000000000000000000be0870
-----Decoded View---------------
Arg [0] : startBlock_ (uint256): 12454000
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000be0870
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 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.