• Public
  • Public/Protected
  • All

Class NeoCommon


  • NeoCommon



Static claimGas

Static contractInvocation

  • contractInvocation(network: NetworkItem, contractHash: string, operation: string, args: any[], wif: string, gas?: number, fee?: number): Promise<DoInvokeConfig>
  • Initiate a contract invocation


    • network: NetworkItem
    • contractHash: string
    • operation: string
    • args: any[]
    • wif: string
    • Default value gas: number = 0
    • Default value fee: number = 0.001

    Returns Promise<DoInvokeConfig>

Static contractMigrate

  • contractMigrate(network: NetworkItem, contractHash: ScriptHash, avmData: any, parameterTypes: string, returnType: string, needStorage: number, name: string, version: string, author: string, email: string, description: string, wif: WIF): Promise<void>
  • Executes a contract migration event on Moonlight issued contracts.


    • network: NetworkItem
    • contractHash: ScriptHash
    • avmData: any
    • parameterTypes: string
    • returnType: string
    • needStorage: number
    • name: string
    • version: string
    • author: string
    • email: string
    • description: string
    • wif: WIF

    Returns Promise<void>

Static deployContract

  • deployContract(network: NetworkItem, avmData: any, wif: string): Promise<DoInvokeConfig>

Static expectBoolean

Static getAssetBalanceSummary

Static getContractName

Static getContractVersion

Static getScriptHashForData

  • getScriptHashForData(data: string): string

Static initSmartContract

Static invokeFunction

Static scriptInvocation

Static transferAndClaim

  • transferAndClaim(network: NetworkItem, wif: WIF): Promise<ClaimGasConfig>
  • Transfers all of an accounts neo to itself, then executes a gas claim.


    • network: NetworkItem

      The Neo network to target.

    • wif: WIF

      The WIF to transfer assets from.

    Returns Promise<ClaimGasConfig>

Static transferAsset

  • transferAsset(network: NetworkItem, wifFrom: WIF, addressTo: Address, neoAmount: number, gasAmount: number): Promise<SendAssetConfig>
  • Transfers a system asset.


    • network: NetworkItem

      The Neo network target.

    • wifFrom: WIF

      The WIF to transfer assets from.

    • addressTo: Address

      The address to transfer the assets to.

    • neoAmount: number

      The amount of neo the transfer.

    • gasAmount: number

      The amount of gas to transfer.

    Returns Promise<SendAssetConfig>

Generated using TypeDoc