Skip to content

Commit

Permalink
Merge pull request #4 from projectNEWM/MRKT-104-Add-grinding-paramete…
Browse files Browse the repository at this point in the history
…r-for-the-NEWM-Minter

Mrkt 104 add grinding parameter for the newm minter
  • Loading branch information
logicalmechanism authored Jul 11, 2024
2 parents a9eb20a + 8c38f12 commit 1322dda
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 72 deletions.
6 changes: 3 additions & 3 deletions config.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"__comment1__": "This is the starter token for the data reference contract",
"starterPid": "8c3fb67a73b7047a77f180f59c089ddf719584813efe6bc5e73a79e8",
"starterTkn": "5ca1ab1e000affab1e000ca11ab1e0005e77ab1e",
"starterPid": "b88cdb6d77bcb6ca9a227bab5d0b6a3b4a47960b41cbab4ede0c8b00",
"starterTkn": "6ca2a0f0d17ec1732611675702ba9672ab033a6bf7fffb1aaf35cf3caf8b5cc4",
"__comment2__": "The change address for the starter token transaction",
"starterChangeAddr": "addr_test1qrvnxkaylr4upwxfxctpxpcumj0fl6fdujdc72j8sgpraa9l4gu9er4t0w7udjvt2pqngddn6q4h8h3uv38p8p9cq82qav4lmp",
"__comment3__": "This is the initial pool id for staking",
"poolId": "1e3105f23f2ac91b3fb4c35fa4fe301421028e356e114944e902005b",
"__comment4__": "The NEWM hot key",
"hotKey": "f4a78bbff6d5e7e492915986abc495382247af659018451a25cec92c",
"__comment5__": "A random bytestring",
"random": "00112233445566778899"
"random": "00112233445566778899aabbccddeeff"
}
3 changes: 2 additions & 1 deletion scripts/00_createScriptReferences.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ alltxin=""
txin=$(jq -r --arg alltxin "" 'to_entries[] | select(.value.value | length < 2) | .key | . + $alltxin + " --tx-in"' ./tmp/reference_utxo.json)
ref_tx_in=${txin::-8}

echo -e "\033[0;36mFirst UTxO: $ref_tx_in \033[0m"
echo -e "\033[0;36mFirst UTxO:\033[0m"
echo -e "\033[0;36m$ref_tx_in \033[0m"

changeAmount=$(jq '[.. | objects | .lovelace] | add' ./tmp/reference_utxo.json)

