【发布时间】:2022-01-01 17:46:59
【问题描述】:
所以我目前正在尝试部署路由器智能合约。我一直在通过erdpy contract build 构建它,它已经成功(我正在使用 rust nightly 工具链,因为智能合约需要它)。我现在正在尝试部署它,但我无法做到。我一直有来自https://devnet-api.elrond.com/transaction/send 的400 BadRequest。
以下是部署日志:
erdpy contract deploy
INFO:accounts:Account.sync_nonce()
INFO:accounts:Account.sync_nonce() done: 0
INFO:cli.contracts:Contract address: erd1qqqqqqqqqqqqqpgqzqv7kk893c3ftwgaekvvv9whpqcfn4kazqxq3mud36
INFO:transactions:Transaction.send: nonce=0
CRITICAL:cli:Proxy request error for url [https://devnet-api.elrond.com/transaction/send]: {'statusCode': 400, 'message': 'Bad Request'}
这里是erdpy.json用来配置命令:
{
"configurations": {
"default": {
"proxy": "https://devnet-api.elrond.com",
"chainID": "D"
}
},
"contract":{
"deploy":{
"verbose": true,
"bytecode": "output/router.wasm",
"recall-nonce": true,
"nonce": 1,
"pem": "../../../wallets/owner/wallet-owner.pem",
"gas-limit": 600000000,
"send": true,
"outfile": "deploy-testnet.interaction.json"
}
}
}
我尝试部署的合约是following。我也通过OpenAPI Spec 或documentation 寻找答案,但什么也没有。此路由通常返回错误消息,但对于这种特定情况,它不是。
像ping-pong 这样的其他一些合约在同样的erdpy.json 配置下也能正常工作。
【问题讨论】:
标签: elrond