Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: tweak env variables #248

Merged
merged 1 commit into from
Jan 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions scripts/deployment/deploy_env/base.env
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
if [ -n "$ZSH_VERSION" ]; then
# Using an array for TXFLAG
TXFLAG=(--node $RPC --chain-id $CHAIN_ID --gas-prices 0.55$DENOM --gas auto --gas-adjustment 1.5 -y -b sync --output json)
TXFLAG=(--node $RPC --chain-id $CHAIN_ID --gas-prices 0.15$DENOM --gas auto --gas-adjustment 1.2 -y -b sync --output json)
else
# Using a string for TXFLAG
TXFLAG="--node $RPC --chain-id $CHAIN_ID --gas-prices 0.55$DENOM --gas auto --gas-adjustment 1.5 -y -b block --output json"
TXFLAG="--node $RPC --chain-id $CHAIN_ID --gas-prices 0.15$DENOM --gas auto --gas-adjustment 1.2 -y -b sync --output json"
fi

export TXFLAG
2 changes: 1 addition & 1 deletion scripts/deployment/deploy_env/base_injective.env
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ if [ -n "$ZSH_VERSION" ]; then
TXFLAG=(--node $RPC --chain-id $CHAIN_ID --gas-prices=500000000inj --gas 10000000 -y -b sync --output json)
else
# Using a string for TXFLAG
TXFLAG="--node $RPC --chain-id $CHAIN_ID --gas-prices=500000000inj --gas 10000000 -y -b block --output json"
TXFLAG="--node $RPC --chain-id $CHAIN_ID --gas-prices=500000000inj --gas 10000000 -y -b sync --output json"
fi

export TXFLAG
4 changes: 2 additions & 2 deletions scripts/deployment/deploy_env/base_migaloo.env
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
if [ -n "$ZSH_VERSION" ]; then
# Using an array for TXFLAG
TXFLAG=(--node $RPC --chain-id $CHAIN_ID --gas-prices 0.25$DENOM --gas auto --gas-adjustment 1.3 -y -b block --output json)
TXFLAG=(--node $RPC --chain-id $CHAIN_ID --gas-prices 1$DENOM --gas auto --gas-adjustment 1.3 -y -b sync --output json)
else
# Using a string for TXFLAG
TXFLAG="--node $RPC --chain-id $CHAIN_ID --gas-prices 0.25$DENOM --gas auto --gas-adjustment 1.3 -y -b block --output json"
TXFLAG="--node $RPC --chain-id $CHAIN_ID --gas-prices 1$DENOM --gas auto --gas-adjustment 1.3 -y -b sync --output json"
fi

export TXFLAG
8 changes: 8 additions & 0 deletions scripts/deployment/deploy_env/chain_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,14 @@ function init_chain_env() {
source <(cat "$project_root_path"/scripts/deployment/deploy_env/base_migaloo.env)
;;

osmosis)
source <(cat "$project_root_path"/scripts/deployment/deploy_env/mainnets/osmosis.env)
;;

osmosis-testnet)
source <(cat "$project_root_path"/scripts/deployment/deploy_env/testnets/osmosis.env)
;;

orai)
source <(cat "$project_root_path"/scripts/deployment/deploy_env/mainnets/orai.env)
;;
Expand Down
4 changes: 4 additions & 0 deletions scripts/deployment/deploy_env/mainnets/osmosis.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export CHAIN_ID="osmosis-1"
export DENOM="uosmo"
export BINARY="osmosisd"
export RPC="https://rpc.osmosis.zone:443"
10 changes: 6 additions & 4 deletions scripts/deployment/deploy_liquidity_hub.sh
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ function init_fee_distributor() {
grace_period=21 #default value is 21 epochs
distribution_asset='{"native_token":{"denom":"'$whale_denom'"}}'
epoch_duration=86400000000000 #default value is 1 day, in nanoseconds
genesis_epoch=1689260400000000000 #fill with desired unix time, in nanoseconds
genesis_epoch=1706540400000000000 #fill with desired unix time, in nanoseconds
epoch_config='{"duration":"'$epoch_duration'", "genesis_epoch": "'$genesis_epoch'"}'

init='{"bonding_contract_addr": '"$bonding_contract_addr"', "fee_collector_addr": '"$fee_collector_addr"', "grace_period": "'$grace_period'", "epoch_config": '"$epoch_config"', "distribution_asset": '"$distribution_asset"'}'
Expand All @@ -125,23 +125,25 @@ function init_whale_lair() {
echo -e "\nInitializing the Whale Lair..."

# Prepare the instantiation message
unbonding_period=1209600000000000 # default value is 14 days, in nanoseconds
unbonding_period=86400000000000 # default value is 14 days, in nanoseconds
growth_rate="0.000000064300411522" # this is the value when you interpolate the growth rate to 2X with 365 days of bonding

bonding_assets=$(jq '.contracts[] | select (.wasm == "fee_collector.wasm") | .contract_address' $output_file)
grace_period="21" #default value is 21 epochs
distribution_asset='{"native_token":{"denom":"'$whale_denom'"}}'
epoch_duration="86400000000000" #default value is 1 day, in nanoseconds
genesis_epoch="1689865200000000000" #fill with desired unix time, in nanoseconds
genesis_epoch="1706540400000000000" #fill with desired unix time, in nanoseconds
epoch_config='{"duration":"'$epoch_duration'", "genesis_epoch": "'$genesis_epoch'"}'

init='{"bonding_contract_addr": '"$bonding_contract_addr"', "fee_collector_addr": '"$fee_collector_addr"', "grace_period":
"'$grace_period'", "epoch_config": '"$epoch_config"', "distribution_asset": '"$distribution_asset"'}'

echo "init_whale_lair fn is broken. Fix."
exit 0
#todo fix this message here, it's broken
# Instantiate the contract
code_id=$(jq -r '.contracts[] | select (.wasm == "fee_distributor.wasm") | .code_id' $output_file)
$BINARY tx wasm instantiate $code_id "$init" --from $deployer --label "White Whale Fee Distributor" $TXFLAG --admin $deployer_address
$BINARY tx wasm instantiate $code_id "$init" --from $deployer --label "White Whale Lair" $TXFLAG --admin $deployer_address

# Get contract address
contract_address=$($BINARY query wasm list-contract-by-code $code_id --node $RPC --output json | jq -r '.contracts[-1]')
Expand Down
Loading