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

chore: devnet snippets update #47

Merged
merged 1 commit into from
Apr 25, 2024
Merged
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
21 changes: 19 additions & 2 deletions interaction/devnet.snippets.sh
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,22 @@ setTreasuryAddress(){
--send || return
}


setMaxDefaultQuantity(){

# $1 = max default quantity

mxpy --verbose contract call ${ADDRESS} \
--recall-nonce \
--pem=${WALLET} \
--gas-limit=6000000 \
--function "setMaxDefaultQuantity" \
--arguments $1 \
--proxy ${PROXY} \
--chain ${CHAIN_ID} \
--send || return
}

setAdministrator(){
# $1 = administrator address

Expand Down Expand Up @@ -247,7 +263,8 @@ addOffer(){
# $4 = payment token identifier
# $5 = payment token nonce
# $6 = payment token amount
# $7 = quantity (optional)
# $7 = quantity
# $8 = max quantity per address

user_address="$(mxpy wallet pem-address $SELLER)"
token_identifier="0x$(echo -n ${1} | xxd -p -u | tr -d '\n')"
Expand All @@ -259,7 +276,7 @@ addOffer(){
--pem=${SELLER} \
--gas-limit=10000000 \
--function "ESDTNFTTransfer" \
--arguments $token_identifier $2 $3 ${ADDRESS} $method $payment_token_identifier $5 $6 $7 \
--arguments $token_identifier $2 $3 ${ADDRESS} $method $payment_token_identifier $5 $6 $7 $8 \
--proxy ${PROXY} \
--chain ${CHAIN_ID} \
--send || return
Expand Down
Loading