PHP WebShell

Текущая директория: /usr/lib/node_modules/bitgo/node_modules/@celo/contractkit/lib/wrappers

Просмотр файла: StableTokenWrapper.d.ts

import BigNumber from 'bignumber.js';
import { StableToken } from '../generated/StableToken';
import { CeloTokenWrapper } from './CeloTokenWrapper';
export interface InflationParameters {
    rate: BigNumber;
    factor: BigNumber;
    updatePeriod: BigNumber;
    factorLastUpdated: BigNumber;
}
export interface StableTokenConfig {
    decimals: number;
    name: string;
    symbol: string;
    inflationParameters: InflationParameters;
}
/**
 * Stable token with variable supply
 */
export declare class StableTokenWrapper extends CeloTokenWrapper<StableToken> {
    /**
     * Returns the address of the owner of the contract.
     * @return the address of the owner of the contract.
     */
    owner: () => Promise<string>;
    /**
     * Returns the units for a given value given the current inflation factor.
     * @param value The value to convert to units.
     * @return The units corresponding to `value` given the current inflation factor.
     * @dev We don't compute the updated inflationFactor here because
     * we assume any function calling this will have updated the inflation factor.
     */
    valueToUnits: (value: BigNumber.Value) => Promise<BigNumber>;
    /**
     * Returns the value of a given number of units given the current inflation factor.
     * @param units The units to convert to value.
     * @return The value corresponding to `units` given the current inflation factor.
     */
    unitsToValue: (units: BigNumber.Value) => Promise<BigNumber>;
    /**
     * Increases the allowance of another user.
     * @param spender The address which is being approved to spend StableToken.
     * @param value The increment of the amount of StableToken approved to the spender.
     * @returns true if success.
     */
    increaseAllowance: (args_0: string, args_1: BigNumber.Value) => import("@celo/connect").CeloTransactionObject<boolean>;
    /**
     * Decreases the allowance of another user.
     * @param spender The address which is being approved to spend StableToken.
     * @param value The decrement of the amount of StableToken approved to the spender.
     * @returns true if success.
     */
    decreaseAllowance: (spender: string, value: string | number) => import("@celo/connect").CeloTransactionObject<boolean>;
    mint: (to: string, value: string | number) => import("@celo/connect").CeloTransactionObject<boolean>;
    burn: (value: string | number) => import("@celo/connect").CeloTransactionObject<boolean>;
    setInflationParameters: (rate: string | number, updatePeriod: string | number) => import("@celo/connect").CeloTransactionObject<void>;
    /**
     * Querying the inflation parameters.
     * @returns Inflation rate, inflation factor, inflation update period and the last time factor was updated.
     */
    getInflationParameters(): Promise<InflationParameters>;
    /**
     * Returns current configuration parameters.
     */
    getConfig(): Promise<StableTokenConfig>;
    /**
     * @dev Returns human readable configuration of the stabletoken contract
     * @return StableTokenConfig object
     */
    getHumanReadableConfig(): Promise<{
        inflationParameters: {
            updatePeriod: string;
            factorLastUpdated: string;
            rate: BigNumber;
            factor: BigNumber;
        };
        decimals: number;
        name: string;
        symbol: string;
    }>;
}
export declare type StableTokenWrapperType = StableTokenWrapper;

Выполнить команду


Для локальной разработки. Не используйте в интернете!