From 451b113fe48e5a4a5d4b0952533428fde5d689e4 Mon Sep 17 00:00:00 2001 From: Mark Paul Date: Sat, 18 Feb 2023 16:04:07 +1100 Subject: [PATCH] added restoreDeployData to interaction snippets --- interaction/devnet.snippets.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/interaction/devnet.snippets.sh b/interaction/devnet.snippets.sh index 99eda61..7fbb0cd 100644 --- a/interaction/devnet.snippets.sh +++ b/interaction/devnet.snippets.sh @@ -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 \