axie-tools
Version:
TypeScript library and CLI tool for interacting with Axie Infinity marketplace and NFTs on Ronin network. Features marketplace operations (buy/sell/delist), batch transfers, and wallet information.
2,416 lines (2,414 loc) • 84.3 kB
text/typescript
import { Interface, Contract, type Signer, type Provider } from "ethers";
import {
AXIE_PROXY,
ERC_721_BATCH_TRANSFER,
MARKETPLACE_GATEWAY_V_2,
USD_COIN,
WRAPPED_ETHER,
ATIAS_BLESSING,
} from "@roninbuilders/contracts";
export function getAxieContract(signerOrProvider?: Signer | Provider) {
const address = AXIE_PROXY.address;
const abi = [
{
inputs: [],
stateMutability: "nonpayable",
type: "constructor"
},
{
inputs: [],
name: "AccessControlBadConfirmation",
type: "error"
},
{
inputs: [
{
internalType: "address",
name: "account",
type: "address"
},
{
internalType: "bytes32",
name: "neededRole",
type: "bytes32"
}
],
name: "AccessControlUnauthorizedAccount",
type: "error"
},
{
inputs: [
{
internalType: "uint256",
name: "axieId",
type: "uint256"
},
{
internalType: "enum IAxie.AxieStage",
name: "stage",
type: "uint8"
},
{
internalType: "uint256",
name: "neededDuration",
type: "uint256"
}
],
name: "AxieStageNotReadyToGrow",
type: "error"
},
{
inputs: [],
name: "EmptyGenes",
type: "error"
},
{
inputs: [
{
internalType: "uint256",
name: "hoppingAxieId",
type: "uint256"
}
],
name: "HoppingAxieAlreadyOwned",
type: "error"
},
{
inputs: [
{
internalType: "uint256",
name: "axieId",
type: "uint256"
},
{
internalType: "uint256",
name: "hoppingAxieId",
type: "uint256"
}
],
name: "InvalidHoppingAxieId",
type: "error"
},
{
inputs: [
{
internalType: "bytes4",
name: "sig",
type: "bytes4"
}
],
name: "InvalidLength",
type: "error"
},
{
inputs: [
{
internalType: "uint256",
name: "axieId",
type: "uint256"
}
],
name: "NonExistentAxie",
type: "error"
},
{
inputs: [
{
internalType: "uint256",
name: "tokenId",
type: "uint256"
}
],
name: "NonExistentToken",
type: "error"
},
{
inputs: [
{
internalType: "uint256",
name: "axieId",
type: "uint256"
}
],
name: "NotAxieAdult",
type: "error"
},
{
inputs: [
{
internalType: "uint256",
name: "axieId",
type: "uint256"
}
],
name: "NotAxiegg",
type: "error"
},
{
inputs: [
{
internalType: "bytes32",
name: "ctxHash",
type: "bytes32"
},
{
internalType: "uint256",
name: "tokenId",
type: "uint256"
}
],
name: "REP15AlreadyAttachedContext",
type: "error"
},
{
inputs: [
{
internalType: "uint256",
name: "tokenId",
type: "uint256"
},
{
internalType: "address",
name: "delegatee",
type: "address"
},
{
internalType: "uint64",
name: "until",
type: "uint64"
}
],
name: "REP15AlreadyDelegatedOwnership",
type: "error"
},
{
inputs: [
{
internalType: "uint64",
name: "detachingDuration",
type: "uint64"
}
],
name: "REP15ExceededMaxDetachingDuration",
type: "error"
},
{
inputs: [
{
internalType: "bytes32",
name: "ctxHash",
type: "bytes32"
}
],
name: "REP15ExistentContext",
type: "error"
},
{
inputs: [
{
internalType: "uint256",
name: "tokenId",
type: "uint256"
}
],
name: "REP15InactiveOwnershipDelegation",
type: "error"
},
{
inputs: [
{
internalType: "address",
name: "operator",
type: "address"
},
{
internalType: "address",
name: "delegatee",
type: "address"
}
],
name: "REP15InsufficientApproval",
type: "error"
},
{
inputs: [
{
internalType: "bytes4",
name: "sig",
type: "bytes4"
}
],
name: "REP15InvalidBatchLength",
type: "error"
},
{
inputs: [
{
internalType: "address",
name: "controller",
type: "address"
}
],
name: "REP15InvalidController",
type: "error"
},
{
inputs: [
{
internalType: "address",
name: "delegatee",
type: "address"
}
],
name: "REP15InvalidDelegatee",
type: "error"
},
{
inputs: [
{
internalType: "uint64",
name: "until",
type: "uint64"
}
],
name: "REP15InvalidDelegationExpiration",
type: "error"
},
{
inputs: [
{
internalType: "bytes32",
name: "ctxHash",
type: "bytes32"
},
{
internalType: "uint256",
name: "tokenId",
type: "uint256"
}
],
name: "REP15NonexistentAttachedContext",
type: "error"
},
{
inputs: [
{
internalType: "bytes32",
name: "ctxHash",
type: "bytes32"
}
],
name: "REP15NonexistentContext",
type: "error"
},
{
inputs: [
{
internalType: "uint256",
name: "tokenId",
type: "uint256"
}
],
name: "REP15NonexistentPendingOwnershipDelegation",
type: "error"
},
{
inputs: [
{
internalType: "bytes32",
name: "ctxHash",
type: "bytes32"
},
{
internalType: "uint256",
name: "tokenId",
type: "uint256"
}
],
name: "REP15NotRequestedForDetachment",
type: "error"
},
{
inputs: [
{
internalType: "bytes32",
name: "ctxHash",
type: "bytes32"
},
{
internalType: "uint256",
name: "tokenId",
type: "uint256"
}
],
name: "REP15RequestedForDetachment",
type: "error"
},
{
inputs: [
{
internalType: "bytes32",
name: "ctxHash",
type: "bytes32"
},
{
internalType: "uint256",
name: "tokenId",
type: "uint256"
},
{
internalType: "uint64",
name: "current",
type: "uint64"
},
{
internalType: "uint64",
name: "readyAt",
type: "uint64"
}
],
name: "REP15UnreadyForDetachment",
type: "error"
},
{
inputs: [
{
internalType: "uint256",
name: "tokenId",
type: "uint256"
},
{
internalType: "address",
name: "operator",
type: "address"
},
{
internalType: "bytes4",
name: "sig",
type: "bytes4"
}
],
name: "UnauthorizedOperator",
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: true,
internalType: "uint256",
name: "_axieId",
type: "uint256"
},
{
components: [
{
internalType: "uint256",
name: "x",
type: "uint256"
},
{
internalType: "uint256",
name: "y",
type: "uint256"
}
],
indexed: false,
internalType: "struct AxieGenetics.Genes",
name: "_genes",
type: "tuple"
}
],
name: "AxieEvolved",
type: "event"
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "uint256",
name: "axieId",
type: "uint256"
},
{
indexed: false,
internalType: "uint256",
name: "level",
type: "uint256"
}
],
name: "AxieLevelUpdated",
type: "event"
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "uint256",
name: "_axieId",
type: "uint256"
},
{
components: [
{
internalType: "uint256",
name: "sireId",
type: "uint256"
},
{
internalType: "uint256",
name: "matronId",
type: "uint256"
},
{
internalType: "uint256",
name: "birthDate",
type: "uint256"
},
{
components: [
{
internalType: "uint256",
name: "x",
type: "uint256"
},
{
internalType: "uint256",
name: "y",
type: "uint256"
}
],
internalType: "struct AxieGenetics.Genes",
name: "genes",
type: "tuple"
},
{
internalType: "uint8",
name: "breedCount",
type: "uint8"
},
{
internalType: "uint16",
name: "level",
type: "uint16"
}
],
indexed: false,
internalType: "struct IAxie.Axie",
name: "_axie",
type: "tuple"
}
],
name: "AxieMinted",
type: "event"
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "uint256",
name: "_axieId",
type: "uint256"
},
{
components: [
{
internalType: "uint256",
name: "sireId",
type: "uint256"
},
{
internalType: "uint256",
name: "matronId",
type: "uint256"
},
{
internalType: "uint256",
name: "birthDate",
type: "uint256"
},
{
components: [
{
internalType: "uint256",
name: "x",
type: "uint256"
},
{
internalType: "uint256",
name: "y",
type: "uint256"
}
],
internalType: "struct AxieGenetics.Genes",
name: "genes",
type: "tuple"
},
{
internalType: "uint8",
name: "breedCount",
type: "uint8"
},
{
internalType: "uint16",
name: "level",
type: "uint16"
}
],
indexed: false,
internalType: "struct IAxie.Axie",
name: "_axie",
type: "tuple"
},
{
components: [
{
components: [
{
internalType: "uint256",
name: "x",
type: "uint256"
},
{
internalType: "uint256",
name: "y",
type: "uint256"
}
],
internalType: "struct AxieGenetics.Genes",
name: "sireGenes",
type: "tuple"
},
{
components: [
{
internalType: "uint256",
name: "x",
type: "uint256"
},
{
internalType: "uint256",
name: "y",
type: "uint256"
}
],
internalType: "struct AxieGenetics.Genes",
name: "matronGenes",
type: "tuple"
}
],
indexed: false,
internalType: "struct IAxie.Axiegg",
name: "_axiegg",
type: "tuple"
}
],
name: "AxieggMinted",
type: "event"
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "uint256",
name: "sireId",
type: "uint256"
},
{
indexed: true,
internalType: "uint256",
name: "matronId",
type: "uint256"
},
{
indexed: true,
internalType: "uint256",
name: "axieId",
type: "uint256"
},
{
indexed: false,
internalType: "uint8",
name: "sireBreedCount",
type: "uint8"
},
{
indexed: false,
internalType: "uint8",
name: "matronBreedCount",
type: "uint8"
},
{
components: [
{
components: [
{
internalType: "uint256",
name: "x",
type: "uint256"
},
{
internalType: "uint256",
name: "y",
type: "uint256"
}
],
internalType: "struct AxieGenetics.Genes",
name: "sireGenes",
type: "tuple"
},
{
components: [
{
internalType: "uint256",
name: "x",
type: "uint256"
},
{
internalType: "uint256",
name: "y",
type: "uint256"
}
],
internalType: "struct AxieGenetics.Genes",
name: "matronGenes",
type: "tuple"
}
],
indexed: false,
internalType: "struct IAxie.Axiegg",
name: "axiegg",
type: "tuple"
}
],
name: "BreedingInfoUpdated",
type: "event"
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "bytes32",
name: "ctxHash",
type: "bytes32"
},
{
indexed: true,
internalType: "uint256",
name: "tokenId",
type: "uint256"
}
],
name: "ContextAttached",
type: "event"
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "bytes32",
name: "ctxHash",
type: "bytes32"
},
{
indexed: true,
internalType: "uint256",
name: "tokenId",
type: "uint256"
}
],
name: "ContextDetached",
type: "event"
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "bytes32",
name: "ctxHash",
type: "bytes32"
},
{
indexed: true,
internalType: "uint256",
name: "tokenId",
type: "uint256"
}
],
name: "ContextDetachmentRequested",
type: "event"
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "bytes32",
name: "ctxHash",
type: "bytes32"
},
{
indexed: true,
internalType: "uint256",
name: "tokenId",
type: "uint256"
},
{
indexed: false,
internalType: "bool",
name: "locked",
type: "bool"
}
],
name: "ContextLockUpdated",
type: "event"
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "bytes32",
name: "ctxHash",
type: "bytes32"
},
{
indexed: true,
internalType: "address",
name: "controller",
type: "address"
},
{
indexed: false,
internalType: "uint64",
name: "detachingDuration",
type: "uint64"
}
],
name: "ContextUpdated",
type: "event"
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "bytes32",
name: "ctxHash",
type: "bytes32"
},
{
indexed: true,
internalType: "uint256",
name: "tokenId",
type: "uint256"
},
{
indexed: true,
internalType: "address",
name: "user",
type: "address"
}
],
name: "ContextUserAssigned",
type: "event"
},
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: "uint8",
name: "version",
type: "uint8"
}
],
name: "Initialized",
type: "event"
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "uint256",
name: "_tokenId",
type: "uint256"
},
{
indexed: true,
internalType: "uint256",
name: "_nonce",
type: "uint256"
}
],
name: "NonceUpdated",
type: "event"
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "uint256",
name: "tokenId",
type: "uint256"
},
{
indexed: true,
internalType: "address",
name: "delegatee",
type: "address"
},
{
indexed: false,
internalType: "uint64",
name: "until",
type: "uint64"
}
],
name: "OwnershipDelegationAccepted",
type: "event"
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "uint256",
name: "tokenId",
type: "uint256"
},
{
indexed: true,
internalType: "address",
name: "delegatee",
type: "address"
},
{
indexed: false,
internalType: "uint64",
name: "until",
type: "uint64"
}
],
name: "OwnershipDelegationStarted",
type: "event"
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "uint256",
name: "tokenId",
type: "uint256"
},
{
indexed: true,
internalType: "address",
name: "delegatee",
type: "address"
}
],
name: "OwnershipDelegationStopped",
type: "event"
},
{
anonymous: false,
inputs: [],
name: "Paused",
type: "event"
},
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: "address",
name: "_owner",
type: "address"
},
{
indexed: false,
internalType: "address",
name: "_operator",
type: "address"
},
{
indexed: false,
internalType: "bytes4",
name: "_funcSig",
type: "bytes4"
},
{
indexed: false,
internalType: "bool",
name: "_approved",
type: "bool"
}
],
name: "PermissionSet",
type: "event"
},
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: "address",
name: "_owner",
type: "address"
},
{
indexed: false,
internalType: "address",
name: "_operator",
type: "address"
},
{
indexed: false,
internalType: "bool",
name: "_approved",
type: "bool"
}
],
name: "PermissionSetAll",
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: "_spender",
type: "address"
}
],
name: "SpenderUnwhitelisted",
type: "event"
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "address",
name: "_spender",
type: "address"
}
],
name: "SpenderWhitelisted",
type: "event"
},
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: "uint256",
name: "_tokenId",
type: "uint256"
},
{
indexed: false,
internalType: "address",
name: "_operator",
type: "address"
},
{
indexed: false,
internalType: "bool",
name: "_approved",
type: "bool"
}
],
name: "TokenOperatorSet",
type: "event"
},
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: "uint256",
name: "_tokenId",
type: "uint256"
},
{
indexed: false,
internalType: "address",
name: "_operator",
type: "address"
},
{
indexed: false,
internalType: "bytes4",
name: "_funcSig",
type: "bytes4"
},
{
indexed: false,
internalType: "bool",
name: "_approved",
type: "bool"
}
],
name: "TokenPermissionSet",
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: [],
name: "Unpaused",
type: "event"
},
{
inputs: [],
name: "DEFAULT_ADMIN_ROLE",
outputs: [
{
internalType: "bytes32",
name: "",
type: "bytes32"
}
],
stateMutability: "view",
type: "function"
},
{
inputs: [],
name: "DOMAIN_SEPARATOR",
outputs: [
{
internalType: "bytes32",
name: "",
type: "bytes32"
}
],
stateMutability: "view",
type: "function"
},
{
inputs: [],
name: "DOMAIN_TYPEHASH",
outputs: [
{
internalType: "bytes32",
name: "",
type: "bytes32"
}
],
stateMutability: "view",
type: "function"
},
{
inputs: [],
name: "MINTER_ROLE",
outputs: [
{
internalType: "bytes32",
name: "",
type: "bytes32"
}
],
stateMutability: "view",
type: "function"
},
{
inputs: [],
name: "SEEDER_ROLE",
outputs: [
{
internalType: "bytes32",
name: "",
type: "bytes32"
}
],
stateMutability: "view",
type: "function"
},
{
inputs: [
{
internalType: "uint256",
name: "tokenId",
type: "uint256"
}
],
name: "acceptOwnershipDelegation",
stateMutability: "nonpayable",
type: "function"
},
{
inputs: [],
name: "admin",
outputs: [
{
internalType: "address",
name: "",
type: "address"
}
],
stateMutability: "view",
type: "function"
},
{
inputs: [
{
internalType: "address",
name: "_to",
type: "address"
},
{
internalType: "uint256",
name: "_tokenId",
type: "uint256"
}
],
name: "approve",
stateMutability: "nonpayable",
type: "function"
},
{
inputs: [
{
internalType: "bytes32",
name: "ctxHash",
type: "bytes32"
},
{
internalType: "uint256",
name: "tokenId",
type: "uint256"
},
{
internalType: "bytes",
name: "data",
type: "bytes"
}
],
name: "attachContext",
stateMutability: "nonpayable",
type: "function"
},
{
inputs: [
{
internalType: "uint256",
name: "",
type: "uint256"
}
],
name: "axie",
outputs: [
{
internalType: "uint256",
name: "sireId",
type: "uint256"
},
{
internalType: "uint256",
name: "matronId",
type: "uint256"
},
{
internalType: "uint256",
name: "birthDate",
type: "uint256"
},
{
components: [
{
internalType: "uint256",
name: "x",
type: "uint256"
},
{
internalType: "uint256",
name: "y",
type: "uint256"
}
],
internalType: "struct AxieGenetics.Genes",
name: "genes",
type: "tuple"
},
{
internalType: "uint8",
name: "breedCount",
type: "uint8"
},
{
internalType: "uint16",
name: "level",
type: "uint16"
}
],
stateMutability: "view",
type: "function"
},
{
inputs: [
{
internalType: "uint256",
name: "",
type: "uint256"
}
],
name: "axiegg",
outputs: [
{
components: [
{
internalType: "uint256",
name: "x",
type: "uint256"
},
{
internalType: "uint256",
name: "y",
type: "uint256"
}
],
internalType: "struct AxieGenetics.Genes",
name: "sireGenes",
type: "tuple"
},
{
components: [
{
internalType: "uint256",
name: "x",
type: "uint256"
},
{
internalType: "uint256",
name: "y",
type: "uint256"
}
],
internalType: "struct AxieGenetics.Genes",
name: "matronGenes",
type: "tuple"
}
],
stateMutability: "view",
type: "function"
},
{
inputs: [
{
internalType: "address",
name: "_owner",
type: "address"
}
],
name: "balanceOf",
outputs: [
{
internalType: "uint256",
name: "_balance",
type: "uint256"
}
],
stateMutability: "view",
type: "function"
},
{
inputs: [],
name: "baseTokenURI",
outputs: [
{
internalType: "string",
name: "",
type: "string"
}
],
stateMutability: "view",
type: "function"
},
{
inputs: [
{
internalType: "bytes32[]",
name: "ctxHashes",
type: "bytes32[]"
},
{
internalType: "uint256[]",
name: "tokenIds",
type: "uint256[]"
},
{
internalType: "bytes[]",
name: "data",
type: "bytes[]"
}
],
name: "batchAttachContexts",
stateMutability: "nonpayable",
type: "function"
},
{
inputs: [
{
internalType: "uint256[]",
name: "_axieIds",
type: "uint256[]"
},
{
internalType: "uint256[]",
name: "_seeds",
type: "uint256[]"
}
],
name: "batchGrowAxieggsToAdults",
stateMutability: "nonpayable",
type: "function"
},
{
inputs: [
{
internalType: "uint256[]",
name: "_ids",
type: "uint256[]"
},
{
internalType: "bytes[]",
name: "_packages",
type: "bytes[]"
},
{
internalType: "address",
name: "_owner",
type: "address"
}
],
name: "batchMintAxies",
stateMutability: "nonpayable",
type: "function"
},
{
inputs: [
{
internalType: "address",
name: "controller",
type: "address"
},
{
internalType: "uint64",
name: "detachingDuration",
type: "uint64"
},
{
internalType: "bytes",
name: "ctxMsg",
type: "bytes"
}
],
name: "createContext",
outputs: [
{
internalType: "bytes32",
name: "ctxHash",
type: "bytes32"
}
],
stateMutability: "nonpayable",
type: "function"
},
{
inputs: [],
name: "currentAxieId",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256"
}
],
stateMutability: "view",
type: "function"
},
{
inputs: [
{
internalType: "uint256",
name: "_axieId",
type: "uint256"
},
{
components: [
{
internalType: "uint256",
name: "x",
type: "uint256"
},
{
internalType: "uint256",
name: "y",
type: "uint256"
}
],
internalType: "struct AxieGenetics.Genes",
name: "_genes",
type: "tuple"
}
],
name: "evolveAxie",
stateMutability: "nonpayable",
type: "function"
},
{
inputs: [
{
internalType: "bytes32",
name: "ctxHash",
type: "bytes32"
},
{
internalType: "uint256",
name: "tokenId",
type: "uint256"
},
{
internalType: "bytes",
name: "data",
type: "bytes"
}
],
name: "execDetachContext",
stateMutability: "nonpayable",
type: "function"
},
{
inputs: [],
name: "geneBrewerContract",
outputs: [
{
internalType: "contract IAxieGeneBrewer",
name: "",
type: "address"
}
],
stateMutability: "view",
type: "function"
},
{
inputs: [
{
internalType: "uint256",
name: "_tokenId",
type: "uint256"
}
],
name: "getApproved",
outputs: [
{
internalType: "address",
name: "",
type: "address"
}
],
stateMutability: "view",
type: "function"
},
{
inputs: [
{
internalType: "uint256",
name: "_axieId",
type: "uint256"
}
],
name: "getAxie",
outputs: [
{
components: [
{
internalType: "uint256",
name: "sireId",
type: "uint256"
},
{
internalType: "uint256",
name: "matronId",
type: "uint256"
},
{
internalType: "uint256",
name: "birthDate",
type: "uint256"
},
{
components: [
{
internalType: "uint256",
name: "x",
type: "uint256"
},
{
internalType: "uint256",
name: "y",
type: "uint256"
}
],
internalType: "struct AxieGenetics.Genes",
name: "genes",
type: "tuple"
},
{
internalType: "uint8",
name: "breedCount",
type: "uint8"
},
{
internalType: "uint16",
name: "level",
type: "uint16"
}
],
internalType: "struct IAxie.Axie",
name: "",
type: "tuple"
}
],
stateMutability: "view",
type: "function"
},
{
inputs: [
{
internalType: "uint256",
name: "_axieId",
type: "uint256"
}
],
name: "getAxiegg",
outputs: [
{
components: [
{
components: [
{
internalType: "uint256",
name: "x",
type: "uint256"
},
{
internalType: "uint256",
name: "y",
type: "uint256"
}
],
internalType: "struct AxieGenetics.Genes",
name: "sireGenes",
type: "tuple"
},
{
components: [
{
internalType: "uint256",
name: "x",
type: "uint256"
},
{
internalType: "uint256",
name: "y",
type: "uint256"
}
],
internalType: "struct AxieGenetics.Genes",
name: "matronGenes",
type: "tuple"
}
],
internalType: "struct IAxie.Axiegg",
name: "",
type: "tuple"
}
],
stateMutability: "view",
type: "function"
},
{
inputs: [
{
internalType: "bytes32",
name: "ctxHash",
type: "bytes32"
}
],
name: "getContext",
outputs: [
{
internalType: "address",
name: "controller",
type: "address"
},
{
internalType: "uint64",
name: "detachingDuration",
type: "uint64"
}
],
stateMutability: "view",
type: "function"
},
{
inputs: [
{
internalType: "bytes32",
name: "ctxHash",
type: "bytes32"
},
{
internalType: "uint256",
name: "tokenId",
type: "uint256"
}
],
name: "getContextUser",
outputs: [
{
internalType: "address",
name: "user",
type: "address"
}
],
stateMutability: "view",
type: "function"
},
{
inputs: [
{
internalType: "uint256",
name: "tokenId",
type: "uint256"
}
],
name: "getOwnershipDelegatee",
outputs: [
{
internalType: "address",
name: "delegatee",
type: "address"
},
{
internalType: "uint64",
name: "until",
type: "uint64"
}
],
stateMutability: "view",
type: "function"
},
{
inputs: [
{
internalType: "uint256",
name: "tokenId",
type: "uint256"
}
],
name: "getOwnershipManager",
outputs: [
{
internalType: "address",
name: "manager",
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",
stateMutability: "nonpayable",
type: "function"
},
{
inputs: [
{
internalType: "bytes32",
name: "role",
type: "bytes32"
},
{
internalType: "address",
name: "account",
type: "address"
}
],
name: "hasRole",
outputs: [
{
internalType: "bool",
name: "",
type: "bool"
}
],
stateMutability: "view",
type: "function"
},
{
inputs: [
{
internalType: "uint256",
name: "",
type: "uint256"
}
],
name: "hoppingAxieId",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256"
}
],
stateMutability: "view",
type: "function"
},
{
inputs: [
{
internalType: "address",
name: "_owner",
type: "address"
},
{
internalType: "address",
name: "_operator",
type: "address"
}
],
name: "isApprovedForAll",
outputs: [
{
internalType: "bool",
name: "_approved",
type: "bool"
}
],
stateMutability: "view",
type: "function"
},
{
inputs: [
{
internalType: "bytes32",
name: "ctxHash",
type: "bytes32"
},
{
internalType: "uint256",
name: "tokenId",
type: "uint256"
}
],
name: "isAttachedWithContext",
outputs: [
{
internalType: "bool",
name: "",
type: "bool"
}
],
stateMutability: "view",
type: "function"
},
{
inputs: [
{
internalType: "address",
name: "_operator",
type: "address"
},
{
internalType: "uint256",
name: "_tokenId",
type: "uint256"
},
{
internalType: "bytes4",
name: "_funcSig",
type: "bytes4"
}
],
name: "isAuthorized",
outputs: [
{
internalType: "bool",
name: "",
type: "bool"
}
],
stateMutability: "view",
type: "function"
},
{
inputs: [
{
internalType: "uint256",
name: "_tokenId",
type: "uint256"
},
{
internalType: "address",
name: "_operator",
type: "address"
},
{
internalType: "bytes4",
name: "_funcSig",
type: "bytes4"
}
],
name: "isFunctionOperatorOfToken",
outputs: [
{
internalType: "bool",
name: "",
type: "bool"
}
],
stateMutability: "view",
type: "function"
},
{
inputs: [
{
internalType: "address",
name: "addr",
type: "address"
}
],
name: "isMinter",
outputs: [
{
internalType: "bool",
name: "",
type: "bool"
}
],
stateMutability: "view",
type: "function"
},
{
inputs: [
{
internalType: "address",
name: "_owner",
type: "address"
},
{
internalType: "address",
name: "_operator",
type: "address"
},
{
internalType: "bytes4",
name: "_funcSig",
type: "bytes4"
}
],
name: "isPermissionSet",
outputs: [
{
internalType: "bool",
name: "",
type: "bool"
}
],
stateMutability: "view",
type: "function"
},
{
inputs: [
{
internalType: "address",
name: "_owner",
type: "address"
},
{
internalType: "address",
name: "_operator",
type: "address"
}
],
name: "isPermissionSetAll",
outputs: [
{
internalType: "bool",
name: "",
type: "bool"
}
],
stateMutability: "view",
type: "function"
},
{
inputs: [
{
internalType: "bytes32",
name: "ctxHash",
type: "bytes32"
},
{
internalType: "uint256",
name: "tokenId",
type: "uint256"
}
],
name: "isTokenContextLocked",
outputs: [
{
internalType: "bool",
name: "",
type: "bool"
}
],
stateMutability: "view",
type: "function"
},
{
inputs: [
{
internalType: "uint256",
name: "_tokenId",
type: "uint256"
},
{
internalType: "address",
name: "_operator",
type: "address"
}
],
name: "isTokenOperator",
outputs: [
{
internalType: "bool",
name: "",
type: "bool"
}
],
stateMutability: "view",
type: "function"
},
{
inputs: [],
name: "maxDetachingDuration",
outputs: [
{
internalType: "uint64",
name: "",
type: "uint64"
}
],
stateMutability: "pure",
type: "function"
},
{
inputs: [
{
internalType: "address",
name: "_to",
type: "address"
},
{
components: [
{
internalType: "uint256",
name: "sireId",
type: "uint256"
},
{
internalType: "uint256",
name: "matronId",
type: "uint256"
},
{
internalType: "uint256",
name: "birthDate",
type: "uint256"
},
{
components: [
{
internalType: "uint256",
name: "x",
type: "uint256"
},
{
internalType: "uint256",
name: "y",
type: "uint256"
}
],
internalType: "struct AxieGenetics.Genes",
name: "genes",
type: "tuple"
},
{
internalType: "uint8",
name: "breedCount",
type: "uint8"
},
{
internalType: "uint16",
name: "level",
type: "uint16"
}
],
internalType: "struct IAxie.Axie",
name: "_axie",
type: "tuple"
}
],
name: "mintAxie",
outputs: [
{
internalType: "uint256",
name: "_axieId",
type: "uint256"
}
],
stateMutability: "nonpayable",
type: "function"
},
{
inputs: [
{
internalType: "address",
name: "addr",
type: "address"
}
],
name: "minter",
outputs: [
{
internalType: "bool",
name: "",
type: "bool"
}
],
stateMutability: "view",
type: "function"
},
{
inputs: [
{
internalType: "uint256",
name: "index",
type: "uint256"
}
],
name: "minters",
outputs: [
{
internalType: "address",
name: "",
type: "address"
}
],
stateMutability: "view",
type: "function"
},
{
inputs: [],
name: "name",
outputs: [
{
internalType: "string",
name: "",
type: "string"
}
],
stateMutability: "view",
type: "function"
},
{
inputs: [
{
internalType: "uint256",
name: "",
type: "uint256"
}
],
name: "nonces",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256"
}
],
stateMutability: "view",
type: "function"
},
{
inputs: [
{
internalType: "address",
name: "",
type: "address"
},
{
internalType: "address",
name: "",
type: "address"
},
{
internalType: "bytes4",
name: "",
type: "bytes4"
}
],
name: "operatorPermission",
outputs: [
{
internalType: "bool",
name: "",
type: "bool"
}
],
stateMutability: "view",
type: "function"
},
{
inputs: [
{