Feature Tip: Add private address tag to any address under My Name Tag !
Overview
TokenID
3381
Total Transfers
-
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract
Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
TicketNFT
Compiler Version
v0.8.9+commit.e5eed63a
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity >=0.8.4; import '../interfaces/IMintableBurnableERC721.sol'; import '../core/SafeOwnable.sol'; import '../core/Mintable.sol'; import '../core/Burnable.sol'; import '../core/NFTCore.sol'; contract TicketNFT is SafeOwnable, NFTCore, Mintable, Burnable, IMintableBurnableERC721 { constructor( string memory _name, string memory _symbol, string memory _uri ) NFTCore(_name, _symbol, _uri, 15000) Mintable(new address[](0), false) Burnable(new address[](0), false) { } function mint(address _to, uint _num) external override onlyMinter { mintInternal(_to, _num); } function burn(address _user, uint256 _tokenId) external override onlyBurner { burnInternal(_user, _tokenId); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.8.4; import '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol'; import '@openzeppelin/contracts/token/ERC20/IERC20.sol'; import '../core/SafeOwnable.sol'; contract Airdrop is SafeOwnable { using SafeERC20 for IERC20; uint public nonce; function ERC20Transfer(uint _startNonce, IERC20 _token, address _vault, address[] memory _users, uint[] memory _amounts) external onlyOwner { if (_vault == address(0)) { _vault = address(this); } require(_startNonce > nonce, "already done"); require(_users.length > 0 && _users.length == _amounts.length, "illegal length"); for (uint i = 0; i < _users.length; i ++) { _token.safeTransferFrom(_vault, _users[i], _amounts[i]); } nonce = _startNonce + _users.length - 1; } }
// 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.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 pragma solidity >=0.8.4; import './SafeOwnableInterface.sol'; /** * This is a contract copied from 'OwnableUpgradeable.sol' * It has the same fundation of Ownable, besides it accept pendingOwner for mor Safe Use */ abstract contract SafeOwnable is SafeOwnableInterface { address private _owner; address private _pendingOwner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() { _transferOwnership(msg.sender); } function owner() public override view returns (address) { return _owner; } function pendingOwner() public view returns (address) { return _pendingOwner; } function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } function setPendingOwner(address _addr) public onlyOwner { _pendingOwner = _addr; } function acceptOwner() public { require(msg.sender == _pendingOwner, "Ownable: caller is not the pendingOwner"); _transferOwnership(_pendingOwner); _pendingOwner = address(0); } function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// 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 pragma solidity >=0.8.4; /** * This is a contract copied from 'OwnableUpgradeable.sol' * It has the same fundation of Ownable, besides it accept pendingOwner for mor Safe Use */ abstract contract SafeOwnableInterface { function owner() public virtual view returns (address); modifier onlyOwner() { require(owner() == msg.sender, "Ownable: caller is not the owner"); _; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.8.4; pragma abicoder v2; import '../core/SafeOwnable.sol'; contract ConfigView is SafeOwnable { mapping(string => string[]) public configs; function addConfig(string memory _key, string[] memory _values) external onlyOwner { configs[_key] = _values; } function setConfig(string memory _key, uint _index, string memory _value) external onlyOwner { for (uint i = configs[_key].length; i <= _index; i ++) { configs[_key].push(""); } configs[_key][_index] = _value; } function getConfig(string memory _key) external view returns (string[] memory) { return configs[_key]; } function existConfig(string memory _key) external view returns (bool) { return configs[_key].length > 0; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.8.4; import '@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol'; import '@openzeppelin/contracts/token/ERC20/extensions/ERC20Capped.sol'; import '@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol'; import '@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol'; //import '@openzeppelin/contracts/proxy/utils/Initializable.sol'; import '@openzeppelin/contracts/utils/Address.sol'; import '../core/SafeOwnable.sol'; contract Vault is SafeOwnable, Initializable, ERC721Holder, ERC1155Holder { using Address for address; event VerifierChanged(address oldVerifier, address newVerifier); event ReceiveERC721(address token, address from, address to, uint tokenId); event ReceiveERC1155(address token, address from, address to, uint tokenId, uint amount); event ReceiveNativeToken(address from, uint amount); event AssetUsed(bytes32 hash); address public verifier; mapping(bytes32 => bool) public nonces; function initialize(address _verifier, address _owner) external initializer { SafeOwnable._transferOwnership(_owner); verifier = _verifier; emit VerifierChanged(address(0), _verifier); } function setVerifier(address _verifier) external onlyOwner { require(_verifier != address(0), "illegal verifier"); emit VerifierChanged(verifier, _verifier); verifier = _verifier; } function onERC721Received( address from, address to, uint256 tokenId, bytes memory ) public virtual override returns (bytes4) { emit ReceiveERC721(msg.sender, from, to, tokenId); return this.onERC721Received.selector; } function onERC1155Received( address from, address to, uint256 tokenId, uint256 amount, bytes memory ) public virtual override returns (bytes4) { emit ReceiveERC1155(msg.sender, from, to, tokenId, amount); return this.onERC1155Received.selector; } function onERC1155BatchReceived( address from, address to, uint256[] memory tokenIds, uint256[] memory amounts, bytes memory ) public virtual override returns (bytes4) { for (uint i = 0; i < tokenIds.length; i ++) { emit ReceiveERC1155(msg.sender, from, to, tokenIds[i], amounts[i]); } return this.onERC1155BatchReceived.selector; } receive() external payable { emit ReceiveNativeToken(msg.sender, msg.value); } function use(address _contract, bytes memory _data, uint _amount, uint _nonce, uint8 _v, bytes32 _r, bytes32 _s) external { bytes32 hash = keccak256(abi.encodePacked(address(this), _contract, keccak256(_data), _amount, _nonce)); require(!nonces[hash], "already exist"); require(ecrecover(keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)), _v, _r, _s) == verifier, "verify failed"); _contract.functionCallWithValue(_data, _amount); emit AssetUsed(hash); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (proxy/utils/Initializable.sol) pragma solidity ^0.8.2; import "../../utils/AddressUpgradeable.sol"; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in * case an upgrade adds a module that needs to be initialized. * * For example: * * [.hljs-theme-light.nopadding] * ``` * contract MyToken is ERC20Upgradeable { * function initialize() initializer public { * __ERC20_init("MyToken", "MTK"); * } * } * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable { * function initializeV2() reinitializer(2) public { * __ERC20Permit_init("MyToken"); * } * } * ``` * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. * * [CAUTION] * ==== * Avoid leaving a contract uninitialized. * * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() { * _disableInitializers(); * } * ``` * ==== */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. * @custom:oz-retyped-from bool */ uint8 private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Triggered when the contract has been initialized or reinitialized. */ event Initialized(uint8 version); /** * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope, * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`. */ modifier initializer() { bool isTopLevelCall = _setInitializedVersion(1); if (isTopLevelCall) { _initializing = true; } _; if (isTopLevelCall) { _initializing = false; emit Initialized(1); } } /** * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be * used to initialize parent contracts. * * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original * initialization step. This is essential to configure modules that are added through upgrades and that require * initialization. * * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in * a contract, executing them in the right order is up to the developer or operator. */ modifier reinitializer(uint8 version) { bool isTopLevelCall = _setInitializedVersion(version); if (isTopLevelCall) { _initializing = true; } _; if (isTopLevelCall) { _initializing = false; emit Initialized(version); } } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} and {reinitializer} modifiers, directly or indirectly. */ modifier onlyInitializing() { require(_initializing, "Initializable: contract is not initializing"); _; } /** * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call. * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized * to any version. It is recommended to use this to lock implementation contracts that are designed to be called * through proxies. */ function _disableInitializers() internal virtual { _setInitializedVersion(type(uint8).max); } function _setInitializedVersion(uint8 version) private returns (bool) { // If the contract is initializing we ignore whether _initialized is set in order to support multiple // inheritance patterns, but we only do this in the context of a constructor, and for the lowest level // of initializers, because in other contexts the contract may have been reentered. if (_initializing) { require( version == 1 && !AddressUpgradeable.isContract(address(this)), "Initializable: contract is already initialized" ); return false; } else { require(_initialized < version, "Initializable: contract is already initialized"); _initialized = version; return true; } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/ERC20Capped.sol) pragma solidity ^0.8.0; import "../ERC20.sol"; /** * @dev Extension of {ERC20} that adds a cap to the supply of tokens. */ abstract contract ERC20Capped is ERC20 { uint256 private immutable _cap; /** * @dev Sets the value of the `cap`. This value is immutable, it can only be * set once during construction. */ constructor(uint256 cap_) { require(cap_ > 0, "ERC20Capped: cap is 0"); _cap = cap_; } /** * @dev Returns the cap on the token's total supply. */ function cap() public view virtual returns (uint256) { return _cap; } /** * @dev See {ERC20-_mint}. */ function _mint(address account, uint256 amount) internal virtual override { require(ERC20.totalSupply() + amount <= cap(), "ERC20Capped: cap exceeded"); super._mint(account, amount); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/utils/ERC1155Holder.sol) pragma solidity ^0.8.0; import "./ERC1155Receiver.sol"; /** * Simple implementation of `ERC1155Receiver` that will allow a contract to hold ERC1155 tokens. * * IMPORTANT: When inheriting this contract, you must include a way to use the received tokens, otherwise they will be * stuck. * * @dev _Available since v3.1._ */ contract ERC1155Holder is ERC1155Receiver { function onERC1155Received( address, address, uint256, uint256, bytes memory ) public virtual override returns (bytes4) { return this.onERC1155Received.selector; } function onERC1155BatchReceived( address, address, uint256[] memory, uint256[] memory, bytes memory ) public virtual override returns (bytes4) { return this.onERC1155BatchReceived.selector; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/utils/ERC721Holder.sol) pragma solidity ^0.8.0; import "../IERC721Receiver.sol"; /** * @dev Implementation of the {IERC721Receiver} interface. * * Accepts all token transfers. * Make sure the contract is able to use its token with {IERC721-safeTransferFrom}, {IERC721-approve} or {IERC721-setApprovalForAll}. */ contract ERC721Holder is IERC721Receiver { /** * @dev See {IERC721Receiver-onERC721Received}. * * Always returns `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address, address, uint256, bytes memory ) public virtual override returns (bytes4) { return this.onERC721Received.selector; } }
// 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 AddressUpgradeable { /** * @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 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 (last updated v4.6.0) (token/ERC20/ERC20.sol) pragma solidity ^0.8.0; import "./IERC20.sol"; import "./extensions/IERC20Metadata.sol"; import "../../utils/Context.sol"; /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our guide * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * We have followed general OpenZeppelin Contracts guidelines: functions revert * instead returning `false` on failure. This behavior is nonetheless * conventional and does not conflict with the expectations of ERC20 * applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {name} and {symbol}. * * The default value of {decimals} is 18. To select a different value for * {decimals} you should overload it. * * All two of these values are immutable: they can only be set once during * construction. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev Returns the name of the token. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5.05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless this function is * overridden; * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual override returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `to` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address to, uint256 amount) public virtual override returns (bool) { address owner = _msgSender(); _transfer(owner, to, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on * `transferFrom`. This is semantically equivalent to an infinite approval. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { address owner = _msgSender(); _approve(owner, spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * NOTE: Does not update the allowance if the current allowance * is the maximum `uint256`. * * Requirements: * * - `from` and `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. * - the caller must have allowance for ``from``'s tokens of at least * `amount`. */ function transferFrom( address from, address to, uint256 amount ) public virtual override returns (bool) { address spender = _msgSender(); _spendAllowance(from, spender, amount); _transfer(from, to, amount); return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { address owner = _msgSender(); _approve(owner, spender, allowance(owner, spender) + addedValue); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { address owner = _msgSender(); uint256 currentAllowance = allowance(owner, spender); require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); unchecked { _approve(owner, spender, currentAllowance - subtractedValue); } return true; } /** * @dev Moves `amount` of tokens from `sender` to `recipient`. * * This internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. */ function _transfer( address from, address to, uint256 amount ) internal virtual { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(from, to, amount); uint256 fromBalance = _balances[from]; require(fromBalance >= amount, "ERC20: transfer amount exceeds balance"); unchecked { _balances[from] = fromBalance - amount; } _balances[to] += amount; emit Transfer(from, to, amount); _afterTokenTransfer(from, to, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply += amount; _balances[account] += amount; emit Transfer(address(0), account, amount); _afterTokenTransfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); uint256 accountBalance = _balances[account]; require(accountBalance >= amount, "ERC20: burn amount exceeds balance"); unchecked { _balances[account] = accountBalance - amount; } _totalSupply -= amount; emit Transfer(account, address(0), amount); _afterTokenTransfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve( address owner, address spender, uint256 amount ) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Updates `owner` s allowance for `spender` based on spent `amount`. * * Does not update the allowance amount in case of infinite allowance. * Revert if not enough allowance is available. * * Might emit an {Approval} event. */ function _spendAllowance( address owner, address spender, uint256 amount ) internal virtual { uint256 currentAllowance = allowance(owner, spender); if (currentAllowance != type(uint256).max) { require(currentAllowance >= amount, "ERC20: insufficient allowance"); unchecked { _approve(owner, spender, currentAllowance - amount); } } } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * has been transferred to `to`. * - when `from` is zero, `amount` tokens have been minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens have been burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 amount ) internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; /** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */ interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts 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 v4.4.1 (token/ERC1155/utils/ERC1155Receiver.sol) pragma solidity ^0.8.0; import "../IERC1155Receiver.sol"; import "../../../utils/introspection/ERC165.sol"; /** * @dev _Available since v3.1._ */ abstract contract ERC1155Receiver is ERC165, IERC1155Receiver { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC1155Receiver).interfaceId || super.supportsInterface(interfaceId); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev _Available since v3.1._ */ interface IERC1155Receiver is IERC165 { /** * @dev Handles the receipt of a single ERC1155 token type. This function is * called at the end of a `safeTransferFrom` after the balance has been updated. * * NOTE: To accept the transfer, this must return * `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` * (i.e. 0xf23a6e61, or its own function selector). * * @param operator The address which initiated the transfer (i.e. msg.sender) * @param from The address which previously owned the token * @param id The ID of the token being transferred * @param value The amount of tokens being transferred * @param data Additional data with no specified format * @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed */ function onERC1155Received( address operator, address from, uint256 id, uint256 value, bytes calldata data ) external returns (bytes4); /** * @dev Handles the receipt of a multiple ERC1155 token types. This function * is called at the end of a `safeBatchTransferFrom` after the balances have * been updated. * * NOTE: To accept the transfer(s), this must return * `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` * (i.e. 0xbc197c81, or its own function selector). * * @param operator The address which initiated the batch transfer (i.e. msg.sender) * @param from The address which previously owned the token * @param ids An array containing ids of each token being transferred (order and length must match values array) * @param values An array containing amounts of each token being transferred (order and length must match ids array) * @param data Additional data with no specified format * @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed */ function onERC1155BatchReceived( address operator, address from, uint256[] calldata ids, uint256[] calldata values, bytes calldata data ) external returns (bytes4); }
// 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.6.0) (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT pragma solidity >=0.8.4; import '@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol'; import '@openzeppelin/contracts/utils/Address.sol'; import '../interfaces/IProxyFactory.sol'; import "hardhat/console.sol"; contract ProxyImplementation is Initializable { using Address for address; address public user; IProxyFactory public factory; bool public revoked; enum HowToCall { Call, DelegateCall } event Revoked(bool revoked); function initialize (address _user, IProxyFactory _factory) external initializer { require(user == address(0) && address(_factory) == address(0), "already verified"); user = _user; factory = _factory; } function setRevoke(bool revoke) external { require(msg.sender == user, "only user can do this"); revoked = revoke; emit Revoked(revoke); } function proxy(address dest, HowToCall howToCall, bytes memory data) public returns (bool result) { require(msg.sender == user || (!revoked && factory.contracts(msg.sender))); if (howToCall == HowToCall.Call) { dest.functionCall(data); } else if (howToCall == HowToCall.DelegateCall) { dest.functionDelegateCall(data); } else { return false; } return true; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.8.4; import './IProxyImplementation.sol'; interface IProxyFactory { function contracts(address _caller) external returns (bool); function registerProxy() external returns (address); function proxies(address user) external returns (IProxyImplementation); function proxyImplementation() external returns (IProxyImplementation); }
// SPDX-License-Identifier: MIT pragma solidity >= 0.4.22 <0.9.0; library console { address constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67); function _sendLogPayload(bytes memory payload) private view { uint256 payloadLength = payload.length; address consoleAddress = CONSOLE_ADDRESS; assembly { let payloadStart := add(payload, 32) let r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0) } } function log() internal view { _sendLogPayload(abi.encodeWithSignature("log()")); } function logInt(int p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(int)", p0)); } function logUint(uint p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint)", p0)); } function logString(string memory p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(string)", p0)); } function logBool(bool p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool)", p0)); } function logAddress(address p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(address)", p0)); } function logBytes(bytes memory p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes)", p0)); } function logBytes1(bytes1 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes1)", p0)); } function logBytes2(bytes2 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes2)", p0)); } function logBytes3(bytes3 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes3)", p0)); } function logBytes4(bytes4 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes4)", p0)); } function logBytes5(bytes5 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes5)", p0)); } function logBytes6(bytes6 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes6)", p0)); } function logBytes7(bytes7 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes7)", p0)); } function logBytes8(bytes8 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes8)", p0)); } function logBytes9(bytes9 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes9)", p0)); } function logBytes10(bytes10 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes10)", p0)); } function logBytes11(bytes11 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes11)", p0)); } function logBytes12(bytes12 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes12)", p0)); } function logBytes13(bytes13 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes13)", p0)); } function logBytes14(bytes14 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes14)", p0)); } function logBytes15(bytes15 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes15)", p0)); } function logBytes16(bytes16 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes16)", p0)); } function logBytes17(bytes17 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes17)", p0)); } function logBytes18(bytes18 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes18)", p0)); } function logBytes19(bytes19 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes19)", p0)); } function logBytes20(bytes20 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes20)", p0)); } function logBytes21(bytes21 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes21)", p0)); } function logBytes22(bytes22 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes22)", p0)); } function logBytes23(bytes23 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes23)", p0)); } function logBytes24(bytes24 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes24)", p0)); } function logBytes25(bytes25 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes25)", p0)); } function logBytes26(bytes26 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes26)", p0)); } function logBytes27(bytes27 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes27)", p0)); } function logBytes28(bytes28 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes28)", p0)); } function logBytes29(bytes29 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes29)", p0)); } function logBytes30(bytes30 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes30)", p0)); } function logBytes31(bytes31 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes31)", p0)); } function logBytes32(bytes32 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes32)", p0)); } function log(uint p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint)", p0)); } function log(string memory p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(string)", p0)); } function log(bool p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool)", p0)); } function log(address p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(address)", p0)); } function log(uint p0, uint p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint)", p0, p1)); } function log(uint p0, string memory p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string)", p0, p1)); } function log(uint p0, bool p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool)", p0, p1)); } function log(uint p0, address p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address)", p0, p1)); } function log(string memory p0, uint p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint)", p0, p1)); } function log(string memory p0, string memory p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string)", p0, p1)); } function log(string memory p0, bool p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool)", p0, p1)); } function log(string memory p0, address p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address)", p0, p1)); } function log(bool p0, uint p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint)", p0, p1)); } function log(bool p0, string memory p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string)", p0, p1)); } function log(bool p0, bool p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool)", p0, p1)); } function log(bool p0, address p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address)", p0, p1)); } function log(address p0, uint p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint)", p0, p1)); } function log(address p0, string memory p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string)", p0, p1)); } function log(address p0, bool p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool)", p0, p1)); } function log(address p0, address p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address)", p0, p1)); } function log(uint p0, uint p1, uint p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,uint)", p0, p1, p2)); } function log(uint p0, uint p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,string)", p0, p1, p2)); } function log(uint p0, uint p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,bool)", p0, p1, p2)); } function log(uint p0, uint p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,address)", p0, p1, p2)); } function log(uint p0, string memory p1, uint p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,uint)", p0, p1, p2)); } function log(uint p0, string memory p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,string)", p0, p1, p2)); } function log(uint p0, string memory p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,bool)", p0, p1, p2)); } function log(uint p0, string memory p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,address)", p0, p1, p2)); } function log(uint p0, bool p1, uint p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,uint)", p0, p1, p2)); } function log(uint p0, bool p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,string)", p0, p1, p2)); } function log(uint p0, bool p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,bool)", p0, p1, p2)); } function log(uint p0, bool p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,address)", p0, p1, p2)); } function log(uint p0, address p1, uint p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,uint)", p0, p1, p2)); } function log(uint p0, address p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,string)", p0, p1, p2)); } function log(uint p0, address p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,bool)", p0, p1, p2)); } function log(uint p0, address p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,address)", p0, p1, p2)); } function log(string memory p0, uint p1, uint p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,uint)", p0, p1, p2)); } function log(string memory p0, uint p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,string)", p0, p1, p2)); } function log(string memory p0, uint p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,bool)", p0, p1, p2)); } function log(string memory p0, uint p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,address)", p0, p1, p2)); } function log(string memory p0, string memory p1, uint p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,uint)", p0, p1, p2)); } function log(string memory p0, string memory p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,string)", p0, p1, p2)); } function log(string memory p0, string memory p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,bool)", p0, p1, p2)); } function log(string memory p0, string memory p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,address)", p0, p1, p2)); } function log(string memory p0, bool p1, uint p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint)", p0, p1, p2)); } function log(string memory p0, bool p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,string)", p0, p1, p2)); } function log(string memory p0, bool p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool)", p0, p1, p2)); } function log(string memory p0, bool p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,address)", p0, p1, p2)); } function log(string memory p0, address p1, uint p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,uint)", p0, p1, p2)); } function log(string memory p0, address p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,string)", p0, p1, p2)); } function log(string memory p0, address p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,bool)", p0, p1, p2)); } function log(string memory p0, address p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,address)", p0, p1, p2)); } function log(bool p0, uint p1, uint p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,uint)", p0, p1, p2)); } function log(bool p0, uint p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,string)", p0, p1, p2)); } function log(bool p0, uint p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,bool)", p0, p1, p2)); } function log(bool p0, uint p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,address)", p0, p1, p2)); } function log(bool p0, string memory p1, uint p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint)", p0, p1, p2)); } function log(bool p0, string memory p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,string)", p0, p1, p2)); } function log(bool p0, string memory p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool)", p0, p1, p2)); } function log(bool p0, string memory p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,address)", p0, p1, p2)); } function log(bool p0, bool p1, uint p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint)", p0, p1, p2)); } function log(bool p0, bool p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string)", p0, p1, p2)); } function log(bool p0, bool p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool)", p0, p1, p2)); } function log(bool p0, bool p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address)", p0, p1, p2)); } function log(bool p0, address p1, uint p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint)", p0, p1, p2)); } function log(bool p0, address p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,string)", p0, p1, p2)); } function log(bool p0, address p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool)", p0, p1, p2)); } function log(bool p0, address p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,address)", p0, p1, p2)); } function log(address p0, uint p1, uint p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,uint)", p0, p1, p2)); } function log(address p0, uint p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,string)", p0, p1, p2)); } function log(address p0, uint p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,bool)", p0, p1, p2)); } function log(address p0, uint p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,address)", p0, p1, p2)); } function log(address p0, string memory p1, uint p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,uint)", p0, p1, p2)); } function log(address p0, string memory p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,string)", p0, p1, p2)); } function log(address p0, string memory p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,bool)", p0, p1, p2)); } function log(address p0, string memory p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,address)", p0, p1, p2)); } function log(address p0, bool p1, uint p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint)", p0, p1, p2)); } function log(address p0, bool p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,string)", p0, p1, p2)); } function log(address p0, bool p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool)", p0, p1, p2)); } function log(address p0, bool p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,address)", p0, p1, p2)); } function log(address p0, address p1, uint p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,uint)", p0, p1, p2)); } function log(address p0, address p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,string)", p0, p1, p2)); } function log(address p0, address p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,bool)", p0, p1, p2)); } function log(address p0, address p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,address)", p0, p1, p2)); } function log(uint p0, uint p1, uint p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,uint,uint)", p0, p1, p2, p3)); } function log(uint p0, uint p1, uint p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,uint,string)", p0, p1, p2, p3)); } function log(uint p0, uint p1, uint p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,uint,bool)", p0, p1, p2, p3)); } function log(uint p0, uint p1, uint p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,uint,address)", p0, p1, p2, p3)); } function log(uint p0, uint p1, string memory p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,string,uint)", p0, p1, p2, p3)); } function log(uint p0, uint p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,string,string)", p0, p1, p2, p3)); } function log(uint p0, uint p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,string,bool)", p0, p1, p2, p3)); } function log(uint p0, uint p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,string,address)", p0, p1, p2, p3)); } function log(uint p0, uint p1, bool p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,bool,uint)", p0, p1, p2, p3)); } function log(uint p0, uint p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,bool,string)", p0, p1, p2, p3)); } function log(uint p0, uint p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,bool,bool)", p0, p1, p2, p3)); } function log(uint p0, uint p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,bool,address)", p0, p1, p2, p3)); } function log(uint p0, uint p1, address p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,address,uint)", p0, p1, p2, p3)); } function log(uint p0, uint p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,address,string)", p0, p1, p2, p3)); } function log(uint p0, uint p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,address,bool)", p0, p1, p2, p3)); } function log(uint p0, uint p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,address,address)", p0, p1, p2, p3)); } function log(uint p0, string memory p1, uint p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,uint,uint)", p0, p1, p2, p3)); } function log(uint p0, string memory p1, uint p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,uint,string)", p0, p1, p2, p3)); } function log(uint p0, string memory p1, uint p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,uint,bool)", p0, p1, p2, p3)); } function log(uint p0, string memory p1, uint p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,uint,address)", p0, p1, p2, p3)); } function log(uint p0, string memory p1, string memory p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,string,uint)", p0, p1, p2, p3)); } function log(uint p0, string memory p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,string,string)", p0, p1, p2, p3)); } function log(uint p0, string memory p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,string,bool)", p0, p1, p2, p3)); } function log(uint p0, string memory p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,string,address)", p0, p1, p2, p3)); } function log(uint p0, string memory p1, bool p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,bool,uint)", p0, p1, p2, p3)); } function log(uint p0, string memory p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,bool,string)", p0, p1, p2, p3)); } function log(uint p0, string memory p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,bool,bool)", p0, p1, p2, p3)); } function log(uint p0, string memory p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,bool,address)", p0, p1, p2, p3)); } function log(uint p0, string memory p1, address p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,address,uint)", p0, p1, p2, p3)); } function log(uint p0, string memory p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,address,string)", p0, p1, p2, p3)); } function log(uint p0, string memory p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,address,bool)", p0, p1, p2, p3)); } function log(uint p0, string memory p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,address,address)", p0, p1, p2, p3)); } function log(uint p0, bool p1, uint p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,uint,uint)", p0, p1, p2, p3)); } function log(uint p0, bool p1, uint p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,uint,string)", p0, p1, p2, p3)); } function log(uint p0, bool p1, uint p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,uint,bool)", p0, p1, p2, p3)); } function log(uint p0, bool p1, uint p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,uint,address)", p0, p1, p2, p3)); } function log(uint p0, bool p1, string memory p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,string,uint)", p0, p1, p2, p3)); } function log(uint p0, bool p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,string,string)", p0, p1, p2, p3)); } function log(uint p0, bool p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,string,bool)", p0, p1, p2, p3)); } function log(uint p0, bool p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,string,address)", p0, p1, p2, p3)); } function log(uint p0, bool p1, bool p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,bool,uint)", p0, p1, p2, p3)); } function log(uint p0, bool p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,bool,string)", p0, p1, p2, p3)); } function log(uint p0, bool p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,bool,bool)", p0, p1, p2, p3)); } function log(uint p0, bool p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,bool,address)", p0, p1, p2, p3)); } function log(uint p0, bool p1, address p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,address,uint)", p0, p1, p2, p3)); } function log(uint p0, bool p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,address,string)", p0, p1, p2, p3)); } function log(uint p0, bool p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,address,bool)", p0, p1, p2, p3)); } function log(uint p0, bool p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,address,address)", p0, p1, p2, p3)); } function log(uint p0, address p1, uint p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,uint,uint)", p0, p1, p2, p3)); } function log(uint p0, address p1, uint p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,uint,string)", p0, p1, p2, p3)); } function log(uint p0, address p1, uint p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,uint,bool)", p0, p1, p2, p3)); } function log(uint p0, address p1, uint p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,uint,address)", p0, p1, p2, p3)); } function log(uint p0, address p1, string memory p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,string,uint)", p0, p1, p2, p3)); } function log(uint p0, address p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,string,string)", p0, p1, p2, p3)); } function log(uint p0, address p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,string,bool)", p0, p1, p2, p3)); } function log(uint p0, address p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,string,address)", p0, p1, p2, p3)); } function log(uint p0, address p1, bool p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,bool,uint)", p0, p1, p2, p3)); } function log(uint p0, address p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,bool,string)", p0, p1, p2, p3)); } function log(uint p0, address p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,bool,bool)", p0, p1, p2, p3)); } function log(uint p0, address p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,bool,address)", p0, p1, p2, p3)); } function log(uint p0, address p1, address p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,address,uint)", p0, p1, p2, p3)); } function log(uint p0, address p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,address,string)", p0, p1, p2, p3)); } function log(uint p0, address p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,address,bool)", p0, p1, p2, p3)); } function log(uint p0, address p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,address,address)", p0, p1, p2, p3)); } function log(string memory p0, uint p1, uint p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,uint,uint)", p0, p1, p2, p3)); } function log(string memory p0, uint p1, uint p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,uint,string)", p0, p1, p2, p3)); } function log(string memory p0, uint p1, uint p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,uint,bool)", p0, p1, p2, p3)); } function log(string memory p0, uint p1, uint p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,uint,address)", p0, p1, p2, p3)); } function log(string memory p0, uint p1, string memory p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,string,uint)", p0, p1, p2, p3)); } function log(string memory p0, uint p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,string,string)", p0, p1, p2, p3)); } function log(string memory p0, uint p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,string,bool)", p0, p1, p2, p3)); } function log(string memory p0, uint p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,string,address)", p0, p1, p2, p3)); } function log(string memory p0, uint p1, bool p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,bool,uint)", p0, p1, p2, p3)); } function log(string memory p0, uint p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,bool,string)", p0, p1, p2, p3)); } function log(string memory p0, uint p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,bool,bool)", p0, p1, p2, p3)); } function log(string memory p0, uint p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,bool,address)", p0, p1, p2, p3)); } function log(string memory p0, uint p1, address p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,address,uint)", p0, p1, p2, p3)); } function log(string memory p0, uint p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,address,string)", p0, p1, p2, p3)); } function log(string memory p0, uint p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,address,bool)", p0, p1, p2, p3)); } function log(string memory p0, uint p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,address,address)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, uint p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,uint,uint)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, uint p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,uint,string)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, uint p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,uint,bool)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, uint p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,uint,address)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, string memory p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,string,uint)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,string,string)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,string,bool)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,string,address)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, bool p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,bool,uint)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,bool,string)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,bool,bool)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,bool,address)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, address p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,address,uint)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,address,string)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,address,bool)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,address,address)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, uint p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint,uint)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, uint p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint,string)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, uint p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint,bool)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, uint p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint,address)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, string memory p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,string,uint)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,string,string)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,string,bool)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,string,address)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, bool p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,uint)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,string)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,bool)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,address)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, address p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,address,uint)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,address,string)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,address,bool)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,address,address)", p0, p1, p2, p3)); } function log(string memory p0, address p1, uint p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,uint,uint)", p0, p1, p2, p3)); } function log(string memory p0, address p1, uint p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,uint,string)", p0, p1, p2, p3)); } function log(string memory p0, address p1, uint p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,uint,bool)", p0, p1, p2, p3)); } function log(string memory p0, address p1, uint p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,uint,address)", p0, p1, p2, p3)); } function log(string memory p0, address p1, string memory p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,string,uint)", p0, p1, p2, p3)); } function log(string memory p0, address p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,string,string)", p0, p1, p2, p3)); } function log(string memory p0, address p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,string,bool)", p0, p1, p2, p3)); } function log(string memory p0, address p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,string,address)", p0, p1, p2, p3)); } function log(string memory p0, address p1, bool p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,bool,uint)", p0, p1, p2, p3)); } function log(string memory p0, address p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,bool,string)", p0, p1, p2, p3)); } function log(string memory p0, address p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,bool,bool)", p0, p1, p2, p3)); } function log(string memory p0, address p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,bool,address)", p0, p1, p2, p3)); } function log(string memory p0, address p1, address p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,address,uint)", p0, p1, p2, p3)); } function log(string memory p0, address p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,address,string)", p0, p1, p2, p3)); } function log(string memory p0, address p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,address,bool)", p0, p1, p2, p3)); } function log(string memory p0, address p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,address,address)", p0, p1, p2, p3)); } function log(bool p0, uint p1, uint p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,uint,uint)", p0, p1, p2, p3)); } function log(bool p0, uint p1, uint p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,uint,string)", p0, p1, p2, p3)); } function log(bool p0, uint p1, uint p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,uint,bool)", p0, p1, p2, p3)); } function log(bool p0, uint p1, uint p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,uint,address)", p0, p1, p2, p3)); } function log(bool p0, uint p1, string memory p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,string,uint)", p0, p1, p2, p3)); } function log(bool p0, uint p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,string,string)", p0, p1, p2, p3)); } function log(bool p0, uint p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,string,bool)", p0, p1, p2, p3)); } function log(bool p0, uint p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,string,address)", p0, p1, p2, p3)); } function log(bool p0, uint p1, bool p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,bool,uint)", p0, p1, p2, p3)); } function log(bool p0, uint p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,bool,string)", p0, p1, p2, p3)); } function log(bool p0, uint p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,bool,bool)", p0, p1, p2, p3)); } function log(bool p0, uint p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,bool,address)", p0, p1, p2, p3)); } function log(bool p0, uint p1, address p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,address,uint)", p0, p1, p2, p3)); } function log(bool p0, uint p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,address,string)", p0, p1, p2, p3)); } function log(bool p0, uint p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,address,bool)", p0, p1, p2, p3)); } function log(bool p0, uint p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,address,address)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, uint p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint,uint)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, uint p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint,string)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, uint p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint,bool)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, uint p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint,address)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, string memory p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,string,uint)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,string,string)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,string,bool)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,string,address)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, bool p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,uint)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,string)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,bool)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,address)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, address p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,address,uint)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,address,string)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,address,bool)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,address,address)", p0, p1, p2, p3)); } function log(bool p0, bool p1, uint p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint,uint)", p0, p1, p2, p3)); } function log(bool p0, bool p1, uint p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint,string)", p0, p1, p2, p3)); } function log(bool p0, bool p1, uint p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint,bool)", p0, p1, p2, p3)); } function log(bool p0, bool p1, uint p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint,address)", p0, p1, p2, p3)); } function log(bool p0, bool p1, string memory p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,uint)", p0, p1, p2, p3)); } function log(bool p0, bool p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,string)", p0, p1, p2, p3)); } function log(bool p0, bool p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,bool)", p0, p1, p2, p3)); } function log(bool p0, bool p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,address)", p0, p1, p2, p3)); } function log(bool p0, bool p1, bool p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,uint)", p0, p1, p2, p3)); } function log(bool p0, bool p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,string)", p0, p1, p2, p3)); } function log(bool p0, bool p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,bool)", p0, p1, p2, p3)); } function log(bool p0, bool p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,address)", p0, p1, p2, p3)); } function log(bool p0, bool p1, address p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,uint)", p0, p1, p2, p3)); } function log(bool p0, bool p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,string)", p0, p1, p2, p3)); } function log(bool p0, bool p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,bool)", p0, p1, p2, p3)); } function log(bool p0, bool p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,address)", p0, p1, p2, p3)); } function log(bool p0, address p1, uint p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint,uint)", p0, p1, p2, p3)); } function log(bool p0, address p1, uint p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint,string)", p0, p1, p2, p3)); } function log(bool p0, address p1, uint p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint,bool)", p0, p1, p2, p3)); } function log(bool p0, address p1, uint p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint,address)", p0, p1, p2, p3)); } function log(bool p0, address p1, string memory p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,string,uint)", p0, p1, p2, p3)); } function log(bool p0, address p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,string,string)", p0, p1, p2, p3)); } function log(bool p0, address p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,string,bool)", p0, p1, p2, p3)); } function log(bool p0, address p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,string,address)", p0, p1, p2, p3)); } function log(bool p0, address p1, bool p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,uint)", p0, p1, p2, p3)); } function log(bool p0, address p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,string)", p0, p1, p2, p3)); } function log(bool p0, address p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,bool)", p0, p1, p2, p3)); } function log(bool p0, address p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,address)", p0, p1, p2, p3)); } function log(bool p0, address p1, address p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,address,uint)", p0, p1, p2, p3)); } function log(bool p0, address p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,address,string)", p0, p1, p2, p3)); } function log(bool p0, address p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,address,bool)", p0, p1, p2, p3)); } function log(bool p0, address p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,address,address)", p0, p1, p2, p3)); } function log(address p0, uint p1, uint p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,uint,uint)", p0, p1, p2, p3)); } function log(address p0, uint p1, uint p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,uint,string)", p0, p1, p2, p3)); } function log(address p0, uint p1, uint p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,uint,bool)", p0, p1, p2, p3)); } function log(address p0, uint p1, uint p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,uint,address)", p0, p1, p2, p3)); } function log(address p0, uint p1, string memory p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,string,uint)", p0, p1, p2, p3)); } function log(address p0, uint p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,string,string)", p0, p1, p2, p3)); } function log(address p0, uint p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,string,bool)", p0, p1, p2, p3)); } function log(address p0, uint p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,string,address)", p0, p1, p2, p3)); } function log(address p0, uint p1, bool p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,bool,uint)", p0, p1, p2, p3)); } function log(address p0, uint p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,bool,string)", p0, p1, p2, p3)); } function log(address p0, uint p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,bool,bool)", p0, p1, p2, p3)); } function log(address p0, uint p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,bool,address)", p0, p1, p2, p3)); } function log(address p0, uint p1, address p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,address,uint)", p0, p1, p2, p3)); } function log(address p0, uint p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,address,string)", p0, p1, p2, p3)); } function log(address p0, uint p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,address,bool)", p0, p1, p2, p3)); } function log(address p0, uint p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,address,address)", p0, p1, p2, p3)); } function log(address p0, string memory p1, uint p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,uint,uint)", p0, p1, p2, p3)); } function log(address p0, string memory p1, uint p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,uint,string)", p0, p1, p2, p3)); } function log(address p0, string memory p1, uint p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,uint,bool)", p0, p1, p2, p3)); } function log(address p0, string memory p1, uint p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,uint,address)", p0, p1, p2, p3)); } function log(address p0, string memory p1, string memory p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,string,uint)", p0, p1, p2, p3)); } function log(address p0, string memory p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,string,string)", p0, p1, p2, p3)); } function log(address p0, string memory p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,string,bool)", p0, p1, p2, p3)); } function log(address p0, string memory p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,string,address)", p0, p1, p2, p3)); } function log(address p0, string memory p1, bool p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,bool,uint)", p0, p1, p2, p3)); } function log(address p0, string memory p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,bool,string)", p0, p1, p2, p3)); } function log(address p0, string memory p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,bool,bool)", p0, p1, p2, p3)); } function log(address p0, string memory p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,bool,address)", p0, p1, p2, p3)); } function log(address p0, string memory p1, address p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,address,uint)", p0, p1, p2, p3)); } function log(address p0, string memory p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,address,string)", p0, p1, p2, p3)); } function log(address p0, string memory p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,address,bool)", p0, p1, p2, p3)); } function log(address p0, string memory p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,address,address)", p0, p1, p2, p3)); } function log(address p0, bool p1, uint p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint,uint)", p0, p1, p2, p3)); } function log(address p0, bool p1, uint p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint,string)", p0, p1, p2, p3)); } function log(address p0, bool p1, uint p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint,bool)", p0, p1, p2, p3)); } function log(address p0, bool p1, uint p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint,address)", p0, p1, p2, p3)); } function log(address p0, bool p1, string memory p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,string,uint)", p0, p1, p2, p3)); } function log(address p0, bool p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,string,string)", p0, p1, p2, p3)); } function log(address p0, bool p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,string,bool)", p0, p1, p2, p3)); } function log(address p0, bool p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,string,address)", p0, p1, p2, p3)); } function log(address p0, bool p1, bool p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,uint)", p0, p1, p2, p3)); } function log(address p0, bool p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,string)", p0, p1, p2, p3)); } function log(address p0, bool p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,bool)", p0, p1, p2, p3)); } function log(address p0, bool p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,address)", p0, p1, p2, p3)); } function log(address p0, bool p1, address p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,address,uint)", p0, p1, p2, p3)); } function log(address p0, bool p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,address,string)", p0, p1, p2, p3)); } function log(address p0, bool p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,address,bool)", p0, p1, p2, p3)); } function log(address p0, bool p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,address,address)", p0, p1, p2, p3)); } function log(address p0, address p1, uint p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,uint,uint)", p0, p1, p2, p3)); } function log(address p0, address p1, uint p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,uint,string)", p0, p1, p2, p3)); } function log(address p0, address p1, uint p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,uint,bool)", p0, p1, p2, p3)); } function log(address p0, address p1, uint p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,uint,address)", p0, p1, p2, p3)); } function log(address p0, address p1, string memory p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,string,uint)", p0, p1, p2, p3)); } function log(address p0, address p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,string,string)", p0, p1, p2, p3)); } function log(address p0, address p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,string,bool)", p0, p1, p2, p3)); } function log(address p0, address p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,string,address)", p0, p1, p2, p3)); } function log(address p0, address p1, bool p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,bool,uint)", p0, p1, p2, p3)); } function log(address p0, address p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,bool,string)", p0, p1, p2, p3)); } function log(address p0, address p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,bool,bool)", p0, p1, p2, p3)); } function log(address p0, address p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,bool,address)", p0, p1, p2, p3)); } function log(address p0, address p1, address p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,address,uint)", p0, p1, p2, p3)); } function log(address p0, address p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,address,string)", p0, p1, p2, p3)); } function log(address p0, address p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,address,bool)", p0, p1, p2, p3)); } function log(address p0, address p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,address,address)", p0, p1, p2, p3)); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.8.4; interface IProxyImplementation { enum HowToCall { Call, DelegateCall } function proxy(address dest, HowToCall howToCall, bytes memory data) external returns (bool result); }
// SPDX-License-Identifier: MIT pragma solidity >=0.8.4; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "../interfaces/IProxyFactory.sol"; import "hardhat/console.sol"; contract TokenTransferProxy { using SafeERC20 for IERC20; IProxyFactory public factory; constructor(IProxyFactory _factory) { factory = _factory; } function transferFrom(IERC20 _token, address _from, address _to, uint _amount) external returns (bool) { require(factory.contracts(msg.sender), "illegal caller"); _token.safeTransferFrom(_from, _to, _amount); return true; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.8.4; import '@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol'; import '@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol'; import '@openzeppelin/contracts/utils/Address.sol'; import '@openzeppelin/contracts/proxy/Proxy.sol'; import '../interfaces/IProxyImplementation.sol'; import '../interfaces/IProxyFactory.sol'; import "hardhat/console.sol"; contract OwnableDelegateProxy is ERC1967UpgradeUpgradeable, Proxy { using Address for address; function initialize (IProxyImplementation _impl, address _user, address _factory) external initializer { _upgradeToAndCall(address(_impl), abi.encodeWithSignature("initialize(address,address)", _user, _factory), true); } function _implementation() internal view virtual override returns (address) { return _getImplementation(); } function implementation() external view returns (address) { return _implementation(); } /* function upgradeTo(address newImplementation) external onlyOwner { _upgradeTo(newImplementation); } */ }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (proxy/ERC1967/ERC1967Upgrade.sol) pragma solidity ^0.8.2; import "../beacon/IBeaconUpgradeable.sol"; import "../../interfaces/draft-IERC1822Upgradeable.sol"; import "../../utils/AddressUpgradeable.sol"; import "../../utils/StorageSlotUpgradeable.sol"; import "../utils/Initializable.sol"; /** * @dev This abstract contract provides getters and event emitting update functions for * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots. * * _Available since v4.1._ * * @custom:oz-upgrades-unsafe-allow delegatecall */ abstract contract ERC1967UpgradeUpgradeable is Initializable { function __ERC1967Upgrade_init() internal onlyInitializing { } function __ERC1967Upgrade_init_unchained() internal onlyInitializing { } // This is the keccak-256 hash of "eip1967.proxy.rollback" subtracted by 1 bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143; /** * @dev Storage slot with the address of the current implementation. * This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; /** * @dev Emitted when the implementation is upgraded. */ event Upgraded(address indexed implementation); /** * @dev Returns the current implementation address. */ function _getImplementation() internal view returns (address) { return StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value; } /** * @dev Stores a new address in the EIP1967 implementation slot. */ function _setImplementation(address newImplementation) private { require(AddressUpgradeable.isContract(newImplementation), "ERC1967: new implementation is not a contract"); StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; } /** * @dev Perform implementation upgrade * * Emits an {Upgraded} event. */ function _upgradeTo(address newImplementation) internal { _setImplementation(newImplementation); emit Upgraded(newImplementation); } /** * @dev Perform implementation upgrade with additional setup call. * * Emits an {Upgraded} event. */ function _upgradeToAndCall( address newImplementation, bytes memory data, bool forceCall ) internal { _upgradeTo(newImplementation); if (data.length > 0 || forceCall) { _functionDelegateCall(newImplementation, data); } } /** * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call. * * Emits an {Upgraded} event. */ function _upgradeToAndCallUUPS( address newImplementation, bytes memory data, bool forceCall ) internal { // Upgrades from old implementations will perform a rollback test. This test requires the new // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing // this special case will break upgrade paths from old UUPS implementation to new ones. if (StorageSlotUpgradeable.getBooleanSlot(_ROLLBACK_SLOT).value) { _setImplementation(newImplementation); } else { try IERC1822ProxiableUpgradeable(newImplementation).proxiableUUID() returns (bytes32 slot) { require(slot == _IMPLEMENTATION_SLOT, "ERC1967Upgrade: unsupported proxiableUUID"); } catch { revert("ERC1967Upgrade: new implementation is not UUPS"); } _upgradeToAndCall(newImplementation, data, forceCall); } } /** * @dev Storage slot with the admin of the contract. * This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103; /** * @dev Emitted when the admin account has changed. */ event AdminChanged(address previousAdmin, address newAdmin); /** * @dev Returns the current admin. */ function _getAdmin() internal view returns (address) { return StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value; } /** * @dev Stores a new address in the EIP1967 admin slot. */ function _setAdmin(address newAdmin) private { require(newAdmin != address(0), "ERC1967: new admin is the zero address"); StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value = newAdmin; } /** * @dev Changes the admin of the proxy. * * Emits an {AdminChanged} event. */ function _changeAdmin(address newAdmin) internal { emit AdminChanged(_getAdmin(), newAdmin); _setAdmin(newAdmin); } /** * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy. * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor. */ bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50; /** * @dev Emitted when the beacon is upgraded. */ event BeaconUpgraded(address indexed beacon); /** * @dev Returns the current beacon. */ function _getBeacon() internal view returns (address) { return StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value; } /** * @dev Stores a new beacon in the EIP1967 beacon slot. */ function _setBeacon(address newBeacon) private { require(AddressUpgradeable.isContract(newBeacon), "ERC1967: new beacon is not a contract"); require( AddressUpgradeable.isContract(IBeaconUpgradeable(newBeacon).implementation()), "ERC1967: beacon implementation is not a contract" ); StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value = newBeacon; } /** * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that). * * Emits a {BeaconUpgraded} event. */ function _upgradeBeaconToAndCall( address newBeacon, bytes memory data, bool forceCall ) internal { _setBeacon(newBeacon); emit BeaconUpgraded(newBeacon); if (data.length > 0 || forceCall) { _functionDelegateCall(IBeaconUpgradeable(newBeacon).implementation(), data); } } /** * @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) private returns (bytes memory) { require(AddressUpgradeable.isContract(target), "Address: delegate call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.delegatecall(data); return AddressUpgradeable.verifyCallResult(success, returndata, "Address: low-level delegate call failed"); } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (proxy/Proxy.sol) pragma solidity ^0.8.0; /** * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to * be specified by overriding the virtual {_implementation} function. * * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a * different contract through the {_delegate} function. * * The success and return data of the delegated call will be returned back to the caller of the proxy. */ abstract contract Proxy { /** * @dev Delegates the current call to `implementation`. * * This function does not return to its internal call site, it will return directly to the external caller. */ function _delegate(address implementation) internal virtual { assembly { // Copy msg.data. We take full control of memory in this inline assembly // block because it will not return to Solidity code. We overwrite the // Solidity scratch pad at memory position 0. calldatacopy(0, 0, calldatasize()) // Call the implementation. // out and outsize are 0 because we don't know the size yet. let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0) // Copy the returned data. returndatacopy(0, 0, returndatasize()) switch result // delegatecall returns 0 on error. case 0 { revert(0, returndatasize()) } default { return(0, returndatasize()) } } } /** * @dev This is a virtual function that should be overridden so it returns the address to which the fallback function * and {_fallback} should delegate. */ function _implementation() internal view virtual returns (address); /** * @dev Delegates the current call to the address returned by `_implementation()`. * * This function does not return to its internal call site, it will return directly to the external caller. */ function _fallback() internal virtual { _beforeFallback(); _delegate(_implementation()); } /** * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other * function in the contract matches the call data. */ fallback() external payable virtual { _fallback(); } /** * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data * is empty. */ receive() external payable virtual { _fallback(); } /** * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback` * call, or as part of the Solidity `fallback` or `receive` functions. * * If overridden should call `super._beforeFallback()`. */ function _beforeFallback() internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol) pragma solidity ^0.8.0; /** * @dev This is the interface that {BeaconProxy} expects of its beacon. */ interface IBeaconUpgradeable { /** * @dev Must return an address that can be used as a delegate call target. * * {BeaconProxy} will check that this address is a contract. */ function implementation() external view returns (address); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol) pragma solidity ^0.8.0; /** * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified * proxy whose upgrades are fully controlled by the current implementation. */ interface IERC1822ProxiableUpgradeable { /** * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation * address. * * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this * function revert if invoked through a proxy. */ function proxiableUUID() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/StorageSlot.sol) pragma solidity ^0.8.0; /** * @dev Library for reading and writing primitive types to specific storage slots. * * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts. * This library helps with reading and writing to such slots without the need for inline assembly. * * The functions in this library return Slot structs that contain a `value` member that can be used to read or write. * * Example usage to set ERC1967 implementation slot: * ``` * contract ERC1967 { * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; * * function _getImplementation() internal view returns (address) { * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value; * } * * function _setImplementation(address newImplementation) internal { * require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract"); * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; * } * } * ``` * * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._ */ library StorageSlotUpgradeable { struct AddressSlot { address value; } struct BooleanSlot { bool value; } struct Bytes32Slot { bytes32 value; } struct Uint256Slot { uint256 value; } /** * @dev Returns an `AddressSlot` with member `value` located at `slot`. */ function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) { assembly { r.slot := slot } } /** * @dev Returns an `BooleanSlot` with member `value` located at `slot`. */ function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) { assembly { r.slot := slot } } /** * @dev Returns an `Bytes32Slot` with member `value` located at `slot`. */ function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) { assembly { r.slot := slot } } /** * @dev Returns an `Uint256Slot` with member `value` located at `slot`. */ function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) { assembly { r.slot := slot } } }
// SPDX-License-Identifier: MIT pragma solidity >=0.8.4; import '@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol'; import '@openzeppelin/contracts/utils/Address.sol'; import '../interfaces/IOwnableDelegateProxy.sol'; import '../interfaces/IProxyImplementation.sol'; import './OwnableDelegateProxy.sol'; import '../core/SafeOwnable.sol'; import "hardhat/console.sol"; contract ProxyFactory is SafeOwnable, Initializable { bytes32 public constant INIT_CODE_HASH = keccak256(abi.encodePacked(type(OwnableDelegateProxy).creationCode)); IProxyImplementation public proxyImplementation; mapping(address => IOwnableDelegateProxy) public proxies; mapping(address => uint) public pending; mapping(address => bool) public contracts; uint public DELAY_PERIOD = 2 weeks; constructor(IProxyImplementation _proxyImplementation) { proxyImplementation = _proxyImplementation; } function startGrantAuthentication (address _addr) external onlyOwner { require(!contracts[_addr] && pending[_addr] == 0, "already in contracts or pending"); pending[_addr] = block.timestamp; } function endGrantAuthentication (address _addr) external onlyOwner { require(!contracts[_addr] && pending[_addr] != 0 && ((pending[_addr] + DELAY_PERIOD) < block.timestamp), "time not right"); pending[_addr] = 0; contracts[_addr] = true; } function revokeAuthentication (address _addr) external onlyOwner { contracts[_addr] = false; } function registerProxy() external returns (address proxy) { require(address(proxies[msg.sender]) == address(0), "already registed"); bytes memory bytecode = type(OwnableDelegateProxy).creationCode; bytes32 salt = keccak256(abi.encodePacked(msg.sender)); assembly { proxy := create2(0, add(bytecode, 32), mload(bytecode), salt) } console.log("proxy: ", proxy); proxies[msg.sender] = IOwnableDelegateProxy(payable(proxy)); IOwnableDelegateProxy(payable(proxy)).initialize(proxyImplementation, msg.sender, address(this)); } function grantInitialAuthentication(address authAddress) external onlyOwner initializer { contracts[authAddress] = true; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.8.4; import './IProxyImplementation.sol'; interface IOwnableDelegateProxy { function initialize (IProxyImplementation _impl, address _user, address _factory) external; function implementation() external view returns(address); }
// SPDX-License-Identifier: MIT pragma solidity >=0.8.4; import '@openzeppelin/contracts/security/ReentrancyGuard.sol'; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "../interfaces/IOwnableDelegateProxy.sol"; import "../interfaces/IProxyImplementation.sol"; import "../interfaces/ITokenTransferProxy.sol"; import "../interfaces/IProxyFactory.sol"; import "../libraries/ArrayUtils.sol"; import "../core/SafeOwnable.sol"; import "hardhat/console.sol"; contract ExchangeCore is ReentrancyGuard, SafeOwnable { event OrderApprovedPartOne( bytes32 indexed hash, address exchange, address indexed maker, address taker, uint makerRelayerFee, uint takerRelayerFee, uint makerProtocolFee, uint takerProtocolFee, address indexed feeRecipient, FeeMethod feeMethod, Side side, SaleKind saleKind, address target ); event OrderApprovedPartTwo( bytes32 indexed hash, IProxyImplementation.HowToCall howToCall, bytes targetdata, bytes replacementPattern, address staticTarget, bytes staticExtradata, IERC20 paymentToken, uint basePrice, uint extra, uint listingTime, uint expirationTime, uint salt, bool orderbookInclusionDesired ); event OrderCancelled(bytes32 indexed hash); event OrdersMatched(bytes32 buyHash, bytes32 sellHash, address indexed maker, address indexed taker, uint price, bytes32 indexed metadata); IERC20 public exchangeToken; IProxyFactory public proxyFactory; ITokenTransferProxy public tokenTransferProxy; mapping(bytes32 => bool) public cancelledOrFinalized; mapping(bytes32 => bool) public approvedOrders; uint public minimumMakerProtocolFee = 0; uint public minimumTakerProtocolFee = 0; address public protocolFeeRecipient; enum FeeMethod { ProtocolFee, SplitFee } uint public constant INVERSE_BASIS_POINT = 10000; enum Side { Buy, Sell } enum SaleKind { FixedPrice, DutchAuction } constructor() { } struct Sig { uint8 v; bytes32 r; bytes32 s; } struct Order { address exchange; address maker; address taker; uint makerRelayerFee; uint takerRelayerFee; uint makerProtocolFee; uint takerProtocolFee; address feeRecipient; FeeMethod feeMethod; Side side; SaleKind saleKind; address target; IProxyImplementation.HowToCall howToCall; bytes targetdata; bytes replacementPattern; address staticTarget; bytes staticExtradata; IERC20 paymentToken; uint basePrice; uint extra; uint listingTime; uint expirationTime; uint salt; } function changeMinimumMakerProtocolFee(uint newMinimumMakerProtocolFee) public onlyOwner { minimumMakerProtocolFee = newMinimumMakerProtocolFee; } function changeMinimumTakerProtocolFee(uint newMinimumTakerProtocolFee) public onlyOwner { minimumTakerProtocolFee = newMinimumTakerProtocolFee; } function changeProtocolFeeRecipient(address newProtocolFeeRecipient) public onlyOwner { protocolFeeRecipient = newProtocolFeeRecipient; } function changeExchangeToken(IERC20 newExchangeToken) public onlyOwner { exchangeToken = newExchangeToken; } function transferTokens(IERC20 token, address from, address to, uint amount) internal { if (amount > 0) { tokenTransferProxy.transferFrom(token, from, to, amount); } } function chargeProtocolFee(address from, address to, uint amount) internal { transferTokens(exchangeToken, from, to, amount); } function staticCall(address target, bytes memory data, bytes memory extradata) public view returns (bool result) { bytes memory combined = new bytes(data.length + extradata.length); uint index; assembly { index := add(combined, 0x20) } index = ArrayUtils.unsafeWriteBytes(index, extradata); ArrayUtils.unsafeWriteBytes(index, data); assembly { result := staticcall(gas(), target, add(combined, 0x20), mload(combined), mload(0x40), 0) } return result; } function sizeOf(Order memory order) internal pure returns (uint) { return ((0x14 * 7) + (0x20 * 9) + 4 + order.targetdata.length + order.replacementPattern.length + order.staticExtradata.length); } function hashOrder(Order memory order) internal pure returns (bytes32 hash) { /* Unfortunately abi.encodePacked doesn't work here, stack size constraints. */ uint size = sizeOf(order); bytes memory array = new bytes(size); uint index; assembly { index := add(array, 0x20) } index = ArrayUtils.unsafeWriteAddress(index, order.exchange); index = ArrayUtils.unsafeWriteAddress(index, order.maker); index = ArrayUtils.unsafeWriteAddress(index, order.taker); index = ArrayUtils.unsafeWriteUint(index, order.makerRelayerFee); index = ArrayUtils.unsafeWriteUint(index, order.takerRelayerFee); index = ArrayUtils.unsafeWriteUint(index, order.makerProtocolFee); index = ArrayUtils.unsafeWriteUint(index, order.takerProtocolFee); index = ArrayUtils.unsafeWriteAddress(index, order.feeRecipient); index = ArrayUtils.unsafeWriteUint8(index, uint8(order.feeMethod)); index = ArrayUtils.unsafeWriteUint8(index, uint8(order.side)); index = ArrayUtils.unsafeWriteUint8(index, uint8(order.saleKind)); index = ArrayUtils.unsafeWriteAddress(index, order.target); index = ArrayUtils.unsafeWriteUint8(index, uint8(order.howToCall)); index = ArrayUtils.unsafeWriteBytes(index, order.targetdata); index = ArrayUtils.unsafeWriteBytes(index, order.replacementPattern); index = ArrayUtils.unsafeWriteAddress(index, order.staticTarget); index = ArrayUtils.unsafeWriteBytes(index, order.staticExtradata); index = ArrayUtils.unsafeWriteAddress(index, address(order.paymentToken)); index = ArrayUtils.unsafeWriteUint(index, order.basePrice); index = ArrayUtils.unsafeWriteUint(index, order.extra); index = ArrayUtils.unsafeWriteUint(index, order.listingTime); index = ArrayUtils.unsafeWriteUint(index, order.expirationTime); index = ArrayUtils.unsafeWriteUint(index, order.salt); assembly { hash := keccak256(add(array, 0x20), size) } return hash; } function hashToSign(Order memory order) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hashOrder(order))); } function requireValidOrder(Order memory order, Sig memory sig) internal view returns (bytes32) { bytes32 hash = hashToSign(order); require(validateOrder(hash, order, sig)); return hash; } function validateParameters(SaleKind saleKind, uint expirationTime) pure internal returns (bool) { /* Auctions must have a set expiration date. */ return (saleKind == SaleKind.FixedPrice || expirationTime > 0); } function validateOrderParameters(Order memory order) internal view returns (bool) { /* Order must be targeted at this protocol version (this Exchange contract). */ if (order.exchange != address(this)) { return false; } /* Order must possess valid sale kind parameter combination. */ if (!validateParameters(order.saleKind, order.expirationTime)) { return false; } /* If using the split fee method, order must have sufficient protocol fees. */ if (order.feeMethod == FeeMethod.SplitFee && (order.makerProtocolFee < minimumMakerProtocolFee || order.takerProtocolFee < minimumTakerProtocolFee)) { return false; } return true; } function validateOrder(bytes32 hash, Order memory order, Sig memory sig) internal view returns (bool) { /* Not done in an if-conditional to prevent unnecessary ecrecover evaluation, which seems to happen even though it should short-circuit. */ /* Order must have valid parameters. */ if (!validateOrderParameters(order)) { return false; } /* Order must have not been canceled or already filled. */ if (cancelledOrFinalized[hash]) { return false; } /* Order authentication. Order must be either: /* (a) previously approved */ if (approvedOrders[hash]) { return true; } /* or (b) ECDSA-signed by maker. */ if (ecrecover(hash, sig.v, sig.r, sig.s) == order.maker) { return true; } return false; } function approveOrder(Order memory order, bool orderbookInclusionDesired) internal { /* CHECKS */ /* Assert sender is authorized to approve order. */ require(msg.sender == order.maker); /* Calculate order hash. */ bytes32 hash = hashToSign(order); /* Assert order has not already been approved. */ require(!approvedOrders[hash]); /* EFFECTS */ /* Mark order as approved. */ approvedOrders[hash] = true; /* Log approval event. Must be split in two due to Solidity stack size limitations. */ { emit OrderApprovedPartOne(hash, order.exchange, order.maker, order.taker, order.makerRelayerFee, order.takerRelayerFee, order.makerProtocolFee, order.takerProtocolFee, order.feeRecipient, order.feeMethod, order.side, order.saleKind, order.target); } { emit OrderApprovedPartTwo(hash, order.howToCall, order.targetdata, order.replacementPattern, order.staticTarget, order.staticExtradata, order.paymentToken, order.basePrice, order.extra, order.listingTime, order.expirationTime, order.salt, orderbookInclusionDesired); } } function cancelOrder(Order memory order, Sig memory sig) internal { /* CHECKS */ /* Calculate order hash. */ bytes32 hash = requireValidOrder(order, sig); /* Assert sender is authorized to cancel order. */ require(msg.sender == order.maker); /* EFFECTS */ /* Mark order as cancelled, preventing it from being matched. */ cancelledOrFinalized[hash] = true; /* Log cancel event. */ emit OrderCancelled(hash); } function calculateFinalPrice(Side side, SaleKind saleKind, uint basePrice, uint extra, uint listingTime, uint expirationTime) view internal returns (uint finalPrice) { if (saleKind == SaleKind.FixedPrice) { return basePrice; } else if (saleKind == SaleKind.DutchAuction) { uint diff = extra * (block.timestamp - listingTime) / (expirationTime - listingTime); if (side == Side.Sell) { /* Sell-side - start price: basePrice. End price: basePrice - extra. */ return basePrice - diff; } else { /* Buy-side - start price: basePrice. End price: basePrice + extra. */ return basePrice + diff; } } } function calculateCurrentPrice (Order memory order) internal view returns (uint) { return calculateFinalPrice(order.side, order.saleKind, order.basePrice, order.extra, order.listingTime, order.expirationTime); } function calculateMatchPrice(Order memory buy, Order memory sell) view internal returns (uint) { /* Calculate sell price. */ uint sellPrice = calculateFinalPrice(sell.side, sell.saleKind, sell.basePrice, sell.extra, sell.listingTime, sell.expirationTime); /* Calculate buy price. */ uint buyPrice = calculateFinalPrice(buy.side, buy.saleKind, buy.basePrice, buy.extra, buy.listingTime, buy.expirationTime); /* Require price cross. */ require(buyPrice >= sellPrice); /* Maker/taker priority. */ return sell.feeRecipient != address(0) ? sellPrice : buyPrice; } function executeFundsTransfer(Order memory buy, Order memory sell) internal returns (uint) { /* Only payable in the special case of unwrapped Ether. */ if (address(sell.paymentToken) != address(0)) { require(msg.value == 0); } /* Calculate match price. */ uint price = calculateMatchPrice(buy, sell); /* If paying using a token (not Ether), transfer tokens. This is done prior to fee payments to that a seller will have tokens before being charged fees. */ if (price > 0 && address(sell.paymentToken) != address(0)) { transferTokens(sell.paymentToken, buy.maker, sell.maker, price); } /* Amount that will be received by seller (for Ether). */ uint receiveAmount = price; /* Amount that must be sent by buyer (for Ether). */ uint requiredAmount = price; /* Determine maker/taker and charge fees accordingly. */ if (sell.feeRecipient != address(0)) { /* Sell-side order is maker. */ /* Assert taker fee is less than or equal to maximum fee specified by buyer. */ require(sell.takerRelayerFee <= buy.takerRelayerFee); if (sell.feeMethod == FeeMethod.SplitFee) { /* Assert taker fee is less than or equal to maximum fee specified by buyer. */ require(sell.takerProtocolFee <= buy.takerProtocolFee); /* Maker fees are deducted from the token amount that the maker receives. Taker fees are extra tokens that must be paid by the taker. */ if (sell.makerRelayerFee > 0) { uint makerRelayerFee = sell.makerRelayerFee * price / INVERSE_BASIS_POINT; if (address(sell.paymentToken) == address(0)) { receiveAmount = receiveAmount - makerRelayerFee; payable(sell.feeRecipient).transfer(makerRelayerFee); } else { transferTokens(sell.paymentToken, sell.maker, sell.feeRecipient, makerRelayerFee); } } if (sell.takerRelayerFee > 0) { uint takerRelayerFee = sell.takerRelayerFee * price / INVERSE_BASIS_POINT; if (address(sell.paymentToken) == address(0)) { requiredAmount = requiredAmount + takerRelayerFee; payable(sell.feeRecipient).transfer(takerRelayerFee); } else { transferTokens(sell.paymentToken, buy.maker, sell.feeRecipient, takerRelayerFee); } } if (sell.makerProtocolFee > 0) { uint makerProtocolFee = sell.makerProtocolFee * price / INVERSE_BASIS_POINT; if (address(sell.paymentToken) == address(0)) { receiveAmount = receiveAmount - makerProtocolFee; payable(protocolFeeRecipient).transfer(makerProtocolFee); } else { transferTokens(sell.paymentToken, sell.maker, protocolFeeRecipient, makerProtocolFee); } } if (sell.takerProtocolFee > 0) { uint takerProtocolFee = sell.takerProtocolFee * price / INVERSE_BASIS_POINT; if (address(sell.paymentToken) == address(0)) { requiredAmount = requiredAmount + takerProtocolFee; payable(protocolFeeRecipient).transfer(takerProtocolFee); } else { transferTokens(sell.paymentToken, buy.maker, protocolFeeRecipient, takerProtocolFee); } } } else { /* Charge maker fee to seller. */ chargeProtocolFee(sell.maker, sell.feeRecipient, sell.makerRelayerFee); /* Charge taker fee to buyer. */ chargeProtocolFee(buy.maker, sell.feeRecipient, sell.takerRelayerFee); } } else { /* Buy-side order is maker. */ /* Assert taker fee is less than or equal to maximum fee specified by seller. */ require(buy.takerRelayerFee <= sell.takerRelayerFee); if (sell.feeMethod == FeeMethod.SplitFee) { /* The Exchange does not escrow Ether, so direct Ether can only be used to with sell-side maker / buy-side taker orders. */ require(address(sell.paymentToken) != address(0)); /* Assert taker fee is less than or equal to maximum fee specified by seller. */ require(buy.takerProtocolFee <= sell.takerProtocolFee); if (buy.makerRelayerFee > 0) { uint makerRelayerFee = buy.makerRelayerFee * price / INVERSE_BASIS_POINT; transferTokens(sell.paymentToken, buy.maker, buy.feeRecipient, makerRelayerFee); } if (buy.takerRelayerFee > 0) { uint takerRelayerFee = buy.takerRelayerFee * price / INVERSE_BASIS_POINT; transferTokens(sell.paymentToken, sell.maker, buy.feeRecipient, takerRelayerFee); } if (buy.makerProtocolFee > 0) { uint makerProtocolFee = buy.makerProtocolFee * price / INVERSE_BASIS_POINT; transferTokens(sell.paymentToken, buy.maker, protocolFeeRecipient, makerProtocolFee); } if (buy.takerProtocolFee > 0) { uint takerProtocolFee = buy.takerProtocolFee * price / INVERSE_BASIS_POINT; transferTokens(sell.paymentToken, sell.maker, protocolFeeRecipient, takerProtocolFee); } } else { /* Charge maker fee to buyer. */ chargeProtocolFee(buy.maker, buy.feeRecipient, buy.makerRelayerFee); /* Charge taker fee to seller. */ chargeProtocolFee(sell.maker, buy.feeRecipient, buy.takerRelayerFee); } } if (address(sell.paymentToken) == address(0)) { /* Special-case Ether, order must be matched by buyer. */ require(msg.value >= requiredAmount); payable(sell.maker).transfer(receiveAmount); /* Allow overshoot for variable-price auctions, refund difference. */ uint diff = msg.value - requiredAmount; if (diff > 0) { payable(buy.maker).transfer(diff); } } /* This contract should never hold Ether, however, we cannot assert this, since it is impossible to prevent anyone from sending Ether e.g. with selfdestruct. */ return price; } function canSettleOrder(uint listingTime, uint expirationTime) view internal returns (bool) { return (listingTime < block.timestamp) && (expirationTime == 0 || block.timestamp < expirationTime); } function ordersCanMatch(Order memory buy, Order memory sell) internal view returns (bool) { return ( /* Must be opposite-side. */ (buy.side == Side.Buy && sell.side == Side.Sell) && /* Must use same fee method. */ (buy.feeMethod == sell.feeMethod) && /* Must use same payment token. */ (buy.paymentToken == sell.paymentToken) && /* Must match maker/taker addresses. */ (sell.taker == address(0) || sell.taker == buy.maker) && (buy.taker == address(0) || buy.taker == sell.maker) && /* One must be maker and the other must be taker (no bool XOR in Solidity). */ ((sell.feeRecipient == address(0) && buy.feeRecipient != address(0)) || (sell.feeRecipient != address(0) && buy.feeRecipient == address(0))) && /* Must match target. */ (buy.target == sell.target) && /* Must match howToCall. */ (buy.howToCall == sell.howToCall) && /* Buy-side order must be settleable. */ canSettleOrder(buy.listingTime, buy.expirationTime) && /* Sell-side order must be settleable. */ canSettleOrder(sell.listingTime, sell.expirationTime) ); } function atomicMatch(Order memory buy, Sig memory buySig, Order memory sell, Sig memory sellSig, bytes32 metadata) internal nonReentrant { /* CHECKS */ /* Ensure buy order validity and calculate hash if necessary. */ bytes32 buyHash; if (buy.maker == msg.sender) { require(validateOrderParameters(buy)); } else { buyHash = requireValidOrder(buy, buySig); } /* Ensure sell order validity and calculate hash if necessary. */ bytes32 sellHash; if (sell.maker == msg.sender) { require(validateOrderParameters(sell)); } else { sellHash = requireValidOrder(sell, sellSig); } /* Must be matchable. */ require(ordersCanMatch(buy, sell)); /* Target must exist (prevent malicious selfdestructs just prior to order settlement). */ uint size; address target = sell.target; assembly { size := extcodesize(target) } require(size > 0); /* Must match calldata after replacement, if specified. */ if (buy.replacementPattern.length > 0) { ArrayUtils.guardedArrayReplace(buy.targetdata, sell.targetdata, buy.replacementPattern); } if (sell.replacementPattern.length > 0) { ArrayUtils.guardedArrayReplace(sell.targetdata, buy.targetdata, sell.replacementPattern); } require(ArrayUtils.arrayEq(buy.targetdata, sell.targetdata)); /* Retrieve delegateProxy contract. */ IProxyImplementation delegateProxy = proxyFactory.proxies(sell.maker); /* Proxy must exist. */ require(address(delegateProxy) != address(0)); /* Assert implementation. */ require(IOwnableDelegateProxy(address(delegateProxy)).implementation() == address(proxyFactory.proxyImplementation())); /* Access the passthrough ProxyImplementation. */ IProxyImplementation proxy = IProxyImplementation(address(delegateProxy)); /* EFFECTS */ /* Mark previously signed or approved orders as finalized. */ if (msg.sender != buy.maker) { cancelledOrFinalized[buyHash] = true; } if (msg.sender != sell.maker) { cancelledOrFinalized[sellHash] = true; } /* INTERACTIONS */ /* Execute funds transfer and pay fees. */ uint price = executeFundsTransfer(buy, sell); /* Execute specified call through proxy. */ require(proxy.proxy(sell.target, sell.howToCall, sell.targetdata)); /* Static calls are intentionally done after the effectful call so they can check resulting state. */ /* Handle buy-side static call if specified. */ if (buy.staticTarget != address(0)) { require(staticCall(buy.staticTarget, sell.targetdata, buy.staticExtradata)); } /* Handle sell-side static call if specified. */ if (sell.staticTarget != address(0)) { require(staticCall(sell.staticTarget, sell.targetdata, sell.staticExtradata)); } /* Log match event. */ emit OrdersMatched(buyHash, sellHash, sell.feeRecipient != address(0) ? sell.maker : buy.maker, sell.feeRecipient != address(0) ? buy.maker : sell.maker, price, metadata); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.8.4; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; interface ITokenTransferProxy { function transferFrom(IERC20 _token, address _from, address _to, uint _amount) external returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity >=0.8.4; import "hardhat/console.sol"; library ArrayUtils { /* * Replace bytes in an array with bytes in another array, guarded by a bitmask * Efficiency of this function is a bit unpredictable because of the EVM's word-specific model (arrays under 32 bytes will be slower) * * @dev Mask must be the size of the byte array. A nonzero byte means the byte array can be changed. * @param array The original array * @param desired The target array * @param mask The mask specifying which bits can be changed * @return The updated byte array (the parameter will be modified inplace) */ function guardedArrayReplace(bytes memory array, bytes memory desired, bytes memory mask) internal pure { require(array.length == desired.length); require(array.length == mask.length); uint words = array.length / 0x20; uint index = words * 0x20; assert(index / 0x20 == words); uint i; for (i = 0; i < words; i++) { /* Conceptually: array[i] = (!mask[i] && array[i]) || (mask[i] && desired[i]), bitwise in word chunks. */ assembly { let commonIndex := mul(0x20, add(1, i)) let maskValue := mload(add(mask, commonIndex)) mstore(add(array, commonIndex), or(and(not(maskValue), mload(add(array, commonIndex))), and(maskValue, mload(add(desired, commonIndex))))) } } /* Deal with the last section of the byte array. */ if (words > 0) { /* This overlaps with bytes already set but is still more efficient than iterating through each of the remaining bytes individually. */ i = words; assembly { let commonIndex := mul(0x20, add(1, i)) let maskValue := mload(add(mask, commonIndex)) mstore(add(array, commonIndex), or(and(not(maskValue), mload(add(array, commonIndex))), and(maskValue, mload(add(desired, commonIndex))))) } } else { /* If the byte array is shorter than a word, we must unfortunately do the whole thing bytewise. (bounds checks could still probably be optimized away in assembly, but this is a rare case) */ for (i = index; i < array.length; i++) { array[i] = ((mask[i] ^ 0xff) & array[i]) | (mask[i] & desired[i]); } } } /* * Test if two arrays are equal * Source: https://github.com/GNSPS/solidity-bytes-utils/blob/master/contracts/BytesLib.sol * * @dev Arrays must be of equal length, otherwise will return false * @param a First array * @param b Second array * @return Whether or not all bytes in the arrays are equal */ function arrayEq(bytes memory a, bytes memory b) internal pure returns (bool) { bool success = true; assembly { let length := mload(a) // if lengths don't match the arrays are not equal switch eq(length, mload(b)) case 1 { // cb is a circuit breaker in the for loop since there's // no said feature for inline assembly loops // cb = 1 - don't breaker // cb = 0 - break let cb := 1 let mc := add(a, 0x20) let end := add(mc, length) for { let cc := add(b, 0x20) // the next line is the loop condition: // while(uint(mc < end) + cb == 2) } eq(add(lt(mc, end), cb), 2) { mc := add(mc, 0x20) cc := add(cc, 0x20) } { // if any of these checks fails then arrays are not equal if iszero(eq(mload(mc), mload(cc))) { // unsuccess: success := 0 cb := 0 } } } default { // unsuccess: success := 0 } } return success; } /* * Unsafe write byte array into a memory location * * @param index Memory location * @param source Byte array to write * @return End memory index */ function unsafeWriteBytes(uint index, bytes memory source) internal pure returns (uint) { if (source.length > 0) { assembly { let length := mload(source) let end := add(source, add(0x20, length)) let arrIndex := add(source, 0x20) let tempIndex := index for { } eq(lt(arrIndex, end), 1) { arrIndex := add(arrIndex, 0x20) tempIndex := add(tempIndex, 0x20) } { mstore(tempIndex, mload(arrIndex)) } index := add(index, length) } } return index; } /* * Unsafe write address into a memory location * * @param index Memory location * @param source Address to write * @return End memory index */ function unsafeWriteAddress(uint index, address source) internal pure returns (uint) { uint conv = uint(uint160(source)) << 0x60; assembly { mstore(index, conv) index := add(index, 0x14) } return index; } /* * Unsafe write uint into a memory location * * @param index Memory location * @param source uint to write * @return End memory index */ function unsafeWriteUint(uint index, uint source) internal pure returns (uint) { assembly { mstore(index, source) index := add(index, 0x20) } return index; } /* * Unsafe write uint8 into a memory location * * @param index Memory location * @param source uint8 to write * @return End memory index */ function unsafeWriteUint8(uint index, uint8 source) internal pure returns (uint) { assembly { mstore8(index, source) index := add(index, 0x1) } return index; } } contract ReentrancyGuarded { bool reentrancyLock = false; /* Prevent a contract function from being reentrant-called. */ modifier reentrancyGuard { if (reentrancyLock) { revert(); } reentrancyLock = true; _; reentrancyLock = false; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.8.4; import "./ExchangeCore.sol"; contract ExchangeView is ExchangeCore { address public exchange; constructor(address _exchange) { exchange = _exchange; } function validateOrderParametersView(Order memory order) internal view returns (bool) { /* Order must be targeted at this protocol version (this Exchange contract). */ if (order.exchange != exchange) { return false; } /* Order must possess valid sale kind parameter combination. */ if (!validateParameters(order.saleKind, order.expirationTime)) { return false; } /* If using the split fee method, order must have sufficient protocol fees. */ if (order.feeMethod == FeeMethod.SplitFee && (order.makerProtocolFee < minimumMakerProtocolFee || order.takerProtocolFee < minimumTakerProtocolFee)) { return false; } return true; } function validateOrderView(bytes32 hash, Order memory order, Sig memory sig) internal view returns (bool) { /* Not done in an if-conditional to prevent unnecessary ecrecover evaluation, which seems to happen even though it should short-circuit. */ /* Order must have valid parameters. */ if (!validateOrderParametersView(order)) { return false; } /* Order must have not been canceled or already filled. */ if (ExchangeCore(exchange).cancelledOrFinalized(hash)) { return false; } /* Order authentication. Order must be either: /* (a) previously approved */ if (ExchangeCore(exchange).approvedOrders(hash)) { return true; } /* or (b) ECDSA-signed by maker. */ if (ecrecover(hash, sig.v, sig.r, sig.s) == order.maker) { return true; } return false; } function guardedArrayReplace(bytes memory data, bytes memory desired, bytes memory mask) external pure returns (bytes memory) { ArrayUtils.guardedArrayReplace(data, desired, mask); return data; } function testCopy(bytes memory arrToCopy) external pure returns (bytes memory) { bytes memory arr = new bytes(arrToCopy.length); uint index; assembly { index := add(arr, 0x20) } ArrayUtils.unsafeWriteBytes(index, arrToCopy); return arr; } function testCopyAddress(address addr) external pure returns (bytes memory) { bytes memory arr = new bytes(0x14); uint index; assembly { index := add(arr, 0x20) } ArrayUtils.unsafeWriteAddress(index, addr); return arr; } function getCalculateFinalPrice(Side side, SaleKind saleKind, uint basePrice, uint extra, uint listingTime, uint expirationTime) external view returns (uint) { return calculateFinalPrice(side, saleKind, basePrice, extra, listingTime, expirationTime); } function hashOrder_( address[7] memory addrs, uint[9] memory uints, FeeMethod feeMethod, Side side, SaleKind saleKind, IProxyImplementation.HowToCall howToCall, bytes memory data, bytes memory replacementPattern, bytes memory staticExtradata) public pure returns (bytes32) { return hashOrder( Order(addrs[0], addrs[1], addrs[2], uints[0], uints[1], uints[2], uints[3], addrs[3], feeMethod, side, saleKind, addrs[4], howToCall, data, replacementPattern, addrs[5], staticExtradata, IERC20(addrs[6]), uints[4], uints[5], uints[6], uints[7], uints[8]) ); } function hashToSign_( address[7] memory addrs, uint[9] memory uints, FeeMethod feeMethod, Side side, SaleKind saleKind, IProxyImplementation.HowToCall howToCall, bytes memory data, bytes memory replacementPattern, bytes memory staticExtradata) public pure returns (bytes32) { return hashToSign( Order(addrs[0], addrs[1], addrs[2], uints[0], uints[1], uints[2], uints[3], addrs[3], feeMethod, side, saleKind, addrs[4], howToCall, data, replacementPattern, addrs[5], staticExtradata, IERC20(addrs[6]), uints[4], uints[5], uints[6], uints[7], uints[8]) ); } function validateOrderParameters_ ( address[7] memory addrs, uint[9] memory uints, FeeMethod feeMethod, Side side, SaleKind saleKind, IProxyImplementation.HowToCall howToCall, bytes memory data, bytes memory replacementPattern, bytes memory staticExtradata) view public returns (bool) { Order memory order = Order(addrs[0], addrs[1], addrs[2], uints[0], uints[1], uints[2], uints[3], addrs[3], feeMethod, side, saleKind, addrs[4], howToCall, data, replacementPattern, addrs[5], staticExtradata, IERC20(addrs[6]), uints[4], uints[5], uints[6], uints[7], uints[8]); return validateOrderParameters( order ); } function validateOrder_ ( address[7] memory addrs, uint[9] memory uints, FeeMethod feeMethod, Side side, SaleKind saleKind, IProxyImplementation.HowToCall howToCall, bytes memory data, bytes memory replacementPattern, bytes memory staticExtradata, uint8 v, bytes32 r, bytes32 s) view public returns (bool) { Order memory order = Order(addrs[0], addrs[1], addrs[2], uints[0], uints[1], uints[2], uints[3], addrs[3], feeMethod, side, saleKind, addrs[4], howToCall, data, replacementPattern, addrs[5], staticExtradata, IERC20(addrs[6]), uints[4], uints[5], uints[6], uints[7], uints[8]); return validateOrderView( hashToSign(order), order, Sig(v, r, s) ); } function calculateCurrentPrice_( address[7] memory addrs, uint[9] memory uints, FeeMethod feeMethod, Side side, SaleKind saleKind, IProxyImplementation.HowToCall howToCall, bytes memory data, bytes memory replacementPattern, bytes memory staticExtradata) public view returns (uint) { return calculateCurrentPrice( Order(addrs[0], addrs[1], addrs[2], uints[0], uints[1], uints[2], uints[3], addrs[3], feeMethod, side, saleKind, addrs[4], howToCall, data, replacementPattern, addrs[5], staticExtradata, IERC20(addrs[6]), uints[4], uints[5], uints[6], uints[7], uints[8]) ); } function ordersCanMatch_( address[14] memory addrs, uint[18] memory uints, uint8[8] memory feeMethodsSidesKindsHowToCalls, bytes memory calldataBuy, bytes memory calldataSell, bytes memory replacementPatternBuy, bytes memory replacementPatternSell, bytes memory staticExtradataBuy, bytes memory staticExtradataSell) public view returns (bool) { Order memory buy = Order(addrs[0], addrs[1], addrs[2], uints[0], uints[1], uints[2], uints[3], addrs[3], FeeMethod(feeMethodsSidesKindsHowToCalls[0]), Side(feeMethodsSidesKindsHowToCalls[1]), SaleKind(feeMethodsSidesKindsHowToCalls[2]), addrs[4], IProxyImplementation.HowToCall(feeMethodsSidesKindsHowToCalls[3]), calldataBuy, replacementPatternBuy, addrs[5], staticExtradataBuy, IERC20(addrs[6]), uints[4], uints[5], uints[6], uints[7], uints[8]); Order memory sell = Order(addrs[7], addrs[8], addrs[9], uints[9], uints[10], uints[11], uints[12], addrs[10], FeeMethod(feeMethodsSidesKindsHowToCalls[4]), Side(feeMethodsSidesKindsHowToCalls[5]), SaleKind(feeMethodsSidesKindsHowToCalls[6]), addrs[11], IProxyImplementation.HowToCall(feeMethodsSidesKindsHowToCalls[7]), calldataSell, replacementPatternSell, addrs[12], staticExtradataSell, IERC20(addrs[13]), uints[13], uints[14], uints[15], uints[16], uints[17]); return ordersCanMatch( buy, sell ); } function orderCalldataCanMatch(bytes memory buyCalldata, bytes memory buyReplacementPattern, bytes memory sellCalldata, bytes memory sellReplacementPattern) public pure returns (bool) { if (buyReplacementPattern.length > 0) { ArrayUtils.guardedArrayReplace(buyCalldata, sellCalldata, buyReplacementPattern); } if (sellReplacementPattern.length > 0) { ArrayUtils.guardedArrayReplace(sellCalldata, buyCalldata, sellReplacementPattern); } return ArrayUtils.arrayEq(buyCalldata, sellCalldata); } function calculateMatchPrice_( address[14] memory addrs, uint[18] memory uints, uint8[8] memory feeMethodsSidesKindsHowToCalls, bytes memory calldataBuy, bytes memory calldataSell, bytes memory replacementPatternBuy, bytes memory replacementPatternSell, bytes memory staticExtradataBuy, bytes memory staticExtradataSell) public view returns (uint) { Order memory buy = Order(addrs[0], addrs[1], addrs[2], uints[0], uints[1], uints[2], uints[3], addrs[3], FeeMethod(feeMethodsSidesKindsHowToCalls[0]), Side(feeMethodsSidesKindsHowToCalls[1]), SaleKind(feeMethodsSidesKindsHowToCalls[2]), addrs[4], IProxyImplementation.HowToCall(feeMethodsSidesKindsHowToCalls[3]), calldataBuy, replacementPatternBuy, addrs[5], staticExtradataBuy, IERC20(addrs[6]), uints[4], uints[5], uints[6], uints[7], uints[8]); Order memory sell = Order(addrs[7], addrs[8], addrs[9], uints[9], uints[10], uints[11], uints[12], addrs[10], FeeMethod(feeMethodsSidesKindsHowToCalls[4]), Side(feeMethodsSidesKindsHowToCalls[5]), SaleKind(feeMethodsSidesKindsHowToCalls[6]), addrs[11], IProxyImplementation.HowToCall(feeMethodsSidesKindsHowToCalls[7]), calldataSell, replacementPatternSell, addrs[12], staticExtradataSell, IERC20(addrs[13]), uints[13], uints[14], uints[15], uints[16], uints[17]); return calculateMatchPrice( buy, sell ); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.8.4; import "../interfaces/IProxyImplementation.sol"; import "../interfaces/ITokenTransferProxy.sol"; import "./ExchangeCore.sol"; import "hardhat/console.sol"; contract Exchange is ExchangeCore { constructor(IProxyFactory _proxyFactory, ITokenTransferProxy _tokenTransferProxy, IERC20 _exchangeToken, address _protocolFeeRecipient) { proxyFactory = _proxyFactory; tokenTransferProxy = _tokenTransferProxy; exchangeToken = _exchangeToken; protocolFeeRecipient = _protocolFeeRecipient; } function approveOrder_ ( address[7] memory addrs, uint[9] memory uints, FeeMethod feeMethod, Side side, SaleKind saleKind, IProxyImplementation.HowToCall howToCall, bytes memory targetdata, bytes memory replacementPattern, bytes memory staticExtradata, bool orderbookInclusionDesired) external { Order memory order = Order(addrs[0], addrs[1], addrs[2], uints[0], uints[1], uints[2], uints[3], addrs[3], feeMethod, side, saleKind, addrs[4], howToCall, targetdata, replacementPattern, addrs[5], staticExtradata, IERC20(addrs[6]), uints[4], uints[5], uints[6], uints[7], uints[8]); return approveOrder(order, orderbookInclusionDesired); } function cancelOrder_( address[7] memory addrs, uint[9] memory uints, FeeMethod feeMethod, Side side, SaleKind saleKind, IProxyImplementation.HowToCall howToCall, bytes memory targetdata, bytes memory replacementPattern, bytes memory staticExtradata, uint8 v, bytes32 r, bytes32 s) external { return cancelOrder( Order(addrs[0], addrs[1], addrs[2], uints[0], uints[1], uints[2], uints[3], addrs[3], feeMethod, side, saleKind, addrs[4], howToCall, targetdata, replacementPattern, addrs[5], staticExtradata, IERC20(addrs[6]), uints[4], uints[5], uints[6], uints[7], uints[8]), Sig(v, r, s) ); } function atomicMatch_( address[14] memory addrs, uint[18] memory uints, uint8[8] memory feeMethodsSidesKindsHowToCalls, bytes memory calldataBuy, bytes memory calldataSell, bytes memory replacementPatternBuy, bytes memory replacementPatternSell, bytes memory staticExtradataBuy, bytes memory staticExtradataSell, uint8[2] memory vs, bytes32[5] memory rssMetadata) external payable { return atomicMatch( Order(addrs[0], addrs[1], addrs[2], uints[0], uints[1], uints[2], uints[3], addrs[3], FeeMethod(feeMethodsSidesKindsHowToCalls[0]), Side(feeMethodsSidesKindsHowToCalls[1]), SaleKind(feeMethodsSidesKindsHowToCalls[2]), addrs[4], IProxyImplementation.HowToCall(feeMethodsSidesKindsHowToCalls[3]), calldataBuy, replacementPatternBuy, addrs[5], staticExtradataBuy, IERC20(addrs[6]), uints[4], uints[5], uints[6], uints[7], uints[8]), Sig(vs[0], rssMetadata[0], rssMetadata[1]), Order(addrs[7], addrs[8], addrs[9], uints[9], uints[10], uints[11], uints[12], addrs[10], FeeMethod(feeMethodsSidesKindsHowToCalls[4]), Side(feeMethodsSidesKindsHowToCalls[5]), SaleKind(feeMethodsSidesKindsHowToCalls[6]), addrs[11], IProxyImplementation.HowToCall(feeMethodsSidesKindsHowToCalls[7]), calldataSell, replacementPatternSell, addrs[12], staticExtradataSell, IERC20(addrs[13]), uints[13], uints[14], uints[15], uints[16], uints[17]), Sig(vs[1], rssMetadata[2], rssMetadata[3]), rssMetadata[4] ); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.8.4; import '@openzeppelin/contracts/token/ERC20/extensions/ERC20Capped.sol'; import '../core/SafeOwnable.sol'; contract PuffGo is ERC20Capped, SafeOwnable { event MinterChanged(address indexed minter, uint maxAmount); uint256 public constant MAX_SUPPLY = 10 * 10 ** 8 * 10 ** 18; mapping(address => uint) public minters; constructor() ERC20Capped(MAX_SUPPLY) ERC20("Puffverse Governance Token", "PGT") { } function addMinter(address _minter, uint _maxAmount) public onlyOwner { require(_minter != address(0), "illegal minter"); require(minters[_minter] == 0, "already minter"); minters[_minter] = _maxAmount; emit MinterChanged(_minter, _maxAmount); } function delMinter(address _minter) public onlyOwner { require(_minter != address(0), "illegal minter"); require(minters[_minter] > 0, "not minter"); delete minters[_minter]; emit MinterChanged(_minter, 0); } modifier onlyMinter(uint _amount) { require(minters[msg.sender] >= _amount, "caller is not minter or not enough"); _; } function mint(address to, uint256 amount) external onlyMinter(amount) returns (uint) { if (amount > MAX_SUPPLY - totalSupply()) { return 0; } if (minters[msg.sender] < amount) { amount = minters[msg.sender]; } minters[msg.sender] = minters[msg.sender] - amount; _mint(to, amount); return amount; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.8.4; import '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol'; import '@openzeppelin/contracts/token/ERC20/ERC20.sol'; import '../interfaces/IMintableERC721.sol'; import '../interfaces/IBurnableERC721.sol'; import '../core/SafeOwnable.sol'; import '../core/Verifier.sol'; contract Evolution is SafeOwnable, Verifier { event NewEvolutionDirection(IBurnableERC721 burnNFT, IERC721 evolutionNFT, bool avaliable); event Evoluted(address user, IBurnableERC721 burnNFT, uint burnNftId, IERC721 evolutionNFT, uint evolutionNftId); //burn nft => evolution nft => true mapping(IBurnableERC721 => mapping(IERC721 => bool)) public evolutionDirection; constructor(IBurnableERC721[] memory _burnNFTs, IERC721[] memory _evolutionNFTs, address _verifier) Verifier(_verifier) { require(_burnNFTs.length == _evolutionNFTs.length, "illegal nfts"); for (uint i = 0; i < _burnNFTs.length; i ++) { require(address(_burnNFTs[i]) != address(0) && address(_evolutionNFTs[i]) != address(0), "zero address"); require(!evolutionDirection[_burnNFTs[i]][_evolutionNFTs[i]], "direction already exist"); evolutionDirection[_burnNFTs[i]][_evolutionNFTs[i]] = true; emit NewEvolutionDirection(_burnNFTs[i], _evolutionNFTs[i], true); } } function addEvolutionDirection(IBurnableERC721 _burnNFT, IERC721 _evolutionNFT) external onlyOwner { require(address(_burnNFT) != address(0) && address(_evolutionNFT) != address(0), "zero address"); require(!evolutionDirection[_burnNFT][_evolutionNFT], "already exist"); evolutionDirection[_burnNFT][_evolutionNFT] = true; emit NewEvolutionDirection(_burnNFT, _evolutionNFT, true); } function delEvolutionDirection(IBurnableERC721 _burnNFT, IERC721 _evolutionNFT) external onlyOwner { require(evolutionDirection[_burnNFT][_evolutionNFT], "not exist"); delete evolutionDirection[_burnNFT][_evolutionNFT]; emit NewEvolutionDirection(_burnNFT, _evolutionNFT, false); } function evolution(IBurnableERC721 _burnNFT, uint _burnNftId, IERC721 _evolutionNFT, uint _evolutionNftId, uint8 _v, bytes32 _r, bytes32 _s) external { require( ecrecover(keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", keccak256(abi.encodePacked(address(this), msg.sender, _burnNFT, _burnNftId, _evolutionNFT , _evolutionNftId)))), _v, _r, _s) == verifier, "verify failed" ); require(evolutionDirection[_burnNFT][_evolutionNFT], "direction not exist"); require(_evolutionNFT.ownerOf(_evolutionNftId) == msg.sender, "illegal owner"); _burnNFT.burn(msg.sender, _burnNftId); emit Evoluted(msg.sender, _burnNFT, _burnNftId, _evolutionNFT, _evolutionNftId); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.8.4; import '@openzeppelin/contracts/token/ERC721/IERC721.sol'; import './IERC721Core.sol'; interface IMintableERC721 is IERC721Core { function mint(address _to, uint _num) external; }
// SPDX-License-Identifier: MIT pragma solidity >=0.8.4; import '@openzeppelin/contracts/token/ERC721/IERC721.sol'; import './IERC721Core.sol'; interface IBurnableERC721 is IERC721Core { function burn(address _to, uint _id) external; }
// SPDX-License-Identifier: MIT pragma solidity >=0.8.4; import './SafeOwnableInterface.sol'; abstract contract Verifier is SafeOwnableInterface { event VerifierChanged(address oldVerifier, address newVerifier); address public verifier; constructor(address _verifier) { require(_verifier != address(0), "illegal verifier"); verifier = _verifier; emit VerifierChanged(address(0), _verifier); } function setVerifier(address _verifier) external onlyOwner { require(_verifier != address(0), "illegal verifier"); emit VerifierChanged(verifier, _verifier); verifier = _verifier; } }
// 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); }
// SPDX-License-Identifier: MIT pragma solidity >=0.8.4; import '@openzeppelin/contracts/token/ERC721/IERC721.sol'; interface IERC721Core is IERC721 { function totalSupply() external returns (uint); }
// SPDX-License-Identifier: MIT pragma solidity >=0.8.4; import '../interfaces/IMintableERC721.sol'; import '../core/SafeOwnable.sol'; import '../core/Verifier.sol'; contract FreeMint is SafeOwnable, Verifier { IMintableERC721 public immutable nft; uint public immutable startAt; uint public immutable finishAt; mapping(address => uint) public userMintNum; uint public totalMintNum; constructor(IMintableERC721 _nft, uint _startAt, uint _finishAt, address _verifier) Verifier(_verifier) { require(address(_nft) != address(0), "illegal nft"); nft = _nft; require(_startAt > block.timestamp && _finishAt > _startAt, "illegal time"); startAt = _startAt; finishAt = _finishAt; } modifier AlreadyBegin() { require(block.timestamp >= startAt, "not begin"); _; } modifier NotFinish() { require(block.timestamp <= finishAt, "already finish"); _; } function mint(uint _num, uint _userNum, uint _totalNum, uint8 _v, bytes32 _r, bytes32 _s) external AlreadyBegin NotFinish { require( ecrecover(keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", keccak256(abi.encodePacked(address(this), msg.sender, _userNum, _totalNum)))), _v, _r, _s) == verifier, "verify failed" ); require(_num + userMintNum[msg.sender] <= _userNum && totalMintNum + _num <= _totalNum, "free mint already full"); nft.mint(msg.sender, _num); userMintNum[msg.sender] += _num; totalMintNum += _num; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.8.4; import '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol'; import '../interfaces/IMintableERC721.sol'; import '../core/SafeOwnable.sol'; contract CostMint is SafeOwnable { using SafeERC20 for IERC20; event ReceiverChanged(address oldReceiver, address newReceiver); event TokenPriceChanged(IERC20 token, uint price, bool avaliable); address immutable public WETH; IMintableERC721 public immutable nft; uint public immutable startAt; uint public immutable finishAt; uint public immutable maxNum; uint public immutable userLimit; mapping(IERC20 => bool) supportTokens; mapping(IERC20 => uint) tokensPrice; address payable public receiver; uint public sellNum; mapping(address => uint) public buyNum; constructor( address _WETH, IMintableERC721 _nft, uint _startAt, uint _finishAt, uint _maxNum, uint _userLimit, IERC20[] memory _tokens, uint[] memory _prices, address payable _receiver ) { require(_WETH != address(0), "illegal WETH"); WETH = _WETH; require(address(_nft) != address(0), "illegal nft"); nft = _nft; require(_startAt > block.timestamp && _finishAt > _startAt, "illegal time"); startAt = _startAt; finishAt = _finishAt; require(_userLimit > 0 && _maxNum > _userLimit, "illegal num"); maxNum = _maxNum; userLimit = _userLimit; require(_tokens.length == _prices.length && _tokens.length > 0, "illegal length"); for (uint i = 0; i < _tokens.length; i ++) { require(address(_tokens[i]) != address(0) && !supportTokens[_tokens[i]], "illegal token"); supportTokens[_tokens[i]] = true; tokensPrice[_tokens[i]] = _prices[i]; emit TokenPriceChanged(_tokens[i], _prices[i], true); } require(_receiver != address(0), "illegal receiver"); receiver = _receiver; emit ReceiverChanged(address(0), _receiver); } function addSupportToken(IERC20 _token, uint _price) external onlyOwner { require(address(_token) != address(0) && !supportTokens[_token], "illegal token"); supportTokens[_token] = true; tokensPrice[_token] = _price; emit TokenPriceChanged(_token, _price, true); } function setSupportToken(IERC20 _token, uint _price) external onlyOwner { require(supportTokens[_token], "token not exist"); tokensPrice[_token] = _price; emit TokenPriceChanged(_token, _price, true); } function delSupportToken(IERC20 _token) external onlyOwner { require(supportTokens[_token], "token not exist"); delete supportTokens[_token]; delete tokensPrice[_token]; emit TokenPriceChanged(_token, 0, false); } function setReceiver(address payable _receiver) external onlyOwner { require(_receiver != address(0), "illegal receiver"); emit ReceiverChanged(receiver, _receiver); receiver = _receiver; } modifier AlreadyBegin() { require(block.timestamp >= startAt, "not begin"); _; } modifier NotFinish() { require(block.timestamp <= finishAt, "already finish"); _; } modifier TokenSupport(IERC20 _token) { require(supportTokens[_token], "token not support"); _; } modifier Enough(uint _num) { require(sellNum + _num <= maxNum, "already full"); require(buyNum[msg.sender] + _num <= userLimit, "already limit"); _; } function buy(IERC20 _payToken, uint _num) external payable AlreadyBegin NotFinish TokenSupport(_payToken) Enough(_num) { unchecked { uint cost = _num * tokensPrice[_payToken]; if (cost > 0) { if (address(_payToken) == WETH) { require(msg.value == cost, "illegal payment"); receiver.transfer(msg.value); } else { _payToken.safeTransferFrom(msg.sender, receiver, cost); } } nft.mint(msg.sender, _num); sellNum += _num; buyNum[msg.sender] += _num; } } }
// SPDX-License-Identifier: MIT pragma solidity >=0.8.4; import '../interfaces/IMintableERC721.sol'; import '../core/SafeOwnable.sol'; import '../core/Verifier.sol'; contract ClassicClaim is SafeOwnable, Verifier { event Claim(uint nonce, address user, uint nftId); IMintableERC721 public immutable nft; uint public immutable startAt; uint public immutable finishAt; mapping(uint => bool) public nonces; uint public totalMintNum; constructor(IMintableERC721 _nft, uint _startAt, uint _finishAt, address _verifier) Verifier(_verifier) { require(address(_nft) != address(0), "illegal nft"); nft = _nft; require(_startAt > block.timestamp && _finishAt > _startAt, "illegal time"); startAt = _startAt; finishAt = _finishAt; } modifier AlreadyBegin() { require(block.timestamp >= startAt, "not begin"); _; } modifier NotFinish() { require(block.timestamp <= finishAt, "already finish"); _; } function mint(uint _nonce, uint _num, uint8 _v, bytes32 _r, bytes32 _s) external AlreadyBegin NotFinish { require(_num > 0 && !nonces[_nonce], "nonce already used"); require( ecrecover(keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", keccak256(abi.encodePacked(address(this), _nonce, msg.sender, _num)))), _v, _r, _s) == verifier, "verify failed" ); nft.mint(msg.sender, _num); uint lastTokenId = nft.totalSupply(); for (uint i = 0; i < _num; i ++) { emit Claim(_nonce, msg.sender, lastTokenId - i); } nonces[_nonce] = true; totalMintNum += _num; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.8.4; import './IMintableERC721.sol'; import './IBurnableERC721.sol'; interface IMintableBurnableERC721 is IMintableERC721, IBurnableERC721 { }
// SPDX-License-Identifier: MIT pragma solidity >=0.8.4; import './SafeOwnableInterface.sol'; abstract contract Mintable is SafeOwnableInterface { event MinterChanged(address minter, bool available); event MinterLocked(); mapping(address => bool) public minters; bool public minterLocked; constructor(address[] memory _minters, bool _minterLocked) { for (uint i = 0; i < _minters.length; i ++) { require(_minters[i] != address(0), "illegal minter"); minters[_minters[i]] = true; emit MinterChanged(_minters[i], true); } if (_minterLocked) { require(_minters.length > 0, "no minter avaliable"); emit MinterLocked(); } minterLocked = _minterLocked; } modifier MinterNotLocked { require(!minterLocked, "minter locked"); _; } function addMinter(address _minter) external onlyOwner MinterNotLocked { require(!minters[_minter], "already minter"); minters[_minter] = true; emit MinterChanged(_minter, true); } function delMinter(address _minter) external onlyOwner MinterNotLocked { require(minters[_minter], "not a minter"); delete minters[_minter]; emit MinterChanged(_minter, false); } function minterLock() external onlyOwner MinterNotLocked { minterLocked = true; emit MinterLocked(); } modifier onlyMinter() { require(minters[msg.sender], "only minter can do this"); _; } modifier onlyMinterSignature(bytes32 _hash, uint8 _v, bytes32 _r, bytes32 _s) { address verifier = ecrecover(keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", _hash)), _v, _r, _s); require(minters[verifier], "minter verify failed"); _; } modifier onlyMinterOrMinterSignature(bytes32 _hash, uint8 _v, bytes32 _r, bytes32 _s) { if (!minters[msg.sender]) { address verifier = ecrecover(keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", _hash)), _v, _r, _s); require(minters[verifier], "minter verify failed"); } _; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.8.4; import './SafeOwnableInterface.sol'; abstract contract Burnable is SafeOwnableInterface { event BurnerChanged(address burner, bool available); event BurnerLocked(); mapping(address => bool) public burners; bool public burnerLocked; constructor(address[] memory _burners, bool _burnerLocked) { for (uint i = 0; i < _burners.length; i ++) { require(_burners[i] != address(0), "illegal burner"); burners[_burners[i]] = true; emit BurnerChanged(_burners[i], true); } if (_burnerLocked) { require(_burners.length > 0, "no burner avaliable"); emit BurnerLocked(); } burnerLocked = _burnerLocked; } modifier BurnerNotLocked { require(!burnerLocked, "minter locked"); _; } function addBurner(address _burner) external onlyOwner BurnerNotLocked { require(!burners[_burner], "already burner"); burners[_burner] = true; emit BurnerChanged(_burner, true); } function delBurner(address _burner) external onlyOwner BurnerNotLocked { require(burners[_burner], "not a burner"); delete burners[_burner]; emit BurnerChanged(_burner, false); } function burnerLock() external onlyOwner BurnerNotLocked { burnerLocked = true; emit BurnerLocked(); } modifier onlyBurner() { require(burners[msg.sender], "only burner can do this"); _; } modifier onlyBurnerSignature(bytes32 _hash, uint8 _v, bytes32 _r, bytes32 _s) { address verifier = ecrecover(keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", _hash)), _v, _r, _s); require(burners[verifier], "burner verify failed"); _; } modifier onlyBurnerOrBurnerSignature(bytes32 _hash, uint8 _v, bytes32 _r, bytes32 _s) { if (!burners[msg.sender]) { address verifier = ecrecover(keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", _hash)), _v, _r, _s); require(burners[verifier], "burner verify failed"); } _; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.8.4; import '@openzeppelin/contracts/token/ERC721/ERC721.sol'; import '../interfaces/IERC721Core.sol'; import './SafeOwnableInterface.sol'; abstract contract NFTCore is ERC721, IERC721Core, SafeOwnableInterface { uint public immutable MAX_SUPPLY; string internal baseURI; uint public override totalSupply; constructor(string memory _name, string memory _symbol, string memory _uri, uint _maxSupply) ERC721(_name, _symbol) { baseURI = _uri; MAX_SUPPLY = _maxSupply; } function _baseURI() internal view virtual override(ERC721) returns (string memory) { return baseURI; } function setBaseURI(string memory _newBaseURI) external onlyOwner { baseURI = _newBaseURI; } function mintInternal(address _to, uint _num) internal { uint mTotalSupply = totalSupply; require(_num > 0 && mTotalSupply + _num <= MAX_SUPPLY, "already full"); unchecked { for (uint i = 0; i < _num; i ++) { _mint(_to, mTotalSupply + 1 + i); } totalSupply += _num; } } function burnInternal(address _user, uint256 _tokenId) internal { require(ownerOf(_tokenId) == _user, "illegal owner"); require(_isApprovedOrOwner(msg.sender, _tokenId), "caller is not owner nor approved"); _burn(_tokenId); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/ERC721.sol) pragma solidity ^0.8.0; import "./IERC721.sol"; import "./IERC721Receiver.sol"; import "./extensions/IERC721Metadata.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/Strings.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: balance query for the zero address"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: owner query for nonexistent token"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overridden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { require(_exists(tokenId), "ERC721: approved query for nonexistent token"); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _safeTransfer(from, to, tokenId, _data); } /** * @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. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { require(_exists(tokenId), "ERC721: operator query for nonexistent token"); address owner = ERC721.ownerOf(tokenId); return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory _data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); _afterTokenTransfer(address(0), to, tokenId); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); _afterTokenTransfer(owner, address(0), tokenId); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _balances[from] -= 1; _balances[to] += 1; _owners[tokenId] = to; emit Transfer(from, to, tokenId); _afterTokenTransfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits a {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC721: approve to caller"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721Receiver.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// 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 pragma solidity >=0.8.4; import '../interfaces/IMintableBurnableERC721.sol'; import '../core/SafeOwnable.sol'; import '../core/Mintable.sol'; import '../core/NFTCore.sol'; contract GenesisNFT is SafeOwnable, NFTCore, Mintable { event Draw(address user, IMintableBurnableERC721 burnNFT, uint burnNftId, uint newNftId); event Reserve(address to, uint nftId); uint public constant MAX_MINT_NUM = 2200; uint public constant MAX_RESERVE_NUM = 300; IMintableBurnableERC721 public immutable ticketNFT; uint public mintedNum; uint public reservedNum; mapping(address => uint) public userReserved; constructor( string memory _name, string memory _symbol, string memory _uri, IMintableBurnableERC721 _ticketNFT ) NFTCore(_name, _symbol, _uri, MAX_MINT_NUM + MAX_RESERVE_NUM) Mintable(new address[](0), false) { require(address(_ticketNFT) != address(0), "illegal ticketNFT"); ticketNFT = _ticketNFT; } function draw(uint _luckyNftId, uint _totalNum, uint8 _v, bytes32 _r, bytes32 _s) external onlyMinterOrMinterSignature(keccak256(abi.encodePacked(address(this), msg.sender, _luckyNftId, _totalNum)), _v, _r, _s) { ticketNFT.burn(msg.sender, _luckyNftId); unchecked { require(mintedNum < MAX_MINT_NUM && mintedNum < _totalNum && _totalNum <= MAX_MINT_NUM, "mint already full"); mintInternal(msg.sender, 1); mintedNum += 1; } emit Draw(msg.sender, ticketNFT, _luckyNftId, totalSupply); } function reserve(address _to, uint _num, uint8 _v, bytes32 _r, bytes32 _s) external onlyMinterOrMinterSignature(keccak256(abi.encodePacked(address(this), _to, _num)), _v, _r, _s) { uint availableNum = _num - userReserved[_to]; unchecked { require(availableNum > 0 && reservedNum + availableNum <= MAX_RESERVE_NUM, "reserve already full"); for (uint i = 0; i < availableNum; i ++) { mintInternal(_to, 1); emit Reserve(_to, totalSupply); } reservedNum += availableNum; userReserved[_to] += availableNum; } } }
// SPDX-License-Identifier: MIT pragma solidity >=0.8.4; import '../interfaces/IMintableBurnableERC721.sol'; import '../core/SafeOwnable.sol'; import '../core/Mintable.sol'; import '../core/Burnable.sol'; import '../core/NFTCore.sol'; contract ClassicNFT is SafeOwnable, NFTCore, Mintable, Burnable, IMintableBurnableERC721 { constructor( string memory _name, string memory _symbol, string memory _uri ) NFTCore(_name, _symbol, _uri, type(uint256).max) Mintable(new address[](0), false) Burnable(new address[](0), false) { } function mint(address _to, uint _num) external override onlyMinter { mintInternal(_to, _num); } function burn(address _user, uint256 _tokenId) external override onlyBurner { burnInternal(_user, _tokenId); } }
// SPDX-License-Identifier: MIT pragma solidity >= 0.8.4; import '@openzeppelin/contracts/token/ERC20/ERC20.sol'; contract MockToken is ERC20 { uint8 tokenDecimals; constructor(string memory _name, string memory _symbol, uint8 _decimals) ERC20(_name, _symbol) { tokenDecimals = _decimals; } function mint(address _to, uint _amount) external returns (uint) { _mint(_to, _amount); return _amount; } function burn(address _to, uint _amount) external { _burn(_to, _amount); } function decimals() public view virtual override(ERC20) returns (uint8) { return tokenDecimals; } }
// SPDX-License-Identifier: MIT pragma solidity >= 0.8.4; import '@openzeppelin/contracts/token/ERC20/ERC20.sol'; import './MockToken.sol'; contract MockERC20Factory { event Deploy(string name, string symbol, uint8 decimals, MockToken token); function deploy(string memory _name, string memory _symbol, uint8 _decimals) external { MockToken token = new MockToken(_name, _symbol, _decimals); emit Deploy(_name, _symbol, _decimals, token); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.8.4; import '@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol'; interface IMintableERC20 is IERC20Metadata { function mint(address to, uint256 amount) external returns (uint); }
// SPDX-License-Identifier: MIT pragma solidity >=0.8.4; import '../interfaces/IMintableERC20.sol'; contract TokenFaucet { function mint(IMintableERC20 _token, address _to, uint _amount) external { _token.mint(_to, _amount); } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } }, "metadata": { "useLiteralContent": true } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"string","name":"_uri","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"burner","type":"address"},{"indexed":false,"internalType":"bool","name":"available","type":"bool"}],"name":"BurnerChanged","type":"event"},{"anonymous":false,"inputs":[],"name":"BurnerLocked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"minter","type":"address"},{"indexed":false,"internalType":"bool","name":"available","type":"bool"}],"name":"MinterChanged","type":"event"},{"anonymous":false,"inputs":[],"name":"MinterLocked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"acceptOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_burner","type":"address"}],"name":"addBurner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_minter","type":"address"}],"name":"addMinter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"burnerLock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"burnerLocked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"burners","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_burner","type":"address"}],"name":"delBurner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_minter","type":"address"}],"name":"delMinter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_num","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"minterLock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"minterLocked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"minters","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_newBaseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_addr","type":"address"}],"name":"setPendingOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60a06040523480156200001157600080fd5b50604051620029283803806200292883398101604081905262000034916200066f565b60408051600080825260208083018281528385019094528651929391928391889188918891613a98918591859162000071918991850190620004fc565b50805162000087906001906020840190620004fc565b5050506200009b33620004aa60201b60201c565b8151620000b0906008906020850190620004fc565b506080525060009150505b8251811015620002175760006001600160a01b0316838281518110620000e557620000e562000700565b60200260200101516001600160a01b031614156200013b5760405162461bcd60e51b815260206004820152600e60248201526d34b63632b3b0b61036b4b73a32b960911b60448201526064015b60405180910390fd5b6001600a600085848151811062000156576200015662000700565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff0219169083151502179055507f04bca3656717d14c20f88f2a0122832cb0d2807bfc66ed9e932a2202cc59f495838281518110620001cb57620001cb62000700565b60200260200101516001604051620001fa9291906001600160a01b039290921682521515602082015260400190565b60405180910390a1806200020e8162000716565b915050620000bb565b5080156200029c576000825111620002725760405162461bcd60e51b815260206004820152601360248201527f6e6f206d696e746572206176616c6961626c6500000000000000000000000000604482015260640162000132565b6040517f192417b3f16b1ce69e0c59b0376549666650245ffc05e4b2569089dda8589b6690600090a15b600b805460ff19169115159190911790555060005b8251811015620004095760006001600160a01b0316838281518110620002db57620002db62000700565b60200260200101516001600160a01b031614156200032d5760405162461bcd60e51b815260206004820152600e60248201526d34b63632b3b0b610313ab93732b960911b604482015260640162000132565b6001600c600085848151811062000348576200034862000700565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff0219169083151502179055507fded8f3f7220366eccece13d6a60b704b3b331e3182de86c678d4fe31ca25bc64838281518110620003bd57620003bd62000700565b60200260200101516001604051620003ec9291906001600160a01b039290921682521515602082015260400190565b60405180910390a180620004008162000716565b915050620002b1565b5080156200048e576000825111620004645760405162461bcd60e51b815260206004820152601360248201527f6e6f206275726e6572206176616c6961626c6500000000000000000000000000604482015260640162000132565b6040517fc313d79bf07a7bfaca95b2fc54dbef215bf6152e85ecaef8af86281ead73df2890600090a15b600d805460ff1916911515919091179055506200077d92505050565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b8280546200050a9062000740565b90600052602060002090601f0160209004810192826200052e576000855562000579565b82601f106200054957805160ff191683800117855562000579565b8280016001018555821562000579579182015b82811115620005795782518255916020019190600101906200055c565b50620005879291506200058b565b5090565b5b808211156200058757600081556001016200058c565b634e487b7160e01b600052604160045260246000fd5b600082601f830112620005ca57600080fd5b81516001600160401b0380821115620005e757620005e7620005a2565b604051601f8301601f19908116603f01168101908282118183101715620006125762000612620005a2565b816040528381526020925086838588010111156200062f57600080fd5b600091505b8382101562000653578582018301518183018401529082019062000634565b83821115620006655760008385830101525b9695505050505050565b6000806000606084860312156200068557600080fd5b83516001600160401b03808211156200069d57600080fd5b620006ab87838801620005b8565b94506020860151915080821115620006c257600080fd5b620006d087838801620005b8565b93506040860151915080821115620006e757600080fd5b50620006f686828701620005b8565b9150509250925092565b634e487b7160e01b600052603260045260246000fd5b60006000198214156200073957634e487b7160e01b600052601160045260246000fd5b5060010190565b600181811c908216806200075557607f821691505b602082108114156200077757634e487b7160e01b600052602260045260246000fd5b50919050565b608051612188620007a0600039600081816102ea015261149101526121886000f3fe608060405234801561001057600080fd5b50600436106101fb5760003560e01c80638da5cb5b1161011a578063c87b56dd116100ad578063e985e9c51161007c578063e985e9c514610431578063ebbc49651461046d578063f281256314610475578063f44637ba14610488578063f46eccc41461049b57600080fd5b8063c87b56dd146103f3578063cc54cce314610406578063e2c863c214610413578063e30c39781461042057600080fd5b80639dc29fac116100e95780639dc29fac146103a7578063a22cb465146103ba578063b88d4fde146103cd578063c42069ec146103e057600080fd5b80638da5cb5b1461037357806395d89b4114610384578063983b2d561461038c5780639adad1461461039f57600080fd5b806323b872dd1161019257806355f804b31161016157806355f804b3146103325780636352211e1461034557806370a0823114610358578063715018a61461036b57600080fd5b806323b872dd146102d257806332cb6b0c146102e557806340c10f191461030c57806342842e0e1461031f57600080fd5b8063095ea7b3116101ce578063095ea7b31461028b57806318160ddd146102a05780631ff26f32146102b757806323338b88146102bf57600080fd5b806301ffc9a71461020057806303d41e0e1461022857806306fdde031461024b578063081812fc14610260575b600080fd5b61021361020e366004611bdd565b6104be565b60405190151581526020015b60405180910390f35b610213610236366004611c16565b600c6020526000908152604090205460ff1681565b610253610510565b60405161021f9190611c89565b61027361026e366004611c9c565b6105a2565b6040516001600160a01b03909116815260200161021f565b61029e610299366004611cb5565b61063c565b005b6102a960095481565b60405190815260200161021f565b61029e610752565b61029e6102cd366004611c16565b6107e6565b61029e6102e0366004611cdf565b6108f7565b6102a97f000000000000000000000000000000000000000000000000000000000000000081565b61029e61031a366004611cb5565b610928565b61029e61032d366004611cdf565b610995565b61029e610340366004611da7565b6109b0565b610273610353366004611c9c565b6109fc565b6102a9610366366004611c16565b610a73565b61029e610afa565b6006546001600160a01b0316610273565b610253610b3f565b61029e61039a366004611c16565b610b4e565b61029e610c5f565b61029e6103b5366004611cb5565b610cf3565b61029e6103c8366004611df0565b610d5c565b61029e6103db366004611e2c565b610d67565b61029e6103ee366004611c16565b610d9f565b610253610401366004611c9c565b610dfa565b600b546102139060ff1681565b600d546102139060ff1681565b6007546001600160a01b0316610273565b61021361043f366004611ea8565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b61029e610ed5565b61029e610483366004611c16565b610f66565b61029e610496366004611c16565b611070565b6102136104a9366004611c16565b600a6020526000908152604090205460ff1681565b60006001600160e01b031982166380ac58cd60e01b14806104ef57506001600160e01b03198216635b5e139f60e01b145b8061050a57506301ffc9a760e01b6001600160e01b03198316145b92915050565b60606000805461051f90611edb565b80601f016020809104026020016040519081016040528092919081815260200182805461054b90611edb565b80156105985780601f1061056d57610100808354040283529160200191610598565b820191906000526020600020905b81548152906001019060200180831161057b57829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b03166106205760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b6000610647826109fc565b9050806001600160a01b0316836001600160a01b031614156106b55760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610617565b336001600160a01b03821614806106d157506106d1813361043f565b6107435760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610617565b61074d8383611181565b505050565b336107656006546001600160a01b031690565b6001600160a01b03161461078b5760405162461bcd60e51b815260040161061790611f16565b600d5460ff16156107ae5760405162461bcd60e51b815260040161061790611f4b565b600d805460ff191660011790556040517fc313d79bf07a7bfaca95b2fc54dbef215bf6152e85ecaef8af86281ead73df2890600090a1565b336107f96006546001600160a01b031690565b6001600160a01b03161461081f5760405162461bcd60e51b815260040161061790611f16565b600b5460ff16156108425760405162461bcd60e51b815260040161061790611f4b565b6001600160a01b0381166000908152600a602052604090205460ff166108995760405162461bcd60e51b815260206004820152600c60248201526b3737ba10309036b4b73a32b960a11b6044820152606401610617565b6001600160a01b0381166000818152600a60209081526040808320805460ff191690558051938452908301919091527f04bca3656717d14c20f88f2a0122832cb0d2807bfc66ed9e932a2202cc59f49591015b60405180910390a150565b61090133826111ef565b61091d5760405162461bcd60e51b815260040161061790611f72565b61074d8383836112e6565b336000908152600a602052604090205460ff166109875760405162461bcd60e51b815260206004820152601760248201527f6f6e6c79206d696e7465722063616e20646f20746869730000000000000000006044820152606401610617565b6109918282611482565b5050565b61074d83838360405180602001604052806000815250610d67565b336109c36006546001600160a01b031690565b6001600160a01b0316146109e95760405162461bcd60e51b815260040161061790611f16565b8051610991906008906020840190611b2b565b6000818152600260205260408120546001600160a01b03168061050a5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610617565b60006001600160a01b038216610ade5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610617565b506001600160a01b031660009081526003602052604090205490565b33610b0d6006546001600160a01b031690565b6001600160a01b031614610b335760405162461bcd60e51b815260040161061790611f16565b610b3d6000611528565b565b60606001805461051f90611edb565b33610b616006546001600160a01b031690565b6001600160a01b031614610b875760405162461bcd60e51b815260040161061790611f16565b600b5460ff1615610baa5760405162461bcd60e51b815260040161061790611f4b565b6001600160a01b0381166000908152600a602052604090205460ff1615610c045760405162461bcd60e51b815260206004820152600e60248201526d30b63932b0b23c9036b4b73a32b960911b6044820152606401610617565b6001600160a01b0381166000818152600a6020908152604091829020805460ff191660019081179091558251938452908301527f04bca3656717d14c20f88f2a0122832cb0d2807bfc66ed9e932a2202cc59f49591016108ec565b33610c726006546001600160a01b031690565b6001600160a01b031614610c985760405162461bcd60e51b815260040161061790611f16565b600b5460ff1615610cbb5760405162461bcd60e51b815260040161061790611f4b565b600b805460ff191660011790556040517f192417b3f16b1ce69e0c59b0376549666650245ffc05e4b2569089dda8589b6690600090a1565b336000908152600c602052604090205460ff16610d525760405162461bcd60e51b815260206004820152601760248201527f6f6e6c79206275726e65722063616e20646f20746869730000000000000000006044820152606401610617565b610991828261157a565b610991338383611632565b610d7133836111ef565b610d8d5760405162461bcd60e51b815260040161061790611f72565b610d9984848484611701565b50505050565b33610db26006546001600160a01b031690565b6001600160a01b031614610dd85760405162461bcd60e51b815260040161061790611f16565b600780546001600160a01b0319166001600160a01b0392909216919091179055565b6000818152600260205260409020546060906001600160a01b0316610e795760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610617565b6000610e83611734565b90506000815111610ea35760405180602001604052806000815250610ece565b80610ead84611743565b604051602001610ebe929190611fc3565b6040516020818303038152906040525b9392505050565b6007546001600160a01b03163314610f3f5760405162461bcd60e51b815260206004820152602760248201527f4f776e61626c653a2063616c6c6572206973206e6f74207468652070656e64696044820152663733a7bbb732b960c91b6064820152608401610617565b600754610f54906001600160a01b0316611528565b600780546001600160a01b0319169055565b33610f796006546001600160a01b031690565b6001600160a01b031614610f9f5760405162461bcd60e51b815260040161061790611f16565b600d5460ff1615610fc25760405162461bcd60e51b815260040161061790611f4b565b6001600160a01b0381166000908152600c602052604090205460ff166110195760405162461bcd60e51b815260206004820152600c60248201526b3737ba103090313ab93732b960a11b6044820152606401610617565b6001600160a01b0381166000818152600c60209081526040808320805460ff191690558051938452908301919091527fded8f3f7220366eccece13d6a60b704b3b331e3182de86c678d4fe31ca25bc6491016108ec565b336110836006546001600160a01b031690565b6001600160a01b0316146110a95760405162461bcd60e51b815260040161061790611f16565b600d5460ff16156110cc5760405162461bcd60e51b815260040161061790611f4b565b6001600160a01b0381166000908152600c602052604090205460ff16156111265760405162461bcd60e51b815260206004820152600e60248201526d30b63932b0b23c90313ab93732b960911b6044820152606401610617565b6001600160a01b0381166000818152600c6020908152604091829020805460ff191660019081179091558251938452908301527fded8f3f7220366eccece13d6a60b704b3b331e3182de86c678d4fe31ca25bc6491016108ec565b600081815260046020526040902080546001600160a01b0319166001600160a01b03841690811790915581906111b6826109fc565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600260205260408120546001600160a01b03166112685760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610617565b6000611273836109fc565b9050806001600160a01b0316846001600160a01b031614806112ba57506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b806112de5750836001600160a01b03166112d3846105a2565b6001600160a01b0316145b949350505050565b826001600160a01b03166112f9826109fc565b6001600160a01b03161461135d5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610617565b6001600160a01b0382166113bf5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610617565b6113ca600082611181565b6001600160a01b03831660009081526003602052604081208054600192906113f3908490612008565b90915550506001600160a01b038216600090815260036020526040812080546001929061142190849061201f565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b60095481158015906114bd57507f00000000000000000000000000000000000000000000000000000000000000006114ba838361201f565b11155b6114f85760405162461bcd60e51b815260206004820152600c60248201526b185b1c9958591e48199d5b1b60a21b6044820152606401610617565b60005b8281101561151a5761151284828460010101611841565b6001016114fb565b505060098054909101905550565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160a01b031661158d826109fc565b6001600160a01b0316146115d35760405162461bcd60e51b815260206004820152600d60248201526c34b63632b3b0b61037bbb732b960991b6044820152606401610617565b6115dd33826111ef565b6116295760405162461bcd60e51b815260206004820181905260248201527f63616c6c6572206973206e6f74206f776e6572206e6f7220617070726f7665646044820152606401610617565b61099181611983565b816001600160a01b0316836001600160a01b031614156116945760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610617565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b61170c8484846112e6565b61171884848484611a1e565b610d995760405162461bcd60e51b815260040161061790612037565b60606008805461051f90611edb565b6060816117675750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611791578061177b81612089565b915061178a9050600a836120ba565b915061176b565b60008167ffffffffffffffff8111156117ac576117ac611d1b565b6040519080825280601f01601f1916602001820160405280156117d6576020820181803683370190505b5090505b84156112de576117eb600183612008565b91506117f8600a866120ce565b61180390603061201f565b60f81b818381518110611818576118186120e2565b60200101906001600160f81b031916908160001a90535061183a600a866120ba565b94506117da565b6001600160a01b0382166118975760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610617565b6000818152600260205260409020546001600160a01b0316156118fc5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610617565b6001600160a01b038216600090815260036020526040812080546001929061192590849061201f565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b600061198e826109fc565b905061199b600083611181565b6001600160a01b03811660009081526003602052604081208054600192906119c4908490612008565b909155505060008281526002602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b60006001600160a01b0384163b15611b2057604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290611a629033908990889088906004016120f8565b602060405180830381600087803b158015611a7c57600080fd5b505af1925050508015611aac575060408051601f3d908101601f19168201909252611aa991810190612135565b60015b611b06573d808015611ada576040519150601f19603f3d011682016040523d82523d6000602084013e611adf565b606091505b508051611afe5760405162461bcd60e51b815260040161061790612037565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506112de565b506001949350505050565b828054611b3790611edb565b90600052602060002090601f016020900481019282611b595760008555611b9f565b82601f10611b7257805160ff1916838001178555611b9f565b82800160010185558215611b9f579182015b82811115611b9f578251825591602001919060010190611b84565b50611bab929150611baf565b5090565b5b80821115611bab5760008155600101611bb0565b6001600160e01b031981168114611bda57600080fd5b50565b600060208284031215611bef57600080fd5b8135610ece81611bc4565b80356001600160a01b0381168114611c1157600080fd5b919050565b600060208284031215611c2857600080fd5b610ece82611bfa565b60005b83811015611c4c578181015183820152602001611c34565b83811115610d995750506000910152565b60008151808452611c75816020860160208601611c31565b601f01601f19169290920160200192915050565b602081526000610ece6020830184611c5d565b600060208284031215611cae57600080fd5b5035919050565b60008060408385031215611cc857600080fd5b611cd183611bfa565b946020939093013593505050565b600080600060608486031215611cf457600080fd5b611cfd84611bfa565b9250611d0b60208501611bfa565b9150604084013590509250925092565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff80841115611d4c57611d4c611d1b565b604051601f8501601f19908116603f01168101908282118183101715611d7457611d74611d1b565b81604052809350858152868686011115611d8d57600080fd5b858560208301376000602087830101525050509392505050565b600060208284031215611db957600080fd5b813567ffffffffffffffff811115611dd057600080fd5b8201601f81018413611de157600080fd5b6112de84823560208401611d31565b60008060408385031215611e0357600080fd5b611e0c83611bfa565b915060208301358015158114611e2157600080fd5b809150509250929050565b60008060008060808587031215611e4257600080fd5b611e4b85611bfa565b9350611e5960208601611bfa565b925060408501359150606085013567ffffffffffffffff811115611e7c57600080fd5b8501601f81018713611e8d57600080fd5b611e9c87823560208401611d31565b91505092959194509250565b60008060408385031215611ebb57600080fd5b611ec483611bfa565b9150611ed260208401611bfa565b90509250929050565b600181811c90821680611eef57607f821691505b60208210811415611f1057634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252600d908201526c1b5a5b9d195c881b1bd8dad959609a1b604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b60008351611fd5818460208801611c31565b835190830190611fe9818360208801611c31565b01949350505050565b634e487b7160e01b600052601160045260246000fd5b60008282101561201a5761201a611ff2565b500390565b6000821982111561203257612032611ff2565b500190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b600060001982141561209d5761209d611ff2565b5060010190565b634e487b7160e01b600052601260045260246000fd5b6000826120c9576120c96120a4565b500490565b6000826120dd576120dd6120a4565b500690565b634e487b7160e01b600052603260045260246000fd5b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061212b90830184611c5d565b9695505050505050565b60006020828403121561214757600080fd5b8151610ece81611bc456fea2646970667358221220d9eb66514ef7e8b7a2c3c3e96eb7023649c318b578b58abe1bf87fd1b786f5b764736f6c63430008090033000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000000b50756666205469636b657400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000025054000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002568747470733a2f2f6170692e7075666676657273652e70726f2f6e66742f7469636b65742f000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101fb5760003560e01c80638da5cb5b1161011a578063c87b56dd116100ad578063e985e9c51161007c578063e985e9c514610431578063ebbc49651461046d578063f281256314610475578063f44637ba14610488578063f46eccc41461049b57600080fd5b8063c87b56dd146103f3578063cc54cce314610406578063e2c863c214610413578063e30c39781461042057600080fd5b80639dc29fac116100e95780639dc29fac146103a7578063a22cb465146103ba578063b88d4fde146103cd578063c42069ec146103e057600080fd5b80638da5cb5b1461037357806395d89b4114610384578063983b2d561461038c5780639adad1461461039f57600080fd5b806323b872dd1161019257806355f804b31161016157806355f804b3146103325780636352211e1461034557806370a0823114610358578063715018a61461036b57600080fd5b806323b872dd146102d257806332cb6b0c146102e557806340c10f191461030c57806342842e0e1461031f57600080fd5b8063095ea7b3116101ce578063095ea7b31461028b57806318160ddd146102a05780631ff26f32146102b757806323338b88146102bf57600080fd5b806301ffc9a71461020057806303d41e0e1461022857806306fdde031461024b578063081812fc14610260575b600080fd5b61021361020e366004611bdd565b6104be565b60405190151581526020015b60405180910390f35b610213610236366004611c16565b600c6020526000908152604090205460ff1681565b610253610510565b60405161021f9190611c89565b61027361026e366004611c9c565b6105a2565b6040516001600160a01b03909116815260200161021f565b61029e610299366004611cb5565b61063c565b005b6102a960095481565b60405190815260200161021f565b61029e610752565b61029e6102cd366004611c16565b6107e6565b61029e6102e0366004611cdf565b6108f7565b6102a97f0000000000000000000000000000000000000000000000000000000000003a9881565b61029e61031a366004611cb5565b610928565b61029e61032d366004611cdf565b610995565b61029e610340366004611da7565b6109b0565b610273610353366004611c9c565b6109fc565b6102a9610366366004611c16565b610a73565b61029e610afa565b6006546001600160a01b0316610273565b610253610b3f565b61029e61039a366004611c16565b610b4e565b61029e610c5f565b61029e6103b5366004611cb5565b610cf3565b61029e6103c8366004611df0565b610d5c565b61029e6103db366004611e2c565b610d67565b61029e6103ee366004611c16565b610d9f565b610253610401366004611c9c565b610dfa565b600b546102139060ff1681565b600d546102139060ff1681565b6007546001600160a01b0316610273565b61021361043f366004611ea8565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b61029e610ed5565b61029e610483366004611c16565b610f66565b61029e610496366004611c16565b611070565b6102136104a9366004611c16565b600a6020526000908152604090205460ff1681565b60006001600160e01b031982166380ac58cd60e01b14806104ef57506001600160e01b03198216635b5e139f60e01b145b8061050a57506301ffc9a760e01b6001600160e01b03198316145b92915050565b60606000805461051f90611edb565b80601f016020809104026020016040519081016040528092919081815260200182805461054b90611edb565b80156105985780601f1061056d57610100808354040283529160200191610598565b820191906000526020600020905b81548152906001019060200180831161057b57829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b03166106205760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b6000610647826109fc565b9050806001600160a01b0316836001600160a01b031614156106b55760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610617565b336001600160a01b03821614806106d157506106d1813361043f565b6107435760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610617565b61074d8383611181565b505050565b336107656006546001600160a01b031690565b6001600160a01b03161461078b5760405162461bcd60e51b815260040161061790611f16565b600d5460ff16156107ae5760405162461bcd60e51b815260040161061790611f4b565b600d805460ff191660011790556040517fc313d79bf07a7bfaca95b2fc54dbef215bf6152e85ecaef8af86281ead73df2890600090a1565b336107f96006546001600160a01b031690565b6001600160a01b03161461081f5760405162461bcd60e51b815260040161061790611f16565b600b5460ff16156108425760405162461bcd60e51b815260040161061790611f4b565b6001600160a01b0381166000908152600a602052604090205460ff166108995760405162461bcd60e51b815260206004820152600c60248201526b3737ba10309036b4b73a32b960a11b6044820152606401610617565b6001600160a01b0381166000818152600a60209081526040808320805460ff191690558051938452908301919091527f04bca3656717d14c20f88f2a0122832cb0d2807bfc66ed9e932a2202cc59f49591015b60405180910390a150565b61090133826111ef565b61091d5760405162461bcd60e51b815260040161061790611f72565b61074d8383836112e6565b336000908152600a602052604090205460ff166109875760405162461bcd60e51b815260206004820152601760248201527f6f6e6c79206d696e7465722063616e20646f20746869730000000000000000006044820152606401610617565b6109918282611482565b5050565b61074d83838360405180602001604052806000815250610d67565b336109c36006546001600160a01b031690565b6001600160a01b0316146109e95760405162461bcd60e51b815260040161061790611f16565b8051610991906008906020840190611b2b565b6000818152600260205260408120546001600160a01b03168061050a5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610617565b60006001600160a01b038216610ade5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610617565b506001600160a01b031660009081526003602052604090205490565b33610b0d6006546001600160a01b031690565b6001600160a01b031614610b335760405162461bcd60e51b815260040161061790611f16565b610b3d6000611528565b565b60606001805461051f90611edb565b33610b616006546001600160a01b031690565b6001600160a01b031614610b875760405162461bcd60e51b815260040161061790611f16565b600b5460ff1615610baa5760405162461bcd60e51b815260040161061790611f4b565b6001600160a01b0381166000908152600a602052604090205460ff1615610c045760405162461bcd60e51b815260206004820152600e60248201526d30b63932b0b23c9036b4b73a32b960911b6044820152606401610617565b6001600160a01b0381166000818152600a6020908152604091829020805460ff191660019081179091558251938452908301527f04bca3656717d14c20f88f2a0122832cb0d2807bfc66ed9e932a2202cc59f49591016108ec565b33610c726006546001600160a01b031690565b6001600160a01b031614610c985760405162461bcd60e51b815260040161061790611f16565b600b5460ff1615610cbb5760405162461bcd60e51b815260040161061790611f4b565b600b805460ff191660011790556040517f192417b3f16b1ce69e0c59b0376549666650245ffc05e4b2569089dda8589b6690600090a1565b336000908152600c602052604090205460ff16610d525760405162461bcd60e51b815260206004820152601760248201527f6f6e6c79206275726e65722063616e20646f20746869730000000000000000006044820152606401610617565b610991828261157a565b610991338383611632565b610d7133836111ef565b610d8d5760405162461bcd60e51b815260040161061790611f72565b610d9984848484611701565b50505050565b33610db26006546001600160a01b031690565b6001600160a01b031614610dd85760405162461bcd60e51b815260040161061790611f16565b600780546001600160a01b0319166001600160a01b0392909216919091179055565b6000818152600260205260409020546060906001600160a01b0316610e795760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610617565b6000610e83611734565b90506000815111610ea35760405180602001604052806000815250610ece565b80610ead84611743565b604051602001610ebe929190611fc3565b6040516020818303038152906040525b9392505050565b6007546001600160a01b03163314610f3f5760405162461bcd60e51b815260206004820152602760248201527f4f776e61626c653a2063616c6c6572206973206e6f74207468652070656e64696044820152663733a7bbb732b960c91b6064820152608401610617565b600754610f54906001600160a01b0316611528565b600780546001600160a01b0319169055565b33610f796006546001600160a01b031690565b6001600160a01b031614610f9f5760405162461bcd60e51b815260040161061790611f16565b600d5460ff1615610fc25760405162461bcd60e51b815260040161061790611f4b565b6001600160a01b0381166000908152600c602052604090205460ff166110195760405162461bcd60e51b815260206004820152600c60248201526b3737ba103090313ab93732b960a11b6044820152606401610617565b6001600160a01b0381166000818152600c60209081526040808320805460ff191690558051938452908301919091527fded8f3f7220366eccece13d6a60b704b3b331e3182de86c678d4fe31ca25bc6491016108ec565b336110836006546001600160a01b031690565b6001600160a01b0316146110a95760405162461bcd60e51b815260040161061790611f16565b600d5460ff16156110cc5760405162461bcd60e51b815260040161061790611f4b565b6001600160a01b0381166000908152600c602052604090205460ff16156111265760405162461bcd60e51b815260206004820152600e60248201526d30b63932b0b23c90313ab93732b960911b6044820152606401610617565b6001600160a01b0381166000818152600c6020908152604091829020805460ff191660019081179091558251938452908301527fded8f3f7220366eccece13d6a60b704b3b331e3182de86c678d4fe31ca25bc6491016108ec565b600081815260046020526040902080546001600160a01b0319166001600160a01b03841690811790915581906111b6826109fc565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600260205260408120546001600160a01b03166112685760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610617565b6000611273836109fc565b9050806001600160a01b0316846001600160a01b031614806112ba57506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b806112de5750836001600160a01b03166112d3846105a2565b6001600160a01b0316145b949350505050565b826001600160a01b03166112f9826109fc565b6001600160a01b03161461135d5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610617565b6001600160a01b0382166113bf5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610617565b6113ca600082611181565b6001600160a01b03831660009081526003602052604081208054600192906113f3908490612008565b90915550506001600160a01b038216600090815260036020526040812080546001929061142190849061201f565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b60095481158015906114bd57507f0000000000000000000000000000000000000000000000000000000000003a986114ba838361201f565b11155b6114f85760405162461bcd60e51b815260206004820152600c60248201526b185b1c9958591e48199d5b1b60a21b6044820152606401610617565b60005b8281101561151a5761151284828460010101611841565b6001016114fb565b505060098054909101905550565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160a01b031661158d826109fc565b6001600160a01b0316146115d35760405162461bcd60e51b815260206004820152600d60248201526c34b63632b3b0b61037bbb732b960991b6044820152606401610617565b6115dd33826111ef565b6116295760405162461bcd60e51b815260206004820181905260248201527f63616c6c6572206973206e6f74206f776e6572206e6f7220617070726f7665646044820152606401610617565b61099181611983565b816001600160a01b0316836001600160a01b031614156116945760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610617565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b61170c8484846112e6565b61171884848484611a1e565b610d995760405162461bcd60e51b815260040161061790612037565b60606008805461051f90611edb565b6060816117675750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611791578061177b81612089565b915061178a9050600a836120ba565b915061176b565b60008167ffffffffffffffff8111156117ac576117ac611d1b565b6040519080825280601f01601f1916602001820160405280156117d6576020820181803683370190505b5090505b84156112de576117eb600183612008565b91506117f8600a866120ce565b61180390603061201f565b60f81b818381518110611818576118186120e2565b60200101906001600160f81b031916908160001a90535061183a600a866120ba565b94506117da565b6001600160a01b0382166118975760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610617565b6000818152600260205260409020546001600160a01b0316156118fc5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610617565b6001600160a01b038216600090815260036020526040812080546001929061192590849061201f565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b600061198e826109fc565b905061199b600083611181565b6001600160a01b03811660009081526003602052604081208054600192906119c4908490612008565b909155505060008281526002602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b60006001600160a01b0384163b15611b2057604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290611a629033908990889088906004016120f8565b602060405180830381600087803b158015611a7c57600080fd5b505af1925050508015611aac575060408051601f3d908101601f19168201909252611aa991810190612135565b60015b611b06573d808015611ada576040519150601f19603f3d011682016040523d82523d6000602084013e611adf565b606091505b508051611afe5760405162461bcd60e51b815260040161061790612037565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506112de565b506001949350505050565b828054611b3790611edb565b90600052602060002090601f016020900481019282611b595760008555611b9f565b82601f10611b7257805160ff1916838001178555611b9f565b82800160010185558215611b9f579182015b82811115611b9f578251825591602001919060010190611b84565b50611bab929150611baf565b5090565b5b80821115611bab5760008155600101611bb0565b6001600160e01b031981168114611bda57600080fd5b50565b600060208284031215611bef57600080fd5b8135610ece81611bc4565b80356001600160a01b0381168114611c1157600080fd5b919050565b600060208284031215611c2857600080fd5b610ece82611bfa565b60005b83811015611c4c578181015183820152602001611c34565b83811115610d995750506000910152565b60008151808452611c75816020860160208601611c31565b601f01601f19169290920160200192915050565b602081526000610ece6020830184611c5d565b600060208284031215611cae57600080fd5b5035919050565b60008060408385031215611cc857600080fd5b611cd183611bfa565b946020939093013593505050565b600080600060608486031215611cf457600080fd5b611cfd84611bfa565b9250611d0b60208501611bfa565b9150604084013590509250925092565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff80841115611d4c57611d4c611d1b565b604051601f8501601f19908116603f01168101908282118183101715611d7457611d74611d1b565b81604052809350858152868686011115611d8d57600080fd5b858560208301376000602087830101525050509392505050565b600060208284031215611db957600080fd5b813567ffffffffffffffff811115611dd057600080fd5b8201601f81018413611de157600080fd5b6112de84823560208401611d31565b60008060408385031215611e0357600080fd5b611e0c83611bfa565b915060208301358015158114611e2157600080fd5b809150509250929050565b60008060008060808587031215611e4257600080fd5b611e4b85611bfa565b9350611e5960208601611bfa565b925060408501359150606085013567ffffffffffffffff811115611e7c57600080fd5b8501601f81018713611e8d57600080fd5b611e9c87823560208401611d31565b91505092959194509250565b60008060408385031215611ebb57600080fd5b611ec483611bfa565b9150611ed260208401611bfa565b90509250929050565b600181811c90821680611eef57607f821691505b60208210811415611f1057634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252600d908201526c1b5a5b9d195c881b1bd8dad959609a1b604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b60008351611fd5818460208801611c31565b835190830190611fe9818360208801611c31565b01949350505050565b634e487b7160e01b600052601160045260246000fd5b60008282101561201a5761201a611ff2565b500390565b6000821982111561203257612032611ff2565b500190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b600060001982141561209d5761209d611ff2565b5060010190565b634e487b7160e01b600052601260045260246000fd5b6000826120c9576120c96120a4565b500490565b6000826120dd576120dd6120a4565b500690565b634e487b7160e01b600052603260045260246000fd5b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061212b90830184611c5d565b9695505050505050565b60006020828403121561214757600080fd5b8151610ece81611bc456fea2646970667358221220d9eb66514ef7e8b7a2c3c3e96eb7023649c318b578b58abe1bf87fd1b786f5b764736f6c63430008090033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000000b50756666205469636b657400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000025054000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002568747470733a2f2f6170692e7075666676657273652e70726f2f6e66742f7469636b65742f000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : _name (string): Puff Ticket
Arg [1] : _symbol (string): PT
Arg [2] : _uri (string): https://api.puffverse.pro/nft/ticket/
-----Encoded View---------------
10 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000060
Arg [1] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [2] : 00000000000000000000000000000000000000000000000000000000000000e0
Arg [3] : 000000000000000000000000000000000000000000000000000000000000000b
Arg [4] : 50756666205469636b6574000000000000000000000000000000000000000000
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [6] : 5054000000000000000000000000000000000000000000000000000000000000
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000025
Arg [8] : 68747470733a2f2f6170692e7075666676657273652e70726f2f6e66742f7469
Arg [9] : 636b65742f000000000000000000000000000000000000000000000000000000
Deployed Bytecode Sourcemap
238:559:59:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1570:300:16;;;;;;:::i;:::-;;:::i;:::-;;;565:14:64;;558:22;540:41;;528:2;513:18;1570:300:16;;;;;;;;239:39:27;;;;;;:::i;:::-;;;;;;;;;;;;;;;;2488:98:16;;;:::i;:::-;;;;;;;:::i;4000:217::-;;;;;;:::i;:::-;;:::i;:::-;;;-1:-1:-1;;;;;2061:32:64;;;2043:51;;2031:2;2016:18;4000:217:16;1897:203:64;3538:401:16;;;;;;:::i;:::-;;:::i;:::-;;340:32:29;;;;;;;;;2510:25:64;;;2498:2;2483:18;340:32:29;2364:177:64;1308:122:27;;;:::i;1096:206:28:-;;;;;;:::i;:::-;;:::i;4727:330:16:-;;;;;;:::i;:::-;;:::i;273:32:29:-;;;;;559:107:59;;;;;;:::i;:::-;;:::i;5123:179:16:-;;;;;;:::i;:::-;;:::i;685:104:29:-;;;;;;:::i;:::-;;:::i;2191:235:16:-;;;;;;:::i;:::-;;:::i;1929:205::-;;;;;;:::i;:::-;;:::i;723:101:30:-;;;:::i;534:86::-;607:6;;-1:-1:-1;;;;;607:6:30;534:86;;2650:102:16;;;:::i;882:208:28:-;;;;;;:::i;:::-;;:::i;1308:122::-;;;:::i;672:123:59:-;;;;;;:::i;:::-;;:::i;4284:153:16:-;;;;;;:::i;:::-;;:::i;5368:320::-;;;;;;:::i;:::-;;:::i;830:95:30:-;;;;;;:::i;:::-;;:::i;2818:329:16:-;;;;;;:::i;:::-;;:::i;284:24:28:-;;;;;;;;;::27;;;;;;;;;626:91:30;697:13;;-1:-1:-1;;;;;697:13:30;626:91;;4503:162:16;;;;;;:::i;:::-;-1:-1:-1;;;;;4623:25:16;;;4600:4;4623:25;;;:18;:25;;;;;;;;:35;;;;;;;;;;;;;;;4503:162;931:206:30;;;:::i;1096::27:-;;;;;;:::i;:::-;;:::i;882:208::-;;;;;;:::i;:::-;;:::i;239:39:28:-;;;;;;:::i;:::-;;;;;;;;;;;;;;;;1570:300:16;1672:4;-1:-1:-1;;;;;;1707:40:16;;-1:-1:-1;;;1707:40:16;;:104;;-1:-1:-1;;;;;;;1763:48:16;;-1:-1:-1;;;1763:48:16;1707:104;:156;;;-1:-1:-1;;;;;;;;;;937:40:24;;;1827:36:16;1688:175;1570:300;-1:-1:-1;;1570:300:16:o;2488:98::-;2542:13;2574:5;2567:12;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2488:98;:::o;4000:217::-;4076:7;7248:16;;;:7;:16;;;;;;-1:-1:-1;;;;;7248:16:16;4095:73;;;;-1:-1:-1;;;4095:73:16;;5980:2:64;4095:73:16;;;5962:21:64;6019:2;5999:18;;;5992:30;6058:34;6038:18;;;6031:62;-1:-1:-1;;;6109:18:64;;;6102:42;6161:19;;4095:73:16;;;;;;;;;-1:-1:-1;4186:24:16;;;;:15;:24;;;;;;-1:-1:-1;;;;;4186:24:16;;4000:217::o;3538:401::-;3618:13;3634:23;3649:7;3634:14;:23::i;:::-;3618:39;;3681:5;-1:-1:-1;;;;;3675:11:16;:2;-1:-1:-1;;;;;3675:11:16;;;3667:57;;;;-1:-1:-1;;;3667:57:16;;6393:2:64;3667:57:16;;;6375:21:64;6432:2;6412:18;;;6405:30;6471:34;6451:18;;;6444:62;-1:-1:-1;;;6522:18:64;;;6515:31;6563:19;;3667:57:16;6191:397:64;3667:57:16;719:10:22;-1:-1:-1;;;;;3756:21:16;;;;:62;;-1:-1:-1;3781:37:16;3798:5;719:10:22;4503:162:16;:::i;3781:37::-;3735:165;;;;-1:-1:-1;;;3735:165:16;;6795:2:64;3735:165:16;;;6777:21:64;6834:2;6814:18;;;6807:30;6873:34;6853:18;;;6846:62;6944:26;6924:18;;;6917:54;6988:19;;3735:165:16;6593:420:64;3735:165:16;3911:21;3920:2;3924:7;3911:8;:21::i;:::-;3608:331;3538:401;;:::o;1308:122:27:-;372:10:31;361:7;607:6:30;;-1:-1:-1;;;;;607:6:30;;534:86;361:7:31;-1:-1:-1;;;;;361:21:31;;353:66;;;;-1:-1:-1;;;353:66:31;;;;;;;:::i;:::-;828:12:27::1;::::0;::::1;;827:13;819:39;;;;-1:-1:-1::0;;;819:39:27::1;;;;;;;:::i;:::-;1375:12:::2;:19:::0;;-1:-1:-1;;1375:19:27::2;1390:4;1375:19;::::0;;1409:14:::2;::::0;::::2;::::0;1375:12:::2;::::0;1409:14:::2;1308:122::o:0;1096:206:28:-;372:10:31;361:7;607:6:30;;-1:-1:-1;;;;;607:6:30;;534:86;361:7:31;-1:-1:-1;;;;;361:21:31;;353:66;;;;-1:-1:-1;;;353:66:31;;;;;;;:::i;:::-;828:12:28::1;::::0;::::1;;827:13;819:39;;;;-1:-1:-1::0;;;819:39:28::1;;;;;;;:::i;:::-;-1:-1:-1::0;;;;;1185:16:28;::::2;;::::0;;;:7:::2;:16;::::0;;;;;::::2;;1177:41;;;::::0;-1:-1:-1;;;1177:41:28;;7923:2:64;1177:41:28::2;::::0;::::2;7905:21:64::0;7962:2;7942:18;;;7935:30;-1:-1:-1;;;7981:18:64;;;7974:42;8033:18;;1177:41:28::2;7721:336:64::0;1177:41:28::2;-1:-1:-1::0;;;;;1235:16:28;::::2;;::::0;;;:7:::2;:16;::::0;;;;;;;1228:23;;-1:-1:-1;;1228:23:28::2;::::0;;1266:29;;8230:51:64;;;8297:18;;;8290:50;;;;1266:29:28::2;::::0;8203:18:64;1266:29:28::2;;;;;;;;1096:206:::0;:::o;4727:330:16:-;4916:41;719:10:22;4949:7:16;4916:18;:41::i;:::-;4908:103;;;;-1:-1:-1;;;4908:103:16;;;;;;;:::i;:::-;5022:28;5032:4;5038:2;5042:7;5022:9;:28::i;559:107:59:-;1484:10:28;1476:19;;;;:7;:19;;;;;;;;1468:55;;;;-1:-1:-1;;;1468:55:28;;8971:2:64;1468:55:28;;;8953:21:64;9010:2;8990:18;;;8983:30;9049:25;9029:18;;;9022:53;9092:18;;1468:55:28;8769:347:64;1468:55:28;636:23:59::1;649:3;654:4;636:12;:23::i;:::-;559:107:::0;;:::o;5123:179:16:-;5256:39;5273:4;5279:2;5283:7;5256:39;;;;;;;;;;;;:16;:39::i;685:104:29:-;372:10:31;361:7;607:6:30;;-1:-1:-1;;;;;607:6:30;;534:86;361:7:31;-1:-1:-1;;;;;361:21:31;;353:66;;;;-1:-1:-1;;;353:66:31;;;;;;;:::i;:::-;761:21:29;;::::1;::::0;:7:::1;::::0;:21:::1;::::0;::::1;::::0;::::1;:::i;2191:235:16:-:0;2263:7;2298:16;;;:7;:16;;;;;;-1:-1:-1;;;;;2298:16:16;2332:19;2324:73;;;;-1:-1:-1;;;2324:73:16;;9323:2:64;2324:73:16;;;9305:21:64;9362:2;9342:18;;;9335:30;9401:34;9381:18;;;9374:62;-1:-1:-1;;;9452:18:64;;;9445:39;9501:19;;2324:73:16;9121:405:64;1929:205:16;2001:7;-1:-1:-1;;;;;2028:19:16;;2020:74;;;;-1:-1:-1;;;2020:74:16;;9733:2:64;2020:74:16;;;9715:21:64;9772:2;9752:18;;;9745:30;9811:34;9791:18;;;9784:62;-1:-1:-1;;;9862:18:64;;;9855:40;9912:19;;2020:74:16;9531:406:64;2020:74:16;-1:-1:-1;;;;;;2111:16:16;;;;;:9;:16;;;;;;;1929:205::o;723:101:30:-;372:10:31;361:7;607:6:30;;-1:-1:-1;;;;;607:6:30;;534:86;361:7:31;-1:-1:-1;;;;;361:21:31;;353:66;;;;-1:-1:-1;;;353:66:31;;;;;;;:::i;:::-;787:30:30::1;814:1;787:18;:30::i;:::-;723:101::o:0;2650:102:16:-;2706:13;2738:7;2731:14;;;;;:::i;882:208:28:-;372:10:31;361:7;607:6:30;;-1:-1:-1;;;;;607:6:30;;534:86;361:7:31;-1:-1:-1;;;;;361:21:31;;353:66;;;;-1:-1:-1;;;353:66:31;;;;;;;:::i;:::-;828:12:28::1;::::0;::::1;;827:13;819:39;;;;-1:-1:-1::0;;;819:39:28::1;;;;;;;:::i;:::-;-1:-1:-1::0;;;;;972:16:28;::::2;;::::0;;;:7:::2;:16;::::0;;;;;::::2;;971:17;963:44;;;::::0;-1:-1:-1;;;963:44:28;;10144:2:64;963:44:28::2;::::0;::::2;10126:21:64::0;10183:2;10163:18;;;10156:30;-1:-1:-1;;;10202:18:64;;;10195:44;10256:18;;963:44:28::2;9942:338:64::0;963:44:28::2;-1:-1:-1::0;;;;;1017:16:28;::::2;;::::0;;;:7:::2;:16;::::0;;;;;;;;:23;;-1:-1:-1;;1017:23:28::2;1036:4;1017:23:::0;;::::2;::::0;;;1055:28;;8230:51:64;;;8297:18;;;8290:50;1055:28:28::2;::::0;8203:18:64;1055:28:28::2;8062:284:64::0;1308:122:28;372:10:31;361:7;607:6:30;;-1:-1:-1;;;;;607:6:30;;534:86;361:7:31;-1:-1:-1;;;;;361:21:31;;353:66;;;;-1:-1:-1;;;353:66:31;;;;;;;:::i;:::-;828:12:28::1;::::0;::::1;;827:13;819:39;;;;-1:-1:-1::0;;;819:39:28::1;;;;;;;:::i;:::-;1375:12:::2;:19:::0;;-1:-1:-1;;1375:19:28::2;1390:4;1375:19;::::0;;1409:14:::2;::::0;::::2;::::0;1375:12:::2;::::0;1409:14:::2;1308:122::o:0;672:123:59:-;1484:10:27;1476:19;;;;:7;:19;;;;;;;;1468:55;;;;-1:-1:-1;;;1468:55:27;;10487:2:64;1468:55:27;;;10469:21:64;10526:2;10506:18;;;10499:30;10565:25;10545:18;;;10538:53;10608:18;;1468:55:27;10285:347:64;1468:55:27;758:29:59::1;771:5;778:8;758:12;:29::i;4284:153:16:-:0;4378:52;719:10:22;4411:8:16;4421;4378:18;:52::i;5368:320::-;5537:41;719:10:22;5570:7:16;5537:18;:41::i;:::-;5529:103;;;;-1:-1:-1;;;5529:103:16;;;;;;;:::i;:::-;5642:39;5656:4;5662:2;5666:7;5675:5;5642:13;:39::i;:::-;5368:320;;;;:::o;830:95:30:-;372:10:31;361:7;607:6:30;;-1:-1:-1;;;;;607:6:30;;534:86;361:7:31;-1:-1:-1;;;;;361:21:31;;353:66;;;;-1:-1:-1;;;353:66:31;;;;;;;:::i;:::-;897:13:30::1;:21:::0;;-1:-1:-1;;;;;;897:21:30::1;-1:-1:-1::0;;;;;897:21:30;;;::::1;::::0;;;::::1;::::0;;830:95::o;2818:329:16:-;7225:4;7248:16;;;:7;:16;;;;;;2891:13;;-1:-1:-1;;;;;7248:16:16;2916:76;;;;-1:-1:-1;;;2916:76:16;;10839:2:64;2916:76:16;;;10821:21:64;10878:2;10858:18;;;10851:30;10917:34;10897:18;;;10890:62;-1:-1:-1;;;10968:18:64;;;10961:45;11023:19;;2916:76:16;10637:411:64;2916:76:16;3003:21;3027:10;:8;:10::i;:::-;3003:34;;3078:1;3060:7;3054:21;:25;:86;;;;;;;;;;;;;;;;;3106:7;3115:18;:7;:16;:18::i;:::-;3089:45;;;;;;;;;:::i;:::-;;;;;;;;;;;;;3054:86;3047:93;2818:329;-1:-1:-1;;;2818:329:16:o;931:206:30:-;993:13;;-1:-1:-1;;;;;993:13:30;979:10;:27;971:79;;;;-1:-1:-1;;;971:79:30;;11730:2:64;971:79:30;;;11712:21:64;11769:2;11749:18;;;11742:30;11808:34;11788:18;;;11781:62;-1:-1:-1;;;11859:18:64;;;11852:37;11906:19;;971:79:30;11528:403:64;971:79:30;1080:13;;1061:33;;-1:-1:-1;;;;;1080:13:30;1061:18;:33::i;:::-;1104:13;:26;;-1:-1:-1;;;;;;1104:26:30;;;931:206::o;1096::27:-;372:10:31;361:7;607:6:30;;-1:-1:-1;;;;;607:6:30;;534:86;361:7:31;-1:-1:-1;;;;;361:21:31;;353:66;;;;-1:-1:-1;;;353:66:31;;;;;;;:::i;:::-;828:12:27::1;::::0;::::1;;827:13;819:39;;;;-1:-1:-1::0;;;819:39:27::1;;;;;;;:::i;:::-;-1:-1:-1::0;;;;;1185:16:27;::::2;;::::0;;;:7:::2;:16;::::0;;;;;::::2;;1177:41;;;::::0;-1:-1:-1;;;1177:41:27;;12138:2:64;1177:41:27::2;::::0;::::2;12120:21:64::0;12177:2;12157:18;;;12150:30;-1:-1:-1;;;12196:18:64;;;12189:42;12248:18;;1177:41:27::2;11936:336:64::0;1177:41:27::2;-1:-1:-1::0;;;;;1235:16:27;::::2;;::::0;;;:7:::2;:16;::::0;;;;;;;1228:23;;-1:-1:-1;;1228:23:27::2;::::0;;1266:29;;8230:51:64;;;8297:18;;;8290:50;;;;1266:29:27::2;::::0;8203:18:64;1266:29:27::2;8062:284:64::0;882:208:27;372:10:31;361:7;607:6:30;;-1:-1:-1;;;;;607:6:30;;534:86;361:7:31;-1:-1:-1;;;;;361:21:31;;353:66;;;;-1:-1:-1;;;353:66:31;;;;;;;:::i;:::-;828:12:27::1;::::0;::::1;;827:13;819:39;;;;-1:-1:-1::0;;;819:39:27::1;;;;;;;:::i;:::-;-1:-1:-1::0;;;;;972:16:27;::::2;;::::0;;;:7:::2;:16;::::0;;;;;::::2;;971:17;963:44;;;::::0;-1:-1:-1;;;963:44:27;;12479:2:64;963:44:27::2;::::0;::::2;12461:21:64::0;12518:2;12498:18;;;12491:30;-1:-1:-1;;;12537:18:64;;;12530:44;12591:18;;963:44:27::2;12277:338:64::0;963:44:27::2;-1:-1:-1::0;;;;;1017:16:27;::::2;;::::0;;;:7:::2;:16;::::0;;;;;;;;:23;;-1:-1:-1;;1017:23:27::2;1036:4;1017:23:::0;;::::2;::::0;;;1055:28;;8230:51:64;;;8297:18;;;8290:50;1055:28:27::2;::::0;8203:18:64;1055:28:27::2;8062:284:64::0;11169:171:16;11243:24;;;;:15;:24;;;;;:29;;-1:-1:-1;;;;;;11243:29:16;-1:-1:-1;;;;;11243:29:16;;;;;;;;:24;;11296:23;11243:24;11296:14;:23::i;:::-;-1:-1:-1;;;;;11287:46:16;;;;;;;;;;;11169:171;;:::o;7443:344::-;7536:4;7248:16;;;:7;:16;;;;;;-1:-1:-1;;;;;7248:16:16;7552:73;;;;-1:-1:-1;;;7552:73:16;;12822:2:64;7552:73:16;;;12804:21:64;12861:2;12841:18;;;12834:30;12900:34;12880:18;;;12873:62;-1:-1:-1;;;12951:18:64;;;12944:42;13003:19;;7552:73:16;12620:408:64;7552:73:16;7635:13;7651:23;7666:7;7651:14;:23::i;:::-;7635:39;;7703:5;-1:-1:-1;;;;;7692:16:16;:7;-1:-1:-1;;;;;7692:16:16;;:52;;;-1:-1:-1;;;;;;4623:25:16;;;4600:4;4623:25;;;:18;:25;;;;;;;;:35;;;;;;;;;;;;7712:32;7692:87;;;;7772:7;-1:-1:-1;;;;;7748:31:16;:20;7760:7;7748:11;:20::i;:::-;-1:-1:-1;;;;;7748:31:16;;7692:87;7684:96;7443:344;-1:-1:-1;;;;7443:344:16:o;10453:605::-;10607:4;-1:-1:-1;;;;;10580:31:16;:23;10595:7;10580:14;:23::i;:::-;-1:-1:-1;;;;;10580:31:16;;10572:81;;;;-1:-1:-1;;;10572:81:16;;13235:2:64;10572:81:16;;;13217:21:64;13274:2;13254:18;;;13247:30;13313:34;13293:18;;;13286:62;-1:-1:-1;;;13364:18:64;;;13357:35;13409:19;;10572:81:16;13033:401:64;10572:81:16;-1:-1:-1;;;;;10671:16:16;;10663:65;;;;-1:-1:-1;;;10663:65:16;;13641:2:64;10663:65:16;;;13623:21:64;13680:2;13660:18;;;13653:30;13719:34;13699:18;;;13692:62;-1:-1:-1;;;13770:18:64;;;13763:34;13814:19;;10663:65:16;13439:400:64;10663:65:16;10840:29;10857:1;10861:7;10840:8;:29::i;:::-;-1:-1:-1;;;;;10880:15:16;;;;;;:9;:15;;;;;:20;;10899:1;;10880:15;:20;;10899:1;;10880:20;:::i;:::-;;;;-1:-1:-1;;;;;;;10910:13:16;;;;;;:9;:13;;;;;:18;;10927:1;;10910:13;:18;;10927:1;;10910:18;:::i;:::-;;;;-1:-1:-1;;10938:16:16;;;;:7;:16;;;;;;:21;;-1:-1:-1;;;;;;10938:21:16;-1:-1:-1;;;;;10938:21:16;;;;;;;;;10975:27;;10938:16;;10975:27;;;;;;;3608:331;3538:401;;:::o;795:358:29:-;880:11;;909:8;;;;;:45;;-1:-1:-1;944:10:29;921:19;936:4;921:12;:19;:::i;:::-;:33;;909:45;901:70;;;;-1:-1:-1;;;901:70:29;;14441:2:64;901:70:29;;;14423:21:64;14480:2;14460:18;;;14453:30;-1:-1:-1;;;14499:18:64;;;14492:42;14551:18;;901:70:29;14239:336:64;901:70:29;1010:6;1005:99;1026:4;1022:1;:8;1005:99;;;1056:32;1062:3;1086:1;1067:12;1082:1;1067:16;:20;1056:5;:32::i;:::-;1032:4;;1005:99;;;-1:-1:-1;;1117:11:29;:19;;;;;;;-1:-1:-1;795:358:29:o;1143:187:30:-;1235:6;;;-1:-1:-1;;;;;1251:17:30;;;-1:-1:-1;;;;;;1251:17:30;;;;;;;1283:40;;1235:6;;;1251:17;1235:6;;1283:40;;1216:16;;1283:40;1206:124;1143:187;:::o;1159:253:29:-;1262:5;-1:-1:-1;;;;;1241:26:29;:17;1249:8;1241:7;:17::i;:::-;-1:-1:-1;;;;;1241:26:29;;1233:52;;;;-1:-1:-1;;;1233:52:29;;14782:2:64;1233:52:29;;;14764:21:64;14821:2;14801:18;;;14794:30;-1:-1:-1;;;14840:18:64;;;14833:43;14893:18;;1233:52:29;14580:337:64;1233:52:29;1303:40;1322:10;1334:8;1303:18;:40::i;:::-;1295:85;;;;-1:-1:-1;;;1295:85:29;;15124:2:64;1295:85:29;;;15106:21:64;;;15143:18;;;15136:30;15202:34;15182:18;;;15175:62;15254:18;;1295:85:29;14922:356:64;1295:85:29;1390:15;1396:8;1390:5;:15::i;11475:307:16:-;11625:8;-1:-1:-1;;;;;11616:17:16;:5;-1:-1:-1;;;;;11616:17:16;;;11608:55;;;;-1:-1:-1;;;11608:55:16;;15485:2:64;11608:55:16;;;15467:21:64;15524:2;15504:18;;;15497:30;15563:27;15543:18;;;15536:55;15608:18;;11608:55:16;15283:349:64;11608:55:16;-1:-1:-1;;;;;11673:25:16;;;;;;;:18;:25;;;;;;;;:35;;;;;;;;;;;;;:46;;-1:-1:-1;;11673:46:16;;;;;;;;;;11734:41;;540::64;;;11734::16;;513:18:64;11734:41:16;;;;;;;11475:307;;;:::o;6550:::-;6701:28;6711:4;6717:2;6721:7;6701:9;:28::i;:::-;6747:48;6770:4;6776:2;6780:7;6789:5;6747:22;:48::i;:::-;6739:111;;;;-1:-1:-1;;;6739:111:16;;;;;;;:::i;565:114:29:-;633:13;665:7;658:14;;;;;:::i;328:703:23:-;384:13;601:10;597:51;;-1:-1:-1;;627:10:23;;;;;;;;;;;;-1:-1:-1;;;627:10:23;;;;;328:703::o;597:51::-;672:5;657:12;711:75;718:9;;711:75;;743:8;;;;:::i;:::-;;-1:-1:-1;765:10:23;;-1:-1:-1;773:2:23;765:10;;:::i;:::-;;;711:75;;;795:19;827:6;817:17;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;817:17:23;;795:39;;844:150;851:10;;844:150;;877:11;887:1;877:11;;:::i;:::-;;-1:-1:-1;945:10:23;953:2;945:5;:10;:::i;:::-;932:24;;:2;:24;:::i;:::-;919:39;;902:6;909;902:14;;;;;;;;:::i;:::-;;;;:56;-1:-1:-1;;;;;902:56:23;;;;;;;;-1:-1:-1;972:11:23;981:2;972:11;;:::i;:::-;;;844:150;;9079:427:16;-1:-1:-1;;;;;9158:16:16;;9150:61;;;;-1:-1:-1;;;9150:61:16;;16904:2:64;9150:61:16;;;16886:21:64;;;16923:18;;;16916:30;16982:34;16962:18;;;16955:62;17034:18;;9150:61:16;16702:356:64;9150:61:16;7225:4;7248:16;;;:7;:16;;;;;;-1:-1:-1;;;;;7248:16:16;:30;9221:58;;;;-1:-1:-1;;;9221:58:16;;17265:2:64;9221:58:16;;;17247:21:64;17304:2;17284:18;;;17277:30;17343;17323:18;;;17316:58;17391:18;;9221:58:16;17063:352:64;9221:58:16;-1:-1:-1;;;;;9346:13:16;;;;;;:9;:13;;;;;:18;;9363:1;;9346:13;:18;;9363:1;;9346:18;:::i;:::-;;;;-1:-1:-1;;9374:16:16;;;;:7;:16;;;;;;:21;;-1:-1:-1;;;;;;9374:21:16;-1:-1:-1;;;;;9374:21:16;;;;;;;;9411:33;;9374:16;;;9411:33;;9374:16;;9411:33;559:107:59;;:::o;9723:406:16:-;9782:13;9798:23;9813:7;9798:14;:23::i;:::-;9782:39;;9918:29;9935:1;9939:7;9918:8;:29::i;:::-;-1:-1:-1;;;;;9958:16:16;;;;;;:9;:16;;;;;:21;;9978:1;;9958:16;:21;;9978:1;;9958:21;:::i;:::-;;;;-1:-1:-1;;9996:16:16;;;;:7;:16;;;;;;9989:23;;-1:-1:-1;;;;;;9989:23:16;;;10028:36;10004:7;;9996:16;-1:-1:-1;;;;;10028:36:16;;;;;9996:16;;10028:36;559:107:59;;:::o;12335:778:16:-;12485:4;-1:-1:-1;;;;;12505:13:16;;1465:19:21;:23;12501:606:16;;12540:72;;-1:-1:-1;;;12540:72:16;;-1:-1:-1;;;;;12540:36:16;;;;;:72;;719:10:22;;12591:4:16;;12597:7;;12606:5;;12540:72;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;12540:72:16;;;;;;;;-1:-1:-1;;12540:72:16;;;;;;;;;;;;:::i;:::-;;;12536:519;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;12779:13:16;;12775:266;;12821:60;;-1:-1:-1;;;12821:60:16;;;;;;;:::i;12775:266::-;12993:6;12987:13;12978:6;12974:2;12970:15;12963:38;12536:519;-1:-1:-1;;;;;;12662:51:16;-1:-1:-1;;;12662:51:16;;-1:-1:-1;12655:58:16;;12501:606;-1:-1:-1;13092:4:16;12335:778;;;;;;:::o;-1:-1:-1:-;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;14:131:64;-1:-1:-1;;;;;;88:32:64;;78:43;;68:71;;135:1;132;125:12;68:71;14:131;:::o;150:245::-;208:6;261:2;249:9;240:7;236:23;232:32;229:52;;;277:1;274;267:12;229:52;316:9;303:23;335:30;359:5;335:30;:::i;592:173::-;660:20;;-1:-1:-1;;;;;709:31:64;;699:42;;689:70;;755:1;752;745:12;689:70;592:173;;;:::o;770:186::-;829:6;882:2;870:9;861:7;857:23;853:32;850:52;;;898:1;895;888:12;850:52;921:29;940:9;921:29;:::i;961:258::-;1033:1;1043:113;1057:6;1054:1;1051:13;1043:113;;;1133:11;;;1127:18;1114:11;;;1107:39;1079:2;1072:10;1043:113;;;1174:6;1171:1;1168:13;1165:48;;;-1:-1:-1;;1209:1:64;1191:16;;1184:27;961:258::o;1224:::-;1266:3;1304:5;1298:12;1331:6;1326:3;1319:19;1347:63;1403:6;1396:4;1391:3;1387:14;1380:4;1373:5;1369:16;1347:63;:::i;:::-;1464:2;1443:15;-1:-1:-1;;1439:29:64;1430:39;;;;1471:4;1426:50;;1224:258;-1:-1:-1;;1224:258:64:o;1487:220::-;1636:2;1625:9;1618:21;1599:4;1656:45;1697:2;1686:9;1682:18;1674:6;1656:45;:::i;1712:180::-;1771:6;1824:2;1812:9;1803:7;1799:23;1795:32;1792:52;;;1840:1;1837;1830:12;1792:52;-1:-1:-1;1863:23:64;;1712:180;-1:-1:-1;1712:180:64:o;2105:254::-;2173:6;2181;2234:2;2222:9;2213:7;2209:23;2205:32;2202:52;;;2250:1;2247;2240:12;2202:52;2273:29;2292:9;2273:29;:::i;:::-;2263:39;2349:2;2334:18;;;;2321:32;;-1:-1:-1;;;2105:254:64:o;2546:328::-;2623:6;2631;2639;2692:2;2680:9;2671:7;2667:23;2663:32;2660:52;;;2708:1;2705;2698:12;2660:52;2731:29;2750:9;2731:29;:::i;:::-;2721:39;;2779:38;2813:2;2802:9;2798:18;2779:38;:::i;:::-;2769:48;;2864:2;2853:9;2849:18;2836:32;2826:42;;2546:328;;;;;:::o;2879:127::-;2940:10;2935:3;2931:20;2928:1;2921:31;2971:4;2968:1;2961:15;2995:4;2992:1;2985:15;3011:632;3076:5;3106:18;3147:2;3139:6;3136:14;3133:40;;;3153:18;;:::i;:::-;3228:2;3222:9;3196:2;3282:15;;-1:-1:-1;;3278:24:64;;;3304:2;3274:33;3270:42;3258:55;;;3328:18;;;3348:22;;;3325:46;3322:72;;;3374:18;;:::i;:::-;3414:10;3410:2;3403:22;3443:6;3434:15;;3473:6;3465;3458:22;3513:3;3504:6;3499:3;3495:16;3492:25;3489:45;;;3530:1;3527;3520:12;3489:45;3580:6;3575:3;3568:4;3560:6;3556:17;3543:44;3635:1;3628:4;3619:6;3611;3607:19;3603:30;3596:41;;;;3011:632;;;;;:::o;3648:451::-;3717:6;3770:2;3758:9;3749:7;3745:23;3741:32;3738:52;;;3786:1;3783;3776:12;3738:52;3826:9;3813:23;3859:18;3851:6;3848:30;3845:50;;;3891:1;3888;3881:12;3845:50;3914:22;;3967:4;3959:13;;3955:27;-1:-1:-1;3945:55:64;;3996:1;3993;3986:12;3945:55;4019:74;4085:7;4080:2;4067:16;4062:2;4058;4054:11;4019:74;:::i;4104:347::-;4169:6;4177;4230:2;4218:9;4209:7;4205:23;4201:32;4198:52;;;4246:1;4243;4236:12;4198:52;4269:29;4288:9;4269:29;:::i;:::-;4259:39;;4348:2;4337:9;4333:18;4320:32;4395:5;4388:13;4381:21;4374:5;4371:32;4361:60;;4417:1;4414;4407:12;4361:60;4440:5;4430:15;;;4104:347;;;;;:::o;4456:667::-;4551:6;4559;4567;4575;4628:3;4616:9;4607:7;4603:23;4599:33;4596:53;;;4645:1;4642;4635:12;4596:53;4668:29;4687:9;4668:29;:::i;:::-;4658:39;;4716:38;4750:2;4739:9;4735:18;4716:38;:::i;:::-;4706:48;;4801:2;4790:9;4786:18;4773:32;4763:42;;4856:2;4845:9;4841:18;4828:32;4883:18;4875:6;4872:30;4869:50;;;4915:1;4912;4905:12;4869:50;4938:22;;4991:4;4983:13;;4979:27;-1:-1:-1;4969:55:64;;5020:1;5017;5010:12;4969:55;5043:74;5109:7;5104:2;5091:16;5086:2;5082;5078:11;5043:74;:::i;:::-;5033:84;;;4456:667;;;;;;;:::o;5128:260::-;5196:6;5204;5257:2;5245:9;5236:7;5232:23;5228:32;5225:52;;;5273:1;5270;5263:12;5225:52;5296:29;5315:9;5296:29;:::i;:::-;5286:39;;5344:38;5378:2;5367:9;5363:18;5344:38;:::i;:::-;5334:48;;5128:260;;;;;:::o;5393:380::-;5472:1;5468:12;;;;5515;;;5536:61;;5590:4;5582:6;5578:17;5568:27;;5536:61;5643:2;5635:6;5632:14;5612:18;5609:38;5606:161;;;5689:10;5684:3;5680:20;5677:1;5670:31;5724:4;5721:1;5714:15;5752:4;5749:1;5742:15;5606:161;;5393:380;;;:::o;7018:356::-;7220:2;7202:21;;;7239:18;;;7232:30;7298:34;7293:2;7278:18;;7271:62;7365:2;7350:18;;7018:356::o;7379:337::-;7581:2;7563:21;;;7620:2;7600:18;;;7593:30;-1:-1:-1;;;7654:2:64;7639:18;;7632:43;7707:2;7692:18;;7379:337::o;8351:413::-;8553:2;8535:21;;;8592:2;8572:18;;;8565:30;8631:34;8626:2;8611:18;;8604:62;-1:-1:-1;;;8697:2:64;8682:18;;8675:47;8754:3;8739:19;;8351:413::o;11053:470::-;11232:3;11270:6;11264:13;11286:53;11332:6;11327:3;11320:4;11312:6;11308:17;11286:53;:::i;:::-;11402:13;;11361:16;;;;11424:57;11402:13;11361:16;11458:4;11446:17;;11424:57;:::i;:::-;11497:20;;11053:470;-1:-1:-1;;;;11053:470:64:o;13844:127::-;13905:10;13900:3;13896:20;13893:1;13886:31;13936:4;13933:1;13926:15;13960:4;13957:1;13950:15;13976:125;14016:4;14044:1;14041;14038:8;14035:34;;;14049:18;;:::i;:::-;-1:-1:-1;14086:9:64;;13976:125::o;14106:128::-;14146:3;14177:1;14173:6;14170:1;14167:13;14164:39;;;14183:18;;:::i;:::-;-1:-1:-1;14219:9:64;;14106:128::o;15637:414::-;15839:2;15821:21;;;15878:2;15858:18;;;15851:30;15917:34;15912:2;15897:18;;15890:62;-1:-1:-1;;;15983:2:64;15968:18;;15961:48;16041:3;16026:19;;15637:414::o;16056:135::-;16095:3;-1:-1:-1;;16116:17:64;;16113:43;;;16136:18;;:::i;:::-;-1:-1:-1;16183:1:64;16172:13;;16056:135::o;16196:127::-;16257:10;16252:3;16248:20;16245:1;16238:31;16288:4;16285:1;16278:15;16312:4;16309:1;16302:15;16328:120;16368:1;16394;16384:35;;16399:18;;:::i;:::-;-1:-1:-1;16433:9:64;;16328:120::o;16453:112::-;16485:1;16511;16501:35;;16516:18;;:::i;:::-;-1:-1:-1;16550:9:64;;16453:112::o;16570:127::-;16631:10;16626:3;16622:20;16619:1;16612:31;16662:4;16659:1;16652:15;16686:4;16683:1;16676:15;17420:489;-1:-1:-1;;;;;17689:15:64;;;17671:34;;17741:15;;17736:2;17721:18;;17714:43;17788:2;17773:18;;17766:34;;;17836:3;17831:2;17816:18;;17809:31;;;17614:4;;17857:46;;17883:19;;17875:6;17857:46;:::i;:::-;17849:54;17420:489;-1:-1:-1;;;;;;17420:489:64:o;17914:249::-;17983:6;18036:2;18024:9;18015:7;18011:23;18007:32;18004:52;;;18052:1;18049;18042:12;18004:52;18084:9;18078:16;18103:30;18127:5;18103:30;:::i
Swarm Source
ipfs://d9eb66514ef7e8b7a2c3c3e96eb7023649c318b578b58abe1bf87fd1b786f5b7
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.