Contracts
Test before compiling
Section titled “Test before compiling”labcoat testlabcoat test contracts/MyToken.rsNative Rust integration tests run contracts through labcoat-test, keeping the
fast feedback loop outside the chain.
Compile
Section titled “Compile”labcoat compile contracts/MyToken.rsCompilation writes:
build/MyToken.wasm: raw deployable module.build/MyToken.wasm.gz: compressed distribution artifact.build/MyToken.abi.json: opcode, input, and output metadata.
Deploy
Section titled “Deploy”labcoat deploy build/MyToken.wasm --dry-runlabcoat deploy build/MyToken.wasm --name MyTokenDeployment uses a Bitcoin commit/reveal envelope, waits for the create trace,
and records the resulting block:tx ID in labcoat.lock.
Simulate and call
Section titled “Simulate and call”labcoat simulate MyToken 99labcoat call MyToken 77 500Arguments may be decimal u128, 0x hexadecimal, or strings up to 16 bytes
packed little-endian. Simulation never broadcasts. Calls create a transaction
and wait for indexing and decoded execution status.
labcoat trace <txid> --waitTrace output includes decoded create, invoke, return, and revert events across every protostone in the transaction.