Skip to content

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"; }, { ...; }]
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"; }, ... 9 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"; }, ... 17 more ..., { ...; }]
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"; }]; }, ... 9 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 [{ readonly name: "x"; readonly type: "uint256"; }, { readonly name: "y"; readonly type: "uint256"; }]; }]; readonly stateMutability: "payable"; readonly type: "function"; }, { ...; }]
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"; }, ... 28 more ..., { ...; }]
nounsAuctionHouseAbi
,
const seaportAbi: readonly [{ readonly inputs: readonly [{ readonly name: "conduitController"; readonly type: "address"; }]; readonly stateMutability: "nonpayable"; readonly type: "constructor"; }, ... 66 more ..., { ...; }]
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"; }, ... 16 more ..., { ...; }]
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"; }, ... 14 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"; }, ... 42 more ..., { ...; }]
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)"]
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)"]
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)"]
writingEditionsFactoryHumanReadableAbi
,
} from 'abitype/abis'