Skip to content

Commit

Permalink
Add exchange id parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
telezhnaya committed May 27, 2024
1 parent d3a03ef commit 3a4c447
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/transaction/swap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
})),
Expand Down

0 comments on commit 3a4c447

Please sign in to comment.