From 3946b590f7b9532b7e093f757a2ce8058f786f94 Mon Sep 17 00:00:00 2001 From: Kinrezc Date: Wed, 11 Oct 2023 12:50:54 -0400 Subject: [PATCH] rename rebalancer -> weight_changer, add constructor to atomic arbitrage contract --- Cargo.lock | 1 + box-contracts/src/AtomicArbitrage.sol | 8 ++++++++ box-simulation/src/setup/deploy.rs | 1 + 3 files changed, 10 insertions(+) diff --git a/Cargo.lock b/Cargo.lock index 1ee6a4bf6..768a41d3e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -344,6 +344,7 @@ name = "bindings" version = "0.1.0" dependencies = [ "ethers", + "serde", ] [[package]] diff --git a/box-contracts/src/AtomicArbitrage.sol b/box-contracts/src/AtomicArbitrage.sol index 23c890eb5..90e1a0627 100644 --- a/box-contracts/src/AtomicArbitrage.sol +++ b/box-contracts/src/AtomicArbitrage.sol @@ -17,6 +17,14 @@ contract AtomicArbitrage { address public asset; address public quote; + constructor(address exchangeAddress, address liquidExchangeAddress, address assetAddress, address quoteAddress) { + exchange = exchangeAddress; + liquidExchange = liquidExchangeAddress; + asset = assetAddress; + quote = quoteAddress; + } + + function lower_exchange_price( uint256 input ) external { diff --git a/box-simulation/src/setup/deploy.rs b/box-simulation/src/setup/deploy.rs index f5eebfef0..d91ad9fed 100644 --- a/box-simulation/src/setup/deploy.rs +++ b/box-simulation/src/setup/deploy.rs @@ -95,6 +95,7 @@ pub async fn deploy_contracts( .add(contracts.exchanges.lex.events(), "lex") .add(contracts.tokens.arbx.events(), "arbx") .add(contracts.tokens.arby.events(), "arby") + .add(contracts.exchanges.g3m.events(), "g3m") .run()?; // agents