0xSpaceShard / starknet-devnet-rs

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

Cannot mint large amounts via JSON-RPC devnet_mint #533

Closed FabijanC closed 2 weeks ago

FabijanC commented 2 weeks ago

This fails:

curl -w "\n" -sSf localhost:5050/rpc --json '{
    "method": "devnet_mint",
    "jsonrpc": "2.0",
    "id": "1",
    "params": {
        "amount": 100000000000000000000,
        "address": "0x1"
    }
}'

But try removing one 0 from the amount, and it succeeds.

Also, if you target the /dump endpoint and change the body accordingly, it also succeeds (with any number of zeros):

curl -w "\n" -sSf localhost:5050/mint --json '{
    "amount": 100000000000000000000,
    "address": "0x1"
}'

Seems that there is a problem with JSON-RPC params deserialization.

These findings are the result of investigating https://github.com/0xSpaceShard/starknet-devnet-js/issues/10 (which also has a client-side problem).