Skip to content

Commit

Permalink
added restoreDeployData to interaction snippets
Browse files Browse the repository at this point in the history
  • Loading branch information
newbreedofgeek committed Feb 18, 2023
1 parent c25c5d3 commit 451b113
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions interaction/devnet.snippets.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ deploy(){
mxpy data store --key=deployTransaction-devnet --value=${TRANSACTION}
}

# if you interact without calling deploy(), then you need to 1st run this to restore the vars from data
restoreDeployData() {
TRANSACTION=$(mxpy data parse --file="./interaction/deploy-devnet.interaction.json" --expression="data['emittedTransactionHash']")
ADDRESS=$(mxpy data parse --file="./interaction/deploy-devnet.interaction.json" --expression="data['contractAddress']")
}

setClaimToken(){
mxpy --verbose contract call ${ADDRESS} \
--recall-nonce \
Expand Down

0 comments on commit 451b113

Please sign in to comment.