@hashport/sdk
Version:
Utility functions for interacting with the hashport bridge
541 lines • 11.3 kB
JavaScript
export const erc20ABI = [
{
type: 'event',
name: 'Approval',
inputs: [
{
indexed: true,
name: 'owner',
type: 'address',
},
{
indexed: true,
name: 'spender',
type: 'address',
},
{
indexed: false,
name: 'value',
type: 'uint256',
},
],
},
{
type: 'event',
name: 'Transfer',
inputs: [
{
indexed: true,
name: 'from',
type: 'address',
},
{
indexed: true,
name: 'to',
type: 'address',
},
{
indexed: false,
name: 'value',
type: 'uint256',
},
],
},
{
type: 'function',
name: 'allowance',
stateMutability: 'view',
inputs: [
{
name: 'owner',
type: 'address',
},
{
name: 'spender',
type: 'address',
},
],
outputs: [
{
name: '',
type: 'uint256',
},
],
},
{
type: 'function',
name: 'approve',
stateMutability: 'nonpayable',
inputs: [
{
name: 'spender',
type: 'address',
},
{
name: 'amount',
type: 'uint256',
},
],
outputs: [
{
name: '',
type: 'bool',
},
],
},
{
type: 'function',
name: 'balanceOf',
stateMutability: 'view',
inputs: [
{
name: 'account',
type: 'address',
},
],
outputs: [
{
name: '',
type: 'uint256',
},
],
},
{
type: 'function',
name: 'decimals',
stateMutability: 'view',
inputs: [],
outputs: [
{
name: '',
type: 'uint8',
},
],
},
{
type: 'function',
name: 'name',
stateMutability: 'view',
inputs: [],
outputs: [
{
name: '',
type: 'string',
},
],
},
{
type: 'function',
name: 'symbol',
stateMutability: 'view',
inputs: [],
outputs: [
{
name: '',
type: 'string',
},
],
},
{
type: 'function',
name: 'totalSupply',
stateMutability: 'view',
inputs: [],
outputs: [
{
name: '',
type: 'uint256',
},
],
},
{
type: 'function',
name: 'transfer',
stateMutability: 'nonpayable',
inputs: [
{
name: 'recipient',
type: 'address',
},
{
name: 'amount',
type: 'uint256',
},
],
outputs: [
{
name: '',
type: 'bool',
},
],
},
{
type: 'function',
name: 'transferFrom',
stateMutability: 'nonpayable',
inputs: [
{
name: 'sender',
type: 'address',
},
{
name: 'recipient',
type: 'address',
},
{
name: 'amount',
type: 'uint256',
},
],
outputs: [
{
name: '',
type: 'bool',
},
],
},
{
inputs: [
{
internalType: 'address',
name: 'owner',
type: 'address',
},
],
name: 'nonces',
outputs: [
{
internalType: 'uint256',
name: '',
type: 'uint256',
},
],
stateMutability: 'view',
type: 'function',
},
];
export const erc721ABI = [
{
type: 'event',
name: 'Approval',
inputs: [
{
indexed: true,
name: 'owner',
type: 'address',
},
{
indexed: true,
name: 'spender',
type: 'address',
},
{
indexed: true,
name: 'tokenId',
type: 'uint256',
},
],
},
{
type: 'event',
name: 'ApprovalForAll',
inputs: [
{
indexed: true,
name: 'owner',
type: 'address',
},
{
indexed: true,
name: 'operator',
type: 'address',
},
{
indexed: false,
name: 'approved',
type: 'bool',
},
],
},
{
type: 'event',
name: 'Transfer',
inputs: [
{
indexed: true,
name: 'from',
type: 'address',
},
{
indexed: true,
name: 'to',
type: 'address',
},
{
indexed: true,
name: 'tokenId',
type: 'uint256',
},
],
},
{
type: 'function',
name: 'approve',
stateMutability: 'payable',
inputs: [
{
name: 'spender',
type: 'address',
},
{
name: 'tokenId',
type: 'uint256',
},
],
outputs: [],
},
{
type: 'function',
name: 'balanceOf',
stateMutability: 'view',
inputs: [
{
name: 'account',
type: 'address',
},
],
outputs: [
{
name: '',
type: 'uint256',
},
],
},
{
type: 'function',
name: 'getApproved',
stateMutability: 'view',
inputs: [
{
name: 'tokenId',
type: 'uint256',
},
],
outputs: [
{
name: '',
type: 'address',
},
],
},
{
type: 'function',
name: 'isApprovedForAll',
stateMutability: 'view',
inputs: [
{
name: 'owner',
type: 'address',
},
{
name: 'operator',
type: 'address',
},
],
outputs: [
{
name: '',
type: 'bool',
},
],
},
{
type: 'function',
name: 'name',
stateMutability: 'view',
inputs: [],
outputs: [
{
name: '',
type: 'string',
},
],
},
{
type: 'function',
name: 'ownerOf',
stateMutability: 'view',
inputs: [
{
name: 'tokenId',
type: 'uint256',
},
],
outputs: [
{
name: 'owner',
type: 'address',
},
],
},
{
type: 'function',
name: 'safeTransferFrom',
stateMutability: 'payable',
inputs: [
{
name: 'from',
type: 'address',
},
{
name: 'to',
type: 'address',
},
{
name: 'tokenId',
type: 'uint256',
},
],
outputs: [],
},
{
type: 'function',
name: 'safeTransferFrom',
stateMutability: 'nonpayable',
inputs: [
{
name: 'from',
type: 'address',
},
{
name: 'to',
type: 'address',
},
{
name: 'id',
type: 'uint256',
},
{
name: 'data',
type: 'bytes',
},
],
outputs: [],
},
{
type: 'function',
name: 'setApprovalForAll',
stateMutability: 'nonpayable',
inputs: [
{
name: 'operator',
type: 'address',
},
{
name: 'approved',
type: 'bool',
},
],
outputs: [],
},
{
type: 'function',
name: 'symbol',
stateMutability: 'view',
inputs: [],
outputs: [
{
name: '',
type: 'string',
},
],
},
{
type: 'function',
name: 'tokenByIndex',
stateMutability: 'view',
inputs: [
{
name: 'index',
type: 'uint256',
},
],
outputs: [
{
name: '',
type: 'uint256',
},
],
},
{
type: 'function',
name: 'tokenByIndex',
stateMutability: 'view',
inputs: [
{
name: 'owner',
type: 'address',
},
{
name: 'index',
type: 'uint256',
},
],
outputs: [
{
name: 'tokenId',
type: 'uint256',
},
],
},
{
type: 'function',
name: 'tokenURI',
stateMutability: 'view',
inputs: [
{
name: 'tokenId',
type: 'uint256',
},
],
outputs: [
{
name: '',
type: 'string',
},
],
},
{
type: 'function',
name: 'totalSupply',
stateMutability: 'view',
inputs: [],
outputs: [
{
name: '',
type: 'uint256',
},
],
},
{
type: 'function',
name: 'transferFrom',
stateMutability: 'payable',
inputs: [
{
name: 'sender',
type: 'address',
},
{
name: 'recipient',
type: 'address',
},
{
name: 'tokeId',
type: 'uint256',
},
],
outputs: [],
},
];
//# sourceMappingURL=abi.js.map