mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-01 00:31:21 +00:00
1af3e09d75
* Automate documentation * Updating * Updating * Fixing lint * Updating readthedocs documentation * Updating testing * Updating testing
4119 lines
160 KiB
JSON
4119 lines
160 KiB
JSON
{
|
|
"info": {
|
|
"_postman_id": "e6c1633d-5f7c-4f31-a7cf-d76158ee66ec",
|
|
"name": "RPC_Testing Copy",
|
|
"description": "A collection holding all the Ethereum JSON RPC API calls",
|
|
"schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json"
|
|
},
|
|
"item": [
|
|
{
|
|
"name": "clientVersion",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"id": "92f79aa1-190a-4a7a-aeb5-50db0ab332a2",
|
|
"exec": [
|
|
"pm.test('Has correct result', function() {",
|
|
" const jsonData = pm.response.json();",
|
|
" var messages = {",
|
|
" '{{NETHERMIND}}': 'Nethermind',",
|
|
" '{{TURBOGETH}}': 'TurboGeth',",
|
|
" '{{PARITY}}': 'Parity-Ethereum',",
|
|
" }",
|
|
" var parts = jsonData.result.split('/');",
|
|
" pm.expect(parts[0]).to.deep.equals(messages[pm.environment.get('HOST')]);",
|
|
"})",
|
|
""
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"jsonrpc\": \"2.0\",\n \"method\": \"web3_clientVersion\",\n \"params\": [],\n \"id\": 1\n}",
|
|
"options": {
|
|
"raw": {}
|
|
}
|
|
},
|
|
"url": "{{HOST}}",
|
|
"description": "Returns the current client version.\r\n\r\n**Parameters**\r\n\r\nnone\r\n\r\n**Returns**\r\n\r\n`String` - The current client version"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "sha3",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"id": "1a018b5e-d2be-4312-9367-65241f8e6bcf",
|
|
"exec": [
|
|
"var expected = {",
|
|
" \"jsonrpc\": \"2.0\",",
|
|
" \"id\": 64,",
|
|
" \"result\": \"0x47173285a8d7341e5e972fc677286384f802f8ef42a5ec5f03bbfa254cb01fad\"",
|
|
"}",
|
|
"",
|
|
"pm.test('Has correct result', function() {",
|
|
" pm.expect(pm.response.json()).to.be.deep.equal(expected);",
|
|
"})",
|
|
""
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
},
|
|
{
|
|
"listen": "prerequest",
|
|
"script": {
|
|
"id": "58f2a8bc-0ff1-435c-9794-dae1c459e089",
|
|
"exec": [
|
|
""
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"web3_sha3\",\n\t\"params\":[\"0x68656c6c6f20776f726c64\"],\n\t\"id\":64\n}",
|
|
"options": {
|
|
"raw": {}
|
|
}
|
|
},
|
|
"url": "{{HOST}}",
|
|
"description": "Returns Keccak-256 (not the standardized SHA3-256) of the given data.\r\n\r\n**Parameters**\r\n\r\n`DATA` - The data to convert into a SHA3 hash\r\n\r\n```\r\nparams: [\r\n \"0x68656c6c6f20776f726c64\"\r\n]\r\n```\r\n\r\n**Returns**\r\n\r\n`DATA` - The SHA3 result of the given string"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "listening",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"id": "1af37601-bd97-4832-94bc-9ac018b7cf8f",
|
|
"exec": [
|
|
"expected = {",
|
|
" \"jsonrpc\": \"2.0\",",
|
|
" \"id\": 67,",
|
|
" \"result\": true",
|
|
"}",
|
|
"",
|
|
"pm.test('Returns true (hardcoded)', function() {",
|
|
" pm.expect(pm.response.json()).to.be.deep.equal(expected)",
|
|
"});"
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"net_listening\",\n\t\"params\":[],\n\t\"id\":67\n}",
|
|
"options": {
|
|
"raw": {}
|
|
}
|
|
},
|
|
"url": "{{HOST}}",
|
|
"description": "Returns `true` if client is actively listening for network connections.\r\n\r\n**TODO** Remove hard coded value\r\n\r\n**Parameters**\r\n\r\nnone\r\n\r\n**Returns**\r\n\r\n`Boolean` - `true` when listening, `false` otherwise"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "version",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"id": "01e3d7bd-2d36-4d9f-bb8b-380493e0565a",
|
|
"exec": [
|
|
"expected = {",
|
|
" \"jsonrpc\": \"2.0\",",
|
|
" \"id\": 67,",
|
|
" \"result\": \"1\"",
|
|
"}",
|
|
"",
|
|
"pm.test('Returns true (hardcoded)', function() {",
|
|
" pm.expect(pm.response.json()).to.be.deep.equal(expected)",
|
|
"});"
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"net_version\",\n\t\"params\":[],\n\t\"id\":67\n}",
|
|
"options": {
|
|
"raw": {}
|
|
}
|
|
},
|
|
"url": "{{HOST}}",
|
|
"description": "Returns the current network id.\r\n\r\n**Parameters**\r\n\r\nnone\r\n\r\n**Returns**\r\n\r\n`String` - The current network id\r\n\r\n`\"1\"`: Ethereum Mainnet\r\n\r\n`\"2\"`: Morden Testnet (deprecated)\r\n\r\n`\"3\"`: Ropsten Testnet\r\n\r\n`\"4\"`: Rinkeby Testnet\r\n\r\n`\"42\"`: Kovan Testnet"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "peerCount",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"id": "c1243b98-2ed4-4582-8cb5-4ff884ff7da8",
|
|
"exec": [
|
|
"expected = {",
|
|
" \"jsonrpc\": \"2.0\",",
|
|
" \"id\": 74,",
|
|
" \"result\": \"0x19\"",
|
|
"}",
|
|
"",
|
|
"pm.test('Returns true (hardcoded)', function() {",
|
|
" expected.result = pm.response.json().result;",
|
|
" pm.expect(pm.response.json()).to.be.deep.equal(expected)",
|
|
"});"
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"net_peerCount\",\n\t\"params\":[],\n\t\"id\":74\n}",
|
|
"options": {
|
|
"raw": {}
|
|
}
|
|
},
|
|
"url": "{{HOST}}",
|
|
"description": "Returns number of peers currently connected to the client.\r\n\r\n**TODO** This routine currently returns a hard coded value of '25'\r\n\r\n**Parameters**\r\n\r\nnone\r\n\r\n**Returns**\r\n\r\n`QUANTITY` - Integer of the number of connected peers"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "getBlockByNumber",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"id": "3101c660-767e-44d1-be64-bb5ab848bdc1",
|
|
"exec": [
|
|
"var expected = {",
|
|
" \"jsonrpc\": \"2.0\",",
|
|
" \"id\": 1,",
|
|
" \"result\": {",
|
|
" \"difficulty\": \"0xb5708d578a6\",",
|
|
" \"extraData\": \"0xd783010400844765746887676f312e352e31856c696e7578\",",
|
|
" \"gasLimit\": \"0x2fefd8\",",
|
|
" \"gasUsed\": \"0x14820\",",
|
|
" \"hash\": \"0x0b4c6fb75ded4b90218cf0346b0885e442878f104e1b60bf75d5b6860eeacd53\",",
|
|
" \"logsBloom\": \"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\",",
|
|
" \"miner\": \"0x0c729be7c39543c3d549282a40395299d987cec2\",",
|
|
" \"mixHash\": \"0x1530cda332d86d5d7462e3a0eb585e22c88348dd796d29e6ef18196a78cdce07\",",
|
|
" \"nonce\": \"0x938e5630b060b7d3\",",
|
|
" \"number\": \"0xf4629\",",
|
|
" \"parentHash\": \"0x96810a6076e621e311a232468bfd3dcfac08f4803b255af0f00300f47981c10f\",",
|
|
" \"receiptsRoot\": \"0x075608bec75d988c52ea6750f4c2204fd60082eb1df32cf8f4732e8a591eef62\",",
|
|
" \"sha3Uncles\": \"0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347\",",
|
|
" \"size\": \"0x3e1\",",
|
|
" \"stateRoot\": \"0xb3f9408d80048b6f206951c4e387f8da37fb8510eccc18527865fa746c47bbc5\",",
|
|
" \"timestamp\": \"0x56bff9bb\",",
|
|
" \"totalDifficulty\": \"0x6332227c16fd7c67\",",
|
|
" \"transactions\": [",
|
|
" \"0x730724cb08a6eb17bf6b3296359d261570d343ea7944a17a9d7287d77900db08\",",
|
|
" \"0xef2ea39c20ba09553b2f3cf02380406ac766039ca56612937eed5e7f3503fb3a\",",
|
|
" \"0x5352c80aa2073e21ce6c4aa5488c38455f3519955ece7dca5af3e326797bcc63\",",
|
|
" \"0x060e4cf9fa8d34a8b423b5b3691b2541255ff7974ff16699e104edcfb63bd521\"",
|
|
" ],",
|
|
" \"transactionsRoot\": \"0xb779480508401ddd57f1f1e83a54715dcafc6ccec4e4d842c1b68cb418e6560d\",",
|
|
" \"uncles\": []",
|
|
" }",
|
|
"}",
|
|
"",
|
|
"pm.test('Has correct result', function() {",
|
|
" var isTurbo = pm.environment.get('HOST') == \"{{TURBOGETH}}\";",
|
|
" var jsonData = pm.response.json();",
|
|
" if (!isTurbo) {",
|
|
" delete jsonData.result.author;",
|
|
" delete jsonData.result.sealFields;",
|
|
" }",
|
|
" pm.expect(jsonData).to.be.deep.equal(expected);",
|
|
"})",
|
|
""
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_getBlockByNumber\",\n\t\"params\":[\n\t\t\"0xf4629\", \n\t\tfalse\n\t],\n\t\"id\":1\n}",
|
|
"options": {
|
|
"raw": {}
|
|
}
|
|
},
|
|
"url": "{{HOST}}",
|
|
"description": "Returns information about a block given the block's number.\r\n\r\n**Parameters**\r\n\r\n`QUANTITY|TAG` - Integer of a block number, or the string `\"earliest\"`, `\"latest\"` or `\"pending\"`, as in the default block parameter\r\n\r\n`Boolean` - If `true` it returns the full transaction objects, if `false` only the hashes of the transactions\r\n\r\n```\r\nparams: [\r\n '0x1b4', // 436\r\n true\r\n]\r\n```\r\n\r\n**Returns**\r\n\r\n`Object` - A block object, or null when no block was found. See `eth_getBlockByHash`"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "getBlockByHash",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"id": "5c51fee8-7000-4c82-9379-97ab680a08b1",
|
|
"exec": [
|
|
"var expected = {",
|
|
" \"jsonrpc\": \"2.0\",",
|
|
" \"id\": 1,",
|
|
" \"result\": {",
|
|
" \"difficulty\": \"0xb5708d578a6\",",
|
|
" \"extraData\": \"0xd783010400844765746887676f312e352e31856c696e7578\",",
|
|
" \"gasLimit\": \"0x2fefd8\",",
|
|
" \"gasUsed\": \"0x14820\",",
|
|
" \"hash\": \"0x0b4c6fb75ded4b90218cf0346b0885e442878f104e1b60bf75d5b6860eeacd53\",",
|
|
" \"logsBloom\": \"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\",",
|
|
" \"miner\": \"0x0c729be7c39543c3d549282a40395299d987cec2\",",
|
|
" \"mixHash\": \"0x1530cda332d86d5d7462e3a0eb585e22c88348dd796d29e6ef18196a78cdce07\",",
|
|
" \"nonce\": \"0x938e5630b060b7d3\",",
|
|
" \"number\": \"0xf4629\",",
|
|
" \"parentHash\": \"0x96810a6076e621e311a232468bfd3dcfac08f4803b255af0f00300f47981c10f\",",
|
|
" \"receiptsRoot\": \"0x075608bec75d988c52ea6750f4c2204fd60082eb1df32cf8f4732e8a591eef62\",",
|
|
" \"sha3Uncles\": \"0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347\",",
|
|
" \"size\": \"0x3e1\",",
|
|
" \"stateRoot\": \"0xb3f9408d80048b6f206951c4e387f8da37fb8510eccc18527865fa746c47bbc5\",",
|
|
" \"timestamp\": \"0x56bff9bb\",",
|
|
" \"totalDifficulty\": \"0x6332227c16fd7c67\",",
|
|
" \"transactions\": [",
|
|
" \"0x730724cb08a6eb17bf6b3296359d261570d343ea7944a17a9d7287d77900db08\",",
|
|
" \"0xef2ea39c20ba09553b2f3cf02380406ac766039ca56612937eed5e7f3503fb3a\",",
|
|
" \"0x5352c80aa2073e21ce6c4aa5488c38455f3519955ece7dca5af3e326797bcc63\",",
|
|
" \"0x060e4cf9fa8d34a8b423b5b3691b2541255ff7974ff16699e104edcfb63bd521\"",
|
|
" ],",
|
|
" \"transactionsRoot\": \"0xb779480508401ddd57f1f1e83a54715dcafc6ccec4e4d842c1b68cb418e6560d\",",
|
|
" \"uncles\": []",
|
|
" }",
|
|
"}",
|
|
"",
|
|
"pm.test('Has correct result', function() {",
|
|
" var isTurbo = pm.environment.get('HOST') == \"{{TURBOGETH}}\";",
|
|
" var jsonData = pm.response.json();",
|
|
" if (!isTurbo) {",
|
|
" delete jsonData.result.author;",
|
|
" delete jsonData.result.sealFields;",
|
|
" }",
|
|
" pm.expect(jsonData).to.be.deep.equal(expected);",
|
|
"})",
|
|
""
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_getBlockByHash\",\n\t\"params\":[\n\t\t\"0x0b4c6fb75ded4b90218cf0346b0885e442878f104e1b60bf75d5b6860eeacd53\", \n\t\tfalse\n\t],\n\t\"id\":1\n}",
|
|
"options": {
|
|
"raw": {}
|
|
}
|
|
},
|
|
"url": "{{HOST}}",
|
|
"description": "Returns information about a block given the block's hash.\r\n\r\n**Parameters**\r\n\r\n`DATA`, 32 Bytes - Hash of a block\r\n\r\n`Boolean` - If true it returns the full transaction objects, if false only the hashes of the transactions\r\n\r\n```\r\nparams: [\r\n '0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331',\r\n true\r\n]\r\n```\r\n\r\n**Returns**\r\n\r\n`Object` - A block object, or null when no block was found\r\n\r\n`number`: `QUANTITY` - The block number. null when its pending block\r\n\r\n`hash`: `DATA`, 32 Bytes - hash of the block. `null` when its pending block\r\n\r\n`parentHash`: `DATA`, 32 Bytes - hash of the parent block\r\n\r\n`nonce`: `DATA`, 8 Bytes - hash of the generated proof-of-work. `null` when its pending block\r\n\r\n`sha3Uncles`: `DATA`, 32 Bytes - SHA3 of the uncles data in the block\r\n\r\n`logsBloom`: `DATA`, 256 Bytes - The bloom filter for the logs of the block. `null` when its pending block\r\n\r\n`transactionsRoot`: `DATA`, 32 Bytes - The root of the transaction trie of the block\r\n\r\n`stateRoot`: `DATA`, 32 Bytes - The root of the final state trie of the block\r\n\r\n`receiptsRoot`: `DATA`, 32 Bytes - The root of the receipts trie of the block\r\n\r\n`miner`: `DATA`, 20 Bytes - The address of the beneficiary to whom the mining rewards were given\r\n\r\n`difficulty`: `QUANTITY` - Integer of the difficulty for this block\r\n\r\n`totalDifficulty`: `QUANTITY` - Integer of the total difficulty of the chain until this block\r\n\r\n`extraData`: `DATA` - The \"extra data\" field of this block\r\n\r\n`size`: `QUANTITY` - integer the size of this block in bytes\r\n\r\n`gasLimit`: `QUANTITY` - The maximum gas allowed in this block\r\n\r\n`gasUsed`: `QUANTITY` - The total used gas by all transactions in this block\r\n\r\n`timestamp`: `QUANTITY` - The unix timestamp for when the block was collated\r\n\r\n`transactions`: `Array` - Array of transaction objects, or 32 Bytes transaction hashes depending on the last given parameter\r\n\r\n`uncles`: `Array` - Array of uncle hashes"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "getBlockTransactionCountByNumber",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"id": "8a6a0860-7659-4ea8-ab0f-ab34f2af3cf5",
|
|
"exec": [
|
|
"pm.test('Has correct result', function() {",
|
|
" const jsonData = pm.response.json();",
|
|
" pm.expect(jsonData.result).to.be.equals(\"0x4\");",
|
|
"});",
|
|
""
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_getBlockTransactionCountByNumber\",\n\t\"params\":[\n\t\t\"0xf4629\"\n\t],\n\t\"id\":1\n}",
|
|
"options": {
|
|
"raw": {}
|
|
}
|
|
},
|
|
"url": "{{HOST}}",
|
|
"description": "Returns the number of transactions in a block given the block's block number.\r\n\r\n**Parameters**\r\n\r\n`QUANTITY|TAG` - Integer of a block number, or the string `\"earliest\"`, `\"latest\"` or `\"pending\"`, as in the default block parameter\r\n\r\n```\r\nparams: [\r\n '0xe8', // 232\r\n]\r\n```\r\n\r\n**Returns**\r\n\r\n`QUANTITY` - Integer of the number of transactions in this block"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "getBlockTransactionCountByHash",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"id": "0d5ee566-6df9-4d5c-960e-5774fe6060f6",
|
|
"exec": [
|
|
"pm.test('Has correct result', function() {",
|
|
" const jsonData = pm.response.json();",
|
|
" pm.expect(jsonData.result).to.be.equals('0x4');",
|
|
"});",
|
|
""
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_getBlockTransactionCountByHash\",\n\t\"params\":[\n\t\t\"0x0b4c6fb75ded4b90218cf0346b0885e442878f104e1b60bf75d5b6860eeacd53\"\n\t],\n\t\"id\":1\n}",
|
|
"options": {
|
|
"raw": {}
|
|
}
|
|
},
|
|
"url": "{{HOST}}",
|
|
"description": "Returns the number of transactions in a block given the block's block hash.\r\n\r\n**Parameters**\r\n\r\n`DATA`, 32 Bytes - hash of a block\r\n\r\n```\r\nparams: [\r\n '0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238'\r\n]\r\n```\r\n\r\n**Returns**\r\n\r\n`QUANTITY` - Integer of the number of transactions in this block"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "getTransactionByHash",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"id": "fa7a3915-617d-4f87-a3cf-a101768f1c2f",
|
|
"exec": [
|
|
"var expected = {",
|
|
" \"jsonrpc\": \"2.0\",",
|
|
" \"id\": 1,",
|
|
" \"result\": {",
|
|
" \"blockHash\": \"0x785b221ec95c66579d5ae14eebe16284a769e948359615d580f02e646e93f1d5\",",
|
|
" \"blockNumber\": \"0x52a90b\",",
|
|
" \"from\": \"0x11b6a5fe2906f3354145613db0d99ceb51f604c9\",",
|
|
" \"gas\": \"0x6b6c\",",
|
|
" \"gasPrice\": \"0x11e1a300\",",
|
|
" \"hash\": \"0xb2fea9c4b24775af6990237aa90228e5e092c56bdaee74496992a53c208da1ee\",",
|
|
" \"input\": \"0x80dfa34a0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002e516d556558334448416654747442464a42315454384a617a67765744776a727a7342686973693473547532613551000000000000000000000000000000000000\",",
|
|
" \"nonce\": \"0x10\",",
|
|
" \"r\": \"0xacdf839bdcb6653da60900f739076a00ecbe0059fa046933348e9b68a62a222\",",
|
|
" \"s\": \"0x132a0517a4c52916e0c6b0e74b0479326891df2a9afd711482c7f3919b335ff6\",",
|
|
" \"to\": \"0xfa28ec7198028438514b49a3cf353bca5541ce1d\",",
|
|
" \"transactionIndex\": \"0x25\",",
|
|
" \"v\": \"0x26\",",
|
|
" \"value\": \"0x0\"",
|
|
" }",
|
|
"}",
|
|
"",
|
|
"pm.test('Has correct result', function() {",
|
|
" const jsonData = pm.response.json();",
|
|
" var keys = Object.keys(jsonData.result);",
|
|
" keys.map(function (k) {",
|
|
" var value = jsonData.result[k] ? jsonData.result[k] : null;",
|
|
" var expect = expected.result[k] ? expected.result[k] : null;",
|
|
" if (expect && typeof expect === 'object') {",
|
|
" jsonData.result[k].map(function (value, index) {",
|
|
" var expect = expected.result[k][index];",
|
|
" pm.expect(value).to.be.equal(expect)",
|
|
" })",
|
|
" } else {",
|
|
" pm.expect(value).to.be.equal(expect)",
|
|
" }",
|
|
" });",
|
|
"})",
|
|
""
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_getTransactionByHash\",\n\t\"params\":[\n\t\t\"0xb2fea9c4b24775af6990237aa90228e5e092c56bdaee74496992a53c208da1ee\"\n\t],\n\t\"id\":1\n}",
|
|
"options": {
|
|
"raw": {
|
|
"language": "json"
|
|
}
|
|
}
|
|
},
|
|
"url": "{{HOST}}",
|
|
"description": "Returns information about a transaction given the transaction's hash.\r\n\r\n**Parameters**\r\n\r\n`DATA`, 32 Bytes - hash of a transaction\r\n\r\n```\r\nparams: [\r\n \"0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238\"\r\n]\r\n```\r\n\r\n**Returns**\r\n\r\n`Object` - A transaction object, or null when no transaction was found\r\n\r\n`hash`: `DATA`, 32 Bytes - hash of the transaction\r\n\r\n`nonce`: `QUANTITY` - The number of transactions made by the sender prior to this one\r\n\r\n`blockHash`: `DATA`, 32 Bytes - hash of the block where this transaction was in. `null` when its pending\r\n\r\n`blockNumber`: `QUANTITY` - block number where this transaction was in. `null` when its pending\r\n\r\n`transactionIndex`: `QUANTITY` - Integer of the transactions index position in the block. `null` when its pending\r\n\r\n`from`: `DATA`, 20 Bytes - address of the sender\r\n\r\n`to`: `DATA`, 20 Bytes - address of the receiver. `null` when its a contract creation transaction\r\n\r\n`value`: `QUANTITY` - value transferred in Wei\r\n\r\n`gasPrice`: `QUANTITY` - gas price provided by the sender in Wei\r\n\r\n`gas`: `QUANTITY` - gas provided by the sender\r\n\r\n`input`: `DATA` - The data send along with the transaction"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "getTransactionByBlockHashAndIndex",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"id": "53012af7-c6f7-4f23-9fc3-abe14ca784a1",
|
|
"exec": [
|
|
"var expected = {",
|
|
" \"jsonrpc\": \"2.0\",",
|
|
" \"id\": 1,",
|
|
" \"result\": {",
|
|
" \"blockHash\": \"0x785b221ec95c66579d5ae14eebe16284a769e948359615d580f02e646e93f1d5\",",
|
|
" \"blockNumber\": \"0x52a90b\",",
|
|
" \"from\": \"0x11b6a5fe2906f3354145613db0d99ceb51f604c9\",",
|
|
" \"gas\": \"0x6b6c\",",
|
|
" \"gasPrice\": \"0x11e1a300\",",
|
|
" \"hash\": \"0xb2fea9c4b24775af6990237aa90228e5e092c56bdaee74496992a53c208da1ee\",",
|
|
" \"input\": \"0x80dfa34a0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002e516d556558334448416654747442464a42315454384a617a67765744776a727a7342686973693473547532613551000000000000000000000000000000000000\",",
|
|
" \"nonce\": \"0x10\",",
|
|
" \"r\": \"0xacdf839bdcb6653da60900f739076a00ecbe0059fa046933348e9b68a62a222\",",
|
|
" \"s\": \"0x132a0517a4c52916e0c6b0e74b0479326891df2a9afd711482c7f3919b335ff6\",",
|
|
" \"to\": \"0xfa28ec7198028438514b49a3cf353bca5541ce1d\",",
|
|
" \"transactionIndex\": \"0x25\",",
|
|
" \"v\": \"0x26\",",
|
|
" \"value\": \"0x0\"",
|
|
" }",
|
|
"}",
|
|
"",
|
|
"pm.test('Has correct result', function() {",
|
|
" const jsonData = pm.response.json();",
|
|
" var keys = Object.keys(jsonData.result);",
|
|
" keys.map(function (k) {",
|
|
" var value = jsonData.result[k] ? jsonData.result[k] : null;",
|
|
" var expect = expected.result[k] ? expected.result[k] : null;",
|
|
" if (expect && typeof expect === 'object') {",
|
|
" jsonData.result[k].map(function (value, index) {",
|
|
" var expect = expected.result[k][index];",
|
|
" pm.expect(value).to.be.equal(expect)",
|
|
" })",
|
|
" } else {",
|
|
" pm.expect(value).to.be.equal(expect)",
|
|
" }",
|
|
" });",
|
|
"})",
|
|
""
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_getTransactionByBlockHashAndIndex\",\n\t\"params\":[\n\t\t\"0x785b221ec95c66579d5ae14eebe16284a769e948359615d580f02e646e93f1d5\", \n\t\t\"0x25\"\n\t],\n\t\"id\":1\n}",
|
|
"options": {
|
|
"raw": {}
|
|
}
|
|
},
|
|
"url": "{{HOST}}",
|
|
"description": "Returns information about a transaction given the block's hash and a transaction index.\r\n\r\n**Parameters**\r\n\r\n`DATA`, 32 Bytes - hash of a block\r\n\r\n`QUANTITY` - Integer of the transaction index position\r\n\r\n```\r\nparams: [\r\n '0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331',\r\n '0x0' // 0\r\n]\r\n```\r\n\r\n**Returns**\r\n\r\n`Object` - A transaction object, or null when no transaction was found. See `eth_getTransactionByHash`"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "getTransactionByBlockNumberAndIndex",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"id": "c932752c-ae90-4add-9833-5a788e4919a9",
|
|
"exec": [
|
|
"var expected = {",
|
|
" \"jsonrpc\": \"2.0\",",
|
|
" \"id\": 1,",
|
|
" \"result\": {",
|
|
" \"blockHash\": \"0x785b221ec95c66579d5ae14eebe16284a769e948359615d580f02e646e93f1d5\",",
|
|
" \"blockNumber\": \"0x52a90b\",",
|
|
" \"from\": \"0x11b6a5fe2906f3354145613db0d99ceb51f604c9\",",
|
|
" \"gas\": \"0x6b6c\",",
|
|
" \"gasPrice\": \"0x11e1a300\",",
|
|
" \"hash\": \"0xb2fea9c4b24775af6990237aa90228e5e092c56bdaee74496992a53c208da1ee\",",
|
|
" \"input\": \"0x80dfa34a0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002e516d556558334448416654747442464a42315454384a617a67765744776a727a7342686973693473547532613551000000000000000000000000000000000000\",",
|
|
" \"nonce\": \"0x10\",",
|
|
" \"r\": \"0xacdf839bdcb6653da60900f739076a00ecbe0059fa046933348e9b68a62a222\",",
|
|
" \"s\": \"0x132a0517a4c52916e0c6b0e74b0479326891df2a9afd711482c7f3919b335ff6\",",
|
|
" \"to\": \"0xfa28ec7198028438514b49a3cf353bca5541ce1d\",",
|
|
" \"transactionIndex\": \"0x25\",",
|
|
" \"v\": \"0x26\",",
|
|
" \"value\": \"0x0\"",
|
|
" }",
|
|
"}",
|
|
"",
|
|
"pm.test('Has correct result', function() {",
|
|
" const jsonData = pm.response.json();",
|
|
" var keys = Object.keys(jsonData.result);",
|
|
" keys.map(function (k) {",
|
|
" var value = jsonData.result[k] ? jsonData.result[k] : null;",
|
|
" var expect = expected.result[k] ? expected.result[k] : null;",
|
|
" if (expect && typeof expect === 'object') {",
|
|
" jsonData.result[k].map(function (value, index) {",
|
|
" var expect = expected.result[k][index];",
|
|
" pm.expect(value).to.be.equal(expect)",
|
|
" })",
|
|
" } else {",
|
|
" pm.expect(value).to.be.equal(expect)",
|
|
" }",
|
|
" });",
|
|
"})",
|
|
""
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_getTransactionByBlockNumberAndIndex\",\n\t\"params\":[\n\t\t\"0x52a90b\", \n\t\t\"0x25\"\n\t],\n\t\"id\":1\n}\n",
|
|
"options": {
|
|
"raw": {}
|
|
}
|
|
},
|
|
"url": "{{HOST}}",
|
|
"description": "Returns information about a transaction given a block number and transaction index.\r\n\r\n**Parameters**\r\n\r\n`QUANTITY|TAG` - a block number, or the string `\"earliest\"`, `\"latest\"` or `\"pending\"`, as in the default block parameter\r\n\r\n`QUANTITY` - The transaction index position\r\n\r\n```\r\nparams: [\r\n '0x29c', // 668\r\n '0x0' // 0\r\n]\r\n```\r\n\r\n**Returns**\r\n\r\n`Object` - A transaction object, or null when no transaction was found. See `eth_getTransactionByHash`"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "getTransactionReceipt",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"id": "a17dcfaf-1367-4652-9e19-56262bbfbf0c",
|
|
"exec": [
|
|
"var expected = {",
|
|
" \"jsonrpc\": \"2.0\",",
|
|
" \"id\": 1,",
|
|
" \"result\": {",
|
|
" \"blockHash\": \"0xf6084155ff2022773b22df3217d16e9df53cbc42689b27ca4789e06b6339beb2\",",
|
|
" \"blockNumber\": \"0x52a975\",",
|
|
" \"contractAddress\": null,",
|
|
" \"cumulativeGasUsed\": \"0x797db0\",",
|
|
" \"from\": \"0xd907941c8b3b966546fc408b8c942eb10a4f98df\",",
|
|
" \"gasUsed\": \"0x1308c\",",
|
|
" \"logs\": [",
|
|
" {",
|
|
" \"address\": \"0xd6df5935cd03a768b7b9e92637a01b25e24cb709\",",
|
|
" \"topics\": [",
|
|
" \"0x8940c4b8e215f8822c5c8f0056c12652c746cbc57eedbd2a440b175971d47a77\",",
|
|
" \"0x000000000000000000000000d907941c8b3b966546fc408b8c942eb10a4f98df\"",
|
|
" ],",
|
|
" \"data\": \"0x0000000000000000000000000000000000000000000000000000008bb2c97000\",",
|
|
" \"blockNumber\": \"0x52a975\",",
|
|
" \"transactionHash\": \"0xa3ece39ae137617669c6933b7578b94e705e765683f260fcfe30eaa41932610f\",",
|
|
" \"transactionIndex\": \"0x29\",",
|
|
" \"blockHash\": \"0xf6084155ff2022773b22df3217d16e9df53cbc42689b27ca4789e06b6339beb2\",",
|
|
" \"logIndex\": \"0x119\",",
|
|
" \"removed\": false",
|
|
" },",
|
|
" {",
|
|
" \"address\": \"0xd6df5935cd03a768b7b9e92637a01b25e24cb709\",",
|
|
" \"topics\": [",
|
|
" \"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef\",",
|
|
" \"0x0000000000000000000000000000000000000000000000000000000000000000\",",
|
|
" \"0x000000000000000000000000d907941c8b3b966546fc408b8c942eb10a4f98df\"",
|
|
" ],",
|
|
" \"data\": \"0x0000000000000000000000000000000000000000000000000000008bb2c97000\",",
|
|
" \"blockNumber\": \"0x52a975\",",
|
|
" \"transactionHash\": \"0xa3ece39ae137617669c6933b7578b94e705e765683f260fcfe30eaa41932610f\",",
|
|
" \"transactionIndex\": \"0x29\",",
|
|
" \"blockHash\": \"0xf6084155ff2022773b22df3217d16e9df53cbc42689b27ca4789e06b6339beb2\",",
|
|
" \"logIndex\": \"0x11a\",",
|
|
" \"removed\": false",
|
|
" }",
|
|
" ],",
|
|
" \"logsBloom\": \"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000020000000000000000000800000000000000004010000010100000000000000000000000000000000000000000000000000040000080000000000000080000000000000000000000000000000000000000000020000000000000000000000002000000000000000000000000000000000000000000000000000020000000010000000000000000000000000000000000000000000000000000000000\",",
|
|
" \"status\": \"0x1\",",
|
|
" \"to\": \"0xd6df5935cd03a768b7b9e92637a01b25e24cb709\",",
|
|
" \"transactionHash\": \"0xa3ece39ae137617669c6933b7578b94e705e765683f260fcfe30eaa41932610f\",",
|
|
" \"transactionIndex\": \"0x29\"",
|
|
" }",
|
|
"}",
|
|
"",
|
|
"pm.test('Has correct result', function() {",
|
|
" const jsonData = pm.response.json();",
|
|
" var keys = Object.keys(jsonData.result);",
|
|
" keys.map(function (k) {",
|
|
" var value = jsonData.result[k] ? jsonData.result[k] : null;",
|
|
" var expect = expected.result[k] ? expected.result[k] : null;",
|
|
" if (expect && typeof expect === 'object') {",
|
|
" if (k !== 'logs') {",
|
|
" jsonData.result[k].map(function (value, index) {",
|
|
" var expect = expected.result[k][index];",
|
|
" pm.expect(value).to.be.equal(expect)",
|
|
" })",
|
|
" }",
|
|
" } else {",
|
|
" pm.expect(value).to.be.equal(expect)",
|
|
" }",
|
|
" });",
|
|
"})",
|
|
""
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_getTransactionReceipt\",\n\t\"params\":[\n\t\t\"0xa3ece39ae137617669c6933b7578b94e705e765683f260fcfe30eaa41932610f\"\n\t],\n\t\"id\":1\n}",
|
|
"options": {
|
|
"raw": {}
|
|
}
|
|
},
|
|
"url": "{{HOST}}",
|
|
"description": "Returns the receipt of a transaction given the transaction's hash.\r\n\r\n**Note** That the receipt is not available for pending transactions.\r\n\r\n**Parameters**\r\n\r\n`DATA`, 32 Bytes - hash of a transaction\r\n\r\n```\r\nparams: [\r\n '0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238'\r\n]\r\n```\r\n\r\n**Returns**\r\n\r\n`Object` - A transaction receipt object, or `null` when no receipt was found\r\n\r\n`transactionHash`: `DATA`, 32 Bytes - hash of the transaction\r\n\r\n`transactionIndex`: `QUANTITY` - Integer of the transactions index position in the block\r\n\r\n`blockHash`: `DATA`, 32 Bytes - hash of the block where this transaction was in\r\n\r\n`blockNumber`: `QUANTITY` - block number where this transaction was in\r\n\r\n`cumulativeGasUsed`: `QUANTITY` - The total amount of gas used when this transaction was executed in the block\r\n\r\n`gasUsed`: `QUANTITY` - The amount of gas used by this specific transaction alone\r\n\r\n`contractAddress`: `DATA`, 20 Bytes - The contract address created, if the transaction was a contract creation, `null` otherwise\r\n\r\n`logs`: `Array` - Array of log objects, which this transaction generated\r\n\r\n`logsBloom`: `DATA`, 256 Bytes - Bloom filter for light clients to quickly retrieve related logs\r\n\r\nIt also returns either\r\n\r\n`root` : `DATA` 32 bytes of post-transaction stateroot (if the block is pre-Byzantium)\r\n\r\n`status`: `QUANTITY` either `1` (success) or `0` (failure)"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "getUncleByBlockNumberAndIndex",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"id": "c9c82076-b851-4465-8217-039c275fd829",
|
|
"exec": [
|
|
"var expected = {",
|
|
" \"jsonrpc\": \"2.0\",",
|
|
" \"id\": 1,",
|
|
" \"result\": {",
|
|
" \"difficulty\": \"0x3ff800000\",",
|
|
" \"extraData\": \"0x59617465732052616e64616c6c202d2045746865724e696e6a61\",",
|
|
" \"gasLimit\": \"0x1388\",",
|
|
" \"gasUsed\": \"0x0\",",
|
|
" \"hash\": \"0x5cd50096dbb856a6d1befa6de8f9c20decb299f375154427d90761dc0b101109\",",
|
|
" \"logsBloom\": \"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\",",
|
|
" \"miner\": \"0xc8ebccc5f5689fa8659d83713341e5ad19349448\",",
|
|
" \"mixHash\": \"0xf8c94dfe61cf26dcdf8cffeda337cf6a903d65c449d7691a022837f6e2d99459\",",
|
|
" \"nonce\": \"0x68b769c5451a7aea\",",
|
|
" \"number\": \"0x1\",",
|
|
" \"parentHash\": \"0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3\",",
|
|
" \"receiptsRoot\": \"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421\",",
|
|
" \"sha3Uncles\": \"0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347\",",
|
|
" \"size\": \"0x21a\",",
|
|
" \"stateRoot\": \"0x1e6e030581fd1873b4784280859cd3b3c04aa85520f08c304cf5ee63d3935add\",",
|
|
" \"timestamp\": \"0x55ba4242\",",
|
|
" \"totalDifficulty\": \"0xffd003ffe\",",
|
|
" \"transactionsRoot\": \"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421\",",
|
|
" \"uncles\": []",
|
|
" }",
|
|
"}",
|
|
"",
|
|
"pm.test('Has correct result', function() {",
|
|
" const jsonData = pm.response.json();",
|
|
" var keys = Object.keys(jsonData.result);",
|
|
" keys.map(function (k) {",
|
|
" var value = jsonData.result[k] ? jsonData.result[k] : null;",
|
|
" var expect = expected.result[k] ? expected.result[k] : null;",
|
|
" if (expect && typeof expect === 'object') {",
|
|
" jsonData.result[k].map(function (value, index) {",
|
|
" var expect = expected.result[k][index];",
|
|
" pm.expect(value).to.be.equal(expect)",
|
|
" })",
|
|
" } else {",
|
|
" pm.expect(value).to.be.equal(expect)",
|
|
" }",
|
|
" });",
|
|
"})",
|
|
""
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_getUncleByBlockNumberAndIndex\",\n\t\"params\":[\n\t\t\"0x3\",\n\t\t\"0x0\"\n\t],\n\t\"id\":1\n}",
|
|
"options": {
|
|
"raw": {}
|
|
}
|
|
},
|
|
"url": "{{HOST}}",
|
|
"description": "Returns information about an uncle given a block's number and the index of the uncle.\r\n\r\n**Parameters**\r\n\r\n`QUANTITY|TAG` - a block number, or the string `\"earliest\"`, `\"latest\"` or `\"pending\"`, as in the default block parameter\r\n\r\n`QUANTITY` - The uncle's index position\r\n\r\n```\r\nparams: [\r\n '0x29c', // 668\r\n '0x0' // 0\r\n]\r\n```\r\n\r\n**Returns**\r\n\r\n`Object` - A block object (with zero transactions), or null when no uncle was found. See `eth_getBlockByHash`"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "getUncleByBlockHashAndIndex",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"id": "8b549393-4596-4fb0-b0d3-935bd50bbd69",
|
|
"exec": [
|
|
"var expected = {",
|
|
" \"jsonrpc\": \"2.0\",",
|
|
" \"id\": 1,",
|
|
" \"result\": {",
|
|
" \"difficulty\": \"0x3ff800000\",",
|
|
" \"extraData\": \"0x59617465732052616e64616c6c202d2045746865724e696e6a61\",",
|
|
" \"gasLimit\": \"0x1388\",",
|
|
" \"gasUsed\": \"0x0\",",
|
|
" \"hash\": \"0x5cd50096dbb856a6d1befa6de8f9c20decb299f375154427d90761dc0b101109\",",
|
|
" \"logsBloom\": \"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\",",
|
|
" \"miner\": \"0xc8ebccc5f5689fa8659d83713341e5ad19349448\",",
|
|
" \"mixHash\": \"0xf8c94dfe61cf26dcdf8cffeda337cf6a903d65c449d7691a022837f6e2d99459\",",
|
|
" \"nonce\": \"0x68b769c5451a7aea\",",
|
|
" \"number\": \"0x1\",",
|
|
" \"parentHash\": \"0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3\",",
|
|
" \"receiptsRoot\": \"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421\",",
|
|
" \"sha3Uncles\": \"0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347\",",
|
|
" \"size\": \"0x21a\",",
|
|
" \"stateRoot\": \"0x1e6e030581fd1873b4784280859cd3b3c04aa85520f08c304cf5ee63d3935add\",",
|
|
" \"timestamp\": \"0x55ba4242\",",
|
|
" \"totalDifficulty\": \"0xffd003ffe\",",
|
|
" \"transactionsRoot\": \"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421\",",
|
|
" \"uncles\": []",
|
|
" }",
|
|
"}",
|
|
"",
|
|
"pm.test('Has correct result', function() {",
|
|
" const jsonData = pm.response.json();",
|
|
" var keys = Object.keys(jsonData.result);",
|
|
" keys.map(function (k) {",
|
|
" var value = jsonData.result[k] ? jsonData.result[k] : null;",
|
|
" var expect = expected.result[k] ? expected.result[k] : null;",
|
|
" if (expect && typeof expect === 'object') {",
|
|
" jsonData.result[k].map(function (value, index) {",
|
|
" var expect = expected.result[k][index];",
|
|
" pm.expect(value).to.be.equal(expect)",
|
|
" })",
|
|
" } else {",
|
|
" pm.expect(value).to.be.equal(expect)",
|
|
" }",
|
|
" });",
|
|
"})",
|
|
""
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_getUncleByBlockHashAndIndex\",\n\t\"params\":[\n\t\t\"0x3d6122660cc824376f11ee842f83addc3525e2dd6756b9bcf0affa6aa88cf741\", \n\t\t\"0x0\"\n\t],\n\t\"id\":1\n}",
|
|
"options": {
|
|
"raw": {}
|
|
}
|
|
},
|
|
"url": "{{HOST}}",
|
|
"description": "Returns information about an uncle given a block's hash and the index of the uncle.\r\n\r\n**Parameters**\r\n\r\n`DATA`, 32 Bytes - hash a block\r\n\r\n`QUANTITY` - The uncle's index position\r\n\r\n```\r\nparams: [\r\n '0xc6ef2fc5426d6ad6fd9e2a26abeab0aa2411b7ab17f30a99d3cb96aed1d1055b',\r\n '0x0' // 0\r\n]\r\n```\r\n\r\n**Returns**\r\n\r\n`Object` - A block object (with zero transactions), or null when no uncle was found. See `eth_getBlockByHash`"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "getUncleCountByBlockNumber",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"id": "8b93e8c1-7c57-4acc-8105-94b1596f4183",
|
|
"exec": [
|
|
"var expected = {",
|
|
" \"jsonrpc\": \"2.0\",",
|
|
" \"id\": 1,",
|
|
" \"result\": {",
|
|
" \"difficulty\": \"0x3ff800000\",",
|
|
" \"extraData\": \"0x59617465732052616e64616c6c202d2045746865724e696e6a61\",",
|
|
" \"gasLimit\": \"0x1388\",",
|
|
" \"gasUsed\": \"0x0\",",
|
|
" \"hash\": \"0x5cd50096dbb856a6d1befa6de8f9c20decb299f375154427d90761dc0b101109\",",
|
|
" \"logsBloom\": \"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\",",
|
|
" \"miner\": \"0xc8ebccc5f5689fa8659d83713341e5ad19349448\",",
|
|
" \"mixHash\": \"0xf8c94dfe61cf26dcdf8cffeda337cf6a903d65c449d7691a022837f6e2d99459\",",
|
|
" \"nonce\": \"0x68b769c5451a7aea\",",
|
|
" \"number\": \"0x1\",",
|
|
" \"parentHash\": \"0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3\",",
|
|
" \"receiptsRoot\": \"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421\",",
|
|
" \"sha3Uncles\": \"0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347\",",
|
|
" \"size\": \"0x21a\",",
|
|
" \"stateRoot\": \"0x1e6e030581fd1873b4784280859cd3b3c04aa85520f08c304cf5ee63d3935add\",",
|
|
" \"timestamp\": \"0x55ba4242\",",
|
|
" \"totalDifficulty\": \"0xffd003ffe\",",
|
|
" \"transactionsRoot\": \"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421\",",
|
|
" \"uncles\": []",
|
|
" }",
|
|
"}",
|
|
"",
|
|
"pm.test('Has correct result', function() {",
|
|
" const jsonData = pm.response.json();",
|
|
" var keys = Object.keys(jsonData.result);",
|
|
" keys.map(function (k) {",
|
|
" var value = jsonData.result[k] ? jsonData.result[k] : null;",
|
|
" var expect = expected.result[k] ? expected.result[k] : null;",
|
|
" if (expect && typeof expect === 'object') {",
|
|
" jsonData.result[k].map(function (value, index) {",
|
|
" var expect = expected.result[k][index];",
|
|
" pm.expect(value).to.be.equal(expect)",
|
|
" })",
|
|
" } else {",
|
|
" pm.expect(value).to.be.equal(expect)",
|
|
" }",
|
|
" });",
|
|
"})",
|
|
""
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_getUncleByBlockNumberAndIndex\",\n\t\"params\":[\n\t\t\"0x3\",\n\t\t\"0x0\"\n\t],\n\t\"id\":1\n}",
|
|
"options": {
|
|
"raw": {}
|
|
}
|
|
},
|
|
"url": "{{HOST}}",
|
|
"description": "Returns the number of uncles in the block, if any.\r\n\r\n**Parameters**\r\n\r\n`QUANTITY|TAG` - a block number, or the string `\"earliest\"`, `\"latest\"` or `\"pending\"`, as in the default block parameter\r\n\r\n```\r\nparams: [\r\n '0x29c' // 668\r\n]\r\n```\r\n\r\n**Returns**\r\n\r\n`QUANTITY` - The number of uncles in the block, if any"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "getUncleCountByBlockHash",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"id": "088ffcff-0cee-443e-948d-d3eada073ff5",
|
|
"exec": [
|
|
"var expected = {",
|
|
" \"jsonrpc\": \"2.0\",",
|
|
" \"id\": 1,",
|
|
" \"result\": {",
|
|
" \"difficulty\": \"0x3ff800000\",",
|
|
" \"extraData\": \"0x59617465732052616e64616c6c202d2045746865724e696e6a61\",",
|
|
" \"gasLimit\": \"0x1388\",",
|
|
" \"gasUsed\": \"0x0\",",
|
|
" \"hash\": \"0x5cd50096dbb856a6d1befa6de8f9c20decb299f375154427d90761dc0b101109\",",
|
|
" \"logsBloom\": \"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\",",
|
|
" \"miner\": \"0xc8ebccc5f5689fa8659d83713341e5ad19349448\",",
|
|
" \"mixHash\": \"0xf8c94dfe61cf26dcdf8cffeda337cf6a903d65c449d7691a022837f6e2d99459\",",
|
|
" \"nonce\": \"0x68b769c5451a7aea\",",
|
|
" \"number\": \"0x1\",",
|
|
" \"parentHash\": \"0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3\",",
|
|
" \"receiptsRoot\": \"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421\",",
|
|
" \"sha3Uncles\": \"0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347\",",
|
|
" \"size\": \"0x21a\",",
|
|
" \"stateRoot\": \"0x1e6e030581fd1873b4784280859cd3b3c04aa85520f08c304cf5ee63d3935add\",",
|
|
" \"timestamp\": \"0x55ba4242\",",
|
|
" \"totalDifficulty\": \"0xffd003ffe\",",
|
|
" \"transactionsRoot\": \"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421\",",
|
|
" \"uncles\": []",
|
|
" }",
|
|
"}",
|
|
"",
|
|
"pm.test('Has correct result', function() {",
|
|
" const jsonData = pm.response.json();",
|
|
" var keys = Object.keys(jsonData.result);",
|
|
" keys.map(function (k) {",
|
|
" var value = jsonData.result[k] ? jsonData.result[k] : null;",
|
|
" var expect = expected.result[k] ? expected.result[k] : null;",
|
|
" if (expect && typeof expect === 'object') {",
|
|
" jsonData.result[k].map(function (value, index) {",
|
|
" var expect = expected.result[k][index];",
|
|
" pm.expect(value).to.be.equal(expect)",
|
|
" })",
|
|
" } else {",
|
|
" pm.expect(value).to.be.equal(expect)",
|
|
" }",
|
|
" });",
|
|
"})",
|
|
""
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_getUncleByBlockHashAndIndex\",\n\t\"params\":[\n\t\t\"0x3d6122660cc824376f11ee842f83addc3525e2dd6756b9bcf0affa6aa88cf741\", \n\t\t\"0x0\"\n\t],\n\t\"id\":1\n}",
|
|
"options": {
|
|
"raw": {}
|
|
}
|
|
},
|
|
"url": "{{HOST}}",
|
|
"description": "Returns the number of uncles in the block, if any.\r\n\r\n**Parameters**\r\n\r\n`DATA`, 32 Bytes - hash a block\r\n\r\n```\r\nparams: [\r\n '0xc6ef2fc5426d6ad6fd9e2a26abeab0aa2411b7ab17f30a99d3cb96aed1d1055b',\r\n '0x0' // 0\r\n]\r\n```\r\n\r\n**Returns**\r\n\r\n`QUANTITY` - The number of uncles in the block, if any"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "newPendingTransactionFilter",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"id": "295cab4a-687e-466e-8121-ac788be41609",
|
|
"exec": [
|
|
"var isAllTests = pm.globals.get('TEST_ALL') === 'true';",
|
|
"if (isAllTests) {",
|
|
" pm.test('Not tested', function() {",
|
|
" var tested = false;",
|
|
" pm.expect(tested).to.be.true",
|
|
" })",
|
|
"}"
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_newPendingTransactionFilter\",\n\t\"params\":[],\n\t\"id\":73\n}",
|
|
"options": {
|
|
"raw": {}
|
|
}
|
|
},
|
|
"url": "{{HOST}}",
|
|
"description": "Creates a pending transaction filter in the node. To check if the state has changed, call `eth_getFilterChanges`.\r\n\r\n**Parameters**\r\n\r\nNone\r\n\r\n**Returns**\r\n\r\n`QUANTITY` - A filter id"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "newBlockFilter",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"id": "1fa73cbc-9296-4ae6-94c6-1bf9a8e07d50",
|
|
"exec": [
|
|
"var isAllTests = pm.globals.get('TEST_ALL') === 'true';",
|
|
"if (isAllTests) {",
|
|
" pm.test('Not tested', function() {",
|
|
" var tested = false;",
|
|
" pm.expect(tested).to.be.true",
|
|
" })",
|
|
"}"
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_newBlockFilter\",\n\t\"params\":[],\n\t\"id\":73\n}",
|
|
"options": {
|
|
"raw": {}
|
|
}
|
|
},
|
|
"url": "{{HOST}}",
|
|
"description": "Creates a block filter in the node, to notify when a new block arrives. To check if the state has changed, call `eth_getFilterChanges`.\r\n\r\n**Parameters**\r\n\r\nNone\r\n\r\n**Returns**\r\n\r\n`QUANTITY` - A filter id"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "newFilter",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"id": "fce691c3-4bc3-47c5-aba0-12c1586ebd7f",
|
|
"exec": [
|
|
"var isAllTests = pm.globals.get('TEST_ALL') === 'true';",
|
|
"if (isAllTests) {",
|
|
" pm.test('Not tested', function() {",
|
|
" var tested = false;",
|
|
" pm.expect(tested).to.be.true",
|
|
" })",
|
|
"}"
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_newFilter\",\n\t\"params\":[\n\t\t{\n\t\t\t\"topics\":[\"0x12341234\"]\n\t\t}\n\t],\n\t\"id\":73\n}",
|
|
"options": {
|
|
"raw": {}
|
|
}
|
|
},
|
|
"url": "{{HOST}}",
|
|
"description": "Creates an arbitrary filter object, based on filter options, to notify when the state changes (logs). To check if the state has changed, call `eth_getFilterChanges`.\r\n\r\n**Example** A note on specifying topic filters\r\n\r\nTopics are order-dependent. A transaction with a log with topics [A, B] will be matched by the following topic filters\r\n\r\n`[]` \"anything\"\r\n\r\n`[A]` \"A in first position (and anything after)\"\r\n\r\n`[null, B]` \"anything in first position AND B in second position (and anything after)\"\r\n\r\n`[A, B]` \"A in first position AND B in second position (and anything after)\"\r\n\r\n`[[A, B], [A, B]]` \"(A OR B) in first position AND (A OR B) in second position (and anything after)\"\r\n\r\n**Parameters**\r\n\r\n`Object` - The filter options\r\n\r\n`fromBlock`: `QUANTITY|TAG` - (optional, default `\"latest\"`) Integer block number, or `\"latest\"` for the last mined block or `\"pending\"`, `\"earliest\"` for not yet mined transactions\r\n\r\n`toBlock`: `QUANTITY|TAG` - (optional, default `\"latest\"`) Integer block number, or `\"latest\"` for the last mined block or `\"pending\"`, `\"earliest\"` for not yet mined transactions\r\n\r\n`address`: `DATA|Array` of DATA, 20 Bytes - (optional) Contract address or a list of addresses from which logs should originate\r\n\r\n`topics`: `Array of DATA`, - (optional) Array of 32 Bytes DATA topics. Topics are order-dependent. Each topic can also be an array of DATA with \"or\" options\r\n\r\n```\r\nparams: [{\r\n \"fromBlock\": \"0x1\",\r\n \"toBlock\": \"0x2\",\r\n \"address\": \" 0x8888f1f195afa192cfee860698584c030f4c9db1\",\r\n \"topics\": [\"0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b\", null, [\"0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b\", \"0x0000000000000000000000000aff3454fce5edbc8cca8697c15331677e6ebccc\"]]\r\n}]\r\n```\r\n\r\n**Returns**\r\n\r\n`QUANTITY` - A filter id"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "uninstallFilter",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"id": "b1cbbfb5-5860-490b-b873-db92916cb143",
|
|
"exec": [
|
|
"var isAllTests = pm.globals.get('TEST_ALL') === 'true';",
|
|
"if (isAllTests) {",
|
|
" pm.test('Not tested', function() {",
|
|
" var tested = false;",
|
|
" pm.expect(tested).to.be.true",
|
|
" })",
|
|
"}"
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_uninstallFilter\",\n\t\"params\":[\n\t\t\"0xb\"\n\t],\n\t\"id\":73\n}",
|
|
"options": {
|
|
"raw": {}
|
|
}
|
|
},
|
|
"url": "{{HOST}}",
|
|
"description": "Uninstalls a previously-created filter given the filter's id. Always uninstall filters when no longer needed.\r\n\r\n**Note** Filters timeout when they are not requested with eth_getFilterChanges for a period of time.\r\n\r\n**Parameters**\r\n\r\n`QUANTITY` - The filter id\r\n\r\n```\r\nparams: [\r\n \"0xb\" // 11\r\n]\r\n```\r\n\r\n**Returns**\r\n\r\n`Boolean` - `true` if the filter was successfully uninstalled, `false` otherwise"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "getFilterChanges",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"id": "e47270f3-d96e-4950-b4e8-cc51482a583a",
|
|
"exec": [
|
|
"var isAllTests = pm.globals.get('TEST_ALL') === 'true';",
|
|
"if (isAllTests) {",
|
|
" pm.test('Not tested', function() {",
|
|
" var tested = false;",
|
|
" pm.expect(tested).to.be.true",
|
|
" })",
|
|
"}"
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_getFilterChanges\",\n\t\"params\":[\n\t\t\"0x16\"\n\t],\n\t\"id\":73\n}",
|
|
"options": {
|
|
"raw": {}
|
|
}
|
|
},
|
|
"url": "{{HOST}}",
|
|
"description": "Polling method for a previously-created filter, which returns an array of logs which occurred since last poll.\r\n\r\n**Parameters**\r\n\r\n`QUANTITY` - The filter id\r\n\r\n```\r\nparams: [\r\n \"0x16\" // 22\r\n]\r\n```\r\n\r\n**Returns**\r\n\r\n`Array` - Array of log objects, or an empty array if nothing has changed since last poll\r\n\r\nFor filters created with `eth_newBlockFilter` the return are block hashes (`DATA`, 32 Bytes), e.g. `[\"0x3454645634534...\"]`\r\n\r\nFor filters created with `eth_newPendingTransactionFilter` the return are transaction hashes (`DATA`, 32 Bytes), e.g. `[\"0x6345343454645...\"]`\r\n\r\nFor filters created with `eth_newFilter` logs are objects with following params\r\n\r\n`removed`: `TAG` - true when the log was removed, due to a chain reorganization. false if its a valid log\r\n\r\n`logIndex`: `QUANTITY` - Integer of the log index position in the block. `null` when its pending log\r\n\r\n`transactionIndex`: `QUANTITY` - Integer of the transactions index position log was created from. `null` when its pending log\r\n\r\n`transactionHash`: `DATA`, 32 Bytes - hash of the transactions this log was created from. `null` when its pending log\r\n\r\n`blockHash`: `DATA`, 32 Bytes - hash of the block where this log was in. `null` when its pending. `null` when its pending log\r\n\r\n`blockNumber`: `QUANTITY` - The block number where this log was in. `null` when its pending. `null` when its pending log\r\n\r\n`address`: `DATA`, 20 Bytes - address from which this log originated\r\n\r\n`data`: `DATA` - contains one or more 32 Bytes non-indexed arguments of the log\r\n\r\n`topics`: `Array of DATA` - Array of 0 to 4 32 Bytes DATA of indexed log arguments. (In solidity: The first topic is the hash of the signature of the event (e.g. `Deposit(address,bytes32,uint256)`), except you declared the event with the anonymous specifier.)"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "getLogs",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"id": "2f3049ba-57f6-4fe9-9ec5-de8125214aae",
|
|
"exec": [
|
|
"var isAllTests = pm.globals.get('TEST_ALL') === 'true';",
|
|
"if (isAllTests) {",
|
|
" pm.test('Not tested', function() {",
|
|
" var tested = false;",
|
|
" pm.expect(tested).to.be.true",
|
|
" })",
|
|
"}"
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_getLogs\",\n\t\"params\":[{\n\t\t\"topics\":[\n\t\t\t\"0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b\"\n\t\t]\n\t}],\n\t\"id\":74\n}",
|
|
"options": {
|
|
"raw": {}
|
|
}
|
|
},
|
|
"url": "{{HOST}}",
|
|
"description": "Returns an array of logs matching a given filter object.\r\n\r\n**Parameters**\r\n\r\n`Object` - The filter object, see eth_newFilter parameters\r\n\r\n```\r\nparams: [{\r\n \"topics\": [\"0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b\"]\r\n}]\r\n```\r\n\r\n**Returns**\r\n\r\n`Array` - Array of log objects, or an empty array if nothing has changed since last poll. See `eth_getFilterChanges`"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "accounts (deprecated)",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"id": "fafde764-400a-4723-87ae-1fdf3fa52aba",
|
|
"exec": [
|
|
"var expectedNethermind = {",
|
|
" \"jsonrpc\": \"2.0\",",
|
|
" \"result\": [",
|
|
" \"0x51dcab5854d508a41388fbe012af3e03079676bf\"",
|
|
" ],",
|
|
" \"id\": 1",
|
|
"}",
|
|
"var expectedParity = {",
|
|
" \"jsonrpc\": \"2.0\",",
|
|
" \"result\": [],",
|
|
" \"id\": 1",
|
|
"}",
|
|
"var expectedTurbo = {",
|
|
" \"jsonrpc\": \"2.0\",",
|
|
" \"id\": 1,",
|
|
" \"error\": {",
|
|
" \"code\": -32000,",
|
|
" \"message\": \"the function eth_accounts has been deprecated\"",
|
|
" }",
|
|
"}",
|
|
"",
|
|
"pm.test('Has correct result', function() {",
|
|
" var expected = {",
|
|
" '{{NETHERMIND}}': expectedNethermind,",
|
|
" '{{TURBOGETH}}': expectedTurbo,",
|
|
" '{{PARITY}}': expectedParity,",
|
|
" }",
|
|
" const jsonData = pm.response.json();",
|
|
" pm.expect(jsonData).to.deep.equals(expected[pm.environment.get('HOST')]);",
|
|
"})",
|
|
""
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_accounts\",\n\t\"params\":[],\n\t\"id\":1\n}",
|
|
"options": {
|
|
"raw": {}
|
|
}
|
|
},
|
|
"url": "{{HOST}}",
|
|
"description": "Returns a list of addresses owned by the client.\r\n\r\n**Deprecated** This function will be removed in the future.\r\n\r\n**Parameters**\r\n\r\nnone\r\n\r\n**Returns**\r\n\r\n`Array of DATA`, 20 Bytes - addresses owned by the client"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "getBalance",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"id": "21612478-df22-4128-a13f-901e667bf599",
|
|
"exec": [
|
|
"var expected = {",
|
|
" \"jsonrpc\": \"2.0\",",
|
|
" \"id\": 1,",
|
|
" \"result\": \"0x7a69\"",
|
|
"}",
|
|
"",
|
|
"pm.test('Has correct result', function() {",
|
|
" pm.expect(pm.response.json()).to.be.deep.equal(expected);",
|
|
"})",
|
|
""
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_getBalance\",\n\t\"params\":[\n\t\t\"0x5df9b87991262f6ba471f09758cde1c0fc1de734\", \n\t\t\"0xb443\"\n\t],\n\t\"id\":1\n}",
|
|
"options": {
|
|
"raw": {}
|
|
}
|
|
},
|
|
"url": "{{HOST}}",
|
|
"description": "Returns the balance of an account for a given address.\r\n\r\n**Parameters**\r\n\r\n`DATA`, 20 Bytes - address to check for balance\r\n\r\n`QUANTITY|TAG` - Integer block number, or the string \"latest\", \"earliest\" or \"pending\", see the default block parameter\r\n\r\n```\r\nparams: [\r\n ' 0x407d73d8a49eeb85d32cf465507dd71d507100c1',\r\n 'latest'\r\n]\r\n```\r\n\r\n**Returns**\r\n\r\n`QUANTITY` - Integer of the current balance in wei"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "getTransactionCount",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"id": "1540fd1f-c858-44aa-91f5-93ec2a0dc816",
|
|
"exec": [
|
|
"var expected = {",
|
|
" \"jsonrpc\": \"2.0\",",
|
|
" \"id\": 1,",
|
|
" \"result\": \"0xa\"",
|
|
"}",
|
|
"",
|
|
"pm.test('Has correct result', function() {",
|
|
" pm.expect(pm.response.json()).to.be.deep.equal(expected);",
|
|
"})",
|
|
""
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_getTransactionCount\",\n\t\"params\":[\n\t\t\"0xfd2605a2bf58fdbb90db1da55df61628b47f9e8c\", \n\t\t\"0xc443\"\n\t],\n\t\"id\":1\n}\n",
|
|
"options": {
|
|
"raw": {}
|
|
}
|
|
},
|
|
"url": "{{HOST}}",
|
|
"description": "Returns the number of transactions sent from an address (the nonce).\r\n\r\n**Parameters**\r\n\r\n`DATA`, 20 Bytes - address\r\n\r\n`QUANTITY|TAG` - Integer block number, or the string `\"latest\"`, `\"earliest\"` or `\"pending\"`, see the default block parameter\r\n\r\n```\r\nparams: [\r\n '0x407d73d8a49eeb85d32cf465507dd71d507100c1',\r\n 'latest' // state at the latest block\r\n]\r\n```\r\n\r\n**Returns**\r\n\r\n`QUANTITY` - Integer of the number of transactions sent from this address"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "getCode",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"id": "39da99ac-1428-42dc-aa1e-be0897d2ad6d",
|
|
"exec": [
|
|
"var expected = {",
|
|
" \"jsonrpc\": \"2.0\",",
|
|
" \"id\": 1,",
|
|
" \"result\": \"0x6060604052361561001f5760e060020a600035046372ea4b8c811461010c575b61011b3460008080670de0b6b3a764000084106101d557600180548101908190556003805433929081101561000257906000526020600020900160006101000a815481600160a060020a0302191690830217905550670de0b6b3a7640000840393508350670de0b6b3a76400006000600082828250540192505081905550600260016000505411151561011d5760038054829081101561000257906000526020600020900160009054906101000a9004600160a060020a0316600160a060020a03166000600060005054604051809050600060405180830381858888f150505080555060016002556101d5565b60018054016060908152602090f35b005b60018054600354910114156101d55760038054600254600101909102900392505b6003546002549003600119018310156101e357600380548490811015610002579082526040517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b9190910154600160a060020a03169082906706f05b59d3b200009082818181858883f1505090546706f05b59d3b1ffff1901835550506001929092019161013e565b505060028054600101905550505b600080548501905550505050565b506002548154919250600190810190910460001901905b60035460025490036001190183101561029a576003805484908110156100025760009182526040517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b9190910154600160a060020a03169190838504600019019082818181858883f1505081548486049003600190810190925550600290830183020460001901841415905061028e576001015b600192909201916101fa565b60038054600254810182018083559190829080158290116101c75760008390526101c7907fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b9081019083015b808211156102fa57600081556001016102e6565b509056\"",
|
|
"}",
|
|
"",
|
|
"pm.test('Has correct result', function() {",
|
|
" pm.expect(pm.response.json()).to.be.deep.equal(expected);",
|
|
"})",
|
|
""
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_getCode\",\n\t\"params\":[\n\t\t\"0x109c4f2ccc82c4d77bde15f306707320294aea3f\", \n\t\t\"0xc443\"\n\t],\n\t\"id\":1\n}",
|
|
"options": {
|
|
"raw": {}
|
|
}
|
|
},
|
|
"url": "{{HOST}}",
|
|
"description": "Returns the byte code at a given address (if it's a smart contract).\r\n\r\n**Parameters**\r\n\r\n`DATA`, 20 Bytes - Address from which to retreive byte code\r\n\r\n`QUANTITY|TAG` - Integer block number, or the string `\"latest\"`, `\"earliest\"` or `\"pending\"`, see the default block parameter\r\n\r\n```\r\nparams: [\r\n ' 0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b',\r\n '0x2' // 2\r\n]\r\n```\r\n\r\n**Returns**\r\n\r\n`DATA` - The byte code (if any) found at the given address"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "getStorageAt",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"id": "c8c16ab0-76df-451a-b951-4387190b5ce9",
|
|
"exec": [
|
|
"var expected = {",
|
|
" \"jsonrpc\": \"2.0\",",
|
|
" \"id\": 1,",
|
|
" \"result\": \"0x0000000000000000000000000000000000000000000000001bc16d674ec80000\"",
|
|
"}",
|
|
"",
|
|
"pm.test('Has correct result', function() {",
|
|
" pm.expect(pm.response.json()).to.be.deep.equal(expected);",
|
|
"})",
|
|
""
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n\t\"jsonrpc\":\"2.0\", \n\t\"method\": \"eth_getStorageAt\", \n\t\"params\": [\n\t\t\"0x109c4f2ccc82c4d77bde15f306707320294aea3f\", \n\t\t\"0x0\",\n\t\t\"0xc443\"\n\t], \n\t\"id\": 1\n}",
|
|
"options": {
|
|
"raw": {}
|
|
}
|
|
},
|
|
"url": "{{HOST}}",
|
|
"description": "Returns the value from a storage position at a given address.\r\n\r\n**Parameters**\r\n\r\n`DATA`, 20 Bytes - Address of the contract whose storage to retreive\r\n\r\n`QUANTITY` - Integer of the position in the storage\r\n\r\n`QUANTITY|TAG` - Integer block number, or the string `\"latest\"`, `\"earliest\"` or `\"pending\"`, see the default block parameter\r\n\r\n**Returns**\r\n\r\n`DATA` - The value at this storage position\r\n\r\n**Example**\r\n\r\nCalculating the correct position depends on the storage to retrieve. Consider the following contract deployed at 0x295a70b2de5e3953354a6a8344e616ed314d7251 by address 0x391694e7e0b0cce554cb130d723a9d27458f9298.\r\n\r\n```\r\ncontract Storage {\r\n uint pos0;\r\n mapping(address => uint) pos1;\r\n \r\n function Storage() {\r\n pos0 = 1234;\r\n pos1[msg.sender] = 5678;\r\n }\r\n}\r\n```\r\n\r\nRetrieving the value of pos0 is straight forward:\r\n\r\n```\r\ncurl -X POST --data '{\"jsonrpc\":\"2.0\", \"method\": \"eth_getStorageAt\", \"params\": [\"0x295a70b2de5e3953354a6a8344e616ed314d7251\", \"0x0\", \"latest\"], \"id\": 1}' {{HOST}}\r\n\r\n{\"jsonrpc\":\"2.0\",\"id\":1,\"result\":\"0x00000000000000000000000000000000000000000000000000000000000004d2\"}\r\n```\r\n\r\nRetrieving an element of the map is harder. The position of an element in the map is calculated with:\r\n\r\n```\r\nkeccack(LeftPad32(key, 0), LeftPad32(map position, 0))\r\n```\r\n\r\nThis means to retrieve the storage on `pos1[\"0x391694e7e0b0cce554cb130d723a9d27458f9298\"]` we need to calculate the position with:\r\n\r\n```\r\nkeccak(decodeHex(\"000000000000000000000000391694e7e0b0cce554cb130d723a9d27458f9298\" + \"0000000000000000000000000000000000000000000000000000000000000001\"))\r\n```\r\n\r\nThe geth console which comes with the web3 library can be used to make the calculation:\r\n\r\n```\r\n> var key = \"000000000000000000000000391694e7e0b0cce554cb130d723a9d27458f9298\" + \"0000000000000000000000000000000000000000000000000000000000000001\"\r\nundefined\r\n> web3.sha3(key, {\"encoding\": \"hex\"})\r\n\"0x6661e9d6d8b923d5bbaab1b96e1dd51ff6ea2a93520fdc9eb75d059238b8c5e9\"\r\n```"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "blockNumber",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"id": "2b42d0a2-d391-4554-8bd3-15b6eb0ecb47",
|
|
"exec": [
|
|
"// We can't really test this because it changes all the time",
|
|
"// We can't really test this because it changes all the time",
|
|
"pm.test('Cannot test because the value changes each time', function() {",
|
|
" pm.expect(true).to.be.true;",
|
|
"});"
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_blockNumber\",\n\t\"params\":[],\n\t\"id\":83\n}",
|
|
"options": {
|
|
"raw": {}
|
|
}
|
|
},
|
|
"url": "{{HOST}}",
|
|
"description": "Returns the block number of most recent block.\r\n\r\n**Parameters**\r\n\r\nnone\r\n\r\n**Returns**\r\n\r\n`QUANTITY` - Integer of the current highest block number the client is on"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "syncing",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"id": "d8b1fabd-a5ac-4d29-b126-5f1919eed395",
|
|
"exec": [
|
|
"// There's nothing really to test here. The node is always syncing",
|
|
"pm.test('Endpoint not tested', function() {",
|
|
" pm.expect(true).to.be.true;",
|
|
"});"
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_syncing\",\n\t\"params\":[],\n\t\"id\":1\n}",
|
|
"options": {
|
|
"raw": {}
|
|
}
|
|
},
|
|
"url": "{{HOST}}",
|
|
"description": "Returns a data object detaling the status of the sync process or false if not syncing.\r\n\r\n**Parameters**\r\n\r\nnone\r\n\r\n**Returns**\r\n\r\n`Object / Boolean`, An object with sync status data or `false`, when not syncing\r\n\r\n`startingBlock`: `QUANTITY` - The block at which the import started (will only be reset, after the sync reached his head)\r\n\r\n`currentBlock`: `QUANTITY` - The current block, same as eth_blockNumber\r\n\r\n`highestBlock`: `QUANTITY` - The estimated highest block"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "chainId",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"id": "d2b77d64-fd1a-469b-9846-82129fee4167",
|
|
"exec": [
|
|
"pm.test('Has correct result', function() {",
|
|
" const jsonData = pm.response.json();",
|
|
" pm.expect(jsonData.result).to.be.equals(\"0x1\")",
|
|
"});",
|
|
""
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_chainId\",\n\t\"params\":[],\n\t\"id\":67\n}",
|
|
"options": {
|
|
"raw": {}
|
|
}
|
|
},
|
|
"url": "{{HOST}}",
|
|
"description": "Returns the current ethereum chainId.\r\n\r\n**Parameters**\r\n\r\nnone\r\n\r\n**Returns**\r\n\r\n`QUANTITY` - The current chainId"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "protocolVersion",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"id": "8ee9f1b4-7bb9-47a5-b6ee-5515949a453c",
|
|
"exec": [
|
|
"pm.test('Has correct result', function() {",
|
|
" var isParity = pm.environment.get('HOST') == \"{{PARITY}}\";",
|
|
" const jsonData = pm.response.json();",
|
|
" ",
|
|
" if (isParity) {",
|
|
" pm.expect(jsonData.result).to.be.equals(\"63\")",
|
|
" } else {",
|
|
" pm.expect(jsonData.result).to.be.equals(\"0x41\")",
|
|
" }",
|
|
"});",
|
|
""
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_protocolVersion\",\n\t\"params\":[],\n\t\"id\":67\n}",
|
|
"options": {
|
|
"raw": {}
|
|
}
|
|
},
|
|
"url": "{{HOST}}",
|
|
"description": "Returns the current ethereum protocol version.\r\n\r\n**Parameters**\r\n\r\nnone\r\n\r\n**Returns**\r\n\r\n`QUANTITY` - The current ethereum protocol version"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "gasPrice",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"id": "c37eba0b-5b60-4815-b672-0d87af3ec301",
|
|
"exec": [
|
|
"// This can't really be tested as it changes all the time",
|
|
"pm.test('Cannot test because the value changes each time', function() {",
|
|
" pm.expect(true).to.be.true;",
|
|
"});"
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_gasPrice\",\n\t\"params\":[],\n\t\"id\":73\n}",
|
|
"options": {
|
|
"raw": {}
|
|
}
|
|
},
|
|
"url": "{{HOST}}",
|
|
"description": "Returns the current price per gas in wei.\r\n\r\n**Parameters**\r\n\r\nnone\r\n\r\n**Returns**\r\n\r\n`QUANTITY` - Integer of the current gas price in wei"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "call",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"id": "0b764b72-569b-4fdd-8267-40ebdbad9714",
|
|
"exec": [
|
|
"var expected = {",
|
|
" \"jsonrpc\": \"2.0\",",
|
|
" \"result\": \"0x0000000000000000000000000000000000000000000c685fa11e01ec6f000000\",",
|
|
" \"id\": 1",
|
|
"}",
|
|
"",
|
|
"pm.test('Has correct result', function() {",
|
|
" var jsonData = pm.response.json();",
|
|
" pm.expect(jsonData).to.be.deep.equal(expected);",
|
|
"})",
|
|
""
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_call\",\n\t\"params\":[\n {\n \"to\": \"0x08a2e41fb99a7599725190b9c970ad3893fa33cf\",\n \"data\": \"0x18160ddd\"\n },\n \"0xa2f2e0\"\n ],\n\t\"id\":1\n}",
|
|
"options": {
|
|
"raw": {}
|
|
}
|
|
},
|
|
"url": "{{HOST}}",
|
|
"description": "Executes a new message call immediately without creating a transaction on the block chain.\r\n\r\n**Parameters**\r\n\r\n`Object` - The transaction call object\r\n\r\n`from`: `DATA`, 20 Bytes - (optional) The address the transaction is sent from\r\n\r\n`to`: `DATA`, 20 Bytes - The address the transaction is directed to\r\n\r\n`gas`: `QUANTITY` - (optional) Integer of the gas provided for the transaction execution. eth_call consumes zero gas, but this parameter may be needed by some executions\r\n\r\n`gasPrice`: `QUANTITY` - (optional) Integer of the gasPrice used for each paid gas\r\n\r\n`value`: `QUANTITY` - (optional) Integer of the value sent with this transaction\r\n\r\n`data`: `DATA` - (optional) Hash of the method signature and encoded parameters. For details see Ethereum Contract ABI\r\n\r\n`QUANTITY|TAG` - Integer block number, or the string `\"latest\"`, `\"earliest\"` or `\"pending\"`, see the default block parameter\r\n\r\n**Returns**\r\n\r\n`DATA` - The return value of executed contract"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "estimateGas",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"id": "795d685b-b0d5-47c0-a2d4-6af018760b50",
|
|
"exec": [
|
|
"var isAllTests = pm.globals.get('TEST_ALL') === 'true';",
|
|
"if (isAllTests) {",
|
|
" pm.test('Not tested', function() {",
|
|
" var tested = false;",
|
|
" pm.expect(tested).to.be.true",
|
|
" })",
|
|
"}"
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_estimateGas\",\n\t\"params\":[\n {\n \"to\": \"0x3d597789ea16054a084ac84ce87f50df9198f415\",\n \"from\": \"0x3d597789ea16054a084ac84ce87f50df9198f415\",\n \"value\": \"0x1\"\n }\n ],\n\t\"id\":1\n}",
|
|
"options": {
|
|
"raw": {}
|
|
}
|
|
},
|
|
"url": "{{HOST}}",
|
|
"description": "Returns an estimate of how much gas is necessary to allow the transaction to complete. The transaction will not be added to the blockchain.\r\n\r\n**Note** The estimate may be significantly more than the amount of gas actually used by the transaction for a variety of reasons including EVM mechanics and node performance.\r\n\r\n**Note** If no gas limit is specified geth uses the block gas limit from the pending block as an upper bound. As a result the returned estimate might not be enough to executed the call/transaction when the amount of gas is higher than the pending block gas limit.\r\n\r\n**Parameters**\r\n\r\n`Object` - The transaction call object. See `eth_call` parameters, expect that all properties are optional\r\n\r\n**Returns**\r\n\r\n`QUANTITY` - The estimated amount of gas needed for the call"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "sendTransaction",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"id": "cf390d04-ef6e-4f3b-8969-8dd6b03587c3",
|
|
"exec": [
|
|
"var isAllTests = pm.globals.get('TEST_ALL') === 'true';",
|
|
"if (isAllTests) {",
|
|
" pm.test('Not tested', function() {",
|
|
" var tested = false;",
|
|
" pm.expect(tested).to.be.true",
|
|
" })",
|
|
"}"
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_sendTransaction\",\n\t\"params\":[{\n\t\t\"from\": \"0xb60e8dd61c5d32be8058bb8eb970870f07233155\",\n\t\t\"to\": \"0xd46e8dd67c5d32be8058bb8eb970870f07244567_hangs_parity\",\n\t\t\"gas\": \"0x76c0\",\n\t\t\"gasPrice\": \"0x9184e72a000\",\n\t\t\"value\": \"0x9184e72a\",\n\t\t\"data\": \"0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675\"\n\t}],\n\t\"id\":1\n}",
|
|
"options": {
|
|
"raw": {}
|
|
}
|
|
},
|
|
"url": "{{HOST}}",
|
|
"description": "Creates new message call transaction or a contract creation if the data field contains code.\r\n\r\n**Note** Use `eth_getTransactionReceipt` to get the contract address, after the transaction was mined, when you created a contract\r\n\r\n**Parameters**\r\n\r\n`Object` - The transaction object\r\n\r\n`from`: `DATA`, 20 Bytes - The address the transaction is send from\r\n\r\n`to`: `DATA`, 20 Bytes - (optional when creating new contract) The address the transaction is directed to\r\n\r\n`gas`: `QUANTITY` - (optional, default 90000) Integer of the gas provided for the transaction execution. It will return unused gas\r\n\r\n`gasPrice`: `QUANTITY` - (optional, default To-Be-Determined) Integer of the gasPrice used for each paid gas\r\n\r\n`value`: `QUANTITY` - (optional) Integer of the value sent with this transaction\r\n\r\n`data`: `DATA` - The compiled code of a contract OR the hash of the invoked method signature and encoded parameters. For details see Ethereum Contract ABI\r\n\r\n`nonce`: `QUANTITY` - (optional) Integer of a nonce. This allows to overwrite your own pending transactions that use the same nonce\r\n\r\n```\r\nparams: [{\r\n \"from\": \" 0xb60e8dd61c5d32be8058bb8eb970870f07233155\",\r\n \"to\": \" 0xd46e8dd67c5d32be8058bb8eb970870f07244567\",\r\n \"gas\": \"0x76c0\", // 30400\r\n \"gasPrice\": \"0x9184e72a000\", // 10000000000000\r\n \"value\": \"0x9184e72a\", // 2441406250\r\n \"data\": \"0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675\"\r\n}]\r\n```\r\n\r\n**Returns**\r\n\r\n`DATA`, 32 Bytes - The transaction hash, or the zero hash if the transaction is not yet available"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "sendRawTransaction",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"id": "9a9f8a8b-aa0b-458e-88cc-ee98b3ca146d",
|
|
"exec": [
|
|
"var isAllTests = pm.globals.get('TEST_ALL') === 'true';",
|
|
"if (isAllTests) {",
|
|
" pm.test('Not tested', function() {",
|
|
" var tested = false;",
|
|
" pm.expect(tested).to.be.true",
|
|
" })",
|
|
"}"
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_sendRawTransaction\",\n\t\"params\":[\"0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675\"],\n\t\"id\":1\n}",
|
|
"options": {
|
|
"raw": {}
|
|
}
|
|
},
|
|
"url": "{{HOST}}",
|
|
"description": "Creates new message call transaction or a contract creation for previously-signed transactions.\r\n\r\n**Note** Use `eth_getTransactionReceipt` to get the contract address, after the transaction was mined, when you created a contract.\r\n\r\n**Parameters**\r\n\r\n`DATA`, The signed transaction data\r\n\r\n```\r\nparams: [\"0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675\"]\r\n```\r\n\r\n**Returns**\r\n\r\n`DATA`, 32 Bytes - The transaction hash, or the zero hash if the transaction is not yet available"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "coinbase",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"id": "5324e236-da9c-4459-8b8a-d7b56a0e70b0",
|
|
"exec": [
|
|
"var allTests = pm.globals.get('TEST_ALL') === 'true';",
|
|
"if (!allTests)",
|
|
" return;",
|
|
"",
|
|
"var expectedNethermind = {",
|
|
" \"jsonrpc\": \"2.0\",",
|
|
" \"result\": \"0x0000000000000000000000000000000000000000\",",
|
|
" \"id\": 64",
|
|
"}",
|
|
"var expectedParity = {",
|
|
" \"jsonrpc\": \"2.0\",",
|
|
" \"error\": {",
|
|
" \"code\": -32023,",
|
|
" \"message\": \"No accounts were found\",",
|
|
" \"data\": \"\\\"\\\"\"",
|
|
" },",
|
|
" \"id\": 64",
|
|
"}",
|
|
"var expectedTurbo = {",
|
|
" \"jsonrpc\": \"2.0\",",
|
|
" \"id\": 64,",
|
|
" \"error\": {",
|
|
" \"code\": -32000,",
|
|
" \"message\": \"the function eth_coinbase is currently not implemented\"",
|
|
" }",
|
|
"}",
|
|
"",
|
|
"pm.test('Has correct result', function() {",
|
|
" var expected = {",
|
|
" '{{NETHERMIND}}': expectedNethermind,",
|
|
" '{{TURBOGETH}}': expectedTurbo,",
|
|
" '{{PARITY}}': expectedParity,",
|
|
" }",
|
|
" const jsonData = pm.response.json();",
|
|
" pm.expect(jsonData).to.deep.equals(expected[pm.environment.get('HOST')]);",
|
|
"})",
|
|
""
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_coinbase\",\n\t\"params\":[],\n\t\"id\":64\n}",
|
|
"options": {
|
|
"raw": {}
|
|
}
|
|
},
|
|
"url": "{{HOST}}",
|
|
"description": "Returns the current client coinbase address.\r\n\r\n**Parameters**\r\n\r\nnone\r\n\r\n**Returns**\r\n\r\n`DATA`, 20 bytes - The current coinbase address"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "hashrate",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"id": "cb4eebd1-6209-43e3-b4ee-79ec7d0a0838",
|
|
"exec": [
|
|
"var allTests = pm.globals.get('TEST_ALL') === 'true';",
|
|
"if (!allTests)",
|
|
" return;",
|
|
"",
|
|
"var expectedNethermind = {",
|
|
" \"jsonrpc\": \"2.0\",",
|
|
" \"result\": \"0x0\",",
|
|
" \"id\": 71",
|
|
"}",
|
|
"var expectedParity = {",
|
|
" \"jsonrpc\": \"2.0\",",
|
|
" \"result\": \"0x0\",",
|
|
" \"id\": 71",
|
|
"}",
|
|
"var expectedTurbo = {",
|
|
" \"jsonrpc\": \"2.0\",",
|
|
" \"id\": 71,",
|
|
" \"error\": {",
|
|
" \"code\": -32000,",
|
|
" \"message\": \"the function eth_hashRate is currently not implemented\"",
|
|
" }",
|
|
"}",
|
|
"",
|
|
"pm.test('Has correct result', function() {",
|
|
" var expected = {",
|
|
" '{{NETHERMIND}}': expectedNethermind,",
|
|
" '{{TURBOGETH}}': expectedTurbo,",
|
|
" '{{PARITY}}': expectedParity,",
|
|
" }",
|
|
" const jsonData = pm.response.json();",
|
|
" pm.expect(jsonData).to.deep.equals(expected[pm.environment.get('HOST')]);",
|
|
"})",
|
|
""
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_hashrate\",\n\t\"params\":[],\n\t\"id\":71\n}",
|
|
"options": {
|
|
"raw": {}
|
|
}
|
|
},
|
|
"url": "{{HOST}}",
|
|
"description": "Returns the number of hashes per second that the node is mining with.\r\n\r\n**Parameters**\r\n\r\nnone\r\n\r\n**Returns**\r\n\r\n`QUANTITY` - Number of hashes per second"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "mining",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"id": "79611580-9496-4e4e-a3fa-c137aab84ae2",
|
|
"exec": [
|
|
"var allTests = pm.globals.get('TEST_ALL') === 'true';",
|
|
"if (!allTests)",
|
|
" return;",
|
|
"",
|
|
"var expectedNethermind = {",
|
|
" \"jsonrpc\": \"2.0\",",
|
|
" \"result\": false,",
|
|
" \"id\": 71",
|
|
"}",
|
|
"var expectedParity = {",
|
|
" \"jsonrpc\": \"2.0\",",
|
|
" \"result\": false,",
|
|
" \"id\": 71",
|
|
"}",
|
|
"var expectedTurbo = {",
|
|
" \"jsonrpc\": \"2.0\",",
|
|
" \"id\": 71,",
|
|
" \"error\": {",
|
|
" \"code\": -32000,",
|
|
" \"message\": \"the function eth_mining is currently not implemented\"",
|
|
" }",
|
|
"}",
|
|
"",
|
|
"pm.test('Has correct result', function() {",
|
|
" var expected = {",
|
|
" '{{NETHERMIND}}': expectedNethermind,",
|
|
" '{{TURBOGETH}}': expectedTurbo,",
|
|
" '{{PARITY}}': expectedParity,",
|
|
" }",
|
|
" const jsonData = pm.response.json();",
|
|
" pm.expect(jsonData).to.deep.equals(expected[pm.environment.get('HOST')]);",
|
|
"})",
|
|
""
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_mining\",\n\t\"params\":[],\n\t\"id\":71\n}",
|
|
"options": {
|
|
"raw": {}
|
|
}
|
|
},
|
|
"url": "{{HOST}}",
|
|
"description": "Returns `true` if client is actively mining new blocks.\r\n\r\n**Parameters**\r\n\r\nnone\r\n\r\n**Returns**\r\n\r\n`Boolean` - `true` if the client is mining, `false` otherwise"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "getWork",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"id": "0745b85b-c2bd-4bff-bbad-f168536fa7a6",
|
|
"exec": [
|
|
"var allTests = pm.globals.get('TEST_ALL') === 'true';",
|
|
"if (!allTests)",
|
|
" return;",
|
|
"",
|
|
"var expectedNethermind = {",
|
|
" \"jsonrpc\": \"2.0\",",
|
|
" \"error\": {",
|
|
" \"code\": -32601,",
|
|
" \"message\": \"eth_getWork not supported\"",
|
|
" },",
|
|
" \"id\": 73",
|
|
"}",
|
|
"var expectedParity = {",
|
|
" \"jsonrpc\": \"2.0\",",
|
|
" \"error\": {",
|
|
" \"code\": -32002,",
|
|
" \"message\": \"Author not configured. Run Parity with --author to configure.\"",
|
|
" },",
|
|
" \"id\": 73",
|
|
"}",
|
|
"var expectedTurbo = {",
|
|
" \"jsonrpc\": \"2.0\",",
|
|
" \"id\": 73,",
|
|
" \"error\": {",
|
|
" \"code\": -32000,",
|
|
" \"message\": \"the function eth_getWork is currently not implemented\"",
|
|
" }",
|
|
"}",
|
|
"",
|
|
"pm.test('Has correct result', function() {",
|
|
" var expected = {",
|
|
" '{{NETHERMIND}}': expectedNethermind,",
|
|
" '{{TURBOGETH}}': expectedTurbo,",
|
|
" '{{PARITY}}': expectedParity,",
|
|
" }",
|
|
" const jsonData = pm.response.json();",
|
|
" pm.expect(jsonData).to.deep.equals(expected[pm.environment.get('HOST')]);",
|
|
"})",
|
|
""
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_getWork\",\n\t\"params\":[],\n\t\"id\":73\n}",
|
|
"options": {
|
|
"raw": {}
|
|
}
|
|
},
|
|
"url": "{{HOST}}",
|
|
"description": "Returns the hash of the current block, the seedHash, and the boundary condition to be met (\"target\").\r\n\r\n**Parameters**\r\n\r\nnone\r\n\r\n**Returns**\r\n\r\n`Array` of DATA, 32 Bytes - Array of three hashes representing block header pow-hash, seed hash and boundary condition\r\n\r\n`DATA`, 32 Bytes - current block header pow-hash\r\n\r\n`DATA`, 32 Bytes - The seed hash used for the DAG\r\n\r\n`DATA`, 32 Bytes - The boundary condition (\"target\"), 2^256 / difficulty"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "submitWork",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"id": "13dfae02-97dd-44cb-b067-5288a8305750",
|
|
"exec": [
|
|
"var allTests = false; //pm.globals.get('TEST_ALL') === 'true';",
|
|
"if (!allTests)",
|
|
" return;",
|
|
"",
|
|
"var expectedNethermind = {",
|
|
" \"jsonrpc\": \"2.0\",",
|
|
" \"error\": {",
|
|
" \"code\": -32601,",
|
|
" \"message\": \"eth_submitWork not supported\"",
|
|
" },",
|
|
" \"id\": 73",
|
|
"}",
|
|
"var expectedParity = {",
|
|
" \"jsonrpc\": \"2.0\",",
|
|
" \"result\": false,",
|
|
" \"id\": 73",
|
|
"}",
|
|
"var expectedTurbo = {",
|
|
" \"jsonrpc\": \"2.0\",",
|
|
" \"id\": 73,",
|
|
" \"error\": {",
|
|
" \"code\": -32000,",
|
|
" \"message\": \"the function eth_submitWork is currently not implemented\"",
|
|
" }",
|
|
"}",
|
|
"",
|
|
"pm.test('Has correct result', function() {",
|
|
" var expected = {",
|
|
" '{{NETHERMIND}}': expectedNethermind,",
|
|
" '{{TURBOGETH}}': expectedTurbo,",
|
|
" '{{PARITY}}': expectedParity,",
|
|
" }",
|
|
" const jsonData = pm.response.json();",
|
|
" pm.expect(jsonData).to.deep.equals(expected[pm.environment.get('HOST')]);",
|
|
"})",
|
|
""
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n\t\"jsonrpc\":\"2.0\", \n\t\"method\":\"eth_submitWork\", \n\t\"params\":[\n\t\t\"0x1\", \n\t\t\"0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef\", \n\t\t\"0xD16E5700000000000000000000000000D16E5700000000000000000000000000\"\n\t],\n\t\"id\":73\n}",
|
|
"options": {
|
|
"raw": {}
|
|
}
|
|
},
|
|
"url": "{{HOST}}",
|
|
"description": "Submits a proof-of-work solution to the blockchain.\r\n\r\n**Parameters**\r\n\r\n`DATA`, 8 Bytes - The nonce found (64 bits)\r\n\r\n`DATA`, 32 Bytes - The header's pow-hash (256 bits)\r\n\r\n`DATA`, 32 Bytes - The mix digest (256 bits)\r\n\r\n```\r\nparams: [\r\n \"0x0000000000000001\",\r\n \"0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef\",\r\n \"0xD1FE5700000000000000000000000000D1FE5700000000000000000000000000\"\r\n]\r\n```\r\n\r\n**Returns**\r\n\r\n`Boolean` - `true` if the provided solution is valid, `false` otherwise"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "submitHashrate",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"id": "109271b1-9349-43b1-b7bf-8484ec60eeb4",
|
|
"exec": [
|
|
"var allTests = pm.globals.get('TEST_ALL') === 'true';",
|
|
"if (!allTests)",
|
|
" return;",
|
|
"",
|
|
"var expectedNethermind = {",
|
|
" \"jsonrpc\": \"2.0\",",
|
|
" \"error\": {",
|
|
" \"code\": -32601,",
|
|
" \"message\": \"eth_submitHashrate not supported\"",
|
|
" },",
|
|
" \"id\": 73",
|
|
"}",
|
|
"var expectedParity = {",
|
|
" \"jsonrpc\": \"2.0\",",
|
|
" \"result\": true,",
|
|
" \"id\": 73",
|
|
"}",
|
|
"var expectedTurbo = {",
|
|
" \"jsonrpc\": \"2.0\",",
|
|
" \"id\": 73,",
|
|
" \"error\": {",
|
|
" \"code\": -32000,",
|
|
" \"message\": \"the function eth_sumitHashrate is currently not implemented\"",
|
|
" }",
|
|
"}",
|
|
"",
|
|
"pm.test('Has correct result', function() {",
|
|
" var expected = {",
|
|
" '{{NETHERMIND}}': expectedNethermind,",
|
|
" '{{TURBOGETH}}': expectedTurbo,",
|
|
" '{{PARITY}}': expectedParity,",
|
|
" }",
|
|
" const jsonData = pm.response.json();",
|
|
" pm.expect(jsonData).to.deep.equals(expected[pm.environment.get('HOST')]);",
|
|
"})",
|
|
""
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n\t\"jsonrpc\":\"2.0\", \n\t\"method\":\"eth_submitHashrate\", \n\t\"params\":[\n\t\t\"0x0000000000000000000000000000000000000000000000000000000000500000\", \n\t\t\"0x59daa26581d0acd1fce254fb7e85952f4c09d0915afd33d3886cd914bc7d283c\"\n\t],\n\t\"id\":73\n}",
|
|
"options": {
|
|
"raw": {}
|
|
}
|
|
},
|
|
"url": "{{HOST}}",
|
|
"description": "Submit the mining hashrate to the blockchain.\r\n\r\n**Parameters**\r\n\r\n`DATA`, 32 Bytes - a hexadecimal string representation (32 bytes) of the hash rate\r\n\r\n`ID`, String - A random hexadecimal(32 bytes) ID identifying the client\r\n\r\n```\r\nparams: [\r\n \"0x0000000000000000000000000000000000000000000000000000000000500000\",\r\n \"0x59daa26581d0acd1fce254fb7e85952f4c09d0915afd33d3886cd914bc7d283c\"\r\n]\r\n```\r\n\r\n**Returns**\r\n\r\n`Boolean` - `true` if submitting went through succesfully, `false` otherwise"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "call",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"id": "4dbe9f0f-500b-4a1b-b283-a45929bfcfad",
|
|
"exec": [
|
|
""
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"trace_call\",\n\t\"params\":[],\n\t\"id\":1\n}",
|
|
"options": {
|
|
"raw": {}
|
|
}
|
|
},
|
|
"url": "{{HOST}}",
|
|
"description": "Call(ctx context.Context, call CallParam, blockNr rpc.BlockNumber) ([]interface{}, error)"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "callMany",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"id": "346b00eb-7c6f-483b-92eb-8e8f7a9411a8",
|
|
"exec": [
|
|
""
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"trace_callMany\",\n\t\"params\":[],\n\t\"id\":1\n}",
|
|
"options": {
|
|
"raw": {}
|
|
}
|
|
},
|
|
"url": "{{HOST}}",
|
|
"description": "CallMany(ctx context.Context, calls CallParams) ([]interface{}, error)"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "rawTransaction",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"id": "77ba142b-f3c2-40e3-8255-e11243ec0b1c",
|
|
"exec": [
|
|
""
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"trace_rawTransaction\",\n\t\"params\":[],\n\t\"id\":1\n}",
|
|
"options": {
|
|
"raw": {}
|
|
}
|
|
},
|
|
"url": "{{HOST}}",
|
|
"description": "RawTransaction(ctx context.Context, txHash common.Hash, traceTypes []string) ([]interface{}, error)"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "replayBlockTransactions",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"id": "5daa4d5b-1ea1-4a91-b51b-872f3f558b48",
|
|
"exec": [
|
|
""
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"trace_replayBlockTransactions\",\n\t\"params\":[],\n\t\"id\":1\n}",
|
|
"options": {
|
|
"raw": {}
|
|
}
|
|
},
|
|
"url": "{{HOST}}",
|
|
"description": "ReplayBlockTransactions(ctx context.Context, blockNr rpc.BlockNumber, traceTypes []string) ([]interface{}, error)"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "replayTransaction",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"id": "d5e23bec-9879-4edc-b281-a8d2923eb250",
|
|
"exec": [
|
|
""
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"trace_replayTransaction\",\n\t\"params\":[],\n\t\"id\":1\n}",
|
|
"options": {
|
|
"raw": {}
|
|
}
|
|
},
|
|
"url": "{{HOST}}",
|
|
"description": "ReplayTransaction(ctx context.Context, txHash common.Hash, traceTypes []string) ([]interface{}, error)"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "transaction",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"id": "e1e3da8f-48e1-42d8-bd8b-0b1d4f7b6869",
|
|
"exec": [
|
|
""
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"trace_transaction\",\n\t\"params\":[],\n\t\"id\":1\n}",
|
|
"options": {
|
|
"raw": {}
|
|
}
|
|
},
|
|
"url": "{{HOST}}",
|
|
"description": "Transaction(ctx context.Context, txHash common.Hash) (ParityTraces, error)"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "get",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"id": "535748a7-b6c0-43bd-a536-f2f409e4cad3",
|
|
"exec": [
|
|
""
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"trace_get\",\n\t\"params\":[],\n\t\"id\":1\n}",
|
|
"options": {
|
|
"raw": {}
|
|
}
|
|
},
|
|
"url": "{{HOST}}",
|
|
"description": "Get(ctx context.Context, txHash common.Hash, txIndicies []hexutil.Uint64) (*ParityTrace, error)"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "block",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"id": "511e905a-62d0-44d7-a673-ef625d1deab3",
|
|
"exec": [
|
|
""
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"trace_block\",\n\t\"params\":[],\n\t\"id\":1\n}",
|
|
"options": {
|
|
"raw": {}
|
|
}
|
|
},
|
|
"url": "{{HOST}}",
|
|
"description": "Block(ctx context.Context, blockNr rpc.BlockNumber) (ParityTraces, error)"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "filter",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"id": "6f552c49-c9be-4261-a247-6f98c167ca67",
|
|
"exec": [
|
|
""
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"trace_filter\",\n\t\"params\":[],\n\t\"id\":1\n}",
|
|
"options": {
|
|
"raw": {}
|
|
}
|
|
},
|
|
"url": "{{HOST}}",
|
|
"description": "Filter(ctx context.Context, req TraceFilterRequest) (ParityTraces, error)"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "forks",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"id": "6f697d06-9b69-455d-9fab-911ff4fd835a",
|
|
"exec": [
|
|
"var expected = {",
|
|
" \"jsonrpc\": \"2.0\",",
|
|
" \"id\": 1,",
|
|
" \"result\": {",
|
|
" \"genesis\": \"0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3\",",
|
|
" \"passed\": [",
|
|
" 1150000,",
|
|
" 1920000,",
|
|
" 2463000,",
|
|
" 2675000,",
|
|
" 4370000,",
|
|
" 7280000,",
|
|
" 9069000,",
|
|
" 9200000",
|
|
" ]",
|
|
" }",
|
|
"}",
|
|
"",
|
|
"pm.test('Has correct result', function() {",
|
|
" pm.expect(pm.response.json()).to.be.deep.equal(expected);",
|
|
"})",
|
|
""
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"tg_forks\",\n\t\"params\":[\"latest\"],\n\t\"id\":1\n}",
|
|
"options": {
|
|
"raw": {}
|
|
}
|
|
},
|
|
"url": "{{HOST}}",
|
|
"description": "Returns the genesis block hash and a sorted list of already passed fork block numbers as well as the next fork block (if applicable)\r\n\r\n**Parameters**\r\n\r\n`QUANTITY|TAG or DATA` - Integer of a block number, the string `\"earliest\"`, `\"latest\"` or `\"pending\"`, or a 32 byte block hash\r\n\r\n**Returns**\r\n\r\nA structure of the type Forks\r\n\r\n```\r\ntype Forks struct {\r\n\tgenesis common.Hash // the hash of the genesis block\r\n\tpassed []uint64 // array of block numbers passed by this client\r\n\tnext *uint64 // the next fork block (may be empty)\r\n}\r\n```"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "getHeaderByNumber",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"id": "b2b456bb-19ab-4819-b21e-be9c7787bdea",
|
|
"exec": [
|
|
"var expected = {",
|
|
" \"jsonrpc\": \"2.0\",",
|
|
" \"id\": 1,",
|
|
" \"result\": {",
|
|
" \"parentHash\": \"0xb495a1d7e6663152ae92708da4843337b958146015a2802f4193a410044698c9\",",
|
|
" \"sha3Uncles\": \"0x6b17b938c6e4ef18b26ad81b9ca3515f27fd9c4e82aac56a1fd8eab288785e41\",",
|
|
" \"miner\": \"0x5088d623ba0fcf0131e0897a91734a4d83596aa0\",",
|
|
" \"stateRoot\": \"0x76ab0b899e8387436ff2658e2988f83cbf1af1590b9fe9feca3714f8d1824940\",",
|
|
" \"transactionsRoot\": \"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421\",",
|
|
" \"receiptsRoot\": \"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421\",",
|
|
" \"logsBloom\": \"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\",",
|
|
" \"difficulty\": \"0x3fe802ffe\",",
|
|
" \"number\": \"0x3\",",
|
|
" \"gasLimit\": \"0x1388\",",
|
|
" \"gasUsed\": \"0x0\",",
|
|
" \"timestamp\": \"0x55ba4260\",",
|
|
" \"extraData\": \"0x476574682f76312e302e302d66633739643332642f6c696e75782f676f312e34\",",
|
|
" \"mixHash\": \"0x65e12eec23fe6555e6bcdb47aa25269ae106e5f16b54e1e92dcee25e1c8ad037\",",
|
|
" \"nonce\": \"0x2e9344e0cbde83ce\",",
|
|
" \"hash\": \"0x3d6122660cc824376f11ee842f83addc3525e2dd6756b9bcf0affa6aa88cf741\"",
|
|
" }",
|
|
"}",
|
|
"",
|
|
"pm.test('Has correct result', function() {",
|
|
" pm.expect(pm.response.json()).to.be.deep.equal(expected);",
|
|
"})",
|
|
""
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"tg_getHeaderByNumber\",\n\t\"params\":[\n\t\t\"0x3\"\n\t],\n\t\"id\":1\n}",
|
|
"options": {
|
|
"raw": {}
|
|
}
|
|
},
|
|
"url": "{{HOST}}",
|
|
"description": "Returns a block's header given a block number ignoring the block's transaction and uncle list (may be faster).\r\n\r\n**Parameters**\r\n\r\n`QUANTITY|TAG` - Integer of a block number, or the string `\"earliest\"`, `\"latest\"` or `\"pending\"`\r\n\r\n**Returns**\r\n\r\n`Object` - A block object, or null when no block was found. See `eth_getBlockByHash`"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "getHeaderByHash",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"id": "6302f0b7-2277-48bf-89b9-698ac94d3ef7",
|
|
"exec": [
|
|
"var expected = {",
|
|
" \"jsonrpc\": \"2.0\",",
|
|
" \"id\": 1,",
|
|
" \"result\": {",
|
|
" \"parentHash\": \"0xb495a1d7e6663152ae92708da4843337b958146015a2802f4193a410044698c9\",",
|
|
" \"sha3Uncles\": \"0x6b17b938c6e4ef18b26ad81b9ca3515f27fd9c4e82aac56a1fd8eab288785e41\",",
|
|
" \"miner\": \"0x5088d623ba0fcf0131e0897a91734a4d83596aa0\",",
|
|
" \"stateRoot\": \"0x76ab0b899e8387436ff2658e2988f83cbf1af1590b9fe9feca3714f8d1824940\",",
|
|
" \"transactionsRoot\": \"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421\",",
|
|
" \"receiptsRoot\": \"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421\",",
|
|
" \"logsBloom\": \"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\",",
|
|
" \"difficulty\": \"0x3fe802ffe\",",
|
|
" \"number\": \"0x3\",",
|
|
" \"gasLimit\": \"0x1388\",",
|
|
" \"gasUsed\": \"0x0\",",
|
|
" \"timestamp\": \"0x55ba4260\",",
|
|
" \"extraData\": \"0x476574682f76312e302e302d66633739643332642f6c696e75782f676f312e34\",",
|
|
" \"mixHash\": \"0x65e12eec23fe6555e6bcdb47aa25269ae106e5f16b54e1e92dcee25e1c8ad037\",",
|
|
" \"nonce\": \"0x2e9344e0cbde83ce\",",
|
|
" \"hash\": \"0x3d6122660cc824376f11ee842f83addc3525e2dd6756b9bcf0affa6aa88cf741\"",
|
|
" }",
|
|
"}",
|
|
"",
|
|
"pm.test('Has correct result', function() {",
|
|
" pm.expect(pm.response.json()).to.be.deep.equal(expected);",
|
|
"})",
|
|
""
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"tg_getHeaderByHash\",\n\t\"params\":[\n\t\t\"0x3d6122660cc824376f11ee842f83addc3525e2dd6756b9bcf0affa6aa88cf741\"\n\t],\n\t\"id\":1\n}",
|
|
"options": {
|
|
"raw": {}
|
|
}
|
|
},
|
|
"url": "{{HOST}}",
|
|
"description": "Returns a block's header given a block's hash.\r\n\r\n**Parameters**\r\n\r\n`DATA`, 32 Bytes - Hash of a block\r\n\r\n```\r\nparams: [\r\n '0x3d6122660cc824376f11ee842f83addc3525e2dd6756b9bcf0affa6aa88cf741'\r\n]\r\n```\r\n\r\n**Returns**\r\n\r\n`Object` - A block object, or null when no block was found. See `eth_getBlockByHash`"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "getLogsByHash",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"id": "2a5f31b0-e872-4561-a16b-c87ec10184ee",
|
|
"exec": [
|
|
"var expected = [",
|
|
" null,",
|
|
" [",
|
|
" {",
|
|
" \"address\": \"0xb8c77482e45f1f44de1745f52c74426c631bdd52\",",
|
|
" \"topics\": [",
|
|
" \"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef\",",
|
|
" \"0x000000000000000000000000001866ae5b3de6caa5a51543fd9fb64f524f5478\",",
|
|
" \"0x00000000000000000000000016a9c11e229ce221578a9adb3e7c0a48482e8063\"",
|
|
" ],",
|
|
" \"data\": \"0x00000000000000000000000000000000000000000000021ea4a7ecbf3c280000\",",
|
|
" \"blockNumber\": \"0x3d0cec\",",
|
|
" \"transactionHash\": \"0x99f91752d50d0c2c92e681fda082843747e8284d846f8b623e4cd280fbd7bb65\",",
|
|
" \"transactionIndex\": \"0x2\",",
|
|
" \"blockHash\": \"0x2f244c154cbacb0305581295b80efa6dffb0224b60386a5fc6ae9585e2a140c4\",",
|
|
" \"logIndex\": \"0x0\",",
|
|
" \"removed\": false",
|
|
" }",
|
|
" ]",
|
|
"]",
|
|
"",
|
|
"pm.test('Has correct result', function() {",
|
|
" // We test just two log entries to keep the test case small",
|
|
" var jsonData = pm.response.json();",
|
|
" pm.expect(jsonData.result[0]).to.be.deep.equal(expected[0]);",
|
|
" pm.expect(jsonData.result[2]).to.be.deep.equal(expected[1]);",
|
|
"})",
|
|
""
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_getLogsByHash\",\n\t\"params\":[\n\t\t\"0x2f244c154cbacb0305581295b80efa6dffb0224b60386a5fc6ae9585e2a140c4\"\n\t],\n\t\"id\":1\n}",
|
|
"options": {
|
|
"raw": {}
|
|
}
|
|
},
|
|
"url": "{{HOST}}",
|
|
"description": "Returns an array of arrays of logs generated by the transactions in the block given by the block's hash.\r\n\r\n**Note:** The returned value is an array of arrays of log entries. There is an entry for each transaction in the block.\r\n\r\nIf transaction `X` did not create any logs, the entry at `result[X]` will be `null`\r\n\r\nIf transaction `X` generated `N` logs, the entry at position `result[X]` will be an array of `N` log objects\r\n\r\n**Parameters**\r\n\r\n`blockHash`: `DATA`, 32 bytes, hash of block at which to retreive data\r\n\r\n**Returns**\r\n\r\n`Array` - An array of arrays of log objects, some of which may be `null`, found in the block. See `eth_getFilterChanges`"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "issuance",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"id": "d696a779-53a7-4147-9264-cc13bcdf5489",
|
|
"exec": [
|
|
"var expected = {",
|
|
" \"jsonrpc\": \"2.0\",",
|
|
" \"id\": 1,",
|
|
" \"result\": {",
|
|
" \"blockReward\": \"0x478eae0e571ba000\",",
|
|
" \"uncleReward\": \"0x340aad21b3b70000\",",
|
|
" \"issuance\": \"0x7b995b300ad2a000\"",
|
|
" }",
|
|
"}",
|
|
"",
|
|
"pm.test('Has correct result', function() {",
|
|
" pm.expect(pm.response.json()).to.be.deep.equal(expected);",
|
|
"})",
|
|
""
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"tg_issuance\",\n\t\"params\":[\n\t\t\"0x3\"\n\t],\n\t\"id\":1\n}",
|
|
"options": {
|
|
"raw": {}
|
|
}
|
|
},
|
|
"url": "{{HOST}}",
|
|
"description": "Returns the total issuance (block reward plus uncle reward) for the given block.\r\n\r\n**Parameters**\r\n\r\n`QUANTITY|TAG` - Integer of a block number, or the string `\"earliest\"`, `\"latest\"` or `\"pending\"`, as in the default block parameter\r\n\r\n**Returns**\r\n\r\n`Object` - an `Issuance` object of type\r\n\r\n```\r\n{\r\n blockReward: \"0x478eae0e571ba000\", // the issuance to the miner of the block (includes nephew reward but not transaction fees)\r\n uncleReward: \"0x340aad21b3b70000\", // the issuance to miners of included uncle (if any)\r\n issuance: \"0x7b995b300ad2a000\" // the sum of blockReward and uncleReward\r\n}\r\n```"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "storageRangeAt",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"id": "e2079a29-7de5-4875-bc71-fdcc5c24caf2",
|
|
"exec": [
|
|
"var expected = {",
|
|
" \"jsonrpc\": \"2.0\",",
|
|
" \"id\": 1,",
|
|
" \"result\": {",
|
|
" \"storage\": {",
|
|
" \"0x290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e563\": {",
|
|
" \"key\": \"0x0000000000000000000000000000000000000000000000000000000000000000\",",
|
|
" \"value\": \"0x000000000000000000000000ed2f1401f8994d3ff2b2a923e743c24c2914ab4f\"",
|
|
" },",
|
|
" \"0xb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6\": {",
|
|
" \"key\": \"0x0000000000000000000000000000000000000000000000000000000000000001\",",
|
|
" \"value\": \"0x000000000000000000000000739c71235a9669f6b900490ab1c95310c19abc71\"",
|
|
" }",
|
|
" },",
|
|
" \"nextKey\": \"0x0000000000000000000000000000000000000000000000000000000000000002\"",
|
|
" }",
|
|
"}",
|
|
"",
|
|
"pm.test('Has correct result', function() {",
|
|
" pm.expect(pm.response.json()).to.be.deep.equal(expected);",
|
|
"})",
|
|
""
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"debug_storageRangeAt\",\n\t\"params\":[\n\t\t\"0xd3f1853788b02e31067f2c6e65cb0ae56729e23e3c92e2393af9396fa182701d\", \n 1,\n \"0xb734c74ff4087493373a27834074f80acbd32827\",\n\t\t\"0x00\",\n 2\n\t],\n\t\"id\":1\n}",
|
|
"options": {
|
|
"raw": {}
|
|
}
|
|
},
|
|
"url": "{{HOST}}",
|
|
"description": "Returns information about a range of storage locations (if any) for the given address.\r\n\r\n**Parameters**\r\n\r\n`blockHash`: `DATA`, 32 bytes, hash of block at which to retreive data\r\n\r\n`txIndex`: `QUANTITY`, 8 bytes, transaction index in the give block\r\n\r\n`contractAddress`: `DATA` 20 bytes, contract address from which to retreive storage data\r\n\r\n`keyStart`: `DATA` 32 bytes, storage key to retreive\r\n\r\n`maxResult`: QUANTITY, 8 bytes, the number of values to retreive\r\n\r\n**Returns**\r\n\r\nReturns `StorageRangeResult` which is defined as\r\n\r\n```\r\ntype StorageRangeResult struct {\r\n `storage` StorageMap // see below\r\n `nextKey` *common.Hash // nil if `storage` includes the last key in the trie\r\n}\r\n```\r\n\r\n`StorageMap` is a type defined as `map[common.Hash]StorageEntry` and `StorageEntry` is defined as\r\n\r\n```\r\ntype StorageEntry struct {\r\n\tkey *common.Hash\r\n\tvalue common.Hash\r\n}\r\n```"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "accountRange",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"id": "625b38d4-e26c-40ad-a0eb-aa3768a6fb2b",
|
|
"exec": [
|
|
"var allTests = false; //pm.globals.get('TEST_ALL') === 'true';",
|
|
"if (!allTests)",
|
|
" return;",
|
|
"",
|
|
"",
|
|
"var expected = {",
|
|
" \"jsonrpc\": \"2.0\",",
|
|
" \"id\": 1,",
|
|
" \"result\": {",
|
|
" \"root\": \"0x4943d941637411107494da9ec8bc04359d731bfd08b72b4d0edcbd4cd2ecb341\",",
|
|
" \"accounts\": {",
|
|
" \"0x0a0650861f785ed8e4bf1005c450bbd06eb48fb6\": {",
|
|
" \"balance\": \"3066860000000000000000\",",
|
|
" \"nonce\": 0,",
|
|
" \"root\": \"0000000000000000000000000000000000000000000000000000000000000000\",",
|
|
" \"codeHash\": \"c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470\"",
|
|
" }",
|
|
" },",
|
|
" \"next\": \"Cgb619zXpJLLwFPuq95pNLOdhjc=\"",
|
|
" }",
|
|
"}",
|
|
"",
|
|
"pm.test('Has correct result', function() {",
|
|
" pm.expect(pm.response.json()).to.be.deep.equal(expected);",
|
|
"})",
|
|
""
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"debug_accountRange\",\n\t\"params\":[\n\t\t\"0x2\", \n\t\t[10],\n 1,\n true,\n true,\n true\n\t],\n\t\"id\":1\n}",
|
|
"options": {
|
|
"raw": {}
|
|
}
|
|
},
|
|
"url": "{{HOST}}",
|
|
"description": "Returns a range of accounts involved in the given block range\r\n\r\n**Parameters**\r\n\r\n`block: `QUANTITY|TAG` - Integer of a block number, or the string `\"earliest\"`, `\"latest\"` or `\"pending\"`, as in the default block parameter\r\n\r\n`keyStart`: DATA, N bytes, a prefix against which to match account addresses (report only on accounts addresses that begin with this prefix, default matches all accounts)\r\n\r\n`maxResult`: QUANTITY, 8 bytes, the maximum number of accounts to retreive\r\n\r\n`excludeCode`: `Boolean`, if `true`, do not return byte code from the address, if `false` return the byte code (if any)\r\n\r\n`excludeStorage`: `Boolean`, if `true`, do not return storage from the address, if `false` return storage (if any)\r\n\r\n`excludeMissingPreimages`: `Boolean`, if `true`, do not return missing preimages, if `false` do return them\r\n\r\n**Returns**\r\n\r\nReturns `IteratorDump` which is defined as\r\n\r\n```\r\ntype IteratorDump struct {\r\n\troot string\r\n\taccounts map[common.Address]DumpAccount\r\n\tnext []byte // nil if no more accounts\r\n}\r\n```\r\n\r\n`DumpAccount` is a type defined as\r\n\r\n```\r\ntype DumpAccount struct {\r\n\tbalance string\r\n\tnonce uint64\r\n\troot string\r\n\tcodeHash string\r\n\tcode string\r\n\tstorage map[string]string\r\n\taddress *common.Address\r\n\tsecureKey hexutil.Bytes // If we don't have address, we can output the key\r\n}\r\n```"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "getModifiedAccountsByNumber",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"id": "0aa922a0-ed8a-41f8-a259-845c2bb1ec83",
|
|
"exec": [
|
|
"var expected = {",
|
|
" \"jsonrpc\": \"2.0\",",
|
|
" \"id\": 1,",
|
|
" \"result\": [",
|
|
" \"0x8764b360076809bba4635c4281c3f44c1677d013\",",
|
|
" \"0x1194e966965418c7d73a42cceeb254d875860356\",",
|
|
" \"0x42e6723a0c884e922240e56d7b618bec96f35800\",",
|
|
" \"0x52bc44d5378309ee2abf1539bf71de1b7d7be3b5\",",
|
|
" \"0xdf88d2cf450e1134e0cd794c3b89d648c3269ffc\",",
|
|
" \"0x2a65aca4d5fc5b5c859090a6c34d164135398226\",",
|
|
" \"0x68795c4aa09d6f4ed3e5deddf8c2ad3049a601da\",",
|
|
" \"0x8751355da8bb4854620e247904fc64c2dbff0484\"",
|
|
" ]",
|
|
"}",
|
|
"",
|
|
"pm.test('Has correct result', function() {",
|
|
" const jsonData = pm.response.json();",
|
|
" jsonData.result = jsonData.result.sort();",
|
|
" expected.result = expected.result.sort();",
|
|
" pm.expect(jsonData).to.be.deep.equal(expected);",
|
|
"})",
|
|
""
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"debug_getModifiedAccountsByNumber\",\n\t\"params\":[\n\t\t\"0xccccd\",\n\t\t\"0xcccce\"\n\t],\n\t\"id\":1\n}",
|
|
"options": {
|
|
"raw": {}
|
|
}
|
|
},
|
|
"url": "{{HOST}}",
|
|
"description": "Returns a list of accounts modified in the given block.\r\n\r\n**Parameters**\r\n\r\n`startNum`: `QUANTITY|TAG` - Integer of a first block number to process, or the string `\"earliest\"`, `\"latest\"` or `\"pending\"`\r\n\r\n`endNum`: `QUANTITY|TAG` - Integer of a last block number (inclusive) to process, or the string `\"earliest\"`, `\"latest\"` or `\"pending\"`. Optional, defaults to `startNum`\r\n\r\n**Returns**\r\n\r\n`Array` of `DATA`, 20 Bytes - Array of addresses modifed in the given block range"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "getModifiedAccountsByHash",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"id": "8ceda7ed-df1e-4583-8871-a191b157348f",
|
|
"exec": [
|
|
"var expected = {",
|
|
" \"jsonrpc\": \"2.0\",",
|
|
" \"id\": 1,",
|
|
" \"result\": [",
|
|
" \"0x8764b360076809bba4635c4281c3f44c1677d013\",",
|
|
" \"0x1194e966965418c7d73a42cceeb254d875860356\",",
|
|
" \"0x42e6723a0c884e922240e56d7b618bec96f35800\",",
|
|
" \"0x52bc44d5378309ee2abf1539bf71de1b7d7be3b5\",",
|
|
" \"0xdf88d2cf450e1134e0cd794c3b89d648c3269ffc\",",
|
|
" \"0x2a65aca4d5fc5b5c859090a6c34d164135398226\",",
|
|
" \"0x68795c4aa09d6f4ed3e5deddf8c2ad3049a601da\",",
|
|
" \"0x8751355da8bb4854620e247904fc64c2dbff0484\"",
|
|
" ]",
|
|
"}",
|
|
"",
|
|
"pm.test('Has correct result', function() {",
|
|
" const jsonData = pm.response.json();",
|
|
" jsonData.result = jsonData.result.sort();",
|
|
" expected.result = expected.result.sort();",
|
|
" pm.expect(jsonData).to.be.deep.equal(expected);",
|
|
"})",
|
|
""
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"debug_getModifiedAccountsByHash\",\n\t\"params\":[\n\t\t\"0x2a1af018e33bcbd5015c96a356117a5251fcccf94a9c7c8f0148e25fdee37aec\",\n\t\t\"0x4e3d3e7eee350df0ee6e94a44471ee2d22cfb174db89bbf8e6c5f6aef7b360c5\"\n\t],\n\t\"id\":1\n}",
|
|
"options": {
|
|
"raw": {}
|
|
}
|
|
},
|
|
"url": "{{HOST}}",
|
|
"description": "Returns a list of accounts modified in the given block.\r\n\r\n**Parameters**\r\n\r\n`startHash`: `DATA`, 32 bytes, the first hash of block at which to retreive data\r\n\r\n`endHash`: `DATA`, 32 bytes, the last hash of block at which to retreive data. Optional, defaults to `startHash`\r\n\r\n**Returns**\r\n\r\n`Array` of `DATA`, 20 Bytes - Array of addresses modifed in the given block range"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "traceTransaction",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"id": "0d0a7b38-c363-444c-a892-f52072c91e4b",
|
|
"exec": [
|
|
"var allTests = pm.globals.get('TEST_ALL') === 'true';",
|
|
"if (!allTests)",
|
|
" return;",
|
|
"",
|
|
"var expected = [",
|
|
" {",
|
|
" \"pc\": 0,",
|
|
" \"op\": \"PUSH1\",",
|
|
" \"gas\": 179000,",
|
|
" \"gasCost\": 3,",
|
|
" \"depth\": 1,",
|
|
" \"stack\": [],",
|
|
" \"memory\": [],",
|
|
" \"storage\": {}",
|
|
" },",
|
|
" {",
|
|
" \"pc\": 2,",
|
|
" \"op\": \"PUSH1\",",
|
|
" \"gas\": 178997,",
|
|
" \"gasCost\": 3,",
|
|
" \"depth\": 1,",
|
|
" \"stack\": [",
|
|
" \"0000000000000000000000000000000000000000000000000000000000000060\"",
|
|
" ],",
|
|
" \"memory\": [],",
|
|
" \"storage\": {}",
|
|
" },",
|
|
" {",
|
|
" \"pc\": 284,",
|
|
" \"op\": \"STOP\",",
|
|
" \"gas\": 81142,",
|
|
" \"gasCost\": 0,",
|
|
" \"depth\": 1,",
|
|
" \"stack\": [],",
|
|
" \"memory\": [",
|
|
" \"0000000000000000000000000000000000000000000000000000000000000003\",",
|
|
" \"0000000000000000000000000000000000000000000000000000000000000000\",",
|
|
" \"0000000000000000000000000000000000000000000000000000000000000060\"",
|
|
" ],",
|
|
" \"storage\": {",
|
|
" \"0000000000000000000000000000000000000000000000000000000000000000\": \"0000000000000000000000000000000000000000000000000000000000000000\",",
|
|
" \"0000000000000000000000000000000000000000000000000000000000000001\": \"0000000000000000000000000000000000000000000000000000000000000001\",",
|
|
" \"0000000000000000000000000000000000000000000000000000000000000002\": \"0000000000000000000000000000000000000000000000000000000000000001\",",
|
|
" \"0000000000000000000000000000000000000000000000000000000000000003\": \"0000000000000000000000000000000000000000000000000000000000000006\",",
|
|
" \"c2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b\": \"000000000000000000000000881b0a4e9c55d08e31d8d3c022144d75a454211c\",",
|
|
" \"c2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85c\": \"000000000000000000000000fd2605a2bf58fdbb90db1da55df61628b47f9e8c\"",
|
|
" }",
|
|
" }",
|
|
"]",
|
|
"",
|
|
"pm.test('Has correct result', function() {",
|
|
" // because the returned data is pretty large, we only test the first two value and the last",
|
|
" var jsonData = pm.response.json()",
|
|
" pm.expect(jsonData.result.structLogs[0]).to.be.deep.equal(expected[0]);",
|
|
" pm.expect(jsonData.result.structLogs[1]).to.be.deep.equal(expected[1]);",
|
|
" pm.expect(jsonData.result.structLogs[jsonData.result.structLogs.length-1]).to.be.deep.equal(expected[2]);",
|
|
"})",
|
|
""
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"debug_traceTransaction\",\n\t\"params\":[\n\t\t\"0x893c428fed019404f704cf4d9be977ed9ca01050ed93dccdd6c169422155586f\"\n\t],\n\t\"id\":1\n}",
|
|
"options": {
|
|
"raw": {}
|
|
}
|
|
},
|
|
"url": "{{HOST}}",
|
|
"description": "Returns Geth style transaction traces.\r\n\r\n**Parameters**\r\n\r\n`txHash`: `DATA`, 32 bytes, hash of transaction to trace.\r\n`config` - TODO\r\n\r\n```\r\nTODO\r\n```\r\n\r\n**Returns**\r\n\r\nTODO"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "getCompilers (deprecated)",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"id": "68f87ead-32b5-438f-80ab-831a65d4797a",
|
|
"exec": [
|
|
"pm.test('Is deprecated', function() {",
|
|
" const jsonData = pm.response.json();",
|
|
" var method = 'eth_getCompilers';",
|
|
" var errorMsgs = {",
|
|
" '{{NETHERMIND}}': 'Method ' + method + ' is not supported',",
|
|
" '{{TURBOGETH}}': 'the function ' + method + ' has been deprecated',",
|
|
" '{{PARITY}}': 'Method deprecated',",
|
|
" }",
|
|
" pm.expect(jsonData.error.message).to.deep.equal(errorMsgs[pm.environment.get('HOST')])",
|
|
"})",
|
|
""
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_getCompilers\",\n\t\"params\":[],\n\t\"id\":1\n}",
|
|
"options": {
|
|
"raw": {}
|
|
}
|
|
},
|
|
"url": "{{HOST}}",
|
|
"description": "Returns a list of available compilers in the client.\r\n\r\n**Deprecated** This function will be removed in the future.\r\n\r\n**Parameters**\r\n\r\nnone\r\n\r\n**Returns**\r\n\r\n`Array` of `String` - Array of available compilers"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "compileLLL (deprecated)",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"id": "5e7497ca-cf21-4a39-ab9c-43c19124bf3c",
|
|
"exec": [
|
|
"pm.test('Is deprecated', function() {",
|
|
" const jsonData = pm.response.json();",
|
|
" var method = 'eth_compileLLL';",
|
|
" var errorMsgs = {",
|
|
" '{{NETHERMIND}}': 'Method ' + method + ' is not supported',",
|
|
" '{{TURBOGETH}}': 'the function ' + method + ' has been deprecated',",
|
|
" '{{PARITY}}': 'Method deprecated',",
|
|
" }",
|
|
" pm.expect(jsonData.error.message).to.deep.equal(errorMsgs[pm.environment.get('HOST')])",
|
|
"})",
|
|
""
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_compileLLL\",\n\t\"params\":[\n\t\t\"(returnlll (suicide (caller)))\"\n\t],\n\t\"id\":1\n}",
|
|
"options": {
|
|
"raw": {}
|
|
}
|
|
},
|
|
"url": "{{HOST}}",
|
|
"description": "Returns compiled LLL code.\r\n\r\n**Deprecated** This function will be removed in the future.\r\n\r\n**Parameters**\r\n\r\n`String` - The source code\r\n\r\n```\r\nparams: [\r\n \"/* some serpent */\",\r\n]\r\n```\r\n\r\n**Returns**\r\n\r\n`DATA` - The compiled source code"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "compileSolidity (deprecated)",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"id": "34861a00-556b-40dd-b923-8e504a3d3ebb",
|
|
"exec": [
|
|
"pm.test('Is deprecated', function() {",
|
|
" const jsonData = pm.response.json();",
|
|
" var method = 'eth_compileSolidity';",
|
|
" var errorMsgs = {",
|
|
" '{{NETHERMIND}}': 'Method ' + method + ' is not supported',",
|
|
" '{{TURBOGETH}}': 'the function ' + method + ' has been deprecated',",
|
|
" '{{PARITY}}': 'Method deprecated',",
|
|
" }",
|
|
" pm.expect(jsonData.error.message).to.deep.equal(errorMsgs[pm.environment.get('HOST')])",
|
|
"})",
|
|
""
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_compileSolidity\",\n\t\"params\":[\n\t\t\"contract test { function multiply(uint a) returns(uint d) { return a * 7; } }\"\n\t],\n\t\"id\":1\n}",
|
|
"options": {
|
|
"raw": {}
|
|
}
|
|
},
|
|
"url": "{{HOST}}",
|
|
"description": "Returns compiled solidity code.\r\n\r\n**Deprecated** This function will be removed in the future.\r\n\r\n**Parameters**\r\n\r\n`String` - The source code\r\n\r\n```\r\nparams: [\r\n \"/* some serpent */\",\r\n]\r\n```\r\n\r\n**Returns**\r\n\r\n`DATA` - The compiled source code"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "compileSerpent (deprecated)",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"id": "d5fab681-9629-4b74-80fc-440adcec02a5",
|
|
"exec": [
|
|
"pm.test('Is deprecated', function() {",
|
|
" const jsonData = pm.response.json();",
|
|
" var method = 'eth_compileSerpent';",
|
|
" var errorMsgs = {",
|
|
" '{{NETHERMIND}}': 'Method ' + method + ' is not supported',",
|
|
" '{{TURBOGETH}}': 'the function ' + method + ' has been deprecated',",
|
|
" '{{PARITY}}': 'Method deprecated',",
|
|
" }",
|
|
" pm.expect(jsonData.error.message).to.deep.equal(errorMsgs[pm.environment.get('HOST')])",
|
|
"})",
|
|
""
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_compileSerpent\",\n\t\"params\":[\"/* some serpent */\"],\n\t\"id\":1\n}",
|
|
"options": {
|
|
"raw": {}
|
|
}
|
|
},
|
|
"url": "{{HOST}}",
|
|
"description": "Returns compiled serpent code.\r\n\r\n**Deprecated** This function will be removed in the future.\r\n\r\n**Parameters**\r\n\r\n`String` - The source code\r\n\r\n```\r\nparams: [\r\n \"/* some serpent */\",\r\n]\r\n```\r\n\r\n**Returns**\r\n\r\n`DATA` - The compiled source code"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "sign (deprecated)",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"id": "eeae43da-6124-4f64-851b-e88102deeef2",
|
|
"exec": [
|
|
"var isParity = pm.environment.get('HOST') == \"{{PARITY}}\";",
|
|
"(isParity ? pm.test.skip : pm.test)('Is deprecated', function() {",
|
|
" const jsonData = pm.response.json();",
|
|
" var method = 'eth_sign';",
|
|
" var errorMsgs = {",
|
|
" '{{NETHERMIND}}': 'Can only sign without passphrase when account is unlocked.',",
|
|
" '{{TURBOGETH}}': 'the function ' + method + ' has been deprecated',",
|
|
" '{{PARITY}}': 'Method deprecated',",
|
|
" }",
|
|
" pm.expect(jsonData.error.message).to.deep.equal(errorMsgs[pm.environment.get('HOST')])",
|
|
"})",
|
|
""
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
},
|
|
{
|
|
"listen": "prerequest",
|
|
"script": {
|
|
"id": "b0c7da3b-5ddc-46c2-a57c-67a259041972",
|
|
"exec": [
|
|
"var isParity = pm.environment.get('HOST') == \"{{PARITY}}\";",
|
|
"if (isParity) {",
|
|
" pm.test.skip('Skipping for parity')",
|
|
"}"
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"eth_sign\",\n\t\"params\":[\n\t\t\"0x9b2055d370f73ec7d8a03e965129118dc8f5bf83\", \n\t\t\"0xdeadbeef\"\n\t],\n\t\"id\":1\n}",
|
|
"options": {
|
|
"raw": {}
|
|
}
|
|
},
|
|
"url": "{{HOST}}",
|
|
"description": "Calculates an Ethereum specific signature with: `sign(keccak256(\"\\x19Ethereum Signed Message:\\n\" + len(message) + message)))`.\r\n\r\n**Deprecated** This function will be removed in the future.\r\n\r\n**Note** Adding a prefix to the message makes the calculated signature recognisable as an Ethereum specific signature. This prevents misuse where a malicious DApp can sign arbitrary data (e.g. transaction) and use the signature to impersonate the victim.\r\n\r\n**Note** The address provided to sign the message must be unlocked.\r\n\r\n**Parameters**\r\n\r\naccount, message\r\n\r\n`DATA`, 20 Bytes - address\r\n\r\n`DATA`, N Bytes - message to sign\r\n\r\n**Returns**\r\n\r\n`DATA` - The signature"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "getString (deprecated)",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"id": "6c26e058-4bf1-4efe-bd51-6e43cf9f8e05",
|
|
"exec": [
|
|
"pm.test('Is deprecated', function() {",
|
|
" const jsonData = pm.response.json();",
|
|
" var method = 'db_getString';",
|
|
" var errorMsgs = {",
|
|
" '{{NETHERMIND}}': 'Method ' + method + ' is not supported',",
|
|
" '{{TURBOGETH}}': 'the function ' + method + ' has been deprecated',",
|
|
" '{{PARITY}}': 'Method not found',",
|
|
" }",
|
|
" pm.expect(jsonData.error.message).to.deep.equal(errorMsgs[pm.environment.get('HOST')])",
|
|
"})",
|
|
""
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"db_getString\",\n\t\"params\":[\n\t\t\"testDB\",\n\t\t\"myKey\"\n\t],\n\t\"id\":73\n}",
|
|
"options": {
|
|
"raw": {}
|
|
}
|
|
},
|
|
"url": "{{HOST}}",
|
|
"description": "Returns string from the local database.\r\n\r\n**Deprecated** This function will be removed in the future.\r\n\r\n**Parameters**\r\n\r\n`String` - Database name\r\n\r\n`String` - Key name\r\n\r\n```\r\nparams: [\r\n \"testDB\",\r\n \"myKey\"\r\n]\r\n```\r\n\r\n**Returns**\r\n\r\n`String` - The previously stored string"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "putString (deprecated)",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"id": "e822c970-90a1-4102-af96-8692d488822e",
|
|
"exec": [
|
|
"pm.test('Is deprecated', function() {",
|
|
" const jsonData = pm.response.json();",
|
|
" var method = 'db_putString';",
|
|
" var errorMsgs = {",
|
|
" '{{NETHERMIND}}': 'Method ' + method + ' is not supported',",
|
|
" '{{TURBOGETH}}': 'the function ' + method + ' has been deprecated',",
|
|
" '{{PARITY}}': 'Method not found',",
|
|
" }",
|
|
" pm.expect(jsonData.error.message).to.deep.equal(errorMsgs[pm.environment.get('HOST')])",
|
|
"})",
|
|
""
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
},
|
|
{
|
|
"listen": "prerequest",
|
|
"script": {
|
|
"id": "b4fefb80-8200-4329-bbda-f268d63a3f7c",
|
|
"exec": [
|
|
""
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"db_putString\",\n\t\"params\":[\n\t\t\"testDB\",\n\t\t\"myKey\",\n\t\t\"myString\"\n\t],\n\t\"id\":73\n}",
|
|
"options": {
|
|
"raw": {}
|
|
}
|
|
},
|
|
"url": "{{HOST}}",
|
|
"description": "Stores a string in the local database.\r\n\r\n**Deprecated** This function will be removed in the future.\r\n\r\n**Parameters**\r\n\r\n`String` - Database name\r\n\r\n`String` - Key name\r\n\r\n`String` - String to store\r\n\r\n```\r\nparams: [\r\n \"testDB\",\r\n \"myKey\",\r\n \"myString\"\r\n]\r\n```\r\n\r\n**Returns**\r\n\r\n`Boolean` - `true` if the value was stored, `false` otherwise"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "getHex (deprecated)",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"id": "75c026e4-dc66-4c25-a3f5-5d277856c056",
|
|
"exec": [
|
|
"pm.test('Is deprecated', function() {",
|
|
" const jsonData = pm.response.json();",
|
|
" var method = 'db_getHex';",
|
|
" var errorMsgs = {",
|
|
" '{{NETHERMIND}}': 'Method ' + method + ' is not supported',",
|
|
" '{{TURBOGETH}}': 'the function ' + method + ' has been deprecated',",
|
|
" '{{PARITY}}': 'Method not found',",
|
|
" }",
|
|
" pm.expect(jsonData.error.message).to.deep.equal(errorMsgs[pm.environment.get('HOST')])",
|
|
"})",
|
|
""
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"db_getHex\"\n\t,\"params\":[\n\t\t\"testDB\",\n\t\t\"myKey\"\n\t],\n\t\"id\":73\n}",
|
|
"options": {
|
|
"raw": {}
|
|
}
|
|
},
|
|
"url": "{{HOST}}",
|
|
"description": "Returns binary data from the local database.\r\n\r\n**Deprecated** This function will be removed in the future.\r\n\r\n**Parameters**\r\n\r\n`String` - Database name\r\n\r\n`String` - Key name\r\n\r\n```\r\nparams: [\r\n \"testDB\",\r\n \"myKey\",\r\n]\r\n```\r\n\r\n**Returns**\r\n\r\n`DATA` - The previously stored data"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "putHex (deprecated)",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"id": "7e9f4fe3-2883-4760-ab31-caab0e22b87a",
|
|
"exec": [
|
|
"pm.test('Is deprecated', function() {",
|
|
" const jsonData = pm.response.json();",
|
|
" var method = 'db_putHex';",
|
|
" var errorMsgs = {",
|
|
" '{{NETHERMIND}}': 'Method ' + method + ' is not supported',",
|
|
" '{{TURBOGETH}}': 'the function ' + method + ' has been deprecated',",
|
|
" '{{PARITY}}': 'Method not found',",
|
|
" }",
|
|
" pm.expect(jsonData.error.message).to.deep.equal(errorMsgs[pm.environment.get('HOST')])",
|
|
"})",
|
|
""
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"db_putHex\",\n\t\"params\":[\n\t\t\"testDB\",\n\t\t\"myKey\",\n\t\t\"0x68656c6c6f20776f726c64\"\n\t],\n\t\"id\":73\n}",
|
|
"options": {
|
|
"raw": {}
|
|
}
|
|
},
|
|
"url": "{{HOST}}",
|
|
"description": "Stores binary data in the local database.\r\n\r\n**Deprecated** This function will be removed in the future.\r\n\r\n**Parameters**\r\n\r\n`String` - Database name\r\n\r\n`String` - Key name\r\n\r\n`DATA` - The data to store\r\n\r\n```\r\nparams: [\r\n \"testDB\",\r\n \"myKey\",\r\n \"0x68656c6c6f20776f726c64\"\r\n]\r\n```\r\n\r\n**Returns**\r\n\r\n`Boolean` - `true` if the value was stored, `false` otherwise"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "post (deprecated)",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"id": "a15f9ea0-3052-43d5-bbe6-b1cd1e144cb2",
|
|
"exec": [
|
|
"pm.test('Is deprecated', function() {",
|
|
" const jsonData = pm.response.json();",
|
|
" var method = 'shh_post';",
|
|
" var errorMsgs = {",
|
|
" '{{NETHERMIND}}': 'Method ' + method + ' is not supported',",
|
|
" '{{TURBOGETH}}': 'the function ' + method + ' has been deprecated',",
|
|
" '{{PARITY}}': 'Method not found',",
|
|
" }",
|
|
" pm.expect(jsonData.error.message).to.deep.equal(errorMsgs[pm.environment.get('HOST')])",
|
|
"})",
|
|
""
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"shh_post\",\n\t\"params\":[{\n\t\t\"from\":\"0xc931d93e97ab07fe42d923478ba2465f2..\",\n\t\t\"topics\": [\n\t\t\t\"0x68656c6c6f20776f726c64\"\n\t\t],\n\t\t\"payload\":\"0x68656c6c6f20776f726c64\",\n\t\t\"ttl\":\"0x64\",\n\t\t\"priority\":\"0x64\"\n\t}],\n\t\"id\":73\n}",
|
|
"options": {
|
|
"raw": {}
|
|
}
|
|
},
|
|
"url": "{{HOST}}",
|
|
"description": "Sends a whisper message.\r\n\r\n**Deprecated** This function will be removed in the future.\r\n\r\n**Parameters**\r\n\r\n`Object` - The whisper post object\r\n\r\n`from`: `DATA`, 60 Bytes - (optional) The identity of the sender\r\n\r\n`to`: `DATA`, 60 Bytes - (optional) The identity of the receiver. When present whisper will encrypt the message so that only the receiver can decrypt it\r\n\r\n`topics`: `Array of DATA` - Array of DATA topics, for the receiver to identify messages\r\n\r\n`payload`: `DATA` - The payload of the message\r\n\r\n`priority`: `QUANTITY` - The integer of the priority in a range\r\n\r\n`ttl`: `QUANTITY` - Integer of the time to live in seconds\r\n\r\n```\r\nparams: [{\r\n from: \"0x04f96a5e25610293e42a73908e93ccc8c4d4dc0edcfa9fa872f50cb214e08ebf61a03e245533f97284d442460f2998cd41858798ddfd4d661997d3940272b717b1\",\r\n to: \"0x3e245533f97284d442460f2998cd41858798ddf04f96a5e25610293e42a73908e93ccc8c4d4dc0edcfa9fa872f50cb214e08ebf61a0d4d661997d3940272b717b1\",\r\n topics: [\"0x776869737065722d636861742d636c69656e74\", \"0x4d5a695276454c39425154466b61693532\"],\r\n payload: \"0x7b2274797065223a226d6\",\r\n priority: \"0x64\",\r\n ttl: \"0x64\",\r\n}]\r\n```\r\n\r\n**Returns**\r\n\r\n`Boolean` - `true` if the message was send, `false` otherwise"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "version (deprecated)",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"id": "95508ecc-e9ea-4ff2-a51d-dca1b6d8b3b0",
|
|
"exec": [
|
|
"pm.test('Is deprecated', function() {",
|
|
" const jsonData = pm.response.json();",
|
|
" var method = 'shh_version';",
|
|
" var errorMsgs = {",
|
|
" '{{NETHERMIND}}': 'Method ' + method + ' is not supported',",
|
|
" '{{TURBOGETH}}': 'the function ' + method + ' has been deprecated',",
|
|
" '{{PARITY}}': 'Method not found',",
|
|
" }",
|
|
" pm.expect(jsonData.error.message).to.deep.equal(errorMsgs[pm.environment.get('HOST')])",
|
|
"})",
|
|
""
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"shh_version\",\n\t\"params\":[],\n\t\"id\":67\n}",
|
|
"options": {
|
|
"raw": {}
|
|
}
|
|
},
|
|
"url": "{{HOST}}",
|
|
"description": "Returns the current whisper protocol version.\r\n\r\n**Deprecated** This function will be removed in the future.\r\n\r\n**Parameters**\r\n\r\nnone\r\n\r\n**Returns**\r\n\r\n`String` - The current whisper protocol version"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "newIdentity (deprecated)",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"id": "81bd8a4c-854c-4c15-81fb-4bfbe3b17411",
|
|
"exec": [
|
|
"pm.test('Is deprecated', function() {",
|
|
" const jsonData = pm.response.json();",
|
|
" var method = 'shh_newIdentity';",
|
|
" var errorMsgs = {",
|
|
" '{{NETHERMIND}}': 'Method ' + method + ' is not supported',",
|
|
" '{{TURBOGETH}}': 'the function ' + method + ' has been deprecated',",
|
|
" '{{PARITY}}': 'Method not found',",
|
|
" }",
|
|
" pm.expect(jsonData.error.message).to.deep.equal(errorMsgs[pm.environment.get('HOST')])",
|
|
"})",
|
|
""
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"shh_newIdentity\",\n\t\"params\":[],\n\t\"id\":73\n}",
|
|
"options": {
|
|
"raw": {}
|
|
}
|
|
},
|
|
"url": "{{HOST}}",
|
|
"description": "Creates new whisper identity in the client.\r\n\r\n**Deprecated** This function will be removed in the future.\r\n\r\n**Parameters**\r\n\r\nnone\r\n\r\n**Returns**\r\n\r\n`DATA`, 60 Bytes - The address of the new identiy"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "hasIdentity (deprecated)",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"id": "af645a4c-1afa-4f5e-9391-e2deea20b6da",
|
|
"exec": [
|
|
"pm.test('Is deprecated', function() {",
|
|
" const jsonData = pm.response.json();",
|
|
" var method = 'shh_hasIdentity';",
|
|
" var errorMsgs = {",
|
|
" '{{NETHERMIND}}': 'Method ' + method + ' is not supported',",
|
|
" '{{TURBOGETH}}': 'the function ' + method + ' has been deprecated',",
|
|
" '{{PARITY}}': 'Method not found',",
|
|
" }",
|
|
" pm.expect(jsonData.error.message).to.deep.equal(errorMsgs[pm.environment.get('HOST')])",
|
|
"})",
|
|
""
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"shh_hasIdentity\",\n\t\"params\":[\n\t\t\"0x04f96a5e25610293e42a73908e93ccc8c4d4dc0edcfa9fa872f50cb214e08ebf61a03e245533f97284d442460f2998cd41858798ddfd4d661997d3940272b717b1\"\n\t],\n\t\"id\":73\n}",
|
|
"options": {
|
|
"raw": {}
|
|
}
|
|
},
|
|
"url": "{{HOST}}",
|
|
"description": "Checks if the client hold the private keys for a given identity.\r\n\r\n**Deprecated** This function will be removed in the future.\r\n\r\n**Parameters**\r\n\r\n`DATA`, 60 Bytes - The identity address to check\r\n\r\n```\r\nparams: [\r\n \"0x04f96a5e25610293e42a73908e93ccc8c4d4dc0edcfa9fa872f50cb214e08ebf61a03e245533f97284d442460f2998cd41858798ddfd4d661997d3940272b717b1\"\r\n]\r\n```\r\n\r\n**Returns**\r\n\r\n`Boolean` - `true` if the client holds the privatekey for that identity, `false` otherwise"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "newGroup (deprecated)",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"id": "491e7de4-c1f5-4be6-b415-c23d8311e781",
|
|
"exec": [
|
|
"pm.test('Is deprecated', function() {",
|
|
" const jsonData = pm.response.json();",
|
|
" var method = 'shh_newGroup';",
|
|
" var errorMsgs = {",
|
|
" '{{NETHERMIND}}': 'Method ' + method + ' is not supported',",
|
|
" '{{TURBOGETH}}': 'the function ' + method + ' has been deprecated',",
|
|
" '{{PARITY}}': 'Method not found',",
|
|
" }",
|
|
" pm.expect(jsonData.error.message).to.deep.equal(errorMsgs[pm.environment.get('HOST')])",
|
|
"})",
|
|
""
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"shh_newGroup\",\n\t\"params\":[],\n\t\"id\":73\n}",
|
|
"options": {
|
|
"raw": {}
|
|
}
|
|
},
|
|
"url": "{{HOST}}",
|
|
"description": "Create a new group.\r\n\r\n**Deprecated** This function will be removed in the future.\r\n\r\n**Parameters**\r\n\r\nnone\r\n\r\n**Returns**\r\n\r\n`DATA`, 60 Bytes - The address of the new group"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "addToGroup (deprecated)",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"id": "0a77798d-9aa3-40d9-88c7-8897784a25de",
|
|
"exec": [
|
|
"pm.test('Is deprecated', function() {",
|
|
" const jsonData = pm.response.json();",
|
|
" var method = 'shh_addToGroup';",
|
|
" var errorMsgs = {",
|
|
" '{{NETHERMIND}}': 'Method ' + method + ' is not supported',",
|
|
" '{{TURBOGETH}}': 'the function ' + method + ' has been deprecated',",
|
|
" '{{PARITY}}': 'Method not found',",
|
|
" }",
|
|
" pm.expect(jsonData.error.message).to.deep.equal(errorMsgs[pm.environment.get('HOST')])",
|
|
"})",
|
|
""
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"shh_addToGroup\",\n\t\"params\":[\n\t\t\"0x04f96a5e25610293e42a73908e93ccc8c4d4dc0edcfa9fa872f50cb214e08ebf61a03e245533f97284d442460f2998cd41858798ddfd4d661997d3940272b717b1\"\n\t],\n\t\"id\":73\n}",
|
|
"options": {
|
|
"raw": {}
|
|
}
|
|
},
|
|
"url": "{{HOST}}",
|
|
"description": "Add to a group.\r\n\r\n**Deprecated** This function will be removed in the future.\r\n\r\n**Parameters**\r\n\r\n`DATA`, 60 Bytes - The identity address to add to a group\r\n\r\n```\r\nparams: [\r\n \"0x04f96a5e25610293e42a73908e93ccc8c4d4dc0edcfa9fa872f50cb214e08ebf61a03e245533f97284d442460f2998cd41858798ddfd4d661997d3940272b717b1\"\r\n]\r\n```\r\n\r\n**Returns**\r\n\r\n`Boolean` - `true` if the identity was successfully added to the group, `false` otherwise"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "newFilter (deprecated)",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"id": "8a5997db-34df-42cd-8b01-d05a1d1d0fe8",
|
|
"exec": [
|
|
"pm.test('Is deprecated', function() {",
|
|
" const jsonData = pm.response.json();",
|
|
" var method = 'shh_newFilter';",
|
|
" var errorMsgs = {",
|
|
" '{{NETHERMIND}}': 'Method ' + method + ' is not supported',",
|
|
" '{{TURBOGETH}}': 'the function ' + method + ' has been deprecated',",
|
|
" '{{PARITY}}': 'Method not found',",
|
|
" }",
|
|
" pm.expect(jsonData.error.message).to.deep.equal(errorMsgs[pm.environment.get('HOST')])",
|
|
"})",
|
|
""
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"shh_newFilter\",\n\t\"params\":[{\n\t\t\"topics\": [\n\t\t\t\"0x12341234bf4b564f\"\n\t\t],\n\t\t\"to\": \"0x2341234bf4b2341234bf4b564f...\"\n\t}],\n\t\"id\":73\n}",
|
|
"options": {
|
|
"raw": {}
|
|
}
|
|
},
|
|
"url": "{{HOST}}",
|
|
"description": "Creates filter to notify, when client receives whisper message matching the filter options.\r\n\r\n**Deprecated** This function will be removed in the future.\r\n\r\n**Parameters**\r\n\r\n`Object` - The filter options\r\n\r\n`to`: `DATA`, 60 Bytes - (optional) Identity of the receiver. When present it will try to decrypt any incoming message if the client holds the private key to this identity\r\n\r\n`topics`: `Array of DATA` - Array of `DATA` topics which the incoming message's topics should match\r\n\r\n```\r\nparams: [{\r\n \"topics\": ['0x12341234bf4b564f'],\r\n \"to\": \"0x04f96a5e25610293e42a73908e93ccc8c4d4dc0edcfa9fa872f50cb214e08ebf61a03e245533f97284d442460f2998cd41858798ddfd4d661997d3940272b717b1\"\r\n}]\r\n```\r\n\r\n**Returns**\r\n\r\n`QUANTITY` - The newly created filter id"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "uninstallFilter (deprecated)",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"id": "80395ec9-5fe9-4bee-b28a-07d049114e76",
|
|
"exec": [
|
|
"pm.test('Is deprecated', function() {",
|
|
" const jsonData = pm.response.json();",
|
|
" var method = 'shh_uninstallFilter';",
|
|
" var errorMsgs = {",
|
|
" '{{NETHERMIND}}': 'Method ' + method + ' is not supported',",
|
|
" '{{TURBOGETH}}': 'the function ' + method + ' has been deprecated',",
|
|
" '{{PARITY}}': 'Method not found',",
|
|
" }",
|
|
" pm.expect(jsonData.error.message).to.deep.equal(errorMsgs[pm.environment.get('HOST')])",
|
|
"})",
|
|
""
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"shh_uninstallFilter\",\n\t\"params\":[\n\t\t\"0x7\"\n\t],\n\t\"id\":73\n}",
|
|
"options": {
|
|
"raw": {}
|
|
}
|
|
},
|
|
"url": "{{HOST}}",
|
|
"description": "Uninstalls a filter with given id.\r\n\r\n**Deprecated** This function will be removed in the future.\r\n\r\n**Parameters**\r\n\r\n`QUANTITY` - The filter id\r\n\r\n```\r\nparams: [\r\n \"0x7\" // 7\r\n]\r\n```\r\n\r\n**Returns**\r\n\r\n`Boolean` - `true` if the filter was successfully uninstalled, `false` otherwise"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "getFilterChanges (deprecated)",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"id": "0c1788d8-5d27-455b-a2d2-33365f5d1f38",
|
|
"exec": [
|
|
"pm.test('Is deprecated', function() {",
|
|
" const jsonData = pm.response.json();",
|
|
" var method = 'shh_getFilterChanges';",
|
|
" var errorMsgs = {",
|
|
" '{{NETHERMIND}}': 'Method ' + method + ' is not supported',",
|
|
" '{{TURBOGETH}}': 'the function ' + method + ' has been deprecated',",
|
|
" '{{PARITY}}': 'Method not found',",
|
|
" }",
|
|
" pm.expect(jsonData.error.message).to.deep.equal(errorMsgs[pm.environment.get('HOST')])",
|
|
"})",
|
|
""
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"shh_getFilterChanges\",\n\t\"params\":[\n\t\t\"0x7\"\n\t],\n\t\"id\":73\n}",
|
|
"options": {
|
|
"raw": {}
|
|
}
|
|
},
|
|
"url": "{{HOST}}",
|
|
"description": "Polling method for whisper filters. Returns new messages since the last call of this method.\r\n\r\n**Deprecated** This function will be removed in the future.\r\n\r\n**Note** calling the `shh_getMessages` method, will reset the buffer for this method, so that you won't receive duplicate messages.\r\n\r\n**Parameters**\r\n\r\n`QUANTITY` - The filter id\r\n\r\n```\r\nparams: [\r\n \"0x7\" // 7\r\n]\r\n```\r\n\r\n**Returns**\r\n\r\n`Array` - Array of messages received since last poll\r\n\r\n`hash`: `DATA`, 32 Bytes (?) - The hash of the message\r\n\r\n`from`: `DATA`, 60 Bytes - The sender of the message, if a sender was specified\r\n\r\n`to`: `DATA`, 60 Bytes - The receiver of the message, if a receiver was specified\r\n\r\n`expiry`: `QUANTITY` - Integer of the time in seconds when this message should expire\r\n\r\n`ttl`: `QUANTITY` - Integer of the time the message should float in the system in seconds\r\n\r\n`sent`: `QUANTITY` - Integer of the unix timestamp when the message was sent\r\n\r\n`topics`: `Array of DATA` - Array of DATA topics the message contained\r\n\r\n`payload`: `DATA` - The payload of the message.\r\n\r\n`workProved`: `QUANTITY` - Integer of the work this message required before it was send"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "getMessages (deprecated)",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"id": "1a879394-957e-49e5-957f-7baaa2742223",
|
|
"exec": [
|
|
"pm.test('Is deprecated', function() {",
|
|
" const jsonData = pm.response.json();",
|
|
" var method = 'shh_getMessages';",
|
|
" var errorMsgs = {",
|
|
" '{{NETHERMIND}}': 'Method ' + method + ' is not supported',",
|
|
" '{{TURBOGETH}}': 'the function ' + method + ' has been deprecated',",
|
|
" '{{PARITY}}': 'Method not found',",
|
|
" }",
|
|
" pm.expect(jsonData.error.message).to.deep.equal(errorMsgs[pm.environment.get('HOST')])",
|
|
"})",
|
|
""
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"shh_getMessages\",\n\t\"params\":[\n\t\t\"0x7\"\n\t],\n\t\"id\":73\n}",
|
|
"options": {
|
|
"raw": {}
|
|
}
|
|
},
|
|
"url": "{{HOST}}",
|
|
"description": "Get all messages matching a filter. Unlike `shh_getFilterChanges` this returns all messages.\r\n\r\n**Deprecated** This function will be removed in the future.\r\n\r\n**Parameters**\r\n\r\n`QUANTITY` - The filter id\r\n\r\n```\r\nparams: [\r\n \"0x7\" // 7\r\n]\r\n```\r\n\r\n**Returns**\r\n\r\n`Array` - Array of messages received since last poll"
|
|
},
|
|
"response": []
|
|
}
|
|
],
|
|
"event": [
|
|
{
|
|
"listen": "prerequest",
|
|
"script": {
|
|
"id": "7c2db17d-6d16-4f09-bf67-2cf0bdadf501",
|
|
"type": "text/javascript",
|
|
"exec": [
|
|
""
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"id": "fcae4c60-2de7-4d0c-9fd5-b7ee725d4536",
|
|
"type": "text/javascript",
|
|
"exec": [
|
|
"pm.test('Base tests', function() {",
|
|
" const jsonData = pm.response.json();",
|
|
" pm.response.to.have.status(200);",
|
|
" pm.expect(jsonData !== null)",
|
|
" jsonData.errors == null || pm.expect(jsonData.errors).to.be.empty;",
|
|
"})",
|
|
""
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"protocolProfileBehavior": {}
|
|
} |