focustree / starknet.dart

Mobile SDK for StarkNet ✨
https://starknetdart.dev
MIT License
29 stars 26 forks source link

Update starknet_counter example for Devnet and Sepolia #399

Open devnet0x opened 1 week ago

devnet0x commented 1 week ago

Describe the bug Starknet counter example is not running for Devnet-rs and Sepolia networks. (Also decrease counter isn't working)

To Reproduce Steps to reproduce the behavior:

  1. Go to starknet.dart/examples/starknet_counter
  2. Run with flutter run
  3. Log display signature errors
  4. Estimate fee message sent to the network: {"jsonrpc": "2.0", "method": "starknet_estimateFee", "params": {"request": [{"type": "INVOKE", "max_fee": "0x38d7ea4c68000", "version": "0x1", "signature": ["0x0509a56c92bc15c8e4411b218675a2ddf301725cfc717bbbca170b879a64f6c5", "0x053bd62b798d630db577d98b7c2c4204afef4678e8fe81b6a1319018c1cc34b1"], "nonce": "0x0000000000000000000000000000000000000000000000000000000000000003", "sender_address": "0x068f12c7d61346313d2485935c7d16fb1509219e3be67e1a1cdcfd5bb50cc837", "calldata": ["0x0000000000000000000000000000000000000000000000000000000000000001", "0x0563c9aa366b74d85ff440fa2c6e3554d77d1208c15ad2cfe2fd60bdcdb55d1e", "0x007a44dde9fea32737a5cf3f9683b3235138654aa2d189f6fe44af37a61dc60d", "0x0000000000000000000000000000000000000000000000000000000000000000"]}], "block_id": "latest", "simulation_flags": []}, "id": 0}

Response from devnet-rs: {"jsonrpc":"2.0","id":0,"error":{"code":40,"message":"Contract error","data":{"revert_error":"Execution failed. Failure reason: 0x4163636f756e743a20696e76616c6964207369676e6174757265 ('Account: invalid signature')."}}}

Expected behavior Gas and fee data response.

Screenshots n/a

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context This error is caused by invalid data sent the network. (for example Goerli instead of Sepolia).

devnet0x commented 1 week ago

Hi, please if i can be assigned to this issue.

ptisserand commented 6 days ago

Hi, please if i can be assigned to this issue.

Sure, thanks a lot.