Skip to content

Commit

Permalink
feat: update osmosis setup
Browse files Browse the repository at this point in the history
  • Loading branch information
dtkhanh-smartosc committed May 6, 2024
1 parent ef9ba7e commit 57ed49c
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 2 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,3 @@


cardano/gateway/deployment
chains/osmosis
1 change: 1 addition & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ cd ${SCRIPT_DIR}/cosmos && docker compose build
cd ${SCRIPT_DIR}/relayer && docker compose build

# Build osmosis
git submodule update --remote --merge
cd ${SCRIPT_DIR}/chains/osmosis && make localnet-init

76 changes: 76 additions & 0 deletions osmosis.patch
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
diff --git a/Dockerfile b/Dockerfile
index 7dbf949ec..cb908e945 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -66,8 +66,8 @@ ENV HOME /osmosis
WORKDIR $HOME

EXPOSE 26656
-EXPOSE 26657
-EXPOSE 1317
+EXPOSE 26658
+EXPOSE 1318
# Note: uncomment the line below if you need pprof in localosmosis
# We disable it by default in out main Dockerfile for security reasons
# EXPOSE 6060
diff --git a/cosmwasm/Cargo.lock b/cosmwasm/Cargo.lock
index f87a7fcbf..ca4ded98c 100644
--- a/cosmwasm/Cargo.lock
Expand Down Expand Up @@ -9356,3 +9371,64 @@ index 6ee785612..000000000
- assert_eq!(merge_json(r#"{}"#, r#"{"a": 1}"#).unwrap(), r#"{"a":1}"#);
- }
-}
diff --git a/tests/localosmosis/docker-compose.yml b/tests/localosmosis/docker-compose.yml
index 56cf57821..f80443a64 100644
--- a/tests/localosmosis/docker-compose.yml
+++ b/tests/localosmosis/docker-compose.yml
@@ -23,8 +23,8 @@ services:
command:
- $STATE
ports:
- - 26657:26657
- - 1317:1317
+ - 26658:26657
+ - 1318:1317
- 9090:9090
- 9091:9091
- 6060:6060
diff --git a/tests/localosmosis/scripts/setup.sh b/tests/localosmosis/scripts/setup.sh
index fbef3b229..617a77f0f 100755
--- a/tests/localosmosis/scripts/setup.sh
+++ b/tests/localosmosis/scripts/setup.sh
@@ -26,7 +26,7 @@ edit_genesis () {

# Update staking module
dasel put -t string -f $GENESIS '.app_state.staking.params.bond_denom' -v 'uosmo'
- dasel put -t string -f $GENESIS '.app_state.staking.params.unbonding_time' -v '240s'
+ # dasel put -t string -f $GENESIS '.app_state.staking.params.unbonding_time' -v '240s'

# Update bank module
dasel put -t string -f $GENESIS '.app_state.bank.denom_metadata.[].description' -v 'Registered denom uion for localosmosis testing'
@@ -49,23 +49,23 @@ edit_genesis () {
dasel put -t string -f $GENESIS '.app_state.crisis.constant_fee.denom' -v 'uosmo'

# Update gov module
- dasel put -t string -f $GENESIS '.app_state.gov.voting_params.voting_period' -v '60s'
+ # dasel put -t string -f $GENESIS '.app_state.gov.voting_params.voting_period' -v '60s'
dasel put -t string -f $GENESIS '.app_state.gov.params.min_deposit.[0].denom' -v 'uosmo'

# Update epochs module
- dasel put -t string -f $GENESIS '.app_state.epochs.epochs.[1].duration' -v "60s"
+ # dasel put -t string -f $GENESIS '.app_state.epochs.epochs.[1].duration' -v "60s"

# Update poolincentives module
- dasel put -t string -f $GENESIS '.app_state.poolincentives.lockable_durations.[0]' -v "120s"
- dasel put -t string -f $GENESIS '.app_state.poolincentives.lockable_durations.[1]' -v "180s"
- dasel put -t string -f $GENESIS '.app_state.poolincentives.lockable_durations.[2]' -v "240s"
+ # dasel put -t string -f $GENESIS '.app_state.poolincentives.lockable_durations.[0]' -v "120s"
+ # dasel put -t string -f $GENESIS '.app_state.poolincentives.lockable_durations.[1]' -v "180s"
+ # dasel put -t string -f $GENESIS '.app_state.poolincentives.lockable_durations.[2]' -v "240s"
dasel put -t string -f $GENESIS '.app_state.poolincentives.params.minted_denom' -v "uosmo"

# Update incentives module
- dasel put -t string -f $GENESIS '.app_state.incentives.lockable_durations.[0]' -v "1s"
- dasel put -t string -f $GENESIS '.app_state.incentives.lockable_durations.[1]' -v "120s"
- dasel put -t string -f $GENESIS '.app_state.incentives.lockable_durations.[2]' -v "180s"
- dasel put -t string -f $GENESIS '.app_state.incentives.lockable_durations.[3]' -v "240s"
+ # dasel put -t string -f $GENESIS '.app_state.incentives.lockable_durations.[0]' -v "1s"
+ # dasel put -t string -f $GENESIS '.app_state.incentives.lockable_durations.[1]' -v "120s"
+ # dasel put -t string -f $GENESIS '.app_state.incentives.lockable_durations.[2]' -v "180s"
+ # dasel put -t string -f $GENESIS '.app_state.incentives.lockable_durations.[3]' -v "240s"
dasel put -t string -f $GENESIS '.app_state.incentives.params.distr_epoch_identifier' -v "hour"

# Update mint module
2 changes: 1 addition & 1 deletion setup_osmosis.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash

cp osmosis.patch ./chains/osmosis
cp osmosis.patch ./chains/osmosis/osmosis.patch
cd ./chains/osmosis && git apply osmosis.patch

0 comments on commit 57ed49c

Please sign in to comment.