Skip to content

Commit

Permalink
chore: devnet snippets update (#47)
Browse files Browse the repository at this point in the history
Refs: #45
  • Loading branch information
bucurdavid authored Apr 25, 2024
1 parent 27ead9c commit 1f0e888
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 @@ -107,6 +107,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 @@ -273,7 +289,8 @@ addOffer(){
# $4 = payment token identifier
# $5 = payment token nonce
# $6 = payment token amount
# $7 = quantity (optional)
# $7 = quantity
# $8 = max quantity per address


token_identifier="0x$(echo -n ${1} | xxd -p -u | tr -d '\n')"
Expand All @@ -285,7 +302,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 1f0e888

Please sign in to comment.