Source Code
Overview
DEV Balance
0.2 DEV
More Info
ContractCreator:
Multichain Info
N/A
Latest 8 from a total of 8 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
Value | ||||
---|---|---|---|---|---|---|---|---|---|
0xbcaf5b83 | 2172027 | 681 days ago | IN | 0.2 DEV | 0.00037907 | ||||
Create Fragments | 2172004 | 681 days ago | IN | 0 DEV | 0.02654443 | ||||
Set Pilot State | 2171978 | 681 days ago | IN | 0 DEV | 0.00526867 | ||||
Set Racecraft Co... | 2171895 | 681 days ago | IN | 0 DEV | 0.00524271 | ||||
Set Pilot Contra... | 2171893 | 681 days ago | IN | 0 DEV | 0.00524271 | ||||
Set Mint Pass Co... | 2171891 | 681 days ago | IN | 0 DEV | 0.00305844 | ||||
Set Mint Pass Co... | 2171889 | 681 days ago | IN | 0 DEV | 0.00524744 | ||||
0x60c06040 | 2171867 | 681 days ago | IN | Create: EXRSalesContract | 0 DEV | 0.26763462 |
Loading...
Loading
Contract Name:
EXRSalesContract
Compiler Version
v0.8.13+commit.abaa5c0e
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.13; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/metatx/ERC2771Context.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; import "./interfaces/IEXRMintPass.sol"; import "./interfaces/IEXRGameAsset.sol"; import "./extensions/CouponSystem.sol"; error SalesRacecraftRedemptionNotActive(); error SalesPilotRedemptionNotActive(); error SalesExceededMintPassSupply(); error SalesAllottedClaimsExceeded(); error SalesInvalidFragmentSupply(); error SalesArrayLengthMismatch(); error SalesNonExistentFragment(); error SalesIncorrectEthAmount(); error SalesPassClaimNotActive(); error SalesInvalidStateValue(); error SalesMintpassQtyNotSet(); error SalesWithdrawalFailed(); error SalesInvalidCoupon(); error SalesRefundFailed(); error SalesZeroAddress(); error SalesNoMintPass(); error SalesInvalidQty(); error SalesReusedSeed(); /** * @title Sales Contract * @author RacerDev * @notice This sales contract acts as an interface between the end user and the NFT * contracts in the EXR ecosystem. Users cannot mint from ERC721 and ERC1155 contracts * directly, instead this contract provides controlled access to the * collection Fragments for each contract. All contract interactions with other token contracts * happen via interfaces, for which the contract addresses must be set by an admin user. * @notice There is no public mint or claim functions. Claiming tokens requires the caller to pass in a signed * coupon, which is used to recover the signers address on-chain to verify the validity * of the Coupons. * @dev This approach is designed to work with the ERC721Fragmentable extension, which allows for NFT Collections to be * subdivided into smaller "Fragments", each released independently, but still part of the same contract. * This is controlled via the `dedicatedFragment` variable that is set in the constructor at deploy time. * @dev This contract enables gasless transactions for the end-user by replacing `msg.sender` if a trusted forwarder * is the caller. This pattern allows the contract to be used with Biconomy's relayer protocol. */ contract EXRSalesContract is ERC2771Context, CouponSystem, ReentrancyGuard, AccessControl { bytes32 public constant SYS_ADMIN_ROLE = keccak256("SYS_ADMIN_ROLE"); uint256 public constant pilotPassTokenId = 1; uint256 public constant racecraftPassTokenId = 2; // We set these in the constructor in the event the event the Sales contract is being replaced // for an alreaady active fragment. If not, the values will be overwritten when the fragment is created uint256 public pilotPassMaxSupply; uint256 public racecraftPassMaxSupply; uint8 public immutable dedicatedFragment; mapping(bytes32 => bool) public usedSeeds; struct SaleState { uint8 claimPilotPass; uint8 redeemPilot; uint8 redeemRacecraft; } SaleState public state; IEXRMintPass public mintPassContract; IEXRGameAsset public pilotContract; IEXRGameAsset public racecraftContract; event SalesFragmentCreated( uint256 supply, uint256 firstId, uint256 reservedPilots, uint256 reservedRacecrafts ); event Airdrop(uint256 tokenId, uint256[] qtys, address[] indexed recipient); event RefundIssued(address indexed buyer, uint256 amount); event MintPassClaimed(address indexed user, uint256 qty); event RacecraftContractSet(address indexed racecraft); event MintPassContractSet(address indexed mintpass); event PilotStateChange(uint8 claim, uint8 redeem); event PilotContractSet(address indexed pilot); event MintPassBurned(address indexed user); event RacecraftStateChange(uint8 redeem); event AdminSignerUpdated(address signer); event RacecraftRedeemed(); event BalanceWithdrawn(); event PilotRedeemed(); event EmergencyStop(); /** * @dev The Admin Signer is passed directly to the CouponSystem constructor where it's kept in storage. * It's later used to compare against the signer recoverd from the Coupon signature. * @param adminSigner The public address from the keypair whose private key signed the Coupon off-chain * @param fragment The identifier for the fragment being represented by this sales contract, which determines * which fragment of the target ERC721 contracts is used. */ constructor( address adminSigner, address trustedForwarder, uint8 fragment, uint256 pilotPassMaxSupply_, uint256 racecraftPassMaxSupply_ ) CouponSystem(adminSigner) ERC2771Context(trustedForwarder) { dedicatedFragment = fragment; pilotPassMaxSupply = pilotPassMaxSupply_; racecraftPassMaxSupply = racecraftPassMaxSupply_; _grantRole(DEFAULT_ADMIN_ROLE, msg.sender); _grantRole(SYS_ADMIN_ROLE, msg.sender); } // ======================================================== EXTERNAL | USER FUNCTIONS /** * @notice Allows a whitelisted caller to claim a Pilot Mint Pass * @dev Callers are able to claim a mint pass by passing in a signed Coupon that's created off-chain. * The caller's address is encoded into the Coupon, so only the intended recipient can claim a pass. * @dev This is a variable-pricing function. The cost of the claim is encoded into the Coupon and passed in as * as a param. This allows different "tiers" of coupons to use the same function, eg * free vs. paid. The custom price that's passed in is validated against the price included in the coupon, then * compared to the amount of Eth sent in msg.value; * @dev The coupon does not contain a nonce, instead the number of claims is tracked against the caller's address * using the {addressToClaims} mapping. This approach allows a user to claim their allotted mint masses over * multiple transactions (if desired), without the need to generate a new coupon. * @dev The MintPass is minted by the contract on the user's behalf using the `MintPassContract` interface. * @dev Will refund the caller if they send the incorrect amount > `msg.value`. * @dev It's possible for different users to be assigned a different number of mintpass claims, the total for each user * is dictated by the `allotted` parameter, which is encoded into the coupon. * @param coupon signed coupon generated using caller's address, price, qty, and allotted claims * @param price the custom price the caller needs to pay per pass claimed * @param qty the number of passes to claim * @param allotted the max number of passes the caller's address is allowed to claim (over multiple TXs if desired) */ function claimPilotPass( Coupon calldata coupon, uint256 price, uint256 qty, uint256 allotted ) external payable nonReentrant { if (state.claimPilotPass == 0) revert SalesPassClaimNotActive(); if (!pilotContract.fragmentExists(dedicatedFragment)) revert SalesNonExistentFragment(); if (pilotPassMaxSupply == 0) revert SalesMintpassQtyNotSet(); if (qty == 0 || allotted == 0) revert SalesInvalidQty(); if ( mintPassContract.tokenMintCountsByFragment(dedicatedFragment, pilotPassTokenId) + qty > pilotPassMaxSupply ) revert SalesExceededMintPassSupply(); uint256 amountOwed = price * qty; address caller = _msgSender(); uint256 paid = msg.value; if (paid < amountOwed) revert SalesIncorrectEthAmount(); if ( qty + mintPassContract.addressToPilotPassClaimsByFragment(dedicatedFragment, caller) > allotted ) revert SalesAllottedClaimsExceeded(); bytes32 digest = keccak256( abi.encode(address(this), block.chainid, CouponType.MintPass, price, allotted, caller) ); if (!_verifyCoupon(digest, coupon)) revert SalesInvalidCoupon(); mintPassContract.incrementPilotPassClaimCount(caller, dedicatedFragment, qty); mintPassContract.mint(caller, qty, pilotPassTokenId, dedicatedFragment); emit MintPassClaimed(caller, qty); if (amountOwed < paid) { refundCaller(caller, paid - amountOwed); } } /** * @notice The caller can claim an EXRGameAsset token in exchange for burning their Pilot MintPass * @dev Checks the balance of Mint Pass tokens for caller's address, burns the mint pass via * the MintPass contract interface, and mints a Pilot to the callers address via the * EXRGameAsset contract Interface * @dev The EXRGameAsset token will be minted for the fragment of the collection determined by * `dedicatedFragment`, which is set at deploy time. Only tokens for this fragment can be minted * using this Fragment Sales Contract. * @dev At the time of writing, the Moonbeam network has no method of generating unpredictable randomness * such as Chainlink's VRF. For this reason, a random seed, generated off-chain, is supplied to the * redeem method to allow for random token assignment of the pilot IDs. * @dev We need to check {pilotPasssMaxSupply} in the event the sales contract was replaced for an existing fragment. * @param seed Random seed generated off-chain * @param coupon The coupon encoding the random seed signed by the admin's private key */ function redeemPilot(bytes32 seed, Coupon calldata coupon) external nonReentrant hasValidOrigin { if (state.redeemPilot == 0) revert SalesPilotRedemptionNotActive(); if (!pilotContract.fragmentExists(dedicatedFragment)) revert SalesNonExistentFragment(); if (pilotPassMaxSupply == 0) revert SalesMintpassQtyNotSet(); if (usedSeeds[seed]) revert SalesReusedSeed(); usedSeeds[seed] = true; address caller = _msgSender(); if (mintPassContract.balanceOf(caller, pilotPassTokenId) == 0) revert SalesNoMintPass(); bytes32 digest = keccak256( abi.encode(address(this), block.chainid, CouponType.Pilot, seed, caller) ); if (!_verifyCoupon(digest, coupon)) revert SalesInvalidCoupon(); mintPassContract.burnToRedeemPilot(caller, dedicatedFragment); emit MintPassBurned(caller); pilotContract.mint(caller, 1, dedicatedFragment, seed); emit PilotRedeemed(); } /** * @notice Allows the holder of a Racecraft Mint Pass to exchange it for a Racecraft Token * @dev There is no VRF available, so the caller includes a verifiably random seed generated * off-chain in the calldata * @param seed 32-byte hash of the random seed * @param coupon Coupon containing the random seed and RandomSeed enum */ function redeemRacecraft(bytes32 seed, Coupon calldata coupon) external nonReentrant hasValidOrigin { if (state.redeemRacecraft == 0) revert SalesRacecraftRedemptionNotActive(); if (!racecraftContract.fragmentExists(dedicatedFragment)) revert SalesNonExistentFragment(); if (racecraftPassMaxSupply == 0) revert SalesMintpassQtyNotSet(); if (usedSeeds[seed]) revert SalesReusedSeed(); usedSeeds[seed] = true; address caller = _msgSender(); if (mintPassContract.balanceOf(caller, racecraftPassTokenId) == 0) revert SalesNoMintPass(); bytes32 digest = keccak256( abi.encode(address(this), block.chainid, CouponType.Racecraft, seed, caller) ); if (!_verifyCoupon(digest, coupon)) revert SalesInvalidCoupon(); mintPassContract.authorizedBurn(caller, racecraftPassTokenId); racecraftContract.mint(caller, 1, dedicatedFragment, seed); emit RacecraftRedeemed(); } // ======================================================== EXTERNAL | OWNER FUNCTIONS /** * @notice Allows an admin to set the address for the mint pass contract interface * @dev Sets the public address variable for visibility only, it's not actually used * @param contractAddress The address for the external EXRMintPass ERC1155 contract */ function setMintPassContract(address contractAddress) external onlyRole(SYS_ADMIN_ROLE) { if (contractAddress == address(0)) revert SalesZeroAddress(); mintPassContract = IEXRMintPass(contractAddress); emit MintPassContractSet(contractAddress); } /** * @notice Allows an admin to set the address for the IEXRGameAsset contract interface * @dev Sets the public address variable for visibility only, it's not actually used * @param contractAddress The address for the external IEXRGameAsset ERC721 contract */ function setPilotContract(address contractAddress) external onlyRole(SYS_ADMIN_ROLE) { if (contractAddress == address(0)) revert SalesZeroAddress(); pilotContract = IEXRGameAsset(contractAddress); emit PilotContractSet(contractAddress); } /** * @notice Allows an admin to set the address for the IEXRGameAsset contract interface * @dev Sets the public address variable for visibility only, it's not actually used * @param contractAddress The address for the external IEXRGameAsset ERC721 contract */ function setRacecraftContract(address contractAddress) external onlyRole(SYS_ADMIN_ROLE) { if (contractAddress == address(0)) revert SalesZeroAddress(); racecraftContract = IEXRGameAsset(contractAddress); emit RacecraftContractSet(contractAddress); } /** * @dev Admin can replace signer public address from signer's keypair * @param newSigner public address of the signer's keypair */ function updateAdminSigner(address newSigner) external onlyRole(SYS_ADMIN_ROLE) { _replaceSigner(newSigner); emit AdminSignerUpdated(newSigner); } /** * @notice Used to toggle the claim state between true/false, which controls whether callers are able to claim a mint pass * @dev Should generally be enabled using flashbots to avoid backrunning, though may not be an issue with no "public sale" */ function setPilotState(uint8 passClaim, uint8 redemption) external onlyRole(SYS_ADMIN_ROLE) { if (passClaim > 1 || redemption > 1) revert SalesInvalidStateValue(); state.claimPilotPass = passClaim; state.redeemPilot = redemption; emit PilotStateChange(passClaim, redemption); } /** * @notice Used to toggle the claim state between true/false, which controls whether callers are able to burn their mint passes * @dev Should generally be enabled using flashbots to avoid backrunning, though may not be an issue with no "public sale" */ function setRacecraftState(uint8 redemption) external onlyRole(SYS_ADMIN_ROLE) { if (redemption > 1) revert SalesInvalidStateValue(); state.redeemRacecraft = redemption; emit RacecraftStateChange(redemption); } /** * @notice Allows an Admin user to airdrop Mintpass Tokens to known addresses * @param tokenId the ID of the Mintpass token to be airdropped * @param qtys array containting the number of passes to mint for the address * at the corresponding index in the `recipients` array * @param recipients array of addresses to mint tokens to */ function airdropMintpass( uint256 tokenId, uint256[] calldata qtys, address[] calldata recipients ) external onlyRole(SYS_ADMIN_ROLE) { if (qtys.length != recipients.length) revert SalesArrayLengthMismatch(); if (pilotPassMaxSupply == 0) revert SalesMintpassQtyNotSet(); uint256 count = qtys.length; uint256 totalQty; for (uint256 i; i < count; i++) { totalQty += qtys[i]; } if ( mintPassContract.tokenMintCountsByFragment(dedicatedFragment, tokenId) + totalQty > pilotPassMaxSupply ) revert SalesExceededMintPassSupply(); for (uint256 i; i < count; i++) { mintPassContract.mint(recipients[i], qtys[i], tokenId, dedicatedFragment); } emit Airdrop(tokenId, qtys, recipients); } /** * @notice Allows the contract owner to create fragments of the same size simultaneously for the Pilot * and Racecraft collections. * @dev There may exist some scenarios where the number of reserved pilots and * racecraft might differ for a given fragment. For this reason, separate reserve amounts * can be supplied. * @param fragmentSupply The number of total tokens in the fragment. * @param firstId The first token ID in the fragment * @param reservedPilots The number of reserved tokens in the Pilot fragment. * @param reservedRacecrafts The number of reserved tokens in the Racecraft fragment. */ function createFragments( uint64 fragmentSupply, uint64 firstId, uint64 reservedPilots, uint64 reservedRacecrafts ) external onlyRole(SYS_ADMIN_ROLE) { if (fragmentSupply <= reservedPilots || fragmentSupply <= reservedRacecrafts) revert SalesInvalidFragmentSupply(); pilotPassMaxSupply = fragmentSupply - reservedPilots; racecraftPassMaxSupply = fragmentSupply - reservedRacecrafts; pilotContract.createFragment(dedicatedFragment, fragmentSupply, firstId, reservedPilots); racecraftContract.createFragment( dedicatedFragment, fragmentSupply, firstId, reservedRacecrafts ); emit SalesFragmentCreated(fragmentSupply, firstId, reservedPilots, reservedRacecrafts); } /** * @notice Prevents any user-facing function from being called * @dev Behaves similarly to Pausable */ function emergencyStop() external onlyRole(SYS_ADMIN_ROLE) { state.claimPilotPass = 0; state.redeemPilot = 0; state.redeemRacecraft = 0; emit EmergencyStop(); } /** * @notice Withdraw the Eth stored in the contract to the owner's address. * @dev User transfer() in favor of call() for the withdrawal as it's only to the owner's address. */ function withdrawBalance() external onlyRole(SYS_ADMIN_ROLE) { (bool success, ) = msg.sender.call{value: address(this).balance}(""); if (!success) revert SalesWithdrawalFailed(); emit BalanceWithdrawn(); } // ======================================================== PRIVATE /** * @notice Used to refund a caller who overpays for their mintpass. * @dev Use `call` over `transfer` * @param buyer The address/account to send the refund to * @param amount The value (in wei) to refund to the caller * */ function refundCaller(address buyer, uint256 amount) private { (bool success, ) = buyer.call{value: amount}(""); if (!success) revert SalesRefundFailed(); emit RefundIssued(buyer, amount); } // ======================================================== MODIFIERS /** * @dev Only allow contract calls from Biconomy's trusted forwarder */ modifier hasValidOrigin() { require( isTrustedForwarder(msg.sender) || msg.sender == tx.origin, "Non-trusted forwarder contract not allowed" ); _; } // ======================================================== OVERRIDES /** * @dev Override Context's _msgSender() to enable meta transactions for Biconomy * relayer protocol, which allows for gasless TXs */ function _msgSender() internal view virtual override(ERC2771Context, Context) returns (address) { return ERC2771Context._msgSender(); } function _msgData() internal view virtual override(ERC2771Context, Context) returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (metatx/ERC2771Context.sol) pragma solidity ^0.8.9; import "../utils/Context.sol"; /** * @dev Context variant with ERC2771 support. */ abstract contract ERC2771Context is Context { /// @custom:oz-upgrades-unsafe-allow state-variable-immutable address private immutable _trustedForwarder; /// @custom:oz-upgrades-unsafe-allow constructor constructor(address trustedForwarder) { _trustedForwarder = trustedForwarder; } function isTrustedForwarder(address forwarder) public view virtual returns (bool) { return forwarder == _trustedForwarder; } function _msgSender() internal view virtual override returns (address sender) { if (isTrustedForwarder(msg.sender)) { // The assembly code is more direct than the Solidity version using `abi.decode`. assembly { sender := shr(96, calldataload(sub(calldatasize(), 20))) } } else { return super._msgSender(); } } function _msgData() internal view virtual override returns (bytes calldata) { if (isTrustedForwarder(msg.sender)) { return msg.data[:msg.data.length - 20]; } else { return super._msgData(); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControl.sol) pragma solidity ^0.8.0; import "./IAccessControl.sol"; import "../utils/Context.sol"; import "../utils/Strings.sol"; import "../utils/introspection/ERC165.sol"; /** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for those cases see * {AccessControlEnumerable}. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ``` * bytes32 public constant MY_ROLE = keccak256("MY_ROLE"); * ``` * * Roles can be used to represent a set of permissions. To restrict access to a * function call, use {hasRole}: * * ``` * function foo() public { * require(hasRole(MY_ROLE, msg.sender)); * ... * } * ``` * * Roles can be granted and revoked dynamically via the {grantRole} and * {revokeRole} functions. Each role has an associated admin role, and only * accounts that have a role's admin role can call {grantRole} and {revokeRole}. * * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means * that only accounts with this role will be able to grant or revoke other * roles. More complex role relationships can be created by using * {_setRoleAdmin}. * * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to * grant and revoke this role. Extra precautions should be taken to secure * accounts that have been granted it. */ abstract contract AccessControl is Context, IAccessControl, ERC165 { struct RoleData { mapping(address => bool) members; bytes32 adminRole; } mapping(bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Modifier that checks that an account has a specific role. Reverts * with a standardized message including the required role. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ * * _Available since v4.1._ */ modifier onlyRole(bytes32 role) { _checkRole(role, _msgSender()); _; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) public view virtual override returns (bool) { return _roles[role].members[account]; } /** * @dev Revert with a standard message if `account` is missing `role`. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ */ function _checkRole(bytes32 role, address account) internal view virtual { if (!hasRole(role, account)) { revert( string( abi.encodePacked( "AccessControl: account ", Strings.toHexString(uint160(account), 20), " is missing role ", Strings.toHexString(uint256(role), 32) ) ) ); } } /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) { return _roles[role].adminRole; } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _grantRole(role, account); } /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _revokeRole(role, account); } /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been revoked `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) public virtual override { require(account == _msgSender(), "AccessControl: can only renounce roles for self"); _revokeRole(role, account); } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. Note that unlike {grantRole}, this function doesn't perform any * checks on the calling account. * * [WARNING] * ==== * This function should only be called from the constructor when setting * up the initial roles for the system. * * Using this function in any other way is effectively circumventing the admin * system imposed by {AccessControl}. * ==== * * NOTE: This function is deprecated in favor of {_grantRole}. */ function _setupRole(bytes32 role, address account) internal virtual { _grantRole(role, account); } /** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { bytes32 previousAdminRole = getRoleAdmin(role); _roles[role].adminRole = adminRole; emit RoleAdminChanged(role, previousAdminRole, adminRole); } /** * @dev Grants `role` to `account`. * * Internal function without access restriction. */ function _grantRole(bytes32 role, address account) internal virtual { if (!hasRole(role, account)) { _roles[role].members[account] = true; emit RoleGranted(role, account, _msgSender()); } } /** * @dev Revokes `role` from `account`. * * Internal function without access restriction. */ function _revokeRole(bytes32 role, address account) internal virtual { if (hasRole(role, account)) { _roles[role].members[account] = false; emit RoleRevoked(role, account, _msgSender()); } } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.13; interface IEXRMintPass { function balanceOf(address account, uint256 id) external view returns (uint256); function totalSupply(uint256 id) external view returns (uint256); function mint( address recipient, uint256 qty, uint256 tokenId, uint256 fragment ) external; function burnToRedeemPilot(address account, uint256 fragment) external; function authorizedBurn(address account, uint256 tokenId) external; function tokenMintCountsByFragment(uint256 fragment, uint256 tokenId) external view returns (uint256); function addressToPilotPassClaimsByFragment(uint256 fragment, address caller) external view returns (uint256); function incrementPilotPassClaimCount( address caller, uint256 fragment, uint256 qty ) external; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.13; interface IEXRGameAsset { function mint( address recipient, uint256 count, uint8 fragment, bytes32 seed ) external; function createFragment( uint8 id, uint64 fragmentSupply, uint64 firstId, uint64 reserved ) external; function fragmentExists(uint256 fragmentNumber) external view returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.13; error InvalidSignature(); /** * @title Coupon System * @author RacerDev * @notice Helper contract for verifying signed coupons using `ecrecover` to match the coupon signer * to the `_adminSigner` variable set during construction. * @dev The Coupon struct represents a decoded signature that was created off-chain */ contract CouponSystem { address internal _adminSigner; enum CouponType { MintPass, Pilot, Racecraft, Inventory, Reward } struct Coupon { bytes32 r; bytes32 s; uint8 v; } constructor(address signer) { _adminSigner = signer; } /** * @dev Admin can replace the admin signer address in the event the private key is compromised * @param newSigner The public key (address) of the new signer keypair */ function _replaceSigner(address newSigner) internal { _adminSigner = newSigner; } /** * @dev Accepts an already hashed set of data * @param digest The hash of the abi.encoded coupon data * @param coupon The decoded r,s,v components of the signature * @return Whether the recovered signer address matches the `_adminSigner` */ function _verifyCoupon(bytes32 digest, Coupon calldata coupon) internal view returns (bool) { address signer = ecrecover(digest, coupon.v, coupon.r, coupon.s); if (signer == address(0)) revert InvalidSignature(); return signer == _adminSigner; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol) pragma solidity ^0.8.0; /** * @dev External interface of AccessControl declared to support ERC165 detection. */ interface IAccessControl { /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. * * _Available since v3.1._ */ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call, an admin role * bearer except when using {AccessControl-_setupRole}. */ event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) external view returns (bool); /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {AccessControl-_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) external view returns (bytes32); /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) external; /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) external; /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
[{"inputs":[{"internalType":"address","name":"adminSigner","type":"address"},{"internalType":"address","name":"trustedForwarder","type":"address"},{"internalType":"uint8","name":"fragment","type":"uint8"},{"internalType":"uint256","name":"pilotPassMaxSupply_","type":"uint256"},{"internalType":"uint256","name":"racecraftPassMaxSupply_","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"InvalidSignature","type":"error"},{"inputs":[],"name":"SalesAllottedClaimsExceeded","type":"error"},{"inputs":[],"name":"SalesArrayLengthMismatch","type":"error"},{"inputs":[],"name":"SalesExceededMintPassSupply","type":"error"},{"inputs":[],"name":"SalesIncorrectEthAmount","type":"error"},{"inputs":[],"name":"SalesInvalidCoupon","type":"error"},{"inputs":[],"name":"SalesInvalidFragmentSupply","type":"error"},{"inputs":[],"name":"SalesInvalidQty","type":"error"},{"inputs":[],"name":"SalesInvalidStateValue","type":"error"},{"inputs":[],"name":"SalesMintpassQtyNotSet","type":"error"},{"inputs":[],"name":"SalesNoMintPass","type":"error"},{"inputs":[],"name":"SalesNonExistentFragment","type":"error"},{"inputs":[],"name":"SalesPassClaimNotActive","type":"error"},{"inputs":[],"name":"SalesPilotRedemptionNotActive","type":"error"},{"inputs":[],"name":"SalesRacecraftRedemptionNotActive","type":"error"},{"inputs":[],"name":"SalesRefundFailed","type":"error"},{"inputs":[],"name":"SalesReusedSeed","type":"error"},{"inputs":[],"name":"SalesWithdrawalFailed","type":"error"},{"inputs":[],"name":"SalesZeroAddress","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"signer","type":"address"}],"name":"AdminSignerUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256[]","name":"qtys","type":"uint256[]"},{"indexed":true,"internalType":"address[]","name":"recipient","type":"address[]"}],"name":"Airdrop","type":"event"},{"anonymous":false,"inputs":[],"name":"BalanceWithdrawn","type":"event"},{"anonymous":false,"inputs":[],"name":"EmergencyStop","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"}],"name":"MintPassBurned","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"qty","type":"uint256"}],"name":"MintPassClaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"mintpass","type":"address"}],"name":"MintPassContractSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"pilot","type":"address"}],"name":"PilotContractSet","type":"event"},{"anonymous":false,"inputs":[],"name":"PilotRedeemed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"claim","type":"uint8"},{"indexed":false,"internalType":"uint8","name":"redeem","type":"uint8"}],"name":"PilotStateChange","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"racecraft","type":"address"}],"name":"RacecraftContractSet","type":"event"},{"anonymous":false,"inputs":[],"name":"RacecraftRedeemed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"redeem","type":"uint8"}],"name":"RacecraftStateChange","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"buyer","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RefundIssued","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"supply","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"firstId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"reservedPilots","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"reservedRacecrafts","type":"uint256"}],"name":"SalesFragmentCreated","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SYS_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256[]","name":"qtys","type":"uint256[]"},{"internalType":"address[]","name":"recipients","type":"address[]"}],"name":"airdropMintpass","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"},{"internalType":"uint8","name":"v","type":"uint8"}],"internalType":"struct CouponSystem.Coupon","name":"coupon","type":"tuple"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"qty","type":"uint256"},{"internalType":"uint256","name":"allotted","type":"uint256"}],"name":"claimPilotPass","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint64","name":"fragmentSupply","type":"uint64"},{"internalType":"uint64","name":"firstId","type":"uint64"},{"internalType":"uint64","name":"reservedPilots","type":"uint64"},{"internalType":"uint64","name":"reservedRacecrafts","type":"uint64"}],"name":"createFragments","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"dedicatedFragment","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"emergencyStop","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"forwarder","type":"address"}],"name":"isTrustedForwarder","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mintPassContract","outputs":[{"internalType":"contract IEXRMintPass","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pilotContract","outputs":[{"internalType":"contract IEXRGameAsset","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pilotPassMaxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pilotPassTokenId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"racecraftContract","outputs":[{"internalType":"contract IEXRGameAsset","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"racecraftPassMaxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"racecraftPassTokenId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"seed","type":"bytes32"},{"components":[{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"},{"internalType":"uint8","name":"v","type":"uint8"}],"internalType":"struct CouponSystem.Coupon","name":"coupon","type":"tuple"}],"name":"redeemPilot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"seed","type":"bytes32"},{"components":[{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"},{"internalType":"uint8","name":"v","type":"uint8"}],"internalType":"struct CouponSystem.Coupon","name":"coupon","type":"tuple"}],"name":"redeemRacecraft","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"contractAddress","type":"address"}],"name":"setMintPassContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"contractAddress","type":"address"}],"name":"setPilotContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"passClaim","type":"uint8"},{"internalType":"uint8","name":"redemption","type":"uint8"}],"name":"setPilotState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"contractAddress","type":"address"}],"name":"setRacecraftContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"redemption","type":"uint8"}],"name":"setRacecraftState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"state","outputs":[{"internalType":"uint8","name":"claimPilotPass","type":"uint8"},{"internalType":"uint8","name":"redeemPilot","type":"uint8"},{"internalType":"uint8","name":"redeemRacecraft","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newSigner","type":"address"}],"name":"updateAdminSigner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"usedSeeds","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdrawBalance","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60c06040523480156200001157600080fd5b5060405162002be538038062002be58339810160408190526200003491620001cd565b6001600160a01b03848116608052600080546001600160a01b0319169187169190911781556001805560ff841660a052600383905560048290556200007a9033620000b1565b620000a67f102df6c829c4ae7b33ef1bb0ebd38acf773714f0196b4f4fd4b0ade595f3daf733620000b1565b505050505062000231565b60008281526002602090815260408083206001600160a01b038516845290915290205460ff16620001545760008281526002602090815260408083206001600160a01b03851684529091529020805460ff191660011790556200011362000158565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b60006200016f6200017460201b62001dd71760201c565b905090565b6080516000906001600160a01b0316330362000197575060131936013560601c90565b6200016f620001ac60201b62001dfe1760201c565b3390565b80516001600160a01b0381168114620001c857600080fd5b919050565b600080600080600060a08688031215620001e657600080fd5b620001f186620001b0565b94506200020160208701620001b0565b9350604086015160ff811681146200021857600080fd5b6060870151608090970151959894975095949392505050565b60805160a05161292c620002b9600039600081816104b701528181610ad301528181610d5d01528181610f1f0152818161113e0152818161120101528181611385015281816114c2015281816116810152818161177c01528181611877015281816119a301528181611a3e01528181611c570152611cef0152600061087c015261292c6000f3fe6080604052600436106101e35760003560e01c80637e58ff8211610102578063ae8d05d111610095578063c766731e11610064578063c766731e146105c4578063d547741f146105e4578063f306ba3014610604578063f3d617be1461062657600080fd5b8063ae8d05d114610520578063bcaf5b8314610540578063c19d93fb14610553578063c4cfccd3146105a457600080fd5b80639c302eb2116100d15780639c302eb2146104905780639e95b9d7146104a55780639ff19322146104eb578063a217fddf1461050b57600080fd5b80637e58ff82146104005780638013a3ef1461042057806391d14854146104405780639ada78071461046057600080fd5b806336568abe1161017a578063620af93411610149578063620af9341461038b57806363a599a4146103ab578063735d2a27146103c05780637b8c126f146103e057600080fd5b806336568abe146102fe5780633a3543a41461031e578063572b6c05146103565780635fd8c7101461037657600080fd5b80632715993d116101b65780632715993d146102925780632f2ff15d146102b2578063304a02c0146102d25780633251427d146102e857600080fd5b806301ffc9a7146101e857806316c08b181461021d5780632307c7f11461023f578063248a9ca314610262575b600080fd5b3480156101f457600080fd5b5061020861020336600461228e565b610646565b60405190151581526020015b60405180910390f35b34801561022957600080fd5b5061023d6102383660046122ce565b61067d565b005b34801561024b57600080fd5b50610254600281565b604051908152602001610214565b34801561026e57600080fd5b5061025461027d366004612301565b60009081526002602052604090206001015490565b34801561029e57600080fd5b5061023d6102ad366004612331565b61072d565b3480156102be57600080fd5b5061023d6102cd36600461234c565b6107ba565b3480156102de57600080fd5b5061025460035481565b3480156102f457600080fd5b5061025460045481565b34801561030a57600080fd5b5061023d61031936600461234c565b6107e7565b34801561032a57600080fd5b5060075461033e906001600160a01b031681565b6040516001600160a01b039091168152602001610214565b34801561036257600080fd5b50610208610371366004612331565b61087a565b34801561038257600080fd5b5061023d6108ac565b34801561039757600080fd5b5060095461033e906001600160a01b031681565b3480156103b757600080fd5b5061023d61095d565b3480156103cc57600080fd5b5061023d6103db366004612331565b6109b0565b3480156103ec57600080fd5b5061023d6103fb366004612387565b610a3d565b34801561040c57600080fd5b5061023d61041b366004612331565b610dfd565b34801561042c57600080fd5b5061023d61043b366004612387565b610e8a565b34801561044c57600080fd5b5061020861045b36600461234c565b61129f565b34801561046c57600080fd5b5061020861047b366004612301565b60056020526000908152604090205460ff1681565b34801561049c57600080fd5b50610254600181565b3480156104b157600080fd5b506104d97f000000000000000000000000000000000000000000000000000000000000000081565b60405160ff9091168152602001610214565b3480156104f757600080fd5b5061023d6105063660046123f6565b6112ca565b34801561051757600080fd5b50610254600081565b34801561052c57600080fd5b5061023d61053b36600461246f565b61158d565b61023d61054e36600461248a565b611620565b34801561055f57600080fd5b506006546105809060ff808216916101008104821691620100009091041683565b6040805160ff94851681529284166020840152921691810191909152606001610214565b3480156105b057600080fd5b5060085461033e906001600160a01b031681565b3480156105d057600080fd5b5061023d6105df366004612331565b611b10565b3480156105f057600080fd5b5061023d6105ff36600461234c565b611b7f565b34801561061057600080fd5b506102546000805160206128d783398151915281565b34801561063257600080fd5b5061023d6106413660046124db565b611ba7565b60006001600160e01b03198216637965db0b60e01b148061067757506301ffc9a760e01b6001600160e01b03198316145b92915050565b6000805160206128d783398151915261069d81610698611e02565b611e0c565b60018360ff1611806106b2575060018260ff16115b156106cf57604051626a5b5960e31b815260040160405180910390fd5b6006805460ff85811661ffff199092168217610100918616918202179092556040805191825260208201929092527f1ebf3f7d00b5715016c7917e632f39c1f8c3e6ac4cfc2da21555e4a1ded33921910160405180910390a1505050565b6000805160206128d783398151915261074881610698611e02565b6001600160a01b03821661076f5760405163624bfb1d60e01b815260040160405180910390fd5b600980546001600160a01b0319166001600160a01b0384169081179091556040517f312b02c9a01447de8c91bac1f32a49f049c5bacebd8d2bbf8a1782ece7706cbe90600090a25050565b6000828152600260205260409020600101546107d881610698611e02565b6107e28383611e70565b505050565b6107ef611e02565b6001600160a01b0316816001600160a01b03161461086c5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6108768282611ef7565b5050565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b6000805160206128d78339815191526108c781610698611e02565b604051600090339047908381818185875af1925050503d8060008114610909576040519150601f19603f3d011682016040523d82523d6000602084013e61090e565b606091505b505090508061093057604051631871589d60e21b815260040160405180910390fd5b6040517fd7e29180ed912c1b05c7de92c52d7d4421d50c763bb288a99d28f035576eea6990600090a15050565b6000805160206128d783398151915261097881610698611e02565b6006805462ffffff191690556040517f4e97bcfc80ae353daee1a1990d5b388eef167d3e197ebf5243cc4d43b4125c0990600090a150565b6000805160206128d78339815191526109cb81610698611e02565b6001600160a01b0382166109f25760405163624bfb1d60e01b815260040160405180910390fd5b600780546001600160a01b0319166001600160a01b0384169081179091556040517f1766228c0641f43129135b615b13a8a11c2aee4cfcf157cb120ec26af96e524290600090a25050565b600260015403610a5f5760405162461bcd60e51b81526004016108639061252f565b6002600155610a6d3361087a565b80610a7757503332145b610a935760405162461bcd60e51b815260040161086390612566565b60065462010000900460ff16600003610abf5760405163a3cadca960e01b815260040160405180910390fd5b600954604051631ceb0f3760e01b815260ff7f00000000000000000000000000000000000000000000000000000000000000001660048201526001600160a01b0390911690631ceb0f3790602401602060405180830381865afa158015610b2a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b4e91906125b0565b610b6b57604051635cfecf1d60e01b815260040160405180910390fd5b600454600003610b8e5760405163f8f385fd60e01b815260040160405180910390fd5b60008281526005602052604090205460ff1615610bbe576040516338a2d56b60e11b815260040160405180910390fd5b6000828152600560205260408120805460ff19166001179055610bdf611e02565b600754604051627eeac760e11b81526001600160a01b0380841660048301526002602483015292935091169062fdd58e90604401602060405180830381865afa158015610c30573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c5491906125d2565b600003610c7457604051632c2da84560e21b815260040160405180910390fd5b6000304660028685604051602001610c9095949392919061260d565b604051602081830303815290604052805190602001209050610cb28184611f7c565b610cce5760405162435e4760e31b815260040160405180910390fd5b60075460405163312d4f9d60e21b81526001600160a01b038481166004830152600260248301529091169063c4b53e7490604401600060405180830381600087803b158015610d1c57600080fd5b505af1158015610d30573d6000803e3d6000fd5b5050600954604051633e5a373160e21b81526001600160a01b0386811660048301526001602483015260ff7f000000000000000000000000000000000000000000000000000000000000000016604483015260648201899052909116925063f968dcc49150608401600060405180830381600087803b158015610db257600080fd5b505af1158015610dc6573d6000803e3d6000fd5b50506040517f057db9bebb88e3ad21919b4290648418f4c4ae1ebd53a0e0b744c7bdb7666a1f925060009150a15050600180555050565b6000805160206128d7833981519152610e1881610698611e02565b6001600160a01b038216610e3f5760405163624bfb1d60e01b815260040160405180910390fd5b600880546001600160a01b0319166001600160a01b0384169081179091556040517fb13a6f8fe6938d670de9cfed20a7a8f13977c2c1cd41dad8c5f2829cbd48c4ca90600090a25050565b600260015403610eac5760405162461bcd60e51b81526004016108639061252f565b6002600155610eba3361087a565b80610ec457503332145b610ee05760405162461bcd60e51b815260040161086390612566565b600654610100900460ff16600003610f0b57604051635f32e11560e01b815260040160405180910390fd5b600854604051631ceb0f3760e01b815260ff7f00000000000000000000000000000000000000000000000000000000000000001660048201526001600160a01b0390911690631ceb0f3790602401602060405180830381865afa158015610f76573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f9a91906125b0565b610fb757604051635cfecf1d60e01b815260040160405180910390fd5b600354600003610fda5760405163f8f385fd60e01b815260040160405180910390fd5b60008281526005602052604090205460ff161561100a576040516338a2d56b60e11b815260040160405180910390fd5b6000828152600560205260408120805460ff1916600117905561102b611e02565b600754604051627eeac760e11b81526001600160a01b0380841660048301526001602483015292935091169062fdd58e90604401602060405180830381865afa15801561107c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110a091906125d2565b6000036110c057604051632c2da84560e21b815260040160405180910390fd5b60003046600186856040516020016110dc95949392919061260d565b6040516020818303038152906040528051906020012090506110fe8184611f7c565b61111a5760405162435e4760e31b815260040160405180910390fd5b6007546040516365fb8a2160e11b81526001600160a01b03848116600483015260ff7f00000000000000000000000000000000000000000000000000000000000000001660248301529091169063cbf7144290604401600060405180830381600087803b15801561118a57600080fd5b505af115801561119e573d6000803e3d6000fd5b50506040516001600160a01b03851692507ff5f73ef646c359f947f7df3225149996c955e7b96b30ce4a3f3e8dbefaa701d69150600090a2600854604051633e5a373160e21b81526001600160a01b0384811660048301526001602483015260ff7f0000000000000000000000000000000000000000000000000000000000000000166044830152606482018790529091169063f968dcc490608401600060405180830381600087803b15801561125457600080fd5b505af1158015611268573d6000803e3d6000fd5b50506040517fb7b971245648a0aa4bc011905610c715d7b0db1adff46f28973a0301803f19b2925060009150a15050600180555050565b60009182526002602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6000805160206128d78339815191526112e581610698611e02565b8382146113055760405163552343dd60e01b815260040160405180910390fd5b6003546000036113285760405163f8f385fd60e01b815260040160405180910390fd5b836000805b8281101561136d578787828181106113475761134761264c565b90506020020135826113599190612678565b91508061136581612690565b91505061132d565b5060035460075460405163eb25c00160e01b815260ff7f0000000000000000000000000000000000000000000000000000000000000000166004820152602481018b905283916001600160a01b03169063eb25c00190604401602060405180830381865afa1580156113e3573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061140791906125d2565b6114119190612678565b11156114305760405163641796fb60e11b815260040160405180910390fd5b60005b8281101561152f576007546001600160a01b031663a647e8ec87878481811061145e5761145e61264c565b90506020020160208101906114739190612331565b8a8a858181106114855761148561264c565b6040516001600160e01b031960e087901b1681526001600160a01b0390941660048501526020029190910135602483015250604481018c905260ff7f0000000000000000000000000000000000000000000000000000000000000000166064820152608401600060405180830381600087803b15801561150457600080fd5b505af1158015611518573d6000803e3d6000fd5b50505050808061152790612690565b915050611433565b5084846040516115409291906126a9565b60405180910390207f68ec32f9e0ee1a6962c7b99b017a27ab1a849db62f17702c2e83c20f5fffd75c89898960405161157b939291906126e9565b60405180910390a25050505050505050565b6000805160206128d78339815191526115a881610698611e02565b60018260ff1611156115cc57604051626a5b5960e31b815260040160405180910390fd5b6006805462ff000019166201000060ff8516908102919091179091556040519081527f716174e1a3bbcdf3cba8e2f9e57a7e33729d573779909a2623ff11b195bbcfcc906020015b60405180910390a15050565b6002600154036116425760405162461bcd60e51b81526004016108639061252f565b600260015560065460ff1660000361166d5760405163d97c14b960e01b815260040160405180910390fd5b600854604051631ceb0f3760e01b815260ff7f00000000000000000000000000000000000000000000000000000000000000001660048201526001600160a01b0390911690631ceb0f3790602401602060405180830381865afa1580156116d8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116fc91906125b0565b61171957604051635cfecf1d60e01b815260040160405180910390fd5b60035460000361173c5760405163f8f385fd60e01b815260040160405180910390fd5b811580611747575080155b15611765576040516347fca00160e11b815260040160405180910390fd5b60035460075460405163eb25c00160e01b815260ff7f00000000000000000000000000000000000000000000000000000000000000001660048201526001602482015284916001600160a01b03169063eb25c00190604401602060405180830381865afa1580156117da573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117fe91906125d2565b6118089190612678565b11156118275760405163641796fb60e11b815260040160405180910390fd5b6000611833838561272d565b9050600061183f611e02565b905034828110156118635760405163383aa73760e01b815260040160405180910390fd5b600754604051634faf457760e01b815260ff7f00000000000000000000000000000000000000000000000000000000000000001660048201526001600160a01b03848116602483015286921690634faf457790604401602060405180830381865afa1580156118d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118fa91906125d2565b6119049087612678565b11156119235760405163b0fed21d60e01b815260040160405180910390fd5b6000304660008988876040516020016119419695949392919061274c565b6040516020818303038152906040528051906020012090506119638189611f7c565b61197f5760405162435e4760e31b815260040160405180910390fd5b600754604051635d62ebd560e11b81526001600160a01b03858116600483015260ff7f0000000000000000000000000000000000000000000000000000000000000000166024830152604482018990529091169063bac5d7aa90606401600060405180830381600087803b1580156119f657600080fd5b505af1158015611a0a573d6000803e3d6000fd5b5050600754604051632991fa3b60e21b81526001600160a01b038781166004830152602482018b90526001604483015260ff7f0000000000000000000000000000000000000000000000000000000000000000166064830152909116925063a647e8ec9150608401600060405180830381600087803b158015611a8c57600080fd5b505af1158015611aa0573d6000803e3d6000fd5b50505050826001600160a01b03167fafe4474713392f779d4c2e8513dda8d46fb3a388d855f31f360f24d11318dc9887604051611adf91815260200190565b60405180910390a281841015611b0257611b0283611afd8685612792565b612030565b505060018055505050505050565b6000805160206128d7833981519152611b2b81610698611e02565b600080546001600160a01b0319166001600160a01b0384161790556040516001600160a01b03831681527fc49bbf07b3ce68dc7d166375db001715e20a2cda26fae8a41ddbf7a72dadc3d190602001611614565b600082815260026020526040902060010154611b9d81610698611e02565b6107e28383611ef7565b6000805160206128d7833981519152611bc281610698611e02565b826001600160401b0316856001600160401b0316111580611bf55750816001600160401b0316856001600160401b031611155b15611c1357604051633c6fd6d360e01b815260040160405180910390fd5b611c1d83866127a9565b6001600160401b0316600355611c3382866127a9565b6001600160401b039081166004908155600854604051633f904cbb60e21b815260ff7f000000000000000000000000000000000000000000000000000000000000000016928101929092528783166024830152868316604483015291851660648201526001600160a01b039091169063fe4132ec90608401600060405180830381600087803b158015611cc557600080fd5b505af1158015611cd9573d6000803e3d6000fd5b5050600954604051633f904cbb60e21b815260ff7f00000000000000000000000000000000000000000000000000000000000000001660048201526001600160401b03808a1660248301528089166044830152861660648201526001600160a01b03909116925063fe4132ec9150608401600060405180830381600087803b158015611d6457600080fd5b505af1158015611d78573d6000803e3d6000fd5b5050604080516001600160401b0389811682528881166020830152878116828401528616606082015290517ff52726163b226402b3bfd80cf3952e596ebfa9f7e9eb4012d0a20677954872089350908190036080019150a15050505050565b6000611de23361087a565b15611df4575060131936013560601c90565b503390565b905090565b3390565b6000611df9611dd7565b611e16828261129f565b61087657611e2e816001600160a01b031660146120ec565b611e398360206120ec565b604051602001611e4a929190612801565b60408051601f198184030181529082905262461bcd60e51b825261086391600401612876565b611e7a828261129f565b6108765760008281526002602090815260408083206001600160a01b03851684529091529020805460ff19166001179055611eb3611e02565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b611f01828261129f565b156108765760008281526002602090815260408083206001600160a01b03851684529091529020805460ff19169055611f38611e02565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b600080600184611f92606086016040870161246f565b604080516000815260208181018084529490945260ff909216908201528535606082015290850135608082015260a0016020604051602081039080840390855afa158015611fe4573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661201857604051638baa579f60e01b815260040160405180910390fd5b6000546001600160a01b039081169116149392505050565b6000826001600160a01b03168260405160006040518083038185875af1925050503d806000811461207d576040519150601f19603f3d011682016040523d82523d6000602084013e612082565b606091505b50509050806120a457604051635adfc57160e01b815260040160405180910390fd5b826001600160a01b03167fa171b6942063c6f2800ce40a780edce37baa2b618571b11eedd1e69e626e7d76836040516120df91815260200190565b60405180910390a2505050565b606060006120fb83600261272d565b612106906002612678565b6001600160401b0381111561211d5761211d6128a9565b6040519080825280601f01601f191660200182016040528015612147576020820181803683370190505b509050600360fc1b816000815181106121625761216261264c565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106121915761219161264c565b60200101906001600160f81b031916908160001a90535060006121b584600261272d565b6121c0906001612678565b90505b6001811115612238576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106121f4576121f461264c565b1a60f81b82828151811061220a5761220a61264c565b60200101906001600160f81b031916908160001a90535060049490941c93612231816128bf565b90506121c3565b5083156122875760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610863565b9392505050565b6000602082840312156122a057600080fd5b81356001600160e01b03198116811461228757600080fd5b803560ff811681146122c957600080fd5b919050565b600080604083850312156122e157600080fd5b6122ea836122b8565b91506122f8602084016122b8565b90509250929050565b60006020828403121561231357600080fd5b5035919050565b80356001600160a01b03811681146122c957600080fd5b60006020828403121561234357600080fd5b6122878261231a565b6000806040838503121561235f57600080fd5b823591506122f86020840161231a565b60006060828403121561238157600080fd5b50919050565b6000806080838503121561239a57600080fd5b823591506122f8846020850161236f565b60008083601f8401126123bd57600080fd5b5081356001600160401b038111156123d457600080fd5b6020830191508360208260051b85010111156123ef57600080fd5b9250929050565b60008060008060006060868803121561240e57600080fd5b8535945060208601356001600160401b038082111561242c57600080fd5b61243889838a016123ab565b9096509450604088013591508082111561245157600080fd5b5061245e888289016123ab565b969995985093965092949392505050565b60006020828403121561248157600080fd5b612287826122b8565b60008060008060c085870312156124a057600080fd5b6124aa868661236f565b966060860135965060808601359560a00135945092505050565b80356001600160401b03811681146122c957600080fd5b600080600080608085870312156124f157600080fd5b6124fa856124c4565b9350612508602086016124c4565b9250612516604086016124c4565b9150612524606086016124c4565b905092959194509250565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b6020808252602a908201527f4e6f6e2d7472757374656420666f7277617264657220636f6e7472616374206e6040820152691bdd08185b1b1bddd95960b21b606082015260800190565b6000602082840312156125c257600080fd5b8151801515811461228757600080fd5b6000602082840312156125e457600080fd5b5051919050565b6005811061260957634e487b7160e01b600052602160045260246000fd5b9052565b6001600160a01b0386811682526020820186905260a082019061263360408401876125eb565b8460608401528084166080840152509695505050505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000821982111561268b5761268b612662565b500190565b6000600182016126a2576126a2612662565b5060010190565b60008184825b858110156126de576001600160a01b036126c88361231a565b16835260209283019291909101906001016126af565b509095945050505050565b838152604060208201819052810182905260006001600160fb1b0383111561271057600080fd5b8260051b8085606085013760009201606001918252509392505050565b600081600019048311821515161561274757612747612662565b500290565b6001600160a01b0387811682526020820187905260c082019061277260408401886125eb565b85606084015284608084015280841660a084015250979650505050505050565b6000828210156127a4576127a4612662565b500390565b60006001600160401b03838116908316818110156127c9576127c9612662565b039392505050565b60005b838110156127ec5781810151838201526020016127d4565b838111156127fb576000848401525b50505050565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516128398160178501602088016127d1565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835161286a8160288401602088016127d1565b01602801949350505050565b60208152600082518060208401526128958160408501602087016127d1565b601f01601f19169190910160400192915050565b634e487b7160e01b600052604160045260246000fd5b6000816128ce576128ce612662565b50600019019056fe102df6c829c4ae7b33ef1bb0ebd38acf773714f0196b4f4fd4b0ade595f3daf7a2646970667358221220cf324cac2e97de40f8c24f52c0afc28dc2696697d6435014ec9a1d0036bfc40a64736f6c634300080d0033000000000000000000000000c9f504883ad80167a8a389c77affcf8ea8ab13ca0000000000000000000000003af14449e18f2c3677bfcb5f954dc68d5fb74a75000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x6080604052600436106101e35760003560e01c80637e58ff8211610102578063ae8d05d111610095578063c766731e11610064578063c766731e146105c4578063d547741f146105e4578063f306ba3014610604578063f3d617be1461062657600080fd5b8063ae8d05d114610520578063bcaf5b8314610540578063c19d93fb14610553578063c4cfccd3146105a457600080fd5b80639c302eb2116100d15780639c302eb2146104905780639e95b9d7146104a55780639ff19322146104eb578063a217fddf1461050b57600080fd5b80637e58ff82146104005780638013a3ef1461042057806391d14854146104405780639ada78071461046057600080fd5b806336568abe1161017a578063620af93411610149578063620af9341461038b57806363a599a4146103ab578063735d2a27146103c05780637b8c126f146103e057600080fd5b806336568abe146102fe5780633a3543a41461031e578063572b6c05146103565780635fd8c7101461037657600080fd5b80632715993d116101b65780632715993d146102925780632f2ff15d146102b2578063304a02c0146102d25780633251427d146102e857600080fd5b806301ffc9a7146101e857806316c08b181461021d5780632307c7f11461023f578063248a9ca314610262575b600080fd5b3480156101f457600080fd5b5061020861020336600461228e565b610646565b60405190151581526020015b60405180910390f35b34801561022957600080fd5b5061023d6102383660046122ce565b61067d565b005b34801561024b57600080fd5b50610254600281565b604051908152602001610214565b34801561026e57600080fd5b5061025461027d366004612301565b60009081526002602052604090206001015490565b34801561029e57600080fd5b5061023d6102ad366004612331565b61072d565b3480156102be57600080fd5b5061023d6102cd36600461234c565b6107ba565b3480156102de57600080fd5b5061025460035481565b3480156102f457600080fd5b5061025460045481565b34801561030a57600080fd5b5061023d61031936600461234c565b6107e7565b34801561032a57600080fd5b5060075461033e906001600160a01b031681565b6040516001600160a01b039091168152602001610214565b34801561036257600080fd5b50610208610371366004612331565b61087a565b34801561038257600080fd5b5061023d6108ac565b34801561039757600080fd5b5060095461033e906001600160a01b031681565b3480156103b757600080fd5b5061023d61095d565b3480156103cc57600080fd5b5061023d6103db366004612331565b6109b0565b3480156103ec57600080fd5b5061023d6103fb366004612387565b610a3d565b34801561040c57600080fd5b5061023d61041b366004612331565b610dfd565b34801561042c57600080fd5b5061023d61043b366004612387565b610e8a565b34801561044c57600080fd5b5061020861045b36600461234c565b61129f565b34801561046c57600080fd5b5061020861047b366004612301565b60056020526000908152604090205460ff1681565b34801561049c57600080fd5b50610254600181565b3480156104b157600080fd5b506104d97f000000000000000000000000000000000000000000000000000000000000000081565b60405160ff9091168152602001610214565b3480156104f757600080fd5b5061023d6105063660046123f6565b6112ca565b34801561051757600080fd5b50610254600081565b34801561052c57600080fd5b5061023d61053b36600461246f565b61158d565b61023d61054e36600461248a565b611620565b34801561055f57600080fd5b506006546105809060ff808216916101008104821691620100009091041683565b6040805160ff94851681529284166020840152921691810191909152606001610214565b3480156105b057600080fd5b5060085461033e906001600160a01b031681565b3480156105d057600080fd5b5061023d6105df366004612331565b611b10565b3480156105f057600080fd5b5061023d6105ff36600461234c565b611b7f565b34801561061057600080fd5b506102546000805160206128d783398151915281565b34801561063257600080fd5b5061023d6106413660046124db565b611ba7565b60006001600160e01b03198216637965db0b60e01b148061067757506301ffc9a760e01b6001600160e01b03198316145b92915050565b6000805160206128d783398151915261069d81610698611e02565b611e0c565b60018360ff1611806106b2575060018260ff16115b156106cf57604051626a5b5960e31b815260040160405180910390fd5b6006805460ff85811661ffff199092168217610100918616918202179092556040805191825260208201929092527f1ebf3f7d00b5715016c7917e632f39c1f8c3e6ac4cfc2da21555e4a1ded33921910160405180910390a1505050565b6000805160206128d783398151915261074881610698611e02565b6001600160a01b03821661076f5760405163624bfb1d60e01b815260040160405180910390fd5b600980546001600160a01b0319166001600160a01b0384169081179091556040517f312b02c9a01447de8c91bac1f32a49f049c5bacebd8d2bbf8a1782ece7706cbe90600090a25050565b6000828152600260205260409020600101546107d881610698611e02565b6107e28383611e70565b505050565b6107ef611e02565b6001600160a01b0316816001600160a01b03161461086c5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6108768282611ef7565b5050565b7f0000000000000000000000003af14449e18f2c3677bfcb5f954dc68d5fb74a756001600160a01b0390811691161490565b6000805160206128d78339815191526108c781610698611e02565b604051600090339047908381818185875af1925050503d8060008114610909576040519150601f19603f3d011682016040523d82523d6000602084013e61090e565b606091505b505090508061093057604051631871589d60e21b815260040160405180910390fd5b6040517fd7e29180ed912c1b05c7de92c52d7d4421d50c763bb288a99d28f035576eea6990600090a15050565b6000805160206128d783398151915261097881610698611e02565b6006805462ffffff191690556040517f4e97bcfc80ae353daee1a1990d5b388eef167d3e197ebf5243cc4d43b4125c0990600090a150565b6000805160206128d78339815191526109cb81610698611e02565b6001600160a01b0382166109f25760405163624bfb1d60e01b815260040160405180910390fd5b600780546001600160a01b0319166001600160a01b0384169081179091556040517f1766228c0641f43129135b615b13a8a11c2aee4cfcf157cb120ec26af96e524290600090a25050565b600260015403610a5f5760405162461bcd60e51b81526004016108639061252f565b6002600155610a6d3361087a565b80610a7757503332145b610a935760405162461bcd60e51b815260040161086390612566565b60065462010000900460ff16600003610abf5760405163a3cadca960e01b815260040160405180910390fd5b600954604051631ceb0f3760e01b815260ff7f00000000000000000000000000000000000000000000000000000000000000001660048201526001600160a01b0390911690631ceb0f3790602401602060405180830381865afa158015610b2a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b4e91906125b0565b610b6b57604051635cfecf1d60e01b815260040160405180910390fd5b600454600003610b8e5760405163f8f385fd60e01b815260040160405180910390fd5b60008281526005602052604090205460ff1615610bbe576040516338a2d56b60e11b815260040160405180910390fd5b6000828152600560205260408120805460ff19166001179055610bdf611e02565b600754604051627eeac760e11b81526001600160a01b0380841660048301526002602483015292935091169062fdd58e90604401602060405180830381865afa158015610c30573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c5491906125d2565b600003610c7457604051632c2da84560e21b815260040160405180910390fd5b6000304660028685604051602001610c9095949392919061260d565b604051602081830303815290604052805190602001209050610cb28184611f7c565b610cce5760405162435e4760e31b815260040160405180910390fd5b60075460405163312d4f9d60e21b81526001600160a01b038481166004830152600260248301529091169063c4b53e7490604401600060405180830381600087803b158015610d1c57600080fd5b505af1158015610d30573d6000803e3d6000fd5b5050600954604051633e5a373160e21b81526001600160a01b0386811660048301526001602483015260ff7f000000000000000000000000000000000000000000000000000000000000000016604483015260648201899052909116925063f968dcc49150608401600060405180830381600087803b158015610db257600080fd5b505af1158015610dc6573d6000803e3d6000fd5b50506040517f057db9bebb88e3ad21919b4290648418f4c4ae1ebd53a0e0b744c7bdb7666a1f925060009150a15050600180555050565b6000805160206128d7833981519152610e1881610698611e02565b6001600160a01b038216610e3f5760405163624bfb1d60e01b815260040160405180910390fd5b600880546001600160a01b0319166001600160a01b0384169081179091556040517fb13a6f8fe6938d670de9cfed20a7a8f13977c2c1cd41dad8c5f2829cbd48c4ca90600090a25050565b600260015403610eac5760405162461bcd60e51b81526004016108639061252f565b6002600155610eba3361087a565b80610ec457503332145b610ee05760405162461bcd60e51b815260040161086390612566565b600654610100900460ff16600003610f0b57604051635f32e11560e01b815260040160405180910390fd5b600854604051631ceb0f3760e01b815260ff7f00000000000000000000000000000000000000000000000000000000000000001660048201526001600160a01b0390911690631ceb0f3790602401602060405180830381865afa158015610f76573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f9a91906125b0565b610fb757604051635cfecf1d60e01b815260040160405180910390fd5b600354600003610fda5760405163f8f385fd60e01b815260040160405180910390fd5b60008281526005602052604090205460ff161561100a576040516338a2d56b60e11b815260040160405180910390fd5b6000828152600560205260408120805460ff1916600117905561102b611e02565b600754604051627eeac760e11b81526001600160a01b0380841660048301526001602483015292935091169062fdd58e90604401602060405180830381865afa15801561107c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110a091906125d2565b6000036110c057604051632c2da84560e21b815260040160405180910390fd5b60003046600186856040516020016110dc95949392919061260d565b6040516020818303038152906040528051906020012090506110fe8184611f7c565b61111a5760405162435e4760e31b815260040160405180910390fd5b6007546040516365fb8a2160e11b81526001600160a01b03848116600483015260ff7f00000000000000000000000000000000000000000000000000000000000000001660248301529091169063cbf7144290604401600060405180830381600087803b15801561118a57600080fd5b505af115801561119e573d6000803e3d6000fd5b50506040516001600160a01b03851692507ff5f73ef646c359f947f7df3225149996c955e7b96b30ce4a3f3e8dbefaa701d69150600090a2600854604051633e5a373160e21b81526001600160a01b0384811660048301526001602483015260ff7f0000000000000000000000000000000000000000000000000000000000000000166044830152606482018790529091169063f968dcc490608401600060405180830381600087803b15801561125457600080fd5b505af1158015611268573d6000803e3d6000fd5b50506040517fb7b971245648a0aa4bc011905610c715d7b0db1adff46f28973a0301803f19b2925060009150a15050600180555050565b60009182526002602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6000805160206128d78339815191526112e581610698611e02565b8382146113055760405163552343dd60e01b815260040160405180910390fd5b6003546000036113285760405163f8f385fd60e01b815260040160405180910390fd5b836000805b8281101561136d578787828181106113475761134761264c565b90506020020135826113599190612678565b91508061136581612690565b91505061132d565b5060035460075460405163eb25c00160e01b815260ff7f0000000000000000000000000000000000000000000000000000000000000000166004820152602481018b905283916001600160a01b03169063eb25c00190604401602060405180830381865afa1580156113e3573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061140791906125d2565b6114119190612678565b11156114305760405163641796fb60e11b815260040160405180910390fd5b60005b8281101561152f576007546001600160a01b031663a647e8ec87878481811061145e5761145e61264c565b90506020020160208101906114739190612331565b8a8a858181106114855761148561264c565b6040516001600160e01b031960e087901b1681526001600160a01b0390941660048501526020029190910135602483015250604481018c905260ff7f0000000000000000000000000000000000000000000000000000000000000000166064820152608401600060405180830381600087803b15801561150457600080fd5b505af1158015611518573d6000803e3d6000fd5b50505050808061152790612690565b915050611433565b5084846040516115409291906126a9565b60405180910390207f68ec32f9e0ee1a6962c7b99b017a27ab1a849db62f17702c2e83c20f5fffd75c89898960405161157b939291906126e9565b60405180910390a25050505050505050565b6000805160206128d78339815191526115a881610698611e02565b60018260ff1611156115cc57604051626a5b5960e31b815260040160405180910390fd5b6006805462ff000019166201000060ff8516908102919091179091556040519081527f716174e1a3bbcdf3cba8e2f9e57a7e33729d573779909a2623ff11b195bbcfcc906020015b60405180910390a15050565b6002600154036116425760405162461bcd60e51b81526004016108639061252f565b600260015560065460ff1660000361166d5760405163d97c14b960e01b815260040160405180910390fd5b600854604051631ceb0f3760e01b815260ff7f00000000000000000000000000000000000000000000000000000000000000001660048201526001600160a01b0390911690631ceb0f3790602401602060405180830381865afa1580156116d8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116fc91906125b0565b61171957604051635cfecf1d60e01b815260040160405180910390fd5b60035460000361173c5760405163f8f385fd60e01b815260040160405180910390fd5b811580611747575080155b15611765576040516347fca00160e11b815260040160405180910390fd5b60035460075460405163eb25c00160e01b815260ff7f00000000000000000000000000000000000000000000000000000000000000001660048201526001602482015284916001600160a01b03169063eb25c00190604401602060405180830381865afa1580156117da573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117fe91906125d2565b6118089190612678565b11156118275760405163641796fb60e11b815260040160405180910390fd5b6000611833838561272d565b9050600061183f611e02565b905034828110156118635760405163383aa73760e01b815260040160405180910390fd5b600754604051634faf457760e01b815260ff7f00000000000000000000000000000000000000000000000000000000000000001660048201526001600160a01b03848116602483015286921690634faf457790604401602060405180830381865afa1580156118d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118fa91906125d2565b6119049087612678565b11156119235760405163b0fed21d60e01b815260040160405180910390fd5b6000304660008988876040516020016119419695949392919061274c565b6040516020818303038152906040528051906020012090506119638189611f7c565b61197f5760405162435e4760e31b815260040160405180910390fd5b600754604051635d62ebd560e11b81526001600160a01b03858116600483015260ff7f0000000000000000000000000000000000000000000000000000000000000000166024830152604482018990529091169063bac5d7aa90606401600060405180830381600087803b1580156119f657600080fd5b505af1158015611a0a573d6000803e3d6000fd5b5050600754604051632991fa3b60e21b81526001600160a01b038781166004830152602482018b90526001604483015260ff7f0000000000000000000000000000000000000000000000000000000000000000166064830152909116925063a647e8ec9150608401600060405180830381600087803b158015611a8c57600080fd5b505af1158015611aa0573d6000803e3d6000fd5b50505050826001600160a01b03167fafe4474713392f779d4c2e8513dda8d46fb3a388d855f31f360f24d11318dc9887604051611adf91815260200190565b60405180910390a281841015611b0257611b0283611afd8685612792565b612030565b505060018055505050505050565b6000805160206128d7833981519152611b2b81610698611e02565b600080546001600160a01b0319166001600160a01b0384161790556040516001600160a01b03831681527fc49bbf07b3ce68dc7d166375db001715e20a2cda26fae8a41ddbf7a72dadc3d190602001611614565b600082815260026020526040902060010154611b9d81610698611e02565b6107e28383611ef7565b6000805160206128d7833981519152611bc281610698611e02565b826001600160401b0316856001600160401b0316111580611bf55750816001600160401b0316856001600160401b031611155b15611c1357604051633c6fd6d360e01b815260040160405180910390fd5b611c1d83866127a9565b6001600160401b0316600355611c3382866127a9565b6001600160401b039081166004908155600854604051633f904cbb60e21b815260ff7f000000000000000000000000000000000000000000000000000000000000000016928101929092528783166024830152868316604483015291851660648201526001600160a01b039091169063fe4132ec90608401600060405180830381600087803b158015611cc557600080fd5b505af1158015611cd9573d6000803e3d6000fd5b5050600954604051633f904cbb60e21b815260ff7f00000000000000000000000000000000000000000000000000000000000000001660048201526001600160401b03808a1660248301528089166044830152861660648201526001600160a01b03909116925063fe4132ec9150608401600060405180830381600087803b158015611d6457600080fd5b505af1158015611d78573d6000803e3d6000fd5b5050604080516001600160401b0389811682528881166020830152878116828401528616606082015290517ff52726163b226402b3bfd80cf3952e596ebfa9f7e9eb4012d0a20677954872089350908190036080019150a15050505050565b6000611de23361087a565b15611df4575060131936013560601c90565b503390565b905090565b3390565b6000611df9611dd7565b611e16828261129f565b61087657611e2e816001600160a01b031660146120ec565b611e398360206120ec565b604051602001611e4a929190612801565b60408051601f198184030181529082905262461bcd60e51b825261086391600401612876565b611e7a828261129f565b6108765760008281526002602090815260408083206001600160a01b03851684529091529020805460ff19166001179055611eb3611e02565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b611f01828261129f565b156108765760008281526002602090815260408083206001600160a01b03851684529091529020805460ff19169055611f38611e02565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b600080600184611f92606086016040870161246f565b604080516000815260208181018084529490945260ff909216908201528535606082015290850135608082015260a0016020604051602081039080840390855afa158015611fe4573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661201857604051638baa579f60e01b815260040160405180910390fd5b6000546001600160a01b039081169116149392505050565b6000826001600160a01b03168260405160006040518083038185875af1925050503d806000811461207d576040519150601f19603f3d011682016040523d82523d6000602084013e612082565b606091505b50509050806120a457604051635adfc57160e01b815260040160405180910390fd5b826001600160a01b03167fa171b6942063c6f2800ce40a780edce37baa2b618571b11eedd1e69e626e7d76836040516120df91815260200190565b60405180910390a2505050565b606060006120fb83600261272d565b612106906002612678565b6001600160401b0381111561211d5761211d6128a9565b6040519080825280601f01601f191660200182016040528015612147576020820181803683370190505b509050600360fc1b816000815181106121625761216261264c565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106121915761219161264c565b60200101906001600160f81b031916908160001a90535060006121b584600261272d565b6121c0906001612678565b90505b6001811115612238576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106121f4576121f461264c565b1a60f81b82828151811061220a5761220a61264c565b60200101906001600160f81b031916908160001a90535060049490941c93612231816128bf565b90506121c3565b5083156122875760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610863565b9392505050565b6000602082840312156122a057600080fd5b81356001600160e01b03198116811461228757600080fd5b803560ff811681146122c957600080fd5b919050565b600080604083850312156122e157600080fd5b6122ea836122b8565b91506122f8602084016122b8565b90509250929050565b60006020828403121561231357600080fd5b5035919050565b80356001600160a01b03811681146122c957600080fd5b60006020828403121561234357600080fd5b6122878261231a565b6000806040838503121561235f57600080fd5b823591506122f86020840161231a565b60006060828403121561238157600080fd5b50919050565b6000806080838503121561239a57600080fd5b823591506122f8846020850161236f565b60008083601f8401126123bd57600080fd5b5081356001600160401b038111156123d457600080fd5b6020830191508360208260051b85010111156123ef57600080fd5b9250929050565b60008060008060006060868803121561240e57600080fd5b8535945060208601356001600160401b038082111561242c57600080fd5b61243889838a016123ab565b9096509450604088013591508082111561245157600080fd5b5061245e888289016123ab565b969995985093965092949392505050565b60006020828403121561248157600080fd5b612287826122b8565b60008060008060c085870312156124a057600080fd5b6124aa868661236f565b966060860135965060808601359560a00135945092505050565b80356001600160401b03811681146122c957600080fd5b600080600080608085870312156124f157600080fd5b6124fa856124c4565b9350612508602086016124c4565b9250612516604086016124c4565b9150612524606086016124c4565b905092959194509250565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b6020808252602a908201527f4e6f6e2d7472757374656420666f7277617264657220636f6e7472616374206e6040820152691bdd08185b1b1bddd95960b21b606082015260800190565b6000602082840312156125c257600080fd5b8151801515811461228757600080fd5b6000602082840312156125e457600080fd5b5051919050565b6005811061260957634e487b7160e01b600052602160045260246000fd5b9052565b6001600160a01b0386811682526020820186905260a082019061263360408401876125eb565b8460608401528084166080840152509695505050505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000821982111561268b5761268b612662565b500190565b6000600182016126a2576126a2612662565b5060010190565b60008184825b858110156126de576001600160a01b036126c88361231a565b16835260209283019291909101906001016126af565b509095945050505050565b838152604060208201819052810182905260006001600160fb1b0383111561271057600080fd5b8260051b8085606085013760009201606001918252509392505050565b600081600019048311821515161561274757612747612662565b500290565b6001600160a01b0387811682526020820187905260c082019061277260408401886125eb565b85606084015284608084015280841660a084015250979650505050505050565b6000828210156127a4576127a4612662565b500390565b60006001600160401b03838116908316818110156127c9576127c9612662565b039392505050565b60005b838110156127ec5781810151838201526020016127d4565b838111156127fb576000848401525b50505050565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516128398160178501602088016127d1565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835161286a8160288401602088016127d1565b01602801949350505050565b60208152600082518060208401526128958160408501602087016127d1565b601f01601f19169190910160400192915050565b634e487b7160e01b600052604160045260246000fd5b6000816128ce576128ce612662565b50600019019056fe102df6c829c4ae7b33ef1bb0ebd38acf773714f0196b4f4fd4b0ade595f3daf7a2646970667358221220cf324cac2e97de40f8c24f52c0afc28dc2696697d6435014ec9a1d0036bfc40a64736f6c634300080d0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000c9f504883ad80167a8a389c77affcf8ea8ab13ca0000000000000000000000003af14449e18f2c3677bfcb5f954dc68d5fb74a75000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : adminSigner (address): 0xC9f504883ad80167a8a389c77AffcF8ea8ab13Ca
Arg [1] : trustedForwarder (address): 0x3AF14449e18f2c3677bFCB5F954Dc68d5fb74a75
Arg [2] : fragment (uint8): 0
Arg [3] : pilotPassMaxSupply_ (uint256): 0
Arg [4] : racecraftPassMaxSupply_ (uint256): 0
-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 000000000000000000000000c9f504883ad80167a8a389c77affcf8ea8ab13ca
Arg [1] : 0000000000000000000000003af14449e18f2c3677bfcb5f954dc68d5fb74a75
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000000
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.