Skip to main content

basics

Threadbag Basics

Start Job:

curl -X POST -H "Content-Type: application/json" -d '{"id": "qSxt94jqC"
}' https://th-0.bagpipes.io/job/start

Stop Job:

curl -X POST -H "Content-Type: application/json" -d '{"id": "qSxt94jqC"}' https://th-0.bagpipes.io/job/stop

Query for execution logs:

After we have started the job we want to continously query for logs. T his can be see as the status update/main logger that will give you all output generated by the scenario worker.

curl -X POST "https://th-0.bagpipes.io/scenario/worker/logs" \
-H "Content-Type: application/json" \
-d '{"id": "qSxt94jqC"}'

Query for drafted transactions:

All transactions that gets drafted are stored in a Mempool inspired transaction log:

curl -X POST "https://th-0.bagpipes.io/scenario/tx" \
-H "Content-Type: application/json" \
-d '{"id": "qSxt94jqC"}'
{"mempool":[{"chain":"polkadot","amount":"0","txType":"ChainQuery","Dat
e":"2024-06-01T22:35:39.319179786Z","tx":"{\"nonce\":\"8\",\"consumers\
":\"0\",\"providers\":\"1\",\"sufficients\":\"0\",\"data\":{\"free\":\"
13,096,674,612\",\"reserved\":\"0\",\"frozen\":\"0\",\"flags\":\"170,14
1,183,460,469,231,731,687,303,715,884,105,728\"}}"}]}

An example for running a scenario with threadbag and your own local signer can be found here:
https://github.com/BagpipesOrg/threadbag-examples