diff --git a/docs/bridge/docs/Services/Omnirpc.md b/docs/bridge/docs/Services/Omnirpc.md index df3a4ac88c..c5fbf284b4 100644 --- a/docs/bridge/docs/Services/Omnirpc.md +++ b/docs/bridge/docs/Services/Omnirpc.md @@ -74,4 +74,6 @@ curl --location --request POST 'http://localhost:5000/rpc/1' \ }' ``` +A full postman collection can be found [here](https://github.com/synapsecns/sanguine/blob/master/services/omnirpc/swagger/collection.json) or at the `/collection.json endpoint` + Not all requests are confirmable. Please see [here](https://pkg.go.dev/github.com/synapsecns/sanguine/services/omnirpc#section-readme) for details. diff --git a/services/omnirpc/swagger/collection.json b/services/omnirpc/swagger/collection.json new file mode 100644 index 0000000000..e374573cd5 --- /dev/null +++ b/services/omnirpc/swagger/collection.json @@ -0,0 +1,2277 @@ +{ + "info": { + "name": "Ethereum JSON-RPC", + "description": "A collection holding all the Ethereum JSIN RPC API calls", + "version": "", + "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" + }, + "item": [ + { + "name": "eth", + "item": [ + { + "name": "protocolVersion", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "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`String` - The current ethereum protocol version", + "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}" + } + } + }, + { + "name": "syncing", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns an object with data about the sync status or false.\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`currentBlock`: `QUANTITY` - The current block, same as eth_blockNumber\r\n`highestBlock`: `QUANTITY` - The estimated highest block", + "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}" + } + } + }, + { + "name": "coinbase", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns the 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.", + "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}" + } + } + }, + { + "name": "mining", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "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` - returns `true` of the client is mining, otherwise `false`.", + "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}" + } + } + }, + { + "name": "hashrate", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "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.", + "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}" + } + } + }, + { + "name": "gasPrice", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "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.", + "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}" + } + } + }, + { + "name": "accounts", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns a list of addresses owned by client.\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", + "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}" + } + } + }, + { + "name": "blockNumber", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns the 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 block number the client is on.", + "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}" + } + } + }, + { + "name": "getBalance", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns the balance of the account of given address.\r\n\r\n**Parameters**\r\n\r\n`DATA`, 20 Bytes - address to check for balance.\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.", + "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\"0x407d73d8a49eeb85d32cf465507dd71d507100c1\", \n\t\t\"latest\"\n\t],\n\t\"id\":1\n}" + } + } + }, + { + "name": "getStorageAt", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "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 storage.\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 =\u003e 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}' {{ENVIRONMENT}}\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\u003e var key = \"000000000000000000000000391694e7e0b0cce554cb130d723a9d27458f9298\" + \"0000000000000000000000000000000000000000000000000000000000000001\"\r\nundefined\r\n\u003e web3.sha3(key, {\"encoding\": \"hex\"})\r\n\"0x6661e9d6d8b923d5bbaab1b96e1dd51ff6ea2a93520fdc9eb75d059238b8c5e9\"\r\n```", + "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\"0x295a70b2de5e3953354a6a8344e616ed314d7251\", \n\t\t\"0x0\",\n\t\t\"latest\"\n\t], \n\t\"id\": 1\n}" + } + } + }, + { + "name": "getTransactionCount", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns the number of transactions sent from an address.\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 send from this address.", + "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\"0x407d73d8a49eeb85d32cf465507dd71d507100c1\",\n\t\t\"latest\"\n\t],\n\t\"id\":1\n}" + } + } + }, + { + "name": "getBlockTransactionCountByHash", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns the number of transactions in a block from a block matching the given 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.", + "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\"0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238\"\n\t],\n\t\"id\":1\n}" + } + } + }, + { + "name": "getBlockTransactionCountByNumber", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns the number of transactions in a block matching the given 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.", + "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\"0x52A8CA\"\n\t],\n\t\"id\":1\n}" + } + } + }, + { + "name": "getCode", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns code at a given address.\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 ' 0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b',\r\n '0x2' // 2\r\n]\r\n```\r\n\r\n**Returns**\r\n\r\n`DATA` - the code from the given address.", + "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\"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b\", \n\t\t\"0x2\"\n\t],\n\t\"id\":1\n}" + } + } + }, + { + "name": "sign", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "The sign method calculates an Ethereum specific signature with: `sign(keccak256(\"\\x19Ethereum Signed Message:\\n\" + len(message) + message)))`.\r\n\r\nBy 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 to sign with 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`: Signature", + "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\"0xdeadbeaf\"\n\t],\n\t\"id\":1\n}" + } + } + }, + { + "name": "sendTransaction", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Creates new message call transaction or a contract creation, if the data field contains code.\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.\r\n\r\nUse `eth_getTransactionReceipt` to get the contract address, after the transaction was mined, when you created a contract.", + "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\",\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}" + } + } + }, + { + "name": "sendRawTransaction", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Creates new message call transaction or a contract creation for signed transactions.\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.\r\n\r\nUse `eth_getTransactionReceipt` to get the contract address, after the transaction was mined, when you created a contract.", + "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}" + } + } + }, + { + "name": "call", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "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.", + "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\t\t\"from\": \"\",\n\t\t\"to\": \"\",\n\t\t\"gas\": \"\",\n\t\t\"gasPrice\": \"\",\n\t\t\"value\": \"\",\n\t\t\"data\": \"\"\n\t}, \"latest\"],\n\t\"id\":1\n}" + } + } + }, + { + "name": "estimateGas", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Generates and returns an estimate of how much gas is necessary to allow the transaction to complete. The transaction will not be added to the blockchain. Note that 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**Parameters**\r\n\r\nSee `eth_call` parameters, expect that all properties are optional. 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**Returns**\r\n\r\n`QUANTITY` - the amount of gas used.", + "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\t],\n\t\"id\":1\n}" + } + } + }, + { + "name": "getBlockByHash", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns information about a block by 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.", + "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\"0xad1328d13f833b8af722117afdc406a762033321df8e48c00cd372d462f48169\", \n\t\ttrue\n\t],\n\t\"id\":1\n}" + } + } + }, + { + "name": "getBlockByNumber", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns information about a block by 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`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\nSee `eth_getBlockByHash`", + "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\"0x1b4\", \n\t\ttrue\n\t],\n\t\"id\":1\n}" + } + } + }, + { + "name": "getTransactionByHash", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns the information about a transaction requested by transaction 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.", + "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}" + } + } + }, + { + "name": "getTransactionByBlockHashAndIndex", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns information about a transaction by block hash and transaction index position.\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\nSee `eth_getTransactionByHash`", + "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\"0x3c82bc62179602b67318c013c10f99011037c49cba84e31ffe6e465a21c521a7\", \n\t\t\"0x0\"\n\t],\n\t\"id\":1\n}" + } + } + }, + { + "name": "getTransactionByBlockNumberAndIndex", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns information about a transaction by block number and transaction index position.\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\nSee `eth_getTransactionByHash`", + "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\"0x52A96E\", \n\t\t\"0x1\"\n\t],\n\t\"id\":1\n}" + } + } + }, + { + "name": "getTransactionReceipt", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns the receipt of a transaction by transaction 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\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, otherwise `null`.\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 (pre Byzantium)\r\n\r\n`status`: `QUANTITY` either `1` (success) or `0` (failure)", + "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}" + } + } + }, + { + "name": "getUncleByBlockHashAndIndex", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns information about a uncle of a block by hash and uncle index position.\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\nSee `eth_getBlockByHash`", + "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\"0x7cea0c9ae53df7073fcd4e7b19fc3f1905a2540bbdbd9a10796c9296f5af55dc\", \n\t\t\"0x0\"\n\t],\n\t\"id\":1\n}" + } + } + }, + { + "name": "getUncleByBlockNumberAndIndex", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns information about a uncle of a block by number and uncle index position.\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\nSee `eth_getBlockByHash`\r\n\r\n**Note:** An uncle doesn't contain individual transactions.", + "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\"0x29c\",\n\t\t\"0x0\"\n\t],\n\t\"id\":1\n}" + } + } + }, + { + "name": "getCompilers", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns a list of available compilers in the client.\r\n\r\n**Parameters**\r\n\r\nnone\r\n\r\n**Returns**\r\n\r\n`Array` - Array of available compilers.", + "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}" + } + } + }, + { + "name": "compileLLL", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns compiled LLL code.\r\n\r\n**Parameters**\r\n\r\n`String` - The source code.\r\n\r\n```\r\nparams: [\r\n \"(returnlll (suicide (caller)))\",\r\n]\r\n```\r\n\r\n**Returns**\r\n\r\n`DATA` - The compiled source code.", + "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}" + } + } + }, + { + "name": "compileSolidity", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns compiled solidity code.\r\n\r\n**Parameters**\r\n\r\n`String` - The source code.\r\n\r\n```\r\nparams: [\r\n \"contract test { function multiply(uint a) returns(uint d) { return a * 7; } }\",\r\n]\r\n```\r\n\r\n**Returns**\r\n\r\n`DATA` - The compiled source code.", + "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}" + } + } + }, + { + "name": "compileSerpent", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns compiled serpent code.\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.", + "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}" + } + } + }, + { + "name": "newFilter", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Creates a 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**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`, 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.", + "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}" + } + } + }, + { + "name": "newBlockFilter", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Creates a 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.", + "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}" + } + } + }, + { + "name": "newPendingTransactionFilter", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Creates a filter in the node, to notify when new pending transactions arrive. 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.", + "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}" + } + } + }, + { + "name": "uninstallFilter", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Uninstalls a filter with given id. Should always be called when watch is no longer needed. Additonally Filters timeout when they aren't 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, otherwise `false`.", + "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}" + } + } + }, + { + "name": "getFilterChanges", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Polling method for a 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.)", + "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}" + } + } + }, + { + "name": "getLogs", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns an array of all 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\nSee `eth_getFilterChanges`", + "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}" + } + } + }, + { + "name": "getWork", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "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` - Array with the following properties:\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.", + "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}" + } + } + }, + { + "name": "submitWork", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Used for submitting a proof-of-work solution.\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` - returns true if the provided solution is valid, otherwise false.", + "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\"0x0000000000000001\", \n\t\t\"0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef\", \n\t\t\"0xD1GE5700000000000000000000000000D1GE5700000000000000000000000000\"\n\t],\n\t\"id\":73\n}" + } + } + }, + { + "name": "submitHashrate", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Used for submitting mining hashrate.\r\n\r\n**Parameters**\r\n\r\n`Hashrate`, 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` - returns `true` if submitting went through succesfully and `false` otherwise.", + "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}" + } + } + } + ] + }, + { + "name": "eth (confirmations)", + "item": [ + { + "name": "protocolVersion", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/confirmations/{{CONFIRMATIONS}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "confirmations", + "{{CONFIRMATIONS}}", + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "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`String` - The current ethereum protocol version", + "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}" + } + } + }, + { + "name": "syncing", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/confirmations/{{CONFIRMATIONS}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "confirmations", + "{{CONFIRMATIONS}}", + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns an object with data about the sync status or false.\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`currentBlock`: `QUANTITY` - The current block, same as eth_blockNumber\r\n`highestBlock`: `QUANTITY` - The estimated highest block", + "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}" + } + } + }, + { + "name": "coinbase", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/confirmations/{{CONFIRMATIONS}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "confirmations", + "{{CONFIRMATIONS}}", + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns the 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.", + "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}" + } + } + }, + { + "name": "mining", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/confirmations/{{CONFIRMATIONS}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "confirmations", + "{{CONFIRMATIONS}}", + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "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` - returns `true` of the client is mining, otherwise `false`.", + "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}" + } + } + }, + { + "name": "hashrate", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/confirmations/{{CONFIRMATIONS}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "confirmations", + "{{CONFIRMATIONS}}", + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "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.", + "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}" + } + } + }, + { + "name": "gasPrice", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/confirmations/{{CONFIRMATIONS}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "confirmations", + "{{CONFIRMATIONS}}", + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "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.", + "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}" + } + } + }, + { + "name": "accounts", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/confirmations/{{CONFIRMATIONS}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "confirmations", + "{{CONFIRMATIONS}}", + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns a list of addresses owned by client.\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", + "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}" + } + } + }, + { + "name": "blockNumber", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/confirmations/{{CONFIRMATIONS}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "confirmations", + "{{CONFIRMATIONS}}", + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns the 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 block number the client is on.", + "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}" + } + } + }, + { + "name": "getBalance", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/confirmations/{{CONFIRMATIONS}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "confirmations", + "{{CONFIRMATIONS}}", + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns the balance of the account of given address.\r\n\r\n**Parameters**\r\n\r\n`DATA`, 20 Bytes - address to check for balance.\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.", + "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\"0x407d73d8a49eeb85d32cf465507dd71d507100c1\", \n\t\t\"latest\"\n\t],\n\t\"id\":1\n}" + } + } + }, + { + "name": "getStorageAt", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/confirmations/{{CONFIRMATIONS}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "confirmations", + "{{CONFIRMATIONS}}", + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "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 storage.\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 =\u003e 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}' {{ENVIRONMENT}}\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\u003e var key = \"000000000000000000000000391694e7e0b0cce554cb130d723a9d27458f9298\" + \"0000000000000000000000000000000000000000000000000000000000000001\"\r\nundefined\r\n\u003e web3.sha3(key, {\"encoding\": \"hex\"})\r\n\"0x6661e9d6d8b923d5bbaab1b96e1dd51ff6ea2a93520fdc9eb75d059238b8c5e9\"\r\n```", + "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\"0x295a70b2de5e3953354a6a8344e616ed314d7251\", \n\t\t\"0x0\",\n\t\t\"latest\"\n\t], \n\t\"id\": 1\n}" + } + } + }, + { + "name": "getTransactionCount", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/confirmations/{{CONFIRMATIONS}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "confirmations", + "{{CONFIRMATIONS}}", + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns the number of transactions sent from an address.\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 send from this address.", + "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\"0x407d73d8a49eeb85d32cf465507dd71d507100c1\",\n\t\t\"latest\"\n\t],\n\t\"id\":1\n}" + } + } + }, + { + "name": "getBlockTransactionCountByHash", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/confirmations/{{CONFIRMATIONS}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "confirmations", + "{{CONFIRMATIONS}}", + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns the number of transactions in a block from a block matching the given 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.", + "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\"0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238\"\n\t],\n\t\"id\":1\n}" + } + } + }, + { + "name": "getBlockTransactionCountByNumber", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/confirmations/{{CONFIRMATIONS}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "confirmations", + "{{CONFIRMATIONS}}", + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns the number of transactions in a block matching the given 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.", + "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\"0x52A8CA\"\n\t],\n\t\"id\":1\n}" + } + } + }, + { + "name": "getCode", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/confirmations/{{CONFIRMATIONS}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "confirmations", + "{{CONFIRMATIONS}}", + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns code at a given address.\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 ' 0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b',\r\n '0x2' // 2\r\n]\r\n```\r\n\r\n**Returns**\r\n\r\n`DATA` - the code from the given address.", + "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\"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b\", \n\t\t\"0x2\"\n\t],\n\t\"id\":1\n}" + } + } + }, + { + "name": "sign", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/confirmations/{{CONFIRMATIONS}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "confirmations", + "{{CONFIRMATIONS}}", + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "The sign method calculates an Ethereum specific signature with: `sign(keccak256(\"\\x19Ethereum Signed Message:\\n\" + len(message) + message)))`.\r\n\r\nBy 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 to sign with 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`: Signature", + "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\"0xdeadbeaf\"\n\t],\n\t\"id\":1\n}" + } + } + }, + { + "name": "sendTransaction", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/confirmations/{{CONFIRMATIONS}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "confirmations", + "{{CONFIRMATIONS}}", + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Creates new message call transaction or a contract creation, if the data field contains code.\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.\r\n\r\nUse `eth_getTransactionReceipt` to get the contract address, after the transaction was mined, when you created a contract.", + "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\",\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}" + } + } + }, + { + "name": "sendRawTransaction", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/confirmations/{{CONFIRMATIONS}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "confirmations", + "{{CONFIRMATIONS}}", + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Creates new message call transaction or a contract creation for signed transactions.\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.\r\n\r\nUse `eth_getTransactionReceipt` to get the contract address, after the transaction was mined, when you created a contract.", + "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}" + } + } + }, + { + "name": "call", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/confirmations/{{CONFIRMATIONS}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "confirmations", + "{{CONFIRMATIONS}}", + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "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.", + "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\t\t\"from\": \"\",\n\t\t\"to\": \"\",\n\t\t\"gas\": \"\",\n\t\t\"gasPrice\": \"\",\n\t\t\"value\": \"\",\n\t\t\"data\": \"\"\n\t}, \"latest\"],\n\t\"id\":1\n}" + } + } + }, + { + "name": "estimateGas", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/confirmations/{{CONFIRMATIONS}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "confirmations", + "{{CONFIRMATIONS}}", + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Generates and returns an estimate of how much gas is necessary to allow the transaction to complete. The transaction will not be added to the blockchain. Note that 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**Parameters**\r\n\r\nSee `eth_call` parameters, expect that all properties are optional. 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**Returns**\r\n\r\n`QUANTITY` - the amount of gas used.", + "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\t],\n\t\"id\":1\n}" + } + } + }, + { + "name": "getBlockByHash", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/confirmations/{{CONFIRMATIONS}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "confirmations", + "{{CONFIRMATIONS}}", + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns information about a block by 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.", + "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\"0xad1328d13f833b8af722117afdc406a762033321df8e48c00cd372d462f48169\", \n\t\ttrue\n\t],\n\t\"id\":1\n}" + } + } + }, + { + "name": "getBlockByNumber", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/confirmations/{{CONFIRMATIONS}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "confirmations", + "{{CONFIRMATIONS}}", + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns information about a block by 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`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\nSee `eth_getBlockByHash`", + "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\"0x1b4\", \n\t\ttrue\n\t],\n\t\"id\":1\n}" + } + } + }, + { + "name": "getTransactionByHash", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/confirmations/{{CONFIRMATIONS}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "confirmations", + "{{CONFIRMATIONS}}", + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns the information about a transaction requested by transaction 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.", + "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}" + } + } + }, + { + "name": "getTransactionByBlockHashAndIndex", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/confirmations/{{CONFIRMATIONS}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "confirmations", + "{{CONFIRMATIONS}}", + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns information about a transaction by block hash and transaction index position.\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\nSee `eth_getTransactionByHash`", + "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\"0x3c82bc62179602b67318c013c10f99011037c49cba84e31ffe6e465a21c521a7\", \n\t\t\"0x0\"\n\t],\n\t\"id\":1\n}" + } + } + }, + { + "name": "getTransactionByBlockNumberAndIndex", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/confirmations/{{CONFIRMATIONS}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "confirmations", + "{{CONFIRMATIONS}}", + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns information about a transaction by block number and transaction index position.\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\nSee `eth_getTransactionByHash`", + "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\"0x52A96E\", \n\t\t\"0x1\"\n\t],\n\t\"id\":1\n}" + } + } + }, + { + "name": "getTransactionReceipt", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/confirmations/{{CONFIRMATIONS}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "confirmations", + "{{CONFIRMATIONS}}", + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns the receipt of a transaction by transaction 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\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, otherwise `null`.\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 (pre Byzantium)\r\n\r\n`status`: `QUANTITY` either `1` (success) or `0` (failure)", + "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}" + } + } + }, + { + "name": "getUncleByBlockHashAndIndex", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/confirmations/{{CONFIRMATIONS}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "confirmations", + "{{CONFIRMATIONS}}", + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns information about a uncle of a block by hash and uncle index position.\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\nSee `eth_getBlockByHash`", + "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\"0x7cea0c9ae53df7073fcd4e7b19fc3f1905a2540bbdbd9a10796c9296f5af55dc\", \n\t\t\"0x0\"\n\t],\n\t\"id\":1\n}" + } + } + }, + { + "name": "getUncleByBlockNumberAndIndex", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/confirmations/{{CONFIRMATIONS}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "confirmations", + "{{CONFIRMATIONS}}", + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns information about a uncle of a block by number and uncle index position.\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\nSee `eth_getBlockByHash`\r\n\r\n**Note:** An uncle doesn't contain individual transactions.", + "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\"0x29c\",\n\t\t\"0x0\"\n\t],\n\t\"id\":1\n}" + } + } + }, + { + "name": "getCompilers", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/confirmations/{{CONFIRMATIONS}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "confirmations", + "{{CONFIRMATIONS}}", + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns a list of available compilers in the client.\r\n\r\n**Parameters**\r\n\r\nnone\r\n\r\n**Returns**\r\n\r\n`Array` - Array of available compilers.", + "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}" + } + } + }, + { + "name": "compileLLL", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/confirmations/{{CONFIRMATIONS}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "confirmations", + "{{CONFIRMATIONS}}", + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns compiled LLL code.\r\n\r\n**Parameters**\r\n\r\n`String` - The source code.\r\n\r\n```\r\nparams: [\r\n \"(returnlll (suicide (caller)))\",\r\n]\r\n```\r\n\r\n**Returns**\r\n\r\n`DATA` - The compiled source code.", + "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}" + } + } + }, + { + "name": "compileSolidity", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/confirmations/{{CONFIRMATIONS}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "confirmations", + "{{CONFIRMATIONS}}", + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns compiled solidity code.\r\n\r\n**Parameters**\r\n\r\n`String` - The source code.\r\n\r\n```\r\nparams: [\r\n \"contract test { function multiply(uint a) returns(uint d) { return a * 7; } }\",\r\n]\r\n```\r\n\r\n**Returns**\r\n\r\n`DATA` - The compiled source code.", + "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}" + } + } + }, + { + "name": "compileSerpent", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/confirmations/{{CONFIRMATIONS}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "confirmations", + "{{CONFIRMATIONS}}", + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns compiled serpent code.\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.", + "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}" + } + } + }, + { + "name": "newFilter", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/confirmations/{{CONFIRMATIONS}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "confirmations", + "{{CONFIRMATIONS}}", + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Creates a 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**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`, 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.", + "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}" + } + } + }, + { + "name": "newBlockFilter", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/confirmations/{{CONFIRMATIONS}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "confirmations", + "{{CONFIRMATIONS}}", + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Creates a 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.", + "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}" + } + } + }, + { + "name": "newPendingTransactionFilter", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/confirmations/{{CONFIRMATIONS}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "confirmations", + "{{CONFIRMATIONS}}", + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Creates a filter in the node, to notify when new pending transactions arrive. 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.", + "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}" + } + } + }, + { + "name": "uninstallFilter", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/confirmations/{{CONFIRMATIONS}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "confirmations", + "{{CONFIRMATIONS}}", + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Uninstalls a filter with given id. Should always be called when watch is no longer needed. Additonally Filters timeout when they aren't 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, otherwise `false`.", + "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}" + } + } + }, + { + "name": "getFilterChanges", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/confirmations/{{CONFIRMATIONS}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "confirmations", + "{{CONFIRMATIONS}}", + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Polling method for a 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.)", + "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}" + } + } + }, + { + "name": "getLogs", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/confirmations/{{CONFIRMATIONS}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "confirmations", + "{{CONFIRMATIONS}}", + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Returns an array of all 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\nSee `eth_getFilterChanges`", + "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}" + } + } + }, + { + "name": "getWork", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/confirmations/{{CONFIRMATIONS}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "confirmations", + "{{CONFIRMATIONS}}", + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "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` - Array with the following properties:\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.", + "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}" + } + } + }, + { + "name": "submitWork", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/confirmations/{{CONFIRMATIONS}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "confirmations", + "{{CONFIRMATIONS}}", + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Used for submitting a proof-of-work solution.\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` - returns true if the provided solution is valid, otherwise false.", + "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\"0x0000000000000001\", \n\t\t\"0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef\", \n\t\t\"0xD1GE5700000000000000000000000000D1GE5700000000000000000000000000\"\n\t],\n\t\"id\":73\n}" + } + } + }, + { + "name": "submitHashrate", + "request": { + "url": { + "raw": "{{ENVIRONMENT}}/confirmations/{{CONFIRMATIONS}}/rpc/{{CHAIN_ID}}", + "host": [ + "{{ENVIRONMENT}}" + ], + "path": [ + "confirmations", + "{{CONFIRMATIONS}}", + "rpc", + "{{CHAIN_ID}}" + ] + }, + "method": "POST", + "description": "Used for submitting mining hashrate.\r\n\r\n**Parameters**\r\n\r\n`Hashrate`, 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` - returns `true` if submitting went through succesfully and `false` otherwise.", + "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}" + } + } + } + ] + } + ], + "variable": [ + { + "id": "ENVIRONMENT", + "name": "Base url", + "description": "Base url of the omnirpc server" + }, + { + "id": "CHAIN_ID", + "name": "Chain ID", + "description": "Chain ID to send requests to" + }, + { + "id": "CONFIRMATIONS", + "name": "Confirmations", + "description": "Confirmation count" + } + ] +} \ No newline at end of file diff --git a/services/omnirpc/swagger/generate.go b/services/omnirpc/swagger/generate.go new file mode 100644 index 0000000000..8492f81ab7 --- /dev/null +++ b/services/omnirpc/swagger/generate.go @@ -0,0 +1,27 @@ +// package main generates a static swagger collection for use in documentation. This differs from collection which dynamically generates a collection for serving. +// this is purely meant for static linking in the repo. +package main + +import ( + "github.com/synapsecns/sanguine/services/omnirpc/collection" + "os" +) + +//go:generate go run github.com/synapsecns/sanguine/services/omnirpc/swagger + +func main() { + res, err := collection.CreateCollection() + if err != nil { + panic(err) + } + + file, err := os.Create("collection.json") + if err != nil { + panic(err) + } + + _, err = file.Write(res) + if err != nil { + panic(err) + } +}