How to build a dapp in Cairo


Encode

Beginner

  • Cairo
  • hackathon

Welcome to the third workshop of the Starknet Hackathon. Today, Vishnu from zkX will lead a session focusing on smart contracts in Cairo and the Starknet ecosystem. Vishnu shares his journey from developing on Ethereum with Solidity to working with Starknet and Cairo. He discusses the challenges of using Cairo, including recursion over iteration, limited data types, and debugging complexities. Despite these, he highlights the growing community support and improved developer tools.

Vishnu also demonstrates a simple decentralized application (dApp) that bridges communication between Ethereum (L1) and Starknet (L2), detailing how messages are transferred between the two layers. He explains the process of compiling, deploying, and interacting with smart contracts on Starknet, emphasizing the benefits of Starknet’s scalability and lower transaction costs compared to Ethereum.

The workshop concludes with a Q&A session, where Vishnu answers questions about the differences between Starknet and other Layer 2 solutions like Optimism, the future of Cairo, and security considerations in smart contract development.