mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 12:48:00 +00:00
Add an RPC method for calling a contract. (#3563)
* Sketch * Some work on docs. * Doc improvements. * More docs. * Some more docs. * Yet another comment. * Bump impl_version. * Accept the block hash * Use NumberOrHex * Update node/rpc/src/contracts.rs Co-Authored-By: Tomasz Drwięga <tomusdrw@users.noreply.github.com> * Move rpc/primitives
This commit is contained in:
@@ -270,11 +270,17 @@ pub fn new_light<C: Send + Default + 'static>(config: Configuration<C, GenesisCo
|
||||
Ok(Arc::new(GrandpaFinalityProofProvider::new(backend, client)) as _)
|
||||
)?
|
||||
.with_rpc_extensions(|client, pool| {
|
||||
use node_rpc::accounts::{Accounts, AccountsApi};
|
||||
use node_rpc::{
|
||||
accounts::{Accounts, AccountsApi},
|
||||
contracts::{Contracts, ContractsApi},
|
||||
};
|
||||
|
||||
let mut io = jsonrpc_core::IoHandler::default();
|
||||
io.extend_with(
|
||||
AccountsApi::to_delegate(Accounts::new(client, pool))
|
||||
AccountsApi::to_delegate(Accounts::new(client.clone(), pool))
|
||||
);
|
||||
io.extend_with(
|
||||
ContractsApi::to_delegate(Contracts::new(client))
|
||||
);
|
||||
io
|
||||
})?
|
||||
|
||||
Reference in New Issue
Block a user