Source Code
Overview
ETH Balance
0 ETH
ETH Value
$0.00
Cross-Chain Transactions
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
RandomMint721
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 {IERC721Mintable} from "./../interfaces/IERC721Mintable.sol";
import {Payable} from "./../libraries/Payable.sol";
import {SupplyControl} from "./../libraries/SupplyControl.sol";
import {LimitPerWallet} from "./../libraries/LimitPerWallet.sol";
import {SignatureProtected} from "./../libraries/SignatureProtected.sol";
import {DTOs} from "./../libraries/dtos.sol";
import {RandomGenerator} from "./../libraries/RandomGenerator.sol";
contract RandomMint721 is
Payable,
SupplyControl,
LimitPerWallet,
SignatureProtected,
RandomGenerator
{
mapping(uint256 => uint256) private tokenMatrix;
string public constant contractType = "RANDOM-MINTER-721";
string public constant version = "1.1.0";
IERC721Mintable public erc721Contract;
bool private _isInitialized;
function init(
address owner,
uint256 maxSupply,
address signerAddress,
address feeRecipient,
DTOs.Recipient[] memory recipients,
address erc721Address
) external {
require(_isInitialized == false, "Contract already initialized.");
_transferOwnership(owner);
initSupplyControl(maxSupply);
initSignatureProtected(signerAddress);
initPayable(feeRecipient, recipients);
erc721Contract = IERC721Mintable(erc721Address);
_isInitialized = true;
}
function mint(
uint256 _amount,
uint256 _maxPerWallet,
uint256 _pricePerToken,
address _coinAddress,
uint256 _feePerToken,
bytes calldata _signature
) external payable {
validateSignature(
abi.encodePacked(
_maxPerWallet,
_pricePerToken,
_coinAddress,
_feePerToken
),
_signature
);
uint256 totalMinted = erc721Contract.totalMinted();
_amount = _getAvailableTokens(_amount, totalMinted);
_amount = getAvailableForWallet(_amount, _maxPerWallet);
checkPayment(_amount, _pricePerToken, _coinAddress, _feePerToken);
uint256[] memory ids = new uint256[](_amount);
for (uint256 i; i < ids.length; i++) {
ids[i] = getTokenToBeMinted(totalMinted + i, maxSupply);
}
erc721Contract.mint(msg.sender, ids);
}
function getAvailableTokens() public view returns (uint256) {
(bool success, bytes memory totalSupply) = address(erc721Contract)
.staticcall(abi.encodeWithSignature("totalMinted()"));
require(success, "Call to totalSupply failed");
return maxSupply - abi.decode(totalSupply, (uint256));
}
/**
* @dev Returns a random available token to be minted
*/
function getTokenToBeMinted(
uint256 _totalSupply,
uint256 _maxSupply
) internal returns (uint256) {
uint256 maxIndex = _maxSupply - _totalSupply;
uint256 random = getRandomNumber(maxIndex, _totalSupply);
uint256 tokenId = tokenMatrix[random];
if (tokenMatrix[random] == 0) {
tokenId = random;
}
// Shift tokenId up by 1 to make it range from 1 to N
// insted of 0 to N
tokenId += 1;
tokenMatrix[maxIndex - 1] == 0
? tokenMatrix[random] = maxIndex - 1
: tokenMatrix[random] = tokenMatrix[maxIndex - 1];
return tokenId;
}
}// 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 IERC721Mintable {
function mint(address _to, uint256[] memory _ids) external;
function totalMinted() external returns (uint256);
function exists(uint256 _tokenId) external view returns (bool);
}// 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;
abstract contract RandomGenerator {
/**
* @dev Generates a pseudo-random number.
*/
function getRandomNumber(
uint256 _upper,
uint256 _variable // This value should change in between calls to this function within the same block to avoid generating the same number.
) internal view returns (uint256) {
uint256 random = uint256(
keccak256(
abi.encodePacked(
_variable,
blockhash(block.number - 1),
block.coinbase,
block.prevrandao,
msg.sender
)
)
);
return (random % _upper);
}
}// 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 SupplyControl {
uint256 public maxSupply;
function initSupplyControl(uint256 _maxSupply) internal {
maxSupply = _maxSupply;
}
/**
* @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,
uint256 _totalMinted
) internal view returns (uint256) {
uint256 availableTokens = maxSupply - _totalMinted;
require(availableTokens > 0, "SupplyControl: No tokens left to mint");
if (availableTokens < _amountToMint) {
return availableTokens;
}
return _amountToMint;
}
}{
"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":"erc721Contract","outputs":[{"internalType":"contract IERC721Mintable","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":"uint256","name":"maxSupply","type":"uint256"},{"internalType":"address","name":"signerAddress","type":"address"},{"internalType":"address","name":"feeRecipient","type":"address"},{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint256","name":"percentage","type":"uint256"}],"internalType":"struct DTOs.Recipient[]","name":"recipients","type":"tuple[]"},{"internalType":"address","name":"erc721Address","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":"_amount","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
60806040523480156200001157600080fd5b5033600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603620000885760006040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081526004016200007f9190620001ab565b60405180910390fd5b6200009981620000a060201b60201c565b50620001c8565b6000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620001938262000166565b9050919050565b620001a58162000186565b82525050565b6000602082019050620001c260008301846200019a565b92915050565b61309f80620001d86000396000f3fe6080604052600436106100fe5760003560e01c80638511700511610095578063d5abeb0111610064578063d5abeb0114610317578063d638aefb14610342578063d7c97fb41461036b578063e35568cb14610396578063f2fde38b146103c1576100fe565b806385117005146102465780638da5cb5b14610283578063cb2ef6f7146102ae578063d1bc76a1146102d9576100fe565b806354fd4d50116100d157806354fd4d50146101bd5780635b7633d0146101e8578063715018a61461021357806377332f841461022a576100fe565b8063046dc16614610103578063469048401461012c5780634d0df5fc1461015757806351cff8d914610194575b600080fd5b34801561010f57600080fd5b5061012a60048036038101906101259190611fc1565b6103ea565b005b34801561013857600080fd5b50610141610436565b60405161014e9190611ffd565b60405180910390f35b34801561016357600080fd5b5061017e60048036038101906101799190611fc1565b61045a565b60405161018b9190612031565b60405180910390f35b3480156101a057600080fd5b506101bb60048036038101906101b69190611fc1565b610472565b005b3480156101c957600080fd5b506101d26105a1565b6040516101df91906120dc565b60405180910390f35b3480156101f457600080fd5b506101fd6105da565b60405161020a9190611ffd565b60405180910390f35b34801561021f57600080fd5b50610228610600565b005b610244600480360381019061023f919061218f565b610614565b005b34801561025257600080fd5b5061026d60048036038101906102689190611fc1565b610836565b60405161027a9190612031565b60405180910390f35b34801561028f57600080fd5b50610298610946565b6040516102a59190611ffd565b60405180910390f35b3480156102ba57600080fd5b506102c3610970565b6040516102d091906120dc565b60405180910390f35b3480156102e557600080fd5b5061030060048036038101906102fb919061223e565b6109a9565b60405161030e92919061226b565b60405180910390f35b34801561032357600080fd5b5061032c6109fd565b6040516103399190612031565b60405180910390f35b34801561034e57600080fd5b5061036960048036038101906103649190612427565b610a03565b005b34801561037757600080fd5b50610380610ae2565b60405161038d919061252f565b60405180910390f35b3480156103a257600080fd5b506103ab610b08565b6040516103b89190612031565b60405180910390f35b3480156103cd57600080fd5b506103e860048036038101906103e39190611fc1565b610c83565b005b6103f2610d09565b80600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60046020528060005260406000206000915090505481565b6000805b600280549050811015610511573373ffffffffffffffffffffffffffffffffffffffff16600282815481106104ae576104ad61254a565b5b906000526020600020906002020160000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16036105045760019150610511565b8080600101915050610476565b5080610552576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610549906125eb565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036105935761058e610d90565b61059d565b61059c82610f2f565b5b5050565b6040518060400160405280600581526020017f312e312e3000000000000000000000000000000000000000000000000000000081525081565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b610608610d09565b6106126000611164565b565b6106448686868660405160200161062e9493929190612674565b604051602081830303815290604052838361122a565b6000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a2309ff86040518163ffffffff1660e01b81526004016020604051808303816000875af11580156106b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106d991906126d7565b90506106e58882611314565b97506106f18888611386565b97506106ff888787876114da565b60008867ffffffffffffffff81111561071b5761071a612294565b5b6040519080825280602002602001820160405280156107495781602001602082028036833780820191505090505b50905060005b815181101561079b5761076f81846107679190612733565b600354611551565b8282815181106107825761078161254a565b5b602002602001018181525050808060010191505061074f565b50600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663de836ebd33836040518363ffffffff1660e01b81526004016107f9929190612825565b600060405180830381600087803b15801561081357600080fd5b505af1158015610827573d6000803e3d6000fd5b50505050505050505050505050565b600080479050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16146108f35760008390508073ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016108ae9190611ffd565b602060405180830381865afa1580156108cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108ef91906126d7565b9150505b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461093e9190612733565b915050919050565b6000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6040518060400160405280601181526020017f52414e444f4d2d4d494e5445522d37323100000000000000000000000000000081525081565b600281815481106109b957600080fd5b90600052602060002090600202016000915090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010154905082565b60035481565b60001515600860149054906101000a900460ff16151514610a59576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a50906128a1565b60405180910390fd5b610a6286611164565b610a6b85611649565b610a7484611653565b610a7e8383611697565b80600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001600860146101000a81548160ff021916908315150217905550505050505050565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000806000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166040516024016040516020818303038152906040527fa2309ff8000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050604051610bd69190612908565b600060405180830381855afa9150503d8060008114610c11576040519150601f19603f3d011682016040523d82523d6000602084013e610c16565b606091505b509150915081610c5b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c529061296b565b60405180910390fd5b80806020019051810190610c6f91906126d7565b600354610c7c919061298b565b9250505090565b610c8b610d09565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610cfd5760006040517f1e4fbdf7000000000000000000000000000000000000000000000000000000008152600401610cf49190611ffd565b60405180910390fd5b610d0681611164565b50565b610d1161178e565b73ffffffffffffffffffffffffffffffffffffffff16610d2f610946565b73ffffffffffffffffffffffffffffffffffffffff1614610d8e57610d5261178e565b6040517f118cdaa7000000000000000000000000000000000000000000000000000000008152600401610d859190611ffd565b60405180910390fd5b565b600047905080600160008073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610de49190612733565b9250508190555060005b600280549050811015610f2b57600060028281548110610e1157610e1061254a565b5b906000526020600020906002020160000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610e8b8460028581548110610e7157610e7061254a565b5b906000526020600020906002020160010154612710611796565b604051610e97906129e5565b60006040518083038185875af1925050503d8060008114610ed4576040519150601f19603f3d011682016040523d82523d6000602084013e610ed9565b606091505b5050905080610f1d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f1490612a46565b60405180910390fd5b508080600101915050610dee565b5050565b600081905060008173ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401610f6f9190611ffd565b602060405180830381865afa158015610f8c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fb091906126d7565b905080600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546110019190612733565b9250508190555060005b60028054905081101561115e5760008373ffffffffffffffffffffffffffffffffffffffff1663a9059cbb6002848154811061104a5761104961254a565b5b906000526020600020906002020160000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166110ae86600287815481106110945761109361254a565b5b906000526020600020906002020160010154612710611796565b6040518363ffffffff1660e01b81526004016110cb92919061226b565b6020604051808303816000875af11580156110ea573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061110e9190612a9e565b905080611150576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161114790612a46565b60405180910390fd5b50808060010191505061100b565b50505050565b6000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166112b961126f85611848565b84848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506118cc565b73ffffffffffffffffffffffffffffffffffffffff161461130f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161130690612b3d565b60405180910390fd5b505050565b60008082600354611325919061298b565b90506000811161136a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161136190612bcf565b60405180910390fd5b8381101561137b5780915050611380565b839150505b92915050565b6000808203611397578290506114d4565b8183600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546113e39190612733565b111561143757600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482611434919061298b565b92505b6000831161147a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161147190612c61565b60405180910390fd5b82600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546114c99190612733565b925050819055508290505b92915050565b600083856114e89190612c81565b9050600082866114f89190612c81565b9050600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff160361153d5761153882826118f8565b611549565b611548848383611a83565b5b505050505050565b6000808383611560919061298b565b9050600061156e8286611c42565b905060006007600083815260200190815260200160002054905060006007600084815260200190815260200160002054036115a7578190505b6001816115b49190612733565b90506000600760006001866115c9919061298b565b8152602001908152602001600020541461161857600760006001856115ee919061298b565b8152602001908152602001600020546007600084815260200190815260200160002081905561163c565b600183611625919061298b565b600760008481526020019081526020016000208190555b5080935050505092915050565b8060038190555050565b80600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060005b81518110156117895760028282815181106116f8576116f761254a565b5b6020026020010151908060018154018082558091505060019003906000526020600020906002020160009091909190915060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160010155505080806001019150506116da565b505050565b600033905090565b60008082856117a59190612cf2565b9050600083866117b59190612d23565b9050600084866117c59190612cf2565b9050600085876117d59190612d23565b90508581846117e49190612c81565b6117ee9190612cf2565b82846117fa9190612c81565b82866118069190612c81565b8885886118139190612c81565b61181d9190612c81565b6118279190612733565b6118319190612733565b61183b9190612733565b9450505050509392505050565b600080303360405160200161185e929190612d54565b6040516020818303038152906040528360405160200161187f929190612d80565b6040516020818303038152906040528051906020012090506000816040516020016118aa9190612e26565b6040516020818303038152906040529050808051906020012092505050919050565b6000806000806118dc8686611c9b565b9250925092506118ec8282611cf7565b82935050505092915050565b600081836119069190612733565b90508034101561194b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161194290612ebe565b60405180910390fd5b803411156119a6573373ffffffffffffffffffffffffffffffffffffffff166108fc8234611979919061298b565b9081150290604051600060405180830381858888f193505050501580156119a4573d6000803e3d6000fd5b505b6000821115611a7e5760008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16836040516119f6906129e5565b60006040518083038185875af1925050503d8060008114611a33576040519150601f19603f3d011682016040523d82523d6000602084013e611a38565b606091505b5050905080611a7c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a7390612a46565b60405180910390fd5b505b505050565b60008390508073ffffffffffffffffffffffffffffffffffffffff166323b872dd3330866040518463ffffffff1660e01b8152600401611ac593929190612ede565b6020604051808303816000875af1158015611ae4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b089190612a9e565b5081341115611b64573373ffffffffffffffffffffffffffffffffffffffff166108fc8334611b37919061298b565b9081150290604051600060405180830381858888f19350505050158015611b62573d6000803e3d6000fd5b505b6000821115611c3c5760008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1683604051611bb4906129e5565b60006040518083038185875af1925050503d8060008114611bf1576040519150601f19603f3d011682016040523d82523d6000602084013e611bf6565b606091505b5050905080611c3a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c3190612a46565b60405180910390fd5b505b50505050565b60008082600143611c53919061298b565b40414433604051602001611c6b959493929190612f50565b6040516020818303038152906040528051906020012060001c90508381611c929190612d23565b91505092915050565b60008060006041845103611ce05760008060006020870151925060408701519150606087015160001a9050611cd288828585611e5b565b955095509550505050611cf0565b60006002855160001b9250925092505b9250925092565b60006003811115611d0b57611d0a612faf565b5b826003811115611d1e57611d1d612faf565b5b0315611e575760016003811115611d3857611d37612faf565b5b826003811115611d4b57611d4a612faf565b5b03611d82576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60026003811115611d9657611d95612faf565b5b826003811115611da957611da8612faf565b5b03611dee578060001c6040517ffce698f7000000000000000000000000000000000000000000000000000000008152600401611de59190612031565b60405180910390fd5b600380811115611e0157611e00612faf565b5b826003811115611e1457611e13612faf565b5b03611e5657806040517fd78bce0c000000000000000000000000000000000000000000000000000000008152600401611e4d9190612fed565b60405180910390fd5b5b5050565b60008060007f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08460001c1115611e9b576000600385925092509250611f45565b600060018888888860405160008152602001604052604051611ec09493929190613024565b6020604051602081039080840390855afa158015611ee2573d6000803e3d6000fd5b505050602060405103519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611f3657600060016000801b93509350935050611f45565b8060008060001b935093509350505b9450945094915050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000611f8e82611f63565b9050919050565b611f9e81611f83565b8114611fa957600080fd5b50565b600081359050611fbb81611f95565b92915050565b600060208284031215611fd757611fd6611f59565b5b6000611fe584828501611fac565b91505092915050565b611ff781611f83565b82525050565b60006020820190506120126000830184611fee565b92915050565b6000819050919050565b61202b81612018565b82525050565b60006020820190506120466000830184612022565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561208657808201518184015260208101905061206b565b60008484015250505050565b6000601f19601f8301169050919050565b60006120ae8261204c565b6120b88185612057565b93506120c8818560208601612068565b6120d181612092565b840191505092915050565b600060208201905081810360008301526120f681846120a3565b905092915050565b61210781612018565b811461211257600080fd5b50565b600081359050612124816120fe565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f84011261214f5761214e61212a565b5b8235905067ffffffffffffffff81111561216c5761216b61212f565b5b60208301915083600182028301111561218857612187612134565b5b9250929050565b600080600080600080600060c0888a0312156121ae576121ad611f59565b5b60006121bc8a828b01612115565b97505060206121cd8a828b01612115565b96505060406121de8a828b01612115565b95505060606121ef8a828b01611fac565b94505060806122008a828b01612115565b93505060a088013567ffffffffffffffff81111561222157612220611f5e565b5b61222d8a828b01612139565b925092505092959891949750929550565b60006020828403121561225457612253611f59565b5b600061226284828501612115565b91505092915050565b60006040820190506122806000830185611fee565b61228d6020830184612022565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6122cc82612092565b810181811067ffffffffffffffff821117156122eb576122ea612294565b5b80604052505050565b60006122fe611f4f565b905061230a82826122c3565b919050565b600067ffffffffffffffff82111561232a57612329612294565b5b602082029050602081019050919050565b600080fd5b6000604082840312156123565761235561233b565b5b61236060406122f4565b9050600061237084828501611fac565b600083015250602061238484828501612115565b60208301525092915050565b60006123a361239e8461230f565b6122f4565b905080838252602082019050604084028301858111156123c6576123c5612134565b5b835b818110156123ef57806123db8882612340565b8452602084019350506040810190506123c8565b5050509392505050565b600082601f83011261240e5761240d61212a565b5b813561241e848260208601612390565b91505092915050565b60008060008060008060c0878903121561244457612443611f59565b5b600061245289828a01611fac565b965050602061246389828a01612115565b955050604061247489828a01611fac565b945050606061248589828a01611fac565b935050608087013567ffffffffffffffff8111156124a6576124a5611f5e565b5b6124b289828a016123f9565b92505060a06124c389828a01611fac565b9150509295509295509295565b6000819050919050565b60006124f56124f06124eb84611f63565b6124d0565b611f63565b9050919050565b6000612507826124da565b9050919050565b6000612519826124fc565b9050919050565b6125298161250e565b82525050565b60006020820190506125446000830184612520565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f50617961626c653a205468652063616c6c6572206973206e6f7420616e20616c60008201527f6c6f776564207769746864726177657200000000000000000000000000000000602082015250565b60006125d5603083612057565b91506125e082612579565b604082019050919050565b60006020820190508181036000830152612604816125c8565b9050919050565b6000819050919050565b61262661262182612018565b61260b565b82525050565b60008160601b9050919050565b60006126448261262c565b9050919050565b600061265682612639565b9050919050565b61266e61266982611f83565b61264b565b82525050565b60006126808287612615565b6020820191506126908286612615565b6020820191506126a0828561265d565b6014820191506126b08284612615565b60208201915081905095945050505050565b6000815190506126d1816120fe565b92915050565b6000602082840312156126ed576126ec611f59565b5b60006126fb848285016126c2565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061273e82612018565b915061274983612018565b925082820190508082111561276157612760612704565b5b92915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b61279c81612018565b82525050565b60006127ae8383612793565b60208301905092915050565b6000602082019050919050565b60006127d282612767565b6127dc8185612772565b93506127e783612783565b8060005b838110156128185781516127ff88826127a2565b975061280a836127ba565b9250506001810190506127eb565b5085935050505092915050565b600060408201905061283a6000830185611fee565b818103602083015261284c81846127c7565b90509392505050565b7f436f6e747261637420616c726561647920696e697469616c697a65642e000000600082015250565b600061288b601d83612057565b915061289682612855565b602082019050919050565b600060208201905081810360008301526128ba8161287e565b9050919050565b600081519050919050565b600081905092915050565b60006128e2826128c1565b6128ec81856128cc565b93506128fc818560208601612068565b80840191505092915050565b600061291482846128d7565b915081905092915050565b7f43616c6c20746f20746f74616c537570706c79206661696c6564000000000000600082015250565b6000612955601a83612057565b91506129608261291f565b602082019050919050565b6000602082019050818103600083015261298481612948565b9050919050565b600061299682612018565b91506129a183612018565b92508282039050818111156129b9576129b8612704565b5b92915050565b50565b60006129cf6000836128cc565b91506129da826129bf565b600082019050919050565b60006129f0826129c2565b9150819050919050565b7f50617961626c653a205472616e73666572206661696c65640000000000000000600082015250565b6000612a30601883612057565b9150612a3b826129fa565b602082019050919050565b60006020820190508181036000830152612a5f81612a23565b9050919050565b60008115159050919050565b612a7b81612a66565b8114612a8657600080fd5b50565b600081519050612a9881612a72565b92915050565b600060208284031215612ab457612ab3611f59565b5b6000612ac284828501612a89565b91505092915050565b7f5369676e617475726550726f7465637465643a20496e76616c6964207369676e60008201527f617475726520666f72207468652063616c6c6572000000000000000000000000602082015250565b6000612b27603483612057565b9150612b3282612acb565b604082019050919050565b60006020820190508181036000830152612b5681612b1a565b9050919050565b7f537570706c79436f6e74726f6c3a204e6f20746f6b656e73206c65667420746f60008201527f206d696e74000000000000000000000000000000000000000000000000000000602082015250565b6000612bb9602583612057565b9150612bc482612b5d565b604082019050919050565b60006020820190508181036000830152612be881612bac565b9050919050565b7f4c696d697450657257616c6c65743a205468652063616c6c657220616464726560008201527f73732063616e206e6f74206d696e74206d6f726520746f6b656e730000000000602082015250565b6000612c4b603b83612057565b9150612c5682612bef565b604082019050919050565b60006020820190508181036000830152612c7a81612c3e565b9050919050565b6000612c8c82612018565b9150612c9783612018565b9250828202612ca581612018565b91508282048414831517612cbc57612cbb612704565b5b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000612cfd82612018565b9150612d0883612018565b925082612d1857612d17612cc3565b5b828204905092915050565b6000612d2e82612018565b9150612d3983612018565b925082612d4957612d48612cc3565b5b828206905092915050565b6000612d60828561265d565b601482019150612d70828461265d565b6014820191508190509392505050565b6000612d8c82856128d7565b9150612d9882846128d7565b91508190509392505050565b600081905092915050565b7f19457468657265756d205369676e6564204d6573736167653a0a333200000000600082015250565b6000612de5601c83612da4565b9150612df082612daf565b601c82019050919050565b6000819050919050565b6000819050919050565b612e20612e1b82612dfb565b612e05565b82525050565b6000612e3182612dd8565b9150612e3d8284612e0f565b60208201915081905092915050565b7f50617961626c653a204e6f7420656e6f7567682045746865722070726f76696460008201527f656420746f206d696e7400000000000000000000000000000000000000000000602082015250565b6000612ea8602a83612057565b9150612eb382612e4c565b604082019050919050565b60006020820190508181036000830152612ed781612e9b565b9050919050565b6000606082019050612ef36000830186611fee565b612f006020830185611fee565b612f0d6040830184612022565b949350505050565b6000612f2082611f63565b9050919050565b6000612f3282612639565b9050919050565b612f4a612f4582612f15565b612f27565b82525050565b6000612f5c8288612615565b602082019150612f6c8287612e0f565b602082019150612f7c8286612f39565b601482019150612f8c8285612615565b602082019150612f9c828461265d565b6014820191508190509695505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b612fe781612dfb565b82525050565b60006020820190506130026000830184612fde565b92915050565b600060ff82169050919050565b61301e81613008565b82525050565b60006080820190506130396000830187612fde565b6130466020830186613015565b6130536040830185612fde565b6130606060830184612fde565b9594505050505056fea2646970667358221220f205f76ca1ea1cfb29b542af1bde9af9086b0b3e218924f3441bff5ed1c58fa564736f6c63430008180033
Deployed Bytecode
0x6080604052600436106100fe5760003560e01c80638511700511610095578063d5abeb0111610064578063d5abeb0114610317578063d638aefb14610342578063d7c97fb41461036b578063e35568cb14610396578063f2fde38b146103c1576100fe565b806385117005146102465780638da5cb5b14610283578063cb2ef6f7146102ae578063d1bc76a1146102d9576100fe565b806354fd4d50116100d157806354fd4d50146101bd5780635b7633d0146101e8578063715018a61461021357806377332f841461022a576100fe565b8063046dc16614610103578063469048401461012c5780634d0df5fc1461015757806351cff8d914610194575b600080fd5b34801561010f57600080fd5b5061012a60048036038101906101259190611fc1565b6103ea565b005b34801561013857600080fd5b50610141610436565b60405161014e9190611ffd565b60405180910390f35b34801561016357600080fd5b5061017e60048036038101906101799190611fc1565b61045a565b60405161018b9190612031565b60405180910390f35b3480156101a057600080fd5b506101bb60048036038101906101b69190611fc1565b610472565b005b3480156101c957600080fd5b506101d26105a1565b6040516101df91906120dc565b60405180910390f35b3480156101f457600080fd5b506101fd6105da565b60405161020a9190611ffd565b60405180910390f35b34801561021f57600080fd5b50610228610600565b005b610244600480360381019061023f919061218f565b610614565b005b34801561025257600080fd5b5061026d60048036038101906102689190611fc1565b610836565b60405161027a9190612031565b60405180910390f35b34801561028f57600080fd5b50610298610946565b6040516102a59190611ffd565b60405180910390f35b3480156102ba57600080fd5b506102c3610970565b6040516102d091906120dc565b60405180910390f35b3480156102e557600080fd5b5061030060048036038101906102fb919061223e565b6109a9565b60405161030e92919061226b565b60405180910390f35b34801561032357600080fd5b5061032c6109fd565b6040516103399190612031565b60405180910390f35b34801561034e57600080fd5b5061036960048036038101906103649190612427565b610a03565b005b34801561037757600080fd5b50610380610ae2565b60405161038d919061252f565b60405180910390f35b3480156103a257600080fd5b506103ab610b08565b6040516103b89190612031565b60405180910390f35b3480156103cd57600080fd5b506103e860048036038101906103e39190611fc1565b610c83565b005b6103f2610d09565b80600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60046020528060005260406000206000915090505481565b6000805b600280549050811015610511573373ffffffffffffffffffffffffffffffffffffffff16600282815481106104ae576104ad61254a565b5b906000526020600020906002020160000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16036105045760019150610511565b8080600101915050610476565b5080610552576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610549906125eb565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036105935761058e610d90565b61059d565b61059c82610f2f565b5b5050565b6040518060400160405280600581526020017f312e312e3000000000000000000000000000000000000000000000000000000081525081565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b610608610d09565b6106126000611164565b565b6106448686868660405160200161062e9493929190612674565b604051602081830303815290604052838361122a565b6000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a2309ff86040518163ffffffff1660e01b81526004016020604051808303816000875af11580156106b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106d991906126d7565b90506106e58882611314565b97506106f18888611386565b97506106ff888787876114da565b60008867ffffffffffffffff81111561071b5761071a612294565b5b6040519080825280602002602001820160405280156107495781602001602082028036833780820191505090505b50905060005b815181101561079b5761076f81846107679190612733565b600354611551565b8282815181106107825761078161254a565b5b602002602001018181525050808060010191505061074f565b50600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663de836ebd33836040518363ffffffff1660e01b81526004016107f9929190612825565b600060405180830381600087803b15801561081357600080fd5b505af1158015610827573d6000803e3d6000fd5b50505050505050505050505050565b600080479050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16146108f35760008390508073ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016108ae9190611ffd565b602060405180830381865afa1580156108cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108ef91906126d7565b9150505b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461093e9190612733565b915050919050565b6000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6040518060400160405280601181526020017f52414e444f4d2d4d494e5445522d37323100000000000000000000000000000081525081565b600281815481106109b957600080fd5b90600052602060002090600202016000915090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010154905082565b60035481565b60001515600860149054906101000a900460ff16151514610a59576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a50906128a1565b60405180910390fd5b610a6286611164565b610a6b85611649565b610a7484611653565b610a7e8383611697565b80600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001600860146101000a81548160ff021916908315150217905550505050505050565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000806000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166040516024016040516020818303038152906040527fa2309ff8000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050604051610bd69190612908565b600060405180830381855afa9150503d8060008114610c11576040519150601f19603f3d011682016040523d82523d6000602084013e610c16565b606091505b509150915081610c5b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c529061296b565b60405180910390fd5b80806020019051810190610c6f91906126d7565b600354610c7c919061298b565b9250505090565b610c8b610d09565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610cfd5760006040517f1e4fbdf7000000000000000000000000000000000000000000000000000000008152600401610cf49190611ffd565b60405180910390fd5b610d0681611164565b50565b610d1161178e565b73ffffffffffffffffffffffffffffffffffffffff16610d2f610946565b73ffffffffffffffffffffffffffffffffffffffff1614610d8e57610d5261178e565b6040517f118cdaa7000000000000000000000000000000000000000000000000000000008152600401610d859190611ffd565b60405180910390fd5b565b600047905080600160008073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610de49190612733565b9250508190555060005b600280549050811015610f2b57600060028281548110610e1157610e1061254a565b5b906000526020600020906002020160000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610e8b8460028581548110610e7157610e7061254a565b5b906000526020600020906002020160010154612710611796565b604051610e97906129e5565b60006040518083038185875af1925050503d8060008114610ed4576040519150601f19603f3d011682016040523d82523d6000602084013e610ed9565b606091505b5050905080610f1d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f1490612a46565b60405180910390fd5b508080600101915050610dee565b5050565b600081905060008173ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401610f6f9190611ffd565b602060405180830381865afa158015610f8c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fb091906126d7565b905080600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546110019190612733565b9250508190555060005b60028054905081101561115e5760008373ffffffffffffffffffffffffffffffffffffffff1663a9059cbb6002848154811061104a5761104961254a565b5b906000526020600020906002020160000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166110ae86600287815481106110945761109361254a565b5b906000526020600020906002020160010154612710611796565b6040518363ffffffff1660e01b81526004016110cb92919061226b565b6020604051808303816000875af11580156110ea573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061110e9190612a9e565b905080611150576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161114790612a46565b60405180910390fd5b50808060010191505061100b565b50505050565b6000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166112b961126f85611848565b84848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506118cc565b73ffffffffffffffffffffffffffffffffffffffff161461130f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161130690612b3d565b60405180910390fd5b505050565b60008082600354611325919061298b565b90506000811161136a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161136190612bcf565b60405180910390fd5b8381101561137b5780915050611380565b839150505b92915050565b6000808203611397578290506114d4565b8183600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546113e39190612733565b111561143757600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482611434919061298b565b92505b6000831161147a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161147190612c61565b60405180910390fd5b82600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546114c99190612733565b925050819055508290505b92915050565b600083856114e89190612c81565b9050600082866114f89190612c81565b9050600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff160361153d5761153882826118f8565b611549565b611548848383611a83565b5b505050505050565b6000808383611560919061298b565b9050600061156e8286611c42565b905060006007600083815260200190815260200160002054905060006007600084815260200190815260200160002054036115a7578190505b6001816115b49190612733565b90506000600760006001866115c9919061298b565b8152602001908152602001600020541461161857600760006001856115ee919061298b565b8152602001908152602001600020546007600084815260200190815260200160002081905561163c565b600183611625919061298b565b600760008481526020019081526020016000208190555b5080935050505092915050565b8060038190555050565b80600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060005b81518110156117895760028282815181106116f8576116f761254a565b5b6020026020010151908060018154018082558091505060019003906000526020600020906002020160009091909190915060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160010155505080806001019150506116da565b505050565b600033905090565b60008082856117a59190612cf2565b9050600083866117b59190612d23565b9050600084866117c59190612cf2565b9050600085876117d59190612d23565b90508581846117e49190612c81565b6117ee9190612cf2565b82846117fa9190612c81565b82866118069190612c81565b8885886118139190612c81565b61181d9190612c81565b6118279190612733565b6118319190612733565b61183b9190612733565b9450505050509392505050565b600080303360405160200161185e929190612d54565b6040516020818303038152906040528360405160200161187f929190612d80565b6040516020818303038152906040528051906020012090506000816040516020016118aa9190612e26565b6040516020818303038152906040529050808051906020012092505050919050565b6000806000806118dc8686611c9b565b9250925092506118ec8282611cf7565b82935050505092915050565b600081836119069190612733565b90508034101561194b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161194290612ebe565b60405180910390fd5b803411156119a6573373ffffffffffffffffffffffffffffffffffffffff166108fc8234611979919061298b565b9081150290604051600060405180830381858888f193505050501580156119a4573d6000803e3d6000fd5b505b6000821115611a7e5760008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16836040516119f6906129e5565b60006040518083038185875af1925050503d8060008114611a33576040519150601f19603f3d011682016040523d82523d6000602084013e611a38565b606091505b5050905080611a7c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a7390612a46565b60405180910390fd5b505b505050565b60008390508073ffffffffffffffffffffffffffffffffffffffff166323b872dd3330866040518463ffffffff1660e01b8152600401611ac593929190612ede565b6020604051808303816000875af1158015611ae4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b089190612a9e565b5081341115611b64573373ffffffffffffffffffffffffffffffffffffffff166108fc8334611b37919061298b565b9081150290604051600060405180830381858888f19350505050158015611b62573d6000803e3d6000fd5b505b6000821115611c3c5760008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1683604051611bb4906129e5565b60006040518083038185875af1925050503d8060008114611bf1576040519150601f19603f3d011682016040523d82523d6000602084013e611bf6565b606091505b5050905080611c3a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c3190612a46565b60405180910390fd5b505b50505050565b60008082600143611c53919061298b565b40414433604051602001611c6b959493929190612f50565b6040516020818303038152906040528051906020012060001c90508381611c929190612d23565b91505092915050565b60008060006041845103611ce05760008060006020870151925060408701519150606087015160001a9050611cd288828585611e5b565b955095509550505050611cf0565b60006002855160001b9250925092505b9250925092565b60006003811115611d0b57611d0a612faf565b5b826003811115611d1e57611d1d612faf565b5b0315611e575760016003811115611d3857611d37612faf565b5b826003811115611d4b57611d4a612faf565b5b03611d82576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60026003811115611d9657611d95612faf565b5b826003811115611da957611da8612faf565b5b03611dee578060001c6040517ffce698f7000000000000000000000000000000000000000000000000000000008152600401611de59190612031565b60405180910390fd5b600380811115611e0157611e00612faf565b5b826003811115611e1457611e13612faf565b5b03611e5657806040517fd78bce0c000000000000000000000000000000000000000000000000000000008152600401611e4d9190612fed565b60405180910390fd5b5b5050565b60008060007f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08460001c1115611e9b576000600385925092509250611f45565b600060018888888860405160008152602001604052604051611ec09493929190613024565b6020604051602081039080840390855afa158015611ee2573d6000803e3d6000fd5b505050602060405103519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611f3657600060016000801b93509350935050611f45565b8060008060001b935093509350505b9450945094915050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000611f8e82611f63565b9050919050565b611f9e81611f83565b8114611fa957600080fd5b50565b600081359050611fbb81611f95565b92915050565b600060208284031215611fd757611fd6611f59565b5b6000611fe584828501611fac565b91505092915050565b611ff781611f83565b82525050565b60006020820190506120126000830184611fee565b92915050565b6000819050919050565b61202b81612018565b82525050565b60006020820190506120466000830184612022565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561208657808201518184015260208101905061206b565b60008484015250505050565b6000601f19601f8301169050919050565b60006120ae8261204c565b6120b88185612057565b93506120c8818560208601612068565b6120d181612092565b840191505092915050565b600060208201905081810360008301526120f681846120a3565b905092915050565b61210781612018565b811461211257600080fd5b50565b600081359050612124816120fe565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f84011261214f5761214e61212a565b5b8235905067ffffffffffffffff81111561216c5761216b61212f565b5b60208301915083600182028301111561218857612187612134565b5b9250929050565b600080600080600080600060c0888a0312156121ae576121ad611f59565b5b60006121bc8a828b01612115565b97505060206121cd8a828b01612115565b96505060406121de8a828b01612115565b95505060606121ef8a828b01611fac565b94505060806122008a828b01612115565b93505060a088013567ffffffffffffffff81111561222157612220611f5e565b5b61222d8a828b01612139565b925092505092959891949750929550565b60006020828403121561225457612253611f59565b5b600061226284828501612115565b91505092915050565b60006040820190506122806000830185611fee565b61228d6020830184612022565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6122cc82612092565b810181811067ffffffffffffffff821117156122eb576122ea612294565b5b80604052505050565b60006122fe611f4f565b905061230a82826122c3565b919050565b600067ffffffffffffffff82111561232a57612329612294565b5b602082029050602081019050919050565b600080fd5b6000604082840312156123565761235561233b565b5b61236060406122f4565b9050600061237084828501611fac565b600083015250602061238484828501612115565b60208301525092915050565b60006123a361239e8461230f565b6122f4565b905080838252602082019050604084028301858111156123c6576123c5612134565b5b835b818110156123ef57806123db8882612340565b8452602084019350506040810190506123c8565b5050509392505050565b600082601f83011261240e5761240d61212a565b5b813561241e848260208601612390565b91505092915050565b60008060008060008060c0878903121561244457612443611f59565b5b600061245289828a01611fac565b965050602061246389828a01612115565b955050604061247489828a01611fac565b945050606061248589828a01611fac565b935050608087013567ffffffffffffffff8111156124a6576124a5611f5e565b5b6124b289828a016123f9565b92505060a06124c389828a01611fac565b9150509295509295509295565b6000819050919050565b60006124f56124f06124eb84611f63565b6124d0565b611f63565b9050919050565b6000612507826124da565b9050919050565b6000612519826124fc565b9050919050565b6125298161250e565b82525050565b60006020820190506125446000830184612520565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f50617961626c653a205468652063616c6c6572206973206e6f7420616e20616c60008201527f6c6f776564207769746864726177657200000000000000000000000000000000602082015250565b60006125d5603083612057565b91506125e082612579565b604082019050919050565b60006020820190508181036000830152612604816125c8565b9050919050565b6000819050919050565b61262661262182612018565b61260b565b82525050565b60008160601b9050919050565b60006126448261262c565b9050919050565b600061265682612639565b9050919050565b61266e61266982611f83565b61264b565b82525050565b60006126808287612615565b6020820191506126908286612615565b6020820191506126a0828561265d565b6014820191506126b08284612615565b60208201915081905095945050505050565b6000815190506126d1816120fe565b92915050565b6000602082840312156126ed576126ec611f59565b5b60006126fb848285016126c2565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061273e82612018565b915061274983612018565b925082820190508082111561276157612760612704565b5b92915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b61279c81612018565b82525050565b60006127ae8383612793565b60208301905092915050565b6000602082019050919050565b60006127d282612767565b6127dc8185612772565b93506127e783612783565b8060005b838110156128185781516127ff88826127a2565b975061280a836127ba565b9250506001810190506127eb565b5085935050505092915050565b600060408201905061283a6000830185611fee565b818103602083015261284c81846127c7565b90509392505050565b7f436f6e747261637420616c726561647920696e697469616c697a65642e000000600082015250565b600061288b601d83612057565b915061289682612855565b602082019050919050565b600060208201905081810360008301526128ba8161287e565b9050919050565b600081519050919050565b600081905092915050565b60006128e2826128c1565b6128ec81856128cc565b93506128fc818560208601612068565b80840191505092915050565b600061291482846128d7565b915081905092915050565b7f43616c6c20746f20746f74616c537570706c79206661696c6564000000000000600082015250565b6000612955601a83612057565b91506129608261291f565b602082019050919050565b6000602082019050818103600083015261298481612948565b9050919050565b600061299682612018565b91506129a183612018565b92508282039050818111156129b9576129b8612704565b5b92915050565b50565b60006129cf6000836128cc565b91506129da826129bf565b600082019050919050565b60006129f0826129c2565b9150819050919050565b7f50617961626c653a205472616e73666572206661696c65640000000000000000600082015250565b6000612a30601883612057565b9150612a3b826129fa565b602082019050919050565b60006020820190508181036000830152612a5f81612a23565b9050919050565b60008115159050919050565b612a7b81612a66565b8114612a8657600080fd5b50565b600081519050612a9881612a72565b92915050565b600060208284031215612ab457612ab3611f59565b5b6000612ac284828501612a89565b91505092915050565b7f5369676e617475726550726f7465637465643a20496e76616c6964207369676e60008201527f617475726520666f72207468652063616c6c6572000000000000000000000000602082015250565b6000612b27603483612057565b9150612b3282612acb565b604082019050919050565b60006020820190508181036000830152612b5681612b1a565b9050919050565b7f537570706c79436f6e74726f6c3a204e6f20746f6b656e73206c65667420746f60008201527f206d696e74000000000000000000000000000000000000000000000000000000602082015250565b6000612bb9602583612057565b9150612bc482612b5d565b604082019050919050565b60006020820190508181036000830152612be881612bac565b9050919050565b7f4c696d697450657257616c6c65743a205468652063616c6c657220616464726560008201527f73732063616e206e6f74206d696e74206d6f726520746f6b656e730000000000602082015250565b6000612c4b603b83612057565b9150612c5682612bef565b604082019050919050565b60006020820190508181036000830152612c7a81612c3e565b9050919050565b6000612c8c82612018565b9150612c9783612018565b9250828202612ca581612018565b91508282048414831517612cbc57612cbb612704565b5b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000612cfd82612018565b9150612d0883612018565b925082612d1857612d17612cc3565b5b828204905092915050565b6000612d2e82612018565b9150612d3983612018565b925082612d4957612d48612cc3565b5b828206905092915050565b6000612d60828561265d565b601482019150612d70828461265d565b6014820191508190509392505050565b6000612d8c82856128d7565b9150612d9882846128d7565b91508190509392505050565b600081905092915050565b7f19457468657265756d205369676e6564204d6573736167653a0a333200000000600082015250565b6000612de5601c83612da4565b9150612df082612daf565b601c82019050919050565b6000819050919050565b6000819050919050565b612e20612e1b82612dfb565b612e05565b82525050565b6000612e3182612dd8565b9150612e3d8284612e0f565b60208201915081905092915050565b7f50617961626c653a204e6f7420656e6f7567682045746865722070726f76696460008201527f656420746f206d696e7400000000000000000000000000000000000000000000602082015250565b6000612ea8602a83612057565b9150612eb382612e4c565b604082019050919050565b60006020820190508181036000830152612ed781612e9b565b9050919050565b6000606082019050612ef36000830186611fee565b612f006020830185611fee565b612f0d6040830184612022565b949350505050565b6000612f2082611f63565b9050919050565b6000612f3282612639565b9050919050565b612f4a612f4582612f15565b612f27565b82525050565b6000612f5c8288612615565b602082019150612f6c8287612e0f565b602082019150612f7c8286612f39565b601482019150612f8c8285612615565b602082019150612f9c828461265d565b6014820191508190509695505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b612fe781612dfb565b82525050565b60006020820190506130026000830184612fde565b92915050565b600060ff82169050919050565b61301e81613008565b82525050565b60006080820190506130396000830187612fde565b6130466020830186613015565b6130536040830185612fde565b6130606060830184612fde565b9594505050505056fea2646970667358221220f205f76ca1ea1cfb29b542af1bde9af9086b0b3e218924f3441bff5ed1c58fa564736f6c63430008180033
Loading...
Loading
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.