0xSpaceShard / starknet-devnet-rs

A local testnet for Starknet... in Rust
https://0xspaceshard.github.io/starknet-devnet-rs/
MIT License
104 stars 60 forks source link

Configure CLI arguments from environment variables #482

Closed fracek closed 3 months ago

fracek commented 3 months ago

I'm using starknet-devnet-rs to test Starknet React V3 and we're hitting an issue with pending blocks and accounts (related to #474). The --blocks-on-demand flag helps with the issue.

We're running devnet as a service in our github actions, but github actions doesn't allow passing additional arguments to the container. I propose to make all cli arguments configurable through environment variables so that they can be used in ci.

FabijanC commented 3 months ago

I'm assigning myself. Seems like it could be as simple as

Note

--cli-params take precedence over ENV_VARS

I.e. ACCOUNTS=0 cargo run -- --accounts 1 would spawn one predeployed account

Would also enable closing of #475.