-
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.
There are some debug prints in here right now as I'm seeing that this is not running properly. Revert "feat: using main macro" This reverts commit 78c0032. feat: using main macro There are some debug prints in here right now as I'm seeing that this is not running properly.
- Loading branch information
1 parent
4601040
commit 1e96ee5
Showing
5 changed files
with
103 additions
and
83 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]] | ||
Incrementer = { max_number_of_times = 5 } | ||
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
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,5 +1,11 @@ | ||
use arbiter_engine::machine::*; | ||
use arbiter_macros::Behaviors; | ||
use serde::{Deserialize, Serialize}; | ||
|
||
pub mod deployer; | ||
use deployer::Deployer; | ||
|
||
pub use deployer::Deployer; | ||
#[derive(Behaviors, Debug, Serialize, Deserialize)] | ||
pub enum Behaviors { | ||
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,16 +1,26 @@ | ||
use arbiter_engine::{agent::Agent, world::World}; | ||
|
||
pub mod behaviors; | ||
pub mod bindings; | ||
|
||
use crate::behaviors::Deployer; | ||
|
||
#[tokio::main] | ||
async fn main() { | ||
let mut world = World::new("univ3"); | ||
|
||
let deployer = Agent::builder("deployer").with_behavior(Deployer); | ||
use crate::behaviors::Behaviors; | ||
|
||
world.add_agent(deployer); | ||
let _ = world.run().await; | ||
} | ||
/// 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() {} |