mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-18 15:21:05 +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:
@@ -17,6 +17,7 @@ runtime_version = { package = "sr-version", path = "../sr-version" }
|
||||
serde_json = "1.0"
|
||||
session = { package = "substrate-session", path = "../session" }
|
||||
sr-primitives = { path = "../sr-primitives" }
|
||||
rpc-primitives = { package = "substrate-rpc-primitives", path = "primitives" }
|
||||
state_machine = { package = "substrate-state-machine", path = "../state-machine" }
|
||||
substrate-executor = { path = "../executor" }
|
||||
substrate-keystore = { path = "../keystore" }
|
||||
|
||||
@@ -19,3 +19,4 @@ runtime_version = { package = "sr-version", path = "../../sr-version" }
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
serde_json = "1.0"
|
||||
txpool = { package = "substrate-transaction-graph", path = "../../transaction-pool/graph" }
|
||||
rpc-primitives = { package = "substrate-rpc-primitives", path = "../../rpc/primitives" }
|
||||
|
||||
@@ -17,12 +17,12 @@
|
||||
//! Substrate blockchain API.
|
||||
|
||||
pub mod error;
|
||||
pub mod number;
|
||||
|
||||
use jsonrpc_core::Result as RpcResult;
|
||||
use jsonrpc_core::futures::Future;
|
||||
use jsonrpc_derive::rpc;
|
||||
use jsonrpc_pubsub::{typed::Subscriber, SubscriptionId};
|
||||
use rpc_primitives::number;
|
||||
use self::error::{FutureResult, Result};
|
||||
|
||||
pub use self::gen_client::Client as ChainClient;
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
[package]
|
||||
name = "substrate-rpc-primitives"
|
||||
version = "2.0.0"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
primitives = { package = "substrate-primitives", path = "../../primitives" }
|
||||
@@ -0,0 +1,21 @@
|
||||
// Copyright 2019 Parity Technologies (UK) Ltd.
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Substrate is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// Substrate is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Substrate. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Substrate RPC primitives and utilities.
|
||||
|
||||
#![warn(missing_docs)]
|
||||
|
||||
pub mod number;
|
||||
@@ -37,6 +37,7 @@ use client::{
|
||||
};
|
||||
use jsonrpc_pubsub::{typed::Subscriber, SubscriptionId};
|
||||
use primitives::{H256, Blake2Hasher};
|
||||
use rpc_primitives::number;
|
||||
use sr_primitives::{
|
||||
generic::{BlockId, SignedBlock},
|
||||
traits::{Block as BlockT, Header, NumberFor},
|
||||
|
||||
Reference in New Issue
Block a user