Source Code
Overview
ETH Balance
0 ETH
Eth Value
$0.00View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
PickMint1155
Compiler Version
v0.8.24+commit.e11b9ed9
Optimization Enabled:
No with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
// @author: Buildtree - Powered by NFT Studios
pragma solidity ^0.8.18;
import {IERC1155Mintable} from "./../interfaces/IERC1155Mintable.sol";
import {Payable} from "./../libraries/Payable.sol";
import {SupplyControl1155} from "./../libraries/SupplyControl1155.sol";
import {LimitPerWallet} from "./../libraries/LimitPerWallet.sol";
import {SignatureProtected} from "./../libraries/SignatureProtected.sol";
import {DTOs} from "./../libraries/dtos.sol";
contract PickMint1155 is
Payable,
SupplyControl1155,
LimitPerWallet,
SignatureProtected
{
string public constant contractType = "PICK-MINTER-1155";
string public constant version = "1.1.0";
IERC1155Mintable public erc1155Contract;
bool private _isInitialized;
function init(
address owner,
address signerAddress,
address feeRecipient,
uint256[] memory availableTokens,
DTOs.Recipient[] memory recipients,
address erc1155Address
) external {
require(_isInitialized == false, "Contract already initialized.");
_transferOwnership(owner);
initSupplyControl(availableTokens);
initSignatureProtected(signerAddress);
initPayable(feeRecipient, recipients);
erc1155Contract = IERC1155Mintable(erc1155Address);
_isInitialized = true;
}
function mint(
uint256[] memory _ids,
uint256[] memory _amounts,
uint256 _maxPerWallet,
uint256 _pricePerToken,
address _coinAddress,
uint256 _feePerToken,
bytes calldata _signature
) external payable {
validateSignature(
abi.encodePacked(
_maxPerWallet,
_pricePerToken,
_coinAddress,
_feePerToken
),
_signature
);
uint256 _amount;
for (uint256 i; i < _ids.length; i++) {
require(
_ids[i] > 0 && _ids[i] < availableTokens.length,
"Invalid ID to be minted"
);
uint _available = availableTokens[_ids[i]];
if (_available < _amounts[i]) {
_amounts[i] = _available;
}
availableTokens[_ids[i]] -= _amounts[i];
_amount += _amounts[i];
}
require(
_amount > 0,
"None of the selected tokens to mint are available"
);
uint256 _availableAmount = getAvailableForWallet(
_amount,
_maxPerWallet
);
require(
_availableAmount >= _amount,
"Not enough tokens available to mint for your wallet"
);
checkPayment(_amount, _pricePerToken, _coinAddress, _feePerToken);
erc1155Contract.mint(msg.sender, _ids, _amounts);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/AccessControl.sol)
pragma solidity ^0.8.20;
import {IAccessControl} from "./IAccessControl.sol";
import {Context} from "../utils/Context.sol";
import {ERC165} from "../utils/introspection/ERC165.sol";
/**
* @dev Contract module that allows children to implement role-based access
* control mechanisms. This is a lightweight version that doesn't allow enumerating role
* members except through off-chain means by accessing the contract event logs. Some
* applications may benefit from on-chain enumerability, for those cases see
* {AccessControlEnumerable}.
*
* Roles are referred to by their `bytes32` identifier. These should be exposed
* in the external API and be unique. The best way to achieve this is by
* using `public constant` hash digests:
*
* ```solidity
* bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
* ```
*
* Roles can be used to represent a set of permissions. To restrict access to a
* function call, use {hasRole}:
*
* ```solidity
* function foo() public {
* require(hasRole(MY_ROLE, msg.sender));
* ...
* }
* ```
*
* Roles can be granted and revoked dynamically via the {grantRole} and
* {revokeRole} functions. Each role has an associated admin role, and only
* accounts that have a role's admin role can call {grantRole} and {revokeRole}.
*
* By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
* that only accounts with this role will be able to grant or revoke other
* roles. More complex role relationships can be created by using
* {_setRoleAdmin}.
*
* WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
* grant and revoke this role. Extra precautions should be taken to secure
* accounts that have been granted it. We recommend using {AccessControlDefaultAdminRules}
* to enforce additional security measures for this role.
*/
abstract contract AccessControl is Context, IAccessControl, ERC165 {
struct RoleData {
mapping(address account => bool) hasRole;
bytes32 adminRole;
}
mapping(bytes32 role => RoleData) private _roles;
bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;
/**
* @dev Modifier that checks that an account has a specific role. Reverts
* with an {AccessControlUnauthorizedAccount} error including the required role.
*/
modifier onlyRole(bytes32 role) {
_checkRole(role);
_;
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);
}
/**
* @dev Returns `true` if `account` has been granted `role`.
*/
function hasRole(bytes32 role, address account) public view virtual returns (bool) {
return _roles[role].hasRole[account];
}
/**
* @dev Reverts with an {AccessControlUnauthorizedAccount} error if `_msgSender()`
* is missing `role`. Overriding this function changes the behavior of the {onlyRole} modifier.
*/
function _checkRole(bytes32 role) internal view virtual {
_checkRole(role, _msgSender());
}
/**
* @dev Reverts with an {AccessControlUnauthorizedAccount} error if `account`
* is missing `role`.
*/
function _checkRole(bytes32 role, address account) internal view virtual {
if (!hasRole(role, account)) {
revert AccessControlUnauthorizedAccount(account, role);
}
}
/**
* @dev Returns the admin role that controls `role`. See {grantRole} and
* {revokeRole}.
*
* To change a role's admin, use {_setRoleAdmin}.
*/
function getRoleAdmin(bytes32 role) public view virtual returns (bytes32) {
return _roles[role].adminRole;
}
/**
* @dev Grants `role` to `account`.
*
* If `account` had not been already granted `role`, emits a {RoleGranted}
* event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*
* May emit a {RoleGranted} event.
*/
function grantRole(bytes32 role, address account) public virtual onlyRole(getRoleAdmin(role)) {
_grantRole(role, account);
}
/**
* @dev Revokes `role` from `account`.
*
* If `account` had been granted `role`, emits a {RoleRevoked} event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*
* May emit a {RoleRevoked} event.
*/
function revokeRole(bytes32 role, address account) public virtual onlyRole(getRoleAdmin(role)) {
_revokeRole(role, account);
}
/**
* @dev Revokes `role` from the calling account.
*
* Roles are often managed via {grantRole} and {revokeRole}: this function's
* purpose is to provide a mechanism for accounts to lose their privileges
* if they are compromised (such as when a trusted device is misplaced).
*
* If the calling account had been revoked `role`, emits a {RoleRevoked}
* event.
*
* Requirements:
*
* - the caller must be `callerConfirmation`.
*
* May emit a {RoleRevoked} event.
*/
function renounceRole(bytes32 role, address callerConfirmation) public virtual {
if (callerConfirmation != _msgSender()) {
revert AccessControlBadConfirmation();
}
_revokeRole(role, callerConfirmation);
}
/**
* @dev Sets `adminRole` as ``role``'s admin role.
*
* Emits a {RoleAdminChanged} event.
*/
function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
bytes32 previousAdminRole = getRoleAdmin(role);
_roles[role].adminRole = adminRole;
emit RoleAdminChanged(role, previousAdminRole, adminRole);
}
/**
* @dev Attempts to grant `role` to `account` and returns a boolean indicating if `role` was granted.
*
* Internal function without access restriction.
*
* May emit a {RoleGranted} event.
*/
function _grantRole(bytes32 role, address account) internal virtual returns (bool) {
if (!hasRole(role, account)) {
_roles[role].hasRole[account] = true;
emit RoleGranted(role, account, _msgSender());
return true;
} else {
return false;
}
}
/**
* @dev Attempts to revoke `role` to `account` and returns a boolean indicating if `role` was revoked.
*
* Internal function without access restriction.
*
* May emit a {RoleRevoked} event.
*/
function _revokeRole(bytes32 role, address account) internal virtual returns (bool) {
if (hasRole(role, account)) {
_roles[role].hasRole[account] = false;
emit RoleRevoked(role, account, _msgSender());
return true;
} else {
return false;
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/IAccessControl.sol)
pragma solidity ^0.8.20;
/**
* @dev External interface of AccessControl declared to support ERC165 detection.
*/
interface IAccessControl {
/**
* @dev The `account` is missing a role.
*/
error AccessControlUnauthorizedAccount(address account, bytes32 neededRole);
/**
* @dev The caller of a function is not the expected one.
*
* NOTE: Don't confuse with {AccessControlUnauthorizedAccount}.
*/
error AccessControlBadConfirmation();
/**
* @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
*
* `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
* {RoleAdminChanged} not being emitted signaling this.
*/
event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);
/**
* @dev Emitted when `account` is granted `role`.
*
* `sender` is the account that originated the contract call, an admin role
* bearer except when using {AccessControl-_setupRole}.
*/
event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);
/**
* @dev Emitted when `account` is revoked `role`.
*
* `sender` is the account that originated the contract call:
* - if using `revokeRole`, it is the admin role bearer
* - if using `renounceRole`, it is the role bearer (i.e. `account`)
*/
event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);
/**
* @dev Returns `true` if `account` has been granted `role`.
*/
function hasRole(bytes32 role, address account) external view returns (bool);
/**
* @dev Returns the admin role that controls `role`. See {grantRole} and
* {revokeRole}.
*
* To change a role's admin, use {AccessControl-_setRoleAdmin}.
*/
function getRoleAdmin(bytes32 role) external view returns (bytes32);
/**
* @dev Grants `role` to `account`.
*
* If `account` had not been already granted `role`, emits a {RoleGranted}
* event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*/
function grantRole(bytes32 role, address account) external;
/**
* @dev Revokes `role` from `account`.
*
* If `account` had been granted `role`, emits a {RoleRevoked} event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*/
function revokeRole(bytes32 role, address account) external;
/**
* @dev Revokes `role` from the calling account.
*
* Roles are often managed via {grantRole} and {revokeRole}: this function's
* purpose is to provide a mechanism for accounts to lose their privileges
* if they are compromised (such as when a trusted device is misplaced).
*
* If the calling account had been granted `role`, emits a {RoleRevoked}
* event.
*
* Requirements:
*
* - the caller must be `callerConfirmation`.
*/
function renounceRole(bytes32 role, address callerConfirmation) external;
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)
pragma solidity ^0.8.20;
import {Context} from "../utils/Context.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* The initial owner is set to the address provided by the deployer. This can
* later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
/**
* @dev The caller account is not authorized to perform an operation.
*/
error OwnableUnauthorizedAccount(address account);
/**
* @dev The owner is not a valid owner account. (eg. `address(0)`)
*/
error OwnableInvalidOwner(address owner);
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the address provided by the deployer as the initial owner.
*/
constructor(address initialOwner) {
if (initialOwner == address(0)) {
revert OwnableInvalidOwner(address(0));
}
_transferOwnership(initialOwner);
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
_checkOwner();
_;
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
if (owner() != _msgSender()) {
revert OwnableUnauthorizedAccount(_msgSender());
}
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby disabling any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
if (newOwner == address(0)) {
revert OwnableInvalidOwner(address(0));
}
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.20;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
/**
* @dev Returns the value of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the value of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves a `value` amount of tokens from the caller's account to `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, uint256 value) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets a `value` amount of tokens as the allowance of `spender` over the
* caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 value) external returns (bool);
/**
* @dev Moves a `value` amount of tokens from `from` to `to` using the
* allowance mechanism. `value` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(address from, address to, uint256 value) external returns (bool);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)
pragma solidity ^0.8.20;
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
function _contextSuffixLength() internal view virtual returns (uint256) {
return 0;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/ECDSA.sol)
pragma solidity ^0.8.20;
/**
* @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
*
* These functions can be used to verify that a message was signed by the holder
* of the private keys of a given address.
*/
library ECDSA {
enum RecoverError {
NoError,
InvalidSignature,
InvalidSignatureLength,
InvalidSignatureS
}
/**
* @dev The signature derives the `address(0)`.
*/
error ECDSAInvalidSignature();
/**
* @dev The signature has an invalid length.
*/
error ECDSAInvalidSignatureLength(uint256 length);
/**
* @dev The signature has an S value that is in the upper half order.
*/
error ECDSAInvalidSignatureS(bytes32 s);
/**
* @dev Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not
* return address(0) without also returning an error description. Errors are documented using an enum (error type)
* and a bytes32 providing additional information about the error.
*
* If no error is returned, then the address can be used for verification purposes.
*
* The `ecrecover` EVM precompile allows for malleable (non-unique) signatures:
* this function rejects them by requiring the `s` value to be in the lower
* half order, and the `v` value to be either 27 or 28.
*
* IMPORTANT: `hash` _must_ be the result of a hash operation for the
* verification to be secure: it is possible to craft signatures that
* recover to arbitrary addresses for non-hashed data. A safe way to ensure
* this is by receiving a hash of the original message (which may otherwise
* be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it.
*
* Documentation for signature generation:
* - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]
* - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]
*/
function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError, bytes32) {
if (signature.length == 65) {
bytes32 r;
bytes32 s;
uint8 v;
// ecrecover takes the signature parameters, and the only way to get them
// currently is to use assembly.
/// @solidity memory-safe-assembly
assembly {
r := mload(add(signature, 0x20))
s := mload(add(signature, 0x40))
v := byte(0, mload(add(signature, 0x60)))
}
return tryRecover(hash, v, r, s);
} else {
return (address(0), RecoverError.InvalidSignatureLength, bytes32(signature.length));
}
}
/**
* @dev Returns the address that signed a hashed message (`hash`) with
* `signature`. This address can then be used for verification purposes.
*
* The `ecrecover` EVM precompile allows for malleable (non-unique) signatures:
* this function rejects them by requiring the `s` value to be in the lower
* half order, and the `v` value to be either 27 or 28.
*
* IMPORTANT: `hash` _must_ be the result of a hash operation for the
* verification to be secure: it is possible to craft signatures that
* recover to arbitrary addresses for non-hashed data. A safe way to ensure
* this is by receiving a hash of the original message (which may otherwise
* be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it.
*/
function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
(address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, signature);
_throwError(error, errorArg);
return recovered;
}
/**
* @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.
*
* See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]
*/
function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError, bytes32) {
unchecked {
bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);
// We do not check for an overflow here since the shift operation results in 0 or 1.
uint8 v = uint8((uint256(vs) >> 255) + 27);
return tryRecover(hash, v, r, s);
}
}
/**
* @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.
*/
function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {
(address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, r, vs);
_throwError(error, errorArg);
return recovered;
}
/**
* @dev Overload of {ECDSA-tryRecover} that receives the `v`,
* `r` and `s` signature fields separately.
*/
function tryRecover(
bytes32 hash,
uint8 v,
bytes32 r,
bytes32 s
) internal pure returns (address, RecoverError, bytes32) {
// EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
// unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines
// the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most
// signatures from current libraries generate a unique signature with an s-value in the lower half order.
//
// If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value
// with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or
// vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept
// these malleable signatures as well.
if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {
return (address(0), RecoverError.InvalidSignatureS, s);
}
// If the signature is valid (and not malleable), return the signer address
address signer = ecrecover(hash, v, r, s);
if (signer == address(0)) {
return (address(0), RecoverError.InvalidSignature, bytes32(0));
}
return (signer, RecoverError.NoError, bytes32(0));
}
/**
* @dev Overload of {ECDSA-recover} that receives the `v`,
* `r` and `s` signature fields separately.
*/
function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {
(address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, v, r, s);
_throwError(error, errorArg);
return recovered;
}
/**
* @dev Optionally reverts with the corresponding custom error according to the `error` argument provided.
*/
function _throwError(RecoverError error, bytes32 errorArg) private pure {
if (error == RecoverError.NoError) {
return; // no error: do nothing
} else if (error == RecoverError.InvalidSignature) {
revert ECDSAInvalidSignature();
} else if (error == RecoverError.InvalidSignatureLength) {
revert ECDSAInvalidSignatureLength(uint256(errorArg));
} else if (error == RecoverError.InvalidSignatureS) {
revert ECDSAInvalidSignatureS(errorArg);
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/ERC165.sol)
pragma solidity ^0.8.20;
import {IERC165} from "./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);
* }
* ```
*/
abstract contract ERC165 is IERC165 {
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {
return interfaceId == type(IERC165).interfaceId;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol)
pragma solidity ^0.8.20;
/**
* @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
// @author: Buildtree - Powered by NFT Studios
pragma solidity ^0.8.18;
interface IERC1155Mintable {
function mint(
address _to,
uint256[] memory _ids,
uint256[] memory _values
) external;
function totalMinted() external returns (uint256);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
library DTOs {
struct Recipient {
address addr;
uint256 percentage;
}
struct Create721ContractDto {
address owner;
string uuid;
string name;
string symbol;
bool transferLocked;
uint96 royaltyPercentage;
uint256 maxSupply;
address[] transferBlockedAddresses;
address signer;
Recipient[] recipients;
uint256 paymentAmount;
string minterKind;
uint256[] extras;
bytes signature;
}
struct Create1155ContractDto {
address owner;
string uuid;
string name;
string symbol;
bool transferLocked;
uint96 royaltyPercentage;
uint256[] availableTokens;
address[] transferBlockedAddresses;
address signer;
Recipient[] recipients;
uint256 paymentAmount;
string minterKind;
uint256[] extras;
bytes signature;
}
}// SPDX-License-Identifier: MIT
// @author: Buildtree - Powered by NFT Studios
pragma solidity ^0.8.18;
abstract contract LimitPerWallet {
mapping(address => uint256) public mintsPerWallet;
/**
* @dev Checks if the given wallet address can mint more tokens.
* If the desired amount to be minted exceeds the amount of tokens left allowed to be minted by the given address
* it will return the maximum amount of tokens that address can mint.
*
* If the given address can not mint more tokens it will revert the transaction.
*/
function getAvailableForWallet(
uint256 _amount,
uint256 _maxPerWallet
) internal returns (uint256) {
// If maxPerWallet is 0 it means that there is no limit per wallet.
if (_maxPerWallet == 0) {
return _amount;
}
if (mintsPerWallet[msg.sender] + _amount > _maxPerWallet) {
_amount = _maxPerWallet - mintsPerWallet[msg.sender];
}
require(
_amount > 0,
"LimitPerWallet: The caller address can not mint more tokens"
);
mintsPerWallet[msg.sender] += _amount;
return _amount;
}
}// SPDX-License-Identifier: MIT
// @author: Buildtree - Powered by NFT Studios
pragma solidity ^0.8.18;
import {DTOs} from "./../libraries/dtos.sol";
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
abstract contract Payable {
address public feeRecipient;
mapping(address => uint256) private _totalEarnings;
modifier onlyRecipient() {
bool isRecipient = false;
for (uint256 i = 0; i < recipients.length; i++) {
if (recipients[i].addr == msg.sender) {
isRecipient = true;
break;
}
}
require(
isRecipient,
"Payable: The caller is not an allowed withdrawer"
);
_;
}
uint256 constant BASIS_POINTS = 10000;
DTOs.Recipient[] public recipients;
function initPayable(
address _feeRecipient,
DTOs.Recipient[] memory _recipients
) internal {
feeRecipient = _feeRecipient;
for (uint256 i = 0; i < _recipients.length; i++) {
recipients.push(_recipients[i]);
}
}
function checkPayment(
uint256 _amount,
uint256 _pricePerToken,
address _coinAddress,
uint256 _feePerToken
) internal {
uint totalPrice = _amount * _pricePerToken;
uint totalFee = _amount * _feePerToken;
if (_coinAddress == address(0)) {
handleNativePayment(totalPrice, totalFee);
} else {
handleERC20Payment(_coinAddress, totalPrice, totalFee);
}
}
function withdraw(address _coinAddress) external onlyRecipient {
if (_coinAddress == address(0)) {
handleNativeWithdraw();
} else {
handleERC20Withdraw(_coinAddress);
}
}
function totalEarnings(address _coin) external view returns (uint256) {
uint256 totalBalance = address(this).balance;
if (_coin != address(0)) {
IERC20 coin = IERC20(_coin);
totalBalance = coin.balanceOf(address(this));
}
return _totalEarnings[_coin] + totalBalance;
}
function mulScale(
uint256 x,
uint256 y,
uint256 scale
) internal pure returns (uint256) {
uint256 a = x / scale;
uint256 b = x % scale;
uint256 c = y / scale;
uint256 d = y % scale;
return a * c * scale + a * d + b * c + (b * d) / scale;
}
function handleNativePayment(
uint256 totalPrice,
uint256 totalFee
) internal {
uint total = totalPrice + totalFee;
require(
msg.value >= total,
"Payable: Not enough Ether provided to mint"
);
if (msg.value > total) {
payable(msg.sender).transfer(msg.value - total);
}
if (totalFee > 0) {
(bool success, ) = address(feeRecipient).call{value: totalFee}("");
require(success, "Payable: Transfer failed");
}
}
function handleERC20Payment(
address coinAddress,
uint256 totalPrice,
uint256 totalFee
) internal {
IERC20 coin = IERC20(coinAddress);
coin.transferFrom(msg.sender, address(this), totalPrice);
if (msg.value > totalFee) {
payable(msg.sender).transfer(msg.value - totalFee);
}
if (totalFee > 0) {
(bool success, ) = address(feeRecipient).call{value: totalFee}("");
require(success, "Payable: Transfer failed");
}
}
function handleNativeWithdraw() internal {
uint256 totalBalance = address(this).balance;
_totalEarnings[address(0)] += totalBalance;
for (uint256 i; i < recipients.length; i++) {
(bool success, ) = address(recipients[i].addr).call{
value: mulScale(
totalBalance,
recipients[i].percentage,
BASIS_POINTS
)
}("");
require(success, "Payable: Transfer failed");
}
}
function handleERC20Withdraw(address coinAddress) internal {
IERC20 coin = IERC20(coinAddress);
uint256 totalBalance = coin.balanceOf(address(this));
_totalEarnings[coinAddress] += totalBalance;
for (uint256 i; i < recipients.length; i++) {
bool success = coin.transfer(
recipients[i].addr,
mulScale(totalBalance, recipients[i].percentage, BASIS_POINTS)
);
require(success, "Payable: Transfer failed");
}
}
}// SPDX-License-Identifier: MIT
// @author: Buildtree - Powered by NFT Studios
pragma solidity ^0.8.18;
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
import {ECDSA} from "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";
abstract contract SignatureProtected is Ownable {
address public signerAddress;
constructor() Ownable(msg.sender) {}
function initSignatureProtected(address _signerAddress) internal {
signerAddress = _signerAddress;
}
function setSignerAddress(address _signerAddress) external onlyOwner {
signerAddress = _signerAddress;
}
function validateSignature(
bytes memory packedParams,
bytes calldata signature
) internal view {
require(
ECDSA.recover(generateHash(packedParams), signature) ==
signerAddress,
"SignatureProtected: Invalid signature for the caller"
);
}
function generateHash(
bytes memory packedParams
) private view returns (bytes32) {
bytes32 _hash = keccak256(
bytes.concat(
abi.encodePacked(address(this), msg.sender),
packedParams
)
);
bytes memory result = abi.encodePacked(
"\x19Ethereum Signed Message:\n32",
_hash
);
return keccak256(result);
}
}// SPDX-License-Identifier: MIT
// @author: Buildtree - Powered by NFT Studios
pragma solidity ^0.8.18;
abstract contract SupplyControl1155 {
uint256[] internal availableTokens;
uint256 public maxSupply;
function initSupplyControl(uint256[] memory _availableTokens) internal {
availableTokens = new uint256[](_availableTokens.length + 1);
availableTokens[0] = 0;
for (uint256 i = 0; i < _availableTokens.length; i++) {
availableTokens[i + 1] = _availableTokens[i];
maxSupply += _availableTokens[i];
}
}
/**
* @dev Checks if there are tokens left to be minted.
* If there are not enough tokens for the given amount to mint, it will return whatever is left.
*
* If there are no tokens left to be minted it will revert the transaction.
*/
function _getAvailableTokens(
uint256 _amountToMint
) internal view returns (uint256) {
uint256 _availableTokens = getAvailableTokens();
require(_availableTokens > 0, "SupplyControl: No tokens left to mint");
if (_availableTokens < _amountToMint) {
return _availableTokens;
}
return _amountToMint;
}
function getAvailableTokens() public view returns (uint256) {
uint256 _availableTokens;
for (uint256 i = 1; i < availableTokens.length; i++) {
_availableTokens += availableTokens[i];
}
return _availableTokens;
}
}{
"evmVersion": "paris",
"optimizer": {
"enabled": false,
"runs": 200
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[],"name":"ECDSAInvalidSignature","type":"error"},{"inputs":[{"internalType":"uint256","name":"length","type":"uint256"}],"name":"ECDSAInvalidSignatureLength","type":"error"},{"inputs":[{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"ECDSAInvalidSignatureS","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[],"name":"contractType","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"erc1155Contract","outputs":[{"internalType":"contract IERC1155Mintable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeRecipient","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAvailableTokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"signerAddress","type":"address"},{"internalType":"address","name":"feeRecipient","type":"address"},{"internalType":"uint256[]","name":"availableTokens","type":"uint256[]"},{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint256","name":"percentage","type":"uint256"}],"internalType":"struct DTOs.Recipient[]","name":"recipients","type":"tuple[]"},{"internalType":"address","name":"erc1155Address","type":"address"}],"name":"init","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_ids","type":"uint256[]"},{"internalType":"uint256[]","name":"_amounts","type":"uint256[]"},{"internalType":"uint256","name":"_maxPerWallet","type":"uint256"},{"internalType":"uint256","name":"_pricePerToken","type":"uint256"},{"internalType":"address","name":"_coinAddress","type":"address"},{"internalType":"uint256","name":"_feePerToken","type":"uint256"},{"internalType":"bytes","name":"_signature","type":"bytes"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"mintsPerWallet","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"recipients","outputs":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint256","name":"percentage","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_signerAddress","type":"address"}],"name":"setSignerAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"signerAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_coin","type":"address"}],"name":"totalEarnings","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_coinAddress","type":"address"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
60806040523480156200001157600080fd5b5033600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603620000885760006040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081526004016200007f9190620001ab565b60405180910390fd5b6200009981620000a060201b60201c565b50620001c8565b6000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620001938262000166565b9050919050565b620001a58162000186565b82525050565b6000602082019050620001c260008301846200019a565b92915050565b61316280620001d86000396000f3fe6080604052600436106100fe5760003560e01c80637a56497011610095578063d1bc76a111610064578063d1bc76a114610311578063d5abeb011461034f578063db8612b01461037a578063e35568cb14610396578063f2fde38b146103c1576100fe565b80637a56497014610253578063851170051461027e5780638da5cb5b146102bb578063cb2ef6f7146102e6576100fe565b806351cff8d9116100d157806351cff8d9146101bd57806354fd4d50146101e65780635b7633d014610211578063715018a61461023c576100fe565b8063046dc16614610103578063128a3abf1461012c57806346904840146101555780634d0df5fc14610180575b600080fd5b34801561010f57600080fd5b5061012a60048036038101906101259190611f64565b6103ea565b005b34801561013857600080fd5b50610153600480360381019061014e9190612238565b610436565b005b34801561016157600080fd5b5061016a610515565b604051610177919061230c565b60405180910390f35b34801561018c57600080fd5b506101a760048036038101906101a29190611f64565b610539565b6040516101b49190612336565b60405180910390f35b3480156101c957600080fd5b506101e460048036038101906101df9190611f64565b610551565b005b3480156101f257600080fd5b506101fb610680565b60405161020891906123d0565b60405180910390f35b34801561021d57600080fd5b506102266106b9565b604051610233919061230c565b60405180910390f35b34801561024857600080fd5b506102516106df565b005b34801561025f57600080fd5b506102686106f3565b6040516102759190612451565b60405180910390f35b34801561028a57600080fd5b506102a560048036038101906102a09190611f64565b610719565b6040516102b29190612336565b60405180910390f35b3480156102c757600080fd5b506102d0610829565b6040516102dd919061230c565b60405180910390f35b3480156102f257600080fd5b506102fb610853565b60405161030891906123d0565b60405180910390f35b34801561031d57600080fd5b506103386004803603810190610333919061246c565b61088c565b604051610346929190612499565b60405180910390f35b34801561035b57600080fd5b506103646108e0565b6040516103719190612336565b60405180910390f35b610394600480360381019061038f919061251d565b6108e6565b005b3480156103a257600080fd5b506103ab610c07565b6040516103b89190612336565b60405180910390f35b3480156103cd57600080fd5b506103e860048036038101906103e39190611f64565b610c5f565b005b6103f2610ce5565b80600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60001515600860149054906101000a900460ff1615151461048c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161048390612663565b60405180910390fd5b61049586610d6c565b61049e83610e32565b6104a785610f5c565b6104b18483610fa0565b80600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001600860146101000a81548160ff021916908315150217905550505050505050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60056020528060005260406000206000915090505481565b6000805b6002805490508110156105f0573373ffffffffffffffffffffffffffffffffffffffff166002828154811061058d5761058c612683565b5b906000526020600020906002020160000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16036105e357600191506105f0565b8080600101915050610555565b5080610631576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062890612724565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036106725761066d611097565b61067c565b61067b82611236565b5b5050565b6040518060400160405280600581526020017f312e312e3000000000000000000000000000000000000000000000000000000081525081565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6106e7610ce5565b6106f16000610d6c565b565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080479050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16146107d65760008390508073ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401610791919061230c565b602060405180830381865afa1580156107ae573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107d29190612759565b9150505b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461082191906127b5565b915050919050565b6000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6040518060400160405280601081526020017f5049434b2d4d494e5445522d313135350000000000000000000000000000000081525081565b6002818154811061089c57600080fd5b90600052602060002090600202016000915090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010154905082565b60045481565b610916868686866040516020016109009493929190612852565b604051602081830303815290604052838361146b565b6000805b8951811015610ac95760008a828151811061093857610937612683565b5b602002602001015111801561096b57506003805490508a828151811061096157610960612683565b5b6020026020010151105b6109aa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109a1906128ec565b60405180910390fd5b600060038b83815181106109c1576109c0612683565b5b6020026020010151815481106109da576109d9612683565b5b906000526020600020015490508982815181106109fa576109f9612683565b5b6020026020010151811015610a2a57808a8381518110610a1d57610a1c612683565b5b6020026020010181815250505b898281518110610a3d57610a3c612683565b5b602002602001015160038c8481518110610a5a57610a59612683565b5b602002602001015181548110610a7357610a72612683565b5b906000526020600020016000828254610a8c919061290c565b92505081905550898281518110610aa657610aa5612683565b5b602002602001015183610ab991906127b5565b925050808060010191505061091a565b5060008111610b0d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b04906129b2565b60405180910390fd5b6000610b198289611555565b905081811015610b5e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b5590612a44565b60405180910390fd5b610b6a828888886116a9565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16639727756a338c8c6040518463ffffffff1660e01b8152600401610bc993929190612b22565b600060405180830381600087803b158015610be357600080fd5b505af1158015610bf7573d6000803e3d6000fd5b5050505050505050505050505050565b6000806000600190505b600380549050811015610c575760038181548110610c3257610c31612683565b5b906000526020600020015482610c4891906127b5565b91508080600101915050610c11565b508091505090565b610c67610ce5565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610cd95760006040517f1e4fbdf7000000000000000000000000000000000000000000000000000000008152600401610cd0919061230c565b60405180910390fd5b610ce281610d6c565b50565b610ced611720565b73ffffffffffffffffffffffffffffffffffffffff16610d0b610829565b73ffffffffffffffffffffffffffffffffffffffff1614610d6a57610d2e611720565b6040517f118cdaa7000000000000000000000000000000000000000000000000000000008152600401610d61919061230c565b60405180910390fd5b565b6000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60018151610e4091906127b5565b67ffffffffffffffff811115610e5957610e58611fa7565b5b604051908082528060200260200182016040528015610e875781602001602082028036833780820191505090505b5060039080519060200190610e9d929190611e88565b5060006003600081548110610eb557610eb4612683565b5b906000526020600020018190555060005b8151811015610f5857818181518110610ee257610ee1612683565b5b60200260200101516003600183610ef991906127b5565b81548110610f0a57610f09612683565b5b9060005260206000200181905550818181518110610f2b57610f2a612683565b5b602002602001015160046000828254610f4491906127b5565b925050819055508080600101915050610ec6565b5050565b80600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060005b815181101561109257600282828151811061100157611000612683565b5b6020026020010151908060018154018082558091505060019003906000526020600020906002020160009091909190915060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506020820151816001015550508080600101915050610fe3565b505050565b600047905080600160008073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546110eb91906127b5565b9250508190555060005b6002805490508110156112325760006002828154811061111857611117612683565b5b906000526020600020906002020160000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611192846002858154811061117857611177612683565b5b906000526020600020906002020160010154612710611728565b60405161119e90612b98565b60006040518083038185875af1925050503d80600081146111db576040519150601f19603f3d011682016040523d82523d6000602084013e6111e0565b606091505b5050905080611224576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161121b90612bf9565b60405180910390fd5b5080806001019150506110f5565b5050565b600081905060008173ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401611276919061230c565b602060405180830381865afa158015611293573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112b79190612759565b905080600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461130891906127b5565b9250508190555060005b6002805490508110156114655760008373ffffffffffffffffffffffffffffffffffffffff1663a9059cbb6002848154811061135157611350612683565b5b906000526020600020906002020160000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166113b5866002878154811061139b5761139a612683565b5b906000526020600020906002020160010154612710611728565b6040518363ffffffff1660e01b81526004016113d2929190612499565b6020604051808303816000875af11580156113f1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114159190612c51565b905080611457576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161144e90612bf9565b60405180910390fd5b508080600101915050611312565b50505050565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166114fa6114b0856117da565b84848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505061185e565b73ffffffffffffffffffffffffffffffffffffffff1614611550576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161154790612cf0565b60405180910390fd5b505050565b6000808203611566578290506116a3565b8183600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546115b291906127b5565b111561160657600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482611603919061290c565b92505b60008311611649576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161164090612d82565b60405180910390fd5b82600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461169891906127b5565b925050819055508290505b92915050565b600083856116b79190612da2565b9050600082866116c79190612da2565b9050600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff160361170c57611707828261188a565b611718565b611717848383611a15565b5b505050505050565b600033905090565b60008082856117379190612e13565b9050600083866117479190612e44565b9050600084866117579190612e13565b9050600085876117679190612e44565b90508581846117769190612da2565b6117809190612e13565b828461178c9190612da2565b82866117989190612da2565b8885886117a59190612da2565b6117af9190612da2565b6117b991906127b5565b6117c391906127b5565b6117cd91906127b5565b9450505050509392505050565b60008030336040516020016117f0929190612e75565b60405160208183030381529060405283604051602001611811929190612edd565b60405160208183030381529060405280519060200120905060008160405160200161183c9190612f83565b6040516020818303038152906040529050808051906020012092505050919050565b60008060008061186e8686611bd4565b92509250925061187e8282611c30565b82935050505092915050565b6000818361189891906127b5565b9050803410156118dd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118d49061301b565b60405180910390fd5b80341115611938573373ffffffffffffffffffffffffffffffffffffffff166108fc823461190b919061290c565b9081150290604051600060405180830381858888f19350505050158015611936573d6000803e3d6000fd5b505b6000821115611a105760008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168360405161198890612b98565b60006040518083038185875af1925050503d80600081146119c5576040519150601f19603f3d011682016040523d82523d6000602084013e6119ca565b606091505b5050905080611a0e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a0590612bf9565b60405180910390fd5b505b505050565b60008390508073ffffffffffffffffffffffffffffffffffffffff166323b872dd3330866040518463ffffffff1660e01b8152600401611a579392919061303b565b6020604051808303816000875af1158015611a76573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a9a9190612c51565b5081341115611af6573373ffffffffffffffffffffffffffffffffffffffff166108fc8334611ac9919061290c565b9081150290604051600060405180830381858888f19350505050158015611af4573d6000803e3d6000fd5b505b6000821115611bce5760008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1683604051611b4690612b98565b60006040518083038185875af1925050503d8060008114611b83576040519150601f19603f3d011682016040523d82523d6000602084013e611b88565b606091505b5050905080611bcc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bc390612bf9565b60405180910390fd5b505b50505050565b60008060006041845103611c195760008060006020870151925060408701519150606087015160001a9050611c0b88828585611d94565b955095509550505050611c29565b60006002855160001b9250925092505b9250925092565b60006003811115611c4457611c43613072565b5b826003811115611c5757611c56613072565b5b0315611d905760016003811115611c7157611c70613072565b5b826003811115611c8457611c83613072565b5b03611cbb576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60026003811115611ccf57611cce613072565b5b826003811115611ce257611ce1613072565b5b03611d27578060001c6040517ffce698f7000000000000000000000000000000000000000000000000000000008152600401611d1e9190612336565b60405180910390fd5b600380811115611d3a57611d39613072565b5b826003811115611d4d57611d4c613072565b5b03611d8f57806040517fd78bce0c000000000000000000000000000000000000000000000000000000008152600401611d8691906130b0565b60405180910390fd5b5b5050565b60008060007f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08460001c1115611dd4576000600385925092509250611e7e565b600060018888888860405160008152602001604052604051611df994939291906130e7565b6020604051602081039080840390855afa158015611e1b573d6000803e3d6000fd5b505050602060405103519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611e6f57600060016000801b93509350935050611e7e565b8060008060001b935093509350505b9450945094915050565b828054828255906000526020600020908101928215611ec4579160200282015b82811115611ec3578251825591602001919060010190611ea8565b5b509050611ed19190611ed5565b5090565b5b80821115611eee576000816000905550600101611ed6565b5090565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000611f3182611f06565b9050919050565b611f4181611f26565b8114611f4c57600080fd5b50565b600081359050611f5e81611f38565b92915050565b600060208284031215611f7a57611f79611efc565b5b6000611f8884828501611f4f565b91505092915050565b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b611fdf82611f96565b810181811067ffffffffffffffff82111715611ffe57611ffd611fa7565b5b80604052505050565b6000612011611ef2565b905061201d8282611fd6565b919050565b600067ffffffffffffffff82111561203d5761203c611fa7565b5b602082029050602081019050919050565b600080fd5b6000819050919050565b61206681612053565b811461207157600080fd5b50565b6000813590506120838161205d565b92915050565b600061209c61209784612022565b612007565b905080838252602082019050602084028301858111156120bf576120be61204e565b5b835b818110156120e857806120d48882612074565b8452602084019350506020810190506120c1565b5050509392505050565b600082601f83011261210757612106611f91565b5b8135612117848260208601612089565b91505092915050565b600067ffffffffffffffff82111561213b5761213a611fa7565b5b602082029050602081019050919050565b600080fd5b6000604082840312156121675761216661214c565b5b6121716040612007565b9050600061218184828501611f4f565b600083015250602061219584828501612074565b60208301525092915050565b60006121b46121af84612120565b612007565b905080838252602082019050604084028301858111156121d7576121d661204e565b5b835b8181101561220057806121ec8882612151565b8452602084019350506040810190506121d9565b5050509392505050565b600082601f83011261221f5761221e611f91565b5b813561222f8482602086016121a1565b91505092915050565b60008060008060008060c0878903121561225557612254611efc565b5b600061226389828a01611f4f565b965050602061227489828a01611f4f565b955050604061228589828a01611f4f565b945050606087013567ffffffffffffffff8111156122a6576122a5611f01565b5b6122b289828a016120f2565b935050608087013567ffffffffffffffff8111156122d3576122d2611f01565b5b6122df89828a0161220a565b92505060a06122f089828a01611f4f565b9150509295509295509295565b61230681611f26565b82525050565b600060208201905061232160008301846122fd565b92915050565b61233081612053565b82525050565b600060208201905061234b6000830184612327565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561238b578082015181840152602081019050612370565b60008484015250505050565b60006123a282612351565b6123ac818561235c565b93506123bc81856020860161236d565b6123c581611f96565b840191505092915050565b600060208201905081810360008301526123ea8184612397565b905092915050565b6000819050919050565b600061241761241261240d84611f06565b6123f2565b611f06565b9050919050565b6000612429826123fc565b9050919050565b600061243b8261241e565b9050919050565b61244b81612430565b82525050565b60006020820190506124666000830184612442565b92915050565b60006020828403121561248257612481611efc565b5b600061249084828501612074565b91505092915050565b60006040820190506124ae60008301856122fd565b6124bb6020830184612327565b9392505050565b600080fd5b60008083601f8401126124dd576124dc611f91565b5b8235905067ffffffffffffffff8111156124fa576124f96124c2565b5b6020830191508360018202830111156125165761251561204e565b5b9250929050565b60008060008060008060008060e0898b03121561253d5761253c611efc565b5b600089013567ffffffffffffffff81111561255b5761255a611f01565b5b6125678b828c016120f2565b985050602089013567ffffffffffffffff81111561258857612587611f01565b5b6125948b828c016120f2565b97505060406125a58b828c01612074565b96505060606125b68b828c01612074565b95505060806125c78b828c01611f4f565b94505060a06125d88b828c01612074565b93505060c089013567ffffffffffffffff8111156125f9576125f8611f01565b5b6126058b828c016124c7565b92509250509295985092959890939650565b7f436f6e747261637420616c726561647920696e697469616c697a65642e000000600082015250565b600061264d601d8361235c565b915061265882612617565b602082019050919050565b6000602082019050818103600083015261267c81612640565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f50617961626c653a205468652063616c6c6572206973206e6f7420616e20616c60008201527f6c6f776564207769746864726177657200000000000000000000000000000000602082015250565b600061270e60308361235c565b9150612719826126b2565b604082019050919050565b6000602082019050818103600083015261273d81612701565b9050919050565b6000815190506127538161205d565b92915050565b60006020828403121561276f5761276e611efc565b5b600061277d84828501612744565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006127c082612053565b91506127cb83612053565b92508282019050808211156127e3576127e2612786565b5b92915050565b6000819050919050565b6128046127ff82612053565b6127e9565b82525050565b60008160601b9050919050565b60006128228261280a565b9050919050565b600061283482612817565b9050919050565b61284c61284782611f26565b612829565b82525050565b600061285e82876127f3565b60208201915061286e82866127f3565b60208201915061287e828561283b565b60148201915061288e82846127f3565b60208201915081905095945050505050565b7f496e76616c696420494420746f206265206d696e746564000000000000000000600082015250565b60006128d660178361235c565b91506128e1826128a0565b602082019050919050565b60006020820190508181036000830152612905816128c9565b9050919050565b600061291782612053565b915061292283612053565b925082820390508181111561293a57612939612786565b5b92915050565b7f4e6f6e65206f66207468652073656c656374656420746f6b656e7320746f206d60008201527f696e742061726520617661696c61626c65000000000000000000000000000000602082015250565b600061299c60318361235c565b91506129a782612940565b604082019050919050565b600060208201905081810360008301526129cb8161298f565b9050919050565b7f4e6f7420656e6f75676820746f6b656e7320617661696c61626c6520746f206d60008201527f696e7420666f7220796f75722077616c6c657400000000000000000000000000602082015250565b6000612a2e60338361235c565b9150612a39826129d2565b604082019050919050565b60006020820190508181036000830152612a5d81612a21565b9050919050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b612a9981612053565b82525050565b6000612aab8383612a90565b60208301905092915050565b6000602082019050919050565b6000612acf82612a64565b612ad98185612a6f565b9350612ae483612a80565b8060005b83811015612b15578151612afc8882612a9f565b9750612b0783612ab7565b925050600181019050612ae8565b5085935050505092915050565b6000606082019050612b3760008301866122fd565b8181036020830152612b498185612ac4565b90508181036040830152612b5d8184612ac4565b9050949350505050565b600081905092915050565b50565b6000612b82600083612b67565b9150612b8d82612b72565b600082019050919050565b6000612ba382612b75565b9150819050919050565b7f50617961626c653a205472616e73666572206661696c65640000000000000000600082015250565b6000612be360188361235c565b9150612bee82612bad565b602082019050919050565b60006020820190508181036000830152612c1281612bd6565b9050919050565b60008115159050919050565b612c2e81612c19565b8114612c3957600080fd5b50565b600081519050612c4b81612c25565b92915050565b600060208284031215612c6757612c66611efc565b5b6000612c7584828501612c3c565b91505092915050565b7f5369676e617475726550726f7465637465643a20496e76616c6964207369676e60008201527f617475726520666f72207468652063616c6c6572000000000000000000000000602082015250565b6000612cda60348361235c565b9150612ce582612c7e565b604082019050919050565b60006020820190508181036000830152612d0981612ccd565b9050919050565b7f4c696d697450657257616c6c65743a205468652063616c6c657220616464726560008201527f73732063616e206e6f74206d696e74206d6f726520746f6b656e730000000000602082015250565b6000612d6c603b8361235c565b9150612d7782612d10565b604082019050919050565b60006020820190508181036000830152612d9b81612d5f565b9050919050565b6000612dad82612053565b9150612db883612053565b9250828202612dc681612053565b91508282048414831517612ddd57612ddc612786565b5b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000612e1e82612053565b9150612e2983612053565b925082612e3957612e38612de4565b5b828204905092915050565b6000612e4f82612053565b9150612e5a83612053565b925082612e6a57612e69612de4565b5b828206905092915050565b6000612e81828561283b565b601482019150612e91828461283b565b6014820191508190509392505050565b600081519050919050565b6000612eb782612ea1565b612ec18185612b67565b9350612ed181856020860161236d565b80840191505092915050565b6000612ee98285612eac565b9150612ef58284612eac565b91508190509392505050565b600081905092915050565b7f19457468657265756d205369676e6564204d6573736167653a0a333200000000600082015250565b6000612f42601c83612f01565b9150612f4d82612f0c565b601c82019050919050565b6000819050919050565b6000819050919050565b612f7d612f7882612f58565b612f62565b82525050565b6000612f8e82612f35565b9150612f9a8284612f6c565b60208201915081905092915050565b7f50617961626c653a204e6f7420656e6f7567682045746865722070726f76696460008201527f656420746f206d696e7400000000000000000000000000000000000000000000602082015250565b6000613005602a8361235c565b915061301082612fa9565b604082019050919050565b6000602082019050818103600083015261303481612ff8565b9050919050565b600060608201905061305060008301866122fd565b61305d60208301856122fd565b61306a6040830184612327565b949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b6130aa81612f58565b82525050565b60006020820190506130c560008301846130a1565b92915050565b600060ff82169050919050565b6130e1816130cb565b82525050565b60006080820190506130fc60008301876130a1565b61310960208301866130d8565b61311660408301856130a1565b61312360608301846130a1565b9594505050505056fea2646970667358221220a633edbe5a44cdf361f852baa9f7590ab0772c51779732a51964c0f4a7402af764736f6c63430008180033
Deployed Bytecode
0x6080604052600436106100fe5760003560e01c80637a56497011610095578063d1bc76a111610064578063d1bc76a114610311578063d5abeb011461034f578063db8612b01461037a578063e35568cb14610396578063f2fde38b146103c1576100fe565b80637a56497014610253578063851170051461027e5780638da5cb5b146102bb578063cb2ef6f7146102e6576100fe565b806351cff8d9116100d157806351cff8d9146101bd57806354fd4d50146101e65780635b7633d014610211578063715018a61461023c576100fe565b8063046dc16614610103578063128a3abf1461012c57806346904840146101555780634d0df5fc14610180575b600080fd5b34801561010f57600080fd5b5061012a60048036038101906101259190611f64565b6103ea565b005b34801561013857600080fd5b50610153600480360381019061014e9190612238565b610436565b005b34801561016157600080fd5b5061016a610515565b604051610177919061230c565b60405180910390f35b34801561018c57600080fd5b506101a760048036038101906101a29190611f64565b610539565b6040516101b49190612336565b60405180910390f35b3480156101c957600080fd5b506101e460048036038101906101df9190611f64565b610551565b005b3480156101f257600080fd5b506101fb610680565b60405161020891906123d0565b60405180910390f35b34801561021d57600080fd5b506102266106b9565b604051610233919061230c565b60405180910390f35b34801561024857600080fd5b506102516106df565b005b34801561025f57600080fd5b506102686106f3565b6040516102759190612451565b60405180910390f35b34801561028a57600080fd5b506102a560048036038101906102a09190611f64565b610719565b6040516102b29190612336565b60405180910390f35b3480156102c757600080fd5b506102d0610829565b6040516102dd919061230c565b60405180910390f35b3480156102f257600080fd5b506102fb610853565b60405161030891906123d0565b60405180910390f35b34801561031d57600080fd5b506103386004803603810190610333919061246c565b61088c565b604051610346929190612499565b60405180910390f35b34801561035b57600080fd5b506103646108e0565b6040516103719190612336565b60405180910390f35b610394600480360381019061038f919061251d565b6108e6565b005b3480156103a257600080fd5b506103ab610c07565b6040516103b89190612336565b60405180910390f35b3480156103cd57600080fd5b506103e860048036038101906103e39190611f64565b610c5f565b005b6103f2610ce5565b80600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60001515600860149054906101000a900460ff1615151461048c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161048390612663565b60405180910390fd5b61049586610d6c565b61049e83610e32565b6104a785610f5c565b6104b18483610fa0565b80600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001600860146101000a81548160ff021916908315150217905550505050505050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60056020528060005260406000206000915090505481565b6000805b6002805490508110156105f0573373ffffffffffffffffffffffffffffffffffffffff166002828154811061058d5761058c612683565b5b906000526020600020906002020160000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16036105e357600191506105f0565b8080600101915050610555565b5080610631576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062890612724565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036106725761066d611097565b61067c565b61067b82611236565b5b5050565b6040518060400160405280600581526020017f312e312e3000000000000000000000000000000000000000000000000000000081525081565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6106e7610ce5565b6106f16000610d6c565b565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080479050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16146107d65760008390508073ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401610791919061230c565b602060405180830381865afa1580156107ae573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107d29190612759565b9150505b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461082191906127b5565b915050919050565b6000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6040518060400160405280601081526020017f5049434b2d4d494e5445522d313135350000000000000000000000000000000081525081565b6002818154811061089c57600080fd5b90600052602060002090600202016000915090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010154905082565b60045481565b610916868686866040516020016109009493929190612852565b604051602081830303815290604052838361146b565b6000805b8951811015610ac95760008a828151811061093857610937612683565b5b602002602001015111801561096b57506003805490508a828151811061096157610960612683565b5b6020026020010151105b6109aa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109a1906128ec565b60405180910390fd5b600060038b83815181106109c1576109c0612683565b5b6020026020010151815481106109da576109d9612683565b5b906000526020600020015490508982815181106109fa576109f9612683565b5b6020026020010151811015610a2a57808a8381518110610a1d57610a1c612683565b5b6020026020010181815250505b898281518110610a3d57610a3c612683565b5b602002602001015160038c8481518110610a5a57610a59612683565b5b602002602001015181548110610a7357610a72612683565b5b906000526020600020016000828254610a8c919061290c565b92505081905550898281518110610aa657610aa5612683565b5b602002602001015183610ab991906127b5565b925050808060010191505061091a565b5060008111610b0d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b04906129b2565b60405180910390fd5b6000610b198289611555565b905081811015610b5e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b5590612a44565b60405180910390fd5b610b6a828888886116a9565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16639727756a338c8c6040518463ffffffff1660e01b8152600401610bc993929190612b22565b600060405180830381600087803b158015610be357600080fd5b505af1158015610bf7573d6000803e3d6000fd5b5050505050505050505050505050565b6000806000600190505b600380549050811015610c575760038181548110610c3257610c31612683565b5b906000526020600020015482610c4891906127b5565b91508080600101915050610c11565b508091505090565b610c67610ce5565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610cd95760006040517f1e4fbdf7000000000000000000000000000000000000000000000000000000008152600401610cd0919061230c565b60405180910390fd5b610ce281610d6c565b50565b610ced611720565b73ffffffffffffffffffffffffffffffffffffffff16610d0b610829565b73ffffffffffffffffffffffffffffffffffffffff1614610d6a57610d2e611720565b6040517f118cdaa7000000000000000000000000000000000000000000000000000000008152600401610d61919061230c565b60405180910390fd5b565b6000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60018151610e4091906127b5565b67ffffffffffffffff811115610e5957610e58611fa7565b5b604051908082528060200260200182016040528015610e875781602001602082028036833780820191505090505b5060039080519060200190610e9d929190611e88565b5060006003600081548110610eb557610eb4612683565b5b906000526020600020018190555060005b8151811015610f5857818181518110610ee257610ee1612683565b5b60200260200101516003600183610ef991906127b5565b81548110610f0a57610f09612683565b5b9060005260206000200181905550818181518110610f2b57610f2a612683565b5b602002602001015160046000828254610f4491906127b5565b925050819055508080600101915050610ec6565b5050565b80600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060005b815181101561109257600282828151811061100157611000612683565b5b6020026020010151908060018154018082558091505060019003906000526020600020906002020160009091909190915060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506020820151816001015550508080600101915050610fe3565b505050565b600047905080600160008073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546110eb91906127b5565b9250508190555060005b6002805490508110156112325760006002828154811061111857611117612683565b5b906000526020600020906002020160000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611192846002858154811061117857611177612683565b5b906000526020600020906002020160010154612710611728565b60405161119e90612b98565b60006040518083038185875af1925050503d80600081146111db576040519150601f19603f3d011682016040523d82523d6000602084013e6111e0565b606091505b5050905080611224576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161121b90612bf9565b60405180910390fd5b5080806001019150506110f5565b5050565b600081905060008173ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401611276919061230c565b602060405180830381865afa158015611293573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112b79190612759565b905080600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461130891906127b5565b9250508190555060005b6002805490508110156114655760008373ffffffffffffffffffffffffffffffffffffffff1663a9059cbb6002848154811061135157611350612683565b5b906000526020600020906002020160000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166113b5866002878154811061139b5761139a612683565b5b906000526020600020906002020160010154612710611728565b6040518363ffffffff1660e01b81526004016113d2929190612499565b6020604051808303816000875af11580156113f1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114159190612c51565b905080611457576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161144e90612bf9565b60405180910390fd5b508080600101915050611312565b50505050565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166114fa6114b0856117da565b84848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505061185e565b73ffffffffffffffffffffffffffffffffffffffff1614611550576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161154790612cf0565b60405180910390fd5b505050565b6000808203611566578290506116a3565b8183600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546115b291906127b5565b111561160657600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482611603919061290c565b92505b60008311611649576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161164090612d82565b60405180910390fd5b82600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461169891906127b5565b925050819055508290505b92915050565b600083856116b79190612da2565b9050600082866116c79190612da2565b9050600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff160361170c57611707828261188a565b611718565b611717848383611a15565b5b505050505050565b600033905090565b60008082856117379190612e13565b9050600083866117479190612e44565b9050600084866117579190612e13565b9050600085876117679190612e44565b90508581846117769190612da2565b6117809190612e13565b828461178c9190612da2565b82866117989190612da2565b8885886117a59190612da2565b6117af9190612da2565b6117b991906127b5565b6117c391906127b5565b6117cd91906127b5565b9450505050509392505050565b60008030336040516020016117f0929190612e75565b60405160208183030381529060405283604051602001611811929190612edd565b60405160208183030381529060405280519060200120905060008160405160200161183c9190612f83565b6040516020818303038152906040529050808051906020012092505050919050565b60008060008061186e8686611bd4565b92509250925061187e8282611c30565b82935050505092915050565b6000818361189891906127b5565b9050803410156118dd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118d49061301b565b60405180910390fd5b80341115611938573373ffffffffffffffffffffffffffffffffffffffff166108fc823461190b919061290c565b9081150290604051600060405180830381858888f19350505050158015611936573d6000803e3d6000fd5b505b6000821115611a105760008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168360405161198890612b98565b60006040518083038185875af1925050503d80600081146119c5576040519150601f19603f3d011682016040523d82523d6000602084013e6119ca565b606091505b5050905080611a0e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a0590612bf9565b60405180910390fd5b505b505050565b60008390508073ffffffffffffffffffffffffffffffffffffffff166323b872dd3330866040518463ffffffff1660e01b8152600401611a579392919061303b565b6020604051808303816000875af1158015611a76573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a9a9190612c51565b5081341115611af6573373ffffffffffffffffffffffffffffffffffffffff166108fc8334611ac9919061290c565b9081150290604051600060405180830381858888f19350505050158015611af4573d6000803e3d6000fd5b505b6000821115611bce5760008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1683604051611b4690612b98565b60006040518083038185875af1925050503d8060008114611b83576040519150601f19603f3d011682016040523d82523d6000602084013e611b88565b606091505b5050905080611bcc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bc390612bf9565b60405180910390fd5b505b50505050565b60008060006041845103611c195760008060006020870151925060408701519150606087015160001a9050611c0b88828585611d94565b955095509550505050611c29565b60006002855160001b9250925092505b9250925092565b60006003811115611c4457611c43613072565b5b826003811115611c5757611c56613072565b5b0315611d905760016003811115611c7157611c70613072565b5b826003811115611c8457611c83613072565b5b03611cbb576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60026003811115611ccf57611cce613072565b5b826003811115611ce257611ce1613072565b5b03611d27578060001c6040517ffce698f7000000000000000000000000000000000000000000000000000000008152600401611d1e9190612336565b60405180910390fd5b600380811115611d3a57611d39613072565b5b826003811115611d4d57611d4c613072565b5b03611d8f57806040517fd78bce0c000000000000000000000000000000000000000000000000000000008152600401611d8691906130b0565b60405180910390fd5b5b5050565b60008060007f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08460001c1115611dd4576000600385925092509250611e7e565b600060018888888860405160008152602001604052604051611df994939291906130e7565b6020604051602081039080840390855afa158015611e1b573d6000803e3d6000fd5b505050602060405103519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611e6f57600060016000801b93509350935050611e7e565b8060008060001b935093509350505b9450945094915050565b828054828255906000526020600020908101928215611ec4579160200282015b82811115611ec3578251825591602001919060010190611ea8565b5b509050611ed19190611ed5565b5090565b5b80821115611eee576000816000905550600101611ed6565b5090565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000611f3182611f06565b9050919050565b611f4181611f26565b8114611f4c57600080fd5b50565b600081359050611f5e81611f38565b92915050565b600060208284031215611f7a57611f79611efc565b5b6000611f8884828501611f4f565b91505092915050565b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b611fdf82611f96565b810181811067ffffffffffffffff82111715611ffe57611ffd611fa7565b5b80604052505050565b6000612011611ef2565b905061201d8282611fd6565b919050565b600067ffffffffffffffff82111561203d5761203c611fa7565b5b602082029050602081019050919050565b600080fd5b6000819050919050565b61206681612053565b811461207157600080fd5b50565b6000813590506120838161205d565b92915050565b600061209c61209784612022565b612007565b905080838252602082019050602084028301858111156120bf576120be61204e565b5b835b818110156120e857806120d48882612074565b8452602084019350506020810190506120c1565b5050509392505050565b600082601f83011261210757612106611f91565b5b8135612117848260208601612089565b91505092915050565b600067ffffffffffffffff82111561213b5761213a611fa7565b5b602082029050602081019050919050565b600080fd5b6000604082840312156121675761216661214c565b5b6121716040612007565b9050600061218184828501611f4f565b600083015250602061219584828501612074565b60208301525092915050565b60006121b46121af84612120565b612007565b905080838252602082019050604084028301858111156121d7576121d661204e565b5b835b8181101561220057806121ec8882612151565b8452602084019350506040810190506121d9565b5050509392505050565b600082601f83011261221f5761221e611f91565b5b813561222f8482602086016121a1565b91505092915050565b60008060008060008060c0878903121561225557612254611efc565b5b600061226389828a01611f4f565b965050602061227489828a01611f4f565b955050604061228589828a01611f4f565b945050606087013567ffffffffffffffff8111156122a6576122a5611f01565b5b6122b289828a016120f2565b935050608087013567ffffffffffffffff8111156122d3576122d2611f01565b5b6122df89828a0161220a565b92505060a06122f089828a01611f4f565b9150509295509295509295565b61230681611f26565b82525050565b600060208201905061232160008301846122fd565b92915050565b61233081612053565b82525050565b600060208201905061234b6000830184612327565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561238b578082015181840152602081019050612370565b60008484015250505050565b60006123a282612351565b6123ac818561235c565b93506123bc81856020860161236d565b6123c581611f96565b840191505092915050565b600060208201905081810360008301526123ea8184612397565b905092915050565b6000819050919050565b600061241761241261240d84611f06565b6123f2565b611f06565b9050919050565b6000612429826123fc565b9050919050565b600061243b8261241e565b9050919050565b61244b81612430565b82525050565b60006020820190506124666000830184612442565b92915050565b60006020828403121561248257612481611efc565b5b600061249084828501612074565b91505092915050565b60006040820190506124ae60008301856122fd565b6124bb6020830184612327565b9392505050565b600080fd5b60008083601f8401126124dd576124dc611f91565b5b8235905067ffffffffffffffff8111156124fa576124f96124c2565b5b6020830191508360018202830111156125165761251561204e565b5b9250929050565b60008060008060008060008060e0898b03121561253d5761253c611efc565b5b600089013567ffffffffffffffff81111561255b5761255a611f01565b5b6125678b828c016120f2565b985050602089013567ffffffffffffffff81111561258857612587611f01565b5b6125948b828c016120f2565b97505060406125a58b828c01612074565b96505060606125b68b828c01612074565b95505060806125c78b828c01611f4f565b94505060a06125d88b828c01612074565b93505060c089013567ffffffffffffffff8111156125f9576125f8611f01565b5b6126058b828c016124c7565b92509250509295985092959890939650565b7f436f6e747261637420616c726561647920696e697469616c697a65642e000000600082015250565b600061264d601d8361235c565b915061265882612617565b602082019050919050565b6000602082019050818103600083015261267c81612640565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f50617961626c653a205468652063616c6c6572206973206e6f7420616e20616c60008201527f6c6f776564207769746864726177657200000000000000000000000000000000602082015250565b600061270e60308361235c565b9150612719826126b2565b604082019050919050565b6000602082019050818103600083015261273d81612701565b9050919050565b6000815190506127538161205d565b92915050565b60006020828403121561276f5761276e611efc565b5b600061277d84828501612744565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006127c082612053565b91506127cb83612053565b92508282019050808211156127e3576127e2612786565b5b92915050565b6000819050919050565b6128046127ff82612053565b6127e9565b82525050565b60008160601b9050919050565b60006128228261280a565b9050919050565b600061283482612817565b9050919050565b61284c61284782611f26565b612829565b82525050565b600061285e82876127f3565b60208201915061286e82866127f3565b60208201915061287e828561283b565b60148201915061288e82846127f3565b60208201915081905095945050505050565b7f496e76616c696420494420746f206265206d696e746564000000000000000000600082015250565b60006128d660178361235c565b91506128e1826128a0565b602082019050919050565b60006020820190508181036000830152612905816128c9565b9050919050565b600061291782612053565b915061292283612053565b925082820390508181111561293a57612939612786565b5b92915050565b7f4e6f6e65206f66207468652073656c656374656420746f6b656e7320746f206d60008201527f696e742061726520617661696c61626c65000000000000000000000000000000602082015250565b600061299c60318361235c565b91506129a782612940565b604082019050919050565b600060208201905081810360008301526129cb8161298f565b9050919050565b7f4e6f7420656e6f75676820746f6b656e7320617661696c61626c6520746f206d60008201527f696e7420666f7220796f75722077616c6c657400000000000000000000000000602082015250565b6000612a2e60338361235c565b9150612a39826129d2565b604082019050919050565b60006020820190508181036000830152612a5d81612a21565b9050919050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b612a9981612053565b82525050565b6000612aab8383612a90565b60208301905092915050565b6000602082019050919050565b6000612acf82612a64565b612ad98185612a6f565b9350612ae483612a80565b8060005b83811015612b15578151612afc8882612a9f565b9750612b0783612ab7565b925050600181019050612ae8565b5085935050505092915050565b6000606082019050612b3760008301866122fd565b8181036020830152612b498185612ac4565b90508181036040830152612b5d8184612ac4565b9050949350505050565b600081905092915050565b50565b6000612b82600083612b67565b9150612b8d82612b72565b600082019050919050565b6000612ba382612b75565b9150819050919050565b7f50617961626c653a205472616e73666572206661696c65640000000000000000600082015250565b6000612be360188361235c565b9150612bee82612bad565b602082019050919050565b60006020820190508181036000830152612c1281612bd6565b9050919050565b60008115159050919050565b612c2e81612c19565b8114612c3957600080fd5b50565b600081519050612c4b81612c25565b92915050565b600060208284031215612c6757612c66611efc565b5b6000612c7584828501612c3c565b91505092915050565b7f5369676e617475726550726f7465637465643a20496e76616c6964207369676e60008201527f617475726520666f72207468652063616c6c6572000000000000000000000000602082015250565b6000612cda60348361235c565b9150612ce582612c7e565b604082019050919050565b60006020820190508181036000830152612d0981612ccd565b9050919050565b7f4c696d697450657257616c6c65743a205468652063616c6c657220616464726560008201527f73732063616e206e6f74206d696e74206d6f726520746f6b656e730000000000602082015250565b6000612d6c603b8361235c565b9150612d7782612d10565b604082019050919050565b60006020820190508181036000830152612d9b81612d5f565b9050919050565b6000612dad82612053565b9150612db883612053565b9250828202612dc681612053565b91508282048414831517612ddd57612ddc612786565b5b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000612e1e82612053565b9150612e2983612053565b925082612e3957612e38612de4565b5b828204905092915050565b6000612e4f82612053565b9150612e5a83612053565b925082612e6a57612e69612de4565b5b828206905092915050565b6000612e81828561283b565b601482019150612e91828461283b565b6014820191508190509392505050565b600081519050919050565b6000612eb782612ea1565b612ec18185612b67565b9350612ed181856020860161236d565b80840191505092915050565b6000612ee98285612eac565b9150612ef58284612eac565b91508190509392505050565b600081905092915050565b7f19457468657265756d205369676e6564204d6573736167653a0a333200000000600082015250565b6000612f42601c83612f01565b9150612f4d82612f0c565b601c82019050919050565b6000819050919050565b6000819050919050565b612f7d612f7882612f58565b612f62565b82525050565b6000612f8e82612f35565b9150612f9a8284612f6c565b60208201915081905092915050565b7f50617961626c653a204e6f7420656e6f7567682045746865722070726f76696460008201527f656420746f206d696e7400000000000000000000000000000000000000000000602082015250565b6000613005602a8361235c565b915061301082612fa9565b604082019050919050565b6000602082019050818103600083015261303481612ff8565b9050919050565b600060608201905061305060008301866122fd565b61305d60208301856122fd565b61306a6040830184612327565b949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b6130aa81612f58565b82525050565b60006020820190506130c560008301846130a1565b92915050565b600060ff82169050919050565b6130e1816130cb565b82525050565b60006080820190506130fc60008301876130a1565b61310960208301866130d8565b61311660408301856130a1565b61312360608301846130a1565b9594505050505056fea2646970667358221220a633edbe5a44cdf361f852baa9f7590ab0772c51779732a51964c0f4a7402af764736f6c63430008180033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 34 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.