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§
sourcefn read_file(&self, file_path: &str) -> Result<String, Error>
 
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.
sourcefn write_file(&self, file_path: &str, content: &str) -> Result<(), Error>
 
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.
sourcefn update_chain_config(
    &self,
    file: &str,
    cont: impl FnOnce(&mut Value) -> Result<(), Error>
) -> Result<(), Error>
 
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.
sourcefn initialize(&self) -> Result<(), Error>
 
fn initialize(&self) -> Result<(), Error>
Initialized the chain data stores.
This is used by
bootstrap_single_node.
sourcefn update_genesis_file(
    &self,
    file: &str,
    cont: impl FnOnce(&mut Value) -> Result<(), Error>
) -> Result<(), Error>
 
fn update_genesis_file( &self, file: &str, cont: impl FnOnce(&mut Value) -> Result<(), Error> ) -> Result<(), Error>
Modify the Gaia genesis file.
sourcefn add_wallet(&self, wallet_id: &str) -> Result<Wallet, Error>
 
fn add_wallet(&self, wallet_id: &str) -> Result<Wallet, Error>
Add a wallet with the given ID to the full node’s keyring.
sourcefn add_genesis_account(
    &self,
    wallet: &WalletAddress,
    amounts: &[&Token]
) -> Result<(), Error>
 
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.
sourcefn add_genesis_validator(
    &self,
    wallet_id: &WalletId,
    token: &Token
) -> Result<(), Error>
 
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.
sourcefn collect_gen_txs(&self) -> Result<(), Error>
 
fn collect_gen_txs(&self) -> Result<(), Error>
Call gaiad collect-gentxs to generate the genesis transactions.
sourcefn start(&self) -> Result<ChildProcess, Error>
 
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.
sourcefn submit_consumer_chain_proposal(
    &self,
    consumer_chain_id: &str,
    spawn_time: &str
) -> Result<(), Error>
 
fn submit_consumer_chain_proposal( &self, consumer_chain_id: &str, spawn_time: &str ) -> Result<(), Error>
Submit a consumer chain proposal.
sourcefn 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_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.
sourcefn assert_consumer_chain_proposal_passed(
    &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>
Assert that the consumer chain proposal eventually passes.
sourcefn query_consumer_genesis(
    &self,
    consumer_chain_driver: &ChainDriver,
    consumer_chain_id: &str
) -> Result<(), Error>
 
fn query_consumer_genesis( &self, consumer_chain_driver: &ChainDriver, consumer_chain_id: &str ) -> Result<(), Error>
Query a consumer chain’s genesis.
sourcefn replace_genesis_state(&self) -> Result<(), Error>
 
fn replace_genesis_state(&self) -> Result<(), Error>
Replace genesis state.
sourcefn copy_validator_key_pair(
    &self,
    provider_chain_driver: &ChainDriver
) -> Result<(), Error>
 
fn copy_validator_key_pair( &self, provider_chain_driver: &ChainDriver ) -> Result<(), Error>
Copy validator key pair.