BIP-119 CTV Meeting #4 Draft Agenda for Tuesday February 22nd at 12:00 PT



Summary:

This message is a tutorial by Jeremy Rubin on how to use the Sapio CLI to generate contracts and play with them on the network. The tutorial uses a congestion control tree because it's very simple. The steps are listed below. Firstly, install JQ (json manipulating tool) if you don't have it / other things needed to run a bitcoin node. Secondly, set up a node as described above. You'll likely want settings like this in your bitcoin.conf too. Follow the install instructions on https://learn.sapio-lang.org/ch01-01-installation.html. You can skip the sapio-studio part / pod part and just do the Local Quickstart up until "Instantiate a contract from the plugin".Open up the site https://rjsf-team.github.io/react-jsonschema-form/ and run *sapio-cli contract api --fileplugin-example/target/wasm32-unknown-unknown/debug/sapio_wasm_plugin_example.wasm*. Copy the resulting JSON into the RJSF site and fill out the form as you wish. You should see a JSON. You may have to delete some extra fields (that site is a little buggy). Optionally, just modify the JSON above directly.Copy the JSON and paste it into a file ARGS.json. Find your sapio-cli config file and modify it. Create a contract template and get a proposed funding & binding of the template to that utxo. Finalize the funding tx and review the hex transaction/make sure you want this contract... and then send to network.Lastly, send the other transactions. There are many more things you can try out such as loading up the Sapio Studio and trying it through the GUI, modifying the congestion control tree code and recompile it, and trying out other contracts.


Updated on: 2023-06-15T17:09:24.711512+00:00