More Info
Private Name Tags
ContractCreator
Sponsored
Latest 25 from a total of 161,031 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Mint | 19492626 | 8 mins ago | IN | 0 ETH | 0.00000043 | ||||
Mint | 19491612 | 42 mins ago | IN | 0 ETH | 0.00000047 | ||||
Mint | 19491469 | 47 mins ago | IN | 0 ETH | 0.00000056 | ||||
Mint | 19490676 | 1 hr ago | IN | 0 ETH | 0.00000045 | ||||
Mint | 19489746 | 1 hr ago | IN | 0 ETH | 0.00000047 | ||||
Mint | 19489192 | 2 hrs ago | IN | 0 ETH | 0.00000046 | ||||
Mint | 19488706 | 2 hrs ago | IN | 0 ETH | 0.00000048 | ||||
Mint | 19488161 | 2 hrs ago | IN | 0 ETH | 0.00000048 | ||||
Mint | 19487554 | 2 hrs ago | IN | 0 ETH | 0.00000042 | ||||
Mint | 19487141 | 3 hrs ago | IN | 0 ETH | 0.00000049 | ||||
Mint | 19486792 | 3 hrs ago | IN | 0 ETH | 0.00000044 | ||||
Mint | 19485340 | 4 hrs ago | IN | 0 ETH | 0.00000047 | ||||
Mint | 19484447 | 4 hrs ago | IN | 0 ETH | 0.0000005 | ||||
Mint | 19484082 | 4 hrs ago | IN | 0 ETH | 0.00000052 | ||||
Mint | 19482930 | 5 hrs ago | IN | 0 ETH | 0.00000041 | ||||
Mint | 19482752 | 5 hrs ago | IN | 0 ETH | 0.00000049 | ||||
Mint | 19482130 | 5 hrs ago | IN | 0 ETH | 0.00000043 | ||||
Mint | 19481765 | 6 hrs ago | IN | 0 ETH | 0.00000047 | ||||
Mint | 19481519 | 6 hrs ago | IN | 0 ETH | 0.00000044 | ||||
Mint | 19480932 | 6 hrs ago | IN | 0 ETH | 0.00000055 | ||||
Mint | 19480316 | 6 hrs ago | IN | 0 ETH | 0.0000005 | ||||
Mint | 19479326 | 7 hrs ago | IN | 0 ETH | 0.00000052 | ||||
Mint | 19478693 | 7 hrs ago | IN | 0 ETH | 0.00000053 | ||||
Mint | 19478117 | 8 hrs ago | IN | 0 ETH | 0.00000052 | ||||
Mint | 19477098 | 8 hrs ago | IN | 0 ETH | 0.00000047 |
Loading...
Loading
Contract Name:
ERC20Minter
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
No with 0 runs
Other Settings:
london EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import {ReentrancyGuard} from "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import {IProtocolRewards} from "@zoralabs/protocol-rewards/src/interfaces/IProtocolRewards.sol"; import {IERC20Minter} from "../../interfaces/IERC20Minter.sol"; import {LimitedMintPerAddress} from "../../minters/utils/LimitedMintPerAddress.sol"; import {SaleStrategy} from "../../minters/SaleStrategy.sol"; import {ICreatorCommands} from "../../interfaces/ICreatorCommands.sol"; import {ERC20MinterRewards} from "./ERC20MinterRewards.sol"; import {IZora1155} from "./IZora1155.sol"; /* ░░░░░░░░░░░░░░ ░░▒▒░░░░░░░░░░░░░░░░░░░░ ░░▒▒▒▒░░░░░░░░░░░░░░░░░░░░░░ ░░▒▒▒▒░░░░░░░░░░░░░░ ░░░░░░░░ ░▓▓▒▒▒▒░░░░░░░░░░░░ ░░░░░░░ ░▓▓▓▒▒▒▒░░░░░░░░░░░░ ░░░░░░░░ ░▓▓▓▒▒▒▒░░░░░░░░░░░░░░ ░░░░░░░░░░ ░▓▓▓▒▒▒▒▒▒░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░▓▓▓▓▓▒▒▒▒░░░░░░░░░░░░░░░░░░░░░░░░░░ ░▓▓▓▓▒▒▒▒▒▒░░░░░░░░░░░░░░░░░░░░░░░ ░░▓▓▓▓▒▒▒▒▒▒░░░░░░░░░░░░░░░░░░░░ ░░▓▓▓▓▓▓▒▒▒▒▒▒▒▒░░░░░░░░░▒▒▒▒▒░░ ░░▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░ ░░▓▓▓▓▓▓▓▓▓▓▓▓▒▒░░░ OURS TRULY, github.com/ourzora/zora-protocol */ /// @title ERC20Minter /// @notice Allows for ZoraCreator Mints to be purchased using ERC20 tokens /// @dev While this contract _looks_ like a minter, we need to be able to directly manage ERC20 tokens. Therefore, we need to establish minter permissions but instead of using the `requestMint` flow we directly request tokens to be minted in order to safely handle the incoming ERC20 tokens. /// @author @isabellasmallcombe contract ERC20Minter is ReentrancyGuard, IERC20Minter, SaleStrategy, LimitedMintPerAddress, ERC20MinterRewards { using SafeERC20 for IERC20; /// @notice The address of the Zora rewards recipient address public zoraRewardRecipientAddress; /// @notice The ERC20 sale configuration for a given 1155 token /// @dev 1155 token address => 1155 token id => SalesConfig mapping(address => mapping(uint256 => SalesConfig)) internal salesConfigs; /// @notice Initializes the contract with a Zora rewards recipient address /// @dev Allows deterministic contract address, called on deploy function initialize(address _zoraRewardRecipientAddress) external { if (_zoraRewardRecipientAddress == address(0)) { revert AddressZero(); } if (zoraRewardRecipientAddress != address(0)) { revert AlreadyInitialized(); } zoraRewardRecipientAddress = _zoraRewardRecipientAddress; emit ERC20MinterInitialized(TOTAL_REWARD_PCT); } /// @notice Computes the total reward value for a given amount of ERC20 tokens /// @param totalValue The total number of ERC20 tokens function computeTotalReward(uint256 totalValue) public pure returns (uint256) { return (totalValue * TOTAL_REWARD_PCT) / BPS_TO_PERCENT_2_DECIMAL_PERCISION; } /// @notice Computes the rewards value given an amount and a reward percentage /// @param totalReward The total reward to be distributed /// @param rewardPct The percentage of the reward to be distributed function computeReward(uint256 totalReward, uint256 rewardPct) public pure returns (uint256) { return (totalReward * rewardPct) / BPS_TO_PERCENT_8_DECIMAL_PERCISION; } /// @notice Computes the rewards for an ERC20 mint /// @param totalReward The total reward to be distributed function computePaidMintRewards(uint256 totalReward) public pure returns (RewardsSettings memory) { uint256 createReferralReward = computeReward(totalReward, CREATE_REFERRAL_PAID_MINT_REWARD_PCT); uint256 mintReferralReward = computeReward(totalReward, MINT_REFERRAL_PAID_MINT_REWARD_PCT); uint256 firstMinterReward = computeReward(totalReward, FIRST_MINTER_REWARD_PCT); uint256 zoraReward = totalReward - (createReferralReward + mintReferralReward + firstMinterReward); return RewardsSettings({ createReferralReward: createReferralReward, mintReferralReward: mintReferralReward, zoraReward: zoraReward, firstMinterReward: firstMinterReward }); } /// @notice Gets the create referral address for a given token /// @param tokenContract The address of the token contract /// @param tokenId The ID of the token function getCreateReferral(address tokenContract, uint256 tokenId) public view returns (address createReferral) { try IZora1155(tokenContract).createReferrals(tokenId) returns (address contractCreateReferral) { createReferral = contractCreateReferral; } catch {} if (createReferral == address(0)) { createReferral = zoraRewardRecipientAddress; } } /// @notice Gets the first minter address for a given token /// @param tokenContract The address of the token contract /// @param tokenId The ID of the token function getFirstMinter(address tokenContract, uint256 tokenId) public view returns (address firstMinter) { try IZora1155(tokenContract).firstMinters(tokenId) returns (address contractFirstMinter) { firstMinter = contractFirstMinter; if (firstMinter == address(0)) { firstMinter = IZora1155(tokenContract).getCreatorRewardRecipient(tokenId); } } catch { firstMinter = zoraRewardRecipientAddress; } } /// @notice Handles the incoming transfer of ERC20 tokens /// @param currency The address of the currency to use for the mint /// @param totalValue The total value of the mint function _handleIncomingTransfer(address currency, uint256 totalValue) internal { uint256 beforeBalance = IERC20(currency).balanceOf(address(this)); IERC20(currency).safeTransferFrom(msg.sender, address(this), totalValue); uint256 afterBalance = IERC20(currency).balanceOf(address(this)); if ((beforeBalance + totalValue) != afterBalance) { revert ERC20TransferSlippage(); } } /// @notice Distributes the rewards to the appropriate addresses /// @param totalReward The total reward to be distributed /// @param currency The currency used for the mint /// @param tokenId The ID of the token to mint /// @param tokenAddress The address of the token to mint /// @param mintReferral The address of the mint referral function _distributeRewards(uint256 totalReward, address currency, uint256 tokenId, address tokenAddress, address mintReferral) private { RewardsSettings memory settings = computePaidMintRewards(totalReward); address createReferral = getCreateReferral(tokenAddress, tokenId); address firstMinter = getFirstMinter(tokenAddress, tokenId); if (mintReferral == address(0)) { mintReferral = zoraRewardRecipientAddress; } IERC20(currency).safeTransfer(createReferral, settings.createReferralReward); IERC20(currency).safeTransfer(firstMinter, settings.firstMinterReward); IERC20(currency).safeTransfer(mintReferral, settings.mintReferralReward); IERC20(currency).safeTransfer(zoraRewardRecipientAddress, settings.zoraReward); emit ERC20RewardsDeposit( createReferral, mintReferral, firstMinter, zoraRewardRecipientAddress, tokenAddress, currency, tokenId, settings.createReferralReward, settings.mintReferralReward, settings.firstMinterReward, settings.zoraReward ); } /// @notice Mints a token using an ERC20 currency, note the total value must have been approved prior to calling this function /// @param mintTo The address to mint the token to /// @param quantity The quantity of tokens to mint /// @param tokenAddress The address of the token to mint /// @param tokenId The ID of the token to mint /// @param totalValue The total value of the mint /// @param currency The address of the currency to use for the mint /// @param mintReferral The address of the mint referral /// @param comment The optional mint comment function mint( address mintTo, uint256 quantity, address tokenAddress, uint256 tokenId, uint256 totalValue, address currency, address mintReferral, string calldata comment ) external nonReentrant { SalesConfig storage config = salesConfigs[tokenAddress][tokenId]; if (config.currency == address(0) || config.currency != currency) { revert InvalidCurrency(); } if (totalValue != (config.pricePerToken * quantity)) { revert WrongValueSent(); } if (block.timestamp < config.saleStart) { revert SaleHasNotStarted(); } if (block.timestamp > config.saleEnd) { revert SaleEnded(); } if (config.maxTokensPerAddress > 0) { _requireMintNotOverLimitAndUpdate(config.maxTokensPerAddress, quantity, tokenAddress, tokenId, mintTo); } _handleIncomingTransfer(currency, totalValue); IZora1155(tokenAddress).adminMint(mintTo, tokenId, quantity, ""); uint256 totalReward = computeTotalReward(totalValue); _distributeRewards(totalReward, currency, tokenId, tokenAddress, mintReferral); IERC20(config.currency).safeTransfer(config.fundsRecipient, totalValue - totalReward); if (bytes(comment).length > 0) { emit MintComment(mintTo, tokenAddress, tokenId, quantity, comment); } } /// @notice The percentage of the total value that is distributed as rewards function totalRewardPct() external pure returns (uint256) { return TOTAL_REWARD_PCT; } /// @notice The URI of the contract function contractURI() external pure returns (string memory) { return "https://github.com/ourzora/zora-protocol/"; } /// @notice The name of the contract function contractName() external pure returns (string memory) { return "ERC20 Minter"; } /// @notice The version of the contract function contractVersion() external pure returns (string memory) { return "1.0.0"; } /// @notice Sets the sale config for a given token function setSale(uint256 tokenId, SalesConfig memory salesConfig) external { if (salesConfig.pricePerToken < MIN_PRICE_PER_TOKEN) { revert PricePerTokenTooLow(); } if (salesConfig.currency == address(0)) { revert AddressZero(); } if (salesConfig.fundsRecipient == address(0)) { revert AddressZero(); } salesConfigs[msg.sender][tokenId] = salesConfig; // Emit event emit SaleSet(msg.sender, tokenId, salesConfig); } /// @notice Deletes the sale config for a given token function resetSale(uint256 tokenId) external override { delete salesConfigs[msg.sender][tokenId]; // Deleted sale emit event emit SaleSet(msg.sender, tokenId, salesConfigs[msg.sender][tokenId]); } /// @notice Returns the sale config for a given token function sale(address tokenContract, uint256 tokenId) external view returns (SalesConfig memory) { return salesConfigs[tokenContract][tokenId]; } /// @notice IERC165 interface support function supportsInterface(bytes4 interfaceId) public pure virtual override(LimitedMintPerAddress, SaleStrategy) returns (bool) { return super.supportsInterface(interfaceId) || LimitedMintPerAddress.supportsInterface(interfaceId) || SaleStrategy.supportsInterface(interfaceId); } /// @notice Reverts as `requestMint` is not used in the ERC20 minter. Call `mint` instead. function requestMint(address, uint256, uint256, uint256, bytes calldata) external pure returns (ICreatorCommands.CommandSet memory) { revert RequestMintInvalidUseMint(); } /// @notice Set the Zora rewards recipient address /// @param recipient The new recipient address function setZoraRewardsRecipient(address recipient) external { if (msg.sender != zoraRewardRecipientAddress) { revert OnlyZoraRewardsRecipient(); } if (recipient == address(0)) { revert AddressZero(); } emit ZoraRewardsRecipientSet(zoraRewardRecipientAddress, recipient); zoraRewardRecipientAddress = recipient; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { // On the first call to nonReentrant, _status will be _NOT_ENTERED require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; } function _nonReentrantAfter() private { // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } /** * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a * `nonReentrant` function in the call stack. */ function _reentrancyGuardEntered() internal view returns (bool) { return _status == _ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 amount) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../extensions/IERC20Permit.sol"; import "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; /** * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } /** * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful. */ function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove(IERC20 token, address spender, uint256 value) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } /** * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 oldAllowance = token.allowance(address(this), spender); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value)); } /** * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value)); } } /** * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. Compatible with tokens that require the approval to be set to * 0 before setting it to a non-zero value. */ function forceApprove(IERC20 token, address spender, uint256 value) internal { bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value); if (!_callOptionalReturnBool(token, approvalCall)) { _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0)); _callOptionalReturn(token, approvalCall); } } /** * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`. * Revert on invalid signature. */ function safePermit( IERC20Permit token, address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) internal { uint256 nonceBefore = token.nonces(owner); token.permit(owner, spender, value, deadline, v, r, s); uint256 nonceAfter = token.nonces(owner); require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed"); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); require(returndata.length == 0 || abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). * * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead. */ function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false // and not revert is the subcall reverts. (bool success, bytes memory returndata) = address(token).call(data); return success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token)); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; /// @title IProtocolRewards /// @notice The interface for deposits & withdrawals for Protocol Rewards interface IProtocolRewards { /// @notice Rewards Deposit Event /// @param creator Creator for NFT rewards /// @param createReferral Creator referral /// @param mintReferral Mint referral user /// @param firstMinter First minter reward recipient /// @param zora ZORA recipient /// @param from The caller of the deposit /// @param creatorReward Creator reward amount /// @param createReferralReward Creator referral reward /// @param mintReferralReward Mint referral amount /// @param firstMinterReward First minter reward amount /// @param zoraReward ZORA amount event RewardsDeposit( address indexed creator, address indexed createReferral, address indexed mintReferral, address firstMinter, address zora, address from, uint256 creatorReward, uint256 createReferralReward, uint256 mintReferralReward, uint256 firstMinterReward, uint256 zoraReward ); /// @notice Deposit Event /// @param from From user /// @param to To user (within contract) /// @param reason Optional bytes4 reason for indexing /// @param amount Amount of deposit /// @param comment Optional user comment event Deposit(address indexed from, address indexed to, bytes4 indexed reason, uint256 amount, string comment); /// @notice Withdraw Event /// @param from From user /// @param to To user (within contract) /// @param amount Amount of deposit event Withdraw(address indexed from, address indexed to, uint256 amount); /// @notice Cannot send to address zero error ADDRESS_ZERO(); /// @notice Function argument array length mismatch error ARRAY_LENGTH_MISMATCH(); /// @notice Invalid deposit error INVALID_DEPOSIT(); /// @notice Invalid signature for deposit error INVALID_SIGNATURE(); /// @notice Invalid withdraw error INVALID_WITHDRAW(); /// @notice Signature for withdraw is too old and has expired error SIGNATURE_DEADLINE_EXPIRED(); /// @notice Low-level ETH transfer has failed error TRANSFER_FAILED(); /// @notice Generic function to deposit ETH for a recipient, with an optional comment /// @param to Address to deposit to /// @param to Reason system reason for deposit (used for indexing) /// @param comment Optional comment as reason for deposit function deposit(address to, bytes4 why, string calldata comment) external payable; /// @notice Generic function to deposit ETH for multiple recipients, with an optional comment /// @param recipients recipients to send the amount to, array aligns with amounts /// @param amounts amounts to send to each recipient, array aligns with recipients /// @param reasons optional bytes4 hash for indexing /// @param comment Optional comment to include with mint function depositBatch(address[] calldata recipients, uint256[] calldata amounts, bytes4[] calldata reasons, string calldata comment) external payable; /// @notice Used by Zora ERC-721 & ERC-1155 contracts to deposit protocol rewards /// @param creator Creator for NFT rewards /// @param creatorReward Creator reward amount /// @param createReferral Creator referral /// @param createReferralReward Creator referral reward /// @param mintReferral Mint referral user /// @param mintReferralReward Mint referral amount /// @param firstMinter First minter reward /// @param firstMinterReward First minter reward amount /// @param zora ZORA recipient /// @param zoraReward ZORA amount function depositRewards( address creator, uint256 creatorReward, address createReferral, uint256 createReferralReward, address mintReferral, uint256 mintReferralReward, address firstMinter, uint256 firstMinterReward, address zora, uint256 zoraReward ) external payable; /// @notice Withdraw protocol rewards /// @param to Withdraws from msg.sender to this address /// @param amount amount to withdraw function withdraw(address to, uint256 amount) external; /// @notice Execute a withdraw of protocol rewards via signature /// @param from Withdraw from this address /// @param to Withdraw to this address /// @param amount Amount to withdraw /// @param deadline Deadline for the signature to be valid /// @param v V component of signature /// @param r R component of signature /// @param s S component of signature function withdrawWithSig(address from, address to, uint256 amount, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; interface IERC20Minter { struct RewardsSettings { /// @notice Amount of the create referral reward uint256 createReferralReward; /// @notice Amount of the mint referral reward uint256 mintReferralReward; /// @notice Amount of the zora reward uint256 zoraReward; /// @notice Amount of the first minter reward uint256 firstMinterReward; } struct SalesConfig { /// @notice Unix timestamp for the sale start uint64 saleStart; /// @notice Unix timestamp for the sale end uint64 saleEnd; /// @notice Max tokens that can be minted for an address, 0 if unlimited uint64 maxTokensPerAddress; /// @notice Price per token in ERC20 currency uint256 pricePerToken; /// @notice Funds recipient (0 if no different funds recipient than the contract global) address fundsRecipient; /// @notice ERC20 Currency address address currency; } /// @notice Rewards Deposit Event /// @param createReferral Creator referral address /// @param mintReferral Mint referral address /// @param firstMinter First minter address /// @param zora ZORA recipient address /// @param collection The collection address of the token /// @param currency Currency used for the deposit /// @param tokenId Token ID /// @param createReferralReward Creator referral reward /// @param mintReferralReward Mint referral amount /// @param firstMinterReward First minter amount /// @param zoraReward ZORA amount event ERC20RewardsDeposit( address indexed createReferral, address indexed mintReferral, address indexed firstMinter, address zora, address collection, address currency, uint256 tokenId, uint256 createReferralReward, uint256 mintReferralReward, uint256 firstMinterReward, uint256 zoraReward ); /// @notice ERC20MinterInitialized Event /// @param rewardPercentage The reward percentage event ERC20MinterInitialized(uint256 rewardPercentage); /// @notice MintComment Event /// @param sender The sender of the comment /// @param tokenContract The token contract address /// @param tokenId The token ID /// @param quantity The quantity of tokens minted /// @param comment The comment event MintComment(address indexed sender, address indexed tokenContract, uint256 indexed tokenId, uint256 quantity, string comment); /// @notice SaleSet Event /// @param mediaContract The media contract address /// @param tokenId The token ID /// @param salesConfig The sales configuration event SaleSet(address indexed mediaContract, uint256 indexed tokenId, SalesConfig salesConfig); /// @notice ZoraRewardsRecipientSet Event /// @param prevRecipient The previous recipient address /// @param newRecipient The new recipient address event ZoraRewardsRecipientSet(address indexed prevRecipient, address indexed newRecipient); /// @notice Cannot set address to zero error AddressZero(); /// @notice Cannot set currency address to zero error InvalidCurrency(); /// @notice Price per ERC20 token is too low error PricePerTokenTooLow(); /// @notice requestMint() is not used in ERC20 minter, use mint() instead error RequestMintInvalidUseMint(); /// @notice Sale has already ended error SaleEnded(); /// @notice Sale has not started yet error SaleHasNotStarted(); /// @notice Value sent is incorrect error WrongValueSent(); /// @notice ERC20 transfer slippage error ERC20TransferSlippage(); /// @notice ERC20Minter is already initialized error AlreadyInitialized(); /// @notice Only the Zora rewards recipient can call this function error OnlyZoraRewardsRecipient(); /// @notice Mints a token using an ERC20 currency, note the total value must have been approved prior to calling this function /// @param mintTo The address to mint the token to /// @param quantity The quantity of tokens to mint /// @param tokenAddress The address of the token to mint /// @param tokenId The ID of the token to mint /// @param totalValue The total value of the mint /// @param currency The address of the currency to use for the mint /// @param mintReferral The address of the mint referral /// @param comment The optional mint comment function mint( address mintTo, uint256 quantity, address tokenAddress, uint256 tokenId, uint256 totalValue, address currency, address mintReferral, string calldata comment ) external; /// @notice Sets the sale config for a given token function setSale(uint256 tokenId, SalesConfig memory salesConfig) external; /// @notice Returns the sale config for a given token function sale(address tokenContract, uint256 tokenId) external view returns (SalesConfig memory); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; import {ILimitedMintPerAddress} from "../../interfaces/ILimitedMintPerAddress.sol"; contract LimitedMintPerAddress is ILimitedMintPerAddress { /// @notice Storage for slot to check user mints /// @notice target contract -> tokenId -> minter user -> numberMinted /// @dev No gap or stroage interface since this is used within non-upgradeable contracts mapping(address => mapping(uint256 => mapping(address => uint256))) internal mintedPerAddress; function getMintedPerWallet(address tokenContract, uint256 tokenId, address wallet) external view returns (uint256) { return mintedPerAddress[tokenContract][tokenId][wallet]; } function _requireMintNotOverLimitAndUpdate(uint256 limit, uint256 numRequestedMint, address tokenContract, uint256 tokenId, address wallet) internal { mintedPerAddress[tokenContract][tokenId][wallet] += numRequestedMint; if (mintedPerAddress[tokenContract][tokenId][wallet] > limit) { revert UserExceedsMintLimit(wallet, limit, mintedPerAddress[tokenContract][tokenId][wallet]); } } function supportsInterface(bytes4 interfaceId) public pure virtual override returns (bool) { return interfaceId == type(ILimitedMintPerAddress).interfaceId; } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; import {IERC165Upgradeable} from "@zoralabs/openzeppelin-contracts-upgradeable/contracts/interfaces/IERC165Upgradeable.sol"; import {IMinter1155} from "../interfaces/IMinter1155.sol"; import {IContractMetadata} from "../interfaces/IContractMetadata.sol"; import {IVersionedContract} from "../interfaces/IVersionedContract.sol"; /// @notice Sales Strategy Helper contract template on top of IMinter1155 /// @author @iainnash / @tbtstl abstract contract SaleStrategy is IMinter1155, IVersionedContract, IContractMetadata { /// @notice This function resets the sales configuration for a given tokenId and contract. /// @dev This function is intentioned to be called directly from the affected sales contract function resetSale(uint256 tokenId) external virtual; function supportsInterface(bytes4 interfaceId) public pure virtual returns (bool) { return interfaceId == type(IMinter1155).interfaceId || interfaceId == type(IERC165Upgradeable).interfaceId; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; /// @notice Creator Commands used by minter modules passed back to the main modules interface ICreatorCommands { /// @notice This enum is used to define supported creator action types. /// This can change in the future enum CreatorActions { // No operation - also the default for mintings that may not return a command NO_OP, // Send ether SEND_ETH, // Mint operation MINT } /// @notice This command is for struct Command { // Method for operation CreatorActions method; // Arguments used for this operation bytes args; } /// @notice This command set is returned from the minter back to the user struct CommandSet { Command[] commands; uint256 at; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; /// @notice ERC20Minter Helper contract template abstract contract ERC20MinterRewards { uint256 internal constant MIN_PRICE_PER_TOKEN = 10_000; uint256 internal constant TOTAL_REWARD_PCT = 5; // 5% uint256 internal constant BPS_TO_PERCENT_2_DECIMAL_PERCISION = 100; uint256 internal constant BPS_TO_PERCENT_8_DECIMAL_PERCISION = 100_000_000; uint256 internal constant CREATE_REFERRAL_PAID_MINT_REWARD_PCT = 28_571400; // 28.5714%, roughly 0.000222 ETH at a 0.000777 value uint256 internal constant MINT_REFERRAL_PAID_MINT_REWARD_PCT = 28_571400; // 28.5714%, roughly 0.000222 ETH at a 0.000777 value uint256 internal constant ZORA_PAID_MINT_REWARD_PCT = 28_571400; // 28.5714%, roughly 0.000222 ETH at a 0.000777 value uint256 internal constant FIRST_MINTER_REWARD_PCT = 14_228500; // 14.2285%, roughly 0.000111 ETH at a 0.000777 value }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; /// @notice The set of public functions on a Zora 1155 contract that are called by the ERC20 minter contract interface IZora1155 { function createReferrals(uint256 tokenId) external view returns (address); function firstMinters(uint256 tokenId) external view returns (address); function getCreatorRewardRecipient(uint256 tokenId) external view returns (address); function adminMint(address recipient, uint256 tokenId, uint256 quantity, bytes memory data) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/IERC20Permit.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * * Furthermore, `isContract` will also return true if the target contract within * the same transaction is already scheduled for destruction by `SELFDESTRUCT`, * which only has an effect at the end of a transaction. * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import {IERC165Upgradeable} from "@zoralabs/openzeppelin-contracts-upgradeable/contracts/interfaces/IERC165Upgradeable.sol"; interface ILimitedMintPerAddressErrors { error UserExceedsMintLimit(address user, uint256 limit, uint256 requestedAmount); } interface ILimitedMintPerAddress is IERC165Upgradeable, ILimitedMintPerAddressErrors { function getMintedPerWallet(address token, uint256 tokenId, address wallet) external view returns (uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (interfaces/IERC165.sol) pragma solidity ^0.8.0; import "../utils/introspection/IERC165Upgradeable.sol";
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import {IERC165Upgradeable} from "@zoralabs/openzeppelin-contracts-upgradeable/contracts/interfaces/IERC165Upgradeable.sol"; import {ICreatorCommands} from "./ICreatorCommands.sol"; /// @notice Minter standard interface /// @dev Minters need to confirm to the ERC165 selector of type(IMinter1155).interfaceId interface IMinter1155 is IERC165Upgradeable { function requestMint( address sender, uint256 tokenId, uint256 quantity, uint256 ethValueSent, bytes calldata minterArguments ) external returns (ICreatorCommands.CommandSet memory commands); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; interface IHasContractName { /// @notice Contract name returns the pretty contract name function contractName() external returns (string memory); } interface IContractMetadata is IHasContractName { /// @notice Contract URI returns the uri for more information about the given contract function contractURI() external returns (string memory); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; interface IVersionedContract { function contractVersion() external returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165Upgradeable { /** * @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); }
{ "remappings": [ "ds-test/=node_modules/ds-test/src/", "forge-std/=node_modules/forge-std/src/", "@zoralabs/openzeppelin-contracts-upgradeable/=node_modules/@zoralabs/openzeppelin-contracts-upgradeable/", "@zoralabs/protocol-rewards/src/=node_modules/@zoralabs/protocol-rewards/src/", "@zoralabs/mints-contracts/src/=node_modules/@zoralabs/mints-contracts/src/", "@zoralabs/shared-contracts/=node_modules/@zoralabs/shared-contracts/src/", "@openzeppelin/contracts/=node_modules/@openzeppelin/contracts/", "_imagine/=_imagine/", "solemate/=/node_modules/solemate/src/", "solady/=node_modules/solady/src/", "mint/=_imagine/mint/", "solmate/=node_modules/solmate/" ], "optimizer": { "enabled": false, "runs": 0 }, "metadata": { "useLiteralContent": false, "bytecodeHash": "ipfs" }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "london", "viaIR": false, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"name":"AddressZero","type":"error"},{"inputs":[],"name":"AlreadyInitialized","type":"error"},{"inputs":[],"name":"ERC20TransferSlippage","type":"error"},{"inputs":[],"name":"InvalidCurrency","type":"error"},{"inputs":[],"name":"OnlyZoraRewardsRecipient","type":"error"},{"inputs":[],"name":"PricePerTokenTooLow","type":"error"},{"inputs":[],"name":"RequestMintInvalidUseMint","type":"error"},{"inputs":[],"name":"SaleEnded","type":"error"},{"inputs":[],"name":"SaleHasNotStarted","type":"error"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"limit","type":"uint256"},{"internalType":"uint256","name":"requestedAmount","type":"uint256"}],"name":"UserExceedsMintLimit","type":"error"},{"inputs":[],"name":"WrongValueSent","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"rewardPercentage","type":"uint256"}],"name":"ERC20MinterInitialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"createReferral","type":"address"},{"indexed":true,"internalType":"address","name":"mintReferral","type":"address"},{"indexed":true,"internalType":"address","name":"firstMinter","type":"address"},{"indexed":false,"internalType":"address","name":"zora","type":"address"},{"indexed":false,"internalType":"address","name":"collection","type":"address"},{"indexed":false,"internalType":"address","name":"currency","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"createReferralReward","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"mintReferralReward","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"firstMinterReward","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"zoraReward","type":"uint256"}],"name":"ERC20RewardsDeposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"address","name":"tokenContract","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"quantity","type":"uint256"},{"indexed":false,"internalType":"string","name":"comment","type":"string"}],"name":"MintComment","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"mediaContract","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"components":[{"internalType":"uint64","name":"saleStart","type":"uint64"},{"internalType":"uint64","name":"saleEnd","type":"uint64"},{"internalType":"uint64","name":"maxTokensPerAddress","type":"uint64"},{"internalType":"uint256","name":"pricePerToken","type":"uint256"},{"internalType":"address","name":"fundsRecipient","type":"address"},{"internalType":"address","name":"currency","type":"address"}],"indexed":false,"internalType":"struct IERC20Minter.SalesConfig","name":"salesConfig","type":"tuple"}],"name":"SaleSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"prevRecipient","type":"address"},{"indexed":true,"internalType":"address","name":"newRecipient","type":"address"}],"name":"ZoraRewardsRecipientSet","type":"event"},{"inputs":[{"internalType":"uint256","name":"totalReward","type":"uint256"}],"name":"computePaidMintRewards","outputs":[{"components":[{"internalType":"uint256","name":"createReferralReward","type":"uint256"},{"internalType":"uint256","name":"mintReferralReward","type":"uint256"},{"internalType":"uint256","name":"zoraReward","type":"uint256"},{"internalType":"uint256","name":"firstMinterReward","type":"uint256"}],"internalType":"struct IERC20Minter.RewardsSettings","name":"","type":"tuple"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"totalReward","type":"uint256"},{"internalType":"uint256","name":"rewardPct","type":"uint256"}],"name":"computeReward","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"totalValue","type":"uint256"}],"name":"computeTotalReward","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"contractName","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"contractVersion","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"tokenContract","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getCreateReferral","outputs":[{"internalType":"address","name":"createReferral","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tokenContract","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getFirstMinter","outputs":[{"internalType":"address","name":"firstMinter","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tokenContract","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"wallet","type":"address"}],"name":"getMintedPerWallet","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_zoraRewardRecipientAddress","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"mintTo","type":"address"},{"internalType":"uint256","name":"quantity","type":"uint256"},{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"totalValue","type":"uint256"},{"internalType":"address","name":"currency","type":"address"},{"internalType":"address","name":"mintReferral","type":"address"},{"internalType":"string","name":"comment","type":"string"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"requestMint","outputs":[{"components":[{"components":[{"internalType":"enum ICreatorCommands.CreatorActions","name":"method","type":"uint8"},{"internalType":"bytes","name":"args","type":"bytes"}],"internalType":"struct ICreatorCommands.Command[]","name":"commands","type":"tuple[]"},{"internalType":"uint256","name":"at","type":"uint256"}],"internalType":"struct ICreatorCommands.CommandSet","name":"","type":"tuple"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"resetSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenContract","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"sale","outputs":[{"components":[{"internalType":"uint64","name":"saleStart","type":"uint64"},{"internalType":"uint64","name":"saleEnd","type":"uint64"},{"internalType":"uint64","name":"maxTokensPerAddress","type":"uint64"},{"internalType":"uint256","name":"pricePerToken","type":"uint256"},{"internalType":"address","name":"fundsRecipient","type":"address"},{"internalType":"address","name":"currency","type":"address"}],"internalType":"struct IERC20Minter.SalesConfig","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"components":[{"internalType":"uint64","name":"saleStart","type":"uint64"},{"internalType":"uint64","name":"saleEnd","type":"uint64"},{"internalType":"uint64","name":"maxTokensPerAddress","type":"uint64"},{"internalType":"uint256","name":"pricePerToken","type":"uint256"},{"internalType":"address","name":"fundsRecipient","type":"address"},{"internalType":"address","name":"currency","type":"address"}],"internalType":"struct IERC20Minter.SalesConfig","name":"salesConfig","type":"tuple"}],"name":"setSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"}],"name":"setZoraRewardsRecipient","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"totalRewardPct","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"zoraRewardRecipientAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b506001600081905550613509806100286000396000f3fe608060405234801561001057600080fd5b50600436106100f15760003560e01c806301ffc9a7146100f657806319b45c4f146101265780634132239b146101425780635369d3e8146101725780635c046084146101905780635d759bd8146101c0578063611efc09146101f057806362b60245146102205780636890e5b31461023e57806375d0c0dc1461026e5780637b49ff2c1461028c5780638f4d174e146102bc578063a0a8e460146102d8578063ac973d5b146102f6578063c4d66de814610326578063ce35b8af14610342578063e2ebba291461035e578063e8a3d4851461038e578063f54f216a146103ac575b600080fd5b610110600480360381019061010b919061223c565b6103c8565b60405161011d9190612284565b60405180910390f35b610140600480360381019061013b91906122d5565b6103fa565b005b61015c600480360381019061015791906122d5565b610595565b6040516101699190612311565b60405180910390f35b61017a6105b7565b604051610187919061236d565b60405180910390f35b6101aa60048036038101906101a591906122d5565b6105dd565b6040516101b791906123ec565b60405180910390f35b6101da60048036038101906101d59190612433565b61066c565b6040516101e7919061236d565b60405180910390f35b61020a60048036038101906102059190612433565b61074b565b6040516102179190612520565b60405180910390f35b610228610902565b6040516102359190612311565b60405180910390f35b610258600480360381019061025391906125a0565b61090b565b604051610265919061287d565b60405180910390f35b610276610945565b60405161028391906128f4565b60405180910390f35b6102a660048036038101906102a19190612916565b610982565b6040516102b39190612311565b60405180910390f35b6102d660048036038101906102d19190612969565b610a1b565b005b6102e0610bc8565b6040516102ed91906128f4565b60405180910390f35b610310600480360381019061030b9190612433565b610c05565b60405161031d919061236d565b60405180910390f35b610340600480360381019061033b9190612969565b610d64565b005b61035c60048036038101906103579190612ae2565b610ece565b005b61037860048036038101906103739190612b22565b6111ae565b6040516103859190612311565b60405180910390f35b6103966111d3565b6040516103a391906128f4565b60405180910390f35b6103c660048036038101906103c19190612bb8565b6111f3565b005b60006103d38261162d565b806103e357506103e28261162d565b5b806103f357506103f282611697565b5b9050919050565b600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828152602001908152602001600020600080820160006101000a81549067ffffffffffffffff02191690556000820160086101000a81549067ffffffffffffffff02191690556000820160106101000a81549067ffffffffffffffff021916905560018201600090556002820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556003820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690555050803373ffffffffffffffffffffffffffffffffffffffff167f5a10ca3dd9f8e42a050c7f379d07bacd686570baf0b1c8574362fc474a9aa1a0600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600085815260200190815260200160002060405161058a9190612e26565b60405180910390a350565b600060646005836105a69190612e70565b6105b09190612ee1565b9050919050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6105e561210e565b60006105f5836301b3f7086111ae565b90506000610607846301b3f7086111ae565b905060006106188562d91c146111ae565b905060008183856106299190612f12565b6106339190612f12565b8661063e9190612f46565b9050604051806080016040528085815260200184815260200182815260200183815250945050505050919050565b60008273ffffffffffffffffffffffffffffffffffffffff16637dafae4d836040518263ffffffff1660e01b81526004016106a79190612311565b602060405180830381865afa9250505080156106e157506040513d601f19601f820116820180604052508101906106de9190612f8f565b60015b156106eb57809150505b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361074557600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690505b92915050565b610753612136565b600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008381526020019081526020016000206040518060c00160405290816000820160009054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff1681526020016000820160089054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff1681526020016000820160109054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff168152602001600182015481526020016002820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016003820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681525050905092915050565b60006005905090565b6109136121b6565b6040517f9274ec1d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60606040518060400160405280600c81526020017f4552433230204d696e7465720000000000000000000000000000000000000000815250905090565b6000600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600084815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490509392505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610aa2576040517f8ba1835100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610b08576040517f9fabe1c100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167fc93702c5f2a62678849c2f198d92f7833a8d4a8afc765cf15693222ab5b15e5060405160405180910390a380600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60606040518060400160405280600581526020017f312e302e30000000000000000000000000000000000000000000000000000000815250905090565b60008273ffffffffffffffffffffffffffffffffffffffff16639ebb8324836040518263ffffffff1660e01b8152600401610c409190612311565b602060405180830381865afa925050508015610c7a57506040513d601f19601f82011682018060405250810190610c779190612f8f565b60015b610ca857600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050610d5e565b809150600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610d5c578373ffffffffffffffffffffffffffffffffffffffff16635e4e0404846040518263ffffffff1660e01b8152600401610d189190612311565b602060405180830381865afa158015610d35573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d599190612f8f565b91505b505b92915050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610dca576040517f9fabe1c100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e52576040517f0dc149f000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f658c97f8591190c843529a9019f5ae8055b6c690ab14156b0e589a5253c5ccb96005604051610ec39190612311565b60405180910390a150565b61271081606001511015610f0e576040517f835de65800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168160a0015173ffffffffffffffffffffffffffffffffffffffff1603610f78576040517f9fabe1c100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16816080015173ffffffffffffffffffffffffffffffffffffffff1603610fe2576040517f9fabe1c100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600084815260200190815260200160002060008201518160000160006101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555060208201518160000160086101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555060408201518160000160106101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055506060820151816001015560808201518160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060a08201518160030160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550905050813373ffffffffffffffffffffffffffffffffffffffff167f5a10ca3dd9f8e42a050c7f379d07bacd686570baf0b1c8574362fc474a9aa1a0836040516111a29190612520565b60405180910390a35050565b60006305f5e10082846111c19190612e70565b6111cb9190612ee1565b905092915050565b60606040518060600160405280602981526020016134ab60299139905090565b6111fb611769565b6000600360008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008881526020019081526020016000209050600073ffffffffffffffffffffffffffffffffffffffff168160030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614806112fe57508473ffffffffffffffffffffffffffffffffffffffff168160030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614155b15611335576040517ff599342800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8881600101546113459190612e70565b861461137d576040517f2f4613eb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8060000160009054906101000a900467ffffffffffffffff1667ffffffffffffffff164210156113d9576040517fe8c4db8200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8060000160089054906101000a900467ffffffffffffffff1667ffffffffffffffff16421115611435576040517f0bd8a3eb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008160000160109054906101000a900467ffffffffffffffff1667ffffffffffffffff1611156114905761148f8160000160109054906101000a900467ffffffffffffffff1667ffffffffffffffff168a8a8a8e6117b8565b5b61149a85876119c6565b8773ffffffffffffffffffffffffffffffffffffffff1663c238d1ee8b898c6040518463ffffffff1660e01b81526004016114d793929190612ff3565b600060405180830381600087803b1580156114f157600080fd5b505af1158015611505573d6000803e3d6000fd5b50505050600061151487610595565b905061152381878a8c89611b39565b6115a18260020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1682896115579190612f46565b8460030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611d609092919063ffffffff16565b600084849050111561161857878973ffffffffffffffffffffffffffffffffffffffff168c73ffffffffffffffffffffffffffffffffffffffff167fb9490aee663998179ad13f9e1c1eb6189c71ad1a9ec87f33ad2766f98d9a268a8d888860405161160f93929190613079565b60405180910390a45b5050611622611de6565b505050505050505050565b60007f7b49ff2c000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b60007f6890e5b3000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061176257507f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b9050919050565b6002600054036117ae576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117a5906130f7565b60405180910390fd5b6002600081905550565b83600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600084815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546118559190612f12565b9250508190555084600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600084815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205411156119bf578085600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600085815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040517fe2d915640000000000000000000000000000000000000000000000000000000081526004016119b693929190613117565b60405180910390fd5b5050505050565b60008273ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401611a01919061236d565b602060405180830381865afa158015611a1e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a429190613163565b9050611a713330848673ffffffffffffffffffffffffffffffffffffffff16611df0909392919063ffffffff16565b60008373ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401611aac919061236d565b602060405180830381865afa158015611ac9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611aed9190613163565b9050808383611afc9190612f12565b14611b33576040517fdc5b522d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505050565b6000611b44866105dd565b90506000611b52848661066c565b90506000611b608587610c05565b9050600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603611bbc57600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1693505b611beb8284600001518973ffffffffffffffffffffffffffffffffffffffff16611d609092919063ffffffff16565b611c1a8184606001518973ffffffffffffffffffffffffffffffffffffffff16611d609092919063ffffffff16565b611c498484602001518973ffffffffffffffffffffffffffffffffffffffff16611d609092919063ffffffff16565b611c9a600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684604001518973ffffffffffffffffffffffffffffffffffffffff16611d609092919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f6d43fd9d85f88450d1b777b5e7d58dec9b8dd36d77bf01bc5e5423d4a92d2246600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16898c8c8a600001518b602001518c606001518d60400151604051611d4e989796959493929190613190565b60405180910390a45050505050505050565b611de18363a9059cbb60e01b8484604051602401611d7f92919061320e565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611e79565b505050565b6001600081905550565b611e73846323b872dd60e01b858585604051602401611e1193929190613237565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611e79565b50505050565b6000611edb826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16611f419092919063ffffffff16565b9050600081511480611efd575080806020019051810190611efc919061329a565b5b611f3c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f3390613339565b60405180910390fd5b505050565b6060611f508484600085611f59565b90509392505050565b606082471015611f9e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f95906133cb565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051611fc79190613427565b60006040518083038185875af1925050503d8060008114612004576040519150601f19603f3d011682016040523d82523d6000602084013e612009565b606091505b509150915061201a87838387612026565b92505050949350505050565b60608315612088576000835103612080576120408561209b565b61207f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120769061348a565b60405180910390fd5b5b829050612093565b61209283836120be565b5b949350505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b6000825111156120d15781518083602001fd5b806040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161210591906128f4565b60405180910390fd5b6040518060800160405280600081526020016000815260200160008152602001600081525090565b6040518060c00160405280600067ffffffffffffffff168152602001600067ffffffffffffffff168152602001600067ffffffffffffffff16815260200160008152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff1681525090565b604051806040016040528060608152602001600081525090565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b612219816121e4565b811461222457600080fd5b50565b60008135905061223681612210565b92915050565b600060208284031215612252576122516121da565b5b600061226084828501612227565b91505092915050565b60008115159050919050565b61227e81612269565b82525050565b60006020820190506122996000830184612275565b92915050565b6000819050919050565b6122b28161229f565b81146122bd57600080fd5b50565b6000813590506122cf816122a9565b92915050565b6000602082840312156122eb576122ea6121da565b5b60006122f9848285016122c0565b91505092915050565b61230b8161229f565b82525050565b60006020820190506123266000830184612302565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006123578261232c565b9050919050565b6123678161234c565b82525050565b6000602082019050612382600083018461235e565b92915050565b6123918161229f565b82525050565b6080820160008201516123ad6000850182612388565b5060208201516123c06020850182612388565b5060408201516123d36040850182612388565b5060608201516123e66060850182612388565b50505050565b60006080820190506124016000830184612397565b92915050565b6124108161234c565b811461241b57600080fd5b50565b60008135905061242d81612407565b92915050565b6000806040838503121561244a576124496121da565b5b60006124588582860161241e565b9250506020612469858286016122c0565b9150509250929050565b600067ffffffffffffffff82169050919050565b61249081612473565b82525050565b61249f8161234c565b82525050565b60c0820160008201516124bb6000850182612487565b5060208201516124ce6020850182612487565b5060408201516124e16040850182612487565b5060608201516124f46060850182612388565b5060808201516125076080850182612496565b5060a082015161251a60a0850182612496565b50505050565b600060c08201905061253560008301846124a5565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f8401126125605761255f61253b565b5b8235905067ffffffffffffffff81111561257d5761257c612540565b5b60208301915083600182028301111561259957612598612545565b5b9250929050565b60008060008060008060a087890312156125bd576125bc6121da565b5b60006125cb89828a0161241e565b96505060206125dc89828a016122c0565b95505060406125ed89828a016122c0565b94505060606125fe89828a016122c0565b935050608087013567ffffffffffffffff81111561261f5761261e6121df565b5b61262b89828a0161254a565b92509250509295509295509295565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b600381106126a6576126a5612666565b5b50565b60008190506126b782612695565b919050565b60006126c7826126a9565b9050919050565b6126d7816126bc565b82525050565b600081519050919050565b600082825260208201905092915050565b60005b838110156127175780820151818401526020810190506126fc565b60008484015250505050565b6000601f19601f8301169050919050565b600061273f826126dd565b61274981856126e8565b93506127598185602086016126f9565b61276281612723565b840191505092915050565b600060408301600083015161278560008601826126ce565b506020830151848203602086015261279d8282612734565b9150508091505092915050565b60006127b6838361276d565b905092915050565b6000602082019050919050565b60006127d68261263a565b6127e08185612645565b9350836020820285016127f285612656565b8060005b8581101561282e578484038952815161280f85826127aa565b945061281a836127be565b925060208a019950506001810190506127f6565b50829750879550505050505092915050565b6000604083016000830151848203600086015261285d82826127cb565b91505060208301516128726020860182612388565b508091505092915050565b600060208201905081810360008301526128978184612840565b905092915050565b600081519050919050565b600082825260208201905092915050565b60006128c68261289f565b6128d081856128aa565b93506128e08185602086016126f9565b6128e981612723565b840191505092915050565b6000602082019050818103600083015261290e81846128bb565b905092915050565b60008060006060848603121561292f5761292e6121da565b5b600061293d8682870161241e565b935050602061294e868287016122c0565b925050604061295f8682870161241e565b9150509250925092565b60006020828403121561297f5761297e6121da565b5b600061298d8482850161241e565b91505092915050565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6129d382612723565b810181811067ffffffffffffffff821117156129f2576129f161299b565b5b80604052505050565b6000612a056121d0565b9050612a1182826129ca565b919050565b612a1f81612473565b8114612a2a57600080fd5b50565b600081359050612a3c81612a16565b92915050565b600060c08284031215612a5857612a57612996565b5b612a6260c06129fb565b90506000612a7284828501612a2d565b6000830152506020612a8684828501612a2d565b6020830152506040612a9a84828501612a2d565b6040830152506060612aae848285016122c0565b6060830152506080612ac28482850161241e565b60808301525060a0612ad68482850161241e565b60a08301525092915050565b60008060e08385031215612af957612af86121da565b5b6000612b07858286016122c0565b9250506020612b1885828601612a42565b9150509250929050565b60008060408385031215612b3957612b386121da565b5b6000612b47858286016122c0565b9250506020612b58858286016122c0565b9150509250929050565b60008083601f840112612b7857612b7761253b565b5b8235905067ffffffffffffffff811115612b9557612b94612540565b5b602083019150836001820283011115612bb157612bb0612545565b5b9250929050565b60008060008060008060008060006101008a8c031215612bdb57612bda6121da565b5b6000612be98c828d0161241e565b9950506020612bfa8c828d016122c0565b9850506040612c0b8c828d0161241e565b9750506060612c1c8c828d016122c0565b9650506080612c2d8c828d016122c0565b95505060a0612c3e8c828d0161241e565b94505060c0612c4f8c828d0161241e565b93505060e08a013567ffffffffffffffff811115612c7057612c6f6121df565b5b612c7c8c828d01612b62565b92509250509295985092959850929598565b60008160001c9050919050565b600067ffffffffffffffff82169050919050565b6000612cc2612cbd83612c8e565b612c9b565b9050919050565b60008160401c9050919050565b6000612ce9612ce483612cc9565b612c9b565b9050919050565b60008160801c9050919050565b6000612d10612d0b83612cf0565b612c9b565b9050919050565b6000819050919050565b6000612d34612d2f83612c8e565b612d17565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000612d6e612d6983612c8e565b612d3b565b9050919050565b60c082016000808301549050612d8a81612caf565b612d976000860182612487565b50612da181612cd6565b612dae6020860182612487565b50612db881612cfd565b612dc56040860182612487565b5060018301549050612dd681612d21565b612de36060860182612388565b5060028301549050612df481612d5b565b612e016080860182612496565b5060038301549050612e1281612d5b565b612e1f60a0860182612496565b5050505050565b600060c082019050612e3b6000830184612d75565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000612e7b8261229f565b9150612e868361229f565b9250828202612e948161229f565b91508282048414831517612eab57612eaa612e41565b5b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000612eec8261229f565b9150612ef78361229f565b925082612f0757612f06612eb2565b5b828204905092915050565b6000612f1d8261229f565b9150612f288361229f565b9250828201905080821115612f4057612f3f612e41565b5b92915050565b6000612f518261229f565b9150612f5c8361229f565b9250828203905081811115612f7457612f73612e41565b5b92915050565b600081519050612f8981612407565b92915050565b600060208284031215612fa557612fa46121da565b5b6000612fb384828501612f7a565b91505092915050565b600082825260208201905092915050565b50565b6000612fdd600083612fbc565b9150612fe882612fcd565b600082019050919050565b6000608082019050613008600083018661235e565b6130156020830185612302565b6130226040830184612302565b818103606083015261303381612fd0565b9050949350505050565b82818337600083830152505050565b600061305883856128aa565b935061306583858461303d565b61306e83612723565b840190509392505050565b600060408201905061308e6000830186612302565b81810360208301526130a181848661304c565b9050949350505050565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00600082015250565b60006130e1601f836128aa565b91506130ec826130ab565b602082019050919050565b60006020820190508181036000830152613110816130d4565b9050919050565b600060608201905061312c600083018661235e565b6131396020830185612302565b6131466040830184612302565b949350505050565b60008151905061315d816122a9565b92915050565b600060208284031215613179576131786121da565b5b60006131878482850161314e565b91505092915050565b6000610100820190506131a6600083018b61235e565b6131b3602083018a61235e565b6131c0604083018961235e565b6131cd6060830188612302565b6131da6080830187612302565b6131e760a0830186612302565b6131f460c0830185612302565b61320160e0830184612302565b9998505050505050505050565b6000604082019050613223600083018561235e565b6132306020830184612302565b9392505050565b600060608201905061324c600083018661235e565b613259602083018561235e565b6132666040830184612302565b949350505050565b61327781612269565b811461328257600080fd5b50565b6000815190506132948161326e565b92915050565b6000602082840312156132b0576132af6121da565b5b60006132be84828501613285565b91505092915050565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b6000613323602a836128aa565b915061332e826132c7565b604082019050919050565b6000602082019050818103600083015261335281613316565b9050919050565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b60006133b56026836128aa565b91506133c082613359565b604082019050919050565b600060208201905081810360008301526133e4816133a8565b9050919050565b600081905092915050565b6000613401826126dd565b61340b81856133eb565b935061341b8185602086016126f9565b80840191505092915050565b600061343382846133f6565b915081905092915050565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b6000613474601d836128aa565b915061347f8261343e565b602082019050919050565b600060208201905081810360008301526134a381613467565b905091905056fe68747470733a2f2f6769746875622e636f6d2f6f75727a6f72612f7a6f72612d70726f746f636f6c2fa2646970667358221220df2d8476e04ee3234e45530604e862841e20639348e70c94f4687b77a27195ab64736f6c63430008110033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100f15760003560e01c806301ffc9a7146100f657806319b45c4f146101265780634132239b146101425780635369d3e8146101725780635c046084146101905780635d759bd8146101c0578063611efc09146101f057806362b60245146102205780636890e5b31461023e57806375d0c0dc1461026e5780637b49ff2c1461028c5780638f4d174e146102bc578063a0a8e460146102d8578063ac973d5b146102f6578063c4d66de814610326578063ce35b8af14610342578063e2ebba291461035e578063e8a3d4851461038e578063f54f216a146103ac575b600080fd5b610110600480360381019061010b919061223c565b6103c8565b60405161011d9190612284565b60405180910390f35b610140600480360381019061013b91906122d5565b6103fa565b005b61015c600480360381019061015791906122d5565b610595565b6040516101699190612311565b60405180910390f35b61017a6105b7565b604051610187919061236d565b60405180910390f35b6101aa60048036038101906101a591906122d5565b6105dd565b6040516101b791906123ec565b60405180910390f35b6101da60048036038101906101d59190612433565b61066c565b6040516101e7919061236d565b60405180910390f35b61020a60048036038101906102059190612433565b61074b565b6040516102179190612520565b60405180910390f35b610228610902565b6040516102359190612311565b60405180910390f35b610258600480360381019061025391906125a0565b61090b565b604051610265919061287d565b60405180910390f35b610276610945565b60405161028391906128f4565b60405180910390f35b6102a660048036038101906102a19190612916565b610982565b6040516102b39190612311565b60405180910390f35b6102d660048036038101906102d19190612969565b610a1b565b005b6102e0610bc8565b6040516102ed91906128f4565b60405180910390f35b610310600480360381019061030b9190612433565b610c05565b60405161031d919061236d565b60405180910390f35b610340600480360381019061033b9190612969565b610d64565b005b61035c60048036038101906103579190612ae2565b610ece565b005b61037860048036038101906103739190612b22565b6111ae565b6040516103859190612311565b60405180910390f35b6103966111d3565b6040516103a391906128f4565b60405180910390f35b6103c660048036038101906103c19190612bb8565b6111f3565b005b60006103d38261162d565b806103e357506103e28261162d565b5b806103f357506103f282611697565b5b9050919050565b600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828152602001908152602001600020600080820160006101000a81549067ffffffffffffffff02191690556000820160086101000a81549067ffffffffffffffff02191690556000820160106101000a81549067ffffffffffffffff021916905560018201600090556002820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556003820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690555050803373ffffffffffffffffffffffffffffffffffffffff167f5a10ca3dd9f8e42a050c7f379d07bacd686570baf0b1c8574362fc474a9aa1a0600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600085815260200190815260200160002060405161058a9190612e26565b60405180910390a350565b600060646005836105a69190612e70565b6105b09190612ee1565b9050919050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6105e561210e565b60006105f5836301b3f7086111ae565b90506000610607846301b3f7086111ae565b905060006106188562d91c146111ae565b905060008183856106299190612f12565b6106339190612f12565b8661063e9190612f46565b9050604051806080016040528085815260200184815260200182815260200183815250945050505050919050565b60008273ffffffffffffffffffffffffffffffffffffffff16637dafae4d836040518263ffffffff1660e01b81526004016106a79190612311565b602060405180830381865afa9250505080156106e157506040513d601f19601f820116820180604052508101906106de9190612f8f565b60015b156106eb57809150505b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361074557600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690505b92915050565b610753612136565b600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008381526020019081526020016000206040518060c00160405290816000820160009054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff1681526020016000820160089054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff1681526020016000820160109054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff168152602001600182015481526020016002820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016003820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681525050905092915050565b60006005905090565b6109136121b6565b6040517f9274ec1d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60606040518060400160405280600c81526020017f4552433230204d696e7465720000000000000000000000000000000000000000815250905090565b6000600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600084815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490509392505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610aa2576040517f8ba1835100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610b08576040517f9fabe1c100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167fc93702c5f2a62678849c2f198d92f7833a8d4a8afc765cf15693222ab5b15e5060405160405180910390a380600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60606040518060400160405280600581526020017f312e302e30000000000000000000000000000000000000000000000000000000815250905090565b60008273ffffffffffffffffffffffffffffffffffffffff16639ebb8324836040518263ffffffff1660e01b8152600401610c409190612311565b602060405180830381865afa925050508015610c7a57506040513d601f19601f82011682018060405250810190610c779190612f8f565b60015b610ca857600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050610d5e565b809150600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610d5c578373ffffffffffffffffffffffffffffffffffffffff16635e4e0404846040518263ffffffff1660e01b8152600401610d189190612311565b602060405180830381865afa158015610d35573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d599190612f8f565b91505b505b92915050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610dca576040517f9fabe1c100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e52576040517f0dc149f000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f658c97f8591190c843529a9019f5ae8055b6c690ab14156b0e589a5253c5ccb96005604051610ec39190612311565b60405180910390a150565b61271081606001511015610f0e576040517f835de65800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168160a0015173ffffffffffffffffffffffffffffffffffffffff1603610f78576040517f9fabe1c100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16816080015173ffffffffffffffffffffffffffffffffffffffff1603610fe2576040517f9fabe1c100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600084815260200190815260200160002060008201518160000160006101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555060208201518160000160086101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555060408201518160000160106101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055506060820151816001015560808201518160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060a08201518160030160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550905050813373ffffffffffffffffffffffffffffffffffffffff167f5a10ca3dd9f8e42a050c7f379d07bacd686570baf0b1c8574362fc474a9aa1a0836040516111a29190612520565b60405180910390a35050565b60006305f5e10082846111c19190612e70565b6111cb9190612ee1565b905092915050565b60606040518060600160405280602981526020016134ab60299139905090565b6111fb611769565b6000600360008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008881526020019081526020016000209050600073ffffffffffffffffffffffffffffffffffffffff168160030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614806112fe57508473ffffffffffffffffffffffffffffffffffffffff168160030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614155b15611335576040517ff599342800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8881600101546113459190612e70565b861461137d576040517f2f4613eb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8060000160009054906101000a900467ffffffffffffffff1667ffffffffffffffff164210156113d9576040517fe8c4db8200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8060000160089054906101000a900467ffffffffffffffff1667ffffffffffffffff16421115611435576040517f0bd8a3eb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008160000160109054906101000a900467ffffffffffffffff1667ffffffffffffffff1611156114905761148f8160000160109054906101000a900467ffffffffffffffff1667ffffffffffffffff168a8a8a8e6117b8565b5b61149a85876119c6565b8773ffffffffffffffffffffffffffffffffffffffff1663c238d1ee8b898c6040518463ffffffff1660e01b81526004016114d793929190612ff3565b600060405180830381600087803b1580156114f157600080fd5b505af1158015611505573d6000803e3d6000fd5b50505050600061151487610595565b905061152381878a8c89611b39565b6115a18260020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1682896115579190612f46565b8460030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611d609092919063ffffffff16565b600084849050111561161857878973ffffffffffffffffffffffffffffffffffffffff168c73ffffffffffffffffffffffffffffffffffffffff167fb9490aee663998179ad13f9e1c1eb6189c71ad1a9ec87f33ad2766f98d9a268a8d888860405161160f93929190613079565b60405180910390a45b5050611622611de6565b505050505050505050565b60007f7b49ff2c000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b60007f6890e5b3000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061176257507f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b9050919050565b6002600054036117ae576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117a5906130f7565b60405180910390fd5b6002600081905550565b83600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600084815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546118559190612f12565b9250508190555084600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600084815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205411156119bf578085600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600085815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040517fe2d915640000000000000000000000000000000000000000000000000000000081526004016119b693929190613117565b60405180910390fd5b5050505050565b60008273ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401611a01919061236d565b602060405180830381865afa158015611a1e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a429190613163565b9050611a713330848673ffffffffffffffffffffffffffffffffffffffff16611df0909392919063ffffffff16565b60008373ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401611aac919061236d565b602060405180830381865afa158015611ac9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611aed9190613163565b9050808383611afc9190612f12565b14611b33576040517fdc5b522d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505050565b6000611b44866105dd565b90506000611b52848661066c565b90506000611b608587610c05565b9050600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603611bbc57600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1693505b611beb8284600001518973ffffffffffffffffffffffffffffffffffffffff16611d609092919063ffffffff16565b611c1a8184606001518973ffffffffffffffffffffffffffffffffffffffff16611d609092919063ffffffff16565b611c498484602001518973ffffffffffffffffffffffffffffffffffffffff16611d609092919063ffffffff16565b611c9a600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684604001518973ffffffffffffffffffffffffffffffffffffffff16611d609092919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f6d43fd9d85f88450d1b777b5e7d58dec9b8dd36d77bf01bc5e5423d4a92d2246600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16898c8c8a600001518b602001518c606001518d60400151604051611d4e989796959493929190613190565b60405180910390a45050505050505050565b611de18363a9059cbb60e01b8484604051602401611d7f92919061320e565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611e79565b505050565b6001600081905550565b611e73846323b872dd60e01b858585604051602401611e1193929190613237565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611e79565b50505050565b6000611edb826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16611f419092919063ffffffff16565b9050600081511480611efd575080806020019051810190611efc919061329a565b5b611f3c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f3390613339565b60405180910390fd5b505050565b6060611f508484600085611f59565b90509392505050565b606082471015611f9e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f95906133cb565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051611fc79190613427565b60006040518083038185875af1925050503d8060008114612004576040519150601f19603f3d011682016040523d82523d6000602084013e612009565b606091505b509150915061201a87838387612026565b92505050949350505050565b60608315612088576000835103612080576120408561209b565b61207f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120769061348a565b60405180910390fd5b5b829050612093565b61209283836120be565b5b949350505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b6000825111156120d15781518083602001fd5b806040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161210591906128f4565b60405180910390fd5b6040518060800160405280600081526020016000815260200160008152602001600081525090565b6040518060c00160405280600067ffffffffffffffff168152602001600067ffffffffffffffff168152602001600067ffffffffffffffff16815260200160008152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff1681525090565b604051806040016040528060608152602001600081525090565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b612219816121e4565b811461222457600080fd5b50565b60008135905061223681612210565b92915050565b600060208284031215612252576122516121da565b5b600061226084828501612227565b91505092915050565b60008115159050919050565b61227e81612269565b82525050565b60006020820190506122996000830184612275565b92915050565b6000819050919050565b6122b28161229f565b81146122bd57600080fd5b50565b6000813590506122cf816122a9565b92915050565b6000602082840312156122eb576122ea6121da565b5b60006122f9848285016122c0565b91505092915050565b61230b8161229f565b82525050565b60006020820190506123266000830184612302565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006123578261232c565b9050919050565b6123678161234c565b82525050565b6000602082019050612382600083018461235e565b92915050565b6123918161229f565b82525050565b6080820160008201516123ad6000850182612388565b5060208201516123c06020850182612388565b5060408201516123d36040850182612388565b5060608201516123e66060850182612388565b50505050565b60006080820190506124016000830184612397565b92915050565b6124108161234c565b811461241b57600080fd5b50565b60008135905061242d81612407565b92915050565b6000806040838503121561244a576124496121da565b5b60006124588582860161241e565b9250506020612469858286016122c0565b9150509250929050565b600067ffffffffffffffff82169050919050565b61249081612473565b82525050565b61249f8161234c565b82525050565b60c0820160008201516124bb6000850182612487565b5060208201516124ce6020850182612487565b5060408201516124e16040850182612487565b5060608201516124f46060850182612388565b5060808201516125076080850182612496565b5060a082015161251a60a0850182612496565b50505050565b600060c08201905061253560008301846124a5565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f8401126125605761255f61253b565b5b8235905067ffffffffffffffff81111561257d5761257c612540565b5b60208301915083600182028301111561259957612598612545565b5b9250929050565b60008060008060008060a087890312156125bd576125bc6121da565b5b60006125cb89828a0161241e565b96505060206125dc89828a016122c0565b95505060406125ed89828a016122c0565b94505060606125fe89828a016122c0565b935050608087013567ffffffffffffffff81111561261f5761261e6121df565b5b61262b89828a0161254a565b92509250509295509295509295565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b600381106126a6576126a5612666565b5b50565b60008190506126b782612695565b919050565b60006126c7826126a9565b9050919050565b6126d7816126bc565b82525050565b600081519050919050565b600082825260208201905092915050565b60005b838110156127175780820151818401526020810190506126fc565b60008484015250505050565b6000601f19601f8301169050919050565b600061273f826126dd565b61274981856126e8565b93506127598185602086016126f9565b61276281612723565b840191505092915050565b600060408301600083015161278560008601826126ce565b506020830151848203602086015261279d8282612734565b9150508091505092915050565b60006127b6838361276d565b905092915050565b6000602082019050919050565b60006127d68261263a565b6127e08185612645565b9350836020820285016127f285612656565b8060005b8581101561282e578484038952815161280f85826127aa565b945061281a836127be565b925060208a019950506001810190506127f6565b50829750879550505050505092915050565b6000604083016000830151848203600086015261285d82826127cb565b91505060208301516128726020860182612388565b508091505092915050565b600060208201905081810360008301526128978184612840565b905092915050565b600081519050919050565b600082825260208201905092915050565b60006128c68261289f565b6128d081856128aa565b93506128e08185602086016126f9565b6128e981612723565b840191505092915050565b6000602082019050818103600083015261290e81846128bb565b905092915050565b60008060006060848603121561292f5761292e6121da565b5b600061293d8682870161241e565b935050602061294e868287016122c0565b925050604061295f8682870161241e565b9150509250925092565b60006020828403121561297f5761297e6121da565b5b600061298d8482850161241e565b91505092915050565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6129d382612723565b810181811067ffffffffffffffff821117156129f2576129f161299b565b5b80604052505050565b6000612a056121d0565b9050612a1182826129ca565b919050565b612a1f81612473565b8114612a2a57600080fd5b50565b600081359050612a3c81612a16565b92915050565b600060c08284031215612a5857612a57612996565b5b612a6260c06129fb565b90506000612a7284828501612a2d565b6000830152506020612a8684828501612a2d565b6020830152506040612a9a84828501612a2d565b6040830152506060612aae848285016122c0565b6060830152506080612ac28482850161241e565b60808301525060a0612ad68482850161241e565b60a08301525092915050565b60008060e08385031215612af957612af86121da565b5b6000612b07858286016122c0565b9250506020612b1885828601612a42565b9150509250929050565b60008060408385031215612b3957612b386121da565b5b6000612b47858286016122c0565b9250506020612b58858286016122c0565b9150509250929050565b60008083601f840112612b7857612b7761253b565b5b8235905067ffffffffffffffff811115612b9557612b94612540565b5b602083019150836001820283011115612bb157612bb0612545565b5b9250929050565b60008060008060008060008060006101008a8c031215612bdb57612bda6121da565b5b6000612be98c828d0161241e565b9950506020612bfa8c828d016122c0565b9850506040612c0b8c828d0161241e565b9750506060612c1c8c828d016122c0565b9650506080612c2d8c828d016122c0565b95505060a0612c3e8c828d0161241e565b94505060c0612c4f8c828d0161241e565b93505060e08a013567ffffffffffffffff811115612c7057612c6f6121df565b5b612c7c8c828d01612b62565b92509250509295985092959850929598565b60008160001c9050919050565b600067ffffffffffffffff82169050919050565b6000612cc2612cbd83612c8e565b612c9b565b9050919050565b60008160401c9050919050565b6000612ce9612ce483612cc9565b612c9b565b9050919050565b60008160801c9050919050565b6000612d10612d0b83612cf0565b612c9b565b9050919050565b6000819050919050565b6000612d34612d2f83612c8e565b612d17565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000612d6e612d6983612c8e565b612d3b565b9050919050565b60c082016000808301549050612d8a81612caf565b612d976000860182612487565b50612da181612cd6565b612dae6020860182612487565b50612db881612cfd565b612dc56040860182612487565b5060018301549050612dd681612d21565b612de36060860182612388565b5060028301549050612df481612d5b565b612e016080860182612496565b5060038301549050612e1281612d5b565b612e1f60a0860182612496565b5050505050565b600060c082019050612e3b6000830184612d75565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000612e7b8261229f565b9150612e868361229f565b9250828202612e948161229f565b91508282048414831517612eab57612eaa612e41565b5b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000612eec8261229f565b9150612ef78361229f565b925082612f0757612f06612eb2565b5b828204905092915050565b6000612f1d8261229f565b9150612f288361229f565b9250828201905080821115612f4057612f3f612e41565b5b92915050565b6000612f518261229f565b9150612f5c8361229f565b9250828203905081811115612f7457612f73612e41565b5b92915050565b600081519050612f8981612407565b92915050565b600060208284031215612fa557612fa46121da565b5b6000612fb384828501612f7a565b91505092915050565b600082825260208201905092915050565b50565b6000612fdd600083612fbc565b9150612fe882612fcd565b600082019050919050565b6000608082019050613008600083018661235e565b6130156020830185612302565b6130226040830184612302565b818103606083015261303381612fd0565b9050949350505050565b82818337600083830152505050565b600061305883856128aa565b935061306583858461303d565b61306e83612723565b840190509392505050565b600060408201905061308e6000830186612302565b81810360208301526130a181848661304c565b9050949350505050565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00600082015250565b60006130e1601f836128aa565b91506130ec826130ab565b602082019050919050565b60006020820190508181036000830152613110816130d4565b9050919050565b600060608201905061312c600083018661235e565b6131396020830185612302565b6131466040830184612302565b949350505050565b60008151905061315d816122a9565b92915050565b600060208284031215613179576131786121da565b5b60006131878482850161314e565b91505092915050565b6000610100820190506131a6600083018b61235e565b6131b3602083018a61235e565b6131c0604083018961235e565b6131cd6060830188612302565b6131da6080830187612302565b6131e760a0830186612302565b6131f460c0830185612302565b61320160e0830184612302565b9998505050505050505050565b6000604082019050613223600083018561235e565b6132306020830184612302565b9392505050565b600060608201905061324c600083018661235e565b613259602083018561235e565b6132666040830184612302565b949350505050565b61327781612269565b811461328257600080fd5b50565b6000815190506132948161326e565b92915050565b6000602082840312156132b0576132af6121da565b5b60006132be84828501613285565b91505092915050565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b6000613323602a836128aa565b915061332e826132c7565b604082019050919050565b6000602082019050818103600083015261335281613316565b9050919050565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b60006133b56026836128aa565b91506133c082613359565b604082019050919050565b600060208201905081810360008301526133e4816133a8565b9050919050565b600081905092915050565b6000613401826126dd565b61340b81856133eb565b935061341b8185602086016126f9565b80840191505092915050565b600061343382846133f6565b915081905092915050565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b6000613474601d836128aa565b915061347f8261343e565b602082019050919050565b600060208201905081810360008301526134a381613467565b905091905056fe68747470733a2f2f6769746875622e636f6d2f6f75727a6f72612f7a6f72612d70726f746f636f6c2fa2646970667358221220df2d8476e04ee3234e45530604e862841e20639348e70c94f4687b77a27195ab64736f6c63430008110033
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.