Skip to content

Commit

Permalink
chore: snippets update
Browse files Browse the repository at this point in the history
  • Loading branch information
bucurdavid committed Jun 13, 2024
1 parent 66760b8 commit 88f6efe
Showing 1 changed file with 45 additions and 7 deletions.
52 changes: 45 additions & 7 deletions interaction/devnet.snippets.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,26 @@ upgrade(){



addTokenToWhitelist(){
# $1 = token
# $2 = decimals

token="0x$(echo -n ${1} | xxd -p -u | tr -d '\n')"

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

}



setAdministrator(){
# $1 = address

Expand Down Expand Up @@ -88,8 +108,6 @@ setFeeCollector(){
setFeeValue(){
# $1 = value



mxpy --verbose contract call ${ADDRESS} \
--recall-nonce \
--pem=${WALLET} \
Expand All @@ -102,17 +120,37 @@ setFeeValue(){

}

setWegldContractAddress(){
# $1 = address

address="0x$(mxpy wallet bech32 --decode ${1})"
setDepositLimits(){
# $1 = min
# $2 = max



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


}

setWegldTokenIdentifier(){
# $1 = token

token="0x$(echo -n ${1} | xxd -p -u | tr -d '\n')"

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

0 comments on commit 88f6efe

Please sign in to comment.