Skip to content

Commit

Permalink
fix config path and anvil instance
Browse files Browse the repository at this point in the history
  • Loading branch information
not4x217 committed Oct 30, 2024
1 parent cf1820c commit 6e27ce1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tripa/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -360,12 +360,13 @@ fn mock_state() -> WalletState {

#[tokio::main]
async fn main() {
let config_string = fs::read_to_string("config_default.toml").expect("failed to read config");
let config_string = fs::read_to_string("config.toml").expect("failed to read config");
let mut config: Config = toml::from_str(&config_string).expect("failed to parse config");

// Create a provider with the HTTP transport using the `reqwest` crate.
let anvil: AnvilInstance;
let (provider, signer) = if config.use_local_anvil {
let anvil = Anvil::new().try_spawn().expect("failed to start anvil");
anvil = Anvil::new().try_spawn().expect("failed to start anvil");
let signer: PrivateKeySigner = anvil.keys()[0].clone().into();
let rpc_url: String = anvil.endpoint().parse().expect("failed to get anvil url");
config.base_url = rpc_url.clone();
Expand Down

0 comments on commit 6e27ce1

Please sign in to comment.