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
call
yarn test -g "register name"
or
yarn mocha test/integration.ts
call
yarn test -g "pay invoice"
or
yarn mocha test/integration-client.ts
-
Clarity vs Solidity (11 Sep 2020)
Quick comparison of the two smart contract languages -
Clarity vs Common Smart Contract Security Flaws (25 Sep 2020)
Discussion about Blockstack's blog post. -
Build a Clarity program from scratch (16 Oct 2020)
Using Clarity tools, a registry contract is built usingdefine-data-var
,define-map
,define-public
,define-private
,define-read-only
,map-insert
.
Links: -
Deploy to testnet (30 Oct 2020)
Adding a lookup map and anupdate
function to the contract usingmap-set
; deploying to testnet using Clarity tools as well as Sandbox in testnet explorer. Issues we had:strings-ascii
type not supported by Clarity VMClarity Tools usingbuf
instead ofbuff
Onlybuff
values can be entered in Testnet Explorer
Links:
-
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 theupdate
function using javascript methods. Issues:callReadOnlyFunction
in stacks.js fails to deserialize result
Links:
-
Pay an invoice (24 Nov 2020)
Using Gitpod, adding a client contract usingcontract-call?
,stx-transfer
,stx-get-balance
. Issues:duplicate calls of register test file in mocha test
Links: