From 1882c33dc380993fb95583edfca33295d9785b35 Mon Sep 17 00:00:00 2001 From: sampocs Date: Thu, 21 Mar 2024 17:59:33 -0500 Subject: [PATCH] added rebate simulated trade script (#1156) --- CHANGELOG.md | 4 ++-- .../{trade.sh => trade_authz.sh} | 0 .../community-pool-staking/trade_simulated.sh | 12 ++++++++++++ 3 files changed, 14 insertions(+), 2 deletions(-) rename dockernet/scripts/community-pool-staking/{trade.sh => trade_authz.sh} (100%) create mode 100644 dockernet/scripts/community-pool-staking/trade_simulated.sh diff --git a/CHANGELOG.md b/CHANGELOG.md index dd1973766a..e495fc72de 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -46,14 +46,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### On-Chain changes 1. v20 upgrade handler scaffolding ([#1148](https://github.com/Stride-Labs/stride/pull/1148)) -2. Upgraded ICS to 4.0 ([#1153](https://github.com/Stride-Labs/stride/pull/1153)) +2. Upgraded ICS to 4.0 ([#1153](https://github.com/Stride-Labs/stride/pull/1153),[#1157](https://github.com/Stride-Labs/stride/pull/1157)) 3. add community pool rebate feature ([#1135](https://github.com/Stride-Labs/stride/pull/1135)) 4. v20 Import Paths ([#1155](https://github.com/Stride-Labs/stride/pull/1155)) ### Off-Chain changes 1. fixing init_chain script to not clobber new params ([#1139](https://github.com/Stride-Labs/stride/pull/1139)) 2. added wasm to cosmovisor upgrade image ([#1158](https://github.com/Stride-Labs/stride/pull/1158)) - +3. added dockernet scripts to test rebate ([#1156](https://github.com/Stride-Labs/stride/pull/1156)) ## [v19.0.0](https://github.com/Stride-Labs/stride/releases/tag/v19.0.0) - 2024-03-07 diff --git a/dockernet/scripts/community-pool-staking/trade.sh b/dockernet/scripts/community-pool-staking/trade_authz.sh similarity index 100% rename from dockernet/scripts/community-pool-staking/trade.sh rename to dockernet/scripts/community-pool-staking/trade_authz.sh diff --git a/dockernet/scripts/community-pool-staking/trade_simulated.sh b/dockernet/scripts/community-pool-staking/trade_simulated.sh new file mode 100644 index 0000000000..064b28cd62 --- /dev/null +++ b/dockernet/scripts/community-pool-staking/trade_simulated.sh @@ -0,0 +1,12 @@ +#!/bin/bash +set -eu +SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) +source ${SCRIPT_DIR}/../../config.sh + +TRADE_AMOUNT=997500 + +# Simulates a trade by sending the native token to the trade account +# We'll send the amount that should have been sent from the ICA, which has the rebate excluded +trade_account=$($STRIDE_MAIN_CMD q stakeibc list-trade-routes | grep trade_account -A 3 | grep address | awk '{print $2}') +host_denom_on_trade=$($STRIDE_MAIN_CMD q stakeibc list-trade-routes | grep host_denom_on_trade | awk '{print $2}') +$OSMO_MAIN_CMD tx bank send ${OSMO_VAL_PREFIX}1 $trade_account ${TRADE_AMOUNT}${host_denom_on_trade} --from ${OSMO_VAL_PREFIX}1 -y \ No newline at end of file