These methods are used for Ethereum-compatible JSON-RPC calls
EthAccounts will always return [] since we don't expect Lotus to manage private keys
There are not yet any comments for this method.
Perms: read
Inputs: null
Response:
["0x5cbeecf99d3fdb3f25e309cc264f240bb0664031"]
EthAddressToFilecoinAddress converts an EthAddress into an f410 Filecoin Address
Perms: read
Inputs:
["0x5cbeecf99d3fdb3f25e309cc264f240bb0664031"]
Response: "f01234"
FilecoinAddressToEthAddress converts any Filecoin address to an EthAddress.
This method supports all Filecoin address types:
f0
andf4
addresses: Converted directly.f1/f2/f3
addresses: First converted to their correspondingf0
ID address, then to an0x
EthAddress.
Note:
f0 ID addresses are not permanent and can be affected by chain reorganizations. To account for this, the API includes a
blkNum
parameter, which specifies the block number that is used to determine the tipset state to use for converting an f1/f2/f3 address to an f0 address. This parameter functions similarly to theblkNum
parameter in the existingEthGetBlockByNumber
API. See Alchemy Docs - eth_getBlockByNumber for more details.
Requirements:
- For
f1/f2/f3
addresses, they must be instantiated on-chain, asf0
ID addresses are only assigned to actors when they are created on-chain. The simplest way to instantiate an address on chain is to send a transaction to the address.
Parameters:
- filecoinAddress: The Filecoin address to convert.
- blkNum: The block number or state for the conversion. Defaults to "finalized" for maximum safety. Possible values: "pending", "latest", "finalized", "safe", or a specific block number represented as hex.
Perms: read
Input:
["t410fghja63ghyzd54cbswfapglsutx5e64xnm7mazwi"]
Response:
"0x31d20f6cc7c647de0832b140f32e549dfa4f72ed"
Input:
["t15xwdubazj7aft6ylmiw54fa27zyyl3rpc6olgcy", "safe"]
Response:
"0xff00000000000000000000000000000000000064"
EthBlockNumber returns the height of the latest (heaviest) TipSet
Perms: read
Inputs: null
Response: "0x5"
Perms: read
Inputs:
[
{
"from": "0x5cbeecf99d3fdb3f25e309cc264f240bb0664031",
"to": "0x5cbeecf99d3fdb3f25e309cc264f240bb0664031",
"gas": "0x5",
"gasPrice": "0x0",
"value": "0x0",
"data": "0x07"
},
"string value"
]
Response: "0x07"
Perms: read
Inputs: null
Response: "0x5"
Perms: read
Inputs:
[
{
"from": "0x5cbeecf99d3fdb3f25e309cc264f240bb0664031",
"to": "0x5cbeecf99d3fdb3f25e309cc264f240bb0664031",
"gas": "0x5",
"gasPrice": "0x0",
"value": "0x0",
"data": "0x07"
}
]
Response: "0x5"
Perms: read
Inputs:
["Bw=="]
Response:
{
"oldestBlock": "0x5",
"baseFeePerGas": ["0x0"],
"gasUsedRatio": [12.3],
"reward": []
}
Perms: read
Inputs: null
Response: "0x0"
Perms: read
Inputs:
["0x5cbeecf99d3fdb3f25e309cc264f240bb0664031", "string value"]
Response: "0x0"
Perms: read
Inputs:
["0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e", true]
Response:
{
"hash": "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e",
"parentHash": "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e",
"sha3Uncles": "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e",
"miner": "0x5cbeecf99d3fdb3f25e309cc264f240bb0664031",
"stateRoot": "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e",
"transactionsRoot": "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e",
"receiptsRoot": "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e",
"logsBloom": "0x07",
"difficulty": "0x5",
"totalDifficulty": "0x5",
"number": "0x5",
"gasLimit": "0x5",
"gasUsed": "0x5",
"timestamp": "0x5",
"extraData": "0x07",
"mixHash": "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e",
"nonce": "0x0707070707070707",
"baseFeePerGas": "0x0",
"size": "0x5",
"transactions": [{}],
"uncles": [
"0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e"
]
}
Perms: read
Inputs:
["string value", true]
Response:
{
"hash": "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e",
"parentHash": "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e",
"sha3Uncles": "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e",
"miner": "0x5cbeecf99d3fdb3f25e309cc264f240bb0664031",
"stateRoot": "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e",
"transactionsRoot": "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e",
"receiptsRoot": "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e",
"logsBloom": "0x07",
"difficulty": "0x5",
"totalDifficulty": "0x5",
"number": "0x5",
"gasLimit": "0x5",
"gasUsed": "0x5",
"timestamp": "0x5",
"extraData": "0x07",
"mixHash": "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e",
"nonce": "0x0707070707070707",
"baseFeePerGas": "0x0",
"size": "0x5",
"transactions": [{}],
"uncles": [
"0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e"
]
}
EthGetBlockTransactionCountByHash returns the number of messages in the TipSet
Perms: read
Inputs:
["0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e"]
Response: "0x5"
EthGetBlockTransactionCountByNumber returns the number of messages in the TipSet
Perms: read
Inputs:
["0x5"]
Response: "0x5"
Perms: read
Inputs:
["0x5cbeecf99d3fdb3f25e309cc264f240bb0664031", "string value"]
Response: "0x07"
Polling method for a filter, returns event logs which occurred since last poll. (requires write perm since timestamp of last filter execution will be written)
Perms: read
Inputs:
["0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e"]
Response:
[{}]
Returns event logs matching filter with given id. (requires write perm since timestamp of last filter execution will be written)
Perms: read
Inputs:
["0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e"]
Response:
[{}]
Returns event logs matching given filter spec.
Perms: read
Inputs:
[
{
"fromBlock": "2301220",
"address": ["0x5cbeecf99d3fdb3f25e309cc264f240bb0664031"],
"topics": null
}
]
Response:
[{}]
Perms: read
Inputs:
["0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e"]
Response:
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
}
Perms: read
Inputs:
["0x5cbeecf99d3fdb3f25e309cc264f240bb0664031", "0x07", "string value"]
Response: "0x07"
Perms: read
Inputs:
["0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e", "0x5"]
Response:
{
"chainId": "0x5",
"nonce": "0x5",
"hash": "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e",
"blockHash": "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e",
"blockNumber": "0x5",
"transactionIndex": "0x5",
"from": "0x5cbeecf99d3fdb3f25e309cc264f240bb0664031",
"to": "0x5cbeecf99d3fdb3f25e309cc264f240bb0664031",
"value": "0x0",
"type": "0x5",
"input": "0x07",
"gas": "0x5",
"maxFeePerGas": "0x0",
"maxPriorityFeePerGas": "0x0",
"accessList": [
"0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e"
],
"v": "0x0",
"r": "0x0",
"s": "0x0"
}
Perms: read
Inputs:
["0x5", "0x5"]
Response:
{
"chainId": "0x5",
"nonce": "0x5",
"hash": "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e",
"blockHash": "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e",
"blockNumber": "0x5",
"transactionIndex": "0x5",
"from": "0x5cbeecf99d3fdb3f25e309cc264f240bb0664031",
"to": "0x5cbeecf99d3fdb3f25e309cc264f240bb0664031",
"value": "0x0",
"type": "0x5",
"input": "0x07",
"gas": "0x5",
"maxFeePerGas": "0x0",
"maxPriorityFeePerGas": "0x0",
"accessList": [
"0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e"
],
"v": "0x0",
"r": "0x0",
"s": "0x0"
}
Perms: read
Inputs:
["0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e"]
Response:
{
"chainId": "0x5",
"nonce": "0x5",
"hash": "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e",
"blockHash": "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e",
"blockNumber": "0x5",
"transactionIndex": "0x5",
"from": "0x5cbeecf99d3fdb3f25e309cc264f240bb0664031",
"to": "0x5cbeecf99d3fdb3f25e309cc264f240bb0664031",
"value": "0x0",
"type": "0x5",
"input": "0x07",
"gas": "0x5",
"maxFeePerGas": "0x0",
"maxPriorityFeePerGas": "0x0",
"accessList": [
"0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e"
],
"v": "0x0",
"r": "0x0",
"s": "0x0"
}
Perms: read
Inputs:
["0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e", 10101]
Response:
{
"chainId": "0x5",
"nonce": "0x5",
"hash": "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e",
"blockHash": "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e",
"blockNumber": "0x5",
"transactionIndex": "0x5",
"from": "0x5cbeecf99d3fdb3f25e309cc264f240bb0664031",
"to": "0x5cbeecf99d3fdb3f25e309cc264f240bb0664031",
"value": "0x0",
"type": "0x5",
"input": "0x07",
"gas": "0x5",
"maxFeePerGas": "0x0",
"maxPriorityFeePerGas": "0x0",
"accessList": [
"0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e"
],
"v": "0x0",
"r": "0x0",
"s": "0x0"
}
Perms: read
Inputs:
["0x5cbeecf99d3fdb3f25e309cc264f240bb0664031", "string value"]
Response: "0x5"
Perms: read
Inputs:
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
}
]
Response: "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e"
Perms: read
Inputs:
["0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e"]
Response:
{
"transactionHash": "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e",
"transactionIndex": "0x5",
"blockHash": "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e",
"blockNumber": "0x5",
"from": "0x5cbeecf99d3fdb3f25e309cc264f240bb0664031",
"to": "0x5cbeecf99d3fdb3f25e309cc264f240bb0664031",
"root": "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e",
"status": "0x5",
"contractAddress": "0x5cbeecf99d3fdb3f25e309cc264f240bb0664031",
"cumulativeGasUsed": "0x5",
"gasUsed": "0x5",
"effectiveGasPrice": "0x0",
"logsBloom": "0x07",
"logs": [
{
"address": "0x5cbeecf99d3fdb3f25e309cc264f240bb0664031",
"data": "0x07",
"topics": [
"0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e"
],
"removed": true,
"logIndex": "0x5",
"transactionIndex": "0x5",
"transactionHash": "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e",
"blockHash": "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e",
"blockNumber": "0x5"
}
],
"type": "0x5"
}
Perms: read
Inputs:
["0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e", 10101]
Response:
{
"transactionHash": "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e",
"transactionIndex": "0x5",
"blockHash": "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e",
"blockNumber": "0x5",
"from": "0x5cbeecf99d3fdb3f25e309cc264f240bb0664031",
"to": "0x5cbeecf99d3fdb3f25e309cc264f240bb0664031",
"root": "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e",
"status": "0x5",
"contractAddress": "0x5cbeecf99d3fdb3f25e309cc264f240bb0664031",
"cumulativeGasUsed": "0x5",
"gasUsed": "0x5",
"effectiveGasPrice": "0x0",
"logsBloom": "0x07",
"logs": [
{
"address": "0x5cbeecf99d3fdb3f25e309cc264f240bb0664031",
"data": "0x07",
"topics": [
"0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e"
],
"removed": true,
"logIndex": "0x5",
"transactionIndex": "0x5",
"transactionHash": "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e",
"blockHash": "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e",
"blockNumber": "0x5"
}
],
"type": "0x5"
}
Perms: read
Inputs: null
Response: "0x0"
Installs a persistent filter to notify when a new block arrives.
Perms: read
Inputs: null
Response: "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e"
Installs a persistent filter based on given filter spec.
Perms: read
Inputs:
[
{
"fromBlock": "2301220",
"address": ["0x5cbeecf99d3fdb3f25e309cc264f240bb0664031"],
"topics": null
}
]
Response: "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e"
Installs a persistent filter to notify when new messages arrive in the message pool.
Perms: read
Inputs: null
Response: "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e"
Perms: read
Inputs: null
Response: "0x5"
Perms: read
Inputs:
["0x07"]
Response: "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e"
Subscribe to different event types using websockets eventTypes is one or more of:
- newHeads: notify when new blocks arrive.
- pendingTransactions: notify when new messages arrive in the message pool.
- logs: notify new event logs that match a criteria params contains additional parameters used with the log event type The client will receive a stream of EthSubscriptionResponse values until EthUnsubscribe is called.
Perms: read
Inputs:
["Bw=="]
Response: "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e"
Perms: read
Inputs: null
Response: false
TraceAPI related methods
Returns traces created at given block
Perms: read
Inputs:
["string value"]
Response:
[
{
"action": {
"callType": "string value",
"from": "0x5cbeecf99d3fdb3f25e309cc264f240bb0664031",
"to": "0x5cbeecf99d3fdb3f25e309cc264f240bb0664031",
"gas": "0x5",
"input": "0x07",
"value": "0x0"
},
"result": {
"gasUsed": "0x5",
"output": "0x07"
},
"subtraces": 123,
"traceAddress": [123],
"Type": "string value",
"blockHash": "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e",
"blockNumber": 9,
"transactionHash": "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e",
"transactionPosition": 123
}
]
Replays all transactions in a block returning the requested traces for each transaction
Perms: read
Inputs:
["string value", ["string value"]]
Response:
[
{
"output": "0x07",
"stateDiff": "string value",
"trace": [
{
"action": {
"callType": "string value",
"from": "0x5cbeecf99d3fdb3f25e309cc264f240bb0664031",
"to": "0x5cbeecf99d3fdb3f25e309cc264f240bb0664031",
"gas": "0x5",
"input": "0x07",
"value": "0x0"
},
"result": {
"gasUsed": "0x5",
"output": "0x07"
},
"subtraces": 123,
"traceAddress": [123],
"Type": "string value"
}
],
"transactionHash": "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e",
"vmTrace": "string value"
}
]
Uninstalls a filter with given id.
Perms: read
Inputs:
["0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e"]
Response: true
Unsubscribe from a websocket subscription
Perms: read
Inputs:
["0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e"]
Response: true