I'm currently using substrate (version 4) with the contrat-pallet. I deploy contract in wasm, compiled from solidity (thanks to solang compiler) and sometimes, when executing a method of the smart contract, I encounter an error. When I take a look on the polkadotjs apps I have the following message :
But this message is not so explicit and doesn't help to figure out how to solve the problem.
Furthermore, the output of the polkadotjs api when I run this code :
contract.tx.method({ storageDepositLimit, gasLimit })
.signAndSend(pair, result => {
if (result.status.isFinalized) {
return result.toHuman()
}
})
is not really more explicit :
{
dispatchError: { Module: { index: '9', error: '0x0b000000' } },
dispatchInfo: { weight: '80,051,097,517', class: 'Normal', paysFee: 'Yes' },
events: [
{ phase: [Object], event: [Object], topics: [] },
{ phase: [Object], event: [Object], topics: [] }
],
internalError: undefined,
status: {
Finalized: '0x2e6cfa203369435efd17144525e265508e801865baf7d8f8989883a553ddf4b8'
}
}
By experience, this kind of errors can occurs when a "require" from the solidity smart contract doesn't pass. But I don't have any details and I don't find how to get the require output message from the smart contract.
Is there any way to get more detail on error to know what is going on ? To get the message from the "require" in the solidity smart contract ? To know from what part it came from ?
Thanks !
tx
) perform aquery
to get errors and debug messages from the substrate contracts node.debugMessage
is empty while it should contains the message from therequire
of my solidity smart contract. Do you think this issue came from the solang compiler ?index
anderror
relate to.