From 7314b47b8c826af4f73da03a7b30c1e3e3f41f25 Mon Sep 17 00:00:00 2001 From: deuszx Date: Mon, 11 Sep 2023 10:29:12 +0200 Subject: [PATCH] Rename uniswap_v2 to amm. --- Cargo.lock | 60 +++++++++---------- Cargo.toml | 4 +- Makefile | 2 +- .../contracts/factory/Cargo.toml | 4 +- {uniswap-v2 => amm}/contracts/factory/lib.rs | 27 ++++----- {uniswap-v2 => amm}/contracts/pair/Cargo.toml | 10 +--- {uniswap-v2 => amm}/contracts/pair/lib.rs | 34 +++++------ .../contracts/psp22/Cargo.toml | 0 {uniswap-v2 => amm}/contracts/psp22/lib.rs | 0 .../contracts/router/Cargo.toml | 4 +- {uniswap-v2 => amm}/contracts/router/lib.rs | 20 +++---- .../contracts/wnative/Cargo.toml | 4 +- {uniswap-v2 => amm}/contracts/wnative/lib.rs | 8 +-- {uniswap-v2 => amm}/logics/Cargo.lock | 0 {uniswap-v2 => amm}/logics/Cargo.toml | 4 +- {uniswap-v2 => amm}/logics/helpers/helper.rs | 0 {uniswap-v2 => amm}/logics/helpers/math.rs | 0 {uniswap-v2 => amm}/logics/helpers/mod.rs | 0 .../logics/helpers/transfer_helper.rs | 0 .../logics/impls/factory/data.rs | 0 .../logics/impls/factory/factory.rs | 0 .../logics/impls/factory/mod.rs | 0 {uniswap-v2 => amm}/logics/impls/mod.rs | 0 {uniswap-v2 => amm}/logics/impls/pair/data.rs | 0 {uniswap-v2 => amm}/logics/impls/pair/mod.rs | 0 {uniswap-v2 => amm}/logics/impls/pair/pair.rs | 0 .../logics/impls/router/data.rs | 0 .../logics/impls/router/mod.rs | 0 .../logics/impls/router/router.rs | 0 {uniswap-v2 => amm}/logics/lib.rs | 0 {uniswap-v2 => amm}/logics/traits/factory.rs | 0 {uniswap-v2 => amm}/logics/traits/mod.rs | 0 {uniswap-v2 => amm}/logics/traits/pair.rs | 0 {uniswap-v2 => amm}/logics/traits/router.rs | 0 {uniswap-v2 => amm}/logics/traits/types.rs | 0 {uniswap-v2 => amm}/logics/traits/wnative.rs | 0 e2e-tests/Cargo.toml | 6 +- e2e-tests/src/test/router.rs | 2 +- e2e-tests/src/test/setup.rs | 2 +- farm/contracts/Cargo.toml | 2 +- 40 files changed, 93 insertions(+), 100 deletions(-) rename {uniswap-v2 => amm}/contracts/factory/Cargo.toml (91%) rename {uniswap-v2 => amm}/contracts/factory/lib.rs (97%) rename {uniswap-v2 => amm}/contracts/pair/Cargo.toml (85%) rename {uniswap-v2 => amm}/contracts/pair/lib.rs (99%) rename {uniswap-v2 => amm}/contracts/psp22/Cargo.toml (100%) rename {uniswap-v2 => amm}/contracts/psp22/lib.rs (100%) rename {uniswap-v2 => amm}/contracts/router/Cargo.toml (91%) rename {uniswap-v2 => amm}/contracts/router/lib.rs (99%) rename {uniswap-v2 => amm}/contracts/wnative/Cargo.toml (90%) rename {uniswap-v2 => amm}/contracts/wnative/lib.rs (99%) rename {uniswap-v2 => amm}/logics/Cargo.lock (100%) rename {uniswap-v2 => amm}/logics/Cargo.toml (96%) rename {uniswap-v2 => amm}/logics/helpers/helper.rs (100%) rename {uniswap-v2 => amm}/logics/helpers/math.rs (100%) rename {uniswap-v2 => amm}/logics/helpers/mod.rs (100%) rename {uniswap-v2 => amm}/logics/helpers/transfer_helper.rs (100%) rename {uniswap-v2 => amm}/logics/impls/factory/data.rs (100%) rename {uniswap-v2 => amm}/logics/impls/factory/factory.rs (100%) rename {uniswap-v2 => amm}/logics/impls/factory/mod.rs (100%) rename {uniswap-v2 => amm}/logics/impls/mod.rs (100%) rename {uniswap-v2 => amm}/logics/impls/pair/data.rs (100%) rename {uniswap-v2 => amm}/logics/impls/pair/mod.rs (100%) rename {uniswap-v2 => amm}/logics/impls/pair/pair.rs (100%) rename {uniswap-v2 => amm}/logics/impls/router/data.rs (100%) rename {uniswap-v2 => amm}/logics/impls/router/mod.rs (100%) rename {uniswap-v2 => amm}/logics/impls/router/router.rs (100%) rename {uniswap-v2 => amm}/logics/lib.rs (100%) rename {uniswap-v2 => amm}/logics/traits/factory.rs (100%) rename {uniswap-v2 => amm}/logics/traits/mod.rs (100%) rename {uniswap-v2 => amm}/logics/traits/pair.rs (100%) rename {uniswap-v2 => amm}/logics/traits/router.rs (100%) rename {uniswap-v2 => amm}/logics/traits/types.rs (100%) rename {uniswap-v2 => amm}/logics/traits/wnative.rs (100%) diff --git a/Cargo.lock b/Cargo.lock index 75782782..0b9f767f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -11,6 +11,32 @@ dependencies = [ "memchr", ] +[[package]] +name = "amm" +version = "0.2.0" +dependencies = [ + "ink", + "ink_metadata", + "openbrush 3.1.1", + "parity-scale-codec", + "primitive-types 0.11.1", + "scale-info", + "sp-arithmetic", +] + +[[package]] +name = "amm_farm" +version = "0.1.0" +dependencies = [ + "ink", + "openbrush 3.0.0", + "parity-scale-codec", + "primitive-types 0.12.1", + "psp22-traits", + "scale-info", + "sp-arithmetic", +] + [[package]] name = "array-init" version = "2.1.0" @@ -309,12 +335,12 @@ dependencies = [ name = "factory_contract" version = "0.1.0" dependencies = [ + "amm", "ink", "openbrush 3.1.1", "pair_contract", "parity-scale-codec", "scale-info", - "uniswap_v2", ] [[package]] @@ -935,13 +961,13 @@ dependencies = [ name = "pair_contract" version = "0.1.0" dependencies = [ + "amm", "ink", "openbrush 3.1.1", "parity-scale-codec", "primitive-types 0.11.1", "scale-info", "sp-arithmetic", - "uniswap_v2", ] [[package]] @@ -1138,12 +1164,12 @@ checksum = "fc874b127765f014d792f16763a81245ab80500e2ad921ed4ee9e82481ee08fe" name = "router_contract" version = "0.1.0" dependencies = [ + "amm", "ink", "openbrush 3.1.1", "parity-scale-codec", "primitive-types 0.11.1", "scale-info", - "uniswap_v2", ] [[package]] @@ -1542,32 +1568,6 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" -[[package]] -name = "uniswap_v2" -version = "0.2.0" -dependencies = [ - "ink", - "ink_metadata", - "openbrush 3.1.1", - "parity-scale-codec", - "primitive-types 0.11.1", - "scale-info", - "sp-arithmetic", -] - -[[package]] -name = "uniswap_v2_farm" -version = "0.1.0" -dependencies = [ - "ink", - "openbrush 3.0.0", - "parity-scale-codec", - "primitive-types 0.12.1", - "psp22-traits", - "scale-info", - "sp-arithmetic", -] - [[package]] name = "unwrap" version = "1.2.1" @@ -1696,11 +1696,11 @@ dependencies = [ name = "wnative_contract" version = "0.1.0" dependencies = [ + "amm", "ink", "openbrush 3.1.1", "parity-scale-codec", "scale-info", - "uniswap_v2", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 80dd66ae..dd3af93a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,4 +1,4 @@ [workspace] -members = ["uniswap-v2/contracts/**", "farm/contracts"] +members = ["amm/contracts/**", "farm/contracts"] -exclude = ["e2e-tests", "uniswap-v2/logics"] +exclude = ["e2e-tests", "amm/logics"] diff --git a/Makefile b/Makefile index 44042106..cb79c8d7 100644 --- a/Makefile +++ b/Makefile @@ -34,7 +34,7 @@ build-node-arm64: build-node-x86_64: @docker buildx build --pull --platform linux/amd64 -t aleph-onenode-chain-x86_64 --load docker -UNI_CONTRACTS = ./uniswap-v2/contracts +UNI_CONTRACTS = ./amm/contracts UNI_CONTRACTS_PATHS := $(shell find $(UNI_CONTRACTS) -mindepth 1 -maxdepth 1 -type d) FARM_CONTRACTS = ./farm diff --git a/uniswap-v2/contracts/factory/Cargo.toml b/amm/contracts/factory/Cargo.toml similarity index 91% rename from uniswap-v2/contracts/factory/Cargo.toml rename to amm/contracts/factory/Cargo.toml index ccf32e05..7e3ca381 100644 --- a/uniswap-v2/contracts/factory/Cargo.toml +++ b/amm/contracts/factory/Cargo.toml @@ -18,7 +18,7 @@ pair_contract = { path = "../pair", default-features = false, features = [ "ink-as-dependency", ] } openbrush = { git = "https://github.com/727-Ventures/openbrush-contracts", tag = "3.1.1", default-features = false } -uniswap_v2 = { path = "../../logics", default-features = false } +amm = { path = "../../logics", default-features = false } [lib] name = "factory_contract" @@ -31,7 +31,7 @@ std = [ "scale/std", "scale-info/std", "openbrush/std", - "uniswap_v2/std", + "amm/std", "pair_contract/std", ] ink-as-dependency = [] diff --git a/uniswap-v2/contracts/factory/lib.rs b/amm/contracts/factory/lib.rs similarity index 97% rename from uniswap-v2/contracts/factory/lib.rs rename to amm/contracts/factory/lib.rs index d8e5cb3d..3bc07bd2 100644 --- a/uniswap-v2/contracts/factory/lib.rs +++ b/amm/contracts/factory/lib.rs @@ -3,6 +3,17 @@ #[openbrush::contract] pub mod factory { + use amm::{ + ensure, + impls::factory::{ + factory::{ + only_fee_setter, + Internal, + }, + *, + }, + traits::factory::*, + }; use ink::{ codegen::{ EmitEvent, @@ -19,17 +30,6 @@ pub mod factory { }, }; use pair_contract::pair::PairContractRef; - use uniswap_v2::{ - ensure, - impls::factory::{ - factory::{ - only_fee_setter, - Internal, - }, - *, - }, - traits::factory::*, - }; #[ink(event)] pub struct PairCreated { @@ -202,10 +202,7 @@ pub mod factory { fn initialize_works() { let accounts = default_accounts::(); let factory = FactoryContract::new(accounts.alice, Hash::default()); - assert_eq!( - factory.factory.fee_to, - uniswap_v2::helpers::ZERO_ADDRESS.into() - ); + assert_eq!(factory.factory.fee_to, amm::helpers::ZERO_ADDRESS.into()); } } } diff --git a/uniswap-v2/contracts/pair/Cargo.toml b/amm/contracts/pair/Cargo.toml similarity index 85% rename from uniswap-v2/contracts/pair/Cargo.toml rename to amm/contracts/pair/Cargo.toml index 0ed7af31..6474df82 100644 --- a/uniswap-v2/contracts/pair/Cargo.toml +++ b/amm/contracts/pair/Cargo.toml @@ -18,7 +18,7 @@ openbrush = { git = "https://github.com/727-Ventures/openbrush-contracts", tag = "psp22", "reentrancy_guard", ] } -uniswap_v2 = { path = "../../logics", default-features = false } +amm = { path = "../../logics", default-features = false } primitive-types = { version = "0.11.1", default-features = false, features = [ "codec", ] } @@ -31,13 +31,7 @@ doctest = false [features] default = ["std"] -std = [ - "ink/std", - "scale/std", - "scale-info/std", - "openbrush/std", - "uniswap_v2/std", -] +std = ["ink/std", "scale/std", "scale-info/std", "openbrush/std", "amm/std"] ink-as-dependency = [] [profile.dev] diff --git a/uniswap-v2/contracts/pair/lib.rs b/amm/contracts/pair/lib.rs similarity index 99% rename from uniswap-v2/contracts/pair/lib.rs rename to amm/contracts/pair/lib.rs index eef9e5ff..a4203cb3 100644 --- a/uniswap-v2/contracts/pair/lib.rs +++ b/amm/contracts/pair/lib.rs @@ -3,23 +3,7 @@ #[openbrush::contract] pub mod pair { - use ink::{ - codegen::{ - EmitEvent, - Env, - }, - prelude::vec::Vec, - }; - use openbrush::{ - contracts::{ - psp22::*, - reentrancy_guard::*, - }, - modifiers, - traits::Storage, - }; - use sp_arithmetic::traits::IntegerSquareRoot; - use uniswap_v2::{ + use amm::{ ensure, helpers::{ math::casted_mul, @@ -38,6 +22,22 @@ pub mod pair { types::WrappedU256, }, }; + use ink::{ + codegen::{ + EmitEvent, + Env, + }, + prelude::vec::Vec, + }; + use openbrush::{ + contracts::{ + psp22::*, + reentrancy_guard::*, + }, + modifiers, + traits::Storage, + }; + use sp_arithmetic::traits::IntegerSquareRoot; #[ink(event)] pub struct Mint { diff --git a/uniswap-v2/contracts/psp22/Cargo.toml b/amm/contracts/psp22/Cargo.toml similarity index 100% rename from uniswap-v2/contracts/psp22/Cargo.toml rename to amm/contracts/psp22/Cargo.toml diff --git a/uniswap-v2/contracts/psp22/lib.rs b/amm/contracts/psp22/lib.rs similarity index 100% rename from uniswap-v2/contracts/psp22/lib.rs rename to amm/contracts/psp22/lib.rs diff --git a/uniswap-v2/contracts/router/Cargo.toml b/amm/contracts/router/Cargo.toml similarity index 91% rename from uniswap-v2/contracts/router/Cargo.toml rename to amm/contracts/router/Cargo.toml index 34aec23e..5f51e8de 100755 --- a/uniswap-v2/contracts/router/Cargo.toml +++ b/amm/contracts/router/Cargo.toml @@ -20,7 +20,7 @@ scale-info = { version = "2.3", default-features = false, features = [ openbrush = { git = "https://github.com/727-Ventures/openbrush-contracts", tag = "3.1.1", default-features = false, features = [ "psp22", ] } -uniswap_v2 = { path = "../../logics", default-features = false } +amm = { path = "../../logics", default-features = false } [lib] name = "router_contract" @@ -34,7 +34,7 @@ std = [ "scale-info", "scale-info/std", "openbrush/std", - "uniswap_v2/std", + "amm/std", ] ink-as-dependency = [] diff --git a/uniswap-v2/contracts/router/lib.rs b/amm/contracts/router/lib.rs similarity index 99% rename from uniswap-v2/contracts/router/lib.rs rename to amm/contracts/router/lib.rs index 7893e71b..fa319419 100755 --- a/uniswap-v2/contracts/router/lib.rs +++ b/amm/contracts/router/lib.rs @@ -3,16 +3,7 @@ #[openbrush::contract] pub mod router { - use ink::{ - codegen::Env, - env::CallFlags, - prelude::vec::Vec, - }; - use openbrush::{ - modifiers, - traits::Storage, - }; - use uniswap_v2::{ + use amm::{ ensure, helpers::{ helper::*, @@ -30,6 +21,15 @@ pub mod router { router::*, }, }; + use ink::{ + codegen::Env, + env::CallFlags, + prelude::vec::Vec, + }; + use openbrush::{ + modifiers, + traits::Storage, + }; #[ink(storage)] #[derive(Default, Storage)] diff --git a/uniswap-v2/contracts/wnative/Cargo.toml b/amm/contracts/wnative/Cargo.toml similarity index 90% rename from uniswap-v2/contracts/wnative/Cargo.toml rename to amm/contracts/wnative/Cargo.toml index e03e48a1..4bf937ff 100644 --- a/uniswap-v2/contracts/wnative/Cargo.toml +++ b/amm/contracts/wnative/Cargo.toml @@ -17,7 +17,7 @@ scale-info = { version = "2.3", default-features = false, features = [ openbrush = { git = "https://github.com/727-Ventures/openbrush-contracts", tag = "3.1.1", default-features = false, features = [ "psp22", ] } -uniswap_v2 = { path = "../../logics", default-features = false } +amm = { path = "../../logics", default-features = false } [lib] name = "wnative_contract" @@ -31,7 +31,7 @@ std = [ "scale-info", "scale-info/std", "openbrush/std", - "uniswap_v2/std", + "amm/std", ] ink-as-dependency = [] diff --git a/uniswap-v2/contracts/wnative/lib.rs b/amm/contracts/wnative/lib.rs similarity index 99% rename from uniswap-v2/contracts/wnative/lib.rs rename to amm/contracts/wnative/lib.rs index db4e3a92..fa6f5dce 100644 --- a/uniswap-v2/contracts/wnative/lib.rs +++ b/amm/contracts/wnative/lib.rs @@ -3,6 +3,10 @@ #[openbrush::contract] pub mod wnative { + use amm::traits::wnative::{ + wnative_external, + Wnative, + }; use ink::{ codegen::{ EmitEvent, @@ -17,10 +21,6 @@ pub mod wnative { String, }, }; - use uniswap_v2::traits::wnative::{ - wnative_external, - Wnative, - }; #[ink(event)] pub struct Transfer { diff --git a/uniswap-v2/logics/Cargo.lock b/amm/logics/Cargo.lock similarity index 100% rename from uniswap-v2/logics/Cargo.lock rename to amm/logics/Cargo.lock diff --git a/uniswap-v2/logics/Cargo.toml b/amm/logics/Cargo.toml similarity index 96% rename from uniswap-v2/logics/Cargo.toml rename to amm/logics/Cargo.toml index 5a429162..7a70b223 100644 --- a/uniswap-v2/logics/Cargo.toml +++ b/amm/logics/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "uniswap_v2" +name = "amm" version = "0.2.0" authors = ["Cardinal Cryptography"] edition = "2021" @@ -30,7 +30,7 @@ curve25519-dalek = { version = "4.0.0-rc.2", features = ["digest"] } sha2 = "0.10.6" [lib] -name = "uniswap_v2" +name = "amm" path = "lib.rs" crate-type = ["rlib"] diff --git a/uniswap-v2/logics/helpers/helper.rs b/amm/logics/helpers/helper.rs similarity index 100% rename from uniswap-v2/logics/helpers/helper.rs rename to amm/logics/helpers/helper.rs diff --git a/uniswap-v2/logics/helpers/math.rs b/amm/logics/helpers/math.rs similarity index 100% rename from uniswap-v2/logics/helpers/math.rs rename to amm/logics/helpers/math.rs diff --git a/uniswap-v2/logics/helpers/mod.rs b/amm/logics/helpers/mod.rs similarity index 100% rename from uniswap-v2/logics/helpers/mod.rs rename to amm/logics/helpers/mod.rs diff --git a/uniswap-v2/logics/helpers/transfer_helper.rs b/amm/logics/helpers/transfer_helper.rs similarity index 100% rename from uniswap-v2/logics/helpers/transfer_helper.rs rename to amm/logics/helpers/transfer_helper.rs diff --git a/uniswap-v2/logics/impls/factory/data.rs b/amm/logics/impls/factory/data.rs similarity index 100% rename from uniswap-v2/logics/impls/factory/data.rs rename to amm/logics/impls/factory/data.rs diff --git a/uniswap-v2/logics/impls/factory/factory.rs b/amm/logics/impls/factory/factory.rs similarity index 100% rename from uniswap-v2/logics/impls/factory/factory.rs rename to amm/logics/impls/factory/factory.rs diff --git a/uniswap-v2/logics/impls/factory/mod.rs b/amm/logics/impls/factory/mod.rs similarity index 100% rename from uniswap-v2/logics/impls/factory/mod.rs rename to amm/logics/impls/factory/mod.rs diff --git a/uniswap-v2/logics/impls/mod.rs b/amm/logics/impls/mod.rs similarity index 100% rename from uniswap-v2/logics/impls/mod.rs rename to amm/logics/impls/mod.rs diff --git a/uniswap-v2/logics/impls/pair/data.rs b/amm/logics/impls/pair/data.rs similarity index 100% rename from uniswap-v2/logics/impls/pair/data.rs rename to amm/logics/impls/pair/data.rs diff --git a/uniswap-v2/logics/impls/pair/mod.rs b/amm/logics/impls/pair/mod.rs similarity index 100% rename from uniswap-v2/logics/impls/pair/mod.rs rename to amm/logics/impls/pair/mod.rs diff --git a/uniswap-v2/logics/impls/pair/pair.rs b/amm/logics/impls/pair/pair.rs similarity index 100% rename from uniswap-v2/logics/impls/pair/pair.rs rename to amm/logics/impls/pair/pair.rs diff --git a/uniswap-v2/logics/impls/router/data.rs b/amm/logics/impls/router/data.rs similarity index 100% rename from uniswap-v2/logics/impls/router/data.rs rename to amm/logics/impls/router/data.rs diff --git a/uniswap-v2/logics/impls/router/mod.rs b/amm/logics/impls/router/mod.rs similarity index 100% rename from uniswap-v2/logics/impls/router/mod.rs rename to amm/logics/impls/router/mod.rs diff --git a/uniswap-v2/logics/impls/router/router.rs b/amm/logics/impls/router/router.rs similarity index 100% rename from uniswap-v2/logics/impls/router/router.rs rename to amm/logics/impls/router/router.rs diff --git a/uniswap-v2/logics/lib.rs b/amm/logics/lib.rs similarity index 100% rename from uniswap-v2/logics/lib.rs rename to amm/logics/lib.rs diff --git a/uniswap-v2/logics/traits/factory.rs b/amm/logics/traits/factory.rs similarity index 100% rename from uniswap-v2/logics/traits/factory.rs rename to amm/logics/traits/factory.rs diff --git a/uniswap-v2/logics/traits/mod.rs b/amm/logics/traits/mod.rs similarity index 100% rename from uniswap-v2/logics/traits/mod.rs rename to amm/logics/traits/mod.rs diff --git a/uniswap-v2/logics/traits/pair.rs b/amm/logics/traits/pair.rs similarity index 100% rename from uniswap-v2/logics/traits/pair.rs rename to amm/logics/traits/pair.rs diff --git a/uniswap-v2/logics/traits/router.rs b/amm/logics/traits/router.rs similarity index 100% rename from uniswap-v2/logics/traits/router.rs rename to amm/logics/traits/router.rs diff --git a/uniswap-v2/logics/traits/types.rs b/amm/logics/traits/types.rs similarity index 100% rename from uniswap-v2/logics/traits/types.rs rename to amm/logics/traits/types.rs diff --git a/uniswap-v2/logics/traits/wnative.rs b/amm/logics/traits/wnative.rs similarity index 100% rename from uniswap-v2/logics/traits/wnative.rs rename to amm/logics/traits/wnative.rs diff --git a/e2e-tests/Cargo.toml b/e2e-tests/Cargo.toml index f02b7ed7..35791fa9 100644 --- a/e2e-tests/Cargo.toml +++ b/e2e-tests/Cargo.toml @@ -10,14 +10,16 @@ async-trait = "0.1.68" assert2 = "0.3.10" env_logger = "0.10.0" rand = "0.8.5" -scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive"] } +scale = { package = "parity-scale-codec", version = "3", default-features = false, features = [ + "derive", +] } tokio = { version = "1.28.2", features = ["parking_lot", "sync"] } aleph_client = "3.0.0" ink_primitives = "4.2.1" ink-wrapper-types = "0.5.0" -uniswap_v2 = {path = "../uniswap-v2/logics" } +amm = { path = "../amm/logics" } [lib] doctest = false diff --git a/e2e-tests/src/test/router.rs b/e2e-tests/src/test/router.rs index f7e6cfb9..c4153a19 100644 --- a/e2e-tests/src/test/router.rs +++ b/e2e-tests/src/test/router.rs @@ -15,13 +15,13 @@ use aleph_client::{ Balance, SignedConnection, }; +use amm::impls::pair::pair::MINIMUM_LIQUIDITY; use ink_wrapper_types::{ util::ToAccountId, Connection, SignedConnection as _, UploadConnection, }; -use uniswap_v2::impls::pair::pair::MINIMUM_LIQUIDITY; use crate::{ factory_contract, diff --git a/e2e-tests/src/test/setup.rs b/e2e-tests/src/test/setup.rs index eb95a271..32bcb5bc 100644 --- a/e2e-tests/src/test/setup.rs +++ b/e2e-tests/src/test/setup.rs @@ -21,7 +21,7 @@ use aleph_client::{ TxStatus, }; -pub use uniswap_v2::helpers::ZERO_ADDRESS; +pub use amm::helpers::ZERO_ADDRESS; pub const DEFAULT_NODE_ADDRESS: &str = "ws://127.0.0.1:9944"; pub const WEALTHY_SEED: &str = "//Alice"; diff --git a/farm/contracts/Cargo.toml b/farm/contracts/Cargo.toml index 64cf7c72..3cf40ad3 100644 --- a/farm/contracts/Cargo.toml +++ b/farm/contracts/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "uniswap_v2_farm" +name = "amm_farm" version = "0.1.0" authors = ["Cardinal Cryptography"] edition = "2021"