Exercise 10
Objectives: RPC pallet interface
Needs: Exercise 03
Content: We are going to expose an RPC API for the banishment pallet.
Add an RPC call that, given a block number, returns the list of banished accounts at that moment.
Most probably you will have to enrich Runtime API by extending impl_runtime_apis! in bin/runtime/src/lib.rs with a function returning banished accounts.
Hint
You can start by copying RPC code structure from e.g. https://github.com/paritytech/substrate/tree/master/frame/transaction-payment/rpc and modify it to meet your needs.
References:
bin/node/src/aleph_node_rpc.rsquery_infocall fromTransactionPaymentApi(https://github.com/paritytech/substrate/tree/master/frame/transaction-payment/rpc)
Last updated
Was this helpful?