rbuilder namespace
rbuilder_calculateStateRoot
Calculate the state root on top of the state trie at specified block given a set of change.
- Parameters
- Request
- Response
-
block
: string (block number or hash or either ofearliest
,finalized
,latest
,pending
, orsafe
) -
accountDiff
: map of object
balance
: string (hex integer)changedSlots
: map of string (hex integer)codeHash
: string (hash)nonce
: string (hex integer)selfDestructed
: boolean
curl localhost:8545 \
-X POST \
-H "Content-Type: application/json" \
--data '{
"jsonrpc": "2.0",
"id": 0,
"method": "rbuilder_calculateStateRoot",
"params": [block, accountDiff]
}'
{
"jsonrpc": "2.0",
"id": 0,
"result": result
}
result
: string (hash)
rbuilder_getAccount
Get account data
- Parameters
- Request
- Response
-
address
: string (address) -
block
: string (block number or hash or either ofearliest
,finalized
,latest
,pending
, orsafe
)
curl localhost:8545 \
-X POST \
-H "Content-Type: application/json" \
--data '{
"jsonrpc": "2.0",
"id": 0,
"method": "rbuilder_getAccount",
"params": [address, block]
}'
{
"jsonrpc": "2.0",
"id": 0,
"result": result
}
result
: object
balance
: string (hex integer)codeHash
: string (hash)nonce
: string (hex integer)
rbuilder_getBlockHash
Gets block hash
- Parameters
- Request
- Response
block
: string (block number or hash or either ofearliest
,finalized
,latest
,pending
, orsafe
)
curl localhost:8545 \
-X POST \
-H "Content-Type: application/json" \
--data '{
"jsonrpc": "2.0",
"id": 0,
"method": "rbuilder_getBlockHash",
"params": [block]
}'
{
"jsonrpc": "2.0",
"id": 0,
"result": result
}
result
: string (hash)
rbuilder_getCodeByHash
Returns bytecode based on hash.
- Parameters
- Request
- Response
hash
: string (hash)
curl localhost:8545 \
-X POST \
-H "Content-Type: application/json" \
--data '{
"jsonrpc": "2.0",
"id": 0,
"method": "rbuilder_getCodeByHash",
"params": [hash]
}'
{
"jsonrpc": "2.0",
"id": 0,
"result": result
}
result
: string (hex data)