I'm having trouble doing an RPC call using polkadot.js.
My contract is here: https://github.com/kanishkatn/ink-test/tree/master/flipper
I tried making the RPC call using the selector from metadata.json. But, it always throws this error
{
gasConsumed: 0
gasRequired: 0
storageDeposit: {
Charge: 0
}
debugMessage:
result: {
Err: {
Module: {
index: 7
error: 0x02000000
}
}
}
}
I also wrote my own client, it throws the same error as well. My client is here: https://github.com/kanishkatn/ink-test/tree/master/client
The instantiate
call works properly on polkadot.js/apps as well as contracts-ui. I'm able to call other methods in contracts-ui as well. So, clearly I haven't understood how the selector and the data works in call
.
What did I do wrong?