Address Contract Verified
Address
0xb1800eED85972E0F16cDb052A5A9794F35BA393D
Balance
0 ETH
Nonce
1
Code Size
3791 bytes
Creator
0x3C6Ec51F...6988 at tx 0x0a2ff962...ab2db5
Indexed Transactions
Index loading...
Contract Bytecode
3791 bytes
0x608060405234801561000f575f80fd5b5060043610610184575f3560e01c806386d1a69f116100dd578063b01e74b311610088578063ea87d96711610063578063ea87d967146102f0578063f2fde38b146102f8578063fbccedae1461030b575f80fd5b8063b01e74b3146101e7578063e30c3978146102ca578063e59ac2ea146102e8575f80fd5b806396132521116100b85780639613252114610287578063966abd0014610290578063a2d7f5e3146102a3575f80fd5b806386d1a69f1461025a5780638a75bef9146102625780638da5cb5b1461026a575f80fd5b80633632df391161013d578063715018a611610118578063715018a61461024a57806379ba509714610252578063856de2b21461023f575f80fd5b80633632df39146101f757806348452d18146101ff57806364efeec71461023f575f80fd5b80631e83409a1161016d5780631e83409a146101d257806320988cef146101e757806335b70078146101ef575f80fd5b80630a17b06b1461018857806316d3bfbb146101ae575b5f80fd5b61019b610196366004610ca1565b610313565b6040519081526020015b60405180910390f35b6101b96301e1338081565b60405167ffffffffffffffff90911681526020016101a5565b6101e56101e0366004610cf0565b6104ad565b005b6101b961053e565b6101b9610550565b6101b961056d565b61021a73fe67a4450907459c3e1fff623aa927dd4e28c67a81565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101a5565b6101b96364f66f8081565b6101e561058a565b6101e561059d565b6101e5610619565b6101b9610753565b5f5473ffffffffffffffffffffffffffffffffffffffff1661021a565b61019b60025481565b6101e561029e366004610d0b565b61077e565b61019b7f000000000000000000000000000000000000000000034f086f3b33b68400000081565b60015473ffffffffffffffffffffffffffffffffffffffff1661021a565b6101b96109e2565b6101b9610a26565b6101e5610306366004610cf0565b610a43565b61019b610af2565b5f610323600c6301e13380610da4565b610332600c6301e13380610da4565b610340906301e13380610dca565b61034e906364f66f80610df2565b6103589190610df2565b67ffffffffffffffff168267ffffffffffffffff16101561037a57505f919050565b610389600c6301e13380610da4565b610397906301e13380610df2565b6103a6600c6301e13380610da4565b6103b4906301e13380610dca565b6103c2906364f66f80610df2565b6103cc9190610df2565b67ffffffffffffffff168267ffffffffffffffff161061040d57507f000000000000000000000000000000000000000000034f086f3b33b684000000919050565b61041c600c6301e13380610da4565b61042a906301e13380610df2565b67ffffffffffffffff16610443600c6301e13380610da4565b610451906301e13380610dca565b61045f906364f66f80610df2565b6104699084610dca565b61049d9067ffffffffffffffff167f000000000000000000000000000000000000000000034f086f3b33b684000000610e13565b6104a79190610e2a565b92915050565b6040517f1e83409a00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff821690631e83409a906024016020604051808303815f875af1158015610516573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061053a9190610e3d565b5050565b61054d600c6301e13380610da4565b81565b61055f600c6301e13380610da4565b61054d906301e13380610dca565b61057c600c6301e13380610da4565b61054d906301e13380610df2565b610592610baf565b61059b5f610c01565b565b600154339073ffffffffffffffffffffffffffffffffffffffff16811461060d576040517f118cdaa700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff821660048201526024015b60405180910390fd5b61061681610c01565b50565b5f610622610af2565b90508060025f8282546106359190610e54565b9091555073fe67a4450907459c3e1fff623aa927dd4e28c67a905063a9059cbb6106735f5473ffffffffffffffffffffffffffffffffffffffff1690565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815273ffffffffffffffffffffffffffffffffffffffff9091166004820152602481018490526044016020604051808303815f875af11580156106e2573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107069190610e67565b5060405181815273fe67a4450907459c3e1fff623aa927dd4e28c67a907fc0e523490dd523c33b1878c9eb14ff46991e3f5b2cd33710918618f2a39cba1b9060200160405180910390a250565b610762600c6301e13380610da4565b610770906301e13380610dca565b61054d906364f66f80610df2565b610786610baf565b73ffffffffffffffffffffffffffffffffffffffff81166107d3576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff831673fe67a4450907459c3e1fff623aa927dd4e28c67a14801561089257507f000000000000000000000000000000000000000000034f086f3b33b6840000006002541415806108925750610842600c6301e13380610da4565b610850906301e13380610df2565b61085f600c6301e13380610da4565b61086d906301e13380610dca565b61087b906364f66f80610df2565b6108859190610df2565b67ffffffffffffffff1642105b156108c9576040517f3d693ada00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7fffffffffffffffffffffffff111111111111111111111111111111111111111273ffffffffffffffffffffffffffffffffffffffff84160161094c5760405173ffffffffffffffffffffffffffffffffffffffff82169083156108fc029084905f818181858888f19350505050158015610946573d5f803e3d5ffd5b50505050565b6040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82811660048301526024820184905284169063a9059cbb906044016020604051808303815f875af11580156109be573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906109469190610e67565b6109f1600c6301e13380610da4565b610a00600c6301e13380610da4565b610a0e906301e13380610dca565b610a1c906364f66f80610df2565b61054d9190610df2565b610a35600c6301e13380610da4565b6109f1906301e13380610df2565b610a4b610baf565b6001805473ffffffffffffffffffffffffffffffffffffffff83167fffffffffffffffffffffffff00000000000000000000000000000000000000009091168117909155610aad5f5473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b5f600254610aff42610313565b610b099190610e86565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529091505f9073fe67a4450907459c3e1fff623aa927dd4e28c67a906370a0823190602401602060405180830381865afa158015610b74573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610b989190610e3d565b9050818110610ba75781610ba9565b805b91505090565b5f5473ffffffffffffffffffffffffffffffffffffffff16331461059b576040517f118cdaa7000000000000000000000000000000000000000000000000000000008152336004820152602401610604565b600180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055610616815f805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b5f60208284031215610cb1575f80fd5b813567ffffffffffffffff81168114610cc8575f80fd5b9392505050565b73ffffffffffffffffffffffffffffffffffffffff81168114610616575f80fd5b5f60208284031215610d00575f80fd5b8135610cc881610ccf565b5f805f60608486031215610d1d575f80fd5b8335610d2881610ccf565b9250602084013591506040840135610d3f81610ccf565b809150509250925092565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f67ffffffffffffffff80841680610dbe57610dbe610d4a565b92169190910492915050565b67ffffffffffffffff828116828216039080821115610deb57610deb610d77565b5092915050565b67ffffffffffffffff818116838216019080821115610deb57610deb610d77565b80820281158282048414176104a7576104a7610d77565b5f82610e3857610e38610d4a565b500490565b5f60208284031215610e4d575f80fd5b5051919050565b808201808211156104a7576104a7610d77565b5f60208284031215610e77575f80fd5b81518015158114610cc8575f80fd5b818103818111156104a7576104a7610d7756fea26469706673582212205766d3faf60fda35405e7ce4ebcf15c4d6f359e1e44cae689709e040b7576dcf64736f6c63430008140033
Verified Source Code Full Match
Compiler: v0.8.20+commit.a1b79de6
EVM: shanghai
Optimization: Yes (10000 runs)
ConnextVestingWallet.sol 124 lines
// SPDX-License-Identifier: MIT
pragma solidity 0.8.20;
import {Ownable} from '@openzeppelin/contracts/access/Ownable.sol';
import {Ownable2Step} from '@openzeppelin/contracts/access/Ownable2Step.sol';
import {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';
import {IConnextVestingWallet} from 'interfaces/IConnextVestingWallet.sol';
import {IVestingEscrowSimple} from 'interfaces/IVestingEscrowSimple.sol';
/**
* @title ConnextVestingWallet
* NOTE: The NEXT tokens will be subject to a twenty-four (24) months unlock schedule as follows:
* 1/13 (~7.69% of the token grant) unlocks at the 1 year mark from NEXT token launch,
* and 1/13 unlocks every month thereafter for 12 months. All tokens are unlocked after 24 months.
* https://forum.connext.network/t/rfc-partnership-token-agreements/938
*/
contract ConnextVestingWallet is Ownable2Step, IConnextVestingWallet {
/// @inheritdoc IConnextVestingWallet
uint64 public constant ONE_YEAR = 365 days;
/// @inheritdoc IConnextVestingWallet
uint64 public constant ONE_MONTH = ONE_YEAR / 12;
/// @inheritdoc IConnextVestingWallet
uint64 public constant SEPT_05_2023 = 1_693_872_000;
/// @inheritdoc IConnextVestingWallet
uint64 public constant NEXT_TOKEN_LAUNCH = SEPT_05_2023; // Equals to Sept 5th 2023
/// @inheritdoc IConnextVestingWallet
IERC20 public constant NEXT_TOKEN = IERC20(0xFE67A4450907459c3e1FFf623aA927dD4e28c67a); // Mainnet NEXT token address
/// @inheritdoc IConnextVestingWallet
uint64 public constant UNLOCK_DURATION = ONE_YEAR + ONE_MONTH; // 13 months duration
/// @inheritdoc IConnextVestingWallet
uint64 public constant UNLOCK_CLIFF_DURATION = ONE_MONTH; // 1 month cliff
/// @inheritdoc IConnextVestingWallet
uint64 public constant UNLOCK_OFFSET = ONE_YEAR - ONE_MONTH; // 11 months offset
/// @inheritdoc IConnextVestingWallet
uint64 public constant UNLOCK_START = NEXT_TOKEN_LAUNCH + UNLOCK_OFFSET; // Sept 5th 2024 - 1 month
/// @inheritdoc IConnextVestingWallet
uint64 public constant UNLOCK_CLIFF = UNLOCK_START + UNLOCK_CLIFF_DURATION; // Sept 5th 2024
/// @inheritdoc IConnextVestingWallet
uint64 public constant UNLOCK_END = UNLOCK_START + UNLOCK_DURATION; // Sept 5th 2025
/// @inheritdoc IConnextVestingWallet
uint256 public immutable TOTAL_AMOUNT; // Set into constructor
/// @inheritdoc IConnextVestingWallet
uint256 public released;
/**
* @param _owner The address of the beneficiary
* @param _totalAmount The total amount of tokens to be unlocked
*/
constructor(address _owner, uint256 _totalAmount) Ownable(_owner) {
TOTAL_AMOUNT = _totalAmount;
}
/**
* NOTE: The equivalent unlock schedule has a 13 months duration, with a 1 month cliff,
* offsetted to start from `Sept 5th 2024 - 1 month`: At Sept 5th 2024 the cliff
* is triggered unlocking 1/13 of the tokens, and then 1/13 of the tokens will
* be linearly unlocked every month after that.
*/
/// @inheritdoc IConnextVestingWallet
function vestedAmount(uint64 _timestamp) public view returns (uint256 _amount) {
if (_timestamp < UNLOCK_CLIFF) {
return 0;
} else if (_timestamp >= UNLOCK_END) {
return TOTAL_AMOUNT;
} else {
return (TOTAL_AMOUNT * (_timestamp - UNLOCK_START)) / UNLOCK_DURATION;
}
}
/// @inheritdoc IConnextVestingWallet
function release() public {
uint256 _amount = releasable();
released += _amount;
NEXT_TOKEN.transfer(owner(), _amount);
emit ERC20Released(address(NEXT_TOKEN), _amount);
}
/// @inheritdoc IConnextVestingWallet
function releasable() public view returns (uint256 _amount) {
_amount = vestedAmount(uint64(block.timestamp)) - released;
uint256 _balance = NEXT_TOKEN.balanceOf(address(this));
_amount = _balance < _amount ? _balance : _amount;
}
/**
* @inheritdoc IConnextVestingWallet
* @dev This contract allows to withdraw any token, with the exception of unlocked NEXT tokens
*/
function sendDust(IERC20 _token, uint256 _amount, address _to) external onlyOwner {
if (_to == address(0)) revert ZeroAddress();
if (_token == NEXT_TOKEN && (released != TOTAL_AMOUNT || block.timestamp < UNLOCK_END)) {
revert NotAllowed();
}
if (_token == IERC20(0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE)) {
payable(_to).transfer(_amount); // Sending ETH
} else {
_token.transfer(_to, _amount); // Sending ERC20s
}
}
/**
* @inheritdoc IConnextVestingWallet
* @dev This func is needed because only the recipients can claim
*/
function claim(IVestingEscrowSimple _vestingEscrow) external {
_vestingEscrow.claim(address(this));
}
}
IVestingEscrowSimple.sol 170 lines
// SPDX-License-Identifier: MIT
pragma solidity 0.8.20;
interface IVestingEscrowSimple {
/**
* @notice Initialize the contract.
* @dev This function is seperate from `constructor` because of the factory pattern
* used in `VestingEscrowFactory.deploy_vesting_contract`. It may be called once per deployment.
* @param _owner Owner address
* @param _token Address of the ERC20 token being distributed
* @param _recipient Address to vest tokens for
* @param _amount Amount of tokens being vested for `recipient`
* @param _startTime Epoch time at which token distribution starts
* @param _endTime Time until everything should be vested
* @param _cliffLength Duration (in seconds) after which the first portion vests
* @param _openClaim Switch if anyone can claim for `recipient`
* @return _success Whether or not the initialization was successful
*/
function initialize(
address _owner,
address _token,
address _recipient,
uint256 _amount,
uint256 _startTime,
uint256 _endTime,
uint256 _cliffLength,
bool _openClaim
) external returns (bool _success);
/**
* @notice Get the number of unclaimed, vested tokens for recipient.
* @return _unclaimed The amount of unclaimed tokens.
*/
function unclaimed() external view returns (uint256 _unclaimed);
/**
* @notice Get the number of locked tokens for recipient.
* @return _locked The amount of locked tokens.
*/
function locked() external view returns (uint256 _locked);
/**
* @notice Claim tokens which have vested for the caller.
* @return _claimed The amount of tokens claimed.
*/
function claim() external returns (uint256 _claimed);
/**
* @notice Claim tokens which have vested for a specified beneficiary.
* @param _beneficiary The address to transfer claimed tokens to.
* @return _claimed The amount of tokens claimed.
*/
function claim(address _beneficiary) external returns (uint256 _claimed);
/**
* @notice Claim a specified amount of tokens which have vested for a specified beneficiary.
* @param _beneficiary The address to transfer claimed tokens to.
* @param _amount The amount of tokens to claim.
* @return _claimed The amount of tokens claimed.
*/
function claim(address _beneficiary, uint256 _amount) external returns (uint256 _claimed);
/**
* @notice Disable further flow of tokens and renounce ownership.
*/
function revoke() external;
/**
* @notice Disable further flow of tokens from a specific timestamp and renounce ownership.
* @param _timestamp The timestamp to disable further token flow.
*/
function revoke(uint256 _timestamp) external;
/**
* @notice Disable further flow of tokens from a specific timestamp, transfer unvested tokens to a beneficiary, and renounce ownership.
* @param _timestamp The timestamp to disable further token flow.
* @param _beneficiary The address to transfer unvested tokens to.
*/
function revoke(uint256 _timestamp, address _beneficiary) external;
/**
* @notice Renounce owner control of the escrow, effectively making it ownerless.
*/
function disown() external;
/**
* @notice Disallow or allow anyone to claim tokens for `recipient`.
* @param _openClaim True to allow anyone to claim, false to restrict to recipient only.
*/
function set_open_claim(bool _openClaim) external;
/**
* @notice Transfer any ERC20 tokens sent to the contract address to a beneficiary.
* @param _token The address of the ERC20 token to transfer.
*/
function collect_dust(address _token) external;
/**
* @notice Transfer any ERC20 tokens sent to the contract address to a specified beneficiary.
* @param _token The address of the ERC20 token to transfer.
* @param _beneficiary The address to transfer the tokens to.
*/
function collect_dust(address _token, address _beneficiary) external;
/**
* @notice Returns the address of the recipient.
* @return _recipient The address of the recipient.
*/
function recipient() external view returns (address _recipient);
/**
* @notice Returns the address of the token being vested.
* @return _token The ERC20 token address.
*/
function token() external view returns (address _token);
/**
* @notice Returns the start time of the vesting period.
* @return _startTime The start time as a UNIX timestamp.
*/
function start_time() external view returns (uint256 _startTime);
/**
* @notice Returns the end time of the vesting period.
* @return _endTime The end time as a UNIX timestamp.
*/
function end_time() external view returns (uint256 _endTime);
/**
* @notice Returns the cliff length in seconds.
* @return _cliffLength The cliff length in seconds.
*/
function cliff_length() external view returns (uint256 _cliffLength);
/**
* @notice Returns the total amount of tokens locked in the contract.
* @return _totalLocked The total amount of locked tokens.
*/
function total_locked() external view returns (uint256 _totalLocked);
/**
* @notice Returns the total amount of tokens claimed by the recipient.
* @return _totalClaimed The total amount of claimed tokens.
*/
function total_claimed() external view returns (uint256 _totalClaimed);
/**
* @notice Returns the timestamp at which the token flow was disabled, if ever.
* @return _disabledAt The disable timestamp, or the end time if never disabled.
*/
function disabled_at() external view returns (uint256 _disabledAt);
/**
* @notice Indicates whether anyone can claim tokens on behalf of the recipient.
* @return _openClaim True if open claiming is enabled, false otherwise.
*/
function open_claim() external view returns (bool _openClaim);
/**
* @notice Indicates whether the contract has been initialized.
* @return _initialized True if the contract has been initialized, false otherwise.
*/
function initialized() external view returns (bool _initialized);
/**
* @notice Returns the address of the owner.
* @return _owner The address of the owner.
*/
function owner() external view returns (address _owner);
}
IConnextVestingWallet.sol 154 lines
// SPDX-License-Identifier: MIT
pragma solidity 0.8.20;
import {IVestingEscrowSimple} from './IVestingEscrowSimple.sol';
import {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';
interface IConnextVestingWallet {
/*///////////////////////////////////////////////////////////////
EVENTS
//////////////////////////////////////////////////////////////*/
/**
* @notice Emits when the owner releases tokens
* @param _token The address of the released ERC20 token
* @param _amount The amount of tokens released
*/
event ERC20Released(address indexed _token, uint256 _amount);
/*///////////////////////////////////////////////////////////////
ERRRORS
//////////////////////////////////////////////////////////////*/
/**
* @notice Permission denied
*/
error NotAllowed();
/**
* @notice Zero address not allowed
*/
error ZeroAddress();
/*///////////////////////////////////////////////////////////////
CONSTANTS
//////////////////////////////////////////////////////////////*/
/**
* @notice NEXT token address
* @return _nextToken The address of the NEXT token
*/
function NEXT_TOKEN() external view returns (IERC20 _nextToken);
/**
* @notice Token launch date
* @return _timestamp The timestamp of the token launch
*/
function NEXT_TOKEN_LAUNCH() external view returns (uint64 _timestamp);
/**
* @notice 1 month in seconds (on average)
* @return _timedelta The timedelta of one month
*/
function ONE_MONTH() external view returns (uint64 _timedelta);
/**
* @notice 1 year in seconds
* @return _timedelta The timedelta of one year
*/
function ONE_YEAR() external view returns (uint64 _timedelta);
/**
* @notice Sept 5th 2023 in seconds
* @return _timestamp The timestamp of Sept 5th 2023
*/
function SEPT_05_2023() external view returns (uint64 _timestamp);
/**
* @notice Vesting cliff duration
* @return _timedelta The timedelta of the cliff duration
*/
function UNLOCK_CLIFF_DURATION() external view returns (uint64 _timedelta);
/**
* @notice Vesting duration including cliff duration
* @return _timedelta The timedelta of the vesting duration
*/
function UNLOCK_DURATION() external view returns (uint64 _timedelta);
/**
* @notice Vesting warmup time
* @return _timedelta The timedelta of the warmup time
*/
function UNLOCK_OFFSET() external view returns (uint64 _timedelta);
/**
* @notice Vesting start date
* @return _timestamp The timestamp of the start date
*/
function UNLOCK_START() external view returns (uint64 _timestamp);
/**
* @notice Vesting cliff date
* @return _timestamp The timestamp of the cliff date
*/
function UNLOCK_CLIFF() external view returns (uint64 _timestamp);
/**
* @notice Vesting end date
* @return _timestamp The timestamp of the end date
*/
function UNLOCK_END() external view returns (uint64 _timestamp);
/*///////////////////////////////////////////////////////////////
STORAGE
//////////////////////////////////////////////////////////////*/
/**
* @notice Total amount of tokens to be vested
* @return _amount The total amount of tokens
*/
function TOTAL_AMOUNT() external view returns (uint256 _amount);
/**
* @notice The amount of NEXT tokens that are already released
* @return _released The amount of tokens released
*/
function released() external view returns (uint256 _released);
/*///////////////////////////////////////////////////////////////
UNLOCK LOGIC
//////////////////////////////////////////////////////////////*/
/**
* @notice Claim tokens from Yearn Vesting Escrow contract
* @param _vestingEscrow The address of the Yearn Vesting Escrow contract
*/
function claim(IVestingEscrowSimple _vestingEscrow) external;
/**
* @notice Collect dust from the contract
* @param _token The address of the token to withdraw
* @param _amount The amount of tokens to withdraw
* @param _to The address to send the tokens to
*/
function sendDust(IERC20 _token, uint256 _amount, address _to) external;
/**
* @notice Release releasable NEXT tokens to the owner
*/
function release() external;
/**
* @notice Calculate the amount of NEXT tokens vested at a given timestamp
* @param _timestamp The timestamp to calculate the vested amount
* @return _amount The amount of tokens vested
*/
function vestedAmount(uint64 _timestamp) external view returns (uint256 _amount);
/**
* @notice Calculate the amount of NEXT tokens ready to release
* @return _amount The amount of tokens ready to release
*/
function releasable() external view returns (uint256 _amount);
}
Context.sol 28 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)
pragma solidity ^0.8.20;
/**
* @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;
}
function _contextSuffixLength() internal view virtual returns (uint256) {
return 0;
}
}
Ownable.sol 100 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)
pragma solidity ^0.8.20;
import {Context} from "../utils/Context.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* The initial owner is set to the address provided by the deployer. This can
* later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
/**
* @dev The caller account is not authorized to perform an operation.
*/
error OwnableUnauthorizedAccount(address account);
/**
* @dev The owner is not a valid owner account. (eg. `address(0)`)
*/
error OwnableInvalidOwner(address owner);
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the address provided by the deployer as the initial owner.
*/
constructor(address initialOwner) {
if (initialOwner == address(0)) {
revert OwnableInvalidOwner(address(0));
}
_transferOwnership(initialOwner);
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
_checkOwner();
_;
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
if (owner() != _msgSender()) {
revert OwnableUnauthorizedAccount(_msgSender());
}
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby disabling any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
if (newOwner == address(0)) {
revert OwnableInvalidOwner(address(0));
}
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}
IERC20.sol 79 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.20;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @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);
/**
* @dev Returns the value of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the value of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves a `value` amount of tokens from the caller's account to `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, uint256 value) 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 a `value` amount of tokens 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 value) external returns (bool);
/**
* @dev Moves a `value` amount of tokens from `from` to `to` using the
* allowance mechanism. `value` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(address from, address to, uint256 value) external returns (bool);
}
Ownable2Step.sol 59 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable2Step.sol)
pragma solidity ^0.8.20;
import {Ownable} from "./Ownable.sol";
/**
* @dev Contract module which provides access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* The initial owner is specified at deployment time in the constructor for `Ownable`. This
* can later be changed with {transferOwnership} and {acceptOwnership}.
*
* This module is used through inheritance. It will make available all functions
* from parent (Ownable).
*/
abstract contract Ownable2Step is Ownable {
address private _pendingOwner;
event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner);
/**
* @dev Returns the address of the pending owner.
*/
function pendingOwner() public view virtual returns (address) {
return _pendingOwner;
}
/**
* @dev Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one.
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual override onlyOwner {
_pendingOwner = newOwner;
emit OwnershipTransferStarted(owner(), newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`) and deletes any pending owner.
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual override {
delete _pendingOwner;
super._transferOwnership(newOwner);
}
/**
* @dev The new owner accepts the ownership transfer.
*/
function acceptOwnership() public virtual {
address sender = _msgSender();
if (pendingOwner() != sender) {
revert OwnableUnauthorizedAccount(sender);
}
_transferOwnership(sender);
}
}
Read Contract
NEXT_TOKEN 0x48452d18 → address
NEXT_TOKEN_LAUNCH 0x856de2b2 → uint64
ONE_MONTH 0x20988cef → uint64
ONE_YEAR 0x16d3bfbb → uint64
SEPT_05_2023 0x64efeec7 → uint64
TOTAL_AMOUNT 0xa2d7f5e3 → uint256
UNLOCK_CLIFF 0xe59ac2ea → uint64
UNLOCK_CLIFF_DURATION 0xb01e74b3 → uint64
UNLOCK_DURATION 0x3632df39 → uint64
UNLOCK_END 0xea87d967 → uint64
UNLOCK_OFFSET 0x35b70078 → uint64
UNLOCK_START 0x8a75bef9 → uint64
owner 0x8da5cb5b → address
pendingOwner 0xe30c3978 → address
releasable 0xfbccedae → uint256
released 0x96132521 → uint256
vestedAmount 0x0a17b06b → uint256
Write Contract 6 functions
These functions modify contract state and require a wallet transaction to execute.
acceptOwnership 0x79ba5097
No parameters
claim 0x1e83409a
address _vestingEscrow
release 0x86d1a69f
No parameters
renounceOwnership 0x715018a6
No parameters
sendDust 0x966abd00
address _token
uint256 _amount
address _to
transferOwnership 0xf2fde38b
address newOwner
Recent Transactions
Transaction index is loading. Only unfinalized transactions are shown while the index starts up.