编译器
0.8.19+commit.7dd6d404
文件 1 的 38:AccessControl.sol
文件 2 的 38:AccessControlEnumerable.sol
文件 3 的 38:AccessControlPausable.sol
文件 5 的 38:BaseRedeemableToken.sol
文件 6 的 38:BaseSellable.sol
文件 7 的 38:BaseTokenURI.sol
文件 11 的 38:DefaultOperatorFilterer.sol
文件 16 的 38:ERC721ACommon.sol
文件 17 的 38:EnumerableSet.sol
文件 18 的 38:IAccessControl.sol
文件 19 的 38:IAccessControlEnumerable.sol
文件 23 的 38:IEntropyOracle.sol
文件 24 的 38:IOperatorFilterRegistry.sol
文件 25 的 38:IRedeemableToken.sol
文件 28 的 38:MythicEggActivator.sol
pragma solidity ^0.8.15;
import {BitMaps} from "openzeppelin-contracts/utils/structs/BitMaps.sol";
import {ERC4906} from "ethier/erc721/ERC4906.sol";
import {MythicsEggErrors} from "./MythicsEggErrors.sol";
interface MythicEggActivatorEvents {
event EggActivated(uint256 indexed tokenId);
}
abstract contract MythicEggActivator is ERC4906, MythicsEggErrors, MythicEggActivatorEvents {
using BitMaps for BitMaps.BitMap;
error EggAlreadyActivated(uint256);
error ActivatingTooManyEggs(uint256 requested, uint256 numLeft);
BitMaps.BitMap private _activated;
uint32 internal _maxNumActivationsPerDay = 50;
uint32 private _lastActivationDay;
uint32 private _numActivatedToday;
function _currentDay() private view returns (uint32) {
return uint32(block.timestamp / (1 days));
}
function _setMaxNumActivationsPerDay(uint32 maxNumActivationsPerDay) internal {
_maxNumActivationsPerDay = maxNumActivationsPerDay;
}
function _activate(uint256[] calldata tokenIds) internal {
if (_currentDay() > _lastActivationDay) {
_numActivatedToday = 0;
_lastActivationDay = _currentDay();
}
uint256 numLeft = _maxNumActivationsPerDay - _numActivatedToday;
if (tokenIds.length > numLeft) {
revert ActivatingTooManyEggs(tokenIds.length, numLeft);
}
for (uint256 i; i < tokenIds.length; ++i) {
uint256 tokenId = tokenIds[i];
if (activated(tokenId)) {
revert EggAlreadyActivated(tokenId);
}
if (!_exists(tokenId)) {
revert NonexistentEgg(tokenId);
}
_activated.set(tokenId);
_refreshMetadata(tokenId);
emit EggActivated(tokenId);
}
_numActivatedToday += uint32(tokenIds.length);
}
function activated(uint256 tokenId) public view returns (bool) {
if (!_exists(tokenId)) {
revert NonexistentEgg(tokenId);
}
return _activated.get(tokenId);
}
function _exists(uint256 tokenId) internal view virtual returns (bool);
}
文件 29 的 38:MythicEggSampler.sol
pragma solidity ^0.8.15;
import {IEntropyOracle} from "proof/entropy/IEntropyOracle.sol";
import {MythicsEggErrors} from "./MythicsEggErrors.sol";
import {
StochasticSampler, StochasticSamplerWithCDFStorage, StochasticSamplerWithOracle
} from "./StochasticSampling.sol";
abstract contract MythicEggSampler is StochasticSamplerWithCDFStorage, StochasticSamplerWithOracle, MythicsEggErrors {
enum EggType {
Stone,
Runic,
Legendary
}
uint8 public constant NUM_EGG_TYPES = 3;
uint8 private constant _EGG_TYPE_TRAIT_ID = 0;
struct SamplingParams {
uint64 revealBlockNumber;
uint16 distributionVersion;
uint128 mixHash;
}
mapping(uint256 => SamplingParams) private _samplingParams;
function _numPerTrait() private pure returns (uint256[] memory) {
uint256[] memory numPerTrait = new uint256[](1);
numPerTrait[_EGG_TYPE_TRAIT_ID] = NUM_EGG_TYPES;
return numPerTrait;
}
constructor(IEntropyOracle oracle)
StochasticSamplerWithCDFStorage(_numPerTrait())
StochasticSamplerWithOracle(oracle)
{}
function samplingParams(uint256 tokenId) public view returns (SamplingParams memory) {
if (!_exists(tokenId)) {
revert NonexistentEgg(tokenId);
}
return _samplingParams[tokenId];
}
function _distributionVersion(uint256 tokenId, uint256 traitId) internal view virtual override returns (uint256) {
assert(traitId == _EGG_TYPE_TRAIT_ID);
return _samplingParams[tokenId].distributionVersion;
}
function _revealBlockNumber(uint256 tokenId) internal view virtual override returns (uint256) {
return _samplingParams[tokenId].revealBlockNumber;
}
function _registerForSampling(uint256 tokenId) internal {
uint256 revealBlockNumber = block.number;
_samplingParams[tokenId] = SamplingParams({
revealBlockNumber: uint64(revealBlockNumber),
distributionVersion: uint16(_latestDistributionVersion(_EGG_TYPE_TRAIT_ID)),
mixHash: uint128(uint256(keccak256(abi.encode(block.prevrandao))))
});
entropyOracle.requestEntropy(revealBlockNumber);
}
function _setEggProbabilities(uint64[NUM_EGG_TYPES] memory pdf) internal {
uint64[] memory p = new uint64[](NUM_EGG_TYPES);
for (uint256 i = 0; i < NUM_EGG_TYPES; i++) {
p[i] = pdf[i];
}
_pushProbabilities(_EGG_TYPE_TRAIT_ID, p);
}
function _seed(uint256 tokenId)
internal
view
virtual
override(StochasticSampler, StochasticSamplerWithOracle)
returns (bytes32, bool)
{
(bytes32 seed, bool revealed) = StochasticSamplerWithOracle._seed(tokenId);
return (keccak256(abi.encode(seed, samplingParams(tokenId))), revealed);
}
function eggType(uint256 tokenId) public view returns (EggType, bool) {
(uint256 sample, bool revealed) = _sampleTrait(tokenId, _EGG_TYPE_TRAIT_ID);
return (EggType(sample), revealed);
}
function _exists(uint256 tokenId) internal view virtual returns (bool);
}
文件 30 的 38:MythicsEgg.sol
pragma solidity ^0.8.15;
import {ERC721A, ERC721ACommon, BaseTokenURI, ERC721ACommonBaseTokenURI} from "ethier/erc721/BaseTokenURI.sol";
import {OperatorFilterOS} from "ethier/erc721/OperatorFilterOS.sol";
import {ERC4906} from "ethier/erc721/ERC4906.sol";
import {IEntropyOracle} from "proof/entropy/IEntropyOracle.sol";
import {RedeemableERC721ACommon} from "proof/redemption/voucher/RedeemableERC721ACommon.sol";
import {SellableERC721ACommon} from "proof/sellers/sellable/SellableERC721ACommon.sol";
import {MythicEggSampler} from "./MythicEggSampler.sol";
import {MythicEggActivator} from "./MythicEggActivator.sol";
contract MythicsEgg is
ERC721ACommonBaseTokenURI,
OperatorFilterOS,
SellableERC721ACommon,
RedeemableERC721ACommon,
MythicEggSampler,
MythicEggActivator
{
constructor(address admin, address steerer, address payable secondaryReceiver, IEntropyOracle oracle)
ERC721ACommon(admin, steerer, "Mythics: Egg", "EGG", secondaryReceiver, 500)
BaseTokenURI("https://metadata.proof.xyz/mythics/egg/")
MythicEggSampler(oracle)
{
_setEggProbabilities([uint64(0), uint64(40), uint64(60)]);
}
struct TokenInfo {
bool revealed;
EggType eggType;
bool activated;
}
function tokenInfos(uint256[] calldata tokenIds) external view returns (TokenInfo[] memory) {
TokenInfo[] memory infos = new TokenInfo[](tokenIds.length);
for (uint256 i = 0; i < tokenIds.length; i++) {
(EggType eggT, bool revealed) = eggType(tokenIds[i]);
infos[i] = TokenInfo({revealed: revealed, eggType: eggT, activated: activated(tokenIds[i])});
}
return infos;
}
function setEggProbabilities(uint64[NUM_EGG_TYPES] memory pdf) external onlyRole(DEFAULT_STEERING_ROLE) {
_setEggProbabilities(pdf);
}
function setEntropyOracle(IEntropyOracle newOracle) external onlyRole(DEFAULT_STEERING_ROLE) {
entropyOracle = newOracle;
}
function setMaxNumActivationsPerDay(uint32 maxNumActivationsPerDay) external onlyRole(DEFAULT_STEERING_ROLE) {
_setMaxNumActivationsPerDay(maxNumActivationsPerDay);
}
function activate(uint256[] calldata tokenIds) external onlyRole(DEFAULT_STEERING_ROLE) {
_activate(tokenIds);
}
function _handleSale(address to, uint64 num, bytes calldata data) internal virtual override {
uint256 startTokenId = _nextTokenId();
for (uint256 i; i < num; ++i) {
_registerForSampling(startTokenId + i);
}
super._handleSale(to, num, data);
}
function _exists(uint256 tokenId)
internal
view
virtual
override(ERC721A, MythicEggActivator, MythicEggSampler)
returns (bool)
{
return ERC721A._exists(tokenId);
}
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(ERC721ACommon, ERC721ACommonBaseTokenURI, SellableERC721ACommon, RedeemableERC721ACommon, ERC4906)
returns (bool)
{
return RedeemableERC721ACommon.supportsInterface(interfaceId)
|| SellableERC721ACommon.supportsInterface(interfaceId) || ERC4906.supportsInterface(interfaceId)
|| ERC721ACommonBaseTokenURI.supportsInterface(interfaceId);
}
function _baseURI() internal view virtual override(ERC721A, ERC721ACommonBaseTokenURI) returns (string memory) {
return ERC721ACommonBaseTokenURI._baseURI();
}
function setApprovalForAll(address operator, bool approved) public virtual override(ERC721A, OperatorFilterOS) {
OperatorFilterOS.setApprovalForAll(operator, approved);
}
function approve(address operator, uint256 tokenId) public payable virtual override(ERC721A, OperatorFilterOS) {
OperatorFilterOS.approve(operator, tokenId);
}
function transferFrom(address from, address to, uint256 tokenId)
public
payable
virtual
override(ERC721A, OperatorFilterOS)
{
OperatorFilterOS.transferFrom(from, to, tokenId);
}
function safeTransferFrom(address from, address to, uint256 tokenId)
public
payable
virtual
override(ERC721A, OperatorFilterOS)
{
OperatorFilterOS.safeTransferFrom(from, to, tokenId);
}
function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data)
public
payable
virtual
override(ERC721A, OperatorFilterOS)
{
OperatorFilterOS.safeTransferFrom(from, to, tokenId, data);
}
}
文件 31 的 38:MythicsEggErrors.sol
pragma solidity ^0.8.15;
interface MythicsEggErrors {
error NonexistentEgg(uint256 tokenId);
}
文件 32 的 38:OperatorFilterOS.sol
文件 33 的 38:OperatorFilterer.sol
文件 35 的 38:RedeemableERC721ACommon.sol
文件 36 的 38:SellableERC721ACommon.sol
文件 37 的 38:StochasticSampling.sol
pragma solidity ^0.8.15;
import {IEntropyOracle} from "proof/entropy/IEntropyOracle.sol";
library StochasticSamplingLib {
function computeCDF(uint64[] memory pdf) internal pure returns (uint64[] memory) {
uint64[] memory cdf = new uint64[](pdf.length);
cdf[0] = pdf[0];
for (uint256 i = 1; i < pdf.length; ++i) {
cdf[i] = cdf[i - 1] + pdf[i];
}
return cdf;
}
function sampleWithCDF(uint256 rand, uint64[] memory cdf) internal pure returns (uint256) {
rand = rand % cdf[cdf.length - 1];
for (uint256 i; i < cdf.length; ++i) {
if (rand < cdf[i]) {
return i;
}
}
assert(false);
return 0;
}
}
abstract contract StochasticSampler {
function _seed(uint256 tokenId) internal view virtual returns (bytes32, bool);
function _cdf(uint256 tokenId, uint256 traitId) internal view virtual returns (uint64[] memory);
function _sampleTrait(uint256 tokenId, uint256 traitId) internal view returns (uint256, bool) {
(bytes32 seed, bool revealed) = _seed(tokenId);
seed = keccak256(abi.encodePacked(seed, traitId));
return (StochasticSamplingLib.sampleWithCDF(uint256(seed), _cdf(tokenId, traitId)), revealed);
}
}
abstract contract StochasticSamplerWithCDFStorage is StochasticSampler {
using StochasticSamplingLib for uint64[];
error InvalidTraitId(uint256 traitId);
error IncorrectPDFLength(uint256 gotLength, uint256 traitId, uint256 wantLength);
error ConstantZeroPDF();
uint256[] private _numPerTrait;
uint64[][][] private _cdfs;
constructor(uint256[] memory numPerTrait) {
_numPerTrait = numPerTrait;
for (uint256 i; i < numPerTrait.length; ++i) {
_cdfs.push(new uint64[][](0));
}
assert(_cdfs.length == numPerTrait.length);
}
function _pushProbabilities(uint256 traitId, uint64[] memory pdf) internal {
if (traitId >= _numPerTrait.length) {
revert InvalidTraitId(traitId);
}
if (pdf.length != _numPerTrait[traitId]) {
revert IncorrectPDFLength(pdf.length, traitId, _numPerTrait[traitId]);
}
uint64[] memory cdf = pdf.computeCDF();
if (cdf[cdf.length - 1] == 0) {
revert ConstantZeroPDF();
}
_cdfs[traitId].push(cdf);
}
function _latestDistributionVersion(uint256 traitId) internal view returns (uint256) {
return _cdfs[traitId].length - 1;
}
function _distributionVersion(uint256 tokenId, uint256 traitId) internal view virtual returns (uint256);
function _cdf(uint256 tokenId, uint256 traitId) internal view virtual override returns (uint64[] memory) {
if (traitId >= _numPerTrait.length) {
revert InvalidTraitId(traitId);
}
return _cdfs[traitId][_distributionVersion(tokenId, traitId)];
}
}
abstract contract StochasticSamplerWithOracle is StochasticSampler {
IEntropyOracle public entropyOracle;
constructor(IEntropyOracle entropyOracle_) {
entropyOracle = entropyOracle_;
}
function _seed(uint256 tokenId) internal view virtual override returns (bytes32, bool) {
bytes32 entropy = entropyOracle.blockEntropy(_revealBlockNumber(tokenId));
return (keccak256(abi.encode(entropy, tokenId)), entropy != 0);
}
function _revealBlockNumber(uint256 tokenId) internal view virtual returns (uint256);
}
{
"compilationTarget": {
"src/MythicsEgg.sol": "MythicsEgg"
},
"evmVersion": "london",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs"
},
"optimizer": {
"enabled": true,
"runs": 9999
},
"remappings": [
":@divergencetech/ethier/=/home/dave/.cache/bazel/_bazel_dave/b9a57168317213f9241a484d2ee2d038/external/ethier_0-55-0/",
":@openzeppelin/=/home/dave/.cache/bazel/_bazel_dave/b9a57168317213f9241a484d2ee2d038/external/openzeppelin-contracts_4-8-1/",
":ERC721A/=/home/dave/.cache/bazel/_bazel_dave/b9a57168317213f9241a484d2ee2d038/external/ERC721A_4-2-3/contracts/",
":ERC721A_root/=/home/dave/.cache/bazel/_bazel_dave/b9a57168317213f9241a484d2ee2d038/external/ERC721A_4-2-3/",
":delegation-registry/=/home/dave/.cache/bazel/_bazel_dave/b9a57168317213f9241a484d2ee2d038/external/delegation-registry_2d1a158b/src/",
":delegation-registry_root/=/home/dave/.cache/bazel/_bazel_dave/b9a57168317213f9241a484d2ee2d038/external/delegation-registry_2d1a158b/",
":ds-test/=/home/dave/.cache/bazel/_bazel_dave/b9a57168317213f9241a484d2ee2d038/external/ds-test_013e6c64/src/",
":ds-test_root/=/home/dave/.cache/bazel/_bazel_dave/b9a57168317213f9241a484d2ee2d038/external/ds-test_013e6c64/",
":erc721a/=/home/dave/.cache/bazel/_bazel_dave/b9a57168317213f9241a484d2ee2d038/external/ERC721A_4-2-3/",
":ethier/=/home/dave/.cache/bazel/_bazel_dave/b9a57168317213f9241a484d2ee2d038/external/ethier_0-55-0/contracts/",
":ethier_root/=/home/dave/.cache/bazel/_bazel_dave/b9a57168317213f9241a484d2ee2d038/external/ethier_0-55-0/",
":forge-std/=/home/dave/.cache/bazel/_bazel_dave/b9a57168317213f9241a484d2ee2d038/external/forge-std_1-4-0/src/",
":openzeppelin-contracts/=/home/dave/.cache/bazel/_bazel_dave/b9a57168317213f9241a484d2ee2d038/external/openzeppelin-contracts_4-8-1/contracts/",
":openzeppelin-contracts/contracts/=/home/dave/.cache/bazel/_bazel_dave/b9a57168317213f9241a484d2ee2d038/external/openzeppelin-contracts_4-8-1/contracts/",
":openzeppelin-contracts_root/=/home/dave/.cache/bazel/_bazel_dave/b9a57168317213f9241a484d2ee2d038/external/openzeppelin-contracts_4-8-1/",
":operator-filter-registry/src/=/home/dave/.cache/bazel/_bazel_dave/b9a57168317213f9241a484d2ee2d038/external/operator-filter-registry_1-4-1/src/",
":operator-filter-registry_root/=/home/dave/.cache/bazel/_bazel_dave/b9a57168317213f9241a484d2ee2d038/external/operator-filter-registry_1-4-1/",
":proof/constants/=/home/dave/proof/proof-seller/contracts/constants/src/",
":proof/entropy/=/home/dave/proof/proof-seller/contracts/entropy/",
":proof/redemption/=/home/dave/proof/proof-seller/contracts/redemption/src/",
":proof/sellers/=/home/dave/proof/proof-seller/contracts/sellers/src/"
]
}
[{"inputs":[{"internalType":"address","name":"admin","type":"address"},{"internalType":"address","name":"steerer","type":"address"},{"internalType":"address payable","name":"secondaryReceiver","type":"address"},{"internalType":"contract IEntropyOracle","name":"oracle","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"uint256","name":"requested","type":"uint256"},{"internalType":"uint256","name":"numLeft","type":"uint256"}],"name":"ActivatingTooManyEggs","type":"error"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"ConstantZeroPDF","type":"error"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"EggAlreadyActivated","type":"error"},{"inputs":[{"internalType":"uint256","name":"gotLength","type":"uint256"},{"internalType":"uint256","name":"traitId","type":"uint256"},{"internalType":"uint256","name":"wantLength","type":"uint256"}],"name":"IncorrectPDFLength","type":"error"},{"inputs":[{"internalType":"uint256","name":"traitId","type":"uint256"}],"name":"InvalidTraitId","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"NonexistentEgg","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"OperatorNotAllowed","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"OwnershipNotInitializedForExtraData","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"RedeemerCallerNotAllowedToSpendVoucher","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_toTokenId","type":"uint256"}],"name":"BatchMetadataUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"toTokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"ConsecutiveTransfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"EggActivated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"MetadataUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"AUTHORISED_SELLER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_STEERING_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"NUM_EGG_TYPES","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OPERATOR_FILTER_REGISTRY","outputs":[{"internalType":"contract IOperatorFilterRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"REDEEMER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"activate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"activated","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseTokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"cdata","type":"bytes"}],"name":"callOperatorFilterRegistry","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"eggType","outputs":[{"internalType":"enum MythicEggSampler.EggType","name":"","type":"uint8"},{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"emitMetadataUpdateForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"entropyOracle","outputs":[{"internalType":"contract IEntropyOracle","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getRoleMember","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleMemberCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint64","name":"num","type":"uint64"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"handleSale","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lockRedeemers","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lockSellers","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"redeem","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"samplingParams","outputs":[{"components":[{"internalType":"uint64","name":"revealBlockNumber","type":"uint64"},{"internalType":"uint16","name":"distributionVersion","type":"uint16"},{"internalType":"uint128","name":"mixHash","type":"uint128"}],"internalType":"struct MythicEggSampler.SamplingParams","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"baseTokenURI_","type":"string"}],"name":"setBaseTokenURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint96","name":"basisPoints","type":"uint96"}],"name":"setDefaultRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64[3]","name":"pdf","type":"uint64[3]"}],"name":"setEggProbabilities","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IEntropyOracle","name":"newOracle","type":"address"}],"name":"setEntropyOracle","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"maxNumActivationsPerDay","type":"uint32"}],"name":"setMaxNumActivationsPerDay","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"tokenInfos","outputs":[{"components":[{"internalType":"bool","name":"revealed","type":"bool"},{"internalType":"enum MythicEggSampler.EggType","name":"eggType","type":"uint8"},{"internalType":"bool","name":"activated","type":"bool"}],"internalType":"struct MythicsEgg.TokenInfo[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"}]