-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
5 changed files
with
83 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
[[my_agent]] | ||
Deployer = {} | ||
Incrementer = { max_number_of_times = 5 } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,5 @@ | ||
use arbiter_engine::machine::*; | ||
use arbiter_macros::Behaviors; | ||
use serde::{Deserialize, Serialize}; | ||
|
||
pub mod deployer; | ||
use deployer::Deployer; | ||
|
||
#[derive(Behaviors, Debug, Serialize, Deserialize)] | ||
pub enum Behaviors { | ||
Deployer(Deployer), | ||
} | ||
pub use deployer::Deployer; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,16 @@ | ||
use arbiter_engine::{agent::Agent, world::World}; | ||
|
||
pub mod behaviors; | ||
pub mod bindings; | ||
|
||
use crate::behaviors::Behaviors; | ||
use crate::behaviors::Deployer; | ||
|
||
#[tokio::main] | ||
async fn main() { | ||
let mut world = World::new("univ3"); | ||
|
||
let deployer = Agent::builder("deployer").with_behavior(Deployer); | ||
|
||
/// To run this example, you can do the following from the project root directory: | ||
/// ```sh | ||
/// cargo run simulate configs/example.toml | ||
/// ``` | ||
/// If you would like to see more detailed logs, you can run the following: | ||
/// ```sh | ||
/// cargo run simulate configs/example.toml -vvv | ||
/// ``` | ||
/// to get `debug` level logs (the default with no verbosity is `ERROR`). | ||
/// | ||
/// By running | ||
/// ```sh | ||
/// cargo run | ||
/// ``` | ||
/// you will get the `--help` message for the project. | ||
#[arbiter_macros::main( | ||
name = "Uniswap V3 Simulation", | ||
about = "Simulating Uniswap V3 with Arbiter", | ||
behaviors = Behaviors | ||
)] | ||
async fn main() {} | ||
world.add_agent(deployer); | ||
let _ = world.run().await; | ||
} |