Test
Entrypoint for test utilities and constants
ABIType exports some test utilities and constants to make playing around and testing your code easier via the 'abitype/abis'
entrypoint.
ABIs
import {
const customSolidityErrorsAbi: readonly [{
readonly inputs: readonly [];
readonly stateMutability: "nonpayable";
readonly type: "constructor";
}, {
readonly inputs: readonly [];
readonly name: "ApprovalCallerNotOwnerNorApproved";
readonly type: "error";
}, {
readonly inputs: readonly [];
readonly name: "ApprovalQueryForNonexistentToken";
readonly type: "error";
}]customSolidityErrorsAbi,
const ensAbi: readonly [{
readonly constant: true;
readonly inputs: readonly [
{
readonly name: "node";
readonly type: "bytes32";
}
];
readonly name: "resolver";
readonly outputs: readonly [
{
readonly type: "address";
}
];
readonly payable: false;
readonly type: "function";
}, {
readonly constant: true;
readonly inputs: readonly [
{
readonly name: "node";
readonly type: "bytes32";
}
];
readonly name: "owner";
readonly outputs: readonly [
{
readonly type: "address";
}
];
readonly payable: false;
readonly type: "function";
}, ... 8 more ..., {
...;
}]ensAbi,
const ensRegistryWithFallbackAbi: readonly [{
readonly inputs: readonly [
{
readonly internalType: "contract ENS";
readonly name: "_old";
readonly type: "address";
}
];
readonly payable: false;
readonly stateMutability: "nonpayable";
readonly type: "constructor";
}, {
readonly inputs: readonly [
{
readonly indexed: true;
readonly name: "owner";
readonly type: "address";
},
{
readonly indexed: true;
readonly name: "operator";
readonly type: "address";
},
{
readonly indexed: false;
readonly name: "approved";
readonly type: "bool";
}
];
readonly name: "ApprovalForAll";
readonly type: "event";
}, {
readonly inputs: readonly [
{
readonly indexed: true;
readonly name: "node";
readonly type: "bytes32";
},
{
readonly indexed: true;
readonly name: "label";
readonly type: "bytes32";
},
{
readonly indexed: false;
readonly name: "owner";
readonly type: "address";
}
];
readonly name: "NewOwner";
readonly type: "event";
}, ... 15 more ..., {
...;
}]ENSRegistryWithFallback https://etherscan.io/address/0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e
ensRegistryWithFallbackAbi,
const erc20Abi: readonly [{
readonly type: "event";
readonly name: "Approval";
readonly inputs: readonly [
{
readonly indexed: true;
readonly name: "owner";
readonly type: "address";
},
{
readonly indexed: true;
readonly name: "spender";
readonly type: "address";
},
{
readonly indexed: false;
readonly name: "value";
readonly type: "uint256";
}
];
}, {
readonly type: "event";
readonly name: "Transfer";
readonly inputs: readonly [
{
readonly indexed: true;
readonly name: "from";
readonly type: "address";
},
{
readonly indexed: true;
readonly name: "to";
readonly type: "address";
},
{
readonly indexed: false;
readonly name: "value";
readonly type: "uint256";
}
];
}, {
readonly type: "function";
readonly name: "allowance";
readonly stateMutability: "view";
readonly inputs: readonly [
{
readonly name: "owner";
readonly type: "address";
},
{
readonly name: "spender";
readonly type: "address";
}
];
readonly outputs: readonly [
{
readonly name: "";
readonly type: "uint256";
}
];
}, ... 7 more ..., {
...;
}]erc20Abi,
const nestedTupleArrayAbi: readonly [{
readonly inputs: readonly [
{
readonly name: "s";
readonly type: "tuple";
readonly components: readonly [
{
readonly name: "a";
readonly type: "uint8";
},
{
readonly name: "b";
readonly type: "uint8[]";
},
{
readonly name: "c";
readonly type: "tuple[]";
readonly components: readonly [
{
readonly name: "x";
readonly type: "uint8";
},
{
readonly name: "y";
readonly type: "uint8";
}
];
}
];
},
{
readonly name: "t";
readonly type: "tuple";
readonly components: readonly [
{
readonly name: "x";
readonly type: "uint";
},
{
readonly name: "y";
readonly type: "uint";
}
];
},
{
readonly name: "a";
readonly type: "uint256";
}
];
readonly name: "f";
readonly outputs: readonly [
{
readonly name: "t";
readonly type: "tuple[]";
readonly components: readonly ...nestedTupleArrayAbi,
const nounsAuctionHouseAbi: readonly [{
readonly inputs: readonly [
{
readonly indexed: true;
readonly name: "nounId";
readonly type: "uint256";
},
{
readonly indexed: false;
readonly name: "sender";
readonly type: "address";
},
{
readonly indexed: false;
readonly name: "value";
readonly type: "uint256";
},
{
readonly indexed: false;
readonly name: "extended";
readonly type: "bool";
}
];
readonly name: "AuctionBid";
readonly type: "event";
}, {
readonly inputs: readonly [
{
readonly indexed: true;
readonly name: "nounId";
readonly type: "uint256";
},
{
readonly indexed: false;
readonly name: "startTime";
readonly type: "uint256";
},
{
readonly indexed: false;
readonly name: "endTime";
readonly type: "uint256";
}
];
readonly name: "AuctionCreated";
readonly type: "event";
}, {
readonly inputs: readonly [
{
readonly indexed: true;
readonly name: "nounId";
readonly type: "uint256";
},
{
readonly indexed: false;
readonly name: "endTime";
readonly type: "uint256";
}
];
readonly name: "AuctionExtended";
readonly type: "event";
}, {
readonly inputs: readonly [
{
readonly indexed: ...NounsAuctionHouse https://etherscan.io/address/0x5b2003ca8fe9ffb93684ce377f52b415c7dc0216
nounsAuctionHouseAbi,
const seaportAbi: readonly [{
readonly inputs: readonly [
{
readonly name: "conduitController";
readonly type: "address";
}
];
readonly stateMutability: "nonpayable";
readonly type: "constructor";
}, {
readonly inputs: readonly [
{
readonly components: readonly [
{
readonly name: "offerer";
readonly type: "address";
},
{
readonly name: "zone";
readonly type: "address";
},
{
readonly components: readonly [
{
readonly name: "itemType";
readonly type: "uint8";
},
{
readonly name: "token";
readonly type: "address";
},
{
readonly name: "identifierOrCriteria";
readonly type: "uint256";
},
{
readonly name: "startAmount";
readonly type: "uint256";
},
{
readonly name: "endAmount";
readonly type: "uint256";
}
];
readonly name: "offer";
readonly type: "tuple[]";
} ...seaportAbi,
const wagmiMintExampleAbi: readonly [{
readonly inputs: readonly [];
readonly stateMutability: "nonpayable";
readonly type: "constructor";
}, {
readonly inputs: readonly [
{
readonly name: "owner";
readonly type: "address";
readonly indexed: true;
},
{
readonly name: "approved";
readonly type: "address";
readonly indexed: true;
},
{
readonly name: "tokenId";
readonly type: "uint256";
readonly indexed: true;
}
];
readonly name: "Approval";
readonly type: "event";
}, {
readonly inputs: readonly [
{
readonly name: "owner";
readonly type: "address";
readonly indexed: true;
},
{
readonly name: "operator";
readonly type: "address";
readonly indexed: true;
},
{
readonly name: "approved";
readonly type: "bool";
readonly indexed: false;
}
];
readonly name: "ApprovalForAll";
readonly type: "event";
}, {
readonly inputs: readonly [
{
readonly name: "from";
readonly type: "address";
readonly indexed: true;
},
{
readonly name: "to";
readonly type: "address";
readonly indexed: true;
},
{
readonly name: "tokenId";
readonly type: "uint256";
readonly indexed: true;
}
];
readonly name: "Transfer";
readonly ...wagmiMintExampleAbi,
const wethAbi: readonly [{
readonly constant: true;
readonly inputs: readonly [];
readonly name: "name";
readonly outputs: readonly [
{
readonly type: "string";
}
];
readonly payable: false;
readonly stateMutability: "view";
readonly type: "function";
}, {
readonly constant: false;
readonly inputs: readonly [
{
readonly name: "guy";
readonly type: "address";
},
{
readonly name: "wad";
readonly type: "uint256";
}
];
... 4 more ...;
readonly type: "function";
}, ... 13 more ..., {
...;
}]wethAbi,
const writingEditionsFactoryAbi: readonly [{
readonly inputs: readonly [
{
readonly name: "_owner";
readonly type: "address";
},
{
readonly name: "_treasuryConfiguration";
readonly type: "address";
},
{
readonly name: "_maxLimit";
readonly type: "uint256";
},
{
readonly name: "_guardOn";
readonly type: "bool";
}
];
readonly stateMutability: "nonpayable";
readonly type: "constructor";
}, {
readonly inputs: readonly [
{
readonly indexed: true;
readonly name: "clone";
readonly type: "address";
},
{
readonly indexed: false;
readonly name: "oldBaseDescriptionURI";
readonly type: "string";
},
{
readonly indexed: false;
readonly name: "newBaseDescriptionURI";
readonly type: "string";
}
];
readonly name: "BaseDescriptionURISet";
readonly type: "event";
}, {
readonly inputs: readonly [
{
readonly indexed: true;
readonly name: "factory";
readonly type: "address";
},
{
readonly indexed: true;
readonly name: "owner";
readonly type: "address";
},
{
readonly indexed: true;
readonly name: "clone";
readonly type: "address";
}
];
readonly name: "CloneDeployed";
readonly type: "event";
}, {
readonly inputs: readonly ...WritingEditionsFactory https://optimistic.etherscan.io/address/0x302f746eE2fDC10DDff63188f71639094717a766
writingEditionsFactoryAbi,
const eip165Abi: readonly [{
readonly inputs: readonly [
{
readonly internalType: "bytes4";
readonly name: "interfaceId";
readonly type: "bytes4";
}
];
readonly name: "supportsInterface";
readonly outputs: readonly [
{
readonly internalType: "bool";
readonly name: "";
readonly type: "bool";
}
];
readonly stateMutability: "view";
readonly type: "function";
}]eip165Abi,
} from 'abitype/abis'
Human-Readable ABIs
import {
const customSolidityErrorsHumanReadableAbi: readonly ["constructor()", "error ApprovalCallerNotOwnerNorApproved()", "error ApprovalQueryForNonexistentToken()"]customSolidityErrorsHumanReadableAbi,
const ensHumanReadableAbi: readonly ["function resolver(bytes32 node) view returns (address)", "function owner(bytes32 node) view returns (address)", "function setSubnodeOwner(bytes32 node, bytes32 label, address owner)", ... 7 more ..., "event NewTTL(bytes32 indexed node, uint64 ttl)"]ensHumanReadableAbi,
const ensRegistryWithFallbackHumanReadableAbi: readonly ["constructor(address _old)", "event ApprovalForAll(address indexed owner, address indexed operator, bool approved)", "event NewOwner(bytes32 indexed node, bytes32 indexed label, address owner)", ... 15 more ..., "function ttl(bytes32 node) view returns (uint64)"]ENSRegistryWithFallback https://etherscan.io/address/0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e
ensRegistryWithFallbackHumanReadableAbi,
const erc20HumanReadableAbi: readonly ["event Approval(address indexed owner, address indexed spender, uint256 value)", "event Transfer(address indexed from, address indexed to, uint256 value)", "function allowance(address owner, address spender) view returns (uint256)", ... 7 more ..., "function transferFrom(address sender, address recipient, uint256 amount) returns (bool)"]erc20HumanReadableAbi,
const nestedTupleArrayHumanReadableAbi: readonly ["function f((uint8 a, uint8[] b, (uint8 x, uint8 y)[] c) s, (uint x, uint y) t, uint256 a) returns ((uint256 x, uint256 y)[] t)", "function v((uint8 a, uint8[] b) s, (uint x, uint y) t, uint256 a)"]nestedTupleArrayHumanReadableAbi,
const nounsAuctionHouseHumanReadableAbi: readonly ["event AuctionBid(uint256 indexed nounId, address sender, uint256 value, bool extended)", "event AuctionCreated(uint256 indexed nounId, uint256 startTime, uint256 endTime)", ... 27 more ..., "function weth() view returns (address)"]NounsAuctionHouse https://etherscan.io/address/0x5b2003ca8fe9ffb93684ce377f52b415c7dc0216
nounsAuctionHouseHumanReadableAbi,
const seaportHumanReadableAbi: readonly ["constructor(address conduitController)", "struct AdditionalRecipient { uint256 amount; address recipient; }", "struct AdvancedOrder { OrderParameters parameters; uint120 numerator; uint120 denominator; bytes signature; bytes extraData; }", ... 79 more ..., "error UnusedItemParameters()"]seaportHumanReadableAbi,
const wagmiMintExampleHumanReadableAbi: readonly ["constructor()", "event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId)", "event ApprovalForAll(address indexed owner, address indexed operator, bool approved)", ... 15 more ..., "function transferFrom(address from, address to, uint256 tokenId)"]wagmiMintExampleHumanReadableAbi,
const wethHumanReadableAbi: readonly ["function name() view returns (string)", "function approve(address guy, uint wad) returns (bool)", "function totalSupply() view returns (uint)", "function transferFrom(address src, address dst, uint wad) returns (bool)", ... 12 more ..., "fallback()"]wethHumanReadableAbi,
const writingEditionsFactoryHumanReadableAbi: readonly ["constructor(address _owner, address _treasuryConfiguration, uint256 _maxLimit, bool _guardOn)", "event BaseDescriptionURISet(address indexed clone, string oldBaseDescriptionURI, string newBaseDescriptionURI)", ... 42 more ..., "function treasuryConfiguration() view returns (address)"]WritingEditionsFactory https://optimistic.etherscan.io/address/0x302f746eE2fDC10DDff63188f71639094717a766
writingEditionsFactoryHumanReadableAbi,
} from 'abitype/abis'