ERC-721
Overview
Max Total Supply
2,594 SmolRing
Holders
751
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract
Balance
0 SmolRingLoading...
Loading
Loading...
Loading
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Name:
SmolRings
Compiler Version
v0.8.11+commit.d7f03943
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.11; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; import "../interfaces/ISmolRings.sol"; import "../interfaces/ISmolRingDistributor.sol"; import "../interfaces/ISmolRingStaking.sol"; import "../interfaces/ISmolRingForging.sol"; import "../interfaces/ICreatureOwnerResolver.sol"; import "../libraries/SmolRingUtils.sol"; import "../battlefly_flywheel/interfaces/ISmoloveActionsVault.sol"; import "../battlefly_flywheel/interfaces/IAtlasMine.sol"; /** * @title SmolRing contract * @author Archethect * @notice This contract contains all functionalities for Smol Rings */ contract SmolRings is ERC721Enumerable, ReentrancyGuard, AccessControl, ISmolRings { using Strings for uint256; bytes32 public constant ADMIN_ROLE = keccak256("ADMIN"); bytes32 public constant OPERATOR_ROLE = keccak256("OPERATOR"); uint128 public constant MAX_RINGS = 7500; uint128 public constant MAX_WHITELIST_AMOUNT = 3400; uint128 public constant RING_SMOL_AMOUNT = 3700; uint128 public constant RING_TEAM_AMOUNT = 400; uint256 public constant ringStakePriceInMagicWei = 169e18; uint256 public constant ringBuyPriceInEthWei = 42e15; uint128 public whitelistAmount; bool public regularMintEnabled; bool public whitelistMintEnabled; bool public smolMintEnabled; bool public tokensLocked; uint256 public ringCounter; uint256 public ringCounterWhitelist; uint256 public ringCounterTeam; uint256 public ringCounterSmol; uint256 public baseRewardFactor; string public baseURI; ICreatureOwnerResolver public smolBrainsOwnerResolver; ICreatureOwnerResolver public smolBodiesOwnerResolver; IERC20 public magic; address public treasury; ISmolRingDistributor public ringDistributor; ISmolRingStaking public staking; ISmolRingForging public forging; ISmoloveActionsVault public smoloveActionsVault; mapping(uint256 => bool) public smolUsed; mapping(uint256 => bool) public swolUsed; mapping(uint256 => uint256) public totalRingsPerType; mapping(uint256 => Ring) public ringProps; event WhitelistRingMinted(address sender, uint256 ringId); event TeamRingMinted(address sender, uint256 ringId); event RingMinted(address sender, uint256 ringId); event SmolRingMinted(address sender, uint256 smolId, uint256 ringId); event SwolRingMinted(address sender, uint256 swolId, uint256 ringId); event TokensLocked(bool status); constructor( address smolBrainsOwnerResolver_, address smolBodiesOwnerResolver_, address magic_, address ringDistributor_, address smoloveActionsVault_, address treasury_, address operator_, address admin_ ) ERC721("Smol Ring", "SmolRing") { require(smolBrainsOwnerResolver_ != address(0), "SMOLRING:ILLEGAL_ADDRESS"); require(smolBodiesOwnerResolver_ != address(0), "SMOLRING:ILLEGAL_ADDRESS"); require(magic_ != address(0), "SMOLRING:ILLEGAL_ADDRESS"); require(ringDistributor_ != address(0), "SMOLRING:ILLEGAL_ADDRESS"); require(smoloveActionsVault_ != address(0), "SMOLRING:ILLEGAL_ADDRESS"); require(treasury_ != address(0), "SMOLRING:ILLEGAL_ADDRESS"); require(operator_ != address(0), "SMOLRING:ILLEGAL_ADDRESS"); require(admin_ != address(0), "SMOLRING:ILLEGAL_ADDRESS"); smolBrainsOwnerResolver = ICreatureOwnerResolver(smolBrainsOwnerResolver_); smolBodiesOwnerResolver = ICreatureOwnerResolver(smolBodiesOwnerResolver_); magic = IERC20(magic_); ringDistributor = ISmolRingDistributor(ringDistributor_); smoloveActionsVault = ISmoloveActionsVault(smoloveActionsVault_); treasury = treasury_; baseRewardFactor = 250; whitelistAmount = 900; ringCounter = 1; ringCounterTeam = 1; ringCounterSmol = 1; ringCounterWhitelist = 1; tokensLocked = true; _setupRole(ADMIN_ROLE, admin_); _setupRole(ADMIN_ROLE, msg.sender); _setupRole(OPERATOR_ROLE, admin_); _setupRole(OPERATOR_ROLE, operator_); _setRoleAdmin(OPERATOR_ROLE, ADMIN_ROLE); _setRoleAdmin(ADMIN_ROLE, ADMIN_ROLE); } modifier onlyAdmin() { require(hasRole(ADMIN_ROLE, msg.sender), "SMOLRING:ACCESS_DENIED"); _; } modifier onlyOperator() { require(hasRole(OPERATOR_ROLE, msg.sender), "SMOLRING:ACCESS_DENIED"); _; } modifier nonContractCaller() { require(msg.sender == tx.origin, "SMOLRING:CONTRACT_CALLER"); _; } /** * @notice Mint a ring * @param amount Amount of rings to mint */ function mintRing(uint256 amount, bool stake) external payable virtual nonReentrant nonContractCaller { require(address(forging) != address(0), "SMOLRING:FORGING_CONTRACT_NOT_SET"); require(regularMintEnabled, "SMOLRING:REGULAR_MINT_DISABLED"); require(amount > 0, "SMOLRING:MINTING_0_NOT_ALLOWED"); require(amount <= 5, "SMOLRING:MAX_ALLOWANCE_PER_BATCH_REACHED"); require( ringCounter + amount - 1 <= (MAX_RINGS - RING_TEAM_AMOUNT - (MAX_WHITELIST_AMOUNT - whitelistAmount)), "SMOLRING:TOTAL_RING_AMOUNT_REACHED" ); if (stake) { require( magic.balanceOf(msg.sender) >= amount * ringStakePriceInMagicWei, "SMOLRING:NOT_ENOUGH_MAGIC_IN_WALLET" ); smoloveActionsVault.stake(msg.sender, amount * ringStakePriceInMagicWei); } else { require(amount * ringBuyPriceInEthWei == msg.value, "SMOLRING:INVALID_PRICE"); } for (uint256 i = 0; i < amount; i++) { ringProps[RING_TEAM_AMOUNT + ringCounter] = Ring(0); totalRingsPerType[0]++; _safeMint(msg.sender, RING_TEAM_AMOUNT + ringCounter); emit RingMinted(msg.sender, RING_TEAM_AMOUNT + ringCounter); ringCounter++; } } function mintRingSmolSwol( uint256[] calldata smolIds, uint256[] calldata swolIds, bool stake ) external payable virtual nonReentrant nonContractCaller { require((smolIds.length + swolIds.length) > 0, "SMOLRING:MINTING_0_NOT_ALLOWED"); if (stake) { require( magic.balanceOf(msg.sender) >= (smolIds.length + swolIds.length) * ringStakePriceInMagicWei, "SMOLRING:NOT_ENOUGH_MAGIC_IN_WALLET" ); } else { require( (smolIds.length + swolIds.length) * ringBuyPriceInEthWei == msg.value, "SMOLRING:NOT_ENOUGH_MAGIC_IN_WALLET" ); } _mintRingSmol(smolIds, stake); _mintRingSwol(swolIds, stake); } /** * @notice Mint ring for Smol holders * @param smolIds Ids of smols to be used as minting pass (should be owner of the smols) */ function mintRingSmol(uint256[] calldata smolIds, bool stake) external payable virtual nonReentrant nonContractCaller { require(smolIds.length > 0, "SMOLRING:MINTING_0_NOT_ALLOWED"); if (stake) { require( magic.balanceOf(msg.sender) >= smolIds.length * ringStakePriceInMagicWei, "SMOLRING:NOT_ENOUGH_MAGIC_IN_WALLET" ); } else { require(smolIds.length * ringBuyPriceInEthWei == msg.value, "SMOLRING:INVALID_PRICE"); } _mintRingSmol(smolIds, stake); } function _mintRingSmol(uint256[] calldata smolIds, bool stake) internal { require(address(forging) != address(0), "SMOLRING:FORGING_CONTRACT_NOT_SET"); require(smolMintEnabled, "SMOLRING:SMOL_MINT_DISABLED"); require(smolIds.length <= 32, "SMOLRING:MAX_ALLOWANCE_PER_BATCH_REACHED"); require( ringCounterSmol + smolIds.length - 1 <= RING_SMOL_AMOUNT, "SMOLRING:TOTAL_RING_AMOUNT_FOR_SMOL_REACHED" ); require( ringCounter + smolIds.length - 1 <= (MAX_RINGS - RING_TEAM_AMOUNT - (MAX_WHITELIST_AMOUNT - whitelistAmount)), "SMOLRING:TOTAL_RING_AMOUNT_REACHED" ); for (uint256 i = 0; i < smolIds.length; i++) { require(smolBrainsOwnerResolver.isOwner(msg.sender, smolIds[i]), "SMOLRING:NOT_OWNER_OF_SMOL"); require(!smolUsed[smolIds[i]], "SMOLRING:SMOL_ALREADY_USED"); } if (stake && smolIds.length > 0) { smoloveActionsVault.stake(msg.sender, smolIds.length * ringStakePriceInMagicWei); } for (uint256 i = 0; i < smolIds.length; i++) { smolUsed[smolIds[i]] = true; ringProps[RING_TEAM_AMOUNT + ringCounter] = Ring(0); totalRingsPerType[0]++; _safeMint(msg.sender, RING_TEAM_AMOUNT + ringCounter); emit SmolRingMinted(msg.sender, smolIds[i], RING_TEAM_AMOUNT + ringCounter); ringCounter++; ringCounterSmol++; } } /** * @notice Mint ring for Swol holders * @param swolIds Ids of swols to be used as minting pass (should be owner of the swols) */ function mintRingSwol(uint256[] calldata swolIds, bool stake) external payable virtual nonReentrant nonContractCaller { require(swolIds.length > 0, "SMOLRING:MINTING_0_NOT_ALLOWED"); if (stake) { require( magic.balanceOf(msg.sender) >= swolIds.length * ringStakePriceInMagicWei, "SMOLRING:NOT_ENOUGH_MAGIC_IN_WALLET" ); } else { require(swolIds.length * ringBuyPriceInEthWei == msg.value, "SMOLRING:INVALID_PRICE"); } _mintRingSwol(swolIds, stake); } function _mintRingSwol(uint256[] calldata swolIds, bool stake) internal { require(address(forging) != address(0), "SMOLRING:FORGING_CONTRACT_NOT_SET"); require(smolMintEnabled, "SMOLRING:SWOL_MINT_DISABLED"); require(swolIds.length <= 32, "SMOLRING:MAX_ALLOWANCE_PER_BATCH_REACHED"); require( ringCounterSmol + swolIds.length - 1 <= RING_SMOL_AMOUNT, "SMOLRING:TOTAL_RING_AMOUNT_FOR_SWOL_REACHED" ); require( ringCounter + swolIds.length - 1 <= (MAX_RINGS - RING_TEAM_AMOUNT - (MAX_WHITELIST_AMOUNT - whitelistAmount)), "SMOLRING:TOTAL_RING_AMOUNT_REACHED" ); for (uint256 i = 0; i < swolIds.length; i++) { require(smolBodiesOwnerResolver.isOwner(msg.sender, swolIds[i]), "SMOLRING:NOT_OWNER_OF_SWOL"); require(!swolUsed[swolIds[i]], "SMOLRING:SWOL_ALREADY_USED"); } if (stake && swolIds.length > 0) { smoloveActionsVault.stake(msg.sender, swolIds.length * ringStakePriceInMagicWei); } for (uint256 i = 0; i < swolIds.length; i++) { swolUsed[swolIds[i]] = true; ringProps[RING_TEAM_AMOUNT + ringCounter] = Ring(0); totalRingsPerType[0]++; _safeMint(msg.sender, RING_TEAM_AMOUNT + ringCounter); emit SwolRingMinted(msg.sender, swolIds[i], RING_TEAM_AMOUNT + ringCounter); ringCounter++; ringCounterSmol++; } } /** * @notice Mint ring for accounts on whitelist * @param epoch claim epoch * @param index claim index * @param amount amount of rings to mint * @param rings array of amount of rings per type * @param merkleProof merkleproof of claim */ function mintRingWhitelist( uint256 epoch, uint256 index, uint256 amount, uint256[] calldata rings, bytes32[] calldata merkleProof, bool stake ) external payable virtual nonReentrant { require(address(forging) != address(0), "SMOLRING:FORGING_CONTRACT_NOT_SET"); require(whitelistMintEnabled, "SMOLRING:WHITELIST_MINT_DISABLED"); require(amount > 0, "SMOLRING:MINTING_0_NOT_ALLOWED"); require(amount <= 32, "SMOLRING:MAX_ALLOWANCE_PER_BATCH_REACHED"); require( ringCounterWhitelist + amount - 1 <= whitelistAmount, "SMOLRING:TOTAL_RING_AMOUNT_FOR_WHITELIST_REACHED" ); require( ringCounter + amount - 1 <= (MAX_RINGS - RING_TEAM_AMOUNT - (MAX_WHITELIST_AMOUNT - whitelistAmount)), "SMOLRING:TOTAL_RING_AMOUNT_REACHED" ); for (uint256 i = 0; i < rings.length; i++) { require(rings[i] == 0 || forging.getAllowedForges(i).valid, "SMOLRING:TYPE_NOT_ALLOWED_FOR_FORGING"); } require( ringDistributor.verifyAndClaim(msg.sender, epoch, index, amount, rings, merkleProof), "SMOLRING:INVALID_PROOF" ); if (stake) { require( magic.balanceOf(msg.sender) >= amount * ringStakePriceInMagicWei, "SMOLRING:NOT_ENOUGH_MAGIC_IN_WALLET" ); smoloveActionsVault.stake(msg.sender, amount * ringStakePriceInMagicWei); } else { require(amount * ringBuyPriceInEthWei == msg.value, "SMOLRING:INVALID_PRICE"); } for (uint256 i = 0; i < rings.length; i++) { for (uint256 j = 0; j < rings[i]; j++) { if (totalRingsPerType[i] == forging.getAllowedForges(i).maxForges) { ringProps[RING_TEAM_AMOUNT + ringCounter] = Ring(0); totalRingsPerType[0]++; } else { ringProps[RING_TEAM_AMOUNT + ringCounter] = Ring(i); totalRingsPerType[i]++; } _safeMint(msg.sender, RING_TEAM_AMOUNT + ringCounter); emit WhitelistRingMinted(msg.sender, RING_TEAM_AMOUNT + ringCounter); ringCounter++; ringCounterWhitelist++; } } } /** * @notice Mint ring for team * @param ringType type of rings to mint * @param amount amount of rings to mint * @param recipient account to send the rings to */ function mintRingTeam( uint256 ringType, uint256 amount, address recipient ) external virtual nonReentrant onlyOperator { require(address(forging) != address(0), "SMOLRING:FORGING_CONTRACT_NOT_SET"); require(ringCounterTeam + amount - 1 <= RING_TEAM_AMOUNT, "SMOLRING:TOTAL_TEAM_AMOUNT_REACHED"); require(amount <= 32, "SMOLRING:MAX_ALLOWANCE_PER_BATCH_REACHED"); require(forging.getAllowedForges(ringType).valid, "SMOLRING:TYPE_NOT_ALLOWED_FOR_FORGING"); for (uint256 i = 0; i < amount; i++) { if (totalRingsPerType[ringType] == forging.getAllowedForges(ringType).maxForges) { ringProps[ringCounterTeam] = Ring(0); totalRingsPerType[0]++; } else { ringProps[ringCounterTeam] = Ring(ringType); totalRingsPerType[ringType]++; } _safeMint(recipient, ringCounterTeam); emit TeamRingMinted(msg.sender, ringCounterTeam); ringCounterTeam++; } } function tokenURI(uint256 _tokenId) public view override returns (string memory) { require(_exists(_tokenId), "SMOLRING:URI_QUERY_FOR_NON_EXISTANT_TOKEN"); string memory json = SmolRingUtils.base64encode( bytes( string( abi.encodePacked( '{"name": "#', SmolRingUtils.stringify(_tokenId), '", "description": "Smol Rings", "external_url":"https://www.smolove.xyz/", "image": "', forging.getAllowedForges(ringProps[_tokenId].ringType).imageURI, '", "attributes": [{"trait_type": "Type", "value": "', forging.getAllowedForges(ringProps[_tokenId].ringType).name, '"},{"trait_type": "Reward Factor", "value": "', SmolRingUtils.stringify(forging.getAllowedForges(ringProps[_tokenId].ringType).rewardFactor), '"}]}' ) ) ) ); return string(abi.encodePacked("data:application/json;base64,", json)); } function setBaseRewardFactor(uint256 baseRewardFactor_) external onlyOperator { baseRewardFactor = baseRewardFactor_; } function ringRarity(uint256 ringId) public view returns (uint256) { if (ringProps[ringId].ringType > 0) { return forging.getAllowedForges(ringProps[ringId].ringType).rewardFactor; } return baseRewardFactor; } function getRingProps(uint256 ringId) public view returns (Ring memory) { return ringProps[ringId]; } function getTotalRingsPerType(uint256 ringType) public view returns (uint256) { return totalRingsPerType[ringType]; } function setRegularMintEnabled(bool status) public onlyOperator { if (status) { regularMintEnabled = status; smolMintEnabled = !status; whitelistMintEnabled = !status; } else { regularMintEnabled = status; } } function setWhitelistMintEnabled(bool status) public onlyOperator { if (status) { whitelistMintEnabled = status; smolMintEnabled = !status; regularMintEnabled = !status; } else { whitelistMintEnabled = status; } } function setSmolMintEnabled(bool status) public onlyOperator { if (status) { smolMintEnabled = status; whitelistMintEnabled = !status; regularMintEnabled = !status; } else { smolMintEnabled = status; } } function setTokensLocked(bool status) public onlyOperator { tokensLocked = status; emit TokensLocked(status); } function setWhitelistAmount(uint128 whitelistAmount_) public onlyAdmin { require(whitelistAmount_ <= MAX_WHITELIST_AMOUNT, "SMOLRING:OVER_MAX_WHITELIST_AMOUNT"); whitelistAmount = whitelistAmount_; } function setForgingContract(address forging_) external onlyAdmin { require(forging_ != address(0), "SMOLRING:ILLEGAL_ADDRESS"); forging = ISmolRingForging(forging_); } function switchToRingType(uint256 ringId, uint256 ringType) public { require( msg.sender == address(this) || msg.sender == address(forging), "SMOLRING:SWITCHING_RING_TYPES_NOT_ALLOWED" ); totalRingsPerType[ringType]++; uint256 currentRingType = ringProps[ringId].ringType; totalRingsPerType[currentRingType]--; ringProps[ringId].ringType = ringType; } function withdrawProceeds() public { uint256 contractBalance = address(this).balance; payable(treasury).transfer(contractBalance); } function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override { require(address(0) == from || !tokensLocked, "SMOLRING:TOKENS_NOT_UNLOCKED"); super._beforeTokenTransfer(from, to, tokenId); } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721Enumerable, IERC165, AccessControl) returns (bool) { return super.supportsInterface(interfaceId); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC1155/IERC1155.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC1155 compliant contract, as defined in the * https://eips.ethereum.org/EIPS/eip-1155[EIP]. * * _Available since v3.1._ */ interface IERC1155 is IERC165 { /** * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`. */ event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value); /** * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all * transfers. */ event TransferBatch( address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] values ); /** * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to * `approved`. */ event ApprovalForAll(address indexed account, address indexed operator, bool approved); /** * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI. * * If an {URI} event was emitted for `id`, the standard * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value * returned by {IERC1155MetadataURI-uri}. */ event URI(string value, uint256 indexed id); /** * @dev Returns the amount of tokens of token type `id` owned by `account`. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) external view returns (uint256); /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids) external view returns (uint256[] memory); /** * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`, * * Emits an {ApprovalForAll} event. * * Requirements: * * - `operator` cannot be the caller. */ function setApprovalForAll(address operator, bool approved) external; /** * @dev Returns true if `operator` is approved to transfer ``account``'s tokens. * * See {setApprovalForAll}. */ function isApprovedForAll(address account, address operator) external view returns (bool); /** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If the caller is not `from`, it must be have been approved to spend ``from``'s tokens via {setApprovalForAll}. * - `from` must have a balance of tokens of type `id` of at least `amount`. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes calldata data ) external; /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - `ids` and `amounts` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function safeBatchTransferFrom( address from, address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data ) 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 (token/ERC721/extensions/ERC721Enumerable.sol) pragma solidity ^0.8.0; import "../ERC721.sol"; import "./IERC721Enumerable.sol"; /** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */ abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex; // Array with all token ids, used for enumeration uint256[] private _allTokens; // Mapping from token id to position in the allTokens array mapping(uint256 => uint256) private _allTokensIndex; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) { return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. */ function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds"); return _ownedTokens[owner][index]; } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _allTokens.length; } /** * @dev See {IERC721Enumerable-tokenByIndex}. */ function tokenByIndex(uint256 index) public view virtual override returns (uint256) { require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds"); return _allTokens[index]; } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` cannot be the zero address. * - `to` cannot be the zero address. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override { super._beforeTokenTransfer(from, to, tokenId); if (from == address(0)) { _addTokenToAllTokensEnumeration(tokenId); } else if (from != to) { _removeTokenFromOwnerEnumeration(from, tokenId); } if (to == address(0)) { _removeTokenFromAllTokensEnumeration(tokenId); } else if (to != from) { _addTokenToOwnerEnumeration(to, tokenId); } } /** * @dev Private function to add a token to this extension's ownership-tracking data structures. * @param to address representing the new owner of the given token ID * @param tokenId uint256 ID of the token to be added to the tokens list of the given address */ function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private { uint256 length = ERC721.balanceOf(to); _ownedTokens[to][length] = tokenId; _ownedTokensIndex[tokenId] = length; } /** * @dev Private function to add a token to this extension's token tracking data structures. * @param tokenId uint256 ID of the token to be added to the tokens list */ function _addTokenToAllTokensEnumeration(uint256 tokenId) private { _allTokensIndex[tokenId] = _allTokens.length; _allTokens.push(tokenId); } /** * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for * gas optimizations e.g. when performing a transfer operation (avoiding double writes). * This has O(1) time complexity, but alters the order of the _ownedTokens array. * @param from address representing the previous owner of the given token ID * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address */ function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private { // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = ERC721.balanceOf(from) - 1; uint256 tokenIndex = _ownedTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary if (tokenIndex != lastTokenIndex) { uint256 lastTokenId = _ownedTokens[from][lastTokenIndex]; _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index } // This also deletes the contents at the last position of the array delete _ownedTokensIndex[tokenId]; delete _ownedTokens[from][lastTokenIndex]; } /** * @dev Private function to remove a token from this extension's token tracking data structures. * This has O(1) time complexity, but alters the order of the _allTokens array. * @param tokenId uint256 ID of the token to be removed from the tokens list */ function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private { // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = _allTokens.length - 1; uint256 tokenIndex = _allTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding // an 'if' statement (like in _removeTokenFromOwnerEnumeration) uint256 lastTokenId = _allTokens[lastTokenIndex]; _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index // This also deletes the contents at the last position of the array delete _allTokensIndex[tokenId]; _allTokens.pop(); } }
// 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.6.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); _; } /** * @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 `_msgSender()` is missing `role`. * Overriding this function changes the behavior of the {onlyRole} modifier. * * Format of the revert message is described in {_checkRole}. * * _Available since v4.6._ */ function _checkRole(bytes32 role) internal view virtual { _checkRole(role, _msgSender()); } /** * @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.11; import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol"; /** * @title ISmolRings interface * @author Archethect * @notice This interface contains all functionalities for Smol Rings. */ interface ISmolRings is IERC721Enumerable { struct Ring { uint256 ringType; } function mintRing(uint256 amount, bool stake) external payable; function mintRingSmolSwol( uint256[] calldata smolIds, uint256[] calldata swolIds, bool stake ) external payable; function mintRingSmol(uint256[] calldata smolIds, bool stake) external payable; function mintRingSwol(uint256[] calldata swolIds, bool stake) external payable; function mintRingWhitelist( uint256 epoch, uint256 index, uint256 amount, uint256[] calldata rings, bytes32[] calldata merkleProof, bool stake ) external payable; function mintRingTeam( uint256 ringType, uint256 amount, address account ) external; function setBaseRewardFactor(uint256 baseRewardFactor_) external; function ringRarity(uint256 ring) external view returns (uint256); function getRingProps(uint256 ringId) external view returns (Ring memory); function getTotalRingsPerType(uint256 ringType) external view returns (uint256); function setRegularMintEnabled(bool status) external; function setWhitelistMintEnabled(bool status) external; function setSmolMintEnabled(bool status) external; function setWhitelistAmount(uint128 whitelistAmount_) external; function switchToRingType(uint256 ringId, uint256 ringType) external; function withdrawProceeds() external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.11; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; /** * @title ISmolRingDistributor interface * @author Archethect * @notice This interface contains all functionalities for distributing Smol Rings following a whitelist. */ interface ISmolRingDistributor { function isClaimed(address account, uint256 epoch) external view returns (bool); function getCurrentEpoch() external view returns (uint256); function verifyAndClaim( address account, uint256 epochToClaim, uint256 index, uint256 amount, uint256[] calldata rings, bytes32[] calldata merkleProof ) external returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.11; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "./ICreatureOwnerResolverRegistry.sol"; /** * @title ISmolRingStaking interface * @author Archethect * @notice This interface contains all functionalities for staking Smol Rings. */ interface ISmolRingStaking { event Staked(ICreatureOwnerResolverRegistry.Creature creature, uint256[] rewards); event Unstaked(ICreatureOwnerResolverRegistry.Creature creature, uint256[] rewards); event Rewarded(ICreatureOwnerResolverRegistry.Creature creature, uint256[] rewards); event RewardTokenAdded(uint256 reward, address tokenDistributor, uint256 rewardsDuration); event RewardAdded(address tokenDistributor, uint256 reward); event RewardsDurationUpdated(address tokenDistributor, uint256 rewardsDuration); struct RewardTokenState { bool valid; uint256 rewardRatePerSecondInBPS; uint256 rewardPerTokenStored; uint256 lastRewardsRateUpdate; uint256 rewardsDuration; uint256 periodFinish; address tokenDistributor; } struct RewardCalculation { uint256 rewardFactor1; uint256 rewardFactor2; uint256 ring1Type; uint256 ring2Type; } function stake( uint256 ring1, ICreatureOwnerResolverRegistry.Creature memory creature1, uint256 ring2, ICreatureOwnerResolverRegistry.Creature memory creature2, address ownerCreature1, address ownerCreature2 ) external; function unstake( uint256 ring1, uint256 ring2, ICreatureOwnerResolverRegistry.Creature memory creature1, ICreatureOwnerResolverRegistry.Creature memory creature2, address ownerCreature1 ) external; function withdrawRing( uint256 ring, ICreatureOwnerResolverRegistry.Creature memory creature, address ownerCreature ) external; function accrueForNewScore(ICreatureOwnerResolverRegistry.Creature memory creature) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.11; import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol"; /** * @title ISmolRingForging interface * @author Archethect * @notice This interface contains all functionalities for forging rings. */ interface ISmolRingForging { event RingUpgraded(address sender, uint256 ringId, uint256 ringType); event StartForgeSlot(address sender, uint256 requestId, uint8 oddMultiplier); struct ForgeType { bool valid; bool slot; address contractAddress; // 0 = ERC1155, 1 = ERC20 uint8 tokenType; uint256 id; uint256 requiredAmount; uint256 rewardFactor; uint256 maxForges; string imageURI; string name; } struct SlotRequest { uint256 id; uint8 oddsMultiplier; } struct SlotOption { uint256 ringType; uint256 odds; } function forgeRing(uint256 ringId, uint256 ringType) external; function startForgeSlot(uint256 ringId, uint8 oddsMultiplier) external; function stopForgeSlot(uint256 ringId) external; function hasAvailableSlotRingsToForge() external view returns (bool); function setAllowedForges(uint256[] calldata ringTypes, ForgeType[] calldata forgeTypes) external; function removeAllowedForgeTypes(uint256[] calldata ringTypes) external; function maxForgesPerRingType(uint256 ringType) external view returns (uint256); function setForgeEnabled(bool status) external; function setSlotEnabled(bool status) external; function setSlotOptions(uint256[] calldata _ringIds, uint32[] calldata _slotOdds) external; function setMagicSlotPrice(uint256 _magicSlotPrice) external; function setSmolTreasureIdForSlot(uint256 _smolTreasureIdForSlot) external; function getAllowedForges(uint256 index) external view returns (ForgeType memory); function setRandomizer(address _randomizer) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.11; /** * @title ICreatureOwnerResolver interface * @author Archethect * @notice This interface contains all functionalities for verifying Creature ownership */ interface ICreatureOwnerResolver { function isOwner(address account, uint256 tokenId) external view returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.11; library SmolRingUtils { bytes internal constant TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; /// [MIT License] /// @title Base64 /// @notice Provides a function for encoding some bytes in base64 /// @author Brecht Devos <[email protected]> /// @notice Encodes some bytes to the base64 representation function base64encode(bytes memory data) external pure returns (string memory) { uint256 len = data.length; if (len == 0) return ""; // multiply by 4/3 rounded up uint256 encodedLen = 4 * ((len + 2) / 3); // Add some extra buffer at the end bytes memory result = new bytes(encodedLen + 32); bytes memory table = TABLE; assembly { let tablePtr := add(table, 1) let resultPtr := add(result, 32) for { let i := 0 } lt(i, len) { } { i := add(i, 3) let input := and(mload(add(data, i)), 0xffffff) let out := mload(add(tablePtr, and(shr(18, input), 0x3F))) out := shl(8, out) out := add(out, and(mload(add(tablePtr, and(shr(12, input), 0x3F))), 0xFF)) out := shl(8, out) out := add(out, and(mload(add(tablePtr, and(shr(6, input), 0x3F))), 0xFF)) out := shl(8, out) out := add(out, and(mload(add(tablePtr, and(input, 0x3F))), 0xFF)) out := shl(224, out) mstore(resultPtr, out) resultPtr := add(resultPtr, 4) } switch mod(len, 3) case 1 { mstore(sub(resultPtr, 2), shl(240, 0x3d3d)) } case 2 { mstore(sub(resultPtr, 1), shl(248, 0x3d)) } mstore(result, encodedLen) } return string(result); } // @notice converts number to string function stringify(uint256 value) external pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT license // 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); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.11; import "./IBattleflyAtlasStakerV02.sol"; import "./IAtlasMine.sol"; import "../../interfaces/ICreatureOwnerResolverRegistry.sol"; interface ISmoloveActionsVault { // ============================================ EVENT ============================================== event Stake(address indexed user, uint256 stakeId, uint256 amount, uint256 inclusion); event Withdraw(address indexed user, uint256 stakeId, uint256 amount); event RequestWithdrawal(uint256 stakeId); event SetAdminAccess(address indexed user, bool access); event ClaimAndRestake(uint256 amount); struct UserStake { uint256 id; uint256 amount; uint256 inclusion; uint256 withdrawAt; address owner; } struct AtlasStake { uint256 id; uint256 amount; uint256 withdrawableAt; uint256 startDay; } function stake(address user, uint256 amount) external; function getStakeAmount(address user) external view returns (uint256); function getTotalClaimableAmount() external view returns (uint256); function getUserStakes(address user) external view returns (UserStake[] memory); function withdrawAll() external; function withdraw(uint256[] memory stakeIds) external; function requestWithdrawal(uint256[] memory stakeIds) external; function claimAllAndRestake() external; function canRequestWithdrawal(uint256 stakeId) external view returns (bool requestable); function canWithdraw(uint256 stakeId) external view returns (bool withdrawable); function initialUnlock(uint256 stakeId) external view returns (uint256 epoch); function retentionUnlock(uint256 stakeId) external view returns (uint256 epoch); function getCurrentEpoch() external view returns (uint256 epoch); function getNumberOfActiveStakes() external view returns (uint256 amount); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.11; interface IAtlasMine { enum Lock { twoWeeks, oneMonth, threeMonths, sixMonths, twelveMonths } struct UserInfo { uint256 originalDepositAmount; uint256 depositAmount; uint256 lpAmount; uint256 lockedUntil; uint256 vestingLastUpdate; int256 rewardDebt; Lock lock; } function treasure() external view returns (address); function legion() external view returns (address); function unlockAll() external view returns (bool); function boosts(address user) external view returns (uint256); function userInfo(address user, uint256 depositId) external view returns ( uint256 originalDepositAmount, uint256 depositAmount, uint256 lpAmount, uint256 lockedUntil, uint256 vestingLastUpdate, int256 rewardDebt, Lock lock ); function getLockBoost(Lock _lock) external pure returns (uint256 boost, uint256 timelock); function getVestingTime(Lock _lock) external pure returns (uint256 vestingTime); function stakeTreasure(uint256 _tokenId, uint256 _amount) external; function unstakeTreasure(uint256 _tokenId, uint256 _amount) external; function stakeLegion(uint256 _tokenId) external; function unstakeLegion(uint256 _tokenId) external; function withdrawPosition(uint256 _depositId, uint256 _amount) external returns (bool); function withdrawAll() external; function pendingRewardsAll(address _user) external view returns (uint256 pending); function deposit(uint256 _amount, Lock _lock) external; function harvestAll() external; function harvestPosition(uint256 _depositId) external; function currentId(address _user) external view returns (uint256); function pendingRewardsPosition(address _user, uint256 _depositId) external view returns (uint256); function getAllUserDepositIds(address) external view returns (uint256[] memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/ERC721.sol) pragma solidity ^0.8.0; import "./IERC721.sol"; import "./IERC721Receiver.sol"; import "./extensions/IERC721Metadata.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/Strings.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: balance query for the zero address"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: owner query for nonexistent token"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overridden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { require(_exists(tokenId), "ERC721: approved query for nonexistent token"); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _safeTransfer(from, to, tokenId, _data); } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { require(_exists(tokenId), "ERC721: operator query for nonexistent token"); address owner = ERC721.ownerOf(tokenId); return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory _data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); _afterTokenTransfer(address(0), to, tokenId); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); _afterTokenTransfer(owner, address(0), tokenId); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _balances[from] -= 1; _balances[to] += 1; _owners[tokenId] = to; emit Transfer(from, to, tokenId); _afterTokenTransfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits a {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC721: approve to caller"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721Receiver.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Enumerable is IERC721 { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. */ function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256); /** * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. * Use along with {totalSupply} to enumerate all tokens. */ function tokenByIndex(uint256 index) external view returns (uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // 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 (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 (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 (last updated v4.6.0) (utils/cryptography/MerkleProof.sol) pragma solidity ^0.8.0; /** * @dev These functions deal with verification of Merkle Trees proofs. * * The proofs can be generated using the JavaScript library * https://github.com/miguelmota/merkletreejs[merkletreejs]. * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled. * * See `test/utils/cryptography/MerkleProof.test.js` for some examples. * * WARNING: You should avoid using leaf values that are 64 bytes long prior to * hashing, or use a hash function other than keccak256 for hashing leaves. * This is because the concatenation of a sorted pair of internal nodes in * the merkle tree could be reinterpreted as a leaf value. */ library MerkleProof { /** * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree * defined by `root`. For this, a `proof` must be provided, containing * sibling hashes on the branch from the leaf to the root of the tree. Each * pair of leaves and each pair of pre-images are assumed to be sorted. */ function verify( bytes32[] memory proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProof(proof, leaf) == root; } /** * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt * hash matches the root of the tree. When processing the proof, the pairs * of leafs & pre-images are assumed to be sorted. * * _Available since v4.4._ */ function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { bytes32 proofElement = proof[i]; if (computedHash <= proofElement) { // Hash(current computed hash + current element of the proof) computedHash = _efficientHash(computedHash, proofElement); } else { // Hash(current element of the proof + current computed hash) computedHash = _efficientHash(proofElement, computedHash); } } return computedHash; } function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) { assembly { mstore(0x00, a) mstore(0x20, b) value := keccak256(0x00, 0x40) } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.11; /** * @title ICreatureOwnerResolverRegistry interface * @author Archethect * @notice This interface contains all functionalities for managing Creature owner resolvers */ interface ICreatureOwnerResolverRegistry { struct Creature { address ownerResolver; uint256 tokenId; } function isAllowed(address creatureOwnerResolver) external view returns (bool); function addCreatureOwnerResolver(address creatureOwnerResolver) external; function removeCreatureOwnerResolver(address creatureOwnerResolver) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.11; import "@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol"; import "./IAtlasMine.sol"; interface IBattleflyAtlasStakerV02 { struct Vault { uint16 fee; uint16 claimRate; bool enabled; } struct VaultStake { uint64 lockAt; uint64 unlockAt; uint64 retentionUnlock; uint256 amount; uint256 paidEmission; address vault; IAtlasMine.Lock lock; } function MAGIC() external returns (IERC20Upgradeable); function deposit(uint256, IAtlasMine.Lock) external returns (uint256); function withdraw(uint256) external returns (uint256); function claim(uint256) external returns (uint256); function requestWithdrawal(uint256) external returns (uint64); function currentDepositId() external view returns (uint256); function getAllowedLocks() external view returns (IAtlasMine.Lock[] memory); function getVaultStake(uint256) external view returns (VaultStake memory); function getClaimableEmission(uint256) external view returns (uint256, uint256); function canWithdraw(uint256 _depositId) external view returns (bool withdrawable); function canRequestWithdrawal(uint256 _depositId) external view returns (bool requestable); function currentEpoch() external view returns (uint64 epoch); function getLockPeriod(IAtlasMine.Lock) external view returns (uint64 epoch); function setPause(bool _paused) external; function depositIdsOfVault(address vault) external view returns (uint256[] memory depositIds); function activeAtlasPositionSize() external view returns (uint256); // ========== Events ========== event AddedSuperAdmin(address who); event RemovedSuperAdmin(address who); event AddedVault(address indexed vault, uint16 fee, uint16 claimRate); event RemovedVault(address indexed vault); event StakedTreasure(address staker, uint256 tokenId, uint256 amount); event UnstakedTreasure(address staker, uint256 tokenId, uint256 amount); event StakedLegion(address staker, uint256 tokenId); event UnstakedLegion(address staker, uint256 tokenId); event SetTreasury(address treasury); event SetBattleflyBot(address bot); event NewDeposit(address indexed vault, uint256 amount, uint256 unlockedAt, uint256 indexed depositId); event WithdrawPosition(address indexed vault, uint256 amount, uint256 indexed depositId); event ClaimEmission(address indexed vault, uint256 amount, uint256 indexed depositId); event RequestWithdrawal(address indexed vault, uint64 withdrawalEpoch, uint256 indexed depositId); event DepositedAllToMine(uint256 amount); event SetPause(bool paused); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20Upgradeable { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); }
{ "metadata": { "bytecodeHash": "none", "useLiteralContent": true }, "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": { "contracts/libraries/SmolRingUtils.sol": { "SmolRingUtils": "0xd5e91bf0b9e3aeeca67bbf66860871bb9c9103c4" } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"smolBrainsOwnerResolver_","type":"address"},{"internalType":"address","name":"smolBodiesOwnerResolver_","type":"address"},{"internalType":"address","name":"magic_","type":"address"},{"internalType":"address","name":"ringDistributor_","type":"address"},{"internalType":"address","name":"smoloveActionsVault_","type":"address"},{"internalType":"address","name":"treasury_","type":"address"},{"internalType":"address","name":"operator_","type":"address"},{"internalType":"address","name":"admin_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"ringId","type":"uint256"}],"name":"RingMinted","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":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"smolId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"ringId","type":"uint256"}],"name":"SmolRingMinted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"swolId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"ringId","type":"uint256"}],"name":"SwolRingMinted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"ringId","type":"uint256"}],"name":"TeamRingMinted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"status","type":"bool"}],"name":"TokensLocked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"ringId","type":"uint256"}],"name":"WhitelistRingMinted","type":"event"},{"inputs":[],"name":"ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_RINGS","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_WHITELIST_AMOUNT","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OPERATOR_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"RING_SMOL_AMOUNT","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"RING_TEAM_AMOUNT","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseRewardFactor","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"forging","outputs":[{"internalType":"contract ISmolRingForging","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"ringId","type":"uint256"}],"name":"getRingProps","outputs":[{"components":[{"internalType":"uint256","name":"ringType","type":"uint256"}],"internalType":"struct ISmolRings.Ring","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"ringType","type":"uint256"}],"name":"getTotalRingsPerType","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"magic","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bool","name":"stake","type":"bool"}],"name":"mintRing","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"smolIds","type":"uint256[]"},{"internalType":"bool","name":"stake","type":"bool"}],"name":"mintRingSmol","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"smolIds","type":"uint256[]"},{"internalType":"uint256[]","name":"swolIds","type":"uint256[]"},{"internalType":"bool","name":"stake","type":"bool"}],"name":"mintRingSmolSwol","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"swolIds","type":"uint256[]"},{"internalType":"bool","name":"stake","type":"bool"}],"name":"mintRingSwol","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"ringType","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"}],"name":"mintRingTeam","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"epoch","type":"uint256"},{"internalType":"uint256","name":"index","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256[]","name":"rings","type":"uint256[]"},{"internalType":"bytes32[]","name":"merkleProof","type":"bytes32[]"},{"internalType":"bool","name":"stake","type":"bool"}],"name":"mintRingWhitelist","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"regularMintEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","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":[],"name":"ringBuyPriceInEthWei","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ringCounter","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ringCounterSmol","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ringCounterTeam","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ringCounterWhitelist","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ringDistributor","outputs":[{"internalType":"contract ISmolRingDistributor","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"ringProps","outputs":[{"internalType":"uint256","name":"ringType","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"ringId","type":"uint256"}],"name":"ringRarity","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ringStakePriceInMagicWei","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"baseRewardFactor_","type":"uint256"}],"name":"setBaseRewardFactor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"forging_","type":"address"}],"name":"setForgingContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"status","type":"bool"}],"name":"setRegularMintEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"status","type":"bool"}],"name":"setSmolMintEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"status","type":"bool"}],"name":"setTokensLocked","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint128","name":"whitelistAmount_","type":"uint128"}],"name":"setWhitelistAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"status","type":"bool"}],"name":"setWhitelistMintEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"smolBodiesOwnerResolver","outputs":[{"internalType":"contract ICreatureOwnerResolver","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"smolBrainsOwnerResolver","outputs":[{"internalType":"contract ICreatureOwnerResolver","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"smolMintEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"smolUsed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"smoloveActionsVault","outputs":[{"internalType":"contract ISmoloveActionsVault","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"staking","outputs":[{"internalType":"contract ISmolRingStaking","name":"","type":"address"}],"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":"uint256","name":"ringId","type":"uint256"},{"internalType":"uint256","name":"ringType","type":"uint256"}],"name":"switchToRingType","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"swolUsed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokensLocked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"totalRingsPerType","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasury","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"whitelistAmount","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"whitelistMintEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdrawProceeds","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040523480156200001157600080fd5b5060405162005de838038062005de8833981016040819052620000349162000604565b6040805180820182526009815268536d6f6c2052696e6760b81b602080830191825283518085019094526008845267536d6f6c52696e6760c01b908401528151919291620000859160009162000541565b5080516200009b90600190602084019062000541565b50506001600a55506001600160a01b038816620000ee5760405162461bcd60e51b8152602060048201526018602482015260008051602062005dc883398151915260448201526064015b60405180910390fd5b6001600160a01b038716620001355760405162461bcd60e51b8152602060048201526018602482015260008051602062005dc88339815191526044820152606401620000e5565b6001600160a01b0386166200017c5760405162461bcd60e51b8152602060048201526018602482015260008051602062005dc88339815191526044820152606401620000e5565b6001600160a01b038516620001c35760405162461bcd60e51b8152602060048201526018602482015260008051602062005dc88339815191526044820152606401620000e5565b6001600160a01b0384166200020a5760405162461bcd60e51b8152602060048201526018602482015260008051602062005dc88339815191526044820152606401620000e5565b6001600160a01b038316620002515760405162461bcd60e51b8152602060048201526018602482015260008051602062005dc88339815191526044820152606401620000e5565b6001600160a01b038216620002985760405162461bcd60e51b8152602060048201526018602482015260008051602062005dc88339815191526044820152606401620000e5565b6001600160a01b038116620002df5760405162461bcd60e51b8152602060048201526018602482015260008051602062005dc88339815191526044820152606401620000e5565b601380546001600160a01b03199081166001600160a01b038b8116919091179092556014805482168a8416179055601580548216898416179055601780548216888416179055601a805482168784161790556016805490911691851691909117905560fa601155600c80546001600d819055600f8190556010819055600e55600163ff00000160801b0319167301000000000000000000000000000000000003841790556200039e60008051602062005da88339815191528262000442565b620003b960008051602062005da88339815191523362000442565b620003d460008051602062005d888339815191528262000442565b620003ef60008051602062005d888339815191528362000442565b6200041960008051602062005d8883398151915260008051602062005da883398151915262000452565b6200043460008051602062005da88339815191528062000452565b5050505050505050620006e9565b6200044e82826200049d565b5050565b6000828152600b6020526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b6000828152600b602090815260408083206001600160a01b038516845290915290205460ff166200044e576000828152600b602090815260408083206001600160a01b03851684529091529020805460ff19166001179055620004fd3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b8280546200054f90620006ac565b90600052602060002090601f016020900481019282620005735760008555620005be565b82601f106200058e57805160ff1916838001178555620005be565b82800160010185558215620005be579182015b82811115620005be578251825591602001919060010190620005a1565b50620005cc929150620005d0565b5090565b5b80821115620005cc5760008155600101620005d1565b80516001600160a01b0381168114620005ff57600080fd5b919050565b600080600080600080600080610100898b0312156200062257600080fd5b6200062d89620005e7565b97506200063d60208a01620005e7565b96506200064d60408a01620005e7565b95506200065d60608a01620005e7565b94506200066d60808a01620005e7565b93506200067d60a08a01620005e7565b92506200068d60c08a01620005e7565b91506200069d60e08a01620005e7565b90509295985092959890939650565b600181811c90821680620006c157607f821691505b60208210811415620006e357634e487b7160e01b600052602260045260246000fd5b50919050565b61568f80620006f96000396000f3fe6080604052600436106104105760003560e01c80636ea9f1361161021e578063adbde6c711610123578063d45ed334116100ab578063e17ce8dd1161007a578063e17ce8dd14610c84578063e888a61414610c9a578063e985e9c514610cb0578063f5b541a614610cf9578063fb26a0c914610d1b57600080fd5b8063d45ed33414610c04578063d547741f14610c24578063dce38e7314610c44578063e117b41714610c6457600080fd5b8063c4dc8366116100f2578063c4dc836614610b61578063c52ee90f14610b8e578063c87b56dd14610ba1578063cd04c55314610bc1578063cd2caaa614610bd757600080fd5b8063adbde6c714610ae1578063b767a09814610b01578063b88d4fde14610b21578063c0d86f7014610b4157600080fd5b80639038e693116101a6578063a1feba4211610175578063a1feba4214610a4b578063a217fddf14610a6c578063a22cb46514610a81578063a8694c5714610aa1578063a9661f4d14610ac157600080fd5b80639038e693146109ae57806391d14854146109c357806395d89b41146109e35780639d040d70146109f857600080fd5b80637eb1afb4116101ed5780637eb1afb41461092e578063834906661461094e5780638b6474ad146109645780638f3948a61461097a5780638f754db81461098d57600080fd5b80636ea9f136146108a757806370a08231146108c457806375b238fc146108e457806376955dd81461091857600080fd5b806342842e0e116103245780635e96160e116102ac578063624babdf1161027b578063624babdf146108115780636352211e146108245780636a9fc4e6146108445780636c0360eb146108715780636caede3d1461088657600080fd5b80635e96160e1461078f578063605a9d1a146107b057806361d027b3146107c3578063620775b9146107e357600080fd5b8063469f7464116102f3578063469f7464146106f95780634c8e72f11461070f5780634cf088d91461072f5780634f6ccce71461074f578063551e5d601461076f57600080fd5b806342842e0e1461067e5780634328a55c1461069e57806344c14e96146106be57806344c4b27c146106de57600080fd5b806323b872dd116103a75780632f4c2381116103765780632f4c2381146105d85780632f745c591461060857806336568abe1461062857806339e56a1d1461064857806340a915a51461065e57600080fd5b806323b872dd14610555578063248a9ca314610575578063260d877e146105a55780632f2ff15d146105b857600080fd5b8063095ea7b3116103e3578063095ea7b3146104c65780630d854646146104e657806318160ddd14610506578063200106cb1461052557600080fd5b806301ffc9a714610415578063062761261461044a57806306fdde031461046c578063081812fc1461048e575b600080fd5b34801561042157600080fd5b50610435610430366004614774565b610d3b565b60405190151581526020015b60405180910390f35b34801561045657600080fd5b5061046a6104653660046147a6565b610d4c565b005b34801561047857600080fd5b506104816110a3565b6040516104419190614837565b34801561049a57600080fd5b506104ae6104a936600461484a565b611135565b6040516001600160a01b039091168152602001610441565b3480156104d257600080fd5b5061046a6104e1366004614863565b6111ca565b3480156104f257600080fd5b506015546104ae906001600160a01b031681565b34801561051257600080fd5b506008545b604051908152602001610441565b34801561053157600080fd5b5061043561054036600461484a565b601c6020526000908152604090205460ff1681565b34801561056157600080fd5b5061046a61057036600461488f565b6112e0565b34801561058157600080fd5b5061051761059036600461484a565b6000908152600b602052604090206001015490565b61046a6105b336600461492a565b611311565b3480156105c457600080fd5b5061046a6105d33660046149ae565b611490565b3480156105e457600080fd5b506104356105f336600461484a565b601b6020526000908152604090205460ff1681565b34801561061457600080fd5b50610517610623366004614863565b6114b5565b34801561063457600080fd5b5061046a6106433660046149ae565b61154b565b34801561065457600080fd5b50610517600e5481565b34801561066a57600080fd5b5061046a6106793660046149de565b6115c9565b34801561068a57600080fd5b5061046a61069936600461488f565b611655565b3480156106aa57600080fd5b506013546104ae906001600160a01b031681565b3480156106ca57600080fd5b5061046a6106d93660046149fb565b611670565b3480156106ea57600080fd5b50610517669536c70891000081565b34801561070557600080fd5b5061051760105481565b34801561071b57600080fd5b5061046a61072a3660046149de565b61172e565b34801561073b57600080fd5b506018546104ae906001600160a01b031681565b34801561075b57600080fd5b5061051761076a36600461484a565b6117c5565b34801561077b57600080fd5b5061051761078a36600461484a565b611858565b34801561079b57600080fd5b50600c5461043590600160801b900460ff1681565b61046a6107be366004614a18565b611905565b3480156107cf57600080fd5b506016546104ae906001600160a01b031681565b3480156107ef57600080fd5b506107f961019081565b6040516001600160801b039091168152602001610441565b61046a61081f366004614ab8565b612027565b34801561083057600080fd5b506104ae61083f36600461484a565b612404565b34801561085057600080fd5b5061051761085f36600461484a565b601e6020526000908152604090205481565b34801561087d57600080fd5b5061048161247b565b34801561089257600080fd5b50600c5461043590600160881b900460ff1681565b3480156108b357600080fd5b50610517680929589c998104000081565b3480156108d057600080fd5b506105176108df3660046149fb565b612509565b3480156108f057600080fd5b506105177fdf8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec4281565b34801561092457600080fd5b50610517600f5481565b34801561093a57600080fd5b506019546104ae906001600160a01b031681565b34801561095a57600080fd5b506107f9611d4c81565b34801561097057600080fd5b506107f9610e7481565b61046a610988366004614add565b612590565b34801561099957600080fd5b50600c5461043590600160901b900460ff1681565b3480156109ba57600080fd5b5061046a6126d6565b3480156109cf57600080fd5b506104356109de3660046149ae565b612710565b3480156109ef57600080fd5b5061048161273b565b348015610a0457600080fd5b50610a3c610a1336600461484a565b6040805160208082018352600091829052928152601e8352819020815192830190915254815290565b60405190518152602001610441565b348015610a5757600080fd5b50600c5461043590600160981b900460ff1681565b348015610a7857600080fd5b50610517600081565b348015610a8d57600080fd5b5061046a610a9c366004614b29565b61274a565b348015610aad57600080fd5b5061046a610abc366004614b57565b612755565b348015610acd57600080fd5b506014546104ae906001600160a01b031681565b348015610aed57600080fd5b506017546104ae906001600160a01b031681565b348015610b0d57600080fd5b5061046a610b1c3660046149de565b61282c565b348015610b2d57600080fd5b5061046a610b3c366004614c19565b6128c3565b348015610b4d57600080fd5b5061046a610b5c36600461484a565b6128fb565b348015610b6d57600080fd5b50610517610b7c36600461484a565b6000908152601d602052604090205490565b61046a610b9c366004614add565b612934565b348015610bad57600080fd5b50610481610bbc36600461484a565b612a7a565b348015610bcd57600080fd5b5061051760115481565b348015610be357600080fd5b50610517610bf236600461484a565b601d6020526000908152604090205481565b348015610c1057600080fd5b5061046a610c1f3660046149de565b612e5c565b348015610c3057600080fd5b5061046a610c3f3660046149ae565b612ef3565b348015610c5057600080fd5b5061046a610c5f366004614cc8565b612f18565b348015610c7057600080fd5b50601a546104ae906001600160a01b031681565b348015610c9057600080fd5b50610517600d5481565b348015610ca657600080fd5b506107f9610d4881565b348015610cbc57600080fd5b50610435610ccb366004614cea565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b348015610d0557600080fd5b5061051760008051602061564383398151915281565b348015610d2757600080fd5b50600c546107f9906001600160801b031681565b6000610d4682612fee565b92915050565b6002600a541415610d785760405162461bcd60e51b8152600401610d6f90614d18565b60405180910390fd5b6002600a55610d9560008051602061564383398151915233612710565b610db15760405162461bcd60e51b8152600401610d6f90614d4f565b6019546001600160a01b0316610dd95760405162461bcd60e51b8152600401610d6f90614d7f565b6101906001600160801b0316600183600f54610df59190614dd6565b610dff9190614dee565b1115610e585760405162461bcd60e51b815260206004820152602260248201527f534d4f4c52494e473a544f54414c5f5445414d5f414d4f554e545f5245414348604482015261115160f21b6064820152608401610d6f565b6020821115610e795760405162461bcd60e51b8152600401610d6f90614e05565b601954604051635122f9fb60e11b8152600481018590526001600160a01b039091169063a245f3f690602401600060405180830381865afa158015610ec2573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610eea9190810190614ebe565b51610f075760405162461bcd60e51b8152600401610d6f90614fc2565b60005b8281101561109857601954604051635122f9fb60e11b8152600481018690526001600160a01b039091169063a245f3f690602401600060405180830381865afa158015610f5b573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610f839190810190614ebe565b60e001516000858152601d60205260409020541415610fe95760408051602080820183526000808352600f548152601e82529283209151909155818052601d9052600080516020615663833981519152805491610fdf83615007565b9190505550611027565b6040805160208082018352868252600f546000908152601e82528381209251909255868252601d905290812080549161102183615007565b91905055505b61103382600f54613013565b600f546040805133815260208101929092527fa86d5841c1ebca4c4b6e4c81c9ee4f6565f619cc2e2e8b306e2a16850930cb94910160405180910390a1600f805490600061108083615007565b9190505550808061109090615007565b915050610f0a565b50506001600a555050565b6060600080546110b290615022565b80601f01602080910402602001604051908101604052809291908181526020018280546110de90615022565b801561112b5780601f106111005761010080835404028352916020019161112b565b820191906000526020600020905b81548152906001019060200180831161110e57829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b03166111ae5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610d6f565b506000908152600460205260409020546001600160a01b031690565b60006111d582612404565b9050806001600160a01b0316836001600160a01b031614156112435760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610d6f565b336001600160a01b038216148061125f575061125f8133610ccb565b6112d15760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610d6f565b6112db838361302d565b505050565b6112ea338261309b565b6113065760405162461bcd60e51b8152600401610d6f9061505d565b6112db838383613192565b6002600a5414156113345760405162461bcd60e51b8152600401610d6f90614d18565b6002600a553332146113585760405162461bcd60e51b8152600401610d6f906150ae565b60006113648386614dd6565b116113815760405162461bcd60e51b8152600401610d6f906150e5565b801561143457680929589c998104000061139b8386614dd6565b6113a5919061511c565b6015546040516370a0823160e01b81523360048201526001600160a01b03909116906370a0823190602401602060405180830381865afa1580156113ed573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611411919061513b565b101561142f5760405162461bcd60e51b8152600401610d6f90615154565b61146e565b34669536c7089100006114478487614dd6565b611451919061511c565b1461146e5760405162461bcd60e51b8152600401610d6f90615154565b611479858583613339565b611484838383613872565b50506001600a55505050565b6000828152600b60205260409020600101546114ab81613dab565b6112db8383613db5565b60006114c083612509565b82106115225760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610d6f565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b6001600160a01b03811633146115bb5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610d6f565b6115c58282613e3b565b5050565b6115e160008051602061564383398151915233612710565b6115fd5760405162461bcd60e51b8152600401610d6f90614d4f565b600c8054821515600160981b0260ff60981b199091161790556040517f25b5f6724d204ba480303736d7a3e904ee7607e7cdcdc438a6ed774813a43d1e9061164a90831515815260200190565b60405180910390a150565b6112db838383604051806020016040528060008152506128c3565b61169a7fdf8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec4233612710565b6116b65760405162461bcd60e51b8152600401610d6f90614d4f565b6001600160a01b03811661170c5760405162461bcd60e51b815260206004820152601860248201527f534d4f4c52494e473a494c4c4547414c5f4144445245535300000000000000006044820152606401610d6f565b601980546001600160a01b0319166001600160a01b0392909216919091179055565b61174660008051602061564383398151915233612710565b6117625760405162461bcd60e51b8152600401610d6f90614d4f565b80156117aa57600c805462ff00ff60801b1916600160801b921580159390930260ff60901b191617600160901b83021760ff60881b1916600160881b92909202919091179055565b600c805460ff60801b1916600160801b831515021790555b50565b60006117d060085490565b82106118335760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610d6f565b6008828154811061184657611846615197565b90600052602060002001549050919050565b6000818152601e6020526040812054156118fd576019546000838152601e602052604090819020549051635122f9fb60e11b81526001600160a01b039092169163a245f3f6916118ae9160040190815260200190565b600060405180830381865afa1580156118cb573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526118f39190810190614ebe565b60c0015192915050565b505060115490565b6002600a5414156119285760405162461bcd60e51b8152600401610d6f90614d18565b6002600a556019546001600160a01b03166119555760405162461bcd60e51b8152600401610d6f90614d7f565b600c54600160881b900460ff166119ae5760405162461bcd60e51b815260206004820181905260248201527f534d4f4c52494e473a57484954454c4953545f4d494e545f44495341424c45446044820152606401610d6f565b600086116119ce5760405162461bcd60e51b8152600401610d6f906150e5565b60208611156119ef5760405162461bcd60e51b8152600401610d6f90614e05565b600c54600e546001600160801b0390911690600190611a0f908990614dd6565b611a199190614dee565b1115611a805760405162461bcd60e51b815260206004820152603060248201527f534d4f4c52494e473a544f54414c5f52494e475f414d4f554e545f464f525f5760448201526f12125511531254d517d4915050d2115160821b6064820152608401610d6f565b600c54611a98906001600160801b0316610d486151ad565b611aa6610190611d4c6151ad565b611ab091906151ad565b6001600160801b0316600187600d54611ac99190614dd6565b611ad39190614dee565b1115611af15760405162461bcd60e51b8152600401610d6f906151d5565b60005b84811015611bbf57858582818110611b0e57611b0e615197565b9050602002013560001480611b915750601954604051635122f9fb60e11b8152600481018390526001600160a01b039091169063a245f3f690602401600060405180830381865afa158015611b67573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611b8f9190810190614ebe565b515b611bad5760405162461bcd60e51b8152600401610d6f90614fc2565b80611bb781615007565b915050611af4565b50601754604051631605250960e21b81526001600160a01b0390911690635814942490611bfe9033908c908c908c908c908c908c908c9060040161524d565b6020604051808303816000875af1158015611c1d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c4191906152a3565b611c865760405162461bcd60e51b815260206004820152601660248201527529a6a7a62924a7239d24a72b20a624a22fa82927a7a360511b6044820152606401610d6f565b8015611db157611c9f680929589c99810400008761511c565b6015546040516370a0823160e01b81523360048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015611ce7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d0b919061513b565b1015611d295760405162461bcd60e51b8152600401610d6f90615154565b601a546001600160a01b031663adc9772e33611d4e680929589c99810400008a61511c565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b158015611d9457600080fd5b505af1158015611da8573d6000803e3d6000fd5b50505050611de0565b34611dc3669536c7089100008861511c565b14611de05760405162461bcd60e51b8152600401610d6f906152c0565b60005b848110156120175760005b868683818110611e0057611e00615197565b9050602002013581101561200457601954604051635122f9fb60e11b8152600481018490526001600160a01b039091169063a245f3f690602401600060405180830381865afa158015611e57573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611e7f9190810190614ebe565b60e001516000838152601d60205260409020541415611eff5760408051602081019091526000808252600d54601e9190611ebb90610190614dd6565b815260208082019290925260400160009081209251909255818052601d9052600080516020615663833981519152805491611ef583615007565b9190505550611f58565b6040805160208101909152828152600d54601e90600090611f2290610190614dd6565b8152602080820192909252604090810160009081209351909355848352601d9091528120805491611f5283615007565b91905055505b600d54611f72903390611f6d90610190614dd6565b613013565b600d547fd3d1fa65dc207eaec7a1692d2644311d6f470e9b7769d8ea39b7541a64d3f37a903390611fa590610190614dd6565b604080516001600160a01b03909316835260208301919091520160405180910390a1600d8054906000611fd783615007565b9091555050600e8054906000611fec83615007565b91905055508080611ffc90615007565b915050611dee565b508061200f81615007565b915050611de3565b50506001600a5550505050505050565b6002600a54141561204a5760405162461bcd60e51b8152600401610d6f90614d18565b6002600a5533321461206e5760405162461bcd60e51b8152600401610d6f906150ae565b6019546001600160a01b03166120965760405162461bcd60e51b8152600401610d6f90614d7f565b600c54600160801b900460ff166120ef5760405162461bcd60e51b815260206004820152601e60248201527f534d4f4c52494e473a524547554c41525f4d494e545f44495341424c454400006044820152606401610d6f565b6000821161210f5760405162461bcd60e51b8152600401610d6f906150e5565b60058211156121305760405162461bcd60e51b8152600401610d6f90614e05565b600c54612148906001600160801b0316610d486151ad565b612156610190611d4c6151ad565b61216091906151ad565b6001600160801b0316600183600d546121799190614dd6565b6121839190614dee565b11156121a15760405162461bcd60e51b8152600401610d6f906151d5565b80156122cc576121ba680929589c99810400008361511c565b6015546040516370a0823160e01b81523360048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015612202573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612226919061513b565b10156122445760405162461bcd60e51b8152600401610d6f90615154565b601a546001600160a01b031663adc9772e33612269680929589c99810400008661511c565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b1580156122af57600080fd5b505af11580156122c3573d6000803e3d6000fd5b505050506122fb565b346122de669536c7089100008461511c565b146122fb5760405162461bcd60e51b8152600401610d6f906152c0565b60005b828110156123fa5760408051602081019091526000808252600d54601e919061232990610190614dd6565b815260208082019290925260400160009081209251909255818052601d905260008051602061566383398151915280549161236383615007565b9091555050600d5461237d903390611f6d90610190614dd6565b600d547f95c7bd6013707ab5de040468614214f93702bca6387f57bcbf03df708bb2ae769033906123b090610190614dd6565b604080516001600160a01b03909316835260208301919091520160405180910390a1600d80549060006123e283615007565b919050555080806123f290615007565b9150506122fe565b50506001600a5550565b6000818152600260205260408120546001600160a01b031680610d465760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610d6f565b6012805461248890615022565b80601f01602080910402602001604051908101604052809291908181526020018280546124b490615022565b80156125015780601f106124d657610100808354040283529160200191612501565b820191906000526020600020905b8154815290600101906020018083116124e457829003601f168201915b505050505081565b60006001600160a01b0382166125745760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610d6f565b506001600160a01b031660009081526003602052604090205490565b6002600a5414156125b35760405162461bcd60e51b8152600401610d6f90614d18565b6002600a553332146125d75760405162461bcd60e51b8152600401610d6f906150ae565b816125f45760405162461bcd60e51b8152600401610d6f906150e5565b801561269c5761260d680929589c99810400008361511c565b6015546040516370a0823160e01b81523360048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015612655573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612679919061513b565b10156126975760405162461bcd60e51b8152600401610d6f90615154565b6126cb565b346126ae669536c7089100008461511c565b146126cb5760405162461bcd60e51b8152600401610d6f906152c0565b6123fa838383613339565b60165460405147916001600160a01b03169082156108fc029083906000818181858888f193505050501580156115c5573d6000803e3d6000fd5b6000918252600b602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6060600180546110b290615022565b6115c5338383613ea2565b61277f7fdf8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec4233612710565b61279b5760405162461bcd60e51b8152600401610d6f90614d4f565b610d486001600160801b03821611156128015760405162461bcd60e51b815260206004820152602260248201527f534d4f4c52494e473a4f5645525f4d41585f57484954454c4953545f414d4f55604482015261139560f21b6064820152608401610d6f565b600c80546fffffffffffffffffffffffffffffffff19166001600160801b0392909216919091179055565b61284460008051602061564383398151915233612710565b6128605760405162461bcd60e51b8152600401610d6f90614d4f565b80156128a757600c805461ffff60881b1916600160881b921580159390930260ff60901b191617600160901b83021760ff60801b1916600160801b92909202919091179055565b600c8054821515600160881b0260ff60881b1990911617905550565b6128cd338361309b565b6128e95760405162461bcd60e51b8152600401610d6f9061505d565b6128f584848484613f71565b50505050565b61291360008051602061564383398151915233612710565b61292f5760405162461bcd60e51b8152600401610d6f90614d4f565b601155565b6002600a5414156129575760405162461bcd60e51b8152600401610d6f90614d18565b6002600a5533321461297b5760405162461bcd60e51b8152600401610d6f906150ae565b816129985760405162461bcd60e51b8152600401610d6f906150e5565b8015612a40576129b1680929589c99810400008361511c565b6015546040516370a0823160e01b81523360048201526001600160a01b03909116906370a0823190602401602060405180830381865afa1580156129f9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a1d919061513b565b1015612a3b5760405162461bcd60e51b8152600401610d6f90615154565b612a6f565b34612a52669536c7089100008461511c565b14612a6f5760405162461bcd60e51b8152600401610d6f906152c0565b6123fa838383613872565b6000818152600260205260409020546060906001600160a01b0316612af35760405162461bcd60e51b815260206004820152602960248201527f534d4f4c52494e473a5552495f51554552595f464f525f4e4f4e5f455849535460448201526820a72a2faa27a5a2a760b91b6064820152608401610d6f565b600073d5e91bf0b9e3aeeca67bbf66860871bb9c9103c46373ea323473d5e91bf0b9e3aeeca67bbf66860871bb9c9103c46368f7aee5866040518263ffffffff1660e01b8152600401612b4891815260200190565b600060405180830381865af4158015612b65573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052612b8d91908101906152f0565b6019546000878152601e602052604090819020549051635122f9fb60e11b81526001600160a01b039092169163a245f3f691612bcf9160040190815260200190565b600060405180830381865afa158015612bec573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052612c149190810190614ebe565b61010001516019546000888152601e602052604090819020549051635122f9fb60e11b81526001600160a01b039092169163a245f3f691612c5b9160040190815260200190565b600060405180830381865afa158015612c78573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052612ca09190810190614ebe565b61012001516019546000898152601e602052604090819020549051635122f9fb60e11b815273d5e91bf0b9e3aeeca67bbf66860871bb9c9103c4926368f7aee5926001600160a01b039091169163a245f3f691612d039160040190815260200190565b600060405180830381865afa158015612d20573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052612d489190810190614ebe565b60c001516040518263ffffffff1660e01b8152600401612d6a91815260200190565b600060405180830381865af4158015612d87573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052612daf91908101906152f0565b604051602001612dc29493929190615341565b6040516020818303038152906040526040518263ffffffff1660e01b8152600401612ded9190614837565b600060405180830381865af4158015612e0a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052612e3291908101906152f0565b905080604051602001612e4591906154af565b604051602081830303815290604052915050919050565b612e7460008051602061564383398151915233612710565b612e905760405162461bcd60e51b8152600401610d6f90614d4f565b8015612ed757600c805461ffff60881b1916600160901b921580159390930260ff60881b191617600160881b83021760ff60801b1916600160801b92909202919091179055565b600c8054821515600160901b0260ff60901b1990911617905550565b6000828152600b6020526040902060010154612f0e81613dab565b6112db8383613e3b565b33301480612f3057506019546001600160a01b031633145b612f8e5760405162461bcd60e51b815260206004820152602960248201527f534d4f4c52494e473a535749544348494e475f52494e475f54595045535f4e4f6044820152681517d0531313d5d15160ba1b6064820152608401610d6f565b6000818152601d60205260408120805491612fa883615007565b90915550506000828152601e6020908152604080832054808452601d909252822080549192612fd6836154f4565b9091555050506000918252601e602052604090912055565b60006001600160e01b03198216637965db0b60e01b1480610d465750610d4682613fa4565b6115c5828260405180602001604052806000815250613fc9565b600081815260046020526040902080546001600160a01b0319166001600160a01b038416908117909155819061306282612404565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600260205260408120546001600160a01b03166131145760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610d6f565b600061311f83612404565b9050806001600160a01b0316846001600160a01b0316148061316657506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b8061318a5750836001600160a01b031661317f84611135565b6001600160a01b0316145b949350505050565b826001600160a01b03166131a582612404565b6001600160a01b0316146132095760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610d6f565b6001600160a01b03821661326b5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610d6f565b613276838383613ffc565b61328160008261302d565b6001600160a01b03831660009081526003602052604081208054600192906132aa908490614dee565b90915550506001600160a01b03821660009081526003602052604081208054600192906132d8908490614dd6565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6019546001600160a01b03166133615760405162461bcd60e51b8152600401610d6f90614d7f565b600c54600160901b900460ff166133ba5760405162461bcd60e51b815260206004820152601b60248201527f534d4f4c52494e473a534d4f4c5f4d494e545f44495341424c454400000000006044820152606401610d6f565b60208211156133db5760405162461bcd60e51b8152600401610d6f90614e05565b601054610e74906001906133f0908590614dd6565b6133fa9190614dee565b111561345c5760405162461bcd60e51b815260206004820152602b60248201527f534d4f4c52494e473a544f54414c5f52494e475f414d4f554e545f464f525f5360448201526a1353d317d4915050d2115160aa1b6064820152608401610d6f565b600c54613474906001600160801b0316610d486151ad565b613482610190611d4c6151ad565b61348c91906151ad565b6001600160801b0316600184849050600d546134a89190614dd6565b6134b29190614dee565b11156134d05760405162461bcd60e51b8152600401610d6f906151d5565b60005b82811015613653576013546001600160a01b031663e327a6af338686858181106134ff576134ff615197565b6040516001600160e01b031960e087901b1681526001600160a01b0390941660048501526020029190910135602483015250604401602060405180830381865afa158015613551573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061357591906152a3565b6135c15760405162461bcd60e51b815260206004820152601a60248201527f534d4f4c52494e473a4e4f545f4f574e45525f4f465f534d4f4c0000000000006044820152606401610d6f565b601b60008585848181106135d7576135d7615197565b602090810292909201358352508101919091526040016000205460ff16156136415760405162461bcd60e51b815260206004820152601a60248201527f534d4f4c52494e473a534d4f4c5f414c52454144595f555345440000000000006044820152606401610d6f565b8061364b81615007565b9150506134d3565b5080801561366057508115155b156136e957601a546001600160a01b031663adc9772e3361368a680929589c99810400008661511c565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b1580156136d057600080fd5b505af11580156136e4573d6000803e3d6000fd5b505050505b60005b828110156128f5576001601b600086868581811061370c5761370c615197565b90506020020135815260200190815260200160002060006101000a81548160ff02191690831515021790555060405180602001604052806000815250601e6000600d546101906001600160801b03166137659190614dd6565b815260208082019290925260400160009081209251909255818052601d905260008051602061566383398151915280549161379f83615007565b9091555050600d546137b9903390611f6d90610190614dd6565b7f9e61433d50c6bfbde06d3d406e3fe4e363af1274d2af16fc7774b6cb917fa311338585848181106137ed576137ed615197565b90506020020135600d546101906001600160801b031661380d9190614dd6565b604080516001600160a01b03909416845260208401929092529082015260600160405180910390a1600d805490600061384583615007565b90915550506010805490600061385a83615007565b9190505550808061386a90615007565b9150506136ec565b6019546001600160a01b031661389a5760405162461bcd60e51b8152600401610d6f90614d7f565b600c54600160901b900460ff166138f35760405162461bcd60e51b815260206004820152601b60248201527f534d4f4c52494e473a53574f4c5f4d494e545f44495341424c454400000000006044820152606401610d6f565b60208211156139145760405162461bcd60e51b8152600401610d6f90614e05565b601054610e7490600190613929908590614dd6565b6139339190614dee565b11156139955760405162461bcd60e51b815260206004820152602b60248201527f534d4f4c52494e473a544f54414c5f52494e475f414d4f554e545f464f525f5360448201526a15d3d317d4915050d2115160aa1b6064820152608401610d6f565b600c546139ad906001600160801b0316610d486151ad565b6139bb610190611d4c6151ad565b6139c591906151ad565b6001600160801b0316600184849050600d546139e19190614dd6565b6139eb9190614dee565b1115613a095760405162461bcd60e51b8152600401610d6f906151d5565b60005b82811015613b8c576014546001600160a01b031663e327a6af33868685818110613a3857613a38615197565b6040516001600160e01b031960e087901b1681526001600160a01b0390941660048501526020029190910135602483015250604401602060405180830381865afa158015613a8a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613aae91906152a3565b613afa5760405162461bcd60e51b815260206004820152601a60248201527f534d4f4c52494e473a4e4f545f4f574e45525f4f465f53574f4c0000000000006044820152606401610d6f565b601c6000858584818110613b1057613b10615197565b602090810292909201358352508101919091526040016000205460ff1615613b7a5760405162461bcd60e51b815260206004820152601a60248201527f534d4f4c52494e473a53574f4c5f414c52454144595f555345440000000000006044820152606401610d6f565b80613b8481615007565b915050613a0c565b50808015613b9957508115155b15613c2257601a546001600160a01b031663adc9772e33613bc3680929589c99810400008661511c565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b158015613c0957600080fd5b505af1158015613c1d573d6000803e3d6000fd5b505050505b60005b828110156128f5576001601c6000868685818110613c4557613c45615197565b90506020020135815260200190815260200160002060006101000a81548160ff02191690831515021790555060405180602001604052806000815250601e6000600d546101906001600160801b0316613c9e9190614dd6565b815260208082019290925260400160009081209251909255818052601d9052600080516020615663833981519152805491613cd883615007565b9091555050600d54613cf2903390611f6d90610190614dd6565b7f848a12a43799fc2bca827fce78bdfd89fc74f57f625442cf1a9eeafd8e9e210933858584818110613d2657613d26615197565b90506020020135600d546101906001600160801b0316613d469190614dd6565b604080516001600160a01b03909416845260208401929092529082015260600160405180910390a1600d8054906000613d7e83615007565b909155505060108054906000613d9383615007565b91905055508080613da390615007565b915050613c25565b6117c28133614073565b613dbf8282612710565b6115c5576000828152600b602090815260408083206001600160a01b03851684529091529020805460ff19166001179055613df73390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b613e458282612710565b156115c5576000828152600b602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b816001600160a01b0316836001600160a01b03161415613f045760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610d6f565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b613f7c848484613192565b613f88848484846140d7565b6128f55760405162461bcd60e51b8152600401610d6f9061550b565b60006001600160e01b0319821663780e9d6360e01b1480610d465750610d46826141d5565b613fd38383614225565b613fe060008484846140d7565b6112db5760405162461bcd60e51b8152600401610d6f9061550b565b6001600160a01b038316158061401c5750600c54600160981b900460ff16155b6140685760405162461bcd60e51b815260206004820152601c60248201527f534d4f4c52494e473a544f4b454e535f4e4f545f554e4c4f434b4544000000006044820152606401610d6f565b6112db838383614373565b61407d8282612710565b6115c557614095816001600160a01b0316601461442b565b6140a083602061442b565b6040516020016140b192919061555d565b60408051601f198184030181529082905262461bcd60e51b8252610d6f91600401614837565b60006001600160a01b0384163b156141ca57604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061411b9033908990889088906004016155d2565b6020604051808303816000875af1925050508015614156575060408051601f3d908101601f191682019092526141539181019061560f565b60015b6141b0573d808015614184576040519150601f19603f3d011682016040523d82523d6000602084013e614189565b606091505b5080516141a85760405162461bcd60e51b8152600401610d6f9061550b565b805181602001fd5b6001600160e01b031916630a85bd0160e11b14905061318a565b506001949350505050565b60006001600160e01b031982166380ac58cd60e01b148061420657506001600160e01b03198216635b5e139f60e01b145b80610d4657506301ffc9a760e01b6001600160e01b0319831614610d46565b6001600160a01b03821661427b5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610d6f565b6000818152600260205260409020546001600160a01b0316156142e05760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610d6f565b6142ec60008383613ffc565b6001600160a01b0382166000908152600360205260408120805460019290614315908490614dd6565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6001600160a01b0383166143ce576143c981600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b6143f1565b816001600160a01b0316836001600160a01b0316146143f1576143f183826145ce565b6001600160a01b038216614408576112db8161466b565b826001600160a01b0316826001600160a01b0316146112db576112db828261471a565b6060600061443a83600261511c565b614445906002614dd6565b67ffffffffffffffff81111561445d5761445d614b80565b6040519080825280601f01601f191660200182016040528015614487576020820181803683370190505b509050600360fc1b816000815181106144a2576144a2615197565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106144d1576144d1615197565b60200101906001600160f81b031916908160001a90535060006144f584600261511c565b614500906001614dd6565b90505b6001811115614578576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061453457614534615197565b1a60f81b82828151811061454a5761454a615197565b60200101906001600160f81b031916908160001a90535060049490941c93614571816154f4565b9050614503565b5083156145c75760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610d6f565b9392505050565b600060016145db84612509565b6145e59190614dee565b600083815260076020526040902054909150808214614638576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b60085460009061467d90600190614dee565b600083815260096020526040812054600880549394509092849081106146a5576146a5615197565b9060005260206000200154905080600883815481106146c6576146c6615197565b60009182526020808320909101929092558281526009909152604080822084905585825281205560088054806146fe576146fe61562c565b6001900381819060005260206000200160009055905550505050565b600061472583612509565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b6001600160e01b0319811681146117c257600080fd5b60006020828403121561478657600080fd5b81356145c78161475e565b6001600160a01b03811681146117c257600080fd5b6000806000606084860312156147bb57600080fd5b833592506020840135915060408401356147d481614791565b809150509250925092565b60005b838110156147fa5781810151838201526020016147e2565b838111156128f55750506000910152565b600081518084526148238160208601602086016147df565b601f01601f19169290920160200192915050565b6020815260006145c7602083018461480b565b60006020828403121561485c57600080fd5b5035919050565b6000806040838503121561487657600080fd5b823561488181614791565b946020939093013593505050565b6000806000606084860312156148a457600080fd5b83356148af81614791565b925060208401356148bf81614791565b929592945050506040919091013590565b60008083601f8401126148e257600080fd5b50813567ffffffffffffffff8111156148fa57600080fd5b6020830191508360208260051b850101111561491557600080fd5b9250929050565b80151581146117c257600080fd5b60008060008060006060868803121561494257600080fd5b853567ffffffffffffffff8082111561495a57600080fd5b61496689838a016148d0565b9097509550602088013591508082111561497f57600080fd5b5061498c888289016148d0565b90945092505060408601356149a08161491c565b809150509295509295909350565b600080604083850312156149c157600080fd5b8235915060208301356149d381614791565b809150509250929050565b6000602082840312156149f057600080fd5b81356145c78161491c565b600060208284031215614a0d57600080fd5b81356145c781614791565b60008060008060008060008060c0898b031215614a3457600080fd5b883597506020890135965060408901359550606089013567ffffffffffffffff80821115614a6157600080fd5b614a6d8c838d016148d0565b909750955060808b0135915080821115614a8657600080fd5b50614a938b828c016148d0565b90945092505060a0890135614aa78161491c565b809150509295985092959890939650565b60008060408385031215614acb57600080fd5b8235915060208301356149d38161491c565b600080600060408486031215614af257600080fd5b833567ffffffffffffffff811115614b0957600080fd5b614b15868287016148d0565b90945092505060208401356147d48161491c565b60008060408385031215614b3c57600080fd5b8235614b4781614791565b915060208301356149d38161491c565b600060208284031215614b6957600080fd5b81356001600160801b03811681146145c757600080fd5b634e487b7160e01b600052604160045260246000fd5b604051610140810167ffffffffffffffff81118282101715614bba57614bba614b80565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715614be957614be9614b80565b604052919050565b600067ffffffffffffffff821115614c0b57614c0b614b80565b50601f01601f191660200190565b60008060008060808587031215614c2f57600080fd5b8435614c3a81614791565b93506020850135614c4a81614791565b925060408501359150606085013567ffffffffffffffff811115614c6d57600080fd5b8501601f81018713614c7e57600080fd5b8035614c91614c8c82614bf1565b614bc0565b818152886020838501011115614ca657600080fd5b8160208401602083013760006020838301015280935050505092959194509250565b60008060408385031215614cdb57600080fd5b50508035926020909101359150565b60008060408385031215614cfd57600080fd5b8235614d0881614791565b915060208301356149d381614791565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60208082526016908201527514d353d314925391ce9050d0d154d4d7d1115392515160521b604082015260600190565b60208082526021908201527f534d4f4c52494e473a464f5247494e475f434f4e54524143545f4e4f545f53456040820152601560fa1b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b60008219821115614de957614de9614dc0565b500190565b600082821015614e0057614e00614dc0565b500390565b60208082526028908201527f534d4f4c52494e473a4d41585f414c4c4f57414e43455f5045525f424154434860408201526717d4915050d2115160c21b606082015260800190565b8051614e588161491c565b919050565b8051614e5881614791565b805160ff81168114614e5857600080fd5b600082601f830112614e8a57600080fd5b8151614e98614c8c82614bf1565b818152846020838601011115614ead57600080fd5b61318a8260208301602087016147df565b600060208284031215614ed057600080fd5b815167ffffffffffffffff80821115614ee857600080fd5b908301906101408286031215614efd57600080fd5b614f05614b96565b614f0e83614e4d565b8152614f1c60208401614e4d565b6020820152614f2d60408401614e5d565b6040820152614f3e60608401614e68565b60608201526080830151608082015260a083015160a082015260c083015160c082015260e083015160e08201526101008084015183811115614f7f57600080fd5b614f8b88828701614e79565b8284015250506101208084015183811115614fa557600080fd5b614fb188828701614e79565b918301919091525095945050505050565b60208082526025908201527f534d4f4c52494e473a545950455f4e4f545f414c4c4f5745445f464f525f464f6040820152645247494e4760d81b606082015260800190565b600060001982141561501b5761501b614dc0565b5060010190565b600181811c9082168061503657607f821691505b6020821081141561505757634e487b7160e01b600052602260045260246000fd5b50919050565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b60208082526018908201527f534d4f4c52494e473a434f4e54524143545f43414c4c45520000000000000000604082015260600190565b6020808252601e908201527f534d4f4c52494e473a4d494e54494e475f305f4e4f545f414c4c4f5745440000604082015260600190565b600081600019048311821515161561513657615136614dc0565b500290565b60006020828403121561514d57600080fd5b5051919050565b60208082526023908201527f534d4f4c52494e473a4e4f545f454e4f5547485f4d414749435f494e5f57414c60408201526213115560ea1b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b60006001600160801b03838116908316818110156151cd576151cd614dc0565b039392505050565b60208082526022908201527f534d4f4c52494e473a544f54414c5f52494e475f414d4f554e545f5245414348604082015261115160f21b606082015260800190565b81835260006001600160fb1b0383111561523057600080fd5b8260051b8083602087013760009401602001938452509192915050565b60018060a01b038916815287602082015286604082015285606082015260c06080820152600061528160c083018688615217565b82810360a0840152615294818587615217565b9b9a5050505050505050505050565b6000602082840312156152b557600080fd5b81516145c78161491c565b602080825260169082015275534d4f4c52494e473a494e56414c49445f505249434560501b604082015260600190565b60006020828403121561530257600080fd5b815167ffffffffffffffff81111561531957600080fd5b61318a84828501614e79565b600081516153378185602086016147df565b9290920192915050565b6a7b226e616d65223a20222360a81b8152845160009061536881600b850160208a016147df565b7f222c20226465736372697074696f6e223a2022536d6f6c2052696e6773222c20600b918401918201527f2265787465726e616c5f75726c223a2268747470733a2f2f7777772e736d6f6c602b8201527437bb32973c3cbd179116101134b6b0b3b2911d101160591b604b82015285516153e9816060840160208a016147df565b7f222c202261747472696275746573223a205b7b2274726169745f74797065223a606092909101918201527210112a3cb832911610113b30b63ab2911d101160691b608082015284516154438160938401602089016147df565b7f227d2c7b2274726169745f74797065223a202252657761726420466163746f72609392909101918201526c111610113b30b63ab2911d101160991b60b38201526154a461549460c0830186615325565b63227d5d7d60e01b815260040190565b979650505050505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c0000008152600082516154e781601d8501602087016147df565b91909101601d0192915050565b60008161550357615503614dc0565b506000190190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516155958160178501602088016147df565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516155c68160288401602088016147df565b01602801949350505050565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906156059083018461480b565b9695505050505050565b60006020828403121561562157600080fd5b81516145c78161475e565b634e487b7160e01b600052603160045260246000fdfe523a704056dcd17bcf83bed8b68c59416dac1119be77755efe3bde0a64e46e0c0a51588b1664495f089dd83d2d26f247920f94a57a4a09f20cf068efc8f82bd4a164736f6c634300080b000a523a704056dcd17bcf83bed8b68c59416dac1119be77755efe3bde0a64e46e0cdf8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec42534d4f4c52494e473a494c4c4547414c5f4144445245535300000000000000000000000000000000000000004046c2b351d32441028c510427cd5544cb1e3589000000000000000000000000eb3c504e489a24fa7f5616effa06f1ee3279f851000000000000000000000000539bde0d7dbd336b79148aa742883198bbf60342000000000000000000000000edcf75f015d26af495adeb41c255dad3593b306200000000000000000000000046a3f45aadcdfaafdd88c1f54aa7806135b281ad0000000000000000000000000eb468f89e5bcfa4c933c8982d8d19554e101cfe00000000000000000000000006c244a9bafbc96e609a8df32a07178552c7295a0000000000000000000000000eb468f89e5bcfa4c933c8982d8d19554e101cfe
Deployed Bytecode
0x6080604052600436106104105760003560e01c80636ea9f1361161021e578063adbde6c711610123578063d45ed334116100ab578063e17ce8dd1161007a578063e17ce8dd14610c84578063e888a61414610c9a578063e985e9c514610cb0578063f5b541a614610cf9578063fb26a0c914610d1b57600080fd5b8063d45ed33414610c04578063d547741f14610c24578063dce38e7314610c44578063e117b41714610c6457600080fd5b8063c4dc8366116100f2578063c4dc836614610b61578063c52ee90f14610b8e578063c87b56dd14610ba1578063cd04c55314610bc1578063cd2caaa614610bd757600080fd5b8063adbde6c714610ae1578063b767a09814610b01578063b88d4fde14610b21578063c0d86f7014610b4157600080fd5b80639038e693116101a6578063a1feba4211610175578063a1feba4214610a4b578063a217fddf14610a6c578063a22cb46514610a81578063a8694c5714610aa1578063a9661f4d14610ac157600080fd5b80639038e693146109ae57806391d14854146109c357806395d89b41146109e35780639d040d70146109f857600080fd5b80637eb1afb4116101ed5780637eb1afb41461092e578063834906661461094e5780638b6474ad146109645780638f3948a61461097a5780638f754db81461098d57600080fd5b80636ea9f136146108a757806370a08231146108c457806375b238fc146108e457806376955dd81461091857600080fd5b806342842e0e116103245780635e96160e116102ac578063624babdf1161027b578063624babdf146108115780636352211e146108245780636a9fc4e6146108445780636c0360eb146108715780636caede3d1461088657600080fd5b80635e96160e1461078f578063605a9d1a146107b057806361d027b3146107c3578063620775b9146107e357600080fd5b8063469f7464116102f3578063469f7464146106f95780634c8e72f11461070f5780634cf088d91461072f5780634f6ccce71461074f578063551e5d601461076f57600080fd5b806342842e0e1461067e5780634328a55c1461069e57806344c14e96146106be57806344c4b27c146106de57600080fd5b806323b872dd116103a75780632f4c2381116103765780632f4c2381146105d85780632f745c591461060857806336568abe1461062857806339e56a1d1461064857806340a915a51461065e57600080fd5b806323b872dd14610555578063248a9ca314610575578063260d877e146105a55780632f2ff15d146105b857600080fd5b8063095ea7b3116103e3578063095ea7b3146104c65780630d854646146104e657806318160ddd14610506578063200106cb1461052557600080fd5b806301ffc9a714610415578063062761261461044a57806306fdde031461046c578063081812fc1461048e575b600080fd5b34801561042157600080fd5b50610435610430366004614774565b610d3b565b60405190151581526020015b60405180910390f35b34801561045657600080fd5b5061046a6104653660046147a6565b610d4c565b005b34801561047857600080fd5b506104816110a3565b6040516104419190614837565b34801561049a57600080fd5b506104ae6104a936600461484a565b611135565b6040516001600160a01b039091168152602001610441565b3480156104d257600080fd5b5061046a6104e1366004614863565b6111ca565b3480156104f257600080fd5b506015546104ae906001600160a01b031681565b34801561051257600080fd5b506008545b604051908152602001610441565b34801561053157600080fd5b5061043561054036600461484a565b601c6020526000908152604090205460ff1681565b34801561056157600080fd5b5061046a61057036600461488f565b6112e0565b34801561058157600080fd5b5061051761059036600461484a565b6000908152600b602052604090206001015490565b61046a6105b336600461492a565b611311565b3480156105c457600080fd5b5061046a6105d33660046149ae565b611490565b3480156105e457600080fd5b506104356105f336600461484a565b601b6020526000908152604090205460ff1681565b34801561061457600080fd5b50610517610623366004614863565b6114b5565b34801561063457600080fd5b5061046a6106433660046149ae565b61154b565b34801561065457600080fd5b50610517600e5481565b34801561066a57600080fd5b5061046a6106793660046149de565b6115c9565b34801561068a57600080fd5b5061046a61069936600461488f565b611655565b3480156106aa57600080fd5b506013546104ae906001600160a01b031681565b3480156106ca57600080fd5b5061046a6106d93660046149fb565b611670565b3480156106ea57600080fd5b50610517669536c70891000081565b34801561070557600080fd5b5061051760105481565b34801561071b57600080fd5b5061046a61072a3660046149de565b61172e565b34801561073b57600080fd5b506018546104ae906001600160a01b031681565b34801561075b57600080fd5b5061051761076a36600461484a565b6117c5565b34801561077b57600080fd5b5061051761078a36600461484a565b611858565b34801561079b57600080fd5b50600c5461043590600160801b900460ff1681565b61046a6107be366004614a18565b611905565b3480156107cf57600080fd5b506016546104ae906001600160a01b031681565b3480156107ef57600080fd5b506107f961019081565b6040516001600160801b039091168152602001610441565b61046a61081f366004614ab8565b612027565b34801561083057600080fd5b506104ae61083f36600461484a565b612404565b34801561085057600080fd5b5061051761085f36600461484a565b601e6020526000908152604090205481565b34801561087d57600080fd5b5061048161247b565b34801561089257600080fd5b50600c5461043590600160881b900460ff1681565b3480156108b357600080fd5b50610517680929589c998104000081565b3480156108d057600080fd5b506105176108df3660046149fb565b612509565b3480156108f057600080fd5b506105177fdf8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec4281565b34801561092457600080fd5b50610517600f5481565b34801561093a57600080fd5b506019546104ae906001600160a01b031681565b34801561095a57600080fd5b506107f9611d4c81565b34801561097057600080fd5b506107f9610e7481565b61046a610988366004614add565b612590565b34801561099957600080fd5b50600c5461043590600160901b900460ff1681565b3480156109ba57600080fd5b5061046a6126d6565b3480156109cf57600080fd5b506104356109de3660046149ae565b612710565b3480156109ef57600080fd5b5061048161273b565b348015610a0457600080fd5b50610a3c610a1336600461484a565b6040805160208082018352600091829052928152601e8352819020815192830190915254815290565b60405190518152602001610441565b348015610a5757600080fd5b50600c5461043590600160981b900460ff1681565b348015610a7857600080fd5b50610517600081565b348015610a8d57600080fd5b5061046a610a9c366004614b29565b61274a565b348015610aad57600080fd5b5061046a610abc366004614b57565b612755565b348015610acd57600080fd5b506014546104ae906001600160a01b031681565b348015610aed57600080fd5b506017546104ae906001600160a01b031681565b348015610b0d57600080fd5b5061046a610b1c3660046149de565b61282c565b348015610b2d57600080fd5b5061046a610b3c366004614c19565b6128c3565b348015610b4d57600080fd5b5061046a610b5c36600461484a565b6128fb565b348015610b6d57600080fd5b50610517610b7c36600461484a565b6000908152601d602052604090205490565b61046a610b9c366004614add565b612934565b348015610bad57600080fd5b50610481610bbc36600461484a565b612a7a565b348015610bcd57600080fd5b5061051760115481565b348015610be357600080fd5b50610517610bf236600461484a565b601d6020526000908152604090205481565b348015610c1057600080fd5b5061046a610c1f3660046149de565b612e5c565b348015610c3057600080fd5b5061046a610c3f3660046149ae565b612ef3565b348015610c5057600080fd5b5061046a610c5f366004614cc8565b612f18565b348015610c7057600080fd5b50601a546104ae906001600160a01b031681565b348015610c9057600080fd5b50610517600d5481565b348015610ca657600080fd5b506107f9610d4881565b348015610cbc57600080fd5b50610435610ccb366004614cea565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b348015610d0557600080fd5b5061051760008051602061564383398151915281565b348015610d2757600080fd5b50600c546107f9906001600160801b031681565b6000610d4682612fee565b92915050565b6002600a541415610d785760405162461bcd60e51b8152600401610d6f90614d18565b60405180910390fd5b6002600a55610d9560008051602061564383398151915233612710565b610db15760405162461bcd60e51b8152600401610d6f90614d4f565b6019546001600160a01b0316610dd95760405162461bcd60e51b8152600401610d6f90614d7f565b6101906001600160801b0316600183600f54610df59190614dd6565b610dff9190614dee565b1115610e585760405162461bcd60e51b815260206004820152602260248201527f534d4f4c52494e473a544f54414c5f5445414d5f414d4f554e545f5245414348604482015261115160f21b6064820152608401610d6f565b6020821115610e795760405162461bcd60e51b8152600401610d6f90614e05565b601954604051635122f9fb60e11b8152600481018590526001600160a01b039091169063a245f3f690602401600060405180830381865afa158015610ec2573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610eea9190810190614ebe565b51610f075760405162461bcd60e51b8152600401610d6f90614fc2565b60005b8281101561109857601954604051635122f9fb60e11b8152600481018690526001600160a01b039091169063a245f3f690602401600060405180830381865afa158015610f5b573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610f839190810190614ebe565b60e001516000858152601d60205260409020541415610fe95760408051602080820183526000808352600f548152601e82529283209151909155818052601d9052600080516020615663833981519152805491610fdf83615007565b9190505550611027565b6040805160208082018352868252600f546000908152601e82528381209251909255868252601d905290812080549161102183615007565b91905055505b61103382600f54613013565b600f546040805133815260208101929092527fa86d5841c1ebca4c4b6e4c81c9ee4f6565f619cc2e2e8b306e2a16850930cb94910160405180910390a1600f805490600061108083615007565b9190505550808061109090615007565b915050610f0a565b50506001600a555050565b6060600080546110b290615022565b80601f01602080910402602001604051908101604052809291908181526020018280546110de90615022565b801561112b5780601f106111005761010080835404028352916020019161112b565b820191906000526020600020905b81548152906001019060200180831161110e57829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b03166111ae5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610d6f565b506000908152600460205260409020546001600160a01b031690565b60006111d582612404565b9050806001600160a01b0316836001600160a01b031614156112435760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610d6f565b336001600160a01b038216148061125f575061125f8133610ccb565b6112d15760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610d6f565b6112db838361302d565b505050565b6112ea338261309b565b6113065760405162461bcd60e51b8152600401610d6f9061505d565b6112db838383613192565b6002600a5414156113345760405162461bcd60e51b8152600401610d6f90614d18565b6002600a553332146113585760405162461bcd60e51b8152600401610d6f906150ae565b60006113648386614dd6565b116113815760405162461bcd60e51b8152600401610d6f906150e5565b801561143457680929589c998104000061139b8386614dd6565b6113a5919061511c565b6015546040516370a0823160e01b81523360048201526001600160a01b03909116906370a0823190602401602060405180830381865afa1580156113ed573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611411919061513b565b101561142f5760405162461bcd60e51b8152600401610d6f90615154565b61146e565b34669536c7089100006114478487614dd6565b611451919061511c565b1461146e5760405162461bcd60e51b8152600401610d6f90615154565b611479858583613339565b611484838383613872565b50506001600a55505050565b6000828152600b60205260409020600101546114ab81613dab565b6112db8383613db5565b60006114c083612509565b82106115225760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610d6f565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b6001600160a01b03811633146115bb5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610d6f565b6115c58282613e3b565b5050565b6115e160008051602061564383398151915233612710565b6115fd5760405162461bcd60e51b8152600401610d6f90614d4f565b600c8054821515600160981b0260ff60981b199091161790556040517f25b5f6724d204ba480303736d7a3e904ee7607e7cdcdc438a6ed774813a43d1e9061164a90831515815260200190565b60405180910390a150565b6112db838383604051806020016040528060008152506128c3565b61169a7fdf8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec4233612710565b6116b65760405162461bcd60e51b8152600401610d6f90614d4f565b6001600160a01b03811661170c5760405162461bcd60e51b815260206004820152601860248201527f534d4f4c52494e473a494c4c4547414c5f4144445245535300000000000000006044820152606401610d6f565b601980546001600160a01b0319166001600160a01b0392909216919091179055565b61174660008051602061564383398151915233612710565b6117625760405162461bcd60e51b8152600401610d6f90614d4f565b80156117aa57600c805462ff00ff60801b1916600160801b921580159390930260ff60901b191617600160901b83021760ff60881b1916600160881b92909202919091179055565b600c805460ff60801b1916600160801b831515021790555b50565b60006117d060085490565b82106118335760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610d6f565b6008828154811061184657611846615197565b90600052602060002001549050919050565b6000818152601e6020526040812054156118fd576019546000838152601e602052604090819020549051635122f9fb60e11b81526001600160a01b039092169163a245f3f6916118ae9160040190815260200190565b600060405180830381865afa1580156118cb573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526118f39190810190614ebe565b60c0015192915050565b505060115490565b6002600a5414156119285760405162461bcd60e51b8152600401610d6f90614d18565b6002600a556019546001600160a01b03166119555760405162461bcd60e51b8152600401610d6f90614d7f565b600c54600160881b900460ff166119ae5760405162461bcd60e51b815260206004820181905260248201527f534d4f4c52494e473a57484954454c4953545f4d494e545f44495341424c45446044820152606401610d6f565b600086116119ce5760405162461bcd60e51b8152600401610d6f906150e5565b60208611156119ef5760405162461bcd60e51b8152600401610d6f90614e05565b600c54600e546001600160801b0390911690600190611a0f908990614dd6565b611a199190614dee565b1115611a805760405162461bcd60e51b815260206004820152603060248201527f534d4f4c52494e473a544f54414c5f52494e475f414d4f554e545f464f525f5760448201526f12125511531254d517d4915050d2115160821b6064820152608401610d6f565b600c54611a98906001600160801b0316610d486151ad565b611aa6610190611d4c6151ad565b611ab091906151ad565b6001600160801b0316600187600d54611ac99190614dd6565b611ad39190614dee565b1115611af15760405162461bcd60e51b8152600401610d6f906151d5565b60005b84811015611bbf57858582818110611b0e57611b0e615197565b9050602002013560001480611b915750601954604051635122f9fb60e11b8152600481018390526001600160a01b039091169063a245f3f690602401600060405180830381865afa158015611b67573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611b8f9190810190614ebe565b515b611bad5760405162461bcd60e51b8152600401610d6f90614fc2565b80611bb781615007565b915050611af4565b50601754604051631605250960e21b81526001600160a01b0390911690635814942490611bfe9033908c908c908c908c908c908c908c9060040161524d565b6020604051808303816000875af1158015611c1d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c4191906152a3565b611c865760405162461bcd60e51b815260206004820152601660248201527529a6a7a62924a7239d24a72b20a624a22fa82927a7a360511b6044820152606401610d6f565b8015611db157611c9f680929589c99810400008761511c565b6015546040516370a0823160e01b81523360048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015611ce7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d0b919061513b565b1015611d295760405162461bcd60e51b8152600401610d6f90615154565b601a546001600160a01b031663adc9772e33611d4e680929589c99810400008a61511c565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b158015611d9457600080fd5b505af1158015611da8573d6000803e3d6000fd5b50505050611de0565b34611dc3669536c7089100008861511c565b14611de05760405162461bcd60e51b8152600401610d6f906152c0565b60005b848110156120175760005b868683818110611e0057611e00615197565b9050602002013581101561200457601954604051635122f9fb60e11b8152600481018490526001600160a01b039091169063a245f3f690602401600060405180830381865afa158015611e57573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611e7f9190810190614ebe565b60e001516000838152601d60205260409020541415611eff5760408051602081019091526000808252600d54601e9190611ebb90610190614dd6565b815260208082019290925260400160009081209251909255818052601d9052600080516020615663833981519152805491611ef583615007565b9190505550611f58565b6040805160208101909152828152600d54601e90600090611f2290610190614dd6565b8152602080820192909252604090810160009081209351909355848352601d9091528120805491611f5283615007565b91905055505b600d54611f72903390611f6d90610190614dd6565b613013565b600d547fd3d1fa65dc207eaec7a1692d2644311d6f470e9b7769d8ea39b7541a64d3f37a903390611fa590610190614dd6565b604080516001600160a01b03909316835260208301919091520160405180910390a1600d8054906000611fd783615007565b9091555050600e8054906000611fec83615007565b91905055508080611ffc90615007565b915050611dee565b508061200f81615007565b915050611de3565b50506001600a5550505050505050565b6002600a54141561204a5760405162461bcd60e51b8152600401610d6f90614d18565b6002600a5533321461206e5760405162461bcd60e51b8152600401610d6f906150ae565b6019546001600160a01b03166120965760405162461bcd60e51b8152600401610d6f90614d7f565b600c54600160801b900460ff166120ef5760405162461bcd60e51b815260206004820152601e60248201527f534d4f4c52494e473a524547554c41525f4d494e545f44495341424c454400006044820152606401610d6f565b6000821161210f5760405162461bcd60e51b8152600401610d6f906150e5565b60058211156121305760405162461bcd60e51b8152600401610d6f90614e05565b600c54612148906001600160801b0316610d486151ad565b612156610190611d4c6151ad565b61216091906151ad565b6001600160801b0316600183600d546121799190614dd6565b6121839190614dee565b11156121a15760405162461bcd60e51b8152600401610d6f906151d5565b80156122cc576121ba680929589c99810400008361511c565b6015546040516370a0823160e01b81523360048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015612202573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612226919061513b565b10156122445760405162461bcd60e51b8152600401610d6f90615154565b601a546001600160a01b031663adc9772e33612269680929589c99810400008661511c565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b1580156122af57600080fd5b505af11580156122c3573d6000803e3d6000fd5b505050506122fb565b346122de669536c7089100008461511c565b146122fb5760405162461bcd60e51b8152600401610d6f906152c0565b60005b828110156123fa5760408051602081019091526000808252600d54601e919061232990610190614dd6565b815260208082019290925260400160009081209251909255818052601d905260008051602061566383398151915280549161236383615007565b9091555050600d5461237d903390611f6d90610190614dd6565b600d547f95c7bd6013707ab5de040468614214f93702bca6387f57bcbf03df708bb2ae769033906123b090610190614dd6565b604080516001600160a01b03909316835260208301919091520160405180910390a1600d80549060006123e283615007565b919050555080806123f290615007565b9150506122fe565b50506001600a5550565b6000818152600260205260408120546001600160a01b031680610d465760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610d6f565b6012805461248890615022565b80601f01602080910402602001604051908101604052809291908181526020018280546124b490615022565b80156125015780601f106124d657610100808354040283529160200191612501565b820191906000526020600020905b8154815290600101906020018083116124e457829003601f168201915b505050505081565b60006001600160a01b0382166125745760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610d6f565b506001600160a01b031660009081526003602052604090205490565b6002600a5414156125b35760405162461bcd60e51b8152600401610d6f90614d18565b6002600a553332146125d75760405162461bcd60e51b8152600401610d6f906150ae565b816125f45760405162461bcd60e51b8152600401610d6f906150e5565b801561269c5761260d680929589c99810400008361511c565b6015546040516370a0823160e01b81523360048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015612655573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612679919061513b565b10156126975760405162461bcd60e51b8152600401610d6f90615154565b6126cb565b346126ae669536c7089100008461511c565b146126cb5760405162461bcd60e51b8152600401610d6f906152c0565b6123fa838383613339565b60165460405147916001600160a01b03169082156108fc029083906000818181858888f193505050501580156115c5573d6000803e3d6000fd5b6000918252600b602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6060600180546110b290615022565b6115c5338383613ea2565b61277f7fdf8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec4233612710565b61279b5760405162461bcd60e51b8152600401610d6f90614d4f565b610d486001600160801b03821611156128015760405162461bcd60e51b815260206004820152602260248201527f534d4f4c52494e473a4f5645525f4d41585f57484954454c4953545f414d4f55604482015261139560f21b6064820152608401610d6f565b600c80546fffffffffffffffffffffffffffffffff19166001600160801b0392909216919091179055565b61284460008051602061564383398151915233612710565b6128605760405162461bcd60e51b8152600401610d6f90614d4f565b80156128a757600c805461ffff60881b1916600160881b921580159390930260ff60901b191617600160901b83021760ff60801b1916600160801b92909202919091179055565b600c8054821515600160881b0260ff60881b1990911617905550565b6128cd338361309b565b6128e95760405162461bcd60e51b8152600401610d6f9061505d565b6128f584848484613f71565b50505050565b61291360008051602061564383398151915233612710565b61292f5760405162461bcd60e51b8152600401610d6f90614d4f565b601155565b6002600a5414156129575760405162461bcd60e51b8152600401610d6f90614d18565b6002600a5533321461297b5760405162461bcd60e51b8152600401610d6f906150ae565b816129985760405162461bcd60e51b8152600401610d6f906150e5565b8015612a40576129b1680929589c99810400008361511c565b6015546040516370a0823160e01b81523360048201526001600160a01b03909116906370a0823190602401602060405180830381865afa1580156129f9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a1d919061513b565b1015612a3b5760405162461bcd60e51b8152600401610d6f90615154565b612a6f565b34612a52669536c7089100008461511c565b14612a6f5760405162461bcd60e51b8152600401610d6f906152c0565b6123fa838383613872565b6000818152600260205260409020546060906001600160a01b0316612af35760405162461bcd60e51b815260206004820152602960248201527f534d4f4c52494e473a5552495f51554552595f464f525f4e4f4e5f455849535460448201526820a72a2faa27a5a2a760b91b6064820152608401610d6f565b600073d5e91bf0b9e3aeeca67bbf66860871bb9c9103c46373ea323473d5e91bf0b9e3aeeca67bbf66860871bb9c9103c46368f7aee5866040518263ffffffff1660e01b8152600401612b4891815260200190565b600060405180830381865af4158015612b65573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052612b8d91908101906152f0565b6019546000878152601e602052604090819020549051635122f9fb60e11b81526001600160a01b039092169163a245f3f691612bcf9160040190815260200190565b600060405180830381865afa158015612bec573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052612c149190810190614ebe565b61010001516019546000888152601e602052604090819020549051635122f9fb60e11b81526001600160a01b039092169163a245f3f691612c5b9160040190815260200190565b600060405180830381865afa158015612c78573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052612ca09190810190614ebe565b61012001516019546000898152601e602052604090819020549051635122f9fb60e11b815273d5e91bf0b9e3aeeca67bbf66860871bb9c9103c4926368f7aee5926001600160a01b039091169163a245f3f691612d039160040190815260200190565b600060405180830381865afa158015612d20573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052612d489190810190614ebe565b60c001516040518263ffffffff1660e01b8152600401612d6a91815260200190565b600060405180830381865af4158015612d87573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052612daf91908101906152f0565b604051602001612dc29493929190615341565b6040516020818303038152906040526040518263ffffffff1660e01b8152600401612ded9190614837565b600060405180830381865af4158015612e0a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052612e3291908101906152f0565b905080604051602001612e4591906154af565b604051602081830303815290604052915050919050565b612e7460008051602061564383398151915233612710565b612e905760405162461bcd60e51b8152600401610d6f90614d4f565b8015612ed757600c805461ffff60881b1916600160901b921580159390930260ff60881b191617600160881b83021760ff60801b1916600160801b92909202919091179055565b600c8054821515600160901b0260ff60901b1990911617905550565b6000828152600b6020526040902060010154612f0e81613dab565b6112db8383613e3b565b33301480612f3057506019546001600160a01b031633145b612f8e5760405162461bcd60e51b815260206004820152602960248201527f534d4f4c52494e473a535749544348494e475f52494e475f54595045535f4e4f6044820152681517d0531313d5d15160ba1b6064820152608401610d6f565b6000818152601d60205260408120805491612fa883615007565b90915550506000828152601e6020908152604080832054808452601d909252822080549192612fd6836154f4565b9091555050506000918252601e602052604090912055565b60006001600160e01b03198216637965db0b60e01b1480610d465750610d4682613fa4565b6115c5828260405180602001604052806000815250613fc9565b600081815260046020526040902080546001600160a01b0319166001600160a01b038416908117909155819061306282612404565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600260205260408120546001600160a01b03166131145760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610d6f565b600061311f83612404565b9050806001600160a01b0316846001600160a01b0316148061316657506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b8061318a5750836001600160a01b031661317f84611135565b6001600160a01b0316145b949350505050565b826001600160a01b03166131a582612404565b6001600160a01b0316146132095760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610d6f565b6001600160a01b03821661326b5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610d6f565b613276838383613ffc565b61328160008261302d565b6001600160a01b03831660009081526003602052604081208054600192906132aa908490614dee565b90915550506001600160a01b03821660009081526003602052604081208054600192906132d8908490614dd6565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6019546001600160a01b03166133615760405162461bcd60e51b8152600401610d6f90614d7f565b600c54600160901b900460ff166133ba5760405162461bcd60e51b815260206004820152601b60248201527f534d4f4c52494e473a534d4f4c5f4d494e545f44495341424c454400000000006044820152606401610d6f565b60208211156133db5760405162461bcd60e51b8152600401610d6f90614e05565b601054610e74906001906133f0908590614dd6565b6133fa9190614dee565b111561345c5760405162461bcd60e51b815260206004820152602b60248201527f534d4f4c52494e473a544f54414c5f52494e475f414d4f554e545f464f525f5360448201526a1353d317d4915050d2115160aa1b6064820152608401610d6f565b600c54613474906001600160801b0316610d486151ad565b613482610190611d4c6151ad565b61348c91906151ad565b6001600160801b0316600184849050600d546134a89190614dd6565b6134b29190614dee565b11156134d05760405162461bcd60e51b8152600401610d6f906151d5565b60005b82811015613653576013546001600160a01b031663e327a6af338686858181106134ff576134ff615197565b6040516001600160e01b031960e087901b1681526001600160a01b0390941660048501526020029190910135602483015250604401602060405180830381865afa158015613551573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061357591906152a3565b6135c15760405162461bcd60e51b815260206004820152601a60248201527f534d4f4c52494e473a4e4f545f4f574e45525f4f465f534d4f4c0000000000006044820152606401610d6f565b601b60008585848181106135d7576135d7615197565b602090810292909201358352508101919091526040016000205460ff16156136415760405162461bcd60e51b815260206004820152601a60248201527f534d4f4c52494e473a534d4f4c5f414c52454144595f555345440000000000006044820152606401610d6f565b8061364b81615007565b9150506134d3565b5080801561366057508115155b156136e957601a546001600160a01b031663adc9772e3361368a680929589c99810400008661511c565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b1580156136d057600080fd5b505af11580156136e4573d6000803e3d6000fd5b505050505b60005b828110156128f5576001601b600086868581811061370c5761370c615197565b90506020020135815260200190815260200160002060006101000a81548160ff02191690831515021790555060405180602001604052806000815250601e6000600d546101906001600160801b03166137659190614dd6565b815260208082019290925260400160009081209251909255818052601d905260008051602061566383398151915280549161379f83615007565b9091555050600d546137b9903390611f6d90610190614dd6565b7f9e61433d50c6bfbde06d3d406e3fe4e363af1274d2af16fc7774b6cb917fa311338585848181106137ed576137ed615197565b90506020020135600d546101906001600160801b031661380d9190614dd6565b604080516001600160a01b03909416845260208401929092529082015260600160405180910390a1600d805490600061384583615007565b90915550506010805490600061385a83615007565b9190505550808061386a90615007565b9150506136ec565b6019546001600160a01b031661389a5760405162461bcd60e51b8152600401610d6f90614d7f565b600c54600160901b900460ff166138f35760405162461bcd60e51b815260206004820152601b60248201527f534d4f4c52494e473a53574f4c5f4d494e545f44495341424c454400000000006044820152606401610d6f565b60208211156139145760405162461bcd60e51b8152600401610d6f90614e05565b601054610e7490600190613929908590614dd6565b6139339190614dee565b11156139955760405162461bcd60e51b815260206004820152602b60248201527f534d4f4c52494e473a544f54414c5f52494e475f414d4f554e545f464f525f5360448201526a15d3d317d4915050d2115160aa1b6064820152608401610d6f565b600c546139ad906001600160801b0316610d486151ad565b6139bb610190611d4c6151ad565b6139c591906151ad565b6001600160801b0316600184849050600d546139e19190614dd6565b6139eb9190614dee565b1115613a095760405162461bcd60e51b8152600401610d6f906151d5565b60005b82811015613b8c576014546001600160a01b031663e327a6af33868685818110613a3857613a38615197565b6040516001600160e01b031960e087901b1681526001600160a01b0390941660048501526020029190910135602483015250604401602060405180830381865afa158015613a8a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613aae91906152a3565b613afa5760405162461bcd60e51b815260206004820152601a60248201527f534d4f4c52494e473a4e4f545f4f574e45525f4f465f53574f4c0000000000006044820152606401610d6f565b601c6000858584818110613b1057613b10615197565b602090810292909201358352508101919091526040016000205460ff1615613b7a5760405162461bcd60e51b815260206004820152601a60248201527f534d4f4c52494e473a53574f4c5f414c52454144595f555345440000000000006044820152606401610d6f565b80613b8481615007565b915050613a0c565b50808015613b9957508115155b15613c2257601a546001600160a01b031663adc9772e33613bc3680929589c99810400008661511c565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b158015613c0957600080fd5b505af1158015613c1d573d6000803e3d6000fd5b505050505b60005b828110156128f5576001601c6000868685818110613c4557613c45615197565b90506020020135815260200190815260200160002060006101000a81548160ff02191690831515021790555060405180602001604052806000815250601e6000600d546101906001600160801b0316613c9e9190614dd6565b815260208082019290925260400160009081209251909255818052601d9052600080516020615663833981519152805491613cd883615007565b9091555050600d54613cf2903390611f6d90610190614dd6565b7f848a12a43799fc2bca827fce78bdfd89fc74f57f625442cf1a9eeafd8e9e210933858584818110613d2657613d26615197565b90506020020135600d546101906001600160801b0316613d469190614dd6565b604080516001600160a01b03909416845260208401929092529082015260600160405180910390a1600d8054906000613d7e83615007565b909155505060108054906000613d9383615007565b91905055508080613da390615007565b915050613c25565b6117c28133614073565b613dbf8282612710565b6115c5576000828152600b602090815260408083206001600160a01b03851684529091529020805460ff19166001179055613df73390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b613e458282612710565b156115c5576000828152600b602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b816001600160a01b0316836001600160a01b03161415613f045760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610d6f565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b613f7c848484613192565b613f88848484846140d7565b6128f55760405162461bcd60e51b8152600401610d6f9061550b565b60006001600160e01b0319821663780e9d6360e01b1480610d465750610d46826141d5565b613fd38383614225565b613fe060008484846140d7565b6112db5760405162461bcd60e51b8152600401610d6f9061550b565b6001600160a01b038316158061401c5750600c54600160981b900460ff16155b6140685760405162461bcd60e51b815260206004820152601c60248201527f534d4f4c52494e473a544f4b454e535f4e4f545f554e4c4f434b4544000000006044820152606401610d6f565b6112db838383614373565b61407d8282612710565b6115c557614095816001600160a01b0316601461442b565b6140a083602061442b565b6040516020016140b192919061555d565b60408051601f198184030181529082905262461bcd60e51b8252610d6f91600401614837565b60006001600160a01b0384163b156141ca57604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061411b9033908990889088906004016155d2565b6020604051808303816000875af1925050508015614156575060408051601f3d908101601f191682019092526141539181019061560f565b60015b6141b0573d808015614184576040519150601f19603f3d011682016040523d82523d6000602084013e614189565b606091505b5080516141a85760405162461bcd60e51b8152600401610d6f9061550b565b805181602001fd5b6001600160e01b031916630a85bd0160e11b14905061318a565b506001949350505050565b60006001600160e01b031982166380ac58cd60e01b148061420657506001600160e01b03198216635b5e139f60e01b145b80610d4657506301ffc9a760e01b6001600160e01b0319831614610d46565b6001600160a01b03821661427b5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610d6f565b6000818152600260205260409020546001600160a01b0316156142e05760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610d6f565b6142ec60008383613ffc565b6001600160a01b0382166000908152600360205260408120805460019290614315908490614dd6565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6001600160a01b0383166143ce576143c981600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b6143f1565b816001600160a01b0316836001600160a01b0316146143f1576143f183826145ce565b6001600160a01b038216614408576112db8161466b565b826001600160a01b0316826001600160a01b0316146112db576112db828261471a565b6060600061443a83600261511c565b614445906002614dd6565b67ffffffffffffffff81111561445d5761445d614b80565b6040519080825280601f01601f191660200182016040528015614487576020820181803683370190505b509050600360fc1b816000815181106144a2576144a2615197565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106144d1576144d1615197565b60200101906001600160f81b031916908160001a90535060006144f584600261511c565b614500906001614dd6565b90505b6001811115614578576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061453457614534615197565b1a60f81b82828151811061454a5761454a615197565b60200101906001600160f81b031916908160001a90535060049490941c93614571816154f4565b9050614503565b5083156145c75760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610d6f565b9392505050565b600060016145db84612509565b6145e59190614dee565b600083815260076020526040902054909150808214614638576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b60085460009061467d90600190614dee565b600083815260096020526040812054600880549394509092849081106146a5576146a5615197565b9060005260206000200154905080600883815481106146c6576146c6615197565b60009182526020808320909101929092558281526009909152604080822084905585825281205560088054806146fe576146fe61562c565b6001900381819060005260206000200160009055905550505050565b600061472583612509565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b6001600160e01b0319811681146117c257600080fd5b60006020828403121561478657600080fd5b81356145c78161475e565b6001600160a01b03811681146117c257600080fd5b6000806000606084860312156147bb57600080fd5b833592506020840135915060408401356147d481614791565b809150509250925092565b60005b838110156147fa5781810151838201526020016147e2565b838111156128f55750506000910152565b600081518084526148238160208601602086016147df565b601f01601f19169290920160200192915050565b6020815260006145c7602083018461480b565b60006020828403121561485c57600080fd5b5035919050565b6000806040838503121561487657600080fd5b823561488181614791565b946020939093013593505050565b6000806000606084860312156148a457600080fd5b83356148af81614791565b925060208401356148bf81614791565b929592945050506040919091013590565b60008083601f8401126148e257600080fd5b50813567ffffffffffffffff8111156148fa57600080fd5b6020830191508360208260051b850101111561491557600080fd5b9250929050565b80151581146117c257600080fd5b60008060008060006060868803121561494257600080fd5b853567ffffffffffffffff8082111561495a57600080fd5b61496689838a016148d0565b9097509550602088013591508082111561497f57600080fd5b5061498c888289016148d0565b90945092505060408601356149a08161491c565b809150509295509295909350565b600080604083850312156149c157600080fd5b8235915060208301356149d381614791565b809150509250929050565b6000602082840312156149f057600080fd5b81356145c78161491c565b600060208284031215614a0d57600080fd5b81356145c781614791565b60008060008060008060008060c0898b031215614a3457600080fd5b883597506020890135965060408901359550606089013567ffffffffffffffff80821115614a6157600080fd5b614a6d8c838d016148d0565b909750955060808b0135915080821115614a8657600080fd5b50614a938b828c016148d0565b90945092505060a0890135614aa78161491c565b809150509295985092959890939650565b60008060408385031215614acb57600080fd5b8235915060208301356149d38161491c565b600080600060408486031215614af257600080fd5b833567ffffffffffffffff811115614b0957600080fd5b614b15868287016148d0565b90945092505060208401356147d48161491c565b60008060408385031215614b3c57600080fd5b8235614b4781614791565b915060208301356149d38161491c565b600060208284031215614b6957600080fd5b81356001600160801b03811681146145c757600080fd5b634e487b7160e01b600052604160045260246000fd5b604051610140810167ffffffffffffffff81118282101715614bba57614bba614b80565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715614be957614be9614b80565b604052919050565b600067ffffffffffffffff821115614c0b57614c0b614b80565b50601f01601f191660200190565b60008060008060808587031215614c2f57600080fd5b8435614c3a81614791565b93506020850135614c4a81614791565b925060408501359150606085013567ffffffffffffffff811115614c6d57600080fd5b8501601f81018713614c7e57600080fd5b8035614c91614c8c82614bf1565b614bc0565b818152886020838501011115614ca657600080fd5b8160208401602083013760006020838301015280935050505092959194509250565b60008060408385031215614cdb57600080fd5b50508035926020909101359150565b60008060408385031215614cfd57600080fd5b8235614d0881614791565b915060208301356149d381614791565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60208082526016908201527514d353d314925391ce9050d0d154d4d7d1115392515160521b604082015260600190565b60208082526021908201527f534d4f4c52494e473a464f5247494e475f434f4e54524143545f4e4f545f53456040820152601560fa1b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b60008219821115614de957614de9614dc0565b500190565b600082821015614e0057614e00614dc0565b500390565b60208082526028908201527f534d4f4c52494e473a4d41585f414c4c4f57414e43455f5045525f424154434860408201526717d4915050d2115160c21b606082015260800190565b8051614e588161491c565b919050565b8051614e5881614791565b805160ff81168114614e5857600080fd5b600082601f830112614e8a57600080fd5b8151614e98614c8c82614bf1565b818152846020838601011115614ead57600080fd5b61318a8260208301602087016147df565b600060208284031215614ed057600080fd5b815167ffffffffffffffff80821115614ee857600080fd5b908301906101408286031215614efd57600080fd5b614f05614b96565b614f0e83614e4d565b8152614f1c60208401614e4d565b6020820152614f2d60408401614e5d565b6040820152614f3e60608401614e68565b60608201526080830151608082015260a083015160a082015260c083015160c082015260e083015160e08201526101008084015183811115614f7f57600080fd5b614f8b88828701614e79565b8284015250506101208084015183811115614fa557600080fd5b614fb188828701614e79565b918301919091525095945050505050565b60208082526025908201527f534d4f4c52494e473a545950455f4e4f545f414c4c4f5745445f464f525f464f6040820152645247494e4760d81b606082015260800190565b600060001982141561501b5761501b614dc0565b5060010190565b600181811c9082168061503657607f821691505b6020821081141561505757634e487b7160e01b600052602260045260246000fd5b50919050565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b60208082526018908201527f534d4f4c52494e473a434f4e54524143545f43414c4c45520000000000000000604082015260600190565b6020808252601e908201527f534d4f4c52494e473a4d494e54494e475f305f4e4f545f414c4c4f5745440000604082015260600190565b600081600019048311821515161561513657615136614dc0565b500290565b60006020828403121561514d57600080fd5b5051919050565b60208082526023908201527f534d4f4c52494e473a4e4f545f454e4f5547485f4d414749435f494e5f57414c60408201526213115560ea1b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b60006001600160801b03838116908316818110156151cd576151cd614dc0565b039392505050565b60208082526022908201527f534d4f4c52494e473a544f54414c5f52494e475f414d4f554e545f5245414348604082015261115160f21b606082015260800190565b81835260006001600160fb1b0383111561523057600080fd5b8260051b8083602087013760009401602001938452509192915050565b60018060a01b038916815287602082015286604082015285606082015260c06080820152600061528160c083018688615217565b82810360a0840152615294818587615217565b9b9a5050505050505050505050565b6000602082840312156152b557600080fd5b81516145c78161491c565b602080825260169082015275534d4f4c52494e473a494e56414c49445f505249434560501b604082015260600190565b60006020828403121561530257600080fd5b815167ffffffffffffffff81111561531957600080fd5b61318a84828501614e79565b600081516153378185602086016147df565b9290920192915050565b6a7b226e616d65223a20222360a81b8152845160009061536881600b850160208a016147df565b7f222c20226465736372697074696f6e223a2022536d6f6c2052696e6773222c20600b918401918201527f2265787465726e616c5f75726c223a2268747470733a2f2f7777772e736d6f6c602b8201527437bb32973c3cbd179116101134b6b0b3b2911d101160591b604b82015285516153e9816060840160208a016147df565b7f222c202261747472696275746573223a205b7b2274726169745f74797065223a606092909101918201527210112a3cb832911610113b30b63ab2911d101160691b608082015284516154438160938401602089016147df565b7f227d2c7b2274726169745f74797065223a202252657761726420466163746f72609392909101918201526c111610113b30b63ab2911d101160991b60b38201526154a461549460c0830186615325565b63227d5d7d60e01b815260040190565b979650505050505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c0000008152600082516154e781601d8501602087016147df565b91909101601d0192915050565b60008161550357615503614dc0565b506000190190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516155958160178501602088016147df565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516155c68160288401602088016147df565b01602801949350505050565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906156059083018461480b565b9695505050505050565b60006020828403121561562157600080fd5b81516145c78161475e565b634e487b7160e01b600052603160045260246000fdfe523a704056dcd17bcf83bed8b68c59416dac1119be77755efe3bde0a64e46e0c0a51588b1664495f089dd83d2d26f247920f94a57a4a09f20cf068efc8f82bd4a164736f6c634300080b000a
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000004046c2b351d32441028c510427cd5544cb1e3589000000000000000000000000eb3c504e489a24fa7f5616effa06f1ee3279f851000000000000000000000000539bde0d7dbd336b79148aa742883198bbf60342000000000000000000000000edcf75f015d26af495adeb41c255dad3593b306200000000000000000000000046a3f45aadcdfaafdd88c1f54aa7806135b281ad0000000000000000000000000eb468f89e5bcfa4c933c8982d8d19554e101cfe00000000000000000000000006c244a9bafbc96e609a8df32a07178552c7295a0000000000000000000000000eb468f89e5bcfa4c933c8982d8d19554e101cfe
-----Decoded View---------------
Arg [0] : smolBrainsOwnerResolver_ (address): 0x4046C2b351d32441028c510427cD5544cB1e3589
Arg [1] : smolBodiesOwnerResolver_ (address): 0xeb3C504e489A24fa7f5616Effa06F1EE3279F851
Arg [2] : magic_ (address): 0x539bdE0d7Dbd336b79148AA742883198BBF60342
Arg [3] : ringDistributor_ (address): 0xEDCF75F015d26Af495aDeb41c255dad3593b3062
Arg [4] : smoloveActionsVault_ (address): 0x46A3F45AAdcDFAAfdD88c1f54aa7806135B281AD
Arg [5] : treasury_ (address): 0x0eB468F89E5bcFA4c933c8982D8d19554e101cfe
Arg [6] : operator_ (address): 0x06C244a9BaFBC96E609A8DF32A07178552C7295a
Arg [7] : admin_ (address): 0x0eB468F89E5bcFA4c933c8982D8d19554e101cfe
-----Encoded View---------------
8 Constructor Arguments found :
Arg [0] : 0000000000000000000000004046c2b351d32441028c510427cd5544cb1e3589
Arg [1] : 000000000000000000000000eb3c504e489a24fa7f5616effa06f1ee3279f851
Arg [2] : 000000000000000000000000539bde0d7dbd336b79148aa742883198bbf60342
Arg [3] : 000000000000000000000000edcf75f015d26af495adeb41c255dad3593b3062
Arg [4] : 00000000000000000000000046a3f45aadcdfaafdd88c1f54aa7806135b281ad
Arg [5] : 0000000000000000000000000eb468f89e5bcfa4c933c8982d8d19554e101cfe
Arg [6] : 00000000000000000000000006c244a9bafbc96e609a8df32a07178552c7295a
Arg [7] : 0000000000000000000000000eb468f89e5bcfa4c933c8982d8d19554e101cfe
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.