Skip to content

Commit

Permalink
docs(autonomi): improve README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
b-zee committed Dec 4, 2024
1 parent f175904 commit 57dd082
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions autonomi/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@ Connect to and build on the Autonomi network.

## Usage

Add the autonomi crate to your `Cargo.toml`:
Add the `autonomi` crate to your project with `cargo add`:

```sh
# `cargo add` adds dependencies to your Cargo.toml manifest file
cargo add autonomi
```

Expand Down Expand Up @@ -61,19 +60,19 @@ let wallet = Wallet::new_from_private_key(EvmNetwork::new_custom("<rpc URL>", "<
2. Run a local EVM node:

```sh
cargo run --bin evm-testnet
cargo run --bin=evm-testnet
```

3. Run a local network with the `local` feature and use the local evm node.

```sh
cargo run --bin antctl --features local -- local run --build --clean --rewards-address <ETHEREUM_ADDRESS> evm-local
cargo run --bin=antctl --features=local -- local run --build --clean --rewards-address=<ETHEREUM_ADDRESS> evm-local
```

4. Then run the tests with the `local` feature and pass the EVM params again:

```sh
EVM_NETWORK=local cargo test --package autonomi --features local
EVM_NETWORK=local cargo test --package autonomi --features=local
# Or with logs
RUST_LOG=autonomi EVM_NETWORK=local cargo test --package autonomi --features local -- --nocapture
```
Expand All @@ -86,21 +85,19 @@ point it to a live network.
1. Run a local network with the `local` feature:

```sh
cargo run --bin antctl --features local -- local run --build --clean --rewards-address <ETHEREUM_ADDRESS> evm-arbitrum-one
cargo run --bin=antctl --features=local -- local run --build --clean --rewards-address=<ETHEREUM_ADDRESS> evm-arbitrum-one
```

2. Then run the tests with the `local` feature. Make sure that the wallet of the private key you pass has enough gas and
payment tokens on the network (in this case Arbitrum One):

```sh
EVM_NETWORK=arbitrum-one EVM_PRIVATE_KEY=<PRIVATE_KEY> cargo test --package autonomi --features local
# Or with logs
RUST_LOG=autonomi EVM_NETWORK=arbitrum-one EVM_PRIVATE_KEY=<PRIVATE_KEY> cargo test --package autonomi --features local -- --nocapture
EVM_NETWORK=arbitrum-one EVM_PRIVATE_KEY=<PRIVATE_KEY> cargo test --package=autonomi --features=local
```

## Faucet (local)
## Using funds from the Deployer Wallet

There is no faucet server, but instead you can use the `Deployer wallet private key` printed in the EVM node output to
You can use the `Deployer wallet private key` printed in the EVM node output to
initialise a wallet from with almost infinite gas and payment tokens. Example:

```rust
Expand Down

0 comments on commit 57dd082

Please sign in to comment.