Update docs/liquid/liquid-part2.md
This commit is contained in:
parent
34436f2aaf
commit
f18a7ef28e
@ -64,23 +64,20 @@ if [ -z "$1" ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
###EDIT THESE VALUES###
|
###EDIT THESE VALUES###
|
||||||
|
|
||||||
DOMAIN="coins.b0xxy.net"
|
DOMAIN="coins.b0xxy.net"
|
||||||
PUBKEY=$1
|
PUBKEY=$1
|
||||||
NAME="StackerNewsDemo-1"
|
NAME="StackerNewsDemo-1"
|
||||||
PRECISION=8
|
PRECISION=8
|
||||||
TICKER="SND-1"
|
TICKER="SND-1"
|
||||||
|
|
||||||
### END EDITING HERE ###
|
### END EDITING HERE ###
|
||||||
|
|
||||||
CONTRACT='{"entity":{"domain":"'$DOMAIN'"},"issuer_pubkey":"'$PUBKEY'","name":"'$NAME'","precision":'$PRECISION',"ticker":"'$TICKER'","version":'0'}'
|
CONTRACT='{"entity":{"domain":"'$DOMAIN'"},"issuer_pubkey":"'$PUBKEY'","name":"'$NAME'","precision":'$PRECISION',"ticker":"'$TICKER'","version":'0'}'
|
||||||
|
|
||||||
CONTRACT_HASH=$(python3 -c 'import json,sys; sys.stdout.write(json.dumps(json.loads(sys.argv[1]), sort_keys=True, separators=(",",":")))' "$CONTRACT" | sha256sum | head -c64 | fold -w2 | tac | tr -d "\\n")
|
CONTRACT_HASH=$(python3 -c 'import json,sys; sys.stdout.write(json.dumps(json.loads(sys.argv[1]), sort_keys=True, separators=(",",":")))' "$CONTRACT" | sha256sum | head -c64 | fold -w2 | tac | tr -d "\\n")
|
||||||
|
|
||||||
echo CONTRACT=$CONTRACT
|
echo CONTRACT=$CONTRACT
|
||||||
echo CONTRACT_HASH=$CONTRACT_HASH
|
echo CONTRACT_HASH=$CONTRACT_HASH
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
* Now we can use the script we saved before to generate the contract:
|
* Now we can use the script we saved before to generate the contract:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user