AschPlatform / asch-js

Asch frontend library
18 stars 15 forks source link

dapp API参数问题 #6

Open kimziv opened 6 years ago

kimziv commented 6 years ago

DAPP api 提现为例: 说明:多了option和contractType等非必须字段,接口返回success,也有transactionID,但是区块上查不到交易记录

http://testnet.cctime.org:4096/api/dapps/d352263c517195a8b612260971c7af869edca305bb64b471686323817e57b2c1/transactions/signed PUT { "transaction": { "args":"[\"CCTime.XCT\",\"120000000\",\"AHcGmYnCyr6jufT5AGbpmRUv55ebwMLCym\"]", "contractType": "CoreWithdrawal", "fee": "10000000", "option": { "args": ["CCTime.XCT", "120000000"], "argsJson": "[\"CCTime.XCT\", \"120000000\"]", "fee": 10000000, "type": "CoreWithdrawal" }, "senderPublicKey": "91789ab7e4ef9615f296842017ee287f77f1ab27476df95000df32388f45a088", "signature": "3d1ea23fe50aeca1cb7d828704ea9546533456cb9364bc67b0bd3b1321dc49a7cfd2636218cc6e1a3331096b3cd9767373416f01483afd5b04234a970b93bd0f", "timestamp": 49030235, "type": 2 } }

https://github.com/AschPlatform/asch/blob/master/docs/asch_dapp_default_api.md#3112-dapp%E6%8F%90%E7%8E%B0type2

另外:文档需要更新,args参数于cctime测试版本实际调用的参数都不一样

ByCnck commented 6 years ago

应该是你的transaction构造的有问题 "contractType": "CoreWithdrawal", "type": "CoreWithdrawal" "argsJson": "["CCTime.XCT", "120000000"]", 这几个都不需要。

我刚才在testnet.cctime.org试了,提现没问题。