PHP WebShell

Текущая директория: /opt/BitGoJS/node_modules/avalanche/examples/avm

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

import { Avalanche, BN } from "avalanche/dist"
import { AVMAPI } from "avalanche/dist/apis/avm"

const ip: string = "localhost"
const port: number = 9650
const protocol: string = "http"
const networkID: number = 1337
const avalanche: Avalanche = new Avalanche(ip, port, protocol, networkID)
const xchain: AVMAPI = avalanche.XChain()

const main = async (): Promise<any> => {
  const fee: BN = new BN(507)
  xchain.setTxFee(fee)
  const txFee: BN = xchain.getTxFee()
  console.log(txFee)
}

main()

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


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