UPDATE:
Thank you to Alexander Theißen, I think I got past the original "gas limit" problem.
I am still not quite sure if I have all of the correct parameters for the cargo contract instantiate
command.
Here is what I have:
code_hash=0x4406fe2cdb0473a8925be201d3452ce15a0988406c7eb4fb48a6ca324bac2733
cargo contract instantiate \
--verbose \
--storage-deposit-limit 50000000000 \
--gas 50000000000 \
--constructor new \
--args false \
--suri //Alice \
--code-hash $code_hash
The error is:
ERROR: Rpc error: JSON-RPC call failed: RPC Call failed: code: 1002, message: Verification Error: Runtime error: Execution failed: Error calling api function: Failed to convert parameter `tx` from node to runtime of validate_transaction, data: Some(RawValue("RuntimeApi(\"Execution failed: Error calling api function: Failed to convert parameter `tx` from node to runtime of validate_transaction\")"))
Caused by:
0: JSON-RPC call failed: RPC Call failed: code: 1002, message: Verification Error: Runtime error: Execution failed: Error calling api function: Failed to convert parameter `tx` from node to runtime of validate_transaction, data: Some(RawValue("RuntimeApi(\"Execution failed: Error calling api function: Failed to convert parameter `tx` from node to runtime of validate_transaction\")"))
1: RPC Call failed: code: 1002, message: Verification Error: Runtime error: Execution failed: Error calling api function: Failed to convert parameter `tx` from node to runtime of validate_transaction, data: Some(RawValue("RuntimeApi(\"Execution failed: Error calling api function: Failed to convert parameter `tx` from node to runtime of validate_transaction\")"))
However, if I use a UI: https://paritytech.github.io/contracts-ui, I can connect to the local substrate-contracts-node
and even just use the uploaded contract by supplying the UI with code_hash. From there I can successfully make calls to the contract.
So I assume the issue is related to something I am doing wrong with the cargo contract instantiate
parameters.