Skip to content

Adapter application for consuming web3 messages from ie. wallets, and passing them on to starknet

License

Notifications You must be signed in to change notification settings

manazpr/starknet-web3-rpc-adapter

 
 

Repository files navigation

🐍 web3 to StarkNet json-rpc adapter

Development setup

Clone deps with submodules

git clone --recurse-submodules [email protected]:software-mansion-labs/starknet-web3-rpc-adapter.git 

Install dependencies

poetry install
yarn --cwd client install

Setup envs

Setup envs as showed in .env.example, for instance using direnv.

Git hooks

Run this snippet to enable lint checks and automatic formatting before commit/push.

cp pre-push ./.git/hooks/
cp pre-commit ./.git/hooks/
chmod +x ./.git/hooks/pre-commit
chmod +x ./.git/hooks/pre-push

Certificates

Metamask support suggesting nodes only with https. Install mkcert first.

mkcert -key-file key.pem -cert-file cert.pem example.com *.example.com

Running demo

In separate terminals start required services:

Dev network & setup contracts: poe devnet

Run server:

po devserver

Run client:

poe dev

You can run interactive python shell with account and erc20 available:

CAIRO_PATH=./contracts/keccak-cairo/keccak:./contracts/cairo-contracts/ PYTHONPATH=$PWD poetry run python -i contracts/interactive.py ETH_ADDRESS

Open http://localhost:1234/ and click "CONNECT TO METAMASK".

About

Adapter application for consuming web3 messages from ie. wallets, and passing them on to starknet

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Cairo 55.1%
  • TypeScript 24.7%
  • Python 19.5%
  • Other 0.7%