-
Notifications
You must be signed in to change notification settings - Fork 9
RPC Calls vs. state_call
s
#228
Comments
What you want to do is use You should not expose the distinction between a runtime API accessed via You can discover runtime APIs by grepping for |
Thank you for this description.
This is fascinating to us (cc @tjjfvi, @niklasad1). Any more info on the plan around exposing RPC io types would be greatly appreciated. |
I don't think generating the Not sure how polkadot.js handles this but I think it's hardcoded/done manually |
It has nothing to do with RPCs. You would change the |
In this case it does because the idea was to generate the Because |
I assume there will still be RPC calls except |
let's take for example the before the change you would use Capi like this:
i think now it should be used like this. mind that param order is now important:
users shouldn't care how the functionality is exposed. my suggestion is to expose all RPCs and state calls under the same namespace (let's say "api" but other name might work better). |
Type signatures for the contracts runtime calls. Based on the type docs - just for inspiration, didn't really try them out
|
This is incredibly helpful. Thank you @statictype! |
Generating API types for this is blocked on them getting included in the metadata (paritytech/substrate#11648). This is no different from the RPC typing, though, so I believe we can go ahead with using |
@statictype brings up a great point in #218 –– it is likely that many current RPC calls should (at least eventually) occur through
state_call
. How can we account for this in Capi?The text was updated successfully, but these errors were encountered: