generated from okp4/template-oss
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from okp4/ci/shellcheck
Ci/shellcheck
- Loading branch information
Showing
28 changed files
with
186 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
#!/bin/bash | ||
|
||
set -euo pipefail | ||
|
||
# change the hash 4DB4644E6146DE0E7239C5273F79C931193F542D62979ACB907C9368A315DCE1 to get information from an instantitate transaction | ||
okp4d query tx CB200354719B58A990A077337686CFAF64E95893037AF599DABC2E3B72297FD9 \ | ||
--node https://api.testnet.okp4.network:443/rpc \ | ||
--output json | jq '.logs[0].events[] | select(.type == "instantiate").attributes[] | select(.key == "_contract_address").value' | ||
--node https://api.testnet.okp4.network:443/rpc \ | ||
--output json | jq '.logs[0].events[] | select(.type == "instantiate").attributes[] | select(.key == "_contract_address").value' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,13 @@ | ||
#!/bin/bash | ||
|
||
set -euo pipefail | ||
|
||
# insert "Hello OKP4 Builders" in a objectarium instance (okp41tca04wdta7pyzzyetgqyl2rn9v5vgxq0cwvdduel8sgw4g64at7q8jja85) | ||
# execute a 'store_object' message, see https://docs.okp4.network/contracts/okp4-objectarium#executemsgstoreobject | ||
# replace mywallet by your wallet name | ||
echo "Hello OKP4 Builders" > text-ex.txt && \ | ||
okp4d tx wasm execute okp41tca04wdta7pyzzyetgqyl2rn9v5vgxq0cwvdduel8sgw4g64at7q8jja85 \ | ||
--from mywallet \ | ||
--gas 1000000 \ | ||
--chain-id okp4-nemeton-1 --node https://api.testnet.okp4.network:443/rpc \ | ||
"{\"store_object\":{\"data\": \"$(cat text-ex.txt | base64 | tr -d '\n\r')\", \"pin\":true}}" | ||
echo "Hello OKP4 Builders" >text-ex.txt && | ||
okp4d tx wasm execute okp41tca04wdta7pyzzyetgqyl2rn9v5vgxq0cwvdduel8sgw4g64at7q8jja85 \ | ||
--from mywallet \ | ||
--gas 1000000 \ | ||
--chain-id okp4-nemeton-1 --node https://api.testnet.okp4.network:443/rpc \ | ||
"{\"store_object\":{\"data\": \"$(cat text-ex.txt | base64 | tr -d '\n\r')\", \"pin\":true}}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
#!/bin/bash | ||
|
||
set -euo pipefail | ||
|
||
# object_data query message to an objectarium instance (okp41tca04wdta7pyzzyetgqyl2rn9v5vgxq0cwvdduel8sgw4g64at7q8jja85, id = 71f9954abebbd23da1664914cd599f8039585fa3d81735b4abe20893abd32213) | ||
# see https://docs.okp4.network/contracts/okp4-objectarium#querymsgobjectdata | ||
okp4d query wasm contract-state smart okp41tca04wdta7pyzzyetgqyl2rn9v5vgxq0cwvdduel8sgw4g64at7q8jja85 \ | ||
--output json \ | ||
--chain-id okp4-nemeton-1 \ | ||
--node https://api.testnet.okp4.network:443/rpc \ | ||
"{\"object_data\": {\"id\":\"71f9954abebbd23da1664914cd599f8039585fa3d81735b4abe20893abd32213\"}}" \ | ||
| jq '.data' | tr -d '"' | base64 -d | ||
|
||
--output json \ | ||
--chain-id okp4-nemeton-1 \ | ||
--node https://api.testnet.okp4.network:443/rpc \ | ||
"{\"object_data\": {\"id\":\"71f9954abebbd23da1664914cd599f8039585fa3d81735b4abe20893abd32213\"}}" | | ||
jq '.data' | tr -d '"' | base64 -d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
#!/bin/bash | ||
|
||
set -euo pipefail | ||
|
||
# Import from a mnemonic. You can replace "mywallet" with another wallet name | ||
# You must have $KNOW tokens to send a transaction - grab test tokens here: https://faucet.okp4.network/ | ||
okp4d keys add --recover mywallet |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
#!/bin/bash | ||
|
||
set -euo pipefail | ||
|
||
# Create a new wallet. You can replace "mywallet" with another wallet name | ||
# You must have $KNOW tokens to send a transaction - grab test tokens here: https://faucet.okp4.network/ | ||
okp4d keys add mywallet |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
#!/bin/bash | ||
|
||
set -euo pipefail | ||
|
||
# Replace "mywallet" with your wallet name | ||
okp4d keys show mywallet |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
#!/bin/bash | ||
|
||
set -euo pipefail | ||
|
||
# Replace "okp41cu9wzlcyyxpek20jaqfwzu3llzjgx34cwnv2v5" with your wallet address | ||
okp4d query bank balances okp41cu9wzlcyyxpek20jaqfwzu3llzjgx34cwnv2v5 \ | ||
--node https://api.testnet.okp4.network:443/rpc | ||
--node https://api.testnet.okp4.network:443/rpc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
#!/bin/bash | ||
|
||
set -euo pipefail | ||
|
||
okp4d query bank total \ | ||
--node https://api.testnet.okp4.network:443/rpc | ||
--node https://api.testnet.okp4.network:443/rpc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
#!/bin/bash | ||
|
||
set -euo pipefail | ||
|
||
# Replace "mywallet" with your wallet name and okp41r0pf2d78w8w29sm9a6qm8x6yqshezm0k6vwcrg to change the receiver address | ||
okp4d tx bank send mywallet okp41r0pf2d78w8w29sm9a6qm8x6yqshezm0k6vwcrg \ | ||
500000uknow \ | ||
--chain-id okp4-nemeton-1 --node https://api.testnet.okp4.network:443/rpc | ||
500000uknow \ | ||
--chain-id okp4-nemeton-1 --node https://api.testnet.okp4.network:443/rpc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
#!/bin/bash | ||
|
||
set -euo pipefail | ||
|
||
# change the hash 4DB4644E6146DE0E7239C5273F79C931193F542D62979ACB907C9368A315DCE1 to get information for another transaction | ||
okp4d query tx 4DB4644E6146DE0E7239C5273F79C931193F542D62979ACB907C9368A315DCE1 \ | ||
--node https://api.testnet.okp4.network:443/rpc \ | ||
--output json | jq '.tx.body.messages[0]' | ||
--node https://api.testnet.okp4.network:443/rpc \ | ||
--output json | jq '.tx.body.messages[0]' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
#!/bin/bash | ||
|
||
set -euo pipefail | ||
|
||
# change the hash 4DB4644E6146DE0E7239C5273F79C931193F542D62979ACB907C9368A315DCE1 to get information for another transaction | ||
okp4d query tx 4DB4644E6146DE0E7239C5273F79C931193F542D62979ACB907C9368A315DCE1 \ | ||
--node https://api.testnet.okp4.network:443/rpc \ | ||
--output json | jq '.logs[0].events[] | select(.type == "transfer").attributes' | ||
--node https://api.testnet.okp4.network:443/rpc \ | ||
--output json | jq '.logs[0].events[] | select(.type == "transfer").attributes' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
#!/bin/bash | ||
|
||
set -euo pipefail | ||
|
||
# Get all transfer transactions where the recipient is okp41r0pf2d78w8w29sm9a6qm8x6yqshezm0k6vwcrg and the amount is 500000uknow | ||
okp4d query txs \ | ||
--events 'transfer.recipient=okp41r0pf2d78w8w29sm9a6qm8x6yqshezm0k6vwcrg&transfer.amount=500000uknow' \ | ||
--node https://api.testnet.okp4.network:443/rpc \ | ||
--page 1 --limit 50 \ | ||
--output json | jq '{total_count: .total_count, txs: [.txs[] | {txhash: .txhash, date: .timestamp, txdata: .logs[0].events[] | select(.type == "transfer").attributes}]}' | ||
--events 'transfer.recipient=okp41r0pf2d78w8w29sm9a6qm8x6yqshezm0k6vwcrg&transfer.amount=500000uknow' \ | ||
--node https://api.testnet.okp4.network:443/rpc \ | ||
--page 1 --limit 50 \ | ||
--output json | jq '{total_count: .total_count, txs: [.txs[] | {txhash: .txhash, date: .timestamp, txdata: .logs[0].events[] | select(.type == "transfer").attributes}]}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
#!/bin/bash | ||
|
||
set -euo pipefail | ||
|
||
# instantiate an objectarium (code id = 4) smart contract | ||
# see https://docs.okp4.network/contracts/okp4-objectarium#instantiatemsg | ||
# replace okp41cu9wzlcyyxpek20jaqfwzu3llzjgx34cwnv2v5 with your wallet address | ||
okp4d tx wasm instantiate 4 \ | ||
--label "cli-instanciate-test-$(date +%s)" \ | ||
--from okp41cu9wzlcyyxpek20jaqfwzu3llzjgx34cwnv2v5 \ | ||
--admin okp41cu9wzlcyyxpek20jaqfwzu3llzjgx34cwnv2v5 \ | ||
--gas 1000000 \ | ||
--chain-id okp4-nemeton-1 --node https://api.testnet.okp4.network:443/rpc \ | ||
'{"bucket":"cli-tutorial-bucket"}' | ||
|
||
--label "cli-instanciate-test-$(date +%s)" \ | ||
--from okp41cu9wzlcyyxpek20jaqfwzu3llzjgx34cwnv2v5 \ | ||
--admin okp41cu9wzlcyyxpek20jaqfwzu3llzjgx34cwnv2v5 \ | ||
--gas 1000000 \ | ||
--chain-id okp4-nemeton-1 --node https://api.testnet.okp4.network:443/rpc \ | ||
'{"bucket":"cli-tutorial-bucket"}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
#!/bin/bash | ||
|
||
set -euo pipefail | ||
|
||
okp4d query logic ask \ | ||
--node https://api.testnet.okp4.network:443/rpc \ | ||
--program "memberOf(alice, council). memberOf(bob,council). can_vote(X) :- memberOf(X, council)." \ | ||
"can_vote(X)." | ||
--node https://api.testnet.okp4.network:443/rpc \ | ||
--program "memberOf(alice, council). memberOf(bob,council). can_vote(X) :- memberOf(X, council)." \ | ||
"can_vote(X)." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
#!/bin/bash | ||
|
||
set -euo pipefail | ||
|
||
okp4d query logic ask \ | ||
--node https://api.testnet.okp4.network:443/rpc \ | ||
--program-file my_knowledgebase.pl \ | ||
"can_vote(X)." | ||
--node https://api.testnet.okp4.network:443/rpc \ | ||
--program-file my_knowledgebase.pl \ | ||
"can_vote(X)." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,15 @@ | ||
#!/bin/bash | ||
|
||
set -euo pipefail | ||
|
||
# instantiate a law stone (code id = 5) smart contract | ||
# see https://docs.okp4.network/contracts/okp4-law-stone#instantiatemsg | ||
# replace mywallet with your wallet name | ||
okp4d tx wasm instantiate 5 \ | ||
--from mywallet \ | ||
--label "rules-tutorial-ex-$(date +%s)" \ | ||
--no-admin \ | ||
--chain-id okp4-nemeton-1 \ | ||
--gas 1000000 \ | ||
--node https://api.testnet.okp4.network:443/rpc \ | ||
"{\"program\":\"$(cat my_knowledgebase.pl | base64 | tr -d '\n\r')\", \"storage_address\": \"okp41lppz4x9dtmccek2m6cezjlwwzup6pdqrkvxjpk95806c3dewgrfq602kgx\"}" | ||
--from mywallet \ | ||
--label "rules-tutorial-ex-$(date +%s)" \ | ||
--no-admin \ | ||
--chain-id okp4-nemeton-1 \ | ||
--gas 1000000 \ | ||
--node https://api.testnet.okp4.network:443/rpc \ | ||
"{\"program\":\"$(cat my_knowledgebase.pl | base64 | tr -d '\n\r')\", \"storage_address\": \"okp41lppz4x9dtmccek2m6cezjlwwzup6pdqrkvxjpk95806c3dewgrfq602kgx\"}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,12 @@ | ||
#!/bin/bash | ||
|
||
set -euo pipefail | ||
|
||
okp4d query wasm contract-state smart okp41lppz4x9dtmccek2m6cezjlwwzup6pdqrkvxjpk95806c3dewgrfq602kgx \ | ||
--output json \ | ||
--chain-id okp4-nemeton-1 \ | ||
--node https://api.testnet.okp4.network:443/rpc \ | ||
"{\"object_data\": {\"id\": $(okp4d query txs --events 'message.sender=okp41z4ldttn975ku764er2nvtfq47n6n7jfxnkc2k9&instantiate.code_id=5' \ | ||
--chain-id okp4-nemeton-1 --node https://api.testnet.okp4.network:443/rpc \ | ||
--output json | jq '.txs[-1].logs[-1].events[] | select(.type == "wasm").attributes[] | select(.key == "id").value')}}" \ | ||
| jq '.data' | tr -d '"' | base64 -d | ||
--output json \ | ||
--chain-id okp4-nemeton-1 \ | ||
--node https://api.testnet.okp4.network:443/rpc \ | ||
"{\"object_data\": {\"id\": $(okp4d query txs --events 'message.sender=okp41z4ldttn975ku764er2nvtfq47n6n7jfxnkc2k9&instantiate.code_id=5' \ | ||
--chain-id okp4-nemeton-1 --node https://api.testnet.okp4.network:443/rpc \ | ||
--output json | jq '.txs[-1].logs[-1].events[] | select(.type == "wasm").attributes[] | select(.key == "id").value')}}" | | ||
jq '.data' | tr -d '"' | base64 -d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
#!/bin/bash | ||
|
||
set -euo pipefail | ||
|
||
# evaluate a Prolog query | ||
# from rules stored on a specific "law stone" smart contract instance | ||
okp4d query wasm contract-state smart okp41dey5a35ssvfulh2xud3nkwk423fp0t40nga4a8xykx9frmhm6jpqne0alf \ | ||
--node https://api.testnet.okp4.network:443/rpc \ | ||
"{\"ask\": {\"query\": \"can_vote(X).\"}}" | ||
--node https://api.testnet.okp4.network:443/rpc \ | ||
"{\"ask\": {\"query\": \"can_vote(X).\"}}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
#!/bin/bash | ||
|
||
set -euo pipefail | ||
|
||
# To get the list of all available predicates, | ||
# you can query the logic module parameters | ||
okp4d --node "https://api.testnet.okp4.network:443/rpc" \ | ||
query logic params -ojson \ | ||
| jq -r '.params.interpreter.predicates_filter | "whitelist: " + (.whitelist | join(", ")) + "\nblacklist: " + (.blacklist | join(", "))' | ||
query logic params -ojson | | ||
jq -r '.params.interpreter.predicates_filter | "whitelist: " + (.whitelist | join(", ")) + "\nblacklist: " + (.blacklist | join(", "))' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
#!/bin/bash | ||
|
||
set -euo pipefail | ||
|
||
# Want to know the Stargaze (stars) address from an OKP4 one? | ||
# Here is an example to get it from okp416rry8kjuzpxezhf4g4lvjk67mkjc95lterek2u: | ||
okp4d query logic ask \ | ||
--node https://api.testnet.okp4.network:443/rpc \ | ||
"bech32_address(-(Prefix, Words), okp416rry8kjuzpxezhf4g4lvjk67mkjc95lterek2u), bech32_address(-(stars, Words), StarsEncodedAddr)." | ||
--node https://api.testnet.okp4.network:443/rpc \ | ||
"bech32_address(-(Prefix, Words), okp416rry8kjuzpxezhf4g4lvjk67mkjc95lterek2u), bech32_address(-(stars, Words), StarsEncodedAddr)." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,15 @@ | ||
#!/bin/bash | ||
|
||
set -euo pipefail | ||
|
||
# instantiate a cognitarium (code id = 7) smart contract | ||
# see https://docs.okp4.network/contracts/okp4-cognitarium#instantiatemsg | ||
# replace okp41cu9wzlcyyxpek20jaqfwzu3llzjgx34cwnv2v5 by your wallet address | ||
okp4d tx wasm instantiate 7 \ | ||
--from okp41cu9wzlcyyxpek20jaqfwzu3llzjgx34cwnv2v5 \ | ||
--label "ontology-tutorial-ex-$(date +%s)" \ | ||
--admin okp41cu9wzlcyyxpek20jaqfwzu3llzjgx34cwnv2v5 \ | ||
--chain-id okp4-nemeton-1 \ | ||
--gas 1000000 \ | ||
--node https://api.testnet.okp4.network:443/rpc \ | ||
"{}" | ||
--from okp41cu9wzlcyyxpek20jaqfwzu3llzjgx34cwnv2v5 \ | ||
--label "ontology-tutorial-ex-$(date +%s)" \ | ||
--admin okp41cu9wzlcyyxpek20jaqfwzu3llzjgx34cwnv2v5 \ | ||
--chain-id okp4-nemeton-1 \ | ||
--gas 1000000 \ | ||
--node https://api.testnet.okp4.network:443/rpc \ | ||
"{}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
#!/bin/bash | ||
|
||
set -euo pipefail | ||
|
||
# replace with your cognitarium instantiation transaction hash | ||
okp4d query tx E0985541A08D1DCCA4F362DE445E44FB26A3AB374F84F9335B3EFCF247F263DA \ | ||
--node https://api.testnet.okp4.network:443/rpc \ | ||
--output json \ | ||
| jq '.logs[0].events[] | select(.type == "instantiate").attributes[] | select(.key == "_contract_address").value' | ||
--node https://api.testnet.okp4.network:443/rpc \ | ||
--output json | | ||
jq '.logs[0].events[] | select(.type == "instantiate").attributes[] | select(.key == "_contract_address").value' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,14 @@ | ||
#!/bin/bash | ||
|
||
set -euo pipefail | ||
|
||
# insert triples from a file in a cognitarium instance (okp41wn625s4jcmvk0szpl85rj5azkfc6suyvf75q6vrddscjdphtve8sug4ars) | ||
# you should replace the smart contract address as you can only insert in a database (cognitarium instance) you created | ||
# execute an 'insert_data' message, see https://docs.okp4.network/contracts/okp4-cognitarium#executemsginsertdata | ||
# replace mywalokp41cu9wzlcyyxpek20jaqfwzu3llzjgx34cwnv2v5let by your wallet address | ||
okp4d tx wasm execute okp41wn625s4jcmvk0szpl85rj5azkfc6suyvf75q6vrddscjdphtve8sug4ars \ | ||
--from okp41cu9wzlcyyxpek20jaqfwzu3llzjgx34cwnv2v5 \ | ||
--gas 10000000 \ | ||
--node https://api.testnet.okp4.network:443/rpc \ | ||
--chain-id okp4-nemeton-1 \ | ||
"{\"insert_data\":{\"format\": \"turtle\", \"data\": \"$(cat 03230ce7-d8cb-410e-919e-19c480c1dd75.ttl | base64 | tr -d '\n\r')\"}}" | ||
--from okp41cu9wzlcyyxpek20jaqfwzu3llzjgx34cwnv2v5 \ | ||
--gas 10000000 \ | ||
--node https://api.testnet.okp4.network:443/rpc \ | ||
--chain-id okp4-nemeton-1 \ | ||
"{\"insert_data\":{\"format\": \"turtle\", \"data\": \"$(cat 03230ce7-d8cb-410e-919e-19c480c1dd75.ttl | base64 | tr -d '\n\r')\"}}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,14 @@ | ||
#!/bin/bash | ||
|
||
set -euo pipefail | ||
|
||
# insert triples from a file in a cognitarium instance (okp41wn625s4jcmvk0szpl85rj5azkfc6suyvf75q6vrddscjdphtve8sug4ars) | ||
# you should replace the smart contract address as you can only insert in a database (cognitarium instance) you created | ||
# execute an 'insert_data' message, see https://docs.okp4.network/contracts/okp4-cognitarium#executemsginsertdata | ||
# replace mywalokp41cu9wzlcyyxpek20jaqfwzu3llzjgx34cwnv2v5let by your wallet address | ||
okp4d tx wasm execute okp41wn625s4jcmvk0szpl85rj5azkfc6suyvf75q6vrddscjdphtve8sug4ars \ | ||
--from okp41cu9wzlcyyxpek20jaqfwzu3llzjgx34cwnv2v5 \ | ||
--gas 10000000 \ | ||
--node https://api.testnet.okp4.network:443/rpc \ | ||
--chain-id okp4-nemeton-1 \ | ||
"{\"insert_data\":{\"format\": \"n_quads\", \"data\": \"$(cat nquads_example.nq | base64 | tr -d '\n\r')\"}}" | ||
--from okp41cu9wzlcyyxpek20jaqfwzu3llzjgx34cwnv2v5 \ | ||
--gas 10000000 \ | ||
--node https://api.testnet.okp4.network:443/rpc \ | ||
--chain-id okp4-nemeton-1 \ | ||
"{\"insert_data\":{\"format\": \"n_quads\", \"data\": \"$(cat nquads_example.nq | base64 | tr -d '\n\r')\"}}" |
Oops, something went wrong.