- 29/02/24: Migrate to the Starknet v0.6.0 OpenRPC spec, release Beerus v0.4.0
- 17/01/24: Eiger is taking over Beerus!
Beerus relies on TWO untrusted RPC endpoints, one for L1 (Ethereum), and one for L2 (Starknet). As these are untrusted they will typically not be nodes run on your local host or your local network.
Beerus requires the v0.6.0 of the Starknet OpenRPC specs.
These untrusted RPC providers must adhere to both the L1 eth_getProof
endpoint
as well as the L2 pathfinder_getProof
endpoint (detailed instructions needed!).For this we recommend using
Alchemy as your untrusted L2 node provider.
More API providers can be found here.
NOTE: we rely on helios for both valid checkpoint values and consensus rpc urls
field | example | description |
---|---|---|
network | MAINNET or GOERLI | network to query |
eth_execution_rpc | https://eth-mainnet.g.alchemy.com/v2/YOURAPIKEY | untrusted l1 node provider url |
starknet_rpc | https://starknet-mainnet.g.alchemy.com/starknet/version/rpc/v0.6/YOURAPIKEY | untrusted l2 node provider url |
data_dir | tmp | OPTIONAL location to store both l1 and l2 data |
poll_secs | 5 | OPTIONAL seconds to wait for querying sn state |
rpc_addr | 127.0.0.1:3030 | OPTIONAL local address to listen for rpc reqs |
fee_token_addr | 0x049d36...e004dc7 | OPTIONAL fee token to check for getBalance |
Copy the configuration file from etc/conf/beerus.toml
and set up the API provider URLs in the copy.
Then run:
cargo run --release -- -c ./path/to/config.toml
# Once Beerus has started,
hurl etc/rpc/starknet_getStateRoot.hurl
cargo build --all --release
cargo test --all
docker build . -t beerus
docker run -e NETWORK=<arg> -e ETH_EXECUTION_RPC=<arg> -e STARKNET_RPC=<arg> -it beerus
ALCHEMY_API_KEY='YOURAPIKEY' cargo run --example basic
ALCHEMY_API_KEY='YOURAPIKEY' cargo run --example call
Dependencies:
- npm
- CORS bypass
- local pathfinder node at
http://localhost:9545
- execution env var -
ETH_EXECUTION_RPC
cd etc/wasm
# install node deps
npm i
# build webpack & wasm modules
npm run build
# run example
./run.sh
# navigate browser to http://localhost:8080
# open developer console
Beerus follows good practices of security, but 100% security cannot be assured. Beerus is provided "as is" without any warranty. Use at your own risk.
- Huge props to A16z for their work on helios.
Thanks goes to these wonderful people (emoji key):
This project follows the all-contributors specification. Contributions of any kind welcome!