From 3a4c447b0f0e98b942e5fea77c76f33e01865f84 Mon Sep 17 00:00:00 2001 From: telezhnaya Date: Mon, 27 May 2024 15:24:56 +0100 Subject: [PATCH] Add exchange id parameter --- src/config.rs | 3 +++ src/transaction/swap.rs | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/config.rs b/src/config.rs index c98934d..3161b2e 100644 --- a/src/config.rs +++ b/src/config.rs @@ -46,6 +46,9 @@ pub struct Opts { /// FT account id #[clap(long, env)] pub ft_account_id: AccountId, + /// Exchange account id + #[clap(long, env)] + pub exchange_id: AccountId, /// Pool id for swap command #[clap(long, env)] pub pool_id: u32, diff --git a/src/transaction/swap.rs b/src/transaction/swap.rs index 18c26a4..d2d7e2a 100644 --- a/src/transaction/swap.rs +++ b/src/transaction/swap.rs @@ -46,7 +46,7 @@ impl TransactionSample for Swap { Action::FunctionCall(Box::new(FunctionCallAction { method_name: "ft_transfer_call".to_string(), args: serde_json::json!( - {"msg": msg,"amount": "1000000000000000000000","receiver_id": "v2.ref-finance.near"}).to_string().into_bytes(), + {"msg": msg,"amount": "1000000000000000000000","receiver_id": opts.exchange_id}).to_string().into_bytes(), gas: 100_000_000_000_000, // 100 TeraGas deposit: 1, })),