Skip to content

Commit

Permalink
chore: devnet snippets update
Browse files Browse the repository at this point in the history
Refs: #45
  • Loading branch information
bucurdavid committed Apr 25, 2024
1 parent a435ff8 commit af0aa5d
Showing 1 changed file with 19 additions and 2 deletions.
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

0 comments on commit af0aa5d

Please sign in to comment.