mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
ns-eth: curl with bash type
Signed-off-by: jsvisa <delweng@gmail.com>
This commit is contained in:
parent
c1b3d708e1
commit
34d00ab9a1
1 changed files with 5 additions and 5 deletions
|
|
@ -70,7 +70,7 @@ The method returns a single `Binary` consisting the return value of the executed
|
|||
With a synced Rinkeby node with RPC exposed on localhost (`geth --rinkeby --http`) we can make a call against the [CheckpointOracle](https://rinkeby.etherscan.io/address/0xebe8efa441b9302a0d7eaecc277c09d20d684540) to retrieve the list of administrators:
|
||||
|
||||
```sh
|
||||
$ curl --data '{"method":"eth_call","params":[{"to":"0xebe8efa441b9302a0d7eaecc277c09d20d684540","data":"0x45848dfc"},"latest"],"id":1,"jsonrpc":"2.0"}' -H "Content-Type: application/json" -X POST localhost:8545
|
||||
curl --data '{"method":"eth_call","params":[{"to":"0xebe8efa441b9302a0d7eaecc277c09d20d684540","data":"0x45848dfc"},"latest"],"id":1,"jsonrpc":"2.0"}' -H "Content-Type: application/json" -X POST localhost:8545
|
||||
```
|
||||
|
||||
And the result is an Ethereum ABI encoded list of accounts:
|
||||
|
|
@ -121,7 +121,7 @@ With a synced Rinkeby node with RPC exposed on localhost (`geth --rinkeby --http
|
|||
threshold field:
|
||||
|
||||
```sh
|
||||
$ curl --data '{"method":"eth_call","params":[{"to":"0xebe8efa441b9302a0d7eaecc277c09d20d684540","data":"0x0be5b6ba"}, "latest", {"0xebe8efa441b9302a0d7eaecc277c09d20d684540": {"code":"0x6080604052348015600f57600080fd5b506004361060285760003560e01c80630be5b6ba14602d575b600080fd5b60336045565b60408051918252519081900360200190f35b6007549056fea265627a7a723058206f26bd0433456354d8d1228d8fe524678a8aeeb0594851395bdbd35efc2a65f164736f6c634300050a0032"}}],"id":1,"jsonrpc":"2.0"}' -H "Content-Type: application/json" -X POST localhost:8545
|
||||
curl --data '{"method":"eth_call","params":[{"to":"0xebe8efa441b9302a0d7eaecc277c09d20d684540","data":"0x0be5b6ba"}, "latest", {"0xebe8efa441b9302a0d7eaecc277c09d20d684540": {"code":"0x6080604052348015600f57600080fd5b506004361060285760003560e01c80630be5b6ba14602d575b600080fd5b60336045565b60408051918252519081900360200190f35b6007549056fea265627a7a723058206f26bd0433456354d8d1228d8fe524678a8aeeb0594851395bdbd35efc2a65f164736f6c634300050a0032"}}],"id":1,"jsonrpc":"2.0"}' -H "Content-Type: application/json" -X POST localhost:8545
|
||||
```
|
||||
|
||||
And the result is the Ethereum ABI encoded threshold number:
|
||||
|
|
@ -149,7 +149,7 @@ This method creates an [EIP2930](https://eips.ethereum.org/EIPS/eip-2930) type `
|
|||
|
||||
**Usage:**
|
||||
|
||||
```
|
||||
```sh
|
||||
curl --data '{"method":"eth_createAccessList","params":[{"from": "0x8cd02c6cbd8375b39b06577f8d50c51d86e8d5cd", "data": "0x608060806080608155"}, "pending"],"id":1,"jsonrpc":"2.0"}' -H "Content-Type: application/json" -X POST localhost:8545
|
||||
```
|
||||
|
||||
|
|
@ -187,7 +187,7 @@ Returns a block header.
|
|||
|
||||
**Usage:**
|
||||
|
||||
```
|
||||
```sh
|
||||
curl localhost:8545 -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"eth_getHeaderByNumber","params":["0x10823a8"],"id":0}'
|
||||
```
|
||||
|
||||
|
|
@ -230,7 +230,7 @@ Returns a block header.
|
|||
|
||||
**Usage:**
|
||||
|
||||
```
|
||||
```sh
|
||||
curl localhost:8545 -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"eth_getHeaderByHash","params":["0x4574b6f248bf3295f76ae797454f4ec21c8ef5b53c0f7fee8534b65623d9360a"],"id":0}'
|
||||
```
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue