Skip to content

timstackblock/automateChainhooks

Repository files navigation

automate-chainhooks

automate-chainhooks is a npm script for automation testing of chainhook

Prerequisites

Run script

  1. Go to the root of the project and do npm install. Make sure you have satisfied the above Prerequisites.
  2. Start ngrok using the command ngrok http 3006. Once it starts, provide the ngrok URL in the .env file for DOMAIN_URL. This is required to post the result for the http predicates. You can check the ngrok requests at localhost:4040
  3. Run all the predicates:
    $ npm run predicates
  4. Run all the file result predicates:
    $ npm run file-predicates
  5. Run all the POST URL predicates:
    $ npm run post-predicates
  6. Clear all the result files:
    $ npm run clear-result-files
  7. Run transaction predicate for file append and POST
    $ predicate=transaction npm run predicates
  8. Run print-event predicate for file append and POST
    $ predicate=print-event npm run predicates
  9. Run nft-event predicate for file append and POST
    $ predicate=nft-event npm run predicates
  10. Run ft-event predicate for file append and POST
    $ predicate=ft-event npm run predicates
  11. Run contract-deployment predicate for file append and POST
    $ predicate=contract-deployment npm run predicates
  12. Run contract-call predicate for file append and POST
    $ predicate=contract-call npm run predicates
  13. Run block-height predicate for file append and POST
    $ predicate=block-height npm run predicates
  14. Run stx-event predicate for file append and POST
    $ predicate=stx-event npm run predicates
    
    

Bitcoin

Run the bitcoind with ./bitcoind -rpcuser=root -rpcpassword=root. Set this user and root in Chainhook.toml file and run the command as chainhook predicates scan ./tests/bitcoin-predicates/ordinals-protocol/ordinals-protocol-file.json --config-path=./Chainhook.toml

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published