-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
hard-nett
committed
Apr 15, 2024
1 parent
edb8431
commit ca9ae66
Showing
9 changed files
with
83 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,44 @@ | ||
# KEY=$(terpd keys show $ADMIN | jq -r .name) | ||
FACTORY_CODE_ID=121 | ||
MINTER_CODE_ID=122 | ||
|
||
MSG=$(cat <<EOF | ||
{ | ||
"params": { | ||
"code_id": 80, | ||
"allowed_terp721_code_ids": [83], | ||
"code_id": $MINTER_CODE_ID, | ||
"allowed_terp721_code_ids": [128,68], | ||
"frozen": false, | ||
"creation_fee": {"amount": "20000000000","denom": "uthiolx"}, | ||
"min_mint_price": {"amount": "0","denom": "uthiolx"}, | ||
"creation_fee": {"amount": "200","denom": "uterp"}, | ||
"min_mint_price": {"amount": "0","denom": "uterp"}, | ||
"mint_fee_bps": 500, | ||
"max_trading_offset_secs": 604800, | ||
"extension": { | ||
"max_token_limit": 10000, | ||
"max_per_address_limit": 50, | ||
"airdrop_mint_price": {"denom": "uthiolx","amount": "0"}, | ||
"airdrop_mint_price": {"denom": "uterp","amount": "0"}, | ||
"airdrop_mint_fee_bps": 10000, | ||
"shuffle_fee": {"amount": "500000000","denom": "uthiolx"} | ||
"shuffle_fee": {"amount": "500000000","denom": "uterp"} | ||
} | ||
} | ||
} | ||
EOF | ||
) | ||
echo $MSG | ||
|
||
response_command='terpd tx wasm instantiate $FACTORY_CODE_ID "$MSG" --label="vendingfactory" --no-admin --from test1 --gas-prices 0.05uthiolx --gas-adjustment 1.7 --gas auto --chain-id 90u-4 -b sync -o json --yes -o json'; | ||
response=$(eval $response_command); | ||
echo $response; | ||
|
||
terpd tx wasm instantiate $FACTORY_CODE_ID "$MSG" --label "FeaturedFlexVendingMinterFactory" \ | ||
--admin $ADMIN \ | ||
--gas-prices 0.025uthiolx --gas 5000000 \ | ||
--from $ADMIN \ | ||
--generate-only > unsignedTx.json | ||
|
||
# terpd tx sign unsignedTx.json \ | ||
# --multisig=$ADMIN --from $USER --output-document=$KEY.json \ | ||
# --chain-id $CHAIN_ID | ||
if [ -n "$response" ]; then | ||
txhash=$(echo "$response" | jq -r '.txhash') | ||
echo 'waiting for tx to process' | ||
sleep 6; | ||
tx_response=$(terpd q tx $txhash -o json) | ||
|
||
# terpd tx multisign unsignedTx.json $MULTISIG_NAME $1 $2 $3 > signedTx.json | ||
|
||
# terpd tx broadcast signedTx.json | ||
contract_address=$(echo "$tx_response" | jq -r '.logs[].events[] | select(.type == "instantiate") | .attributes[] | select(.key == "_contract_address") | .value') | ||
echo "Contract Address: $contract_address" | ||
else | ||
echo "Error: Empty response" | ||
fi | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters