pub trait ChainBootstrapMethodsExt {
Show 16 methods // Required methods fn read_file(&self, file_path: &str) -> Result<String, Error>; fn write_file(&self, file_path: &str, content: &str) -> Result<(), Error>; fn update_chain_config( &self, file: &str, cont: impl FnOnce(&mut Value) -> Result<(), Error> ) -> Result<(), Error>; fn initialize(&self) -> Result<(), Error>; fn update_genesis_file( &self, file: &str, cont: impl FnOnce(&mut Value) -> Result<(), Error> ) -> Result<(), Error>; fn add_wallet(&self, wallet_id: &str) -> Result<Wallet, Error>; fn add_genesis_account( &self, wallet: &WalletAddress, amounts: &[&Token] ) -> Result<(), Error>; fn add_genesis_validator( &self, wallet_id: &WalletId, token: &Token ) -> Result<(), Error>; fn collect_gen_txs(&self) -> Result<(), Error>; fn start(&self) -> Result<ChildProcess, Error>; fn submit_consumer_chain_proposal( &self, consumer_chain_id: &str, spawn_time: &str ) -> Result<(), Error>; fn assert_consumer_chain_proposal_submitted( &self, chain_id: &str, command_path: &str, home_path: &str, rpc_listen_address: &str ) -> Result<(), Error>; fn assert_consumer_chain_proposal_passed( &self, chain_id: &str, command_path: &str, home_path: &str, rpc_listen_address: &str ) -> Result<(), Error>; fn query_consumer_genesis( &self, consumer_chain_driver: &ChainDriver, consumer_chain_id: &str ) -> Result<(), Error>; fn replace_genesis_state(&self) -> Result<(), Error>; fn copy_validator_key_pair( &self, provider_chain_driver: &ChainDriver ) -> Result<(), Error>;
}

Required Methods§

source

fn read_file(&self, file_path: &str) -> Result<String, Error>

Read the content at a file path relative to the chain home directory, and return the result as a string.

This is not efficient but is sufficient for testing purposes.

source

fn write_file(&self, file_path: &str, content: &str) -> Result<(), Error>

Write the string content to a file path relative to the chain home directory.

This is not efficient but is sufficient for testing purposes.

source

fn update_chain_config( &self, file: &str, cont: impl FnOnce(&mut Value) -> Result<(), Error> ) -> Result<(), Error>

Modify the Gaia chain config which is saved in toml format.

source

fn initialize(&self) -> Result<(), Error>

Initialized the chain data stores.

This is used by bootstrap_single_node.

source

fn update_genesis_file( &self, file: &str, cont: impl FnOnce(&mut Value) -> Result<(), Error> ) -> Result<(), Error>

Modify the Gaia genesis file.

source

fn add_wallet(&self, wallet_id: &str) -> Result<Wallet, Error>

Add a wallet with the given ID to the full node’s keyring.

source

fn add_genesis_account( &self, wallet: &WalletAddress, amounts: &[&Token] ) -> Result<(), Error>

Add a wallet address to the genesis account list for an uninitialized full node.

source

fn add_genesis_validator( &self, wallet_id: &WalletId, token: &Token ) -> Result<(), Error>

Add a wallet ID with the given stake amount to be the genesis validator for an uninitialized chain.

source

fn collect_gen_txs(&self) -> Result<(), Error>

Call gaiad collect-gentxs to generate the genesis transactions.

source

fn start(&self) -> Result<ChildProcess, Error>

Start a full node by running in the background gaiad start.

Returns a ChildProcess that stops the full node process when the value is dropped.

source

fn submit_consumer_chain_proposal( &self, consumer_chain_id: &str, spawn_time: &str ) -> Result<(), Error>

Submit a consumer chain proposal.

source

fn assert_consumer_chain_proposal_submitted( &self, chain_id: &str, command_path: &str, home_path: &str, rpc_listen_address: &str ) -> Result<(), Error>

Assert that the consumer chain proposal is eventually submitted.

source

fn assert_consumer_chain_proposal_passed( &self, chain_id: &str, command_path: &str, home_path: &str, rpc_listen_address: &str ) -> Result<(), Error>

Assert that the consumer chain proposal eventually passes.

source

fn query_consumer_genesis( &self, consumer_chain_driver: &ChainDriver, consumer_chain_id: &str ) -> Result<(), Error>

Query a consumer chain’s genesis.

source

fn replace_genesis_state(&self) -> Result<(), Error>

Replace genesis state.

source

fn copy_validator_key_pair( &self, provider_chain_driver: &ChainDriver ) -> Result<(), Error>

Copy validator key pair.

Object Safety§

This trait is not object safe.

Implementors§