Expand Down
4 changes: 2 additions & 2 deletions scripts/data/reference/backup-reference-datum.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@
"constructor": 0,
"fields": [
{
"bytes": "6ff4dc9f89baf7d1cde96e883b53a45bc8c437b870894275bf42994f"
"bytes": "8d04e53edaeaca5ad113e81362ba2c399f774fe3a4b20072e120e3cc"
},
{
"bytes": "facbf8d949467b1d55f8e70ab3235c59ac9196c447bedcf043e03766"
"bytes": "c9b7469484c622864975a2252f5ff85a046a1add6046de7abf05b426"
}
]
}
Expand Down
59 changes: 0 additions & 59 deletions scripts/data/reference/current-reference-datum.json
Original file line number Diff line number Diff line change
@@ -1,59 +0,0 @@
{
"constructor": 0,
"fields": [
{
"bytes": "f4a78bbff6d5e7e492915986abc495382247af659018451a25cec92c"
},
{
"constructor": 0,
"fields": [
{
"list": [
{
"bytes": "d858ecf3e73e18bef8383a16e856778e033cfd1c8867c70dc9b68b42"
},
{
"bytes": "10a20db9464d89dab407b3397e67facf83db8d442e601b627c0a351f"
},
{
"bytes": "121ce13907d40c7a598d182ed751d39279cf30d50decb17151b3a587"
}
]
},
{
"int": 2
}
]
},
{
"constructor": 0,
"fields": [
{
"bytes": "1e3105f23f2ac91b3fb4c35fa4fe301421028e356e114944e902005b"
},
{
"constructor": 0,
"fields": [
{
"bytes": "8f7b0ce283a92df9a3b69ac0b8f10d8bc8bcf8fbd1fe72596ee8bd6c"
},
{
"bytes": ""
}
]
}
]
},
{
"constructor": 0,
"fields": [
{
"bytes": "6ff4dc9f89baf7d1cde96e883b53a45bc8c437b870894275bf42994f"
},
{
"bytes": "facbf8d949467b1d55f8e70ab3235c59ac9196c447bedcf043e03766"
}
]
}
]
}
4 changes: 2 additions & 2 deletions scripts/data/reference/reference-datum.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@
"constructor": 0,
"fields": [
{
"bytes": "6ff4dc9f89baf7d1cde96e883b53a45bc8c437b870894275bf42994f"
"bytes": "9716578e980be10a47ecb36a0a2c6a71e6142be10cdc15e1e286396a"
},
{
"bytes": "facbf8d949467b1d55f8e70ab3235c59ac9196c447bedcf043e03766"
"bytes": "3106ac51de4266a08f73099f20627d8749bb7f495ffecd93b9f50cfe"
}
]
}
Expand Down
2 changes: 1 addition & 1 deletion scripts/data/staking/delegate-redeemer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"constructor": 1,
"fields": [
{
"bytes": "facbf8d949467b1d55f8e70ab3235c59ac9196c447bedcf043e03766"
"bytes": "3106ac51de4266a08f73099f20627d8749bb7f495ffecd93b9f50cfe"
}
]
}
9 changes: 5 additions & 4 deletions scripts/storage/01_updateMetadata.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ asset="1 ${pid}.${tkn}"
min_utxo=$(${cli} transaction calculate-min-required-utxo \
--babbage-era \
--protocol-params-file ../tmp/protocol.json \
--tx-out-datum-embed-file ../data/storage/updated-metadata-datum.json \
--tx-out-inline-datum-file ../data/storage/updated-metadata-datum.json \
--tx-out="${storage_script_address} + 5000000 + ${asset}" | tr -dc '0-9')

# --tx-out-inline-datum-file ../data/storage/updated-metadata-datum.json \
# --tx-out-datum-embed-file ../data/storage/updated-metadata-datum.json \

script_address_out="${storage_script_address} + ${min_utxo} + ${asset}"
echo "Update OUTPUT: "${script_address_out}
Expand Down Expand Up @@ -101,12 +101,13 @@ fee=$(${cli} transaction build \
--spending-reference-tx-in-inline-datum-present \
--spending-reference-tx-in-redeemer-file ../data/storage/update-redeemer.json \
--tx-out="${script_address_out}" \
--tx-out-datum-embed-file ../data/storage/updated-metadata-datum.json \
--tx-out-inline-datum-file ../data/storage/updated-metadata-datum.json \
--required-signer-hash ${newm_pkh} \
--required-signer-hash ${collat_pkh} \
--testnet-magic ${testnet_magic})

# --tx-out-inline-datum-file ../data/storage/updated-metadata-datum.json \
# --spending-reference-tx-in-datum-file ../data/storage/updated-metadata-datum.json \
# --tx-out-datum-embed-file ../data/storage/updated-metadata-datum.json \

IFS=':' read -ra VALUE <<< "${fee}"
IFS=' ' read -ra fee <<< "${VALUE[1]}"
Expand Down
2 changes: 2 additions & 0 deletions scripts/storage/02_removeMetadataUTxO.sh
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ fee=$(${cli} transaction build \
--required-signer-hash ${collat_pkh} \
--testnet-magic ${testnet_magic})

# --spending-reference-tx-in-datum-file ../data/storage/updated-metadata-datum.json \

IFS=':' read -ra VALUE <<< "${fee}"
IFS=' ' read -ra fee <<< "${VALUE[1]}"
fee=${fee[1]}
Expand Down

0 comments on commit 1322dda

Please sign in to comment.