Remove contracts RPCs#12358
Conversation
|
Blocked until ContractsUI no longer uses the |
|
bot merge |
|
The companion is hanging and blocking the CI. |
* master: (42 commits) Adapt `pallet-contracts` to WeightV2 (#12421) Improved election pallet testing (#12327) Bump prost to 0.11+ (#12419) Use saturating add for alliance::disband witness data (#12418) [Fix] Rename VoterBagsList -> VoterList to match pdot (#12416) client/beefy: small code improvements (#12414) BEEFY: Simplify hashing for pallet-beefy-mmr (#12393) Add @koute to `docs/CODEOWNERS` and update stale paths (#12408) docs/CODEOWNERS: add @acatangiu as MMR owner (#12406) Remove unnecessary Clone trait bounds on CountedStorageMap (#12402) Fix `Weight::is_zero` (#12396) Beefy on-demand justifications as a custom RequestResponse protocol (#12124) Remove contracts RPCs (#12358) pallet-mmr: generate historical proofs (#12324) unsafe_pruning flag removed (#12385) Carry over where clauses defined in Config to Call and Hook (#12388) Properly set the max proof size weight on defaults and tests (#12383) BEEFY: impl TypeInfo for SignedCommitment (#12382) bounding staking: `BoundedElectionProvider` trait (#12362) New Pallet: Root offences (#11943) ...
Also removes the patch for zip since a new release was issued. Closes #81. Contracts RPC purged as according to paritytech/substrate#12358.
|
Now the tutorial is broken due to this change I think What can I do? |
|
You no longer need to add the RPCs. Have a look at this as an example. |
thank you for this. substrate/bin/node/runtime/src/lib.rs Line 2010 in 0a27e54 thanks again |
|
If the caller of the runtime API does not supply a |
Very Nice.! |
Use a more recent version that doesn't have strange rpc dependancies as noted here paritytech/substrate#12358
Use a more recent version that doesn't have strange rpc dependancies as noted here paritytech/substrate#12358
* Remove contracts RPCs * Remove serde as RPC serialization is no longer needed * Rename folder to match crate name * Compile fix * Remove Byte wrapper
Those RPCs are redundant and should be called via
state_call. Polkadot.js andcargo contractboth already migrated. This means all our tooling should not break after this change.This will greatly reduce boilerplate and maintenance burden for those APIs.
@statictype ContractsUI is the last user dependent on those RPCs (instantiation dry-run). We will wait with merging until it migrated away.
cumulus companion: paritytech/cumulus#1685
Porting Guide
The high level contracts API in polkadot.js already uses
state_callso upgrading to the latest version here is enough. If you are usingapi.rpc.contractsdirectly you need to switch toapi.call.contractsApi.