# Visoft
## Devnet versions API comparision
### V0.0.5 --> V0.0.6
- `account_balance` endpoint returns balance as `string`(v0.0.6) instead of `BigUint`(v0.0.5)
- New `config` endpoint - shall return Devnet configuration e.g. (in that commit `fork_status` endpoint was replaced for the sake of `config`)
```json
{
"seed": 4063802897,
"total_accounts": 10,
"account_contract_class_hash": "0x61dac032f228abef9c6626f995015233097ae253a7f72d68552db02f2971b8f",
"predeployed_accounts_initial_balance": "1000000000000000000000",
"start_time": null,
"gas_price": 100000000000,
"data_gas_price": 100000000000,
"chain_id": "SN_SEPOLIA",
"dump_on": "exit",
"dump_path": "dump_path.json",
"state_archive": "none",
"fork_config": {
"url": "http://rpc.pathfinder.equilibrium.co/integration-sepolia/rpc/v0_7",
"block_number": 26429
},
"server_config": {
"host": "127.0.0.1",
"port": 5050,
"timeout": 120,
"request_body_size_limit": 2000000
}
}
```
* CLI option to create blocks on demand while running Devnet with --blocks-on-demand option, running `/create_block` will confert pending block to the latest block, giving it a block hash and block number. All subsequent transactions will be stored in a new pending block.
* Added Devnet lite mote to skip block hash calculations.
* Modified `/getBlockWithTxHashes` endpoint - considers block on demand
* Modified `/getStateUpdate` endpoint - considers block on demand
* Added impersonate accounts
### V0.0.4 --> V0.0.5
* `/abort_blocks`
```json
{
"starting_block_hash": BLOCK_HASH
}
```
Response
```json
{
"aborted": [BLOCK_HASH_0, BLOCK_HASH_1, ...]
}
```
* `/getLatestBlockWithTxHashes` covers error case
* Request body size limit configurable
* Got rid of `/addDeclareTransactionv1`, `/addDeclareTransactionv2 ` and `/addDeclareTransactionv3` for the sake of `/addDeclareTransaction`
* Got rid of `/addDeployAccountTransactionV3` and `/addDeployAccountTransactionV2` for the sake of `/addDeployAccountTransaction`
# Starknet JSON-RPC Methods testing checklist
- [x] `starknet_specVersion`
Returns the version of the Starknet JSON-RPC specification being used
- Basic test
- [x] `starknet_getBlockWithTxHashes`
Get block information with transaction hashes given the block id
- Basic test
- [x] `starknet_getBlockWithTxs`
Get block information with full transactions given the block id
- Basic test
- [x] `starknet_getBlockWithReceipts`
Get block information with full transactions and receipts given the block id
- Basic test
- [x] `starknet_getStateUpdate`
Get the information about the result of executing the requested block
- [x] `starknet_getStorageAt`
Get the value of the storage at the given address and key
- [x] `starknet_getTransactionStatus`
Gets the transaction status (possibly reflecting that the tx is still in the mempool, or dropped from it)
- [x] `starknet_getTransactionByHash`
Get the details and status of a submitted transaction
- [ ] `starknet_getTransactionByBlockIdAndIndex`
Get the details of a transaction by a given block id and index
- [x] `starknet_getTransactionReceipt`
Get the transaction receipt by the transaction hash
- [x] `starknet_getClass`
Get the contract class definition in the given block associated with the given hash
- [x] `starknet_getClassHashAt`
Get the contract class hash in the given block for the contract deployed at the given address
- [x] `starknet_getClassAt`
Get the contract class definition in the given block at the given address
- [x] `starknet_getBlockTransactionCount`
Get the number of transactions in a block given a block id
- [x] `starknet_call`
Call a Starknet function without creating a StarkNet transaction
- [x] `starknet_estimateFee`
Estimate the fee for StarkNet transactions
- [ ] `starknet_estimateMessageFee`
Estimate the L2 fee of a message sent on L1
- [x] `starknet_blockNumber`
Get the most recent accepted block number
- [ ] `blockHashAndNumber`
- [ ] `starknet_syncing`
- [x] `starknet_chainId`
- [ ] `starknet_getEvents`
Returns all events matching the given filter
- [x] `starknet_getNonce`
Get the nonce associated with the given address in the given block
- [x] `starknet_addInvokeTransaction`
Submit a new transaction to be added to the chain
- [x] `starknet_addDeclareTransaction`
Submit a new class declaration transaction
- [ ] `starknet_addDeployAccountTransaction`
Add a deploy account transaction to the StarkNet
- [ ] `starknet_traceTransaction`
Trace the execution of a transaction
- [ ] `starknet_simulateTransactions`
Simulate the execution of transactions without creating a StarkNet transaction
- [ ] `starknet_traceBlockTransactions`
Trace the execution of all transactions in a block
# Devnet methods testing checklist
Return types of these methods do not return proper structs yet.
- [x] `mint`
- [x] `account_balance`
- [x] `config` Added in V6
- [x] `create_block`
- [x] `abort_blocks` Added in V5
- [ ] `restart` ??? Can be easily added but returns error so for left out for now.
- [ ] `L1-L2 interaction via Postman` -- not sure about that
- [x] `predeployed_accounts`
- [x] `set_time`
- [x] `increase_time`