Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
zeroXbrock committed Sep 27, 2024
1 parent d220e44 commit 13abe3a
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ Contender is a high-performance Ethereum network spammer and testing tool design

## Installation

To install Contender, you need to have the [Rust toolchain](https://rustup.rs/) installed on your system. Then build the project from source:
To install the Contender CLI, you need to have the [Rust toolchain](https://rustup.rs/) installed on your system. Then build the project from source:

```bash
git clone https://github.com/your-username/contender.git
cd contender
git clone https://github.com/zeroxbrock/contender.git
cd contender/cli
cargo build --release
alias contender="$PWD/target/release/contender_cli"
```
Expand All @@ -43,23 +43,27 @@ contender --help

### Library Usage

To use Contender as a library in your Rust project, add it to your `Cargo.toml`:
To use Contender as a library in your Rust project, add the crates you need to your `Cargo.toml`:

```toml
[dependencies]
...
contender = { git = "https://github.com/zeroXbrock/contender.git" }
contender = { git = "https://github.com/zeroxbrock/contender" }
contender_sqlite = { git = "https://github.com/zeroxbrock/contender" }
contender_testfile = { git = "https://github.com/zeroxbrock/contender" }
# not necessarily required, but recommended:
tokio = { version = "1.40.0", features = ["rt-multi-thread"] }
```

You'll probably also want to use an async runtime such as `tokio`, which we use in the following example.

```rust
use contender_core::{
db::{database::DbOps, sqlite::SqliteDb},
generator::{RandSeed, TestConfig},
db::DbOps,
generator::RandSeed,
spammer::{BlockwiseSpammer, NilCallback},
test_scenario::TestScenario,
};
use contender_sqlite::SqliteDb;
use contender_testfile::TestConfig;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
Expand Down

0 comments on commit 13abe3a

Please sign in to comment.