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

Add an endpoint to retrieve accounts with current balance #495

Closed dsperac closed 2 months ago

dsperac commented 2 months ago

Currently fetching predeployed accounts returns data with only the initial balance.

Requirement: Extend a current endpoint (e.g. /predeployed_accounts?with_balance=true) or create a new endpoint that would return the accounts with current balance included.

FabijanC commented 2 months ago

We can consider completely removing the initial_balance property. I can't think of a good purpose for it. If someone wants to know the predeployed account balance on Devnet startup, they can simply call GET /account_balance after startup. And once Devnet has been up for some time - why would anyone need the original balance?

It'd be a breaking change, though.

dsperac commented 2 months ago

We can consider completely removing the initial_balance property. I can't think of a good purpose for it. If someone wants to know the predeployed account balance on Devnet startup, they can simply call GET /account_balance after startup. And once Devnet has been up for some time - why would anyone need the original balance?

It'd be a breaking change, though.

Let's add balance for now and we can potentially revisit after with another issue to remove the initial balance