/dapp

demo

Primary LanguageJavaScript

ulord-dapp

A Vue.js project

Build Setup

# install dependencies
npm install

# serve with hot reload at localhost:8080
npm run dev

# build for production with minification
npm run build

# build for production and view the bundle analyzer report
npm run build --report

# run unit tests
npm run unit

# run all tests
npm test

实现功能

  • 转账
  • 抵押/取消抵押
  • 投票/取消投票
  • 查询账户金额

转账

param:

     amount     string 金额
     accountName   string 接收人
     memo       string 备注

详情见 demo.vue  tras()

查询

param:

     accountName   string 查询账户名

详情见 demo.vue  blanc()

抵押/取消抵押

  • 抵押

param:

     FromAccount           string 金额
     Receiver           string 投票人
     stake_net_quantity     string 抵押网络
     stake_cpu_quantity       string 抵押cpu

return:

     xxx     string xxx

  • 取消抵押

param:

     FromAccount       string 金额
     Receiver          string 投票人
     stake_net_quantity    string 抵押网络
     stake_cpu_quantity    string 抵押cpu

详情见 demo.vue  ps()  unps()

投票/取消投票

  • 投票

param:

     amount      string 金额
     fromAccount   string 投票人
     producers     string[] 投票人列表

  • 取消投票

param:

     fromAccount   string 金额
     quantity     string 投票人
     producers     string[] 投票人列表

详情见 demo.vue  vote()  canvote()

获取钱包的当前账户信息

param:

    None

详情见 demo.vue  mounted()
this.user = this.$UOS.getAccount();

返回结果  
{
    "publicKey": "UOSxxxxxxx",
    "name": "tangwei11111",
    "authority": "owner",
    "blockchain": "uos"
}