Options
All
  • Public
  • Public/Protected
  • All
Menu

Class StakingContract

Hierarchy

Implements

Index

Constructors

Properties

_erc20: ERC20
_ownable: Ownable
_pausable: Pausable
abi: AbiItem[]
collectiblesAddress?: string
contractAddress?: string
stakeTokenAddress?: string

Accessors

  • get account(): Account
  • Returns the Account associated with this connection

    Returns Account

  • get web3(): default
  • Returns the Web3 class assigned to this connection

    Returns default

Methods

  • approveERC20Transfer(): Promise<TransactionReceipt>
  • availableTokens(): Promise<number>
  • callTx<ReturnData>(method: ContractCallMethod<ReturnData>, value?: any): Promise<ReturnData>
  • connect(): Promise<boolean>
  • createProduct(_startDate: number, _endDate: number, _totalMaxAmount: number, _individualMinimumAmount: number, _individualMaximumAmount: number, _APR: number, _lockedUntilFinalization: boolean): Promise<TransactionReceipt>
  • Parameters

    • _startDate: number
    • _endDate: number
    • _totalMaxAmount: number
    • _individualMinimumAmount: number
    • _individualMaximumAmount: number
    • _APR: number
    • _lockedUntilFinalization: boolean

    Returns Promise<TransactionReceipt>

  • deploy(deployOptions: DeployOptions, account?: Account): Promise<TransactionReceipt>
  • Deploy the loaded abi contract

    Parameters

    • deployOptions: DeployOptions
    • Optional account: Account

    Returns Promise<TransactionReceipt>

  • deployJsonAbi(stakeTokenAddress: string, collectiblesAddress?: string): Promise<TransactionReceipt>
  • depositAPRTokens(amount: number): Promise<TransactionReceipt>
  • erc20Address(): Promise<string>
  • futureLockedTokens(): Promise<number>
  • getAPRAmount(_APR: number, _startDate: number, _endDate: number, _amount: number): Promise<number>
  • getMySubscriptions(_address: string): Promise<number[]>
  • getProductIds(): Promise<number[]>
  • getTokenAmount(address: string): Promise<number>
  • getTotalProductsAPRAmount(): Promise<number>
  • heldTokens(): Promise<number>
  • loadAbi(): void
  • loadContract(): Promise<void>
  • sendTx(method: ContractSendMethod, value?: any, debug?: undefined | boolean): Promise<TransactionReceipt>
  • Interact with, or change a value of, a property on the contract

    Parameters

    • method: ContractSendMethod
    • Optional value: any
    • debug: undefined | boolean = ...

    Returns Promise<TransactionReceipt>

  • sendUnsignedTx(method: ContractSendMethod, value?: any, debug?: boolean): Promise<TransactionReceipt>
  • Send unsigned transaction

    Parameters

    • method: ContractSendMethod
    • Optional value: any
    • Optional debug: boolean

    Returns Promise<TransactionReceipt>

  • start(): Promise<void>
  • subscribeProduct(_product_id: number, _amount: number): Promise<TransactionReceipt>
  • withdrawSubscription(_product_id: number, _subscription_id: number): Promise<TransactionReceipt>

Generated using TypeDoc