mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 19:51: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:
@@ -31,8 +31,6 @@ use transaction_pool::txpool::{self, Pool};
|
||||
|
||||
pub use self::gen_client::Client as AccountsClient;
|
||||
|
||||
const RUNTIME_ERROR: i64 = 1;
|
||||
|
||||
/// Accounts RPC methods.
|
||||
#[rpc]
|
||||
pub trait AccountsApi {
|
||||
@@ -75,7 +73,7 @@ where
|
||||
let at = BlockId::hash(best);
|
||||
|
||||
let nonce = api.account_nonce(&at, account.clone()).map_err(|e| Error {
|
||||
code: ErrorCode::ServerError(RUNTIME_ERROR),
|
||||
code: ErrorCode::ServerError(crate::constants::RUNTIME_ERROR),
|
||||
message: "Unable to query nonce.".into(),
|
||||
data: Some(format!("{:?}", e).into()),
|
||||
})?;
|
||||
|
||||
Reference in New Issue
Block a user