Transactions
Token Transfers
Internal Transactions
Coin Balance History
Logs
Code
Read Contract
Write Contract
Warning! Contract bytecode has been changed and doesn't match the verified one. Therefore, interaction with this smart contract may be risky.
This contract has been verified via Sourcify.
View contract in Sourcify repository
- Contract name:
- GenesisSupply
- Optimization enabled
- false
- Compiler version
- v0.8.7+commit.e28d00a7
- EVM Version
- london
- Verified at
- 2026-04-26T23:59:10.617368Z
Constructor Arguments
000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb7952000000000000000000000000514910771af9ca656af840dff83e8264ecf986caaa77729d3466ca35ae8d28b3bbac7cc36a5031efdc430821c02bc31a238af4450000000000000000000000000000000000000000000000001bc16d674ec80000
Arg [0] (address) : 0xf0d54349addcf704f77ae15b96510dea15cb7952
Arg [1] (address) : 0x514910771af9ca656af840dff83e8264ecf986ca
Arg [2] (bytes32) : aa77729d3466ca35ae8d28b3bbac7cc36a5031efdc430821c02bc31a238af445
Arg [3] (uint256) : 2000000000000000000
contracts/GenesisSupply.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@chainlink/contracts/src/v0.8/VRFConsumerBase.sol";
contract GenesisSupply is VRFConsumerBase, AccessControl {
using Counters for Counters.Counter;
enum TokenType {
NONE,
GOD,
DEMI_GOD,
ELEMENTAL
}
enum TokenSubtype {
NONE,
CREATIVE,
DESTRUCTIVE,
AIR,
EARTH,
ELECTRICITY,
FIRE,
MAGMA,
METAL,
WATER
}
struct TokenTraits {
TokenType tokenType;
TokenSubtype tokenSubtype;
}
/**
* Chainlink VRF
*/
bytes32 private keyHash;
uint256 private fee;
uint256 private seed;
bytes32 private randomizationRequestId;
/**
* Supply
*/
uint256 public constant MAX_SUPPLY = 1001;
uint256 public constant GODS_MAX_SUPPLY = 51;
uint256 public constant DEMI_GODS_MAX_SUPPLY = 400;
uint256 public constant DEMI_GODS_SUBTYPE_MAX_SUPPLY = 200;
uint256 public constant ELEMENTALS_MAX_SUPPLY = 550;
uint256 public constant ELEMENTALS_MAJOR_SUBTYPE_MAX_SUPPLY = 100;
uint256 public constant ELEMENTALS_MINOR_SUBTYPE_MAX_SUPPLY = 50;
uint256 public constant RESERVED_GODS_MAX_SUPPLY = 6;
/**
* Counters
*/
Counters.Counter private tokenCounter;
Counters.Counter private godsCounter;
Counters.Counter private creativeDemiGodsCounter;
Counters.Counter private destructiveDemiGodsCounter;
Counters.Counter private earthElementalsCounter;
Counters.Counter private waterElementalsCounter;
Counters.Counter private fireElementalsCounter;
Counters.Counter private airElementalsCounter;
Counters.Counter private electricityElementalsCounter;
Counters.Counter private metalElementalsCounter;
Counters.Counter private magmaElementalsCounter;
Counters.Counter private reservedGodsTransfered;
/**
* Minting properties
*/
mapping(uint256 => TokenTraits) private tokenIdToTraits;
/**
* Utils
*/
bool public isRevealed;
bytes32 public constant GENESIS_ROLE = keccak256("GENESIS_ROLE");
constructor(
address vrfCoordinator,
address linkToken,
bytes32 _keyhash,
uint256 _fee
) VRFConsumerBase(vrfCoordinator, linkToken) {
_grantRole(DEFAULT_ADMIN_ROLE, msg.sender);
keyHash = _keyhash;
fee = _fee;
isRevealed = false;
// reserve 6 gods for owner
for (uint256 i = 0; i < RESERVED_GODS_MAX_SUPPLY; i++) {
godsCounter.increment();
tokenCounter.increment();
}
}
/**
* Setters
*/
function setIsRevealed(bool _isRevealed) external onlyRole(GENESIS_ROLE) {
isRevealed = _isRevealed;
}
/**
* Getters
*/
/**
* Returns the current index to mint
* @return index current index of the collection
*/
function currentIndex() public view returns (uint256 index) {
return tokenCounter.current();
}
/**
* Returns the number of reserved gods left with the supply
* @return index current index of reserved gods
* @return supply max supply of reserved gods
*/
function reservedGodsCurrentIndexAndSupply()
public
view
onlyRole(GENESIS_ROLE)
returns (uint256 index, uint256 supply)
{
return (reservedGodsTransfered.current(), RESERVED_GODS_MAX_SUPPLY);
}
/**
* Minting functions
*/
/**
* Mint a token
* @param count the number of item to mint
* @return startIndex index of first mint
* @return endIndex index of last mint
*/
function mint(uint256 count)
public
onlyRole(GENESIS_ROLE)
seedGenerated
returns (uint256 startIndex, uint256 endIndex)
{
require(
tokenCounter.current() + count < MAX_SUPPLY + 1,
"Not enough supply"
);
uint256 firstTokenId = tokenCounter.current();
for (uint256 i = 0; i < count; i++) {
uint256 nextTokenId = firstTokenId + i;
tokenIdToTraits[nextTokenId] = generateRandomTraits(
generateRandomNumber(nextTokenId)
);
tokenCounter.increment();
}
return (firstTokenId, firstTokenId + count);
}
/**
* Mint reserved gods
* This function needs to be ran BEFORE the mint is opened to avoid
* @param count number of gods to transfer
*/
function mintReservedGods(uint256 count) public onlyRole(GENESIS_ROLE) {
uint256 nextIndex = reservedGodsTransfered.current();
// Here we don't need to increment counter and god supply counter because we already do in the constructor
// to not initialize the counters at 0
for (uint256 i = nextIndex; i < count + nextIndex; i++) {
tokenIdToTraits[i] = TokenTraits(TokenType.GOD, TokenSubtype.NONE);
reservedGodsTransfered.increment();
}
}
/**
* Will request a random number from Chainlink to be stored privately in the contract
*/
function generateSeed() external onlyRole(DEFAULT_ADMIN_ROLE) {
require(seed == 0, "Seed already generated");
require(randomizationRequestId == 0, "Randomization already started");
require(LINK.balanceOf(address(this)) >= fee, "Not enough LINK");
randomizationRequestId = requestRandomness(keyHash, fee);
}
/**
* Callback when a random number gets generated
* @param requestId id of the request sent to Chainlink
* @param randomNumber random number returned by Chainlink
*/
function fulfillRandomness(bytes32 requestId, uint256 randomNumber)
internal
override
{
require(requestId == randomizationRequestId, "Invalid requestId");
require(seed == 0, "Seed already generated");
seed = randomNumber;
}
/**
* Metadata functions
*/
/**
* @dev Generates a uint256 random number from seed, nonce and transaction block
* @param nonce The nonce to be used for the randomization
* @return randomNumber random number generated
*/
function generateRandomNumber(uint256 nonce)
private
view
seedGenerated
returns (uint256 randomNumber)
{
return
uint256(keccak256(abi.encodePacked(block.timestamp, nonce, seed)));
}
/**
* Generate and returns the token traits (type & subtype) given a random number.
* Function will adjust supply based on the type and subtypes generated
* @param randomNumber random number provided
* @return tokenTraits randomly picked token traits
*/
function generateRandomTraits(uint256 randomNumber)
private
returns (TokenTraits memory tokenTraits)
{
// GODS
uint256 godsLeft = GODS_MAX_SUPPLY - godsCounter.current();
// DEMI-GODS
uint256 creativeDemiGodsLeft = DEMI_GODS_SUBTYPE_MAX_SUPPLY -
creativeDemiGodsCounter.current();
uint256 destructiveDemiGodsLeft = DEMI_GODS_SUBTYPE_MAX_SUPPLY -
destructiveDemiGodsCounter.current();
uint256 demiGodsLeft = creativeDemiGodsLeft + destructiveDemiGodsLeft;
// ELEMENTALS
uint256 elementalsLeft = ELEMENTALS_MAX_SUPPLY -
earthElementalsCounter.current() -
waterElementalsCounter.current() -
fireElementalsCounter.current() -
airElementalsCounter.current() -
electricityElementalsCounter.current() -
metalElementalsCounter.current() -
magmaElementalsCounter.current();
uint256 totalCountLeft = godsLeft + demiGodsLeft + elementalsLeft;
// We add 1 to modulos because we use the counts to define the type. If a count is at 0, we ignore it.
// That's why we don't ever want the modulo to return 0.
uint256 randomTypeIndex = (randomNumber % totalCountLeft) + 1;
if (randomTypeIndex <= godsLeft) {
godsCounter.increment();
return TokenTraits(TokenType.GOD, TokenSubtype.NONE);
} else if (randomTypeIndex <= godsLeft + demiGodsLeft) {
uint256 randomSubtypeIndex = (randomNumber % demiGodsLeft) + 1;
if (randomSubtypeIndex <= creativeDemiGodsLeft) {
creativeDemiGodsCounter.increment();
return TokenTraits(TokenType.DEMI_GOD, TokenSubtype.CREATIVE);
} else {
destructiveDemiGodsCounter.increment();
return
TokenTraits(TokenType.DEMI_GOD, TokenSubtype.DESTRUCTIVE);
}
} else {
return generateElementalSubtype(randomNumber);
}
}
function generateElementalSubtype(uint256 randomNumber)
private
returns (TokenTraits memory traits)
{
// ELEMENTALS
uint256 earthElementalsLeft = ELEMENTALS_MAJOR_SUBTYPE_MAX_SUPPLY -
earthElementalsCounter.current();
uint256 waterElementalsLeft = ELEMENTALS_MAJOR_SUBTYPE_MAX_SUPPLY -
waterElementalsCounter.current();
uint256 fireElementalsLeft = ELEMENTALS_MAJOR_SUBTYPE_MAX_SUPPLY -
fireElementalsCounter.current();
uint256 airElementalsLeft = ELEMENTALS_MAJOR_SUBTYPE_MAX_SUPPLY -
airElementalsCounter.current();
uint256 electricityElementalsLeft = ELEMENTALS_MINOR_SUBTYPE_MAX_SUPPLY -
electricityElementalsCounter.current();
uint256 metalElementalsLeft = ELEMENTALS_MINOR_SUBTYPE_MAX_SUPPLY -
metalElementalsCounter.current();
uint256 magmaElementalsLeft = ELEMENTALS_MINOR_SUBTYPE_MAX_SUPPLY -
magmaElementalsCounter.current();
uint256 elementalsLeft = earthElementalsLeft +
waterElementalsLeft +
fireElementalsLeft +
airElementalsLeft +
electricityElementalsLeft +
metalElementalsLeft +
magmaElementalsLeft;
uint256 randomSubtypeIndex = (randomNumber % elementalsLeft) + 1;
if (randomSubtypeIndex <= earthElementalsLeft) {
earthElementalsCounter.increment();
return TokenTraits(TokenType.ELEMENTAL, TokenSubtype.EARTH);
} else if (
randomSubtypeIndex <= earthElementalsLeft + waterElementalsLeft
) {
waterElementalsCounter.increment();
return TokenTraits(TokenType.ELEMENTAL, TokenSubtype.WATER);
} else if (
randomSubtypeIndex <=
earthElementalsLeft + waterElementalsLeft + fireElementalsLeft
) {
fireElementalsCounter.increment();
return TokenTraits(TokenType.ELEMENTAL, TokenSubtype.FIRE);
} else if (
randomSubtypeIndex <=
earthElementalsLeft +
waterElementalsLeft +
fireElementalsLeft +
airElementalsLeft
) {
airElementalsCounter.increment();
return TokenTraits(TokenType.ELEMENTAL, TokenSubtype.AIR);
} else if (
randomSubtypeIndex <=
earthElementalsLeft +
waterElementalsLeft +
fireElementalsLeft +
airElementalsLeft +
electricityElementalsLeft
) {
electricityElementalsCounter.increment();
return TokenTraits(TokenType.ELEMENTAL, TokenSubtype.ELECTRICITY);
} else if (
randomSubtypeIndex <=
earthElementalsLeft +
waterElementalsLeft +
fireElementalsLeft +
airElementalsLeft +
electricityElementalsLeft +
metalElementalsLeft
) {
metalElementalsCounter.increment();
return TokenTraits(TokenType.ELEMENTAL, TokenSubtype.METAL);
} else {
magmaElementalsCounter.increment();
return TokenTraits(TokenType.ELEMENTAL, TokenSubtype.MAGMA);
}
}
/**
* Returns the metadata of a token
* @param tokenId id of the token
* @return traits metadata of the token
*/
function getMetadataForTokenId(uint256 tokenId)
public
view
validTokenId(tokenId)
returns (TokenTraits memory traits)
{
require(isRevealed, "Not revealed yet");
return tokenIdToTraits[tokenId];
}
/**
* Modifiers
*/
/**
* Modifier that checks for a valid tokenId
* @param tokenId token id
*/
modifier validTokenId(uint256 tokenId) {
require(tokenId < MAX_SUPPLY, "Invalid tokenId");
require(tokenId >= 0, "Invalid tokenId");
_;
}
/**
* Modifier that checks if seed is generated
*/
modifier seedGenerated() {
require(seed > 0, "Seed not generated");
_;
}
}
/
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (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.0 (utils/Counters.sol)
pragma solidity ^0.8.0;
/**
* @title Counters
* @author Matt Condon (@shrugs)
* @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number
* of elements in a mapping, issuing ERC721 ids, or counting request ids.
*
* Include with `using Counters for Counters.Counter;`
*/
library Counters {
struct Counter {
// This variable should never be directly accessed by users of the library: interactions must be restricted to
// the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add
// this feature: see https://github.com/ethereum/solidity/issues/4637
uint256 _value; // default: 0
}
function current(Counter storage counter) internal view returns (uint256) {
return counter._value;
}
function increment(Counter storage counter) internal {
unchecked {
counter._value += 1;
}
}
function decrement(Counter storage counter) internal {
uint256 value = counter._value;
require(value > 0, "Counter: decrement overflow");
unchecked {
counter._value = value - 1;
}
}
function reset(Counter storage counter) internal {
counter._value = 0;
}
}
/
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (access/AccessControl.sol)
pragma solidity ^0.8.0;
import "./IAccessControl.sol";
import "../utils/Context.sol";
import "../utils/Strings.sol";
import "../utils/introspection/ERC165.sol";
/**
* @dev Contract module that allows children to implement role-based access
* control mechanisms. This is a lightweight version that doesn't allow enumerating role
* members except through off-chain means by accessing the contract event logs. Some
* applications may benefit from on-chain enumerability, for those cases see
* {AccessControlEnumerable}.
*
* Roles are referred to by their `bytes32` identifier. These should be exposed
* in the external API and be unique. The best way to achieve this is by
* using `public constant` hash digests:
*
* ```
* bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
* ```
*
* Roles can be used to represent a set of permissions. To restrict access to a
* function call, use {hasRole}:
*
* ```
* function foo() public {
* require(hasRole(MY_ROLE, msg.sender));
* ...
* }
* ```
*
* Roles can be granted and revoked dynamically via the {grantRole} and
* {revokeRole} functions. Each role has an associated admin role, and only
* accounts that have a role's admin role can call {grantRole} and {revokeRole}.
*
* By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
* that only accounts with this role will be able to grant or revoke other
* roles. More complex role relationships can be created by using
* {_setRoleAdmin}.
*
* WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
* grant and revoke this role. Extra precautions should be taken to secure
* accounts that have been granted it.
*/
abstract contract AccessControl is Context, IAccessControl, ERC165 {
struct RoleData {
mapping(address => bool) members;
bytes32 adminRole;
}
mapping(bytes32 => RoleData) private _roles;
bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;
/**
* @dev Modifier that checks that an account has a specific role. Reverts
* with a standardized message including the required role.
*
* The format of the revert reason is given by the following regular expression:
*
* /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
*
* _Available since v4.1._
*/
modifier onlyRole(bytes32 role) {
_checkRole(role, _msgSender());
_;
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);
}
/**
* @dev Returns `true` if `account` has been granted `role`.
*/
function hasRole(bytes32 role, address account) public view override returns (bool) {
return _roles[role].members[account];
}
/**
* @dev Revert with a standard message if `account` is missing `role`.
*
* The format of the revert reason is given by the following regular expression:
*
* /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
*/
function _checkRole(bytes32 role, address account) internal view {
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 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());
}
}
}
/VRFRequestIDBase.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
contract VRFRequestIDBase {
/**
* @notice returns the seed which is actually input to the VRF coordinator
*
* @dev To prevent repetition of VRF output due to repetition of the
* @dev user-supplied seed, that seed is combined in a hash with the
* @dev user-specific nonce, and the address of the consuming contract. The
* @dev risk of repetition is mostly mitigated by inclusion of a blockhash in
* @dev the final seed, but the nonce does protect against repetition in
* @dev requests which are included in a single block.
*
* @param _userSeed VRF seed input provided by user
* @param _requester Address of the requesting contract
* @param _nonce User-specific nonce at the time of the request
*/
function makeVRFInputSeed(
bytes32 _keyHash,
uint256 _userSeed,
address _requester,
uint256 _nonce
)
internal
pure
returns (
uint256
)
{
return uint256(keccak256(abi.encode(_keyHash, _userSeed, _requester, _nonce)));
}
/**
* @notice Returns the id for this request
* @param _keyHash The serviceAgreement ID to be used for this request
* @param _vRFInputSeed The seed to be passed directly to the VRF
* @return The id for this request
*
* @dev Note that _vRFInputSeed is not the seed passed by the consuming
* @dev contract, but the one generated by makeVRFInputSeed
*/
function makeRequestId(
bytes32 _keyHash,
uint256 _vRFInputSeed
)
internal
pure
returns (
bytes32
)
{
return keccak256(abi.encodePacked(_keyHash, _vRFInputSeed));
}
}
/interfaces/LinkTokenInterface.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
interface LinkTokenInterface {
function allowance(
address owner,
address spender
)
external
view
returns (
uint256 remaining
);
function approve(
address spender,
uint256 value
)
external
returns (
bool success
);
function balanceOf(
address owner
)
external
view
returns (
uint256 balance
);
function decimals()
external
view
returns (
uint8 decimalPlaces
);
function decreaseApproval(
address spender,
uint256 addedValue
)
external
returns (
bool success
);
function increaseApproval(
address spender,
uint256 subtractedValue
) external;
function name()
external
view
returns (
string memory tokenName
);
function symbol()
external
view
returns (
string memory tokenSymbol
);
function totalSupply()
external
view
returns (
uint256 totalTokensIssued
);
function transfer(
address to,
uint256 value
)
external
returns (
bool success
);
function transferAndCall(
address to,
uint256 value,
bytes calldata data
)
external
returns (
bool success
);
function transferFrom(
address from,
address to,
uint256 value
)
external
returns (
bool success
);
}
/IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (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);
}
/ERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (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.0 (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.0 (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;
}
/VRFConsumerBase.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./interfaces/LinkTokenInterface.sol";
import "./VRFRequestIDBase.sol";
/** ****************************************************************************
* @notice Interface for contracts using VRF randomness
* *****************************************************************************
* @dev PURPOSE
*
* @dev Reggie the Random Oracle (not his real job) wants to provide randomness
* @dev to Vera the verifier in such a way that Vera can be sure he's not
* @dev making his output up to suit himself. Reggie provides Vera a public key
* @dev to which he knows the secret key. Each time Vera provides a seed to
* @dev Reggie, he gives back a value which is computed completely
* @dev deterministically from the seed and the secret key.
*
* @dev Reggie provides a proof by which Vera can verify that the output was
* @dev correctly computed once Reggie tells it to her, but without that proof,
* @dev the output is indistinguishable to her from a uniform random sample
* @dev from the output space.
*
* @dev The purpose of this contract is to make it easy for unrelated contracts
* @dev to talk to Vera the verifier about the work Reggie is doing, to provide
* @dev simple access to a verifiable source of randomness.
* *****************************************************************************
* @dev USAGE
*
* @dev Calling contracts must inherit from VRFConsumerBase, and can
* @dev initialize VRFConsumerBase's attributes in their constructor as
* @dev shown:
*
* @dev contract VRFConsumer {
* @dev constuctor(<other arguments>, address _vrfCoordinator, address _link)
* @dev VRFConsumerBase(_vrfCoordinator, _link) public {
* @dev <initialization with other arguments goes here>
* @dev }
* @dev }
*
* @dev The oracle will have given you an ID for the VRF keypair they have
* @dev committed to (let's call it keyHash), and have told you the minimum LINK
* @dev price for VRF service. Make sure your contract has sufficient LINK, and
* @dev call requestRandomness(keyHash, fee, seed), where seed is the input you
* @dev want to generate randomness from.
*
* @dev Once the VRFCoordinator has received and validated the oracle's response
* @dev to your request, it will call your contract's fulfillRandomness method.
*
* @dev The randomness argument to fulfillRandomness is the actual random value
* @dev generated from your seed.
*
* @dev The requestId argument is generated from the keyHash and the seed by
* @dev makeRequestId(keyHash, seed). If your contract could have concurrent
* @dev requests open, you can use the requestId to track which seed is
* @dev associated with which randomness. See VRFRequestIDBase.sol for more
* @dev details. (See "SECURITY CONSIDERATIONS" for principles to keep in mind,
* @dev if your contract could have multiple requests in flight simultaneously.)
*
* @dev Colliding `requestId`s are cryptographically impossible as long as seeds
* @dev differ. (Which is critical to making unpredictable randomness! See the
* @dev next section.)
*
* *****************************************************************************
* @dev SECURITY CONSIDERATIONS
*
* @dev A method with the ability to call your fulfillRandomness method directly
* @dev could spoof a VRF response with any random value, so it's critical that
* @dev it cannot be directly called by anything other than this base contract
* @dev (specifically, by the VRFConsumerBase.rawFulfillRandomness method).
*
* @dev For your users to trust that your contract's random behavior is free
* @dev from malicious interference, it's best if you can write it so that all
* @dev behaviors implied by a VRF response are executed *during* your
* @dev fulfillRandomness method. If your contract must store the response (or
* @dev anything derived from it) and use it later, you must ensure that any
* @dev user-significant behavior which depends on that stored value cannot be
* @dev manipulated by a subsequent VRF request.
*
* @dev Similarly, both miners and the VRF oracle itself have some influence
* @dev over the order in which VRF responses appear on the blockchain, so if
* @dev your contract could have multiple VRF requests in flight simultaneously,
* @dev you must ensure that the order in which the VRF responses arrive cannot
* @dev be used to manipulate your contract's user-significant behavior.
*
* @dev Since the ultimate input to the VRF is mixed with the block hash of the
* @dev block in which the request is made, user-provided seeds have no impact
* @dev on its economic security properties. They are only included for API
* @dev compatability with previous versions of this contract.
*
* @dev Since the block hash of the block which contains the requestRandomness
* @dev call is mixed into the input to the VRF *last*, a sufficiently powerful
* @dev miner could, in principle, fork the blockchain to evict the block
* @dev containing the request, forcing the request to be included in a
* @dev different block with a different hash, and therefore a different input
* @dev to the VRF. However, such an attack would incur a substantial economic
* @dev cost. This cost scales with the number of blocks the VRF oracle waits
* @dev until it calls responds to a request.
*/
abstract contract VRFConsumerBase is VRFRequestIDBase {
/**
* @notice fulfillRandomness handles the VRF response. Your contract must
* @notice implement it. See "SECURITY CONSIDERATIONS" above for important
* @notice principles to keep in mind when implementing your fulfillRandomness
* @notice method.
*
* @dev VRFConsumerBase expects its subcontracts to have a method with this
* @dev signature, and will call it once it has verified the proof
* @dev associated with the randomness. (It is triggered via a call to
* @dev rawFulfillRandomness, below.)
*
* @param requestId The Id initially returned by requestRandomness
* @param randomness the VRF output
*/
function fulfillRandomness(
bytes32 requestId,
uint256 randomness
)
internal
virtual;
/**
* @dev In order to keep backwards compatibility we have kept the user
* seed field around. We remove the use of it because given that the blockhash
* enters later, it overrides whatever randomness the used seed provides.
* Given that it adds no security, and can easily lead to misunderstandings,
* we have removed it from usage and can now provide a simpler API.
*/
uint256 constant private USER_SEED_PLACEHOLDER = 0;
/**
* @notice requestRandomness initiates a request for VRF output given _seed
*
* @dev The fulfillRandomness method receives the output, once it's provided
* @dev by the Oracle, and verified by the vrfCoordinator.
*
* @dev The _keyHash must already be registered with the VRFCoordinator, and
* @dev the _fee must exceed the fee specified during registration of the
* @dev _keyHash.
*
* @dev The _seed parameter is vestigial, and is kept only for API
* @dev compatibility with older versions. It can't *hurt* to mix in some of
* @dev your own randomness, here, but it's not necessary because the VRF
* @dev oracle will mix the hash of the block containing your request into the
* @dev VRF seed it ultimately uses.
*
* @param _keyHash ID of public key against which randomness is generated
* @param _fee The amount of LINK to send with the request
*
* @return requestId unique ID for this request
*
* @dev The returned requestId can be used to distinguish responses to
* @dev concurrent requests. It is passed as the first argument to
* @dev fulfillRandomness.
*/
function requestRandomness(
bytes32 _keyHash,
uint256 _fee
)
internal
returns (
bytes32 requestId
)
{
LINK.transferAndCall(vrfCoordinator, _fee, abi.encode(_keyHash, USER_SEED_PLACEHOLDER));
// This is the seed passed to VRFCoordinator. The oracle will mix this with
// the hash of the block containing this request to obtain the seed/input
// which is finally passed to the VRF cryptographic machinery.
uint256 vRFSeed = makeVRFInputSeed(_keyHash, USER_SEED_PLACEHOLDER, address(this), nonces[_keyHash]);
// nonces[_keyHash] must stay in sync with
// VRFCoordinator.nonces[_keyHash][this], which was incremented by the above
// successful LINK.transferAndCall (in VRFCoordinator.randomnessRequest).
// This provides protection against the user repeating their input seed,
// which would result in a predictable/duplicate output, if multiple such
// requests appeared in the same block.
nonces[_keyHash] = nonces[_keyHash] + 1;
return makeRequestId(_keyHash, vRFSeed);
}
LinkTokenInterface immutable internal LINK;
address immutable private vrfCoordinator;
// Nonces for each VRF key from which randomness has been requested.
//
// Must stay in sync with VRFCoordinator[_keyHash][this]
mapping(bytes32 /* keyHash */ => uint256 /* nonce */) private nonces;
/**
* @param _vrfCoordinator address of VRFCoordinator contract
* @param _link address of LINK token contract
*
* @dev https://docs.chain.link/docs/link-token-contracts
*/
constructor(
address _vrfCoordinator,
address _link
) {
vrfCoordinator = _vrfCoordinator;
LINK = LinkTokenInterface(_link);
}
// rawFulfillRandomness is called by VRFCoordinator when it receives a valid VRF
// proof. rawFulfillRandomness then calls fulfillRandomness, after validating
// the origin of the call
function rawFulfillRandomness(
bytes32 requestId,
uint256 randomness
)
external
{
require(msg.sender == vrfCoordinator, "Only VRFCoordinator can fulfill");
fulfillRandomness(requestId, randomness);
}
}
Compiler Settings
{"remappings":[],"optimizer":{"runs":200,"enabled":false},"metadata":{"useLiteralContent":true,"bytecodeHash":"ipfs"},"libraries":{},"evmVersion":"london","compilationTarget":{"contracts/GenesisSupply.sol":"GenesisSupply"}}
Contract ABI
[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"address","name":"vrfCoordinator","internalType":"address"},{"type":"address","name":"linkToken","internalType":"address"},{"type":"bytes32","name":"_keyhash","internalType":"bytes32"},{"type":"uint256","name":"_fee","internalType":"uint256"}]},{"type":"event","name":"RoleAdminChanged","inputs":[{"type":"bytes32","name":"role","internalType":"bytes32","indexed":true},{"type":"bytes32","name":"previousAdminRole","internalType":"bytes32","indexed":true},{"type":"bytes32","name":"newAdminRole","internalType":"bytes32","indexed":true}],"anonymous":false},{"type":"event","name":"RoleGranted","inputs":[{"type":"bytes32","name":"role","internalType":"bytes32","indexed":true},{"type":"address","name":"account","internalType":"address","indexed":true},{"type":"address","name":"sender","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"RoleRevoked","inputs":[{"type":"bytes32","name":"role","internalType":"bytes32","indexed":true},{"type":"address","name":"account","internalType":"address","indexed":true},{"type":"address","name":"sender","internalType":"address","indexed":true}],"anonymous":false},{"type":"function","stateMutability":"view","outputs":[{"type":"bytes32","name":"","internalType":"bytes32"}],"name":"DEFAULT_ADMIN_ROLE","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"DEMI_GODS_MAX_SUPPLY","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"DEMI_GODS_SUBTYPE_MAX_SUPPLY","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"ELEMENTALS_MAJOR_SUBTYPE_MAX_SUPPLY","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"ELEMENTALS_MAX_SUPPLY","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"ELEMENTALS_MINOR_SUBTYPE_MAX_SUPPLY","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bytes32","name":"","internalType":"bytes32"}],"name":"GENESIS_ROLE","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"GODS_MAX_SUPPLY","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"MAX_SUPPLY","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"RESERVED_GODS_MAX_SUPPLY","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"index","internalType":"uint256"}],"name":"currentIndex","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"generateSeed","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"tuple","name":"traits","internalType":"struct GenesisSupply.TokenTraits","components":[{"type":"uint8","name":"tokenType","internalType":"enum GenesisSupply.TokenType"},{"type":"uint8","name":"tokenSubtype","internalType":"enum GenesisSupply.TokenSubtype"}]}],"name":"getMetadataForTokenId","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bytes32","name":"","internalType":"bytes32"}],"name":"getRoleAdmin","inputs":[{"type":"bytes32","name":"role","internalType":"bytes32"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"grantRole","inputs":[{"type":"bytes32","name":"role","internalType":"bytes32"},{"type":"address","name":"account","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"hasRole","inputs":[{"type":"bytes32","name":"role","internalType":"bytes32"},{"type":"address","name":"account","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"isRevealed","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"uint256","name":"startIndex","internalType":"uint256"},{"type":"uint256","name":"endIndex","internalType":"uint256"}],"name":"mint","inputs":[{"type":"uint256","name":"count","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"mintReservedGods","inputs":[{"type":"uint256","name":"count","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"rawFulfillRandomness","inputs":[{"type":"bytes32","name":"requestId","internalType":"bytes32"},{"type":"uint256","name":"randomness","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceRole","inputs":[{"type":"bytes32","name":"role","internalType":"bytes32"},{"type":"address","name":"account","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"index","internalType":"uint256"},{"type":"uint256","name":"supply","internalType":"uint256"}],"name":"reservedGodsCurrentIndexAndSupply","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"revokeRole","inputs":[{"type":"bytes32","name":"role","internalType":"bytes32"},{"type":"address","name":"account","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setIsRevealed","inputs":[{"type":"bool","name":"_isRevealed","internalType":"bool"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"supportsInterface","inputs":[{"type":"bytes4","name":"interfaceId","internalType":"bytes4"}]}]
Contract Creation Code
0x60c06040523480156200001157600080fd5b50604051620031b8380380620031b8833981810160405281019062000037919062000302565b83838173ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff1660601b815250508073ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1660601b815250505050620000be6000801b336200014360201b60201c565b81600281905550806003819055506000601360006101000a81548160ff02191690831515021790555060005b600681101562000138576200010b60076200023460201b62000e3f1760201c565b6200012260066200023460201b62000e3f1760201c565b80806200012f90620003bc565b915050620000ea565b50505050506200048c565b6200015582826200024a60201b60201c565b6200023057600180600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550620001d5620002b560201b60201c565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b6001816000016000828254019250508190555050565b60006001600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b600033905090565b600081519050620002ce816200043e565b92915050565b600081519050620002e58162000458565b92915050565b600081519050620002fc8162000472565b92915050565b600080600080608085870312156200031f576200031e62000439565b5b60006200032f87828801620002bd565b94505060206200034287828801620002bd565b93505060406200035587828801620002d4565b92505060606200036887828801620002eb565b91505092959194509250565b6000620003818262000392565b9050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b6000620003c982620003b2565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415620003ff57620003fe6200040a565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600080fd5b620004498162000374565b81146200045557600080fd5b50565b620004638162000388565b81146200046f57600080fd5b50565b6200047d81620003b2565b81146200048957600080fd5b50565b60805160601c60a05160601c612cf2620004c660003960008181610a2901526111740152600081816106c901526111380152612cf26000f3fe608060405234801561001057600080fd5b50600436106101735760003560e01c80637c7cd713116100de578063a217fddf11610097578063c426ceb911610071578063c426ceb91461042d578063d547741f1461044b578063ea50e78c14610467578063f3df656d1461048357610173565b8063a217fddf146103d3578063aaeb0747146103f1578063c070e4a01461040f57610173565b80637c7cd713146102ea578063842e05ea146103085780638a5f36f01461032657806391d148541461035657806394985ddd14610386578063a0712d68146103a257610173565b806336568abe1161013057806336568abe1461024e578063399da5851461026a57806349a5980a1461027457806354214f69146102905780635f3088ca146102ae57806376d7079a146102cc57610173565b806301ffc9a714610178578063055860e9146101a8578063248a9ca3146101c657806326987b60146101f65780632f2ff15d1461021457806332cb6b0c14610230575b600080fd5b610192600480360381019061018d9190611ee2565b6104a2565b60405161019f9190612386565b60405180910390f35b6101b061051c565b6040516101bd91906123a1565b60405180910390f35b6101e060048036038101906101db9190611e35565b610540565b6040516101ed91906123a1565b60405180910390f35b6101fe610560565b60405161020b91906125c7565b60405180910390f35b61022e60048036038101906102299190611e62565b610571565b005b61023861059a565b60405161024591906125c7565b60405180910390f35b61026860048036038101906102639190611e62565b6105a0565b005b610272610623565b005b61028e60048036038101906102899190611ddb565b6107c8565b005b610298610818565b6040516102a59190612386565b60405180910390f35b6102b661082b565b6040516102c391906125c7565b60405180910390f35b6102d4610830565b6040516102e191906125c7565b60405180910390f35b6102f2610835565b6040516102ff91906125c7565b60405180910390f35b61031061083b565b60405161031d91906125c7565b60405180910390f35b610340600480360381019061033b9190611f0f565b610840565b60405161034d91906125ac565b60405180910390f35b610370600480360381019061036b9190611e62565b6109bc565b60405161037d9190612386565b60405180910390f35b6103a0600480360381019061039b9190611ea2565b610a27565b005b6103bc60048036038101906103b79190611f0f565b610ac3565b6040516103ca9291906125e2565b60405180910390f35b6103db610c88565b6040516103e891906123a1565b60405180910390f35b6103f9610c8f565b60405161040691906125c7565b60405180910390f35b610417610c94565b60405161042491906125c7565b60405180910390f35b610435610c9a565b60405161044291906125c7565b60405180910390f35b61046560048036038101906104609190611e62565b610c9f565b005b610481600480360381019061047c9190611f0f565b610cc8565b005b61048b610df5565b6040516104999291906125e2565b60405180910390f35b60007f7965db0b000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610515575061051482610e55565b5b9050919050565b7f2012e8ba67426d81985551a00176638f7978061e343983c916616e4b78d68d1a81565b600060016000838152602001908152602001600020600101549050919050565b600061056c6006610ebf565b905090565b61057a82610540565b61058b81610586610ecd565b610ed5565b6105958383610f72565b505050565b6103e981565b6105a8610ecd565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610615576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161060c9061258c565b60405180910390fd5b61061f8282611052565b5050565b6000801b61063881610633610ecd565b610ed5565b60006004541461067d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610674906124ac565b60405180910390fd5b6000801b600554146106c4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106bb9061244c565b60405180910390fd5b6003547f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401610720919061232d565b60206040518083038186803b15801561073857600080fd5b505afa15801561074c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107709190611f3c565b10156107b1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107a8906124ec565b60405180910390fd5b6107bf600254600354611134565b60058190555050565b7f2012e8ba67426d81985551a00176638f7978061e343983c916616e4b78d68d1a6107fa816107f5610ecd565b610ed5565b81601360006101000a81548160ff0219169083151502179055505050565b601360009054906101000a900460ff1681565b600681565b60c881565b61022681565b603281565b610848611d0a565b816103e9811061088d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610884906124cc565b60405180910390fd5b60008110156108d1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108c8906124cc565b60405180910390fd5b601360009054906101000a900460ff16610920576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109179061252c565b60405180910390fd5b601260008481526020019081526020016000206040518060400160405290816000820160009054906101000a900460ff16600381111561096357610962612943565b5b600381111561097557610974612943565b5b81526020016000820160019054906101000a900460ff16600981111561099e5761099d612943565b5b60098111156109b0576109af612943565b5b81525050915050919050565b60006001600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610ab5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610aac9061256c565b60405180910390fd5b610abf8282611293565b5050565b6000807f2012e8ba67426d81985551a00176638f7978061e343983c916616e4b78d68d1a610af881610af3610ecd565b610ed5565b600060045411610b3d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b349061254c565b60405180910390fd5b60016103e9610b4c919061264e565b84610b576006610ebf565b610b61919061264e565b10610ba1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b989061248c565b60405180910390fd5b6000610bad6006610ebf565b905060005b85811015610c6f5760008183610bc8919061264e565b9050610bdb610bd682611327565b6113a4565b6012600083815260200190815260200160002060008201518160000160006101000a81548160ff02191690836003811115610c1957610c18612943565b5b021790555060208201518160000160016101000a81548160ff02191690836009811115610c4957610c48612943565b5b0217905550905050610c5b6006610e3f565b508080610c6790612857565b915050610bb2565b50808582610c7d919061264e565b935093505050915091565b6000801b81565b606481565b61019081565b603381565b610ca882610540565b610cb981610cb4610ecd565b610ed5565b610cc38383611052565b505050565b7f2012e8ba67426d81985551a00176638f7978061e343983c916616e4b78d68d1a610cfa81610cf5610ecd565b610ed5565b6000610d066011610ebf565b905060008190505b8184610d1a919061264e565b811015610def57604051806040016040528060016003811115610d4057610d3f612943565b5b815260200160006009811115610d5957610d58612943565b5b8152506012600083815260200190815260200160002060008201518160000160006101000a81548160ff02191690836003811115610d9a57610d99612943565b5b021790555060208201518160000160016101000a81548160ff02191690836009811115610dca57610dc9612943565b5b0217905550905050610ddc6011610e3f565b8080610de790612857565b915050610d0e565b50505050565b6000807f2012e8ba67426d81985551a00176638f7978061e343983c916616e4b78d68d1a610e2a81610e25610ecd565b610ed5565b610e346011610ebf565b600692509250509091565b6001816000016000828254019250508190555050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b600081600001549050919050565b600033905090565b610edf82826109bc565b610f6e57610f048173ffffffffffffffffffffffffffffffffffffffff166014611623565b610f128360001c6020611623565b604051602001610f239291906122b6565b6040516020818303038152906040526040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f65919061242a565b60405180910390fd5b5050565b610f7c82826109bc565b61104e57600180600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550610ff3610ecd565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b61105c82826109bc565b156111305760006001600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506110d5610ecd565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45b5050565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16634000aea07f0000000000000000000000000000000000000000000000000000000000000000848660006040516020016111a89291906123bc565b6040516020818303038152906040526040518463ffffffff1660e01b81526004016111d593929190612348565b602060405180830381600087803b1580156111ef57600080fd5b505af1158015611203573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112279190611e08565b506000611249846000306000808981526020019081526020016000205461185f565b905060016000808681526020019081526020016000205461126a919061264e565b6000808681526020019081526020016000208190555061128a848261189b565b91505092915050565b60055482146112d7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112ce9061250c565b60405180910390fd5b60006004541461131c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611313906124ac565b60405180910390fd5b806004819055505050565b6000806004541161136d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113649061254c565b60405180910390fd5b4282600454604051602001611384939291906122f0565b6040516020818303038152906040528051906020012060001c9050919050565b6113ac611d0a565b60006113b86007610ebf565b60336113c491906126fe565b905060006113d26008610ebf565b60c86113de91906126fe565b905060006113ec6009610ebf565b60c86113f891906126fe565b905060008183611408919061264e565b905060006114166010610ebf565b611420600f610ebf565b61142a600e610ebf565b611434600d610ebf565b61143e600c610ebf565b611448600b610ebf565b611452600a610ebf565b61022661145f91906126fe565b61146991906126fe565b61147391906126fe565b61147d91906126fe565b61148791906126fe565b61149191906126fe565b61149b91906126fe565b905060008183876114ac919061264e565b6114b6919061264e565b905060006001828a6114c891906128b4565b6114d2919061264e565b905086811161152e576114e56007610e3f565b60405180604001604052806001600381111561150457611503612943565b5b81526020016000600981111561151d5761151c612943565b5b81525097505050505050505061161e565b838761153a919061264e565b811161160b5760006001858b61155091906128b4565b61155a919061264e565b90508681116115b75761156d6008610e3f565b60405180604001604052806002600381111561158c5761158b612943565b5b8152602001600160098111156115a5576115a4612943565b5b8152509850505050505050505061161e565b6115c16009610e3f565b6040518060400160405280600260038111156115e0576115df612943565b5b8152602001600260098111156115f9576115f8612943565b5b8152509850505050505050505061161e565b611614896118ce565b9750505050505050505b919050565b60606000600283600261163691906126a4565b611640919061264e565b67ffffffffffffffff811115611659576116586129a1565b5b6040519080825280601f01601f19166020018201604052801561168b5781602001600182028036833780820191505090505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106116c3576116c2612972565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f78000000000000000000000000000000000000000000000000000000000000008160018151811061172757611726612972565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506000600184600261176791906126a4565b611771919061264e565b90505b6001811115611811577f3031323334353637383961626364656600000000000000000000000000000000600f8616601081106117b3576117b2612972565b5b1a60f81b8282815181106117ca576117c9612972565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600485901c94508061180a9061282d565b9050611774565b5060008414611855576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161184c9061246c565b60405180910390fd5b8091505092915050565b60008484848460405160200161187894939291906123e5565b6040516020818303038152906040528051906020012060001c9050949350505050565b600082826040516020016118b092919061228a565b60405160208183030381529060405280519060200120905092915050565b6118d6611d0a565b60006118e2600a610ebf565b60646118ee91906126fe565b905060006118fc600b610ebf565b606461190891906126fe565b90506000611916600c610ebf565b606461192291906126fe565b90506000611930600d610ebf565b606461193c91906126fe565b9050600061194a600e610ebf565b603261195691906126fe565b90506000611964600f610ebf565b603261197091906126fe565b9050600061197e6010610ebf565b603261198a91906126fe565b9050600081838587898b8d61199f919061264e565b6119a9919061264e565b6119b3919061264e565b6119bd919061264e565b6119c7919061264e565b6119d1919061264e565b905060006001828c6119e391906128b4565b6119ed919061264e565b9050888111611a4a57611a00600a610e3f565b6040518060400160405280600380811115611a1e57611a1d612943565b5b815260200160046009811115611a3757611a36612943565b5b8152509950505050505050505050611d05565b8789611a56919061264e565b8111611aaf57611a66600b610e3f565b6040518060400160405280600380811115611a8457611a83612943565b5b8152602001600980811115611a9c57611a9b612943565b5b8152509950505050505050505050611d05565b86888a611abc919061264e565b611ac6919061264e565b8111611b2057611ad6600c610e3f565b6040518060400160405280600380811115611af457611af3612943565b5b815260200160066009811115611b0d57611b0c612943565b5b8152509950505050505050505050611d05565b8587898b611b2e919061264e565b611b38919061264e565b611b42919061264e565b8111611b9c57611b52600d610e3f565b6040518060400160405280600380811115611b7057611b6f612943565b5b815260200160036009811115611b8957611b88612943565b5b8152509950505050505050505050611d05565b8486888a8c611bab919061264e565b611bb5919061264e565b611bbf919061264e565b611bc9919061264e565b8111611c2357611bd9600e610e3f565b6040518060400160405280600380811115611bf757611bf6612943565b5b815260200160056009811115611c1057611c0f612943565b5b8152509950505050505050505050611d05565b838587898b8d611c33919061264e565b611c3d919061264e565b611c47919061264e565b611c51919061264e565b611c5b919061264e565b8111611cb557611c6b600f610e3f565b6040518060400160405280600380811115611c8957611c88612943565b5b815260200160086009811115611ca257611ca1612943565b5b8152509950505050505050505050611d05565b611cbf6010610e3f565b6040518060400160405280600380811115611cdd57611cdc612943565b5b815260200160076009811115611cf657611cf5612943565b5b81525099505050505050505050505b919050565b604051806040016040528060006003811115611d2957611d28612943565b5b815260200160006009811115611d4257611d41612943565b5b81525090565b600081359050611d5781612c49565b92915050565b600081359050611d6c81612c60565b92915050565b600081519050611d8181612c60565b92915050565b600081359050611d9681612c77565b92915050565b600081359050611dab81612c8e565b92915050565b600081359050611dc081612ca5565b92915050565b600081519050611dd581612ca5565b92915050565b600060208284031215611df157611df06129d0565b5b6000611dff84828501611d5d565b91505092915050565b600060208284031215611e1e57611e1d6129d0565b5b6000611e2c84828501611d72565b91505092915050565b600060208284031215611e4b57611e4a6129d0565b5b6000611e5984828501611d87565b91505092915050565b60008060408385031215611e7957611e786129d0565b5b6000611e8785828601611d87565b9250506020611e9885828601611d48565b9150509250929050565b60008060408385031215611eb957611eb86129d0565b5b6000611ec785828601611d87565b9250506020611ed885828601611db1565b9150509250929050565b600060208284031215611ef857611ef76129d0565b5b6000611f0684828501611d9c565b91505092915050565b600060208284031215611f2557611f246129d0565b5b6000611f3384828501611db1565b91505092915050565b600060208284031215611f5257611f516129d0565b5b6000611f6084828501611dc6565b91505092915050565b611f7281612732565b82525050565b611f8181612744565b82525050565b611f9081612750565b82525050565b611fa7611fa282612750565b6128a0565b82525050565b6000611fb88261260b565b611fc28185612621565b9350611fd28185602086016127fa565b611fdb816129d5565b840191505092915050565b611fef816127d6565b82525050565b611ffe816127e8565b82525050565b600061200f82612616565b6120198185612632565b93506120298185602086016127fa565b612032816129d5565b840191505092915050565b600061204882612616565b6120528185612643565b93506120628185602086016127fa565b80840191505092915050565b600061207b601d83612632565b9150612086826129e6565b602082019050919050565b600061209e602083612632565b91506120a982612a0f565b602082019050919050565b60006120c1601183612632565b91506120cc82612a38565b602082019050919050565b60006120e4601683612632565b91506120ef82612a61565b602082019050919050565b6000612107600f83612632565b915061211282612a8a565b602082019050919050565b600061212a600f83612632565b915061213582612ab3565b602082019050919050565b600061214d601183612632565b915061215882612adc565b602082019050919050565b6000612170601083612632565b915061217b82612b05565b602082019050919050565b6000612193601283612632565b915061219e82612b2e565b602082019050919050565b60006121b6601f83612632565b91506121c182612b57565b602082019050919050565b60006121d9601783612643565b91506121e482612b80565b601782019050919050565b60006121fc601183612643565b915061220782612ba9565b601182019050919050565b600061221f602f83612632565b915061222a82612bd2565b604082019050919050565b60408201600082015161224b6000850182611ff5565b50602082015161225e6020850182611fe6565b50505050565b61226d816127cc565b82525050565b61228461227f826127cc565b6128aa565b82525050565b60006122968285611f96565b6020820191506122a68284612273565b6020820191508190509392505050565b60006122c1826121cc565b91506122cd828561203d565b91506122d8826121ef565b91506122e4828461203d565b91508190509392505050565b60006122fc8286612273565b60208201915061230c8285612273565b60208201915061231c8284612273565b602082019150819050949350505050565b60006020820190506123426000830184611f69565b92915050565b600060608201905061235d6000830186611f69565b61236a6020830185612264565b818103604083015261237c8184611fad565b9050949350505050565b600060208201905061239b6000830184611f78565b92915050565b60006020820190506123b66000830184611f87565b92915050565b60006040820190506123d16000830185611f87565b6123de6020830184612264565b9392505050565b60006080820190506123fa6000830187611f87565b6124076020830186612264565b6124146040830185611f69565b6124216060830184612264565b95945050505050565b600060208201905081810360008301526124448184612004565b905092915050565b600060208201905081810360008301526124658161206e565b9050919050565b6000602082019050818103600083015261248581612091565b9050919050565b600060208201905081810360008301526124a5816120b4565b9050919050565b600060208201905081810360008301526124c5816120d7565b9050919050565b600060208201905081810360008301526124e5816120fa565b9050919050565b600060208201905081810360008301526125058161211d565b9050919050565b6000602082019050818103600083015261252581612140565b9050919050565b6000602082019050818103600083015261254581612163565b9050919050565b6000602082019050818103600083015261256581612186565b9050919050565b60006020820190508181036000830152612585816121a9565b9050919050565b600060208201905081810360008301526125a581612212565b9050919050565b60006040820190506125c16000830184612235565b92915050565b60006020820190506125dc6000830184612264565b92915050565b60006040820190506125f76000830185612264565b6126046020830184612264565b9392505050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b6000612659826127cc565b9150612664836127cc565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115612699576126986128e5565b5b828201905092915050565b60006126af826127cc565b91506126ba836127cc565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156126f3576126f26128e5565b5b828202905092915050565b6000612709826127cc565b9150612714836127cc565b925082821015612727576127266128e5565b5b828203905092915050565b600061273d826127ac565b9050919050565b60008115159050919050565b6000819050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600081905061279482612c21565b919050565b60008190506127a782612c35565b919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60006127e182612786565b9050919050565b60006127f382612799565b9050919050565b60005b838110156128185780820151818401526020810190506127fd565b83811115612827576000848401525b50505050565b6000612838826127cc565b9150600082141561284c5761284b6128e5565b5b600182039050919050565b6000612862826127cc565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415612895576128946128e5565b5b600182019050919050565b6000819050919050565b6000819050919050565b60006128bf826127cc565b91506128ca836127cc565b9250826128da576128d9612914565b5b828206905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b6000601f19601f8301169050919050565b7f52616e646f6d697a6174696f6e20616c72656164792073746172746564000000600082015250565b7f537472696e67733a20686578206c656e67746820696e73756666696369656e74600082015250565b7f4e6f7420656e6f75676820737570706c79000000000000000000000000000000600082015250565b7f5365656420616c72656164792067656e65726174656400000000000000000000600082015250565b7f496e76616c696420746f6b656e49640000000000000000000000000000000000600082015250565b7f4e6f7420656e6f756768204c494e4b0000000000000000000000000000000000600082015250565b7f496e76616c696420726571756573744964000000000000000000000000000000600082015250565b7f4e6f742072657665616c65642079657400000000000000000000000000000000600082015250565b7f53656564206e6f742067656e6572617465640000000000000000000000000000600082015250565b7f4f6e6c7920565246436f6f7264696e61746f722063616e2066756c66696c6c00600082015250565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000600082015250565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000600082015250565b7f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560008201527f20726f6c657320666f722073656c660000000000000000000000000000000000602082015250565b600a8110612c3257612c31612943565b5b50565b60048110612c4657612c45612943565b5b50565b612c5281612732565b8114612c5d57600080fd5b50565b612c6981612744565b8114612c7457600080fd5b50565b612c8081612750565b8114612c8b57600080fd5b50565b612c978161275a565b8114612ca257600080fd5b50565b612cae816127cc565b8114612cb957600080fd5b5056fea2646970667358221220f32ddd317d6f4f48a5db2f038f23c89e26122af8e3a9dd81d3b1f2828f34e9d764736f6c63430008070033000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb7952000000000000000000000000514910771af9ca656af840dff83e8264ecf986caaa77729d3466ca35ae8d28b3bbac7cc36a5031efdc430821c02bc31a238af4450000000000000000000000000000000000000000000000001bc16d674ec80000
Deployed ByteCode
0x608060405234801561001057600080fd5b50600436106101735760003560e01c80637c7cd713116100de578063a217fddf11610097578063c426ceb911610071578063c426ceb91461042d578063d547741f1461044b578063ea50e78c14610467578063f3df656d1461048357610173565b8063a217fddf146103d3578063aaeb0747146103f1578063c070e4a01461040f57610173565b80637c7cd713146102ea578063842e05ea146103085780638a5f36f01461032657806391d148541461035657806394985ddd14610386578063a0712d68146103a257610173565b806336568abe1161013057806336568abe1461024e578063399da5851461026a57806349a5980a1461027457806354214f69146102905780635f3088ca146102ae57806376d7079a146102cc57610173565b806301ffc9a714610178578063055860e9146101a8578063248a9ca3146101c657806326987b60146101f65780632f2ff15d1461021457806332cb6b0c14610230575b600080fd5b610192600480360381019061018d9190611ee2565b6104a2565b60405161019f9190612386565b60405180910390f35b6101b061051c565b6040516101bd91906123a1565b60405180910390f35b6101e060048036038101906101db9190611e35565b610540565b6040516101ed91906123a1565b60405180910390f35b6101fe610560565b60405161020b91906125c7565b60405180910390f35b61022e60048036038101906102299190611e62565b610571565b005b61023861059a565b60405161024591906125c7565b60405180910390f35b61026860048036038101906102639190611e62565b6105a0565b005b610272610623565b005b61028e60048036038101906102899190611ddb565b6107c8565b005b610298610818565b6040516102a59190612386565b60405180910390f35b6102b661082b565b6040516102c391906125c7565b60405180910390f35b6102d4610830565b6040516102e191906125c7565b60405180910390f35b6102f2610835565b6040516102ff91906125c7565b60405180910390f35b61031061083b565b60405161031d91906125c7565b60405180910390f35b610340600480360381019061033b9190611f0f565b610840565b60405161034d91906125ac565b60405180910390f35b610370600480360381019061036b9190611e62565b6109bc565b60405161037d9190612386565b60405180910390f35b6103a0600480360381019061039b9190611ea2565b610a27565b005b6103bc60048036038101906103b79190611f0f565b610ac3565b6040516103ca9291906125e2565b60405180910390f35b6103db610c88565b6040516103e891906123a1565b60405180910390f35b6103f9610c8f565b60405161040691906125c7565b60405180910390f35b610417610c94565b60405161042491906125c7565b60405180910390f35b610435610c9a565b60405161044291906125c7565b60405180910390f35b61046560048036038101906104609190611e62565b610c9f565b005b610481600480360381019061047c9190611f0f565b610cc8565b005b61048b610df5565b6040516104999291906125e2565b60405180910390f35b60007f7965db0b000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610515575061051482610e55565b5b9050919050565b7f2012e8ba67426d81985551a00176638f7978061e343983c916616e4b78d68d1a81565b600060016000838152602001908152602001600020600101549050919050565b600061056c6006610ebf565b905090565b61057a82610540565b61058b81610586610ecd565b610ed5565b6105958383610f72565b505050565b6103e981565b6105a8610ecd565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610615576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161060c9061258c565b60405180910390fd5b61061f8282611052565b5050565b6000801b61063881610633610ecd565b610ed5565b60006004541461067d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610674906124ac565b60405180910390fd5b6000801b600554146106c4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106bb9061244c565b60405180910390fd5b6003547f000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca73ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401610720919061232d565b60206040518083038186803b15801561073857600080fd5b505afa15801561074c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107709190611f3c565b10156107b1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107a8906124ec565b60405180910390fd5b6107bf600254600354611134565b60058190555050565b7f2012e8ba67426d81985551a00176638f7978061e343983c916616e4b78d68d1a6107fa816107f5610ecd565b610ed5565b81601360006101000a81548160ff0219169083151502179055505050565b601360009054906101000a900460ff1681565b600681565b60c881565b61022681565b603281565b610848611d0a565b816103e9811061088d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610884906124cc565b60405180910390fd5b60008110156108d1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108c8906124cc565b60405180910390fd5b601360009054906101000a900460ff16610920576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109179061252c565b60405180910390fd5b601260008481526020019081526020016000206040518060400160405290816000820160009054906101000a900460ff16600381111561096357610962612943565b5b600381111561097557610974612943565b5b81526020016000820160019054906101000a900460ff16600981111561099e5761099d612943565b5b60098111156109b0576109af612943565b5b81525050915050919050565b60006001600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b7f000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb795273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610ab5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610aac9061256c565b60405180910390fd5b610abf8282611293565b5050565b6000807f2012e8ba67426d81985551a00176638f7978061e343983c916616e4b78d68d1a610af881610af3610ecd565b610ed5565b600060045411610b3d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b349061254c565b60405180910390fd5b60016103e9610b4c919061264e565b84610b576006610ebf565b610b61919061264e565b10610ba1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b989061248c565b60405180910390fd5b6000610bad6006610ebf565b905060005b85811015610c6f5760008183610bc8919061264e565b9050610bdb610bd682611327565b6113a4565b6012600083815260200190815260200160002060008201518160000160006101000a81548160ff02191690836003811115610c1957610c18612943565b5b021790555060208201518160000160016101000a81548160ff02191690836009811115610c4957610c48612943565b5b0217905550905050610c5b6006610e3f565b508080610c6790612857565b915050610bb2565b50808582610c7d919061264e565b935093505050915091565b6000801b81565b606481565b61019081565b603381565b610ca882610540565b610cb981610cb4610ecd565b610ed5565b610cc38383611052565b505050565b7f2012e8ba67426d81985551a00176638f7978061e343983c916616e4b78d68d1a610cfa81610cf5610ecd565b610ed5565b6000610d066011610ebf565b905060008190505b8184610d1a919061264e565b811015610def57604051806040016040528060016003811115610d4057610d3f612943565b5b815260200160006009811115610d5957610d58612943565b5b8152506012600083815260200190815260200160002060008201518160000160006101000a81548160ff02191690836003811115610d9a57610d99612943565b5b021790555060208201518160000160016101000a81548160ff02191690836009811115610dca57610dc9612943565b5b0217905550905050610ddc6011610e3f565b8080610de790612857565b915050610d0e565b50505050565b6000807f2012e8ba67426d81985551a00176638f7978061e343983c916616e4b78d68d1a610e2a81610e25610ecd565b610ed5565b610e346011610ebf565b600692509250509091565b6001816000016000828254019250508190555050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b600081600001549050919050565b600033905090565b610edf82826109bc565b610f6e57610f048173ffffffffffffffffffffffffffffffffffffffff166014611623565b610f128360001c6020611623565b604051602001610f239291906122b6565b6040516020818303038152906040526040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f65919061242a565b60405180910390fd5b5050565b610f7c82826109bc565b61104e57600180600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550610ff3610ecd565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b61105c82826109bc565b156111305760006001600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506110d5610ecd565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45b5050565b60007f000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca73ffffffffffffffffffffffffffffffffffffffff16634000aea07f000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb7952848660006040516020016111a89291906123bc565b6040516020818303038152906040526040518463ffffffff1660e01b81526004016111d593929190612348565b602060405180830381600087803b1580156111ef57600080fd5b505af1158015611203573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112279190611e08565b506000611249846000306000808981526020019081526020016000205461185f565b905060016000808681526020019081526020016000205461126a919061264e565b6000808681526020019081526020016000208190555061128a848261189b565b91505092915050565b60055482146112d7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112ce9061250c565b60405180910390fd5b60006004541461131c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611313906124ac565b60405180910390fd5b806004819055505050565b6000806004541161136d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113649061254c565b60405180910390fd5b4282600454604051602001611384939291906122f0565b6040516020818303038152906040528051906020012060001c9050919050565b6113ac611d0a565b60006113b86007610ebf565b60336113c491906126fe565b905060006113d26008610ebf565b60c86113de91906126fe565b905060006113ec6009610ebf565b60c86113f891906126fe565b905060008183611408919061264e565b905060006114166010610ebf565b611420600f610ebf565b61142a600e610ebf565b611434600d610ebf565b61143e600c610ebf565b611448600b610ebf565b611452600a610ebf565b61022661145f91906126fe565b61146991906126fe565b61147391906126fe565b61147d91906126fe565b61148791906126fe565b61149191906126fe565b61149b91906126fe565b905060008183876114ac919061264e565b6114b6919061264e565b905060006001828a6114c891906128b4565b6114d2919061264e565b905086811161152e576114e56007610e3f565b60405180604001604052806001600381111561150457611503612943565b5b81526020016000600981111561151d5761151c612943565b5b81525097505050505050505061161e565b838761153a919061264e565b811161160b5760006001858b61155091906128b4565b61155a919061264e565b90508681116115b75761156d6008610e3f565b60405180604001604052806002600381111561158c5761158b612943565b5b8152602001600160098111156115a5576115a4612943565b5b8152509850505050505050505061161e565b6115c16009610e3f565b6040518060400160405280600260038111156115e0576115df612943565b5b8152602001600260098111156115f9576115f8612943565b5b8152509850505050505050505061161e565b611614896118ce565b9750505050505050505b919050565b60606000600283600261163691906126a4565b611640919061264e565b67ffffffffffffffff811115611659576116586129a1565b5b6040519080825280601f01601f19166020018201604052801561168b5781602001600182028036833780820191505090505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106116c3576116c2612972565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f78000000000000000000000000000000000000000000000000000000000000008160018151811061172757611726612972565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506000600184600261176791906126a4565b611771919061264e565b90505b6001811115611811577f3031323334353637383961626364656600000000000000000000000000000000600f8616601081106117b3576117b2612972565b5b1a60f81b8282815181106117ca576117c9612972565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600485901c94508061180a9061282d565b9050611774565b5060008414611855576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161184c9061246c565b60405180910390fd5b8091505092915050565b60008484848460405160200161187894939291906123e5565b6040516020818303038152906040528051906020012060001c9050949350505050565b600082826040516020016118b092919061228a565b60405160208183030381529060405280519060200120905092915050565b6118d6611d0a565b60006118e2600a610ebf565b60646118ee91906126fe565b905060006118fc600b610ebf565b606461190891906126fe565b90506000611916600c610ebf565b606461192291906126fe565b90506000611930600d610ebf565b606461193c91906126fe565b9050600061194a600e610ebf565b603261195691906126fe565b90506000611964600f610ebf565b603261197091906126fe565b9050600061197e6010610ebf565b603261198a91906126fe565b9050600081838587898b8d61199f919061264e565b6119a9919061264e565b6119b3919061264e565b6119bd919061264e565b6119c7919061264e565b6119d1919061264e565b905060006001828c6119e391906128b4565b6119ed919061264e565b9050888111611a4a57611a00600a610e3f565b6040518060400160405280600380811115611a1e57611a1d612943565b5b815260200160046009811115611a3757611a36612943565b5b8152509950505050505050505050611d05565b8789611a56919061264e565b8111611aaf57611a66600b610e3f565b6040518060400160405280600380811115611a8457611a83612943565b5b8152602001600980811115611a9c57611a9b612943565b5b8152509950505050505050505050611d05565b86888a611abc919061264e565b611ac6919061264e565b8111611b2057611ad6600c610e3f565b6040518060400160405280600380811115611af457611af3612943565b5b815260200160066009811115611b0d57611b0c612943565b5b8152509950505050505050505050611d05565b8587898b611b2e919061264e565b611b38919061264e565b611b42919061264e565b8111611b9c57611b52600d610e3f565b6040518060400160405280600380811115611b7057611b6f612943565b5b815260200160036009811115611b8957611b88612943565b5b8152509950505050505050505050611d05565b8486888a8c611bab919061264e565b611bb5919061264e565b611bbf919061264e565b611bc9919061264e565b8111611c2357611bd9600e610e3f565b6040518060400160405280600380811115611bf757611bf6612943565b5b815260200160056009811115611c1057611c0f612943565b5b8152509950505050505050505050611d05565b838587898b8d611c33919061264e565b611c3d919061264e565b611c47919061264e565b611c51919061264e565b611c5b919061264e565b8111611cb557611c6b600f610e3f565b6040518060400160405280600380811115611c8957611c88612943565b5b815260200160086009811115611ca257611ca1612943565b5b8152509950505050505050505050611d05565b611cbf6010610e3f565b6040518060400160405280600380811115611cdd57611cdc612943565b5b815260200160076009811115611cf657611cf5612943565b5b81525099505050505050505050505b919050565b604051806040016040528060006003811115611d2957611d28612943565b5b815260200160006009811115611d4257611d41612943565b5b81525090565b600081359050611d5781612c49565b92915050565b600081359050611d6c81612c60565b92915050565b600081519050611d8181612c60565b92915050565b600081359050611d9681612c77565b92915050565b600081359050611dab81612c8e565b92915050565b600081359050611dc081612ca5565b92915050565b600081519050611dd581612ca5565b92915050565b600060208284031215611df157611df06129d0565b5b6000611dff84828501611d5d565b91505092915050565b600060208284031215611e1e57611e1d6129d0565b5b6000611e2c84828501611d72565b91505092915050565b600060208284031215611e4b57611e4a6129d0565b5b6000611e5984828501611d87565b91505092915050565b60008060408385031215611e7957611e786129d0565b5b6000611e8785828601611d87565b9250506020611e9885828601611d48565b9150509250929050565b60008060408385031215611eb957611eb86129d0565b5b6000611ec785828601611d87565b9250506020611ed885828601611db1565b9150509250929050565b600060208284031215611ef857611ef76129d0565b5b6000611f0684828501611d9c565b91505092915050565b600060208284031215611f2557611f246129d0565b5b6000611f3384828501611db1565b91505092915050565b600060208284031215611f5257611f516129d0565b5b6000611f6084828501611dc6565b91505092915050565b611f7281612732565b82525050565b611f8181612744565b82525050565b611f9081612750565b82525050565b611fa7611fa282612750565b6128a0565b82525050565b6000611fb88261260b565b611fc28185612621565b9350611fd28185602086016127fa565b611fdb816129d5565b840191505092915050565b611fef816127d6565b82525050565b611ffe816127e8565b82525050565b600061200f82612616565b6120198185612632565b93506120298185602086016127fa565b612032816129d5565b840191505092915050565b600061204882612616565b6120528185612643565b93506120628185602086016127fa565b80840191505092915050565b600061207b601d83612632565b9150612086826129e6565b602082019050919050565b600061209e602083612632565b91506120a982612a0f565b602082019050919050565b60006120c1601183612632565b91506120cc82612a38565b602082019050919050565b60006120e4601683612632565b91506120ef82612a61565b602082019050919050565b6000612107600f83612632565b915061211282612a8a565b602082019050919050565b600061212a600f83612632565b915061213582612ab3565b602082019050919050565b600061214d601183612632565b915061215882612adc565b602082019050919050565b6000612170601083612632565b915061217b82612b05565b602082019050919050565b6000612193601283612632565b915061219e82612b2e565b602082019050919050565b60006121b6601f83612632565b91506121c182612b57565b602082019050919050565b60006121d9601783612643565b91506121e482612b80565b601782019050919050565b60006121fc601183612643565b915061220782612ba9565b601182019050919050565b600061221f602f83612632565b915061222a82612bd2565b604082019050919050565b60408201600082015161224b6000850182611ff5565b50602082015161225e6020850182611fe6565b50505050565b61226d816127cc565b82525050565b61228461227f826127cc565b6128aa565b82525050565b60006122968285611f96565b6020820191506122a68284612273565b6020820191508190509392505050565b60006122c1826121cc565b91506122cd828561203d565b91506122d8826121ef565b91506122e4828461203d565b91508190509392505050565b60006122fc8286612273565b60208201915061230c8285612273565b60208201915061231c8284612273565b602082019150819050949350505050565b60006020820190506123426000830184611f69565b92915050565b600060608201905061235d6000830186611f69565b61236a6020830185612264565b818103604083015261237c8184611fad565b9050949350505050565b600060208201905061239b6000830184611f78565b92915050565b60006020820190506123b66000830184611f87565b92915050565b60006040820190506123d16000830185611f87565b6123de6020830184612264565b9392505050565b60006080820190506123fa6000830187611f87565b6124076020830186612264565b6124146040830185611f69565b6124216060830184612264565b95945050505050565b600060208201905081810360008301526124448184612004565b905092915050565b600060208201905081810360008301526124658161206e565b9050919050565b6000602082019050818103600083015261248581612091565b9050919050565b600060208201905081810360008301526124a5816120b4565b9050919050565b600060208201905081810360008301526124c5816120d7565b9050919050565b600060208201905081810360008301526124e5816120fa565b9050919050565b600060208201905081810360008301526125058161211d565b9050919050565b6000602082019050818103600083015261252581612140565b9050919050565b6000602082019050818103600083015261254581612163565b9050919050565b6000602082019050818103600083015261256581612186565b9050919050565b60006020820190508181036000830152612585816121a9565b9050919050565b600060208201905081810360008301526125a581612212565b9050919050565b60006040820190506125c16000830184612235565b92915050565b60006020820190506125dc6000830184612264565b92915050565b60006040820190506125f76000830185612264565b6126046020830184612264565b9392505050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b6000612659826127cc565b9150612664836127cc565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115612699576126986128e5565b5b828201905092915050565b60006126af826127cc565b91506126ba836127cc565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156126f3576126f26128e5565b5b828202905092915050565b6000612709826127cc565b9150612714836127cc565b925082821015612727576127266128e5565b5b828203905092915050565b600061273d826127ac565b9050919050565b60008115159050919050565b6000819050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600081905061279482612c21565b919050565b60008190506127a782612c35565b919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60006127e182612786565b9050919050565b60006127f382612799565b9050919050565b60005b838110156128185780820151818401526020810190506127fd565b83811115612827576000848401525b50505050565b6000612838826127cc565b9150600082141561284c5761284b6128e5565b5b600182039050919050565b6000612862826127cc565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415612895576128946128e5565b5b600182019050919050565b6000819050919050565b6000819050919050565b60006128bf826127cc565b91506128ca836127cc565b9250826128da576128d9612914565b5b828206905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b6000601f19601f8301169050919050565b7f52616e646f6d697a6174696f6e20616c72656164792073746172746564000000600082015250565b7f537472696e67733a20686578206c656e67746820696e73756666696369656e74600082015250565b7f4e6f7420656e6f75676820737570706c79000000000000000000000000000000600082015250565b7f5365656420616c72656164792067656e65726174656400000000000000000000600082015250565b7f496e76616c696420746f6b656e49640000000000000000000000000000000000600082015250565b7f4e6f7420656e6f756768204c494e4b0000000000000000000000000000000000600082015250565b7f496e76616c696420726571756573744964000000000000000000000000000000600082015250565b7f4e6f742072657665616c65642079657400000000000000000000000000000000600082015250565b7f53656564206e6f742067656e6572617465640000000000000000000000000000600082015250565b7f4f6e6c7920565246436f6f7264696e61746f722063616e2066756c66696c6c00600082015250565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000600082015250565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000600082015250565b7f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560008201527f20726f6c657320666f722073656c660000000000000000000000000000000000602082015250565b600a8110612c3257612c31612943565b5b50565b60048110612c4657612c45612943565b5b50565b612c5281612732565b8114612c5d57600080fd5b50565b612c6981612744565b8114612c7457600080fd5b50565b612c8081612750565b8114612c8b57600080fd5b50565b612c978161275a565b8114612ca257600080fd5b50565b612cae816127cc565b8114612cb957600080fd5b5056fea2646970667358221220f32ddd317d6f4f48a5db2f038f23c89e26122af8e3a9dd81d3b1f2828f34e9d764736f6c63430008070033