Skip to content

Commit

Permalink
after devnet2 upgrade, updated devnet snippets to have new ith token …
Browse files Browse the repository at this point in the history
…id and also some comments on deploying last reporducible build direct
  • Loading branch information
newbreedofgeek committed Nov 3, 2023
1 parent 2ccf734 commit ce15a87
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions interaction/devnet.snippets.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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(){
Expand Down

0 comments on commit ce15a87

Please sign in to comment.