UNPKG

barterjs-sdk

Version:
74 lines (70 loc) 1.31 kB
import { BaseContract, BigNumber, BigNumberish, CallOverrides, ContractTransaction, Overrides, } from 'ethers'; export const ERC20_ABI = [ { name: 'approve', inputs: [ { internalType: 'address', name: 'spender', type: 'address', }, { internalType: 'uint256', name: 'amount', type: 'uint256', }, ], outputs: [ { internalType: 'bool', name: '', type: 'bool', }, ], stateMutability: 'nonpayable', type: 'function', }, { name: 'allowance', inputs: [ { internalType: 'address', name: 'owner', type: 'address', }, { internalType: 'address', name: 'spender', type: 'address', }, ], outputs: [ { internalType: 'uint256', name: '', type: 'uint256', }, ], stateMutability: 'view', type: 'function', }, ]; export interface ERC20Contract extends BaseContract { allowance( owner: string, spender: string, overrides?: CallOverrides ): Promise<BigNumber>; approve( spender: string, amount: BigNumberish, overrides?: Overrides & { from?: string | Promise<string> } ): Promise<ContractTransaction>; }