Feature Tip: Add private address tag to any address under My Name Tag !
ERC-20
Overview
Max Total Supply
34,843,273.320591510162509632 VNIL
Holders
1,845
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract (WITH 18 Decimals)
Balance
517.3314029907476 VNILValue
$0.00Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
VestedNil
Compiler Version
v0.8.6+commit.11564f7e
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT /** @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@( (@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@( @@@@@@@@@@@@@@@@@@@@( @@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@ @@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@( @@@@@@@@@@@@@@@@ @@@@@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@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@( @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ */ pragma solidity 0.8.6; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/utils/math/Math.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "./interfaces/INil.sol"; import "./interfaces/IVestedNil.sol"; import "./interfaces/INilStaking.sol"; contract VestedNil is AccessControl, ERC20, ReentrancyGuard, IVestedNil { using SafeERC20 for INil; event Claim(address indexed claimer, uint256 initialAmount); /// @dev The identifier of the role which maintains other roles. bytes32 public constant ADMIN_ROLE = keccak256("ADMIN"); /// @dev The identifier of the role which allows accounts to mint tokens. bytes32 public constant MINTER_ROLE = keccak256("MINTER"); uint16[] public cumulativeScheduleInBPS; uint256 public immutable timePeriodInSeconds; uint256 public immutable startTime; mapping(address => uint128) public claimedByAccount; INil public immutable nil; INilStaking public nilStaking; constructor( INil nil_, address dao, uint16[] memory cumulativeScheduleInBPS_, uint256 timePeriodInDays ) ERC20("vNil", "VNIL") { _setupRole(MINTER_ROLE, dao); _setupRole(ADMIN_ROLE, dao); _setupRole(MINTER_ROLE, msg.sender); // This will be surrendered after deployment _setupRole(ADMIN_ROLE, msg.sender); // This will be surrendered after deployment _setRoleAdmin(MINTER_ROLE, ADMIN_ROLE); _setRoleAdmin(ADMIN_ROLE, ADMIN_ROLE); nil = nil_; startTime = block.timestamp; cumulativeScheduleInBPS = cumulativeScheduleInBPS_; timePeriodInSeconds = timePeriodInDays * 1 days; } modifier onlyMinter() { require(hasRole(MINTER_ROLE, msg.sender), "VestedNil:MINT_DENIED"); _; } modifier onlyAdmin() { require(hasRole(ADMIN_ROLE, msg.sender), "VestedNil:ACCESS_DENIED"); _; } function multiMint(address[] calldata accounts, uint256[] calldata initialAmounts) external override onlyMinter { for (uint256 i = 0; i < accounts.length; i++) { mint(accounts[i], initialAmounts[i]); } } function mint(address account, uint256 initialAmount) public override onlyMinter { require(totalSupply() + nil.totalSupply() + initialAmount <= nil.MAX_SUPPLY(), "VestedNil:SUPPLY_OVERFLOW"); _mint(account, initialAmount); } function _claim(address account) private returns (uint128 claimable) { claimable = uint128(claimableOf(account)); if (claimable > 0) { claimedByAccount[account] += claimable; _burn(account, claimable); emit Claim(account, claimable); } } function _vestingSnapshot(address account) internal view returns ( uint256, uint256, uint256 ) { uint128 claimed = claimedByAccount[account]; uint256 balance = balanceOf(account); uint256 initialAllocation = balance + claimed; return (_totalVestedOf(initialAllocation, block.timestamp), claimed, balance); } function claim(address recipient) external override nonReentrant { uint256 claimable = _claim(recipient); require(claimable > 0, "VestedNil:NOTHING_VESTED"); nil.mint(recipient, claimable); } function claimAndStake() external override nonReentrant { require(address(nilStaking) != address(0), "VestedNil:STAKING_DISABLED"); uint256 claimable = _claim(msg.sender); require(claimable > 0, "VestedNil:NOTHING_VESTED"); nilStaking.mintAndStake(msg.sender, claimable); } function _totalVestedOf(uint256 initialAllocation, uint256 currentTime) internal view returns (uint256 total) { if (currentTime <= startTime) { return 0; } uint16[] memory _cumulativeScheduleInBPS = cumulativeScheduleInBPS; uint256 elapsed = Math.min(currentTime - startTime, _cumulativeScheduleInBPS.length * timePeriodInSeconds); uint256 currentPeriod = elapsed / timePeriodInSeconds; uint256 elapsedInCurrentPeriod = elapsed % timePeriodInSeconds; uint256 cumulativeMultiplierPast = 0; if (currentPeriod > 0) { cumulativeMultiplierPast = _cumulativeScheduleInBPS[currentPeriod - 1]; total = (initialAllocation * cumulativeMultiplierPast) / 10000; } if (elapsedInCurrentPeriod > 0) { /** currentPeriod can never go out of bounds because after the last period elapsedInCurrentPeriod will always be 0 so we will not enter this block */ uint256 currentMultiplier = _cumulativeScheduleInBPS[currentPeriod] - cumulativeMultiplierPast; uint256 periodAllocation = (initialAllocation * currentMultiplier) / 10000; total += (periodAllocation * elapsedInCurrentPeriod) / timePeriodInSeconds; } } function vestedOf(address account) external view override returns (uint256) { (uint256 vested, , ) = _vestingSnapshot(account); return vested; } function claimableOf(address account) public view override returns (uint256) { (uint256 vested, uint256 claimed, uint256 balance) = _vestingSnapshot(account); return Math.min(vested - claimed, balance); } function setNilStaking(INilStaking nilStaking_) external onlyAdmin { nilStaking = nilStaking_; } function addMinter(address minter) external onlyAdmin { grantRole(MINTER_ROLE, minter); } function _beforeTokenTransfer( address from, address to, uint256 ) internal virtual override { //Allow only mint and burn require(from == address(0) || to == address(0), "VestedNil:TRANSFER_DENIED"); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IAccessControl.sol"; import "../utils/Context.sol"; import "../utils/Strings.sol"; import "../utils/introspection/ERC165.sol"; /** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for those cases see * {AccessControlEnumerable}. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ``` * bytes32 public constant MY_ROLE = keccak256("MY_ROLE"); * ``` * * Roles can be used to represent a set of permissions. To restrict access to a * function call, use {hasRole}: * * ``` * function foo() public { * require(hasRole(MY_ROLE, msg.sender)); * ... * } * ``` * * Roles can be granted and revoked dynamically via the {grantRole} and * {revokeRole} functions. Each role has an associated admin role, and only * accounts that have a role's admin role can call {grantRole} and {revokeRole}. * * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means * that only accounts with this role will be able to grant or revoke other * roles. More complex role relationships can be created by using * {_setRoleAdmin}. * * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to * grant and revoke this role. Extra precautions should be taken to secure * accounts that have been granted it. */ abstract contract AccessControl is Context, IAccessControl, ERC165 { struct RoleData { mapping(address => bool) members; bytes32 adminRole; } mapping(bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Modifier that checks that an account has a specific role. Reverts * with a standardized message including the required role. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ * * _Available since v4.1._ */ modifier onlyRole(bytes32 role) { _checkRole(role, _msgSender()); _; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) public view override returns (bool) { return _roles[role].members[account]; } /** * @dev Revert with a standard message if `account` is missing `role`. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ */ function _checkRole(bytes32 role, address account) internal view { if (!hasRole(role, account)) { revert( string( abi.encodePacked( "AccessControl: account ", Strings.toHexString(uint160(account), 20), " is missing role ", Strings.toHexString(uint256(role), 32) ) ) ); } } /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) public view override returns (bytes32) { return _roles[role].adminRole; } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _grantRole(role, account); } /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _revokeRole(role, account); } /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) public virtual override { require(account == _msgSender(), "AccessControl: can only renounce roles for self"); _revokeRole(role, account); } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. Note that unlike {grantRole}, this function doesn't perform any * checks on the calling account. * * [WARNING] * ==== * This function should only be called from the constructor when setting * up the initial roles for the system. * * Using this function in any other way is effectively circumventing the admin * system imposed by {AccessControl}. * ==== */ function _setupRole(bytes32 role, address account) internal virtual { _grantRole(role, account); } /** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { bytes32 previousAdminRole = getRoleAdmin(role); _roles[role].adminRole = adminRole; emit RoleAdminChanged(role, previousAdminRole, adminRole); } function _grantRole(bytes32 role, address account) private { if (!hasRole(role, account)) { _roles[role].members[account] = true; emit RoleGranted(role, account, _msgSender()); } } function _revokeRole(bytes32 role, address account) private { if (hasRole(role, account)) { _roles[role].members[account] = false; emit RoleRevoked(role, account, _msgSender()); } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev External interface of AccessControl declared to support ERC165 detection. */ interface IAccessControl { /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. * * _Available since v3.1._ */ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call, an admin role * bearer except when using {AccessControl-_setupRole}. */ event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) external view returns (bool); /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {AccessControl-_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) external view returns (bytes32); /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) external; /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) external; /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and make it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IERC20.sol"; import "./extensions/IERC20Metadata.sol"; import "../../utils/Context.sol"; /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our guide * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * We have followed general OpenZeppelin Contracts guidelines: functions revert * instead returning `false` on failure. This behavior is nonetheless * conventional and does not conflict with the expectations of ERC20 * applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {name} and {symbol}. * * The default value of {decimals} is 18. To select a different value for * {decimals} you should overload it. * * All two of these values are immutable: they can only be set once during * construction. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev Returns the name of the token. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5.05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless this function is * overridden; * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual override returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * Requirements: * * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. * - the caller must have allowance for ``sender``'s tokens of at least * `amount`. */ function transferFrom( address sender, address recipient, uint256 amount ) public virtual override returns (bool) { _transfer(sender, recipient, amount); uint256 currentAllowance = _allowances[sender][_msgSender()]; require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance"); unchecked { _approve(sender, _msgSender(), currentAllowance - amount); } return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { uint256 currentAllowance = _allowances[_msgSender()][spender]; require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); unchecked { _approve(_msgSender(), spender, currentAllowance - subtractedValue); } return true; } /** * @dev Moves `amount` of tokens from `sender` to `recipient`. * * This internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `sender` cannot be the zero address. * - `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. */ function _transfer( address sender, address recipient, uint256 amount ) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(sender, recipient, amount); uint256 senderBalance = _balances[sender]; require(senderBalance >= amount, "ERC20: transfer amount exceeds balance"); unchecked { _balances[sender] = senderBalance - amount; } _balances[recipient] += amount; emit Transfer(sender, recipient, amount); _afterTokenTransfer(sender, recipient, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply += amount; _balances[account] += amount; emit Transfer(address(0), account, amount); _afterTokenTransfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); uint256 accountBalance = _balances[account]; require(accountBalance >= amount, "ERC20: burn amount exceeds balance"); unchecked { _balances[account] = accountBalance - amount; } _totalSupply -= amount; emit Transfer(account, address(0), amount); _afterTokenTransfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve( address owner, address spender, uint256 amount ) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * has been transferred to `to`. * - when `from` is zero, `amount` tokens have been minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens have been burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 amount ) internal virtual {} }
// SPDX-License-Identifier: MIT 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); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../IERC20.sol"; /** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */ interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../IERC20.sol"; import "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; function safeTransfer( IERC20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20 token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT 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; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a >= b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a / b + (a % b == 0 ? 0 : 1); } }
// SPDX-License-Identifier: MIT /** @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@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@@@ @@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@ @@@@@@@ @@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@( @@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@( @@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@ @@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@( @@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@( @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ */ pragma solidity 0.8.6; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; interface INil is IERC20 { function MAX_SUPPLY() external returns (uint256); function mint(address to, uint256 amount) external; }
// SPDX-License-Identifier: MIT /** @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@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@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ */ pragma solidity 0.8.6; interface INilStaking { function stake(uint256 amount) external; function mintAndStake(address account, uint256 amount) external; function unstake(uint256 amount) external; }
// SPDX-License-Identifier: MIT /** @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@( (@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@( @@@@@@@@@@@@@@@@@@@@( @@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@ @@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@( @@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@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@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ */ pragma solidity 0.8.6; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; interface IVestedNil is IERC20 { function multiMint(address[] calldata accounts, uint256[] calldata amounts) external; function mint(address account, uint256 amount) external; function claim(address account) external; function claimAndStake() external; function vestedOf(address account) external view returns (uint256); function claimableOf(address account) external view returns (uint256); }
{ "evmVersion": "berlin", "libraries": {}, "metadata": { "bytecodeHash": "none", "useLiteralContent": true }, "optimizer": { "enabled": true, "runs": 800 }, "remappings": [], "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"contract INil","name":"nil_","type":"address"},{"internalType":"address","name":"dao","type":"address"},{"internalType":"uint16[]","name":"cumulativeScheduleInBPS_","type":"uint16[]"},{"internalType":"uint256","name":"timePeriodInDays","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"claimer","type":"address"},{"indexed":false,"internalType":"uint256","name":"initialAmount","type":"uint256"}],"name":"Claim","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINTER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"minter","type":"address"}],"name":"addMinter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimAndStake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"claimableOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"claimedByAccount","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"cumulativeScheduleInBPS","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"initialAmount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"initialAmounts","type":"uint256[]"}],"name":"multiMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nil","outputs":[{"internalType":"contract INil","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nilStaking","outputs":[{"internalType":"contract INilStaking","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract INilStaking","name":"nilStaking_","type":"address"}],"name":"setNilStaking","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"timePeriodInSeconds","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"vestedOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60e06040523480156200001157600080fd5b506040516200287a3803806200287a8339810160408190526200003491620003f2565b6040805180820182526004808252631d939a5b60e21b60208084019182528451808601909552828552631593925360e21b9085015282519293926200007b9291906200028e565b508051620000919060059060208401906200028e565b5050600160065550620000b46000805160206200283a8339815191528462000193565b620000cf6000805160206200285a8339815191528462000193565b620000ea6000805160206200283a8339815191523362000193565b620001056000805160206200285a8339815191523362000193565b6200012f6000805160206200283a8339815191526000805160206200285a833981519152620001a3565b6200014a6000805160206200285a83398151915280620001a3565b6001600160601b0319606085901b1660c0524260a0528151620001759060079060208501906200031d565b50620001858162015180620004ff565b608052506200059992505050565b6200019f8282620001ee565b5050565b600082815260208190526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff166200019f576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556200024a3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b8280546200029c906200052d565b90600052602060002090601f016020900481019282620002c057600085556200030b565b82601f10620002db57805160ff19168380011785556200030b565b828001600101855582156200030b579182015b828111156200030b578251825591602001919060010190620002ee565b5062000319929150620003c3565b5090565b82805482825590600052602060002090600f016010900481019282156200030b5791602002820160005b838211156200038957835183826101000a81548161ffff021916908361ffff160217905550926020019260020160208160010104928301926001030262000347565b8015620003b95782816101000a81549061ffff021916905560020160208160010104928301926001030262000389565b5050620003199291505b5b80821115620003195760008155600101620003c4565b805161ffff81168114620003ed57600080fd5b919050565b600080600080608085870312156200040957600080fd5b8451620004168162000580565b809450506020808601516200042b8162000580565b60408701519094506001600160401b03808211156200044957600080fd5b818801915088601f8301126200045e57600080fd5b8151818111156200047357620004736200056a565b8060051b604051601f19603f830116810181811085821117156200049b576200049b6200056a565b604052828152858101935084860182860187018d1015620004bb57600080fd5b600095505b83861015620004e957620004d481620003da565b855260019590950194938601938601620004c0565b5060609a909a0151989b979a5050505050505050565b60008160001904831182151516156200052857634e487b7160e01b600052601160045260246000fd5b500290565b600181811c908216806200054257607f821691505b602082108114156200056457634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146200059657600080fd5b50565b60805160a05160c05160601c61222f6200060b600039600081816102dd0152818161079901528181610b1a0152610bae01526000818161042701528181611b750152611c2601526000818161037701528181611c5201528181611c8b01528181611cb90152611d7e015261222f6000f3fe608060405234801561001057600080fd5b50600436106102265760003560e01c806375b238fc1161012a578063983b2d56116100bd578063cb1a4fc01161008c578063d539139311610071578063d53913931461055e578063d547741f14610585578063dd62ed3e1461059857600080fd5b8063cb1a4fc014610543578063d0cf0ca31461054b57600080fd5b8063983b2d5614610502578063a217fddf14610515578063a457c2d71461051d578063a9059cbb1461053057600080fd5b80638d8833c8116100f95780638d8833c81461049d57806391d14854146104b057806394477104146104e757806395d89b41146104fa57600080fd5b806375b238fc146103fb57806378e97925146104225780638903ab9d146104495780638acc846f1461045c57600080fd5b80632f2ff15d116101bd578063395093511161018c57806340c10f191161017157806340c10f19146103995780635694cb0a146103ac57806370a08231146103d257600080fd5b8063395093511461035f5780633ac88a551461037257600080fd5b80632f2ff15d146103175780632f81bc711461032a578063313ce5671461033d57806336568abe1461034c57600080fd5b80631e83409a116101f95780631e83409a1461028d57806323b872dd146102a2578063248a9ca3146102b55780632c22f455146102d857600080fd5b806301ffc9a71461022b57806306fdde0314610253578063095ea7b31461026857806318160ddd1461027b575b600080fd5b61023e610239366004611f84565b6105d1565b60405190151581526020015b60405180910390f35b61025b610608565b60405161024a9190612048565b61023e610276366004611eae565b61069a565b6003545b60405190815260200161024a565b6102a061029b366004611e17565b6106b0565b005b61023e6102b0366004611e6d565b6107fe565b61027f6102c3366004611f46565b60009081526020819052604090206001015490565b6102ff7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161024a565b6102a0610325366004611f5f565b6108bd565b6102a0610338366004611eda565b6108e8565b6040516012815260200161024a565b6102a061035a366004611f5f565b6109d2565b61023e61036d366004611eae565b610a5e565b61027f7f000000000000000000000000000000000000000000000000000000000000000081565b6102a06103a7366004611eae565b610a9a565b6103bf6103ba366004611f46565b610cac565b60405161ffff909116815260200161024a565b61027f6103e0366004611e17565b6001600160a01b031660009081526001602052604090205490565b61027f7fdf8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec4281565b61027f7f000000000000000000000000000000000000000000000000000000000000000081565b61027f610457366004611e17565b610ce4565b61048561046a366004611e17565b6008602052600090815260409020546001600160801b031681565b6040516001600160801b03909116815260200161024a565b6102a06104ab366004611e17565b610d16565b61023e6104be366004611f5f565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b61027f6104f5366004611e17565b610dce565b61025b610de4565b6102a0610510366004611e17565b610df3565b61027f600081565b61023e61052b366004611eae565b610e9e565b61023e61053e366004611eae565b610f4f565b6102a0610f5c565b6009546102ff906001600160a01b031681565b61027f7ff0887ba65ee2024ea881d91b74c2450ef19e1557f03bed3ea9f16b037cbe2dc981565b6102a0610593366004611f5f565b6110de565b61027f6105a6366004611e34565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b60006001600160e01b03198216637965db0b60e01b148061060257506301ffc9a760e01b6001600160e01b03198316145b92915050565b6060600480546106179061214b565b80601f01602080910402602001604051908101604052809291908181526020018280546106439061214b565b80156106905780601f1061066557610100808354040283529160200191610690565b820191906000526020600020905b81548152906001019060200180831161067357829003601f168201915b5050505050905090565b60006106a7338484611104565b50600192915050565b600260065414156107085760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b6002600655600061071882611228565b6001600160801b03169050600081116107735760405162461bcd60e51b815260206004820152601860248201527f5665737465644e696c3a4e4f5448494e475f564553544544000000000000000060448201526064016106ff565b6040516340c10f1960e01b81526001600160a01b038381166004830152602482018390527f000000000000000000000000000000000000000000000000000000000000000016906340c10f1990604401600060405180830381600087803b1580156107dd57600080fd5b505af11580156107f1573d6000803e3d6000fd5b5050600160065550505050565b600061080b8484846112f9565b6001600160a01b0384166000908152600260209081526040808320338452909152902054828110156108a55760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206160448201527f6c6c6f77616e636500000000000000000000000000000000000000000000000060648201526084016106ff565b6108b28533858403611104565b506001949350505050565b6000828152602081905260409020600101546108d98133611503565b6108e38383611581565b505050565b3360009081527f213adc0a84cc939081f025f2b699be0ed944ae23aa7816da33f513ef6fc3cdfb602052604090205460ff166109665760405162461bcd60e51b815260206004820152601560248201527f5665737465644e696c3a4d494e545f44454e494544000000000000000000000060448201526064016106ff565b60005b838110156109cb576109b9858583818110610986576109866121e1565b905060200201602081019061099b9190611e17565b8484848181106109ad576109ad6121e1565b90506020020135610a9a565b806109c381612186565b915050610969565b5050505050565b6001600160a01b0381163314610a505760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084016106ff565b610a5a828261161f565b5050565b3360008181526002602090815260408083206001600160a01b038716845290915281205490916106a7918590610a959086906120a6565b611104565b3360009081527f213adc0a84cc939081f025f2b699be0ed944ae23aa7816da33f513ef6fc3cdfb602052604090205460ff16610b185760405162461bcd60e51b815260206004820152601560248201527f5665737465644e696c3a4d494e545f44454e494544000000000000000000000060448201526064016106ff565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166332cb6b0c6040518163ffffffff1660e01b8152600401602060405180830381600087803b158015610b7357600080fd5b505af1158015610b87573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bab9190611fae565b817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b158015610c0557600080fd5b505afa158015610c19573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c3d9190611fae565b600354610c4a91906120a6565b610c5491906120a6565b1115610ca25760405162461bcd60e51b815260206004820152601960248201527f5665737465644e696c3a535550504c595f4f564552464c4f570000000000000060448201526064016106ff565b610a5a828261169e565b60078181548110610cbc57600080fd5b9060005260206000209060109182820401919006600202915054906101000a900461ffff1681565b600080600080610cf385611789565b91945092509050610d0d610d0783856120f1565b826117ed565b95945050505050565b3360009081527f5cbfc8ee58ca47855df7bcf648dd304ddb6b932f9b87878bdf6318d7ec7ee5b7602052604090205460ff16610d945760405162461bcd60e51b815260206004820152601760248201527f5665737465644e696c3a4143434553535f44454e49454400000000000000000060448201526064016106ff565b600980547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b600080610dda83611789565b5090949350505050565b6060600580546106179061214b565b3360009081527f5cbfc8ee58ca47855df7bcf648dd304ddb6b932f9b87878bdf6318d7ec7ee5b7602052604090205460ff16610e715760405162461bcd60e51b815260206004820152601760248201527f5665737465644e696c3a4143434553535f44454e49454400000000000000000060448201526064016106ff565b610e9b7ff0887ba65ee2024ea881d91b74c2450ef19e1557f03bed3ea9f16b037cbe2dc9826108bd565b50565b3360009081526002602090815260408083206001600160a01b038616845290915281205482811015610f385760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f00000000000000000000000000000000000000000000000000000060648201526084016106ff565b610f453385858403611104565b5060019392505050565b60006106a73384846112f9565b60026006541415610faf5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016106ff565b60026006556009546001600160a01b031661100c5760405162461bcd60e51b815260206004820152601a60248201527f5665737465644e696c3a5354414b494e475f44495341424c454400000000000060448201526064016106ff565b600061101733611228565b6001600160801b03169050600081116110725760405162461bcd60e51b815260206004820152601860248201527f5665737465644e696c3a4e4f5448494e475f564553544544000000000000000060448201526064016106ff565b6009546040516308c2ba2760e21b8152336004820152602481018390526001600160a01b039091169063230ae89c90604401600060405180830381600087803b1580156110be57600080fd5b505af11580156110d2573d6000803e3d6000fd5b50506001600655505050565b6000828152602081905260409020600101546110fa8133611503565b6108e3838361161f565b6001600160a01b0383166111665760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016106ff565b6001600160a01b0382166111c75760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016106ff565b6001600160a01b0383811660008181526002602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b600061123382610ce4565b90506001600160801b038116156112f4576001600160a01b038216600090815260086020526040812080548392906112759084906001600160801b031661207b565b92506101000a8154816001600160801b0302191690836001600160801b031602179055506112ac82826001600160801b0316611805565b6040516001600160801b03821681526001600160a01b038316907f47cee97cb7acd717b3c0aa1435d004cd5b3c8c57d70dbceb4e4458bbd60e39d49060200160405180910390a25b919050565b6001600160a01b0383166113755760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f647265737300000000000000000000000000000000000000000000000000000060648201526084016106ff565b6001600160a01b0382166113d75760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016106ff565b6113e283838361195f565b6001600160a01b038316600090815260016020526040902054818110156114715760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e6365000000000000000000000000000000000000000000000000000060648201526084016106ff565b6001600160a01b038085166000908152600160205260408082208585039055918516815290812080548492906114a89084906120a6565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516114f491815260200190565b60405180910390a35b50505050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16610a5a5761153f816001600160a01b031660146119c8565b61154a8360206119c8565b60405160200161155b929190611fc7565b60408051601f198184030181529082905262461bcd60e51b82526106ff91600401612048565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16610a5a576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556115db3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1615610a5a576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6001600160a01b0382166116f45760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016106ff565b6117006000838361195f565b806003600082825461171291906120a6565b90915550506001600160a01b0382166000908152600160205260408120805483929061173f9084906120a6565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6001600160a01b0381166000908152600860209081526040808320546001909252822054829182916001600160801b0390911690826117c883836120a6565b90506117d48142611b71565b9550506001600160801b03909116925090509193909250565b60008183106117fc57816117fe565b825b9392505050565b6001600160a01b0382166118655760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b60648201526084016106ff565b6118718260008361195f565b6001600160a01b038216600090815260016020526040902054818110156118e55760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b60648201526084016106ff565b6001600160a01b03831660009081526001602052604081208383039055600380548492906119149084906120f1565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b6001600160a01b038316158061197c57506001600160a01b038216155b6108e35760405162461bcd60e51b815260206004820152601960248201527f5665737465644e696c3a5452414e534645525f44454e4945440000000000000060448201526064016106ff565b606060006119d78360026120d2565b6119e29060026120a6565b67ffffffffffffffff8111156119fa576119fa6121f7565b6040519080825280601f01601f191660200182016040528015611a24576020820181803683370190505b509050600360fc1b81600081518110611a3f57611a3f6121e1565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110611a6e57611a6e6121e1565b60200101906001600160f81b031916908160001a9053506000611a928460026120d2565b611a9d9060016120a6565b90505b6001811115611b22577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110611ade57611ade6121e1565b1a60f81b828281518110611af457611af46121e1565b60200101906001600160f81b031916908160001a90535060049490941c93611b1b81612134565b9050611aa0565b5083156117fe5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016106ff565b60007f00000000000000000000000000000000000000000000000000000000000000008211611ba257506000610602565b60006007805480602002602001604051908101604052809291908181526020018280548015611c1857602002820191906000526020600020906000905b82829054906101000a900461ffff1661ffff1681526020019060020190602082600101049283019260010382029150808411611bdf5790505b505050505090506000611c827f000000000000000000000000000000000000000000000000000000000000000085611c5091906120f1565b7f00000000000000000000000000000000000000000000000000000000000000008451611c7d91906120d2565b6117ed565b90506000611cb07f0000000000000000000000000000000000000000000000000000000000000000836120be565b90506000611cde7f0000000000000000000000000000000000000000000000000000000000000000846121a1565b905060008215611d2e5784611cf46001856120f1565b81518110611d0457611d046121e1565b602002602001015161ffff1690506127108189611d2191906120d2565b611d2b91906120be565b95505b8115611dc057600081868581518110611d4957611d496121e1565b602002602001015161ffff16611d5f91906120f1565b90506000612710611d70838c6120d2565b611d7a91906120be565b90507f0000000000000000000000000000000000000000000000000000000000000000611da785836120d2565b611db191906120be565b611dbb90896120a6565b975050505b505050505092915050565b60008083601f840112611ddd57600080fd5b50813567ffffffffffffffff811115611df557600080fd5b6020830191508360208260051b8501011115611e1057600080fd5b9250929050565b600060208284031215611e2957600080fd5b81356117fe8161220d565b60008060408385031215611e4757600080fd5b8235611e528161220d565b91506020830135611e628161220d565b809150509250929050565b600080600060608486031215611e8257600080fd5b8335611e8d8161220d565b92506020840135611e9d8161220d565b929592945050506040919091013590565b60008060408385031215611ec157600080fd5b8235611ecc8161220d565b946020939093013593505050565b60008060008060408587031215611ef057600080fd5b843567ffffffffffffffff80821115611f0857600080fd5b611f1488838901611dcb565b90965094506020870135915080821115611f2d57600080fd5b50611f3a87828801611dcb565b95989497509550505050565b600060208284031215611f5857600080fd5b5035919050565b60008060408385031215611f7257600080fd5b823591506020830135611e628161220d565b600060208284031215611f9657600080fd5b81356001600160e01b0319811681146117fe57600080fd5b600060208284031215611fc057600080fd5b5051919050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351611fff816017850160208801612108565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000601791840191820152835161203c816028840160208801612108565b01602801949350505050565b6020815260008251806020840152612067816040850160208701612108565b601f01601f19169190910160400192915050565b60006001600160801b0380831681851680830382111561209d5761209d6121b5565b01949350505050565b600082198211156120b9576120b96121b5565b500190565b6000826120cd576120cd6121cb565b500490565b60008160001904831182151516156120ec576120ec6121b5565b500290565b600082821015612103576121036121b5565b500390565b60005b8381101561212357818101518382015260200161210b565b838111156114fd5750506000910152565b600081612143576121436121b5565b506000190190565b600181811c9082168061215f57607f821691505b6020821081141561218057634e487b7160e01b600052602260045260246000fd5b50919050565b600060001982141561219a5761219a6121b5565b5060010190565b6000826121b0576121b06121cb565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114610e9b57600080fdfea164736f6c6343000806000af0887ba65ee2024ea881d91b74c2450ef19e1557f03bed3ea9f16b037cbe2dc9df8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec4200000000000000000000000047252a63c723889814aebcac0683e615624cec640000000000000000000000009073ba45b25774a32cae9bf4a67e49c82a8a37fa000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000a7000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000003e80000000000000000000000000000000000000000000000000000000000000bb800000000000000000000000000000000000000000000000000000000000017700000000000000000000000000000000000000000000000000000000000002710
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106102265760003560e01c806375b238fc1161012a578063983b2d56116100bd578063cb1a4fc01161008c578063d539139311610071578063d53913931461055e578063d547741f14610585578063dd62ed3e1461059857600080fd5b8063cb1a4fc014610543578063d0cf0ca31461054b57600080fd5b8063983b2d5614610502578063a217fddf14610515578063a457c2d71461051d578063a9059cbb1461053057600080fd5b80638d8833c8116100f95780638d8833c81461049d57806391d14854146104b057806394477104146104e757806395d89b41146104fa57600080fd5b806375b238fc146103fb57806378e97925146104225780638903ab9d146104495780638acc846f1461045c57600080fd5b80632f2ff15d116101bd578063395093511161018c57806340c10f191161017157806340c10f19146103995780635694cb0a146103ac57806370a08231146103d257600080fd5b8063395093511461035f5780633ac88a551461037257600080fd5b80632f2ff15d146103175780632f81bc711461032a578063313ce5671461033d57806336568abe1461034c57600080fd5b80631e83409a116101f95780631e83409a1461028d57806323b872dd146102a2578063248a9ca3146102b55780632c22f455146102d857600080fd5b806301ffc9a71461022b57806306fdde0314610253578063095ea7b31461026857806318160ddd1461027b575b600080fd5b61023e610239366004611f84565b6105d1565b60405190151581526020015b60405180910390f35b61025b610608565b60405161024a9190612048565b61023e610276366004611eae565b61069a565b6003545b60405190815260200161024a565b6102a061029b366004611e17565b6106b0565b005b61023e6102b0366004611e6d565b6107fe565b61027f6102c3366004611f46565b60009081526020819052604090206001015490565b6102ff7f00000000000000000000000047252a63c723889814aebcac0683e615624cec6481565b6040516001600160a01b03909116815260200161024a565b6102a0610325366004611f5f565b6108bd565b6102a0610338366004611eda565b6108e8565b6040516012815260200161024a565b6102a061035a366004611f5f565b6109d2565b61023e61036d366004611eae565b610a5e565b61027f7f0000000000000000000000000000000000000000000000000000000000dc2a8081565b6102a06103a7366004611eae565b610a9a565b6103bf6103ba366004611f46565b610cac565b60405161ffff909116815260200161024a565b61027f6103e0366004611e17565b6001600160a01b031660009081526001602052604090205490565b61027f7fdf8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec4281565b61027f7f00000000000000000000000000000000000000000000000000000000617a81c881565b61027f610457366004611e17565b610ce4565b61048561046a366004611e17565b6008602052600090815260409020546001600160801b031681565b6040516001600160801b03909116815260200161024a565b6102a06104ab366004611e17565b610d16565b61023e6104be366004611f5f565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b61027f6104f5366004611e17565b610dce565b61025b610de4565b6102a0610510366004611e17565b610df3565b61027f600081565b61023e61052b366004611eae565b610e9e565b61023e61053e366004611eae565b610f4f565b6102a0610f5c565b6009546102ff906001600160a01b031681565b61027f7ff0887ba65ee2024ea881d91b74c2450ef19e1557f03bed3ea9f16b037cbe2dc981565b6102a0610593366004611f5f565b6110de565b61027f6105a6366004611e34565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b60006001600160e01b03198216637965db0b60e01b148061060257506301ffc9a760e01b6001600160e01b03198316145b92915050565b6060600480546106179061214b565b80601f01602080910402602001604051908101604052809291908181526020018280546106439061214b565b80156106905780601f1061066557610100808354040283529160200191610690565b820191906000526020600020905b81548152906001019060200180831161067357829003601f168201915b5050505050905090565b60006106a7338484611104565b50600192915050565b600260065414156107085760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b6002600655600061071882611228565b6001600160801b03169050600081116107735760405162461bcd60e51b815260206004820152601860248201527f5665737465644e696c3a4e4f5448494e475f564553544544000000000000000060448201526064016106ff565b6040516340c10f1960e01b81526001600160a01b038381166004830152602482018390527f00000000000000000000000047252a63c723889814aebcac0683e615624cec6416906340c10f1990604401600060405180830381600087803b1580156107dd57600080fd5b505af11580156107f1573d6000803e3d6000fd5b5050600160065550505050565b600061080b8484846112f9565b6001600160a01b0384166000908152600260209081526040808320338452909152902054828110156108a55760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206160448201527f6c6c6f77616e636500000000000000000000000000000000000000000000000060648201526084016106ff565b6108b28533858403611104565b506001949350505050565b6000828152602081905260409020600101546108d98133611503565b6108e38383611581565b505050565b3360009081527f213adc0a84cc939081f025f2b699be0ed944ae23aa7816da33f513ef6fc3cdfb602052604090205460ff166109665760405162461bcd60e51b815260206004820152601560248201527f5665737465644e696c3a4d494e545f44454e494544000000000000000000000060448201526064016106ff565b60005b838110156109cb576109b9858583818110610986576109866121e1565b905060200201602081019061099b9190611e17565b8484848181106109ad576109ad6121e1565b90506020020135610a9a565b806109c381612186565b915050610969565b5050505050565b6001600160a01b0381163314610a505760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084016106ff565b610a5a828261161f565b5050565b3360008181526002602090815260408083206001600160a01b038716845290915281205490916106a7918590610a959086906120a6565b611104565b3360009081527f213adc0a84cc939081f025f2b699be0ed944ae23aa7816da33f513ef6fc3cdfb602052604090205460ff16610b185760405162461bcd60e51b815260206004820152601560248201527f5665737465644e696c3a4d494e545f44454e494544000000000000000000000060448201526064016106ff565b7f00000000000000000000000047252a63c723889814aebcac0683e615624cec646001600160a01b03166332cb6b0c6040518163ffffffff1660e01b8152600401602060405180830381600087803b158015610b7357600080fd5b505af1158015610b87573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bab9190611fae565b817f00000000000000000000000047252a63c723889814aebcac0683e615624cec646001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b158015610c0557600080fd5b505afa158015610c19573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c3d9190611fae565b600354610c4a91906120a6565b610c5491906120a6565b1115610ca25760405162461bcd60e51b815260206004820152601960248201527f5665737465644e696c3a535550504c595f4f564552464c4f570000000000000060448201526064016106ff565b610a5a828261169e565b60078181548110610cbc57600080fd5b9060005260206000209060109182820401919006600202915054906101000a900461ffff1681565b600080600080610cf385611789565b91945092509050610d0d610d0783856120f1565b826117ed565b95945050505050565b3360009081527f5cbfc8ee58ca47855df7bcf648dd304ddb6b932f9b87878bdf6318d7ec7ee5b7602052604090205460ff16610d945760405162461bcd60e51b815260206004820152601760248201527f5665737465644e696c3a4143434553535f44454e49454400000000000000000060448201526064016106ff565b600980547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b600080610dda83611789565b5090949350505050565b6060600580546106179061214b565b3360009081527f5cbfc8ee58ca47855df7bcf648dd304ddb6b932f9b87878bdf6318d7ec7ee5b7602052604090205460ff16610e715760405162461bcd60e51b815260206004820152601760248201527f5665737465644e696c3a4143434553535f44454e49454400000000000000000060448201526064016106ff565b610e9b7ff0887ba65ee2024ea881d91b74c2450ef19e1557f03bed3ea9f16b037cbe2dc9826108bd565b50565b3360009081526002602090815260408083206001600160a01b038616845290915281205482811015610f385760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f00000000000000000000000000000000000000000000000000000060648201526084016106ff565b610f453385858403611104565b5060019392505050565b60006106a73384846112f9565b60026006541415610faf5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016106ff565b60026006556009546001600160a01b031661100c5760405162461bcd60e51b815260206004820152601a60248201527f5665737465644e696c3a5354414b494e475f44495341424c454400000000000060448201526064016106ff565b600061101733611228565b6001600160801b03169050600081116110725760405162461bcd60e51b815260206004820152601860248201527f5665737465644e696c3a4e4f5448494e475f564553544544000000000000000060448201526064016106ff565b6009546040516308c2ba2760e21b8152336004820152602481018390526001600160a01b039091169063230ae89c90604401600060405180830381600087803b1580156110be57600080fd5b505af11580156110d2573d6000803e3d6000fd5b50506001600655505050565b6000828152602081905260409020600101546110fa8133611503565b6108e3838361161f565b6001600160a01b0383166111665760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016106ff565b6001600160a01b0382166111c75760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016106ff565b6001600160a01b0383811660008181526002602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b600061123382610ce4565b90506001600160801b038116156112f4576001600160a01b038216600090815260086020526040812080548392906112759084906001600160801b031661207b565b92506101000a8154816001600160801b0302191690836001600160801b031602179055506112ac82826001600160801b0316611805565b6040516001600160801b03821681526001600160a01b038316907f47cee97cb7acd717b3c0aa1435d004cd5b3c8c57d70dbceb4e4458bbd60e39d49060200160405180910390a25b919050565b6001600160a01b0383166113755760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f647265737300000000000000000000000000000000000000000000000000000060648201526084016106ff565b6001600160a01b0382166113d75760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016106ff565b6113e283838361195f565b6001600160a01b038316600090815260016020526040902054818110156114715760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e6365000000000000000000000000000000000000000000000000000060648201526084016106ff565b6001600160a01b038085166000908152600160205260408082208585039055918516815290812080548492906114a89084906120a6565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516114f491815260200190565b60405180910390a35b50505050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16610a5a5761153f816001600160a01b031660146119c8565b61154a8360206119c8565b60405160200161155b929190611fc7565b60408051601f198184030181529082905262461bcd60e51b82526106ff91600401612048565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16610a5a576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556115db3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1615610a5a576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6001600160a01b0382166116f45760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016106ff565b6117006000838361195f565b806003600082825461171291906120a6565b90915550506001600160a01b0382166000908152600160205260408120805483929061173f9084906120a6565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6001600160a01b0381166000908152600860209081526040808320546001909252822054829182916001600160801b0390911690826117c883836120a6565b90506117d48142611b71565b9550506001600160801b03909116925090509193909250565b60008183106117fc57816117fe565b825b9392505050565b6001600160a01b0382166118655760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b60648201526084016106ff565b6118718260008361195f565b6001600160a01b038216600090815260016020526040902054818110156118e55760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b60648201526084016106ff565b6001600160a01b03831660009081526001602052604081208383039055600380548492906119149084906120f1565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b6001600160a01b038316158061197c57506001600160a01b038216155b6108e35760405162461bcd60e51b815260206004820152601960248201527f5665737465644e696c3a5452414e534645525f44454e4945440000000000000060448201526064016106ff565b606060006119d78360026120d2565b6119e29060026120a6565b67ffffffffffffffff8111156119fa576119fa6121f7565b6040519080825280601f01601f191660200182016040528015611a24576020820181803683370190505b509050600360fc1b81600081518110611a3f57611a3f6121e1565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110611a6e57611a6e6121e1565b60200101906001600160f81b031916908160001a9053506000611a928460026120d2565b611a9d9060016120a6565b90505b6001811115611b22577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110611ade57611ade6121e1565b1a60f81b828281518110611af457611af46121e1565b60200101906001600160f81b031916908160001a90535060049490941c93611b1b81612134565b9050611aa0565b5083156117fe5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016106ff565b60007f00000000000000000000000000000000000000000000000000000000617a81c88211611ba257506000610602565b60006007805480602002602001604051908101604052809291908181526020018280548015611c1857602002820191906000526020600020906000905b82829054906101000a900461ffff1661ffff1681526020019060020190602082600101049283019260010382029150808411611bdf5790505b505050505090506000611c827f00000000000000000000000000000000000000000000000000000000617a81c885611c5091906120f1565b7f0000000000000000000000000000000000000000000000000000000000dc2a808451611c7d91906120d2565b6117ed565b90506000611cb07f0000000000000000000000000000000000000000000000000000000000dc2a80836120be565b90506000611cde7f0000000000000000000000000000000000000000000000000000000000dc2a80846121a1565b905060008215611d2e5784611cf46001856120f1565b81518110611d0457611d046121e1565b602002602001015161ffff1690506127108189611d2191906120d2565b611d2b91906120be565b95505b8115611dc057600081868581518110611d4957611d496121e1565b602002602001015161ffff16611d5f91906120f1565b90506000612710611d70838c6120d2565b611d7a91906120be565b90507f0000000000000000000000000000000000000000000000000000000000dc2a80611da785836120d2565b611db191906120be565b611dbb90896120a6565b975050505b505050505092915050565b60008083601f840112611ddd57600080fd5b50813567ffffffffffffffff811115611df557600080fd5b6020830191508360208260051b8501011115611e1057600080fd5b9250929050565b600060208284031215611e2957600080fd5b81356117fe8161220d565b60008060408385031215611e4757600080fd5b8235611e528161220d565b91506020830135611e628161220d565b809150509250929050565b600080600060608486031215611e8257600080fd5b8335611e8d8161220d565b92506020840135611e9d8161220d565b929592945050506040919091013590565b60008060408385031215611ec157600080fd5b8235611ecc8161220d565b946020939093013593505050565b60008060008060408587031215611ef057600080fd5b843567ffffffffffffffff80821115611f0857600080fd5b611f1488838901611dcb565b90965094506020870135915080821115611f2d57600080fd5b50611f3a87828801611dcb565b95989497509550505050565b600060208284031215611f5857600080fd5b5035919050565b60008060408385031215611f7257600080fd5b823591506020830135611e628161220d565b600060208284031215611f9657600080fd5b81356001600160e01b0319811681146117fe57600080fd5b600060208284031215611fc057600080fd5b5051919050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351611fff816017850160208801612108565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000601791840191820152835161203c816028840160208801612108565b01602801949350505050565b6020815260008251806020840152612067816040850160208701612108565b601f01601f19169190910160400192915050565b60006001600160801b0380831681851680830382111561209d5761209d6121b5565b01949350505050565b600082198211156120b9576120b96121b5565b500190565b6000826120cd576120cd6121cb565b500490565b60008160001904831182151516156120ec576120ec6121b5565b500290565b600082821015612103576121036121b5565b500390565b60005b8381101561212357818101518382015260200161210b565b838111156114fd5750506000910152565b600081612143576121436121b5565b506000190190565b600181811c9082168061215f57607f821691505b6020821081141561218057634e487b7160e01b600052602260045260246000fd5b50919050565b600060001982141561219a5761219a6121b5565b5060010190565b6000826121b0576121b06121cb565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114610e9b57600080fdfea164736f6c6343000806000a
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000047252a63c723889814aebcac0683e615624cec640000000000000000000000009073ba45b25774a32cae9bf4a67e49c82a8a37fa000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000a7000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000003e80000000000000000000000000000000000000000000000000000000000000bb800000000000000000000000000000000000000000000000000000000000017700000000000000000000000000000000000000000000000000000000000002710
-----Decoded View---------------
Arg [0] : nil_ (address): 0x47252A63C723889814AeBcAC0683E615624ceC64
Arg [1] : dao (address): 0x9073Ba45B25774A32CAe9BF4A67E49C82A8a37Fa
Arg [2] : cumulativeScheduleInBPS_ (uint16[]): 1000,3000,6000,10000
Arg [3] : timePeriodInDays (uint256): 167
-----Encoded View---------------
9 Constructor Arguments found :
Arg [0] : 00000000000000000000000047252a63c723889814aebcac0683e615624cec64
Arg [1] : 0000000000000000000000009073ba45b25774a32cae9bf4a67e49c82a8a37fa
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000080
Arg [3] : 00000000000000000000000000000000000000000000000000000000000000a7
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000004
Arg [5] : 00000000000000000000000000000000000000000000000000000000000003e8
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000bb8
Arg [7] : 0000000000000000000000000000000000000000000000000000000000001770
Arg [8] : 0000000000000000000000000000000000000000000000000000000000002710
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.