所以我目前正在尝试部署路由器智能合约。我一直在通过 构建它erdpy contract build
,这很成功(我在 rust nightly 工具链上,因为智能合约需要它)。我现在正在尝试部署它,但我无法做到。我一直有一个400 BadRequest
from https://devnet-api.elrond.com/transaction/send
。
以下是部署的日志:
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"
}
}
}
我尝试部署的合同如下。我也通过OpenAPI Spec或文档寻找答案,但没有任何内容。此路由通常返回错误消息,但对于这种特定情况,它不是。
其他一些合同,如在相同的配置ping-pong
下正常工作。erdpy.json