Skip to content

Commit

Permalink
Merge pull request #43 from ezra4/patch-1
Browse files Browse the repository at this point in the history
Update testnet.snippets.sh
  • Loading branch information
andreibancioiu authored Dec 14, 2023
2 parents 21717d7 + 28ea087 commit a9a1b89
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions contracts/adder/interaction/testnet.snippets.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ DEPLOY_TRANSACTION=$(mxpy data load --key=deployTransaction-testnet)
PROXY=https://testnet-api.multiversx.com

deploy() {
mxpy --verbose contract deploy --project=${PROJECT} --recall-nonce --pem=${ALICE} --gas-limit=50000000 --arguments 0 --send --outfile="deploy-testnet.interaction.json" --proxy=${PROXY} --chain=T || return
mxpy contract deploy --bytecode=${PROJECT} --recall-nonce --pem=${ALICE} --gas-limit=50000000 --arguments 0 --send --outfile="deploy-testnet.interaction.json" --proxy=${PROXY} --chain=T || return

TRANSACTION=$(mxpy data parse --file="deploy-testnet.interaction.json" --expression="data['emittedTransactionHash']")
ADDRESS=$(mxpy data parse --file="deploy-testnet.interaction.json" --expression="data['contractAddress']")
Expand All @@ -18,9 +18,9 @@ deploy() {

add() {
read -p "Enter number: " NUMBER
mxpy --verbose contract call ${ADDRESS} --recall-nonce --pem=${ALICE} --gas-limit=5000000 --function="add" --arguments ${NUMBER} --send --proxy=${PROXY} --chain=T
mxpy contract call ${ADDRESS} --recall-nonce --pem=${ALICE} --gas-limit=5000000 --function="add" --arguments ${NUMBER} --send --proxy=${PROXY} --chain=T
}

getSum() {
mxpy --verbose contract query ${ADDRESS} --function="getSum" --proxy=${PROXY}
mxpy contract query ${ADDRESS} --function="getSum" --proxy=${PROXY}
}

0 comments on commit a9a1b89

Please sign in to comment.