From 2a0aadc4ec2616b428e791d826ea4b5860d43e3c Mon Sep 17 00:00:00 2001 From: Bucur David Date: Tue, 23 Apr 2024 15:37:42 +0300 Subject: [PATCH] chore: devnet snippets for donation feature Refs: #81 --- interaction/devnet.snippets.sh | 36 ++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/interaction/devnet.snippets.sh b/interaction/devnet.snippets.sh index e678433..5c65a77 100644 --- a/interaction/devnet.snippets.sh +++ b/interaction/devnet.snippets.sh @@ -382,6 +382,42 @@ setAdministrator(){ --send || return } + +setDonationTreasuryAddress(){ + + # $1 = address + + address="0x$(mxpy wallet bech32 --decode ${1})" + + mxpy --verbose contract call ${ADDRESS} \ + --recall-nonce \ + --pem=${WALLET} \ + --gas-limit=6000000 \ + --function "setDonationTreasuryAddress" \ + --arguments $address \ + --proxy ${PROXY} \ + --chain ${CHAIN_ID} \ + --send || return + +} + + +setMaxDonationPercentage(){ + + # $1 = max donation percentage value (1% -> 100 ; 100% -> 10000) + + mxpy --verbose contract call ${ADDRESS} \ + --recall-nonce \ + --pem=${WALLET} \ + --gas-limit=6000000 \ + --function "setMaxDonationPercentage" \ + --arguments ${1} \ + --proxy ${PROXY} \ + --chain ${CHAIN_ID} \ + --send || return + +} + mintTokenUsingEsdt(){ # $1 = amount of esdt to send # $2 = name