Code Monkey home page Code Monkey logo

piltover's Introduction

Check Workflow Status Build Workflow Status

Exploration_Team

Overview

Starknet Core Contract components in Cairo.

Repository architecture

The different tasks of the Starknet Core Contract are here mapped to what we can call an "Appchain" Core Contract.

The functionalities of the core contract are split over several components. Each component is usually placed into a directory, event if it is simple. Doing so allow a good separation of additional files that may be written in the context of a component.

Due to a limitation of starknet foundry, we can't declare a contract that is defined under the tests directory. For this reason, mock contract are defined in their respective component location. This is also a good way for the component write to illustrate the minimum required to use the component.

  • appchain.cairo: core contract of the appchain on Starknet.

  • config: base configuration for the core contract.

  • messaging: messaging between Appchain - Starknet.

Build

To build the project, run:

scarb build

Test

To test the project, run:

snforge test

Code style (cairo)

  • Use snake_case for module name and not PascalCase.

  • Don't import directly a function from a module.

// Prefer that:
let addr = starknet::contract_address_const::<0>();

// Instead of:
use starknet::contract_address_const;
let addr = contract_address_const::<0>();
  • Document functions inside the trait, and add details if needed in the implementation.

piltover's People

Contributors

akashneelesh avatar b-j-roberts avatar drspacemn avatar glihm avatar tadev0 avatar thomas192 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.