Skip to content
Open
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
10 changes: 9 additions & 1 deletion scripts/deployment/spot_deploy.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
#!/bin/bash

trim_whitespace() {
if [[ "$OSTYPE" == "darwin"* ]]; then
sed 's/^[ \t]*//;s/[ \t]*$//'
else
xargs
fi
}

echo -n Customized clearing_house Contract \(../../artifacts/spot_lite.wasm by default\):
read contract
echo
Expand All @@ -24,7 +32,7 @@ seid=~/go/bin/seid
code=$(printf $password | $seid tx wasm store $contract -y --from=$keyname --chain-id=sei-chain --gas=10000000 --fees=10000000usei --broadcast-mode=block | grep -A 1 "code_id" | sed -n 's/.*value: "//p' | sed -n 's/"//p')
admin_addr=$(printf $password |$seid keys show $keyname | grep -A 1 "address" | sed -n 's/.*address: //p')

addr=$(printf $password |$seid tx wasm instantiate $code "{}" --from $keyname --broadcast-mode=block --label "spot" --admin $admin_addr --chain-id sei-chain --gas=30000000 --fees=300000usei -y | grep -A 1 -m 1 "key: _contract_address" | sed -n 's/.*value: //p' | xargs)
addr=$(printf $password |$seid tx wasm instantiate $code "{}" --from $keyname --broadcast-mode=block --label "spot" --admin $admin_addr --chain-id sei-chain --gas=30000000 --fees=3000000usei -y | grep -A 1 -m 1 "key: _contract_address" | sed -n 's/.*value: //p' | trim_whitespace)


if [[ "$OSTYPE" == "linux-gnu"* ]]; then
Expand Down