ERC-20
AirSwap
Overview
Max Total Supply
11,821,832.4385 sAST
Holders
143 (0.00%)
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract (WITH 4 Decimals)
Balance
30,637.863 sASTValue
$0.00Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Source Code Verified (Exact Match)
Contract Name:
Staking
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
Yes with 999999 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "./interfaces/IStaking.sol"; /** * @title AirSwap: Stake Tokens * @notice https://www.airswap.io/ */ contract Staking is IStaking, Ownable { using SafeERC20 for ERC20; // Token to be staked ERC20 public immutable stakingToken; // Unstaking duration uint256 public stakingDuration; // Minimum delay to staking duration change uint256 private minDurationChangeDelay; // Timestamp after which staking duration change is possible uint256 private activeDurationChangeTimestamp; // Mapping of account to stakes mapping(address => Stake) internal stakes; // Mapping of account to proposed delegate mapping(address => address) public proposedDelegates; // Mapping of account to delegate mapping(address => address) public accountDelegates; // Mapping of delegate to account mapping(address => address) public delegateAccounts; // ERC-20 token properties string public name; string public symbol; /** * @notice Constructor * @param _name string Token name for this contract * @param _symbol string Token symbol for this contract * @param _stakingToken address Token used for staking * @param _stakingDuration uint256 Amount of time tokens are staked * @param _minDurationChangeDelay uint256 Time delay for a duration change */ constructor( string memory _name, string memory _symbol, ERC20 _stakingToken, uint256 _stakingDuration, uint256 _minDurationChangeDelay ) { stakingToken = _stakingToken; stakingDuration = _stakingDuration; minDurationChangeDelay = _minDurationChangeDelay; name = _name; symbol = _symbol; } /** * @notice Set token metadata for this contract * @param _name string Token name for this contract * @param _symbol string Token symbol for this contract */ function setMetaData( string memory _name, string memory _symbol ) external onlyOwner { name = _name; symbol = _symbol; } /** * @dev Schedules timelock to change duration * @param _delay uint256 */ function scheduleDurationChange(uint256 _delay) external onlyOwner { if (activeDurationChangeTimestamp != 0) revert TimelockActive(); if (_delay < minDurationChangeDelay) revert DelayInvalid(_delay); activeDurationChangeTimestamp = block.timestamp + _delay; emit ScheduleDurationChange(activeDurationChangeTimestamp); } /** * @dev Cancels timelock to change duration */ function cancelDurationChange() external onlyOwner { if (activeDurationChangeTimestamp == 0) revert TimelockInactive(); delete activeDurationChangeTimestamp; emit CancelDurationChange(); } /** * @notice Set unstaking duration * @param _stakingDuration uint256 */ function setDuration(uint256 _stakingDuration) external onlyOwner { if (_stakingDuration == 0) revert DurationInvalid(_stakingDuration); if (activeDurationChangeTimestamp == 0) revert TimelockInactive(); if (block.timestamp < activeDurationChangeTimestamp) revert Timelocked(); stakingDuration = _stakingDuration; delete activeDurationChangeTimestamp; emit CompleteDurationChange(_stakingDuration); } /** * @notice Propose delegate for account * @param _delegate address */ function proposeDelegate(address _delegate) external { if (accountDelegates[msg.sender] != address(0)) revert SenderHasDelegate(msg.sender, _delegate); if (delegateAccounts[_delegate] != address(0)) revert DelegateTaken(_delegate); if (stakes[_delegate].balance != 0) revert DelegateStaked(_delegate); proposedDelegates[msg.sender] = _delegate; emit ProposeDelegate(_delegate, msg.sender); } /** * @notice Set delegate for account * @param _account address */ function setDelegate(address _account) external { if (proposedDelegates[_account] != msg.sender) revert DelegateNotProposed(_account); if (delegateAccounts[msg.sender] != address(0)) revert DelegateTaken(_account); if (stakes[msg.sender].balance != 0) revert DelegateStaked(_account); accountDelegates[_account] = msg.sender; delegateAccounts[msg.sender] = _account; delete proposedDelegates[_account]; emit SetDelegate(msg.sender, _account); } /** * @notice Unset delegate for account * @param _delegate address */ function unsetDelegate(address _delegate) external { if (accountDelegates[msg.sender] != _delegate) revert DelegateNotSet(_delegate); accountDelegates[msg.sender] = address(0); delegateAccounts[_delegate] = address(0); } /** * @notice Stake tokens * @param _amount uint256 */ function stake(uint256 _amount) external override { if (delegateAccounts[msg.sender] != address(0)) { _stake(delegateAccounts[msg.sender], _amount); } else { _stake(msg.sender, _amount); } } /** * @notice Unstake tokens * @param _amount uint256 */ function unstake(uint256 _amount) external override { address _account; delegateAccounts[msg.sender] != address(0) ? _account = delegateAccounts[msg.sender] : _account = msg.sender; _unstake(_account, _amount); } /** * @notice Receive stakes for an account * @param _account address */ function getStakes( address _account ) external view override returns (Stake memory _accountStake) { return stakes[_account]; } /** * @notice Get total balance of all staked accounts */ function totalSupply() external view override returns (uint256) { return stakingToken.balanceOf(address(this)); } /** * @notice Get balance of an account * @param _account address */ function balanceOf( address _account ) external view override returns (uint256 total) { return stakes[_account].balance; } /** * @notice Get decimals of underlying token */ function decimals() external view override returns (uint8) { return stakingToken.decimals(); } /** * @notice Stake tokens for an account * @param _account address * @param _amount uint256 */ function stakeFor(address _account, uint256 _amount) public override { if (delegateAccounts[_account] != address(0)) { _stake(delegateAccounts[_account], _amount); } else { _stake(_account, _amount); } } /** * @notice Amount available to withdraw for a given account * @param _account uint256 */ function available(address _account) public view override returns (uint256) { Stake storage _selected = stakes[_account]; uint256 _available = (_selected.balance * (block.timestamp - _selected.timestamp)) / (_selected.maturity - _selected.timestamp); if (_available >= _selected.balance) { return _selected.balance; } else { return _available; } } /** * @notice Stake tokens for an account * @param _account address * @param _amount uint256 */ function _stake(address _account, uint256 _amount) internal { if (_amount <= 0) revert AmountInvalid(_amount); stakes[_account].duration = stakingDuration; if (stakes[_account].balance == 0) { stakes[_account].balance = _amount; stakes[_account].timestamp = block.timestamp; stakes[_account].maturity = stakes[_account].timestamp + stakes[_account].duration; } else { uint256 _nowAvailable = available(_account); stakes[_account].balance = stakes[_account].balance + _amount; stakes[_account].timestamp = block.timestamp - ((_nowAvailable * stakes[_account].duration) / stakes[_account].balance); stakes[_account].maturity = stakes[_account].timestamp + stakes[_account].duration; } stakingToken.safeTransferFrom(msg.sender, address(this), _amount); emit Transfer(address(0), _account, _amount); } /** * @notice Unstake tokens * @param _account address * @param _amount uint256 */ function _unstake(address _account, uint256 _amount) internal { Stake storage _selected = stakes[_account]; if (_amount > available(_account)) revert AmountInvalid(_amount); uint256 nowAvailable = available(_account); _selected.balance = _selected.balance - _amount; _selected.timestamp = block.timestamp - (((10000 - ((10000 * _amount) / nowAvailable)) * (block.timestamp - _selected.timestamp)) / 10000); stakingToken.safeTransfer(_account, _amount); emit Transfer(_account, address(0), _amount); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/ERC20.sol) 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.openzeppelin.com/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: * * - `to` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address to, uint256 amount) public virtual override returns (bool) { address owner = _msgSender(); _transfer(owner, to, 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}. * * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on * `transferFrom`. This is semantically equivalent to an infinite approval. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { address owner = _msgSender(); _approve(owner, 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}. * * NOTE: Does not update the allowance if the current allowance * is the maximum `uint256`. * * Requirements: * * - `from` and `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. * - the caller must have allowance for ``from``'s tokens of at least * `amount`. */ function transferFrom( address from, address to, uint256 amount ) public virtual override returns (bool) { address spender = _msgSender(); _spendAllowance(from, spender, amount); _transfer(from, to, 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) { address owner = _msgSender(); _approve(owner, spender, allowance(owner, 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) { address owner = _msgSender(); uint256 currentAllowance = allowance(owner, spender); require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); unchecked { _approve(owner, spender, currentAllowance - subtractedValue); } return true; } /** * @dev Moves `amount` of tokens from `from` to `to`. * * 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: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. */ function _transfer( address from, address to, uint256 amount ) internal virtual { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(from, to, amount); uint256 fromBalance = _balances[from]; require(fromBalance >= amount, "ERC20: transfer amount exceeds balance"); unchecked { _balances[from] = fromBalance - amount; // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by // decrementing then incrementing. _balances[to] += amount; } emit Transfer(from, to, amount); _afterTokenTransfer(from, to, 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; unchecked { // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above. _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; // Overflow not possible: amount <= accountBalance <= totalSupply. _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 Updates `owner` s allowance for `spender` based on spent `amount`. * * Does not update the allowance amount in case of infinite allowance. * Revert if not enough allowance is available. * * Might emit an {Approval} event. */ function _spendAllowance( address owner, address spender, uint256 amount ) internal virtual { uint256 currentAllowance = allowance(owner, spender); if (currentAllowance != type(uint256).max) { require(currentAllowance >= amount, "ERC20: insufficient allowance"); unchecked { _approve(owner, spender, currentAllowance - 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 // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol) 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 // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @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 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 `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, 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 `from` to `to` 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 from, address to, uint256 amount ) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../extensions/draft-IERC20Permit.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)); } } function safePermit( IERC20Permit token, address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) internal { uint256 nonceBefore = token.nonces(owner); token.permit(owner, spender, value, deadline, v, r, s); uint256 nonceAfter = token.nonces(owner); require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed"); } /** * @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 // OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @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 * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 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 functionCallWithValue(target, data, 0, "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"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, 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) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, 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) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or 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 { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // 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 /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; interface IStaking { struct Stake { uint256 duration; uint256 balance; uint256 timestamp; uint256 maturity; } // ERC-20 Transfer event event Transfer(address indexed from, address indexed to, uint256 tokens); // Schedule timelock event event ScheduleDurationChange(uint256 indexed unlockTimestamp); // Cancel timelock event event CancelDurationChange(); // Complete timelock event event CompleteDurationChange(uint256 indexed newDuration); // Propose Delegate event event ProposeDelegate(address indexed delegate, address indexed account); // Set Delegate event event SetDelegate(address indexed delegate, address indexed account); error AmountInvalid(uint256); error DelayInvalid(uint256); error DelegateInvalid(address); error DelegateNotProposed(address); error DelegateNotSet(address); error DelegateStaked(address); error DelegateTaken(address); error DurationInvalid(uint256); error SenderHasDelegate(address sender, address delegate); error TimelockActive(); error Timelocked(); error TimelockInactive(); /** * @notice Stake tokens * @param amount uint256 */ function stake(uint256 amount) external; /** * @notice Unstake tokens * @param amount uint256 */ function unstake(uint256 amount) external; /** * @notice Receive stakes for an account * @param account address */ function getStakes( address account ) external view returns (Stake memory accountStake); /** * @notice Total balance of all accounts (ERC-20) */ function totalSupply() external view returns (uint256); /** * @notice Balance of an account (ERC-20) * @param account address */ function balanceOf(address account) external view returns (uint256); /** * @notice Decimals of underlying token (ERC-20) */ function decimals() external view returns (uint8); /** * @notice Stake tokens for an account * @param account address * @param amount uint256 */ function stakeFor(address account, uint256 amount) external; /** * @notice Available amount for an account * @param account uint256 */ function available(address account) external view returns (uint256); }
{ "optimizer": { "enabled": true, "runs": 999999 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"contract ERC20","name":"_stakingToken","type":"address"},{"internalType":"uint256","name":"_stakingDuration","type":"uint256"},{"internalType":"uint256","name":"_minDurationChangeDelay","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"AmountInvalid","type":"error"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"DelayInvalid","type":"error"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"DelegateInvalid","type":"error"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"DelegateNotProposed","type":"error"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"DelegateNotSet","type":"error"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"DelegateStaked","type":"error"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"DelegateTaken","type":"error"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"DurationInvalid","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"delegate","type":"address"}],"name":"SenderHasDelegate","type":"error"},{"inputs":[],"name":"TimelockActive","type":"error"},{"inputs":[],"name":"TimelockInactive","type":"error"},{"inputs":[],"name":"Timelocked","type":"error"},{"anonymous":false,"inputs":[],"name":"CancelDurationChange","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"newDuration","type":"uint256"}],"name":"CompleteDurationChange","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"delegate","type":"address"},{"indexed":true,"internalType":"address","name":"account","type":"address"}],"name":"ProposeDelegate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"unlockTimestamp","type":"uint256"}],"name":"ScheduleDurationChange","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"delegate","type":"address"},{"indexed":true,"internalType":"address","name":"account","type":"address"}],"name":"SetDelegate","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":"tokens","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"accountDelegates","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"available","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"total","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cancelDurationChange","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"delegateAccounts","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"getStakes","outputs":[{"components":[{"internalType":"uint256","name":"duration","type":"uint256"},{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"uint256","name":"timestamp","type":"uint256"},{"internalType":"uint256","name":"maturity","type":"uint256"}],"internalType":"struct IStaking.Stake","name":"_accountStake","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_delegate","type":"address"}],"name":"proposeDelegate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"proposedDelegates","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_delay","type":"uint256"}],"name":"scheduleDurationChange","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"setDelegate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_stakingDuration","type":"uint256"}],"name":"setDuration","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"}],"name":"setMetaData","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"stakeFor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stakingDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stakingToken","outputs":[{"internalType":"contract ERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_delegate","type":"address"}],"name":"unsetDelegate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"unstake","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60a06040523480156200001157600080fd5b50604051620022a0380380620022a0833981016040819052620000349162000194565b6200003f336200007f565b6001600160a01b038316608052600182905560028190556008620000648682620002c1565b506009620000738582620002c1565b5050505050506200038d565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b634e487b7160e01b600052604160045260246000fd5b600082601f830112620000f757600080fd5b81516001600160401b0380821115620001145762000114620000cf565b604051601f8301601f19908116603f011681019082821181831017156200013f576200013f620000cf565b816040528381526020925086838588010111156200015c57600080fd5b600091505b8382101562000180578582018301518183018401529082019062000161565b600093810190920192909252949350505050565b600080600080600060a08688031215620001ad57600080fd5b85516001600160401b0380821115620001c557600080fd5b620001d389838a01620000e5565b96506020880151915080821115620001ea57600080fd5b50620001f988828901620000e5565b604088015190955090506001600160a01b03811681146200021957600080fd5b6060870151608090970151959894975095949392505050565b600181811c908216806200024757607f821691505b6020821081036200026857634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620002bc57600081815260208120601f850160051c81016020861015620002975750805b601f850160051c820191505b81811015620002b857828155600101620002a3565b5050505b505050565b81516001600160401b03811115620002dd57620002dd620000cf565b620002f581620002ee845462000232565b846200026e565b602080601f8311600181146200032d5760008415620003145750858301515b600019600386901b1c1916600185901b178555620002b8565b600085815260208120601f198616915b828110156200035e578886015182559484019460019091019084016200033d565b50858210156200037d5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b608051611edb620003c56000396000818161031b015281816105b5015281816107d2015281816111e501526114470152611edb6000f3fe608060405234801561001057600080fd5b50600436106101a35760003560e01c80637ba6f458116100ee57806396dcfbe111610097578063bb2c410011610071578063bb2c410014610429578063ca5eb5e11461043c578063f2fde38b1461044f578063f6be71d11461046257600080fd5b806396dcfbe1146103fb5780639ef682d21461040e578063a694fc3a1461041657600080fd5b80638da5cb5b116100c85780638da5cb5b1461039f5780638f2318cb146103bd57806395d89b41146103f357600080fd5b80637ba6f4581461033d5780638005a7de14610383578063826b971e1461038c57600080fd5b80632e17de781161015057806370a082311161012a57806370a08231146102d5578063715018a61461030e57806372f702f31461031657600080fd5b80632e17de78146102955780632ee40908146102a8578063313ce567146102bb57600080fd5b806313838a021161018157806313838a021461024257806318160ddd1461027857806320aaba3b1461028057600080fd5b806306fdde03146101a85780630b608fcb146101c657806310098ad514610221575b600080fd5b6101b0610475565b6040516101bd91906119ad565b60405180910390f35b6101fc6101d4366004611a27565b60056020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101bd565b61023461022f366004611a27565b610503565b6040519081526020016101bd565b6101fc610250366004611a27565b60076020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b610234610584565b61029361028e366004611a42565b61063a565b005b6102936102a3366004611a42565b6106fb565b6102936102b6366004611a5b565b610765565b6102c36107ce565b60405160ff90911681526020016101bd565b6102346102e3366004611a27565b73ffffffffffffffffffffffffffffffffffffffff1660009081526004602052604090206001015490565b61029361085f565b6101fc7f000000000000000000000000000000000000000000000000000000000000000081565b61035061034b366004611a27565b610873565b6040516101bd91908151815260208083015190820152604080830151908201526060918201519181019190915260800190565b61023460015481565b61029361039a366004611a27565b6108f9565b60005473ffffffffffffffffffffffffffffffffffffffff166101fc565b6101fc6103cb366004611a27565b60066020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b6101b06109d8565b610293610409366004611a27565b6109e5565b610293610bca565b610293610424366004611a42565b610c3e565b610293610437366004611b5f565b610ca6565b61029361044a366004611a27565b610ccc565b61029361045d366004611a27565b610ebd565b610293610470366004611a42565b610f71565b6008805461048290611bc3565b80601f01602080910402602001604051908101604052809291908181526020018280546104ae90611bc3565b80156104fb5780601f106104d0576101008083540402835291602001916104fb565b820191906000526020600020905b8154815290600101906020018083116104de57829003601f168201915b505050505081565b73ffffffffffffffffffffffffffffffffffffffff8116600090815260046020526040812060028101546003820154839161053d91611c45565b600283015461054c9042611c45565b836001015461055b9190611c5e565b6105659190611c75565b90508160010154811061057d57506001015492915050565b9392505050565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906370a0823190602401602060405180830381865afa158015610611573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106359190611cb0565b905090565b610642611065565b6003541561067c576040517f7d857b6700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002548110156106c0576040517ff0bd1e54000000000000000000000000000000000000000000000000000000008152600481018290526024015b60405180910390fd5b6106ca8142611cc9565b60038190556040517fcc9639622b55ca018b582dcb9c5bd8a8b47f8f32969c91fbf2b8184b5abc4a5590600090a250565b3360009081526007602052604081205473ffffffffffffffffffffffffffffffffffffffff1661072d57503380610756565b503360009081526007602052604090205473ffffffffffffffffffffffffffffffffffffffff16805b5061076181836110e6565b5050565b73ffffffffffffffffffffffffffffffffffffffff82811660009081526007602052604090205416156107c45773ffffffffffffffffffffffffffffffffffffffff808316600090815260076020526040902054610761911682611260565b6107618282611260565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa15801561083b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106359190611cdc565b610867611065565b61087160006114c1565b565b61089e6040518060800160405280600081526020016000815260200160008152602001600081525090565b5073ffffffffffffffffffffffffffffffffffffffff16600090815260046020908152604091829020825160808101845281548152600182015492810192909252600281015492820192909252600390910154606082015290565b3360009081526006602052604090205473ffffffffffffffffffffffffffffffffffffffff828116911614610972576040517fd5a271a000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff821660048201526024016106b7565b33600090815260066020908152604080832080547fffffffffffffffffffffffff000000000000000000000000000000000000000090811690915573ffffffffffffffffffffffffffffffffffffffff9490941683526007909152902080549091169055565b6009805461048290611bc3565b3360009081526006602052604090205473ffffffffffffffffffffffffffffffffffffffff1615610a60576040517f539b163500000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff821660248201526044016106b7565b73ffffffffffffffffffffffffffffffffffffffff8181166000908152600760205260409020541615610ad7576040517fe50ad76400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff821660048201526024016106b7565b73ffffffffffffffffffffffffffffffffffffffff811660009081526004602052604090206001015415610b4f576040517fcefb11d400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff821660048201526024016106b7565b3360008181526005602052604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8616908117909155905190917fd5388fcc11aaa0f0c97ea8ce8d23d27b5513ec37f3c925cb9cb7d3a23e7efd4991a350565b610bd2611065565b600354600003610c0e576040517fdde0198900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060038190556040517fad9f24488dd2d4f821fcb2c503fa6446ff04bb2036760f06261fdb4cf6bd07e99190a1565b3360009081526007602052604090205473ffffffffffffffffffffffffffffffffffffffff1615610c9c5733600090815260076020526040902054610c999073ffffffffffffffffffffffffffffffffffffffff1682611260565b50565b610c993382611260565b610cae611065565b6008610cba8382611d4d565b506009610cc78282611d4d565b505050565b73ffffffffffffffffffffffffffffffffffffffff818116600090815260056020526040902054163314610d44576040517f9630109700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff821660048201526024016106b7565b3360009081526007602052604090205473ffffffffffffffffffffffffffffffffffffffff1615610db9576040517fe50ad76400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff821660048201526024016106b7565b3360009081526004602052604090206001015415610e1b576040517fcefb11d400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff821660048201526024016106b7565b73ffffffffffffffffffffffffffffffffffffffff811660008181526006602090815260408083208054337fffffffffffffffffffffffff00000000000000000000000000000000000000009182168117909255818552600784528285208054821687179055858552600590935281842080549093169092555190917fbeebfeebc9d1af8057ca45af36b2171fea34cb5b251e394f0bc5fcabde119d7f91a350565b610ec5611065565b73ffffffffffffffffffffffffffffffffffffffff8116610f68576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016106b7565b610c99816114c1565b610f79611065565b80600003610fb6576040517fe71d86b5000000000000000000000000000000000000000000000000000000008152600481018290526024016106b7565b600354600003610ff2576040517fdde0198900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60035442101561102e576040517f774ae17d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60018190556000600381905560405182917fa04d5e1ae3fd486b4c476203b016b4b63ba9743beaa99775851ed2f588c955bb91a250565b60005473ffffffffffffffffffffffffffffffffffffffff163314610871576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016106b7565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260046020526040902061111483610503565b821115611150576040517f2ff54bde000000000000000000000000000000000000000000000000000000008152600481018390526024016106b7565b600061115b84610503565b905082826001015461116d9190611c45565b60018301556002820154612710906111859042611c45565b8261119286612710611c5e565b61119c9190611c75565b6111a890612710611c45565b6111b29190611c5e565b6111bc9190611c75565b6111c69042611c45565b600283015561120c73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168585611536565b60405183815260009073ffffffffffffffffffffffffffffffffffffffff8616907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a350505050565b6000811161129d576040517f2ff54bde000000000000000000000000000000000000000000000000000000008152600481018290526024016106b7565b6001805473ffffffffffffffffffffffffffffffffffffffff84166000908152600460205260408120918255910154900361133f5773ffffffffffffffffffffffffffffffffffffffff82166000908152600460205260409020600181018290554260028201819055905461131191611cc9565b73ffffffffffffffffffffffffffffffffffffffff831660009081526004602052604090206003015561142d565b600061134a83610503565b73ffffffffffffffffffffffffffffffffffffffff8416600090815260046020526040902060010154909150611381908390611cc9565b73ffffffffffffffffffffffffffffffffffffffff8416600090815260046020526040902060018101829055546113b89083611c5e565b6113c29190611c75565b6113cc9042611c45565b73ffffffffffffffffffffffffffffffffffffffff84166000908152600460205260409020600281018290555461140291611cc9565b73ffffffffffffffffffffffffffffffffffffffff8416600090815260046020526040902060030155505b61146f73ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001633308461160a565b60405181815273ffffffffffffffffffffffffffffffffffffffff8316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60405173ffffffffffffffffffffffffffffffffffffffff8316602482015260448101829052610cc79084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915261166e565b60405173ffffffffffffffffffffffffffffffffffffffff808516602483015283166044820152606481018290526116689085907f23b872dd0000000000000000000000000000000000000000000000000000000090608401611588565b50505050565b60006116d0826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff1661177a9092919063ffffffff16565b805190915015610cc757808060200190518101906116ee9190611e67565b610cc7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016106b7565b60606117898484600085611791565b949350505050565b606082471015611823576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016106b7565b6000808673ffffffffffffffffffffffffffffffffffffffff16858760405161184c9190611e89565b60006040518083038185875af1925050503d8060008114611889576040519150601f19603f3d011682016040523d82523d6000602084013e61188e565b606091505b509150915061189f878383876118aa565b979650505050505050565b606083156119405782516000036119395773ffffffffffffffffffffffffffffffffffffffff85163b611939576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016106b7565b5081611789565b61178983838151156119555781518083602001fd5b806040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106b791906119ad565b60005b838110156119a457818101518382015260200161198c565b50506000910152565b60208152600082518060208401526119cc816040850160208701611989565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b803573ffffffffffffffffffffffffffffffffffffffff81168114611a2257600080fd5b919050565b600060208284031215611a3957600080fd5b61057d826119fe565b600060208284031215611a5457600080fd5b5035919050565b60008060408385031215611a6e57600080fd5b611a77836119fe565b946020939093013593505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082601f830112611ac557600080fd5b813567ffffffffffffffff80821115611ae057611ae0611a85565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908282118183101715611b2657611b26611a85565b81604052838152866020858801011115611b3f57600080fd5b836020870160208301376000602085830101528094505050505092915050565b60008060408385031215611b7257600080fd5b823567ffffffffffffffff80821115611b8a57600080fd5b611b9686838701611ab4565b93506020850135915080821115611bac57600080fd5b50611bb985828601611ab4565b9150509250929050565b600181811c90821680611bd757607f821691505b602082108103611c10577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b81810381811115611c5857611c58611c16565b92915050565b8082028115828204841417611c5857611c58611c16565b600082611cab577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b600060208284031215611cc257600080fd5b5051919050565b80820180821115611c5857611c58611c16565b600060208284031215611cee57600080fd5b815160ff8116811461057d57600080fd5b601f821115610cc757600081815260208120601f850160051c81016020861015611d265750805b601f850160051c820191505b81811015611d4557828155600101611d32565b505050505050565b815167ffffffffffffffff811115611d6757611d67611a85565b611d7b81611d758454611bc3565b84611cff565b602080601f831160018114611dce5760008415611d985750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b178555611d45565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b82811015611e1b57888601518255948401946001909101908401611dfc565b5085821015611e5757878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b600060208284031215611e7957600080fd5b8151801515811461057d57600080fd5b60008251611e9b818460208701611989565b919091019291505056fea2646970667358221220147b29d9843280a763d6fe295f5e1fdd341308b19b75000df3c9143d782585c764736f6c6343000811003300000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000027054b13b1b798b345b591a4d22e6562d47ea75a0000000000000000000000000000000000000000000000000000000000b892000000000000000000000000000000000000000000000000000000000000093a80000000000000000000000000000000000000000000000000000000000000000a5374616b6564204153540000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000047341535400000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101a35760003560e01c80637ba6f458116100ee57806396dcfbe111610097578063bb2c410011610071578063bb2c410014610429578063ca5eb5e11461043c578063f2fde38b1461044f578063f6be71d11461046257600080fd5b806396dcfbe1146103fb5780639ef682d21461040e578063a694fc3a1461041657600080fd5b80638da5cb5b116100c85780638da5cb5b1461039f5780638f2318cb146103bd57806395d89b41146103f357600080fd5b80637ba6f4581461033d5780638005a7de14610383578063826b971e1461038c57600080fd5b80632e17de781161015057806370a082311161012a57806370a08231146102d5578063715018a61461030e57806372f702f31461031657600080fd5b80632e17de78146102955780632ee40908146102a8578063313ce567146102bb57600080fd5b806313838a021161018157806313838a021461024257806318160ddd1461027857806320aaba3b1461028057600080fd5b806306fdde03146101a85780630b608fcb146101c657806310098ad514610221575b600080fd5b6101b0610475565b6040516101bd91906119ad565b60405180910390f35b6101fc6101d4366004611a27565b60056020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101bd565b61023461022f366004611a27565b610503565b6040519081526020016101bd565b6101fc610250366004611a27565b60076020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b610234610584565b61029361028e366004611a42565b61063a565b005b6102936102a3366004611a42565b6106fb565b6102936102b6366004611a5b565b610765565b6102c36107ce565b60405160ff90911681526020016101bd565b6102346102e3366004611a27565b73ffffffffffffffffffffffffffffffffffffffff1660009081526004602052604090206001015490565b61029361085f565b6101fc7f00000000000000000000000027054b13b1b798b345b591a4d22e6562d47ea75a81565b61035061034b366004611a27565b610873565b6040516101bd91908151815260208083015190820152604080830151908201526060918201519181019190915260800190565b61023460015481565b61029361039a366004611a27565b6108f9565b60005473ffffffffffffffffffffffffffffffffffffffff166101fc565b6101fc6103cb366004611a27565b60066020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b6101b06109d8565b610293610409366004611a27565b6109e5565b610293610bca565b610293610424366004611a42565b610c3e565b610293610437366004611b5f565b610ca6565b61029361044a366004611a27565b610ccc565b61029361045d366004611a27565b610ebd565b610293610470366004611a42565b610f71565b6008805461048290611bc3565b80601f01602080910402602001604051908101604052809291908181526020018280546104ae90611bc3565b80156104fb5780601f106104d0576101008083540402835291602001916104fb565b820191906000526020600020905b8154815290600101906020018083116104de57829003601f168201915b505050505081565b73ffffffffffffffffffffffffffffffffffffffff8116600090815260046020526040812060028101546003820154839161053d91611c45565b600283015461054c9042611c45565b836001015461055b9190611c5e565b6105659190611c75565b90508160010154811061057d57506001015492915050565b9392505050565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000907f00000000000000000000000027054b13b1b798b345b591a4d22e6562d47ea75a73ffffffffffffffffffffffffffffffffffffffff16906370a0823190602401602060405180830381865afa158015610611573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106359190611cb0565b905090565b610642611065565b6003541561067c576040517f7d857b6700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002548110156106c0576040517ff0bd1e54000000000000000000000000000000000000000000000000000000008152600481018290526024015b60405180910390fd5b6106ca8142611cc9565b60038190556040517fcc9639622b55ca018b582dcb9c5bd8a8b47f8f32969c91fbf2b8184b5abc4a5590600090a250565b3360009081526007602052604081205473ffffffffffffffffffffffffffffffffffffffff1661072d57503380610756565b503360009081526007602052604090205473ffffffffffffffffffffffffffffffffffffffff16805b5061076181836110e6565b5050565b73ffffffffffffffffffffffffffffffffffffffff82811660009081526007602052604090205416156107c45773ffffffffffffffffffffffffffffffffffffffff808316600090815260076020526040902054610761911682611260565b6107618282611260565b60007f00000000000000000000000027054b13b1b798b345b591a4d22e6562d47ea75a73ffffffffffffffffffffffffffffffffffffffff1663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa15801561083b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106359190611cdc565b610867611065565b61087160006114c1565b565b61089e6040518060800160405280600081526020016000815260200160008152602001600081525090565b5073ffffffffffffffffffffffffffffffffffffffff16600090815260046020908152604091829020825160808101845281548152600182015492810192909252600281015492820192909252600390910154606082015290565b3360009081526006602052604090205473ffffffffffffffffffffffffffffffffffffffff828116911614610972576040517fd5a271a000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff821660048201526024016106b7565b33600090815260066020908152604080832080547fffffffffffffffffffffffff000000000000000000000000000000000000000090811690915573ffffffffffffffffffffffffffffffffffffffff9490941683526007909152902080549091169055565b6009805461048290611bc3565b3360009081526006602052604090205473ffffffffffffffffffffffffffffffffffffffff1615610a60576040517f539b163500000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff821660248201526044016106b7565b73ffffffffffffffffffffffffffffffffffffffff8181166000908152600760205260409020541615610ad7576040517fe50ad76400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff821660048201526024016106b7565b73ffffffffffffffffffffffffffffffffffffffff811660009081526004602052604090206001015415610b4f576040517fcefb11d400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff821660048201526024016106b7565b3360008181526005602052604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8616908117909155905190917fd5388fcc11aaa0f0c97ea8ce8d23d27b5513ec37f3c925cb9cb7d3a23e7efd4991a350565b610bd2611065565b600354600003610c0e576040517fdde0198900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060038190556040517fad9f24488dd2d4f821fcb2c503fa6446ff04bb2036760f06261fdb4cf6bd07e99190a1565b3360009081526007602052604090205473ffffffffffffffffffffffffffffffffffffffff1615610c9c5733600090815260076020526040902054610c999073ffffffffffffffffffffffffffffffffffffffff1682611260565b50565b610c993382611260565b610cae611065565b6008610cba8382611d4d565b506009610cc78282611d4d565b505050565b73ffffffffffffffffffffffffffffffffffffffff818116600090815260056020526040902054163314610d44576040517f9630109700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff821660048201526024016106b7565b3360009081526007602052604090205473ffffffffffffffffffffffffffffffffffffffff1615610db9576040517fe50ad76400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff821660048201526024016106b7565b3360009081526004602052604090206001015415610e1b576040517fcefb11d400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff821660048201526024016106b7565b73ffffffffffffffffffffffffffffffffffffffff811660008181526006602090815260408083208054337fffffffffffffffffffffffff00000000000000000000000000000000000000009182168117909255818552600784528285208054821687179055858552600590935281842080549093169092555190917fbeebfeebc9d1af8057ca45af36b2171fea34cb5b251e394f0bc5fcabde119d7f91a350565b610ec5611065565b73ffffffffffffffffffffffffffffffffffffffff8116610f68576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016106b7565b610c99816114c1565b610f79611065565b80600003610fb6576040517fe71d86b5000000000000000000000000000000000000000000000000000000008152600481018290526024016106b7565b600354600003610ff2576040517fdde0198900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60035442101561102e576040517f774ae17d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60018190556000600381905560405182917fa04d5e1ae3fd486b4c476203b016b4b63ba9743beaa99775851ed2f588c955bb91a250565b60005473ffffffffffffffffffffffffffffffffffffffff163314610871576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016106b7565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260046020526040902061111483610503565b821115611150576040517f2ff54bde000000000000000000000000000000000000000000000000000000008152600481018390526024016106b7565b600061115b84610503565b905082826001015461116d9190611c45565b60018301556002820154612710906111859042611c45565b8261119286612710611c5e565b61119c9190611c75565b6111a890612710611c45565b6111b29190611c5e565b6111bc9190611c75565b6111c69042611c45565b600283015561120c73ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000027054b13b1b798b345b591a4d22e6562d47ea75a168585611536565b60405183815260009073ffffffffffffffffffffffffffffffffffffffff8616907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a350505050565b6000811161129d576040517f2ff54bde000000000000000000000000000000000000000000000000000000008152600481018290526024016106b7565b6001805473ffffffffffffffffffffffffffffffffffffffff84166000908152600460205260408120918255910154900361133f5773ffffffffffffffffffffffffffffffffffffffff82166000908152600460205260409020600181018290554260028201819055905461131191611cc9565b73ffffffffffffffffffffffffffffffffffffffff831660009081526004602052604090206003015561142d565b600061134a83610503565b73ffffffffffffffffffffffffffffffffffffffff8416600090815260046020526040902060010154909150611381908390611cc9565b73ffffffffffffffffffffffffffffffffffffffff8416600090815260046020526040902060018101829055546113b89083611c5e565b6113c29190611c75565b6113cc9042611c45565b73ffffffffffffffffffffffffffffffffffffffff84166000908152600460205260409020600281018290555461140291611cc9565b73ffffffffffffffffffffffffffffffffffffffff8416600090815260046020526040902060030155505b61146f73ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000027054b13b1b798b345b591a4d22e6562d47ea75a1633308461160a565b60405181815273ffffffffffffffffffffffffffffffffffffffff8316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60405173ffffffffffffffffffffffffffffffffffffffff8316602482015260448101829052610cc79084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915261166e565b60405173ffffffffffffffffffffffffffffffffffffffff808516602483015283166044820152606481018290526116689085907f23b872dd0000000000000000000000000000000000000000000000000000000090608401611588565b50505050565b60006116d0826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff1661177a9092919063ffffffff16565b805190915015610cc757808060200190518101906116ee9190611e67565b610cc7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016106b7565b60606117898484600085611791565b949350505050565b606082471015611823576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016106b7565b6000808673ffffffffffffffffffffffffffffffffffffffff16858760405161184c9190611e89565b60006040518083038185875af1925050503d8060008114611889576040519150601f19603f3d011682016040523d82523d6000602084013e61188e565b606091505b509150915061189f878383876118aa565b979650505050505050565b606083156119405782516000036119395773ffffffffffffffffffffffffffffffffffffffff85163b611939576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016106b7565b5081611789565b61178983838151156119555781518083602001fd5b806040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106b791906119ad565b60005b838110156119a457818101518382015260200161198c565b50506000910152565b60208152600082518060208401526119cc816040850160208701611989565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b803573ffffffffffffffffffffffffffffffffffffffff81168114611a2257600080fd5b919050565b600060208284031215611a3957600080fd5b61057d826119fe565b600060208284031215611a5457600080fd5b5035919050565b60008060408385031215611a6e57600080fd5b611a77836119fe565b946020939093013593505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082601f830112611ac557600080fd5b813567ffffffffffffffff80821115611ae057611ae0611a85565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908282118183101715611b2657611b26611a85565b81604052838152866020858801011115611b3f57600080fd5b836020870160208301376000602085830101528094505050505092915050565b60008060408385031215611b7257600080fd5b823567ffffffffffffffff80821115611b8a57600080fd5b611b9686838701611ab4565b93506020850135915080821115611bac57600080fd5b50611bb985828601611ab4565b9150509250929050565b600181811c90821680611bd757607f821691505b602082108103611c10577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b81810381811115611c5857611c58611c16565b92915050565b8082028115828204841417611c5857611c58611c16565b600082611cab577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b600060208284031215611cc257600080fd5b5051919050565b80820180821115611c5857611c58611c16565b600060208284031215611cee57600080fd5b815160ff8116811461057d57600080fd5b601f821115610cc757600081815260208120601f850160051c81016020861015611d265750805b601f850160051c820191505b81811015611d4557828155600101611d32565b505050505050565b815167ffffffffffffffff811115611d6757611d67611a85565b611d7b81611d758454611bc3565b84611cff565b602080601f831160018114611dce5760008415611d985750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b178555611d45565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b82811015611e1b57888601518255948401946001909101908401611dfc565b5085821015611e5757878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b600060208284031215611e7957600080fd5b8151801515811461057d57600080fd5b60008251611e9b818460208701611989565b919091019291505056fea2646970667358221220147b29d9843280a763d6fe295f5e1fdd341308b19b75000df3c9143d782585c764736f6c63430008110033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000027054b13b1b798b345b591a4d22e6562d47ea75a0000000000000000000000000000000000000000000000000000000000b892000000000000000000000000000000000000000000000000000000000000093a80000000000000000000000000000000000000000000000000000000000000000a5374616b6564204153540000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000047341535400000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : _name (string): Staked AST
Arg [1] : _symbol (string): sAST
Arg [2] : _stakingToken (address): 0x27054b13b1B798B345b591a4d22e6562d47eA75a
Arg [3] : _stakingDuration (uint256): 12096000
Arg [4] : _minDurationChangeDelay (uint256): 604800
-----Encoded View---------------
9 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [1] : 00000000000000000000000000000000000000000000000000000000000000e0
Arg [2] : 00000000000000000000000027054b13b1b798b345b591a4d22e6562d47ea75a
Arg [3] : 0000000000000000000000000000000000000000000000000000000000b89200
Arg [4] : 0000000000000000000000000000000000000000000000000000000000093a80
Arg [5] : 000000000000000000000000000000000000000000000000000000000000000a
Arg [6] : 5374616b65642041535400000000000000000000000000000000000000000000
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000004
Arg [8] : 7341535400000000000000000000000000000000000000000000000000000000
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.