Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
333 changes: 178 additions & 155 deletions Cargo.lock

Large diffs are not rendered by default.

488 changes: 155 additions & 333 deletions Cargo.toml

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ frame-benchmarking-cli = { git = "https://github.com/mangata-finance/substrate",

pallet-transaction-payment-rpc = { git = "https://github.com/mangata-finance/substrate", branch = "mangata-dev-v4" }

substrate-frame-rpc-system = { git = "https://github.com/mangata-finance/substrate", branch = "mangata-dev-v4" }
substrate-frame-rpc-system = { package = "mangata-rpc-nonce", path = "../rpc/nonce" }
substrate-prometheus-endpoint = { git = "https://github.com/mangata-finance/substrate", branch = "mangata-dev-v4" }

## Substrate Client Dependencies
Expand Down Expand Up @@ -78,6 +78,7 @@ sp-runtime = { git = "https://github.com/mangata-finance/substrate", branch = "m
sp-session = { git = "https://github.com/mangata-finance/substrate", branch = "mangata-dev-v4" }
sp-timestamp = { git = "https://github.com/mangata-finance/substrate", branch = "mangata-dev-v4" }
sp-transaction-pool = { git = "https://github.com/mangata-finance/substrate", branch = "mangata-dev-v4" }
ver-api = { git = "https://github.com/mangata-finance/substrate", branch = "mangata-dev-v4" }

# Cumulus dependencies
cumulus-client-cli = { git = 'https://github.com/mangata-finance/cumulus', branch = 'mangata-dev-v4' }
Expand Down
36 changes: 20 additions & 16 deletions node/src/chain_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,14 +100,16 @@ pub fn development_config() -> ChainSpec {
move || {
testnet_genesis(
// initial collators.
vec![(
get_account_id_from_seed::<sr25519::Public>("Alice"),
get_collator_keys_from_seed("Alice"),
),
(
get_account_id_from_seed::<sr25519::Public>("Bob"),
get_collator_keys_from_seed("Bob"),
)],
vec![
(
get_account_id_from_seed::<sr25519::Public>("Alice"),
get_collator_keys_from_seed("Alice"),
),
(
get_account_id_from_seed::<sr25519::Public>("Bob"),
get_collator_keys_from_seed("Bob"),
),
],
// Initial relay account
get_account_id_from_seed::<sr25519::Public>("Relay"),
// Sudo account
Expand Down Expand Up @@ -241,14 +243,16 @@ pub fn local_testnet_config() -> ChainSpec {
move || {
testnet_genesis(
// initial collators.
vec![(
get_account_id_from_seed::<sr25519::Public>("Alice"),
get_collator_keys_from_seed("Alice"),
),
(
get_account_id_from_seed::<sr25519::Public>("Bob"),
get_collator_keys_from_seed("Bob"),
)],
vec![
(
get_account_id_from_seed::<sr25519::Public>("Alice"),
get_collator_keys_from_seed("Alice"),
),
(
get_account_id_from_seed::<sr25519::Public>("Bob"),
get_collator_keys_from_seed("Bob"),
),
],
// Initial relay account
get_account_id_from_seed::<sr25519::Public>("Relay"),
// Sudo account
Expand Down
5 changes: 4 additions & 1 deletion node/src/rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@ use std::sync::Arc;

use mangata_runtime::{opaque::Block, AccountId, Balance, Index as Nonce, TokenId};

use sc_client_api::AuxStore;
use sc_client_api::{AuxStore, BlockBackend};
pub use sc_rpc::{DenyUnsafe, SubscriptionTaskExecutor};
use sc_transaction_pool_api::TransactionPool;
use sp_api::ProvideRuntimeApi;
use sp_block_builder::BlockBuilder;
use sp_blockchain::{Error as BlockChainError, HeaderBackend, HeaderMetadata};
use ver_api::VerApi;

/// A type representing all RPC extensions.
pub type RpcExtension = jsonrpc_core::IoHandler<sc_rpc::Metadata>;
Expand All @@ -34,6 +35,7 @@ pub fn create_full<C, P>(deps: FullDeps<C, P>) -> RpcExtension
where
C: ProvideRuntimeApi<Block>
+ HeaderBackend<Block>
+ BlockBackend<Block>
+ AuxStore
+ HeaderMetadata<Block, Error = BlockChainError>
+ Send
Expand All @@ -43,6 +45,7 @@ where
C::Api: substrate_frame_rpc_system::AccountNonceApi<Block, AccountId, Nonce>,
C::Api: xyk_rpc::XykRuntimeApi<Block, Balance, TokenId>,
C::Api: BlockBuilder<Block>,
C::Api: VerApi<Block>,
P: TransactionPool + Sync + Send + 'static,
{
use pallet_transaction_payment_rpc::{TransactionPayment, TransactionPaymentApi};
Expand Down
1 change: 1 addition & 0 deletions node/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ where
+ cumulus_primitives_core::CollectCollationInfo<Block>
+ pallet_transaction_payment_rpc::TransactionPaymentRuntimeApi<Block, Balance>
+ substrate_frame_rpc_system::AccountNonceApi<Block, AccountId, Nonce>
+ ver_api::VerApi<Block>
+ xyk_rpc::XykRuntimeApi<Block, Balance, TokenId>,
sc_client_api::StateBackendFor<TFullBackend<Block>, Block>: sp_api::StateBackend<BlakeTwo256>,
Executor: sc_executor::NativeExecutionDispatch + 'static,
Expand Down
31 changes: 31 additions & 0 deletions rpc/nonce/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
[package]
name = "mangata-rpc-nonce"
version = "4.0.0-dev"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
license = "Apache-2.0"
homepage = "https://substrate.io"
repository = "https://github.com/paritytech/substrate/"
description = "FRAME's system exposed over Substrate RPC"
readme = "README.md"

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]

[dependencies]
sc-client-api = { version = "4.0.0-dev", git = "https://github.com/mangata-finance/substrate", branch = "mangata-dev-v4" }
codec = { package = "parity-scale-codec", version = "2.0.0" }
futures = "0.3.16"
jsonrpc-core = "18.0.0"
jsonrpc-core-client = "18.0.0"
jsonrpc-derive = "18.0.0"
log = "0.4.8"
sp-runtime = { version = "4.0.0-dev", git = "https://github.com/mangata-finance/substrate", branch = "mangata-dev-v4" }
sp-api = { version = "4.0.0-dev", git = "https://github.com/mangata-finance/substrate", branch = "mangata-dev-v4" }
frame-system-rpc-runtime-api ={ version = "4.0.0-dev", git = "https://github.com/mangata-finance/substrate", branch = "mangata-dev-v4" }
sp-core ={ version = "4.0.0-dev", git = "https://github.com/mangata-finance/substrate", branch = "mangata-dev-v4" }
sp-blockchain ={ version = "4.0.0-dev", git = "https://github.com/mangata-finance/substrate", branch = "mangata-dev-v4" }
ver-api ={ version = "4.0.0-dev", git = "https://github.com/mangata-finance/substrate", branch = "mangata-dev-v4" }
sc-transaction-pool-api ={ version = "4.0.0-dev", git = "https://github.com/mangata-finance/substrate", branch = "mangata-dev-v4" }
sp-block-builder ={ version = "4.0.0-dev", git = "https://github.com/mangata-finance/substrate", branch = "mangata-dev-v4" }
sc-rpc-api ={ version = "0.10.0-dev", git = "https://github.com/mangata-finance/substrate", branch = "mangata-dev-v4" }
3 changes: 3 additions & 0 deletions rpc/nonce/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
System FRAME specific RPC methods.

License: Apache-2.0
Loading