Skip to content

Latest commit

 

History

History
72 lines (47 loc) · 2.37 KB

README.md

File metadata and controls

72 lines (47 loc) · 2.37 KB

Camp 3: StarkNet

Presentation Video Workshop
StarkNet StarkNet Basecamp p1, p2 StarkNet Messaging Bridge

Topics

  1. Blocks
  2. TX Lifecycle
  3. StarkNet Contracts
  4. Storage
  5. Accounts
  6. StarkNet OS
  7. State Transition/Fees

Blocks

TX Lifecycle

On StarkNet Alpha the two types of transactions are DEPLOY or INVOKE. They go through the following lifecycle as they are submitted from the clients to the sequencer:

NOT_RECEIVED -> RECEIVED -> PENDING -> REJECTED || ACCEPTED_ON_L2 -> ACCEPTED_ON_L1

StarkNet Contracts

Contracts on StarkNet are written in Cairo or can be transpiled to Cairo from Solidity code via Warp. We will be building more sophisticated smart contracts in the next camps, for now let's compile and deploy our simple examples:

Cairo

cd contracts/cairo
starknet-compile ../counter.cairo --output counter_compiled.json --abi counter_abi.json
starknet deploy --contract counter_compiled.json

Solidity

cd contracts/solidity
warp transpile ERC20.sol WARP
warp deploy ERC20.json

UNDER CONSTRUCTION:

While this section is being built we recommend reading the video session for this camp and the starknet docs.


Storage

Accounts

StarkNet OS

The StarkNet OS is the Cairo program that runs StarkNet. The OS handles everything which is done on the network — contract deployment, transaction execution, L1<>L2 messages and more.

State Transition/Fees


Sources

[https://github.com/eqlabs/pathfinder/blob/2fe6f549a0b8b9923ed7a21cd1a588bc571657d6/crates/pathfinder/resources/fact_retrieval.py]