diff --git a/crates/autopilot/src/driver_model.rs b/crates/autopilot/src/driver_model.rs index fe1ed5203b..0076976b35 100644 --- a/crates/autopilot/src/driver_model.rs +++ b/crates/autopilot/src/driver_model.rs @@ -23,7 +23,7 @@ pub mod quote { } #[derive(Clone, Debug, Default, Serialize)] - #[serde(rename_all = "lowercase")] + #[serde(rename_all = "camelCase")] pub enum Kind { #[default] Buy, @@ -123,7 +123,7 @@ pub mod solve { } #[derive(Clone, Debug, Serialize, Deserialize)] - #[serde(rename_all = "lowercase")] + #[serde(rename_all = "camelCase")] pub enum Class { Market, Limit, @@ -142,7 +142,7 @@ pub mod solve { } #[derive(Clone, Debug, Serialize)] - #[serde(rename_all = "lowercase", tag = "kind")] + #[serde(rename_all = "camelCase", tag = "kind")] pub enum FeePolicy { /// If the order receives more than expected (positive deviation from /// quoted amounts) pay the protocol a factor of the achieved diff --git a/crates/driver/openapi.yml b/crates/driver/openapi.yml index 946ea18297..b7094bdb15 100644 --- a/crates/driver/openapi.yml +++ b/crates/driver/openapi.yml @@ -427,7 +427,7 @@ components: properties: kind: type: string - enum: ["priceimprovement"] + enum: ["priceImprovement"] maxVolumeFactor: description: Never charge more than that percentage of the order volume. type: number diff --git a/crates/driver/src/infra/api/routes/quote/dto/order.rs b/crates/driver/src/infra/api/routes/quote/dto/order.rs index 88786be4c4..6bf7115560 100644 --- a/crates/driver/src/infra/api/routes/quote/dto/order.rs +++ b/crates/driver/src/infra/api/routes/quote/dto/order.rs @@ -36,7 +36,7 @@ pub struct Order { } #[derive(Debug, Deserialize)] -#[serde(rename_all = "lowercase", deny_unknown_fields)] +#[serde(rename_all = "camelCase", deny_unknown_fields)] enum Kind { Sell, Buy, diff --git a/crates/driver/src/infra/api/routes/solve/dto/auction.rs b/crates/driver/src/infra/api/routes/solve/dto/auction.rs index 2e068d854c..ab201e4783 100644 --- a/crates/driver/src/infra/api/routes/solve/dto/auction.rs +++ b/crates/driver/src/infra/api/routes/solve/dto/auction.rs @@ -254,7 +254,7 @@ struct Order { } #[derive(Debug, Deserialize)] -#[serde(rename_all = "lowercase", deny_unknown_fields)] +#[serde(rename_all = "camelCase", deny_unknown_fields)] enum Kind { Sell, Buy, @@ -272,7 +272,7 @@ struct Interaction { } #[derive(Debug, Default, Deserialize)] -#[serde(rename_all = "lowercase", deny_unknown_fields)] +#[serde(rename_all = "camelCase", deny_unknown_fields)] enum SellTokenBalance { #[default] Erc20, @@ -281,7 +281,7 @@ enum SellTokenBalance { } #[derive(Debug, Default, Deserialize)] -#[serde(rename_all = "lowercase", deny_unknown_fields)] +#[serde(rename_all = "camelCase", deny_unknown_fields)] enum BuyTokenBalance { #[default] Erc20, @@ -298,7 +298,7 @@ enum SigningScheme { } #[derive(Debug, Deserialize)] -#[serde(rename_all = "lowercase", deny_unknown_fields)] +#[serde(rename_all = "camelCase", deny_unknown_fields)] enum Class { Market, Limit, @@ -306,7 +306,7 @@ enum Class { } #[derive(Debug, Deserialize)] -#[serde(rename_all = "lowercase", tag = "kind", deny_unknown_fields)] +#[serde(rename_all = "camelCase", tag = "kind", deny_unknown_fields)] enum FeePolicy { #[serde(rename_all = "camelCase")] PriceImprovement { factor: f64, max_volume_factor: f64 }, diff --git a/crates/driver/src/infra/solver/dto/auction.rs b/crates/driver/src/infra/solver/dto/auction.rs index 5021bebe68..91307f57a6 100644 --- a/crates/driver/src/infra/solver/dto/auction.rs +++ b/crates/driver/src/infra/solver/dto/auction.rs @@ -237,14 +237,14 @@ struct Order { } #[derive(Debug, Serialize)] -#[serde(rename_all = "lowercase")] +#[serde(rename_all = "camelCase")] enum Kind { Sell, Buy, } #[derive(Debug, Serialize)] -#[serde(rename_all = "lowercase")] +#[serde(rename_all = "camelCase")] enum Class { Market, Limit, @@ -267,7 +267,7 @@ struct Token { // TODO Remove dead_code #[allow(dead_code, clippy::enum_variant_names)] #[derive(Debug, Serialize)] -#[serde(tag = "kind", rename_all = "lowercase")] +#[serde(tag = "kind", rename_all = "camelCase")] enum Liquidity { ConstantProduct(ConstantProductPool), WeightedProduct(WeightedProductPool), @@ -325,7 +325,7 @@ struct WeightedProductReserve { } #[derive(Debug, Serialize)] -#[serde(rename_all = "lowercase")] +#[serde(rename_all = "camelCase")] enum WeightedProductVersion { V0, V3Plus, diff --git a/crates/driver/src/infra/solver/dto/notification.rs b/crates/driver/src/infra/solver/dto/notification.rs index 2d2cc75090..3251827fd2 100644 --- a/crates/driver/src/infra/solver/dto/notification.rs +++ b/crates/driver/src/infra/solver/dto/notification.rs @@ -95,7 +95,7 @@ pub struct Notification { #[serde_as] #[derive(Debug, Serialize)] -#[serde(rename_all = "lowercase", tag = "kind")] +#[serde(rename_all = "camelCase", tag = "kind")] pub enum Kind { Timeout, EmptySolution, diff --git a/crates/driver/src/infra/solver/dto/solution.rs b/crates/driver/src/infra/solver/dto/solution.rs index 8f9dd40ba8..2815667371 100644 --- a/crates/driver/src/infra/solver/dto/solution.rs +++ b/crates/driver/src/infra/solver/dto/solution.rs @@ -234,7 +234,7 @@ pub struct Solution { } #[derive(Debug, Deserialize)] -#[serde(tag = "kind", rename_all = "lowercase", deny_unknown_fields)] +#[serde(tag = "kind", rename_all = "camelCase", deny_unknown_fields)] enum Trade { Fulfillment(Fulfillment), Jit(JitTrade), @@ -287,14 +287,14 @@ struct JitOrder { } #[derive(Debug, Deserialize)] -#[serde(rename_all = "lowercase", deny_unknown_fields)] +#[serde(rename_all = "camelCase", deny_unknown_fields)] enum Kind { Sell, Buy, } #[derive(Debug, Deserialize)] -#[serde(tag = "kind", rename_all = "lowercase", deny_unknown_fields)] +#[serde(tag = "kind", rename_all = "camelCase", deny_unknown_fields)] enum Interaction { Liquidity(LiquidityInteraction), Custom(CustomInteraction), @@ -350,7 +350,7 @@ struct Allowance { } #[derive(Debug, Default, Deserialize)] -#[serde(rename_all = "lowercase", deny_unknown_fields)] +#[serde(rename_all = "camelCase", deny_unknown_fields)] enum SellTokenBalance { #[default] Erc20, @@ -359,7 +359,7 @@ enum SellTokenBalance { } #[derive(Debug, Default, Deserialize)] -#[serde(rename_all = "lowercase", deny_unknown_fields)] +#[serde(rename_all = "camelCase", deny_unknown_fields)] enum BuyTokenBalance { #[default] Erc20, @@ -367,7 +367,7 @@ enum BuyTokenBalance { } #[derive(Debug, Deserialize)] -#[serde(rename_all = "lowercase", deny_unknown_fields)] +#[serde(rename_all = "camelCase", deny_unknown_fields)] enum SigningScheme { Eip712, EthSign, @@ -377,7 +377,7 @@ enum SigningScheme { #[serde_as] #[derive(Debug, Deserialize)] -#[serde(rename_all = "lowercase", deny_unknown_fields, tag = "kind")] +#[serde(rename_all = "camelCase", deny_unknown_fields, tag = "kind")] pub enum Score { Solver { #[serde_as(as = "serialize::U256")] diff --git a/crates/driver/src/tests/setup/driver.rs b/crates/driver/src/tests/setup/driver.rs index faa42c008f..b9a9528e8f 100644 --- a/crates/driver/src/tests/setup/driver.rs +++ b/crates/driver/src/tests/setup/driver.rs @@ -95,7 +95,7 @@ pub fn solve_req(test: &Test) -> serde_json::Value { "signingScheme": "eip712", "signature": format!("0x{}", hex::encode(quote.order_signature(&test.blockchain))), "feePolicies": [{ - "kind": "priceimprovement", + "kind": "priceImprovement", "factor": 0.5, "maxVolumeFactor": 0.06, }, diff --git a/crates/driver/src/tests/setup/mod.rs b/crates/driver/src/tests/setup/mod.rs index 83c5e81902..c575ec1b01 100644 --- a/crates/driver/src/tests/setup/mod.rs +++ b/crates/driver/src/tests/setup/mod.rs @@ -61,7 +61,7 @@ pub enum Partial { #[serde_as] #[derive(Debug, Clone, serde::Serialize)] -#[serde(rename_all = "lowercase", tag = "kind")] +#[serde(rename_all = "camelCase", tag = "kind")] pub enum Score { Solver { #[serde_as(as = "serialize::U256")] diff --git a/crates/e2e/tests/e2e/colocation_partial_fill.rs b/crates/e2e/tests/e2e/colocation_partial_fill.rs index 149888f66f..91e2c4e90f 100644 --- a/crates/e2e/tests/e2e/colocation_partial_fill.rs +++ b/crates/e2e/tests/e2e/colocation_partial_fill.rs @@ -7,7 +7,7 @@ use { ethcontract::U256, model::{ order::{OrderCreation, OrderKind}, - signature::EcdsaSigningScheme, + signature::{EcdsaSigningScheme, Signature, SigningScheme}, }, secp256k1::SecretKey, shared::ethrpc::Web3, @@ -73,10 +73,11 @@ async fn test(web3: Web3) { valid_to: model::time::now_in_epoch_seconds() + 300, partially_fillable: true, kind: OrderKind::Sell, + signature: Signature::default_with(SigningScheme::EthSign), ..Default::default() } .sign( - EcdsaSigningScheme::Eip712, + EcdsaSigningScheme::EthSign, &onchain.contracts().domain_separator, SecretKeyRef::from(&SecretKey::from_slice(trader.private_key()).unwrap()), ); diff --git a/crates/solvers/openapi.yml b/crates/solvers/openapi.yml index 96144721a8..85756503ab 100644 --- a/crates/solvers/openapi.yml +++ b/crates/solvers/openapi.yml @@ -273,7 +273,7 @@ components: properties: kind: type: string - enum: [constantproduct] + enum: [constantProduct] tokens: description: | A mapping of token address to its reserve amounts. @@ -294,7 +294,7 @@ components: properties: kind: type: string - enum: [weightedproduct] + enum: [weightedProduct] tokens: description: | A mapping of token address to its reserve amounts with weights. @@ -314,7 +314,7 @@ components: $ref: "#/components/schemas/Decimal" version: type: string - enum: ["v0", "v3plus"] + enum: ["v0", "v3Plus"] StablePool: description: | @@ -362,7 +362,7 @@ components: properties: kind: type: string - enum: [concentratedliquidity] + enum: [concentratedLiquidity] tokens: type: array items: @@ -397,7 +397,7 @@ components: properties: kind: type: string - enum: [limitorder] + enum: [limitOrder] hash: $ref: "#/components/schemas/Digest" makerToken: @@ -763,7 +763,7 @@ components: properties: kind: type: string - enum: [riskadjusted] + enum: [riskAdjusted] successProbability: description: | The revert probability of the solution. Used by the driver to compute a risk-adjusted score. diff --git a/crates/solvers/src/api/routes/notify/dto/notification.rs b/crates/solvers/src/api/routes/notify/dto/notification.rs index c679af3da0..1b982c0df8 100644 --- a/crates/solvers/src/api/routes/notify/dto/notification.rs +++ b/crates/solvers/src/api/routes/notify/dto/notification.rs @@ -109,7 +109,7 @@ pub struct Notification { #[serde_as] #[derive(Debug, Deserialize)] -#[serde(rename_all = "lowercase", tag = "kind")] +#[serde(rename_all = "camelCase", tag = "kind")] pub enum Kind { Timeout, EmptySolution, diff --git a/crates/solvers/src/api/routes/solve/dto/auction.rs b/crates/solvers/src/api/routes/solve/dto/auction.rs index 1c3f005952..a523a9905a 100644 --- a/crates/solvers/src/api/routes/solve/dto/auction.rs +++ b/crates/solvers/src/api/routes/solve/dto/auction.rs @@ -117,14 +117,14 @@ struct Order { } #[derive(Debug, Deserialize)] -#[serde(rename_all = "lowercase")] +#[serde(rename_all = "camelCase")] enum Kind { Sell, Buy, } #[derive(Debug, Deserialize)] -#[serde(rename_all = "lowercase")] +#[serde(rename_all = "camelCase")] enum Class { Market, Limit, @@ -146,7 +146,7 @@ struct Token { #[allow(clippy::enum_variant_names)] #[derive(Debug, Deserialize)] -#[serde(tag = "kind", rename_all = "lowercase", deny_unknown_fields)] +#[serde(tag = "kind", rename_all = "camelCase", deny_unknown_fields)] enum Liquidity { ConstantProduct(ConstantProductPool), WeightedProduct(WeightedProductPool), @@ -227,7 +227,7 @@ struct WeightedProductReserve { } #[derive(Debug, Deserialize)] -#[serde(rename_all = "lowercase")] +#[serde(rename_all = "camelCase")] enum WeightedProductVersion { V0, V3Plus, diff --git a/crates/solvers/src/api/routes/solve/dto/solution.rs b/crates/solvers/src/api/routes/solve/dto/solution.rs index cc8fd0c1c0..5026d7db0d 100644 --- a/crates/solvers/src/api/routes/solve/dto/solution.rs +++ b/crates/solvers/src/api/routes/solve/dto/solution.rs @@ -153,7 +153,7 @@ struct Solution { } #[derive(Debug, Serialize)] -#[serde(tag = "kind", rename_all = "lowercase")] +#[serde(tag = "kind", rename_all = "camelCase")] enum Trade { Fulfillment(Fulfillment), Jit(JitTrade), @@ -207,14 +207,14 @@ struct JitOrder { } #[derive(Debug, Serialize)] -#[serde(rename_all = "lowercase")] +#[serde(rename_all = "camelCase")] enum Kind { Sell, Buy, } #[derive(Debug, Serialize)] -#[serde(tag = "kind", rename_all = "lowercase")] +#[serde(tag = "kind", rename_all = "camelCase")] enum Interaction { Liquidity(LiquidityInteraction), Custom(CustomInteraction), @@ -284,7 +284,7 @@ struct Allowance { } #[derive(Debug, Default, Serialize)] -#[serde(rename_all = "lowercase")] +#[serde(rename_all = "camelCase")] enum SellTokenBalance { #[default] Erc20, @@ -293,7 +293,7 @@ enum SellTokenBalance { } #[derive(Debug, Default, Serialize)] -#[serde(rename_all = "lowercase")] +#[serde(rename_all = "camelCase")] enum BuyTokenBalance { #[default] Erc20, @@ -301,7 +301,7 @@ enum BuyTokenBalance { } #[derive(Debug, Serialize)] -#[serde(rename_all = "lowercase")] +#[serde(rename_all = "camelCase")] enum SigningScheme { Eip712, EthSign, @@ -312,7 +312,7 @@ enum SigningScheme { /// A score for a solution. The score is used to rank solutions. #[serde_as] #[derive(Debug, Serialize)] -#[serde(rename_all = "lowercase", tag = "kind")] +#[serde(rename_all = "camelCase", tag = "kind")] pub enum Score { Solver { #[serde_as(as = "serialize::U256")] diff --git a/crates/solvers/src/tests/baseline/bal_liquidity.rs b/crates/solvers/src/tests/baseline/bal_liquidity.rs index 1552c89953..20191ef2a0 100644 --- a/crates/solvers/src/tests/baseline/bal_liquidity.rs +++ b/crates/solvers/src/tests/baseline/bal_liquidity.rs @@ -62,7 +62,7 @@ async fn weighted() { ], "liquidity": [ { - "kind": "weightedproduct", + "kind": "weightedProduct", "tokens": { "0x6810e776880c02933d47db1b9fc05908e5386b96": { "balance": "11260752191375725565253", @@ -117,7 +117,7 @@ async fn weighted() { }, ], "score": { - "kind": "riskadjusted", + "kind": "riskAdjusted", "successProbability": 0.5, } }] @@ -178,7 +178,7 @@ async fn weighted_v3plus() { ], "liquidity": [ { - "kind": "weightedproduct", + "kind": "weightedProduct", "tokens": { "0x177127622c4a00f3d409b75571e12cb3c8973d3c": { "balance": "5089632258314443812936111", @@ -195,7 +195,7 @@ async fn weighted_v3plus() { "id": "0", "address": "0x21d4c792ea7e38e0d0819c2011a2b1cb7252bd99", "gasEstimate": "88892", - "version": "v3plus", + "version": "v3Plus", }, ], "effectiveGasPrice": "1000000000", @@ -233,7 +233,7 @@ async fn weighted_v3plus() { }, ], "score": { - "kind": "riskadjusted", + "kind": "riskAdjusted", "successProbability": 0.5, } }] @@ -372,7 +372,7 @@ async fn stable() { }, ], "score": { - "kind": "riskadjusted", + "kind": "riskAdjusted", "successProbability": 0.5, } }, @@ -403,7 +403,7 @@ async fn stable() { }, ], "score": { - "kind": "riskadjusted", + "kind": "riskAdjusted", "successProbability": 0.5, } }, @@ -537,7 +537,7 @@ async fn composable_stable_v4() { }, ], "score": { - "kind": "riskadjusted", + "kind": "riskAdjusted", "successProbability": 0.5, } }, diff --git a/crates/solvers/src/tests/baseline/buy_order_rounding.rs b/crates/solvers/src/tests/baseline/buy_order_rounding.rs index e0a4bad99e..90ff99010c 100644 --- a/crates/solvers/src/tests/baseline/buy_order_rounding.rs +++ b/crates/solvers/src/tests/baseline/buy_order_rounding.rs @@ -47,7 +47,7 @@ async fn uniswap() { ], "liquidity": [ { - "kind": "constantproduct", + "kind": "constantProduct", "tokens": { "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48": { "balance": "30493445841295" @@ -101,7 +101,7 @@ async fn uniswap() { } ], "score": { - "kind": "riskadjusted", + "kind": "riskAdjusted", "successProbability": 0.5, } }] @@ -170,7 +170,7 @@ async fn balancer_weighted() { "liquidity": [ // A xCOW -> xGNO -> wxDAI path with a good price. { - "kind": "constantproduct", + "kind": "constantProduct", "tokens": { "0x9c58bacc331c9aa871afd802db6379a98e80cedb": { "balance": "9661963829146095661" @@ -185,7 +185,7 @@ async fn balancer_weighted() { "gasEstimate": "90171" }, { - "kind": "weightedproduct", + "kind": "weightedProduct", "tokens": { "0x177127622c4a00f3d409b75571e12cb3c8973d3c": { "balance": "1963528800698237927834721", @@ -206,7 +206,7 @@ async fn balancer_weighted() { }, // A fake xCOW -> wxDAI path with a BAD price. { - "kind": "constantproduct", + "kind": "constantProduct", "tokens": { "0x177127622c4a00f3d409b75571e12cb3c8973d3c": { "balance": "1000000000000000000000000000" @@ -267,7 +267,7 @@ async fn balancer_weighted() { }, ], "score": { - "kind": "riskadjusted", + "kind": "riskAdjusted", "successProbability": 0.5, } }] @@ -328,7 +328,7 @@ async fn balancer_weighted_v3plus() { ], "liquidity": [ { - "kind": "weightedproduct", + "kind": "weightedProduct", "tokens": { "0x177127622c4a00f3d409b75571e12cb3c8973d3c": { "balance": "18764168403990393422000071", @@ -345,7 +345,7 @@ async fn balancer_weighted_v3plus() { "id": "0", "address": "0x21d4c792ea7e38e0d0819c2011a2b1cb7252bd99", "gasEstimate": "88892", - "version": "v3plus", + "version": "v3Plus", }, ], "effectiveGasPrice": "1000000000", @@ -383,7 +383,7 @@ async fn balancer_weighted_v3plus() { }, ], "score": { - "kind": "riskadjusted", + "kind": "riskAdjusted", "successProbability": 0.5, } }] @@ -444,7 +444,7 @@ async fn distant_convergence() { ], "liquidity": [ { - "kind": "weightedproduct", + "kind": "weightedProduct", "tokens": { "0x177127622c4a00f3d409b75571e12cb3c8973d3c": { "balance": "5089632258314443812936111", @@ -461,7 +461,7 @@ async fn distant_convergence() { "id": "0", "address": "0x21d4c792ea7e38e0d0819c2011a2b1cb7252bd99", "gasEstimate": "88892", - "version": "v3plus", + "version": "v3Plus", }, ], "effectiveGasPrice": "1000000000", @@ -499,7 +499,7 @@ async fn distant_convergence() { }, ], "score": { - "kind": "riskadjusted", + "kind": "riskAdjusted", "successProbability": 0.5, } }] @@ -560,7 +560,7 @@ async fn same_path() { ], "liquidity": [ { - "kind": "weightedproduct", + "kind": "weightedProduct", "tokens": { "0x177127622c4a00f3d409b75571e12cb3c8973d3c": { "balance": "1963528800698237927834721", @@ -580,7 +580,7 @@ async fn same_path() { "version": "v0", }, { - "kind": "constantproduct", + "kind": "constantProduct", "tokens": { "0x177127622c4a00f3d409b75571e12cb3c8973d3c": { "balance": "1000000000000000000000000000" @@ -650,7 +650,7 @@ async fn same_path() { }, ], "score": { - "kind": "riskadjusted", + "kind": "riskAdjusted", "successProbability": 0.5, } }] @@ -790,7 +790,7 @@ async fn balancer_stable() { }, ], "score": { - "kind": "riskadjusted", + "kind": "riskAdjusted", "successProbability": 0.5, } }, diff --git a/crates/solvers/src/tests/baseline/direct_swap.rs b/crates/solvers/src/tests/baseline/direct_swap.rs index 148ece9ef0..6b533968f2 100644 --- a/crates/solvers/src/tests/baseline/direct_swap.rs +++ b/crates/solvers/src/tests/baseline/direct_swap.rs @@ -47,7 +47,7 @@ async fn test() { ], "liquidity": [ { - "kind": "constantproduct", + "kind": "constantProduct", "tokens": { "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2": { "balance": "3828187314911751990" @@ -97,7 +97,7 @@ async fn test() { } ], "score": { - "kind": "riskadjusted", + "kind": "riskAdjusted", "successProbability": 0.5, } }] diff --git a/crates/solvers/src/tests/baseline/internalization.rs b/crates/solvers/src/tests/baseline/internalization.rs index ee8185c6a9..37c091ec3d 100644 --- a/crates/solvers/src/tests/baseline/internalization.rs +++ b/crates/solvers/src/tests/baseline/internalization.rs @@ -47,7 +47,7 @@ async fn trusted_token() { ], "liquidity": [ { - "kind": "constantproduct", + "kind": "constantProduct", "tokens": { "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2": { "balance": "3828187314911751990" @@ -97,7 +97,7 @@ async fn trusted_token() { } ], "score": { - "kind": "riskadjusted", + "kind": "riskAdjusted", "successProbability": 0.5, } }] @@ -149,7 +149,7 @@ async fn untrusted_sell_token() { ], "liquidity": [ { - "kind": "constantproduct", + "kind": "constantProduct", "tokens": { "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2": { "balance": "3828187314911751990" @@ -199,7 +199,7 @@ async fn untrusted_sell_token() { } ], "score": { - "kind": "riskadjusted", + "kind": "riskAdjusted", "successProbability": 0.5, } }] @@ -251,7 +251,7 @@ async fn insufficient_balance() { ], "liquidity": [ { - "kind": "constantproduct", + "kind": "constantProduct", "tokens": { "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2": { "balance": "3828187314911751990" @@ -301,7 +301,7 @@ async fn insufficient_balance() { } ], "score": { - "kind": "riskadjusted", + "kind": "riskAdjusted", "successProbability": 0.5, } }] diff --git a/crates/solvers/src/tests/baseline/partial_fill.rs b/crates/solvers/src/tests/baseline/partial_fill.rs index ade53c6dd5..1d83e2d748 100644 --- a/crates/solvers/src/tests/baseline/partial_fill.rs +++ b/crates/solvers/src/tests/baseline/partial_fill.rs @@ -47,7 +47,7 @@ async fn test() { ], "liquidity": [ { - "kind": "constantproduct", + "kind": "constantProduct", "tokens": { "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2": { "balance": "3828187314911751990" @@ -98,7 +98,7 @@ async fn test() { } ], "score": { - "kind": "riskadjusted", + "kind": "riskAdjusted", "successProbability": 0.5, } }] diff --git a/crates/solvers/src/tests/legacy/attaching_approvals.rs b/crates/solvers/src/tests/legacy/attaching_approvals.rs index 51e293550b..9e0e4ce110 100644 --- a/crates/solvers/src/tests/legacy/attaching_approvals.rs +++ b/crates/solvers/src/tests/legacy/attaching_approvals.rs @@ -147,7 +147,7 @@ async fn test() { }, ], "score": { - "kind": "riskadjusted", + "kind": "riskAdjusted", "successProbability": 1.0, } }] diff --git a/crates/solvers/src/tests/legacy/concentrated_liquidity.rs b/crates/solvers/src/tests/legacy/concentrated_liquidity.rs index 1052466d61..f1c6d12b14 100644 --- a/crates/solvers/src/tests/legacy/concentrated_liquidity.rs +++ b/crates/solvers/src/tests/legacy/concentrated_liquidity.rs @@ -97,7 +97,7 @@ async fn test() { "orders": [], "liquidity": [ { - "kind": "concentratedliquidity", + "kind": "concentratedLiquidity", "id": "0", "address": "0x97b744df0b59d93A866304f97431D8EfAd29a08d", "gasEstimate": "110000", @@ -139,7 +139,7 @@ async fn test() { } ], "score": { - "kind": "riskadjusted", + "kind": "riskAdjusted", "successProbability": 1.0, } }] diff --git a/crates/solvers/src/tests/legacy/jit_order.rs b/crates/solvers/src/tests/legacy/jit_order.rs index 76c45c0519..c16eaf9487 100644 --- a/crates/solvers/src/tests/legacy/jit_order.rs +++ b/crates/solvers/src/tests/legacy/jit_order.rs @@ -115,7 +115,7 @@ async fn test() { ], "interactions": [], "score": { - "kind": "riskadjusted", + "kind": "riskAdjusted", "successProbability": 1.0, } }] diff --git a/crates/solvers/src/tests/legacy/market_order.rs b/crates/solvers/src/tests/legacy/market_order.rs index 8726091a01..d6a17872cd 100644 --- a/crates/solvers/src/tests/legacy/market_order.rs +++ b/crates/solvers/src/tests/legacy/market_order.rs @@ -155,7 +155,7 @@ async fn quote() { ], "liquidity": [ { - "kind": "constantproduct", + "kind": "constantProduct", "tokens": { "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2": { "balance": "3828187314911751990" @@ -205,7 +205,7 @@ async fn quote() { } ], "score": { - "kind": "riskadjusted", + "kind": "riskAdjusted", "successProbability": 1.0, } }] @@ -361,7 +361,7 @@ async fn solve() { ], "liquidity": [ { - "kind": "constantproduct", + "kind": "constantProduct", "tokens": { "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2": { "balance": "3828187314911751990" @@ -411,7 +411,7 @@ async fn solve() { } ], "score": { - "kind": "riskadjusted", + "kind": "riskAdjusted", "successProbability": 1.0, } }] diff --git a/crates/solvers/src/tests/naive/extract_deepest_pool.rs b/crates/solvers/src/tests/naive/extract_deepest_pool.rs index 241375e088..acfbdfd5e5 100644 --- a/crates/solvers/src/tests/naive/extract_deepest_pool.rs +++ b/crates/solvers/src/tests/naive/extract_deepest_pool.rs @@ -40,7 +40,7 @@ async fn test() { ], "liquidity": [ { - "kind": "constantproduct", + "kind": "constantProduct", "tokens": { "0x0101010101010101010101010101010101010101": { "balance": "100" @@ -55,7 +55,7 @@ async fn test() { "gasEstimate": "0" }, { - "kind": "constantproduct", + "kind": "constantProduct", "tokens": { "0x0101010101010101010101010101010101010101": { "balance": "10000000" @@ -70,7 +70,7 @@ async fn test() { "gasEstimate": "0" }, { - "kind": "constantproduct", + "kind": "constantProduct", "tokens": { "0x0303030303030303030303030303030303030303": { "balance": "10000000000000000" @@ -120,7 +120,7 @@ async fn test() { }, ], "score": { - "kind": "riskadjusted", + "kind": "riskAdjusted", "successProbability": 0.5, } }] diff --git a/crates/solvers/src/tests/naive/filters_out_of_price_orders.rs b/crates/solvers/src/tests/naive/filters_out_of_price_orders.rs index 3f55137aef..4a629a9606 100644 --- a/crates/solvers/src/tests/naive/filters_out_of_price_orders.rs +++ b/crates/solvers/src/tests/naive/filters_out_of_price_orders.rs @@ -75,7 +75,7 @@ async fn sell_orders_on_both_sides() { ], "liquidity": [ { - "kind": "constantproduct", + "kind": "constantProduct", "tokens": { "0x000000000000000000000000000000000000000a": { "balance": "1000000000000000000000000" @@ -122,7 +122,7 @@ async fn sell_orders_on_both_sides() { ], "interactions": [], "score": { - "kind": "riskadjusted", + "kind": "riskAdjusted", "successProbability": 0.5, } }] diff --git a/crates/solvers/src/tests/naive/limit_order_price.rs b/crates/solvers/src/tests/naive/limit_order_price.rs index 1c567e7205..1626627ed3 100644 --- a/crates/solvers/src/tests/naive/limit_order_price.rs +++ b/crates/solvers/src/tests/naive/limit_order_price.rs @@ -32,7 +32,7 @@ async fn test() { ], "liquidity": [ { - "kind": "constantproduct", + "kind": "constantProduct", "tokens": { "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48": { "balance": "36338096110368" diff --git a/crates/solvers/src/tests/naive/matches_orders.rs b/crates/solvers/src/tests/naive/matches_orders.rs index 4152d053f5..d7ebca69f8 100644 --- a/crates/solvers/src/tests/naive/matches_orders.rs +++ b/crates/solvers/src/tests/naive/matches_orders.rs @@ -45,7 +45,7 @@ async fn sell_orders_on_both_sides() { ], "liquidity": [ { - "kind": "constantproduct", + "kind": "constantProduct", "tokens": { "0x000000000000000000000000000000000000000a": { "balance": "1000000000000000000000" @@ -102,7 +102,7 @@ async fn sell_orders_on_both_sides() { }, ], "score": { - "kind": "riskadjusted", + "kind": "riskAdjusted", "successProbability": 0.5, } }] @@ -152,7 +152,7 @@ async fn sell_orders_on_one_side() { ], "liquidity": [ { - "kind": "constantproduct", + "kind": "constantProduct", "tokens": { "0x000000000000000000000000000000000000000a": { "balance": "1000000000000000000000000" @@ -209,7 +209,7 @@ async fn sell_orders_on_one_side() { }, ], "score": { - "kind": "riskadjusted", + "kind": "riskAdjusted", "successProbability": 0.5, } }] @@ -259,7 +259,7 @@ async fn buy_orders_on_both_sides() { ], "liquidity": [ { - "kind": "constantproduct", + "kind": "constantProduct", "tokens": { "0x000000000000000000000000000000000000000a": { "balance": "1000000000000000000000" @@ -316,7 +316,7 @@ async fn buy_orders_on_both_sides() { }, ], "score": { - "kind": "riskadjusted", + "kind": "riskAdjusted", "successProbability": 0.5, } }] @@ -366,7 +366,7 @@ async fn buy_and_sell_orders() { ], "liquidity": [ { - "kind": "constantproduct", + "kind": "constantProduct", "tokens": { "0x000000000000000000000000000000000000000a": { "balance": "1000000000000000000000" @@ -423,7 +423,7 @@ async fn buy_and_sell_orders() { }, ], "score": { - "kind": "riskadjusted", + "kind": "riskAdjusted", "successProbability": 0.5, } }] diff --git a/crates/solvers/src/tests/naive/reserves_too_small.rs b/crates/solvers/src/tests/naive/reserves_too_small.rs index 9ec0d31e99..62b64613bd 100644 --- a/crates/solvers/src/tests/naive/reserves_too_small.rs +++ b/crates/solvers/src/tests/naive/reserves_too_small.rs @@ -45,7 +45,7 @@ async fn test() { ], "liquidity": [ { - "kind": "constantproduct", + "kind": "constantProduct", "tokens": { "0x000000000000000000000000000000000000000a": { "balance": "25000075" @@ -95,7 +95,7 @@ async fn test() { }, ], "score": { - "kind": "riskadjusted", + "kind": "riskAdjusted", "successProbability": 0.5, } }] diff --git a/crates/solvers/src/tests/naive/rounds_prices_in_favour_of_traders.rs b/crates/solvers/src/tests/naive/rounds_prices_in_favour_of_traders.rs index 0fc77ea3f2..398c342291 100644 --- a/crates/solvers/src/tests/naive/rounds_prices_in_favour_of_traders.rs +++ b/crates/solvers/src/tests/naive/rounds_prices_in_favour_of_traders.rs @@ -52,7 +52,7 @@ async fn test() { ], "liquidity": [ { - "kind": "constantproduct", + "kind": "constantProduct", "tokens": { "0x000000000000000000000000000000000000000a": { "balance": "1000000000000000000" @@ -109,7 +109,7 @@ async fn test() { }, ], "score": { - "kind": "riskadjusted", + "kind": "riskAdjusted", "successProbability": 0.5, } }] diff --git a/crates/solvers/src/tests/naive/swap_less_than_reserves.rs b/crates/solvers/src/tests/naive/swap_less_than_reserves.rs index 45d625036b..2f99aa30d0 100644 --- a/crates/solvers/src/tests/naive/swap_less_than_reserves.rs +++ b/crates/solvers/src/tests/naive/swap_less_than_reserves.rs @@ -50,7 +50,7 @@ async fn test() { ], "liquidity": [ { - "kind": "constantproduct", + "kind": "constantProduct", "tokens": { "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48": { "balance": "32275540" diff --git a/crates/solvers/src/tests/naive/without_pool.rs b/crates/solvers/src/tests/naive/without_pool.rs index fd0047afb7..39361b1766 100644 --- a/crates/solvers/src/tests/naive/without_pool.rs +++ b/crates/solvers/src/tests/naive/without_pool.rs @@ -45,7 +45,7 @@ async fn test() { ], "liquidity": [ { - "kind": "constantproduct", + "kind": "constantProduct", "tokens": { "0x000000000000000000000000000000000000000a": { "balance": "1000001000000000000000000" @@ -92,7 +92,7 @@ async fn test() { ], "interactions": [], "score": { - "kind": "riskadjusted", + "kind": "riskAdjusted", "successProbability": 0.5, } }]