-
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 6, 2024
1 parent
0ab0475
commit edb8431
Showing
24 changed files
with
375 additions
and
660 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,35 @@ | ||
AUCTION_CODE_ID=120 | ||
PUBKEY=terp1tyl97ac3s7sec4jwznk0s7n3tlwf3matfmkape | ||
|
||
|
||
MSG=$(cat <<EOF | ||
{ | ||
"protocol_fee": "0.01", | ||
"min_increment": "0.1", | ||
"duration": 300, | ||
"min_duration": 60, | ||
"accepted_denom": ["uterpx"], | ||
"min_reserve_price": "1000", | ||
"max_royalty_fee": "0.2", | ||
"protocol_addr": "$PUBKEY" | ||
} | ||
EOF | ||
) | ||
echo $MSG | ||
|
||
|
||
response_command='terpd tx wasm i $AUCTION_CODE_ID "$MSG" --label="Auction Marketplace" --no-admin --gas-prices 0.05uthiolx --gas auto --gas-adjustment 1.9 --from test1 -y -b sync -o json --chain-id 90u-4' | ||
response=$(eval $response_command); | ||
echo $response | ||
|
||
|
||
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) | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
AUCTION_CODE_ID=120 | ||
CW721_BASE_ID=68 | ||
PUBKEY=terp1tyl97ac3s7sec4jwznk0s7n3tlwf3matfmkape | ||
|
||
# terp1mum2jzk55uhl375cmpydla9lsen65fvmcz2sm6k92n9uc8mm8r5sm5f6m8 | ||
|
||
# MSG=$(cat <<EOF | ||
# { | ||
# "name": "Test1", | ||
# "symbol": "TEST", | ||
# "minter": "$PUBKEY" | ||
# } | ||
# EOF | ||
# ) | ||
# echo $MSG | ||
|
||
|
||
# response_command='terpd tx wasm i $CW721_BASE_ID "$MSG" --label="NFT" --no-admin --gas-prices 0.05uthiolx --gas auto --gas-adjustment 1.9 --from test1 -y -b sync -o json --chain-id 90u-4' | ||
# response=$(eval $response_command); | ||
# echo $response | ||
|
||
# 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) | ||
# 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 | ||
|
||
|
||
MINT_MSG=$(cat <<EOF | ||
{ | ||
"mint": { | ||
"token_id": "2", | ||
"owner": "$PUBKEY", | ||
"token_uri": "ipfs://QmboqXNQcf4pcNhfMWAeXCbTejxuVreDVDaB4qoFmg7DBR", | ||
"extension": { | ||
"image": "ipfs://QmboqXNQcf4pcNhfMWAeXCbTejxuVreDVDaB4qoFmg7DBR", | ||
"description": "test", | ||
"name": "Test 1", | ||
"attributes": [ | ||
{ | ||
"trait_type": "background", | ||
"value": "aurora" | ||
}, | ||
{ | ||
"trait_type": "head", | ||
"value": "aurora" | ||
} | ||
] | ||
} | ||
} | ||
} | ||
EOF | ||
) | ||
# echo $MSG | ||
|
||
|
||
|
||
response_command='terpd tx wasm e terp1mum2jzk55uhl375cmpydla9lsen65fvmcz2sm6k92n9uc8mm8r5sm5f6m8 "$MINT_MSG" --gas-prices 0.05uthiolx --gas auto --gas-adjustment 1.9 --from test1 -y -b sync -o json --chain-id 90u-4' | ||
response=$(eval $response_command); | ||
echo $response | ||
|
||
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) | ||
echo $tx_response; | ||
# 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
PUBKEY=terp1tyl97ac3s7sec4jwznk0s7n3tlwf3matfmkape | ||
CW721_CONTRACT=terp1mum2jzk55uhl375cmpydla9lsen65fvmcz2sm6k92n9uc8mm8r5sm5f6m8 | ||
AUCTION_CONTRACT=terp1mullcexgw5sznuscul79j5xh88syc5ker98zn8270hkjt6hld68q030qs0 | ||
TOKEN_ID=1 | ||
|
||
AUCTION_MSG=$(cat <<EOF | ||
{ | ||
"create_auction": { | ||
"denom": "uterpx", | ||
"reserve_price": "420000000", | ||
"is_instant_sale": false | ||
} | ||
} | ||
EOF | ||
) | ||
|
||
binary_auction_msg=$(echo $AUCTION_MSG | jq -c . | base64) | ||
echo $binary_auction_msg | ||
|
||
MSG=$(cat <<EOF | ||
{ | ||
"send_nft": { | ||
"contract": "$AUCTION_CONTRACT", | ||
"token_id": "$TOKEN_ID", | ||
"msg": "$binary_auction_msg" | ||
} | ||
} | ||
EOF | ||
) | ||
echo $MSG | ||
|
||
|
||
response_command='terpd tx wasm e $CW721_CONTRACT "$MSG" --gas-prices 0.05uthiolx --gas auto --gas-adjustment 1.9 --from test1 -y -b sync -o json --chain-id 90u-4' | ||
response=$(eval $response_command); | ||
# echo $response | ||
|
||
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) | ||
# contract_address=$(echo "$tx_response" | jq -r '.logs[].events[] | select(.type == "instantiate") | .attributes[] | select(.key == "_contract_address") | .value') | ||
# echo "Contract Address: $contract_address" | ||
echo 'finished with txhash: $txhash' | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
PUBKEY=terp1tyl97ac3s7sec4jwznk0s7n3tlwf3matfmkape | ||
AUCTION_CONTRACT=terp1mullcexgw5sznuscul79j5xh88syc5ker98zn8270hkjt6hld68q030qs0 | ||
AUCTION_ID=0 | ||
BID_AMOUNT=420000000uterpx | ||
|
||
binary_auction_msg=$(echo $AUCTION_MSG | jq -c . | base64) | ||
echo $binary_auction_msg | ||
|
||
MSG=$(cat <<EOF | ||
{ | ||
"place_bid": { | ||
"auction_id": "$AUCTION_ID" | ||
} | ||
} | ||
EOF | ||
) | ||
echo $MSG | ||
|
||
|
||
response_command='terpd tx wasm e $AUCTION_CONTRACT "$MSG" --amount $BID_AMOUNT --gas-prices 0.05uthiolx --gas auto --gas-adjustment 1.9 --from test1 -y -b sync -o json --chain-id 90u-4' | ||
response=$(eval $response_command); | ||
# echo $response | ||
|
||
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) | ||
# contract_address=$(echo "$tx_response" | jq -r '.logs[].events[] | select(.type == "instantiate") | .attributes[] | select(.key == "_contract_address") | .value') | ||
# echo "Contract Address: $contract_address" | ||
echo 'finished with txhash:' $txhash | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
PUBKEY=terp1tyl97ac3s7sec4jwznk0s7n3tlwf3matfmkape | ||
AUCTION_CONTRACT=terp1mullcexgw5sznuscul79j5xh88syc5ker98zn8270hkjt6hld68q030qs0 | ||
AUCTION_ID=0 | ||
|
||
binary_auction_msg=$(echo $AUCTION_MSG | jq -c . | base64) | ||
echo $binary_auction_msg | ||
|
||
MSG=$(cat <<EOF | ||
{"admin_pause": {}} | ||
EOF | ||
) | ||
# MSG=$(cat <<EOF | ||
# {"admin_resume": {}} | ||
# EOF | ||
# MSG=$(cat <<EOF | ||
# {"admin_cancel_auction": {"auction_id": "$AUCTION_ID"}} | ||
# EOF | ||
# ) | ||
# ) | ||
# MSG=$(cat <<EOF | ||
# {"admin_change_config": {}} | ||
# EOF | ||
# ) | ||
# MSG=$(cat <<EOF | ||
# {"set_royalty_fee": {}} | ||
# EOF | ||
# ) | ||
# MSG=$(cat <<EOF | ||
# {"set_royalty_address": {}} | ||
# EOF | ||
# ) | ||
# MSG=$(cat <<EOF | ||
# {"settle_hook": {}} | ||
# EOF | ||
# ) | ||
|
||
echo $MSG | ||
|
||
response_command='terpd tx wasm e $AUCTION_CONTRACT "$MSG" --gas-prices 0.05uthiolx --gas auto --gas-adjustment 1.9 --from test1 -y -b sync -o json --chain-id 90u-4' | ||
response=$(eval $response_command); | ||
# echo $response | ||
|
||
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) | ||
echo 'finished with txhash:' $txhash | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
PUBKEY=terp1tyl97ac3s7sec4jwznk0s7n3tlwf3matfmkape | ||
AUCTION_CONTRACT=terp1mullcexgw5sznuscul79j5xh88syc5ker98zn8270hkjt6hld68q030qs0 | ||
AUCTION_ID=0 | ||
|
||
binary_auction_msg=$(echo $AUCTION_MSG | jq -c . | base64) | ||
echo $binary_auction_msg | ||
|
||
MSG=$(cat <<EOF | ||
{"admin_pause": {}} | ||
EOF | ||
) | ||
# MSG=$(cat <<EOF | ||
# {"admin_resume": {}} | ||
# EOF | ||
# MSG=$(cat <<EOF | ||
# {"admin_cancel_auction": {"auction_id": "$AUCTION_ID"}} | ||
# EOF | ||
# ) | ||
# ) | ||
# MSG=$(cat <<EOF | ||
# {"admin_change_config": {}} | ||
# EOF | ||
# ) | ||
# MSG=$(cat <<EOF | ||
# {"set_royalty_fee": {}} | ||
# EOF | ||
# ) | ||
# MSG=$(cat <<EOF | ||
# {"set_royalty_address": {}} | ||
# EOF | ||
# ) | ||
# MSG=$(cat <<EOF | ||
# {"settle_hook": {}} | ||
# EOF | ||
# ) | ||
|
||
echo $MSG | ||
|
||
response_command='terpd tx wasm e $AUCTION_CONTRACT "$MSG" --gas-prices 0.05uthiolx --gas auto --gas-adjustment 1.9 --from test1 -y -b sync -o json --chain-id 90u-4' | ||
response=$(eval $response_command); | ||
# echo $response | ||
|
||
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) | ||
echo 'finished with txhash:' $txhash | ||
else | ||
echo "Error: Empty response" | ||
fi |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.