-
Notifications
You must be signed in to change notification settings - Fork 0
/
eth.http
174 lines (132 loc) · 4.31 KB
/
eth.http
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
###
POST {{rpc-url}} HTTP/1.1
{ "method": "eth_chainId", "id": 7, "jsonrpc": "2.0", "params": [ ] }
###
POST {{rpc-url}} HTTP/1.1
{ "method": "eth_blockNumber", "id": 7, "jsonrpc": "2.0", "params": [ ] }
###
POST {{rpc-url}} HTTP/1.1
{ "method": "eth_gasPrice", "id": 7, "jsonrpc": "2.0", "params": [ ] }
###
POST {{rpc-url}} HTTP/1.1
{ "method": "eth_feeHistory", "id": 7, "jsonrpc":"2.0", "params": ["0x1", "latest", [50.0]] }
### `Method eth_getBlockReceipts not found`
POST {{rpc-url}} HTTP/1.1
{ "method": "eth_getBlockReceipts", "id": 7, "jsonrpc": "2.0", "params": [ "latest" ] }
###
# @prompt blockNumber Block number
POST {{rpc-url}} HTTP/1.1
{ "method": "eth_getBlockByNumber", "id": 7, "jsonrpc": "2.0", "params": [ "{{blockNumber}}", true ] }
###
# @prompt address Address
POST {{rpc-url}} HTTP/1.1
{ "method": "eth_getTransactionCount", "id": 7, "jsonrpc": "2.0", "params": [
"{{address}}", "0x811364"
] }
###
# @prompt address Account Address
POST {{rpc-url}} HTTP/1.1
{ "method": "eth_getBalance", "id": 7, "jsonrpc": "2.0", "params": [ "{{address}}", "latest" ] }
###
# @prompt address Account Address
POST {{rpc-url}} HTTP/1.1
{ "method": "eth_getProof", "id": 2, "jsonrpc": "2.0", "params": [
"{{address}}",
["0x0"],
"latest"
] }
###
# @prompt txHash Transaction Hash
POST {{rpc-url}} HTTP/1.1
{ "method": "eth_getTransactionByHash", "id": 2, "jsonrpc": "2.0", "params": [
"{{txHash}}"
] }
###
# @prompt txHash Transaction Hash
POST {{rpc-url}} HTTP/1.1
{ "method": "eth_getTransactionReceipt", "id": 2, "jsonrpc": "2.0", "params": [
"{{txHash}}",
true
] }
###
POST {{rpc-url}} HTTP/1.1
{ "method":"eth_estimateGas", "id": 7, "jsonrpc":"2.0", "params": [
{
"from":"0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266",
"to":"0x09635F643e140090A9A8Dcd712eD6285858ceBef",
"data":"0x4b5c6687000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266",
"value":"0x0",
"type":"0x2",
"maxFeePerGas":"0xeadc43c918"
},
"latest"
] }
###
# HTS 0x0000000000000000000000000000000000000167
# @prompt address
POST {{rpc-url}} HTTP/1.1
{ "method": "eth_getCode", "id": 7, "jsonrpc": "2.0", "params": [ "{{address}}", "latest" ] }
###
# @prompt address
# @prompt blockNumber
POST {{rpc-url}} HTTP/1.1
{ "method": "eth_getCode", "id": 7, "jsonrpc": "2.0", "params": [ "{{address}}", "{{blockNumber}}" ] }
### `eth_getCode` using `null` address to compare behaviour
POST {{rpc-url}} HTTP/1.1
{ "method": "eth_getCode", "id": 7, "jsonrpc": "2.0", "params": [ null, "latest" ] }
###
# @prompt address
POST {{rpc-url}} HTTP/1.1
{ "method": "eth_getLogs", "id": 2, "jsonrpc": "2.0", "params": [
{
"address": "{{address}}"
}
] }
###
# USDC on mainnet 0x000000000000000000000000000000000006f89a 0.0.456858
# USDC on testnet 0x0000000000000000000000000000000000068cDa 0.0.429274
# @prompt address Contract Address
POST {{rpc-url}} HTTP/1.1
{ "method": "eth_getStorageAt", "id": 7, "jsonrpc": "2.0", "params": [
"{{address}}",
"0xe",
"latest"
] }
### Call `IERC20(to).balanceOf(token)`
# @prompt to To address
POST {{rpc-url}} HTTP/1.1
{ "method": "eth_call", "id": 7, "jsonrpc": "2.0", "params": [
{
"to": "{{to}}",
"data": "0x70a082310000000000000000000000004d1c823b5f15be83fdf5adaf137c2a9e0e78fe15"
},
"latest"
] }
### Call `0x167.redirectForToken(USDC, 'name()')`
POST {{rpc-url}} HTTP/1.1
{ "method": "eth_call", "id": 7, "jsonrpc": "2.0", "params": [
{
"to": "0x0000000000000000000000000000000000000167",
"data": "0x618dc65e0000000000000000000000000000000000000000000000000000000000068cda0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000406fdde0300000000000000000000000000000000000000000000000000000000"
},
"latest"
] }
### Call `0x167.redirectForToken(USDC, 'name()')<packed>`
POST {{rpc-url}} HTTP/1.1
{ "method": "eth_call", "id": 7, "jsonrpc": "2.0", "params": [
{
"to": "0x0000000000000000000000000000000000000167",
"data": "0x618dc65e0000000000000000000000000000000000068cDa06fdde03"
},
"latest"
] }
###
# @prompt address
POST {{rpc-url}} HTTP/1.1
{ "method": "eth_call", "id": 7, "jsonrpc": "2.0", "params": [
{
"to": "{{address}}",
"data": "0x"
},
"latest"
] }