ERC-20
Overview
Max Total Supply
6,494,223.758737292881349281 eSLSD
Holders
21
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract (WITH 18 Decimals)
Balance
0 eSLSDValue
$0.00Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Source Code Verified (Exact Match)
Contract Name:
eSLSDToken
Compiler Version
v0.8.12+commit.f00d7308
Optimization Enabled:
Yes with 590 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: Apache-2.0 pragma solidity ^0.8.9; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; import "./interface/ISLSDToken.sol"; // import "hardhat/console.sol"; /* * eSLSD is SLSD Finance's escrowed governance token obtainable by converting SLSD to it * It's non-transferable, except from/to whitelisted addresses * It can be converted back to SLSD through a vesting process */ contract eSLSDToken is Ownable, ReentrancyGuard, ERC20("eSLSD Token", "eSLSD") { using Address for address; using SafeMath for uint256; using EnumerableSet for EnumerableSet.AddressSet; using SafeERC20 for ISLSDToken; ISLSDToken public immutable slsdToken; // SLSD token to escrow to/from EnumerableSet.AddressSet private _whitelistAddresses; // addresses allowed to send/receive eSLSD uint256 public minRedeemDurationInDays = 1; uint256 public maxRedeemDurationInDays = 20; uint256 public redeemRatioDenominator = 100; uint256[] public redeemRatios = [10, 30, 43, 52, 58, 64, 68, 72, 76, 79, 82, 85, 87, 89, 91, 93, 95, 97, 99, 100]; mapping(address => RedeemInfo[]) public userRedeems; // User's redeeming instances uint256 private _redeemFees; struct RedeemInfo { uint256 eslsdAmount; // eSLSD amount to redeem uint256 slsdAmount; // SLSD amount to receive when vesting has ended uint256 endTime; } constructor(ISLSDToken _slsdToken) { slsdToken = _slsdToken; _whitelistAddresses.add(address(this)); } /**************************************************/ /****************** PUBLIC VIEWS ******************/ /**************************************************/ /* * @dev returns redeemable SLSD for "amount" of eSLSD vested for "duration" seconds */ function getSLSDAmountByVestingDuration(uint256 amount, uint256 durationInDays) public view returns (uint256) { require(durationInDays >= minRedeemDurationInDays, "getSLSDAmountByVestingDuration: durationInDays too short"); uint256 durationInDaysCapped = durationInDays; if(durationInDaysCapped > maxRedeemDurationInDays) durationInDaysCapped = maxRedeemDurationInDays; uint256 ratio = redeemRatios[durationInDaysCapped.sub(1)]; uint256 slsdAmount = amount.mul(ratio).div(redeemRatioDenominator); return slsdAmount < amount ? slsdAmount : amount; } /** * @dev returns quantity of "userAddress" pending redeems */ function getUserRedeemsLength(address userAddress) external view returns (uint256) { return userRedeems[userAddress].length; } function getUserRedeem(address userAddress, uint256 redeemIndex) external view validateRedeem(userAddress, redeemIndex) returns (uint256 slsdAmount, uint256 eslsdAmount, uint256 endTime) { RedeemInfo storage _redeem = userRedeems[userAddress][redeemIndex]; return (_redeem.slsdAmount, _redeem.eslsdAmount, _redeem.endTime); } function getWhitelistAddressesLength() external view returns (uint256) { return _whitelistAddresses.length(); } function getWhitelistAddress(uint256 index) external view returns (address) { require(index < _whitelistAddresses.length(), "getWhitelistAddress: invalid index"); return _whitelistAddresses.at(index); } function isAddressWhitelisted(address account) external view returns (bool) { return _whitelistAddresses.contains(account); } function redeemFees() external view returns (uint256) { return _redeemFees; } /*******************************************************/ /****************** OWNABLE FUNCTIONS ******************/ /*******************************************************/ /** * @dev Adds or removes addresses from the whitelist */ function setWhitelistAddress(address account, bool whitelisted) external nonReentrant onlyOwner { require(account != address(0), "Zero address detected"); require(account != address(this), "setWhitelistAddress: Cannot remove eSLSD from whitelist"); if(whitelisted) _whitelistAddresses.add(account); else _whitelistAddresses.remove(account); emit UpdateWhitelistAddress(account, whitelisted); } function withdrawRedeemFees(address to) external nonReentrant onlyOwner { require(to != address(0), "Zero address detected"); require(_redeemFees > 0, 'No redeem fees to withdraw'); _transfer(address(this), to, _redeemFees); emit RedeemFeesWithdrawn(to, _redeemFees); _redeemFees = 0; } /*****************************************************************/ /****************** EXTERNAL PUBLIC FUNCTIONS ******************/ /*****************************************************************/ /** * @dev Escrow caller's "amount" of SLSD to eSLSD */ function escrow(uint256 amount) external nonReentrant { _escrow(amount, _msgSender()); } /** * @dev Initiates redeem process (eSLSD to SLSD) */ function redeem(uint256 eslsdAmount, uint256 vestingDurationInDays) external nonReentrant { require(eslsdAmount > 0, "eslsdAmount too small"); require(eslsdAmount <= balanceOf(_msgSender()), "Redeem amount exceeds balance"); _transfer(_msgSender(), address(this), eslsdAmount); uint256 slsdAmount = getSLSDAmountByVestingDuration(eslsdAmount, vestingDurationInDays); emit Redeem(_msgSender(), eslsdAmount, slsdAmount, vestingDurationInDays); userRedeems[_msgSender()].push(RedeemInfo(eslsdAmount, slsdAmount, block.timestamp.add(vestingDurationInDays.mul(1 days)))); } /** * @dev Finalizes redeem process when vesting duration has been reached * * Can only be called by the redeem entry owner */ function finalizeRedeem(uint256 redeemIndex) external nonReentrant validateRedeem(_msgSender(), redeemIndex) { RedeemInfo storage _redeem = userRedeems[_msgSender()][redeemIndex]; require(block.timestamp >= _redeem.endTime, "finalizeRedeem: vesting duration has not ended yet"); // console.log('balance, allocation amount: %s, redeeming amount: %s', balance.allocatedAmount, balance.redeemingAmount); _finalizeRedeem(_msgSender(), _redeem.eslsdAmount, _redeem.slsdAmount); // remove redeem entry _deleteRedeemEntry(redeemIndex); } /** * @dev Cancels an ongoing redeem entry * * Can only be called by its owner. */ function cancelRedeem(uint256 redeemIndex) external nonReentrant validateRedeem(_msgSender(), redeemIndex) { RedeemInfo storage _redeem = userRedeems[_msgSender()][redeemIndex]; _transfer(address(this), _msgSender(), _redeem.eslsdAmount); emit CancelRedeem(_msgSender(), _redeem.eslsdAmount); // remove redeem entry _deleteRedeemEntry(redeemIndex); } /********************************************************/ /****************** INTERNAL FUNCTIONS ******************/ /********************************************************/ /** * @dev Escrow caller's "amount" of SLSD into eSLSD to "to" */ function _escrow(uint256 amount, address to) internal { require(amount != 0, "escrow: amount cannot be null"); // mint new eSLSD _mint(to, amount); emit Escrow(_msgSender(), to, amount); slsdToken.safeTransferFrom(_msgSender(), address(this), amount); } function _finalizeRedeem(address userAddress, uint256 eslsdAmount, uint256 slsdAmount) internal { slsdToken.safeTransfer(userAddress, slsdAmount); _burn(address(this), slsdAmount); uint256 fees = eslsdAmount.sub(slsdAmount); if (fees > 0) { _redeemFees = _redeemFees.add(fees); emit RedeemFeesAccrued(_msgSender(), eslsdAmount, fees); } emit FinalizeRedeem(userAddress, eslsdAmount, slsdAmount); } function _deleteRedeemEntry(uint256 index) internal { userRedeems[_msgSender()][index] = userRedeems[_msgSender()][userRedeems[_msgSender()].length - 1]; userRedeems[_msgSender()].pop(); } /** * @dev Hook override to forbid transfers except from whitelisted addresses and minting */ function _beforeTokenTransfer(address from, address to, uint256 /*amount*/) internal view override { require(from == address(0) || _whitelistAddresses.contains(from) || _whitelistAddresses.contains(to), "transfer: not allowed"); } /***********************************************/ /****************** MODIFIERS ******************/ /***********************************************/ /* * @dev Check if a redeem entry exists */ modifier validateRedeem(address userAddress, uint256 redeemIndex) { require(redeemIndex < userRedeems[userAddress].length, "validateRedeem: invalid index"); _; } /********************************************/ /****************** EVENTS ******************/ /********************************************/ event Escrow(address indexed from, address to, uint256 amount); event Redeem(address indexed userAddress, uint256 eslsdAmount, uint256 slsdAmount, uint256 durationInDays); event FinalizeRedeem(address indexed userAddress, uint256 eslsdAmount, uint256 slsdAmount); event CancelRedeem(address indexed userAddress, uint256 eslsdAmount); event RedeemFeesAccrued(address indexed user, uint256 totalAmount, uint256 fees); event RedeemFeesWithdrawn(address indexed to, uint256 amount); event UpdateWhitelistAddress(address account, bool whitelisted); }
// 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) (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { // On the first call to nonReentrant, _status will be _NOT_ENTERED require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; } function _nonReentrantAfter() private { // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT // 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 // OpenZeppelin Contracts (last updated v4.6.0) (utils/math/SafeMath.sol) pragma solidity ^0.8.0; // CAUTION // This version of SafeMath should only be used with Solidity 0.8 or later, // because it relies on the compiler's built in overflow checks. /** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the subtraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { return a + b; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { return a * b; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b <= a, errorMessage); return a - b; } } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a / b; } } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a % b; } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/structs/EnumerableSet.sol) // This file was procedurally generated from scripts/generate/templates/EnumerableSet.js. pragma solidity ^0.8.0; /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ``` * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) * and `uint256` (`UintSet`) are supported. * * [WARNING] * ==== * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure * unusable. * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info. * * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an * array of EnumerableSet. * ==== */ library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping(bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; if (lastIndex != toDeleteIndex) { bytes32 lastValue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastValue; // Update the index for the moved value set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex } // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { return set._values[index]; } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function _values(Set storage set) private view returns (bytes32[] memory) { return set._values; } // Bytes32Set struct Bytes32Set { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _add(set._inner, value); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _remove(set._inner, value); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { return _contains(set._inner, value); } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { return _at(set._inner, index); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(Bytes32Set storage set) internal view returns (bytes32[] memory) { bytes32[] memory store = _values(set._inner); bytes32[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint160(uint256(_at(set._inner, index)))); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(AddressSet storage set) internal view returns (address[] memory) { bytes32[] memory store = _values(set._inner); address[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values in the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(UintSet storage set) internal view returns (uint256[] memory) { bytes32[] memory store = _values(set._inner); uint256[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; interface ISLSDToken is IERC20{ function lastEmissionTime() external view returns (uint256); function claimMasterRewards(uint256 amount) external returns (uint256 effectiveAmount); function masterEmissionRate() external view returns (uint256); function burn(uint256 amount) external; }
{ "metadata": { "bytecodeHash": "ipfs" }, "optimizer": { "enabled": true, "runs": 590 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"contract ISLSDToken","name":"_slsdToken","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"userAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"eslsdAmount","type":"uint256"}],"name":"CancelRedeem","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Escrow","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"userAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"eslsdAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"slsdAmount","type":"uint256"}],"name":"FinalizeRedeem","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":"userAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"eslsdAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"slsdAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"durationInDays","type":"uint256"}],"name":"Redeem","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"totalAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"fees","type":"uint256"}],"name":"RedeemFeesAccrued","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RedeemFeesWithdrawn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"bool","name":"whitelisted","type":"bool"}],"name":"UpdateWhitelistAddress","type":"event"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"redeemIndex","type":"uint256"}],"name":"cancelRedeem","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"escrow","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"redeemIndex","type":"uint256"}],"name":"finalizeRedeem","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"durationInDays","type":"uint256"}],"name":"getSLSDAmountByVestingDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"userAddress","type":"address"},{"internalType":"uint256","name":"redeemIndex","type":"uint256"}],"name":"getUserRedeem","outputs":[{"internalType":"uint256","name":"slsdAmount","type":"uint256"},{"internalType":"uint256","name":"eslsdAmount","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"userAddress","type":"address"}],"name":"getUserRedeemsLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getWhitelistAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getWhitelistAddressesLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"isAddressWhitelisted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxRedeemDurationInDays","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minRedeemDurationInDays","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"uint256","name":"eslsdAmount","type":"uint256"},{"internalType":"uint256","name":"vestingDurationInDays","type":"uint256"}],"name":"redeem","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"redeemFees","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"redeemRatioDenominator","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"redeemRatios","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bool","name":"whitelisted","type":"bool"}],"name":"setWhitelistAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"slsdToken","outputs":[{"internalType":"contract ISLSDToken","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":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"userRedeems","outputs":[{"internalType":"uint256","name":"eslsdAmount","type":"uint256"},{"internalType":"uint256","name":"slsdAmount","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"withdrawRedeemFees","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60016009556014600a8181556064600b819055610320604090815260a0928352601e60c052602b60e052603461010052603a6101205261014052604461016052604861018052604c6101a052604f6101c05260526101e052605561020052605761022052605961024052605b61026052605d61028052605f6102a05260616102c05260636102e052610300526200009a91600c91906200024d565b50348015620000a857600080fd5b50604051620025bd380380620025bd833981016040819052620000cb9162000336565b6040518060400160405280600b81526020016a32a9a629a2102a37b5b2b760a91b815250604051806040016040528060058152602001641954d314d160da1b81525062000127620001216200018760201b60201c565b6200018b565b60018055815162000140906005906020850190620002a2565b50805162000156906006906020840190620002a2565b5050506001600160a01b0381166080526200017f600730620001db602090811b6200101017901c565b5050620003a5565b3390565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000620001f2836001600160a01b038416620001fb565b90505b92915050565b60008181526001830160205260408120546200024457508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155620001f5565b506000620001f5565b82805482825590600052602060002090810192821562000290579160200282015b8281111562000290578251829060ff169055916020019190600101906200026e565b506200029e9291506200031f565b5090565b828054620002b09062000368565b90600052602060002090601f016020900481019282620002d4576000855562000290565b82601f10620002ef57805160ff191683800117855562000290565b8280016001018555821562000290579182015b828111156200029057825182559160200191906001019062000302565b5b808211156200029e576000815560010162000320565b6000602082840312156200034957600080fd5b81516001600160a01b03811681146200036157600080fd5b9392505050565b600181811c908216806200037d57607f821691505b602082108114156200039f57634e487b7160e01b600052602260045260246000fd5b50919050565b6080516121ee620003cf600039600081816104a00152818161161b015261179501526121ee6000f3fe608060405234801561001057600080fd5b506004361061020b5760003560e01c806370a082311161012a578063a9059cbb116100bd578063d68ff1911161008c578063de952f5011610071578063de952f501461049b578063f2fde38b146104c2578063fa79a44e146104d557600080fd5b8063d68ff1911461044f578063dd62ed3e1461046257600080fd5b8063a9059cbb146103ed578063aff6cbf114610400578063b90c2b5214610413578063cc6c54231461043c57600080fd5b80638da5cb5b116100f95780638da5cb5b146103b95780638f7eef94146103ca57806395d89b41146103d2578063a457c2d7146103da57600080fd5b806370a0823114610362578063715018a61461038b57806378ddd4cc146103935780637cbc2373146103a657600080fd5b8063313ce567116101a25780633f914aef116101715780633f914aef146102e15780634f62b7ec146102f6578063539ffb7714610324578063565853af1461033757600080fd5b8063313ce567146102ae57806339509351146102bd5780633a047bb3146102d05780633c6ac9ab146102d857600080fd5b806314684a0e116101de57806314684a0e1461027757806318160ddd1461028a5780631f59e9741461029257806323b872dd1461029b57600080fd5b80630213a27a1461021057806306fdde031461022c578063095ea7b31461024157806313f44d1014610264575b600080fd5b610219600b5481565b6040519081526020015b60405180910390f35b6102346104e8565b6040516102239190611f0f565b61025461024f366004611f5e565b61057a565b6040519015158152602001610223565b610254610272366004611f88565b610594565b610219610285366004611fa3565b6105a1565b600454610219565b61021960095481565b6102546102a9366004611fbc565b6105c2565b60405160128152602001610223565b6102546102cb366004611f5e565b6105e6565b600e54610219565b610219600a5481565b6102f46102ef366004612006565b610625565b005b610309610304366004611f5e565b610783565b60408051938452602084019290925290820152606001610223565b6102f4610332366004611fa3565b6107c5565b61034a610345366004611fa3565b6108bf565b6040516001600160a01b039091168152602001610223565b610219610370366004611f88565b6001600160a01b031660009081526002602052604090205490565b6102f461092f565b6102196103a136600461203d565b610943565b6102f46103b436600461203d565b610a2d565b6000546001600160a01b031661034a565b610219610bb3565b610234610bc4565b6102546103e8366004611f5e565b610bd3565b6102546103fb366004611f5e565b610c65565b6102f461040e366004611fa3565b610c73565b610219610421366004611f88565b6001600160a01b03166000908152600d602052604090205490565b61030961044a366004611f5e565b610d9f565b6102f461045d366004611fa3565b610e67565b61021961047036600461205f565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205490565b61034a7f000000000000000000000000000000000000000000000000000000000000000081565b6102f46104d0366004611f88565b610e82565b6102f46104e3366004611f88565b610ef8565b6060600580546104f790612092565b80601f016020809104026020016040519081016040528092919081815260200182805461052390612092565b80156105705780601f1061054557610100808354040283529160200191610570565b820191906000526020600020905b81548152906001019060200180831161055357829003601f168201915b5050505050905090565b60003361058881858561102c565b60019150505b92915050565b600061058e600783611150565b600c81815481106105b157600080fd5b600091825260209091200154905081565b6000336105d0858285611172565b6105db858585611204565b506001949350505050565b3360008181526003602090815260408083206001600160a01b038716845290915281205490919061058890829086906106209087906120e3565b61102c565b61062d6113ba565b610635611414565b6001600160a01b0382166106905760405162461bcd60e51b815260206004820152601560248201527f5a65726f2061646472657373206465746563746564000000000000000000000060448201526064015b60405180910390fd5b6001600160a01b03821630141561070f5760405162461bcd60e51b815260206004820152603760248201527f73657457686974656c697374416464726573733a2043616e6e6f742072656d6f60448201527f76652065534c53442066726f6d2077686974656c6973740000000000000000006064820152608401610687565b801561072657610720600783611010565b50610733565b61073160078361146e565b505b604080516001600160a01b038416815282151560208201527f96d51aee97586403df55dbaeef3a581c0fc1cf1d4f9fe3d8901085933092b288910160405180910390a161077f60018055565b5050565b600d602052816000526040600020818154811061079f57600080fd5b600091825260209091206003909102018054600182015460029092015490935090915083565b6107cd6113ba565b336000818152600d60205260409020548290811061082d5760405162461bcd60e51b815260206004820152601d60248201527f76616c696461746552656465656d3a20696e76616c696420696e6465780000006044820152606401610687565b336000908152600d6020526040812080548590811061084e5761084e6120fb565b90600052602060002090600302019050610870306108693390565b8354611204565b805460405190815233907f56d7520e387607a8daa892e3fed116badc2a636307bdc794b1c1aed97ae203f49060200160405180910390a26108b084611483565b5050506108bc60018055565b50565b60006108cb600761156b565b82106109245760405162461bcd60e51b815260206004820152602260248201527f67657457686974656c697374416464726573733a20696e76616c696420696e646044820152610caf60f31b6064820152608401610687565b61058e600783611575565b610937611414565b6109416000611581565b565b60006009548210156109bd5760405162461bcd60e51b815260206004820152603860248201527f676574534c5344416d6f756e74427956657374696e674475726174696f6e3a2060448201527f6475726174696f6e496e4461797320746f6f2073686f727400000000000000006064820152608401610687565b600a5482908111156109ce5750600a545b6000600c6109dd8360016115de565b815481106109ed576109ed6120fb565b6000918252602082200154600b54909250610a1290610a0c88856115ea565b906115f6565b9050858110610a215785610a23565b805b9695505050505050565b610a356113ba565b60008211610a855760405162461bcd60e51b815260206004820152601560248201527f65736c7364416d6f756e7420746f6f20736d616c6c00000000000000000000006044820152606401610687565b610a8e33610370565b821115610add5760405162461bcd60e51b815260206004820152601d60248201527f52656465656d20616d6f756e7420657863656564732062616c616e63650000006044820152606401610687565b610ae8333084611204565b6000610af48383610943565b6040805185815260208101839052808201859052905191925033917fbd5034ffbd47e4e72a94baa2cdb74c6fad73cb3bcdc13036b72ec8306f5a76469181900360600190a2336000908152600d60209081526040918290208251606081018452868152918201849052918101610b77610b7086620151806115ea565b4290611602565b90528154600180820184556000938452602093849020835160039093020191825592820151818401556040909101516002909101558055505050565b6000610bbf600761156b565b905090565b6060600680546104f790612092565b3360008181526003602090815260408083206001600160a01b038716845290915281205490919083811015610c585760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610687565b6105db828686840361102c565b600033610588818585611204565b610c7b6113ba565b336000818152600d602052604090205482908110610cdb5760405162461bcd60e51b815260206004820152601d60248201527f76616c696461746552656465656d3a20696e76616c696420696e6465780000006044820152606401610687565b336000908152600d60205260408120805485908110610cfc57610cfc6120fb565b906000526020600020906003020190508060020154421015610d865760405162461bcd60e51b815260206004820152603260248201527f66696e616c697a6552656465656d3a2076657374696e67206475726174696f6e60448201527f20686173206e6f7420656e6465642079657400000000000000000000000000006064820152608401610687565b610d96338254600184015461160e565b6108b084611483565b6001600160a01b0382166000908152600d602052604081205481908190859085908110610e0e5760405162461bcd60e51b815260206004820152601d60248201527f76616c696461746552656465656d3a20696e76616c696420696e6465780000006044820152606401610687565b6001600160a01b0387166000908152600d60205260408120805488908110610e3857610e386120fb565b906000526020600020906003020190508060010154816000015482600201549550955095505050509250925092565b610e6f6113ba565b610e7981336116f6565b6108bc60018055565b610e8a611414565b6001600160a01b038116610eef5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610687565b6108bc81611581565b610f006113ba565b610f08611414565b6001600160a01b038116610f5e5760405162461bcd60e51b815260206004820152601560248201527f5a65726f206164647265737320646574656374656400000000000000000000006044820152606401610687565b6000600e5411610fb05760405162461bcd60e51b815260206004820152601a60248201527f4e6f2072656465656d206665657320746f2077697468647261770000000000006044820152606401610687565b610fbd3082600e54611204565b806001600160a01b03167f61f749303ab4c76e1b3bfbaed86aec121ab4e4c4463c18a8d8b462c389d8679a600e54604051610ffa91815260200190565b60405180910390a26000600e556108bc60018055565b6000611025836001600160a01b0384166117c5565b9392505050565b6001600160a01b03831661108e5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610687565b6001600160a01b0382166110ef5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610687565b6001600160a01b0383811660008181526003602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b03811660009081526001830160205260408120541515611025565b6001600160a01b0383811660009081526003602090815260408083209386168352929052205460001981146111fe57818110156111f15760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610687565b6111fe848484840361102c565b50505050565b6001600160a01b0383166112685760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610687565b6001600160a01b0382166112ca5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610687565b6112d5838383611814565b6001600160a01b0383166000908152600260205260409020548181101561134d5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610687565b6001600160a01b0380851660008181526002602052604080822086860390559286168082529083902080548601905591517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906113ad9086815260200190565b60405180910390a36111fe565b6002600154141561140d5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610687565b6002600155565b6000546001600160a01b031633146109415760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610687565b6000611025836001600160a01b038416611892565b336000908152600d6020526040902080546114a090600190612111565b815481106114b0576114b06120fb565b9060005260206000209060030201600d60006114c93390565b6001600160a01b03166001600160a01b0316815260200190815260200160002082815481106114fa576114fa6120fb565b60009182526020808320845460039390930201918255600180850154908301556002938401549390910192909255338152600d9091526040902080548061154357611543612128565b6000828152602081206003600019909301928302018181556001810182905560020155905550565b600061058e825490565b60006110258383611985565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006110258284612111565b6000611025828461213e565b6000611025828461215d565b600061102582846120e3565b6116426001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001684836119af565b61164c3082611a3f565b600061165883836115de565b905080156116ac57600e5461166d9082611602565b600e55604080518481526020810183905233917f7d84431df6ec199e26a17bd48f5e79289f1c845023e9e642769309dc34c1ed90910160405180910390a25b60408051848152602081018490526001600160a01b038616917f0da072ebd7a5649099f43a3776eb0cda17aca79426ee9f28aae203f5dfa04eda910160405180910390a250505050565b816117435760405162461bcd60e51b815260206004820152601d60248201527f657363726f773a20616d6f756e742063616e6e6f74206265206e756c6c0000006044820152606401610687565b61174d8183611b7f565b604080516001600160a01b038316815260208101849052815133927f812c3251d8b2cd027716a7651ace6f9167d7fba4db9eb10df2e0cfe8b7fa48c9928290030190a261077f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316333085611c4c565b600081815260018301602052604081205461180c5750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561058e565b50600061058e565b6001600160a01b03831615806118305750611830600784611150565b806118415750611841600783611150565b61188d5760405162461bcd60e51b815260206004820152601560248201527f7472616e736665723a206e6f7420616c6c6f77656400000000000000000000006044820152606401610687565b505050565b6000818152600183016020526040812054801561197b5760006118b6600183612111565b85549091506000906118ca90600190612111565b905081811461192f5760008660000182815481106118ea576118ea6120fb565b906000526020600020015490508087600001848154811061190d5761190d6120fb565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061194057611940612128565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061058e565b600091505061058e565b600082600001828154811061199c5761199c6120fb565b9060005260206000200154905092915050565b6040516001600160a01b03831660248201526044810182905261188d90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152611c84565b6001600160a01b038216611a9f5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610687565b611aab82600083611814565b6001600160a01b03821660009081526002602052604090205481811015611b1f5760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610687565b6001600160a01b03831660008181526002602090815260408083208686039055600480548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3505050565b6001600160a01b038216611bd55760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610687565b611be160008383611814565b8060046000828254611bf391906120e3565b90915550506001600160a01b0382166000818152600260209081526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b6040516001600160a01b03808516602483015283166044820152606481018290526111fe9085906323b872dd60e01b906084016119db565b6000611cd9826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611d569092919063ffffffff16565b80519091501561188d5780806020019051810190611cf7919061217f565b61188d5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610687565b6060611d658484600085611d6d565b949350505050565b606082471015611dce5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610687565b600080866001600160a01b03168587604051611dea919061219c565b60006040518083038185875af1925050503d8060008114611e27576040519150601f19603f3d011682016040523d82523d6000602084013e611e2c565b606091505b5091509150611e3d87838387611e48565b979650505050505050565b60608315611eb4578251611ead576001600160a01b0385163b611ead5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610687565b5081611d65565b611d658383815115611ec95781518083602001fd5b8060405162461bcd60e51b81526004016106879190611f0f565b60005b83811015611efe578181015183820152602001611ee6565b838111156111fe5750506000910152565b6020815260008251806020840152611f2e816040850160208701611ee3565b601f01601f19169190910160400192915050565b80356001600160a01b0381168114611f5957600080fd5b919050565b60008060408385031215611f7157600080fd5b611f7a83611f42565b946020939093013593505050565b600060208284031215611f9a57600080fd5b61102582611f42565b600060208284031215611fb557600080fd5b5035919050565b600080600060608486031215611fd157600080fd5b611fda84611f42565b9250611fe860208501611f42565b9150604084013590509250925092565b80151581146108bc57600080fd5b6000806040838503121561201957600080fd5b61202283611f42565b9150602083013561203281611ff8565b809150509250929050565b6000806040838503121561205057600080fd5b50508035926020909101359150565b6000806040838503121561207257600080fd5b61207b83611f42565b915061208960208401611f42565b90509250929050565b600181811c908216806120a657607f821691505b602082108114156120c757634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b600082198211156120f6576120f66120cd565b500190565b634e487b7160e01b600052603260045260246000fd5b600082821015612123576121236120cd565b500390565b634e487b7160e01b600052603160045260246000fd5b6000816000190483118215151615612158576121586120cd565b500290565b60008261217a57634e487b7160e01b600052601260045260246000fd5b500490565b60006020828403121561219157600080fd5b815161102581611ff8565b600082516121ae818460208701611ee3565b919091019291505056fea2646970667358221220288dd67ee2dd03d2093c05bef8c8cb7853a8f3fed73a7986e05be97f9e4de1f464736f6c634300080c0033000000000000000000000000b668f51f1d63452b566456053fa348c3037e2b1f
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061020b5760003560e01c806370a082311161012a578063a9059cbb116100bd578063d68ff1911161008c578063de952f5011610071578063de952f501461049b578063f2fde38b146104c2578063fa79a44e146104d557600080fd5b8063d68ff1911461044f578063dd62ed3e1461046257600080fd5b8063a9059cbb146103ed578063aff6cbf114610400578063b90c2b5214610413578063cc6c54231461043c57600080fd5b80638da5cb5b116100f95780638da5cb5b146103b95780638f7eef94146103ca57806395d89b41146103d2578063a457c2d7146103da57600080fd5b806370a0823114610362578063715018a61461038b57806378ddd4cc146103935780637cbc2373146103a657600080fd5b8063313ce567116101a25780633f914aef116101715780633f914aef146102e15780634f62b7ec146102f6578063539ffb7714610324578063565853af1461033757600080fd5b8063313ce567146102ae57806339509351146102bd5780633a047bb3146102d05780633c6ac9ab146102d857600080fd5b806314684a0e116101de57806314684a0e1461027757806318160ddd1461028a5780631f59e9741461029257806323b872dd1461029b57600080fd5b80630213a27a1461021057806306fdde031461022c578063095ea7b31461024157806313f44d1014610264575b600080fd5b610219600b5481565b6040519081526020015b60405180910390f35b6102346104e8565b6040516102239190611f0f565b61025461024f366004611f5e565b61057a565b6040519015158152602001610223565b610254610272366004611f88565b610594565b610219610285366004611fa3565b6105a1565b600454610219565b61021960095481565b6102546102a9366004611fbc565b6105c2565b60405160128152602001610223565b6102546102cb366004611f5e565b6105e6565b600e54610219565b610219600a5481565b6102f46102ef366004612006565b610625565b005b610309610304366004611f5e565b610783565b60408051938452602084019290925290820152606001610223565b6102f4610332366004611fa3565b6107c5565b61034a610345366004611fa3565b6108bf565b6040516001600160a01b039091168152602001610223565b610219610370366004611f88565b6001600160a01b031660009081526002602052604090205490565b6102f461092f565b6102196103a136600461203d565b610943565b6102f46103b436600461203d565b610a2d565b6000546001600160a01b031661034a565b610219610bb3565b610234610bc4565b6102546103e8366004611f5e565b610bd3565b6102546103fb366004611f5e565b610c65565b6102f461040e366004611fa3565b610c73565b610219610421366004611f88565b6001600160a01b03166000908152600d602052604090205490565b61030961044a366004611f5e565b610d9f565b6102f461045d366004611fa3565b610e67565b61021961047036600461205f565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205490565b61034a7f000000000000000000000000b668f51f1d63452b566456053fa348c3037e2b1f81565b6102f46104d0366004611f88565b610e82565b6102f46104e3366004611f88565b610ef8565b6060600580546104f790612092565b80601f016020809104026020016040519081016040528092919081815260200182805461052390612092565b80156105705780601f1061054557610100808354040283529160200191610570565b820191906000526020600020905b81548152906001019060200180831161055357829003601f168201915b5050505050905090565b60003361058881858561102c565b60019150505b92915050565b600061058e600783611150565b600c81815481106105b157600080fd5b600091825260209091200154905081565b6000336105d0858285611172565b6105db858585611204565b506001949350505050565b3360008181526003602090815260408083206001600160a01b038716845290915281205490919061058890829086906106209087906120e3565b61102c565b61062d6113ba565b610635611414565b6001600160a01b0382166106905760405162461bcd60e51b815260206004820152601560248201527f5a65726f2061646472657373206465746563746564000000000000000000000060448201526064015b60405180910390fd5b6001600160a01b03821630141561070f5760405162461bcd60e51b815260206004820152603760248201527f73657457686974656c697374416464726573733a2043616e6e6f742072656d6f60448201527f76652065534c53442066726f6d2077686974656c6973740000000000000000006064820152608401610687565b801561072657610720600783611010565b50610733565b61073160078361146e565b505b604080516001600160a01b038416815282151560208201527f96d51aee97586403df55dbaeef3a581c0fc1cf1d4f9fe3d8901085933092b288910160405180910390a161077f60018055565b5050565b600d602052816000526040600020818154811061079f57600080fd5b600091825260209091206003909102018054600182015460029092015490935090915083565b6107cd6113ba565b336000818152600d60205260409020548290811061082d5760405162461bcd60e51b815260206004820152601d60248201527f76616c696461746552656465656d3a20696e76616c696420696e6465780000006044820152606401610687565b336000908152600d6020526040812080548590811061084e5761084e6120fb565b90600052602060002090600302019050610870306108693390565b8354611204565b805460405190815233907f56d7520e387607a8daa892e3fed116badc2a636307bdc794b1c1aed97ae203f49060200160405180910390a26108b084611483565b5050506108bc60018055565b50565b60006108cb600761156b565b82106109245760405162461bcd60e51b815260206004820152602260248201527f67657457686974656c697374416464726573733a20696e76616c696420696e646044820152610caf60f31b6064820152608401610687565b61058e600783611575565b610937611414565b6109416000611581565b565b60006009548210156109bd5760405162461bcd60e51b815260206004820152603860248201527f676574534c5344416d6f756e74427956657374696e674475726174696f6e3a2060448201527f6475726174696f6e496e4461797320746f6f2073686f727400000000000000006064820152608401610687565b600a5482908111156109ce5750600a545b6000600c6109dd8360016115de565b815481106109ed576109ed6120fb565b6000918252602082200154600b54909250610a1290610a0c88856115ea565b906115f6565b9050858110610a215785610a23565b805b9695505050505050565b610a356113ba565b60008211610a855760405162461bcd60e51b815260206004820152601560248201527f65736c7364416d6f756e7420746f6f20736d616c6c00000000000000000000006044820152606401610687565b610a8e33610370565b821115610add5760405162461bcd60e51b815260206004820152601d60248201527f52656465656d20616d6f756e7420657863656564732062616c616e63650000006044820152606401610687565b610ae8333084611204565b6000610af48383610943565b6040805185815260208101839052808201859052905191925033917fbd5034ffbd47e4e72a94baa2cdb74c6fad73cb3bcdc13036b72ec8306f5a76469181900360600190a2336000908152600d60209081526040918290208251606081018452868152918201849052918101610b77610b7086620151806115ea565b4290611602565b90528154600180820184556000938452602093849020835160039093020191825592820151818401556040909101516002909101558055505050565b6000610bbf600761156b565b905090565b6060600680546104f790612092565b3360008181526003602090815260408083206001600160a01b038716845290915281205490919083811015610c585760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610687565b6105db828686840361102c565b600033610588818585611204565b610c7b6113ba565b336000818152600d602052604090205482908110610cdb5760405162461bcd60e51b815260206004820152601d60248201527f76616c696461746552656465656d3a20696e76616c696420696e6465780000006044820152606401610687565b336000908152600d60205260408120805485908110610cfc57610cfc6120fb565b906000526020600020906003020190508060020154421015610d865760405162461bcd60e51b815260206004820152603260248201527f66696e616c697a6552656465656d3a2076657374696e67206475726174696f6e60448201527f20686173206e6f7420656e6465642079657400000000000000000000000000006064820152608401610687565b610d96338254600184015461160e565b6108b084611483565b6001600160a01b0382166000908152600d602052604081205481908190859085908110610e0e5760405162461bcd60e51b815260206004820152601d60248201527f76616c696461746552656465656d3a20696e76616c696420696e6465780000006044820152606401610687565b6001600160a01b0387166000908152600d60205260408120805488908110610e3857610e386120fb565b906000526020600020906003020190508060010154816000015482600201549550955095505050509250925092565b610e6f6113ba565b610e7981336116f6565b6108bc60018055565b610e8a611414565b6001600160a01b038116610eef5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610687565b6108bc81611581565b610f006113ba565b610f08611414565b6001600160a01b038116610f5e5760405162461bcd60e51b815260206004820152601560248201527f5a65726f206164647265737320646574656374656400000000000000000000006044820152606401610687565b6000600e5411610fb05760405162461bcd60e51b815260206004820152601a60248201527f4e6f2072656465656d206665657320746f2077697468647261770000000000006044820152606401610687565b610fbd3082600e54611204565b806001600160a01b03167f61f749303ab4c76e1b3bfbaed86aec121ab4e4c4463c18a8d8b462c389d8679a600e54604051610ffa91815260200190565b60405180910390a26000600e556108bc60018055565b6000611025836001600160a01b0384166117c5565b9392505050565b6001600160a01b03831661108e5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610687565b6001600160a01b0382166110ef5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610687565b6001600160a01b0383811660008181526003602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b03811660009081526001830160205260408120541515611025565b6001600160a01b0383811660009081526003602090815260408083209386168352929052205460001981146111fe57818110156111f15760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610687565b6111fe848484840361102c565b50505050565b6001600160a01b0383166112685760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610687565b6001600160a01b0382166112ca5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610687565b6112d5838383611814565b6001600160a01b0383166000908152600260205260409020548181101561134d5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610687565b6001600160a01b0380851660008181526002602052604080822086860390559286168082529083902080548601905591517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906113ad9086815260200190565b60405180910390a36111fe565b6002600154141561140d5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610687565b6002600155565b6000546001600160a01b031633146109415760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610687565b6000611025836001600160a01b038416611892565b336000908152600d6020526040902080546114a090600190612111565b815481106114b0576114b06120fb565b9060005260206000209060030201600d60006114c93390565b6001600160a01b03166001600160a01b0316815260200190815260200160002082815481106114fa576114fa6120fb565b60009182526020808320845460039390930201918255600180850154908301556002938401549390910192909255338152600d9091526040902080548061154357611543612128565b6000828152602081206003600019909301928302018181556001810182905560020155905550565b600061058e825490565b60006110258383611985565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006110258284612111565b6000611025828461213e565b6000611025828461215d565b600061102582846120e3565b6116426001600160a01b037f000000000000000000000000b668f51f1d63452b566456053fa348c3037e2b1f1684836119af565b61164c3082611a3f565b600061165883836115de565b905080156116ac57600e5461166d9082611602565b600e55604080518481526020810183905233917f7d84431df6ec199e26a17bd48f5e79289f1c845023e9e642769309dc34c1ed90910160405180910390a25b60408051848152602081018490526001600160a01b038616917f0da072ebd7a5649099f43a3776eb0cda17aca79426ee9f28aae203f5dfa04eda910160405180910390a250505050565b816117435760405162461bcd60e51b815260206004820152601d60248201527f657363726f773a20616d6f756e742063616e6e6f74206265206e756c6c0000006044820152606401610687565b61174d8183611b7f565b604080516001600160a01b038316815260208101849052815133927f812c3251d8b2cd027716a7651ace6f9167d7fba4db9eb10df2e0cfe8b7fa48c9928290030190a261077f7f000000000000000000000000b668f51f1d63452b566456053fa348c3037e2b1f6001600160a01b0316333085611c4c565b600081815260018301602052604081205461180c5750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561058e565b50600061058e565b6001600160a01b03831615806118305750611830600784611150565b806118415750611841600783611150565b61188d5760405162461bcd60e51b815260206004820152601560248201527f7472616e736665723a206e6f7420616c6c6f77656400000000000000000000006044820152606401610687565b505050565b6000818152600183016020526040812054801561197b5760006118b6600183612111565b85549091506000906118ca90600190612111565b905081811461192f5760008660000182815481106118ea576118ea6120fb565b906000526020600020015490508087600001848154811061190d5761190d6120fb565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061194057611940612128565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061058e565b600091505061058e565b600082600001828154811061199c5761199c6120fb565b9060005260206000200154905092915050565b6040516001600160a01b03831660248201526044810182905261188d90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152611c84565b6001600160a01b038216611a9f5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610687565b611aab82600083611814565b6001600160a01b03821660009081526002602052604090205481811015611b1f5760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610687565b6001600160a01b03831660008181526002602090815260408083208686039055600480548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3505050565b6001600160a01b038216611bd55760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610687565b611be160008383611814565b8060046000828254611bf391906120e3565b90915550506001600160a01b0382166000818152600260209081526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b6040516001600160a01b03808516602483015283166044820152606481018290526111fe9085906323b872dd60e01b906084016119db565b6000611cd9826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611d569092919063ffffffff16565b80519091501561188d5780806020019051810190611cf7919061217f565b61188d5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610687565b6060611d658484600085611d6d565b949350505050565b606082471015611dce5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610687565b600080866001600160a01b03168587604051611dea919061219c565b60006040518083038185875af1925050503d8060008114611e27576040519150601f19603f3d011682016040523d82523d6000602084013e611e2c565b606091505b5091509150611e3d87838387611e48565b979650505050505050565b60608315611eb4578251611ead576001600160a01b0385163b611ead5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610687565b5081611d65565b611d658383815115611ec95781518083602001fd5b8060405162461bcd60e51b81526004016106879190611f0f565b60005b83811015611efe578181015183820152602001611ee6565b838111156111fe5750506000910152565b6020815260008251806020840152611f2e816040850160208701611ee3565b601f01601f19169190910160400192915050565b80356001600160a01b0381168114611f5957600080fd5b919050565b60008060408385031215611f7157600080fd5b611f7a83611f42565b946020939093013593505050565b600060208284031215611f9a57600080fd5b61102582611f42565b600060208284031215611fb557600080fd5b5035919050565b600080600060608486031215611fd157600080fd5b611fda84611f42565b9250611fe860208501611f42565b9150604084013590509250925092565b80151581146108bc57600080fd5b6000806040838503121561201957600080fd5b61202283611f42565b9150602083013561203281611ff8565b809150509250929050565b6000806040838503121561205057600080fd5b50508035926020909101359150565b6000806040838503121561207257600080fd5b61207b83611f42565b915061208960208401611f42565b90509250929050565b600181811c908216806120a657607f821691505b602082108114156120c757634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b600082198211156120f6576120f66120cd565b500190565b634e487b7160e01b600052603260045260246000fd5b600082821015612123576121236120cd565b500390565b634e487b7160e01b600052603160045260246000fd5b6000816000190483118215151615612158576121586120cd565b500290565b60008261217a57634e487b7160e01b600052601260045260246000fd5b500490565b60006020828403121561219157600080fd5b815161102581611ff8565b600082516121ae818460208701611ee3565b919091019291505056fea2646970667358221220288dd67ee2dd03d2093c05bef8c8cb7853a8f3fed73a7986e05be97f9e4de1f464736f6c634300080c0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000b668f51f1d63452b566456053fa348c3037e2b1f
-----Decoded View---------------
Arg [0] : _slsdToken (address): 0xB668f51f1D63452b566456053fA348c3037E2B1F
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000b668f51f1d63452b566456053fa348c3037e2b1f
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.