Feature Tip: Add private address tag to any address under My Name Tag !
Source Code
Latest 25 from a total of 37 transactions
| Transaction Hash |
Method
|
Block
|
From
|
|
To
|
||||
|---|---|---|---|---|---|---|---|---|---|
| Set Presale Pric... | 15179742 | 1344 days ago | IN | 0 ETH | 0.00068299 | ||||
| Set Price | 15176181 | 1344 days ago | IN | 0 ETH | 0.00084572 | ||||
| Release | 15173385 | 1345 days ago | IN | 0 ETH | 0.00255716 | ||||
| Release | 15173376 | 1345 days ago | IN | 0 ETH | 0.00270172 | ||||
| Release | 15173370 | 1345 days ago | IN | 0 ETH | 0.00346235 | ||||
| Public Sale Mint | 15153815 | 1348 days ago | IN | 1.35 ETH | 0.00157795 | ||||
| Public Sale Mint | 15153699 | 1348 days ago | IN | 1.35 ETH | 0.00121772 | ||||
| Release | 15102660 | 1355 days ago | IN | 0 ETH | 0.00217479 | ||||
| Release | 15102660 | 1355 days ago | IN | 0 ETH | 0.00217479 | ||||
| Release | 15102660 | 1355 days ago | IN | 0 ETH | 0.00217479 | ||||
| Public Sale Mint | 15078779 | 1359 days ago | IN | 1.35 ETH | 0.00140977 | ||||
| Presale Mint | 15049338 | 1364 days ago | IN | 1.2 ETH | 0.00543554 | ||||
| Public Sale Mint | 15046572 | 1364 days ago | IN | 1.35 ETH | 0.00736762 | ||||
| Set Presale Merk... | 15044147 | 1365 days ago | IN | 0 ETH | 0.00110405 | ||||
| Public Sale Mint | 15030667 | 1367 days ago | IN | 1.35 ETH | 0.00382861 | ||||
| Public Sale Mint | 15028222 | 1368 days ago | IN | 1.35 ETH | 0.00218226 | ||||
| Public Sale Mint | 15023472 | 1369 days ago | IN | 1.35 ETH | 0.00243136 | ||||
| Release | 15019721 | 1369 days ago | IN | 0 ETH | 0.00315447 | ||||
| Release | 15019721 | 1369 days ago | IN | 0 ETH | 0.00315447 | ||||
| Release | 15019712 | 1369 days ago | IN | 0 ETH | 0.00498823 | ||||
| Public Sale Mint | 15019400 | 1369 days ago | IN | 1.35 ETH | 0.00276235 | ||||
| Presale Mint | 15014226 | 1370 days ago | IN | 1.2 ETH | 0.03902246 | ||||
| Presale Mint | 15013906 | 1370 days ago | IN | 1.2 ETH | 0.00859513 | ||||
| Public Sale Mint | 15013806 | 1370 days ago | IN | 1.35 ETH | 0.0038719 | ||||
| Public Sale Mint | 15012105 | 1371 days ago | IN | 1.35 ETH | 0.00595207 |
Latest 9 internal transactions
Advanced mode:
| Parent Transaction Hash | Method | Block |
From
|
|
To
|
||
|---|---|---|---|---|---|---|---|
| Transfer | 15173385 | 1345 days ago | 0.027 ETH | ||||
| Transfer | 15173376 | 1345 days ago | 0.081 ETH | ||||
| Transfer | 15173370 | 1345 days ago | 2.592 ETH | ||||
| Transfer | 15102660 | 1355 days ago | 0.0795 ETH | ||||
| Transfer | 15102660 | 1355 days ago | 0.2385 ETH | ||||
| Transfer | 15102660 | 1355 days ago | 7.632 ETH | ||||
| Transfer | 15019721 | 1369 days ago | 0.18 ETH | ||||
| Transfer | 15019721 | 1369 days ago | 0.54 ETH | ||||
| Transfer | 15019712 | 1369 days ago | 17.28 ETH |
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
PlushMint
Compiler Version
v0.8.13+commit.abaa5c0e
Optimization Enabled:
Yes with 10000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
//SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.13;
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/finance/PaymentSplitter.sol";
import "@openzeppelin/contracts/access/AccessControlEnumerable.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "./IPlush.sol";
/**
* @dev This contract is used to perform the sale of Plush NFT. You can enter the Plushlist and gain access to the presale
*/
contract PlushMint is AccessControlEnumerable, PaymentSplitter, Pausable {
// The Plush NFT contract itself
IPlush immutable Plush;
// The maximum number of tokens mintable with the presale
uint256 public constant maxMintablePresale = 3;
//The maximum number of tokens mintable at once during the public sale
uint256 public constant maxMintablePerTx = 10;
//Both the sale and presale will start at the same time
uint256 public immutable saleStart;
uint256 public immutable presaleStart;
//Admin of other roles, is allowed to end sale
bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE");
//Performs tasks on sale parameters (merkle root, price)
bytes32 public constant SALE_ADMIN_ROLE = keccak256("SALE_ADMIN_ROLE");
//Is allowed to pause and unpause sale
bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE");
error NotAllowed();
error AmountZero();
error MintTooLarge();
error NotWhitelisted();
error PresaleNotStarted();
error PresaleEnded();
error MaxPresaleAmountReached();
error MaxSupplyReached();
error InsufficientFunds();
error SaleNotStarted();
error SaleEnded();
error PriceNotInRange();
error EndDateNotInRange();
error StartNotInRange();
error SupplyNotInRange();
//Max supply dedicated to this mint out of 50,000. The other supply is dedicated to payment with fiat. See PlushFiatMint for more details.
uint256 public maxSupply = 20000;
//Actual sale price
uint256 public price; //To be defined
//Actual presale price
uint256 public presalePrice; //To be defined
//The merkle root used to confirm a user access to the presale
bytes32 public presaleMerkleRoot;
//Indicate if the sale has been ended. Can be switched of only once manually.
bool public saleEnded;
//Number of tokens minted with this contract.
uint256 public minted;
//Numbers of tokens minted by each address during the presale. Used to disallow more than 3 mints
mapping(address => uint256) public tokensMinted;
constructor(
IPlush _plush,
address[] memory _team,
uint256[] memory _teamShares,
uint256 _saleStart,
uint256 _presaleStart,
uint256 _initialPresalePrice,
uint256 _initialSalePrice
) PaymentSplitter(_team, _teamShares) {
if (_initialSalePrice == 0) revert PriceNotInRange();
if (_initialPresalePrice == 0) revert PriceNotInRange();
if (_saleStart == 0) revert StartNotInRange();
if (_presaleStart == 0) revert StartNotInRange();
Plush = _plush;
saleStart = _saleStart;
presaleStart = _presaleStart;
price = _initialSalePrice;
presalePrice = _initialPresalePrice;
_setRoleAdmin(SALE_ADMIN_ROLE, ADMIN_ROLE);
_setRoleAdmin(PAUSER_ROLE, ADMIN_ROLE);
_grantRole(ADMIN_ROLE, msg.sender);
}
modifier onlyAdmin() {
if (!hasRole(ADMIN_ROLE, msg.sender)) revert NotAllowed();
_;
}
modifier onlySaleAdmin() {
if (!hasRole(SALE_ADMIN_ROLE, msg.sender)) revert NotAllowed();
_;
}
modifier onlyPauser() {
if (!hasRole(PAUSER_ROLE, msg.sender)) revert NotAllowed();
_;
}
//Set the presale merkle root. Can be updated if late participants send their address.
function setPresaleMerkleRoot(bytes32 _presaleRoot) external onlySaleAdmin {
presaleMerkleRoot = _presaleRoot;
}
//Set the max supply dedicated to this contract. Can not mint over 50,000 due to limitations in Plush. Can be adjusted in parallel with PlushFiatMint max supply.
function setMaxSupply(uint256 _supply) external onlySaleAdmin {
if (_supply < minted) revert SupplyNotInRange();
maxSupply = _supply;
}
//Set the sale price. It can not be 0
function setPrice(uint256 _newPrice) public onlySaleAdmin {
if(_newPrice == 0) revert PriceNotInRange();
price = _newPrice;
}
//Set the presale price. It can not vary for more than 50% of the initial price.
function setPresalePrice(uint256 _newPrice) public onlySaleAdmin {
if(_newPrice == 0) revert PriceNotInRange();
presalePrice = _newPrice;
}
//Close the sale
function endSale() public onlyAdmin {
saleEnded = true;
}
//Pause the contract in case of an emergency
function pause() external onlyPauser {
_pause();
}
//Unpause the contract
function unpause() external onlyPauser {
_unpause();
}
/**
* @dev Perform a presale mint using a MerkleTree construction to verify that an address belongs to the Plush list
* @param amount The amount of tokens the user wants to mint. Total tokens minted must be <= 3 or else the function reverts
* @param merkleProof The merkle proof for msg.sender address
*/
function presaleMint(uint256 amount, bytes32[] calldata merkleProof)
external
payable
whenNotPaused
{
//Check if sale is ended
if (saleEnded) revert PresaleEnded();
//Check if presale is started
if (block.timestamp < presaleStart) revert PresaleNotStarted();
// Check that max supply is not reached
if (minted + amount > maxSupply) revert MaxSupplyReached();
//Verify membership to plushlist
if (
!MerkleProof.verify(
merkleProof,
presaleMerkleRoot,
keccak256(abi.encodePacked(msg.sender))
)
) revert NotWhitelisted();
//Check that the address does not mint more than allowed
if (tokensMinted[msg.sender] + amount > maxMintablePresale)
revert MaxPresaleAmountReached();
if (amount == 0) revert AmountZero();
// Check that the sufficient funds have been sent
if (msg.value < presalePrice * amount) revert InsufficientFunds();
//Increments tokens minted for this address
tokensMinted[msg.sender] += amount;
//Increments number of tokens minted
minted += amount;
//Mint to the address
Plush.mintTo(msg.sender, amount);
//Send back any excess amount
if (msg.value > presalePrice * amount) {
payable(msg.sender).transfer(msg.value - presalePrice * amount);
}
}
/**
* @dev Performs a public sale
* @param amount The amount of tokens to purchase. Must be < 10 or the function reverts
*/
function publicSaleMint(uint256 amount) external payable whenNotPaused {
//Check that sale is not ended
if (saleEnded) revert SaleEnded();
//Check is sale is started
if (block.timestamp < saleStart) revert SaleNotStarted();
//Checks to the amount is correct
if (amount > maxMintablePerTx) revert MintTooLarge();
//Check if max supply has been reached
if (minted + amount > maxSupply) revert MaxSupplyReached();
if (amount == 0) revert AmountZero();
//Check that a sufficient amount has been sent
if (msg.value < price * amount) revert InsufficientFunds();
//Increments counter of tokens minted
minted += amount;
//Mint the tokens
Plush.mintTo(msg.sender, amount);
//Send back any excess amount
if (msg.value > price * amount) {
payable(msg.sender).transfer(msg.value - price * amount);
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (utils/cryptography/MerkleProof.sol)
pragma solidity ^0.8.0;
/**
* @dev These functions deal with verification of Merkle Trees proofs.
*
* The proofs can be generated using the JavaScript library
* https://github.com/miguelmota/merkletreejs[merkletreejs].
* Note: the hashing algorithm should be keccak256 and pair sorting should be enabled.
*
* See `test/utils/cryptography/MerkleProof.test.js` for some examples.
*
* WARNING: You should avoid using leaf values that are 64 bytes long prior to
* hashing, or use a hash function other than keccak256 for hashing leaves.
* This is because the concatenation of a sorted pair of internal nodes in
* the merkle tree could be reinterpreted as a leaf value.
*/
library MerkleProof {
/**
* @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
* defined by `root`. For this, a `proof` must be provided, containing
* sibling hashes on the branch from the leaf to the root of the tree. Each
* pair of leaves and each pair of pre-images are assumed to be sorted.
*/
function verify(
bytes32[] memory proof,
bytes32 root,
bytes32 leaf
) internal pure returns (bool) {
return processProof(proof, leaf) == root;
}
/**
* @dev Returns the rebuilt hash obtained by traversing a Merkle tree up
* from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
* hash matches the root of the tree. When processing the proof, the pairs
* of leafs & pre-images are assumed to be sorted.
*
* _Available since v4.4._
*/
function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) {
bytes32 computedHash = leaf;
for (uint256 i = 0; i < proof.length; i++) {
bytes32 proofElement = proof[i];
if (computedHash <= proofElement) {
// Hash(current computed hash + current element of the proof)
computedHash = _efficientHash(computedHash, proofElement);
} else {
// Hash(current element of the proof + current computed hash)
computedHash = _efficientHash(proofElement, computedHash);
}
}
return computedHash;
}
function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) {
assembly {
mstore(0x00, a)
mstore(0x20, b)
value := keccak256(0x00, 0x40)
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (finance/PaymentSplitter.sol)
pragma solidity ^0.8.0;
import "../token/ERC20/utils/SafeERC20.sol";
import "../utils/Address.sol";
import "../utils/Context.sol";
/**
* @title PaymentSplitter
* @dev This contract allows to split Ether payments among a group of accounts. The sender does not need to be aware
* that the Ether will be split in this way, since it is handled transparently by the contract.
*
* The split can be in equal parts or in any other arbitrary proportion. The way this is specified is by assigning each
* account to a number of shares. Of all the Ether that this contract receives, each account will then be able to claim
* an amount proportional to the percentage of total shares they were assigned.
*
* `PaymentSplitter` follows a _pull payment_ model. This means that payments are not automatically forwarded to the
* accounts but kept in this contract, and the actual transfer is triggered as a separate step by calling the {release}
* function.
*
* NOTE: This contract assumes that ERC20 tokens will behave similarly to native tokens (Ether). Rebasing tokens, and
* tokens that apply fees during transfers, are likely to not be supported as expected. If in doubt, we encourage you
* to run tests before sending real value to this contract.
*/
contract PaymentSplitter is Context {
event PayeeAdded(address account, uint256 shares);
event PaymentReleased(address to, uint256 amount);
event ERC20PaymentReleased(IERC20 indexed token, address to, uint256 amount);
event PaymentReceived(address from, uint256 amount);
uint256 private _totalShares;
uint256 private _totalReleased;
mapping(address => uint256) private _shares;
mapping(address => uint256) private _released;
address[] private _payees;
mapping(IERC20 => uint256) private _erc20TotalReleased;
mapping(IERC20 => mapping(address => uint256)) private _erc20Released;
/**
* @dev Creates an instance of `PaymentSplitter` where each account in `payees` is assigned the number of shares at
* the matching position in the `shares` array.
*
* All addresses in `payees` must be non-zero. Both arrays must have the same non-zero length, and there must be no
* duplicates in `payees`.
*/
constructor(address[] memory payees, uint256[] memory shares_) payable {
require(payees.length == shares_.length, "PaymentSplitter: payees and shares length mismatch");
require(payees.length > 0, "PaymentSplitter: no payees");
for (uint256 i = 0; i < payees.length; i++) {
_addPayee(payees[i], shares_[i]);
}
}
/**
* @dev The Ether received will be logged with {PaymentReceived} events. Note that these events are not fully
* reliable: it's possible for a contract to receive Ether without triggering this function. This only affects the
* reliability of the events, and not the actual splitting of Ether.
*
* To learn more about this see the Solidity documentation for
* https://solidity.readthedocs.io/en/latest/contracts.html#fallback-function[fallback
* functions].
*/
receive() external payable virtual {
emit PaymentReceived(_msgSender(), msg.value);
}
/**
* @dev Getter for the total shares held by payees.
*/
function totalShares() public view returns (uint256) {
return _totalShares;
}
/**
* @dev Getter for the total amount of Ether already released.
*/
function totalReleased() public view returns (uint256) {
return _totalReleased;
}
/**
* @dev Getter for the total amount of `token` already released. `token` should be the address of an IERC20
* contract.
*/
function totalReleased(IERC20 token) public view returns (uint256) {
return _erc20TotalReleased[token];
}
/**
* @dev Getter for the amount of shares held by an account.
*/
function shares(address account) public view returns (uint256) {
return _shares[account];
}
/**
* @dev Getter for the amount of Ether already released to a payee.
*/
function released(address account) public view returns (uint256) {
return _released[account];
}
/**
* @dev Getter for the amount of `token` tokens already released to a payee. `token` should be the address of an
* IERC20 contract.
*/
function released(IERC20 token, address account) public view returns (uint256) {
return _erc20Released[token][account];
}
/**
* @dev Getter for the address of the payee number `index`.
*/
function payee(uint256 index) public view returns (address) {
return _payees[index];
}
/**
* @dev Triggers a transfer to `account` of the amount of Ether they are owed, according to their percentage of the
* total shares and their previous withdrawals.
*/
function release(address payable account) public virtual {
require(_shares[account] > 0, "PaymentSplitter: account has no shares");
uint256 totalReceived = address(this).balance + totalReleased();
uint256 payment = _pendingPayment(account, totalReceived, released(account));
require(payment != 0, "PaymentSplitter: account is not due payment");
_released[account] += payment;
_totalReleased += payment;
Address.sendValue(account, payment);
emit PaymentReleased(account, payment);
}
/**
* @dev Triggers a transfer to `account` of the amount of `token` tokens they are owed, according to their
* percentage of the total shares and their previous withdrawals. `token` must be the address of an IERC20
* contract.
*/
function release(IERC20 token, address account) public virtual {
require(_shares[account] > 0, "PaymentSplitter: account has no shares");
uint256 totalReceived = token.balanceOf(address(this)) + totalReleased(token);
uint256 payment = _pendingPayment(account, totalReceived, released(token, account));
require(payment != 0, "PaymentSplitter: account is not due payment");
_erc20Released[token][account] += payment;
_erc20TotalReleased[token] += payment;
SafeERC20.safeTransfer(token, account, payment);
emit ERC20PaymentReleased(token, account, payment);
}
/**
* @dev internal logic for computing the pending payment of an `account` given the token historical balances and
* already released amounts.
*/
function _pendingPayment(
address account,
uint256 totalReceived,
uint256 alreadyReleased
) private view returns (uint256) {
return (totalReceived * _shares[account]) / _totalShares - alreadyReleased;
}
/**
* @dev Add a new payee to the contract.
* @param account The address of the payee to add.
* @param shares_ The number of shares owned by the payee.
*/
function _addPayee(address account, uint256 shares_) private {
require(account != address(0), "PaymentSplitter: account is the zero address");
require(shares_ > 0, "PaymentSplitter: shares are 0");
require(_shares[account] == 0, "PaymentSplitter: account already has shares");
_payees.push(account);
_shares[account] = shares_;
_totalShares = _totalShares + shares_;
emit PayeeAdded(account, shares_);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControlEnumerable.sol)
pragma solidity ^0.8.0;
import "./IAccessControlEnumerable.sol";
import "./AccessControl.sol";
import "../utils/structs/EnumerableSet.sol";
/**
* @dev Extension of {AccessControl} that allows enumerating the members of each role.
*/
abstract contract AccessControlEnumerable is IAccessControlEnumerable, AccessControl {
using EnumerableSet for EnumerableSet.AddressSet;
mapping(bytes32 => EnumerableSet.AddressSet) private _roleMembers;
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IAccessControlEnumerable).interfaceId || super.supportsInterface(interfaceId);
}
/**
* @dev Returns one of the accounts that have `role`. `index` must be a
* value between 0 and {getRoleMemberCount}, non-inclusive.
*
* Role bearers are not sorted in any particular way, and their ordering may
* change at any point.
*
* WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure
* you perform all queries on the same block. See the following
* https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]
* for more information.
*/
function getRoleMember(bytes32 role, uint256 index) public view virtual override returns (address) {
return _roleMembers[role].at(index);
}
/**
* @dev Returns the number of accounts that have `role`. Can be used
* together with {getRoleMember} to enumerate all bearers of a role.
*/
function getRoleMemberCount(bytes32 role) public view virtual override returns (uint256) {
return _roleMembers[role].length();
}
/**
* @dev Overload {_grantRole} to track enumerable memberships
*/
function _grantRole(bytes32 role, address account) internal virtual override {
super._grantRole(role, account);
_roleMembers[role].add(account);
}
/**
* @dev Overload {_revokeRole} to track enumerable memberships
*/
function _revokeRole(bytes32 role, address account) internal virtual override {
super._revokeRole(role, account);
_roleMembers[role].remove(account);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/Pausable.sol)
pragma solidity ^0.8.0;
import "../utils/Context.sol";
/**
* @dev Contract module which allows children to implement an emergency stop
* mechanism that can be triggered by an authorized account.
*
* This module is used through inheritance. It will make available the
* modifiers `whenNotPaused` and `whenPaused`, which can be applied to
* the functions of your contract. Note that they will not be pausable by
* simply including this module, only once the modifiers are put in place.
*/
abstract contract Pausable is Context {
/**
* @dev Emitted when the pause is triggered by `account`.
*/
event Paused(address account);
/**
* @dev Emitted when the pause is lifted by `account`.
*/
event Unpaused(address account);
bool private _paused;
/**
* @dev Initializes the contract in unpaused state.
*/
constructor() {
_paused = false;
}
/**
* @dev Returns true if the contract is paused, and false otherwise.
*/
function paused() public view virtual returns (bool) {
return _paused;
}
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*
* Requirements:
*
* - The contract must not be paused.
*/
modifier whenNotPaused() {
require(!paused(), "Pausable: paused");
_;
}
/**
* @dev Modifier to make a function callable only when the contract is paused.
*
* Requirements:
*
* - The contract must be paused.
*/
modifier whenPaused() {
require(paused(), "Pausable: not paused");
_;
}
/**
* @dev Triggers stopped state.
*
* Requirements:
*
* - The contract must not be paused.
*/
function _pause() internal virtual whenNotPaused {
_paused = true;
emit Paused(_msgSender());
}
/**
* @dev Returns to normal state.
*
* Requirements:
*
* - The contract must be paused.
*/
function _unpause() internal virtual whenPaused {
_paused = false;
emit Unpaused(_msgSender());
}
}//SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol";
interface IPlush is IERC721Enumerable {
function mintTo(address _to, uint256 _quantity) external;
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)
pragma solidity ^0.8.0;
import "../IERC20.sol";
import "../../../utils/Address.sol";
/**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure (when the token
* contract returns false). Tokens that return no value (and instead revert or
* throw on failure) are also supported, non-reverting calls are assumed to be
* successful.
* To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
* which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
*/
library SafeERC20 {
using Address for address;
function safeTransfer(
IERC20 token,
address to,
uint256 value
) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
function safeTransferFrom(
IERC20 token,
address from,
address to,
uint256 value
) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
}
/**
* @dev Deprecated. This function has issues similar to the ones found in
* {IERC20-approve}, and its usage is discouraged.
*
* Whenever possible, use {safeIncreaseAllowance} and
* {safeDecreaseAllowance} instead.
*/
function safeApprove(
IERC20 token,
address spender,
uint256 value
) internal {
// safeApprove should only be called when setting an initial allowance,
// or when resetting it to zero. To increase and decrease it, use
// 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
require(
(value == 0) || (token.allowance(address(this), spender) == 0),
"SafeERC20: approve from non-zero to non-zero allowance"
);
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
}
function safeIncreaseAllowance(
IERC20 token,
address spender,
uint256 value
) internal {
uint256 newAllowance = token.allowance(address(this), spender) + value;
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
}
function safeDecreaseAllowance(
IERC20 token,
address spender,
uint256 value
) internal {
unchecked {
uint256 oldAllowance = token.allowance(address(this), spender);
require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
uint256 newAllowance = oldAllowance - value;
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
}
}
/**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi.encode or one of its variants).
*/
function _callOptionalReturn(IERC20 token, bytes memory data) private {
// We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
// we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
// the target address contains contract code and also asserts for success in the low-level call.
bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
if (returndata.length > 0) {
// Return data is optional
require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.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 functionCall(target, data, "Address: low-level call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value
) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
require(isContract(target), "Address: call to non-contract");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
require(isContract(target), "Address: static call to non-contract");
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
require(isContract(target), "Address: delegate call to non-contract");
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason using the provided one.
*
* _Available since v4.3._
*/
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
}// SPDX-License-Identifier: MIT
// 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) (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 v4.4.1 (access/IAccessControlEnumerable.sol)
pragma solidity ^0.8.0;
import "./IAccessControl.sol";
/**
* @dev External interface of AccessControlEnumerable declared to support ERC165 detection.
*/
interface IAccessControlEnumerable is IAccessControl {
/**
* @dev Returns one of the accounts that have `role`. `index` must be a
* value between 0 and {getRoleMemberCount}, non-inclusive.
*
* Role bearers are not sorted in any particular way, and their ordering may
* change at any point.
*
* WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure
* you perform all queries on the same block. See the following
* https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]
* for more information.
*/
function getRoleMember(bytes32 role, uint256 index) external view returns (address);
/**
* @dev Returns the number of accounts that have `role`. Can be used
* together with {getRoleMember} to enumerate all bearers of a role.
*/
function getRoleMemberCount(bytes32 role) external view returns (uint256);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (access/AccessControl.sol)
pragma solidity ^0.8.0;
import "./IAccessControl.sol";
import "../utils/Context.sol";
import "../utils/Strings.sol";
import "../utils/introspection/ERC165.sol";
/**
* @dev Contract module that allows children to implement role-based access
* control mechanisms. This is a lightweight version that doesn't allow enumerating role
* members except through off-chain means by accessing the contract event logs. Some
* applications may benefit from on-chain enumerability, for those cases see
* {AccessControlEnumerable}.
*
* Roles are referred to by their `bytes32` identifier. These should be exposed
* in the external API and be unique. The best way to achieve this is by
* using `public constant` hash digests:
*
* ```
* bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
* ```
*
* Roles can be used to represent a set of permissions. To restrict access to a
* function call, use {hasRole}:
*
* ```
* function foo() public {
* require(hasRole(MY_ROLE, msg.sender));
* ...
* }
* ```
*
* Roles can be granted and revoked dynamically via the {grantRole} and
* {revokeRole} functions. Each role has an associated admin role, and only
* accounts that have a role's admin role can call {grantRole} and {revokeRole}.
*
* By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
* that only accounts with this role will be able to grant or revoke other
* roles. More complex role relationships can be created by using
* {_setRoleAdmin}.
*
* WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
* grant and revoke this role. Extra precautions should be taken to secure
* accounts that have been granted it.
*/
abstract contract AccessControl is Context, IAccessControl, ERC165 {
struct RoleData {
mapping(address => bool) members;
bytes32 adminRole;
}
mapping(bytes32 => RoleData) private _roles;
bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;
/**
* @dev Modifier that checks that an account has a specific role. Reverts
* with a standardized message including the required role.
*
* The format of the revert reason is given by the following regular expression:
*
* /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
*
* _Available since v4.1._
*/
modifier onlyRole(bytes32 role) {
_checkRole(role);
_;
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);
}
/**
* @dev Returns `true` if `account` has been granted `role`.
*/
function hasRole(bytes32 role, address account) public view virtual override returns (bool) {
return _roles[role].members[account];
}
/**
* @dev Revert with a standard message if `_msgSender()` is missing `role`.
* Overriding this function changes the behavior of the {onlyRole} modifier.
*
* Format of the revert message is described in {_checkRole}.
*
* _Available since v4.6._
*/
function _checkRole(bytes32 role) internal view virtual {
_checkRole(role, _msgSender());
}
/**
* @dev Revert with a standard message if `account` is missing `role`.
*
* The format of the revert reason is given by the following regular expression:
*
* /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
*/
function _checkRole(bytes32 role, address account) internal view virtual {
if (!hasRole(role, account)) {
revert(
string(
abi.encodePacked(
"AccessControl: account ",
Strings.toHexString(uint160(account), 20),
" is missing role ",
Strings.toHexString(uint256(role), 32)
)
)
);
}
}
/**
* @dev Returns the admin role that controls `role`. See {grantRole} and
* {revokeRole}.
*
* To change a role's admin, use {_setRoleAdmin}.
*/
function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {
return _roles[role].adminRole;
}
/**
* @dev Grants `role` to `account`.
*
* If `account` had not been already granted `role`, emits a {RoleGranted}
* event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*/
function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
_grantRole(role, account);
}
/**
* @dev Revokes `role` from `account`.
*
* If `account` had been granted `role`, emits a {RoleRevoked} event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*/
function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
_revokeRole(role, account);
}
/**
* @dev Revokes `role` from the calling account.
*
* Roles are often managed via {grantRole} and {revokeRole}: this function's
* purpose is to provide a mechanism for accounts to lose their privileges
* if they are compromised (such as when a trusted device is misplaced).
*
* If the calling account had been revoked `role`, emits a {RoleRevoked}
* event.
*
* Requirements:
*
* - the caller must be `account`.
*/
function renounceRole(bytes32 role, address account) public virtual override {
require(account == _msgSender(), "AccessControl: can only renounce roles for self");
_revokeRole(role, account);
}
/**
* @dev Grants `role` to `account`.
*
* If `account` had not been already granted `role`, emits a {RoleGranted}
* event. Note that unlike {grantRole}, this function doesn't perform any
* checks on the calling account.
*
* [WARNING]
* ====
* This function should only be called from the constructor when setting
* up the initial roles for the system.
*
* Using this function in any other way is effectively circumventing the admin
* system imposed by {AccessControl}.
* ====
*
* NOTE: This function is deprecated in favor of {_grantRole}.
*/
function _setupRole(bytes32 role, address account) internal virtual {
_grantRole(role, account);
}
/**
* @dev Sets `adminRole` as ``role``'s admin role.
*
* Emits a {RoleAdminChanged} event.
*/
function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
bytes32 previousAdminRole = getRoleAdmin(role);
_roles[role].adminRole = adminRole;
emit RoleAdminChanged(role, previousAdminRole, adminRole);
}
/**
* @dev Grants `role` to `account`.
*
* Internal function without access restriction.
*/
function _grantRole(bytes32 role, address account) internal virtual {
if (!hasRole(role, account)) {
_roles[role].members[account] = true;
emit RoleGranted(role, account, _msgSender());
}
}
/**
* @dev Revokes `role` from `account`.
*
* Internal function without access restriction.
*/
function _revokeRole(bytes32 role, address account) internal virtual {
if (hasRole(role, account)) {
_roles[role].members[account] = false;
emit RoleRevoked(role, account, _msgSender());
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (utils/structs/EnumerableSet.sol)
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.
*/
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) {
return _values(set._inner);
}
// 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;
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 on 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;
assembly {
result := store
}
return result;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)
pragma solidity ^0.8.0;
/**
* @dev External interface of AccessControl declared to support ERC165 detection.
*/
interface IAccessControl {
/**
* @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
*
* `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
* {RoleAdminChanged} not being emitted signaling this.
*
* _Available since v3.1._
*/
event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);
/**
* @dev Emitted when `account` is granted `role`.
*
* `sender` is the account that originated the contract call, an admin role
* bearer except when using {AccessControl-_setupRole}.
*/
event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);
/**
* @dev Emitted when `account` is revoked `role`.
*
* `sender` is the account that originated the contract call:
* - if using `revokeRole`, it is the admin role bearer
* - if using `renounceRole`, it is the role bearer (i.e. `account`)
*/
event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);
/**
* @dev Returns `true` if `account` has been granted `role`.
*/
function hasRole(bytes32 role, address account) external view returns (bool);
/**
* @dev Returns the admin role that controls `role`. See {grantRole} and
* {revokeRole}.
*
* To change a role's admin, use {AccessControl-_setRoleAdmin}.
*/
function getRoleAdmin(bytes32 role) external view returns (bytes32);
/**
* @dev Grants `role` to `account`.
*
* If `account` had not been already granted `role`, emits a {RoleGranted}
* event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*/
function grantRole(bytes32 role, address account) external;
/**
* @dev Revokes `role` from `account`.
*
* If `account` had been granted `role`, emits a {RoleRevoked} event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*/
function revokeRole(bytes32 role, address account) external;
/**
* @dev Revokes `role` from the calling account.
*
* Roles are often managed via {grantRole} and {revokeRole}: this function's
* purpose is to provide a mechanism for accounts to lose their privileges
* if they are compromised (such as when a trusted device is misplaced).
*
* If the calling account had been granted `role`, emits a {RoleRevoked}
* event.
*
* Requirements:
*
* - the caller must be `account`.
*/
function renounceRole(bytes32 role, address account) external;
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Strings.sol)
pragma solidity ^0.8.0;
/**
* @dev String operations.
*/
library Strings {
bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
// Inspired by OraclizeAPI's implementation - MIT licence
// https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol
if (value == 0) {
return "0";
}
uint256 temp = value;
uint256 digits;
while (temp != 0) {
digits++;
temp /= 10;
}
bytes memory buffer = new bytes(digits);
while (value != 0) {
digits -= 1;
buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
value /= 10;
}
return string(buffer);
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
*/
function toHexString(uint256 value) internal pure returns (string memory) {
if (value == 0) {
return "0x00";
}
uint256 temp = value;
uint256 length = 0;
while (temp != 0) {
length++;
temp >>= 8;
}
return toHexString(value, length);
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
*/
function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
bytes memory buffer = new bytes(2 * length + 2);
buffer[0] = "0";
buffer[1] = "x";
for (uint256 i = 2 * length + 1; i > 1; --i) {
buffer[i] = _HEX_SYMBOLS[value & 0xf];
value >>= 4;
}
require(value == 0, "Strings: hex length insufficient");
return string(buffer);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)
pragma solidity ^0.8.0;
import "./IERC165.sol";
/**
* @dev Implementation of the {IERC165} interface.
*
* Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
* for the additional interface id that will be supported. For example:
*
* ```solidity
* function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
* return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
* }
* ```
*
* Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
*/
abstract contract ERC165 is IERC165 {
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IERC165).interfaceId;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC165 standard, as defined in the
* https://eips.ethereum.org/EIPS/eip-165[EIP].
*
* Implementers can declare support of contract interfaces, which can then be
* queried by others ({ERC165Checker}).
*
* For an implementation, see {ERC165}.
*/
interface IERC165 {
/**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
* to learn more about how these ids are created.
*
* This function call must use less than 30 000 gas.
*/
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol)
pragma solidity ^0.8.0;
import "../IERC721.sol";
/**
* @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
* @dev See https://eips.ethereum.org/EIPS/eip-721
*/
interface IERC721Enumerable is IERC721 {
/**
* @dev Returns the total amount of tokens stored by the contract.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns a token ID owned by `owner` at a given `index` of its token list.
* Use along with {balanceOf} to enumerate all of ``owner``'s tokens.
*/
function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256);
/**
* @dev Returns a token ID at a given `index` of all the tokens stored by the contract.
* Use along with {totalSupply} to enumerate all tokens.
*/
function tokenByIndex(uint256 index) external view returns (uint256);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721.sol)
pragma solidity ^0.8.0;
import "../../utils/introspection/IERC165.sol";
/**
* @dev Required interface of an ERC721 compliant contract.
*/
interface IERC721 is IERC165 {
/**
* @dev Emitted when `tokenId` token is transferred from `from` to `to`.
*/
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
*/
event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
*/
event ApprovalForAll(address indexed owner, address indexed operator, bool approved);
/**
* @dev Returns the number of tokens in ``owner``'s account.
*/
function balanceOf(address owner) external view returns (uint256 balance);
/**
* @dev Returns the owner of the `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function ownerOf(uint256 tokenId) external view returns (address owner);
/**
* @dev Safely transfers `tokenId` token from `from` to `to`.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes calldata data
) external;
/**
* @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
* are aware of the ERC721 protocol to prevent tokens from being forever locked.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) external;
/**
* @dev Transfers `tokenId` token from `from` to `to`.
*
* WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
* - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address from,
address to,
uint256 tokenId
) external;
/**
* @dev Gives permission to `to` to transfer `tokenId` token to another account.
* The approval is cleared when the token is transferred.
*
* Only a single account can be approved at a time, so approving the zero address clears previous approvals.
*
* Requirements:
*
* - The caller must own the token or be an approved operator.
* - `tokenId` must exist.
*
* Emits an {Approval} event.
*/
function approve(address to, uint256 tokenId) external;
/**
* @dev Approve or remove `operator` as an operator for the caller.
* Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
*
* Requirements:
*
* - The `operator` cannot be the caller.
*
* Emits an {ApprovalForAll} event.
*/
function setApprovalForAll(address operator, bool _approved) external;
/**
* @dev Returns the account approved for `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function getApproved(uint256 tokenId) external view returns (address operator);
/**
* @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
*
* See {setApprovalForAll}
*/
function isApprovedForAll(address owner, address operator) external view returns (bool);
}{
"optimizer": {
"enabled": true,
"runs": 10000
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"contract IPlush","name":"_plush","type":"address"},{"internalType":"address[]","name":"_team","type":"address[]"},{"internalType":"uint256[]","name":"_teamShares","type":"uint256[]"},{"internalType":"uint256","name":"_saleStart","type":"uint256"},{"internalType":"uint256","name":"_presaleStart","type":"uint256"},{"internalType":"uint256","name":"_initialPresalePrice","type":"uint256"},{"internalType":"uint256","name":"_initialSalePrice","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AmountZero","type":"error"},{"inputs":[],"name":"EndDateNotInRange","type":"error"},{"inputs":[],"name":"InsufficientFunds","type":"error"},{"inputs":[],"name":"MaxPresaleAmountReached","type":"error"},{"inputs":[],"name":"MaxSupplyReached","type":"error"},{"inputs":[],"name":"MintTooLarge","type":"error"},{"inputs":[],"name":"NotAllowed","type":"error"},{"inputs":[],"name":"NotWhitelisted","type":"error"},{"inputs":[],"name":"PresaleEnded","type":"error"},{"inputs":[],"name":"PresaleNotStarted","type":"error"},{"inputs":[],"name":"PriceNotInRange","type":"error"},{"inputs":[],"name":"SaleEnded","type":"error"},{"inputs":[],"name":"SaleNotStarted","type":"error"},{"inputs":[],"name":"StartNotInRange","type":"error"},{"inputs":[],"name":"SupplyNotInRange","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract IERC20","name":"token","type":"address"},{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ERC20PaymentReleased","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"shares","type":"uint256"}],"name":"PayeeAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PaymentReceived","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PaymentReleased","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PAUSER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SALE_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"endSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getRoleMember","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleMemberCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxMintablePerTx","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxMintablePresale","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"payee","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"presaleMerkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes32[]","name":"merkleProof","type":"bytes32[]"}],"name":"presaleMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"presalePrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"presaleStart","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"price","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"publicSaleMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address payable","name":"account","type":"address"}],"name":"release","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"address","name":"account","type":"address"}],"name":"release","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"address","name":"account","type":"address"}],"name":"released","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"released","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"saleEnded","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"saleStart","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_supply","type":"uint256"}],"name":"setMaxSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_presaleRoot","type":"bytes32"}],"name":"setPresaleMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newPrice","type":"uint256"}],"name":"setPresalePrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newPrice","type":"uint256"}],"name":"setPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"shares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"tokensMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"}],"name":"totalReleased","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalReleased","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalShares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]Contract Creation Code
60e0604052614e20600a553480156200001757600080fd5b506040516200369c3803806200369c8339810160408190526200003a916200074c565b85858051825114620000ae5760405162461bcd60e51b815260206004820152603260248201527f5061796d656e7453706c69747465723a2070617965657320616e6420736861726044820152710cae640d8cadccee8d040dad2e6dac2e8c6d60731b60648201526084015b60405180910390fd5b6000825111620001015760405162461bcd60e51b815260206004820152601a60248201527f5061796d656e7453706c69747465723a206e6f207061796565730000000000006044820152606401620000a5565b60005b82518110156200016d57620001588382815181106200012757620001276200085b565b60200260200101518383815181106200014457620001446200085b565b6020026020010151620002c260201b60201c565b80620001648162000887565b91505062000104565b50506009805460ff191690555060008190036200019d5760405163aac9fd8760e01b815260040160405180910390fd5b81600003620001bf5760405163aac9fd8760e01b815260040160405180910390fd5b83600003620001e1576040516361d6ae0b60e11b815260040160405180910390fd5b8260000362000203576040516361d6ae0b60e11b815260040160405180910390fd5b6001600160a01b03871660805260a084905260c0839052600b819055600c8290556200025f7f27a0624e64a794e52337524177801654db9a21fcd4c18d902036cf6ff01b01596000805160206200367c833981519152620004b0565b6200029a7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a6000805160206200367c833981519152620004b0565b620002b56000805160206200367c83398151915233620004fb565b50505050505050620008be565b6001600160a01b0382166200032f5760405162461bcd60e51b815260206004820152602c60248201527f5061796d656e7453706c69747465723a206163636f756e74206973207468652060448201526b7a65726f206164647265737360a01b6064820152608401620000a5565b60008111620003815760405162461bcd60e51b815260206004820152601d60248201527f5061796d656e7453706c69747465723a207368617265732061726520300000006044820152606401620000a5565b6001600160a01b03821660009081526004602052604090205415620003fd5760405162461bcd60e51b815260206004820152602b60248201527f5061796d656e7453706c69747465723a206163636f756e7420616c726561647960448201526a206861732073686172657360a81b6064820152608401620000a5565b60068054600181019091557ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f0180546001600160a01b0319166001600160a01b038416908117909155600090815260046020526040902081905560025462000467908290620008a3565b600255604080516001600160a01b0384168152602081018390527f40c340f65e17194d14ddddb073d3c9f888e3cb52b5aae0c6c7706b4fbc905fac910160405180910390a15050565b600082815260208190526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b6200051282826200053e60201b62001b371760201c565b60008281526001602090815260409091206200053991839062001c27620005df821b17901c565b505050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16620005db576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556200059a3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b6000620005f6836001600160a01b038416620005ff565b90505b92915050565b60008181526001830160205260408120546200064857508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155620005f9565b506000620005f9565b6001600160a01b03811681146200066757600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715620006ab57620006ab6200066a565b604052919050565b60006001600160401b03821115620006cf57620006cf6200066a565b5060051b60200190565b600082601f830112620006eb57600080fd5b8151602062000704620006fe83620006b3565b62000680565b82815260059290921b840181019181810190868411156200072457600080fd5b8286015b8481101562000741578051835291830191830162000728565b509695505050505050565b600080600080600080600060e0888a0312156200076857600080fd5b8751620007758162000651565b602089810151919850906001600160401b03808211156200079557600080fd5b818b0191508b601f830112620007aa57600080fd5b8151620007bb620006fe82620006b3565b81815260059190911b8301840190848101908e831115620007db57600080fd5b938501935b8285101562000806578451620007f68162000651565b82529385019390850190620007e0565b60408e0151909b5094505050808311156200082057600080fd5b5050620008308a828b01620006d9565b955050606088015193506080880151925060a0880151915060c0880151905092959891949750929550565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016200089c576200089c62000871565b5060010190565b60008219821115620008b957620008b962000871565b500190565b60805160a05160c051612d7962000903600039600081816108d701526117a9015260008181610780015261144f0152600081816115f80152611a510152612d796000f3fe6080604052600436106102d45760003560e01c80638456cb5911610179578063b3ab66b0116100d6578063d79779b21161008a578063e33b7de311610064578063e33b7de3146108f9578063e3e1e8ef1461090e578063e63ab1e91461092157600080fd5b8063d79779b21461084e578063dd5b5a2e14610891578063de8801e5146108c557600080fd5b8063ce7c2ac2116100bb578063ce7c2ac2146107d5578063d547741f14610818578063d5abeb011461083857600080fd5b8063b3ab66b0146107a2578063ca15c873146107b557600080fd5b80639852595c1161012d578063a035b1fe11610112578063a035b1fe14610743578063a217fddf14610759578063ab0bcc411461076e57600080fd5b80639852595c146106e65780639b8906ae1461072957600080fd5b80639010d07c1161015e5780639010d07c1461065557806391b7f5ed1461067557806391d148541461069557600080fd5b80638456cb59146105fb5780638b83209b1461061057600080fd5b80633a98ef39116102325780634f02c420116101e657806365b973b2116101c057806365b973b2146105925780636f8b44b0146105a757806375b238fc146105c757600080fd5b80634f02c42014610537578063546104811461054d5780635c975abb1461057a57600080fd5b80633f4ba83a116102175780633f4ba83a146104af578063406072a9146104c457806348b750441461051757600080fd5b80633a98ef39146104855780633c6dddd71461049a57600080fd5b806328d7b276116102895780633549345e1161026e5780633549345e1461043057806336568abe14610450578063380d831b1461047057600080fd5b806328d7b276146103f05780632f2ff15d1461041057600080fd5b806319165587116102ba578063191655871461038857806322212e2b146103aa578063248a9ca3146103c057600080fd5b80620e7fa81461032f57806301ffc9a71461035857600080fd5b3661032a577f6ef95f06320e7a25a04a175ca677b7052bdd97131872c2192525a629f51be770336040805173ffffffffffffffffffffffffffffffffffffffff90921682523460208301520160405180910390a1005b600080fd5b34801561033b57600080fd5b50610345600c5481565b6040519081526020015b60405180910390f35b34801561036457600080fd5b50610378610373366004612885565b610955565b604051901515815260200161034f565b34801561039457600080fd5b506103a86103a33660046128e9565b6109b1565b005b3480156103b657600080fd5b50610345600d5481565b3480156103cc57600080fd5b506103456103db366004612906565b60009081526020819052604090206001015490565b3480156103fc57600080fd5b506103a861040b366004612906565b610bc7565b34801561041c57600080fd5b506103a861042b36600461291f565b610c34565b34801561043c57600080fd5b506103a861044b366004612906565b610c5e565b34801561045c57600080fd5b506103a861046b36600461291f565b610d05565b34801561047c57600080fd5b506103a8610d9e565b34801561049157600080fd5b50600254610345565b3480156104a657600080fd5b50610345600a81565b3480156104bb57600080fd5b506103a8610e33565b3480156104d057600080fd5b506103456104df36600461294f565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260086020908152604080832093909416825291909152205490565b34801561052357600080fd5b506103a861053236600461294f565b610ea5565b34801561054357600080fd5b50610345600f5481565b34801561055957600080fd5b506103456105683660046128e9565b60106020526000908152604090205481565b34801561058657600080fd5b5060095460ff16610378565b34801561059e57600080fd5b50610345600381565b3480156105b357600080fd5b506103a86105c2366004612906565b6111a1565b3480156105d357600080fd5b506103457fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b34801561060757600080fd5b506103a861124a565b34801561061c57600080fd5b5061063061062b366004612906565b6112ba565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161034f565b34801561066157600080fd5b5061063061067036600461297d565b6112f7565b34801561068157600080fd5b506103a8610690366004612906565b611316565b3480156106a157600080fd5b506103786106b036600461291f565b60009182526020828152604080842073ffffffffffffffffffffffffffffffffffffffff93909316845291905290205460ff1690565b3480156106f257600080fd5b506103456107013660046128e9565b73ffffffffffffffffffffffffffffffffffffffff1660009081526005602052604090205490565b34801561073557600080fd5b50600e546103789060ff1681565b34801561074f57600080fd5b50610345600b5481565b34801561076557600080fd5b50610345600081565b34801561077a57600080fd5b506103457f000000000000000000000000000000000000000000000000000000000000000081565b6103a86107b0366004612906565b6113bd565b3480156107c157600080fd5b506103456107d0366004612906565b6116db565b3480156107e157600080fd5b506103456107f03660046128e9565b73ffffffffffffffffffffffffffffffffffffffff1660009081526004602052604090205490565b34801561082457600080fd5b506103a861083336600461291f565b6116f2565b34801561084457600080fd5b50610345600a5481565b34801561085a57600080fd5b506103456108693660046128e9565b73ffffffffffffffffffffffffffffffffffffffff1660009081526007602052604090205490565b34801561089d57600080fd5b506103457f27a0624e64a794e52337524177801654db9a21fcd4c18d902036cf6ff01b015981565b3480156108d157600080fd5b506103457f000000000000000000000000000000000000000000000000000000000000000081565b34801561090557600080fd5b50600354610345565b6103a861091c36600461299f565b611717565b34801561092d57600080fd5b506103457f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a81565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f5a05180f0000000000000000000000000000000000000000000000000000000014806109ab57506109ab82611c49565b92915050565b73ffffffffffffffffffffffffffffffffffffffff8116600090815260046020526040902054610a4e5760405162461bcd60e51b815260206004820152602660248201527f5061796d656e7453706c69747465723a206163636f756e7420686173206e6f2060448201527f736861726573000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6000610a5960035490565b610a639047612a4d565b90506000610a9d8383610a988673ffffffffffffffffffffffffffffffffffffffff1660009081526005602052604090205490565b611ce0565b905080600003610b155760405162461bcd60e51b815260206004820152602b60248201527f5061796d656e7453706c69747465723a206163636f756e74206973206e6f742060448201527f647565207061796d656e740000000000000000000000000000000000000000006064820152608401610a45565b73ffffffffffffffffffffffffffffffffffffffff831660009081526005602052604081208054839290610b4a908490612a4d565b925050819055508060036000828254610b639190612a4d565b90915550610b7390508382611d33565b6040805173ffffffffffffffffffffffffffffffffffffffff85168152602081018390527fdf20fd1e76bc69d672e4814fafb2c449bba3a5369d8359adf9e05e6fde87b056910160405180910390a1505050565b3360009081527fba1fa010d565b7ef34584ccdd7a9fa725e24d7d9c1edf28c400a6be56cd8f3e1602052604090205460ff16610c2f576040517f3d693ada00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600d55565b600082815260208190526040902060010154610c4f81611e59565b610c598383611e63565b505050565b3360009081527fba1fa010d565b7ef34584ccdd7a9fa725e24d7d9c1edf28c400a6be56cd8f3e1602052604090205460ff16610cc6576040517f3d693ada00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600003610d00576040517faac9fd8700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600c55565b73ffffffffffffffffffffffffffffffffffffffff81163314610d905760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610a45565b610d9a8282611e85565b5050565b3360009081527f7d7ffb7a348e1c6a02869081a26547b49160dd3df72d1d75a570eb9b698292ec602052604090205460ff16610e06576040517f3d693ada00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600e80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b3360009081527ff7c9542c591017a21c74b6f3fab6263c7952fc0aaf9db4c22a2a04ddc7f8674f602052604090205460ff16610e9b576040517f3d693ada00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ea3611ea7565b565b73ffffffffffffffffffffffffffffffffffffffff8116600090815260046020526040902054610f3d5760405162461bcd60e51b815260206004820152602660248201527f5061796d656e7453706c69747465723a206163636f756e7420686173206e6f2060448201527f73686172657300000000000000000000000000000000000000000000000000006064820152608401610a45565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600760205260408120546040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff8516906370a0823190602401602060405180830381865afa158015610fcd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ff19190612a65565b610ffb9190612a4d565b905060006110418383610a98878773ffffffffffffffffffffffffffffffffffffffff918216600090815260086020908152604080832093909416825291909152205490565b9050806000036110b95760405162461bcd60e51b815260206004820152602b60248201527f5061796d656e7453706c69747465723a206163636f756e74206973206e6f742060448201527f647565207061796d656e740000000000000000000000000000000000000000006064820152608401610a45565b73ffffffffffffffffffffffffffffffffffffffff8085166000908152600860209081526040808320938716835292905290812080548392906110fd908490612a4d565b909155505073ffffffffffffffffffffffffffffffffffffffff841660009081526007602052604081208054839290611137908490612a4d565b909155506111489050848483611f6e565b6040805173ffffffffffffffffffffffffffffffffffffffff8581168252602082018490528616917f3be5b7a71e84ed12875d241991c70855ac5817d847039e17a9d895c1ceb0f18a910160405180910390a250505050565b3360009081527fba1fa010d565b7ef34584ccdd7a9fa725e24d7d9c1edf28c400a6be56cd8f3e1602052604090205460ff16611209576040517f3d693ada00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600f54811015611245576040517f256d7c0e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600a55565b3360009081527ff7c9542c591017a21c74b6f3fab6263c7952fc0aaf9db4c22a2a04ddc7f8674f602052604090205460ff166112b2576040517f3d693ada00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ea3611ffb565b6000600682815481106112cf576112cf612a7e565b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff1692915050565b600082815260016020526040812061130f90836120a1565b9392505050565b3360009081527fba1fa010d565b7ef34584ccdd7a9fa725e24d7d9c1edf28c400a6be56cd8f3e1602052604090205460ff1661137e576040517f3d693ada00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806000036113b8576040517faac9fd8700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600b55565b60095460ff16156114105760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610a45565b600e5460ff161561144d576040517f0bd8a3eb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000004210156114a7576040517f2d0a346e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600a8111156114e2576040517f8b01e07b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600a5481600f546114f39190612a4d565b111561152b576040517fd05cb60900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600003611565576040517fcbca5aa200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600b546115739190612aad565b3410156115ac576040517f356680b700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600f60008282546115be9190612a4d565b90915550506040517f449a52f8000000000000000000000000000000000000000000000000000000008152336004820152602481018290527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063449a52f890604401600060405180830381600087803b15801561165157600080fd5b505af1158015611665573d6000803e3d6000fd5b5050505080600b546116779190612aad565b3411156116d8573373ffffffffffffffffffffffffffffffffffffffff166108fc82600b546116a69190612aad565b6116b09034612aea565b6040518115909202916000818181858888f19350505050158015610d9a573d6000803e3d6000fd5b50565b60008181526001602052604081206109ab906120ad565b60008281526020819052604090206001015461170d81611e59565b610c598383611e85565b60095460ff161561176a5760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610a45565b600e5460ff16156117a7576040517f1eb1561f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f0000000000000000000000000000000000000000000000000000000000000000421015611801576040517f4e16195c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600a5483600f546118129190612a4d565b111561184a576040517fd05cb60900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6118d282828080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050600d546040517fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003360601b1660208201529092506034019050604051602081830303815290604052805190602001206120b7565b611908576040517f584a793800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b33600090815260106020526040902054600390611926908590612a4d565b111561195e576040517f74f76a6100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b82600003611998576040517fcbca5aa200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b82600c546119a69190612aad565b3410156119df576040517f356680b700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b33600090815260106020526040812080548592906119fe908490612a4d565b9250508190555082600f6000828254611a179190612a4d565b90915550506040517f449a52f8000000000000000000000000000000000000000000000000000000008152336004820152602481018490527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063449a52f890604401600060405180830381600087803b158015611aaa57600080fd5b505af1158015611abe573d6000803e3d6000fd5b5050505082600c54611ad09190612aad565b341115610c59573373ffffffffffffffffffffffffffffffffffffffff166108fc84600c54611aff9190612aad565b611b099034612aea565b6040518115909202916000818181858888f19350505050158015611b31573d6000803e3d6000fd5b50505050565b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff16610d9a5760008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff85168452909152902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055611bc93390565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600061130f8373ffffffffffffffffffffffffffffffffffffffff84166120cd565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b0000000000000000000000000000000000000000000000000000000014806109ab57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316146109ab565b60025473ffffffffffffffffffffffffffffffffffffffff841660009081526004602052604081205490918391611d179086612aad565b611d219190612b01565b611d2b9190612aea565b949350505050565b80471015611d835760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610a45565b60008273ffffffffffffffffffffffffffffffffffffffff168260405160006040518083038185875af1925050503d8060008114611ddd576040519150601f19603f3d011682016040523d82523d6000602084013e611de2565b606091505b5050905080610c595760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610a45565b6116d8813361211c565b611e6d8282611b37565b6000828152600160205260409020610c599082611c27565b611e8f82826121d2565b6000828152600160205260409020610c599082612289565b60095460ff16611ef95760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610a45565b600980547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390a1565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052610c599084906122ab565b60095460ff161561204e5760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610a45565b600980547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611f443390565b600061130f838361239d565b60006109ab825490565b6000826120c485846123c7565b14949350505050565b6000818152600183016020526040812054612114575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556109ab565b5060006109ab565b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff16610d9a576121728173ffffffffffffffffffffffffffffffffffffffff16601461243b565b61217d83602061243b565b60405160200161218e929190612b68565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529082905262461bcd60e51b8252610a4591600401612be9565b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff1615610d9a5760008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516808552925280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600061130f8373ffffffffffffffffffffffffffffffffffffffff8416612664565b600061230d826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166127579092919063ffffffff16565b805190915015610c59578080602001905181019061232b9190612c3a565b610c595760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610a45565b60008260000182815481106123b4576123b4612a7e565b9060005260206000200154905092915050565b600081815b84518110156124335760008582815181106123e9576123e9612a7e565b6020026020010151905080831161240f5760008381526020829052604090209250612420565b600081815260208490526040902092505b508061242b81612c5c565b9150506123cc565b509392505050565b6060600061244a836002612aad565b612455906002612a4d565b67ffffffffffffffff81111561246d5761246d612c94565b6040519080825280601f01601f191660200182016040528015612497576020820181803683370190505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106124ce576124ce612a7e565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f78000000000000000000000000000000000000000000000000000000000000008160018151811061253157612531612a7e565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600061256d846002612aad565b612578906001612a4d565b90505b6001811115612615577f303132333435363738396162636465660000000000000000000000000000000085600f16601081106125b9576125b9612a7e565b1a60f81b8282815181106125cf576125cf612a7e565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c9361260e81612cc3565b905061257b565b50831561130f5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610a45565b6000818152600183016020526040812054801561274d576000612688600183612aea565b855490915060009061269c90600190612aea565b90508181146127015760008660000182815481106126bc576126bc612a7e565b90600052602060002001549050808760000184815481106126df576126df612a7e565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061271257612712612cf8565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506109ab565b60009150506109ab565b6060611d2b84846000858573ffffffffffffffffffffffffffffffffffffffff85163b6127c65760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610a45565b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516127ef9190612d27565b60006040518083038185875af1925050503d806000811461282c576040519150601f19603f3d011682016040523d82523d6000602084013e612831565b606091505b509150915061284182828661284c565b979650505050505050565b6060831561285b57508161130f565b82511561286b5782518084602001fd5b8160405162461bcd60e51b8152600401610a459190612be9565b60006020828403121561289757600080fd5b81357fffffffff000000000000000000000000000000000000000000000000000000008116811461130f57600080fd5b73ffffffffffffffffffffffffffffffffffffffff811681146116d857600080fd5b6000602082840312156128fb57600080fd5b813561130f816128c7565b60006020828403121561291857600080fd5b5035919050565b6000806040838503121561293257600080fd5b823591506020830135612944816128c7565b809150509250929050565b6000806040838503121561296257600080fd5b823561296d816128c7565b91506020830135612944816128c7565b6000806040838503121561299057600080fd5b50508035926020909101359150565b6000806000604084860312156129b457600080fd5b83359250602084013567ffffffffffffffff808211156129d357600080fd5b818601915086601f8301126129e757600080fd5b8135818111156129f657600080fd5b8760208260051b8501011115612a0b57600080fd5b6020830194508093505050509250925092565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008219821115612a6057612a60612a1e565b500190565b600060208284031215612a7757600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615612ae557612ae5612a1e565b500290565b600082821015612afc57612afc612a1e565b500390565b600082612b37577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b60005b83811015612b57578181015183820152602001612b3f565b83811115611b315750506000910152565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351612ba0816017850160208801612b3c565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351612bdd816028840160208801612b3c565b01602801949350505050565b6020815260008251806020840152612c08816040850160208701612b3c565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b600060208284031215612c4c57600080fd5b8151801515811461130f57600080fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612c8d57612c8d612a1e565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600081612cd257612cd2612a1e565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b60008251612d39818460208701612b3c565b919091019291505056fea26469706673582212205dc0b1dc12881b1b74d3cf0d361e84d8ee7a3a355d3cc16a347f37d89e11d90264736f6c634300080d0033a49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775000000000000000000000000ff96b725a33e841788f34071efcd9bb070a968dd00000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000001600000000000000000000000000000000000000000000000000000000062b358640000000000000000000000000000000000000000000000000000000062b358640000000000000000000000000000000000000000000000001158e460913d0000000000000000000000000000000000000000000000000000136dcc951d8c0000000000000000000000000000000000000000000000000000000000000000000300000000000000000000000099c46411d307d2b5a1fd1c42487d963b7973584e000000000000000000000000575deab578113c07ac70fdbd3818c7bcf40a82b600000000000000000000000083778222b725d898b29661b49ff0bfcc74a4cbc20000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000001
Deployed Bytecode
0x6080604052600436106102d45760003560e01c80638456cb5911610179578063b3ab66b0116100d6578063d79779b21161008a578063e33b7de311610064578063e33b7de3146108f9578063e3e1e8ef1461090e578063e63ab1e91461092157600080fd5b8063d79779b21461084e578063dd5b5a2e14610891578063de8801e5146108c557600080fd5b8063ce7c2ac2116100bb578063ce7c2ac2146107d5578063d547741f14610818578063d5abeb011461083857600080fd5b8063b3ab66b0146107a2578063ca15c873146107b557600080fd5b80639852595c1161012d578063a035b1fe11610112578063a035b1fe14610743578063a217fddf14610759578063ab0bcc411461076e57600080fd5b80639852595c146106e65780639b8906ae1461072957600080fd5b80639010d07c1161015e5780639010d07c1461065557806391b7f5ed1461067557806391d148541461069557600080fd5b80638456cb59146105fb5780638b83209b1461061057600080fd5b80633a98ef39116102325780634f02c420116101e657806365b973b2116101c057806365b973b2146105925780636f8b44b0146105a757806375b238fc146105c757600080fd5b80634f02c42014610537578063546104811461054d5780635c975abb1461057a57600080fd5b80633f4ba83a116102175780633f4ba83a146104af578063406072a9146104c457806348b750441461051757600080fd5b80633a98ef39146104855780633c6dddd71461049a57600080fd5b806328d7b276116102895780633549345e1161026e5780633549345e1461043057806336568abe14610450578063380d831b1461047057600080fd5b806328d7b276146103f05780632f2ff15d1461041057600080fd5b806319165587116102ba578063191655871461038857806322212e2b146103aa578063248a9ca3146103c057600080fd5b80620e7fa81461032f57806301ffc9a71461035857600080fd5b3661032a577f6ef95f06320e7a25a04a175ca677b7052bdd97131872c2192525a629f51be770336040805173ffffffffffffffffffffffffffffffffffffffff90921682523460208301520160405180910390a1005b600080fd5b34801561033b57600080fd5b50610345600c5481565b6040519081526020015b60405180910390f35b34801561036457600080fd5b50610378610373366004612885565b610955565b604051901515815260200161034f565b34801561039457600080fd5b506103a86103a33660046128e9565b6109b1565b005b3480156103b657600080fd5b50610345600d5481565b3480156103cc57600080fd5b506103456103db366004612906565b60009081526020819052604090206001015490565b3480156103fc57600080fd5b506103a861040b366004612906565b610bc7565b34801561041c57600080fd5b506103a861042b36600461291f565b610c34565b34801561043c57600080fd5b506103a861044b366004612906565b610c5e565b34801561045c57600080fd5b506103a861046b36600461291f565b610d05565b34801561047c57600080fd5b506103a8610d9e565b34801561049157600080fd5b50600254610345565b3480156104a657600080fd5b50610345600a81565b3480156104bb57600080fd5b506103a8610e33565b3480156104d057600080fd5b506103456104df36600461294f565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260086020908152604080832093909416825291909152205490565b34801561052357600080fd5b506103a861053236600461294f565b610ea5565b34801561054357600080fd5b50610345600f5481565b34801561055957600080fd5b506103456105683660046128e9565b60106020526000908152604090205481565b34801561058657600080fd5b5060095460ff16610378565b34801561059e57600080fd5b50610345600381565b3480156105b357600080fd5b506103a86105c2366004612906565b6111a1565b3480156105d357600080fd5b506103457fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b34801561060757600080fd5b506103a861124a565b34801561061c57600080fd5b5061063061062b366004612906565b6112ba565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161034f565b34801561066157600080fd5b5061063061067036600461297d565b6112f7565b34801561068157600080fd5b506103a8610690366004612906565b611316565b3480156106a157600080fd5b506103786106b036600461291f565b60009182526020828152604080842073ffffffffffffffffffffffffffffffffffffffff93909316845291905290205460ff1690565b3480156106f257600080fd5b506103456107013660046128e9565b73ffffffffffffffffffffffffffffffffffffffff1660009081526005602052604090205490565b34801561073557600080fd5b50600e546103789060ff1681565b34801561074f57600080fd5b50610345600b5481565b34801561076557600080fd5b50610345600081565b34801561077a57600080fd5b506103457f0000000000000000000000000000000000000000000000000000000062b3586481565b6103a86107b0366004612906565b6113bd565b3480156107c157600080fd5b506103456107d0366004612906565b6116db565b3480156107e157600080fd5b506103456107f03660046128e9565b73ffffffffffffffffffffffffffffffffffffffff1660009081526004602052604090205490565b34801561082457600080fd5b506103a861083336600461291f565b6116f2565b34801561084457600080fd5b50610345600a5481565b34801561085a57600080fd5b506103456108693660046128e9565b73ffffffffffffffffffffffffffffffffffffffff1660009081526007602052604090205490565b34801561089d57600080fd5b506103457f27a0624e64a794e52337524177801654db9a21fcd4c18d902036cf6ff01b015981565b3480156108d157600080fd5b506103457f0000000000000000000000000000000000000000000000000000000062b3586481565b34801561090557600080fd5b50600354610345565b6103a861091c36600461299f565b611717565b34801561092d57600080fd5b506103457f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a81565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f5a05180f0000000000000000000000000000000000000000000000000000000014806109ab57506109ab82611c49565b92915050565b73ffffffffffffffffffffffffffffffffffffffff8116600090815260046020526040902054610a4e5760405162461bcd60e51b815260206004820152602660248201527f5061796d656e7453706c69747465723a206163636f756e7420686173206e6f2060448201527f736861726573000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6000610a5960035490565b610a639047612a4d565b90506000610a9d8383610a988673ffffffffffffffffffffffffffffffffffffffff1660009081526005602052604090205490565b611ce0565b905080600003610b155760405162461bcd60e51b815260206004820152602b60248201527f5061796d656e7453706c69747465723a206163636f756e74206973206e6f742060448201527f647565207061796d656e740000000000000000000000000000000000000000006064820152608401610a45565b73ffffffffffffffffffffffffffffffffffffffff831660009081526005602052604081208054839290610b4a908490612a4d565b925050819055508060036000828254610b639190612a4d565b90915550610b7390508382611d33565b6040805173ffffffffffffffffffffffffffffffffffffffff85168152602081018390527fdf20fd1e76bc69d672e4814fafb2c449bba3a5369d8359adf9e05e6fde87b056910160405180910390a1505050565b3360009081527fba1fa010d565b7ef34584ccdd7a9fa725e24d7d9c1edf28c400a6be56cd8f3e1602052604090205460ff16610c2f576040517f3d693ada00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600d55565b600082815260208190526040902060010154610c4f81611e59565b610c598383611e63565b505050565b3360009081527fba1fa010d565b7ef34584ccdd7a9fa725e24d7d9c1edf28c400a6be56cd8f3e1602052604090205460ff16610cc6576040517f3d693ada00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600003610d00576040517faac9fd8700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600c55565b73ffffffffffffffffffffffffffffffffffffffff81163314610d905760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610a45565b610d9a8282611e85565b5050565b3360009081527f7d7ffb7a348e1c6a02869081a26547b49160dd3df72d1d75a570eb9b698292ec602052604090205460ff16610e06576040517f3d693ada00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600e80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b3360009081527ff7c9542c591017a21c74b6f3fab6263c7952fc0aaf9db4c22a2a04ddc7f8674f602052604090205460ff16610e9b576040517f3d693ada00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ea3611ea7565b565b73ffffffffffffffffffffffffffffffffffffffff8116600090815260046020526040902054610f3d5760405162461bcd60e51b815260206004820152602660248201527f5061796d656e7453706c69747465723a206163636f756e7420686173206e6f2060448201527f73686172657300000000000000000000000000000000000000000000000000006064820152608401610a45565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600760205260408120546040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff8516906370a0823190602401602060405180830381865afa158015610fcd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ff19190612a65565b610ffb9190612a4d565b905060006110418383610a98878773ffffffffffffffffffffffffffffffffffffffff918216600090815260086020908152604080832093909416825291909152205490565b9050806000036110b95760405162461bcd60e51b815260206004820152602b60248201527f5061796d656e7453706c69747465723a206163636f756e74206973206e6f742060448201527f647565207061796d656e740000000000000000000000000000000000000000006064820152608401610a45565b73ffffffffffffffffffffffffffffffffffffffff8085166000908152600860209081526040808320938716835292905290812080548392906110fd908490612a4d565b909155505073ffffffffffffffffffffffffffffffffffffffff841660009081526007602052604081208054839290611137908490612a4d565b909155506111489050848483611f6e565b6040805173ffffffffffffffffffffffffffffffffffffffff8581168252602082018490528616917f3be5b7a71e84ed12875d241991c70855ac5817d847039e17a9d895c1ceb0f18a910160405180910390a250505050565b3360009081527fba1fa010d565b7ef34584ccdd7a9fa725e24d7d9c1edf28c400a6be56cd8f3e1602052604090205460ff16611209576040517f3d693ada00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600f54811015611245576040517f256d7c0e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600a55565b3360009081527ff7c9542c591017a21c74b6f3fab6263c7952fc0aaf9db4c22a2a04ddc7f8674f602052604090205460ff166112b2576040517f3d693ada00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ea3611ffb565b6000600682815481106112cf576112cf612a7e565b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff1692915050565b600082815260016020526040812061130f90836120a1565b9392505050565b3360009081527fba1fa010d565b7ef34584ccdd7a9fa725e24d7d9c1edf28c400a6be56cd8f3e1602052604090205460ff1661137e576040517f3d693ada00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806000036113b8576040517faac9fd8700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600b55565b60095460ff16156114105760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610a45565b600e5460ff161561144d576040517f0bd8a3eb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f0000000000000000000000000000000000000000000000000000000062b358644210156114a7576040517f2d0a346e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600a8111156114e2576040517f8b01e07b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600a5481600f546114f39190612a4d565b111561152b576040517fd05cb60900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600003611565576040517fcbca5aa200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600b546115739190612aad565b3410156115ac576040517f356680b700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600f60008282546115be9190612a4d565b90915550506040517f449a52f8000000000000000000000000000000000000000000000000000000008152336004820152602481018290527f000000000000000000000000ff96b725a33e841788f34071efcd9bb070a968dd73ffffffffffffffffffffffffffffffffffffffff169063449a52f890604401600060405180830381600087803b15801561165157600080fd5b505af1158015611665573d6000803e3d6000fd5b5050505080600b546116779190612aad565b3411156116d8573373ffffffffffffffffffffffffffffffffffffffff166108fc82600b546116a69190612aad565b6116b09034612aea565b6040518115909202916000818181858888f19350505050158015610d9a573d6000803e3d6000fd5b50565b60008181526001602052604081206109ab906120ad565b60008281526020819052604090206001015461170d81611e59565b610c598383611e85565b60095460ff161561176a5760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610a45565b600e5460ff16156117a7576040517f1eb1561f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f0000000000000000000000000000000000000000000000000000000062b35864421015611801576040517f4e16195c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600a5483600f546118129190612a4d565b111561184a576040517fd05cb60900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6118d282828080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050600d546040517fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003360601b1660208201529092506034019050604051602081830303815290604052805190602001206120b7565b611908576040517f584a793800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b33600090815260106020526040902054600390611926908590612a4d565b111561195e576040517f74f76a6100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b82600003611998576040517fcbca5aa200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b82600c546119a69190612aad565b3410156119df576040517f356680b700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b33600090815260106020526040812080548592906119fe908490612a4d565b9250508190555082600f6000828254611a179190612a4d565b90915550506040517f449a52f8000000000000000000000000000000000000000000000000000000008152336004820152602481018490527f000000000000000000000000ff96b725a33e841788f34071efcd9bb070a968dd73ffffffffffffffffffffffffffffffffffffffff169063449a52f890604401600060405180830381600087803b158015611aaa57600080fd5b505af1158015611abe573d6000803e3d6000fd5b5050505082600c54611ad09190612aad565b341115610c59573373ffffffffffffffffffffffffffffffffffffffff166108fc84600c54611aff9190612aad565b611b099034612aea565b6040518115909202916000818181858888f19350505050158015611b31573d6000803e3d6000fd5b50505050565b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff16610d9a5760008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff85168452909152902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055611bc93390565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600061130f8373ffffffffffffffffffffffffffffffffffffffff84166120cd565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b0000000000000000000000000000000000000000000000000000000014806109ab57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316146109ab565b60025473ffffffffffffffffffffffffffffffffffffffff841660009081526004602052604081205490918391611d179086612aad565b611d219190612b01565b611d2b9190612aea565b949350505050565b80471015611d835760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610a45565b60008273ffffffffffffffffffffffffffffffffffffffff168260405160006040518083038185875af1925050503d8060008114611ddd576040519150601f19603f3d011682016040523d82523d6000602084013e611de2565b606091505b5050905080610c595760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610a45565b6116d8813361211c565b611e6d8282611b37565b6000828152600160205260409020610c599082611c27565b611e8f82826121d2565b6000828152600160205260409020610c599082612289565b60095460ff16611ef95760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610a45565b600980547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390a1565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052610c599084906122ab565b60095460ff161561204e5760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610a45565b600980547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611f443390565b600061130f838361239d565b60006109ab825490565b6000826120c485846123c7565b14949350505050565b6000818152600183016020526040812054612114575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556109ab565b5060006109ab565b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff16610d9a576121728173ffffffffffffffffffffffffffffffffffffffff16601461243b565b61217d83602061243b565b60405160200161218e929190612b68565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529082905262461bcd60e51b8252610a4591600401612be9565b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff1615610d9a5760008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516808552925280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600061130f8373ffffffffffffffffffffffffffffffffffffffff8416612664565b600061230d826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166127579092919063ffffffff16565b805190915015610c59578080602001905181019061232b9190612c3a565b610c595760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610a45565b60008260000182815481106123b4576123b4612a7e565b9060005260206000200154905092915050565b600081815b84518110156124335760008582815181106123e9576123e9612a7e565b6020026020010151905080831161240f5760008381526020829052604090209250612420565b600081815260208490526040902092505b508061242b81612c5c565b9150506123cc565b509392505050565b6060600061244a836002612aad565b612455906002612a4d565b67ffffffffffffffff81111561246d5761246d612c94565b6040519080825280601f01601f191660200182016040528015612497576020820181803683370190505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106124ce576124ce612a7e565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f78000000000000000000000000000000000000000000000000000000000000008160018151811061253157612531612a7e565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600061256d846002612aad565b612578906001612a4d565b90505b6001811115612615577f303132333435363738396162636465660000000000000000000000000000000085600f16601081106125b9576125b9612a7e565b1a60f81b8282815181106125cf576125cf612a7e565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c9361260e81612cc3565b905061257b565b50831561130f5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610a45565b6000818152600183016020526040812054801561274d576000612688600183612aea565b855490915060009061269c90600190612aea565b90508181146127015760008660000182815481106126bc576126bc612a7e565b90600052602060002001549050808760000184815481106126df576126df612a7e565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061271257612712612cf8565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506109ab565b60009150506109ab565b6060611d2b84846000858573ffffffffffffffffffffffffffffffffffffffff85163b6127c65760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610a45565b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516127ef9190612d27565b60006040518083038185875af1925050503d806000811461282c576040519150601f19603f3d011682016040523d82523d6000602084013e612831565b606091505b509150915061284182828661284c565b979650505050505050565b6060831561285b57508161130f565b82511561286b5782518084602001fd5b8160405162461bcd60e51b8152600401610a459190612be9565b60006020828403121561289757600080fd5b81357fffffffff000000000000000000000000000000000000000000000000000000008116811461130f57600080fd5b73ffffffffffffffffffffffffffffffffffffffff811681146116d857600080fd5b6000602082840312156128fb57600080fd5b813561130f816128c7565b60006020828403121561291857600080fd5b5035919050565b6000806040838503121561293257600080fd5b823591506020830135612944816128c7565b809150509250929050565b6000806040838503121561296257600080fd5b823561296d816128c7565b91506020830135612944816128c7565b6000806040838503121561299057600080fd5b50508035926020909101359150565b6000806000604084860312156129b457600080fd5b83359250602084013567ffffffffffffffff808211156129d357600080fd5b818601915086601f8301126129e757600080fd5b8135818111156129f657600080fd5b8760208260051b8501011115612a0b57600080fd5b6020830194508093505050509250925092565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008219821115612a6057612a60612a1e565b500190565b600060208284031215612a7757600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615612ae557612ae5612a1e565b500290565b600082821015612afc57612afc612a1e565b500390565b600082612b37577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b60005b83811015612b57578181015183820152602001612b3f565b83811115611b315750506000910152565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351612ba0816017850160208801612b3c565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351612bdd816028840160208801612b3c565b01602801949350505050565b6020815260008251806020840152612c08816040850160208701612b3c565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b600060208284031215612c4c57600080fd5b8151801515811461130f57600080fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612c8d57612c8d612a1e565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600081612cd257612cd2612a1e565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b60008251612d39818460208701612b3c565b919091019291505056fea26469706673582212205dc0b1dc12881b1b74d3cf0d361e84d8ee7a3a355d3cc16a347f37d89e11d90264736f6c634300080d0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000ff96b725a33e841788f34071efcd9bb070a968dd00000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000001600000000000000000000000000000000000000000000000000000000062b358640000000000000000000000000000000000000000000000000000000062b358640000000000000000000000000000000000000000000000001158e460913d0000000000000000000000000000000000000000000000000000136dcc951d8c0000000000000000000000000000000000000000000000000000000000000000000300000000000000000000000099c46411d307d2b5a1fd1c42487d963b7973584e000000000000000000000000575deab578113c07ac70fdbd3818c7bcf40a82b600000000000000000000000083778222b725d898b29661b49ff0bfcc74a4cbc20000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000001
-----Decoded View---------------
Arg [0] : _plush (address): 0xff96b725A33E841788f34071EFCd9bb070A968DD
Arg [1] : _team (address[]): 0x99c46411D307D2B5A1Fd1c42487d963b7973584e,0x575dEAb578113C07AC70fdBD3818c7Bcf40a82b6,0x83778222b725d898b29661B49ff0bFcC74a4cbC2
Arg [2] : _teamShares (uint256[]): 96,3,1
Arg [3] : _saleStart (uint256): 1655920740
Arg [4] : _presaleStart (uint256): 1655920740
Arg [5] : _initialPresalePrice (uint256): 1250000000000000000
Arg [6] : _initialSalePrice (uint256): 1400000000000000000
-----Encoded View---------------
15 Constructor Arguments found :
Arg [0] : 000000000000000000000000ff96b725a33e841788f34071efcd9bb070a968dd
Arg [1] : 00000000000000000000000000000000000000000000000000000000000000e0
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000160
Arg [3] : 0000000000000000000000000000000000000000000000000000000062b35864
Arg [4] : 0000000000000000000000000000000000000000000000000000000062b35864
Arg [5] : 0000000000000000000000000000000000000000000000001158e460913d0000
Arg [6] : 000000000000000000000000000000000000000000000000136dcc951d8c0000
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [8] : 00000000000000000000000099c46411d307d2b5a1fd1c42487d963b7973584e
Arg [9] : 000000000000000000000000575deab578113c07ac70fdbd3818c7bcf40a82b6
Arg [10] : 00000000000000000000000083778222b725d898b29661b49ff0bfcc74a4cbc2
Arg [11] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [12] : 0000000000000000000000000000000000000000000000000000000000000060
Arg [13] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [14] : 0000000000000000000000000000000000000000000000000000000000000001
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 33 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.