`estimateGas` incompatible method param type
hujw77 opened this issue · 3 comments
hujw77 commented
Repo
https://github.com/darwinia-network/msgport-deploy
Branch
v2
Script
yarn
make deploy chain=darwinia_pangolin
Info
Compiler run successful!
✔ Collected transactions.
✔ Built deployment.
ℹ Skipping preview.
⠹ Deploying Gnosis Safe and Sphinx Module...Error: missing revert data (action="estimateGas", data=null, reason=null, transaction={ "data": "0x1688f0b9000000000000000000000000d9db270c1b5e3bd161e8c8503c55ceabee7095520000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002c4b63e800d00000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000a238cbeb142c10ef7ad8442c6d1f9e89e07e77610000000000000000000000000000000000000000000000000000000000000140000000000000000000000000f48f2b2d2a534e402487b3ee7c18c33aec0fe5e40000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000d70a2e6eacbdeda77a5d4bbae3bc70239a0e088f00000000000000000000000000000000000000000000000000000000000001448d80ff0a000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000f2008f3301c9eada5642b5bb12fd047d3ebb2932e619000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248236d0b80000000000000000000000000000000000000000000000000000000000000000018f3301c9eada5642b5bb12fd047d3ebb2932e6190000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002411ea37fc000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "from": "0xD70A2e6eACbdeDA77a5d4bBAE3bC70239A0e088f", "to": "0xa6B71E26C5e0845f74c812102Ca7114b6a896AB2" }, invocation=null, revert=null, code=CALL_EXCEPTION, version=6.11.1)
at makeError (/Users/echo/workspace/contract/darwinia/msgport-deploy/node_modules/ethers/lib.commonjs/utils/errors.js:129:21)
at getBuiltinCallException (/Users/echo/workspace/contract/darwinia/msgport-deploy/node_modules/ethers/lib.commonjs/abi/abi-coder.js:105:37)
at AbiCoder.getBuiltinCallException (/Users/echo/workspace/contract/darwinia/msgport-deploy/node_modules/ethers/lib.commonjs/abi/abi-coder.js:206:16)
at SphinxJsonRpcProvider.getRpcError (/Users/echo/workspace/contract/darwinia/msgport-deploy/node_modules/ethers/lib.commonjs/providers/provider-jsonrpc.js:668:43)
at /Users/echo/workspace/contract/darwinia/msgport-deploy/node_modules/ethers/lib.commonjs/providers/provider-jsonrpc.js:302:45
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
code: 'CALL_EXCEPTION',
action: 'estimateGas',
data: null,
reason: null,
transaction: {
to: '0xa6B71E26C5e0845f74c812102Ca7114b6a896AB2',
data: '0x1688f0b9000000000000000000000000d9db270c1b5e3bd161e8c8503c55ceabee7095520000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002c4b63e800d00000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000a238cbeb142c10ef7ad8442c6d1f9e89e07e77610000000000000000000000000000000000000000000000000000000000000140000000000000000000000000f48f2b2d2a534e402487b3ee7c18c33aec0fe5e40000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000d70a2e6eacbdeda77a5d4bbae3bc70239a0e088f00000000000000000000000000000000000000000000000000000000000001448d80ff0a000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000f2008f3301c9eada5642b5bb12fd047d3ebb2932e619000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248236d0b80000000000000000000000000000000000000000000000000000000000000000018f3301c9eada5642b5bb12fd047d3ebb2932e6190000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002411ea37fc000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',
from: '0xD70A2e6eACbdeDA77a5d4bBAE3bC70239A0e088f'
},
invocation: null,
revert: null,
shortMessage: 'missing revert data',
info: {
error: {
code: -32602,
message: 'unknown field `chainId` at line 1 column 1941'
},
payload: {
method: 'eth_estimateGas',
params: [Array],
id: 33,
jsonrpc: '2.0'
}
}
}
boundless-forest commented
message: 'unknown field
chainId
at line 1 column 1941'
From the error message, it seems that the estimate call params are incorrect?
hujw77 commented
boundless-forest commented
- https://docs.rs/jsonrpsee-types/0.22.5/jsonrpsee_types/error/constant.INVALID_PARAMS_CODE.html
- hujw77/sphinx@f5f8754
The implementation of the eth_estimateGas
method in the frontier branch we used (polkadot-v1.1.0-patch) has a flaw: the param type CallRequest
is incompatible with the Ethereum. As a result, specific RPC request decode fails, this issue is a typical one.
I've tested in the latest version of the Frontier, it's fixed at polkadot-evm/frontier#1301. Waiting for the next frontier upgrade.