diff --git a/mock/get_block_by_number/batch_limit/request.json b/mock/get_block_by_number/batch_limit/request.json new file mode 100644 index 0000000..466661d --- /dev/null +++ b/mock/get_block_by_number/batch_limit/request.json @@ -0,0 +1,13 @@ +[ + {"jsonrpc": "2.0", "method": "get_block_by_number", "params": ["0x0"], "id": "1"}, + {"jsonrpc": "2.0", "method": "get_block_by_number", "params": ["0x0"], "id": "2"}, + {"jsonrpc": "2.0", "method": "get_block_by_number", "params": ["0x0"], "id": "3"}, + {"jsonrpc": "2.0", "method": "get_block_by_number", "params": ["0x0"], "id": "4"}, + {"jsonrpc": "2.0", "method": "get_block_by_number", "params": ["0x0"], "id": "5"}, + {"jsonrpc": "2.0", "method": "get_block_by_number", "params": ["0x0"], "id": "6"}, + {"jsonrpc": "2.0", "method": "get_block_by_number", "params": ["0x0"], "id": "7"}, + {"jsonrpc": "2.0", "method": "get_block_by_number", "params": ["0x0"], "id": "8"}, + {"jsonrpc": "2.0", "method": "get_block_by_number", "params": ["0x0"], "id": "9"}, + {"jsonrpc": "2.0", "method": "get_block_by_number", "params": ["0x0"], "id": "10"}, + {"jsonrpc": "2.0", "method": "get_block_by_number", "params": ["0x0"], "id": "11"} +] \ No newline at end of file diff --git a/mock/get_block_by_number/batch_limit/response.json b/mock/get_block_by_number/batch_limit/response.json new file mode 100644 index 0000000..4b94cbb --- /dev/null +++ b/mock/get_block_by_number/batch_limit/response.json @@ -0,0 +1,8 @@ +{ + "jsonrpc": "2.0", + "error": { + "code": -32602, + "message": "batch size is too large, expect it less than: 10" + }, + "id": null +} \ No newline at end of file diff --git a/mock/get_transaction/add_index/request.json b/mock/get_transaction/add_index/request.json new file mode 100644 index 0000000..c541bfa --- /dev/null +++ b/mock/get_transaction/add_index/request.json @@ -0,0 +1,8 @@ +{ + "id": 42, + "jsonrpc": "2.0", + "method": "get_transaction", + "params": [ + "0x43655f10761861d421b1f9251044cce8b69a76a8d27242ec58abb5495c119061" + ] +} \ No newline at end of file diff --git a/mock/get_transaction/add_index/response.json b/mock/get_transaction/add_index/response.json new file mode 100644 index 0000000..f8f4660 --- /dev/null +++ b/mock/get_transaction/add_index/response.json @@ -0,0 +1,69 @@ +{ + "jsonrpc": "2.0", + "result": { + "cycles": "0x19b6ef", + "fee": "0x2b8", + "min_replace_fee": "0x570", + "time_added_to_pool": "0x191970caec6", + "transaction": { + "cell_deps": [ + { + "dep_type": "dep_group", + "out_point": { + "index": "0x0", + "tx_hash": "0x5f84f5252197cd3e7c4f6d07d4164e9867d6d83a667fdc7d344e6d709c08ddfe" + } + } + ], + "hash": "0x43655f10761861d421b1f9251044cce8b69a76a8d27242ec58abb5495c119061", + "header_deps": [ + + ], + "inputs": [ + { + "previous_output": { + "index": "0x0", + "tx_hash": "0x1ed55dfc5703018d5d689e9282c79f44b3923576a8b684e6acfff50357d17a85" + }, + "since": "0x0" + } + ], + "outputs": [ + { + "capacity": "0x2540be400", + "lock": { + "args": "0x8883a512ee2383c01574a328f60eeccbb4d78240", + "code_hash": "0x9bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce8", + "hash_type": "type" + }, + "type": null + }, + { + "capacity": "0x2c77cc0c43", + "lock": { + "args": "0x8883a512ee2383c01574a328f60eeccbb4d78240", + "code_hash": "0x9bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce8", + "hash_type": "type" + }, + "type": null + } + ], + "outputs_data": [ + "0x", + "0x" + ], + "version": "0x0", + "witnesses": [ + "0x55000000100000005500000055000000410000003d83443640b839a2e910d87e97b574ed6f49b9b1420b77a1dad19adb2e95099f7b37dcbe93bf50b36ca26364d76d7f3ccb39e1d21ad2d15eb4de63eee29f8f9d00" + ] + }, + "tx_status": { + "block_hash": null, + "block_number": null, + "reason": null, + "status": "pending", + "tx_index": null + } + }, + "id": 42 +} \ No newline at end of file diff --git a/mock/sync_state/[]/response.json b/mock/sync_state/[]/response.json index 029e136..2133ab2 100644 --- a/mock/sync_state/[]/response.json +++ b/mock/sync_state/[]/response.json @@ -1,19 +1,22 @@ { - "jsonrpc": "2.0", - "result": { - "assume_valid_target": "0x84ef5fe7cbf4242bdcac76326aa33f15b9cc41958e9d891157b8a6066dad0f31", - "assume_valid_target_reached": true, - "best_known_block_number": "0xce440e", - "best_known_block_timestamp": "0x190c0b5899b", - "fast_time": "0x3e8", - "ibd": false, - "inflight_blocks_count": "0x0", - "low_time": "0x5dc", - "min_chain_work": "0x3314412053c82802a7", - "min_chain_work_reached": true, - "normal_time": "0x4e2", - "orphan_blocks_count": "0x0", - "orphan_blocks_size": "0x0" - }, - "id": 1 + "jsonrpc": "2.0", + "result": { + "assume_valid_target": "0x0000000000000000000000000000000000000000000000000000000000000000", + "assume_valid_target_reached": true, + "best_known_block_number": "0x0", + "best_known_block_timestamp": "0x0", + "fast_time": "0x3e8", + "ibd": true, + "inflight_blocks_count": "0x0", + "low_time": "0x5dc", + "min_chain_work": "0x0", + "min_chain_work_reached": true, + "normal_time": "0x4e2", + "orphan_blocks_count": "0x0", + "tip_hash": "0x12a852dcfeefe9dd9caf60fdcadb595a97bf56d854528319167ef8cfed26fdd2", + "tip_number": "0x0", + "unverified_tip_hash": "0x12a852dcfeefe9dd9caf60fdcadb595a97bf56d854528319167ef8cfed26fdd2", + "unverified_tip_number": "0x0" + }, + "id": 42 } \ No newline at end of file diff --git a/mock/tx_pool_info/[]/request.json b/mock/tx_pool_info/[]/request.json index 4d6f1a4..6811aa6 100644 --- a/mock/tx_pool_info/[]/request.json +++ b/mock/tx_pool_info/[]/request.json @@ -1,6 +1,8 @@ { - "id": 42, - "jsonrpc": "2.0", - "method": "tx_pool_info", - "params": [] + "id": 42, + "jsonrpc": "2.0", + "method": "tx_pool_info", + "params": [ + + ] } \ No newline at end of file diff --git a/mock/tx_pool_info/[]/response.json b/mock/tx_pool_info/[]/response.json index 0bfcefb..d7b9b90 100644 --- a/mock/tx_pool_info/[]/response.json +++ b/mock/tx_pool_info/[]/response.json @@ -1,18 +1,19 @@ { - "jsonrpc": "2.0", - "result": { - "last_txs_updated_at": "0x0", - "max_tx_pool_size": "0xaba9500", - "min_fee_rate": "0x3e8", - "min_rbf_rate": "0x5dc", - "orphan": "0x0", - "pending": "0x0", - "proposed": "0x0", - "tip_hash": "0x8e839a075ef1a25590b251c9d6dd2a753db035ca4a08553f7e521fc34e2806da", - "tip_number": "0xc67", - "total_tx_cycles": "0x0", - "total_tx_size": "0x0", - "tx_size_limit": "0x7d000" - }, - "id": 42 -} + "jsonrpc": "2.0", + "result": { + "last_txs_updated_at": "0x0", + "max_tx_pool_size": "0xaba9500", + "min_fee_rate": "0x3e8", + "min_rbf_rate": "0x5dc", + "orphan": "0x0", + "pending": "0x0", + "proposed": "0x0", + "tip_hash": "0x7caf517c254e50654e8ea596d72785864446aaa4d05fcf5fcd0fbdebf4bd8eb7", + "tip_number": "0x1", + "total_tx_cycles": "0x0", + "total_tx_size": "0x0", + "tx_size_limit": "0x7d000", + "verify_queue_size": "0x0" + }, + "id": 42 +} \ No newline at end of file