Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
更新代码 #1
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
base: master
Are you sure you want to change the base?
Uh oh!
There was an error while loading. Please reload this page.
更新代码 #1
Changes from all commits
6c1388a28fb7abc6f51c085eac6bc423832File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing
JSON RPC
JSON-RPC Endpoint
Default JSON-RPC endpoints: http://localhost:44000. Endpoints is defined by ethermint rpcport.
Curl Examples Explained
The curl options below might return a response where the node complains about the content type, this is because the --data option sets the content type to application/x-www-form-urlencoded . If your node does complain, manually set the header by placing -H "Content-Type: application/json" at the start of the call.
The examples also do not include the URL/IP & port combination which must be the last argument given to curl e.x. 127.0.0.1:44000
JSON-RPC methods
eth_accounts
Returns a list of addresses owned by client.
Parameters
none
Returns
Array of DATA, 20 Bytes - addresses owned by the client.
Example
eth_blockNumber
Returns the number of most recent block.
Parameters
none
Returns
QUANTITY - integer of the current block number the client is on.
Example
eth_getBalance
Returns the balance of the account of given address.
Parameters
Returns
QUANTITY - integer of the current balance in wei.
Example
eth_getBlockByHash
Returns information about a block by hash.
Parameters
Example Parameters
Returns
Object - A block object, or null when no block was found:
Example
eth_getBlockByNumber
Returns information about a block by block number.
Parameters
Example Parameters
Returns
See eth_getBlockByHash
Example
Result see eth_getBlockByHash
eth_getBlockTransactionCountByHash
Returns the number of transactions in a block from a block matching the given block hash.
Parameters
Example Parameters
Returns
QUANTITY - integer of the number of transactions in this block.
Example
eth_getBlockTransactionCountByNumber
Returns the number of transactions in a block matching the given block number.
Parameters
Example Parameters
Returns
QUANTITY - integer of the number of transactions in this block.
Example
eth_getRawTransactionByBlockHashAndIndex
Returns raw transaction.
Parameters
Returns
transaction raw.
Example
eth_getRawTransactionByBlockNumberAndIndex
Returns raw transaction.
Parameters
Returns
transaction raw.
Example
eth_getRawTransactionByHash
Returns raw transaction.
Parameters
transaction hash
Returns
transaction raw.
Example
eth_getTransactionCount
Return transaction count.
Parameters
Returns
account nonce.
Example
eth_getTransactionByBlockNumberAndIndex
Returns information about a transaction by block number and transaction index position.
Parameters
Example Parameters
Returns
See eth_getTransactionByHash
Example
Result see eth_getTransactionByHash
eth_getTransactionByHash
Returns the information about a transaction requested by transaction hash.
Parameters
DATA, 32 Bytes - hash of a transaction
Example Parameters
Returns
Object - A transaction object, or null when no transaction was found:
Example
eth_getTransactionReceipt
Returns the receipt of a transaction by transaction hash.
Note That the receipt is not available for pending transactions.
Parameters
Example Parameters
Returns
Object - A transaction receipt object, or null when no receipt was found:
It also returns either :
Example
eth_sendRawTransaction
Creates new message call transaction or a contract creation for signed transactions.
Parameters
DATA, The signed transaction data.
Example Parameters
params: ["0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"]Returns
Use eth_getTransactionReceipt to get the contract address, after the transaction was mined, when you created a contract.
Example
eth_signTransaction
Creates new message call transaction or a contract creation, if the data field contains code.
Note This method needs to unlock the from account first.
Parameters
Object - The transaction object
Example Parameters
Note:If the client concurrently sends a transaction from an account, you'd better manage the nonce value yourself, otherwise a nonce related error will occur.
Returns
Use eth_getTransactionReceipt to get the contract address, after the transaction was mined, when you created a contract.
Example
personal_unlockAccount
unlock Account
Parameters
Returns
Boolean - true success,otherwise false.
Example
personal_lockAccount
lock Account
Parameters
address - local account which needs to lock.
Returns
Boolean - true success,otherwise false.
Example
personal_newAccount
new Account
Parameters
password - string, account password.
Returns
account - account hash
Example
personal_listAccounts
list all local Accounts
Parameters
none
Returns
accounts - local account list.
Example
personal_listWallets
list all local Accounts wallets.
Parameters
none
Returns
wallets - a list of local wallets info.
Example
eth_estimateSweepGas
Returns an estimate of the amount of gas needed to execute the sweep transaction against the current latest block.
Parameters
Returns
balance - integer of the current balance in wei. amount - integer of the sweep transfer value in wei. gas - integer of the sweep transfer gas change - integer of the account remaining balance after the sweep transaction in wei.
Example
Uh oh!
There was an error while loading. Please reload this page.