Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing confusing default block parameter constant "2" into boolean #1

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ The entire spec is contained in the [schema.json](src/schema.json) file.

```
methods: {
<method name : [ input(s), output(s), minimum required outputs, 'latest' tag default position (if any) ] >,
<method name : [ Array Input(s), Array Output(s), String Output type, Integer Minimum required parameters, Boolean Requires default block parameter] >,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe the Array Output(s) is unnecessary, no? The second element is the String Output Type?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I might want to look into that. Yes, you may be right.

Copy link

@sunny-g sunny-g Jun 7, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I misspoke - the second element should be Array Output(s), and so I the String Output Type is extraneous (e.g. eth_getFilterLogs returns ["FilterChange"].

}
```

Expand All @@ -65,7 +65,7 @@ The entire spec is contained in the [schema.json](src/schema.json) file.
```
{
methods: {
"eth_getBalance": [["D20", "Q|T"], "Q", 1, 2],
"eth_getBalance": [["D20", "Q|T"], "Q", 1, true],
...
},
...
Expand Down
15 changes: 15 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "digitaldonkey/ethjs-schema",
"description": "Schema file for Ethereum JSON RPC API. See: https://github.com/ethereum/wiki/wiki/JSON-RPC",
"license": "MIT",
"authors": [
{
"name": "Nick Dodson",
"email": "[email protected]"
},
{
"name": "Thorsten Krug",
"email": "[email protected]"
}
]
}
14 changes: 8 additions & 6 deletions src/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
"net_version": [[], "S"],
"net_peerCount": [[], "Q"],
"net_listening": [[], "B"],
"personal_sign": [["D20", "D", "S"], "D", 2],
"personal_ecRecover": [["D", "D"], "D20", 2],
"eth_protocolVersion": [[], "S"],
"eth_syncing": [[], "Boolean|EthSyncing"],
"eth_coinbase": [[], "D20"],
Expand All @@ -13,18 +15,18 @@
"eth_gasPrice": [[], "Q"],
"eth_accounts": [[], ["D20"]],
"eth_blockNumber": [[], "Q"],
"eth_getBalance": [["D20", "Q|T"], "Q", 1, 2],
"eth_getStorageAt": [["D20", "Q", "Q|T"], "D", 2, 2],
"eth_getTransactionCount": [["D20", "Q|T"], "Q", 1, 2],
"eth_getBalance": [["D20", "Q|T"], "Q", 1, true],
"eth_getStorageAt": [["D20", "Q", "Q|T"], "D", 2, true],
"eth_getTransactionCount": [["D20", "Q|T"], "Q", 1, true],
"eth_getBlockTransactionCountByHash": [["D32"], "Q", 1],
"eth_getBlockTransactionCountByNumber": [["Q|T"], "Q", 1],
"eth_getUncleCountByBlockHash": [["D32"], "Q", 1],
"eth_getUncleCountByBlockNumber": [["Q"], "Q", 1],
"eth_getCode": [["D20", "Q|T"], "D", 1, 2],
"eth_getCode": [["D20", "Q|T"], "D", 1, true],
"eth_sign": [["D20", "D32"], "D", 2],
"eth_sendTransaction": [["SendTransaction"], "D", 1],
"eth_sendRawTransaction": [["D"], "D32", 1],
"eth_call": [["CallTransaction", "Q|T"], "D", 1, 2],
"eth_call": [["CallTransaction", "Q|T"], "D", 1, true],
"eth_estimateGas": [["EstimateTransaction", "Q|T"], "Q", 1],
"eth_getBlockByHash": [["D32", "B"], "Block", 2],
"eth_getBlockByNumber": [["Q|T", "B"], "Block", 2],
Expand Down Expand Up @@ -152,7 +154,7 @@
"__required": [],
"fromBlock": "Q|T",
"toBlock": "Q|T",
"address": "Array|Data",
"address": "Array|DATA",
"topics": ["D"]
},
"FilterChange": {
Expand Down