Giter Site home page Giter Site logo

hello-starknet's Introduction

hello-starknet

https://starknet.io/docs

Install

pyenv install 3.9.14
pyenv local 3.9.14
python -m venv ./venv
source ./venv/bin/activate

pip3 install ecdsa fastecdsa sympy

pip3 install cairo-lang

# nile
sudo apt install -y libgmp3-dev

pip install cairo-nile
nile init

pytest tests

touch .env
# ACCOUNT_1=0x123456

# list starknet accounts
cat ~/.starknet_accounts/starknet_open_zeppelin_accounts.json

StarkNet account

export STARKNET_NETWORK=alpha-goerli
export STARKNET_WALLET=starkware.starknet.wallets.open_zeppelin.OpenZeppelinAccount

# create account
starknet new_account

Nile

pip install cairo-nile openzeppelin-cairo-contracts

nile compile
nile node

Topics

Starknet

  • account abstraction

  • remix

  • hello world

  • comments

  • felt

  • counter

  • function (input, outputs)

  • Reference 'syscall_ptr' was revoked (function must be defined before called)

  • revoked refs

  • variable

    • let
    • tempvar
    • local?
    • storage
  • assert

  • if / else

  • @storage_var - declares variable to be stored in storage

  • @external - function can be called by other users and contracts

  • @view - same as @external, in addition read-only

  • builtins

  • implicit args

  • import

  • token

  • wallet

  • math

  • boolean expressions

  • error

  • map

  • visibility

  • namespace

  • recursion

  • memory array

  • state variable array?

  • array calldata

  • pointer

  • struct

  • struct calldata

  • tuple

  • alloc

  • emit event

    • low level emit_event
  • private data are not private

  • constructor

  • storage - multi values, struct,

  • storage with struct

  • sender

  • block info

  • tx info

  • interface, calling other contracts

  • delegate call (library call)

  • factory

  • L2 fees

  • L1 -> L2 fees

  • L2 -> L1 fees

  • L2 to L1

  • L1 to L2

  • default entry point

  • L1 default

  • library call l1 handler

  • hash (keccak, pedersen)

  • pedersen hash

  • ecdsa

  • signature

  • amm

  • token bridge

    • cancel
    • fee
  • cast

  • curve like amm?

  • cross chain amm

cairo

  • registers

    • ap
    • fp?
    • pc
  • tools (nile)

starks

Compile and run cairo

cairo-compile test.cairo --output test_compiled.json

cairo-run \
  --program=test_compiled.json --print_output \
  --print_info --relocate_prints

cairo-compile felt.cairo --output felt_compiled.json
cairo-run --program felt_compiled.json --print_output --layout=small

hello-starknet's People

Contributors

t4sk avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  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.