Skip to content

Learning journey: update Writing Contracts section #598

@critesjosh

Description

@critesjosh

/developers/guides/smart_contracts/writing_contracts

When writing a program, the starting point is always ALWAYS to define your state model. State first, interface second. How your state is defined will define the structure of the functions that update your state. Our “Writing Contracts” section should open with explaining the state model and WHY the model is what it is (why do we need a map, why do we need nullifiers). Only then do we define the functions that update state. The contract writing section is supposed to be a learning aide - I learn very little from reading this right now.

Creating custom private storage data structures is something that developers are curious about relatively early in their learning journey. The current page on creating custom notes is buried and needs to be improved.

  • update the ordering of how-to section sidebar items:
    1. start with setup
    2. developing contracts
    3. using JS
    4. setting up testnet
  • make it clear what data types are available in private and public (add a page on data types, lots of this info is buried in /developers/reference/smart_contract_reference/storage/private_state)
    • there is additional relevant explanation in the reference section /developers/reference/smart_contract_reference/storage
  • Remove the "overview" section on /developers/guides/smart_contracts/writing_contracts. its too much info with too little context. just keep the card list for now

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions