BAC-L2-COSMOS-119Cosmos SDK
CosmWasm II — integrating with native modules
Making contracts and native modules talk to each other, and deciding what must stay in the protocol rather than move into a contract.
- Level
- L2 — Appchain developer
- Duration
- 4 h
- Track
- Cosmos SDK
- Maintainer
- Cosmos Lead Architect
Learning objectives
- 01Call a native module from a contract
- 02Handle sub-message replies and errors
- 03Decide between native module and contract on explicit criteria
Guided lab
Make the attestation contract interact with the native traceability module.
Independent lab
Compare cost and latency for the same feature as a contract, then as a native module.
Security angle
A sub-message whose failure is unhandled leaves state inconsistent: build the test that proves it.
Assessment
Costed comparative study plus an integration demonstration.
