From ce15a874eb1661145d71ab19313eef0850e17d9e Mon Sep 17 00:00:00 2001 From: Mark Paul Date: Fri, 3 Nov 2023 11:26:29 +1100 Subject: [PATCH] after devnet2 upgrade, updated devnet snippets to have new ith token id and also some comments on deploying last reporducible build direct --- interaction/devnet.snippets.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/interaction/devnet.snippets.sh b/interaction/devnet.snippets.sh index 8358ce3..177d5b0 100644 --- a/interaction/devnet.snippets.sh +++ b/interaction/devnet.snippets.sh @@ -8,12 +8,16 @@ BUYER="./wallet3.pem" ADDRESS=$(mxpy data load --key=address-devnet) DEPLOY_TRANSACTION=$(mxpy data load --key=deployTransaction-devnet) -TOKEN="ITHEUM-a61317" +TOKEN="ITHEUM-fce905" TOKEN_HEX="0x$(echo -n ${TOKEN} | xxd -p -u | tr -d '\n')" +# to deploy from last reprodubible build, we need to change +# --bytecode output/data_market.wasm \ +# to +# --bytecode output-docker/data_market/data_market.wasm \ deploy(){ mxpy --verbose contract deploy \ - --bytecode output/data_market.wasm \ + --bytecode output-docker/data_market/data_market.wasm \ --outfile deployOutput \ --metadata-not-readable \ --metadata-payable-by-sc \ @@ -36,6 +40,10 @@ deploy(){ 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']") + + # after we upgraded to mxpy 8.1.2, mxpy data parse seems to load the ADDRESS correctly but it breaks when used below with a weird "Bad address" error + # so, we just hardcode the ADDRESS here. Just make sure you use the "data['contractAddress'] from the latest deploy-devnet.interaction.json file + ADDRESS="erd1qqqqqqqqqqqqqpgqlhewm06p4c9qhq32p239hs45dvry948tfsxshx3e0l" } initializeContract(){