Skip to content

Companion repo for Clarity Video Series by Harini and Friedger

License

Notifications You must be signed in to change notification settings

friedger/clarity-demo

Repository files navigation

Gitpod ready-to-code

clarity-demo

Companion repo for Clarity Video Series by Harini and Friedger

Use the following command to start mocknet:

gitpod /workspace/clarity-demo $ ~/tools/stacks-blockchain/target/release/stacks-node start --config=Stacks.toml

Deploy and test developer registry

call

yarn test -g "register name"

or

yarn mocha test/integration.ts

Pay invoice

call

yarn test -g "pay invoice"

or

yarn mocha test/integration-client.ts

Video Series

  1. Clarity vs Solidity (11 Sep 2020)
    Quick comparison of the two smart contract languages

  2. Clarity vs Common Smart Contract Security Flaws (25 Sep 2020)
    Discussion about Blockstack's blog post.

  3. Build a Clarity program from scratch (16 Oct 2020)
    Using Clarity tools, a registry contract is built using define-data-var, define-map, define-public, define-private, define-read-only, map-insert.
    Links:

  4. Deploy to testnet (30 Oct 2020)
    Adding a lookup map and an update function to the contract using map-set; deploying to testnet using Clarity tools as well as Sandbox in testnet explorer. Issues we had:

    • strings-ascii type not supported by Clarity VM
    • Clarity Tools using buf instead of buff
    • Only buff values can be entered in Testnet Explorer

    Links:

  5. Using NFTs on mocknet (13 Nov 2020)
    Still using Clarity Tools, adding NFTs to protect data update function;
    Using Gitpod, running a fast, local blockchain, aka mocknet and testing the update function using javascript methods. Issues:

    • callReadOnlyFunction in stacks.js fails to deserialize result

    Links:

  6. Pay an invoice (24 Nov 2020)
    Using Gitpod, adding a client contract using contract-call?, stx-transfer, stx-get-balance. Issues:

    • duplicate calls of register test file in mocha test

    Links:

About

Companion repo for Clarity Video Series by Harini and Friedger

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published