PHP WebShell
Текущая директория: /usr/lib/node_modules/bitgo/node_modules/@celo/contractkit/lib/wrappers
Просмотр файла: Erc20Wrapper.d.ts
import BigNumber from 'bignumber.js';
import { Ierc20 } from '../generated/IERC20';
import { BaseWrapper } from './BaseWrapper';
/**
* ERC-20 contract only containing the non-optional functions
*/
export declare class Erc20Wrapper<T extends Ierc20> extends BaseWrapper<T> {
/**
* Querying allowance.
* @param from Account who has given the allowance.
* @param to Address of account to whom the allowance was given.
* @returns Amount of allowance.
*/
allowance: (owner: string, spender: string) => Promise<BigNumber>;
/**
* Returns the total supply of the token, that is, the amount of tokens currently minted.
* @returns Total supply.
*/
totalSupply: () => Promise<BigNumber>;
/**
* Approve a user to transfer the token on behalf of another user.
* @param spender The address which is being approved to spend the token.
* @param value The amount of the token approved to the spender.
* @return True if the transaction succeeds.
*/
approve: (spender: string, amount: string | number) => import("@celo/connect").CeloTransactionObject<boolean>;
/**
* Transfers the token from one address to another.
* @param to The address to transfer the token to.
* @param value The amount of the token to transfer.
* @return True if the transaction succeeds.
*/
transfer: (recipient: string, amount: string | number) => import("@celo/connect").CeloTransactionObject<boolean>;
/**
* Transfers the token from one address to another on behalf of a user.
* @param from The address to transfer the token from.
* @param to The address to transfer the token to.
* @param value The amount of the token to transfer.
* @return True if the transaction succeeds.
*/
transferFrom: (sender: string, recipient: string, amount: string | number) => import("@celo/connect").CeloTransactionObject<boolean>;
/**
* Gets the balance of the specified address.
* @param owner The address to query the balance of.
* @return The balance of the specified address.
*/
balanceOf: (owner: string) => Promise<BigNumber>;
}
export declare type Erc20WrapperType<T extends Ierc20> = Erc20Wrapper<T>;
Выполнить команду
Для локальной разработки. Не используйте в интернете!