PHP WebShell
Текущая директория: /usr/lib/node_modules/bitgo/node_modules/@vechain/sdk-core/src/utils/const
Просмотр файла: abi.ts
/**
* ABI of the ERC20 token standard.
*
* @see [EIP 20](https://eips.ethereum.org/EIPS/eip-20)
*/
const ERC20_ABI = [
{ inputs: [], stateMutability: 'nonpayable', type: 'constructor' },
{
inputs: [
{ internalType: 'address', name: 'spender', type: 'address' },
{ internalType: 'uint256', name: 'allowance', type: 'uint256' },
{ internalType: 'uint256', name: 'needed', type: 'uint256' }
],
name: 'ERC20InsufficientAllowance',
type: 'error'
},
{
inputs: [
{ internalType: 'address', name: 'sender', type: 'address' },
{ internalType: 'uint256', name: 'balance', type: 'uint256' },
{ internalType: 'uint256', name: 'needed', type: 'uint256' }
],
name: 'ERC20InsufficientBalance',
type: 'error'
},
{
inputs: [
{ internalType: 'address', name: 'approver', type: 'address' }
],
name: 'ERC20InvalidApprover',
type: 'error'
},
{
inputs: [
{ internalType: 'address', name: 'receiver', type: 'address' }
],
name: 'ERC20InvalidReceiver',
type: 'error'
},
{
inputs: [{ internalType: 'address', name: 'sender', type: 'address' }],
name: 'ERC20InvalidSender',
type: 'error'
},
{
inputs: [{ internalType: 'address', name: 'spender', type: 'address' }],
name: 'ERC20InvalidSpender',
type: 'error'
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: 'address',
name: 'owner',
type: 'address'
},
{
indexed: true,
internalType: 'address',
name: 'spender',
type: 'address'
},
{
indexed: false,
internalType: 'uint256',
name: 'value',
type: 'uint256'
}
],
name: 'Approval',
type: 'event'
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: 'address',
name: 'from',
type: 'address'
},
{
indexed: true,
internalType: 'address',
name: 'to',
type: 'address'
},
{
indexed: false,
internalType: 'uint256',
name: 'value',
type: 'uint256'
}
],
name: 'Transfer',
type: 'event'
},
{
inputs: [
{ internalType: 'address', name: 'owner', type: 'address' },
{ internalType: 'address', name: 'spender', type: 'address' }
],
name: 'allowance',
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
stateMutability: 'view',
type: 'function'
},
{
inputs: [
{ internalType: 'address', name: 'spender', type: 'address' },
{ internalType: 'uint256', name: 'value', type: 'uint256' }
],
name: 'approve',
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
stateMutability: 'nonpayable',
type: 'function'
},
{
inputs: [{ internalType: 'address', name: 'account', type: 'address' }],
name: 'balanceOf',
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
stateMutability: 'view',
type: 'function'
},
{
inputs: [],
name: 'decimals',
outputs: [{ internalType: 'uint8', name: '', type: 'uint8' }],
stateMutability: 'view',
type: 'function'
},
{
inputs: [],
name: 'name',
outputs: [{ internalType: 'string', name: '', type: 'string' }],
stateMutability: 'view',
type: 'function'
},
{
inputs: [],
name: 'symbol',
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: 'to', type: 'address' },
{ internalType: 'uint256', name: 'value', type: 'uint256' }
],
name: 'transfer',
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
stateMutability: 'nonpayable',
type: 'function'
},
{
inputs: [
{ internalType: 'address', name: 'from', type: 'address' },
{ internalType: 'address', name: 'to', type: 'address' },
{ internalType: 'uint256', name: 'value', type: 'uint256' }
],
name: 'transferFrom',
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
stateMutability: 'nonpayable',
type: 'function'
}
] as const;
/**
* ABI of the ERC721 token standard.
*
* @see [EIP 721](https://eips.ethereum.org/EIPS/eip-721)
*/
const ERC721_ABI = [
{
inputs: [],
stateMutability: 'nonpayable',
type: 'constructor'
},
{
inputs: [
{
internalType: 'address',
name: 'sender',
type: 'address'
},
{
internalType: 'uint256',
name: 'tokenId',
type: 'uint256'
},
{
internalType: 'address',
name: 'owner',
type: 'address'
}
],
name: 'ERC721IncorrectOwner',
type: 'error'
},
{
inputs: [
{
internalType: 'address',
name: 'operator',
type: 'address'
},
{
internalType: 'uint256',
name: 'tokenId',
type: 'uint256'
}
],
name: 'ERC721InsufficientApproval',
type: 'error'
},
{
inputs: [
{
internalType: 'address',
name: 'approver',
type: 'address'
}
],
name: 'ERC721InvalidApprover',
type: 'error'
},
{
inputs: [
{
internalType: 'address',
name: 'operator',
type: 'address'
}
],
name: 'ERC721InvalidOperator',
type: 'error'
},
{
inputs: [
{
internalType: 'address',
name: 'owner',
type: 'address'
}
],
name: 'ERC721InvalidOwner',
type: 'error'
},
{
inputs: [
{
internalType: 'address',
name: 'receiver',
type: 'address'
}
],
name: 'ERC721InvalidReceiver',
type: 'error'
},
{
inputs: [
{
internalType: 'address',
name: 'sender',
type: 'address'
}
],
name: 'ERC721InvalidSender',
type: 'error'
},
{
inputs: [
{
internalType: 'uint256',
name: 'tokenId',
type: 'uint256'
}
],
name: 'ERC721NonexistentToken',
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: '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'
},
{
inputs: [
{
internalType: 'address',
name: 'to',
type: 'address'
},
{
internalType: 'uint256',
name: 'tokenId',
type: 'uint256'
}
],
name: 'approve',
outputs: [],
stateMutability: 'nonpayable',
type: 'function'
},
{
inputs: [
{
internalType: 'address',
name: 'owner',
type: 'address'
}
],
name: 'balanceOf',
outputs: [
{
internalType: 'uint256',
name: '',
type: 'uint256'
}
],
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: 'address',
name: 'owner',
type: 'address'
},
{
internalType: 'address',
name: 'operator',
type: 'address'
}
],
name: 'isApprovedForAll',
outputs: [
{
internalType: 'bool',
name: '',
type: 'bool'
}
],
stateMutability: 'view',
type: 'function'
},
{
inputs: [
{
internalType: 'address',
name: 'receiver',
type: 'address'
}
],
name: 'mintItem',
outputs: [
{
internalType: 'uint256',
name: '',
type: 'uint256'
}
],
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: [
{
internalType: 'address',
name: 'from',
type: 'address'
},
{
internalType: 'address',
name: 'to',
type: 'address'
},
{
internalType: 'uint256',
name: 'tokenId',
type: 'uint256'
}
],
name: 'safeTransferFrom',
outputs: [],
stateMutability: 'nonpayable',
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: 'nonpayable',
type: 'function'
},
{
inputs: [
{
internalType: 'address',
name: 'operator',
type: 'address'
},
{
internalType: 'bool',
name: 'approved',
type: 'bool'
}
],
name: 'setApprovalForAll',
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: 'tokenId',
type: 'uint256'
}
],
name: 'tokenURI',
outputs: [
{
internalType: 'string',
name: '',
type: 'string'
}
],
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: 'nonpayable',
type: 'function'
}
] as const;
/**
* ABI of the ERC1155 token standard.
*
* @see [EIP 1155](https://eips.ethereum.org/EIPS/eip-1155)
*/
const ERC1155_ABI = [
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: 'address',
name: 'account',
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: 'address',
name: 'operator',
type: 'address'
},
{
indexed: true,
internalType: 'address',
name: 'from',
type: 'address'
},
{
indexed: true,
internalType: 'address',
name: 'to',
type: 'address'
},
{
indexed: false,
internalType: 'uint256[]',
name: 'ids',
type: 'uint256[]'
},
{
indexed: false,
internalType: 'uint256[]',
name: 'values',
type: 'uint256[]'
}
],
name: 'TransferBatch',
type: 'event'
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: 'address',
name: 'operator',
type: 'address'
},
{
indexed: true,
internalType: 'address',
name: 'from',
type: 'address'
},
{
indexed: true,
internalType: 'address',
name: 'to',
type: 'address'
},
{
indexed: false,
internalType: 'uint256',
name: 'id',
type: 'uint256'
},
{
indexed: false,
internalType: 'uint256',
name: 'value',
type: 'uint256'
}
],
name: 'TransferSingle',
type: 'event'
},
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: 'string',
name: 'value',
type: 'string'
},
{
indexed: true,
internalType: 'uint256',
name: 'id',
type: 'uint256'
}
],
name: 'URI',
type: 'event'
},
{
inputs: [
{
internalType: 'address',
name: 'account',
type: 'address'
},
{
internalType: 'uint256',
name: 'id',
type: 'uint256'
}
],
name: 'balanceOf',
outputs: [
{
internalType: 'uint256',
name: '',
type: 'uint256'
}
],
stateMutability: 'view',
type: 'function'
},
{
inputs: [
{
internalType: 'address[]',
name: 'accounts',
type: 'address[]'
},
{
internalType: 'uint256[]',
name: 'ids',
type: 'uint256[]'
}
],
name: 'balanceOfBatch',
outputs: [
{
internalType: 'uint256[]',
name: '',
type: 'uint256[]'
}
],
stateMutability: 'view',
type: 'function'
},
{
inputs: [
{
internalType: 'address',
name: 'account',
type: 'address'
},
{
internalType: 'address',
name: 'operator',
type: 'address'
}
],
name: 'isApprovedForAll',
outputs: [
{
internalType: 'bool',
name: '',
type: 'bool'
}
],
stateMutability: 'view',
type: 'function'
},
{
inputs: [
{
internalType: 'address',
name: 'from',
type: 'address'
},
{
internalType: 'address',
name: 'to',
type: 'address'
},
{
internalType: 'uint256[]',
name: 'ids',
type: 'uint256[]'
},
{
internalType: 'uint256[]',
name: 'amounts',
type: 'uint256[]'
},
{
internalType: 'bytes',
name: 'data',
type: 'bytes'
}
],
name: 'safeBatchTransferFrom',
outputs: [],
stateMutability: 'nonpayable',
type: 'function'
},
{
inputs: [
{
internalType: 'address',
name: 'from',
type: 'address'
},
{
internalType: 'address',
name: 'to',
type: 'address'
},
{
internalType: 'uint256',
name: 'id',
type: 'uint256'
},
{
internalType: 'uint256',
name: 'amount',
type: 'uint256'
},
{
internalType: 'bytes',
name: 'data',
type: 'bytes'
}
],
name: 'safeTransferFrom',
outputs: [],
stateMutability: 'nonpayable',
type: 'function'
},
{
inputs: [
{
internalType: 'address',
name: 'operator',
type: 'address'
},
{
internalType: 'bool',
name: 'approved',
type: 'bool'
}
],
name: 'setApprovalForAll',
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: [
{
internalType: 'uint256',
name: 'id',
type: 'uint256'
}
],
name: 'uri',
outputs: [
{
internalType: 'string',
name: '',
type: 'string'
}
],
stateMutability: 'view',
type: 'function'
}
] as const;
/**
* ABI of the VIP180 token standard.
*
* @see [VIP 180](https://github.com/vechain/VIPs/blob/master/vips/VIP-180.md)
*/
const VIP180_ABI = ERC20_ABI;
/**
* ABI of the VIP181 token standard.
*
* @see [VIP 181](https://github.com/vechain/VIPs/blob/master/vips/VIP-181.md)
*/
const VIP181_ABI = ERC721_ABI;
/**
* ABI of the VIP210 token standard.
*
* @see [VIP 210](https://github.com/vechain/VIPs/blob/master/vips/VIP-210.md)
*/
const VIP210_ABI = ERC1155_ABI;
export {
VIP180_ABI,
VIP181_ABI,
VIP210_ABI,
ERC20_ABI,
ERC721_ABI,
ERC1155_ABI
};
Выполнить команду
Для локальной разработки. Не используйте в интернете!