From af0aa5d6e45a774be06a5e9db4f2eaae9483163c Mon Sep 17 00:00:00 2001 From: Bucur David Date: Thu, 25 Apr 2024 15:34:31 +0300 Subject: [PATCH] chore: devnet snippets update Refs: #45 --- interaction/devnet.snippets.sh | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/interaction/devnet.snippets.sh b/interaction/devnet.snippets.sh index b2672cf..10fa0a6 100644 --- a/interaction/devnet.snippets.sh +++ b/interaction/devnet.snippets.sh @@ -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 @@ -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')" @@ -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