I am deploying an ink! smart contract to a local network, but when I tried to call any function from it i have this error:

> { Err: { Module: { index: '8', error: '0x02000000' } } }

Does anyone have any idea what is causing the error and why?

  • Can you add more details to your question Jul 19, 2023 at 4:45

2 Answers 2


Can you share your runtime file? To understand what the error: { Err: { Module: { index: '8', error: '0x02000000' } } } means we have to check the runtime code in your Substrate node.

The index number is the index of the pallet in the runtime from which the error originated. The error is the index of that pallet's errors (in hex) which is the exact one we're looking for. Both of these indices start counting from 0.

For example if you are running the substrate-contracts-node we can see that the index 8 refers to pallet Contracts (see code here). If we go now to the pallet Contracts code we can see that the error in the position 0x02000000 (2 in hex) is OutOfGas (see the code here).


You can dry-run the transaction and receive more human-friendly errors, as far as I remember using https://contracts-ui.substrate.io/ you will always see dry-run result before submitting the tx

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.