Skip to content

baitcode/starkbiter-python-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About

This is a repo showcasing usage of starkbitier python bindings to simulate behaviors over the Starknet blockchain.

This project PDM for dependency management.

To create env do:

pdm venv create

To activate it:

eval $(pdm venv activate)

To install dependencies when env activated:

pdm install

To download snapshot use:

wget --continue https://starkbiter-snapshot.s3.eu-west-1.amazonaws.com/mainnet-2025-08-10-trim.sqlite mainnet.sqlite 

To run the example:

python src/main.py

Structure

starkbiter package has wrappers around starkbiter_bindings. known_calls - collection of factories for Call objects for known contracts (ekubo core, swapper, UDC) accounts - contains Account class that exposes call and execute methods middleware - is a class to interact with environment, is not supposed to be shared among several threads. Consider it a connection. Every thread (or coroutine) should have it's own. environement - is blockchain instance. One per label. Also has Token classifier.

main.py is the example on how to spin the environment, fork it, and run agents that interact with it

Please, check main.py for more examples.

Library relies heavily on nethermind.starknet-abi lib.

Compatibility

Currently starkbiter only has wheel for python 3.12.x version MAC OS (darwin) version.

About

Example of calling starkbiter from Python.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages