From 6997f99041f3c0e84fb26a69c6e52a471d92b6f8 Mon Sep 17 00:00:00 2001 From: GiMa-Maya <128942712+GiMa-Maya@users.noreply.github.com> Date: Mon, 13 Jan 2025 14:11:58 +0100 Subject: [PATCH 1/4] Add Base --- src/THORChain/Swap.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/THORChain/Swap.cpp b/src/THORChain/Swap.cpp index 260337675e3..8272b9913a0 100644 --- a/src/THORChain/Swap.cpp +++ b/src/THORChain/Swap.cpp @@ -63,6 +63,8 @@ TWCoinType chainCoinType(Chain chain) { return TWCoinTypeCosmos; case Chain::BSC: return TWCoinTypeSmartChain; + case Chain::BASE: + return TWCoinTypeBase; case Chain::THOR: default: return TWCoinTypeTHORChain; @@ -89,6 +91,8 @@ std::string chainName(Chain chain) { return "LTC"; case Chain::ATOM: return "GAIA"; + case Chain::BASE: + return "BASE"; case Chain::THOR: default: return "THOR"; @@ -128,6 +132,7 @@ SwapBundled SwapBuilder::build(bool shortened) { case Chain::ETH: case Chain::AVAX: case Chain::BSC: + case Chain::BASE: return buildEth(fromAmountNum, memo); } default: From e8197321026a5fe382847262ec14c6e0423bdeb1 Mon Sep 17 00:00:00 2001 From: GiMa-Maya <128942712+GiMa-Maya@users.noreply.github.com> Date: Mon, 13 Jan 2025 14:12:51 +0100 Subject: [PATCH 2/4] Add Base to Swap.h --- src/THORChain/Swap.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/THORChain/Swap.h b/src/THORChain/Swap.h index 94f35c5b8a3..eaab011f130 100644 --- a/src/THORChain/Swap.h +++ b/src/THORChain/Swap.h @@ -27,6 +27,7 @@ enum Chain { ATOM = 7, AVAX = 8, BSC = 9, + BASE = 10, }; using SwapErrorCode = int; From 80b7acbc04ffe73c94a46c6c9116a67063921d0f Mon Sep 17 00:00:00 2001 From: GiMa-Maya <128942712+GiMa-Maya@users.noreply.github.com> Date: Mon, 13 Jan 2025 14:13:44 +0100 Subject: [PATCH 3/4] Add Base to TWSwap.cpp --- src/THORChain/TWSwap.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/THORChain/TWSwap.cpp b/src/THORChain/TWSwap.cpp index 0cdab651fd3..7234a473a59 100644 --- a/src/THORChain/TWSwap.cpp +++ b/src/THORChain/TWSwap.cpp @@ -71,7 +71,8 @@ TWData* _Nonnull TWTHORChainSwapBuildSwap(TWData* _Nonnull input) { case THORChainSwap::Proto::ETH: case THORChainSwap::Proto::BSC: - case THORChainSwap::Proto::AVAX: { + case THORChainSwap::Proto::AVAX: + case THORChainSwap::Proto::BASE: { Ethereum::Proto::SigningInput ethInput; if (!ethInput.ParseFromArray(txInput.data(), static_cast(txInput.size()))) { outputProto.mutable_error()->set_code(THORChainSwap::Proto::ErrorCode::Error_Input_proto_deserialization); From 403d313dbd43aa6eee797787b490414f3eb6dff5 Mon Sep 17 00:00:00 2001 From: GiMa-Maya <128942712+GiMa-Maya@users.noreply.github.com> Date: Mon, 13 Jan 2025 14:14:18 +0100 Subject: [PATCH 4/4] Update THORChainSwap.proto --- src/proto/THORChainSwap.proto | 1 + 1 file changed, 1 insertion(+) diff --git a/src/proto/THORChainSwap.proto b/src/proto/THORChainSwap.proto index 69b6d257e16..6e3f20ff6ce 100644 --- a/src/proto/THORChainSwap.proto +++ b/src/proto/THORChainSwap.proto @@ -20,6 +20,7 @@ enum Chain { ATOM = 7; AVAX = 8; BSC = 9; + BASE = 10; } // Predefined error codes