From 86a636ca11b51100d70ec0997b8cf8da6caa814b Mon Sep 17 00:00:00 2001 From: Victor Faust <81014877+faust403@users.noreply.github.com> Date: Mon, 1 Jul 2024 13:36:57 +0200 Subject: [PATCH 1/3] Update README.md, .env.example and script.ts --- scripts/generate_activity_script/.env.example | 7 ++++++- scripts/generate_activity_script/README.md | 2 ++ scripts/generate_activity_script/src/script.ts | 3 +++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/scripts/generate_activity_script/.env.example b/scripts/generate_activity_script/.env.example index 3fc09bd2..ea5c3a9b 100644 --- a/scripts/generate_activity_script/.env.example +++ b/scripts/generate_activity_script/.env.example @@ -44,4 +44,9 @@ TARGET_DENOM = stake # IBC channel to send from neutron to remote chain IBC_CHANNEL_TO = channel-1003 # IBC channel to send from remote chain to neutron -IBC_CHANNEL_FROM = channel-11 \ No newline at end of file +IBC_CHANNEL_FROM = channel-11 + +# Gas price on Neutron chain (by default it's 0.05) +NEUTRON_GASPRICE = 0.05 +# Gas price on target chain (by default it's 0.05, but you can easily change it here) +TARGET_GASPRICE = 0.05 \ No newline at end of file diff --git a/scripts/generate_activity_script/README.md b/scripts/generate_activity_script/README.md index f5b2641c..d285cfe2 100644 --- a/scripts/generate_activity_script/README.md +++ b/scripts/generate_activity_script/README.md @@ -27,3 +27,5 @@ To manage script config, open _.env_ file - TARGET_DENOM = Base denom on remote chain - IBC_CHANNEL_TO = IBC channel to send from neutron to remote chain - IBC_CHANNEL_FROM = IBC channel to send from remote chain to neutron +- NEUTRON_GASPRICE = Gas price on Neutron chain +- Target_GASPRICE = Gas price on target chain diff --git a/scripts/generate_activity_script/src/script.ts b/scripts/generate_activity_script/src/script.ts index 797f7cb6..44611ac1 100644 --- a/scripts/generate_activity_script/src/script.ts +++ b/scripts/generate_activity_script/src/script.ts @@ -43,6 +43,9 @@ const UNBOND_PROB: number = parseFloat(process.env.UNBOND_PROB) || 0; const WITHDRAW_PROB: number = parseFloat(process.env.WITHDRAW_PROB) || 0; const PROCESS_LSM_PROB: number = parseFloat(process.env.PROCESS_LSM_PROB) || 0; +const TARGET_GASPRICE: number = parseFloat(process.env.TARGET_GASPRICE); +const NEUTRON_GASPRICE: number = parseFloat(process.env.NEUTRON_GASPRICE); + /* * Each of given probabilities should be in interval [0, 1] * According to given probabilities relevant actions will be choosed with appropriate probability From 2803c9bf3f4a1076cc18f8f36a5baa1917f3cc4e Mon Sep 17 00:00:00 2001 From: Victor Faust <81014877+faust403@users.noreply.github.com> Date: Mon, 1 Jul 2024 13:38:30 +0200 Subject: [PATCH 2/3] Update gas price in script --- scripts/generate_activity_script/src/script.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/generate_activity_script/src/script.ts b/scripts/generate_activity_script/src/script.ts index 44611ac1..5e772ab2 100644 --- a/scripts/generate_activity_script/src/script.ts +++ b/scripts/generate_activity_script/src/script.ts @@ -832,7 +832,7 @@ async function main() { NEUTRON_NODE_ADDRESS, neutronWallet.mainWallet, { - gasPrice: GasPrice.fromString("0.75untrn"), + gasPrice: GasPrice.fromString(`${NEUTRON_GASPRICE}untrn`), } ); neutronWallet.clientSG = await SigningStargateClient.connectWithSigner( @@ -847,7 +847,7 @@ async function main() { ["/ibc.applications.transfer.v1.MsgTransfer", MsgTransfer], ]) ), - gasPrice: GasPrice.fromString("0.75untrn"), + gasPrice: GasPrice.fromString(`${NEUTRON_GASPRICE}untrn`), } ); neutronWallet.mainAccounts = await neutronWallet.mainWallet.getAccounts(); @@ -863,7 +863,7 @@ async function main() { TARGET_NODE_ADDRESS, targetWallet.mainWallet, { - gasPrice: GasPrice.fromString(`0.75${TARGET_DENOM}`), + gasPrice: GasPrice.fromString(`${TARGET_GASPRICE}${TARGET_DENOM}`), } ); targetWallet.clientSG = await SigningStargateClient.connectWithSigner( @@ -884,7 +884,7 @@ async function main() { ["/cosmos.staking.v1beta1.MsgDelegate", MsgDelegate], ]) ), - gasPrice: GasPrice.fromString(`0.75${TARGET_DENOM}`), + gasPrice: GasPrice.fromString(`${TARGET_GASPRICE}${TARGET_DENOM}`), } ); targetWallet.mainAccounts = await targetWallet.mainWallet.getAccounts(); From a76f3d0a2240f93428b986bd3379eb9cf572edc6 Mon Sep 17 00:00:00 2001 From: Victor Faust <81014877+faust403@users.noreply.github.com> Date: Mon, 1 Jul 2024 13:47:19 +0200 Subject: [PATCH 3/3] Update README.md --- scripts/generate_activity_script/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/generate_activity_script/README.md b/scripts/generate_activity_script/README.md index d285cfe2..e26709e5 100644 --- a/scripts/generate_activity_script/README.md +++ b/scripts/generate_activity_script/README.md @@ -28,4 +28,4 @@ To manage script config, open _.env_ file - IBC_CHANNEL_TO = IBC channel to send from neutron to remote chain - IBC_CHANNEL_FROM = IBC channel to send from remote chain to neutron - NEUTRON_GASPRICE = Gas price on Neutron chain -- Target_GASPRICE = Gas price on target chain +- TARGET_GASPRICE = Gas price on target chain