diff --git a/CHANGELOG.md b/CHANGELOG.md index 6d2c8bc04dd..3141a80ad7a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,13 +13,35 @@ - fix(deps): fix Ledger hardware wallet support ([filecoin-project/lotus#13048](https://github.com/filecoin-project/lotus/pull/13048)) - fix(eth): always return nil for eth transactions not found ([filecoin-project/lotus#12999](https://github.com/filecoin-project/lotus/pull/12999)) - feat: add gas to application metric reporting `vm/applyblocks_early_gas`, `vm/applyblocks_messages_gas`, `vm/applyblocks_cron_gas` ([filecoin-project/lotus#13030](https://github.com/filecoin-project/lotus/pull/13030)) -- feat: add Lotus v2 experimental APIs with F3 awareness - The Lotus V2 APIs introduce a powerful new TipSet selection mechanism that significantly enhances how applications interact with the Filecoin blockchain. The design reduces API footprint, seamlessly handles both traditional Expected Consensus and the new F3 protocol, and provides graceful fallbacks. See [Filecoin v2 APIs](https://filoznotebook.notion.site/Filecoin-V2-APIs-1d0dc41950c1808b914de5966d501658) for an - in-depth overview. - Pull requests: - - https://github.com/filecoin-project/lotus/pull/13003 - - https://github.com/filecoin-project/lotus/pull/13027 - - https://github.com/filecoin-project/lotus/pull/13034 + +### Experimental v2 APIs with F3 awareness + +The Lotus V2 APIs introduce a powerful new TipSet selection mechanism that significantly enhances how applications interact with the Filecoin blockchain. The design reduces API footprint, seamlessly handles both traditional Expected Consensus (EC) and the new F3 protocol, and provides graceful fallbacks. + +> [!NOTE] +> V2 APIs are highly experimental and subject to change without notice. + +> [!IMPORTANT] +> The `/v2` APIs rely on F3 data even if F3 is not yet finalizing the chain (i.e., `EC.Finalize` is `false` in the live F3 manifest used by all participants). To determine if F3 is actively finalizing, call the `F3GetManifest` API and check if `Manifest.EC.Finalize` is `true`. Only when `EC.Finalize` is `true` will the `/v2` `"finalized"` and `"safe"` tags accurately reflect the chain's finality according to F3. This also applies to Ethereum APIs discussed below. + +See [Filecoin v2 APIs](https://filoznotebook.notion.site/Filecoin-V2-APIs-1d0dc41950c1808b914de5966d501658) for an in-depth overview. ([filecoin-project/lotus#13003](https://github.com/filecoin-project/lotus/pull/13003)), ([filecoin-project/lotus#13027](https://github.com/filecoin-project/lotus/pull/13027)), ([filecoin-project/lotus#13034](https://github.com/filecoin-project/lotus/pull/13034)) + +**F3-aware Ethereum APIs via `/v2` endpoint and improvements to existing `/v1` APIs** ([filecoin-project/lotus#13026](https://github.com/filecoin-project/lotus/pull/13026)) + +Lotus now offers two versions of its Ethereum-compatible APIs (`eth_*`, `trace_*`, `net_*`, `web3_*` and associated `Filecoin.*` APIs including Filecoin-specific functions such as `Filecoin.EthAddressToFilecoinAddress` and `Filecoin.FilecoinAddressToEthAddress`) with different finality handling: +* **`/v2` APIs (New & Experimental):** These APIs consult the F3 subsystem (if enabled) for finality information. + * `"finalized"` tag maps to the F3 finalized epoch. + * `"safe"` tag maps to the F3 finalized epoch or 200 epochs behind head, whichever is more recent. +* **`/v1` APIs (Existing & Recommended):** These maintain behavior closer to pre-F3 Lotus (EC finality) for compatibility. + * `"finalized"` tag continues to use a fixed 900-epoch delay from the head (EC finality). + * `"safe"` tag uses a 30-epoch delay from the head. + * _One or both of these tags may be adjusted in a future upgrade to take advantage of F3 finality._ +* **Note:** Previously, `"finalized"` and `"safe"` tags referred to epochs `N-1`. This `-1` offset has been removed in both V1 and V2. +* Additional improvements affecting **both `/v1` and `/v2`** Ethereum APIs: + * `eth_getBlockTransactionCountByNumber` now accepts standard Ethereum block specifiers (hex numbers _or_ tags like `"latest"`, `"safe"`, `"finalized"`). + * Methods accepting `BlockNumberOrHash` now support all standard tags (`"pending"`, `"latest"`, `"safe"`, `"finalized"`). This includes `eth_estimateGas`, `eth_call`, `eth_getCode`, `eth_getStorageAt`, `eth_getBalance`, `eth_getTransactionCount`, and `eth_getBlockReceipts`. + * Removed internal `Eth*Limited` methods (e.g., `EthGetTransactionByHashLimited`) from the supported gateway API surface. + * Improved error handling: block selection endpoints now consistently return `ErrNullRound` (and corresponding JSONRPC errors) for null tipsets. # Node and Miner v1.32.2 / 2025-04-04 diff --git a/api/api_full.go b/api/api_full.go index b86424dd03f..dcc9e86d002 100644 --- a/api/api_full.go +++ b/api/api_full.go @@ -841,23 +841,23 @@ type FullNode interface { // EthBlockNumber returns the height of the latest (heaviest) TipSet EthBlockNumber(ctx context.Context) (ethtypes.EthUint64, error) //perm:read // EthGetBlockTransactionCountByNumber returns the number of messages in the TipSet - EthGetBlockTransactionCountByNumber(ctx context.Context, blkNum ethtypes.EthUint64) (ethtypes.EthUint64, error) //perm:read + EthGetBlockTransactionCountByNumber(ctx context.Context, blkNum string) (ethtypes.EthUint64, error) //perm:read // EthGetBlockTransactionCountByHash returns the number of messages in the TipSet EthGetBlockTransactionCountByHash(ctx context.Context, blkHash ethtypes.EthHash) (ethtypes.EthUint64, error) //perm:read - EthGetBlockByHash(ctx context.Context, blkHash ethtypes.EthHash, fullTxInfo bool) (ethtypes.EthBlock, error) //perm:read - EthGetBlockByNumber(ctx context.Context, blkNum string, fullTxInfo bool) (ethtypes.EthBlock, error) //perm:read - EthGetTransactionByHash(ctx context.Context, txHash *ethtypes.EthHash) (*ethtypes.EthTx, error) //perm:read - EthGetTransactionByHashLimited(ctx context.Context, txHash *ethtypes.EthHash, limit abi.ChainEpoch) (*ethtypes.EthTx, error) //perm:read - EthGetTransactionHashByCid(ctx context.Context, cid cid.Cid) (*ethtypes.EthHash, error) //perm:read - EthGetMessageCidByTransactionHash(ctx context.Context, txHash *ethtypes.EthHash) (*cid.Cid, error) //perm:read - EthGetTransactionCount(ctx context.Context, sender ethtypes.EthAddress, blkParam ethtypes.EthBlockNumberOrHash) (ethtypes.EthUint64, error) //perm:read - EthGetTransactionReceipt(ctx context.Context, txHash ethtypes.EthHash) (*EthTxReceipt, error) //perm:read - EthGetBlockReceipts(ctx context.Context, blkParam ethtypes.EthBlockNumberOrHash) ([]*EthTxReceipt, error) //perm:read - EthGetBlockReceiptsLimited(ctx context.Context, blkParam ethtypes.EthBlockNumberOrHash, limit abi.ChainEpoch) ([]*EthTxReceipt, error) //perm:read - EthGetTransactionReceiptLimited(ctx context.Context, txHash ethtypes.EthHash, limit abi.ChainEpoch) (*EthTxReceipt, error) //perm:read - EthGetTransactionByBlockHashAndIndex(ctx context.Context, blkHash ethtypes.EthHash, txIndex ethtypes.EthUint64) (*ethtypes.EthTx, error) //perm:read - EthGetTransactionByBlockNumberAndIndex(ctx context.Context, blkNum string, txIndex ethtypes.EthUint64) (*ethtypes.EthTx, error) //perm:read + EthGetBlockByHash(ctx context.Context, blkHash ethtypes.EthHash, fullTxInfo bool) (ethtypes.EthBlock, error) //perm:read + EthGetBlockByNumber(ctx context.Context, blkNum string, fullTxInfo bool) (ethtypes.EthBlock, error) //perm:read + EthGetTransactionByHash(ctx context.Context, txHash *ethtypes.EthHash) (*ethtypes.EthTx, error) //perm:read + EthGetTransactionByHashLimited(ctx context.Context, txHash *ethtypes.EthHash, limit abi.ChainEpoch) (*ethtypes.EthTx, error) //perm:read + EthGetTransactionHashByCid(ctx context.Context, cid cid.Cid) (*ethtypes.EthHash, error) //perm:read + EthGetMessageCidByTransactionHash(ctx context.Context, txHash *ethtypes.EthHash) (*cid.Cid, error) //perm:read + EthGetTransactionCount(ctx context.Context, sender ethtypes.EthAddress, blkParam ethtypes.EthBlockNumberOrHash) (ethtypes.EthUint64, error) //perm:read + EthGetTransactionReceipt(ctx context.Context, txHash ethtypes.EthHash) (*ethtypes.EthTxReceipt, error) //perm:read + EthGetBlockReceipts(ctx context.Context, blkParam ethtypes.EthBlockNumberOrHash) ([]*ethtypes.EthTxReceipt, error) //perm:read + EthGetBlockReceiptsLimited(ctx context.Context, blkParam ethtypes.EthBlockNumberOrHash, limit abi.ChainEpoch) ([]*ethtypes.EthTxReceipt, error) //perm:read + EthGetTransactionReceiptLimited(ctx context.Context, txHash ethtypes.EthHash, limit abi.ChainEpoch) (*ethtypes.EthTxReceipt, error) //perm:read + EthGetTransactionByBlockHashAndIndex(ctx context.Context, blkHash ethtypes.EthHash, txIndex ethtypes.EthUint64) (*ethtypes.EthTx, error) //perm:read + EthGetTransactionByBlockNumberAndIndex(ctx context.Context, blkNum string, txIndex ethtypes.EthUint64) (*ethtypes.EthTx, error) //perm:read EthGetCode(ctx context.Context, address ethtypes.EthAddress, blkParam ethtypes.EthBlockNumberOrHash) (ethtypes.EthBytes, error) //perm:read EthGetStorageAt(ctx context.Context, address ethtypes.EthAddress, position ethtypes.EthBytes, blkParam ethtypes.EthBlockNumberOrHash) (ethtypes.EthBytes, error) //perm:read @@ -1456,20 +1456,4 @@ type HotGCOpts struct { Moving bool } -type EthTxReceipt struct { - TransactionHash ethtypes.EthHash `json:"transactionHash"` - TransactionIndex ethtypes.EthUint64 `json:"transactionIndex"` - BlockHash ethtypes.EthHash `json:"blockHash"` - BlockNumber ethtypes.EthUint64 `json:"blockNumber"` - From ethtypes.EthAddress `json:"from"` - To *ethtypes.EthAddress `json:"to"` - StateRoot ethtypes.EthHash `json:"root"` - Status ethtypes.EthUint64 `json:"status"` - ContractAddress *ethtypes.EthAddress `json:"contractAddress"` - CumulativeGasUsed ethtypes.EthUint64 `json:"cumulativeGasUsed"` - GasUsed ethtypes.EthUint64 `json:"gasUsed"` - EffectiveGasPrice ethtypes.EthBigInt `json:"effectiveGasPrice"` - LogsBloom ethtypes.EthBytes `json:"logsBloom"` - Logs []ethtypes.EthLog `json:"logs"` - Type ethtypes.EthUint64 `json:"type"` -} +type EthTxReceipt = ethtypes.EthTxReceipt // Deprecated: use ethtypes.EthTxReceipt instead diff --git a/api/api_gateway.go b/api/api_gateway.go index 6e39bd10f01..c8faac36810 100644 --- a/api/api_gateway.go +++ b/api/api_gateway.go @@ -35,15 +35,11 @@ import ( // * Generate openrpc blobs type Gateway interface { - MpoolPending(context.Context, types.TipSetKey) ([]*types.SignedMessage, error) ChainGetBlock(context.Context, cid.Cid) (*types.BlockHeader, error) - MinerGetBaseInfo(context.Context, address.Address, abi.ChainEpoch, types.TipSetKey) (*MiningBaseInfo, error) - StateMinerSectorCount(context.Context, address.Address, types.TipSetKey) (MinerSectors, error) - GasEstimateGasPremium(context.Context, uint64, address.Address, int64, types.TipSetKey) (types.BigInt, error) - StateReplay(context.Context, types.TipSetKey, cid.Cid) (*InvocResult, error) ChainHasObj(context.Context, cid.Cid) (bool, error) ChainPutObj(context.Context, blocks.Block) error ChainHead(ctx context.Context) (*types.TipSet, error) + ChainGetEvents(context.Context, cid.Cid) ([]types.Event, error) ChainGetParentMessages(context.Context, cid.Cid) ([]Message, error) ChainGetParentReceipts(context.Context, cid.Cid) ([]*types.MessageReceipt, error) ChainGetMessagesInTipset(context.Context, types.TipSetKey) ([]Message, error) @@ -56,15 +52,22 @@ type Gateway interface { ChainNotify(context.Context) (<-chan []*HeadChange, error) ChainReadObj(context.Context, cid.Cid) ([]byte, error) ChainGetGenesis(context.Context) (*types.TipSet, error) + + GasEstimateGasPremium(context.Context, uint64, address.Address, int64, types.TipSetKey) (types.BigInt, error) GasEstimateMessageGas(ctx context.Context, msg *types.Message, spec *MessageSendSpec, tsk types.TipSetKey) (*types.Message, error) + MpoolGetNonce(ctx context.Context, addr address.Address) (uint64, error) + MpoolPending(context.Context, types.TipSetKey) ([]*types.SignedMessage, error) MpoolPush(ctx context.Context, sm *types.SignedMessage) (cid.Cid, error) + MsigGetAvailableBalance(ctx context.Context, addr address.Address, tsk types.TipSetKey) (types.BigInt, error) MsigGetPending(context.Context, address.Address, types.TipSetKey) ([]*MsigTransaction, error) MsigGetVested(ctx context.Context, addr address.Address, start types.TipSetKey, end types.TipSetKey) (types.BigInt, error) MsigGetVestingSchedule(ctx context.Context, addr address.Address, tsk types.TipSetKey) (MsigVesting, error) + StateAccountKey(ctx context.Context, addr address.Address, tsk types.TipSetKey) (address.Address, error) StateCall(ctx context.Context, msg *types.Message, tsk types.TipSetKey) (*InvocResult, error) + StateReplay(context.Context, types.TipSetKey, cid.Cid) (*InvocResult, error) StateDealProviderCollateralBounds(ctx context.Context, size abi.PaddedPieceSize, verified bool, tsk types.TipSetKey) (DealCollateralBounds, error) StateDecodeParams(ctx context.Context, toAddr address.Address, method abi.MethodNum, params []byte, tsk types.TipSetKey) (interface{}, error) StateGetActor(ctx context.Context, actor address.Address, ts types.TipSetKey) (*types.Actor, error) @@ -83,6 +86,7 @@ type Gateway interface { StateMinerDeadlines(context.Context, address.Address, types.TipSetKey) ([]Deadline, error) StateMinerProvingDeadline(ctx context.Context, addr address.Address, tsk types.TipSetKey) (*dline.Info, error) StateMinerPower(context.Context, address.Address, types.TipSetKey) (*MinerPower, error) + StateMinerSectorCount(context.Context, address.Address, types.TipSetKey) (MinerSectors, error) StateNetworkName(context.Context) (dtypes.NetworkName, error) StateNetworkVersion(context.Context, types.TipSetKey) (apitypes.NetworkVersion, error) StateSectorGetInfo(ctx context.Context, maddr address.Address, n abi.SectorNumber, tsk types.TipSetKey) (*miner.SectorOnChainInfo, error) @@ -90,27 +94,25 @@ type Gateway interface { StateVerifiedClientStatus(ctx context.Context, addr address.Address, tsk types.TipSetKey) (*abi.StoragePower, error) StateSearchMsg(ctx context.Context, from types.TipSetKey, msg cid.Cid, limit abi.ChainEpoch, allowReplaced bool) (*MsgLookup, error) StateWaitMsg(ctx context.Context, cid cid.Cid, confidence uint64, limit abi.ChainEpoch, allowReplaced bool) (*MsgLookup, error) + + MinerGetBaseInfo(context.Context, address.Address, abi.ChainEpoch, types.TipSetKey) (*MiningBaseInfo, error) + WalletBalance(context.Context, address.Address) (types.BigInt, error) - Version(context.Context) (APIVersion, error) - Discover(context.Context) (apitypes.OpenRPCDocument, error) EthAddressToFilecoinAddress(ctx context.Context, ethAddress ethtypes.EthAddress) (address.Address, error) FilecoinAddressToEthAddress(ctx context.Context, p jsonrpc.RawParams) (ethtypes.EthAddress, error) EthAccounts(ctx context.Context) ([]ethtypes.EthAddress, error) EthBlockNumber(ctx context.Context) (ethtypes.EthUint64, error) - EthGetBlockTransactionCountByNumber(ctx context.Context, blkNum ethtypes.EthUint64) (ethtypes.EthUint64, error) + EthGetBlockTransactionCountByNumber(ctx context.Context, blkNum string) (ethtypes.EthUint64, error) EthGetBlockTransactionCountByHash(ctx context.Context, blkHash ethtypes.EthHash) (ethtypes.EthUint64, error) EthGetBlockByHash(ctx context.Context, blkHash ethtypes.EthHash, fullTxInfo bool) (ethtypes.EthBlock, error) EthGetBlockByNumber(ctx context.Context, blkNum string, fullTxInfo bool) (ethtypes.EthBlock, error) EthGetTransactionByHash(ctx context.Context, txHash *ethtypes.EthHash) (*ethtypes.EthTx, error) - EthGetTransactionByHashLimited(ctx context.Context, txHash *ethtypes.EthHash, limit abi.ChainEpoch) (*ethtypes.EthTx, error) EthGetTransactionHashByCid(ctx context.Context, cid cid.Cid) (*ethtypes.EthHash, error) EthGetMessageCidByTransactionHash(ctx context.Context, txHash *ethtypes.EthHash) (*cid.Cid, error) EthGetTransactionCount(ctx context.Context, sender ethtypes.EthAddress, blkParam ethtypes.EthBlockNumberOrHash) (ethtypes.EthUint64, error) - EthGetTransactionReceipt(ctx context.Context, txHash ethtypes.EthHash) (*EthTxReceipt, error) - EthGetTransactionReceiptLimited(ctx context.Context, txHash ethtypes.EthHash, limit abi.ChainEpoch) (*EthTxReceipt, error) - EthGetBlockReceipts(ctx context.Context, blkParam ethtypes.EthBlockNumberOrHash) ([]*EthTxReceipt, error) - EthGetBlockReceiptsLimited(ctx context.Context, blkParam ethtypes.EthBlockNumberOrHash, limit abi.ChainEpoch) ([]*EthTxReceipt, error) + EthGetTransactionReceipt(ctx context.Context, txHash ethtypes.EthHash) (*ethtypes.EthTxReceipt, error) + EthGetBlockReceipts(ctx context.Context, blkParam ethtypes.EthBlockNumberOrHash) ([]*ethtypes.EthTxReceipt, error) EthGetCode(ctx context.Context, address ethtypes.EthAddress, blkParam ethtypes.EthBlockNumberOrHash) (ethtypes.EthBytes, error) EthGetStorageAt(ctx context.Context, address ethtypes.EthAddress, position ethtypes.EthBytes, blkParam ethtypes.EthBlockNumberOrHash) (ethtypes.EthBytes, error) EthGetBalance(ctx context.Context, address ethtypes.EthAddress, blkParam ethtypes.EthBlockNumberOrHash) (ethtypes.EthBigInt, error) @@ -143,8 +145,10 @@ type Gateway interface { EthGetTransactionByBlockHashAndIndex(ctx context.Context, blkHash ethtypes.EthHash, index ethtypes.EthUint64) (*ethtypes.EthTx, error) GetActorEventsRaw(ctx context.Context, filter *types.ActorEventFilter) ([]*types.ActorEvent, error) SubscribeActorEventsRaw(ctx context.Context, filter *types.ActorEventFilter) (<-chan *types.ActorEvent, error) - ChainGetEvents(context.Context, cid.Cid) ([]types.Event, error) F3GetCertificate(ctx context.Context, instance uint64) (*certs.FinalityCertificate, error) F3GetLatestCertificate(ctx context.Context) (*certs.FinalityCertificate, error) + + Version(context.Context) (APIVersion, error) + Discover(context.Context) (apitypes.OpenRPCDocument, error) } diff --git a/api/client/client.go b/api/client/client.go index 9722c41264d..43c0f37c70e 100644 --- a/api/client/client.go +++ b/api/client/client.go @@ -12,6 +12,7 @@ import ( "github.com/filecoin-project/lotus/api" "github.com/filecoin-project/lotus/api/v0api" "github.com/filecoin-project/lotus/api/v1api" + "github.com/filecoin-project/lotus/api/v2api" "github.com/filecoin-project/lotus/lib/rpcenc" ) @@ -24,7 +25,7 @@ func NewCommonRPCV0(ctx context.Context, addr string, requestHeader http.Header) return &res, closer, err } -// NewFullNodeRPCV0 creates a new http jsonrpc client. +// NewFullNodeRPCV0 creates a new http jsonrpc client for the /v0 API. func NewFullNodeRPCV0(ctx context.Context, addr string, requestHeader http.Header) (v0api.FullNode, jsonrpc.ClientCloser, error) { var res v0api.FullNodeStruct @@ -34,7 +35,7 @@ func NewFullNodeRPCV0(ctx context.Context, addr string, requestHeader http.Heade return &res, closer, err } -// NewFullNodeRPCV1 creates a new http jsonrpc client. +// NewFullNodeRPCV1 creates a new http jsonrpc client for the /v1 API. func NewFullNodeRPCV1(ctx context.Context, addr string, requestHeader http.Header, opts ...jsonrpc.Option) (api.FullNode, jsonrpc.ClientCloser, error) { var res v1api.FullNodeStruct closer, err := jsonrpc.NewMergeClient(ctx, addr, "Filecoin", @@ -43,6 +44,15 @@ func NewFullNodeRPCV1(ctx context.Context, addr string, requestHeader http.Heade return &res, closer, err } +// NewFullNodeRPCV2 creates a new http jsonrpc client for the /v2 API. +func NewFullNodeRPCV2(ctx context.Context, addr string, requestHeader http.Header, opts ...jsonrpc.Option) (v2api.FullNode, jsonrpc.ClientCloser, error) { + var res v2api.FullNodeStruct + closer, err := jsonrpc.NewMergeClient(ctx, addr, "Filecoin", + api.GetInternalStructs(&res), requestHeader, append([]jsonrpc.Option{jsonrpc.WithErrors(api.RPCErrors)}, opts...)...) + + return &res, closer, err +} + func getPushUrl(addr string) (string, error) { pushUrl, err := url.Parse(addr) if err != nil { diff --git a/api/mocks/mock_full.go b/api/mocks/mock_full.go index 725b3d08756..db41332a114 100644 --- a/api/mocks/mock_full.go +++ b/api/mocks/mock_full.go @@ -736,10 +736,10 @@ func (mr *MockFullNodeMockRecorder) EthGetBlockByNumber(arg0, arg1, arg2 interfa } // EthGetBlockReceipts mocks base method. -func (m *MockFullNode) EthGetBlockReceipts(arg0 context.Context, arg1 ethtypes.EthBlockNumberOrHash) ([]*api.EthTxReceipt, error) { +func (m *MockFullNode) EthGetBlockReceipts(arg0 context.Context, arg1 ethtypes.EthBlockNumberOrHash) ([]*ethtypes.EthTxReceipt, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "EthGetBlockReceipts", arg0, arg1) - ret0, _ := ret[0].([]*api.EthTxReceipt) + ret0, _ := ret[0].([]*ethtypes.EthTxReceipt) ret1, _ := ret[1].(error) return ret0, ret1 } @@ -751,10 +751,10 @@ func (mr *MockFullNodeMockRecorder) EthGetBlockReceipts(arg0, arg1 interface{}) } // EthGetBlockReceiptsLimited mocks base method. -func (m *MockFullNode) EthGetBlockReceiptsLimited(arg0 context.Context, arg1 ethtypes.EthBlockNumberOrHash, arg2 abi.ChainEpoch) ([]*api.EthTxReceipt, error) { +func (m *MockFullNode) EthGetBlockReceiptsLimited(arg0 context.Context, arg1 ethtypes.EthBlockNumberOrHash, arg2 abi.ChainEpoch) ([]*ethtypes.EthTxReceipt, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "EthGetBlockReceiptsLimited", arg0, arg1, arg2) - ret0, _ := ret[0].([]*api.EthTxReceipt) + ret0, _ := ret[0].([]*ethtypes.EthTxReceipt) ret1, _ := ret[1].(error) return ret0, ret1 } @@ -781,7 +781,7 @@ func (mr *MockFullNodeMockRecorder) EthGetBlockTransactionCountByHash(arg0, arg1 } // EthGetBlockTransactionCountByNumber mocks base method. -func (m *MockFullNode) EthGetBlockTransactionCountByNumber(arg0 context.Context, arg1 ethtypes.EthUint64) (ethtypes.EthUint64, error) { +func (m *MockFullNode) EthGetBlockTransactionCountByNumber(arg0 context.Context, arg1 string) (ethtypes.EthUint64, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "EthGetBlockTransactionCountByNumber", arg0, arg1) ret0, _ := ret[0].(ethtypes.EthUint64) @@ -976,10 +976,10 @@ func (mr *MockFullNodeMockRecorder) EthGetTransactionHashByCid(arg0, arg1 interf } // EthGetTransactionReceipt mocks base method. -func (m *MockFullNode) EthGetTransactionReceipt(arg0 context.Context, arg1 ethtypes.EthHash) (*api.EthTxReceipt, error) { +func (m *MockFullNode) EthGetTransactionReceipt(arg0 context.Context, arg1 ethtypes.EthHash) (*ethtypes.EthTxReceipt, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "EthGetTransactionReceipt", arg0, arg1) - ret0, _ := ret[0].(*api.EthTxReceipt) + ret0, _ := ret[0].(*ethtypes.EthTxReceipt) ret1, _ := ret[1].(error) return ret0, ret1 } @@ -991,10 +991,10 @@ func (mr *MockFullNodeMockRecorder) EthGetTransactionReceipt(arg0, arg1 interfac } // EthGetTransactionReceiptLimited mocks base method. -func (m *MockFullNode) EthGetTransactionReceiptLimited(arg0 context.Context, arg1 ethtypes.EthHash, arg2 abi.ChainEpoch) (*api.EthTxReceipt, error) { +func (m *MockFullNode) EthGetTransactionReceiptLimited(arg0 context.Context, arg1 ethtypes.EthHash, arg2 abi.ChainEpoch) (*ethtypes.EthTxReceipt, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "EthGetTransactionReceiptLimited", arg0, arg1, arg2) - ret0, _ := ret[0].(*api.EthTxReceipt) + ret0, _ := ret[0].(*ethtypes.EthTxReceipt) ret1, _ := ret[1].(error) return ret0, ret1 } diff --git a/api/proxy_gen.go b/api/proxy_gen.go index d4f82b4bc81..a6e6239741a 100644 --- a/api/proxy_gen.go +++ b/api/proxy_gen.go @@ -196,13 +196,13 @@ type FullNodeMethods struct { EthGetBlockByNumber func(p0 context.Context, p1 string, p2 bool) (ethtypes.EthBlock, error) `perm:"read"` - EthGetBlockReceipts func(p0 context.Context, p1 ethtypes.EthBlockNumberOrHash) ([]*EthTxReceipt, error) `perm:"read"` + EthGetBlockReceipts func(p0 context.Context, p1 ethtypes.EthBlockNumberOrHash) ([]*ethtypes.EthTxReceipt, error) `perm:"read"` - EthGetBlockReceiptsLimited func(p0 context.Context, p1 ethtypes.EthBlockNumberOrHash, p2 abi.ChainEpoch) ([]*EthTxReceipt, error) `perm:"read"` + EthGetBlockReceiptsLimited func(p0 context.Context, p1 ethtypes.EthBlockNumberOrHash, p2 abi.ChainEpoch) ([]*ethtypes.EthTxReceipt, error) `perm:"read"` EthGetBlockTransactionCountByHash func(p0 context.Context, p1 ethtypes.EthHash) (ethtypes.EthUint64, error) `perm:"read"` - EthGetBlockTransactionCountByNumber func(p0 context.Context, p1 ethtypes.EthUint64) (ethtypes.EthUint64, error) `perm:"read"` + EthGetBlockTransactionCountByNumber func(p0 context.Context, p1 string) (ethtypes.EthUint64, error) `perm:"read"` EthGetCode func(p0 context.Context, p1 ethtypes.EthAddress, p2 ethtypes.EthBlockNumberOrHash) (ethtypes.EthBytes, error) `perm:"read"` @@ -228,9 +228,9 @@ type FullNodeMethods struct { EthGetTransactionHashByCid func(p0 context.Context, p1 cid.Cid) (*ethtypes.EthHash, error) `perm:"read"` - EthGetTransactionReceipt func(p0 context.Context, p1 ethtypes.EthHash) (*EthTxReceipt, error) `perm:"read"` + EthGetTransactionReceipt func(p0 context.Context, p1 ethtypes.EthHash) (*ethtypes.EthTxReceipt, error) `perm:"read"` - EthGetTransactionReceiptLimited func(p0 context.Context, p1 ethtypes.EthHash, p2 abi.ChainEpoch) (*EthTxReceipt, error) `perm:"read"` + EthGetTransactionReceiptLimited func(p0 context.Context, p1 ethtypes.EthHash, p2 abi.ChainEpoch) (*ethtypes.EthTxReceipt, error) `perm:"read"` EthMaxPriorityFeePerGas func(p0 context.Context) (ethtypes.EthBigInt, error) `perm:"read"` @@ -666,13 +666,11 @@ type GatewayMethods struct { EthGetBlockByNumber func(p0 context.Context, p1 string, p2 bool) (ethtypes.EthBlock, error) `` - EthGetBlockReceipts func(p0 context.Context, p1 ethtypes.EthBlockNumberOrHash) ([]*EthTxReceipt, error) `` - - EthGetBlockReceiptsLimited func(p0 context.Context, p1 ethtypes.EthBlockNumberOrHash, p2 abi.ChainEpoch) ([]*EthTxReceipt, error) `` + EthGetBlockReceipts func(p0 context.Context, p1 ethtypes.EthBlockNumberOrHash) ([]*ethtypes.EthTxReceipt, error) `` EthGetBlockTransactionCountByHash func(p0 context.Context, p1 ethtypes.EthHash) (ethtypes.EthUint64, error) `` - EthGetBlockTransactionCountByNumber func(p0 context.Context, p1 ethtypes.EthUint64) (ethtypes.EthUint64, error) `` + EthGetBlockTransactionCountByNumber func(p0 context.Context, p1 string) (ethtypes.EthUint64, error) `` EthGetCode func(p0 context.Context, p1 ethtypes.EthAddress, p2 ethtypes.EthBlockNumberOrHash) (ethtypes.EthBytes, error) `` @@ -692,15 +690,11 @@ type GatewayMethods struct { EthGetTransactionByHash func(p0 context.Context, p1 *ethtypes.EthHash) (*ethtypes.EthTx, error) `` - EthGetTransactionByHashLimited func(p0 context.Context, p1 *ethtypes.EthHash, p2 abi.ChainEpoch) (*ethtypes.EthTx, error) `` - EthGetTransactionCount func(p0 context.Context, p1 ethtypes.EthAddress, p2 ethtypes.EthBlockNumberOrHash) (ethtypes.EthUint64, error) `` EthGetTransactionHashByCid func(p0 context.Context, p1 cid.Cid) (*ethtypes.EthHash, error) `` - EthGetTransactionReceipt func(p0 context.Context, p1 ethtypes.EthHash) (*EthTxReceipt, error) `` - - EthGetTransactionReceiptLimited func(p0 context.Context, p1 ethtypes.EthHash, p2 abi.ChainEpoch) (*EthTxReceipt, error) `` + EthGetTransactionReceipt func(p0 context.Context, p1 ethtypes.EthHash) (*ethtypes.EthTxReceipt, error) `` EthMaxPriorityFeePerGas func(p0 context.Context) (ethtypes.EthBigInt, error) `` @@ -1810,26 +1804,26 @@ func (s *FullNodeStub) EthGetBlockByNumber(p0 context.Context, p1 string, p2 boo return *new(ethtypes.EthBlock), ErrNotSupported } -func (s *FullNodeStruct) EthGetBlockReceipts(p0 context.Context, p1 ethtypes.EthBlockNumberOrHash) ([]*EthTxReceipt, error) { +func (s *FullNodeStruct) EthGetBlockReceipts(p0 context.Context, p1 ethtypes.EthBlockNumberOrHash) ([]*ethtypes.EthTxReceipt, error) { if s.Internal.EthGetBlockReceipts == nil { - return *new([]*EthTxReceipt), ErrNotSupported + return *new([]*ethtypes.EthTxReceipt), ErrNotSupported } return s.Internal.EthGetBlockReceipts(p0, p1) } -func (s *FullNodeStub) EthGetBlockReceipts(p0 context.Context, p1 ethtypes.EthBlockNumberOrHash) ([]*EthTxReceipt, error) { - return *new([]*EthTxReceipt), ErrNotSupported +func (s *FullNodeStub) EthGetBlockReceipts(p0 context.Context, p1 ethtypes.EthBlockNumberOrHash) ([]*ethtypes.EthTxReceipt, error) { + return *new([]*ethtypes.EthTxReceipt), ErrNotSupported } -func (s *FullNodeStruct) EthGetBlockReceiptsLimited(p0 context.Context, p1 ethtypes.EthBlockNumberOrHash, p2 abi.ChainEpoch) ([]*EthTxReceipt, error) { +func (s *FullNodeStruct) EthGetBlockReceiptsLimited(p0 context.Context, p1 ethtypes.EthBlockNumberOrHash, p2 abi.ChainEpoch) ([]*ethtypes.EthTxReceipt, error) { if s.Internal.EthGetBlockReceiptsLimited == nil { - return *new([]*EthTxReceipt), ErrNotSupported + return *new([]*ethtypes.EthTxReceipt), ErrNotSupported } return s.Internal.EthGetBlockReceiptsLimited(p0, p1, p2) } -func (s *FullNodeStub) EthGetBlockReceiptsLimited(p0 context.Context, p1 ethtypes.EthBlockNumberOrHash, p2 abi.ChainEpoch) ([]*EthTxReceipt, error) { - return *new([]*EthTxReceipt), ErrNotSupported +func (s *FullNodeStub) EthGetBlockReceiptsLimited(p0 context.Context, p1 ethtypes.EthBlockNumberOrHash, p2 abi.ChainEpoch) ([]*ethtypes.EthTxReceipt, error) { + return *new([]*ethtypes.EthTxReceipt), ErrNotSupported } func (s *FullNodeStruct) EthGetBlockTransactionCountByHash(p0 context.Context, p1 ethtypes.EthHash) (ethtypes.EthUint64, error) { @@ -1843,14 +1837,14 @@ func (s *FullNodeStub) EthGetBlockTransactionCountByHash(p0 context.Context, p1 return *new(ethtypes.EthUint64), ErrNotSupported } -func (s *FullNodeStruct) EthGetBlockTransactionCountByNumber(p0 context.Context, p1 ethtypes.EthUint64) (ethtypes.EthUint64, error) { +func (s *FullNodeStruct) EthGetBlockTransactionCountByNumber(p0 context.Context, p1 string) (ethtypes.EthUint64, error) { if s.Internal.EthGetBlockTransactionCountByNumber == nil { return *new(ethtypes.EthUint64), ErrNotSupported } return s.Internal.EthGetBlockTransactionCountByNumber(p0, p1) } -func (s *FullNodeStub) EthGetBlockTransactionCountByNumber(p0 context.Context, p1 ethtypes.EthUint64) (ethtypes.EthUint64, error) { +func (s *FullNodeStub) EthGetBlockTransactionCountByNumber(p0 context.Context, p1 string) (ethtypes.EthUint64, error) { return *new(ethtypes.EthUint64), ErrNotSupported } @@ -1986,25 +1980,25 @@ func (s *FullNodeStub) EthGetTransactionHashByCid(p0 context.Context, p1 cid.Cid return nil, ErrNotSupported } -func (s *FullNodeStruct) EthGetTransactionReceipt(p0 context.Context, p1 ethtypes.EthHash) (*EthTxReceipt, error) { +func (s *FullNodeStruct) EthGetTransactionReceipt(p0 context.Context, p1 ethtypes.EthHash) (*ethtypes.EthTxReceipt, error) { if s.Internal.EthGetTransactionReceipt == nil { return nil, ErrNotSupported } return s.Internal.EthGetTransactionReceipt(p0, p1) } -func (s *FullNodeStub) EthGetTransactionReceipt(p0 context.Context, p1 ethtypes.EthHash) (*EthTxReceipt, error) { +func (s *FullNodeStub) EthGetTransactionReceipt(p0 context.Context, p1 ethtypes.EthHash) (*ethtypes.EthTxReceipt, error) { return nil, ErrNotSupported } -func (s *FullNodeStruct) EthGetTransactionReceiptLimited(p0 context.Context, p1 ethtypes.EthHash, p2 abi.ChainEpoch) (*EthTxReceipt, error) { +func (s *FullNodeStruct) EthGetTransactionReceiptLimited(p0 context.Context, p1 ethtypes.EthHash, p2 abi.ChainEpoch) (*ethtypes.EthTxReceipt, error) { if s.Internal.EthGetTransactionReceiptLimited == nil { return nil, ErrNotSupported } return s.Internal.EthGetTransactionReceiptLimited(p0, p1, p2) } -func (s *FullNodeStub) EthGetTransactionReceiptLimited(p0 context.Context, p1 ethtypes.EthHash, p2 abi.ChainEpoch) (*EthTxReceipt, error) { +func (s *FullNodeStub) EthGetTransactionReceiptLimited(p0 context.Context, p1 ethtypes.EthHash, p2 abi.ChainEpoch) (*ethtypes.EthTxReceipt, error) { return nil, ErrNotSupported } @@ -4329,26 +4323,15 @@ func (s *GatewayStub) EthGetBlockByNumber(p0 context.Context, p1 string, p2 bool return *new(ethtypes.EthBlock), ErrNotSupported } -func (s *GatewayStruct) EthGetBlockReceipts(p0 context.Context, p1 ethtypes.EthBlockNumberOrHash) ([]*EthTxReceipt, error) { +func (s *GatewayStruct) EthGetBlockReceipts(p0 context.Context, p1 ethtypes.EthBlockNumberOrHash) ([]*ethtypes.EthTxReceipt, error) { if s.Internal.EthGetBlockReceipts == nil { - return *new([]*EthTxReceipt), ErrNotSupported + return *new([]*ethtypes.EthTxReceipt), ErrNotSupported } return s.Internal.EthGetBlockReceipts(p0, p1) } -func (s *GatewayStub) EthGetBlockReceipts(p0 context.Context, p1 ethtypes.EthBlockNumberOrHash) ([]*EthTxReceipt, error) { - return *new([]*EthTxReceipt), ErrNotSupported -} - -func (s *GatewayStruct) EthGetBlockReceiptsLimited(p0 context.Context, p1 ethtypes.EthBlockNumberOrHash, p2 abi.ChainEpoch) ([]*EthTxReceipt, error) { - if s.Internal.EthGetBlockReceiptsLimited == nil { - return *new([]*EthTxReceipt), ErrNotSupported - } - return s.Internal.EthGetBlockReceiptsLimited(p0, p1, p2) -} - -func (s *GatewayStub) EthGetBlockReceiptsLimited(p0 context.Context, p1 ethtypes.EthBlockNumberOrHash, p2 abi.ChainEpoch) ([]*EthTxReceipt, error) { - return *new([]*EthTxReceipt), ErrNotSupported +func (s *GatewayStub) EthGetBlockReceipts(p0 context.Context, p1 ethtypes.EthBlockNumberOrHash) ([]*ethtypes.EthTxReceipt, error) { + return *new([]*ethtypes.EthTxReceipt), ErrNotSupported } func (s *GatewayStruct) EthGetBlockTransactionCountByHash(p0 context.Context, p1 ethtypes.EthHash) (ethtypes.EthUint64, error) { @@ -4362,14 +4345,14 @@ func (s *GatewayStub) EthGetBlockTransactionCountByHash(p0 context.Context, p1 e return *new(ethtypes.EthUint64), ErrNotSupported } -func (s *GatewayStruct) EthGetBlockTransactionCountByNumber(p0 context.Context, p1 ethtypes.EthUint64) (ethtypes.EthUint64, error) { +func (s *GatewayStruct) EthGetBlockTransactionCountByNumber(p0 context.Context, p1 string) (ethtypes.EthUint64, error) { if s.Internal.EthGetBlockTransactionCountByNumber == nil { return *new(ethtypes.EthUint64), ErrNotSupported } return s.Internal.EthGetBlockTransactionCountByNumber(p0, p1) } -func (s *GatewayStub) EthGetBlockTransactionCountByNumber(p0 context.Context, p1 ethtypes.EthUint64) (ethtypes.EthUint64, error) { +func (s *GatewayStub) EthGetBlockTransactionCountByNumber(p0 context.Context, p1 string) (ethtypes.EthUint64, error) { return *new(ethtypes.EthUint64), ErrNotSupported } @@ -4472,17 +4455,6 @@ func (s *GatewayStub) EthGetTransactionByHash(p0 context.Context, p1 *ethtypes.E return nil, ErrNotSupported } -func (s *GatewayStruct) EthGetTransactionByHashLimited(p0 context.Context, p1 *ethtypes.EthHash, p2 abi.ChainEpoch) (*ethtypes.EthTx, error) { - if s.Internal.EthGetTransactionByHashLimited == nil { - return nil, ErrNotSupported - } - return s.Internal.EthGetTransactionByHashLimited(p0, p1, p2) -} - -func (s *GatewayStub) EthGetTransactionByHashLimited(p0 context.Context, p1 *ethtypes.EthHash, p2 abi.ChainEpoch) (*ethtypes.EthTx, error) { - return nil, ErrNotSupported -} - func (s *GatewayStruct) EthGetTransactionCount(p0 context.Context, p1 ethtypes.EthAddress, p2 ethtypes.EthBlockNumberOrHash) (ethtypes.EthUint64, error) { if s.Internal.EthGetTransactionCount == nil { return *new(ethtypes.EthUint64), ErrNotSupported @@ -4505,25 +4477,14 @@ func (s *GatewayStub) EthGetTransactionHashByCid(p0 context.Context, p1 cid.Cid) return nil, ErrNotSupported } -func (s *GatewayStruct) EthGetTransactionReceipt(p0 context.Context, p1 ethtypes.EthHash) (*EthTxReceipt, error) { +func (s *GatewayStruct) EthGetTransactionReceipt(p0 context.Context, p1 ethtypes.EthHash) (*ethtypes.EthTxReceipt, error) { if s.Internal.EthGetTransactionReceipt == nil { return nil, ErrNotSupported } return s.Internal.EthGetTransactionReceipt(p0, p1) } -func (s *GatewayStub) EthGetTransactionReceipt(p0 context.Context, p1 ethtypes.EthHash) (*EthTxReceipt, error) { - return nil, ErrNotSupported -} - -func (s *GatewayStruct) EthGetTransactionReceiptLimited(p0 context.Context, p1 ethtypes.EthHash, p2 abi.ChainEpoch) (*EthTxReceipt, error) { - if s.Internal.EthGetTransactionReceiptLimited == nil { - return nil, ErrNotSupported - } - return s.Internal.EthGetTransactionReceiptLimited(p0, p1, p2) -} - -func (s *GatewayStub) EthGetTransactionReceiptLimited(p0 context.Context, p1 ethtypes.EthHash, p2 abi.ChainEpoch) (*EthTxReceipt, error) { +func (s *GatewayStub) EthGetTransactionReceipt(p0 context.Context, p1 ethtypes.EthHash) (*ethtypes.EthTxReceipt, error) { return nil, ErrNotSupported } diff --git a/api/v2api/full.go b/api/v2api/full.go index a89d4943394..4d83c566c8b 100644 --- a/api/v2api/full.go +++ b/api/v2api/full.go @@ -3,9 +3,14 @@ package v2api import ( "context" + "github.com/ipfs/go-cid" + "github.com/filecoin-project/go-address" + "github.com/filecoin-project/go-jsonrpc" + "github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/lotus/chain/types" + "github.com/filecoin-project/lotus/chain/types/ethtypes" ) //go:generate go run github.com/golang/mock/mockgen -destination=v2mocks/mock_full.go -package=v2mocks . FullNode @@ -43,8 +48,7 @@ type FullNode interface { // In a case where no selector is provided, an error is returned. The selector // must be explicitly specified. // - // For more details, refer to the types.TipSetSelector and - // types.NewTipSetSelector. + // For more details, refer to the types.TipSetSelector. // // Example usage: // @@ -104,4 +108,309 @@ type FullNode interface { // // Experimental: This API is experimental and may change without notice. StateGetID(context.Context, address.Address, types.TipSetSelector) (*address.Address, error) //perm:read + + // MethodGroup: Eth + // These methods are used for Ethereum-compatible JSON-RPC calls + // + // ### Execution model reconciliation + // + // Ethereum relies on an immediate block-based execution model. The block that includes + // a transaction is also the block that executes it. Each block specifies the state root + // resulting from executing all transactions within it (output state). + // + // In Filecoin, at every epoch there is an unknown number of round winners all of whom are + // entitled to publish a block. Blocks are collected into a tipset. A tipset is committed + // only when the subsequent tipset is built on it (i.e. it becomes a parent). Block producers + // execute the parent tipset and specify the resulting state root in the block being produced. + // In other words, contrary to Ethereum, each block specifies the input state root. + // + // Ethereum clients expect transactions returned via eth_getBlock* to have a receipt + // (due to immediate execution). For this reason: + // + // - eth_blockNumber returns the latest executed epoch (head - 1) + // - The 'latest' block refers to the latest executed epoch (head - 1) + // - The 'pending' block refers to the current speculative tipset (head) + // - eth_getTransactionByHash returns the inclusion tipset of a message, but + // only after it has executed. + // - eth_getTransactionReceipt ditto. + // + // "Latest executed epoch" refers to the tipset that this node currently + // accepts as the best parent tipset, based on the blocks it is accumulating + // within the HEAD tipset. + + // EthFilecoinAPI methods + + // EthAddressToFilecoinAddress converts an Ethereum address to a Filecoin f410 address. + EthAddressToFilecoinAddress(ctx context.Context, ethAddress ethtypes.EthAddress) (address.Address, error) //perm:read + + // FilecoinAddressToEthAddress converts any Filecoin address to an EthAddress. + // + // This method supports all Filecoin address types: + // - "f0" and "f4" addresses: Converted directly. + // - "f1", "f2", and "f3" addresses: First converted to their corresponding "f0" ID address, then to an EthAddress. + // + // Requirements: + // - For "f1", "f2", and "f3" addresses, they must be instantiated on-chain, as "f0" 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. + // + // Note on chain reorganizations: + // "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 the `blkNum` parameter in the existing `EthGetBlockByNumber` API. + // See https://docs.alchemy.com/reference/eth-getblockbynumber for more details. + // + // Parameters: + // - ctx: The context for the API call. + // - 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. + // + // Returns: + // - The corresponding EthAddress. + // - An error if the conversion fails. + FilecoinAddressToEthAddress(ctx context.Context, p jsonrpc.RawParams) (ethtypes.EthAddress, error) //perm:read + + // EthBasicAPI methods + + // Web3ClientVersion returns the client version. + // Maps to JSON-RPC method: "web3_clientVersion". + Web3ClientVersion(ctx context.Context) (string, error) //perm:read + + // EthChainId retrieves the chain ID of the Ethereum-compatible network. + // Maps to JSON-RPC method: "eth_chainId". + EthChainId(ctx context.Context) (ethtypes.EthUint64, error) //perm:read + + // NetVersion retrieves the current network ID. + // Maps to JSON-RPC method: "net_version". + NetVersion(ctx context.Context) (string, error) //perm:read + + // NetListening checks if the node is actively listening for network connections. + // Maps to JSON-RPC method: "net_listening". + NetListening(ctx context.Context) (bool, error) //perm:read + + // EthProtocolVersion retrieves the Ethereum protocol version supported by the node. + // Maps to JSON-RPC method: "eth_protocolVersion". + EthProtocolVersion(ctx context.Context) (ethtypes.EthUint64, error) //perm:read + + // EthSyncing checks if the node is currently syncing and returns the sync status. + // Maps to JSON-RPC method: "eth_syncing". + EthSyncing(ctx context.Context) (ethtypes.EthSyncingResult, error) //perm:read + + // EthAccounts returns a list of Ethereum accounts managed by the node. + // Maps to JSON-RPC method: "eth_accounts". + // Lotus does not manage private keys, so this will always return an empty array. + EthAccounts(ctx context.Context) ([]ethtypes.EthAddress, error) //perm:read + + // EthSendAPI methods + + // EthSendRawTransaction submits a raw Ethereum transaction to the network. + // Maps to JSON-RPC method: "eth_sendRawTransaction". + EthSendRawTransaction(ctx context.Context, rawTx ethtypes.EthBytes) (ethtypes.EthHash, error) //perm:read + + // EthSendRawTransactionUntrusted submits a raw Ethereum transaction from an untrusted source. + EthSendRawTransactionUntrusted(ctx context.Context, rawTx ethtypes.EthBytes) (ethtypes.EthHash, error) //perm:read + + // EthTransactionAPI methods + + // EthBlockNumber returns the number of the latest executed block (head - 1). + // Maps to JSON-RPC method: "eth_blockNumber". + EthBlockNumber(ctx context.Context) (ethtypes.EthUint64, error) //perm:read + + // EthGetBlockTransactionCountByNumber returns the number of transactions in a block identified by + // its block number or a special tag like "latest" or "finalized". + // Maps to JSON-RPC method: "eth_getBlockTransactionCountByNumber". + EthGetBlockTransactionCountByNumber(ctx context.Context, blkNum string) (ethtypes.EthUint64, error) //perm:read + + // EthGetBlockTransactionCountByHash returns the number of transactions in a block identified by + // its block hash. + // Maps to JSON-RPC method: "eth_getBlockTransactionCountByHash". + EthGetBlockTransactionCountByHash(ctx context.Context, blkHash ethtypes.EthHash) (ethtypes.EthUint64, error) //perm:read + + // EthGetBlockByHash retrieves a block by its hash. If fullTxInfo is true, it includes full + // transaction objects; otherwise, it includes only transaction hashes. + // Maps to JSON-RPC method: "eth_getBlockByHash". + EthGetBlockByHash(ctx context.Context, blkHash ethtypes.EthHash, fullTxInfo bool) (ethtypes.EthBlock, error) //perm:read + + // EthGetBlockByNumber retrieves a block by its number or a special tag like "latest" or + // "finalized". If fullTxInfo is true, it includes full transaction objects; otherwise, it + // includes only transaction hashes. + // Maps to JSON-RPC method: "eth_getBlockByNumber". + EthGetBlockByNumber(ctx context.Context, blkNum string, fullTxInfo bool) (ethtypes.EthBlock, error) //perm:read + + // EthGetTransactionByHash retrieves a transaction by its hash. + // Maps to JSON-RPC method: "eth_getTransactionByHash". + EthGetTransactionByHash(ctx context.Context, txHash *ethtypes.EthHash) (*ethtypes.EthTx, error) //perm:read + + // EthGetTransactionByHashLimited retrieves a transaction by its hash, with an optional limit on + // the chain epoch for state resolution. + EthGetTransactionByHashLimited(ctx context.Context, txHash *ethtypes.EthHash, limit abi.ChainEpoch) (*ethtypes.EthTx, error) //perm:read + + // EthGetTransactionByBlockHashAndIndex retrieves a transaction by its block hash and index. + // Maps to JSON-RPC method: "eth_getTransactionByBlockHashAndIndex". + EthGetTransactionByBlockHashAndIndex(ctx context.Context, blkHash ethtypes.EthHash, txIndex ethtypes.EthUint64) (*ethtypes.EthTx, error) //perm:read + + // EthGetTransactionByBlockNumberAndIndex retrieves a transaction by its block number and index. + // Maps to JSON-RPC method: "eth_getTransactionByBlockNumberAndIndex". + EthGetTransactionByBlockNumberAndIndex(ctx context.Context, blkNum string, txIndex ethtypes.EthUint64) (*ethtypes.EthTx, error) //perm:read + + // EthGetMessageCidByTransactionHash retrieves the Filecoin CID corresponding to an Ethereum + // transaction hash. + // Maps to JSON-RPC method: "eth_getMessageCidByTransactionHash". + EthGetMessageCidByTransactionHash(ctx context.Context, txHash *ethtypes.EthHash) (*cid.Cid, error) //perm:read + + // EthGetTransactionHashByCid retrieves the Ethereum transaction hash corresponding to a Filecoin + // CID. + // Maps to JSON-RPC method: "eth_getTransactionHashByCid". + EthGetTransactionHashByCid(ctx context.Context, cid cid.Cid) (*ethtypes.EthHash, error) //perm:read + + // EthGetTransactionCount retrieves the number of transactions sent from an address at a specific + // block, identified by its number, hash, or a special tag like "latest" or "finalized". + // Maps to JSON-RPC method: "eth_getTransactionCount". + EthGetTransactionCount(ctx context.Context, sender ethtypes.EthAddress, blkParam ethtypes.EthBlockNumberOrHash) (ethtypes.EthUint64, error) //perm:read + + // EthGetTransactionReceipt retrieves the receipt of a transaction by its hash. + // Maps to JSON-RPC method: "eth_getTransactionReceipt". + EthGetTransactionReceipt(ctx context.Context, txHash ethtypes.EthHash) (*ethtypes.EthTxReceipt, error) //perm:read + + // EthGetTransactionReceiptLimited retrieves the receipt of a transaction by its hash, with an + // optional limit on the chain epoch for state resolution. + EthGetTransactionReceiptLimited(ctx context.Context, txHash ethtypes.EthHash, limit abi.ChainEpoch) (*ethtypes.EthTxReceipt, error) //perm:read + + // EthGetBlockReceipts retrieves all transaction receipts for a block identified by its number, + // hash or a special tag like "latest" or "finalized". + // Maps to JSON-RPC method: "eth_getBlockReceipts". + EthGetBlockReceipts(ctx context.Context, blkParam ethtypes.EthBlockNumberOrHash) ([]*ethtypes.EthTxReceipt, error) //perm:read + + // EthGetBlockReceiptsLimited retrieves all transaction receipts for a block identified by its + // number, hash or a special tag like "latest" or "finalized", along with an optional limit on the + // chain epoch for state resolution. + EthGetBlockReceiptsLimited(ctx context.Context, blkParam ethtypes.EthBlockNumberOrHash, limit abi.ChainEpoch) ([]*ethtypes.EthTxReceipt, error) //perm:read + + // EthLookupAPI methods + + // EthGetCode retrieves the contract code at a specific address and block state, identified by + // its number, hash, or a special tag like "latest" or "finalized". + // Maps to JSON-RPC method: "eth_getCode". + EthGetCode(ctx context.Context, address ethtypes.EthAddress, blkParam ethtypes.EthBlockNumberOrHash) (ethtypes.EthBytes, error) //perm:read + + // EthGetStorageAt retrieves the storage value at a specific position for a contract + // at a given block state, identified by its number, hash, or a special tag like "latest" or + // "finalized". + // Maps to JSON-RPC method: "eth_getStorageAt". + EthGetStorageAt(ctx context.Context, address ethtypes.EthAddress, position ethtypes.EthBytes, blkParam ethtypes.EthBlockNumberOrHash) (ethtypes.EthBytes, error) //perm:read + + // EthGetBalance retrieves the balance of an Ethereum address at a specific block state, + // identified by its number, hash, or a special tag like "latest" or "finalized". + // Maps to JSON-RPC method: "eth_getBalance". + EthGetBalance(ctx context.Context, address ethtypes.EthAddress, blkParam ethtypes.EthBlockNumberOrHash) (ethtypes.EthBigInt, error) //perm:read + + // EthTraceAPI methods + + // EthTraceBlock returns an OpenEthereum-compatible trace of the given block. + // Maps to JSON-RPC method: "trace_block". + // + // Translates Filecoin semantics into Ethereum semantics and traces both EVM and FVM calls. + // + // Features: + // + // - FVM actor create events, calls, etc. show up as if they were EVM smart contract events. + // - Native FVM call inputs are ABI-encoded (Solidity ABI) as if they were calls to a + // `handle_filecoin_method(uint64 method, uint64 codec, bytes params)` function + // (where `codec` is the IPLD codec of `params`). + // - Native FVM call outputs (return values) are ABI-encoded as `(uint32 exit_code, uint64 + // codec, bytes output)` where `codec` is the IPLD codec of `output`. + // + // Limitations (for now): + // + // 1. Block rewards are not included in the trace. + // 2. SELFDESTRUCT operations are not included in the trace. + // 3. EVM smart contract "create" events always specify `0xfe` as the "code" for newly created EVM + // smart contracts. + EthTraceBlock(ctx context.Context, blkNum string) ([]*ethtypes.EthTraceBlock, error) //perm:read + + // EthTraceReplayBlockTransactions replays all transactions in a block returning the requested + // traces for each transaction. + // Maps to JSON-RPC method: "trace_replayBlockTransactions". + // + // The block can be identified by its number, hash or a special tag like "latest" or "finalized". + // The `traceTypes` parameter allows filtering the traces based on their types. + EthTraceReplayBlockTransactions(ctx context.Context, blkNum string, traceTypes []string) ([]*ethtypes.EthTraceReplayBlockTransaction, error) //perm:read + + // EthTraceTransaction returns an OpenEthereum-compatible trace of a specific transaction. + // Maps to JSON-RPC method: "trace_transaction". + EthTraceTransaction(ctx context.Context, txHash string) ([]*ethtypes.EthTraceTransaction, error) //perm:read + + // EthTraceFilter returns traces matching the given filter criteria. + // Maps to JSON-RPC method: "trace_filter". + EthTraceFilter(ctx context.Context, filter ethtypes.EthTraceFilterCriteria) ([]*ethtypes.EthTraceFilterResult, error) //perm:read + + // EthGasAPI methods + + // EthGasPrice retrieves the current gas price in the network. + // Maps to JSON-RPC method: "eth_gasPrice". + EthGasPrice(ctx context.Context) (ethtypes.EthBigInt, error) //perm:read + + // EthFeeHistory retrieves historical gas fee data for a range of blocks. + // Maps to JSON-RPC method: "eth_feeHistory". + EthFeeHistory(ctx context.Context, p jsonrpc.RawParams) (ethtypes.EthFeeHistory, error) //perm:read + + // EthMaxPriorityFeePerGas retrieves the maximum priority fee per gas in the network. + // Maps to JSON-RPC method: "eth_maxPriorityFeePerGas". + EthMaxPriorityFeePerGas(ctx context.Context) (ethtypes.EthBigInt, error) //perm:read + + // EthEstimateGas estimates the gas required to execute a transaction. + // Maps to JSON-RPC method: "eth_estimateGas". + EthEstimateGas(ctx context.Context, p jsonrpc.RawParams) (ethtypes.EthUint64, error) //perm:read + + // EthCall executes a read-only call to a contract at a specific block state, identified by + // its number, hash, or a special tag like "latest" or "finalized". + // Maps to JSON-RPC method: "eth_call". + EthCall(ctx context.Context, tx ethtypes.EthCall, blkParam ethtypes.EthBlockNumberOrHash) (ethtypes.EthBytes, error) //perm:read + + // EthEventsAPI methods + + // EthGetLogs retrieves event logs matching given filter specification. + // Maps to JSON-RPC method: "eth_getLogs". + EthGetLogs(ctx context.Context, filter *ethtypes.EthFilterSpec) (*ethtypes.EthFilterResult, error) //perm:read + + // EthNewBlockFilter installs a persistent filter to notify when a new block arrives. + // Maps to JSON-RPC method: "eth_newBlockFilter". + EthNewBlockFilter(ctx context.Context) (ethtypes.EthFilterID, error) //perm:read + + // EthNewPendingTransactionFilter installs a persistent filter to notify when new messages arrive + // in the message pool. + // Maps to JSON-RPC method: "eth_newPendingTransactionFilter". + EthNewPendingTransactionFilter(ctx context.Context) (ethtypes.EthFilterID, error) //perm:read + + // EthNewFilter installs a persistent filter based on given filter specification. + // Maps to JSON-RPC method: "eth_newFilter". + EthNewFilter(ctx context.Context, filter *ethtypes.EthFilterSpec) (ethtypes.EthFilterID, error) //perm:read + + // EthUninstallFilter uninstalls a filter with given id. + // Maps to JSON-RPC method: "eth_uninstallFilter". + EthUninstallFilter(ctx context.Context, id ethtypes.EthFilterID) (bool, error) //perm:read + + // EthGetFilterChanges retrieves event logs that occurred since the last poll for a filter. + // Maps to JSON-RPC method: "eth_getFilterChanges". + EthGetFilterChanges(ctx context.Context, id ethtypes.EthFilterID) (*ethtypes.EthFilterResult, error) //perm:read + + // EthGetFilterLogs retrieves event logs matching filter with given id. + // Maps to JSON-RPC method: "eth_getFilterLogs". + EthGetFilterLogs(ctx context.Context, id ethtypes.EthFilterID) (*ethtypes.EthFilterResult, error) //perm:read + + // EthSubscribe subscribes to different event types using websockets. + // Maps to JSON-RPC method: "eth_subscribe". + // + // 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. + EthSubscribe(ctx context.Context, params jsonrpc.RawParams) (ethtypes.EthSubscriptionID, error) //perm:read + + // EthUnsubscribe unsubscribes from a websocket subscription. + // Maps to JSON-RPC method: "eth_unsubscribe". + EthUnsubscribe(ctx context.Context, id ethtypes.EthSubscriptionID) (bool, error) //perm:read } diff --git a/api/v2api/proxy_gen.go b/api/v2api/proxy_gen.go index eaba1273c3f..5f4dcfc6eb9 100644 --- a/api/v2api/proxy_gen.go +++ b/api/v2api/proxy_gen.go @@ -5,11 +5,15 @@ package v2api import ( "context" + "github.com/ipfs/go-cid" "golang.org/x/xerrors" "github.com/filecoin-project/go-address" + "github.com/filecoin-project/go-jsonrpc" + "github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/lotus/chain/types" + "github.com/filecoin-project/lotus/chain/types/ethtypes" ) var ErrNotSupported = xerrors.New("method not supported") @@ -21,9 +25,105 @@ type FullNodeStruct struct { type FullNodeMethods struct { ChainGetTipSet func(p0 context.Context, p1 types.TipSetSelector) (*types.TipSet, error) `perm:"read"` + EthAccounts func(p0 context.Context) ([]ethtypes.EthAddress, error) `perm:"read"` + + EthAddressToFilecoinAddress func(p0 context.Context, p1 ethtypes.EthAddress) (address.Address, error) `perm:"read"` + + EthBlockNumber func(p0 context.Context) (ethtypes.EthUint64, error) `perm:"read"` + + EthCall func(p0 context.Context, p1 ethtypes.EthCall, p2 ethtypes.EthBlockNumberOrHash) (ethtypes.EthBytes, error) `perm:"read"` + + EthChainId func(p0 context.Context) (ethtypes.EthUint64, error) `perm:"read"` + + EthEstimateGas func(p0 context.Context, p1 jsonrpc.RawParams) (ethtypes.EthUint64, error) `perm:"read"` + + EthFeeHistory func(p0 context.Context, p1 jsonrpc.RawParams) (ethtypes.EthFeeHistory, error) `perm:"read"` + + EthGasPrice func(p0 context.Context) (ethtypes.EthBigInt, error) `perm:"read"` + + EthGetBalance func(p0 context.Context, p1 ethtypes.EthAddress, p2 ethtypes.EthBlockNumberOrHash) (ethtypes.EthBigInt, error) `perm:"read"` + + EthGetBlockByHash func(p0 context.Context, p1 ethtypes.EthHash, p2 bool) (ethtypes.EthBlock, error) `perm:"read"` + + EthGetBlockByNumber func(p0 context.Context, p1 string, p2 bool) (ethtypes.EthBlock, error) `perm:"read"` + + EthGetBlockReceipts func(p0 context.Context, p1 ethtypes.EthBlockNumberOrHash) ([]*ethtypes.EthTxReceipt, error) `perm:"read"` + + EthGetBlockReceiptsLimited func(p0 context.Context, p1 ethtypes.EthBlockNumberOrHash, p2 abi.ChainEpoch) ([]*ethtypes.EthTxReceipt, error) `perm:"read"` + + EthGetBlockTransactionCountByHash func(p0 context.Context, p1 ethtypes.EthHash) (ethtypes.EthUint64, error) `perm:"read"` + + EthGetBlockTransactionCountByNumber func(p0 context.Context, p1 string) (ethtypes.EthUint64, error) `perm:"read"` + + EthGetCode func(p0 context.Context, p1 ethtypes.EthAddress, p2 ethtypes.EthBlockNumberOrHash) (ethtypes.EthBytes, error) `perm:"read"` + + EthGetFilterChanges func(p0 context.Context, p1 ethtypes.EthFilterID) (*ethtypes.EthFilterResult, error) `perm:"read"` + + EthGetFilterLogs func(p0 context.Context, p1 ethtypes.EthFilterID) (*ethtypes.EthFilterResult, error) `perm:"read"` + + EthGetLogs func(p0 context.Context, p1 *ethtypes.EthFilterSpec) (*ethtypes.EthFilterResult, error) `perm:"read"` + + EthGetMessageCidByTransactionHash func(p0 context.Context, p1 *ethtypes.EthHash) (*cid.Cid, error) `perm:"read"` + + EthGetStorageAt func(p0 context.Context, p1 ethtypes.EthAddress, p2 ethtypes.EthBytes, p3 ethtypes.EthBlockNumberOrHash) (ethtypes.EthBytes, error) `perm:"read"` + + EthGetTransactionByBlockHashAndIndex func(p0 context.Context, p1 ethtypes.EthHash, p2 ethtypes.EthUint64) (*ethtypes.EthTx, error) `perm:"read"` + + EthGetTransactionByBlockNumberAndIndex func(p0 context.Context, p1 string, p2 ethtypes.EthUint64) (*ethtypes.EthTx, error) `perm:"read"` + + EthGetTransactionByHash func(p0 context.Context, p1 *ethtypes.EthHash) (*ethtypes.EthTx, error) `perm:"read"` + + EthGetTransactionByHashLimited func(p0 context.Context, p1 *ethtypes.EthHash, p2 abi.ChainEpoch) (*ethtypes.EthTx, error) `perm:"read"` + + EthGetTransactionCount func(p0 context.Context, p1 ethtypes.EthAddress, p2 ethtypes.EthBlockNumberOrHash) (ethtypes.EthUint64, error) `perm:"read"` + + EthGetTransactionHashByCid func(p0 context.Context, p1 cid.Cid) (*ethtypes.EthHash, error) `perm:"read"` + + EthGetTransactionReceipt func(p0 context.Context, p1 ethtypes.EthHash) (*ethtypes.EthTxReceipt, error) `perm:"read"` + + EthGetTransactionReceiptLimited func(p0 context.Context, p1 ethtypes.EthHash, p2 abi.ChainEpoch) (*ethtypes.EthTxReceipt, error) `perm:"read"` + + EthMaxPriorityFeePerGas func(p0 context.Context) (ethtypes.EthBigInt, error) `perm:"read"` + + EthNewBlockFilter func(p0 context.Context) (ethtypes.EthFilterID, error) `perm:"read"` + + EthNewFilter func(p0 context.Context, p1 *ethtypes.EthFilterSpec) (ethtypes.EthFilterID, error) `perm:"read"` + + EthNewPendingTransactionFilter func(p0 context.Context) (ethtypes.EthFilterID, error) `perm:"read"` + + EthProtocolVersion func(p0 context.Context) (ethtypes.EthUint64, error) `perm:"read"` + + EthSendRawTransaction func(p0 context.Context, p1 ethtypes.EthBytes) (ethtypes.EthHash, error) `perm:"read"` + + EthSendRawTransactionUntrusted func(p0 context.Context, p1 ethtypes.EthBytes) (ethtypes.EthHash, error) `perm:"read"` + + EthSubscribe func(p0 context.Context, p1 jsonrpc.RawParams) (ethtypes.EthSubscriptionID, error) `perm:"read"` + + EthSyncing func(p0 context.Context) (ethtypes.EthSyncingResult, error) `perm:"read"` + + EthTraceBlock func(p0 context.Context, p1 string) ([]*ethtypes.EthTraceBlock, error) `perm:"read"` + + EthTraceFilter func(p0 context.Context, p1 ethtypes.EthTraceFilterCriteria) ([]*ethtypes.EthTraceFilterResult, error) `perm:"read"` + + EthTraceReplayBlockTransactions func(p0 context.Context, p1 string, p2 []string) ([]*ethtypes.EthTraceReplayBlockTransaction, error) `perm:"read"` + + EthTraceTransaction func(p0 context.Context, p1 string) ([]*ethtypes.EthTraceTransaction, error) `perm:"read"` + + EthUninstallFilter func(p0 context.Context, p1 ethtypes.EthFilterID) (bool, error) `perm:"read"` + + EthUnsubscribe func(p0 context.Context, p1 ethtypes.EthSubscriptionID) (bool, error) `perm:"read"` + + FilecoinAddressToEthAddress func(p0 context.Context, p1 jsonrpc.RawParams) (ethtypes.EthAddress, error) `perm:"read"` + + NetListening func(p0 context.Context) (bool, error) `perm:"read"` + + NetVersion func(p0 context.Context) (string, error) `perm:"read"` + StateGetActor func(p0 context.Context, p1 address.Address, p2 types.TipSetSelector) (*types.Actor, error) `perm:"read"` StateGetID func(p0 context.Context, p1 address.Address, p2 types.TipSetSelector) (*address.Address, error) `perm:"read"` + + Web3ClientVersion func(p0 context.Context) (string, error) `perm:"read"` } type FullNodeStub struct { @@ -40,6 +140,523 @@ func (s *FullNodeStub) ChainGetTipSet(p0 context.Context, p1 types.TipSetSelecto return nil, ErrNotSupported } +func (s *FullNodeStruct) EthAccounts(p0 context.Context) ([]ethtypes.EthAddress, error) { + if s.Internal.EthAccounts == nil { + return *new([]ethtypes.EthAddress), ErrNotSupported + } + return s.Internal.EthAccounts(p0) +} + +func (s *FullNodeStub) EthAccounts(p0 context.Context) ([]ethtypes.EthAddress, error) { + return *new([]ethtypes.EthAddress), ErrNotSupported +} + +func (s *FullNodeStruct) EthAddressToFilecoinAddress(p0 context.Context, p1 ethtypes.EthAddress) (address.Address, error) { + if s.Internal.EthAddressToFilecoinAddress == nil { + return *new(address.Address), ErrNotSupported + } + return s.Internal.EthAddressToFilecoinAddress(p0, p1) +} + +func (s *FullNodeStub) EthAddressToFilecoinAddress(p0 context.Context, p1 ethtypes.EthAddress) (address.Address, error) { + return *new(address.Address), ErrNotSupported +} + +func (s *FullNodeStruct) EthBlockNumber(p0 context.Context) (ethtypes.EthUint64, error) { + if s.Internal.EthBlockNumber == nil { + return *new(ethtypes.EthUint64), ErrNotSupported + } + return s.Internal.EthBlockNumber(p0) +} + +func (s *FullNodeStub) EthBlockNumber(p0 context.Context) (ethtypes.EthUint64, error) { + return *new(ethtypes.EthUint64), ErrNotSupported +} + +func (s *FullNodeStruct) EthCall(p0 context.Context, p1 ethtypes.EthCall, p2 ethtypes.EthBlockNumberOrHash) (ethtypes.EthBytes, error) { + if s.Internal.EthCall == nil { + return *new(ethtypes.EthBytes), ErrNotSupported + } + return s.Internal.EthCall(p0, p1, p2) +} + +func (s *FullNodeStub) EthCall(p0 context.Context, p1 ethtypes.EthCall, p2 ethtypes.EthBlockNumberOrHash) (ethtypes.EthBytes, error) { + return *new(ethtypes.EthBytes), ErrNotSupported +} + +func (s *FullNodeStruct) EthChainId(p0 context.Context) (ethtypes.EthUint64, error) { + if s.Internal.EthChainId == nil { + return *new(ethtypes.EthUint64), ErrNotSupported + } + return s.Internal.EthChainId(p0) +} + +func (s *FullNodeStub) EthChainId(p0 context.Context) (ethtypes.EthUint64, error) { + return *new(ethtypes.EthUint64), ErrNotSupported +} + +func (s *FullNodeStruct) EthEstimateGas(p0 context.Context, p1 jsonrpc.RawParams) (ethtypes.EthUint64, error) { + if s.Internal.EthEstimateGas == nil { + return *new(ethtypes.EthUint64), ErrNotSupported + } + return s.Internal.EthEstimateGas(p0, p1) +} + +func (s *FullNodeStub) EthEstimateGas(p0 context.Context, p1 jsonrpc.RawParams) (ethtypes.EthUint64, error) { + return *new(ethtypes.EthUint64), ErrNotSupported +} + +func (s *FullNodeStruct) EthFeeHistory(p0 context.Context, p1 jsonrpc.RawParams) (ethtypes.EthFeeHistory, error) { + if s.Internal.EthFeeHistory == nil { + return *new(ethtypes.EthFeeHistory), ErrNotSupported + } + return s.Internal.EthFeeHistory(p0, p1) +} + +func (s *FullNodeStub) EthFeeHistory(p0 context.Context, p1 jsonrpc.RawParams) (ethtypes.EthFeeHistory, error) { + return *new(ethtypes.EthFeeHistory), ErrNotSupported +} + +func (s *FullNodeStruct) EthGasPrice(p0 context.Context) (ethtypes.EthBigInt, error) { + if s.Internal.EthGasPrice == nil { + return *new(ethtypes.EthBigInt), ErrNotSupported + } + return s.Internal.EthGasPrice(p0) +} + +func (s *FullNodeStub) EthGasPrice(p0 context.Context) (ethtypes.EthBigInt, error) { + return *new(ethtypes.EthBigInt), ErrNotSupported +} + +func (s *FullNodeStruct) EthGetBalance(p0 context.Context, p1 ethtypes.EthAddress, p2 ethtypes.EthBlockNumberOrHash) (ethtypes.EthBigInt, error) { + if s.Internal.EthGetBalance == nil { + return *new(ethtypes.EthBigInt), ErrNotSupported + } + return s.Internal.EthGetBalance(p0, p1, p2) +} + +func (s *FullNodeStub) EthGetBalance(p0 context.Context, p1 ethtypes.EthAddress, p2 ethtypes.EthBlockNumberOrHash) (ethtypes.EthBigInt, error) { + return *new(ethtypes.EthBigInt), ErrNotSupported +} + +func (s *FullNodeStruct) EthGetBlockByHash(p0 context.Context, p1 ethtypes.EthHash, p2 bool) (ethtypes.EthBlock, error) { + if s.Internal.EthGetBlockByHash == nil { + return *new(ethtypes.EthBlock), ErrNotSupported + } + return s.Internal.EthGetBlockByHash(p0, p1, p2) +} + +func (s *FullNodeStub) EthGetBlockByHash(p0 context.Context, p1 ethtypes.EthHash, p2 bool) (ethtypes.EthBlock, error) { + return *new(ethtypes.EthBlock), ErrNotSupported +} + +func (s *FullNodeStruct) EthGetBlockByNumber(p0 context.Context, p1 string, p2 bool) (ethtypes.EthBlock, error) { + if s.Internal.EthGetBlockByNumber == nil { + return *new(ethtypes.EthBlock), ErrNotSupported + } + return s.Internal.EthGetBlockByNumber(p0, p1, p2) +} + +func (s *FullNodeStub) EthGetBlockByNumber(p0 context.Context, p1 string, p2 bool) (ethtypes.EthBlock, error) { + return *new(ethtypes.EthBlock), ErrNotSupported +} + +func (s *FullNodeStruct) EthGetBlockReceipts(p0 context.Context, p1 ethtypes.EthBlockNumberOrHash) ([]*ethtypes.EthTxReceipt, error) { + if s.Internal.EthGetBlockReceipts == nil { + return *new([]*ethtypes.EthTxReceipt), ErrNotSupported + } + return s.Internal.EthGetBlockReceipts(p0, p1) +} + +func (s *FullNodeStub) EthGetBlockReceipts(p0 context.Context, p1 ethtypes.EthBlockNumberOrHash) ([]*ethtypes.EthTxReceipt, error) { + return *new([]*ethtypes.EthTxReceipt), ErrNotSupported +} + +func (s *FullNodeStruct) EthGetBlockReceiptsLimited(p0 context.Context, p1 ethtypes.EthBlockNumberOrHash, p2 abi.ChainEpoch) ([]*ethtypes.EthTxReceipt, error) { + if s.Internal.EthGetBlockReceiptsLimited == nil { + return *new([]*ethtypes.EthTxReceipt), ErrNotSupported + } + return s.Internal.EthGetBlockReceiptsLimited(p0, p1, p2) +} + +func (s *FullNodeStub) EthGetBlockReceiptsLimited(p0 context.Context, p1 ethtypes.EthBlockNumberOrHash, p2 abi.ChainEpoch) ([]*ethtypes.EthTxReceipt, error) { + return *new([]*ethtypes.EthTxReceipt), ErrNotSupported +} + +func (s *FullNodeStruct) EthGetBlockTransactionCountByHash(p0 context.Context, p1 ethtypes.EthHash) (ethtypes.EthUint64, error) { + if s.Internal.EthGetBlockTransactionCountByHash == nil { + return *new(ethtypes.EthUint64), ErrNotSupported + } + return s.Internal.EthGetBlockTransactionCountByHash(p0, p1) +} + +func (s *FullNodeStub) EthGetBlockTransactionCountByHash(p0 context.Context, p1 ethtypes.EthHash) (ethtypes.EthUint64, error) { + return *new(ethtypes.EthUint64), ErrNotSupported +} + +func (s *FullNodeStruct) EthGetBlockTransactionCountByNumber(p0 context.Context, p1 string) (ethtypes.EthUint64, error) { + if s.Internal.EthGetBlockTransactionCountByNumber == nil { + return *new(ethtypes.EthUint64), ErrNotSupported + } + return s.Internal.EthGetBlockTransactionCountByNumber(p0, p1) +} + +func (s *FullNodeStub) EthGetBlockTransactionCountByNumber(p0 context.Context, p1 string) (ethtypes.EthUint64, error) { + return *new(ethtypes.EthUint64), ErrNotSupported +} + +func (s *FullNodeStruct) EthGetCode(p0 context.Context, p1 ethtypes.EthAddress, p2 ethtypes.EthBlockNumberOrHash) (ethtypes.EthBytes, error) { + if s.Internal.EthGetCode == nil { + return *new(ethtypes.EthBytes), ErrNotSupported + } + return s.Internal.EthGetCode(p0, p1, p2) +} + +func (s *FullNodeStub) EthGetCode(p0 context.Context, p1 ethtypes.EthAddress, p2 ethtypes.EthBlockNumberOrHash) (ethtypes.EthBytes, error) { + return *new(ethtypes.EthBytes), ErrNotSupported +} + +func (s *FullNodeStruct) EthGetFilterChanges(p0 context.Context, p1 ethtypes.EthFilterID) (*ethtypes.EthFilterResult, error) { + if s.Internal.EthGetFilterChanges == nil { + return nil, ErrNotSupported + } + return s.Internal.EthGetFilterChanges(p0, p1) +} + +func (s *FullNodeStub) EthGetFilterChanges(p0 context.Context, p1 ethtypes.EthFilterID) (*ethtypes.EthFilterResult, error) { + return nil, ErrNotSupported +} + +func (s *FullNodeStruct) EthGetFilterLogs(p0 context.Context, p1 ethtypes.EthFilterID) (*ethtypes.EthFilterResult, error) { + if s.Internal.EthGetFilterLogs == nil { + return nil, ErrNotSupported + } + return s.Internal.EthGetFilterLogs(p0, p1) +} + +func (s *FullNodeStub) EthGetFilterLogs(p0 context.Context, p1 ethtypes.EthFilterID) (*ethtypes.EthFilterResult, error) { + return nil, ErrNotSupported +} + +func (s *FullNodeStruct) EthGetLogs(p0 context.Context, p1 *ethtypes.EthFilterSpec) (*ethtypes.EthFilterResult, error) { + if s.Internal.EthGetLogs == nil { + return nil, ErrNotSupported + } + return s.Internal.EthGetLogs(p0, p1) +} + +func (s *FullNodeStub) EthGetLogs(p0 context.Context, p1 *ethtypes.EthFilterSpec) (*ethtypes.EthFilterResult, error) { + return nil, ErrNotSupported +} + +func (s *FullNodeStruct) EthGetMessageCidByTransactionHash(p0 context.Context, p1 *ethtypes.EthHash) (*cid.Cid, error) { + if s.Internal.EthGetMessageCidByTransactionHash == nil { + return nil, ErrNotSupported + } + return s.Internal.EthGetMessageCidByTransactionHash(p0, p1) +} + +func (s *FullNodeStub) EthGetMessageCidByTransactionHash(p0 context.Context, p1 *ethtypes.EthHash) (*cid.Cid, error) { + return nil, ErrNotSupported +} + +func (s *FullNodeStruct) EthGetStorageAt(p0 context.Context, p1 ethtypes.EthAddress, p2 ethtypes.EthBytes, p3 ethtypes.EthBlockNumberOrHash) (ethtypes.EthBytes, error) { + if s.Internal.EthGetStorageAt == nil { + return *new(ethtypes.EthBytes), ErrNotSupported + } + return s.Internal.EthGetStorageAt(p0, p1, p2, p3) +} + +func (s *FullNodeStub) EthGetStorageAt(p0 context.Context, p1 ethtypes.EthAddress, p2 ethtypes.EthBytes, p3 ethtypes.EthBlockNumberOrHash) (ethtypes.EthBytes, error) { + return *new(ethtypes.EthBytes), ErrNotSupported +} + +func (s *FullNodeStruct) EthGetTransactionByBlockHashAndIndex(p0 context.Context, p1 ethtypes.EthHash, p2 ethtypes.EthUint64) (*ethtypes.EthTx, error) { + if s.Internal.EthGetTransactionByBlockHashAndIndex == nil { + return nil, ErrNotSupported + } + return s.Internal.EthGetTransactionByBlockHashAndIndex(p0, p1, p2) +} + +func (s *FullNodeStub) EthGetTransactionByBlockHashAndIndex(p0 context.Context, p1 ethtypes.EthHash, p2 ethtypes.EthUint64) (*ethtypes.EthTx, error) { + return nil, ErrNotSupported +} + +func (s *FullNodeStruct) EthGetTransactionByBlockNumberAndIndex(p0 context.Context, p1 string, p2 ethtypes.EthUint64) (*ethtypes.EthTx, error) { + if s.Internal.EthGetTransactionByBlockNumberAndIndex == nil { + return nil, ErrNotSupported + } + return s.Internal.EthGetTransactionByBlockNumberAndIndex(p0, p1, p2) +} + +func (s *FullNodeStub) EthGetTransactionByBlockNumberAndIndex(p0 context.Context, p1 string, p2 ethtypes.EthUint64) (*ethtypes.EthTx, error) { + return nil, ErrNotSupported +} + +func (s *FullNodeStruct) EthGetTransactionByHash(p0 context.Context, p1 *ethtypes.EthHash) (*ethtypes.EthTx, error) { + if s.Internal.EthGetTransactionByHash == nil { + return nil, ErrNotSupported + } + return s.Internal.EthGetTransactionByHash(p0, p1) +} + +func (s *FullNodeStub) EthGetTransactionByHash(p0 context.Context, p1 *ethtypes.EthHash) (*ethtypes.EthTx, error) { + return nil, ErrNotSupported +} + +func (s *FullNodeStruct) EthGetTransactionByHashLimited(p0 context.Context, p1 *ethtypes.EthHash, p2 abi.ChainEpoch) (*ethtypes.EthTx, error) { + if s.Internal.EthGetTransactionByHashLimited == nil { + return nil, ErrNotSupported + } + return s.Internal.EthGetTransactionByHashLimited(p0, p1, p2) +} + +func (s *FullNodeStub) EthGetTransactionByHashLimited(p0 context.Context, p1 *ethtypes.EthHash, p2 abi.ChainEpoch) (*ethtypes.EthTx, error) { + return nil, ErrNotSupported +} + +func (s *FullNodeStruct) EthGetTransactionCount(p0 context.Context, p1 ethtypes.EthAddress, p2 ethtypes.EthBlockNumberOrHash) (ethtypes.EthUint64, error) { + if s.Internal.EthGetTransactionCount == nil { + return *new(ethtypes.EthUint64), ErrNotSupported + } + return s.Internal.EthGetTransactionCount(p0, p1, p2) +} + +func (s *FullNodeStub) EthGetTransactionCount(p0 context.Context, p1 ethtypes.EthAddress, p2 ethtypes.EthBlockNumberOrHash) (ethtypes.EthUint64, error) { + return *new(ethtypes.EthUint64), ErrNotSupported +} + +func (s *FullNodeStruct) EthGetTransactionHashByCid(p0 context.Context, p1 cid.Cid) (*ethtypes.EthHash, error) { + if s.Internal.EthGetTransactionHashByCid == nil { + return nil, ErrNotSupported + } + return s.Internal.EthGetTransactionHashByCid(p0, p1) +} + +func (s *FullNodeStub) EthGetTransactionHashByCid(p0 context.Context, p1 cid.Cid) (*ethtypes.EthHash, error) { + return nil, ErrNotSupported +} + +func (s *FullNodeStruct) EthGetTransactionReceipt(p0 context.Context, p1 ethtypes.EthHash) (*ethtypes.EthTxReceipt, error) { + if s.Internal.EthGetTransactionReceipt == nil { + return nil, ErrNotSupported + } + return s.Internal.EthGetTransactionReceipt(p0, p1) +} + +func (s *FullNodeStub) EthGetTransactionReceipt(p0 context.Context, p1 ethtypes.EthHash) (*ethtypes.EthTxReceipt, error) { + return nil, ErrNotSupported +} + +func (s *FullNodeStruct) EthGetTransactionReceiptLimited(p0 context.Context, p1 ethtypes.EthHash, p2 abi.ChainEpoch) (*ethtypes.EthTxReceipt, error) { + if s.Internal.EthGetTransactionReceiptLimited == nil { + return nil, ErrNotSupported + } + return s.Internal.EthGetTransactionReceiptLimited(p0, p1, p2) +} + +func (s *FullNodeStub) EthGetTransactionReceiptLimited(p0 context.Context, p1 ethtypes.EthHash, p2 abi.ChainEpoch) (*ethtypes.EthTxReceipt, error) { + return nil, ErrNotSupported +} + +func (s *FullNodeStruct) EthMaxPriorityFeePerGas(p0 context.Context) (ethtypes.EthBigInt, error) { + if s.Internal.EthMaxPriorityFeePerGas == nil { + return *new(ethtypes.EthBigInt), ErrNotSupported + } + return s.Internal.EthMaxPriorityFeePerGas(p0) +} + +func (s *FullNodeStub) EthMaxPriorityFeePerGas(p0 context.Context) (ethtypes.EthBigInt, error) { + return *new(ethtypes.EthBigInt), ErrNotSupported +} + +func (s *FullNodeStruct) EthNewBlockFilter(p0 context.Context) (ethtypes.EthFilterID, error) { + if s.Internal.EthNewBlockFilter == nil { + return *new(ethtypes.EthFilterID), ErrNotSupported + } + return s.Internal.EthNewBlockFilter(p0) +} + +func (s *FullNodeStub) EthNewBlockFilter(p0 context.Context) (ethtypes.EthFilterID, error) { + return *new(ethtypes.EthFilterID), ErrNotSupported +} + +func (s *FullNodeStruct) EthNewFilter(p0 context.Context, p1 *ethtypes.EthFilterSpec) (ethtypes.EthFilterID, error) { + if s.Internal.EthNewFilter == nil { + return *new(ethtypes.EthFilterID), ErrNotSupported + } + return s.Internal.EthNewFilter(p0, p1) +} + +func (s *FullNodeStub) EthNewFilter(p0 context.Context, p1 *ethtypes.EthFilterSpec) (ethtypes.EthFilterID, error) { + return *new(ethtypes.EthFilterID), ErrNotSupported +} + +func (s *FullNodeStruct) EthNewPendingTransactionFilter(p0 context.Context) (ethtypes.EthFilterID, error) { + if s.Internal.EthNewPendingTransactionFilter == nil { + return *new(ethtypes.EthFilterID), ErrNotSupported + } + return s.Internal.EthNewPendingTransactionFilter(p0) +} + +func (s *FullNodeStub) EthNewPendingTransactionFilter(p0 context.Context) (ethtypes.EthFilterID, error) { + return *new(ethtypes.EthFilterID), ErrNotSupported +} + +func (s *FullNodeStruct) EthProtocolVersion(p0 context.Context) (ethtypes.EthUint64, error) { + if s.Internal.EthProtocolVersion == nil { + return *new(ethtypes.EthUint64), ErrNotSupported + } + return s.Internal.EthProtocolVersion(p0) +} + +func (s *FullNodeStub) EthProtocolVersion(p0 context.Context) (ethtypes.EthUint64, error) { + return *new(ethtypes.EthUint64), ErrNotSupported +} + +func (s *FullNodeStruct) EthSendRawTransaction(p0 context.Context, p1 ethtypes.EthBytes) (ethtypes.EthHash, error) { + if s.Internal.EthSendRawTransaction == nil { + return *new(ethtypes.EthHash), ErrNotSupported + } + return s.Internal.EthSendRawTransaction(p0, p1) +} + +func (s *FullNodeStub) EthSendRawTransaction(p0 context.Context, p1 ethtypes.EthBytes) (ethtypes.EthHash, error) { + return *new(ethtypes.EthHash), ErrNotSupported +} + +func (s *FullNodeStruct) EthSendRawTransactionUntrusted(p0 context.Context, p1 ethtypes.EthBytes) (ethtypes.EthHash, error) { + if s.Internal.EthSendRawTransactionUntrusted == nil { + return *new(ethtypes.EthHash), ErrNotSupported + } + return s.Internal.EthSendRawTransactionUntrusted(p0, p1) +} + +func (s *FullNodeStub) EthSendRawTransactionUntrusted(p0 context.Context, p1 ethtypes.EthBytes) (ethtypes.EthHash, error) { + return *new(ethtypes.EthHash), ErrNotSupported +} + +func (s *FullNodeStruct) EthSubscribe(p0 context.Context, p1 jsonrpc.RawParams) (ethtypes.EthSubscriptionID, error) { + if s.Internal.EthSubscribe == nil { + return *new(ethtypes.EthSubscriptionID), ErrNotSupported + } + return s.Internal.EthSubscribe(p0, p1) +} + +func (s *FullNodeStub) EthSubscribe(p0 context.Context, p1 jsonrpc.RawParams) (ethtypes.EthSubscriptionID, error) { + return *new(ethtypes.EthSubscriptionID), ErrNotSupported +} + +func (s *FullNodeStruct) EthSyncing(p0 context.Context) (ethtypes.EthSyncingResult, error) { + if s.Internal.EthSyncing == nil { + return *new(ethtypes.EthSyncingResult), ErrNotSupported + } + return s.Internal.EthSyncing(p0) +} + +func (s *FullNodeStub) EthSyncing(p0 context.Context) (ethtypes.EthSyncingResult, error) { + return *new(ethtypes.EthSyncingResult), ErrNotSupported +} + +func (s *FullNodeStruct) EthTraceBlock(p0 context.Context, p1 string) ([]*ethtypes.EthTraceBlock, error) { + if s.Internal.EthTraceBlock == nil { + return *new([]*ethtypes.EthTraceBlock), ErrNotSupported + } + return s.Internal.EthTraceBlock(p0, p1) +} + +func (s *FullNodeStub) EthTraceBlock(p0 context.Context, p1 string) ([]*ethtypes.EthTraceBlock, error) { + return *new([]*ethtypes.EthTraceBlock), ErrNotSupported +} + +func (s *FullNodeStruct) EthTraceFilter(p0 context.Context, p1 ethtypes.EthTraceFilterCriteria) ([]*ethtypes.EthTraceFilterResult, error) { + if s.Internal.EthTraceFilter == nil { + return *new([]*ethtypes.EthTraceFilterResult), ErrNotSupported + } + return s.Internal.EthTraceFilter(p0, p1) +} + +func (s *FullNodeStub) EthTraceFilter(p0 context.Context, p1 ethtypes.EthTraceFilterCriteria) ([]*ethtypes.EthTraceFilterResult, error) { + return *new([]*ethtypes.EthTraceFilterResult), ErrNotSupported +} + +func (s *FullNodeStruct) EthTraceReplayBlockTransactions(p0 context.Context, p1 string, p2 []string) ([]*ethtypes.EthTraceReplayBlockTransaction, error) { + if s.Internal.EthTraceReplayBlockTransactions == nil { + return *new([]*ethtypes.EthTraceReplayBlockTransaction), ErrNotSupported + } + return s.Internal.EthTraceReplayBlockTransactions(p0, p1, p2) +} + +func (s *FullNodeStub) EthTraceReplayBlockTransactions(p0 context.Context, p1 string, p2 []string) ([]*ethtypes.EthTraceReplayBlockTransaction, error) { + return *new([]*ethtypes.EthTraceReplayBlockTransaction), ErrNotSupported +} + +func (s *FullNodeStruct) EthTraceTransaction(p0 context.Context, p1 string) ([]*ethtypes.EthTraceTransaction, error) { + if s.Internal.EthTraceTransaction == nil { + return *new([]*ethtypes.EthTraceTransaction), ErrNotSupported + } + return s.Internal.EthTraceTransaction(p0, p1) +} + +func (s *FullNodeStub) EthTraceTransaction(p0 context.Context, p1 string) ([]*ethtypes.EthTraceTransaction, error) { + return *new([]*ethtypes.EthTraceTransaction), ErrNotSupported +} + +func (s *FullNodeStruct) EthUninstallFilter(p0 context.Context, p1 ethtypes.EthFilterID) (bool, error) { + if s.Internal.EthUninstallFilter == nil { + return false, ErrNotSupported + } + return s.Internal.EthUninstallFilter(p0, p1) +} + +func (s *FullNodeStub) EthUninstallFilter(p0 context.Context, p1 ethtypes.EthFilterID) (bool, error) { + return false, ErrNotSupported +} + +func (s *FullNodeStruct) EthUnsubscribe(p0 context.Context, p1 ethtypes.EthSubscriptionID) (bool, error) { + if s.Internal.EthUnsubscribe == nil { + return false, ErrNotSupported + } + return s.Internal.EthUnsubscribe(p0, p1) +} + +func (s *FullNodeStub) EthUnsubscribe(p0 context.Context, p1 ethtypes.EthSubscriptionID) (bool, error) { + return false, ErrNotSupported +} + +func (s *FullNodeStruct) FilecoinAddressToEthAddress(p0 context.Context, p1 jsonrpc.RawParams) (ethtypes.EthAddress, error) { + if s.Internal.FilecoinAddressToEthAddress == nil { + return *new(ethtypes.EthAddress), ErrNotSupported + } + return s.Internal.FilecoinAddressToEthAddress(p0, p1) +} + +func (s *FullNodeStub) FilecoinAddressToEthAddress(p0 context.Context, p1 jsonrpc.RawParams) (ethtypes.EthAddress, error) { + return *new(ethtypes.EthAddress), ErrNotSupported +} + +func (s *FullNodeStruct) NetListening(p0 context.Context) (bool, error) { + if s.Internal.NetListening == nil { + return false, ErrNotSupported + } + return s.Internal.NetListening(p0) +} + +func (s *FullNodeStub) NetListening(p0 context.Context) (bool, error) { + return false, ErrNotSupported +} + +func (s *FullNodeStruct) NetVersion(p0 context.Context) (string, error) { + if s.Internal.NetVersion == nil { + return "", ErrNotSupported + } + return s.Internal.NetVersion(p0) +} + +func (s *FullNodeStub) NetVersion(p0 context.Context) (string, error) { + return "", ErrNotSupported +} + func (s *FullNodeStruct) StateGetActor(p0 context.Context, p1 address.Address, p2 types.TipSetSelector) (*types.Actor, error) { if s.Internal.StateGetActor == nil { return nil, ErrNotSupported @@ -62,4 +679,15 @@ func (s *FullNodeStub) StateGetID(p0 context.Context, p1 address.Address, p2 typ return nil, ErrNotSupported } +func (s *FullNodeStruct) Web3ClientVersion(p0 context.Context) (string, error) { + if s.Internal.Web3ClientVersion == nil { + return "", ErrNotSupported + } + return s.Internal.Web3ClientVersion(p0) +} + +func (s *FullNodeStub) Web3ClientVersion(p0 context.Context) (string, error) { + return "", ErrNotSupported +} + var _ FullNode = new(FullNodeStruct) diff --git a/api/v2api/v2mocks/mock_full.go b/api/v2api/v2mocks/mock_full.go index fd790e29139..7b25dbd1731 100644 --- a/api/v2api/v2mocks/mock_full.go +++ b/api/v2api/v2mocks/mock_full.go @@ -9,10 +9,14 @@ import ( reflect "reflect" gomock "github.com/golang/mock/gomock" + cid "github.com/ipfs/go-cid" address "github.com/filecoin-project/go-address" + jsonrpc "github.com/filecoin-project/go-jsonrpc" + abi "github.com/filecoin-project/go-state-types/abi" types "github.com/filecoin-project/lotus/chain/types" + ethtypes "github.com/filecoin-project/lotus/chain/types/ethtypes" ) // MockFullNode is a mock of FullNode interface. @@ -53,6 +57,711 @@ func (mr *MockFullNodeMockRecorder) ChainGetTipSet(arg0, arg1 interface{}) *gomo return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChainGetTipSet", reflect.TypeOf((*MockFullNode)(nil).ChainGetTipSet), arg0, arg1) } +// EthAccounts mocks base method. +func (m *MockFullNode) EthAccounts(arg0 context.Context) ([]ethtypes.EthAddress, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "EthAccounts", arg0) + ret0, _ := ret[0].([]ethtypes.EthAddress) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// EthAccounts indicates an expected call of EthAccounts. +func (mr *MockFullNodeMockRecorder) EthAccounts(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EthAccounts", reflect.TypeOf((*MockFullNode)(nil).EthAccounts), arg0) +} + +// EthAddressToFilecoinAddress mocks base method. +func (m *MockFullNode) EthAddressToFilecoinAddress(arg0 context.Context, arg1 ethtypes.EthAddress) (address.Address, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "EthAddressToFilecoinAddress", arg0, arg1) + ret0, _ := ret[0].(address.Address) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// EthAddressToFilecoinAddress indicates an expected call of EthAddressToFilecoinAddress. +func (mr *MockFullNodeMockRecorder) EthAddressToFilecoinAddress(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EthAddressToFilecoinAddress", reflect.TypeOf((*MockFullNode)(nil).EthAddressToFilecoinAddress), arg0, arg1) +} + +// EthBlockNumber mocks base method. +func (m *MockFullNode) EthBlockNumber(arg0 context.Context) (ethtypes.EthUint64, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "EthBlockNumber", arg0) + ret0, _ := ret[0].(ethtypes.EthUint64) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// EthBlockNumber indicates an expected call of EthBlockNumber. +func (mr *MockFullNodeMockRecorder) EthBlockNumber(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EthBlockNumber", reflect.TypeOf((*MockFullNode)(nil).EthBlockNumber), arg0) +} + +// EthCall mocks base method. +func (m *MockFullNode) EthCall(arg0 context.Context, arg1 ethtypes.EthCall, arg2 ethtypes.EthBlockNumberOrHash) (ethtypes.EthBytes, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "EthCall", arg0, arg1, arg2) + ret0, _ := ret[0].(ethtypes.EthBytes) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// EthCall indicates an expected call of EthCall. +func (mr *MockFullNodeMockRecorder) EthCall(arg0, arg1, arg2 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EthCall", reflect.TypeOf((*MockFullNode)(nil).EthCall), arg0, arg1, arg2) +} + +// EthChainId mocks base method. +func (m *MockFullNode) EthChainId(arg0 context.Context) (ethtypes.EthUint64, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "EthChainId", arg0) + ret0, _ := ret[0].(ethtypes.EthUint64) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// EthChainId indicates an expected call of EthChainId. +func (mr *MockFullNodeMockRecorder) EthChainId(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EthChainId", reflect.TypeOf((*MockFullNode)(nil).EthChainId), arg0) +} + +// EthEstimateGas mocks base method. +func (m *MockFullNode) EthEstimateGas(arg0 context.Context, arg1 jsonrpc.RawParams) (ethtypes.EthUint64, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "EthEstimateGas", arg0, arg1) + ret0, _ := ret[0].(ethtypes.EthUint64) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// EthEstimateGas indicates an expected call of EthEstimateGas. +func (mr *MockFullNodeMockRecorder) EthEstimateGas(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EthEstimateGas", reflect.TypeOf((*MockFullNode)(nil).EthEstimateGas), arg0, arg1) +} + +// EthFeeHistory mocks base method. +func (m *MockFullNode) EthFeeHistory(arg0 context.Context, arg1 jsonrpc.RawParams) (ethtypes.EthFeeHistory, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "EthFeeHistory", arg0, arg1) + ret0, _ := ret[0].(ethtypes.EthFeeHistory) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// EthFeeHistory indicates an expected call of EthFeeHistory. +func (mr *MockFullNodeMockRecorder) EthFeeHistory(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EthFeeHistory", reflect.TypeOf((*MockFullNode)(nil).EthFeeHistory), arg0, arg1) +} + +// EthGasPrice mocks base method. +func (m *MockFullNode) EthGasPrice(arg0 context.Context) (ethtypes.EthBigInt, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "EthGasPrice", arg0) + ret0, _ := ret[0].(ethtypes.EthBigInt) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// EthGasPrice indicates an expected call of EthGasPrice. +func (mr *MockFullNodeMockRecorder) EthGasPrice(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EthGasPrice", reflect.TypeOf((*MockFullNode)(nil).EthGasPrice), arg0) +} + +// EthGetBalance mocks base method. +func (m *MockFullNode) EthGetBalance(arg0 context.Context, arg1 ethtypes.EthAddress, arg2 ethtypes.EthBlockNumberOrHash) (ethtypes.EthBigInt, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "EthGetBalance", arg0, arg1, arg2) + ret0, _ := ret[0].(ethtypes.EthBigInt) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// EthGetBalance indicates an expected call of EthGetBalance. +func (mr *MockFullNodeMockRecorder) EthGetBalance(arg0, arg1, arg2 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EthGetBalance", reflect.TypeOf((*MockFullNode)(nil).EthGetBalance), arg0, arg1, arg2) +} + +// EthGetBlockByHash mocks base method. +func (m *MockFullNode) EthGetBlockByHash(arg0 context.Context, arg1 ethtypes.EthHash, arg2 bool) (ethtypes.EthBlock, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "EthGetBlockByHash", arg0, arg1, arg2) + ret0, _ := ret[0].(ethtypes.EthBlock) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// EthGetBlockByHash indicates an expected call of EthGetBlockByHash. +func (mr *MockFullNodeMockRecorder) EthGetBlockByHash(arg0, arg1, arg2 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EthGetBlockByHash", reflect.TypeOf((*MockFullNode)(nil).EthGetBlockByHash), arg0, arg1, arg2) +} + +// EthGetBlockByNumber mocks base method. +func (m *MockFullNode) EthGetBlockByNumber(arg0 context.Context, arg1 string, arg2 bool) (ethtypes.EthBlock, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "EthGetBlockByNumber", arg0, arg1, arg2) + ret0, _ := ret[0].(ethtypes.EthBlock) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// EthGetBlockByNumber indicates an expected call of EthGetBlockByNumber. +func (mr *MockFullNodeMockRecorder) EthGetBlockByNumber(arg0, arg1, arg2 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EthGetBlockByNumber", reflect.TypeOf((*MockFullNode)(nil).EthGetBlockByNumber), arg0, arg1, arg2) +} + +// EthGetBlockReceipts mocks base method. +func (m *MockFullNode) EthGetBlockReceipts(arg0 context.Context, arg1 ethtypes.EthBlockNumberOrHash) ([]*ethtypes.EthTxReceipt, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "EthGetBlockReceipts", arg0, arg1) + ret0, _ := ret[0].([]*ethtypes.EthTxReceipt) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// EthGetBlockReceipts indicates an expected call of EthGetBlockReceipts. +func (mr *MockFullNodeMockRecorder) EthGetBlockReceipts(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EthGetBlockReceipts", reflect.TypeOf((*MockFullNode)(nil).EthGetBlockReceipts), arg0, arg1) +} + +// EthGetBlockReceiptsLimited mocks base method. +func (m *MockFullNode) EthGetBlockReceiptsLimited(arg0 context.Context, arg1 ethtypes.EthBlockNumberOrHash, arg2 abi.ChainEpoch) ([]*ethtypes.EthTxReceipt, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "EthGetBlockReceiptsLimited", arg0, arg1, arg2) + ret0, _ := ret[0].([]*ethtypes.EthTxReceipt) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// EthGetBlockReceiptsLimited indicates an expected call of EthGetBlockReceiptsLimited. +func (mr *MockFullNodeMockRecorder) EthGetBlockReceiptsLimited(arg0, arg1, arg2 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EthGetBlockReceiptsLimited", reflect.TypeOf((*MockFullNode)(nil).EthGetBlockReceiptsLimited), arg0, arg1, arg2) +} + +// EthGetBlockTransactionCountByHash mocks base method. +func (m *MockFullNode) EthGetBlockTransactionCountByHash(arg0 context.Context, arg1 ethtypes.EthHash) (ethtypes.EthUint64, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "EthGetBlockTransactionCountByHash", arg0, arg1) + ret0, _ := ret[0].(ethtypes.EthUint64) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// EthGetBlockTransactionCountByHash indicates an expected call of EthGetBlockTransactionCountByHash. +func (mr *MockFullNodeMockRecorder) EthGetBlockTransactionCountByHash(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EthGetBlockTransactionCountByHash", reflect.TypeOf((*MockFullNode)(nil).EthGetBlockTransactionCountByHash), arg0, arg1) +} + +// EthGetBlockTransactionCountByNumber mocks base method. +func (m *MockFullNode) EthGetBlockTransactionCountByNumber(arg0 context.Context, arg1 string) (ethtypes.EthUint64, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "EthGetBlockTransactionCountByNumber", arg0, arg1) + ret0, _ := ret[0].(ethtypes.EthUint64) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// EthGetBlockTransactionCountByNumber indicates an expected call of EthGetBlockTransactionCountByNumber. +func (mr *MockFullNodeMockRecorder) EthGetBlockTransactionCountByNumber(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EthGetBlockTransactionCountByNumber", reflect.TypeOf((*MockFullNode)(nil).EthGetBlockTransactionCountByNumber), arg0, arg1) +} + +// EthGetCode mocks base method. +func (m *MockFullNode) EthGetCode(arg0 context.Context, arg1 ethtypes.EthAddress, arg2 ethtypes.EthBlockNumberOrHash) (ethtypes.EthBytes, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "EthGetCode", arg0, arg1, arg2) + ret0, _ := ret[0].(ethtypes.EthBytes) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// EthGetCode indicates an expected call of EthGetCode. +func (mr *MockFullNodeMockRecorder) EthGetCode(arg0, arg1, arg2 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EthGetCode", reflect.TypeOf((*MockFullNode)(nil).EthGetCode), arg0, arg1, arg2) +} + +// EthGetFilterChanges mocks base method. +func (m *MockFullNode) EthGetFilterChanges(arg0 context.Context, arg1 ethtypes.EthFilterID) (*ethtypes.EthFilterResult, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "EthGetFilterChanges", arg0, arg1) + ret0, _ := ret[0].(*ethtypes.EthFilterResult) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// EthGetFilterChanges indicates an expected call of EthGetFilterChanges. +func (mr *MockFullNodeMockRecorder) EthGetFilterChanges(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EthGetFilterChanges", reflect.TypeOf((*MockFullNode)(nil).EthGetFilterChanges), arg0, arg1) +} + +// EthGetFilterLogs mocks base method. +func (m *MockFullNode) EthGetFilterLogs(arg0 context.Context, arg1 ethtypes.EthFilterID) (*ethtypes.EthFilterResult, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "EthGetFilterLogs", arg0, arg1) + ret0, _ := ret[0].(*ethtypes.EthFilterResult) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// EthGetFilterLogs indicates an expected call of EthGetFilterLogs. +func (mr *MockFullNodeMockRecorder) EthGetFilterLogs(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EthGetFilterLogs", reflect.TypeOf((*MockFullNode)(nil).EthGetFilterLogs), arg0, arg1) +} + +// EthGetLogs mocks base method. +func (m *MockFullNode) EthGetLogs(arg0 context.Context, arg1 *ethtypes.EthFilterSpec) (*ethtypes.EthFilterResult, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "EthGetLogs", arg0, arg1) + ret0, _ := ret[0].(*ethtypes.EthFilterResult) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// EthGetLogs indicates an expected call of EthGetLogs. +func (mr *MockFullNodeMockRecorder) EthGetLogs(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EthGetLogs", reflect.TypeOf((*MockFullNode)(nil).EthGetLogs), arg0, arg1) +} + +// EthGetMessageCidByTransactionHash mocks base method. +func (m *MockFullNode) EthGetMessageCidByTransactionHash(arg0 context.Context, arg1 *ethtypes.EthHash) (*cid.Cid, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "EthGetMessageCidByTransactionHash", arg0, arg1) + ret0, _ := ret[0].(*cid.Cid) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// EthGetMessageCidByTransactionHash indicates an expected call of EthGetMessageCidByTransactionHash. +func (mr *MockFullNodeMockRecorder) EthGetMessageCidByTransactionHash(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EthGetMessageCidByTransactionHash", reflect.TypeOf((*MockFullNode)(nil).EthGetMessageCidByTransactionHash), arg0, arg1) +} + +// EthGetStorageAt mocks base method. +func (m *MockFullNode) EthGetStorageAt(arg0 context.Context, arg1 ethtypes.EthAddress, arg2 ethtypes.EthBytes, arg3 ethtypes.EthBlockNumberOrHash) (ethtypes.EthBytes, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "EthGetStorageAt", arg0, arg1, arg2, arg3) + ret0, _ := ret[0].(ethtypes.EthBytes) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// EthGetStorageAt indicates an expected call of EthGetStorageAt. +func (mr *MockFullNodeMockRecorder) EthGetStorageAt(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EthGetStorageAt", reflect.TypeOf((*MockFullNode)(nil).EthGetStorageAt), arg0, arg1, arg2, arg3) +} + +// EthGetTransactionByBlockHashAndIndex mocks base method. +func (m *MockFullNode) EthGetTransactionByBlockHashAndIndex(arg0 context.Context, arg1 ethtypes.EthHash, arg2 ethtypes.EthUint64) (*ethtypes.EthTx, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "EthGetTransactionByBlockHashAndIndex", arg0, arg1, arg2) + ret0, _ := ret[0].(*ethtypes.EthTx) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// EthGetTransactionByBlockHashAndIndex indicates an expected call of EthGetTransactionByBlockHashAndIndex. +func (mr *MockFullNodeMockRecorder) EthGetTransactionByBlockHashAndIndex(arg0, arg1, arg2 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EthGetTransactionByBlockHashAndIndex", reflect.TypeOf((*MockFullNode)(nil).EthGetTransactionByBlockHashAndIndex), arg0, arg1, arg2) +} + +// EthGetTransactionByBlockNumberAndIndex mocks base method. +func (m *MockFullNode) EthGetTransactionByBlockNumberAndIndex(arg0 context.Context, arg1 string, arg2 ethtypes.EthUint64) (*ethtypes.EthTx, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "EthGetTransactionByBlockNumberAndIndex", arg0, arg1, arg2) + ret0, _ := ret[0].(*ethtypes.EthTx) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// EthGetTransactionByBlockNumberAndIndex indicates an expected call of EthGetTransactionByBlockNumberAndIndex. +func (mr *MockFullNodeMockRecorder) EthGetTransactionByBlockNumberAndIndex(arg0, arg1, arg2 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EthGetTransactionByBlockNumberAndIndex", reflect.TypeOf((*MockFullNode)(nil).EthGetTransactionByBlockNumberAndIndex), arg0, arg1, arg2) +} + +// EthGetTransactionByHash mocks base method. +func (m *MockFullNode) EthGetTransactionByHash(arg0 context.Context, arg1 *ethtypes.EthHash) (*ethtypes.EthTx, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "EthGetTransactionByHash", arg0, arg1) + ret0, _ := ret[0].(*ethtypes.EthTx) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// EthGetTransactionByHash indicates an expected call of EthGetTransactionByHash. +func (mr *MockFullNodeMockRecorder) EthGetTransactionByHash(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EthGetTransactionByHash", reflect.TypeOf((*MockFullNode)(nil).EthGetTransactionByHash), arg0, arg1) +} + +// EthGetTransactionByHashLimited mocks base method. +func (m *MockFullNode) EthGetTransactionByHashLimited(arg0 context.Context, arg1 *ethtypes.EthHash, arg2 abi.ChainEpoch) (*ethtypes.EthTx, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "EthGetTransactionByHashLimited", arg0, arg1, arg2) + ret0, _ := ret[0].(*ethtypes.EthTx) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// EthGetTransactionByHashLimited indicates an expected call of EthGetTransactionByHashLimited. +func (mr *MockFullNodeMockRecorder) EthGetTransactionByHashLimited(arg0, arg1, arg2 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EthGetTransactionByHashLimited", reflect.TypeOf((*MockFullNode)(nil).EthGetTransactionByHashLimited), arg0, arg1, arg2) +} + +// EthGetTransactionCount mocks base method. +func (m *MockFullNode) EthGetTransactionCount(arg0 context.Context, arg1 ethtypes.EthAddress, arg2 ethtypes.EthBlockNumberOrHash) (ethtypes.EthUint64, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "EthGetTransactionCount", arg0, arg1, arg2) + ret0, _ := ret[0].(ethtypes.EthUint64) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// EthGetTransactionCount indicates an expected call of EthGetTransactionCount. +func (mr *MockFullNodeMockRecorder) EthGetTransactionCount(arg0, arg1, arg2 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EthGetTransactionCount", reflect.TypeOf((*MockFullNode)(nil).EthGetTransactionCount), arg0, arg1, arg2) +} + +// EthGetTransactionHashByCid mocks base method. +func (m *MockFullNode) EthGetTransactionHashByCid(arg0 context.Context, arg1 cid.Cid) (*ethtypes.EthHash, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "EthGetTransactionHashByCid", arg0, arg1) + ret0, _ := ret[0].(*ethtypes.EthHash) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// EthGetTransactionHashByCid indicates an expected call of EthGetTransactionHashByCid. +func (mr *MockFullNodeMockRecorder) EthGetTransactionHashByCid(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EthGetTransactionHashByCid", reflect.TypeOf((*MockFullNode)(nil).EthGetTransactionHashByCid), arg0, arg1) +} + +// EthGetTransactionReceipt mocks base method. +func (m *MockFullNode) EthGetTransactionReceipt(arg0 context.Context, arg1 ethtypes.EthHash) (*ethtypes.EthTxReceipt, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "EthGetTransactionReceipt", arg0, arg1) + ret0, _ := ret[0].(*ethtypes.EthTxReceipt) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// EthGetTransactionReceipt indicates an expected call of EthGetTransactionReceipt. +func (mr *MockFullNodeMockRecorder) EthGetTransactionReceipt(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EthGetTransactionReceipt", reflect.TypeOf((*MockFullNode)(nil).EthGetTransactionReceipt), arg0, arg1) +} + +// EthGetTransactionReceiptLimited mocks base method. +func (m *MockFullNode) EthGetTransactionReceiptLimited(arg0 context.Context, arg1 ethtypes.EthHash, arg2 abi.ChainEpoch) (*ethtypes.EthTxReceipt, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "EthGetTransactionReceiptLimited", arg0, arg1, arg2) + ret0, _ := ret[0].(*ethtypes.EthTxReceipt) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// EthGetTransactionReceiptLimited indicates an expected call of EthGetTransactionReceiptLimited. +func (mr *MockFullNodeMockRecorder) EthGetTransactionReceiptLimited(arg0, arg1, arg2 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EthGetTransactionReceiptLimited", reflect.TypeOf((*MockFullNode)(nil).EthGetTransactionReceiptLimited), arg0, arg1, arg2) +} + +// EthMaxPriorityFeePerGas mocks base method. +func (m *MockFullNode) EthMaxPriorityFeePerGas(arg0 context.Context) (ethtypes.EthBigInt, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "EthMaxPriorityFeePerGas", arg0) + ret0, _ := ret[0].(ethtypes.EthBigInt) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// EthMaxPriorityFeePerGas indicates an expected call of EthMaxPriorityFeePerGas. +func (mr *MockFullNodeMockRecorder) EthMaxPriorityFeePerGas(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EthMaxPriorityFeePerGas", reflect.TypeOf((*MockFullNode)(nil).EthMaxPriorityFeePerGas), arg0) +} + +// EthNewBlockFilter mocks base method. +func (m *MockFullNode) EthNewBlockFilter(arg0 context.Context) (ethtypes.EthFilterID, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "EthNewBlockFilter", arg0) + ret0, _ := ret[0].(ethtypes.EthFilterID) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// EthNewBlockFilter indicates an expected call of EthNewBlockFilter. +func (mr *MockFullNodeMockRecorder) EthNewBlockFilter(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EthNewBlockFilter", reflect.TypeOf((*MockFullNode)(nil).EthNewBlockFilter), arg0) +} + +// EthNewFilter mocks base method. +func (m *MockFullNode) EthNewFilter(arg0 context.Context, arg1 *ethtypes.EthFilterSpec) (ethtypes.EthFilterID, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "EthNewFilter", arg0, arg1) + ret0, _ := ret[0].(ethtypes.EthFilterID) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// EthNewFilter indicates an expected call of EthNewFilter. +func (mr *MockFullNodeMockRecorder) EthNewFilter(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EthNewFilter", reflect.TypeOf((*MockFullNode)(nil).EthNewFilter), arg0, arg1) +} + +// EthNewPendingTransactionFilter mocks base method. +func (m *MockFullNode) EthNewPendingTransactionFilter(arg0 context.Context) (ethtypes.EthFilterID, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "EthNewPendingTransactionFilter", arg0) + ret0, _ := ret[0].(ethtypes.EthFilterID) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// EthNewPendingTransactionFilter indicates an expected call of EthNewPendingTransactionFilter. +func (mr *MockFullNodeMockRecorder) EthNewPendingTransactionFilter(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EthNewPendingTransactionFilter", reflect.TypeOf((*MockFullNode)(nil).EthNewPendingTransactionFilter), arg0) +} + +// EthProtocolVersion mocks base method. +func (m *MockFullNode) EthProtocolVersion(arg0 context.Context) (ethtypes.EthUint64, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "EthProtocolVersion", arg0) + ret0, _ := ret[0].(ethtypes.EthUint64) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// EthProtocolVersion indicates an expected call of EthProtocolVersion. +func (mr *MockFullNodeMockRecorder) EthProtocolVersion(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EthProtocolVersion", reflect.TypeOf((*MockFullNode)(nil).EthProtocolVersion), arg0) +} + +// EthSendRawTransaction mocks base method. +func (m *MockFullNode) EthSendRawTransaction(arg0 context.Context, arg1 ethtypes.EthBytes) (ethtypes.EthHash, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "EthSendRawTransaction", arg0, arg1) + ret0, _ := ret[0].(ethtypes.EthHash) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// EthSendRawTransaction indicates an expected call of EthSendRawTransaction. +func (mr *MockFullNodeMockRecorder) EthSendRawTransaction(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EthSendRawTransaction", reflect.TypeOf((*MockFullNode)(nil).EthSendRawTransaction), arg0, arg1) +} + +// EthSendRawTransactionUntrusted mocks base method. +func (m *MockFullNode) EthSendRawTransactionUntrusted(arg0 context.Context, arg1 ethtypes.EthBytes) (ethtypes.EthHash, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "EthSendRawTransactionUntrusted", arg0, arg1) + ret0, _ := ret[0].(ethtypes.EthHash) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// EthSendRawTransactionUntrusted indicates an expected call of EthSendRawTransactionUntrusted. +func (mr *MockFullNodeMockRecorder) EthSendRawTransactionUntrusted(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EthSendRawTransactionUntrusted", reflect.TypeOf((*MockFullNode)(nil).EthSendRawTransactionUntrusted), arg0, arg1) +} + +// EthSubscribe mocks base method. +func (m *MockFullNode) EthSubscribe(arg0 context.Context, arg1 jsonrpc.RawParams) (ethtypes.EthSubscriptionID, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "EthSubscribe", arg0, arg1) + ret0, _ := ret[0].(ethtypes.EthSubscriptionID) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// EthSubscribe indicates an expected call of EthSubscribe. +func (mr *MockFullNodeMockRecorder) EthSubscribe(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EthSubscribe", reflect.TypeOf((*MockFullNode)(nil).EthSubscribe), arg0, arg1) +} + +// EthSyncing mocks base method. +func (m *MockFullNode) EthSyncing(arg0 context.Context) (ethtypes.EthSyncingResult, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "EthSyncing", arg0) + ret0, _ := ret[0].(ethtypes.EthSyncingResult) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// EthSyncing indicates an expected call of EthSyncing. +func (mr *MockFullNodeMockRecorder) EthSyncing(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EthSyncing", reflect.TypeOf((*MockFullNode)(nil).EthSyncing), arg0) +} + +// EthTraceBlock mocks base method. +func (m *MockFullNode) EthTraceBlock(arg0 context.Context, arg1 string) ([]*ethtypes.EthTraceBlock, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "EthTraceBlock", arg0, arg1) + ret0, _ := ret[0].([]*ethtypes.EthTraceBlock) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// EthTraceBlock indicates an expected call of EthTraceBlock. +func (mr *MockFullNodeMockRecorder) EthTraceBlock(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EthTraceBlock", reflect.TypeOf((*MockFullNode)(nil).EthTraceBlock), arg0, arg1) +} + +// EthTraceFilter mocks base method. +func (m *MockFullNode) EthTraceFilter(arg0 context.Context, arg1 ethtypes.EthTraceFilterCriteria) ([]*ethtypes.EthTraceFilterResult, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "EthTraceFilter", arg0, arg1) + ret0, _ := ret[0].([]*ethtypes.EthTraceFilterResult) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// EthTraceFilter indicates an expected call of EthTraceFilter. +func (mr *MockFullNodeMockRecorder) EthTraceFilter(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EthTraceFilter", reflect.TypeOf((*MockFullNode)(nil).EthTraceFilter), arg0, arg1) +} + +// EthTraceReplayBlockTransactions mocks base method. +func (m *MockFullNode) EthTraceReplayBlockTransactions(arg0 context.Context, arg1 string, arg2 []string) ([]*ethtypes.EthTraceReplayBlockTransaction, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "EthTraceReplayBlockTransactions", arg0, arg1, arg2) + ret0, _ := ret[0].([]*ethtypes.EthTraceReplayBlockTransaction) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// EthTraceReplayBlockTransactions indicates an expected call of EthTraceReplayBlockTransactions. +func (mr *MockFullNodeMockRecorder) EthTraceReplayBlockTransactions(arg0, arg1, arg2 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EthTraceReplayBlockTransactions", reflect.TypeOf((*MockFullNode)(nil).EthTraceReplayBlockTransactions), arg0, arg1, arg2) +} + +// EthTraceTransaction mocks base method. +func (m *MockFullNode) EthTraceTransaction(arg0 context.Context, arg1 string) ([]*ethtypes.EthTraceTransaction, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "EthTraceTransaction", arg0, arg1) + ret0, _ := ret[0].([]*ethtypes.EthTraceTransaction) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// EthTraceTransaction indicates an expected call of EthTraceTransaction. +func (mr *MockFullNodeMockRecorder) EthTraceTransaction(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EthTraceTransaction", reflect.TypeOf((*MockFullNode)(nil).EthTraceTransaction), arg0, arg1) +} + +// EthUninstallFilter mocks base method. +func (m *MockFullNode) EthUninstallFilter(arg0 context.Context, arg1 ethtypes.EthFilterID) (bool, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "EthUninstallFilter", arg0, arg1) + ret0, _ := ret[0].(bool) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// EthUninstallFilter indicates an expected call of EthUninstallFilter. +func (mr *MockFullNodeMockRecorder) EthUninstallFilter(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EthUninstallFilter", reflect.TypeOf((*MockFullNode)(nil).EthUninstallFilter), arg0, arg1) +} + +// EthUnsubscribe mocks base method. +func (m *MockFullNode) EthUnsubscribe(arg0 context.Context, arg1 ethtypes.EthSubscriptionID) (bool, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "EthUnsubscribe", arg0, arg1) + ret0, _ := ret[0].(bool) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// EthUnsubscribe indicates an expected call of EthUnsubscribe. +func (mr *MockFullNodeMockRecorder) EthUnsubscribe(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EthUnsubscribe", reflect.TypeOf((*MockFullNode)(nil).EthUnsubscribe), arg0, arg1) +} + +// FilecoinAddressToEthAddress mocks base method. +func (m *MockFullNode) FilecoinAddressToEthAddress(arg0 context.Context, arg1 jsonrpc.RawParams) (ethtypes.EthAddress, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "FilecoinAddressToEthAddress", arg0, arg1) + ret0, _ := ret[0].(ethtypes.EthAddress) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// FilecoinAddressToEthAddress indicates an expected call of FilecoinAddressToEthAddress. +func (mr *MockFullNodeMockRecorder) FilecoinAddressToEthAddress(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FilecoinAddressToEthAddress", reflect.TypeOf((*MockFullNode)(nil).FilecoinAddressToEthAddress), arg0, arg1) +} + +// NetListening mocks base method. +func (m *MockFullNode) NetListening(arg0 context.Context) (bool, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "NetListening", arg0) + ret0, _ := ret[0].(bool) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// NetListening indicates an expected call of NetListening. +func (mr *MockFullNodeMockRecorder) NetListening(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NetListening", reflect.TypeOf((*MockFullNode)(nil).NetListening), arg0) +} + +// NetVersion mocks base method. +func (m *MockFullNode) NetVersion(arg0 context.Context) (string, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "NetVersion", arg0) + ret0, _ := ret[0].(string) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// NetVersion indicates an expected call of NetVersion. +func (mr *MockFullNodeMockRecorder) NetVersion(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NetVersion", reflect.TypeOf((*MockFullNode)(nil).NetVersion), arg0) +} + // StateGetActor mocks base method. func (m *MockFullNode) StateGetActor(arg0 context.Context, arg1 address.Address, arg2 types.TipSetSelector) (*types.ActorV5, error) { m.ctrl.T.Helper() @@ -82,3 +791,18 @@ func (mr *MockFullNodeMockRecorder) StateGetID(arg0, arg1, arg2 interface{}) *go mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateGetID", reflect.TypeOf((*MockFullNode)(nil).StateGetID), arg0, arg1, arg2) } + +// Web3ClientVersion mocks base method. +func (m *MockFullNode) Web3ClientVersion(arg0 context.Context) (string, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Web3ClientVersion", arg0) + ret0, _ := ret[0].(string) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Web3ClientVersion indicates an expected call of Web3ClientVersion. +func (mr *MockFullNodeMockRecorder) Web3ClientVersion(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Web3ClientVersion", reflect.TypeOf((*MockFullNode)(nil).Web3ClientVersion), arg0) +} diff --git a/build/buildconstants/params_shared_vals.go b/build/buildconstants/params_shared_vals.go index 901d6142195..df586d5da45 100644 --- a/build/buildconstants/params_shared_vals.go +++ b/build/buildconstants/params_shared_vals.go @@ -103,3 +103,8 @@ const InitialBaseFee int64 = 100e6 const MinimumBaseFee int64 = 100 const PackingEfficiencyNum int64 = 4 const PackingEfficiencyDenom int64 = 5 + +// SafeHeightDistance is the distance from the current head that we call "safe" for the purpose of +// assuming finality when relying on EC. It's not a substitute for ChainFinality, but a compromise +// where it's acceptable to have a nonzero margin of error in the finality assumption. +const SafeHeightDistance abi.ChainEpoch = 200 diff --git a/build/buildconstants/params_testground.go b/build/buildconstants/params_testground.go index ab6f0879d3f..15ca46cae33 100644 --- a/build/buildconstants/params_testground.go +++ b/build/buildconstants/params_testground.go @@ -70,6 +70,8 @@ var ( PackingEfficiencyNum int64 = 4 PackingEfficiencyDenom int64 = 5 + SafeHeightDistance abi.ChainEpoch = 200 + UpgradeBreezeHeight abi.ChainEpoch = -1 BreezeGasTampingDuration abi.ChainEpoch = 0 diff --git a/build/openrpc/full.json b/build/openrpc/full.json index fef53c14019..7babbfec07d 100644 --- a/build/openrpc/full.json +++ b/build/openrpc/full.json @@ -37,7 +37,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1362" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1356" } }, { @@ -60,7 +60,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1373" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1367" } }, { @@ -103,7 +103,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1384" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1378" } }, { @@ -214,7 +214,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1406" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1400" } }, { @@ -454,7 +454,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1417" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1411" } }, { @@ -685,7 +685,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1428" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1422" } }, { @@ -784,7 +784,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1439" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1433" } }, { @@ -880,7 +880,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1450" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1444" } }, { @@ -986,7 +986,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1461" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1455" } }, { @@ -1083,7 +1083,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1472" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1466" } }, { @@ -1142,7 +1142,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1483" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1477" } }, { @@ -1235,7 +1235,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1494" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1488" } }, { @@ -1319,7 +1319,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1505" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1499" } }, { @@ -1483,7 +1483,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1516" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1510" } }, { @@ -1603,7 +1603,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1527" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1521" } }, { @@ -1740,7 +1740,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1538" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1532" } }, { @@ -1877,7 +1877,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1549" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1543" } }, { @@ -1924,7 +1924,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1560" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1554" } }, { @@ -2020,7 +2020,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1571" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1565" } }, { @@ -2075,7 +2075,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1582" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1576" } }, { @@ -2127,7 +2127,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1604" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1598" } }, { @@ -2164,7 +2164,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1615" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1609" } }, { @@ -2211,7 +2211,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1626" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1620" } }, { @@ -2258,7 +2258,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1637" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1631" } }, { @@ -2338,7 +2338,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1648" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1642" } }, { @@ -2390,7 +2390,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1659" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1653" } }, { @@ -2494,7 +2494,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1670" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1664" } }, { @@ -2533,7 +2533,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1681" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1675" } }, { @@ -2580,7 +2580,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1692" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1686" } }, { @@ -2635,7 +2635,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1703" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1697" } }, { @@ -2664,7 +2664,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1714" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1708" } }, { @@ -2801,7 +2801,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1725" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1719" } }, { @@ -2830,7 +2830,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1736" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1730" } }, { @@ -2884,7 +2884,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1747" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1741" } }, { @@ -2975,7 +2975,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1758" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1752" } }, { @@ -3003,7 +3003,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1769" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1763" } }, { @@ -3093,7 +3093,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1780" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1774" } }, { @@ -3349,7 +3349,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1791" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1785" } }, { @@ -3594,12 +3594,12 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1802" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1796" } }, { "name": "Filecoin.EthGetBlockReceipts", - "description": "```go\nfunc (s *FullNodeStruct) EthGetBlockReceipts(p0 context.Context, p1 ethtypes.EthBlockNumberOrHash) ([]*EthTxReceipt, error) {\n\tif s.Internal.EthGetBlockReceipts == nil {\n\t\treturn *new([]*EthTxReceipt), ErrNotSupported\n\t}\n\treturn s.Internal.EthGetBlockReceipts(p0, p1)\n}\n```", + "description": "```go\nfunc (s *FullNodeStruct) EthGetBlockReceipts(p0 context.Context, p1 ethtypes.EthBlockNumberOrHash) ([]*ethtypes.EthTxReceipt, error) {\n\tif s.Internal.EthGetBlockReceipts == nil {\n\t\treturn *new([]*ethtypes.EthTxReceipt), ErrNotSupported\n\t}\n\treturn s.Internal.EthGetBlockReceipts(p0, p1)\n}\n```", "summary": "", "paramStructure": "by-position", "params": [ @@ -3640,8 +3640,8 @@ } ], "result": { - "name": "[]*EthTxReceipt", - "description": "[]*EthTxReceipt", + "name": "[]*ethtypes.EthTxReceipt", + "description": "[]*ethtypes.EthTxReceipt", "summary": "", "schema": { "examples": [ @@ -3870,12 +3870,12 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1813" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1807" } }, { "name": "Filecoin.EthGetBlockReceiptsLimited", - "description": "```go\nfunc (s *FullNodeStruct) EthGetBlockReceiptsLimited(p0 context.Context, p1 ethtypes.EthBlockNumberOrHash, p2 abi.ChainEpoch) ([]*EthTxReceipt, error) {\n\tif s.Internal.EthGetBlockReceiptsLimited == nil {\n\t\treturn *new([]*EthTxReceipt), ErrNotSupported\n\t}\n\treturn s.Internal.EthGetBlockReceiptsLimited(p0, p1, p2)\n}\n```", + "description": "```go\nfunc (s *FullNodeStruct) EthGetBlockReceiptsLimited(p0 context.Context, p1 ethtypes.EthBlockNumberOrHash, p2 abi.ChainEpoch) ([]*ethtypes.EthTxReceipt, error) {\n\tif s.Internal.EthGetBlockReceiptsLimited == nil {\n\t\treturn *new([]*ethtypes.EthTxReceipt), ErrNotSupported\n\t}\n\treturn s.Internal.EthGetBlockReceiptsLimited(p0, p1, p2)\n}\n```", "summary": "", "paramStructure": "by-position", "params": [ @@ -3933,8 +3933,8 @@ } ], "result": { - "name": "[]*EthTxReceipt", - "description": "[]*EthTxReceipt", + "name": "[]*ethtypes.EthTxReceipt", + "description": "[]*ethtypes.EthTxReceipt", "summary": "", "schema": { "examples": [ @@ -4163,7 +4163,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1824" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1818" } }, { @@ -4219,27 +4219,25 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1835" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1829" } }, { "name": "Filecoin.EthGetBlockTransactionCountByNumber", - "description": "```go\nfunc (s *FullNodeStruct) EthGetBlockTransactionCountByNumber(p0 context.Context, p1 ethtypes.EthUint64) (ethtypes.EthUint64, error) {\n\tif s.Internal.EthGetBlockTransactionCountByNumber == nil {\n\t\treturn *new(ethtypes.EthUint64), ErrNotSupported\n\t}\n\treturn s.Internal.EthGetBlockTransactionCountByNumber(p0, p1)\n}\n```", + "description": "```go\nfunc (s *FullNodeStruct) EthGetBlockTransactionCountByNumber(p0 context.Context, p1 string) (ethtypes.EthUint64, error) {\n\tif s.Internal.EthGetBlockTransactionCountByNumber == nil {\n\t\treturn *new(ethtypes.EthUint64), ErrNotSupported\n\t}\n\treturn s.Internal.EthGetBlockTransactionCountByNumber(p0, p1)\n}\n```", "summary": "EthGetBlockTransactionCountByNumber returns the number of messages in the TipSet\n", "paramStructure": "by-position", "params": [ { "name": "p1", - "description": "ethtypes.EthUint64", + "description": "string", "summary": "", "schema": { - "title": "number", - "description": "Number is a number", "examples": [ - "0x5" + "string value" ], "type": [ - "number" + "string" ] }, "required": true, @@ -4266,7 +4264,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1846" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1840" } }, { @@ -4364,7 +4362,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1857" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1851" } }, { @@ -4430,7 +4428,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1868" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1862" } }, { @@ -4496,7 +4494,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1879" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1873" } }, { @@ -4605,7 +4603,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1890" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1884" } }, { @@ -4663,7 +4661,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1901" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1895" } }, { @@ -4785,7 +4783,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1912" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1906" } }, { @@ -4994,7 +4992,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1923" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1917" } }, { @@ -5192,7 +5190,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1934" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1928" } }, { @@ -5384,7 +5382,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1945" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1939" } }, { @@ -5593,7 +5591,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1956" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1950" } }, { @@ -5684,7 +5682,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1967" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1961" } }, { @@ -5742,12 +5740,12 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1978" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1972" } }, { "name": "Filecoin.EthGetTransactionReceipt", - "description": "```go\nfunc (s *FullNodeStruct) EthGetTransactionReceipt(p0 context.Context, p1 ethtypes.EthHash) (*EthTxReceipt, error) {\n\tif s.Internal.EthGetTransactionReceipt == nil {\n\t\treturn nil, ErrNotSupported\n\t}\n\treturn s.Internal.EthGetTransactionReceipt(p0, p1)\n}\n```", + "description": "```go\nfunc (s *FullNodeStruct) EthGetTransactionReceipt(p0 context.Context, p1 ethtypes.EthHash) (*ethtypes.EthTxReceipt, error) {\n\tif s.Internal.EthGetTransactionReceipt == nil {\n\t\treturn nil, ErrNotSupported\n\t}\n\treturn s.Internal.EthGetTransactionReceipt(p0, p1)\n}\n```", "summary": "", "paramStructure": "by-position", "params": [ @@ -5779,8 +5777,8 @@ } ], "result": { - "name": "*EthTxReceipt", - "description": "*EthTxReceipt", + "name": "*ethtypes.EthTxReceipt", + "description": "*ethtypes.EthTxReceipt", "summary": "", "schema": { "examples": [ @@ -6000,12 +5998,12 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1989" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1983" } }, { "name": "Filecoin.EthGetTransactionReceiptLimited", - "description": "```go\nfunc (s *FullNodeStruct) EthGetTransactionReceiptLimited(p0 context.Context, p1 ethtypes.EthHash, p2 abi.ChainEpoch) (*EthTxReceipt, error) {\n\tif s.Internal.EthGetTransactionReceiptLimited == nil {\n\t\treturn nil, ErrNotSupported\n\t}\n\treturn s.Internal.EthGetTransactionReceiptLimited(p0, p1, p2)\n}\n```", + "description": "```go\nfunc (s *FullNodeStruct) EthGetTransactionReceiptLimited(p0 context.Context, p1 ethtypes.EthHash, p2 abi.ChainEpoch) (*ethtypes.EthTxReceipt, error) {\n\tif s.Internal.EthGetTransactionReceiptLimited == nil {\n\t\treturn nil, ErrNotSupported\n\t}\n\treturn s.Internal.EthGetTransactionReceiptLimited(p0, p1, p2)\n}\n```", "summary": "", "paramStructure": "by-position", "params": [ @@ -6054,8 +6052,8 @@ } ], "result": { - "name": "*EthTxReceipt", - "description": "*EthTxReceipt", + "name": "*ethtypes.EthTxReceipt", + "description": "*ethtypes.EthTxReceipt", "summary": "", "schema": { "examples": [ @@ -6275,7 +6273,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2000" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1994" } }, { @@ -6303,7 +6301,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2011" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2005" } }, { @@ -6341,7 +6339,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2022" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2016" } }, { @@ -6449,7 +6447,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2033" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2027" } }, { @@ -6487,7 +6485,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2044" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2038" } }, { @@ -6516,7 +6514,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2055" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2049" } }, { @@ -6579,7 +6577,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2066" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2060" } }, { @@ -6642,7 +6640,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2077" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2071" } }, { @@ -6705,7 +6703,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2088" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2082" } }, { @@ -6750,7 +6748,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2099" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2093" } }, { @@ -6872,7 +6870,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2110" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2104" } }, { @@ -7048,7 +7046,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2121" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2115" } }, { @@ -7203,7 +7201,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2132" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2126" } }, { @@ -7325,7 +7323,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2143" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2137" } }, { @@ -7379,7 +7377,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2154" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2148" } }, { @@ -7433,7 +7431,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2165" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2159" } }, { @@ -7614,7 +7612,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2176" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2170" } }, { @@ -7697,7 +7695,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2187" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2181" } }, { @@ -7780,7 +7778,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2198" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2192" } }, { @@ -7943,7 +7941,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2209" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2203" } }, { @@ -8269,7 +8267,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2220" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2214" } }, { @@ -8363,7 +8361,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2231" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2225" } }, { @@ -8459,7 +8457,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2242" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2236" } }, { @@ -8486,7 +8484,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2253" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2247" } }, { @@ -8541,7 +8539,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2264" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2258" } }, { @@ -8620,7 +8618,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2275" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2269" } }, { @@ -8683,7 +8681,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2286" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2280" } }, { @@ -8826,7 +8824,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2297" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2291" } }, { @@ -8953,7 +8951,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2308" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2302" } }, { @@ -9055,7 +9053,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2319" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2313" } }, { @@ -9278,7 +9276,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2330" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2324" } }, { @@ -9461,7 +9459,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2341" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2335" } }, { @@ -9541,7 +9539,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2352" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2346" } }, { @@ -9586,7 +9584,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2363" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2357" } }, { @@ -9642,7 +9640,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2374" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2368" } }, { @@ -9722,7 +9720,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2385" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2379" } }, { @@ -9802,7 +9800,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2396" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2390" } }, { @@ -10287,7 +10285,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2407" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2401" } }, { @@ -10481,7 +10479,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2418" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2412" } }, { @@ -10636,7 +10634,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2429" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2423" } }, { @@ -10885,7 +10883,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2440" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2434" } }, { @@ -11040,7 +11038,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2451" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2445" } }, { @@ -11217,7 +11215,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2462" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2456" } }, { @@ -11315,7 +11313,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2473" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2467" } }, { @@ -11480,7 +11478,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2484" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2478" } }, { @@ -11519,7 +11517,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2495" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2489" } }, { @@ -11584,7 +11582,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2506" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2500" } }, { @@ -11630,7 +11628,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2517" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2511" } }, { @@ -11780,7 +11778,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2528" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2522" } }, { @@ -11917,7 +11915,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2539" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2533" } }, { @@ -12148,7 +12146,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2550" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2544" } }, { @@ -12285,7 +12283,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2561" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2555" } }, { @@ -12450,7 +12448,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2572" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2566" } }, { @@ -12527,7 +12525,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2583" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2577" } }, { @@ -12722,7 +12720,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2605" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2599" } }, { @@ -12901,7 +12899,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2616" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2610" } }, { @@ -13063,7 +13061,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2627" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2621" } }, { @@ -13211,7 +13209,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2638" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2632" } }, { @@ -13439,7 +13437,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2649" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2643" } }, { @@ -13587,7 +13585,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2660" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2654" } }, { @@ -13799,7 +13797,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2671" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2665" } }, { @@ -14005,7 +14003,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2682" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2676" } }, { @@ -14073,7 +14071,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2693" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2687" } }, { @@ -14190,7 +14188,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2704" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2698" } }, { @@ -14281,7 +14279,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2715" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2709" } }, { @@ -14367,7 +14365,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2726" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2720" } }, { @@ -14562,7 +14560,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2737" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2731" } }, { @@ -14724,7 +14722,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2748" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2742" } }, { @@ -14920,7 +14918,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2759" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2753" } }, { @@ -15100,7 +15098,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2770" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2764" } }, { @@ -15263,7 +15261,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2781" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2775" } }, { @@ -15290,7 +15288,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2792" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2786" } }, { @@ -15317,7 +15315,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2803" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2797" } }, { @@ -15416,7 +15414,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2814" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2808" } }, { @@ -15462,7 +15460,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2825" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2819" } }, { @@ -15562,7 +15560,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2836" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2830" } }, { @@ -15678,7 +15676,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2847" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2841" } }, { @@ -15726,7 +15724,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2858" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2852" } }, { @@ -15818,7 +15816,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2869" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2863" } }, { @@ -15933,7 +15931,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2880" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2874" } }, { @@ -15981,7 +15979,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2891" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2885" } }, { @@ -16018,7 +16016,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2902" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2896" } }, { @@ -16290,7 +16288,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2913" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2907" } }, { @@ -16338,7 +16336,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2924" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2918" } }, { @@ -16396,7 +16394,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2935" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2929" } }, { @@ -16601,7 +16599,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2946" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2940" } }, { @@ -16804,7 +16802,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2957" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2951" } }, { @@ -16973,7 +16971,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2968" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2962" } }, { @@ -17177,7 +17175,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2979" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2973" } }, { @@ -17344,7 +17342,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2990" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2984" } }, { @@ -17551,7 +17549,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3001" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2995" } }, { @@ -17619,7 +17617,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3012" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3006" } }, { @@ -17671,7 +17669,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3023" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3017" } }, { @@ -17720,7 +17718,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3034" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3028" } }, { @@ -17811,7 +17809,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3045" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3039" } }, { @@ -18317,7 +18315,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3056" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3050" } }, { @@ -18423,7 +18421,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3067" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3061" } }, { @@ -18475,7 +18473,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3078" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3072" } }, { @@ -19027,7 +19025,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3089" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3083" } }, { @@ -19141,7 +19139,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3100" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3094" } }, { @@ -19238,7 +19236,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3111" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3105" } }, { @@ -19338,7 +19336,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3122" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3116" } }, { @@ -19426,7 +19424,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3133" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3127" } }, { @@ -19526,7 +19524,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3144" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3138" } }, { @@ -19613,7 +19611,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3155" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3149" } }, { @@ -19704,7 +19702,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3166" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3160" } }, { @@ -19829,7 +19827,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3177" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3171" } }, { @@ -19938,7 +19936,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3188" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3182" } }, { @@ -20008,7 +20006,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3199" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3193" } }, { @@ -20111,7 +20109,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3210" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3204" } }, { @@ -20172,7 +20170,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3221" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3215" } }, { @@ -20302,7 +20300,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3232" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3226" } }, { @@ -20409,7 +20407,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3243" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3237" } }, { @@ -20632,7 +20630,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3254" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3248" } }, { @@ -20709,7 +20707,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3265" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3259" } }, { @@ -20786,7 +20784,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3276" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3270" } }, { @@ -20895,7 +20893,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3287" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3281" } }, { @@ -21004,7 +21002,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3298" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3292" } }, { @@ -21065,7 +21063,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3309" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3303" } }, { @@ -21175,7 +21173,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3320" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3314" } }, { @@ -21236,7 +21234,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3331" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3325" } }, { @@ -21304,7 +21302,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3342" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3336" } }, { @@ -21372,7 +21370,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3353" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3347" } }, { @@ -21453,7 +21451,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3364" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3358" } }, { @@ -21607,7 +21605,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3375" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3369" } }, { @@ -21679,7 +21677,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3386" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3380" } }, { @@ -21749,7 +21747,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3397" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3391" } }, { @@ -21913,7 +21911,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3408" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3402" } }, { @@ -22072,7 +22070,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3419" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3413" } }, { @@ -22142,7 +22140,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3430" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3424" } }, { @@ -22210,7 +22208,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3441" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3435" } }, { @@ -22308,7 +22306,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3452" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3446" } }, { @@ -22379,7 +22377,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3463" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3457" } }, { @@ -22580,7 +22578,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3474" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3468" } }, { @@ -22712,7 +22710,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3485" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3479" } }, { @@ -22815,7 +22813,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3496" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3490" } }, { @@ -22952,7 +22950,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3507" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3501" } }, { @@ -23063,7 +23061,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3518" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3512" } }, { @@ -23195,7 +23193,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3529" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3523" } }, { @@ -23326,7 +23324,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3540" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3534" } }, { @@ -23397,7 +23395,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3551" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3545" } }, { @@ -23481,7 +23479,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3562" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3556" } }, { @@ -23567,7 +23565,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3573" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3567" } }, { @@ -23744,7 +23742,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3584" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3578" } }, { @@ -23771,7 +23769,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3595" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3589" } }, { @@ -23824,7 +23822,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3606" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3600" } }, { @@ -23912,7 +23910,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3617" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3611" } }, { @@ -24363,7 +24361,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3628" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3622" } }, { @@ -24530,7 +24528,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3639" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3633" } }, { @@ -24628,7 +24626,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3650" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3644" } }, { @@ -24795,7 +24793,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3661" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3655" } }, { @@ -24893,7 +24891,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3672" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3666" } }, { @@ -25044,7 +25042,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3683" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3677" } }, { @@ -25129,7 +25127,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3694" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3688" } }, { @@ -25197,7 +25195,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3705" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3699" } }, { @@ -25249,7 +25247,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3716" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3710" } }, { @@ -25317,7 +25315,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3727" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3721" } }, { @@ -25478,7 +25476,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3738" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3732" } }, { @@ -25525,7 +25523,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3760" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3754" } }, { @@ -25572,7 +25570,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3771" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3765" } }, { @@ -25615,7 +25613,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3793" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3787" } }, { @@ -25839,7 +25837,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3804" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3798" } }, { @@ -26105,7 +26103,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3815" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3809" } }, { @@ -26128,7 +26126,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3826" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3820" } }, { @@ -26171,7 +26169,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3837" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3831" } }, { @@ -26222,7 +26220,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3848" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3842" } }, { @@ -26267,7 +26265,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3859" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3853" } }, { @@ -26295,7 +26293,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3870" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3864" } }, { @@ -26335,7 +26333,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3881" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3875" } }, { @@ -26394,7 +26392,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3892" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3886" } }, { @@ -26438,7 +26436,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3903" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3897" } }, { @@ -26497,7 +26495,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3914" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3908" } }, { @@ -26534,7 +26532,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3925" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3919" } }, { @@ -26578,7 +26576,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3936" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3930" } }, { @@ -26618,7 +26616,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3947" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3941" } }, { @@ -26693,7 +26691,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3958" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3952" } }, { @@ -26901,7 +26899,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3969" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3963" } }, { @@ -26945,7 +26943,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3980" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3974" } }, { @@ -27035,7 +27033,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3991" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3985" } }, { @@ -27062,7 +27060,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4002" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3996" } } ] diff --git a/build/openrpc/gateway.json b/build/openrpc/gateway.json index 86bd5474acc..38639eceec9 100644 --- a/build/openrpc/gateway.json +++ b/build/openrpc/gateway.json @@ -242,7 +242,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4013" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4007" } }, { @@ -473,7 +473,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4024" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4018" } }, { @@ -572,7 +572,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4035" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4029" } }, { @@ -668,7 +668,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4046" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4040" } }, { @@ -774,7 +774,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4057" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4051" } }, { @@ -871,7 +871,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4068" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4062" } }, { @@ -964,7 +964,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4079" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4073" } }, { @@ -1048,7 +1048,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4090" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4084" } }, { @@ -1212,7 +1212,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4101" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4095" } }, { @@ -1332,7 +1332,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4112" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4106" } }, { @@ -1469,7 +1469,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4123" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4117" } }, { @@ -1606,7 +1606,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4134" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4128" } }, { @@ -1653,7 +1653,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4145" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4139" } }, { @@ -1749,7 +1749,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4156" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4150" } }, { @@ -1786,7 +1786,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4178" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4172" } }, { @@ -1833,7 +1833,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4189" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4183" } }, { @@ -1873,7 +1873,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4200" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4194" } }, { @@ -1920,7 +1920,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4211" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4205" } }, { @@ -1975,7 +1975,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4222" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4216" } }, { @@ -2004,7 +2004,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4233" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4227" } }, { @@ -2141,7 +2141,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4244" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4238" } }, { @@ -2170,7 +2170,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4255" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4249" } }, { @@ -2224,7 +2224,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4266" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4260" } }, { @@ -2315,7 +2315,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4277" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4271" } }, { @@ -2343,7 +2343,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4288" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4282" } }, { @@ -2433,7 +2433,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4299" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4293" } }, { @@ -2689,7 +2689,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4310" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4304" } }, { @@ -2934,12 +2934,12 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4321" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4315" } }, { "name": "Filecoin.EthGetBlockReceipts", - "description": "```go\nfunc (s *GatewayStruct) EthGetBlockReceipts(p0 context.Context, p1 ethtypes.EthBlockNumberOrHash) ([]*EthTxReceipt, error) {\n\tif s.Internal.EthGetBlockReceipts == nil {\n\t\treturn *new([]*EthTxReceipt), ErrNotSupported\n\t}\n\treturn s.Internal.EthGetBlockReceipts(p0, p1)\n}\n```", + "description": "```go\nfunc (s *GatewayStruct) EthGetBlockReceipts(p0 context.Context, p1 ethtypes.EthBlockNumberOrHash) ([]*ethtypes.EthTxReceipt, error) {\n\tif s.Internal.EthGetBlockReceipts == nil {\n\t\treturn *new([]*ethtypes.EthTxReceipt), ErrNotSupported\n\t}\n\treturn s.Internal.EthGetBlockReceipts(p0, p1)\n}\n```", "summary": "There are not yet any comments for this method.", "paramStructure": "by-position", "params": [ @@ -2980,8 +2980,8 @@ } ], "result": { - "name": "[]*EthTxReceipt", - "description": "[]*EthTxReceipt", + "name": "[]*ethtypes.EthTxReceipt", + "description": "[]*ethtypes.EthTxReceipt", "summary": "", "schema": { "examples": [ @@ -3210,841 +3210,22 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4332" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4326" } }, { - "name": "Filecoin.EthGetBlockReceiptsLimited", - "description": "```go\nfunc (s *GatewayStruct) EthGetBlockReceiptsLimited(p0 context.Context, p1 ethtypes.EthBlockNumberOrHash, p2 abi.ChainEpoch) ([]*EthTxReceipt, error) {\n\tif s.Internal.EthGetBlockReceiptsLimited == nil {\n\t\treturn *new([]*EthTxReceipt), ErrNotSupported\n\t}\n\treturn s.Internal.EthGetBlockReceiptsLimited(p0, p1, p2)\n}\n```", - "summary": "There are not yet any comments for this method.", - "paramStructure": "by-position", - "params": [ - { - "name": "p1", - "description": "ethtypes.EthBlockNumberOrHash", - "summary": "", - "schema": { - "examples": [ - "string value" - ], - "additionalProperties": false, - "properties": { - "blockHash": { - "items": { - "description": "Number is a number", - "title": "number", - "type": "number" - }, - "maxItems": 32, - "minItems": 32, - "type": "array" - }, - "blockNumber": { - "title": "number", - "type": "number" - }, - "requireCanonical": { - "type": "boolean" - } - }, - "type": [ - "object" - ] - }, - "required": true, - "deprecated": false - }, - { - "name": "p2", - "description": "abi.ChainEpoch", - "summary": "", - "schema": { - "title": "number", - "description": "Number is a number", - "examples": [ - 10101 - ], - "type": [ - "number" - ] - }, - "required": true, - "deprecated": false - } - ], - "result": { - "name": "[]*EthTxReceipt", - "description": "[]*EthTxReceipt", - "summary": "", - "schema": { - "examples": [ - [ - { - "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" - } - ] - ], - "items": [ - { - "additionalProperties": false, - "properties": { - "blockHash": { - "items": { - "description": "Number is a number", - "title": "number", - "type": "number" - }, - "maxItems": 32, - "minItems": 32, - "type": "array" - }, - "blockNumber": { - "title": "number", - "type": "number" - }, - "contractAddress": { - "items": { - "description": "Number is a number", - "title": "number", - "type": "number" - }, - "maxItems": 20, - "minItems": 20, - "type": "array" - }, - "cumulativeGasUsed": { - "title": "number", - "type": "number" - }, - "effectiveGasPrice": { - "additionalProperties": false, - "type": "object" - }, - "from": { - "items": { - "description": "Number is a number", - "title": "number", - "type": "number" - }, - "maxItems": 20, - "minItems": 20, - "type": "array" - }, - "gasUsed": { - "title": "number", - "type": "number" - }, - "logs": { - "items": { - "additionalProperties": false, - "properties": { - "address": { - "items": { - "description": "Number is a number", - "title": "number", - "type": "number" - }, - "maxItems": 20, - "minItems": 20, - "type": "array" - }, - "blockHash": { - "items": { - "description": "Number is a number", - "title": "number", - "type": "number" - }, - "maxItems": 32, - "minItems": 32, - "type": "array" - }, - "blockNumber": { - "title": "number", - "type": "number" - }, - "data": { - "items": { - "description": "Number is a number", - "title": "number", - "type": "number" - }, - "type": "array" - }, - "logIndex": { - "title": "number", - "type": "number" - }, - "removed": { - "type": "boolean" - }, - "topics": { - "items": { - "items": { - "description": "Number is a number", - "title": "number", - "type": "number" - }, - "maxItems": 32, - "minItems": 32, - "type": "array" - }, - "type": "array" - }, - "transactionHash": { - "items": { - "description": "Number is a number", - "title": "number", - "type": "number" - }, - "maxItems": 32, - "minItems": 32, - "type": "array" - }, - "transactionIndex": { - "title": "number", - "type": "number" - } - }, - "type": "object" - }, - "type": "array" - }, - "logsBloom": { - "items": { - "description": "Number is a number", - "title": "number", - "type": "number" - }, - "type": "array" - }, - "root": { - "items": { - "description": "Number is a number", - "title": "number", - "type": "number" - }, - "maxItems": 32, - "minItems": 32, - "type": "array" - }, - "status": { - "title": "number", - "type": "number" - }, - "to": { - "items": { - "description": "Number is a number", - "title": "number", - "type": "number" - }, - "maxItems": 20, - "minItems": 20, - "type": "array" - }, - "transactionHash": { - "items": { - "description": "Number is a number", - "title": "number", - "type": "number" - }, - "maxItems": 32, - "minItems": 32, - "type": "array" - }, - "transactionIndex": { - "title": "number", - "type": "number" - }, - "type": { - "title": "number", - "type": "number" - } - }, - "type": [ - "object" - ] - } - ], - "type": [ - "array" - ] - }, - "required": true, - "deprecated": false - }, - "deprecated": false, - "externalDocs": { - "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4343" - } - }, - { - "name": "Filecoin.EthGetBlockTransactionCountByHash", - "description": "```go\nfunc (s *GatewayStruct) EthGetBlockTransactionCountByHash(p0 context.Context, p1 ethtypes.EthHash) (ethtypes.EthUint64, error) {\n\tif s.Internal.EthGetBlockTransactionCountByHash == nil {\n\t\treturn *new(ethtypes.EthUint64), ErrNotSupported\n\t}\n\treturn s.Internal.EthGetBlockTransactionCountByHash(p0, p1)\n}\n```", - "summary": "There are not yet any comments for this method.", - "paramStructure": "by-position", - "params": [ - { - "name": "p1", - "description": "ethtypes.EthHash", - "summary": "", - "schema": { - "examples": [ - "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e" - ], - "items": [ - { - "title": "number", - "description": "Number is a number", - "type": [ - "number" - ] - } - ], - "maxItems": 32, - "minItems": 32, - "type": [ - "array" - ] - }, - "required": true, - "deprecated": false - } - ], - "result": { - "name": "ethtypes.EthUint64", - "description": "ethtypes.EthUint64", - "summary": "", - "schema": { - "title": "number", - "description": "Number is a number", - "examples": [ - "0x5" - ], - "type": [ - "number" - ] - }, - "required": true, - "deprecated": false - }, - "deprecated": false, - "externalDocs": { - "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4354" - } - }, - { - "name": "Filecoin.EthGetBlockTransactionCountByNumber", - "description": "```go\nfunc (s *GatewayStruct) EthGetBlockTransactionCountByNumber(p0 context.Context, p1 ethtypes.EthUint64) (ethtypes.EthUint64, error) {\n\tif s.Internal.EthGetBlockTransactionCountByNumber == nil {\n\t\treturn *new(ethtypes.EthUint64), ErrNotSupported\n\t}\n\treturn s.Internal.EthGetBlockTransactionCountByNumber(p0, p1)\n}\n```", - "summary": "There are not yet any comments for this method.", - "paramStructure": "by-position", - "params": [ - { - "name": "p1", - "description": "ethtypes.EthUint64", - "summary": "", - "schema": { - "title": "number", - "description": "Number is a number", - "examples": [ - "0x5" - ], - "type": [ - "number" - ] - }, - "required": true, - "deprecated": false - } - ], - "result": { - "name": "ethtypes.EthUint64", - "description": "ethtypes.EthUint64", - "summary": "", - "schema": { - "title": "number", - "description": "Number is a number", - "examples": [ - "0x5" - ], - "type": [ - "number" - ] - }, - "required": true, - "deprecated": false - }, - "deprecated": false, - "externalDocs": { - "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4365" - } - }, - { - "name": "Filecoin.EthGetCode", - "description": "```go\nfunc (s *GatewayStruct) EthGetCode(p0 context.Context, p1 ethtypes.EthAddress, p2 ethtypes.EthBlockNumberOrHash) (ethtypes.EthBytes, error) {\n\tif s.Internal.EthGetCode == nil {\n\t\treturn *new(ethtypes.EthBytes), ErrNotSupported\n\t}\n\treturn s.Internal.EthGetCode(p0, p1, p2)\n}\n```", - "summary": "There are not yet any comments for this method.", - "paramStructure": "by-position", - "params": [ - { - "name": "p1", - "description": "ethtypes.EthAddress", - "summary": "", - "schema": { - "examples": [ - "0x5cbeecf99d3fdb3f25e309cc264f240bb0664031" - ], - "items": [ - { - "title": "number", - "description": "Number is a number", - "type": [ - "number" - ] - } - ], - "maxItems": 20, - "minItems": 20, - "type": [ - "array" - ] - }, - "required": true, - "deprecated": false - }, - { - "name": "p2", - "description": "ethtypes.EthBlockNumberOrHash", - "summary": "", - "schema": { - "examples": [ - "string value" - ], - "additionalProperties": false, - "properties": { - "blockHash": { - "items": { - "description": "Number is a number", - "title": "number", - "type": "number" - }, - "maxItems": 32, - "minItems": 32, - "type": "array" - }, - "blockNumber": { - "title": "number", - "type": "number" - }, - "requireCanonical": { - "type": "boolean" - } - }, - "type": [ - "object" - ] - }, - "required": true, - "deprecated": false - } - ], - "result": { - "name": "ethtypes.EthBytes", - "description": "ethtypes.EthBytes", - "summary": "", - "schema": { - "examples": [ - "0x07" - ], - "items": [ - { - "title": "number", - "description": "Number is a number", - "type": [ - "number" - ] - } - ], - "type": [ - "array" - ] - }, - "required": true, - "deprecated": false - }, - "deprecated": false, - "externalDocs": { - "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4376" - } - }, - { - "name": "Filecoin.EthGetFilterChanges", - "description": "```go\nfunc (s *GatewayStruct) EthGetFilterChanges(p0 context.Context, p1 ethtypes.EthFilterID) (*ethtypes.EthFilterResult, error) {\n\tif s.Internal.EthGetFilterChanges == nil {\n\t\treturn nil, ErrNotSupported\n\t}\n\treturn s.Internal.EthGetFilterChanges(p0, p1)\n}\n```", - "summary": "There are not yet any comments for this method.", - "paramStructure": "by-position", - "params": [ - { - "name": "p1", - "description": "ethtypes.EthFilterID", - "summary": "", - "schema": { - "examples": [ - "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e" - ], - "items": [ - { - "title": "number", - "description": "Number is a number", - "type": [ - "number" - ] - } - ], - "maxItems": 32, - "minItems": 32, - "type": [ - "array" - ] - }, - "required": true, - "deprecated": false - } - ], - "result": { - "name": "*ethtypes.EthFilterResult", - "description": "*ethtypes.EthFilterResult", - "summary": "", - "schema": { - "examples": [ - [ - {} - ] - ], - "additionalProperties": false, - "properties": { - "Results": { - "items": { - "additionalProperties": true, - "type": "object" - }, - "type": "array" - } - }, - "type": [ - "object" - ] - }, - "required": true, - "deprecated": false - }, - "deprecated": false, - "externalDocs": { - "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4387" - } - }, - { - "name": "Filecoin.EthGetFilterLogs", - "description": "```go\nfunc (s *GatewayStruct) EthGetFilterLogs(p0 context.Context, p1 ethtypes.EthFilterID) (*ethtypes.EthFilterResult, error) {\n\tif s.Internal.EthGetFilterLogs == nil {\n\t\treturn nil, ErrNotSupported\n\t}\n\treturn s.Internal.EthGetFilterLogs(p0, p1)\n}\n```", - "summary": "There are not yet any comments for this method.", - "paramStructure": "by-position", - "params": [ - { - "name": "p1", - "description": "ethtypes.EthFilterID", - "summary": "", - "schema": { - "examples": [ - "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e" - ], - "items": [ - { - "title": "number", - "description": "Number is a number", - "type": [ - "number" - ] - } - ], - "maxItems": 32, - "minItems": 32, - "type": [ - "array" - ] - }, - "required": true, - "deprecated": false - } - ], - "result": { - "name": "*ethtypes.EthFilterResult", - "description": "*ethtypes.EthFilterResult", - "summary": "", - "schema": { - "examples": [ - [ - {} - ] - ], - "additionalProperties": false, - "properties": { - "Results": { - "items": { - "additionalProperties": true, - "type": "object" - }, - "type": "array" - } - }, - "type": [ - "object" - ] - }, - "required": true, - "deprecated": false - }, - "deprecated": false, - "externalDocs": { - "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4398" - } - }, - { - "name": "Filecoin.EthGetLogs", - "description": "```go\nfunc (s *GatewayStruct) EthGetLogs(p0 context.Context, p1 *ethtypes.EthFilterSpec) (*ethtypes.EthFilterResult, error) {\n\tif s.Internal.EthGetLogs == nil {\n\t\treturn nil, ErrNotSupported\n\t}\n\treturn s.Internal.EthGetLogs(p0, p1)\n}\n```", - "summary": "There are not yet any comments for this method.", - "paramStructure": "by-position", - "params": [ - { - "name": "p1", - "description": "*ethtypes.EthFilterSpec", - "summary": "", - "schema": { - "examples": [ - { - "fromBlock": "2301220", - "address": [ - "0x5cbeecf99d3fdb3f25e309cc264f240bb0664031" - ], - "topics": null - } - ], - "additionalProperties": false, - "properties": { - "address": { - "items": { - "items": { - "description": "Number is a number", - "title": "number", - "type": "number" - }, - "maxItems": 20, - "minItems": 20, - "type": "array" - }, - "type": "array" - }, - "blockHash": { - "items": { - "description": "Number is a number", - "title": "number", - "type": "number" - }, - "maxItems": 32, - "minItems": 32, - "type": "array" - }, - "fromBlock": { - "type": "string" - }, - "toBlock": { - "type": "string" - }, - "topics": { - "items": { - "items": { - "items": { - "description": "Number is a number", - "title": "number", - "type": "number" - }, - "maxItems": 32, - "minItems": 32, - "type": "array" - }, - "type": "array" - }, - "type": "array" - } - }, - "type": [ - "object" - ] - }, - "required": true, - "deprecated": false - } - ], - "result": { - "name": "*ethtypes.EthFilterResult", - "description": "*ethtypes.EthFilterResult", - "summary": "", - "schema": { - "examples": [ - [ - {} - ] - ], - "additionalProperties": false, - "properties": { - "Results": { - "items": { - "additionalProperties": true, - "type": "object" - }, - "type": "array" - } - }, - "type": [ - "object" - ] - }, - "required": true, - "deprecated": false - }, - "deprecated": false, - "externalDocs": { - "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4409" - } - }, - { - "name": "Filecoin.EthGetMessageCidByTransactionHash", - "description": "```go\nfunc (s *GatewayStruct) EthGetMessageCidByTransactionHash(p0 context.Context, p1 *ethtypes.EthHash) (*cid.Cid, error) {\n\tif s.Internal.EthGetMessageCidByTransactionHash == nil {\n\t\treturn nil, ErrNotSupported\n\t}\n\treturn s.Internal.EthGetMessageCidByTransactionHash(p0, p1)\n}\n```", - "summary": "There are not yet any comments for this method.", - "paramStructure": "by-position", - "params": [ - { - "name": "p1", - "description": "*ethtypes.EthHash", - "summary": "", - "schema": { - "examples": [ - "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e" - ], - "items": [ - { - "title": "number", - "description": "Number is a number", - "type": [ - "number" - ] - } - ], - "maxItems": 32, - "minItems": 32, - "type": [ - "array" - ] - }, - "required": true, - "deprecated": false - } - ], - "result": { - "name": "*cid.Cid", - "description": "*cid.Cid", - "summary": "", - "schema": { - "title": "Content Identifier", - "description": "Cid represents a self-describing content addressed identifier. It is formed by a Version, a Codec (which indicates a multicodec-packed content type) and a Multihash.", - "examples": [ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - } - ], - "type": [ - "string" - ] - }, - "required": true, - "deprecated": false - }, - "deprecated": false, - "externalDocs": { - "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4420" - } - }, - { - "name": "Filecoin.EthGetStorageAt", - "description": "```go\nfunc (s *GatewayStruct) EthGetStorageAt(p0 context.Context, p1 ethtypes.EthAddress, p2 ethtypes.EthBytes, p3 ethtypes.EthBlockNumberOrHash) (ethtypes.EthBytes, error) {\n\tif s.Internal.EthGetStorageAt == nil {\n\t\treturn *new(ethtypes.EthBytes), ErrNotSupported\n\t}\n\treturn s.Internal.EthGetStorageAt(p0, p1, p2, p3)\n}\n```", - "summary": "There are not yet any comments for this method.", - "paramStructure": "by-position", - "params": [ - { - "name": "p1", - "description": "ethtypes.EthAddress", - "summary": "", - "schema": { - "examples": [ - "0x5cbeecf99d3fdb3f25e309cc264f240bb0664031" - ], - "items": [ - { - "title": "number", - "description": "Number is a number", - "type": [ - "number" - ] - } - ], - "maxItems": 20, - "minItems": 20, - "type": [ - "array" - ] - }, - "required": true, - "deprecated": false - }, + "name": "Filecoin.EthGetBlockTransactionCountByHash", + "description": "```go\nfunc (s *GatewayStruct) EthGetBlockTransactionCountByHash(p0 context.Context, p1 ethtypes.EthHash) (ethtypes.EthUint64, error) {\n\tif s.Internal.EthGetBlockTransactionCountByHash == nil {\n\t\treturn *new(ethtypes.EthUint64), ErrNotSupported\n\t}\n\treturn s.Internal.EthGetBlockTransactionCountByHash(p0, p1)\n}\n```", + "summary": "There are not yet any comments for this method.", + "paramStructure": "by-position", + "params": [ { - "name": "p2", - "description": "ethtypes.EthBytes", + "name": "p1", + "description": "ethtypes.EthHash", "summary": "", "schema": { "examples": [ - "0x07" + "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e" ], "items": [ { @@ -4055,43 +3236,55 @@ ] } ], + "maxItems": 32, + "minItems": 32, "type": [ "array" ] }, "required": true, "deprecated": false + } + ], + "result": { + "name": "ethtypes.EthUint64", + "description": "ethtypes.EthUint64", + "summary": "", + "schema": { + "title": "number", + "description": "Number is a number", + "examples": [ + "0x5" + ], + "type": [ + "number" + ] }, + "required": true, + "deprecated": false + }, + "deprecated": false, + "externalDocs": { + "description": "Github remote link", + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4337" + } + }, + { + "name": "Filecoin.EthGetBlockTransactionCountByNumber", + "description": "```go\nfunc (s *GatewayStruct) EthGetBlockTransactionCountByNumber(p0 context.Context, p1 string) (ethtypes.EthUint64, error) {\n\tif s.Internal.EthGetBlockTransactionCountByNumber == nil {\n\t\treturn *new(ethtypes.EthUint64), ErrNotSupported\n\t}\n\treturn s.Internal.EthGetBlockTransactionCountByNumber(p0, p1)\n}\n```", + "summary": "There are not yet any comments for this method.", + "paramStructure": "by-position", + "params": [ { - "name": "p3", - "description": "ethtypes.EthBlockNumberOrHash", + "name": "p1", + "description": "string", "summary": "", "schema": { "examples": [ "string value" ], - "additionalProperties": false, - "properties": { - "blockHash": { - "items": { - "description": "Number is a number", - "title": "number", - "type": "number" - }, - "maxItems": 32, - "minItems": 32, - "type": "array" - }, - "blockNumber": { - "title": "number", - "type": "number" - }, - "requireCanonical": { - "type": "boolean" - } - }, "type": [ - "object" + "string" ] }, "required": true, @@ -4099,24 +3292,17 @@ } ], "result": { - "name": "ethtypes.EthBytes", - "description": "ethtypes.EthBytes", + "name": "ethtypes.EthUint64", + "description": "ethtypes.EthUint64", "summary": "", "schema": { + "title": "number", + "description": "Number is a number", "examples": [ - "0x07" - ], - "items": [ - { - "title": "number", - "description": "Number is a number", - "type": [ - "number" - ] - } + "0x5" ], "type": [ - "array" + "number" ] }, "required": true, @@ -4125,22 +3311,22 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4431" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4348" } }, { - "name": "Filecoin.EthGetTransactionByBlockHashAndIndex", - "description": "```go\nfunc (s *GatewayStruct) EthGetTransactionByBlockHashAndIndex(p0 context.Context, p1 ethtypes.EthHash, p2 ethtypes.EthUint64) (*ethtypes.EthTx, error) {\n\tif s.Internal.EthGetTransactionByBlockHashAndIndex == nil {\n\t\treturn nil, ErrNotSupported\n\t}\n\treturn s.Internal.EthGetTransactionByBlockHashAndIndex(p0, p1, p2)\n}\n```", + "name": "Filecoin.EthGetCode", + "description": "```go\nfunc (s *GatewayStruct) EthGetCode(p0 context.Context, p1 ethtypes.EthAddress, p2 ethtypes.EthBlockNumberOrHash) (ethtypes.EthBytes, error) {\n\tif s.Internal.EthGetCode == nil {\n\t\treturn *new(ethtypes.EthBytes), ErrNotSupported\n\t}\n\treturn s.Internal.EthGetCode(p0, p1, p2)\n}\n```", "summary": "There are not yet any comments for this method.", "paramStructure": "by-position", "params": [ { "name": "p1", - "description": "ethtypes.EthHash", + "description": "ethtypes.EthAddress", "summary": "", "schema": { "examples": [ - "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e" + "0x5cbeecf99d3fdb3f25e309cc264f240bb0664031" ], "items": [ { @@ -4151,8 +3337,8 @@ ] } ], - "maxItems": 32, - "minItems": 32, + "maxItems": 20, + "minItems": 20, "type": [ "array" ] @@ -4162,56 +3348,15 @@ }, { "name": "p2", - "description": "ethtypes.EthUint64", + "description": "ethtypes.EthBlockNumberOrHash", "summary": "", "schema": { - "title": "number", - "description": "Number is a number", "examples": [ - "0x5" + "string value" ], - "type": [ - "number" - ] - }, - "required": true, - "deprecated": false - } - ], - "result": { - "name": "*ethtypes.EthTx", - "description": "*ethtypes.EthTx", - "summary": "", - "schema": { - "examples": [ - { - "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", - "gasPrice": "0x0", - "accessList": [ - "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e" - ], - "v": "0x0", - "r": "0x0", - "s": "0x0" - } - ], - "additionalProperties": false, - "properties": { - "accessList": { - "items": { + "additionalProperties": false, + "properties": { + "blockHash": { "items": { "description": "Number is a number", "title": "number", @@ -4220,112 +3365,42 @@ "maxItems": 32, "minItems": 32, "type": "array" - }, - "type": "array" - }, - "blockHash": { - "items": { - "description": "Number is a number", - "title": "number", - "type": "number" - }, - "maxItems": 32, - "minItems": 32, - "type": "array" - }, - "blockNumber": { - "title": "number", - "type": "number" - }, - "chainId": { - "title": "number", - "type": "number" - }, - "from": { - "items": { - "description": "Number is a number", - "title": "number", - "type": "number" - }, - "maxItems": 20, - "minItems": 20, - "type": "array" - }, - "gas": { - "title": "number", - "type": "number" - }, - "gasPrice": { - "additionalProperties": false, - "type": "object" - }, - "hash": { - "items": { - "description": "Number is a number", - "title": "number", - "type": "number" - }, - "maxItems": 32, - "minItems": 32, - "type": "array" - }, - "input": { - "items": { - "description": "Number is a number", - "title": "number", - "type": "number" - }, - "type": "array" - }, - "maxFeePerGas": { - "additionalProperties": false, - "type": "object" - }, - "maxPriorityFeePerGas": { - "additionalProperties": false, - "type": "object" - }, - "nonce": { - "title": "number", - "type": "number" - }, - "r": { - "additionalProperties": false, - "type": "object" - }, - "s": { - "additionalProperties": false, - "type": "object" - }, - "to": { - "items": { - "description": "Number is a number", - "title": "number", - "type": "number" - }, - "maxItems": 20, - "minItems": 20, - "type": "array" - }, - "transactionIndex": { - "title": "number", - "type": "number" + }, + "blockNumber": { + "title": "number", + "type": "number" + }, + "requireCanonical": { + "type": "boolean" + } }, - "type": { + "type": [ + "object" + ] + }, + "required": true, + "deprecated": false + } + ], + "result": { + "name": "ethtypes.EthBytes", + "description": "ethtypes.EthBytes", + "summary": "", + "schema": { + "examples": [ + "0x07" + ], + "items": [ + { "title": "number", - "type": "number" - }, - "v": { - "additionalProperties": false, - "type": "object" - }, - "value": { - "additionalProperties": false, - "type": "object" + "description": "Number is a number", + "type": [ + "number" + ] } - }, + ], "type": [ - "object" + "array" ] }, "required": true, @@ -4334,42 +3409,102 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4442" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4359" } }, { - "name": "Filecoin.EthGetTransactionByBlockNumberAndIndex", - "description": "```go\nfunc (s *GatewayStruct) EthGetTransactionByBlockNumberAndIndex(p0 context.Context, p1 string, p2 ethtypes.EthUint64) (*ethtypes.EthTx, error) {\n\tif s.Internal.EthGetTransactionByBlockNumberAndIndex == nil {\n\t\treturn nil, ErrNotSupported\n\t}\n\treturn s.Internal.EthGetTransactionByBlockNumberAndIndex(p0, p1, p2)\n}\n```", + "name": "Filecoin.EthGetFilterChanges", + "description": "```go\nfunc (s *GatewayStruct) EthGetFilterChanges(p0 context.Context, p1 ethtypes.EthFilterID) (*ethtypes.EthFilterResult, error) {\n\tif s.Internal.EthGetFilterChanges == nil {\n\t\treturn nil, ErrNotSupported\n\t}\n\treturn s.Internal.EthGetFilterChanges(p0, p1)\n}\n```", "summary": "There are not yet any comments for this method.", "paramStructure": "by-position", "params": [ { "name": "p1", - "description": "string", + "description": "ethtypes.EthFilterID", "summary": "", "schema": { "examples": [ - "string value" + "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e" + ], + "items": [ + { + "title": "number", + "description": "Number is a number", + "type": [ + "number" + ] + } ], + "maxItems": 32, + "minItems": 32, "type": [ - "string" + "array" ] }, "required": true, "deprecated": false + } + ], + "result": { + "name": "*ethtypes.EthFilterResult", + "description": "*ethtypes.EthFilterResult", + "summary": "", + "schema": { + "examples": [ + [ + {} + ] + ], + "additionalProperties": false, + "properties": { + "Results": { + "items": { + "additionalProperties": true, + "type": "object" + }, + "type": "array" + } + }, + "type": [ + "object" + ] }, + "required": true, + "deprecated": false + }, + "deprecated": false, + "externalDocs": { + "description": "Github remote link", + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4370" + } + }, + { + "name": "Filecoin.EthGetFilterLogs", + "description": "```go\nfunc (s *GatewayStruct) EthGetFilterLogs(p0 context.Context, p1 ethtypes.EthFilterID) (*ethtypes.EthFilterResult, error) {\n\tif s.Internal.EthGetFilterLogs == nil {\n\t\treturn nil, ErrNotSupported\n\t}\n\treturn s.Internal.EthGetFilterLogs(p0, p1)\n}\n```", + "summary": "There are not yet any comments for this method.", + "paramStructure": "by-position", + "params": [ { - "name": "p2", - "description": "ethtypes.EthUint64", + "name": "p1", + "description": "ethtypes.EthFilterID", "summary": "", "schema": { - "title": "number", - "description": "Number is a number", "examples": [ - "0x5" + "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e" ], + "items": [ + { + "title": "number", + "description": "Number is a number", + "type": [ + "number" + ] + } + ], + "maxItems": 32, + "minItems": 32, "type": [ - "number" + "array" ] }, "required": true, @@ -4377,39 +3512,74 @@ } ], "result": { - "name": "*ethtypes.EthTx", - "description": "*ethtypes.EthTx", + "name": "*ethtypes.EthFilterResult", + "description": "*ethtypes.EthFilterResult", "summary": "", "schema": { "examples": [ - { - "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", - "gasPrice": "0x0", - "accessList": [ - "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e" - ], - "v": "0x0", - "r": "0x0", - "s": "0x0" - } + [ + {} + ] ], "additionalProperties": false, "properties": { - "accessList": { + "Results": { "items": { + "additionalProperties": true, + "type": "object" + }, + "type": "array" + } + }, + "type": [ + "object" + ] + }, + "required": true, + "deprecated": false + }, + "deprecated": false, + "externalDocs": { + "description": "Github remote link", + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4381" + } + }, + { + "name": "Filecoin.EthGetLogs", + "description": "```go\nfunc (s *GatewayStruct) EthGetLogs(p0 context.Context, p1 *ethtypes.EthFilterSpec) (*ethtypes.EthFilterResult, error) {\n\tif s.Internal.EthGetLogs == nil {\n\t\treturn nil, ErrNotSupported\n\t}\n\treturn s.Internal.EthGetLogs(p0, p1)\n}\n```", + "summary": "There are not yet any comments for this method.", + "paramStructure": "by-position", + "params": [ + { + "name": "p1", + "description": "*ethtypes.EthFilterSpec", + "summary": "", + "schema": { + "examples": [ + { + "fromBlock": "2301220", + "address": [ + "0x5cbeecf99d3fdb3f25e309cc264f240bb0664031" + ], + "topics": null + } + ], + "additionalProperties": false, + "properties": { + "address": { + "items": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 20, + "minItems": 20, + "type": "array" + }, + "type": "array" + }, + "blockHash": { "items": { "description": "Number is a number", "title": "number", @@ -4417,109 +3587,57 @@ }, "maxItems": 32, "minItems": 32, - "type": "array" - }, - "type": "array" - }, - "blockHash": { - "items": { - "description": "Number is a number", - "title": "number", - "type": "number" - }, - "maxItems": 32, - "minItems": 32, - "type": "array" - }, - "blockNumber": { - "title": "number", - "type": "number" - }, - "chainId": { - "title": "number", - "type": "number" - }, - "from": { - "items": { - "description": "Number is a number", - "title": "number", - "type": "number" - }, - "maxItems": 20, - "minItems": 20, - "type": "array" - }, - "gas": { - "title": "number", - "type": "number" - }, - "gasPrice": { - "additionalProperties": false, - "type": "object" - }, - "hash": { - "items": { - "description": "Number is a number", - "title": "number", - "type": "number" + "type": "array" }, - "maxItems": 32, - "minItems": 32, - "type": "array" - }, - "input": { - "items": { - "description": "Number is a number", - "title": "number", - "type": "number" + "fromBlock": { + "type": "string" }, - "type": "array" - }, - "maxFeePerGas": { - "additionalProperties": false, - "type": "object" - }, - "maxPriorityFeePerGas": { - "additionalProperties": false, - "type": "object" - }, - "nonce": { - "title": "number", - "type": "number" - }, - "r": { - "additionalProperties": false, - "type": "object" - }, - "s": { - "additionalProperties": false, - "type": "object" + "toBlock": { + "type": "string" + }, + "topics": { + "items": { + "items": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 32, + "minItems": 32, + "type": "array" + }, + "type": "array" + }, + "type": "array" + } }, - "to": { + "type": [ + "object" + ] + }, + "required": true, + "deprecated": false + } + ], + "result": { + "name": "*ethtypes.EthFilterResult", + "description": "*ethtypes.EthFilterResult", + "summary": "", + "schema": { + "examples": [ + [ + {} + ] + ], + "additionalProperties": false, + "properties": { + "Results": { "items": { - "description": "Number is a number", - "title": "number", - "type": "number" + "additionalProperties": true, + "type": "object" }, - "maxItems": 20, - "minItems": 20, "type": "array" - }, - "transactionIndex": { - "title": "number", - "type": "number" - }, - "type": { - "title": "number", - "type": "number" - }, - "v": { - "additionalProperties": false, - "type": "object" - }, - "value": { - "additionalProperties": false, - "type": "object" } }, "type": [ @@ -4532,12 +3650,12 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4453" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4392" } }, { - "name": "Filecoin.EthGetTransactionByHash", - "description": "```go\nfunc (s *GatewayStruct) EthGetTransactionByHash(p0 context.Context, p1 *ethtypes.EthHash) (*ethtypes.EthTx, error) {\n\tif s.Internal.EthGetTransactionByHash == nil {\n\t\treturn nil, ErrNotSupported\n\t}\n\treturn s.Internal.EthGetTransactionByHash(p0, p1)\n}\n```", + "name": "Filecoin.EthGetMessageCidByTransactionHash", + "description": "```go\nfunc (s *GatewayStruct) EthGetMessageCidByTransactionHash(p0 context.Context, p1 *ethtypes.EthHash) (*cid.Cid, error) {\n\tif s.Internal.EthGetMessageCidByTransactionHash == nil {\n\t\treturn nil, ErrNotSupported\n\t}\n\treturn s.Internal.EthGetMessageCidByTransactionHash(p0, p1)\n}\n```", "summary": "There are not yet any comments for this method.", "paramStructure": "by-position", "params": [ @@ -4569,153 +3687,141 @@ } ], "result": { - "name": "*ethtypes.EthTx", - "description": "*ethtypes.EthTx", + "name": "*cid.Cid", + "description": "*cid.Cid", "summary": "", "schema": { + "title": "Content Identifier", + "description": "Cid represents a self-describing content addressed identifier. It is formed by a Version, a Codec (which indicates a multicodec-packed content type) and a Multihash.", "examples": [ { - "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", - "gasPrice": "0x0", - "accessList": [ - "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e" - ], - "v": "0x0", - "r": "0x0", - "s": "0x0" + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" } ], - "additionalProperties": false, - "properties": { - "accessList": { - "items": { - "items": { - "description": "Number is a number", - "title": "number", - "type": "number" - }, - "maxItems": 32, - "minItems": 32, - "type": "array" - }, - "type": "array" - }, - "blockHash": { - "items": { - "description": "Number is a number", - "title": "number", - "type": "number" - }, - "maxItems": 32, - "minItems": 32, - "type": "array" - }, - "blockNumber": { - "title": "number", - "type": "number" - }, - "chainId": { - "title": "number", - "type": "number" - }, - "from": { - "items": { - "description": "Number is a number", - "title": "number", - "type": "number" - }, - "maxItems": 20, - "minItems": 20, - "type": "array" - }, - "gas": { - "title": "number", - "type": "number" - }, - "gasPrice": { - "additionalProperties": false, - "type": "object" - }, - "hash": { - "items": { - "description": "Number is a number", + "type": [ + "string" + ] + }, + "required": true, + "deprecated": false + }, + "deprecated": false, + "externalDocs": { + "description": "Github remote link", + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4403" + } + }, + { + "name": "Filecoin.EthGetStorageAt", + "description": "```go\nfunc (s *GatewayStruct) EthGetStorageAt(p0 context.Context, p1 ethtypes.EthAddress, p2 ethtypes.EthBytes, p3 ethtypes.EthBlockNumberOrHash) (ethtypes.EthBytes, error) {\n\tif s.Internal.EthGetStorageAt == nil {\n\t\treturn *new(ethtypes.EthBytes), ErrNotSupported\n\t}\n\treturn s.Internal.EthGetStorageAt(p0, p1, p2, p3)\n}\n```", + "summary": "There are not yet any comments for this method.", + "paramStructure": "by-position", + "params": [ + { + "name": "p1", + "description": "ethtypes.EthAddress", + "summary": "", + "schema": { + "examples": [ + "0x5cbeecf99d3fdb3f25e309cc264f240bb0664031" + ], + "items": [ + { "title": "number", - "type": "number" - }, - "maxItems": 32, - "minItems": 32, - "type": "array" - }, - "input": { - "items": { "description": "Number is a number", - "title": "number", - "type": "number" - }, - "type": "array" - }, - "maxFeePerGas": { - "additionalProperties": false, - "type": "object" - }, - "maxPriorityFeePerGas": { - "additionalProperties": false, - "type": "object" - }, - "nonce": { - "title": "number", - "type": "number" - }, - "r": { - "additionalProperties": false, - "type": "object" - }, - "s": { - "additionalProperties": false, - "type": "object" - }, - "to": { - "items": { + "type": [ + "number" + ] + } + ], + "maxItems": 20, + "minItems": 20, + "type": [ + "array" + ] + }, + "required": true, + "deprecated": false + }, + { + "name": "p2", + "description": "ethtypes.EthBytes", + "summary": "", + "schema": { + "examples": [ + "0x07" + ], + "items": [ + { + "title": "number", "description": "Number is a number", + "type": [ + "number" + ] + } + ], + "type": [ + "array" + ] + }, + "required": true, + "deprecated": false + }, + { + "name": "p3", + "description": "ethtypes.EthBlockNumberOrHash", + "summary": "", + "schema": { + "examples": [ + "string value" + ], + "additionalProperties": false, + "properties": { + "blockHash": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 32, + "minItems": 32, + "type": "array" + }, + "blockNumber": { "title": "number", "type": "number" }, - "maxItems": 20, - "minItems": 20, - "type": "array" - }, - "transactionIndex": { - "title": "number", - "type": "number" + "requireCanonical": { + "type": "boolean" + } }, - "type": { + "type": [ + "object" + ] + }, + "required": true, + "deprecated": false + } + ], + "result": { + "name": "ethtypes.EthBytes", + "description": "ethtypes.EthBytes", + "summary": "", + "schema": { + "examples": [ + "0x07" + ], + "items": [ + { "title": "number", - "type": "number" - }, - "v": { - "additionalProperties": false, - "type": "object" - }, - "value": { - "additionalProperties": false, - "type": "object" + "description": "Number is a number", + "type": [ + "number" + ] } - }, + ], "type": [ - "object" + "array" ] }, "required": true, @@ -4724,18 +3830,18 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4464" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4414" } }, { - "name": "Filecoin.EthGetTransactionByHashLimited", - "description": "```go\nfunc (s *GatewayStruct) EthGetTransactionByHashLimited(p0 context.Context, p1 *ethtypes.EthHash, p2 abi.ChainEpoch) (*ethtypes.EthTx, error) {\n\tif s.Internal.EthGetTransactionByHashLimited == nil {\n\t\treturn nil, ErrNotSupported\n\t}\n\treturn s.Internal.EthGetTransactionByHashLimited(p0, p1, p2)\n}\n```", + "name": "Filecoin.EthGetTransactionByBlockHashAndIndex", + "description": "```go\nfunc (s *GatewayStruct) EthGetTransactionByBlockHashAndIndex(p0 context.Context, p1 ethtypes.EthHash, p2 ethtypes.EthUint64) (*ethtypes.EthTx, error) {\n\tif s.Internal.EthGetTransactionByBlockHashAndIndex == nil {\n\t\treturn nil, ErrNotSupported\n\t}\n\treturn s.Internal.EthGetTransactionByBlockHashAndIndex(p0, p1, p2)\n}\n```", "summary": "There are not yet any comments for this method.", "paramStructure": "by-position", "params": [ { "name": "p1", - "description": "*ethtypes.EthHash", + "description": "ethtypes.EthHash", "summary": "", "schema": { "examples": [ @@ -4761,13 +3867,13 @@ }, { "name": "p2", - "description": "abi.ChainEpoch", + "description": "ethtypes.EthUint64", "summary": "", "schema": { "title": "number", "description": "Number is a number", "examples": [ - 10101 + "0x5" ], "type": [ "number" @@ -4933,185 +4039,42 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4475" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4425" } }, { - "name": "Filecoin.EthGetTransactionCount", - "description": "```go\nfunc (s *GatewayStruct) EthGetTransactionCount(p0 context.Context, p1 ethtypes.EthAddress, p2 ethtypes.EthBlockNumberOrHash) (ethtypes.EthUint64, error) {\n\tif s.Internal.EthGetTransactionCount == nil {\n\t\treturn *new(ethtypes.EthUint64), ErrNotSupported\n\t}\n\treturn s.Internal.EthGetTransactionCount(p0, p1, p2)\n}\n```", + "name": "Filecoin.EthGetTransactionByBlockNumberAndIndex", + "description": "```go\nfunc (s *GatewayStruct) EthGetTransactionByBlockNumberAndIndex(p0 context.Context, p1 string, p2 ethtypes.EthUint64) (*ethtypes.EthTx, error) {\n\tif s.Internal.EthGetTransactionByBlockNumberAndIndex == nil {\n\t\treturn nil, ErrNotSupported\n\t}\n\treturn s.Internal.EthGetTransactionByBlockNumberAndIndex(p0, p1, p2)\n}\n```", "summary": "There are not yet any comments for this method.", "paramStructure": "by-position", "params": [ { "name": "p1", - "description": "ethtypes.EthAddress", - "summary": "", - "schema": { - "examples": [ - "0x5cbeecf99d3fdb3f25e309cc264f240bb0664031" - ], - "items": [ - { - "title": "number", - "description": "Number is a number", - "type": [ - "number" - ] - } - ], - "maxItems": 20, - "minItems": 20, - "type": [ - "array" - ] - }, - "required": true, - "deprecated": false - }, - { - "name": "p2", - "description": "ethtypes.EthBlockNumberOrHash", + "description": "string", "summary": "", "schema": { "examples": [ "string value" ], - "additionalProperties": false, - "properties": { - "blockHash": { - "items": { - "description": "Number is a number", - "title": "number", - "type": "number" - }, - "maxItems": 32, - "minItems": 32, - "type": "array" - }, - "blockNumber": { - "title": "number", - "type": "number" - }, - "requireCanonical": { - "type": "boolean" - } - }, - "type": [ - "object" - ] - }, - "required": true, - "deprecated": false - } - ], - "result": { - "name": "ethtypes.EthUint64", - "description": "ethtypes.EthUint64", - "summary": "", - "schema": { - "title": "number", - "description": "Number is a number", - "examples": [ - "0x5" - ], - "type": [ - "number" - ] - }, - "required": true, - "deprecated": false - }, - "deprecated": false, - "externalDocs": { - "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4486" - } - }, - { - "name": "Filecoin.EthGetTransactionHashByCid", - "description": "```go\nfunc (s *GatewayStruct) EthGetTransactionHashByCid(p0 context.Context, p1 cid.Cid) (*ethtypes.EthHash, error) {\n\tif s.Internal.EthGetTransactionHashByCid == nil {\n\t\treturn nil, ErrNotSupported\n\t}\n\treturn s.Internal.EthGetTransactionHashByCid(p0, p1)\n}\n```", - "summary": "There are not yet any comments for this method.", - "paramStructure": "by-position", - "params": [ - { - "name": "p1", - "description": "cid.Cid", - "summary": "", - "schema": { - "title": "Content Identifier", - "description": "Cid represents a self-describing content addressed identifier. It is formed by a Version, a Codec (which indicates a multicodec-packed content type) and a Multihash.", - "examples": [ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - } - ], "type": [ "string" ] }, "required": true, "deprecated": false - } - ], - "result": { - "name": "*ethtypes.EthHash", - "description": "*ethtypes.EthHash", - "summary": "", - "schema": { - "examples": [ - "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e" - ], - "items": [ - { - "title": "number", - "description": "Number is a number", - "type": [ - "number" - ] - } - ], - "maxItems": 32, - "minItems": 32, - "type": [ - "array" - ] - }, - "required": true, - "deprecated": false - }, - "deprecated": false, - "externalDocs": { - "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4497" - } - }, - { - "name": "Filecoin.EthGetTransactionReceipt", - "description": "```go\nfunc (s *GatewayStruct) EthGetTransactionReceipt(p0 context.Context, p1 ethtypes.EthHash) (*EthTxReceipt, error) {\n\tif s.Internal.EthGetTransactionReceipt == nil {\n\t\treturn nil, ErrNotSupported\n\t}\n\treturn s.Internal.EthGetTransactionReceipt(p0, p1)\n}\n```", - "summary": "There are not yet any comments for this method.", - "paramStructure": "by-position", - "params": [ - { - "name": "p1", - "description": "ethtypes.EthHash", - "summary": "", - "schema": { - "examples": [ - "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e" - ], - "items": [ - { - "title": "number", - "description": "Number is a number", - "type": [ - "number" - ] - } + }, + { + "name": "p2", + "description": "ethtypes.EthUint64", + "summary": "", + "schema": { + "title": "number", + "description": "Number is a number", + "examples": [ + "0x5" ], - "maxItems": 32, - "minItems": 32, "type": [ - "array" + "number" ] }, "required": true, @@ -5119,45 +4082,50 @@ } ], "result": { - "name": "*EthTxReceipt", - "description": "*EthTxReceipt", + "name": "*ethtypes.EthTx", + "description": "*ethtypes.EthTx", "summary": "", "schema": { "examples": [ { - "transactionHash": "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e", - "transactionIndex": "0x5", + "chainId": "0x5", + "nonce": "0x5", + "hash": "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e", "blockHash": "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e", "blockNumber": "0x5", + "transactionIndex": "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" - } + "value": "0x0", + "type": "0x5", + "input": "0x07", + "gas": "0x5", + "maxFeePerGas": "0x0", + "maxPriorityFeePerGas": "0x0", + "gasPrice": "0x0", + "accessList": [ + "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e" ], - "type": "0x5" + "v": "0x0", + "r": "0x0", + "s": "0x0" } ], "additionalProperties": false, "properties": { + "accessList": { + "items": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 32, + "minItems": 32, + "type": "array" + }, + "type": "array" + }, "blockHash": { "items": { "description": "Number is a number", @@ -5172,7 +4140,11 @@ "title": "number", "type": "number" }, - "contractAddress": { + "chainId": { + "title": "number", + "type": "number" + }, + "from": { "items": { "description": "Number is a number", "title": "number", @@ -5182,15 +4154,53 @@ "minItems": 20, "type": "array" }, - "cumulativeGasUsed": { + "gas": { "title": "number", "type": "number" }, - "effectiveGasPrice": { + "gasPrice": { "additionalProperties": false, "type": "object" }, - "from": { + "hash": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 32, + "minItems": 32, + "type": "array" + }, + "input": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "type": "array" + }, + "maxFeePerGas": { + "additionalProperties": false, + "type": "object" + }, + "maxPriorityFeePerGas": { + "additionalProperties": false, + "type": "object" + }, + "nonce": { + "title": "number", + "type": "number" + }, + "r": { + "additionalProperties": false, + "type": "object" + }, + "s": { + "additionalProperties": false, + "type": "object" + }, + "to": { "items": { "description": "Number is a number", "title": "number", @@ -5200,125 +4210,196 @@ "minItems": 20, "type": "array" }, - "gasUsed": { + "transactionIndex": { "title": "number", "type": "number" }, - "logs": { - "items": { - "additionalProperties": false, - "properties": { - "address": { - "items": { - "description": "Number is a number", - "title": "number", - "type": "number" - }, - "maxItems": 20, - "minItems": 20, - "type": "array" - }, - "blockHash": { - "items": { - "description": "Number is a number", - "title": "number", - "type": "number" - }, - "maxItems": 32, - "minItems": 32, - "type": "array" - }, - "blockNumber": { - "title": "number", - "type": "number" - }, - "data": { - "items": { - "description": "Number is a number", - "title": "number", - "type": "number" - }, - "type": "array" - }, - "logIndex": { - "title": "number", - "type": "number" - }, - "removed": { - "type": "boolean" - }, - "topics": { - "items": { - "items": { - "description": "Number is a number", - "title": "number", - "type": "number" - }, - "maxItems": 32, - "minItems": 32, - "type": "array" - }, - "type": "array" - }, - "transactionHash": { - "items": { - "description": "Number is a number", - "title": "number", - "type": "number" - }, - "maxItems": 32, - "minItems": 32, - "type": "array" - }, - "transactionIndex": { - "title": "number", - "type": "number" - } + "type": { + "title": "number", + "type": "number" + }, + "v": { + "additionalProperties": false, + "type": "object" + }, + "value": { + "additionalProperties": false, + "type": "object" + } + }, + "type": [ + "object" + ] + }, + "required": true, + "deprecated": false + }, + "deprecated": false, + "externalDocs": { + "description": "Github remote link", + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4436" + } + }, + { + "name": "Filecoin.EthGetTransactionByHash", + "description": "```go\nfunc (s *GatewayStruct) EthGetTransactionByHash(p0 context.Context, p1 *ethtypes.EthHash) (*ethtypes.EthTx, error) {\n\tif s.Internal.EthGetTransactionByHash == nil {\n\t\treturn nil, ErrNotSupported\n\t}\n\treturn s.Internal.EthGetTransactionByHash(p0, p1)\n}\n```", + "summary": "There are not yet any comments for this method.", + "paramStructure": "by-position", + "params": [ + { + "name": "p1", + "description": "*ethtypes.EthHash", + "summary": "", + "schema": { + "examples": [ + "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e" + ], + "items": [ + { + "title": "number", + "description": "Number is a number", + "type": [ + "number" + ] + } + ], + "maxItems": 32, + "minItems": 32, + "type": [ + "array" + ] + }, + "required": true, + "deprecated": false + } + ], + "result": { + "name": "*ethtypes.EthTx", + "description": "*ethtypes.EthTx", + "summary": "", + "schema": { + "examples": [ + { + "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", + "gasPrice": "0x0", + "accessList": [ + "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e" + ], + "v": "0x0", + "r": "0x0", + "s": "0x0" + } + ], + "additionalProperties": false, + "properties": { + "accessList": { + "items": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" }, - "type": "object" + "maxItems": 32, + "minItems": 32, + "type": "array" }, "type": "array" }, - "logsBloom": { + "blockHash": { "items": { "description": "Number is a number", "title": "number", "type": "number" }, + "maxItems": 32, + "minItems": 32, "type": "array" }, - "root": { + "blockNumber": { + "title": "number", + "type": "number" + }, + "chainId": { + "title": "number", + "type": "number" + }, + "from": { "items": { "description": "Number is a number", "title": "number", "type": "number" }, - "maxItems": 32, - "minItems": 32, + "maxItems": 20, + "minItems": 20, "type": "array" }, - "status": { + "gas": { "title": "number", "type": "number" }, - "to": { + "gasPrice": { + "additionalProperties": false, + "type": "object" + }, + "hash": { "items": { "description": "Number is a number", "title": "number", "type": "number" }, - "maxItems": 20, - "minItems": 20, + "maxItems": 32, + "minItems": 32, "type": "array" }, - "transactionHash": { + "input": { "items": { "description": "Number is a number", "title": "number", "type": "number" }, - "maxItems": 32, - "minItems": 32, + "type": "array" + }, + "maxFeePerGas": { + "additionalProperties": false, + "type": "object" + }, + "maxPriorityFeePerGas": { + "additionalProperties": false, + "type": "object" + }, + "nonce": { + "title": "number", + "type": "number" + }, + "r": { + "additionalProperties": false, + "type": "object" + }, + "s": { + "additionalProperties": false, + "type": "object" + }, + "to": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 20, + "minItems": 20, "type": "array" }, "transactionIndex": { @@ -5328,6 +4409,14 @@ "type": { "title": "number", "type": "number" + }, + "v": { + "additionalProperties": false, + "type": "object" + }, + "value": { + "additionalProperties": false, + "type": "object" } }, "type": [ @@ -5340,22 +4429,22 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4508" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4447" } }, { - "name": "Filecoin.EthGetTransactionReceiptLimited", - "description": "```go\nfunc (s *GatewayStruct) EthGetTransactionReceiptLimited(p0 context.Context, p1 ethtypes.EthHash, p2 abi.ChainEpoch) (*EthTxReceipt, error) {\n\tif s.Internal.EthGetTransactionReceiptLimited == nil {\n\t\treturn nil, ErrNotSupported\n\t}\n\treturn s.Internal.EthGetTransactionReceiptLimited(p0, p1, p2)\n}\n```", + "name": "Filecoin.EthGetTransactionCount", + "description": "```go\nfunc (s *GatewayStruct) EthGetTransactionCount(p0 context.Context, p1 ethtypes.EthAddress, p2 ethtypes.EthBlockNumberOrHash) (ethtypes.EthUint64, error) {\n\tif s.Internal.EthGetTransactionCount == nil {\n\t\treturn *new(ethtypes.EthUint64), ErrNotSupported\n\t}\n\treturn s.Internal.EthGetTransactionCount(p0, p1, p2)\n}\n```", "summary": "There are not yet any comments for this method.", "paramStructure": "by-position", "params": [ { "name": "p1", - "description": "ethtypes.EthHash", + "description": "ethtypes.EthAddress", "summary": "", "schema": { "examples": [ - "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e" + "0x5cbeecf99d3fdb3f25e309cc264f240bb0664031" ], "items": [ { @@ -5366,8 +4455,8 @@ ] } ], - "maxItems": 32, - "minItems": 32, + "maxItems": 20, + "minItems": 20, "type": [ "array" ] @@ -5377,16 +4466,148 @@ }, { "name": "p2", - "description": "abi.ChainEpoch", + "description": "ethtypes.EthBlockNumberOrHash", "summary": "", "schema": { - "title": "number", - "description": "Number is a number", "examples": [ - 10101 + "string value" + ], + "additionalProperties": false, + "properties": { + "blockHash": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 32, + "minItems": 32, + "type": "array" + }, + "blockNumber": { + "title": "number", + "type": "number" + }, + "requireCanonical": { + "type": "boolean" + } + }, + "type": [ + "object" + ] + }, + "required": true, + "deprecated": false + } + ], + "result": { + "name": "ethtypes.EthUint64", + "description": "ethtypes.EthUint64", + "summary": "", + "schema": { + "title": "number", + "description": "Number is a number", + "examples": [ + "0x5" + ], + "type": [ + "number" + ] + }, + "required": true, + "deprecated": false + }, + "deprecated": false, + "externalDocs": { + "description": "Github remote link", + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4458" + } + }, + { + "name": "Filecoin.EthGetTransactionHashByCid", + "description": "```go\nfunc (s *GatewayStruct) EthGetTransactionHashByCid(p0 context.Context, p1 cid.Cid) (*ethtypes.EthHash, error) {\n\tif s.Internal.EthGetTransactionHashByCid == nil {\n\t\treturn nil, ErrNotSupported\n\t}\n\treturn s.Internal.EthGetTransactionHashByCid(p0, p1)\n}\n```", + "summary": "There are not yet any comments for this method.", + "paramStructure": "by-position", + "params": [ + { + "name": "p1", + "description": "cid.Cid", + "summary": "", + "schema": { + "title": "Content Identifier", + "description": "Cid represents a self-describing content addressed identifier. It is formed by a Version, a Codec (which indicates a multicodec-packed content type) and a Multihash.", + "examples": [ + { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + } ], "type": [ - "number" + "string" + ] + }, + "required": true, + "deprecated": false + } + ], + "result": { + "name": "*ethtypes.EthHash", + "description": "*ethtypes.EthHash", + "summary": "", + "schema": { + "examples": [ + "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e" + ], + "items": [ + { + "title": "number", + "description": "Number is a number", + "type": [ + "number" + ] + } + ], + "maxItems": 32, + "minItems": 32, + "type": [ + "array" + ] + }, + "required": true, + "deprecated": false + }, + "deprecated": false, + "externalDocs": { + "description": "Github remote link", + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4469" + } + }, + { + "name": "Filecoin.EthGetTransactionReceipt", + "description": "```go\nfunc (s *GatewayStruct) EthGetTransactionReceipt(p0 context.Context, p1 ethtypes.EthHash) (*ethtypes.EthTxReceipt, error) {\n\tif s.Internal.EthGetTransactionReceipt == nil {\n\t\treturn nil, ErrNotSupported\n\t}\n\treturn s.Internal.EthGetTransactionReceipt(p0, p1)\n}\n```", + "summary": "There are not yet any comments for this method.", + "paramStructure": "by-position", + "params": [ + { + "name": "p1", + "description": "ethtypes.EthHash", + "summary": "", + "schema": { + "examples": [ + "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e" + ], + "items": [ + { + "title": "number", + "description": "Number is a number", + "type": [ + "number" + ] + } + ], + "maxItems": 32, + "minItems": 32, + "type": [ + "array" ] }, "required": true, @@ -5394,8 +4615,8 @@ } ], "result": { - "name": "*EthTxReceipt", - "description": "*EthTxReceipt", + "name": "*ethtypes.EthTxReceipt", + "description": "*ethtypes.EthTxReceipt", "summary": "", "schema": { "examples": [ @@ -5615,7 +4836,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4519" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4480" } }, { @@ -5643,7 +4864,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4530" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4491" } }, { @@ -5681,7 +4902,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4541" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4502" } }, { @@ -5789,7 +5010,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4552" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4513" } }, { @@ -5827,7 +5048,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4563" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4524" } }, { @@ -5856,7 +5077,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4574" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4535" } }, { @@ -5919,7 +5140,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4585" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4546" } }, { @@ -5982,7 +5203,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4596" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4557" } }, { @@ -6027,7 +5248,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4607" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4568" } }, { @@ -6149,7 +5370,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4618" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4579" } }, { @@ -6325,7 +5546,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4629" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4590" } }, { @@ -6480,7 +5701,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4640" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4601" } }, { @@ -6602,7 +5823,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4651" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4612" } }, { @@ -6656,7 +5877,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4662" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4623" } }, { @@ -6710,7 +5931,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4673" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4634" } }, { @@ -6891,7 +6112,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4684" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4645" } }, { @@ -7054,7 +6275,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4695" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4656" } }, { @@ -7117,7 +6338,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4706" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4667" } }, { @@ -7219,7 +6440,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4717" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4678" } }, { @@ -7442,7 +6663,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4728" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4689" } }, { @@ -7625,7 +6846,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4739" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4700" } }, { @@ -7819,7 +7040,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4750" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4711" } }, { @@ -7865,7 +7086,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4761" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4722" } }, { @@ -8015,7 +7236,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4772" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4733" } }, { @@ -8152,7 +7373,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4783" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4744" } }, { @@ -8220,7 +7441,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4794" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4755" } }, { @@ -8337,7 +7558,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4805" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4766" } }, { @@ -8428,7 +7649,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4816" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4777" } }, { @@ -8514,7 +7735,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4827" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4788" } }, { @@ -8541,7 +7762,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4838" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4799" } }, { @@ -8568,7 +7789,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4849" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4810" } }, { @@ -8636,7 +7857,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4860" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4821" } }, { @@ -9142,7 +8363,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4871" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4832" } }, { @@ -9239,7 +8460,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4882" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4843" } }, { @@ -9339,7 +8560,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4893" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4854" } }, { @@ -9439,7 +8660,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4904" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4865" } }, { @@ -9564,7 +8785,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4915" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4876" } }, { @@ -9673,7 +8894,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4926" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4887" } }, { @@ -9776,7 +8997,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4937" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4898" } }, { @@ -9906,7 +9127,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4948" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4909" } }, { @@ -10013,7 +9234,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4959" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4920" } }, { @@ -10236,7 +9457,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4970" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4931" } }, { @@ -10297,7 +9518,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4981" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4942" } }, { @@ -10365,7 +9586,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4992" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4953" } }, { @@ -10446,7 +9667,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5003" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4964" } }, { @@ -10610,7 +9831,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5014" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4975" } }, { @@ -10708,7 +9929,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5025" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4986" } }, { @@ -10909,7 +10130,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5036" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4997" } }, { @@ -11020,7 +10241,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5047" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5008" } }, { @@ -11151,7 +10372,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5058" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5019" } }, { @@ -11237,7 +10458,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5069" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5030" } }, { @@ -11264,7 +10485,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5080" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5041" } }, { @@ -11317,7 +10538,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5091" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5052" } }, { @@ -11405,7 +10626,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5102" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5063" } }, { @@ -11856,7 +11077,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5113" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5074" } }, { @@ -12023,7 +11244,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5124" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5085" } }, { @@ -12190,7 +11411,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5135" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5096" } }, { @@ -12258,7 +11479,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5146" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5107" } }, { @@ -12326,7 +11547,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5157" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5118" } }, { @@ -12487,7 +11708,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5168" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5129" } }, { @@ -12536,7 +11757,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5190" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5151" } }, { @@ -12581,7 +11802,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5201" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5162" } }, { @@ -12608,7 +11829,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5212" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5173" } } ] diff --git a/build/openrpc/miner.json b/build/openrpc/miner.json index c7536a6e744..ebef8e06741 100644 --- a/build/openrpc/miner.json +++ b/build/openrpc/miner.json @@ -30,7 +30,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5498" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5459" } }, { @@ -109,7 +109,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5509" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5470" } }, { @@ -155,7 +155,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5520" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5481" } }, { @@ -203,7 +203,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5531" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5492" } }, { @@ -251,7 +251,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5542" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5503" } }, { @@ -354,7 +354,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5553" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5514" } }, { @@ -428,7 +428,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5564" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5525" } }, { @@ -591,7 +591,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5575" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5536" } }, { @@ -742,7 +742,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5586" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5547" } }, { @@ -781,7 +781,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5597" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5558" } }, { @@ -913,7 +913,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5608" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5569" } }, { @@ -1009,7 +1009,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5619" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5580" } }, { @@ -1050,7 +1050,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5630" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5591" } }, { @@ -1118,7 +1118,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5641" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5602" } }, { @@ -1249,7 +1249,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5652" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5613" } }, { @@ -1380,7 +1380,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5663" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5624" } }, { @@ -1480,7 +1480,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5674" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5635" } }, { @@ -1580,7 +1580,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5685" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5646" } }, { @@ -1680,7 +1680,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5696" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5657" } }, { @@ -1780,7 +1780,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5707" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5668" } }, { @@ -1880,7 +1880,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5718" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5679" } }, { @@ -1980,7 +1980,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5729" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5690" } }, { @@ -2104,7 +2104,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5740" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5701" } }, { @@ -2228,7 +2228,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5751" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5712" } }, { @@ -2343,7 +2343,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5762" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5723" } }, { @@ -2443,7 +2443,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5773" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5734" } }, { @@ -2576,7 +2576,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5784" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5745" } }, { @@ -2700,7 +2700,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5795" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5756" } }, { @@ -2824,7 +2824,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5806" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5767" } }, { @@ -2948,7 +2948,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5817" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5778" } }, { @@ -3081,7 +3081,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5828" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5789" } }, { @@ -3181,7 +3181,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5839" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5800" } }, { @@ -3221,7 +3221,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5850" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5811" } }, { @@ -3293,7 +3293,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5861" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5822" } }, { @@ -3343,7 +3343,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5872" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5833" } }, { @@ -3387,7 +3387,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5883" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5844" } }, { @@ -3428,7 +3428,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5894" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5855" } }, { @@ -3672,7 +3672,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5905" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5866" } }, { @@ -3746,7 +3746,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5916" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5877" } }, { @@ -3796,7 +3796,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5927" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5888" } }, { @@ -3825,7 +3825,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5938" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5899" } }, { @@ -3854,7 +3854,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5949" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5910" } }, { @@ -3910,7 +3910,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5960" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5921" } }, { @@ -3933,7 +3933,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5971" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5932" } }, { @@ -3993,7 +3993,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5982" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5943" } }, { @@ -4032,7 +4032,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5993" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5954" } }, { @@ -4072,7 +4072,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6004" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5965" } }, { @@ -4145,7 +4145,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6015" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5976" } }, { @@ -4209,7 +4209,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6026" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5987" } }, { @@ -4272,7 +4272,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6037" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5998" } }, { @@ -4322,7 +4322,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6048" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6009" } }, { @@ -4881,7 +4881,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6059" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6020" } }, { @@ -4922,7 +4922,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6070" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6031" } }, { @@ -4963,7 +4963,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6081" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6042" } }, { @@ -5004,7 +5004,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6092" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6053" } }, { @@ -5045,7 +5045,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6103" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6064" } }, { @@ -5086,7 +5086,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6114" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6075" } }, { @@ -5117,7 +5117,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6125" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6086" } }, { @@ -5167,7 +5167,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6136" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6097" } }, { @@ -5208,7 +5208,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6147" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6108" } }, { @@ -5247,7 +5247,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6158" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6119" } }, { @@ -5311,7 +5311,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6169" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6130" } }, { @@ -5369,7 +5369,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6180" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6141" } }, { @@ -5816,7 +5816,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6191" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6152" } }, { @@ -5852,7 +5852,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6202" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6163" } }, { @@ -5995,7 +5995,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6213" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6174" } }, { @@ -6051,7 +6051,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6224" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6185" } }, { @@ -6090,7 +6090,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6235" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6196" } }, { @@ -6267,7 +6267,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6246" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6207" } }, { @@ -6319,7 +6319,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6257" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6218" } }, { @@ -6511,7 +6511,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6268" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6229" } }, { @@ -6611,7 +6611,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6279" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6240" } }, { @@ -6665,7 +6665,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6290" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6251" } }, { @@ -6704,7 +6704,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6301" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6262" } }, { @@ -6789,7 +6789,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6312" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6273" } }, { @@ -6983,7 +6983,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6323" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6284" } }, { @@ -7081,7 +7081,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6334" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6295" } }, { @@ -7213,7 +7213,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6345" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6306" } }, { @@ -7267,7 +7267,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6356" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6317" } }, { @@ -7301,7 +7301,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6367" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6328" } }, { @@ -7388,7 +7388,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6378" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6339" } }, { @@ -7442,7 +7442,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6389" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6350" } }, { @@ -7542,7 +7542,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6400" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6361" } }, { @@ -7619,7 +7619,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6411" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6372" } }, { @@ -7710,7 +7710,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6422" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6383" } }, { @@ -7749,7 +7749,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6433" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6394" } }, { @@ -7865,7 +7865,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6444" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6405" } }, { @@ -9965,7 +9965,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6455" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6416" } } ] diff --git a/build/openrpc/v2/full.json b/build/openrpc/v2/full.json index 1175f887ddb..381cb23ec89 100644 --- a/build/openrpc/v2/full.json +++ b/build/openrpc/v2/full.json @@ -8,7 +8,7 @@ { "name": "Filecoin.ChainGetTipSet", "description": "```go\nfunc (s *FullNodeStruct) ChainGetTipSet(p0 context.Context, p1 types.TipSetSelector) (*types.TipSet, error) {\n\tif s.Internal.ChainGetTipSet == nil {\n\t\treturn nil, ErrNotSupported\n\t}\n\treturn s.Internal.ChainGetTipSet(p0, p1)\n}\n```", - "summary": "ChainGetTipSet retrieves a tipset that corresponds to the specified selector\ncriteria. The criteria can be provided in the form of a tipset key, a\nblockchain height including an optional fallback to previous non-null tipset,\nor a designated tag such as \"latest\", \"finalized\", or \"safe\".\n\nThe \"Finalized\" tag returns the tipset that is considered finalized based on\nthe consensus protocol of the current node, either Filecoin EC Finality or\nFilecoin Fast Finality (F3). The finalized tipset selection gracefully falls\nback to EC finality in cases where F3 isn't ready or not running.\n\nThe \"Safe\" tag returns the tipset between the \"Finalized\" tipset and\n\"Latest - build.SafeHeightDistance\". This provides a balance between\nfinality confidence and recency. If the tipset at the safe height is null,\nthe first non-nil parent tipset is returned, similar to the behavior of\nselecting by height with the 'previous' option set to true.\n\nIn a case where no selector is provided, an error is returned. The selector\nmust be explicitly specified.\n\nFor more details, refer to the types.TipSetSelector and\ntypes.NewTipSetSelector.\n\nExample usage:\n\n selector := types.TipSetSelectors.Latest\n tipSet, err := node.ChainGetTipSet(context.Background(), selector)\n if err != nil {\n fmt.Println(\"Error retrieving tipset:\", err)\n return\n }\n fmt.Printf(\"Latest TipSet: %v\\n\", tipSet)\n", + "summary": "ChainGetTipSet retrieves a tipset that corresponds to the specified selector\ncriteria. The criteria can be provided in the form of a tipset key, a\nblockchain height including an optional fallback to previous non-null tipset,\nor a designated tag such as \"latest\", \"finalized\", or \"safe\".\n\nThe \"Finalized\" tag returns the tipset that is considered finalized based on\nthe consensus protocol of the current node, either Filecoin EC Finality or\nFilecoin Fast Finality (F3). The finalized tipset selection gracefully falls\nback to EC finality in cases where F3 isn't ready or not running.\n\nThe \"Safe\" tag returns the tipset between the \"Finalized\" tipset and\n\"Latest - build.SafeHeightDistance\". This provides a balance between\nfinality confidence and recency. If the tipset at the safe height is null,\nthe first non-nil parent tipset is returned, similar to the behavior of\nselecting by height with the 'previous' option set to true.\n\nIn a case where no selector is provided, an error is returned. The selector\nmust be explicitly specified.\n\nFor more details, refer to the types.TipSetSelector.\n\nExample usage:\n\n selector := types.TipSetSelectors.Latest\n tipSet, err := node.ChainGetTipSet(context.Background(), selector)\n if err != nil {\n fmt.Println(\"Error retrieving tipset:\", err)\n return\n }\n fmt.Printf(\"Latest TipSet: %v\\n\", tipSet)\n", "paramStructure": "by-position", "params": [ { @@ -152,7 +152,5022 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/v2api/proxy_gen.go#L32" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/v2api/proxy_gen.go#L132" + } + }, + { + "name": "Filecoin.EthAccounts", + "description": "```go\nfunc (s *FullNodeStruct) EthAccounts(p0 context.Context) ([]ethtypes.EthAddress, error) {\n\tif s.Internal.EthAccounts == nil {\n\t\treturn *new([]ethtypes.EthAddress), ErrNotSupported\n\t}\n\treturn s.Internal.EthAccounts(p0)\n}\n```", + "summary": "EthAccounts returns a list of Ethereum accounts managed by the node.\nMaps to JSON-RPC method: \"eth_accounts\".\nLotus does not manage private keys, so this will always return an empty array.\n", + "paramStructure": "by-position", + "params": [], + "result": { + "name": "[]ethtypes.EthAddress", + "description": "[]ethtypes.EthAddress", + "summary": "", + "schema": { + "examples": [ + [ + "0x5cbeecf99d3fdb3f25e309cc264f240bb0664031" + ] + ], + "items": [ + { + "items": [ + { + "title": "number", + "description": "Number is a number", + "type": [ + "number" + ] + } + ], + "maxItems": 20, + "minItems": 20, + "type": [ + "array" + ] + } + ], + "type": [ + "array" + ] + }, + "required": true, + "deprecated": false + }, + "deprecated": false, + "externalDocs": { + "description": "Github remote link", + "url": "https://github.com/filecoin-project/lotus/blob/master/api/v2api/proxy_gen.go#L143" + } + }, + { + "name": "Filecoin.EthAddressToFilecoinAddress", + "description": "```go\nfunc (s *FullNodeStruct) EthAddressToFilecoinAddress(p0 context.Context, p1 ethtypes.EthAddress) (address.Address, error) {\n\tif s.Internal.EthAddressToFilecoinAddress == nil {\n\t\treturn *new(address.Address), ErrNotSupported\n\t}\n\treturn s.Internal.EthAddressToFilecoinAddress(p0, p1)\n}\n```", + "summary": "EthAddressToFilecoinAddress converts an Ethereum address to a Filecoin f410 address.\n", + "paramStructure": "by-position", + "params": [ + { + "name": "p1", + "description": "ethtypes.EthAddress", + "summary": "", + "schema": { + "examples": [ + "0x5cbeecf99d3fdb3f25e309cc264f240bb0664031" + ], + "items": [ + { + "title": "number", + "description": "Number is a number", + "type": [ + "number" + ] + } + ], + "maxItems": 20, + "minItems": 20, + "type": [ + "array" + ] + }, + "required": true, + "deprecated": false + } + ], + "result": { + "name": "address.Address", + "description": "address.Address", + "summary": "", + "schema": { + "examples": [ + "f01234" + ], + "additionalProperties": false, + "type": [ + "object" + ] + }, + "required": true, + "deprecated": false + }, + "deprecated": false, + "externalDocs": { + "description": "Github remote link", + "url": "https://github.com/filecoin-project/lotus/blob/master/api/v2api/proxy_gen.go#L154" + } + }, + { + "name": "Filecoin.EthBlockNumber", + "description": "```go\nfunc (s *FullNodeStruct) EthBlockNumber(p0 context.Context) (ethtypes.EthUint64, error) {\n\tif s.Internal.EthBlockNumber == nil {\n\t\treturn *new(ethtypes.EthUint64), ErrNotSupported\n\t}\n\treturn s.Internal.EthBlockNumber(p0)\n}\n```", + "summary": "EthBlockNumber returns the number of the latest executed block (head - 1).\nMaps to JSON-RPC method: \"eth_blockNumber\".\n", + "paramStructure": "by-position", + "params": [], + "result": { + "name": "ethtypes.EthUint64", + "description": "ethtypes.EthUint64", + "summary": "", + "schema": { + "title": "number", + "description": "Number is a number", + "examples": [ + "0x5" + ], + "type": [ + "number" + ] + }, + "required": true, + "deprecated": false + }, + "deprecated": false, + "externalDocs": { + "description": "Github remote link", + "url": "https://github.com/filecoin-project/lotus/blob/master/api/v2api/proxy_gen.go#L165" + } + }, + { + "name": "Filecoin.EthCall", + "description": "```go\nfunc (s *FullNodeStruct) EthCall(p0 context.Context, p1 ethtypes.EthCall, p2 ethtypes.EthBlockNumberOrHash) (ethtypes.EthBytes, error) {\n\tif s.Internal.EthCall == nil {\n\t\treturn *new(ethtypes.EthBytes), ErrNotSupported\n\t}\n\treturn s.Internal.EthCall(p0, p1, p2)\n}\n```", + "summary": "EthCall executes a read-only call to a contract at a specific block state, identified by\nits number, hash, or a special tag like \"latest\" or \"finalized\".\nMaps to JSON-RPC method: \"eth_call\".\n", + "paramStructure": "by-position", + "params": [ + { + "name": "p1", + "description": "ethtypes.EthCall", + "summary": "", + "schema": { + "examples": [ + { + "from": "0x5cbeecf99d3fdb3f25e309cc264f240bb0664031", + "to": "0x5cbeecf99d3fdb3f25e309cc264f240bb0664031", + "gas": "0x5", + "gasPrice": "0x0", + "value": "0x0", + "data": "0x07" + } + ], + "additionalProperties": false, + "properties": { + "data": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "type": "array" + }, + "from": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 20, + "minItems": 20, + "type": "array" + }, + "gas": { + "title": "number", + "type": "number" + }, + "gasPrice": { + "additionalProperties": false, + "type": "object" + }, + "to": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 20, + "minItems": 20, + "type": "array" + }, + "value": { + "additionalProperties": false, + "type": "object" + } + }, + "type": [ + "object" + ] + }, + "required": true, + "deprecated": false + }, + { + "name": "p2", + "description": "ethtypes.EthBlockNumberOrHash", + "summary": "", + "schema": { + "examples": [ + "string value" + ], + "additionalProperties": false, + "properties": { + "blockHash": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 32, + "minItems": 32, + "type": "array" + }, + "blockNumber": { + "title": "number", + "type": "number" + }, + "requireCanonical": { + "type": "boolean" + } + }, + "type": [ + "object" + ] + }, + "required": true, + "deprecated": false + } + ], + "result": { + "name": "ethtypes.EthBytes", + "description": "ethtypes.EthBytes", + "summary": "", + "schema": { + "examples": [ + "0x07" + ], + "items": [ + { + "title": "number", + "description": "Number is a number", + "type": [ + "number" + ] + } + ], + "type": [ + "array" + ] + }, + "required": true, + "deprecated": false + }, + "deprecated": false, + "externalDocs": { + "description": "Github remote link", + "url": "https://github.com/filecoin-project/lotus/blob/master/api/v2api/proxy_gen.go#L176" + } + }, + { + "name": "Filecoin.EthChainId", + "description": "```go\nfunc (s *FullNodeStruct) EthChainId(p0 context.Context) (ethtypes.EthUint64, error) {\n\tif s.Internal.EthChainId == nil {\n\t\treturn *new(ethtypes.EthUint64), ErrNotSupported\n\t}\n\treturn s.Internal.EthChainId(p0)\n}\n```", + "summary": "EthChainId retrieves the chain ID of the Ethereum-compatible network.\nMaps to JSON-RPC method: \"eth_chainId\".\n", + "paramStructure": "by-position", + "params": [], + "result": { + "name": "ethtypes.EthUint64", + "description": "ethtypes.EthUint64", + "summary": "", + "schema": { + "title": "number", + "description": "Number is a number", + "examples": [ + "0x5" + ], + "type": [ + "number" + ] + }, + "required": true, + "deprecated": false + }, + "deprecated": false, + "externalDocs": { + "description": "Github remote link", + "url": "https://github.com/filecoin-project/lotus/blob/master/api/v2api/proxy_gen.go#L187" + } + }, + { + "name": "Filecoin.EthEstimateGas", + "description": "```go\nfunc (s *FullNodeStruct) EthEstimateGas(p0 context.Context, p1 jsonrpc.RawParams) (ethtypes.EthUint64, error) {\n\tif s.Internal.EthEstimateGas == nil {\n\t\treturn *new(ethtypes.EthUint64), ErrNotSupported\n\t}\n\treturn s.Internal.EthEstimateGas(p0, p1)\n}\n```", + "summary": "EthEstimateGas estimates the gas required to execute a transaction.\nMaps to JSON-RPC method: \"eth_estimateGas\".\n", + "paramStructure": "by-position", + "params": [ + { + "name": "p1", + "description": "jsonrpc.RawParams", + "summary": "", + "schema": { + "examples": [ + "Bw==" + ], + "items": [ + { + "title": "number", + "description": "Number is a number", + "type": [ + "number" + ] + } + ], + "type": [ + "array" + ] + }, + "required": true, + "deprecated": false + } + ], + "result": { + "name": "ethtypes.EthUint64", + "description": "ethtypes.EthUint64", + "summary": "", + "schema": { + "title": "number", + "description": "Number is a number", + "examples": [ + "0x5" + ], + "type": [ + "number" + ] + }, + "required": true, + "deprecated": false + }, + "deprecated": false, + "externalDocs": { + "description": "Github remote link", + "url": "https://github.com/filecoin-project/lotus/blob/master/api/v2api/proxy_gen.go#L198" + } + }, + { + "name": "Filecoin.EthFeeHistory", + "description": "```go\nfunc (s *FullNodeStruct) EthFeeHistory(p0 context.Context, p1 jsonrpc.RawParams) (ethtypes.EthFeeHistory, error) {\n\tif s.Internal.EthFeeHistory == nil {\n\t\treturn *new(ethtypes.EthFeeHistory), ErrNotSupported\n\t}\n\treturn s.Internal.EthFeeHistory(p0, p1)\n}\n```", + "summary": "EthFeeHistory retrieves historical gas fee data for a range of blocks.\nMaps to JSON-RPC method: \"eth_feeHistory\".\n", + "paramStructure": "by-position", + "params": [ + { + "name": "p1", + "description": "jsonrpc.RawParams", + "summary": "", + "schema": { + "examples": [ + "Bw==" + ], + "items": [ + { + "title": "number", + "description": "Number is a number", + "type": [ + "number" + ] + } + ], + "type": [ + "array" + ] + }, + "required": true, + "deprecated": false + } + ], + "result": { + "name": "ethtypes.EthFeeHistory", + "description": "ethtypes.EthFeeHistory", + "summary": "", + "schema": { + "examples": [ + { + "oldestBlock": "0x5", + "baseFeePerGas": [ + "0x0" + ], + "gasUsedRatio": [ + 12.3 + ], + "reward": [] + } + ], + "additionalProperties": false, + "properties": { + "baseFeePerGas": { + "items": { + "additionalProperties": false, + "type": "object" + }, + "type": "array" + }, + "gasUsedRatio": { + "items": { + "type": "number" + }, + "type": "array" + }, + "oldestBlock": { + "title": "number", + "type": "number" + }, + "reward": { + "items": { + "items": { + "additionalProperties": false, + "type": "object" + }, + "type": "array" + }, + "type": "array" + } + }, + "type": [ + "object" + ] + }, + "required": true, + "deprecated": false + }, + "deprecated": false, + "externalDocs": { + "description": "Github remote link", + "url": "https://github.com/filecoin-project/lotus/blob/master/api/v2api/proxy_gen.go#L209" + } + }, + { + "name": "Filecoin.EthGasPrice", + "description": "```go\nfunc (s *FullNodeStruct) EthGasPrice(p0 context.Context) (ethtypes.EthBigInt, error) {\n\tif s.Internal.EthGasPrice == nil {\n\t\treturn *new(ethtypes.EthBigInt), ErrNotSupported\n\t}\n\treturn s.Internal.EthGasPrice(p0)\n}\n```", + "summary": "EthGasPrice retrieves the current gas price in the network.\nMaps to JSON-RPC method: \"eth_gasPrice\".\n", + "paramStructure": "by-position", + "params": [], + "result": { + "name": "ethtypes.EthBigInt", + "description": "ethtypes.EthBigInt", + "summary": "", + "schema": { + "examples": [ + "0x0" + ], + "additionalProperties": false, + "type": [ + "object" + ] + }, + "required": true, + "deprecated": false + }, + "deprecated": false, + "externalDocs": { + "description": "Github remote link", + "url": "https://github.com/filecoin-project/lotus/blob/master/api/v2api/proxy_gen.go#L220" + } + }, + { + "name": "Filecoin.EthGetBalance", + "description": "```go\nfunc (s *FullNodeStruct) EthGetBalance(p0 context.Context, p1 ethtypes.EthAddress, p2 ethtypes.EthBlockNumberOrHash) (ethtypes.EthBigInt, error) {\n\tif s.Internal.EthGetBalance == nil {\n\t\treturn *new(ethtypes.EthBigInt), ErrNotSupported\n\t}\n\treturn s.Internal.EthGetBalance(p0, p1, p2)\n}\n```", + "summary": "EthGetBalance retrieves the balance of an Ethereum address at a specific block state,\nidentified by its number, hash, or a special tag like \"latest\" or \"finalized\".\nMaps to JSON-RPC method: \"eth_getBalance\".\n", + "paramStructure": "by-position", + "params": [ + { + "name": "p1", + "description": "ethtypes.EthAddress", + "summary": "", + "schema": { + "examples": [ + "0x5cbeecf99d3fdb3f25e309cc264f240bb0664031" + ], + "items": [ + { + "title": "number", + "description": "Number is a number", + "type": [ + "number" + ] + } + ], + "maxItems": 20, + "minItems": 20, + "type": [ + "array" + ] + }, + "required": true, + "deprecated": false + }, + { + "name": "p2", + "description": "ethtypes.EthBlockNumberOrHash", + "summary": "", + "schema": { + "examples": [ + "string value" + ], + "additionalProperties": false, + "properties": { + "blockHash": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 32, + "minItems": 32, + "type": "array" + }, + "blockNumber": { + "title": "number", + "type": "number" + }, + "requireCanonical": { + "type": "boolean" + } + }, + "type": [ + "object" + ] + }, + "required": true, + "deprecated": false + } + ], + "result": { + "name": "ethtypes.EthBigInt", + "description": "ethtypes.EthBigInt", + "summary": "", + "schema": { + "examples": [ + "0x0" + ], + "additionalProperties": false, + "type": [ + "object" + ] + }, + "required": true, + "deprecated": false + }, + "deprecated": false, + "externalDocs": { + "description": "Github remote link", + "url": "https://github.com/filecoin-project/lotus/blob/master/api/v2api/proxy_gen.go#L231" + } + }, + { + "name": "Filecoin.EthGetBlockByHash", + "description": "```go\nfunc (s *FullNodeStruct) EthGetBlockByHash(p0 context.Context, p1 ethtypes.EthHash, p2 bool) (ethtypes.EthBlock, error) {\n\tif s.Internal.EthGetBlockByHash == nil {\n\t\treturn *new(ethtypes.EthBlock), ErrNotSupported\n\t}\n\treturn s.Internal.EthGetBlockByHash(p0, p1, p2)\n}\n```", + "summary": "EthGetBlockByHash retrieves a block by its hash. If fullTxInfo is true, it includes full\ntransaction objects; otherwise, it includes only transaction hashes.\nMaps to JSON-RPC method: \"eth_getBlockByHash\".\n", + "paramStructure": "by-position", + "params": [ + { + "name": "p1", + "description": "ethtypes.EthHash", + "summary": "", + "schema": { + "examples": [ + "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e" + ], + "items": [ + { + "title": "number", + "description": "Number is a number", + "type": [ + "number" + ] + } + ], + "maxItems": 32, + "minItems": 32, + "type": [ + "array" + ] + }, + "required": true, + "deprecated": false + }, + { + "name": "p2", + "description": "bool", + "summary": "", + "schema": { + "examples": [ + true + ], + "type": [ + "boolean" + ] + }, + "required": true, + "deprecated": false + } + ], + "result": { + "name": "ethtypes.EthBlock", + "description": "ethtypes.EthBlock", + "summary": "", + "schema": { + "examples": [ + { + "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" + ] + } + ], + "additionalProperties": false, + "properties": { + "baseFeePerGas": { + "additionalProperties": false, + "type": "object" + }, + "difficulty": { + "title": "number", + "type": "number" + }, + "extraData": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "type": "array" + }, + "gasLimit": { + "title": "number", + "type": "number" + }, + "gasUsed": { + "title": "number", + "type": "number" + }, + "hash": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 32, + "minItems": 32, + "type": "array" + }, + "logsBloom": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "type": "array" + }, + "miner": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 20, + "minItems": 20, + "type": "array" + }, + "mixHash": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 32, + "minItems": 32, + "type": "array" + }, + "nonce": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 8, + "minItems": 8, + "type": "array" + }, + "number": { + "title": "number", + "type": "number" + }, + "parentHash": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 32, + "minItems": 32, + "type": "array" + }, + "receiptsRoot": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 32, + "minItems": 32, + "type": "array" + }, + "sha3Uncles": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 32, + "minItems": 32, + "type": "array" + }, + "size": { + "title": "number", + "type": "number" + }, + "stateRoot": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 32, + "minItems": 32, + "type": "array" + }, + "timestamp": { + "title": "number", + "type": "number" + }, + "totalDifficulty": { + "title": "number", + "type": "number" + }, + "transactions": { + "items": { + "additionalProperties": true, + "type": "object" + }, + "type": "array" + }, + "transactionsRoot": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 32, + "minItems": 32, + "type": "array" + }, + "uncles": { + "items": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 32, + "minItems": 32, + "type": "array" + }, + "type": "array" + } + }, + "type": [ + "object" + ] + }, + "required": true, + "deprecated": false + }, + "deprecated": false, + "externalDocs": { + "description": "Github remote link", + "url": "https://github.com/filecoin-project/lotus/blob/master/api/v2api/proxy_gen.go#L242" + } + }, + { + "name": "Filecoin.EthGetBlockByNumber", + "description": "```go\nfunc (s *FullNodeStruct) EthGetBlockByNumber(p0 context.Context, p1 string, p2 bool) (ethtypes.EthBlock, error) {\n\tif s.Internal.EthGetBlockByNumber == nil {\n\t\treturn *new(ethtypes.EthBlock), ErrNotSupported\n\t}\n\treturn s.Internal.EthGetBlockByNumber(p0, p1, p2)\n}\n```", + "summary": "EthGetBlockByNumber retrieves a block by its number or a special tag like \"latest\" or\n\"finalized\". If fullTxInfo is true, it includes full transaction objects; otherwise, it\nincludes only transaction hashes.\nMaps to JSON-RPC method: \"eth_getBlockByNumber\".\n", + "paramStructure": "by-position", + "params": [ + { + "name": "p1", + "description": "string", + "summary": "", + "schema": { + "examples": [ + "string value" + ], + "type": [ + "string" + ] + }, + "required": true, + "deprecated": false + }, + { + "name": "p2", + "description": "bool", + "summary": "", + "schema": { + "examples": [ + true + ], + "type": [ + "boolean" + ] + }, + "required": true, + "deprecated": false + } + ], + "result": { + "name": "ethtypes.EthBlock", + "description": "ethtypes.EthBlock", + "summary": "", + "schema": { + "examples": [ + { + "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" + ] + } + ], + "additionalProperties": false, + "properties": { + "baseFeePerGas": { + "additionalProperties": false, + "type": "object" + }, + "difficulty": { + "title": "number", + "type": "number" + }, + "extraData": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "type": "array" + }, + "gasLimit": { + "title": "number", + "type": "number" + }, + "gasUsed": { + "title": "number", + "type": "number" + }, + "hash": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 32, + "minItems": 32, + "type": "array" + }, + "logsBloom": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "type": "array" + }, + "miner": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 20, + "minItems": 20, + "type": "array" + }, + "mixHash": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 32, + "minItems": 32, + "type": "array" + }, + "nonce": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 8, + "minItems": 8, + "type": "array" + }, + "number": { + "title": "number", + "type": "number" + }, + "parentHash": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 32, + "minItems": 32, + "type": "array" + }, + "receiptsRoot": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 32, + "minItems": 32, + "type": "array" + }, + "sha3Uncles": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 32, + "minItems": 32, + "type": "array" + }, + "size": { + "title": "number", + "type": "number" + }, + "stateRoot": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 32, + "minItems": 32, + "type": "array" + }, + "timestamp": { + "title": "number", + "type": "number" + }, + "totalDifficulty": { + "title": "number", + "type": "number" + }, + "transactions": { + "items": { + "additionalProperties": true, + "type": "object" + }, + "type": "array" + }, + "transactionsRoot": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 32, + "minItems": 32, + "type": "array" + }, + "uncles": { + "items": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 32, + "minItems": 32, + "type": "array" + }, + "type": "array" + } + }, + "type": [ + "object" + ] + }, + "required": true, + "deprecated": false + }, + "deprecated": false, + "externalDocs": { + "description": "Github remote link", + "url": "https://github.com/filecoin-project/lotus/blob/master/api/v2api/proxy_gen.go#L253" + } + }, + { + "name": "Filecoin.EthGetBlockReceipts", + "description": "```go\nfunc (s *FullNodeStruct) EthGetBlockReceipts(p0 context.Context, p1 ethtypes.EthBlockNumberOrHash) ([]*ethtypes.EthTxReceipt, error) {\n\tif s.Internal.EthGetBlockReceipts == nil {\n\t\treturn *new([]*ethtypes.EthTxReceipt), ErrNotSupported\n\t}\n\treturn s.Internal.EthGetBlockReceipts(p0, p1)\n}\n```", + "summary": "EthGetBlockReceipts retrieves all transaction receipts for a block identified by its number,\nhash or a special tag like \"latest\" or \"finalized\".\nMaps to JSON-RPC method: \"eth_getBlockReceipts\".\n", + "paramStructure": "by-position", + "params": [ + { + "name": "p1", + "description": "ethtypes.EthBlockNumberOrHash", + "summary": "", + "schema": { + "examples": [ + "string value" + ], + "additionalProperties": false, + "properties": { + "blockHash": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 32, + "minItems": 32, + "type": "array" + }, + "blockNumber": { + "title": "number", + "type": "number" + }, + "requireCanonical": { + "type": "boolean" + } + }, + "type": [ + "object" + ] + }, + "required": true, + "deprecated": false + } + ], + "result": { + "name": "[]*ethtypes.EthTxReceipt", + "description": "[]*ethtypes.EthTxReceipt", + "summary": "", + "schema": { + "examples": [ + [ + { + "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" + } + ] + ], + "items": [ + { + "additionalProperties": false, + "properties": { + "blockHash": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 32, + "minItems": 32, + "type": "array" + }, + "blockNumber": { + "title": "number", + "type": "number" + }, + "contractAddress": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 20, + "minItems": 20, + "type": "array" + }, + "cumulativeGasUsed": { + "title": "number", + "type": "number" + }, + "effectiveGasPrice": { + "additionalProperties": false, + "type": "object" + }, + "from": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 20, + "minItems": 20, + "type": "array" + }, + "gasUsed": { + "title": "number", + "type": "number" + }, + "logs": { + "items": { + "additionalProperties": false, + "properties": { + "address": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 20, + "minItems": 20, + "type": "array" + }, + "blockHash": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 32, + "minItems": 32, + "type": "array" + }, + "blockNumber": { + "title": "number", + "type": "number" + }, + "data": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "type": "array" + }, + "logIndex": { + "title": "number", + "type": "number" + }, + "removed": { + "type": "boolean" + }, + "topics": { + "items": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 32, + "minItems": 32, + "type": "array" + }, + "type": "array" + }, + "transactionHash": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 32, + "minItems": 32, + "type": "array" + }, + "transactionIndex": { + "title": "number", + "type": "number" + } + }, + "type": "object" + }, + "type": "array" + }, + "logsBloom": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "type": "array" + }, + "root": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 32, + "minItems": 32, + "type": "array" + }, + "status": { + "title": "number", + "type": "number" + }, + "to": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 20, + "minItems": 20, + "type": "array" + }, + "transactionHash": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 32, + "minItems": 32, + "type": "array" + }, + "transactionIndex": { + "title": "number", + "type": "number" + }, + "type": { + "title": "number", + "type": "number" + } + }, + "type": [ + "object" + ] + } + ], + "type": [ + "array" + ] + }, + "required": true, + "deprecated": false + }, + "deprecated": false, + "externalDocs": { + "description": "Github remote link", + "url": "https://github.com/filecoin-project/lotus/blob/master/api/v2api/proxy_gen.go#L264" + } + }, + { + "name": "Filecoin.EthGetBlockReceiptsLimited", + "description": "```go\nfunc (s *FullNodeStruct) EthGetBlockReceiptsLimited(p0 context.Context, p1 ethtypes.EthBlockNumberOrHash, p2 abi.ChainEpoch) ([]*ethtypes.EthTxReceipt, error) {\n\tif s.Internal.EthGetBlockReceiptsLimited == nil {\n\t\treturn *new([]*ethtypes.EthTxReceipt), ErrNotSupported\n\t}\n\treturn s.Internal.EthGetBlockReceiptsLimited(p0, p1, p2)\n}\n```", + "summary": "EthGetBlockReceiptsLimited retrieves all transaction receipts for a block identified by its\nnumber, hash or a special tag like \"latest\" or \"finalized\", along with an optional limit on the\nchain epoch for state resolution.\n", + "paramStructure": "by-position", + "params": [ + { + "name": "p1", + "description": "ethtypes.EthBlockNumberOrHash", + "summary": "", + "schema": { + "examples": [ + "string value" + ], + "additionalProperties": false, + "properties": { + "blockHash": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 32, + "minItems": 32, + "type": "array" + }, + "blockNumber": { + "title": "number", + "type": "number" + }, + "requireCanonical": { + "type": "boolean" + } + }, + "type": [ + "object" + ] + }, + "required": true, + "deprecated": false + }, + { + "name": "p2", + "description": "abi.ChainEpoch", + "summary": "", + "schema": { + "title": "number", + "description": "Number is a number", + "examples": [ + 10101 + ], + "type": [ + "number" + ] + }, + "required": true, + "deprecated": false + } + ], + "result": { + "name": "[]*ethtypes.EthTxReceipt", + "description": "[]*ethtypes.EthTxReceipt", + "summary": "", + "schema": { + "examples": [ + [ + { + "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" + } + ] + ], + "items": [ + { + "additionalProperties": false, + "properties": { + "blockHash": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 32, + "minItems": 32, + "type": "array" + }, + "blockNumber": { + "title": "number", + "type": "number" + }, + "contractAddress": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 20, + "minItems": 20, + "type": "array" + }, + "cumulativeGasUsed": { + "title": "number", + "type": "number" + }, + "effectiveGasPrice": { + "additionalProperties": false, + "type": "object" + }, + "from": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 20, + "minItems": 20, + "type": "array" + }, + "gasUsed": { + "title": "number", + "type": "number" + }, + "logs": { + "items": { + "additionalProperties": false, + "properties": { + "address": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 20, + "minItems": 20, + "type": "array" + }, + "blockHash": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 32, + "minItems": 32, + "type": "array" + }, + "blockNumber": { + "title": "number", + "type": "number" + }, + "data": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "type": "array" + }, + "logIndex": { + "title": "number", + "type": "number" + }, + "removed": { + "type": "boolean" + }, + "topics": { + "items": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 32, + "minItems": 32, + "type": "array" + }, + "type": "array" + }, + "transactionHash": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 32, + "minItems": 32, + "type": "array" + }, + "transactionIndex": { + "title": "number", + "type": "number" + } + }, + "type": "object" + }, + "type": "array" + }, + "logsBloom": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "type": "array" + }, + "root": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 32, + "minItems": 32, + "type": "array" + }, + "status": { + "title": "number", + "type": "number" + }, + "to": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 20, + "minItems": 20, + "type": "array" + }, + "transactionHash": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 32, + "minItems": 32, + "type": "array" + }, + "transactionIndex": { + "title": "number", + "type": "number" + }, + "type": { + "title": "number", + "type": "number" + } + }, + "type": [ + "object" + ] + } + ], + "type": [ + "array" + ] + }, + "required": true, + "deprecated": false + }, + "deprecated": false, + "externalDocs": { + "description": "Github remote link", + "url": "https://github.com/filecoin-project/lotus/blob/master/api/v2api/proxy_gen.go#L275" + } + }, + { + "name": "Filecoin.EthGetBlockTransactionCountByHash", + "description": "```go\nfunc (s *FullNodeStruct) EthGetBlockTransactionCountByHash(p0 context.Context, p1 ethtypes.EthHash) (ethtypes.EthUint64, error) {\n\tif s.Internal.EthGetBlockTransactionCountByHash == nil {\n\t\treturn *new(ethtypes.EthUint64), ErrNotSupported\n\t}\n\treturn s.Internal.EthGetBlockTransactionCountByHash(p0, p1)\n}\n```", + "summary": "EthGetBlockTransactionCountByHash returns the number of transactions in a block identified by\nits block hash.\nMaps to JSON-RPC method: \"eth_getBlockTransactionCountByHash\".\n", + "paramStructure": "by-position", + "params": [ + { + "name": "p1", + "description": "ethtypes.EthHash", + "summary": "", + "schema": { + "examples": [ + "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e" + ], + "items": [ + { + "title": "number", + "description": "Number is a number", + "type": [ + "number" + ] + } + ], + "maxItems": 32, + "minItems": 32, + "type": [ + "array" + ] + }, + "required": true, + "deprecated": false + } + ], + "result": { + "name": "ethtypes.EthUint64", + "description": "ethtypes.EthUint64", + "summary": "", + "schema": { + "title": "number", + "description": "Number is a number", + "examples": [ + "0x5" + ], + "type": [ + "number" + ] + }, + "required": true, + "deprecated": false + }, + "deprecated": false, + "externalDocs": { + "description": "Github remote link", + "url": "https://github.com/filecoin-project/lotus/blob/master/api/v2api/proxy_gen.go#L286" + } + }, + { + "name": "Filecoin.EthGetBlockTransactionCountByNumber", + "description": "```go\nfunc (s *FullNodeStruct) EthGetBlockTransactionCountByNumber(p0 context.Context, p1 string) (ethtypes.EthUint64, error) {\n\tif s.Internal.EthGetBlockTransactionCountByNumber == nil {\n\t\treturn *new(ethtypes.EthUint64), ErrNotSupported\n\t}\n\treturn s.Internal.EthGetBlockTransactionCountByNumber(p0, p1)\n}\n```", + "summary": "EthGetBlockTransactionCountByNumber returns the number of transactions in a block identified by\nits block number or a special tag like \"latest\" or \"finalized\".\nMaps to JSON-RPC method: \"eth_getBlockTransactionCountByNumber\".\n", + "paramStructure": "by-position", + "params": [ + { + "name": "p1", + "description": "string", + "summary": "", + "schema": { + "examples": [ + "string value" + ], + "type": [ + "string" + ] + }, + "required": true, + "deprecated": false + } + ], + "result": { + "name": "ethtypes.EthUint64", + "description": "ethtypes.EthUint64", + "summary": "", + "schema": { + "title": "number", + "description": "Number is a number", + "examples": [ + "0x5" + ], + "type": [ + "number" + ] + }, + "required": true, + "deprecated": false + }, + "deprecated": false, + "externalDocs": { + "description": "Github remote link", + "url": "https://github.com/filecoin-project/lotus/blob/master/api/v2api/proxy_gen.go#L297" + } + }, + { + "name": "Filecoin.EthGetCode", + "description": "```go\nfunc (s *FullNodeStruct) EthGetCode(p0 context.Context, p1 ethtypes.EthAddress, p2 ethtypes.EthBlockNumberOrHash) (ethtypes.EthBytes, error) {\n\tif s.Internal.EthGetCode == nil {\n\t\treturn *new(ethtypes.EthBytes), ErrNotSupported\n\t}\n\treturn s.Internal.EthGetCode(p0, p1, p2)\n}\n```", + "summary": "EthGetCode retrieves the contract code at a specific address and block state, identified by\nits number, hash, or a special tag like \"latest\" or \"finalized\".\nMaps to JSON-RPC method: \"eth_getCode\".\n", + "paramStructure": "by-position", + "params": [ + { + "name": "p1", + "description": "ethtypes.EthAddress", + "summary": "", + "schema": { + "examples": [ + "0x5cbeecf99d3fdb3f25e309cc264f240bb0664031" + ], + "items": [ + { + "title": "number", + "description": "Number is a number", + "type": [ + "number" + ] + } + ], + "maxItems": 20, + "minItems": 20, + "type": [ + "array" + ] + }, + "required": true, + "deprecated": false + }, + { + "name": "p2", + "description": "ethtypes.EthBlockNumberOrHash", + "summary": "", + "schema": { + "examples": [ + "string value" + ], + "additionalProperties": false, + "properties": { + "blockHash": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 32, + "minItems": 32, + "type": "array" + }, + "blockNumber": { + "title": "number", + "type": "number" + }, + "requireCanonical": { + "type": "boolean" + } + }, + "type": [ + "object" + ] + }, + "required": true, + "deprecated": false + } + ], + "result": { + "name": "ethtypes.EthBytes", + "description": "ethtypes.EthBytes", + "summary": "", + "schema": { + "examples": [ + "0x07" + ], + "items": [ + { + "title": "number", + "description": "Number is a number", + "type": [ + "number" + ] + } + ], + "type": [ + "array" + ] + }, + "required": true, + "deprecated": false + }, + "deprecated": false, + "externalDocs": { + "description": "Github remote link", + "url": "https://github.com/filecoin-project/lotus/blob/master/api/v2api/proxy_gen.go#L308" + } + }, + { + "name": "Filecoin.EthGetFilterChanges", + "description": "```go\nfunc (s *FullNodeStruct) EthGetFilterChanges(p0 context.Context, p1 ethtypes.EthFilterID) (*ethtypes.EthFilterResult, error) {\n\tif s.Internal.EthGetFilterChanges == nil {\n\t\treturn nil, ErrNotSupported\n\t}\n\treturn s.Internal.EthGetFilterChanges(p0, p1)\n}\n```", + "summary": "EthGetFilterChanges retrieves event logs that occurred since the last poll for a filter.\nMaps to JSON-RPC method: \"eth_getFilterChanges\".\n", + "paramStructure": "by-position", + "params": [ + { + "name": "p1", + "description": "ethtypes.EthFilterID", + "summary": "", + "schema": { + "examples": [ + "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e" + ], + "items": [ + { + "title": "number", + "description": "Number is a number", + "type": [ + "number" + ] + } + ], + "maxItems": 32, + "minItems": 32, + "type": [ + "array" + ] + }, + "required": true, + "deprecated": false + } + ], + "result": { + "name": "*ethtypes.EthFilterResult", + "description": "*ethtypes.EthFilterResult", + "summary": "", + "schema": { + "examples": [ + [ + {} + ] + ], + "additionalProperties": false, + "properties": { + "Results": { + "items": { + "additionalProperties": true, + "type": "object" + }, + "type": "array" + } + }, + "type": [ + "object" + ] + }, + "required": true, + "deprecated": false + }, + "deprecated": false, + "externalDocs": { + "description": "Github remote link", + "url": "https://github.com/filecoin-project/lotus/blob/master/api/v2api/proxy_gen.go#L319" + } + }, + { + "name": "Filecoin.EthGetFilterLogs", + "description": "```go\nfunc (s *FullNodeStruct) EthGetFilterLogs(p0 context.Context, p1 ethtypes.EthFilterID) (*ethtypes.EthFilterResult, error) {\n\tif s.Internal.EthGetFilterLogs == nil {\n\t\treturn nil, ErrNotSupported\n\t}\n\treturn s.Internal.EthGetFilterLogs(p0, p1)\n}\n```", + "summary": "EthGetFilterLogs retrieves event logs matching filter with given id.\nMaps to JSON-RPC method: \"eth_getFilterLogs\".\n", + "paramStructure": "by-position", + "params": [ + { + "name": "p1", + "description": "ethtypes.EthFilterID", + "summary": "", + "schema": { + "examples": [ + "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e" + ], + "items": [ + { + "title": "number", + "description": "Number is a number", + "type": [ + "number" + ] + } + ], + "maxItems": 32, + "minItems": 32, + "type": [ + "array" + ] + }, + "required": true, + "deprecated": false + } + ], + "result": { + "name": "*ethtypes.EthFilterResult", + "description": "*ethtypes.EthFilterResult", + "summary": "", + "schema": { + "examples": [ + [ + {} + ] + ], + "additionalProperties": false, + "properties": { + "Results": { + "items": { + "additionalProperties": true, + "type": "object" + }, + "type": "array" + } + }, + "type": [ + "object" + ] + }, + "required": true, + "deprecated": false + }, + "deprecated": false, + "externalDocs": { + "description": "Github remote link", + "url": "https://github.com/filecoin-project/lotus/blob/master/api/v2api/proxy_gen.go#L330" + } + }, + { + "name": "Filecoin.EthGetLogs", + "description": "```go\nfunc (s *FullNodeStruct) EthGetLogs(p0 context.Context, p1 *ethtypes.EthFilterSpec) (*ethtypes.EthFilterResult, error) {\n\tif s.Internal.EthGetLogs == nil {\n\t\treturn nil, ErrNotSupported\n\t}\n\treturn s.Internal.EthGetLogs(p0, p1)\n}\n```", + "summary": "EthGetLogs retrieves event logs matching given filter specification.\nMaps to JSON-RPC method: \"eth_getLogs\".\n", + "paramStructure": "by-position", + "params": [ + { + "name": "p1", + "description": "*ethtypes.EthFilterSpec", + "summary": "", + "schema": { + "examples": [ + { + "fromBlock": "2301220", + "address": [ + "0x5cbeecf99d3fdb3f25e309cc264f240bb0664031" + ], + "topics": null + } + ], + "additionalProperties": false, + "properties": { + "address": { + "items": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 20, + "minItems": 20, + "type": "array" + }, + "type": "array" + }, + "blockHash": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 32, + "minItems": 32, + "type": "array" + }, + "fromBlock": { + "type": "string" + }, + "toBlock": { + "type": "string" + }, + "topics": { + "items": { + "items": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 32, + "minItems": 32, + "type": "array" + }, + "type": "array" + }, + "type": "array" + } + }, + "type": [ + "object" + ] + }, + "required": true, + "deprecated": false + } + ], + "result": { + "name": "*ethtypes.EthFilterResult", + "description": "*ethtypes.EthFilterResult", + "summary": "", + "schema": { + "examples": [ + [ + {} + ] + ], + "additionalProperties": false, + "properties": { + "Results": { + "items": { + "additionalProperties": true, + "type": "object" + }, + "type": "array" + } + }, + "type": [ + "object" + ] + }, + "required": true, + "deprecated": false + }, + "deprecated": false, + "externalDocs": { + "description": "Github remote link", + "url": "https://github.com/filecoin-project/lotus/blob/master/api/v2api/proxy_gen.go#L341" + } + }, + { + "name": "Filecoin.EthGetMessageCidByTransactionHash", + "description": "```go\nfunc (s *FullNodeStruct) EthGetMessageCidByTransactionHash(p0 context.Context, p1 *ethtypes.EthHash) (*cid.Cid, error) {\n\tif s.Internal.EthGetMessageCidByTransactionHash == nil {\n\t\treturn nil, ErrNotSupported\n\t}\n\treturn s.Internal.EthGetMessageCidByTransactionHash(p0, p1)\n}\n```", + "summary": "EthGetMessageCidByTransactionHash retrieves the Filecoin CID corresponding to an Ethereum\ntransaction hash.\nMaps to JSON-RPC method: \"eth_getMessageCidByTransactionHash\".\n", + "paramStructure": "by-position", + "params": [ + { + "name": "p1", + "description": "*ethtypes.EthHash", + "summary": "", + "schema": { + "examples": [ + "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e" + ], + "items": [ + { + "title": "number", + "description": "Number is a number", + "type": [ + "number" + ] + } + ], + "maxItems": 32, + "minItems": 32, + "type": [ + "array" + ] + }, + "required": true, + "deprecated": false + } + ], + "result": { + "name": "*cid.Cid", + "description": "*cid.Cid", + "summary": "", + "schema": { + "title": "Content Identifier", + "description": "Cid represents a self-describing content addressed identifier. It is formed by a Version, a Codec (which indicates a multicodec-packed content type) and a Multihash.", + "examples": [ + { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + } + ], + "type": [ + "string" + ] + }, + "required": true, + "deprecated": false + }, + "deprecated": false, + "externalDocs": { + "description": "Github remote link", + "url": "https://github.com/filecoin-project/lotus/blob/master/api/v2api/proxy_gen.go#L352" + } + }, + { + "name": "Filecoin.EthGetStorageAt", + "description": "```go\nfunc (s *FullNodeStruct) EthGetStorageAt(p0 context.Context, p1 ethtypes.EthAddress, p2 ethtypes.EthBytes, p3 ethtypes.EthBlockNumberOrHash) (ethtypes.EthBytes, error) {\n\tif s.Internal.EthGetStorageAt == nil {\n\t\treturn *new(ethtypes.EthBytes), ErrNotSupported\n\t}\n\treturn s.Internal.EthGetStorageAt(p0, p1, p2, p3)\n}\n```", + "summary": "EthGetStorageAt retrieves the storage value at a specific position for a contract\nat a given block state, identified by its number, hash, or a special tag like \"latest\" or\n\"finalized\".\nMaps to JSON-RPC method: \"eth_getStorageAt\".\n", + "paramStructure": "by-position", + "params": [ + { + "name": "p1", + "description": "ethtypes.EthAddress", + "summary": "", + "schema": { + "examples": [ + "0x5cbeecf99d3fdb3f25e309cc264f240bb0664031" + ], + "items": [ + { + "title": "number", + "description": "Number is a number", + "type": [ + "number" + ] + } + ], + "maxItems": 20, + "minItems": 20, + "type": [ + "array" + ] + }, + "required": true, + "deprecated": false + }, + { + "name": "p2", + "description": "ethtypes.EthBytes", + "summary": "", + "schema": { + "examples": [ + "0x07" + ], + "items": [ + { + "title": "number", + "description": "Number is a number", + "type": [ + "number" + ] + } + ], + "type": [ + "array" + ] + }, + "required": true, + "deprecated": false + }, + { + "name": "p3", + "description": "ethtypes.EthBlockNumberOrHash", + "summary": "", + "schema": { + "examples": [ + "string value" + ], + "additionalProperties": false, + "properties": { + "blockHash": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 32, + "minItems": 32, + "type": "array" + }, + "blockNumber": { + "title": "number", + "type": "number" + }, + "requireCanonical": { + "type": "boolean" + } + }, + "type": [ + "object" + ] + }, + "required": true, + "deprecated": false + } + ], + "result": { + "name": "ethtypes.EthBytes", + "description": "ethtypes.EthBytes", + "summary": "", + "schema": { + "examples": [ + "0x07" + ], + "items": [ + { + "title": "number", + "description": "Number is a number", + "type": [ + "number" + ] + } + ], + "type": [ + "array" + ] + }, + "required": true, + "deprecated": false + }, + "deprecated": false, + "externalDocs": { + "description": "Github remote link", + "url": "https://github.com/filecoin-project/lotus/blob/master/api/v2api/proxy_gen.go#L363" + } + }, + { + "name": "Filecoin.EthGetTransactionByBlockHashAndIndex", + "description": "```go\nfunc (s *FullNodeStruct) EthGetTransactionByBlockHashAndIndex(p0 context.Context, p1 ethtypes.EthHash, p2 ethtypes.EthUint64) (*ethtypes.EthTx, error) {\n\tif s.Internal.EthGetTransactionByBlockHashAndIndex == nil {\n\t\treturn nil, ErrNotSupported\n\t}\n\treturn s.Internal.EthGetTransactionByBlockHashAndIndex(p0, p1, p2)\n}\n```", + "summary": "EthGetTransactionByBlockHashAndIndex retrieves a transaction by its block hash and index.\nMaps to JSON-RPC method: \"eth_getTransactionByBlockHashAndIndex\".\n", + "paramStructure": "by-position", + "params": [ + { + "name": "p1", + "description": "ethtypes.EthHash", + "summary": "", + "schema": { + "examples": [ + "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e" + ], + "items": [ + { + "title": "number", + "description": "Number is a number", + "type": [ + "number" + ] + } + ], + "maxItems": 32, + "minItems": 32, + "type": [ + "array" + ] + }, + "required": true, + "deprecated": false + }, + { + "name": "p2", + "description": "ethtypes.EthUint64", + "summary": "", + "schema": { + "title": "number", + "description": "Number is a number", + "examples": [ + "0x5" + ], + "type": [ + "number" + ] + }, + "required": true, + "deprecated": false + } + ], + "result": { + "name": "*ethtypes.EthTx", + "description": "*ethtypes.EthTx", + "summary": "", + "schema": { + "examples": [ + { + "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", + "gasPrice": "0x0", + "accessList": [ + "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e" + ], + "v": "0x0", + "r": "0x0", + "s": "0x0" + } + ], + "additionalProperties": false, + "properties": { + "accessList": { + "items": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 32, + "minItems": 32, + "type": "array" + }, + "type": "array" + }, + "blockHash": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 32, + "minItems": 32, + "type": "array" + }, + "blockNumber": { + "title": "number", + "type": "number" + }, + "chainId": { + "title": "number", + "type": "number" + }, + "from": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 20, + "minItems": 20, + "type": "array" + }, + "gas": { + "title": "number", + "type": "number" + }, + "gasPrice": { + "additionalProperties": false, + "type": "object" + }, + "hash": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 32, + "minItems": 32, + "type": "array" + }, + "input": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "type": "array" + }, + "maxFeePerGas": { + "additionalProperties": false, + "type": "object" + }, + "maxPriorityFeePerGas": { + "additionalProperties": false, + "type": "object" + }, + "nonce": { + "title": "number", + "type": "number" + }, + "r": { + "additionalProperties": false, + "type": "object" + }, + "s": { + "additionalProperties": false, + "type": "object" + }, + "to": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 20, + "minItems": 20, + "type": "array" + }, + "transactionIndex": { + "title": "number", + "type": "number" + }, + "type": { + "title": "number", + "type": "number" + }, + "v": { + "additionalProperties": false, + "type": "object" + }, + "value": { + "additionalProperties": false, + "type": "object" + } + }, + "type": [ + "object" + ] + }, + "required": true, + "deprecated": false + }, + "deprecated": false, + "externalDocs": { + "description": "Github remote link", + "url": "https://github.com/filecoin-project/lotus/blob/master/api/v2api/proxy_gen.go#L374" + } + }, + { + "name": "Filecoin.EthGetTransactionByBlockNumberAndIndex", + "description": "```go\nfunc (s *FullNodeStruct) EthGetTransactionByBlockNumberAndIndex(p0 context.Context, p1 string, p2 ethtypes.EthUint64) (*ethtypes.EthTx, error) {\n\tif s.Internal.EthGetTransactionByBlockNumberAndIndex == nil {\n\t\treturn nil, ErrNotSupported\n\t}\n\treturn s.Internal.EthGetTransactionByBlockNumberAndIndex(p0, p1, p2)\n}\n```", + "summary": "EthGetTransactionByBlockNumberAndIndex retrieves a transaction by its block number and index.\nMaps to JSON-RPC method: \"eth_getTransactionByBlockNumberAndIndex\".\n", + "paramStructure": "by-position", + "params": [ + { + "name": "p1", + "description": "string", + "summary": "", + "schema": { + "examples": [ + "string value" + ], + "type": [ + "string" + ] + }, + "required": true, + "deprecated": false + }, + { + "name": "p2", + "description": "ethtypes.EthUint64", + "summary": "", + "schema": { + "title": "number", + "description": "Number is a number", + "examples": [ + "0x5" + ], + "type": [ + "number" + ] + }, + "required": true, + "deprecated": false + } + ], + "result": { + "name": "*ethtypes.EthTx", + "description": "*ethtypes.EthTx", + "summary": "", + "schema": { + "examples": [ + { + "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", + "gasPrice": "0x0", + "accessList": [ + "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e" + ], + "v": "0x0", + "r": "0x0", + "s": "0x0" + } + ], + "additionalProperties": false, + "properties": { + "accessList": { + "items": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 32, + "minItems": 32, + "type": "array" + }, + "type": "array" + }, + "blockHash": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 32, + "minItems": 32, + "type": "array" + }, + "blockNumber": { + "title": "number", + "type": "number" + }, + "chainId": { + "title": "number", + "type": "number" + }, + "from": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 20, + "minItems": 20, + "type": "array" + }, + "gas": { + "title": "number", + "type": "number" + }, + "gasPrice": { + "additionalProperties": false, + "type": "object" + }, + "hash": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 32, + "minItems": 32, + "type": "array" + }, + "input": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "type": "array" + }, + "maxFeePerGas": { + "additionalProperties": false, + "type": "object" + }, + "maxPriorityFeePerGas": { + "additionalProperties": false, + "type": "object" + }, + "nonce": { + "title": "number", + "type": "number" + }, + "r": { + "additionalProperties": false, + "type": "object" + }, + "s": { + "additionalProperties": false, + "type": "object" + }, + "to": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 20, + "minItems": 20, + "type": "array" + }, + "transactionIndex": { + "title": "number", + "type": "number" + }, + "type": { + "title": "number", + "type": "number" + }, + "v": { + "additionalProperties": false, + "type": "object" + }, + "value": { + "additionalProperties": false, + "type": "object" + } + }, + "type": [ + "object" + ] + }, + "required": true, + "deprecated": false + }, + "deprecated": false, + "externalDocs": { + "description": "Github remote link", + "url": "https://github.com/filecoin-project/lotus/blob/master/api/v2api/proxy_gen.go#L385" + } + }, + { + "name": "Filecoin.EthGetTransactionByHash", + "description": "```go\nfunc (s *FullNodeStruct) EthGetTransactionByHash(p0 context.Context, p1 *ethtypes.EthHash) (*ethtypes.EthTx, error) {\n\tif s.Internal.EthGetTransactionByHash == nil {\n\t\treturn nil, ErrNotSupported\n\t}\n\treturn s.Internal.EthGetTransactionByHash(p0, p1)\n}\n```", + "summary": "EthGetTransactionByHash retrieves a transaction by its hash.\nMaps to JSON-RPC method: \"eth_getTransactionByHash\".\n", + "paramStructure": "by-position", + "params": [ + { + "name": "p1", + "description": "*ethtypes.EthHash", + "summary": "", + "schema": { + "examples": [ + "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e" + ], + "items": [ + { + "title": "number", + "description": "Number is a number", + "type": [ + "number" + ] + } + ], + "maxItems": 32, + "minItems": 32, + "type": [ + "array" + ] + }, + "required": true, + "deprecated": false + } + ], + "result": { + "name": "*ethtypes.EthTx", + "description": "*ethtypes.EthTx", + "summary": "", + "schema": { + "examples": [ + { + "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", + "gasPrice": "0x0", + "accessList": [ + "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e" + ], + "v": "0x0", + "r": "0x0", + "s": "0x0" + } + ], + "additionalProperties": false, + "properties": { + "accessList": { + "items": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 32, + "minItems": 32, + "type": "array" + }, + "type": "array" + }, + "blockHash": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 32, + "minItems": 32, + "type": "array" + }, + "blockNumber": { + "title": "number", + "type": "number" + }, + "chainId": { + "title": "number", + "type": "number" + }, + "from": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 20, + "minItems": 20, + "type": "array" + }, + "gas": { + "title": "number", + "type": "number" + }, + "gasPrice": { + "additionalProperties": false, + "type": "object" + }, + "hash": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 32, + "minItems": 32, + "type": "array" + }, + "input": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "type": "array" + }, + "maxFeePerGas": { + "additionalProperties": false, + "type": "object" + }, + "maxPriorityFeePerGas": { + "additionalProperties": false, + "type": "object" + }, + "nonce": { + "title": "number", + "type": "number" + }, + "r": { + "additionalProperties": false, + "type": "object" + }, + "s": { + "additionalProperties": false, + "type": "object" + }, + "to": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 20, + "minItems": 20, + "type": "array" + }, + "transactionIndex": { + "title": "number", + "type": "number" + }, + "type": { + "title": "number", + "type": "number" + }, + "v": { + "additionalProperties": false, + "type": "object" + }, + "value": { + "additionalProperties": false, + "type": "object" + } + }, + "type": [ + "object" + ] + }, + "required": true, + "deprecated": false + }, + "deprecated": false, + "externalDocs": { + "description": "Github remote link", + "url": "https://github.com/filecoin-project/lotus/blob/master/api/v2api/proxy_gen.go#L396" + } + }, + { + "name": "Filecoin.EthGetTransactionByHashLimited", + "description": "```go\nfunc (s *FullNodeStruct) EthGetTransactionByHashLimited(p0 context.Context, p1 *ethtypes.EthHash, p2 abi.ChainEpoch) (*ethtypes.EthTx, error) {\n\tif s.Internal.EthGetTransactionByHashLimited == nil {\n\t\treturn nil, ErrNotSupported\n\t}\n\treturn s.Internal.EthGetTransactionByHashLimited(p0, p1, p2)\n}\n```", + "summary": "EthGetTransactionByHashLimited retrieves a transaction by its hash, with an optional limit on\nthe chain epoch for state resolution.\n", + "paramStructure": "by-position", + "params": [ + { + "name": "p1", + "description": "*ethtypes.EthHash", + "summary": "", + "schema": { + "examples": [ + "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e" + ], + "items": [ + { + "title": "number", + "description": "Number is a number", + "type": [ + "number" + ] + } + ], + "maxItems": 32, + "minItems": 32, + "type": [ + "array" + ] + }, + "required": true, + "deprecated": false + }, + { + "name": "p2", + "description": "abi.ChainEpoch", + "summary": "", + "schema": { + "title": "number", + "description": "Number is a number", + "examples": [ + 10101 + ], + "type": [ + "number" + ] + }, + "required": true, + "deprecated": false + } + ], + "result": { + "name": "*ethtypes.EthTx", + "description": "*ethtypes.EthTx", + "summary": "", + "schema": { + "examples": [ + { + "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", + "gasPrice": "0x0", + "accessList": [ + "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e" + ], + "v": "0x0", + "r": "0x0", + "s": "0x0" + } + ], + "additionalProperties": false, + "properties": { + "accessList": { + "items": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 32, + "minItems": 32, + "type": "array" + }, + "type": "array" + }, + "blockHash": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 32, + "minItems": 32, + "type": "array" + }, + "blockNumber": { + "title": "number", + "type": "number" + }, + "chainId": { + "title": "number", + "type": "number" + }, + "from": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 20, + "minItems": 20, + "type": "array" + }, + "gas": { + "title": "number", + "type": "number" + }, + "gasPrice": { + "additionalProperties": false, + "type": "object" + }, + "hash": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 32, + "minItems": 32, + "type": "array" + }, + "input": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "type": "array" + }, + "maxFeePerGas": { + "additionalProperties": false, + "type": "object" + }, + "maxPriorityFeePerGas": { + "additionalProperties": false, + "type": "object" + }, + "nonce": { + "title": "number", + "type": "number" + }, + "r": { + "additionalProperties": false, + "type": "object" + }, + "s": { + "additionalProperties": false, + "type": "object" + }, + "to": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 20, + "minItems": 20, + "type": "array" + }, + "transactionIndex": { + "title": "number", + "type": "number" + }, + "type": { + "title": "number", + "type": "number" + }, + "v": { + "additionalProperties": false, + "type": "object" + }, + "value": { + "additionalProperties": false, + "type": "object" + } + }, + "type": [ + "object" + ] + }, + "required": true, + "deprecated": false + }, + "deprecated": false, + "externalDocs": { + "description": "Github remote link", + "url": "https://github.com/filecoin-project/lotus/blob/master/api/v2api/proxy_gen.go#L407" + } + }, + { + "name": "Filecoin.EthGetTransactionCount", + "description": "```go\nfunc (s *FullNodeStruct) EthGetTransactionCount(p0 context.Context, p1 ethtypes.EthAddress, p2 ethtypes.EthBlockNumberOrHash) (ethtypes.EthUint64, error) {\n\tif s.Internal.EthGetTransactionCount == nil {\n\t\treturn *new(ethtypes.EthUint64), ErrNotSupported\n\t}\n\treturn s.Internal.EthGetTransactionCount(p0, p1, p2)\n}\n```", + "summary": "EthGetTransactionCount retrieves the number of transactions sent from an address at a specific\nblock, identified by its number, hash, or a special tag like \"latest\" or \"finalized\".\nMaps to JSON-RPC method: \"eth_getTransactionCount\".\n", + "paramStructure": "by-position", + "params": [ + { + "name": "p1", + "description": "ethtypes.EthAddress", + "summary": "", + "schema": { + "examples": [ + "0x5cbeecf99d3fdb3f25e309cc264f240bb0664031" + ], + "items": [ + { + "title": "number", + "description": "Number is a number", + "type": [ + "number" + ] + } + ], + "maxItems": 20, + "minItems": 20, + "type": [ + "array" + ] + }, + "required": true, + "deprecated": false + }, + { + "name": "p2", + "description": "ethtypes.EthBlockNumberOrHash", + "summary": "", + "schema": { + "examples": [ + "string value" + ], + "additionalProperties": false, + "properties": { + "blockHash": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 32, + "minItems": 32, + "type": "array" + }, + "blockNumber": { + "title": "number", + "type": "number" + }, + "requireCanonical": { + "type": "boolean" + } + }, + "type": [ + "object" + ] + }, + "required": true, + "deprecated": false + } + ], + "result": { + "name": "ethtypes.EthUint64", + "description": "ethtypes.EthUint64", + "summary": "", + "schema": { + "title": "number", + "description": "Number is a number", + "examples": [ + "0x5" + ], + "type": [ + "number" + ] + }, + "required": true, + "deprecated": false + }, + "deprecated": false, + "externalDocs": { + "description": "Github remote link", + "url": "https://github.com/filecoin-project/lotus/blob/master/api/v2api/proxy_gen.go#L418" + } + }, + { + "name": "Filecoin.EthGetTransactionHashByCid", + "description": "```go\nfunc (s *FullNodeStruct) EthGetTransactionHashByCid(p0 context.Context, p1 cid.Cid) (*ethtypes.EthHash, error) {\n\tif s.Internal.EthGetTransactionHashByCid == nil {\n\t\treturn nil, ErrNotSupported\n\t}\n\treturn s.Internal.EthGetTransactionHashByCid(p0, p1)\n}\n```", + "summary": "EthGetTransactionHashByCid retrieves the Ethereum transaction hash corresponding to a Filecoin\nCID.\nMaps to JSON-RPC method: \"eth_getTransactionHashByCid\".\n", + "paramStructure": "by-position", + "params": [ + { + "name": "p1", + "description": "cid.Cid", + "summary": "", + "schema": { + "title": "Content Identifier", + "description": "Cid represents a self-describing content addressed identifier. It is formed by a Version, a Codec (which indicates a multicodec-packed content type) and a Multihash.", + "examples": [ + { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + } + ], + "type": [ + "string" + ] + }, + "required": true, + "deprecated": false + } + ], + "result": { + "name": "*ethtypes.EthHash", + "description": "*ethtypes.EthHash", + "summary": "", + "schema": { + "examples": [ + "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e" + ], + "items": [ + { + "title": "number", + "description": "Number is a number", + "type": [ + "number" + ] + } + ], + "maxItems": 32, + "minItems": 32, + "type": [ + "array" + ] + }, + "required": true, + "deprecated": false + }, + "deprecated": false, + "externalDocs": { + "description": "Github remote link", + "url": "https://github.com/filecoin-project/lotus/blob/master/api/v2api/proxy_gen.go#L429" + } + }, + { + "name": "Filecoin.EthGetTransactionReceipt", + "description": "```go\nfunc (s *FullNodeStruct) EthGetTransactionReceipt(p0 context.Context, p1 ethtypes.EthHash) (*ethtypes.EthTxReceipt, error) {\n\tif s.Internal.EthGetTransactionReceipt == nil {\n\t\treturn nil, ErrNotSupported\n\t}\n\treturn s.Internal.EthGetTransactionReceipt(p0, p1)\n}\n```", + "summary": "EthGetTransactionReceipt retrieves the receipt of a transaction by its hash.\nMaps to JSON-RPC method: \"eth_getTransactionReceipt\".\n", + "paramStructure": "by-position", + "params": [ + { + "name": "p1", + "description": "ethtypes.EthHash", + "summary": "", + "schema": { + "examples": [ + "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e" + ], + "items": [ + { + "title": "number", + "description": "Number is a number", + "type": [ + "number" + ] + } + ], + "maxItems": 32, + "minItems": 32, + "type": [ + "array" + ] + }, + "required": true, + "deprecated": false + } + ], + "result": { + "name": "*ethtypes.EthTxReceipt", + "description": "*ethtypes.EthTxReceipt", + "summary": "", + "schema": { + "examples": [ + { + "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" + } + ], + "additionalProperties": false, + "properties": { + "blockHash": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 32, + "minItems": 32, + "type": "array" + }, + "blockNumber": { + "title": "number", + "type": "number" + }, + "contractAddress": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 20, + "minItems": 20, + "type": "array" + }, + "cumulativeGasUsed": { + "title": "number", + "type": "number" + }, + "effectiveGasPrice": { + "additionalProperties": false, + "type": "object" + }, + "from": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 20, + "minItems": 20, + "type": "array" + }, + "gasUsed": { + "title": "number", + "type": "number" + }, + "logs": { + "items": { + "additionalProperties": false, + "properties": { + "address": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 20, + "minItems": 20, + "type": "array" + }, + "blockHash": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 32, + "minItems": 32, + "type": "array" + }, + "blockNumber": { + "title": "number", + "type": "number" + }, + "data": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "type": "array" + }, + "logIndex": { + "title": "number", + "type": "number" + }, + "removed": { + "type": "boolean" + }, + "topics": { + "items": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 32, + "minItems": 32, + "type": "array" + }, + "type": "array" + }, + "transactionHash": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 32, + "minItems": 32, + "type": "array" + }, + "transactionIndex": { + "title": "number", + "type": "number" + } + }, + "type": "object" + }, + "type": "array" + }, + "logsBloom": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "type": "array" + }, + "root": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 32, + "minItems": 32, + "type": "array" + }, + "status": { + "title": "number", + "type": "number" + }, + "to": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 20, + "minItems": 20, + "type": "array" + }, + "transactionHash": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 32, + "minItems": 32, + "type": "array" + }, + "transactionIndex": { + "title": "number", + "type": "number" + }, + "type": { + "title": "number", + "type": "number" + } + }, + "type": [ + "object" + ] + }, + "required": true, + "deprecated": false + }, + "deprecated": false, + "externalDocs": { + "description": "Github remote link", + "url": "https://github.com/filecoin-project/lotus/blob/master/api/v2api/proxy_gen.go#L440" + } + }, + { + "name": "Filecoin.EthGetTransactionReceiptLimited", + "description": "```go\nfunc (s *FullNodeStruct) EthGetTransactionReceiptLimited(p0 context.Context, p1 ethtypes.EthHash, p2 abi.ChainEpoch) (*ethtypes.EthTxReceipt, error) {\n\tif s.Internal.EthGetTransactionReceiptLimited == nil {\n\t\treturn nil, ErrNotSupported\n\t}\n\treturn s.Internal.EthGetTransactionReceiptLimited(p0, p1, p2)\n}\n```", + "summary": "EthGetTransactionReceiptLimited retrieves the receipt of a transaction by its hash, with an\noptional limit on the chain epoch for state resolution.\n", + "paramStructure": "by-position", + "params": [ + { + "name": "p1", + "description": "ethtypes.EthHash", + "summary": "", + "schema": { + "examples": [ + "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e" + ], + "items": [ + { + "title": "number", + "description": "Number is a number", + "type": [ + "number" + ] + } + ], + "maxItems": 32, + "minItems": 32, + "type": [ + "array" + ] + }, + "required": true, + "deprecated": false + }, + { + "name": "p2", + "description": "abi.ChainEpoch", + "summary": "", + "schema": { + "title": "number", + "description": "Number is a number", + "examples": [ + 10101 + ], + "type": [ + "number" + ] + }, + "required": true, + "deprecated": false + } + ], + "result": { + "name": "*ethtypes.EthTxReceipt", + "description": "*ethtypes.EthTxReceipt", + "summary": "", + "schema": { + "examples": [ + { + "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" + } + ], + "additionalProperties": false, + "properties": { + "blockHash": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 32, + "minItems": 32, + "type": "array" + }, + "blockNumber": { + "title": "number", + "type": "number" + }, + "contractAddress": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 20, + "minItems": 20, + "type": "array" + }, + "cumulativeGasUsed": { + "title": "number", + "type": "number" + }, + "effectiveGasPrice": { + "additionalProperties": false, + "type": "object" + }, + "from": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 20, + "minItems": 20, + "type": "array" + }, + "gasUsed": { + "title": "number", + "type": "number" + }, + "logs": { + "items": { + "additionalProperties": false, + "properties": { + "address": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 20, + "minItems": 20, + "type": "array" + }, + "blockHash": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 32, + "minItems": 32, + "type": "array" + }, + "blockNumber": { + "title": "number", + "type": "number" + }, + "data": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "type": "array" + }, + "logIndex": { + "title": "number", + "type": "number" + }, + "removed": { + "type": "boolean" + }, + "topics": { + "items": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 32, + "minItems": 32, + "type": "array" + }, + "type": "array" + }, + "transactionHash": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 32, + "minItems": 32, + "type": "array" + }, + "transactionIndex": { + "title": "number", + "type": "number" + } + }, + "type": "object" + }, + "type": "array" + }, + "logsBloom": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "type": "array" + }, + "root": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 32, + "minItems": 32, + "type": "array" + }, + "status": { + "title": "number", + "type": "number" + }, + "to": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 20, + "minItems": 20, + "type": "array" + }, + "transactionHash": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 32, + "minItems": 32, + "type": "array" + }, + "transactionIndex": { + "title": "number", + "type": "number" + }, + "type": { + "title": "number", + "type": "number" + } + }, + "type": [ + "object" + ] + }, + "required": true, + "deprecated": false + }, + "deprecated": false, + "externalDocs": { + "description": "Github remote link", + "url": "https://github.com/filecoin-project/lotus/blob/master/api/v2api/proxy_gen.go#L451" + } + }, + { + "name": "Filecoin.EthMaxPriorityFeePerGas", + "description": "```go\nfunc (s *FullNodeStruct) EthMaxPriorityFeePerGas(p0 context.Context) (ethtypes.EthBigInt, error) {\n\tif s.Internal.EthMaxPriorityFeePerGas == nil {\n\t\treturn *new(ethtypes.EthBigInt), ErrNotSupported\n\t}\n\treturn s.Internal.EthMaxPriorityFeePerGas(p0)\n}\n```", + "summary": "EthMaxPriorityFeePerGas retrieves the maximum priority fee per gas in the network.\nMaps to JSON-RPC method: \"eth_maxPriorityFeePerGas\".\n", + "paramStructure": "by-position", + "params": [], + "result": { + "name": "ethtypes.EthBigInt", + "description": "ethtypes.EthBigInt", + "summary": "", + "schema": { + "examples": [ + "0x0" + ], + "additionalProperties": false, + "type": [ + "object" + ] + }, + "required": true, + "deprecated": false + }, + "deprecated": false, + "externalDocs": { + "description": "Github remote link", + "url": "https://github.com/filecoin-project/lotus/blob/master/api/v2api/proxy_gen.go#L462" + } + }, + { + "name": "Filecoin.EthNewBlockFilter", + "description": "```go\nfunc (s *FullNodeStruct) EthNewBlockFilter(p0 context.Context) (ethtypes.EthFilterID, error) {\n\tif s.Internal.EthNewBlockFilter == nil {\n\t\treturn *new(ethtypes.EthFilterID), ErrNotSupported\n\t}\n\treturn s.Internal.EthNewBlockFilter(p0)\n}\n```", + "summary": "EthNewBlockFilter installs a persistent filter to notify when a new block arrives.\nMaps to JSON-RPC method: \"eth_newBlockFilter\".\n", + "paramStructure": "by-position", + "params": [], + "result": { + "name": "ethtypes.EthFilterID", + "description": "ethtypes.EthFilterID", + "summary": "", + "schema": { + "examples": [ + "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e" + ], + "items": [ + { + "title": "number", + "description": "Number is a number", + "type": [ + "number" + ] + } + ], + "maxItems": 32, + "minItems": 32, + "type": [ + "array" + ] + }, + "required": true, + "deprecated": false + }, + "deprecated": false, + "externalDocs": { + "description": "Github remote link", + "url": "https://github.com/filecoin-project/lotus/blob/master/api/v2api/proxy_gen.go#L473" + } + }, + { + "name": "Filecoin.EthNewFilter", + "description": "```go\nfunc (s *FullNodeStruct) EthNewFilter(p0 context.Context, p1 *ethtypes.EthFilterSpec) (ethtypes.EthFilterID, error) {\n\tif s.Internal.EthNewFilter == nil {\n\t\treturn *new(ethtypes.EthFilterID), ErrNotSupported\n\t}\n\treturn s.Internal.EthNewFilter(p0, p1)\n}\n```", + "summary": "EthNewFilter installs a persistent filter based on given filter specification.\nMaps to JSON-RPC method: \"eth_newFilter\".\n", + "paramStructure": "by-position", + "params": [ + { + "name": "p1", + "description": "*ethtypes.EthFilterSpec", + "summary": "", + "schema": { + "examples": [ + { + "fromBlock": "2301220", + "address": [ + "0x5cbeecf99d3fdb3f25e309cc264f240bb0664031" + ], + "topics": null + } + ], + "additionalProperties": false, + "properties": { + "address": { + "items": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 20, + "minItems": 20, + "type": "array" + }, + "type": "array" + }, + "blockHash": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 32, + "minItems": 32, + "type": "array" + }, + "fromBlock": { + "type": "string" + }, + "toBlock": { + "type": "string" + }, + "topics": { + "items": { + "items": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 32, + "minItems": 32, + "type": "array" + }, + "type": "array" + }, + "type": "array" + } + }, + "type": [ + "object" + ] + }, + "required": true, + "deprecated": false + } + ], + "result": { + "name": "ethtypes.EthFilterID", + "description": "ethtypes.EthFilterID", + "summary": "", + "schema": { + "examples": [ + "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e" + ], + "items": [ + { + "title": "number", + "description": "Number is a number", + "type": [ + "number" + ] + } + ], + "maxItems": 32, + "minItems": 32, + "type": [ + "array" + ] + }, + "required": true, + "deprecated": false + }, + "deprecated": false, + "externalDocs": { + "description": "Github remote link", + "url": "https://github.com/filecoin-project/lotus/blob/master/api/v2api/proxy_gen.go#L484" + } + }, + { + "name": "Filecoin.EthNewPendingTransactionFilter", + "description": "```go\nfunc (s *FullNodeStruct) EthNewPendingTransactionFilter(p0 context.Context) (ethtypes.EthFilterID, error) {\n\tif s.Internal.EthNewPendingTransactionFilter == nil {\n\t\treturn *new(ethtypes.EthFilterID), ErrNotSupported\n\t}\n\treturn s.Internal.EthNewPendingTransactionFilter(p0)\n}\n```", + "summary": "EthNewPendingTransactionFilter installs a persistent filter to notify when new messages arrive\nin the message pool.\nMaps to JSON-RPC method: \"eth_newPendingTransactionFilter\".\n", + "paramStructure": "by-position", + "params": [], + "result": { + "name": "ethtypes.EthFilterID", + "description": "ethtypes.EthFilterID", + "summary": "", + "schema": { + "examples": [ + "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e" + ], + "items": [ + { + "title": "number", + "description": "Number is a number", + "type": [ + "number" + ] + } + ], + "maxItems": 32, + "minItems": 32, + "type": [ + "array" + ] + }, + "required": true, + "deprecated": false + }, + "deprecated": false, + "externalDocs": { + "description": "Github remote link", + "url": "https://github.com/filecoin-project/lotus/blob/master/api/v2api/proxy_gen.go#L495" + } + }, + { + "name": "Filecoin.EthProtocolVersion", + "description": "```go\nfunc (s *FullNodeStruct) EthProtocolVersion(p0 context.Context) (ethtypes.EthUint64, error) {\n\tif s.Internal.EthProtocolVersion == nil {\n\t\treturn *new(ethtypes.EthUint64), ErrNotSupported\n\t}\n\treturn s.Internal.EthProtocolVersion(p0)\n}\n```", + "summary": "EthProtocolVersion retrieves the Ethereum protocol version supported by the node.\nMaps to JSON-RPC method: \"eth_protocolVersion\".\n", + "paramStructure": "by-position", + "params": [], + "result": { + "name": "ethtypes.EthUint64", + "description": "ethtypes.EthUint64", + "summary": "", + "schema": { + "title": "number", + "description": "Number is a number", + "examples": [ + "0x5" + ], + "type": [ + "number" + ] + }, + "required": true, + "deprecated": false + }, + "deprecated": false, + "externalDocs": { + "description": "Github remote link", + "url": "https://github.com/filecoin-project/lotus/blob/master/api/v2api/proxy_gen.go#L506" + } + }, + { + "name": "Filecoin.EthSendRawTransaction", + "description": "```go\nfunc (s *FullNodeStruct) EthSendRawTransaction(p0 context.Context, p1 ethtypes.EthBytes) (ethtypes.EthHash, error) {\n\tif s.Internal.EthSendRawTransaction == nil {\n\t\treturn *new(ethtypes.EthHash), ErrNotSupported\n\t}\n\treturn s.Internal.EthSendRawTransaction(p0, p1)\n}\n```", + "summary": "EthSendRawTransaction submits a raw Ethereum transaction to the network.\nMaps to JSON-RPC method: \"eth_sendRawTransaction\".\n", + "paramStructure": "by-position", + "params": [ + { + "name": "p1", + "description": "ethtypes.EthBytes", + "summary": "", + "schema": { + "examples": [ + "0x07" + ], + "items": [ + { + "title": "number", + "description": "Number is a number", + "type": [ + "number" + ] + } + ], + "type": [ + "array" + ] + }, + "required": true, + "deprecated": false + } + ], + "result": { + "name": "ethtypes.EthHash", + "description": "ethtypes.EthHash", + "summary": "", + "schema": { + "examples": [ + "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e" + ], + "items": [ + { + "title": "number", + "description": "Number is a number", + "type": [ + "number" + ] + } + ], + "maxItems": 32, + "minItems": 32, + "type": [ + "array" + ] + }, + "required": true, + "deprecated": false + }, + "deprecated": false, + "externalDocs": { + "description": "Github remote link", + "url": "https://github.com/filecoin-project/lotus/blob/master/api/v2api/proxy_gen.go#L517" + } + }, + { + "name": "Filecoin.EthSendRawTransactionUntrusted", + "description": "```go\nfunc (s *FullNodeStruct) EthSendRawTransactionUntrusted(p0 context.Context, p1 ethtypes.EthBytes) (ethtypes.EthHash, error) {\n\tif s.Internal.EthSendRawTransactionUntrusted == nil {\n\t\treturn *new(ethtypes.EthHash), ErrNotSupported\n\t}\n\treturn s.Internal.EthSendRawTransactionUntrusted(p0, p1)\n}\n```", + "summary": "EthSendRawTransactionUntrusted submits a raw Ethereum transaction from an untrusted source.\n", + "paramStructure": "by-position", + "params": [ + { + "name": "p1", + "description": "ethtypes.EthBytes", + "summary": "", + "schema": { + "examples": [ + "0x07" + ], + "items": [ + { + "title": "number", + "description": "Number is a number", + "type": [ + "number" + ] + } + ], + "type": [ + "array" + ] + }, + "required": true, + "deprecated": false + } + ], + "result": { + "name": "ethtypes.EthHash", + "description": "ethtypes.EthHash", + "summary": "", + "schema": { + "examples": [ + "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e" + ], + "items": [ + { + "title": "number", + "description": "Number is a number", + "type": [ + "number" + ] + } + ], + "maxItems": 32, + "minItems": 32, + "type": [ + "array" + ] + }, + "required": true, + "deprecated": false + }, + "deprecated": false, + "externalDocs": { + "description": "Github remote link", + "url": "https://github.com/filecoin-project/lotus/blob/master/api/v2api/proxy_gen.go#L528" + } + }, + { + "name": "Filecoin.EthSubscribe", + "description": "```go\nfunc (s *FullNodeStruct) EthSubscribe(p0 context.Context, p1 jsonrpc.RawParams) (ethtypes.EthSubscriptionID, error) {\n\tif s.Internal.EthSubscribe == nil {\n\t\treturn *new(ethtypes.EthSubscriptionID), ErrNotSupported\n\t}\n\treturn s.Internal.EthSubscribe(p0, p1)\n}\n```", + "summary": "EthSubscribe subscribes to different event types using websockets.\nMaps to JSON-RPC method: \"eth_subscribe\".\n\neventTypes is one or more of:\n - newHeads: notify when new blocks arrive.\n - pendingTransactions: notify when new messages arrive in the message pool.\n - logs: notify new event logs that match a criteria\n\nparams contains additional parameters used with the log event type\nThe client will receive a stream of EthSubscriptionResponse values until EthUnsubscribe is called.\n", + "paramStructure": "by-position", + "params": [ + { + "name": "p1", + "description": "jsonrpc.RawParams", + "summary": "", + "schema": { + "examples": [ + "Bw==" + ], + "items": [ + { + "title": "number", + "description": "Number is a number", + "type": [ + "number" + ] + } + ], + "type": [ + "array" + ] + }, + "required": true, + "deprecated": false + } + ], + "result": { + "name": "ethtypes.EthSubscriptionID", + "description": "ethtypes.EthSubscriptionID", + "summary": "", + "schema": { + "examples": [ + "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e" + ], + "items": [ + { + "title": "number", + "description": "Number is a number", + "type": [ + "number" + ] + } + ], + "maxItems": 32, + "minItems": 32, + "type": [ + "array" + ] + }, + "required": true, + "deprecated": false + }, + "deprecated": false, + "externalDocs": { + "description": "Github remote link", + "url": "https://github.com/filecoin-project/lotus/blob/master/api/v2api/proxy_gen.go#L539" + } + }, + { + "name": "Filecoin.EthSyncing", + "description": "```go\nfunc (s *FullNodeStruct) EthSyncing(p0 context.Context) (ethtypes.EthSyncingResult, error) {\n\tif s.Internal.EthSyncing == nil {\n\t\treturn *new(ethtypes.EthSyncingResult), ErrNotSupported\n\t}\n\treturn s.Internal.EthSyncing(p0)\n}\n```", + "summary": "EthSyncing checks if the node is currently syncing and returns the sync status.\nMaps to JSON-RPC method: \"eth_syncing\".\n", + "paramStructure": "by-position", + "params": [], + "result": { + "name": "ethtypes.EthSyncingResult", + "description": "ethtypes.EthSyncingResult", + "summary": "", + "schema": { + "examples": [ + false + ], + "additionalProperties": false, + "properties": { + "CurrentBlock": { + "title": "number", + "type": "number" + }, + "DoneSync": { + "type": "boolean" + }, + "HighestBlock": { + "title": "number", + "type": "number" + }, + "StartingBlock": { + "title": "number", + "type": "number" + } + }, + "type": [ + "object" + ] + }, + "required": true, + "deprecated": false + }, + "deprecated": false, + "externalDocs": { + "description": "Github remote link", + "url": "https://github.com/filecoin-project/lotus/blob/master/api/v2api/proxy_gen.go#L550" + } + }, + { + "name": "Filecoin.EthTraceBlock", + "description": "```go\nfunc (s *FullNodeStruct) EthTraceBlock(p0 context.Context, p1 string) ([]*ethtypes.EthTraceBlock, error) {\n\tif s.Internal.EthTraceBlock == nil {\n\t\treturn *new([]*ethtypes.EthTraceBlock), ErrNotSupported\n\t}\n\treturn s.Internal.EthTraceBlock(p0, p1)\n}\n```", + "summary": "EthTraceBlock returns an OpenEthereum-compatible trace of the given block.\nMaps to JSON-RPC method: \"trace_block\".\n\nTranslates Filecoin semantics into Ethereum semantics and traces both EVM and FVM calls.\n\nFeatures:\n\n- FVM actor create events, calls, etc. show up as if they were EVM smart contract events.\n- Native FVM call inputs are ABI-encoded (Solidity ABI) as if they were calls to a\n `handle_filecoin_method(uint64 method, uint64 codec, bytes params)` function\n (where `codec` is the IPLD codec of `params`).\n- Native FVM call outputs (return values) are ABI-encoded as `(uint32 exit_code, uint64\n codec, bytes output)` where `codec` is the IPLD codec of `output`.\n\nLimitations (for now):\n\n1. Block rewards are not included in the trace.\n2. SELFDESTRUCT operations are not included in the trace.\n3. EVM smart contract \"create\" events always specify `0xfe` as the \"code\" for newly created EVM\n smart contracts.\n", + "paramStructure": "by-position", + "params": [ + { + "name": "p1", + "description": "string", + "summary": "", + "schema": { + "examples": [ + "string value" + ], + "type": [ + "string" + ] + }, + "required": true, + "deprecated": false + } + ], + "result": { + "name": "[]*ethtypes.EthTraceBlock", + "description": "[]*ethtypes.EthTraceBlock", + "summary": "", + "schema": { + "examples": [ + [ + { + "type": "string value", + "error": "string value", + "subtraces": 123, + "traceAddress": [ + 123 + ], + "action": {}, + "result": {}, + "blockHash": "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e", + "blockNumber": 9, + "transactionHash": "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e", + "transactionPosition": 123 + } + ] + ], + "items": [ + { + "additionalProperties": false, + "properties": { + "action": { + "additionalProperties": true, + "type": "object" + }, + "blockHash": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 32, + "minItems": 32, + "type": "array" + }, + "blockNumber": { + "title": "number", + "type": "number" + }, + "error": { + "type": "string" + }, + "result": { + "additionalProperties": true, + "type": "object" + }, + "subtraces": { + "title": "number", + "type": "number" + }, + "traceAddress": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "type": "array" + }, + "transactionHash": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 32, + "minItems": 32, + "type": "array" + }, + "transactionPosition": { + "title": "number", + "type": "number" + }, + "type": { + "type": "string" + } + }, + "type": [ + "object" + ] + } + ], + "type": [ + "array" + ] + }, + "required": true, + "deprecated": false + }, + "deprecated": false, + "externalDocs": { + "description": "Github remote link", + "url": "https://github.com/filecoin-project/lotus/blob/master/api/v2api/proxy_gen.go#L561" + } + }, + { + "name": "Filecoin.EthTraceFilter", + "description": "```go\nfunc (s *FullNodeStruct) EthTraceFilter(p0 context.Context, p1 ethtypes.EthTraceFilterCriteria) ([]*ethtypes.EthTraceFilterResult, error) {\n\tif s.Internal.EthTraceFilter == nil {\n\t\treturn *new([]*ethtypes.EthTraceFilterResult), ErrNotSupported\n\t}\n\treturn s.Internal.EthTraceFilter(p0, p1)\n}\n```", + "summary": "EthTraceFilter returns traces matching the given filter criteria.\nMaps to JSON-RPC method: \"trace_filter\".\n", + "paramStructure": "by-position", + "params": [ + { + "name": "p1", + "description": "ethtypes.EthTraceFilterCriteria", + "summary": "", + "schema": { + "examples": [ + { + "fromBlock": "latest", + "toBlock": "latest", + "fromAddress": [ + "0x5cbeecf99d3fdb3f25e309cc264f240bb0664031" + ], + "toAddress": [ + "0x5cbeecf99d3fdb3f25e309cc264f240bb0664031" + ], + "after": "0x0", + "count": "0x64" + } + ], + "additionalProperties": false, + "properties": { + "after": { + "title": "number", + "type": "number" + }, + "count": { + "title": "number", + "type": "number" + }, + "fromAddress": { + "items": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 20, + "minItems": 20, + "type": "array" + }, + "type": "array" + }, + "fromBlock": { + "type": "string" + }, + "toAddress": { + "items": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 20, + "minItems": 20, + "type": "array" + }, + "type": "array" + }, + "toBlock": { + "type": "string" + } + }, + "type": [ + "object" + ] + }, + "required": true, + "deprecated": false + } + ], + "result": { + "name": "[]*ethtypes.EthTraceFilterResult", + "description": "[]*ethtypes.EthTraceFilterResult", + "summary": "", + "schema": { + "examples": [ + [ + { + "type": "string value", + "error": "string value", + "subtraces": 123, + "traceAddress": [ + 123 + ], + "action": {}, + "result": {}, + "blockHash": "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e", + "blockNumber": 9, + "transactionHash": "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e", + "transactionPosition": 123 + } + ] + ], + "items": [ + { + "additionalProperties": false, + "properties": { + "action": { + "additionalProperties": true, + "type": "object" + }, + "blockHash": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 32, + "minItems": 32, + "type": "array" + }, + "blockNumber": { + "title": "number", + "type": "number" + }, + "error": { + "type": "string" + }, + "result": { + "additionalProperties": true, + "type": "object" + }, + "subtraces": { + "title": "number", + "type": "number" + }, + "traceAddress": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "type": "array" + }, + "transactionHash": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 32, + "minItems": 32, + "type": "array" + }, + "transactionPosition": { + "title": "number", + "type": "number" + }, + "type": { + "type": "string" + } + }, + "type": [ + "object" + ] + } + ], + "type": [ + "array" + ] + }, + "required": true, + "deprecated": false + }, + "deprecated": false, + "externalDocs": { + "description": "Github remote link", + "url": "https://github.com/filecoin-project/lotus/blob/master/api/v2api/proxy_gen.go#L572" + } + }, + { + "name": "Filecoin.EthTraceReplayBlockTransactions", + "description": "```go\nfunc (s *FullNodeStruct) EthTraceReplayBlockTransactions(p0 context.Context, p1 string, p2 []string) ([]*ethtypes.EthTraceReplayBlockTransaction, error) {\n\tif s.Internal.EthTraceReplayBlockTransactions == nil {\n\t\treturn *new([]*ethtypes.EthTraceReplayBlockTransaction), ErrNotSupported\n\t}\n\treturn s.Internal.EthTraceReplayBlockTransactions(p0, p1, p2)\n}\n```", + "summary": "EthTraceReplayBlockTransactions replays all transactions in a block returning the requested\ntraces for each transaction.\nMaps to JSON-RPC method: \"trace_replayBlockTransactions\".\n\nThe block can be identified by its number, hash or a special tag like \"latest\" or \"finalized\".\nThe `traceTypes` parameter allows filtering the traces based on their types.\n", + "paramStructure": "by-position", + "params": [ + { + "name": "p1", + "description": "string", + "summary": "", + "schema": { + "examples": [ + "string value" + ], + "type": [ + "string" + ] + }, + "required": true, + "deprecated": false + }, + { + "name": "p2", + "description": "[]string", + "summary": "", + "schema": { + "examples": [ + [ + "string value" + ] + ], + "items": [ + { + "type": [ + "string" + ] + } + ], + "type": [ + "array" + ] + }, + "required": true, + "deprecated": false + } + ], + "result": { + "name": "[]*ethtypes.EthTraceReplayBlockTransaction", + "description": "[]*ethtypes.EthTraceReplayBlockTransaction", + "summary": "", + "schema": { + "examples": [ + [ + { + "output": "0x07", + "stateDiff": "string value", + "trace": [ + { + "type": "string value", + "error": "string value", + "subtraces": 123, + "traceAddress": [ + 123 + ], + "action": {}, + "result": {} + } + ], + "transactionHash": "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e", + "vmTrace": "string value" + } + ] + ], + "items": [ + { + "additionalProperties": false, + "properties": { + "output": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "type": "array" + }, + "stateDiff": { + "type": "string" + }, + "trace": { + "items": { + "additionalProperties": false, + "properties": { + "action": { + "additionalProperties": true, + "type": "object" + }, + "error": { + "type": "string" + }, + "result": { + "additionalProperties": true, + "type": "object" + }, + "subtraces": { + "title": "number", + "type": "number" + }, + "traceAddress": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "type": "array" + }, + "type": { + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "transactionHash": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 32, + "minItems": 32, + "type": "array" + }, + "vmTrace": { + "type": "string" + } + }, + "type": [ + "object" + ] + } + ], + "type": [ + "array" + ] + }, + "required": true, + "deprecated": false + }, + "deprecated": false, + "externalDocs": { + "description": "Github remote link", + "url": "https://github.com/filecoin-project/lotus/blob/master/api/v2api/proxy_gen.go#L583" + } + }, + { + "name": "Filecoin.EthTraceTransaction", + "description": "```go\nfunc (s *FullNodeStruct) EthTraceTransaction(p0 context.Context, p1 string) ([]*ethtypes.EthTraceTransaction, error) {\n\tif s.Internal.EthTraceTransaction == nil {\n\t\treturn *new([]*ethtypes.EthTraceTransaction), ErrNotSupported\n\t}\n\treturn s.Internal.EthTraceTransaction(p0, p1)\n}\n```", + "summary": "EthTraceTransaction returns an OpenEthereum-compatible trace of a specific transaction.\nMaps to JSON-RPC method: \"trace_transaction\".\n", + "paramStructure": "by-position", + "params": [ + { + "name": "p1", + "description": "string", + "summary": "", + "schema": { + "examples": [ + "string value" + ], + "type": [ + "string" + ] + }, + "required": true, + "deprecated": false + } + ], + "result": { + "name": "[]*ethtypes.EthTraceTransaction", + "description": "[]*ethtypes.EthTraceTransaction", + "summary": "", + "schema": { + "examples": [ + [ + { + "type": "string value", + "error": "string value", + "subtraces": 123, + "traceAddress": [ + 123 + ], + "action": {}, + "result": {}, + "blockHash": "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e", + "blockNumber": 9, + "transactionHash": "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e", + "transactionPosition": 123 + } + ] + ], + "items": [ + { + "additionalProperties": false, + "properties": { + "action": { + "additionalProperties": true, + "type": "object" + }, + "blockHash": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 32, + "minItems": 32, + "type": "array" + }, + "blockNumber": { + "title": "number", + "type": "number" + }, + "error": { + "type": "string" + }, + "result": { + "additionalProperties": true, + "type": "object" + }, + "subtraces": { + "title": "number", + "type": "number" + }, + "traceAddress": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "type": "array" + }, + "transactionHash": { + "items": { + "description": "Number is a number", + "title": "number", + "type": "number" + }, + "maxItems": 32, + "minItems": 32, + "type": "array" + }, + "transactionPosition": { + "title": "number", + "type": "number" + }, + "type": { + "type": "string" + } + }, + "type": [ + "object" + ] + } + ], + "type": [ + "array" + ] + }, + "required": true, + "deprecated": false + }, + "deprecated": false, + "externalDocs": { + "description": "Github remote link", + "url": "https://github.com/filecoin-project/lotus/blob/master/api/v2api/proxy_gen.go#L594" + } + }, + { + "name": "Filecoin.EthUninstallFilter", + "description": "```go\nfunc (s *FullNodeStruct) EthUninstallFilter(p0 context.Context, p1 ethtypes.EthFilterID) (bool, error) {\n\tif s.Internal.EthUninstallFilter == nil {\n\t\treturn false, ErrNotSupported\n\t}\n\treturn s.Internal.EthUninstallFilter(p0, p1)\n}\n```", + "summary": "EthUninstallFilter uninstalls a filter with given id.\nMaps to JSON-RPC method: \"eth_uninstallFilter\".\n", + "paramStructure": "by-position", + "params": [ + { + "name": "p1", + "description": "ethtypes.EthFilterID", + "summary": "", + "schema": { + "examples": [ + "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e" + ], + "items": [ + { + "title": "number", + "description": "Number is a number", + "type": [ + "number" + ] + } + ], + "maxItems": 32, + "minItems": 32, + "type": [ + "array" + ] + }, + "required": true, + "deprecated": false + } + ], + "result": { + "name": "bool", + "description": "bool", + "summary": "", + "schema": { + "examples": [ + true + ], + "type": [ + "boolean" + ] + }, + "required": true, + "deprecated": false + }, + "deprecated": false, + "externalDocs": { + "description": "Github remote link", + "url": "https://github.com/filecoin-project/lotus/blob/master/api/v2api/proxy_gen.go#L605" + } + }, + { + "name": "Filecoin.EthUnsubscribe", + "description": "```go\nfunc (s *FullNodeStruct) EthUnsubscribe(p0 context.Context, p1 ethtypes.EthSubscriptionID) (bool, error) {\n\tif s.Internal.EthUnsubscribe == nil {\n\t\treturn false, ErrNotSupported\n\t}\n\treturn s.Internal.EthUnsubscribe(p0, p1)\n}\n```", + "summary": "EthUnsubscribe unsubscribes from a websocket subscription.\nMaps to JSON-RPC method: \"eth_unsubscribe\".\n", + "paramStructure": "by-position", + "params": [ + { + "name": "p1", + "description": "ethtypes.EthSubscriptionID", + "summary": "", + "schema": { + "examples": [ + "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e" + ], + "items": [ + { + "title": "number", + "description": "Number is a number", + "type": [ + "number" + ] + } + ], + "maxItems": 32, + "minItems": 32, + "type": [ + "array" + ] + }, + "required": true, + "deprecated": false + } + ], + "result": { + "name": "bool", + "description": "bool", + "summary": "", + "schema": { + "examples": [ + true + ], + "type": [ + "boolean" + ] + }, + "required": true, + "deprecated": false + }, + "deprecated": false, + "externalDocs": { + "description": "Github remote link", + "url": "https://github.com/filecoin-project/lotus/blob/master/api/v2api/proxy_gen.go#L616" + } + }, + { + "name": "Filecoin.FilecoinAddressToEthAddress", + "description": "```go\nfunc (s *FullNodeStruct) FilecoinAddressToEthAddress(p0 context.Context, p1 jsonrpc.RawParams) (ethtypes.EthAddress, error) {\n\tif s.Internal.FilecoinAddressToEthAddress == nil {\n\t\treturn *new(ethtypes.EthAddress), ErrNotSupported\n\t}\n\treturn s.Internal.FilecoinAddressToEthAddress(p0, p1)\n}\n```", + "summary": "FilecoinAddressToEthAddress converts any Filecoin address to an EthAddress.\n\nThis method supports all Filecoin address types:\n- \"f0\" and \"f4\" addresses: Converted directly.\n- \"f1\", \"f2\", and \"f3\" addresses: First converted to their corresponding \"f0\" ID address, then to an EthAddress.\n\nRequirements:\n- For \"f1\", \"f2\", and \"f3\" addresses, they must be instantiated on-chain, as \"f0\" ID addresses are only assigned to actors when they are created on-chain.\nThe simplest way to instantiate an address on chain is to send a transaction to the address.\n\nNote on chain reorganizations:\n\"f0\" ID addresses are not permanent and can be affected by chain reorganizations. To account for this,\nthe API includes a `blkNum` parameter, which specifies the block number that is used to determine the tipset state to use for converting an\n\"f1\"/\"f2\"/\"f3\" address to an \"f0\" address. This parameter functions similarly to the `blkNum` parameter in the existing `EthGetBlockByNumber` API.\nSee https://docs.alchemy.com/reference/eth-getblockbynumber for more details.\n\nParameters:\n- ctx: The context for the API call.\n- filecoinAddress: The Filecoin address to convert.\n- blkNum: The block number or state for the conversion. Defaults to \"finalized\" for maximum safety.\n Possible values: \"pending\", \"latest\", \"finalized\", \"safe\", or a specific block number represented as hex.\n\nReturns:\n- The corresponding EthAddress.\n- An error if the conversion fails.\n", + "paramStructure": "by-position", + "params": [ + { + "name": "p1", + "description": "jsonrpc.RawParams", + "summary": "", + "schema": { + "examples": [ + "Bw==" + ], + "items": [ + { + "title": "number", + "description": "Number is a number", + "type": [ + "number" + ] + } + ], + "type": [ + "array" + ] + }, + "required": true, + "deprecated": false + } + ], + "result": { + "name": "ethtypes.EthAddress", + "description": "ethtypes.EthAddress", + "summary": "", + "schema": { + "examples": [ + "0x5cbeecf99d3fdb3f25e309cc264f240bb0664031" + ], + "items": [ + { + "title": "number", + "description": "Number is a number", + "type": [ + "number" + ] + } + ], + "maxItems": 20, + "minItems": 20, + "type": [ + "array" + ] + }, + "required": true, + "deprecated": false + }, + "deprecated": false, + "externalDocs": { + "description": "Github remote link", + "url": "https://github.com/filecoin-project/lotus/blob/master/api/v2api/proxy_gen.go#L627" + } + }, + { + "name": "Filecoin.NetListening", + "description": "```go\nfunc (s *FullNodeStruct) NetListening(p0 context.Context) (bool, error) {\n\tif s.Internal.NetListening == nil {\n\t\treturn false, ErrNotSupported\n\t}\n\treturn s.Internal.NetListening(p0)\n}\n```", + "summary": "NetListening checks if the node is actively listening for network connections.\nMaps to JSON-RPC method: \"net_listening\".\n", + "paramStructure": "by-position", + "params": [], + "result": { + "name": "bool", + "description": "bool", + "summary": "", + "schema": { + "examples": [ + true + ], + "type": [ + "boolean" + ] + }, + "required": true, + "deprecated": false + }, + "deprecated": false, + "externalDocs": { + "description": "Github remote link", + "url": "https://github.com/filecoin-project/lotus/blob/master/api/v2api/proxy_gen.go#L638" + } + }, + { + "name": "Filecoin.NetVersion", + "description": "```go\nfunc (s *FullNodeStruct) NetVersion(p0 context.Context) (string, error) {\n\tif s.Internal.NetVersion == nil {\n\t\treturn \"\", ErrNotSupported\n\t}\n\treturn s.Internal.NetVersion(p0)\n}\n```", + "summary": "NetVersion retrieves the current network ID.\nMaps to JSON-RPC method: \"net_version\".\n", + "paramStructure": "by-position", + "params": [], + "result": { + "name": "string", + "description": "string", + "summary": "", + "schema": { + "examples": [ + "string value" + ], + "type": [ + "string" + ] + }, + "required": true, + "deprecated": false + }, + "deprecated": false, + "externalDocs": { + "description": "Github remote link", + "url": "https://github.com/filecoin-project/lotus/blob/master/api/v2api/proxy_gen.go#L649" } }, { @@ -282,7 +5297,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/v2api/proxy_gen.go#L43" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/v2api/proxy_gen.go#L660" } }, { @@ -380,7 +5395,34 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/v2api/proxy_gen.go#L54" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/v2api/proxy_gen.go#L671" + } + }, + { + "name": "Filecoin.Web3ClientVersion", + "description": "```go\nfunc (s *FullNodeStruct) Web3ClientVersion(p0 context.Context) (string, error) {\n\tif s.Internal.Web3ClientVersion == nil {\n\t\treturn \"\", ErrNotSupported\n\t}\n\treturn s.Internal.Web3ClientVersion(p0)\n}\n```", + "summary": "Web3ClientVersion returns the client version.\nMaps to JSON-RPC method: \"web3_clientVersion\".\n", + "paramStructure": "by-position", + "params": [], + "result": { + "name": "string", + "description": "string", + "summary": "", + "schema": { + "examples": [ + "string value" + ], + "type": [ + "string" + ] + }, + "required": true, + "deprecated": false + }, + "deprecated": false, + "externalDocs": { + "description": "Github remote link", + "url": "https://github.com/filecoin-project/lotus/blob/master/api/v2api/proxy_gen.go#L682" } } ] diff --git a/build/openrpc/worker.json b/build/openrpc/worker.json index 0fa769b6a80..d61e679af7c 100644 --- a/build/openrpc/worker.json +++ b/build/openrpc/worker.json @@ -161,7 +161,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6543" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6504" } }, { @@ -252,7 +252,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6554" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6515" } }, { @@ -420,7 +420,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6565" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6526" } }, { @@ -447,7 +447,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6576" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6537" } }, { @@ -597,7 +597,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6587" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6548" } }, { @@ -700,7 +700,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6598" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6559" } }, { @@ -803,7 +803,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6609" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6570" } }, { @@ -925,7 +925,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6620" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6581" } }, { @@ -1135,7 +1135,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6631" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6592" } }, { @@ -1306,7 +1306,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6642" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6603" } }, { @@ -3350,7 +3350,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6653" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6614" } }, { @@ -3470,7 +3470,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6664" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6625" } }, { @@ -3531,7 +3531,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6675" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6636" } }, { @@ -3569,7 +3569,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6686" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6647" } }, { @@ -3729,7 +3729,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6697" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6658" } }, { @@ -3913,7 +3913,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6708" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6669" } }, { @@ -4054,7 +4054,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6719" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6680" } }, { @@ -4107,7 +4107,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6730" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6691" } }, { @@ -4250,7 +4250,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6741" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6702" } }, { @@ -4474,7 +4474,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6752" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6713" } }, { @@ -4601,7 +4601,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6763" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6724" } }, { @@ -4768,7 +4768,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6774" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6735" } }, { @@ -4895,7 +4895,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6785" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6746" } }, { @@ -4933,7 +4933,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6796" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6757" } }, { @@ -4972,7 +4972,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6807" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6768" } }, { @@ -4995,7 +4995,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6818" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6779" } }, { @@ -5034,7 +5034,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6829" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6790" } }, { @@ -5057,7 +5057,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6840" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6801" } }, { @@ -5096,7 +5096,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6851" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6812" } }, { @@ -5130,7 +5130,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6862" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6823" } }, { @@ -5184,7 +5184,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6873" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6834" } }, { @@ -5223,7 +5223,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6884" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6845" } }, { @@ -5262,7 +5262,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6895" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6856" } }, { @@ -5297,7 +5297,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6906" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6867" } }, { @@ -5477,7 +5477,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6917" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6878" } }, { @@ -5506,7 +5506,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6928" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6889" } }, { @@ -5529,7 +5529,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6939" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6900" } } ] diff --git a/build/parameters.go b/build/parameters.go index c29956e87ef..61a71314704 100644 --- a/build/parameters.go +++ b/build/parameters.go @@ -82,5 +82,3 @@ const Eip155ChainId = buildconstants.Eip155ChainId // Deprecated: Use buildconst var WhitelistedBlock = buildconstants.WhitelistedBlock // Deprecated: Use buildconstants.WhitelistedBlock instead const Finality = policy.ChainFinality // Deprecated: Use policy.ChainFinality instead - -const SafeHeightDistance = 200 diff --git a/chain/types/ethtypes/eth_types.go b/chain/types/ethtypes/eth_types.go index f4250839843..2953f7160ed 100644 --- a/chain/types/ethtypes/eth_types.go +++ b/chain/types/ethtypes/eth_types.go @@ -45,6 +45,14 @@ var ErrInvalidAddress = errors.New("invalid Filecoin Eth address") // See https://github.com/filecoin-project/FIPs/blob/master/FRCs/frc-0089.md const SafeEpochDelay = abi.ChainEpoch(30) +const ( + BlockTagEarliest = "earliest" + BlockTagPending = "pending" + BlockTagLatest = "latest" + BlockTagFinalized = "finalized" + BlockTagSafe = "safe" +) + type EthUint64 uint64 func (e EthUint64) MarshalJSON() ([]byte, error) { @@ -61,8 +69,9 @@ func (e *EthUint64) UnmarshalJSON(b []byte) error { base := 10 if strings.HasPrefix(s, "0x") { base = 16 + s = s[2:] } - parsedInt, err := strconv.ParseUint(strings.Replace(s, "0x", "", -1), base, 64) + parsedInt, err := strconv.ParseUint(s, base, 64) if err != nil { return err } @@ -73,7 +82,7 @@ func (e *EthUint64) UnmarshalJSON(b []byte) error { *e = EthUint64(eint) return nil } - return fmt.Errorf("cannot interpret %s as a hex-encoded uint64, or a number", string(b)) + return xerrors.Errorf("cannot interpret %s as a hex-encoded uint64, or a number", string(b)) } func EthUint64FromHex(s string) (EthUint64, error) { @@ -84,6 +93,16 @@ func EthUint64FromHex(s string) (EthUint64, error) { return EthUint64(parsedInt), nil } +// EthUint64FromString parses a uint64 from a string. It accepts both decimal and hex strings. +func EthUint64FromString(s string) (EthUint64, error) { + var parsedInt EthUint64 + err := parsedInt.UnmarshalJSON([]byte(`"` + s + `"`)) + if err != nil { + return 0, err + } + return parsedInt, nil +} + // EthUint64FromBytes parses a uint64 from big-endian encoded bytes. func EthUint64FromBytes(b []byte) (EthUint64, error) { if len(b) != 32 { @@ -257,17 +276,17 @@ func (c *EthCall) ToFilecoinMessage() (*types.Message, error) { var err error from, err = (EthAddress{}).ToFilecoinAddress() if err != nil { - return nil, fmt.Errorf("failed to construct the ethereum system address: %w", err) + return nil, xerrors.Errorf("failed to construct the ethereum system address: %w", err) } } else { // The from address must be translatable to an f4 address. var err error from, err = c.From.ToFilecoinAddress() if err != nil { - return nil, fmt.Errorf("failed to translate sender address (%s): %w", c.From.String(), err) + return nil, xerrors.Errorf("failed to translate sender address (%s): %w", c.From.String(), err) } if p := from.Protocol(); p != address.Delegated { - return nil, fmt.Errorf("expected a class 4 address, got: %d: %w", p, err) + return nil, xerrors.Errorf("expected a class 4 address, got: %d", p) } } @@ -276,7 +295,7 @@ func (c *EthCall) ToFilecoinMessage() (*types.Message, error) { initcode := abi.CborBytes(c.Data) params2, err := actors.SerializeParams(&initcode) if err != nil { - return nil, fmt.Errorf("failed to serialize params: %w", err) + return nil, xerrors.Errorf("failed to serialize params: %w", err) } params = params2 } @@ -398,10 +417,10 @@ func EthAddressFromPubKey(pubk []byte) ([]byte, error) { // but putting this check here for defensiveness), strip the prefix const pubKeyLen = 65 if len(pubk) != pubKeyLen { - return nil, fmt.Errorf("public key should have %d in length, but got %d", pubKeyLen, len(pubk)) + return nil, xerrors.Errorf("public key should have %d in length, but got %d", pubKeyLen, len(pubk)) } if pubk[0] != 0x04 { - return nil, fmt.Errorf("expected first byte of secp256k1 to be 0x04 (uncompressed)") + return nil, xerrors.Errorf("expected first byte of secp256k1 to be 0x04 (uncompressed)") } pubk = pubk[1:] @@ -523,7 +542,7 @@ func (ea EthAddress) ToFilecoinAddress() (address.Address, error) { // Ethereum Address Manager. addr, err := address.NewDelegatedAddress(builtintypes.EthereumAddressManagerActorID, ea[:]) if err != nil { - return address.Undef, fmt.Errorf("failed to translate supplied address (%s) into a "+ + return address.Undef, xerrors.Errorf("failed to translate supplied address (%s) into a "+ "Filecoin f4 address: %w", hex.EncodeToString(ea[:]), err) } return addr, nil @@ -600,12 +619,12 @@ func handleHexStringPrefix(s string) string { func EthHashFromCid(c cid.Cid) (EthHash, error) { hash, found := bytes.CutPrefix(c.Bytes(), expectedHashPrefix) if !found { - return EthHash{}, fmt.Errorf("CID does not have the expected prefix") + return EthHash{}, xerrors.Errorf("CID does not have the expected prefix") } if len(hash) != EthHashLength { // this shouldn't be possible since the prefix has the length, but just in case - return EthHash{}, fmt.Errorf("CID hash length is not 32 bytes") + return EthHash{}, xerrors.Errorf("CID hash length is not 32 bytes") } var h EthHash @@ -1101,7 +1120,9 @@ func (e *EthBlockNumberOrHash) UnmarshalJSON(b []byte) error { if err != nil { return err } - if str == "earliest" || str == "pending" || str == "latest" { + + switch str { + case BlockTagEarliest, BlockTagPending, BlockTagLatest, BlockTagFinalized, BlockTagSafe: e.PredefinedBlock = &str return nil } @@ -1226,3 +1247,21 @@ type EthCreateTraceResult struct { GasUsed EthUint64 `json:"gasUsed"` Code EthBytes `json:"code"` } + +type EthTxReceipt struct { + TransactionHash EthHash `json:"transactionHash"` + TransactionIndex EthUint64 `json:"transactionIndex"` + BlockHash EthHash `json:"blockHash"` + BlockNumber EthUint64 `json:"blockNumber"` + From EthAddress `json:"from"` + To *EthAddress `json:"to"` + StateRoot EthHash `json:"root"` + Status EthUint64 `json:"status"` + ContractAddress *EthAddress `json:"contractAddress"` + CumulativeGasUsed EthUint64 `json:"cumulativeGasUsed"` + GasUsed EthUint64 `json:"gasUsed"` + EffectiveGasPrice EthBigInt `json:"effectiveGasPrice"` + LogsBloom EthBytes `json:"logsBloom"` + Logs []EthLog `json:"logs"` + Type EthUint64 `json:"type"` +} diff --git a/chain/types/ethtypes/eth_types_test.go b/chain/types/ethtypes/eth_types_test.go index 5bd9e72d495..36e0e24c996 100644 --- a/chain/types/ethtypes/eth_types_test.go +++ b/chain/types/ethtypes/eth_types_test.go @@ -52,6 +52,10 @@ func TestEthIntUnmarshalJSON(t *testing.T) { err := i.UnmarshalJSON(tc.Input.([]byte)) require.Nil(t, err) require.Equal(t, tc.Output, i) + + i, err = EthUint64FromString(strings.Replace(string(tc.Input.([]byte)), `"`, "", -1)) + require.Nil(t, err) + require.Equal(t, tc.Output, i) } } diff --git a/documentation/en/api-v1-unstable-methods.md b/documentation/en/api-v1-unstable-methods.md index 226b1b953a7..c8a16942500 100644 --- a/documentation/en/api-v1-unstable-methods.md +++ b/documentation/en/api-v1-unstable-methods.md @@ -2148,7 +2148,7 @@ Perms: read Inputs: ```json [ - "0x5" + "string value" ] ``` diff --git a/documentation/en/api-v2-unstable-methods.md b/documentation/en/api-v2-unstable-methods.md index bc4f7940d7d..21b11d756ad 100644 --- a/documentation/en/api-v2-unstable-methods.md +++ b/documentation/en/api-v2-unstable-methods.md @@ -1,9 +1,61 @@ # Groups * [Chain](#Chain) * [ChainGetTipSet](#ChainGetTipSet) +* [Eth](#Eth) + * [EthAccounts](#EthAccounts) + * [EthAddressToFilecoinAddress](#EthAddressToFilecoinAddress) + * [EthBlockNumber](#EthBlockNumber) + * [EthCall](#EthCall) + * [EthChainId](#EthChainId) + * [EthEstimateGas](#EthEstimateGas) + * [EthFeeHistory](#EthFeeHistory) + * [EthGasPrice](#EthGasPrice) + * [EthGetBalance](#EthGetBalance) + * [EthGetBlockByHash](#EthGetBlockByHash) + * [EthGetBlockByNumber](#EthGetBlockByNumber) + * [EthGetBlockReceipts](#EthGetBlockReceipts) + * [EthGetBlockReceiptsLimited](#EthGetBlockReceiptsLimited) + * [EthGetBlockTransactionCountByHash](#EthGetBlockTransactionCountByHash) + * [EthGetBlockTransactionCountByNumber](#EthGetBlockTransactionCountByNumber) + * [EthGetCode](#EthGetCode) + * [EthGetFilterChanges](#EthGetFilterChanges) + * [EthGetFilterLogs](#EthGetFilterLogs) + * [EthGetLogs](#EthGetLogs) + * [EthGetMessageCidByTransactionHash](#EthGetMessageCidByTransactionHash) + * [EthGetStorageAt](#EthGetStorageAt) + * [EthGetTransactionByBlockHashAndIndex](#EthGetTransactionByBlockHashAndIndex) + * [EthGetTransactionByBlockNumberAndIndex](#EthGetTransactionByBlockNumberAndIndex) + * [EthGetTransactionByHash](#EthGetTransactionByHash) + * [EthGetTransactionByHashLimited](#EthGetTransactionByHashLimited) + * [EthGetTransactionCount](#EthGetTransactionCount) + * [EthGetTransactionHashByCid](#EthGetTransactionHashByCid) + * [EthGetTransactionReceipt](#EthGetTransactionReceipt) + * [EthGetTransactionReceiptLimited](#EthGetTransactionReceiptLimited) + * [EthMaxPriorityFeePerGas](#EthMaxPriorityFeePerGas) + * [EthNewBlockFilter](#EthNewBlockFilter) + * [EthNewFilter](#EthNewFilter) + * [EthNewPendingTransactionFilter](#EthNewPendingTransactionFilter) + * [EthProtocolVersion](#EthProtocolVersion) + * [EthSendRawTransaction](#EthSendRawTransaction) + * [EthSendRawTransactionUntrusted](#EthSendRawTransactionUntrusted) + * [EthSubscribe](#EthSubscribe) + * [EthSyncing](#EthSyncing) + * [EthTraceBlock](#EthTraceBlock) + * [EthTraceFilter](#EthTraceFilter) + * [EthTraceReplayBlockTransactions](#EthTraceReplayBlockTransactions) + * [EthTraceTransaction](#EthTraceTransaction) + * [EthUninstallFilter](#EthUninstallFilter) + * [EthUnsubscribe](#EthUnsubscribe) +* [Filecoin](#Filecoin) + * [FilecoinAddressToEthAddress](#FilecoinAddressToEthAddress) +* [Net](#Net) + * [NetListening](#NetListening) + * [NetVersion](#NetVersion) * [State](#State) * [StateGetActor](#StateGetActor) * [StateGetID](#StateGetID) +* [Web3](#Web3) + * [Web3ClientVersion](#Web3ClientVersion) ## Chain The Chain method group contains methods for interacting with the blockchain. @@ -35,8 +87,7 @@ selecting by height with the 'previous' option set to true. In a case where no selector is provided, an error is returned. The selector must be explicitly specified. -For more details, refer to the types.TipSetSelector and -types.NewTipSetSelector. +For more details, refer to the types.TipSetSelector. Example usage: @@ -133,6 +184,1262 @@ Response: } ``` +## Eth +These methods are used for Ethereum-compatible JSON-RPC calls + +### Execution model reconciliation + +Ethereum relies on an immediate block-based execution model. The block that includes +a transaction is also the block that executes it. Each block specifies the state root +resulting from executing all transactions within it (output state). + +In Filecoin, at every epoch there is an unknown number of round winners all of whom are +entitled to publish a block. Blocks are collected into a tipset. A tipset is committed +only when the subsequent tipset is built on it (i.e. it becomes a parent). Block producers +execute the parent tipset and specify the resulting state root in the block being produced. +In other words, contrary to Ethereum, each block specifies the input state root. + +Ethereum clients expect transactions returned via eth_getBlock* to have a receipt +(due to immediate execution). For this reason: + + - eth_blockNumber returns the latest executed epoch (head - 1) + - The 'latest' block refers to the latest executed epoch (head - 1) + - The 'pending' block refers to the current speculative tipset (head) + - eth_getTransactionByHash returns the inclusion tipset of a message, but + only after it has executed. + - eth_getTransactionReceipt ditto. + +"Latest executed epoch" refers to the tipset that this node currently +accepts as the best parent tipset, based on the blocks it is accumulating +within the HEAD tipset. + + +### EthAccounts +EthAccounts returns a list of Ethereum accounts managed by the node. +Maps to JSON-RPC method: "eth_accounts". +Lotus does not manage private keys, so this will always return an empty array. + + +Perms: read + +Inputs: `null` + +Response: +```json +[ + "0x5cbeecf99d3fdb3f25e309cc264f240bb0664031" +] +``` + +### EthAddressToFilecoinAddress +EthAddressToFilecoinAddress converts an Ethereum address to a Filecoin f410 address. + + +Perms: read + +Inputs: +```json +[ + "0x5cbeecf99d3fdb3f25e309cc264f240bb0664031" +] +``` + +Response: `"f01234"` + +### EthBlockNumber +EthBlockNumber returns the number of the latest executed block (head - 1). +Maps to JSON-RPC method: "eth_blockNumber". + + +Perms: read + +Inputs: `null` + +Response: `"0x5"` + +### EthCall +EthCall executes a read-only call to a contract at a specific block state, identified by +its number, hash, or a special tag like "latest" or "finalized". +Maps to JSON-RPC method: "eth_call". + + +Perms: read + +Inputs: +```json +[ + { + "from": "0x5cbeecf99d3fdb3f25e309cc264f240bb0664031", + "to": "0x5cbeecf99d3fdb3f25e309cc264f240bb0664031", + "gas": "0x5", + "gasPrice": "0x0", + "value": "0x0", + "data": "0x07" + }, + "string value" +] +``` + +Response: `"0x07"` + +### EthChainId +EthChainId retrieves the chain ID of the Ethereum-compatible network. +Maps to JSON-RPC method: "eth_chainId". + + +Perms: read + +Inputs: `null` + +Response: `"0x5"` + +### EthEstimateGas +EthEstimateGas estimates the gas required to execute a transaction. +Maps to JSON-RPC method: "eth_estimateGas". + + +Perms: read + +Inputs: +```json +[ + "Bw==" +] +``` + +Response: `"0x5"` + +### EthFeeHistory +EthFeeHistory retrieves historical gas fee data for a range of blocks. +Maps to JSON-RPC method: "eth_feeHistory". + + +Perms: read + +Inputs: +```json +[ + "Bw==" +] +``` + +Response: +```json +{ + "oldestBlock": "0x5", + "baseFeePerGas": [ + "0x0" + ], + "gasUsedRatio": [ + 12.3 + ], + "reward": [] +} +``` + +### EthGasPrice +EthGasPrice retrieves the current gas price in the network. +Maps to JSON-RPC method: "eth_gasPrice". + + +Perms: read + +Inputs: `null` + +Response: `"0x0"` + +### EthGetBalance +EthGetBalance retrieves the balance of an Ethereum address at a specific block state, +identified by its number, hash, or a special tag like "latest" or "finalized". +Maps to JSON-RPC method: "eth_getBalance". + + +Perms: read + +Inputs: +```json +[ + "0x5cbeecf99d3fdb3f25e309cc264f240bb0664031", + "string value" +] +``` + +Response: `"0x0"` + +### EthGetBlockByHash +EthGetBlockByHash retrieves a block by its hash. If fullTxInfo is true, it includes full +transaction objects; otherwise, it includes only transaction hashes. +Maps to JSON-RPC method: "eth_getBlockByHash". + + +Perms: read + +Inputs: +```json +[ + "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e", + true +] +``` + +Response: +```json +{ + "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" + ] +} +``` + +### EthGetBlockByNumber +EthGetBlockByNumber retrieves a block by its number or a special tag like "latest" or +"finalized". If fullTxInfo is true, it includes full transaction objects; otherwise, it +includes only transaction hashes. +Maps to JSON-RPC method: "eth_getBlockByNumber". + + +Perms: read + +Inputs: +```json +[ + "string value", + true +] +``` + +Response: +```json +{ + "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" + ] +} +``` + +### EthGetBlockReceipts +EthGetBlockReceipts retrieves all transaction receipts for a block identified by its number, +hash or a special tag like "latest" or "finalized". +Maps to JSON-RPC method: "eth_getBlockReceipts". + + +Perms: read + +Inputs: +```json +[ + "string value" +] +``` + +Response: +```json +[ + { + "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" + } +] +``` + +### EthGetBlockReceiptsLimited +EthGetBlockReceiptsLimited retrieves all transaction receipts for a block identified by its +number, hash or a special tag like "latest" or "finalized", along with an optional limit on the +chain epoch for state resolution. + + +Perms: read + +Inputs: +```json +[ + "string value", + 10101 +] +``` + +Response: +```json +[ + { + "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" + } +] +``` + +### EthGetBlockTransactionCountByHash +EthGetBlockTransactionCountByHash returns the number of transactions in a block identified by +its block hash. +Maps to JSON-RPC method: "eth_getBlockTransactionCountByHash". + + +Perms: read + +Inputs: +```json +[ + "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e" +] +``` + +Response: `"0x5"` + +### EthGetBlockTransactionCountByNumber +EthGetBlockTransactionCountByNumber returns the number of transactions in a block identified by +its block number or a special tag like "latest" or "finalized". +Maps to JSON-RPC method: "eth_getBlockTransactionCountByNumber". + + +Perms: read + +Inputs: +```json +[ + "string value" +] +``` + +Response: `"0x5"` + +### EthGetCode +EthGetCode retrieves the contract code at a specific address and block state, identified by +its number, hash, or a special tag like "latest" or "finalized". +Maps to JSON-RPC method: "eth_getCode". + + +Perms: read + +Inputs: +```json +[ + "0x5cbeecf99d3fdb3f25e309cc264f240bb0664031", + "string value" +] +``` + +Response: `"0x07"` + +### EthGetFilterChanges +EthGetFilterChanges retrieves event logs that occurred since the last poll for a filter. +Maps to JSON-RPC method: "eth_getFilterChanges". + + +Perms: read + +Inputs: +```json +[ + "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e" +] +``` + +Response: +```json +[ + {} +] +``` + +### EthGetFilterLogs +EthGetFilterLogs retrieves event logs matching filter with given id. +Maps to JSON-RPC method: "eth_getFilterLogs". + + +Perms: read + +Inputs: +```json +[ + "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e" +] +``` + +Response: +```json +[ + {} +] +``` + +### EthGetLogs +EthGetLogs retrieves event logs matching given filter specification. +Maps to JSON-RPC method: "eth_getLogs". + + +Perms: read + +Inputs: +```json +[ + { + "fromBlock": "2301220", + "address": [ + "0x5cbeecf99d3fdb3f25e309cc264f240bb0664031" + ], + "topics": null + } +] +``` + +Response: +```json +[ + {} +] +``` + +### EthGetMessageCidByTransactionHash +EthGetMessageCidByTransactionHash retrieves the Filecoin CID corresponding to an Ethereum +transaction hash. +Maps to JSON-RPC method: "eth_getMessageCidByTransactionHash". + + +Perms: read + +Inputs: +```json +[ + "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e" +] +``` + +Response: +```json +{ + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" +} +``` + +### EthGetStorageAt +EthGetStorageAt retrieves the storage value at a specific position for a contract +at a given block state, identified by its number, hash, or a special tag like "latest" or +"finalized". +Maps to JSON-RPC method: "eth_getStorageAt". + + +Perms: read + +Inputs: +```json +[ + "0x5cbeecf99d3fdb3f25e309cc264f240bb0664031", + "0x07", + "string value" +] +``` + +Response: `"0x07"` + +### EthGetTransactionByBlockHashAndIndex +EthGetTransactionByBlockHashAndIndex retrieves a transaction by its block hash and index. +Maps to JSON-RPC method: "eth_getTransactionByBlockHashAndIndex". + + +Perms: read + +Inputs: +```json +[ + "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e", + "0x5" +] +``` + +Response: +```json +{ + "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", + "gasPrice": "0x0", + "accessList": [ + "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e" + ], + "v": "0x0", + "r": "0x0", + "s": "0x0" +} +``` + +### EthGetTransactionByBlockNumberAndIndex +EthGetTransactionByBlockNumberAndIndex retrieves a transaction by its block number and index. +Maps to JSON-RPC method: "eth_getTransactionByBlockNumberAndIndex". + + +Perms: read + +Inputs: +```json +[ + "string value", + "0x5" +] +``` + +Response: +```json +{ + "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", + "gasPrice": "0x0", + "accessList": [ + "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e" + ], + "v": "0x0", + "r": "0x0", + "s": "0x0" +} +``` + +### EthGetTransactionByHash +EthGetTransactionByHash retrieves a transaction by its hash. +Maps to JSON-RPC method: "eth_getTransactionByHash". + + +Perms: read + +Inputs: +```json +[ + "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e" +] +``` + +Response: +```json +{ + "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", + "gasPrice": "0x0", + "accessList": [ + "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e" + ], + "v": "0x0", + "r": "0x0", + "s": "0x0" +} +``` + +### EthGetTransactionByHashLimited +EthGetTransactionByHashLimited retrieves a transaction by its hash, with an optional limit on +the chain epoch for state resolution. + + +Perms: read + +Inputs: +```json +[ + "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e", + 10101 +] +``` + +Response: +```json +{ + "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", + "gasPrice": "0x0", + "accessList": [ + "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e" + ], + "v": "0x0", + "r": "0x0", + "s": "0x0" +} +``` + +### EthGetTransactionCount +EthGetTransactionCount retrieves the number of transactions sent from an address at a specific +block, identified by its number, hash, or a special tag like "latest" or "finalized". +Maps to JSON-RPC method: "eth_getTransactionCount". + + +Perms: read + +Inputs: +```json +[ + "0x5cbeecf99d3fdb3f25e309cc264f240bb0664031", + "string value" +] +``` + +Response: `"0x5"` + +### EthGetTransactionHashByCid +EthGetTransactionHashByCid retrieves the Ethereum transaction hash corresponding to a Filecoin +CID. +Maps to JSON-RPC method: "eth_getTransactionHashByCid". + + +Perms: read + +Inputs: +```json +[ + { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + } +] +``` + +Response: `"0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e"` + +### EthGetTransactionReceipt +EthGetTransactionReceipt retrieves the receipt of a transaction by its hash. +Maps to JSON-RPC method: "eth_getTransactionReceipt". + + +Perms: read + +Inputs: +```json +[ + "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e" +] +``` + +Response: +```json +{ + "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" +} +``` + +### EthGetTransactionReceiptLimited +EthGetTransactionReceiptLimited retrieves the receipt of a transaction by its hash, with an +optional limit on the chain epoch for state resolution. + + +Perms: read + +Inputs: +```json +[ + "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e", + 10101 +] +``` + +Response: +```json +{ + "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" +} +``` + +### EthMaxPriorityFeePerGas +EthMaxPriorityFeePerGas retrieves the maximum priority fee per gas in the network. +Maps to JSON-RPC method: "eth_maxPriorityFeePerGas". + + +Perms: read + +Inputs: `null` + +Response: `"0x0"` + +### EthNewBlockFilter +EthNewBlockFilter installs a persistent filter to notify when a new block arrives. +Maps to JSON-RPC method: "eth_newBlockFilter". + + +Perms: read + +Inputs: `null` + +Response: `"0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e"` + +### EthNewFilter +EthNewFilter installs a persistent filter based on given filter specification. +Maps to JSON-RPC method: "eth_newFilter". + + +Perms: read + +Inputs: +```json +[ + { + "fromBlock": "2301220", + "address": [ + "0x5cbeecf99d3fdb3f25e309cc264f240bb0664031" + ], + "topics": null + } +] +``` + +Response: `"0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e"` + +### EthNewPendingTransactionFilter +EthNewPendingTransactionFilter installs a persistent filter to notify when new messages arrive +in the message pool. +Maps to JSON-RPC method: "eth_newPendingTransactionFilter". + + +Perms: read + +Inputs: `null` + +Response: `"0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e"` + +### EthProtocolVersion +EthProtocolVersion retrieves the Ethereum protocol version supported by the node. +Maps to JSON-RPC method: "eth_protocolVersion". + + +Perms: read + +Inputs: `null` + +Response: `"0x5"` + +### EthSendRawTransaction +EthSendRawTransaction submits a raw Ethereum transaction to the network. +Maps to JSON-RPC method: "eth_sendRawTransaction". + + +Perms: read + +Inputs: +```json +[ + "0x07" +] +``` + +Response: `"0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e"` + +### EthSendRawTransactionUntrusted +EthSendRawTransactionUntrusted submits a raw Ethereum transaction from an untrusted source. + + +Perms: read + +Inputs: +```json +[ + "0x07" +] +``` + +Response: `"0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e"` + +### EthSubscribe +EthSubscribe subscribes to different event types using websockets. +Maps to JSON-RPC method: "eth_subscribe". + +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: +```json +[ + "Bw==" +] +``` + +Response: `"0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e"` + +### EthSyncing +EthSyncing checks if the node is currently syncing and returns the sync status. +Maps to JSON-RPC method: "eth_syncing". + + +Perms: read + +Inputs: `null` + +Response: `false` + +### EthTraceBlock +EthTraceBlock returns an OpenEthereum-compatible trace of the given block. +Maps to JSON-RPC method: "trace_block". + +Translates Filecoin semantics into Ethereum semantics and traces both EVM and FVM calls. + +Features: + +- FVM actor create events, calls, etc. show up as if they were EVM smart contract events. +- Native FVM call inputs are ABI-encoded (Solidity ABI) as if they were calls to a + `handle_filecoin_method(uint64 method, uint64 codec, bytes params)` function + (where `codec` is the IPLD codec of `params`). +- Native FVM call outputs (return values) are ABI-encoded as `(uint32 exit_code, uint64 + codec, bytes output)` where `codec` is the IPLD codec of `output`. + +Limitations (for now): + +1. Block rewards are not included in the trace. +2. SELFDESTRUCT operations are not included in the trace. +3. EVM smart contract "create" events always specify `0xfe` as the "code" for newly created EVM + smart contracts. + + +Perms: read + +Inputs: +```json +[ + "string value" +] +``` + +Response: +```json +[ + { + "type": "string value", + "error": "string value", + "subtraces": 123, + "traceAddress": [ + 123 + ], + "action": {}, + "result": {}, + "blockHash": "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e", + "blockNumber": 9, + "transactionHash": "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e", + "transactionPosition": 123 + } +] +``` + +### EthTraceFilter +EthTraceFilter returns traces matching the given filter criteria. +Maps to JSON-RPC method: "trace_filter". + + +Perms: read + +Inputs: +```json +[ + { + "fromBlock": "latest", + "toBlock": "latest", + "fromAddress": [ + "0x5cbeecf99d3fdb3f25e309cc264f240bb0664031" + ], + "toAddress": [ + "0x5cbeecf99d3fdb3f25e309cc264f240bb0664031" + ], + "after": "0x0", + "count": "0x64" + } +] +``` + +Response: +```json +[ + { + "type": "string value", + "error": "string value", + "subtraces": 123, + "traceAddress": [ + 123 + ], + "action": {}, + "result": {}, + "blockHash": "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e", + "blockNumber": 9, + "transactionHash": "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e", + "transactionPosition": 123 + } +] +``` + +### EthTraceReplayBlockTransactions +EthTraceReplayBlockTransactions replays all transactions in a block returning the requested +traces for each transaction. +Maps to JSON-RPC method: "trace_replayBlockTransactions". + +The block can be identified by its number, hash or a special tag like "latest" or "finalized". +The `traceTypes` parameter allows filtering the traces based on their types. + + +Perms: read + +Inputs: +```json +[ + "string value", + [ + "string value" + ] +] +``` + +Response: +```json +[ + { + "output": "0x07", + "stateDiff": "string value", + "trace": [ + { + "type": "string value", + "error": "string value", + "subtraces": 123, + "traceAddress": [ + 123 + ], + "action": {}, + "result": {} + } + ], + "transactionHash": "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e", + "vmTrace": "string value" + } +] +``` + +### EthTraceTransaction +EthTraceTransaction returns an OpenEthereum-compatible trace of a specific transaction. +Maps to JSON-RPC method: "trace_transaction". + + +Perms: read + +Inputs: +```json +[ + "string value" +] +``` + +Response: +```json +[ + { + "type": "string value", + "error": "string value", + "subtraces": 123, + "traceAddress": [ + 123 + ], + "action": {}, + "result": {}, + "blockHash": "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e", + "blockNumber": 9, + "transactionHash": "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e", + "transactionPosition": 123 + } +] +``` + +### EthUninstallFilter +EthUninstallFilter uninstalls a filter with given id. +Maps to JSON-RPC method: "eth_uninstallFilter". + + +Perms: read + +Inputs: +```json +[ + "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e" +] +``` + +Response: `true` + +### EthUnsubscribe +EthUnsubscribe unsubscribes from a websocket subscription. +Maps to JSON-RPC method: "eth_unsubscribe". + + +Perms: read + +Inputs: +```json +[ + "0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e" +] +``` + +Response: `true` + +## Filecoin + + +### FilecoinAddressToEthAddress +FilecoinAddressToEthAddress converts any Filecoin address to an EthAddress. + +This method supports all Filecoin address types: +- "f0" and "f4" addresses: Converted directly. +- "f1", "f2", and "f3" addresses: First converted to their corresponding "f0" ID address, then to an EthAddress. + +Requirements: +- For "f1", "f2", and "f3" addresses, they must be instantiated on-chain, as "f0" 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. + +Note on chain reorganizations: +"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 the `blkNum` parameter in the existing `EthGetBlockByNumber` API. +See https://docs.alchemy.com/reference/eth-getblockbynumber for more details. + +Parameters: +- ctx: The context for the API call. +- 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. + +Returns: +- The corresponding EthAddress. +- An error if the conversion fails. + + +Perms: read + +Inputs: +```json +[ + "Bw==" +] +``` + +Response: `"0x5cbeecf99d3fdb3f25e309cc264f240bb0664031"` + +## Net + + +### NetListening +NetListening checks if the node is actively listening for network connections. +Maps to JSON-RPC method: "net_listening". + + +Perms: read + +Inputs: `null` + +Response: `true` + +### NetVersion +NetVersion retrieves the current network ID. +Maps to JSON-RPC method: "net_version". + + +Perms: read + +Inputs: `null` + +Response: `"string value"` + ## State The State method group contains methods for interacting with the Filecoin blockchain state, including actor information, addresses, and chain data. @@ -224,3 +1531,17 @@ Inputs: Response: `"f01234"` +## Web3 + + +### Web3ClientVersion +Web3ClientVersion returns the client version. +Maps to JSON-RPC method: "web3_clientVersion". + + +Perms: read + +Inputs: `null` + +Response: `"string value"` + diff --git a/gateway/node.go b/gateway/node.go index 349bfbfd3a1..8755b5ad925 100644 --- a/gateway/node.go +++ b/gateway/node.go @@ -119,7 +119,7 @@ type TargetAPI interface { EthAddressToFilecoinAddress(ctx context.Context, ethAddress ethtypes.EthAddress) (address.Address, error) FilecoinAddressToEthAddress(ctx context.Context, p jsonrpc.RawParams) (ethtypes.EthAddress, error) EthBlockNumber(ctx context.Context) (ethtypes.EthUint64, error) - EthGetBlockTransactionCountByNumber(ctx context.Context, blkNum ethtypes.EthUint64) (ethtypes.EthUint64, error) + EthGetBlockTransactionCountByNumber(ctx context.Context, blkNum string) (ethtypes.EthUint64, error) EthGetBlockTransactionCountByHash(ctx context.Context, blkHash ethtypes.EthHash) (ethtypes.EthUint64, error) EthGetBlockByHash(ctx context.Context, blkHash ethtypes.EthHash, fullTxInfo bool) (ethtypes.EthBlock, error) EthGetBlockByNumber(ctx context.Context, blkNum string, fullTxInfo bool) (ethtypes.EthBlock, error) @@ -127,7 +127,7 @@ type TargetAPI interface { EthGetTransactionHashByCid(ctx context.Context, cid cid.Cid) (*ethtypes.EthHash, error) EthGetMessageCidByTransactionHash(ctx context.Context, txHash *ethtypes.EthHash) (*cid.Cid, error) EthGetTransactionCount(ctx context.Context, sender ethtypes.EthAddress, blkParam ethtypes.EthBlockNumberOrHash) (ethtypes.EthUint64, error) - EthGetTransactionReceiptLimited(ctx context.Context, txHash ethtypes.EthHash, limit abi.ChainEpoch) (*api.EthTxReceipt, error) + EthGetTransactionReceiptLimited(ctx context.Context, txHash ethtypes.EthHash, limit abi.ChainEpoch) (*ethtypes.EthTxReceipt, error) EthGetTransactionByBlockHashAndIndex(ctx context.Context, blkHash ethtypes.EthHash, txIndex ethtypes.EthUint64) (*ethtypes.EthTx, error) EthGetTransactionByBlockNumberAndIndex(ctx context.Context, blkNum string, txIndex ethtypes.EthUint64) (*ethtypes.EthTx, error) EthGetCode(ctx context.Context, address ethtypes.EthAddress, blkParam ethtypes.EthBlockNumberOrHash) (ethtypes.EthBytes, error) @@ -158,8 +158,8 @@ type TargetAPI interface { EthTraceReplayBlockTransactions(ctx context.Context, blkNum string, traceTypes []string) ([]*ethtypes.EthTraceReplayBlockTransaction, error) EthTraceTransaction(ctx context.Context, txHash string) ([]*ethtypes.EthTraceTransaction, error) EthTraceFilter(ctx context.Context, filter ethtypes.EthTraceFilterCriteria) ([]*ethtypes.EthTraceFilterResult, error) - EthGetBlockReceiptsLimited(ctx context.Context, blkParam ethtypes.EthBlockNumberOrHash, limit abi.ChainEpoch) ([]*api.EthTxReceipt, error) - EthGetBlockReceipts(ctx context.Context, blkParam ethtypes.EthBlockNumberOrHash) ([]*api.EthTxReceipt, error) + EthGetBlockReceiptsLimited(ctx context.Context, blkParam ethtypes.EthBlockNumberOrHash, limit abi.ChainEpoch) ([]*ethtypes.EthTxReceipt, error) + EthGetBlockReceipts(ctx context.Context, blkParam ethtypes.EthBlockNumberOrHash) ([]*ethtypes.EthTxReceipt, error) GetActorEventsRaw(ctx context.Context, filter *types.ActorEventFilter) ([]*types.ActorEvent, error) SubscribeActorEventsRaw(ctx context.Context, filter *types.ActorEventFilter) (<-chan *types.ActorEvent, error) ChainGetEvents(ctx context.Context, eventsRoot cid.Cid) ([]types.Event, error) @@ -186,8 +186,6 @@ var ( _ full.GasModuleAPI = (*Node)(nil) _ full.MpoolModuleAPI = (*Node)(nil) _ full.StateModuleAPI = (*Node)(nil) - _ full.EthModuleAPI = (*Node)(nil) - _ full.EthEventAPI = (*Node)(nil) ) type options struct { diff --git a/gateway/proxy_eth.go b/gateway/proxy_eth.go index c34cc828422..79f1fec8147 100644 --- a/gateway/proxy_eth.go +++ b/gateway/proxy_eth.go @@ -56,16 +56,12 @@ func (gw *Node) EthBlockNumber(ctx context.Context) (ethtypes.EthUint64, error) return gw.target.EthBlockNumber(ctx) } -func (gw *Node) EthGetBlockTransactionCountByNumber(ctx context.Context, blkNum ethtypes.EthUint64) (ethtypes.EthUint64, error) { +func (gw *Node) EthGetBlockTransactionCountByNumber(ctx context.Context, blkNum string) (ethtypes.EthUint64, error) { if err := gw.limit(ctx, stateRateLimitTokens); err != nil { return 0, err } - head, err := gw.target.ChainHead(ctx) - if err != nil { - return 0, err - } - if err := gw.checkTipsetHeight(head, abi.ChainEpoch(blkNum)); err != nil { + if err := gw.checkBlkParam(ctx, blkNum, 0); err != nil { return 0, err } @@ -155,6 +151,10 @@ func (gw *Node) checkBlkParam(ctx context.Context, blkParam string, lookback eth break } num = ethtypes.EthUint64(head.Height()) - lookback + + // "safe" and "finalized" resolved `num` will not accurate for v2 APIs with F3 active; we would + // need to query the F3 APIs to get the correct value, but for now we'll go with worst-case and + // if the lookback limit is very short (2880 by default) then these will fail case "safe": num = ethtypes.EthUint64(head.Height()) - lookback - ethtypes.EthUint64(ethtypes.SafeEpochDelay) case "finalized": @@ -225,21 +225,10 @@ func (gw *Node) EthGetTransactionByBlockNumberAndIndex(ctx context.Context, blkN } func (gw *Node) EthGetTransactionByHash(ctx context.Context, txHash *ethtypes.EthHash) (*ethtypes.EthTx, error) { - return gw.target.EthGetTransactionByHashLimited(ctx, txHash, api.LookbackNoLimit) -} - -func (gw *Node) EthGetTransactionByHashLimited(ctx context.Context, txHash *ethtypes.EthHash, limit abi.ChainEpoch) (*ethtypes.EthTx, error) { if err := gw.limit(ctx, stateRateLimitTokens); err != nil { return nil, err } - if limit == api.LookbackNoLimit { - limit = gw.maxMessageLookbackEpochs - } - if gw.maxMessageLookbackEpochs != api.LookbackNoLimit && limit > gw.maxMessageLookbackEpochs { - limit = gw.maxMessageLookbackEpochs - } - - return gw.target.EthGetTransactionByHashLimited(ctx, txHash, limit) + return gw.target.EthGetTransactionByHashLimited(ctx, txHash, gw.maxMessageLookbackEpochs) } func (gw *Node) EthGetTransactionHashByCid(ctx context.Context, cid cid.Cid) (*ethtypes.EthHash, error) { @@ -270,22 +259,11 @@ func (gw *Node) EthGetTransactionCount(ctx context.Context, sender ethtypes.EthA return gw.target.EthGetTransactionCount(ctx, sender, blkParam) } -func (gw *Node) EthGetTransactionReceipt(ctx context.Context, txHash ethtypes.EthHash) (*api.EthTxReceipt, error) { - return gw.EthGetTransactionReceiptLimited(ctx, txHash, api.LookbackNoLimit) -} - -func (gw *Node) EthGetTransactionReceiptLimited(ctx context.Context, txHash ethtypes.EthHash, limit abi.ChainEpoch) (*api.EthTxReceipt, error) { +func (gw *Node) EthGetTransactionReceipt(ctx context.Context, txHash ethtypes.EthHash) (*ethtypes.EthTxReceipt, error) { if err := gw.limit(ctx, stateRateLimitTokens); err != nil { return nil, err } - if limit == api.LookbackNoLimit { - limit = gw.maxMessageLookbackEpochs - } - if gw.maxMessageLookbackEpochs != api.LookbackNoLimit && limit > gw.maxMessageLookbackEpochs { - limit = gw.maxMessageLookbackEpochs - } - - return gw.target.EthGetTransactionReceiptLimited(ctx, txHash, limit) + return gw.target.EthGetTransactionReceiptLimited(ctx, txHash, gw.maxMessageLookbackEpochs) } func (gw *Node) EthGetCode(ctx context.Context, address ethtypes.EthAddress, blkParam ethtypes.EthBlockNumberOrHash) (ethtypes.EthBytes, error) { @@ -707,24 +685,11 @@ func (gw *Node) EthTraceFilter(ctx context.Context, filter ethtypes.EthTraceFilt return gw.target.EthTraceFilter(ctx, filter) } -func (gw *Node) EthGetBlockReceipts(ctx context.Context, blkParam ethtypes.EthBlockNumberOrHash) ([]*api.EthTxReceipt, error) { - return gw.EthGetBlockReceiptsLimited(ctx, blkParam, api.LookbackNoLimit) -} - -func (gw *Node) EthGetBlockReceiptsLimited(ctx context.Context, blkParam ethtypes.EthBlockNumberOrHash, limit abi.ChainEpoch) ([]*api.EthTxReceipt, error) { +func (gw *Node) EthGetBlockReceipts(ctx context.Context, blkParam ethtypes.EthBlockNumberOrHash) ([]*ethtypes.EthTxReceipt, error) { if err := gw.limit(ctx, stateRateLimitTokens); err != nil { return nil, err } - - if limit == api.LookbackNoLimit { - limit = gw.maxMessageLookbackEpochs - } - - if gw.maxMessageLookbackEpochs != api.LookbackNoLimit && limit > gw.maxMessageLookbackEpochs { - limit = gw.maxMessageLookbackEpochs - } - - return gw.target.EthGetBlockReceiptsLimited(ctx, blkParam, limit) + return gw.target.EthGetBlockReceiptsLimited(ctx, blkParam, gw.maxMessageLookbackEpochs) } func (gw *Node) addUserFilterLimited( diff --git a/itests/api_v2_test.go b/itests/api_v2_test.go index 17a9f40a894..4e3888e085c 100644 --- a/itests/api_v2_test.go +++ b/itests/api_v2_test.go @@ -2,7 +2,6 @@ package itests import ( "context" - "encoding/binary" "encoding/json" "errors" "net/http" @@ -12,16 +11,13 @@ import ( "github.com/stretchr/testify/require" "github.com/filecoin-project/go-address" - "github.com/filecoin-project/go-f3" "github.com/filecoin-project/go-f3/certs" "github.com/filecoin-project/go-f3/gpbft" - "github.com/filecoin-project/go-f3/manifest" "github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/lotus/api" - "github.com/filecoin-project/lotus/build" + "github.com/filecoin-project/lotus/build/buildconstants" "github.com/filecoin-project/lotus/chain/actors/policy" - "github.com/filecoin-project/lotus/chain/lf3" "github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/itests/kit" ) @@ -37,7 +33,7 @@ func TestAPIV2_ThroughRPC(t *testing.T) { t.Cleanup(cancel) kit.QuietMiningLogs() - mockF3 := newMockF3Backend() + mockF3 := kit.NewMockF3Backend() subject, miner, network := kit.EnsembleMinimal(t, kit.ThroughRPC(), kit.F3Backend(mockF3)) network.BeginMining(blockTime) subject.WaitTillChain(ctx, kit.HeightAtLeast(targetHeight)) @@ -58,7 +54,7 @@ func TestAPIV2_ThroughRPC(t *testing.T) { safe = func(t *testing.T) *types.TipSet { head, err := subject.ChainHead(ctx) require.NoError(t, err) - safe, err := subject.ChainGetTipSetByHeight(ctx, head.Height()-build.SafeHeightDistance, head.Key()) + safe, err := subject.ChainGetTipSetByHeight(ctx, head.Height()-buildconstants.SafeHeightDistance, head.Key()) require.NoError(t, err) return safe } @@ -119,7 +115,7 @@ func TestAPIV2_ThroughRPC(t *testing.T) { { name: "finalized tag when f3 disabled falls back to ec", when: func(t *testing.T) { - mockF3.running = false + mockF3.Running = false }, request: `{"jsonrpc":"2.0","method":"Filecoin.ChainGetTipSet","params":[{"tag":"finalized"}],"id":1}`, wantTipSet: ecFinalized, @@ -128,9 +124,10 @@ func TestAPIV2_ThroughRPC(t *testing.T) { { name: "finalized tag is ok", when: func(t *testing.T) { - mockF3.running = true - mockF3.latestCertErr = nil - mockF3.latestCert = plausibleCertAt(t, f3FinalizedEpoch) + mockF3.Running = true + mockF3.Finalizing = true + mockF3.LatestCertErr = nil + mockF3.LatestCert = plausibleCertAt(t, f3FinalizedEpoch) }, request: `{"jsonrpc":"2.0","method":"Filecoin.ChainGetTipSet","params":[{"tag":"finalized"}],"id":1}`, wantTipSet: tipSetAtHeight(f3FinalizedEpoch), @@ -139,9 +136,10 @@ func TestAPIV2_ThroughRPC(t *testing.T) { { name: "safe tag is ec safe distance when more recent than f3 finalized", when: func(t *testing.T) { - mockF3.running = true - mockF3.latestCertErr = nil - mockF3.latestCert = plausibleCertAt(t, f3FinalizedEpoch) + mockF3.Running = true + mockF3.Finalizing = true + mockF3.LatestCertErr = nil + mockF3.LatestCert = plausibleCertAt(t, f3FinalizedEpoch) }, request: `{"jsonrpc":"2.0","method":"Filecoin.ChainGetTipSet","params":[{"tag":"safe"}],"id":1}`, wantTipSet: safe, @@ -150,9 +148,10 @@ func TestAPIV2_ThroughRPC(t *testing.T) { { name: "safe tag is f3 finalized when ec minus safe distance is too old", when: func(t *testing.T) { - mockF3.running = true - mockF3.latestCertErr = nil - mockF3.latestCert = plausibleCertAt(t, 890) + mockF3.Running = true + mockF3.Finalizing = true + mockF3.LatestCertErr = nil + mockF3.LatestCert = plausibleCertAt(t, 890) }, request: `{"jsonrpc":"2.0","method":"Filecoin.ChainGetTipSet","params":[{"tag":"safe"}],"id":1}`, wantTipSet: tipSetAtHeight(890), @@ -161,9 +160,10 @@ func TestAPIV2_ThroughRPC(t *testing.T) { { name: "finalized tag when f3 not ready falls back to ec", when: func(t *testing.T) { - mockF3.running = true - mockF3.latestCert = nil - mockF3.latestCertErr = api.ErrF3NotReady + mockF3.Running = true + mockF3.Finalizing = true + mockF3.LatestCert = nil + mockF3.LatestCertErr = api.ErrF3NotReady }, request: `{"jsonrpc":"2.0","method":"Filecoin.ChainGetTipSet","params":[{"tag":"finalized"}],"id":1}`, wantTipSet: ecFinalized, @@ -172,9 +172,10 @@ func TestAPIV2_ThroughRPC(t *testing.T) { { name: "finalized tag when f3 fails is error", when: func(t *testing.T) { - mockF3.running = true - mockF3.latestCert = nil - mockF3.latestCertErr = internalF3Error + mockF3.Running = true + mockF3.Finalizing = true + mockF3.LatestCert = nil + mockF3.LatestCertErr = internalF3Error }, request: `{"jsonrpc":"2.0","method":"Filecoin.ChainGetTipSet","params":[{"tag":"finalized"}],"id":1}`, wantErr: internalF3Error.Error(), @@ -183,9 +184,10 @@ func TestAPIV2_ThroughRPC(t *testing.T) { { name: "latest tag when f3 fails is ok", when: func(t *testing.T) { - mockF3.running = true - mockF3.latestCert = nil - mockF3.latestCertErr = internalF3Error + mockF3.Running = true + mockF3.Finalizing = true + mockF3.LatestCert = nil + mockF3.LatestCertErr = internalF3Error }, request: `{"jsonrpc":"2.0","method":"Filecoin.ChainGetTipSet","params":[{"tag":"latest"}],"id":1}`, wantTipSet: heaviest, @@ -194,9 +196,10 @@ func TestAPIV2_ThroughRPC(t *testing.T) { { name: "finalized tag when f3 is broken", when: func(t *testing.T) { - mockF3.running = true - mockF3.latestCert = implausibleCert - mockF3.latestCertErr = nil + mockF3.Running = true + mockF3.Finalizing = true + mockF3.LatestCert = implausibleCert + mockF3.LatestCertErr = nil }, request: `{"jsonrpc":"2.0","method":"Filecoin.ChainGetTipSet","params":[{"tag":"finalized"}],"id":1}`, wantErr: "decoding latest f3 cert tipset key", @@ -205,9 +208,9 @@ func TestAPIV2_ThroughRPC(t *testing.T) { { name: "height with no anchor without f3 falling back to ec is ok", when: func(t *testing.T) { - mockF3.running = false - mockF3.latestCert = nil - mockF3.latestCertErr = nil + mockF3.Running = false + mockF3.LatestCert = nil + mockF3.LatestCertErr = nil }, // Lookup a height that is sufficiently behind the epoch at WaitTillChain + a // little bit further back to avoid race conditions of WaitTillChain @@ -225,9 +228,10 @@ func TestAPIV2_ThroughRPC(t *testing.T) { { name: "height with no anchor before finalized epoch is ok", when: func(t *testing.T) { - mockF3.running = true - mockF3.latestCert = plausibleCertAt(t, f3FinalizedEpoch) - mockF3.latestCertErr = nil + mockF3.Running = true + mockF3.Finalizing = true + mockF3.LatestCert = plausibleCertAt(t, f3FinalizedEpoch) + mockF3.LatestCertErr = nil }, request: `{"jsonrpc":"2.0","method":"Filecoin.ChainGetTipSet","params":[{"height":{"at":111}}],"id":1}`, wantTipSet: tipSetAtHeight(111), @@ -236,9 +240,10 @@ func TestAPIV2_ThroughRPC(t *testing.T) { { name: "height with no anchor after finalized epoch is error", when: func(t *testing.T) { - mockF3.running = true - mockF3.latestCert = plausibleCertAt(t, f3FinalizedEpoch) - mockF3.latestCertErr = nil + mockF3.Running = true + mockF3.Finalizing = true + mockF3.LatestCert = plausibleCertAt(t, f3FinalizedEpoch) + mockF3.LatestCertErr = nil }, request: `{"jsonrpc":"2.0","method":"Filecoin.ChainGetTipSet","params":[{"height":{"at":145}}],"id":1}`, wantErr: "looking for tipset with height greater than start point", @@ -247,9 +252,10 @@ func TestAPIV2_ThroughRPC(t *testing.T) { { name: "height with no anchor when f3 fails is error", when: func(t *testing.T) { - mockF3.running = true - mockF3.latestCert = nil - mockF3.latestCertErr = internalF3Error + mockF3.Running = true + mockF3.Finalizing = true + mockF3.LatestCert = nil + mockF3.LatestCertErr = internalF3Error }, request: `{"jsonrpc":"2.0","method":"Filecoin.ChainGetTipSet","params":[{"height":{"at":456}}],"id":1}`, wantErr: internalF3Error.Error(), @@ -258,9 +264,10 @@ func TestAPIV2_ThroughRPC(t *testing.T) { { name: "height with no anchor and nil f3 cert falling back to ec fails", when: func(t *testing.T) { - mockF3.running = true - mockF3.latestCert = nil - mockF3.latestCertErr = nil + mockF3.Running = true + mockF3.Finalizing = true + mockF3.LatestCert = nil + mockF3.LatestCertErr = nil }, request: `{"jsonrpc":"2.0","method":"Filecoin.ChainGetTipSet","params":[{"height":{"at":111}}],"id":1}`, wantErr: "looking for tipset with height greater than start point", @@ -269,9 +276,10 @@ func TestAPIV2_ThroughRPC(t *testing.T) { { name: "height with anchor to latest", when: func(t *testing.T) { - mockF3.running = true - mockF3.latestCert = plausibleCertAt(t, f3FinalizedEpoch) - mockF3.latestCertErr = nil + mockF3.Running = true + mockF3.Finalizing = true + mockF3.LatestCert = plausibleCertAt(t, f3FinalizedEpoch) + mockF3.LatestCertErr = nil }, request: `{"jsonrpc":"2.0","method":"Filecoin.ChainGetTipSet","params":[{"height":{"at":890,"anchor":{"tag":"latest"}}}],"id":1}`, wantTipSet: tipSetAtHeight(890), @@ -334,7 +342,7 @@ func TestAPIV2_ThroughRPC(t *testing.T) { { name: "finalized tag when f3 disabled falls back to ec", when: func(t *testing.T) { - mockF3.running = false + mockF3.Running = false }, request: `{"jsonrpc":"2.0","method":"Filecoin.StateGetActor","params":["f01000",{"tag":"finalized"}],"id":1}`, wantResponseStatus: http.StatusOK, @@ -343,9 +351,10 @@ func TestAPIV2_ThroughRPC(t *testing.T) { { name: "finalized tag is ok", when: func(t *testing.T) { - mockF3.running = true - mockF3.latestCertErr = nil - mockF3.latestCert = plausibleCertAt(t, f3FinalizedEpoch) + mockF3.Running = true + mockF3.Finalizing = true + mockF3.LatestCertErr = nil + mockF3.LatestCert = plausibleCertAt(t, f3FinalizedEpoch) }, request: `{"jsonrpc":"2.0","method":"Filecoin.StateGetActor","params":["f01000",{"tag":"finalized"}],"id":1}`, wantResponseStatus: http.StatusOK, @@ -354,9 +363,10 @@ func TestAPIV2_ThroughRPC(t *testing.T) { { name: "height with anchor to latest", when: func(t *testing.T) { - mockF3.running = true - mockF3.latestCert = plausibleCertAt(t, f3FinalizedEpoch) - mockF3.latestCertErr = nil + mockF3.Running = true + mockF3.Finalizing = true + mockF3.LatestCert = plausibleCertAt(t, f3FinalizedEpoch) + mockF3.LatestCertErr = nil }, request: `{"jsonrpc":"2.0","method":"Filecoin.StateGetActor","params":["f01000",{"height":{"at":15,"anchor":{"tag":"latest"}}}],"id":1}`, wantResponseStatus: http.StatusOK, @@ -418,7 +428,7 @@ func TestAPIV2_ThroughRPC(t *testing.T) { { name: "finalized tag when f3 disabled falls back to ec", when: func(t *testing.T) { - mockF3.running = false + mockF3.Running = false }, request: `{"jsonrpc":"2.0","method":"Filecoin.StateGetID","params":["f01000",{"tag":"finalized"}],"id":1}`, wantResponseStatus: http.StatusOK, @@ -454,79 +464,3 @@ func TestAPIV2_ThroughRPC(t *testing.T) { } }) } - -var _ lf3.F3Backend = (*mockF3Backend)(nil) - -type mockF3Backend struct { - progress gpbft.InstanceProgress - latestCert *certs.FinalityCertificate - latestCertErr error - certs map[uint64]*certs.FinalityCertificate - participants map[uint64]struct{} - manifest *manifest.Manifest - running bool -} - -func newMockF3Backend() *mockF3Backend { - return &mockF3Backend{ - certs: make(map[uint64]*certs.FinalityCertificate), - participants: make(map[uint64]struct{}), - } -} - -func (t *mockF3Backend) GetOrRenewParticipationTicket(_ context.Context, minerID uint64, _ api.F3ParticipationTicket, _ uint64) (api.F3ParticipationTicket, error) { - if !t.running { - return nil, f3.ErrF3NotRunning - } - return binary.BigEndian.AppendUint64(nil, minerID), nil -} - -func (t *mockF3Backend) Participate(_ context.Context, ticket api.F3ParticipationTicket) (api.F3ParticipationLease, error) { - if !t.running { - return api.F3ParticipationLease{}, f3.ErrF3NotRunning - } - mid := binary.BigEndian.Uint64(ticket) - if _, ok := t.participants[mid]; !ok { - return api.F3ParticipationLease{}, api.ErrF3ParticipationTicketInvalid - } - return api.F3ParticipationLease{ - Network: "fish", - Issuer: "fishmonger", - MinerID: mid, - FromInstance: t.progress.ID, - ValidityTerm: 5, - }, nil -} - -func (t *mockF3Backend) GetManifest(context.Context) (*manifest.Manifest, error) { - if !t.running { - return nil, f3.ErrF3NotRunning - } - return t.manifest, nil -} - -func (t *mockF3Backend) GetCert(_ context.Context, instance uint64) (*certs.FinalityCertificate, error) { - if !t.running { - return nil, f3.ErrF3NotRunning - } - return t.certs[instance], nil -} - -func (t *mockF3Backend) GetLatestCert(context.Context) (*certs.FinalityCertificate, error) { - if !t.running { - return nil, f3.ErrF3NotRunning - } - return t.latestCert, t.latestCertErr -} - -func (t *mockF3Backend) GetPowerTable(context.Context, types.TipSetKey) (gpbft.PowerEntries, error) { - return nil, nil -} - -func (t *mockF3Backend) GetF3PowerTable(context.Context, types.TipSetKey) (gpbft.PowerEntries, error) { - return nil, nil -} - -func (t *mockF3Backend) ListParticipants() []api.F3Participant { return nil } -func (t *mockF3Backend) IsRunning() bool { return t.running } -func (t *mockF3Backend) Progress() gpbft.InstanceProgress { return t.progress } diff --git a/itests/eth_api_f3_test.go b/itests/eth_api_f3_test.go new file mode 100644 index 00000000000..5c7da300b1b --- /dev/null +++ b/itests/eth_api_f3_test.go @@ -0,0 +1,854 @@ +package itests + +import ( + "context" + "encoding/hex" + "encoding/json" + "errors" + "fmt" + "os" + "testing" + "time" + + "github.com/stretchr/testify/require" + + "github.com/filecoin-project/go-address" + "github.com/filecoin-project/go-f3/certs" + "github.com/filecoin-project/go-f3/gpbft" + "github.com/filecoin-project/go-jsonrpc" + "github.com/filecoin-project/go-state-types/abi" + + "github.com/filecoin-project/lotus/api" + "github.com/filecoin-project/lotus/chain/actors/policy" + "github.com/filecoin-project/lotus/chain/types" + "github.com/filecoin-project/lotus/chain/types/ethtypes" + "github.com/filecoin-project/lotus/itests/kit" + "github.com/filecoin-project/lotus/lib/result" +) + +type ethApi interface { + FilecoinAddressToEthAddress(ctx context.Context, p jsonrpc.RawParams) (ethtypes.EthAddress, error) + EthGetCode(ctx context.Context, address ethtypes.EthAddress, blkParam ethtypes.EthBlockNumberOrHash) (ethtypes.EthBytes, error) + EthGetStorageAt(ctx context.Context, address ethtypes.EthAddress, position ethtypes.EthBytes, blkParam ethtypes.EthBlockNumberOrHash) (ethtypes.EthBytes, error) + EthGetBalance(ctx context.Context, address ethtypes.EthAddress, blkParam ethtypes.EthBlockNumberOrHash) (ethtypes.EthBigInt, error) + EthTraceBlock(ctx context.Context, blkNum string) ([]*ethtypes.EthTraceBlock, error) + EthTraceReplayBlockTransactions(ctx context.Context, blkNum string, traceTypes []string) ([]*ethtypes.EthTraceReplayBlockTransaction, error) + EthFeeHistory(ctx context.Context, p jsonrpc.RawParams) (ethtypes.EthFeeHistory, error) + EthEstimateGas(ctx context.Context, p jsonrpc.RawParams) (ethtypes.EthUint64, error) + EthCall(ctx context.Context, tx ethtypes.EthCall, blkParam ethtypes.EthBlockNumberOrHash) (ethtypes.EthBytes, error) + EthGetBlockTransactionCountByNumber(ctx context.Context, blkNum string) (ethtypes.EthUint64, error) + EthGetBlockByNumber(ctx context.Context, blkNum string, fullTxInfo bool) (ethtypes.EthBlock, error) + EthGetTransactionByBlockNumberAndIndex(ctx context.Context, blkNum string, txIndex ethtypes.EthUint64) (*ethtypes.EthTx, error) + EthGetTransactionCount(ctx context.Context, sender ethtypes.EthAddress, blkParam ethtypes.EthBlockNumberOrHash) (ethtypes.EthUint64, error) + EthGetBlockReceipts(ctx context.Context, blkParam ethtypes.EthBlockNumberOrHash) ([]*ethtypes.EthTxReceipt, error) +} + +func TestEthAPIWithF3(t *testing.T) { + const ( + timeout = 5 * time.Minute + blockTime = 50 * time.Millisecond + targetHeight = 20 + policy.ChainFinality + preF3FinalizedEpoch = targetHeight - 400 + f3FinalizedEpoch = targetHeight - 300 + ) + + req := require.New(t) + + ctx, cancel := context.WithTimeout(context.Background(), timeout) + t.Cleanup(cancel) + kit.QuietMiningLogs() + + mockF3 := kit.NewMockF3Backend() + client, miner, network := kit.EnsembleMinimal(t, kit.F3Backend(mockF3)) + network.BeginMining(blockTime) + + _, fundedEthAddr, fundedFilAddr := client.EVM().NewAccount() + kit.SendFunds(ctx, t, client, fundedFilAddr, types.FromFil(10)) + + client.WaitTillChain(ctx, kit.HeightAtLeast(preF3FinalizedEpoch)) + + var ( + filecoinSecpAddr address.Address + filecoinSecpEthAddr ethtypes.EthAddress + contractEthAddr ethtypes.EthAddress + contractBytes []byte + ) + { + // create an f1 before F3 finalized epoch + var err error + filecoinSecpAddr, err = client.WalletNew(ctx, types.KTSecp256k1) + req.NoError(err) + kit.SendFunds(ctx, t, client, filecoinSecpAddr, abi.NewTokenAmount(1)) + idAddr, err := client.StateLookupID(ctx, filecoinSecpAddr, types.EmptyTSK) + req.NoError(err) + filecoinSecpEthAddr, err = ethtypes.EthAddressFromFilecoinAddress(idAddr) + req.NoError(err) + + // Deploy a contract that will give us both a contractAddress and a location to query for nonzero storage + contractHex, err := os.ReadFile("./contracts/DelegatecallActor.hex") + req.NoError(err) + contractBytes, err = hex.DecodeString(string(contractHex)) + req.NoError(err) + createReturn := client.EVM().DeployContract(ctx, client.DefaultKey.Address, contractBytes) + actorAddr, err := address.NewIDAddress(createReturn.ActorID) + req.NoError(err) + contractHex, err = os.ReadFile("./contracts/DelegatecallStorage.hex") + req.NoError(err) + contract, err := hex.DecodeString(string(contractHex)) + req.NoError(err) + createReturn = client.EVM().DeployContract(ctx, client.DefaultKey.Address, contract) + storageAddr, err := address.NewIDAddress(createReturn.ActorID) + req.NoError(err) + contractEthAddr = createReturn.EthAddress + // call Contract Storage which makes a delegatecall to contract Actor + // this contract call sets the "counter" variable to 7, from default value 0 + fromId, err := client.StateLookupID(ctx, actorAddr, types.EmptyTSK) + require.NoError(t, err) + senderEthAddr, err := ethtypes.EthAddressFromFilecoinAddress(fromId) + require.NoError(t, err) + inputData := make([]byte, 64) // 2 arguments * 32 bytes each + copy(inputData[32-len(senderEthAddr):32], senderEthAddr[:]) + inputData[63] = 7 + result, _, err := client.EVM().InvokeContractByFuncName(ctx, client.DefaultKey.Address, storageAddr, "setVars(address,uint256)", inputData) + req.NoError(err) + expectedResult, err := hex.DecodeString("0000000000000000000000000000000000000000000000000000000000000007") + req.NoError(err) + req.Equal(result, expectedResult) + } + + client.WaitTillChain(ctx, kit.HeightAtLeast(targetHeight)) + + var ( + parentOf = func(tsfn func(t *testing.T) *types.TipSet) func(t *testing.T) *types.TipSet { + return func(t *testing.T) *types.TipSet { + parent, err := client.ChainGetTipSet(ctx, tsfn(t).Parents()) + req.NoError(err) + return parent + } + } + heaviest = func(t *testing.T) *types.TipSet { + head, err := client.ChainHead(ctx) + req.NoError(err) + // -1 in here for Ethereum APIs which use inclusion tipset + return parentOf(func(t *testing.T) *types.TipSet { return head })(t) + } + ecFixedLookback = func(lookback abi.ChainEpoch) func(t *testing.T) *types.TipSet { + return func(t *testing.T) *types.TipSet { + head, err := client.ChainHead(ctx) + req.NoError(err) + ecFixedLookback, err := client.ChainGetTipSetByHeight(ctx, head.Height()-lookback, head.Key()) + req.NoError(err) + return ecFixedLookback + } + } + ecFinalized = ecFixedLookback(policy.ChainFinality) + ecSafeV1 = ecFixedLookback(30) + ecSafeV2 = ecFixedLookback(200) + tipSetAtHeight = func(height abi.ChainEpoch) func(t *testing.T) *types.TipSet { + return func(t *testing.T) *types.TipSet { + ts, err := client.ChainGetTipSetByHeight(ctx, height, types.EmptyTSK) + req.NoError(err) + return ts + } + } + f3Finalized = func(t *testing.T) *types.TipSet { + return tipSetAtHeight(f3FinalizedEpoch)(t) + } + internalF3Error = errors.New("lost hearing in left eye") + plausibleCertAt = func(t *testing.T, epoch abi.ChainEpoch) *certs.FinalityCertificate { + f3FinalisedTipSet := tipSetAtHeight(epoch)(t) + return &certs.FinalityCertificate{ + ECChain: &gpbft.ECChain{ + TipSets: []*gpbft.TipSet{{ + Epoch: int64(f3FinalisedTipSet.Height()), + Key: f3FinalisedTipSet.Key().Bytes(), + }}, + }, + } + } + implausibleCert = &certs.FinalityCertificate{ + ECChain: &gpbft.ECChain{ + TipSets: []*gpbft.TipSet{{ + Epoch: int64(1413), + Key: []byte(`🐠`), + }}, + }, + } + ) + + testStates := []struct { + name string + blkParam string + setup func(t *testing.T) + wantTipSetV2 func(t *testing.T) *types.TipSet + wantTipSetV1 func(t *testing.T) *types.TipSet + wantErrV1 string + wantErrV2 string + }{ + { + name: "latest tag", + blkParam: "latest", + wantTipSetV1: heaviest, + wantTipSetV2: heaviest, + }, + { + name: "finalized tag when f3 disabled", + blkParam: "finalized", + setup: func(t *testing.T) { + mockF3.Running = false + }, + wantTipSetV1: ecFinalized, + wantTipSetV2: ecFinalized, + }, + { + name: "safe tag when f3 disabled", + blkParam: "safe", + setup: func(t *testing.T) { + mockF3.Running = false + }, + wantTipSetV1: ecSafeV1, + wantTipSetV2: ecSafeV2, + }, + { + name: "finalized tag is ok", + blkParam: "finalized", + setup: func(t *testing.T) { + mockF3.Running = true + mockF3.Finalizing = true + mockF3.LatestCertErr = nil + mockF3.LatestCert = plausibleCertAt(t, f3FinalizedEpoch) + }, + wantTipSetV1: ecFinalized, + wantTipSetV2: f3Finalized, + }, + { + name: "safe tag is finalized when more recent than ec safe", + blkParam: "safe", + setup: func(t *testing.T) { + mockF3.Running = true + mockF3.Finalizing = true + mockF3.LatestCertErr = nil + mockF3.LatestCert = plausibleCertAt(t, targetHeight) + }, + wantTipSetV1: ecSafeV1, + wantTipSetV2: tipSetAtHeight(targetHeight), + }, + { + name: "safe tag is ec safe distance when more recent than f3 finalized, but f3 is not activated", + blkParam: "safe", + setup: func(t *testing.T) { + mockF3.Running = true + mockF3.Finalizing = false + mockF3.LatestCertErr = nil + mockF3.LatestCert = plausibleCertAt(t, f3FinalizedEpoch) + }, + wantTipSetV1: ecSafeV1, + wantTipSetV2: ecSafeV2, + }, + { + name: "safe tag is ec safe distance when more recent than f3 finalized", + blkParam: "safe", + setup: func(t *testing.T) { + mockF3.Running = true + mockF3.Finalizing = true + mockF3.LatestCertErr = nil + mockF3.LatestCert = plausibleCertAt(t, f3FinalizedEpoch) + mockF3.Finalizing = true + }, + wantTipSetV1: ecSafeV1, + wantTipSetV2: ecSafeV2, + }, + { + name: "finalized tag when f3 not ready falls back to ec", + blkParam: "finalized", + setup: func(t *testing.T) { + mockF3.Running = true + mockF3.Finalizing = true + mockF3.LatestCert = nil + mockF3.LatestCertErr = api.ErrF3NotReady + }, + wantTipSetV1: ecFinalized, + wantTipSetV2: ecFinalized, + }, + { + name: "safe tag when f3 not ready falls back to ec safe, but f3 is not activated", + blkParam: "safe", + setup: func(t *testing.T) { + mockF3.Running = true + mockF3.Finalizing = false + mockF3.LatestCert = nil + mockF3.LatestCertErr = api.ErrF3NotReady + }, + wantTipSetV1: ecSafeV1, + wantTipSetV2: ecSafeV2, + }, + { + name: "safe tag when f3 not ready falls back to ec safe", + blkParam: "safe", + setup: func(t *testing.T) { + mockF3.Running = true + mockF3.Finalizing = true + mockF3.LatestCert = nil + mockF3.LatestCertErr = api.ErrF3NotReady + }, + wantTipSetV1: ecSafeV1, + wantTipSetV2: ecSafeV2, + }, + { + name: "finalized tag when f3 fails", + blkParam: "finalized", + setup: func(t *testing.T) { + mockF3.Running = true + mockF3.Finalizing = true + mockF3.LatestCert = nil + mockF3.LatestCertErr = internalF3Error + }, + wantTipSetV1: ecFinalized, + wantErrV2: internalF3Error.Error(), + }, + { + name: "safe tag when f3 fails, but f3 is not activated", + blkParam: "safe", + setup: func(t *testing.T) { + mockF3.Running = true + mockF3.Finalizing = false + mockF3.LatestCert = nil + mockF3.LatestCertErr = internalF3Error + }, + wantTipSetV1: ecSafeV1, + wantErrV2: internalF3Error.Error(), + }, + { + name: "safe tag when f3 fails", + blkParam: "safe", + setup: func(t *testing.T) { + mockF3.Running = true + mockF3.Finalizing = true + mockF3.LatestCert = nil + mockF3.LatestCertErr = internalF3Error + }, + wantTipSetV1: ecSafeV1, + wantErrV2: internalF3Error.Error(), + }, + { + name: "latest tag when f3 fails is ok", + blkParam: "latest", + setup: func(t *testing.T) { + mockF3.Running = true + mockF3.Finalizing = true + mockF3.LatestCert = nil + mockF3.LatestCertErr = internalF3Error + }, + wantTipSetV1: heaviest, + wantTipSetV2: heaviest, + }, + { + name: "finalized tag when f3 is broken", + blkParam: "finalized", + setup: func(t *testing.T) { + mockF3.Running = true + mockF3.Finalizing = true + mockF3.LatestCert = implausibleCert + mockF3.LatestCertErr = nil + }, + wantTipSetV1: ecFinalized, + wantErrV2: "decoding latest f3 cert tipset key", + }, + { + name: "safe tag when f3 is broken, but f3 is not activated", + blkParam: "safe", + setup: func(t *testing.T) { + mockF3.Running = true + mockF3.Finalizing = false + mockF3.LatestCert = implausibleCert + mockF3.LatestCertErr = nil + }, + wantTipSetV1: ecSafeV1, + wantErrV2: "decoding latest f3 cert tipset key", + }, + { + name: "safe tag when f3 is broken", + blkParam: "safe", + setup: func(t *testing.T) { + mockF3.Running = true + mockF3.Finalizing = true + mockF3.LatestCert = implausibleCert + mockF3.LatestCertErr = nil + }, + wantTipSetV1: ecSafeV1, + wantErrV2: "decoding latest f3 cert tipset key", + }, + { + name: "height before ec finalized epoch is ok", + blkParam: fmt.Sprintf("0x%x", int(tipSetAtHeight(10)(t).Height())), + setup: func(t *testing.T) { + mockF3.Running = true + mockF3.Finalizing = true + mockF3.LatestCert = plausibleCertAt(t, f3FinalizedEpoch) + mockF3.LatestCertErr = nil + }, + wantTipSetV1: tipSetAtHeight(10), + wantTipSetV2: tipSetAtHeight(10), + }, + { + name: "height after f3 finalized epoch is ok", + blkParam: fmt.Sprintf("0x%x", int(tipSetAtHeight(f3FinalizedEpoch+2)(t).Height())), + setup: func(t *testing.T) { + mockF3.Running = true + mockF3.Finalizing = true + mockF3.LatestCert = plausibleCertAt(t, f3FinalizedEpoch) + mockF3.LatestCertErr = nil + }, + wantTipSetV1: tipSetAtHeight(f3FinalizedEpoch + 2), + wantTipSetV2: tipSetAtHeight(f3FinalizedEpoch + 2), + }, + { + name: "height before ec finalized epoch when f3 not ready is ok", + blkParam: fmt.Sprintf("0x%x", int(tipSetAtHeight(10)(t).Height())), + setup: func(t *testing.T) { + mockF3.Running = true + mockF3.Finalizing = true + mockF3.LatestCert = nil + mockF3.LatestCertErr = api.ErrF3NotReady + }, + wantTipSetV1: tipSetAtHeight(10), + wantTipSetV2: tipSetAtHeight(10), + }, + { + name: "height after f3 finalized epoch when f3 not ready is ok", + blkParam: fmt.Sprintf("0x%x", int(f3FinalizedEpoch)+2), + setup: func(t *testing.T) { + mockF3.Running = true + mockF3.Finalizing = true + mockF3.LatestCert = nil + mockF3.LatestCertErr = api.ErrF3NotReady + }, + wantTipSetV1: tipSetAtHeight(f3FinalizedEpoch + 2), + wantTipSetV2: tipSetAtHeight(f3FinalizedEpoch + 2), + }, + } + testCases := []struct { + name string + execute func(req *require.Assertions, subject ethApi, blkParam string, stableExecute func(func()) *types.TipSet, expectErr string) + }{ + { + name: "FilecoinAddressToEthAddress", + execute: func(req *require.Assertions, subject ethApi, blkParam string, stableExecute func(func()) *types.TipSet, expectErr string) { + var apiEthAddr ethtypes.EthAddress + var err error + expect := stableExecute(func() { + apiEthAddr, err = subject.FilecoinAddressToEthAddress(ctx, result.Wrap[jsonrpc.RawParams]( + json.Marshal([]interface{}{filecoinSecpAddr, blkParam}), + ).Assert(req.NoError)) + }) + + if expectErr != "" { + req.ErrorContains(err, expectErr) + } else if expect.Height() < preF3FinalizedEpoch { + req.ErrorContains(err, "failed to lookup ID address for given Filecoin address") + } else { + req.NoError(err) + req.Equal(filecoinSecpEthAddr, apiEthAddr) + } + }, + }, + + { + name: "EthGetCode", + execute: func(req *require.Assertions, subject ethApi, blkParam string, stableExecute func(func()) *types.TipSet, expectErr string) { + var param ethtypes.EthBlockNumberOrHash + req.NoError(param.UnmarshalJSON([]byte(`"` + blkParam + `"`))) + + var code ethtypes.EthBytes + var err error + expect := stableExecute(func() { + code, err = subject.EthGetCode(ctx, contractEthAddr, param) + }) + + if expectErr != "" { + req.ErrorContains(err, expectErr) + req.Empty(code) + } else if expect.Height() < preF3FinalizedEpoch { + // no error, but no code + req.NoError(err) + req.Empty(code) + } else { + req.NoError(err) + req.NotEmpty(code) + } + }, + }, + + { + name: "EthGetStorageAt", + execute: func(req *require.Assertions, subject ethApi, blkParam string, stableExecute func(func()) *types.TipSet, expectErr string) { + var param ethtypes.EthBlockNumberOrHash + req.NoError(param.UnmarshalJSON([]byte(`"` + blkParam + `"`))) + + var value ethtypes.EthBytes + var err error + expect := stableExecute(func() { + value, err = subject.EthGetStorageAt(ctx, contractEthAddr, nil, param) + }) + + if expectErr != "" { + req.ErrorContains(err, expectErr) + req.Empty(value) + } else if expect.Height() < preF3FinalizedEpoch { + // no error, but a zero value + req.NoError(err) + req.Equal(ethtypes.EthBytes(make([]byte, 32)), value) + } else { + req.NoError(err) + expected, err := hex.DecodeString("0000000000000000000000000000000000000000000000000000000000000007") + require.NoError(t, err) + req.Equal(ethtypes.EthBytes(expected), value) + } + }, + }, + + { + name: "EthGetBalance", + execute: func(req *require.Assertions, subject ethApi, blkParam string, stableExecute func(func()) *types.TipSet, expectErr string) { + var param ethtypes.EthBlockNumberOrHash + req.NoError(param.UnmarshalJSON([]byte(`"` + blkParam + `"`))) + + var balance ethtypes.EthBigInt + var err error + expect := stableExecute(func() { + balance, err = subject.EthGetBalance(ctx, filecoinSecpEthAddr, param) + }) + + if expectErr != "" { + req.ErrorContains(err, expectErr) + req.Equal(balance.String(), "0x0") + } else if expect.Height() < preF3FinalizedEpoch { + // no error, but a zero balance + req.NoError(err) + req.Equal(balance.String(), "0x0") + } else { + req.NoError(err) + req.Equal(int64(1), balance.Int64()) + } + }, + }, + + { + name: "EthTraceBlock", + execute: func(req *require.Assertions, subject ethApi, blkParam string, stableExecute func(func()) *types.TipSet, expectErr string) { + var trace []*ethtypes.EthTraceBlock + var err error + expect := stableExecute(func() { + trace, err = subject.EthTraceBlock(ctx, blkParam) + }) + + if expectErr != "" { + req.ErrorContains(err, expectErr) + req.Nil(trace) + } else { + req.NoError(err) + msgs, err := client.ChainGetMessagesInTipset(ctx, expect.Parents()) + req.NoError(err) + req.Len(trace, len(msgs)) + for i, blk := range trace { + req.Equal(expect.Height(), blk.BlockNumber, "block %d", i) + expectTxHash, err := ethtypes.EthHashFromCid(msgs[i].Cid) + req.NoError(err) + req.Equal(expectTxHash, blk.TransactionHash, "block %d", i) + } + } + }, + }, + + { + name: "EthTraceReplayBlockTransactions", + execute: func(req *require.Assertions, subject ethApi, blkParam string, stableExecute func(func()) *types.TipSet, expectErr string) { + var trace []*ethtypes.EthTraceReplayBlockTransaction + var err error + expect := stableExecute(func() { + trace, err = subject.EthTraceReplayBlockTransactions(ctx, blkParam, []string{"trace"}) + }) + + if expectErr != "" { + req.ErrorContains(err, expectErr) + req.Nil(trace) + } else { + req.NoError(err) + msgs, err := client.ChainGetMessagesInTipset(ctx, expect.Parents()) + req.NoError(err) + req.Len(trace, len(msgs)) + for i, blk := range trace { + expectTxHash, err := ethtypes.EthHashFromCid(msgs[i].Cid) + req.NoError(err) + req.Equal(expectTxHash, blk.TransactionHash, "block %d", i) + } + } + }, + }, + + { + name: "EthFeeHistory", + execute: func(req *require.Assertions, subject ethApi, blkParam string, stableExecute func(func()) *types.TipSet, expectErr string) { + blkCount := 5 + + var feeHistory ethtypes.EthFeeHistory + var err error + expect := stableExecute(func() { + feeHistory, err = subject.EthFeeHistory(ctx, result.Wrap[jsonrpc.RawParams]( + json.Marshal([]interface{}{blkCount, blkParam}), + ).Assert(req.NoError)) + }) + + if expectErr != "" { + req.ErrorContains(err, expectErr) + req.Equal(ethtypes.EthFeeHistory{}, feeHistory) + } else { + req.NoError(err) + oldest := expect + for range blkCount - 1 { + // iterate through Parents() because we'll likely have null rounds in here so we can't + // just us the height + k := oldest.Parents() + oldest, err = client.ChainGetTipSet(ctx, k) + req.NoError(err) + } + req.Equal(ethtypes.EthUint64(oldest.Height()), feeHistory.OldestBlock) + } + }, + }, + + { + // This is not a great test because the gas limit values we produce are not likely to differ + // between different tipsets so we're mostly testing that we can call with the various + // blkParams, not so much that their values are what we expect for that blkParam. + name: "EthEstimateGas", + execute: func(req *require.Assertions, subject ethApi, blkParam string, stableExecute func(func()) *types.TipSet, expectErr string) { + var param ethtypes.EthBlockNumberOrHash + req.NoError(param.UnmarshalJSON([]byte(`"` + blkParam + `"`))) + call := ethtypes.EthCall{From: &fundedEthAddr, Data: contractBytes} + gasParams, err := json.Marshal(ethtypes.EthEstimateGasParams{ + BlkParam: ¶m, + Tx: call, + }) + require.NoError(t, err) + + var egaslimit ethtypes.EthUint64 + expect := stableExecute(func() { + egaslimit, err = subject.EthEstimateGas(ctx, gasParams) + }) + + if expectErr != "" { + req.ErrorContains(err, expectErr) + req.Equal(ethtypes.EthUint64(0), egaslimit) + } else { + msg, err := call.ToFilecoinMessage() + require.NoError(t, err) + gaslimit, err := client.GasEstimateGasLimit(ctx, msg, expect.Key()) + require.NoError(t, err) + gasLimitOverestimation := 1.25 // default messagepool config value + req.Equal(int64(float64(gaslimit)*gasLimitOverestimation), int64(egaslimit)) + } + }, + }, + + { + name: "EthCall", + execute: func(req *require.Assertions, subject ethApi, blkParam string, stableExecute func(func()) *types.TipSet, expectErr string) { + var param ethtypes.EthBlockNumberOrHash + req.NoError(param.UnmarshalJSON([]byte(`"` + blkParam + `"`))) + call := ethtypes.EthCall{ + From: &fundedEthAddr, + To: &contractEthAddr, + Data: kit.CalcFuncSignature("getCounter()"), + } + + var ret ethtypes.EthBytes + var err error + expect := stableExecute(func() { + ret, err = subject.EthCall(ctx, call, param) + }) + + if expectErr != "" { + req.ErrorContains(err, expectErr) + } else if expect.Height() < preF3FinalizedEpoch { + req.NoError(err) + } else { + req.NoError(err) + expected, err := hex.DecodeString("0000000000000000000000000000000000000000000000000000000000000007") + require.NoError(t, err) + req.Equal(ethtypes.EthBytes(expected), ret) + } + }, + }, + + { + name: "EthGetBlockTransactionCountByNumber", + execute: func(req *require.Assertions, subject ethApi, blkParam string, stableExecute func(func()) *types.TipSet, expectErr string) { + var ret ethtypes.EthUint64 + var err error + expect := stableExecute(func() { + ret, err = subject.EthGetBlockTransactionCountByNumber(ctx, blkParam) + }) + + if expectErr != "" { + req.ErrorContains(err, expectErr) + } else { + req.NoError(err) + msgs, err := client.ChainGetMessagesInTipset(ctx, expect.Parents()) + req.NoError(err) + req.Equal(int(ret), len(msgs)) + } + }, + }, + + { + name: "EthGetBlockByNumber", + execute: func(req *require.Assertions, subject ethApi, blkParam string, stableExecute func(func()) *types.TipSet, expectErr string) { + var ret ethtypes.EthBlock + var err error + expect := stableExecute(func() { + ret, err = subject.EthGetBlockByNumber(ctx, blkParam, false) + }) + + if expectErr != "" { + req.ErrorContains(err, expectErr) + } else { + req.NoError(err) + req.Equal(int(ret.Number), int(expect.Height())) + } + }, + }, + + { + name: "EthGetTransactionByBlockNumberAndIndex", + execute: func(req *require.Assertions, subject ethApi, blkParam string, stableExecute func(func()) *types.TipSet, expectErr string) { + var ret *ethtypes.EthTx + var err error + expect := stableExecute(func() { + ret, err = subject.EthGetTransactionByBlockNumberAndIndex(ctx, blkParam, ethtypes.EthUint64(0)) + }) + + if expectErr != "" { + req.ErrorContains(err, expectErr) + } else { + msgs, err2 := client.ChainGetMessagesInTipset(ctx, expect.Parents()) + req.NoError(err2) + if len(msgs) == 0 { + req.ErrorContains(err, "tipset contains 0 messages") + } else { + req.NoError(err) + req.NotNil(ret) + req.Equal(int(*ret.BlockNumber), int(expect.Height())) + } + } + }, + }, + + { + name: "EthGetTransactionCount", + execute: func(req *require.Assertions, subject ethApi, blkParam string, stableExecute func(func()) *types.TipSet, expectErr string) { + minerId, err := address.IDFromAddress(miner.ActorAddr) + req.NoError(err) + ethAddr := ethtypes.EthAddressFromActorID(abi.ActorID(minerId)) + var param ethtypes.EthBlockNumberOrHash + req.NoError(param.UnmarshalJSON([]byte(`"` + blkParam + `"`))) + + var ret ethtypes.EthUint64 + expect := stableExecute(func() { + ret, err = subject.EthGetTransactionCount(ctx, ethAddr, param) + }) + + if expectErr != "" { + req.ErrorContains(err, expectErr) + } else { + req.NoError(err) + msgs, err := client.ChainGetMessagesInTipset(ctx, expect.Parents()) + req.NoError(err) + var cnt int + if len(msgs) > 0 { + for _, msg := range msgs { + if msg.Message.From == miner.ActorAddr { + cnt++ + } + } + } + req.Equal(int(ret), cnt) + } + }, + }, + + { + name: "EthGetBlockReceipts", + execute: func(req *require.Assertions, subject ethApi, blkParam string, stableExecute func(func()) *types.TipSet, expectErr string) { + var param ethtypes.EthBlockNumberOrHash + req.NoError(param.UnmarshalJSON([]byte(`"` + blkParam + `"`))) + + var ret []*ethtypes.EthTxReceipt + var err error + expect := stableExecute(func() { + ret, err = subject.EthGetBlockReceipts(ctx, param) + }) + + if expectErr != "" { + req.ErrorContains(err, expectErr) + } else { + req.NoError(err) + msgs, err := client.ChainGetMessagesInTipset(ctx, expect.Parents()) + req.NoError(err) + req.Len(ret, len(msgs)) + if len(msgs) > 0 { + req.Equal(int(ret[0].BlockNumber), int(expect.Height())) + } + } + }, + }, + } + + for _, state := range testStates { + t.Run(state.name, func(t *testing.T) { + if state.setup != nil { + state.setup(t) + } + for _, test := range testCases { + t.Run(test.name, func(t *testing.T) { + mkStableExecute := func(wantTipSet func(t *testing.T) *types.TipSet) func(fn func()) *types.TipSet { + if wantTipSet == nil { + wantTipSet = func(t *testing.T) *types.TipSet { return nil } + } + // stableExecute is a helper that will execute a function required by the test case + // repeatedly until the tipset observed before is the same as after execution of the + // function. This helps reduce flakies that come from reorgs between capturing the tipset + // and executing the function. + // Unfortunately it doesn't remove the problem entirely as we could have multiple reorgs + // off the tipset we observe and then back to it, but it should be extremely rare. + return func(fn func()) *types.TipSet { + beforeTs := wantTipSet(t) + for { + fn() + afterTs := wantTipSet(t) + if beforeTs.Equals(afterTs) { + // it seems that the chain hasn't changed while executing, so it ought to be safe to + // tell the test function that this is the tipset against which they executed + return beforeTs + } + beforeTs = afterTs + } + } + } + + t.Run("v1", func(t *testing.T) { + stableExecute := mkStableExecute(state.wantTipSetV1) + subject := client + test.execute(require.New(t), subject, state.blkParam, stableExecute, state.wantErrV1) + }) + + t.Run("v2", func(t *testing.T) { + stableExecute := mkStableExecute(state.wantTipSetV2) + subject := client.V2 + test.execute(require.New(t), subject, state.blkParam, stableExecute, state.wantErrV2) + }) + }) + } + }) + } +} diff --git a/itests/eth_api_test.go b/itests/eth_api_test.go index 0838efa7bef..992a053da5a 100644 --- a/itests/eth_api_test.go +++ b/itests/eth_api_test.go @@ -409,9 +409,9 @@ func TestEthBlockNumberAliases(t *testing.T) { param string expectedLag abi.ChainEpoch }{ - {"latest", 1}, // head - 1 - {"safe", 30 + 1}, // "latest" - 30 - {"finalized", policy.ChainFinality + 1}, // "latest" - 900 + {"latest", 1}, // head - 1 + {"safe", 30}, // "latest" - 30 + {"finalized", policy.ChainFinality}, // "latest" - 900 } { t.Run(tc.param, func(t *testing.T) { head, err := client.ChainHead(ctx) diff --git a/itests/eth_conformance_test.go b/itests/eth_conformance_test.go index b19f1811d7b..d6170fb6677 100644 --- a/itests/eth_conformance_test.go +++ b/itests/eth_conformance_test.go @@ -6,6 +6,7 @@ import ( "encoding/binary" "encoding/hex" "encoding/json" + "fmt" "os" "strings" "testing" @@ -99,6 +100,7 @@ func TestEthOpenRPCConformance(t *testing.T) { require.NoError(t, err) senderKey, senderEthAddr, senderFilAddr := client.EVM().NewAccount() + var senderEthNonce int _, receiverEthAddr, _ := client.EVM().NewAccount() kit.SendFunds(ctx, t, client, senderFilAddr, types.FromFil(1000)) @@ -119,8 +121,6 @@ func TestEthOpenRPCConformance(t *testing.T) { uninstallableFilterID, err := client.EthNewFilter(ctx, filterAllLogs) require.NoError(t, err) - rawSignedEthTx := createRawSignedEthTx(ctx, t, client, senderEthAddr, receiverEthAddr, senderKey, contractBin) - result := client.EVM().DeployContract(ctx, deployerAddr, contractBin) contractAddr, err := address.NewIDAddress(result.ActorID) require.NoError(t, err) @@ -130,15 +130,17 @@ func TestEthOpenRPCConformance(t *testing.T) { messageWithEvents, blockHashWithMessage, blockNumberWithMessage := waitForMessageWithEvents(ctx, t, client, deployerAddr, contractAddr) // create a json-rpc client that returns raw json responses - var ethapi ethAPIRaw + var ethapi1, ethapi2 ethAPIRaw netAddr, err := manet.ToNetAddr(client.ListenAddr) require.NoError(t, err) - rpcAddr := "ws://" + netAddr.String() + "/rpc/v1" - - closer, err := jsonrpc.NewClient(ctx, rpcAddr, "Filecoin", ðapi, nil) + rpcAddr := "ws://" + netAddr.String() + "/rpc/v" + closer1, err := jsonrpc.NewClient(ctx, rpcAddr+"1", "Filecoin", ðapi1, nil) + require.NoError(t, err) + defer closer1() + closer2, err := jsonrpc.NewClient(ctx, rpcAddr+"2", "Filecoin", ðapi2, nil) require.NoError(t, err) - defer closer() + defer closer2() testCases := []struct { method string @@ -151,14 +153,14 @@ func TestEthOpenRPCConformance(t *testing.T) { { method: "eth_accounts", call: func(a *ethAPIRaw) (json.RawMessage, error) { - return ethapi.EthAccounts(context.Background()) + return a.EthAccounts(context.Background()) }, }, { method: "eth_blockNumber", call: func(a *ethAPIRaw) (json.RawMessage, error) { - return ethapi.EthBlockNumber(context.Background()) + return a.EthBlockNumber(context.Background()) }, }, @@ -166,7 +168,7 @@ func TestEthOpenRPCConformance(t *testing.T) { method: "eth_call", variant: "latest", call: func(a *ethAPIRaw) (json.RawMessage, error) { - return ethapi.EthCall(context.Background(), ethtypes.EthCall{ + return a.EthCall(context.Background(), ethtypes.EthCall{ From: &senderEthAddr, Data: contractBin, }, ethtypes.NewEthBlockNumberOrHashFromPredefined("latest")) @@ -176,7 +178,7 @@ func TestEthOpenRPCConformance(t *testing.T) { { method: "eth_chainId", call: func(a *ethAPIRaw) (json.RawMessage, error) { - return ethapi.EthChainId(context.Background()) + return a.EthChainId(context.Background()) }, }, @@ -189,21 +191,21 @@ func TestEthOpenRPCConformance(t *testing.T) { }}) require.NoError(t, err) - return ethapi.EthEstimateGas(ctx, gasParams) + return a.EthEstimateGas(ctx, gasParams) }, }, { method: "eth_feeHistory", call: func(a *ethAPIRaw) (json.RawMessage, error) { - return ethapi.EthFeeHistory(context.Background(), ethtypes.EthUint64(2), "latest", nil) + return a.EthFeeHistory(context.Background(), ethtypes.EthUint64(2), "latest", nil) }, }, { method: "eth_gasPrice", call: func(a *ethAPIRaw) (json.RawMessage, error) { - return ethapi.EthGasPrice(context.Background()) + return a.EthGasPrice(context.Background()) }, }, @@ -212,7 +214,7 @@ func TestEthOpenRPCConformance(t *testing.T) { variant: "blocknumber", call: func(a *ethAPIRaw) (json.RawMessage, error) { blockParam, _ := ethtypes.NewEthBlockNumberOrHashFromHexString("0x0") - return ethapi.EthGetBalance(context.Background(), contractEthAddr, blockParam) + return a.EthGetBalance(context.Background(), contractEthAddr, blockParam) }, }, @@ -220,7 +222,7 @@ func TestEthOpenRPCConformance(t *testing.T) { method: "eth_getBlockByHash", variant: "txhashes", call: func(a *ethAPIRaw) (json.RawMessage, error) { - return ethapi.EthGetBlockByHash(context.Background(), blockHashWithMessage, false) + return a.EthGetBlockByHash(context.Background(), blockHashWithMessage, false) }, }, @@ -228,7 +230,7 @@ func TestEthOpenRPCConformance(t *testing.T) { method: "eth_getBlockByHash", variant: "txfull", call: func(a *ethAPIRaw) (json.RawMessage, error) { - return ethapi.EthGetBlockByHash(context.Background(), blockHashWithMessage, true) + return a.EthGetBlockByHash(context.Background(), blockHashWithMessage, true) }, }, @@ -236,7 +238,7 @@ func TestEthOpenRPCConformance(t *testing.T) { method: "eth_getBlockByNumber", variant: "earliest", call: func(a *ethAPIRaw) (json.RawMessage, error) { - return ethapi.EthGetBlockByNumber(context.Background(), "earliest", true) + return a.EthGetBlockByNumber(context.Background(), "earliest", true) }, skipReason: "earliest block is not supported", }, @@ -244,21 +246,21 @@ func TestEthOpenRPCConformance(t *testing.T) { { method: "eth_getBlockByNumber", call: func(a *ethAPIRaw) (json.RawMessage, error) { - return ethapi.EthGetBlockByNumber(context.Background(), blockNumberWithMessage.Hex(), true) + return a.EthGetBlockByNumber(context.Background(), blockNumberWithMessage.Hex(), true) }, }, { method: "eth_getBlockTransactionCountByHash", call: func(a *ethAPIRaw) (json.RawMessage, error) { - return ethapi.EthGetBlockTransactionCountByHash(context.Background(), blockHashWithMessage) + return a.EthGetBlockTransactionCountByHash(context.Background(), blockHashWithMessage) }, }, { method: "eth_getBlockTransactionCountByNumber", call: func(a *ethAPIRaw) (json.RawMessage, error) { - return ethapi.EthGetBlockTransactionCountByNumber(context.Background(), blockNumberWithMessage) + return a.EthGetBlockTransactionCountByNumber(context.Background(), blockNumberWithMessage) }, }, @@ -266,7 +268,7 @@ func TestEthOpenRPCConformance(t *testing.T) { method: "eth_getCode", variant: "blocknumber", call: func(a *ethAPIRaw) (json.RawMessage, error) { - return ethapi.EthGetCode(context.Background(), contractEthAddr, ethtypes.NewEthBlockNumberOrHashFromNumber(blockNumberWithMessage)) + return a.EthGetCode(context.Background(), contractEthAddr, ethtypes.NewEthBlockNumberOrHashFromNumber(blockNumberWithMessage)) }, }, @@ -304,7 +306,7 @@ func TestEthOpenRPCConformance(t *testing.T) { { method: "eth_getLogs", call: func(a *ethAPIRaw) (json.RawMessage, error) { - return ethapi.EthGetLogs(context.Background(), filterAllLogs) + return a.EthGetLogs(context.Background(), filterAllLogs) }, }, @@ -313,28 +315,28 @@ func TestEthOpenRPCConformance(t *testing.T) { variant: "blocknumber", call: func(a *ethAPIRaw) (json.RawMessage, error) { blockParam, _ := ethtypes.NewEthBlockNumberOrHashFromHexString("0x0") - return ethapi.EthGetStorageAt(context.Background(), contractEthAddr, ethtypes.EthBytes{0}, blockParam) + return a.EthGetStorageAt(context.Background(), contractEthAddr, ethtypes.EthBytes{0}, blockParam) }, }, { method: "eth_getTransactionByBlockHashAndIndex", call: func(a *ethAPIRaw) (json.RawMessage, error) { - return ethapi.EthGetTransactionByBlockHashAndIndex(context.Background(), blockHashWithMessage, ethtypes.EthUint64(0)) + return a.EthGetTransactionByBlockHashAndIndex(context.Background(), blockHashWithMessage, ethtypes.EthUint64(0)) }, }, { method: "eth_getTransactionByBlockNumberAndIndex", call: func(a *ethAPIRaw) (json.RawMessage, error) { - return ethapi.EthGetTransactionByBlockNumberAndIndex(context.Background(), blockNumberWithMessage.Hex(), ethtypes.EthUint64(0)) + return a.EthGetTransactionByBlockNumberAndIndex(context.Background(), blockNumberWithMessage.Hex(), ethtypes.EthUint64(0)) }, }, { method: "eth_getTransactionByHash", call: func(a *ethAPIRaw) (json.RawMessage, error) { - return ethapi.EthGetTransactionByHash(context.Background(), &messageWithEvents) + return a.EthGetTransactionByHash(context.Background(), &messageWithEvents) }, }, @@ -342,54 +344,56 @@ func TestEthOpenRPCConformance(t *testing.T) { method: "eth_getTransactionCount", variant: "blocknumber", call: func(a *ethAPIRaw) (json.RawMessage, error) { - return ethapi.EthGetTransactionCount(context.Background(), senderEthAddr, ethtypes.NewEthBlockNumberOrHashFromNumber(blockNumberWithMessage)) + return a.EthGetTransactionCount(context.Background(), senderEthAddr, ethtypes.NewEthBlockNumberOrHashFromNumber(blockNumberWithMessage)) }, }, { method: "eth_getTransactionReceipt", call: func(a *ethAPIRaw) (json.RawMessage, error) { - return ethapi.EthGetTransactionReceipt(context.Background(), messageWithEvents) + return a.EthGetTransactionReceipt(context.Background(), messageWithEvents) }, }, { method: "eth_getBlockReceipts", call: func(a *ethAPIRaw) (json.RawMessage, error) { - return ethapi.EthGetBlockReceipts(context.Background(), ethtypes.NewEthBlockNumberOrHashFromNumber(blockNumberWithMessage)) + return a.EthGetBlockReceipts(context.Background(), ethtypes.NewEthBlockNumberOrHashFromNumber(blockNumberWithMessage)) }, }, { method: "eth_maxPriorityFeePerGas", call: func(a *ethAPIRaw) (json.RawMessage, error) { - return ethapi.EthMaxPriorityFeePerGas(context.Background()) + return a.EthMaxPriorityFeePerGas(context.Background()) }, }, { method: "eth_newBlockFilter", call: func(a *ethAPIRaw) (json.RawMessage, error) { - return ethapi.EthNewBlockFilter(context.Background()) + return a.EthNewBlockFilter(context.Background()) }, }, { method: "eth_newFilter", call: func(a *ethAPIRaw) (json.RawMessage, error) { - return ethapi.EthNewFilter(context.Background(), filterAllLogs) + return a.EthNewFilter(context.Background(), filterAllLogs) }, }, { method: "eth_newPendingTransactionFilter", call: func(a *ethAPIRaw) (json.RawMessage, error) { - return ethapi.EthNewPendingTransactionFilter(context.Background()) + return a.EthNewPendingTransactionFilter(context.Background()) }, }, { method: "eth_sendRawTransaction", call: func(a *ethAPIRaw) (json.RawMessage, error) { - return ethapi.EthSendRawTransaction(context.Background(), rawSignedEthTx) + rawSignedEthTx := createRawSignedEthTx(ctx, t, client, senderEthAddr, receiverEthAddr, senderKey, senderEthNonce, contractBin) + senderEthNonce++ + return a.EthSendRawTransaction(context.Background(), rawSignedEthTx) }, }, { @@ -401,7 +405,6 @@ func TestEthOpenRPCConformance(t *testing.T) { } for _, tc := range testCases { - tc := tc name := tc.method if tc.variant != "" { name += "_" + tc.variant @@ -414,47 +417,60 @@ func TestEthOpenRPCConformance(t *testing.T) { schema, ok := schemas[tc.method] require.True(t, ok, "method not found in openrpc spec") - resp, err := tc.call(ðapi) - require.NoError(t, err) - - respJson, err := json.Marshal(resp) - require.NoError(t, err) - - loader := gojsonschema.NewGoLoader(schema) - resploader := gojsonschema.NewBytesLoader(respJson) - result, err := gojsonschema.Validate(loader, resploader) - require.NoError(t, err) - - if !result.Valid() { - if len(result.Errors()) == 1 && strings.Contains(result.Errors()[0].String(), "Must validate one and only one schema (oneOf)") { - // Ignore this error, since it seems the openrpc spec can't handle it - // New transaction and block filters have the same schema: an array of 32 byte hashes - return - } - - niceRespJson, err := json.MarshalIndent(resp, "", " ") - if err == nil { - t.Logf("response was %s", niceRespJson) - } - - schemaJson, err := json.MarshalIndent(schema, "", " ") - if err == nil { - t.Logf("schema was %s", schemaJson) - } - - // check against https://www.jsonschemavalidator.net/ - - for _, desc := range result.Errors() { - t.Logf("- %s\n", desc) - } - - t.Errorf("response did not validate") + for i, ethapi := range []*ethAPIRaw{ðapi1, ðapi2} { + t.Run(fmt.Sprintf("v%d", i+1), func(t *testing.T) { + resp, err := tc.call(ethapi) + require.NoError(t, err) + + respJson, err := json.Marshal(resp) + require.NoError(t, err) + + loader := gojsonschema.NewGoLoader(schema) + resploader := gojsonschema.NewBytesLoader(respJson) + result, err := gojsonschema.Validate(loader, resploader) + require.NoError(t, err) + + if !result.Valid() { + if len(result.Errors()) == 1 && strings.Contains(result.Errors()[0].String(), "Must validate one and only one schema (oneOf)") { + // Ignore this error, since it seems the openrpc spec can't handle it + // New transaction and block filters have the same schema: an array of 32 byte hashes + return + } + + niceRespJson, err := json.MarshalIndent(resp, "", " ") + if err == nil { + t.Logf("response was %s", niceRespJson) + } + + schemaJson, err := json.MarshalIndent(schema, "", " ") + if err == nil { + t.Logf("schema was %s", schemaJson) + } + + // check against https://www.jsonschemavalidator.net/ + + for _, desc := range result.Errors() { + t.Logf("- %s\n", desc) + } + + t.Errorf("response did not validate") + } + }) } }) } } -func createRawSignedEthTx(ctx context.Context, t *testing.T, client *kit.TestFullNode, senderEthAddr ethtypes.EthAddress, receiverEthAddr ethtypes.EthAddress, senderKey *key.Key, contractBin []byte) []byte { +func createRawSignedEthTx( + ctx context.Context, + t *testing.T, + client *kit.TestFullNode, + senderEthAddr ethtypes.EthAddress, + receiverEthAddr ethtypes.EthAddress, + senderKey *key.Key, + nonce int, + contractBin []byte, +) []byte { gasParams, err := json.Marshal(ethtypes.EthEstimateGasParams{Tx: ethtypes.EthCall{ From: &senderEthAddr, Data: contractBin, @@ -470,7 +486,7 @@ func createRawSignedEthTx(ctx context.Context, t *testing.T, client *kit.TestFul tx := ethtypes.Eth1559TxArgs{ ChainID: buildconstants.Eip155ChainId, Value: big.NewInt(100), - Nonce: 0, + Nonce: nonce, To: &receiverEthAddr, MaxFeePerGas: types.NanoFil, MaxPriorityFeePerGas: big.Int(maxPriorityFeePerGas), diff --git a/itests/eth_deploy_test.go b/itests/eth_deploy_test.go index 6f5e67af3cf..d46ba8456de 100644 --- a/itests/eth_deploy_test.go +++ b/itests/eth_deploy_test.go @@ -145,7 +145,7 @@ func TestDeployment(t *testing.T) { require.NoError(t, err) require.NotNil(t, receipts) require.Greater(t, len(receipts), 0) - var matchingReceipt *api.EthTxReceipt + var matchingReceipt *ethtypes.EthTxReceipt for _, r := range receipts { if r.TransactionHash == receipt.TransactionHash { require.Nil(t, matchingReceipt, "Multiple matching receipts found") diff --git a/itests/eth_filter_test.go b/itests/eth_filter_test.go index 726cb4e4f41..52021ca1c1e 100644 --- a/itests/eth_filter_test.go +++ b/itests/eth_filter_test.go @@ -723,7 +723,7 @@ func TestMultipleEvents(t *testing.T) { paramsArray := [][]byte{params4Events, params3Events, params3Events} - var receipts []*api.EthTxReceipt + var receipts []*ethtypes.EthTxReceipt var hashes []ethtypes.EthHash nonce := 1 diff --git a/itests/eth_hash_lookup_test.go b/itests/eth_hash_lookup_test.go index 52388b9caec..8edfdb85fe6 100644 --- a/itests/eth_hash_lookup_test.go +++ b/itests/eth_hash_lookup_test.go @@ -89,7 +89,7 @@ func TestTransactionHashLookup(t *testing.T) { require.Equal(t, hash, mpoolTx.Hash) // Wait for message to land on chain - var receipt *api.EthTxReceipt + var receipt *ethtypes.EthTxReceipt for i := 0; i < 20; i++ { receipt, err = client.EthGetTransactionReceipt(ctx, hash) if err != nil || receipt == nil { @@ -165,7 +165,7 @@ func TestTransactionHashLookupBlsFilecoinMessage(t *testing.T) { ens.InterconnectAll().BeginMining(blocktime) // Wait for message to land on chain - var receipt *api.EthTxReceipt + var receipt *ethtypes.EthTxReceipt for i := 0; i < 20; i++ { receipt, err = client.EthGetTransactionReceipt(ctx, hash) if err != nil || receipt == nil { @@ -423,7 +423,7 @@ func TestEthGetMessageCidByTransactionHashEthTx(t *testing.T) { require.Equal(t, *unsignedMessage, *mpoolTx) // Wait for message to land on chain - var receipt *api.EthTxReceipt + var receipt *ethtypes.EthTxReceipt for i := 0; i < 20; i++ { receipt, err = client.EthGetTransactionReceipt(ctx, hash) if err != nil || receipt == nil { diff --git a/itests/fevm_address_test.go b/itests/fevm_address_test.go index aea56264efe..b090e97796a 100644 --- a/itests/fevm_address_test.go +++ b/itests/fevm_address_test.go @@ -14,7 +14,6 @@ import ( "github.com/filecoin-project/go-state-types/big" builtintypes "github.com/filecoin-project/go-state-types/builtin" - "github.com/filecoin-project/lotus/api" "github.com/filecoin-project/lotus/chain/actors" "github.com/filecoin-project/lotus/chain/actors/builtin" "github.com/filecoin-project/lotus/chain/types" @@ -40,7 +39,7 @@ func effectiveEthAddressForCreate(t *testing.T, sender address.Address) ethtypes panic("unreachable") } -func createAndDeploy(ctx context.Context, t *testing.T, client *kit.TestFullNode, fromAddr address.Address, contract []byte) *api.EthTxReceipt { +func createAndDeploy(ctx context.Context, t *testing.T, client *kit.TestFullNode, fromAddr address.Address, contract []byte) *ethtypes.EthTxReceipt { // Create and deploy evm actor method := builtintypes.MethodsEAM.CreateExternal diff --git a/itests/fevm_test.go b/itests/fevm_test.go index 740abc2b78d..90c023acdce 100644 --- a/itests/fevm_test.go +++ b/itests/fevm_test.go @@ -45,7 +45,6 @@ func inputDataFromArray(input []byte) []byte { func inputDataFromFrom(ctx context.Context, t *testing.T, client *kit.TestFullNode, from address.Address) []byte { fromId, err := client.StateLookupID(ctx, from, types.EmptyTSK) require.NoError(t, err) - senderEthAddr, err := ethtypes.EthAddressFromFilecoinAddress(fromId) require.NoError(t, err) inputData := make([]byte, 32) @@ -858,7 +857,7 @@ func TestFEVMBareTransferTriggersSmartContractLogic(t *testing.T) { hash := client.EVM().SubmitTransaction(ctx, &tx) - var receipt *api.EthTxReceipt + var receipt *ethtypes.EthTxReceipt for i := 0; i < 1000; i++ { receipt, err = client.EthGetTransactionReceipt(ctx, hash) require.NoError(t, err) @@ -1144,7 +1143,7 @@ func TestEthGetBlockReceipts(t *testing.T) { } // Wait for the transactions to be mined - var lastReceipt *api.EthTxReceipt + var lastReceipt *ethtypes.EthTxReceipt for _, hash := range hashes { receipt, err := client.EVM().WaitTransaction(ctx, hash) require.NoError(t, err) @@ -1462,7 +1461,7 @@ func TestEthGetTransactionByBlockHashAndIndexAndNumber(t *testing.T) { kit.SendFunds(ctx, t, client, ethFilAddr, types.FromFil(10)) var txHashes []ethtypes.EthHash - var receipts []*api.EthTxReceipt + var receipts []*ethtypes.EthTxReceipt numTx := 3 contractHex, err := os.ReadFile("./contracts/MultipleEvents.hex") @@ -1553,7 +1552,7 @@ func TestEthGetTransactionByBlockHashAndIndexAndNumber(t *testing.T) { invalidBlockHash := ethtypes.EthHash{1} _, err = client.EthGetTransactionByBlockHashAndIndex(ctx, invalidBlockHash, ethtypes.EthUint64(0)) require.Error(t, err) - require.ErrorContains(t, err, "failed to get tipset by cid") + require.ErrorContains(t, err, "failed to get tipset by hash") // 2. Invalid block number _, err = client.EthGetTransactionByBlockNumberAndIndex(ctx, (blockNumber + 1000).Hex(), ethtypes.EthUint64(0)) diff --git a/itests/kit/evm.go b/itests/kit/evm.go index 72bcb27b786..4e6948b9f85 100644 --- a/itests/kit/evm.go +++ b/itests/kit/evm.go @@ -331,7 +331,7 @@ func (e *EVM) InvokeContractByFuncNameExpectExit(ctx context.Context, fromAddr a require.Equal(e.t, exit, wait.Receipt.ExitCode) } -func (e *EVM) WaitTransaction(ctx context.Context, hash ethtypes.EthHash) (*api.EthTxReceipt, error) { +func (e *EVM) WaitTransaction(ctx context.Context, hash ethtypes.EthHash) (*ethtypes.EthTxReceipt, error) { retries := 3 var mcid *cid.Cid var err error diff --git a/itests/kit/f3.go b/itests/kit/f3.go new file mode 100644 index 00000000000..017d3e757db --- /dev/null +++ b/itests/kit/f3.go @@ -0,0 +1,96 @@ +package kit + +import ( + "context" + "encoding/binary" + + "github.com/filecoin-project/go-f3" + "github.com/filecoin-project/go-f3/certs" + "github.com/filecoin-project/go-f3/gpbft" + "github.com/filecoin-project/go-f3/manifest" + + "github.com/filecoin-project/lotus/api" + "github.com/filecoin-project/lotus/chain/lf3" + "github.com/filecoin-project/lotus/chain/types" +) + +var _ lf3.F3Backend = (*MockF3Backend)(nil) + +type MockF3Backend struct { + Running bool + LatestCert *certs.FinalityCertificate + LatestCertErr error + Finalizing bool + + progress gpbft.InstanceProgress + certs map[uint64]*certs.FinalityCertificate + participants map[uint64]struct{} +} + +func NewMockF3Backend() *MockF3Backend { + return &MockF3Backend{ + certs: make(map[uint64]*certs.FinalityCertificate), + participants: make(map[uint64]struct{}), + } +} + +func (t *MockF3Backend) GetOrRenewParticipationTicket(_ context.Context, minerID uint64, _ api.F3ParticipationTicket, _ uint64) (api.F3ParticipationTicket, error) { + if !t.Running { + return nil, f3.ErrF3NotRunning + } + return binary.BigEndian.AppendUint64(nil, minerID), nil +} + +func (t *MockF3Backend) Participate(_ context.Context, ticket api.F3ParticipationTicket) (api.F3ParticipationLease, error) { + if !t.Running { + return api.F3ParticipationLease{}, f3.ErrF3NotRunning + } + mid := binary.BigEndian.Uint64(ticket) + if _, ok := t.participants[mid]; !ok { + return api.F3ParticipationLease{}, api.ErrF3ParticipationTicketInvalid + } + return api.F3ParticipationLease{ + Network: "fish", + Issuer: "fishmonger", + MinerID: mid, + FromInstance: t.progress.ID, + ValidityTerm: 5, + }, nil +} + +func (t *MockF3Backend) GetManifest(context.Context) (*manifest.Manifest, error) { + if !t.Running { + return nil, f3.ErrF3NotRunning + } + return &manifest.Manifest{ + EC: manifest.EcConfig{ + Finalize: t.Finalizing, + }, + }, nil +} + +func (t *MockF3Backend) GetCert(_ context.Context, instance uint64) (*certs.FinalityCertificate, error) { + if !t.Running { + return nil, f3.ErrF3NotRunning + } + return t.certs[instance], nil +} + +func (t *MockF3Backend) GetLatestCert(context.Context) (*certs.FinalityCertificate, error) { + if !t.Running { + return nil, f3.ErrF3NotRunning + } + return t.LatestCert, t.LatestCertErr +} + +func (t *MockF3Backend) GetPowerTable(context.Context, types.TipSetKey) (gpbft.PowerEntries, error) { + return nil, nil +} + +func (t *MockF3Backend) GetF3PowerTable(context.Context, types.TipSetKey) (gpbft.PowerEntries, error) { + return nil, nil +} + +func (t *MockF3Backend) ListParticipants() []api.F3Participant { return nil } +func (t *MockF3Backend) IsRunning() bool { return t.Running } +func (t *MockF3Backend) Progress() gpbft.InstanceProgress { return t.progress } diff --git a/node/builder_chain.go b/node/builder_chain.go index 6b26ff8efe1..529078848cb 100644 --- a/node/builder_chain.go +++ b/node/builder_chain.go @@ -144,16 +144,23 @@ var ChainNode = Options( Override(new(full.StateModuleAPIv2), From(new(full.StateModuleV2))), Override(new(stmgr.StateManagerAPI), rpcstmgr.NewRPCStateManager), Override(new(full.ActorEventAPI), From(new(api.Gateway))), - Override(new(eth.EthFilecoinAPI), From(new(api.Gateway))), + Override(new(full.EthFilecoinAPIV1), From(new(api.Gateway))), + Override(new(full.EthFilecoinAPIV2), From(new(api.Gateway))), Override(new(eth.EthBasicAPI), From(new(api.Gateway))), Override(new(eth.EthEventsAPI), From(new(api.Gateway))), - Override(new(eth.EthTransactionAPI), From(new(api.Gateway))), - Override(new(eth.EthLookupAPI), From(new(api.Gateway))), - Override(new(eth.EthTraceAPI), From(new(api.Gateway))), - Override(new(eth.EthGasAPI), From(new(api.Gateway))), + Override(new(full.EthLookupAPIV1), From(new(api.Gateway))), + Override(new(full.EthLookupAPIV2), From(new(api.Gateway))), + Override(new(full.EthTraceAPIV1), From(new(api.Gateway))), + Override(new(full.EthTraceAPIV2), From(new(api.Gateway))), + Override(new(full.EthGasAPIV1), From(new(api.Gateway))), + Override(new(full.EthGasAPIV2), From(new(api.Gateway))), // EthSendAPI is a special case, we block the Untrusted method via GatewayEthSend even though it // shouldn't be exposed on the Gateway API. Override(new(eth.EthSendAPI), new(modules.GatewayEthSend)), + // EthTransactionAPIV1 is a special case, we block the Limited methods via + // GatewayEthTransaction even though it shouldn't be exposed on the Gateway API. + Override(new(full.EthTransactionAPIV1), new(modules.GatewayEthTransaction)), + Override(new(full.EthTransactionAPIV2), new(modules.GatewayEthTransaction)), Override(new(index.Indexer), modules.ChainIndexer(config.ChainIndexerConfig{ EnableIndexer: false, @@ -288,7 +295,10 @@ func ConfigFullNode(c interface{}) Option { Override(new(eth.ChainStore), From(new(*store.ChainStore))), Override(new(eth.StateManager), From(new(*stmgr.StateManager))), - Override(new(eth.EthFilecoinAPI), eth.NewEthFilecoinAPI), + Override(new(full.EthTipSetResolverV1), modules.MakeV1TipSetResolver), + Override(new(full.EthTipSetResolverV2), modules.MakeV2TipSetResolver), + Override(new(full.EthFilecoinAPIV1), modules.MakeEthFilecoinV1), + Override(new(full.EthFilecoinAPIV2), modules.MakeEthFilecoinV2), If(cfg.Fevm.EnableEthRPC, Override(new(eth.StateAPI), From(new(full.StateAPI))), @@ -298,22 +308,34 @@ func ConfigFullNode(c interface{}) Option { Override(new(eth.GasAPI), From(new(full.GasModule))), Override(new(eth.EthBasicAPI), eth.NewEthBasicAPI), + Override(new(eth.EthSendAPI), eth.NewEthSendAPI), Override(new(eth.EthEventsInternal), modules.MakeEthEventsExtended(cfg.Events, cfg.Fevm.EnableEthRPC)), Override(new(eth.EthEventsAPI), From(new(eth.EthEventsInternal))), - Override(new(eth.EthTransactionAPI), modules.MakeEthTransaction(cfg.Fevm)), - Override(new(eth.EthLookupAPI), eth.NewEthLookupAPI), - Override(new(eth.EthTraceAPI), modules.MakeEthTrace(cfg.Fevm)), - Override(new(eth.EthGasAPI), eth.NewEthGasAPI), - Override(new(eth.EthSendAPI), eth.NewEthSendAPI), + + Override(new(full.EthTransactionAPIV1), modules.MakeEthTransactionV1(cfg.Fevm)), + Override(new(full.EthLookupAPIV1), modules.MakeEthLookupV1), + Override(new(full.EthTraceAPIV1), modules.MakeEthTraceV1(cfg.Fevm)), + Override(new(full.EthGasAPIV1), modules.MakeEthGasV1), + + Override(new(full.EthTransactionAPIV2), modules.MakeEthTransactionV2(cfg.Fevm)), + Override(new(full.EthLookupAPIV2), modules.MakeEthLookupV2), + Override(new(full.EthTraceAPIV2), modules.MakeEthTraceV2(cfg.Fevm)), + Override(new(full.EthGasAPIV2), modules.MakeEthGasV2), ), If(!cfg.Fevm.EnableEthRPC, Override(new(eth.EthBasicAPI), ð.EthBasicDisabled{}), - Override(new(eth.EthTransactionAPI), ð.EthTransactionDisabled{}), - Override(new(eth.EthLookupAPI), ð.EthLookupDisabled{}), - Override(new(eth.EthTraceAPI), ð.EthTraceDisabled{}), - Override(new(eth.EthGasAPI), ð.EthGasDisabled{}), - Override(new(eth.EthEventsAPI), ð.EthEventsDisabled{}), Override(new(eth.EthSendAPI), ð.EthSendDisabled{}), + Override(new(eth.EthEventsAPI), ð.EthEventsDisabled{}), + + Override(new(full.EthTransactionAPIV1), ð.EthTransactionDisabled{}), + Override(new(full.EthLookupAPIV1), ð.EthLookupDisabled{}), + Override(new(full.EthTraceAPIV1), ð.EthTraceDisabled{}), + Override(new(full.EthGasAPIV1), ð.EthGasDisabled{}), + + Override(new(full.EthTransactionAPIV2), ð.EthTransactionDisabled{}), + Override(new(full.EthLookupAPIV2), ð.EthLookupDisabled{}), + Override(new(full.EthTraceAPIV2), ð.EthTraceDisabled{}), + Override(new(full.EthGasAPIV2), ð.EthGasDisabled{}), ), If(cfg.Events.EnableActorEventsAPI, diff --git a/node/impl/eth/api.go b/node/impl/eth/api.go index b9a5159a3e9..98060d0856d 100644 --- a/node/impl/eth/api.go +++ b/node/impl/eth/api.go @@ -2,12 +2,14 @@ package eth import ( "context" + "time" "github.com/ipfs/go-cid" logging "github.com/ipfs/go-log/v2" "golang.org/x/xerrors" "github.com/filecoin-project/go-address" + "github.com/filecoin-project/go-jsonrpc" "github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/network" @@ -16,6 +18,7 @@ import ( "github.com/filecoin-project/lotus/chain/state" "github.com/filecoin-project/lotus/chain/store" "github.com/filecoin-project/lotus/chain/types" + "github.com/filecoin-project/lotus/chain/types/ethtypes" ) var ( @@ -25,6 +28,143 @@ var ( var log = logging.Logger("node/eth") +// EthFilecoin ------------------------------------------------------------------------------------- + +type EthFilecoinAPI interface { + EthAddressToFilecoinAddress(ctx context.Context, ethAddress ethtypes.EthAddress) (address.Address, error) + FilecoinAddressToEthAddress(ctx context.Context, p jsonrpc.RawParams) (ethtypes.EthAddress, error) +} + +// EthBasic ---------------------------------------------------------------------------------------- + +type EthBasicAPI interface { + Web3ClientVersion(ctx context.Context) (string, error) + EthChainId(ctx context.Context) (ethtypes.EthUint64, error) + NetVersion(ctx context.Context) (string, error) + NetListening(ctx context.Context) (bool, error) + EthProtocolVersion(ctx context.Context) (ethtypes.EthUint64, error) + EthSyncing(ctx context.Context) (ethtypes.EthSyncingResult, error) + EthAccounts(ctx context.Context) ([]ethtypes.EthAddress, error) +} + +// EthSend ----------------------------------------------------------------------------------------- + +type EthSendAPI interface { + EthSendRawTransaction(ctx context.Context, rawTx ethtypes.EthBytes) (ethtypes.EthHash, error) + EthSendRawTransactionUntrusted(ctx context.Context, rawTx ethtypes.EthBytes) (ethtypes.EthHash, error) +} + +// EthTransaction ---------------------------------------------------------------------------------- + +type EthTransactionAPI interface { + EthBlockNumber(ctx context.Context) (ethtypes.EthUint64, error) + + EthGetBlockTransactionCountByNumber(ctx context.Context, blkNum string) (ethtypes.EthUint64, error) + EthGetBlockTransactionCountByHash(ctx context.Context, blkHash ethtypes.EthHash) (ethtypes.EthUint64, error) + EthGetBlockByHash(ctx context.Context, blkHash ethtypes.EthHash, fullTxInfo bool) (ethtypes.EthBlock, error) + EthGetBlockByNumber(ctx context.Context, blkNum string, fullTxInfo bool) (ethtypes.EthBlock, error) + + EthGetTransactionByHash(ctx context.Context, txHash *ethtypes.EthHash) (*ethtypes.EthTx, error) + EthGetTransactionByHashLimited(ctx context.Context, txHash *ethtypes.EthHash, limit abi.ChainEpoch) (*ethtypes.EthTx, error) + EthGetTransactionByBlockHashAndIndex(ctx context.Context, blkHash ethtypes.EthHash, txIndex ethtypes.EthUint64) (*ethtypes.EthTx, error) + EthGetTransactionByBlockNumberAndIndex(ctx context.Context, blkNum string, txIndex ethtypes.EthUint64) (*ethtypes.EthTx, error) + + EthGetMessageCidByTransactionHash(ctx context.Context, txHash *ethtypes.EthHash) (*cid.Cid, error) + EthGetTransactionHashByCid(ctx context.Context, cid cid.Cid) (*ethtypes.EthHash, error) + EthGetTransactionCount(ctx context.Context, sender ethtypes.EthAddress, blkParam ethtypes.EthBlockNumberOrHash) (ethtypes.EthUint64, error) + + EthGetTransactionReceipt(ctx context.Context, txHash ethtypes.EthHash) (*ethtypes.EthTxReceipt, error) + EthGetTransactionReceiptLimited(ctx context.Context, txHash ethtypes.EthHash, limit abi.ChainEpoch) (*ethtypes.EthTxReceipt, error) + EthGetBlockReceipts(ctx context.Context, blkParam ethtypes.EthBlockNumberOrHash) ([]*ethtypes.EthTxReceipt, error) + EthGetBlockReceiptsLimited(ctx context.Context, blkParam ethtypes.EthBlockNumberOrHash, limit abi.ChainEpoch) ([]*ethtypes.EthTxReceipt, error) +} + +// EthLookup --------------------------------------------------------------------------------------- + +type EthLookupAPI interface { + EthGetCode(ctx context.Context, address ethtypes.EthAddress, blkParam ethtypes.EthBlockNumberOrHash) (ethtypes.EthBytes, error) + EthGetStorageAt(ctx context.Context, ethAddr ethtypes.EthAddress, position ethtypes.EthBytes, blkParam ethtypes.EthBlockNumberOrHash) (ethtypes.EthBytes, error) + EthGetBalance(ctx context.Context, address ethtypes.EthAddress, blkParam ethtypes.EthBlockNumberOrHash) (ethtypes.EthBigInt, error) +} + +// EthTrace ---------------------------------------------------------------------------------------- + +type EthTraceAPI interface { + EthTraceBlock(ctx context.Context, blkNum string) ([]*ethtypes.EthTraceBlock, error) + EthTraceReplayBlockTransactions(ctx context.Context, blkNum string, traceTypes []string) ([]*ethtypes.EthTraceReplayBlockTransaction, error) + EthTraceTransaction(ctx context.Context, txHash string) ([]*ethtypes.EthTraceTransaction, error) + EthTraceFilter(ctx context.Context, filter ethtypes.EthTraceFilterCriteria) ([]*ethtypes.EthTraceFilterResult, error) +} + +// EthGas ------------------------------------------------------------------------------------------ + +type EthGasAPI interface { + EthGasPrice(ctx context.Context) (ethtypes.EthBigInt, error) + EthFeeHistory(ctx context.Context, p jsonrpc.RawParams) (ethtypes.EthFeeHistory, error) + EthMaxPriorityFeePerGas(ctx context.Context) (ethtypes.EthBigInt, error) + EthEstimateGas(ctx context.Context, p jsonrpc.RawParams) (ethtypes.EthUint64, error) + EthCall(ctx context.Context, tx ethtypes.EthCall, blkParam ethtypes.EthBlockNumberOrHash) (ethtypes.EthBytes, error) +} + +// EthEvents --------------------------------------------------------------------------------------- + +const ( + EthSubscribeEventTypeHeads = "newHeads" + EthSubscribeEventTypeLogs = "logs" + EthSubscribeEventTypePendingTransactions = "newPendingTransactions" +) + +type EthEventsAPI interface { + EthGetLogs(ctx context.Context, filter *ethtypes.EthFilterSpec) (*ethtypes.EthFilterResult, error) + EthNewBlockFilter(ctx context.Context) (ethtypes.EthFilterID, error) + EthNewPendingTransactionFilter(ctx context.Context) (ethtypes.EthFilterID, error) + EthNewFilter(ctx context.Context, filter *ethtypes.EthFilterSpec) (ethtypes.EthFilterID, error) + EthUninstallFilter(ctx context.Context, id ethtypes.EthFilterID) (bool, error) + EthGetFilterChanges(ctx context.Context, id ethtypes.EthFilterID) (*ethtypes.EthFilterResult, error) + EthGetFilterLogs(ctx context.Context, id ethtypes.EthFilterID) (*ethtypes.EthFilterResult, error) + EthSubscribe(ctx context.Context, params jsonrpc.RawParams) (ethtypes.EthSubscriptionID, error) + EthUnsubscribe(ctx context.Context, id ethtypes.EthSubscriptionID) (bool, error) +} + +// EthEventsInternal extends the EthEvents interface with additional methods that are not exposed +// on the JSON-RPC API. +type EthEventsInternal interface { + EthEventsAPI + + // GetEthLogsForBlockAndTransaction returns the logs for a block and transaction, it is intended + // for internal use rather than being exposed via the JSON-RPC API. + GetEthLogsForBlockAndTransaction(ctx context.Context, blockHash *ethtypes.EthHash, txHash ethtypes.EthHash) ([]ethtypes.EthLog, error) + // GC runs a garbage collection loop, deleting filters that have not been used within the ttl + // window, it is intended for internal use rather than being exposed via the JSON-RPC API. + GC(ctx context.Context, ttl time.Duration) +} + +// Complete APIs ----------------------------------------------------------------------------------- + +type EthModuleAPI interface { + EthFilecoinAPI + EthBasicAPI + EthSendAPI + EthTransactionAPI + EthLookupAPI + EthTraceAPI + EthGasAPI + EthEventsAPI +} + +// Required Dependencies --------------------------------------------------------------------------- + +// TipSetResolver is responsible for translating Ethereum API input to tipsets. It may use static +// rules or F3 to resolve "latest" and "safe" tags as appropriate. +// +// In most cases, errors from TipSetResolver should be returned as-is if they are within the +// top-level of a JSONRPC method so ErrNullRound is properly wrapped when encountered. +type TipSetResolver interface { + GetTipSetByHash(ctx context.Context, blkParam ethtypes.EthHash) (*types.TipSet, error) + GetTipsetByBlockNumber(ctx context.Context, blkParam string, strict bool) (*types.TipSet, error) + GetTipsetByBlockNumberOrHash(ctx context.Context, blkParam ethtypes.EthBlockNumberOrHash) (*types.TipSet, error) +} + // SyncAPI is a minimal version of full.SyncAPI type SyncAPI interface { SyncState(ctx context.Context) (*api.SyncState, error) diff --git a/node/impl/eth/basic.go b/node/impl/eth/basic.go index e2adb099e48..9b431ec6130 100644 --- a/node/impl/eth/basic.go +++ b/node/impl/eth/basic.go @@ -12,16 +12,6 @@ import ( "github.com/filecoin-project/lotus/chain/types/ethtypes" ) -type EthBasicAPI interface { - Web3ClientVersion(ctx context.Context) (string, error) - EthChainId(ctx context.Context) (ethtypes.EthUint64, error) - NetVersion(ctx context.Context) (string, error) - NetListening(ctx context.Context) (bool, error) - EthProtocolVersion(ctx context.Context) (ethtypes.EthUint64, error) - EthSyncing(ctx context.Context) (ethtypes.EthSyncingResult, error) - EthAccounts(ctx context.Context) ([]ethtypes.EthAddress, error) -} - var ( _ EthBasicAPI = (*ethBasic)(nil) _ EthBasicAPI = (*EthBasicDisabled)(nil) @@ -111,7 +101,9 @@ func (EthBasicDisabled) Web3ClientVersion(ctx context.Context) (string, error) { func (EthBasicDisabled) EthChainId(ctx context.Context) (ethtypes.EthUint64, error) { return 0, ErrModuleDisabled } -func (EthBasicDisabled) NetVersion(ctx context.Context) (string, error) { return "", ErrModuleDisabled } +func (EthBasicDisabled) NetVersion(ctx context.Context) (string, error) { + return "", ErrModuleDisabled +} func (EthBasicDisabled) NetListening(ctx context.Context) (bool, error) { return false, ErrModuleDisabled } diff --git a/node/impl/eth/events.go b/node/impl/eth/events.go index cd2ea7bc549..6f035c866ad 100644 --- a/node/impl/eth/events.go +++ b/node/impl/eth/events.go @@ -22,37 +22,6 @@ import ( "github.com/filecoin-project/lotus/chain/types/ethtypes" ) -const ( - EthSubscribeEventTypeHeads = "newHeads" - EthSubscribeEventTypeLogs = "logs" - EthSubscribeEventTypePendingTransactions = "newPendingTransactions" -) - -type EthEventsAPI interface { - EthGetLogs(ctx context.Context, filter *ethtypes.EthFilterSpec) (*ethtypes.EthFilterResult, error) - EthNewBlockFilter(ctx context.Context) (ethtypes.EthFilterID, error) - EthNewPendingTransactionFilter(ctx context.Context) (ethtypes.EthFilterID, error) - EthNewFilter(ctx context.Context, filter *ethtypes.EthFilterSpec) (ethtypes.EthFilterID, error) - EthUninstallFilter(ctx context.Context, id ethtypes.EthFilterID) (bool, error) - EthGetFilterChanges(ctx context.Context, id ethtypes.EthFilterID) (*ethtypes.EthFilterResult, error) - EthGetFilterLogs(ctx context.Context, id ethtypes.EthFilterID) (*ethtypes.EthFilterResult, error) - EthSubscribe(ctx context.Context, params jsonrpc.RawParams) (ethtypes.EthSubscriptionID, error) - EthUnsubscribe(ctx context.Context, id ethtypes.EthSubscriptionID) (bool, error) -} - -// EthEventsInternal extends the EthEvents interface with additional methods that are not exposed -// on the JSON-RPC API. -type EthEventsInternal interface { - EthEventsAPI - - // GetEthLogsForBlockAndTransaction returns the logs for a block and transaction, it is intended - // for internal use rather than being exposed via the JSON-RPC API. - GetEthLogsForBlockAndTransaction(ctx context.Context, blockHash *ethtypes.EthHash, txHash ethtypes.EthHash) ([]ethtypes.EthLog, error) - // GC runs a garbage collection loop, deleting filters that have not been used within the ttl - // window, it is intended for internal use rather than being exposed via the JSON-RPC API. - GC(ctx context.Context, ttl time.Duration) -} - var ( _ EthEventsAPI = (*ethEvents)(nil) _ EthEventsInternal = (*ethEvents)(nil) @@ -609,6 +578,10 @@ func ethTxHashFromMessageCid(ctx context.Context, c cid.Cid, cs ChainStore) (eth // * "block" instead of "height" // * strings that can have "latest" and "earliest" and nil // * hex strings for actual heights +// +// Note: Ethereum supports more than "latest" and "earliest" (e.g. "finalized" and "safe"), but +// currently we do not. The use-case isn't as clear for this but it's possible to add in the future +// if needed. func parseBlockRange(heaviest abi.ChainEpoch, fromBlock, toBlock *string, maxRange abi.ChainEpoch) (minHeight abi.ChainEpoch, maxHeight abi.ChainEpoch, err error) { if fromBlock == nil || *fromBlock == "latest" || len(*fromBlock) == 0 { minHeight = heaviest diff --git a/node/impl/eth/filecoin.go b/node/impl/eth/filecoin.go index bb0708e83a0..af2bb7d5ca6 100644 --- a/node/impl/eth/filecoin.go +++ b/node/impl/eth/filecoin.go @@ -11,22 +11,18 @@ import ( "github.com/filecoin-project/lotus/chain/types/ethtypes" ) -type EthFilecoinAPI interface { - EthAddressToFilecoinAddress(ctx context.Context, ethAddress ethtypes.EthAddress) (address.Address, error) - FilecoinAddressToEthAddress(ctx context.Context, p jsonrpc.RawParams) (ethtypes.EthAddress, error) -} - var _ EthFilecoinAPI = (*ethFilecoin)(nil) type ethFilecoin struct { - chainStore ChainStore stateManager StateManager + + tipsetResolver TipSetResolver } -func NewEthFilecoinAPI(chainStore ChainStore, stateManager StateManager) EthFilecoinAPI { +func NewEthFilecoinAPI(stateManager StateManager, tipsetResolver TipSetResolver) EthFilecoinAPI { return ðFilecoin{ - chainStore: chainStore, - stateManager: stateManager, + stateManager: stateManager, + tipsetResolver: tipsetResolver, } } @@ -65,9 +61,9 @@ func (e *ethFilecoin) FilecoinAddressToEthAddress(ctx context.Context, p jsonrpc blkParam = *params.BlkParam } - ts, err := getTipsetByBlockNumber(ctx, e.chainStore, blkParam, false) + ts, err := e.tipsetResolver.GetTipsetByBlockNumber(ctx, blkParam, false) if err != nil { - return ethtypes.EthAddress{}, err + return ethtypes.EthAddress{}, err // don't wrap, to preserve ErrNullRound } // Lookup the ID address diff --git a/node/impl/eth/gas.go b/node/impl/eth/gas.go index 135edf7fa7b..67d0a0e9cee 100644 --- a/node/impl/eth/gas.go +++ b/node/impl/eth/gas.go @@ -27,14 +27,6 @@ import ( const maxEthFeeHistoryRewardPercentiles = 100 -type EthGasAPI interface { - EthGasPrice(ctx context.Context) (ethtypes.EthBigInt, error) - EthFeeHistory(ctx context.Context, p jsonrpc.RawParams) (ethtypes.EthFeeHistory, error) - EthMaxPriorityFeePerGas(ctx context.Context) (ethtypes.EthBigInt, error) - EthEstimateGas(ctx context.Context, p jsonrpc.RawParams) (ethtypes.EthUint64, error) - EthCall(ctx context.Context, tx ethtypes.EthCall, blkParam ethtypes.EthBlockNumberOrHash) (ethtypes.EthBytes, error) -} - var ( _ EthGasAPI = (*ethGas)(nil) _ EthGasAPI = (*EthGasDisabled)(nil) @@ -47,14 +39,23 @@ type ethGas struct { stateManager StateManager messagePool MessagePool gasApi GasAPI + + tipsetResolver TipSetResolver } -func NewEthGasAPI(chainStore ChainStore, stateManager StateManager, messagePool MessagePool, gasApi GasAPI) EthGasAPI { +func NewEthGasAPI( + chainStore ChainStore, + stateManager StateManager, + messagePool MessagePool, + gasApi GasAPI, + tipsetResolver TipSetResolver, +) EthGasAPI { return ðGas{ - chainStore: chainStore, - stateManager: stateManager, - messagePool: messagePool, - gasApi: gasApi, + chainStore: chainStore, + stateManager: stateManager, + messagePool: messagePool, + gasApi: gasApi, + tipsetResolver: tipsetResolver, } } @@ -98,9 +99,9 @@ func (e *ethGas) EthFeeHistory(ctx context.Context, p jsonrpc.RawParams) (ethtyp } } - ts, err := getTipsetByBlockNumber(ctx, e.chainStore, params.NewestBlkNum, false) + ts, err := e.tipsetResolver.GetTipsetByBlockNumber(ctx, params.NewestBlkNum, false) if err != nil { - return ethtypes.EthFeeHistory{}, err + return ethtypes.EthFeeHistory{}, err // don't wrap, to preserve ErrNullRound } var ( @@ -199,9 +200,9 @@ func (e *ethGas) EthEstimateGas(ctx context.Context, p jsonrpc.RawParams) (ethty if params.BlkParam == nil { ts = e.chainStore.GetHeaviestTipSet() } else { - ts, err = getTipsetByEthBlockNumberOrHash(ctx, e.chainStore, *params.BlkParam) + ts, err = e.tipsetResolver.GetTipsetByBlockNumberOrHash(ctx, *params.BlkParam) if err != nil { - return ethtypes.EthUint64(0), xerrors.Errorf("failed to process block param: %v; %w", params.BlkParam, err) + return ethtypes.EthUint64(0), err } } @@ -242,9 +243,9 @@ func (e *ethGas) EthCall(ctx context.Context, tx ethtypes.EthCall, blkParam etht return nil, xerrors.Errorf("failed to convert ethcall to filecoin message: %w", err) } - ts, err := getTipsetByEthBlockNumberOrHash(ctx, e.chainStore, blkParam) + ts, err := e.tipsetResolver.GetTipsetByBlockNumberOrHash(ctx, blkParam) if err != nil { - return nil, xerrors.Errorf("failed to process block param: %v; %w", blkParam, err) + return nil, err // don't wrap, to preserve ErrNullRound } invokeResult, err := e.applyMessage(ctx, msg, ts.Key()) diff --git a/node/impl/eth/lookup.go b/node/impl/eth/lookup.go index 94f2775bf0f..b2f387e75c8 100644 --- a/node/impl/eth/lookup.go +++ b/node/impl/eth/lookup.go @@ -23,12 +23,6 @@ import ( "github.com/filecoin-project/lotus/node/modules/dtypes" ) -type EthLookupAPI interface { - EthGetCode(ctx context.Context, address ethtypes.EthAddress, blkParam ethtypes.EthBlockNumberOrHash) (ethtypes.EthBytes, error) - EthGetStorageAt(ctx context.Context, ethAddr ethtypes.EthAddress, position ethtypes.EthBytes, blkParam ethtypes.EthBlockNumberOrHash) (ethtypes.EthBytes, error) - EthGetBalance(ctx context.Context, address ethtypes.EthAddress, blkParam ethtypes.EthBlockNumberOrHash) (ethtypes.EthBigInt, error) -} - var ( _ EthLookupAPI = (*ethLookup)(nil) _ EthLookupAPI = (*EthLookupDisabled)(nil) @@ -39,6 +33,8 @@ type ethLookup struct { stateManager StateManager syncApi SyncAPI stateBlockstore dtypes.StateBlockstore + + tipsetResolver TipSetResolver } func NewEthLookupAPI( @@ -46,12 +42,14 @@ func NewEthLookupAPI( stateManager StateManager, syncApi SyncAPI, stateBlockstore dtypes.StateBlockstore, + tipsetResolver TipSetResolver, ) EthLookupAPI { return ðLookup{ chainStore: chainStore, stateManager: stateManager, syncApi: syncApi, stateBlockstore: stateBlockstore, + tipsetResolver: tipsetResolver, } } @@ -62,9 +60,9 @@ func (e *ethLookup) EthGetCode(ctx context.Context, ethAddr ethtypes.EthAddress, return nil, xerrors.Errorf("cannot get Filecoin address: %w", err) } - ts, err := getTipsetByEthBlockNumberOrHash(ctx, e.chainStore, blkParam) + ts, err := e.tipsetResolver.GetTipsetByBlockNumberOrHash(ctx, blkParam) if err != nil { - return nil, xerrors.Errorf("failed to process block param: %v; %w", blkParam, err) + return nil, err // don't wrap, to preserve ErrNullRound } // StateManager.Call will panic if there is no parent @@ -141,9 +139,9 @@ func (e *ethLookup) EthGetCode(ctx context.Context, ethAddr ethtypes.EthAddress, } func (e *ethLookup) EthGetStorageAt(ctx context.Context, ethAddr ethtypes.EthAddress, position ethtypes.EthBytes, blkParam ethtypes.EthBlockNumberOrHash) (ethtypes.EthBytes, error) { - ts, err := getTipsetByEthBlockNumberOrHash(ctx, e.chainStore, blkParam) + ts, err := e.tipsetResolver.GetTipsetByBlockNumberOrHash(ctx, blkParam) if err != nil { - return nil, xerrors.Errorf("failed to process block param: %v; %w", blkParam, err) + return nil, err // don't wrap, to preserve ErrNullRound } pl := len(position) @@ -237,9 +235,9 @@ func (e *ethLookup) EthGetBalance(ctx context.Context, address ethtypes.EthAddre return ethtypes.EthBigInt{}, err } - ts, err := getTipsetByEthBlockNumberOrHash(ctx, e.chainStore, blkParam) + ts, err := e.tipsetResolver.GetTipsetByBlockNumberOrHash(ctx, blkParam) if err != nil { - return ethtypes.EthBigInt{}, xerrors.Errorf("failed to process block param: %v; %w", blkParam, err) + return ethtypes.EthBigInt{}, err // don't wrap, to preserve ErrNullRound } st, _, err := e.stateManager.TipSetState(ctx, ts) diff --git a/node/impl/eth/send.go b/node/impl/eth/send.go index 6df1d151280..8fd0b9aa524 100644 --- a/node/impl/eth/send.go +++ b/node/impl/eth/send.go @@ -7,11 +7,6 @@ import ( "github.com/filecoin-project/lotus/chain/types/ethtypes" ) -type EthSendAPI interface { - EthSendRawTransaction(ctx context.Context, rawTx ethtypes.EthBytes) (ethtypes.EthHash, error) - EthSendRawTransactionUntrusted(ctx context.Context, rawTx ethtypes.EthBytes) (ethtypes.EthHash, error) -} - var ( _ EthSendAPI = (*ethSend)(nil) _ EthSendAPI = (*EthSendDisabled)(nil) diff --git a/node/impl/eth/tipsetresolver.go b/node/impl/eth/tipsetresolver.go new file mode 100644 index 00000000000..5dade0aaf2e --- /dev/null +++ b/node/impl/eth/tipsetresolver.go @@ -0,0 +1,232 @@ +package eth + +import ( + "context" + "errors" + + "golang.org/x/xerrors" + + "github.com/filecoin-project/go-f3" + "github.com/filecoin-project/go-f3/certs" + "github.com/filecoin-project/go-state-types/abi" + + "github.com/filecoin-project/lotus/api" + "github.com/filecoin-project/lotus/build/buildconstants" + "github.com/filecoin-project/lotus/chain/actors/policy" + "github.com/filecoin-project/lotus/chain/lf3" + "github.com/filecoin-project/lotus/chain/types" + "github.com/filecoin-project/lotus/chain/types/ethtypes" +) + +var _ TipSetResolver = (*tipSetResolver)(nil) + +type tipSetResolver struct { + cs ChainStore + f3 lf3.F3Backend // can be nil if disabled + useF3ForFinality bool // if true, attempt to use F3 to determine "finalized" tipset +} + +func NewTipSetResolver(cs ChainStore, f3 lf3.F3Backend, useF3ForFinality bool) TipSetResolver { + return &tipSetResolver{cs: cs, f3: f3, useF3ForFinality: useF3ForFinality} +} + +func (tsr *tipSetResolver) getLatestF3Cert(ctx context.Context) (*certs.FinalityCertificate, error) { + if tsr.f3 == nil { + return nil, nil + } + cert, err := tsr.f3.GetLatestCert(ctx) + if err != nil { + if errors.Is(err, f3.ErrF3NotRunning) || errors.Is(err, api.ErrF3NotReady) { + // Only fall back to EC finality if F3 isn't running or not ready. + log.Debugw("F3 not running or not ready, falling back to EC finality", "err", err) + return nil, nil + } + return nil, err + } + return cert, nil +} + +func (tsr *tipSetResolver) getFinalizedF3TipSetFromCert(ctx context.Context, cert *certs.FinalityCertificate) (*types.TipSet, error) { + // Extract the finalized tipeset from the certificate. + tsk, err := types.TipSetKeyFromBytes(cert.ECChain.Head().Key) + if err != nil { + return nil, xerrors.Errorf("decoding latest f3 cert tipset key: %w", err) + } + ts, err := tsr.cs.LoadTipSet(ctx, tsk) + if err != nil { + return nil, xerrors.Errorf("loading latest f3 cert tipset: %s: %w", tsk, err) + } + return ts, nil +} + +func (tsr *tipSetResolver) getSafeF3TipSet(ctx context.Context) (*types.TipSet, error) { + // To determine the safe tipset, we check the finalized F3 tipset and compare that to the tipset + // we consider safe from EC and return the higher of the two. + var f3Ts *types.TipSet + cert, err := tsr.getLatestF3Cert(ctx) + if err != nil { + return nil, err + } else if cert != nil { + f3Ts, err = tsr.getFinalizedF3TipSetFromCert(ctx, cert) + if err != nil { + return nil, err + } + } // else F3 is disabled or not ready + ecTs, err := tsr.getSafeECTipSet(ctx) + if err != nil { + return nil, err + } + if f3Ts == nil || f3Ts.Height() < ecTs.Height() { + return ecTs, nil + } + // F3 is finalizing a higher height than EC safe; return F3 tipset + return f3Ts, nil +} + +func (tsr *tipSetResolver) getFinalizedF3TipSet(ctx context.Context) (*types.TipSet, error) { + cert, err := tsr.getLatestF3Cert(ctx) + if err != nil { + return nil, err + } else if cert == nil { + // F3 is disabled or not ready; fall back to EC finality. + return tsr.getFinalizedECTipSet(ctx) + } + return tsr.getFinalizedF3TipSetFromCert(ctx, cert) +} + +func (tsr *tipSetResolver) getSafeECTipSet(ctx context.Context) (*types.TipSet, error) { + head := tsr.cs.GetHeaviestTipSet() + height := head.Height() + + // Default safe distance (used for v2 APIs, or v1 APIs when F3 is finalizing) + safeDistance := buildconstants.SafeHeightDistance + + // For v1 APIs we are still using ethtypes.SafeEpochDelay. This can be removed in the future when + // F3 is always finalizing if we want v1 "safe" to take advantage of F3. + if !tsr.useF3ForFinality { + safeDistance = ethtypes.SafeEpochDelay + } + + safeHeight := max(0, height-safeDistance) + return tsr.cs.GetTipsetByHeight(ctx, safeHeight, head, true) +} + +func (tsr *tipSetResolver) getFinalizedECTipSet(ctx context.Context) (*types.TipSet, error) { + head := tsr.cs.GetHeaviestTipSet() + height := max(0, head.Height()-policy.ChainFinality) + return tsr.cs.GetTipsetByHeight(ctx, height, head, true) +} + +func (tsr *tipSetResolver) getTipSetByTag(ctx context.Context, tag string) (*types.TipSet, error) { + head := tsr.cs.GetHeaviestTipSet() + switch tag { + case ethtypes.BlockTagEarliest: + return nil, xerrors.Errorf(`block param "%s" is not supported`, ethtypes.BlockTagEarliest) + case ethtypes.BlockTagPending: + return head, nil + case ethtypes.BlockTagLatest: + parent, err := tsr.cs.GetTipSetFromKey(ctx, head.Parents()) + if err != nil { + return nil, xerrors.New("failed to get parent tipset") + } + return parent, nil + case ethtypes.BlockTagSafe: + if tsr.f3 != nil && tsr.useF3ForFinality { + return tsr.getSafeF3TipSet(ctx) + } + return tsr.getSafeECTipSet(ctx) + case ethtypes.BlockTagFinalized: + if tsr.f3 != nil && tsr.useF3ForFinality { + return tsr.getFinalizedF3TipSet(ctx) + } + return tsr.getFinalizedECTipSet(ctx) + default: + return nil, xerrors.Errorf("unknown block tag: %s", tag) + } +} + +func (tsr *tipSetResolver) GetTipsetByBlockNumber(ctx context.Context, blkParam string, strict bool) (*types.TipSet, error) { + switch blkParam { + case ethtypes.BlockTagEarliest, ethtypes.BlockTagPending, ethtypes.BlockTagLatest, ethtypes.BlockTagFinalized, ethtypes.BlockTagSafe: + return tsr.getTipSetByTag(ctx, blkParam) + } + + num, err := ethtypes.EthUint64FromString(blkParam) + if err != nil { + return nil, xerrors.Errorf("failed to parse block number: %v", err) + } + head := tsr.cs.GetHeaviestTipSet() + if abi.ChainEpoch(num) > head.Height()-1 { + return nil, xerrors.New("requested a future epoch (beyond 'latest')") + } + ts, err := tsr.cs.GetTipsetByHeight(ctx, abi.ChainEpoch(num), head, true) + if err != nil { + return nil, xerrors.Errorf("failed to get tipset at height: %v", num) + } + if strict && ts.Height() != abi.ChainEpoch(num) { + return nil, api.NewErrNullRound(abi.ChainEpoch(num)) + } + return ts, nil +} + +func (tsr *tipSetResolver) GetTipsetByBlockNumberOrHash(ctx context.Context, blkParam ethtypes.EthBlockNumberOrHash) (*types.TipSet, error) { + head := tsr.cs.GetHeaviestTipSet() + + predefined := blkParam.PredefinedBlock + if predefined != nil { + return tsr.getTipSetByTag(ctx, *predefined) + } + + if blkParam.BlockNumber != nil { + height := abi.ChainEpoch(*blkParam.BlockNumber) + if height > head.Height()-1 { + return nil, xerrors.New("requested a future epoch (beyond 'latest')") + } + ts, err := tsr.cs.GetTipsetByHeight(ctx, height, head, true) + if err != nil { + return nil, xerrors.Errorf("failed to get tipset at height: %v", height) + } + return ts, nil + } + + if blkParam.BlockHash != nil { + ts, err := tsr.cs.GetTipSetByCid(ctx, blkParam.BlockHash.ToCid()) + if err != nil { + return nil, xerrors.Errorf("failed to get tipset by hash: %v", err) + } + + // verify that the tipset is in the canonical chain + if blkParam.RequireCanonical { + // walk up the current chain (our head) until we reach ts.Height() + walkTs, err := tsr.cs.GetTipsetByHeight(ctx, ts.Height(), head, true) + if err != nil { + return nil, xerrors.Errorf("failed to get tipset at height: %v", ts.Height()) + } + + // verify that it equals the expected tipset + if !walkTs.Equals(ts) { + return nil, xerrors.New("tipset is not canonical") + } + } + + return ts, nil + } + + return nil, xerrors.New("invalid block param") +} + +func (tsr *tipSetResolver) GetTipSetByHash(ctx context.Context, blkParam ethtypes.EthHash) (*types.TipSet, error) { + ts, err := tsr.cs.GetTipSetByCid(ctx, blkParam.ToCid()) + if err != nil { + // TODO: https://github.com/filecoin-project/lotus/issues/13043 + // if ipld.IsNotFound(err) { + // return nil, nil + // } + return nil, xerrors.Errorf("failed to get tipset by hash: %v", err) + } + // TODO: remove this + if ts == nil { + return nil, xerrors.Errorf("failed to find tipset for block hash: %s", blkParam) + } + return ts, nil +} diff --git a/node/impl/eth/trace.go b/node/impl/eth/trace.go index 2c43fe41b89..64954a08829 100644 --- a/node/impl/eth/trace.go +++ b/node/impl/eth/trace.go @@ -1,14 +1,11 @@ package eth import ( - "bytes" "context" "errors" "fmt" "strconv" - "github.com/multiformats/go-multicodec" - cbg "github.com/whyrusleeping/cbor-gen" "golang.org/x/xerrors" "github.com/filecoin-project/go-address" @@ -27,22 +24,18 @@ import ( "github.com/filecoin-project/lotus/chain/types/ethtypes" ) -type EthTraceAPI interface { - EthTraceBlock(ctx context.Context, blkNum string) ([]*ethtypes.EthTraceBlock, error) - EthTraceReplayBlockTransactions(ctx context.Context, blkNum string, traceTypes []string) ([]*ethtypes.EthTraceReplayBlockTransaction, error) - EthTraceTransaction(ctx context.Context, txHash string) ([]*ethtypes.EthTraceTransaction, error) - EthTraceFilter(ctx context.Context, filter ethtypes.EthTraceFilterCriteria) ([]*ethtypes.EthTraceFilterResult, error) -} - var ( _ EthTraceAPI = (*ethTrace)(nil) _ EthTraceAPI = (*EthTraceDisabled)(nil) ) type ethTrace struct { - chainStore ChainStore - stateManager StateManager - ethTransactionApi EthTransactionAPI + chainStore ChainStore + stateManager StateManager + + ethTransactionApi EthTransactionAPI + tipsetResolver TipSetResolver + traceFilterMaxResults uint64 } @@ -50,20 +43,22 @@ func NewEthTraceAPI( chainStore ChainStore, stateManager StateManager, ethTransactionApi EthTransactionAPI, + tipsetResolver TipSetResolver, ethTraceFilterMaxResults uint64, ) EthTraceAPI { return ðTrace{ chainStore: chainStore, stateManager: stateManager, ethTransactionApi: ethTransactionApi, + tipsetResolver: tipsetResolver, traceFilterMaxResults: ethTraceFilterMaxResults, } } func (e *ethTrace) EthTraceBlock(ctx context.Context, blkNum string) ([]*ethtypes.EthTraceBlock, error) { - ts, err := getTipsetByBlockNumber(ctx, e.chainStore, blkNum, true) + ts, err := e.tipsetResolver.GetTipsetByBlockNumber(ctx, blkNum, true) if err != nil { - return nil, err + return nil, err // don't wrap, to preserve ErrNullRound } stRoot, trace, err := e.stateManager.ExecutionTrace(ctx, ts) @@ -132,9 +127,9 @@ func (e *ethTrace) EthTraceReplayBlockTransactions(ctx context.Context, blkNum s if len(traceTypes) != 1 || traceTypes[0] != "trace" { return nil, xerrors.New("only 'trace' is supported") } - ts, err := getTipsetByBlockNumber(ctx, e.chainStore, blkNum, true) + ts, err := e.tipsetResolver.GetTipsetByBlockNumber(ctx, blkNum, true) if err != nil { - return nil, err + return nil, err // don't wrap, to preserve ErrNullRound } stRoot, trace, err := e.stateManager.ExecutionTrace(ctx, ts) @@ -402,69 +397,6 @@ func matchFilterCriteria(trace *ethtypes.EthTraceBlock, fromDecodedAddresses []e return true, nil } -// decodePayload is a utility function which decodes the payload using the given codec -func decodePayload(payload []byte, codec uint64) (ethtypes.EthBytes, error) { - switch multicodec.Code(codec) { - case multicodec.Identity: - return nil, nil - case multicodec.DagCbor, multicodec.Cbor: - buf, err := cbg.ReadByteArray(bytes.NewReader(payload), uint64(len(payload))) - if err != nil { - return nil, xerrors.Errorf("decodePayload: failed to decode cbor payload: %w", err) - } - return buf, nil - case multicodec.Raw: - return ethtypes.EthBytes(payload), nil - } - - return nil, xerrors.Errorf("decodePayload: unsupported codec: %d", codec) -} - -func decodeParams[P any, T interface { - *P - cbg.CBORUnmarshaler -}](msg *types.MessageTrace) (T, error) { - var params T = new(P) - switch msg.ParamsCodec { - case uint64(multicodec.DagCbor), uint64(multicodec.Cbor): - default: - return nil, xerrors.Errorf("Method called with unexpected codec %d", msg.ParamsCodec) - } - - if err := params.UnmarshalCBOR(bytes.NewReader(msg.Params)); err != nil { - return nil, xerrors.Errorf("failed to decode params: %w", err) - } - - return params, nil -} - -func decodeReturn[R any, T interface { - *R - cbg.CBORUnmarshaler -}](ret *types.ReturnTrace) (T, error) { - var retval T = new(R) - switch ret.ReturnCodec { - case uint64(multicodec.DagCbor), uint64(multicodec.Cbor): - default: - return nil, xerrors.Errorf("Method returned an unexpected codec %d", ret.ReturnCodec) - } - - if err := retval.UnmarshalCBOR(bytes.NewReader(ret.Return)); err != nil { - return nil, xerrors.Errorf("failed to decode return value: %w", err) - } - - return retval, nil -} - -func find[T any](values []T, cb func(t *T) *T) *T { - for i := range values { - if o := cb(&values[i]); o != nil { - return o - } - } - return nil -} - type environment struct { caller ethtypes.EthAddress isEVM bool diff --git a/node/impl/eth/transaction.go b/node/impl/eth/transaction.go index 3916bfef013..15b7bf52bb8 100644 --- a/node/impl/eth/transaction.go +++ b/node/impl/eth/transaction.go @@ -20,29 +20,6 @@ import ( "github.com/filecoin-project/lotus/chain/types/ethtypes" ) -type EthTransactionAPI interface { - EthBlockNumber(ctx context.Context) (ethtypes.EthUint64, error) - - EthGetBlockTransactionCountByNumber(ctx context.Context, blkNum ethtypes.EthUint64) (ethtypes.EthUint64, error) - EthGetBlockTransactionCountByHash(ctx context.Context, blkHash ethtypes.EthHash) (ethtypes.EthUint64, error) - EthGetBlockByHash(ctx context.Context, blkHash ethtypes.EthHash, fullTxInfo bool) (ethtypes.EthBlock, error) - EthGetBlockByNumber(ctx context.Context, blkNum string, fullTxInfo bool) (ethtypes.EthBlock, error) - - EthGetTransactionByHash(ctx context.Context, txHash *ethtypes.EthHash) (*ethtypes.EthTx, error) - EthGetTransactionByHashLimited(ctx context.Context, txHash *ethtypes.EthHash, limit abi.ChainEpoch) (*ethtypes.EthTx, error) - EthGetTransactionByBlockHashAndIndex(ctx context.Context, blkHash ethtypes.EthHash, txIndex ethtypes.EthUint64) (*ethtypes.EthTx, error) - EthGetTransactionByBlockNumberAndIndex(ctx context.Context, blkNum string, txIndex ethtypes.EthUint64) (*ethtypes.EthTx, error) - - EthGetMessageCidByTransactionHash(ctx context.Context, txHash *ethtypes.EthHash) (*cid.Cid, error) - EthGetTransactionHashByCid(ctx context.Context, cid cid.Cid) (*ethtypes.EthHash, error) - EthGetTransactionCount(ctx context.Context, sender ethtypes.EthAddress, blkParam ethtypes.EthBlockNumberOrHash) (ethtypes.EthUint64, error) - - EthGetTransactionReceipt(ctx context.Context, txHash ethtypes.EthHash) (*api.EthTxReceipt, error) - EthGetTransactionReceiptLimited(ctx context.Context, txHash ethtypes.EthHash, limit abi.ChainEpoch) (*api.EthTxReceipt, error) - EthGetBlockReceipts(ctx context.Context, blkParam ethtypes.EthBlockNumberOrHash) ([]*api.EthTxReceipt, error) - EthGetBlockReceiptsLimited(ctx context.Context, blkParam ethtypes.EthBlockNumberOrHash, limit abi.ChainEpoch) ([]*api.EthTxReceipt, error) -} - var ( _ EthTransactionAPI = (*ethTransaction)(nil) _ EthTransactionAPI = (*EthTransactionDisabled)(nil) @@ -55,7 +32,8 @@ type ethTransaction struct { mpoolApi MpoolAPI chainIndexer index.Indexer - ethEvents EthEventsInternal + ethEvents EthEventsInternal + tipsetResolver TipSetResolver blockCache *arc.ARCCache[cid.Cid, *ethtypes.EthBlock] // caches blocks by their CID but blocks only have the transaction hashes blockTransactionCache *arc.ARCCache[cid.Cid, *ethtypes.EthBlock] // caches blocks along with full transaction payload by their CID @@ -68,6 +46,7 @@ func NewEthTransactionAPI( mpoolApi MpoolAPI, chainIndexer index.Indexer, ethEvents EthEventsInternal, + tipsetResolver TipSetResolver, blockCacheSize int, ) (EthTransactionAPI, error) { t := ðTransaction{ @@ -77,6 +56,7 @@ func NewEthTransactionAPI( mpoolApi: mpoolApi, chainIndexer: chainIndexer, ethEvents: ethEvents, + tipsetResolver: tipsetResolver, blockCache: nil, blockTransactionCache: nil, } @@ -114,101 +94,44 @@ func (e *ethTransaction) EthBlockNumber(ctx context.Context) (ethtypes.EthUint64 return ethtypes.EthUint64(parent.Height()), nil } -func (e *ethTransaction) EthGetBlockTransactionCountByNumber(ctx context.Context, blkNum ethtypes.EthUint64) (ethtypes.EthUint64, error) { - ts, err := e.chainStore.GetTipsetByHeight(ctx, abi.ChainEpoch(blkNum), nil, false) +func (e *ethTransaction) EthGetBlockTransactionCountByNumber(ctx context.Context, blkParam string) (ethtypes.EthUint64, error) { + ts, err := e.tipsetResolver.GetTipsetByBlockNumber(ctx, blkParam, true) if err != nil { - return ethtypes.EthUint64(0), xerrors.Errorf("error loading tipset %s: %w", ts, err) + return ethtypes.EthUint64(0), err // don't wrap, to preserve ErrNullRound } - count, err := e.countTipsetMsgs(ctx, ts) return ethtypes.EthUint64(count), err } func (e *ethTransaction) EthGetBlockTransactionCountByHash(ctx context.Context, blkHash ethtypes.EthHash) (ethtypes.EthUint64, error) { - ts, err := e.chainStore.GetTipSetByCid(ctx, blkHash.ToCid()) + ts, err := e.tipsetResolver.GetTipSetByHash(ctx, blkHash) if err != nil { - return ethtypes.EthUint64(0), xerrors.Errorf("error loading tipset %s: %w", ts, err) + return ethtypes.EthUint64(0), err // don't wrap, to preserve ErrNullRound } count, err := e.countTipsetMsgs(ctx, ts) return ethtypes.EthUint64(count), err } func (e *ethTransaction) EthGetBlockByHash(ctx context.Context, blkHash ethtypes.EthHash, fullTxInfo bool) (ethtypes.EthBlock, error) { - ts, err := e.chainStore.GetTipSetByCid(ctx, blkHash.ToCid()) + ts, err := e.tipsetResolver.GetTipSetByHash(ctx, blkHash) if err != nil { - return ethtypes.EthBlock{}, xerrors.Errorf("failed to get tipset by cid: %w", err) + return ethtypes.EthBlock{}, err // don't wrap, to preserve ErrNullRound } return e.getBlockByTipset(ctx, ts, fullTxInfo, "EthGetBlockByHash:"+blkHash.String()) } func (e *ethTransaction) EthGetBlockByNumber(ctx context.Context, blkParam string, fullTxInfo bool) (ethtypes.EthBlock, error) { - ts, err := getTipsetByBlockNumber(ctx, e.chainStore, blkParam, true) + ts, err := e.tipsetResolver.GetTipsetByBlockNumber(ctx, blkParam, true) if err != nil { - return ethtypes.EthBlock{}, err + return ethtypes.EthBlock{}, err // don't wrap, to preserve ErrNullRound } return e.getBlockByTipset(ctx, ts, fullTxInfo, "EthGetBlockByNumber:"+blkParam) } -func (e *ethTransaction) getBlockByTipset(ctx context.Context, ts *types.TipSet, fullTxInfo bool, req string) (ethtypes.EthBlock, error) { - cache := e.blockCache - if fullTxInfo { - cache = e.blockTransactionCache - } - - // Attempt to retrieve the Ethereum block from cache - cid, err := ts.Key().Cid() - if err != nil { - return ethtypes.EthBlock{}, xerrors.Errorf("failed to get tipset key cid: %w", err) - } - if cache != nil { - if ethBlock, found := cache.Get(cid); found { - if ethBlock != nil { - return *ethBlock, nil - } - // Log and remove the nil entry from cache - log.Errorw("nil value in eth block cache", "cid", cid, "requested as", req) - cache.Remove(cid) - } - } - - // Generate an Ethereum block from the Filecoin tipset - blk, err := newEthBlockFromFilecoinTipSet(ctx, ts, fullTxInfo, e.chainStore, e.stateManager) - if err != nil { - return ethtypes.EthBlock{}, xerrors.Errorf("failed to create Ethereum block from Filecoin tipset: %w", err) - } - - // Add the newly created block to the cache and return - if cache != nil { - cache.Add(cid, &blk) - } - return blk, nil -} - func (e *ethTransaction) EthGetTransactionByHash(ctx context.Context, txHash *ethtypes.EthHash) (*ethtypes.EthTx, error) { return e.EthGetTransactionByHashLimited(ctx, txHash, api.LookbackNoLimit) } -func (e *ethTransaction) getCidForTransaction(ctx context.Context, txHash *ethtypes.EthHash) (cid.Cid, error) { - if e.chainIndexer == nil { - return cid.Undef, ErrChainIndexerDisabled - } - - c, err := e.chainIndexer.GetCidFromHash(ctx, *txHash) - if err != nil { - if errors.Is(err, index.ErrNotFound) { - log.Debug("could not find transaction hash %s in chain indexer", txHash.String()) - } else { - log.Errorf("failed to lookup transaction hash %s in chain indexer: %s", txHash.String(), err) - return cid.Undef, xerrors.Errorf("failed to lookup transaction hash %s in chain indexer: %w", txHash.String(), err) - } - } - if c == cid.Undef { - // This isn't an eth transaction we have the mapping for, so let's look it up as a filecoin message - return txHash.ToCid(), nil - } - return c, nil -} - func (e *ethTransaction) EthGetTransactionByHashLimited(ctx context.Context, txHash *ethtypes.EthHash, limit abi.ChainEpoch) (*ethtypes.EthTx, error) { // Ethereum's behavior is to return null when the txHash is invalid, so we use nil to check if txHash is valid if txHash == nil { @@ -264,30 +187,19 @@ func (e *ethTransaction) EthGetTransactionByHashLimited(ctx context.Context, txH } func (e *ethTransaction) EthGetTransactionByBlockHashAndIndex(ctx context.Context, blkHash ethtypes.EthHash, index ethtypes.EthUint64) (*ethtypes.EthTx, error) { - ts, err := e.chainStore.GetTipSetByCid(ctx, blkHash.ToCid()) + ts, err := e.tipsetResolver.GetTipSetByHash(ctx, blkHash) if err != nil { - return nil, xerrors.Errorf("failed to get tipset by cid: %w", err) + return nil, err // don't wrap, to preserve ErrNullRound } - return e.getTransactionByTipsetAndIndex(ctx, ts, index) } func (e *ethTransaction) EthGetTransactionByBlockNumberAndIndex(ctx context.Context, blkParam string, index ethtypes.EthUint64) (*ethtypes.EthTx, error) { - ts, err := getTipsetByBlockNumber(ctx, e.chainStore, blkParam, true) + ts, err := e.tipsetResolver.GetTipsetByBlockNumber(ctx, blkParam, true) if err != nil { - return nil, err - } - - if ts == nil { - return nil, xerrors.Errorf("tipset not found for block %s", blkParam) - } - - tx, err := e.getTransactionByTipsetAndIndex(ctx, ts, index) - if err != nil { - return nil, xerrors.Errorf("failed to get transaction at index %d: %w", index, err) + return nil, err // don't wrap, to preserve ErrNullRound } - - return tx, nil + return e.getTransactionByTipsetAndIndex(ctx, ts, index) } func (e *ethTransaction) EthGetMessageCidByTransactionHash(ctx context.Context, txHash *ethtypes.EthHash) (*cid.Cid, error) { @@ -344,9 +256,9 @@ func (e *ethTransaction) EthGetTransactionCount(ctx context.Context, sender etht } // For all other cases, get the tipset based on the block parameter - ts, err := getTipsetByEthBlockNumberOrHash(ctx, e.chainStore, blkParam) + ts, err := e.tipsetResolver.GetTipsetByBlockNumberOrHash(ctx, blkParam) if err != nil { - return ethtypes.EthUint64(0), xerrors.Errorf("failed to process block param: %v; %w", blkParam, err) + return ethtypes.EthUint64(0), err // don't wrap, to preserve ErrNullRound } // Get the actor state at the specified tipset @@ -377,11 +289,11 @@ func (e *ethTransaction) EthGetTransactionCount(ctx context.Context, sender etht return ethtypes.EthUint64(actor.Nonce), nil } -func (e *ethTransaction) EthGetTransactionReceipt(ctx context.Context, txHash ethtypes.EthHash) (*api.EthTxReceipt, error) { +func (e *ethTransaction) EthGetTransactionReceipt(ctx context.Context, txHash ethtypes.EthHash) (*ethtypes.EthTxReceipt, error) { return e.EthGetTransactionReceiptLimited(ctx, txHash, api.LookbackNoLimit) } -func (e *ethTransaction) EthGetTransactionReceiptLimited(ctx context.Context, txHash ethtypes.EthHash, limit abi.ChainEpoch) (*api.EthTxReceipt, error) { +func (e *ethTransaction) EthGetTransactionReceiptLimited(ctx context.Context, txHash ethtypes.EthHash, limit abi.ChainEpoch) (*ethtypes.EthTxReceipt, error) { c, err := e.getCidForTransaction(ctx, &txHash) if err != nil { return nil, err @@ -428,14 +340,14 @@ func (e *ethTransaction) EthGetTransactionReceiptLimited(ctx context.Context, tx return &receipt, nil } -func (e *ethTransaction) EthGetBlockReceipts(ctx context.Context, blockParam ethtypes.EthBlockNumberOrHash) ([]*api.EthTxReceipt, error) { +func (e *ethTransaction) EthGetBlockReceipts(ctx context.Context, blockParam ethtypes.EthBlockNumberOrHash) ([]*ethtypes.EthTxReceipt, error) { return e.EthGetBlockReceiptsLimited(ctx, blockParam, api.LookbackNoLimit) } -func (e *ethTransaction) EthGetBlockReceiptsLimited(ctx context.Context, blockParam ethtypes.EthBlockNumberOrHash, limit abi.ChainEpoch) ([]*api.EthTxReceipt, error) { - ts, err := getTipsetByEthBlockNumberOrHash(ctx, e.chainStore, blockParam) +func (e *ethTransaction) EthGetBlockReceiptsLimited(ctx context.Context, blockParam ethtypes.EthBlockNumberOrHash, limit abi.ChainEpoch) ([]*ethtypes.EthTxReceipt, error) { + ts, err := e.tipsetResolver.GetTipsetByBlockNumberOrHash(ctx, blockParam) if err != nil { - return nil, xerrors.Errorf("failed to get tipset: %w", err) + return nil, err // don't wrap, to preserve ErrNullRound } if limit > api.LookbackNoLimit && ts.Height() < e.chainStore.GetHeaviestTipSet().Height()-limit { @@ -466,7 +378,7 @@ func (e *ethTransaction) EthGetBlockReceiptsLimited(ctx context.Context, blockPa baseFee := ts.Blocks()[0].ParentBaseFee - ethReceipts := make([]*api.EthTxReceipt, 0, len(msgs)) + ethReceipts := make([]*ethtypes.EthTxReceipt, 0, len(msgs)) for i, msg := range msgs { msg := msg @@ -489,6 +401,27 @@ func (e *ethTransaction) EthGetBlockReceiptsLimited(ctx context.Context, blockPa return ethReceipts, nil } +func (e *ethTransaction) getCidForTransaction(ctx context.Context, txHash *ethtypes.EthHash) (cid.Cid, error) { + if e.chainIndexer == nil { + return cid.Undef, ErrChainIndexerDisabled + } + + c, err := e.chainIndexer.GetCidFromHash(ctx, *txHash) + if err != nil { + if errors.Is(err, index.ErrNotFound) { + log.Debug("could not find transaction hash %s in chain indexer", txHash.String()) + } else { + log.Errorf("failed to lookup transaction hash %s in chain indexer: %s", txHash.String(), err) + return cid.Undef, xerrors.Errorf("failed to lookup transaction hash %s in chain indexer: %w", txHash.String(), err) + } + } + if c == cid.Undef { + // This isn't an eth transaction we have the mapping for, so let's look it up as a filecoin message + return txHash.ToCid(), nil + } + return c, nil +} + func (e *ethTransaction) getTransactionByTipsetAndIndex(ctx context.Context, ts *types.TipSet, index ethtypes.EthUint64) (*ethtypes.EthTx, error) { msgs, err := e.chainStore.MessagesForTipset(ctx, ts) if err != nil { @@ -520,6 +453,41 @@ func (e *ethTransaction) getTransactionByTipsetAndIndex(ctx context.Context, ts return &tx, nil } +func (e *ethTransaction) getBlockByTipset(ctx context.Context, ts *types.TipSet, fullTxInfo bool, req string) (ethtypes.EthBlock, error) { + cache := e.blockCache + if fullTxInfo { + cache = e.blockTransactionCache + } + + // Attempt to retrieve the Ethereum block from cache + cid, err := ts.Key().Cid() + if err != nil { + return ethtypes.EthBlock{}, xerrors.Errorf("failed to get tipset key cid: %w", err) + } + if cache != nil { + if ethBlock, found := cache.Get(cid); found { + if ethBlock != nil { + return *ethBlock, nil + } + // Log and remove the nil entry from cache + log.Errorw("nil value in eth block cache", "cid", cid, "requested as", req) + cache.Remove(cid) + } + } + + // Generate an Ethereum block from the Filecoin tipset + blk, err := newEthBlockFromFilecoinTipSet(ctx, ts, fullTxInfo, e.chainStore, e.stateManager) + if err != nil { + return ethtypes.EthBlock{}, xerrors.Errorf("failed to create Ethereum block from Filecoin tipset: %w", err) + } + + // Add the newly created block to the cache and return + if cache != nil { + cache.Add(cid, &blk) + } + return blk, nil +} + func (e *ethTransaction) countTipsetMsgs(ctx context.Context, ts *types.TipSet) (int, error) { blkMsgs, err := e.chainStore.BlockMsgsForTipset(ctx, ts) if err != nil { @@ -539,7 +507,7 @@ type EthTransactionDisabled struct{} func (EthTransactionDisabled) EthBlockNumber(ctx context.Context) (ethtypes.EthUint64, error) { return 0, ErrModuleDisabled } -func (EthTransactionDisabled) EthGetBlockTransactionCountByNumber(ctx context.Context, blkNum ethtypes.EthUint64) (ethtypes.EthUint64, error) { +func (EthTransactionDisabled) EthGetBlockTransactionCountByNumber(ctx context.Context, blkNum string) (ethtypes.EthUint64, error) { return 0, ErrModuleDisabled } func (EthTransactionDisabled) EthGetBlockTransactionCountByHash(ctx context.Context, blkHash ethtypes.EthHash) (ethtypes.EthUint64, error) { @@ -572,15 +540,15 @@ func (EthTransactionDisabled) EthGetTransactionHashByCid(ctx context.Context, ci func (EthTransactionDisabled) EthGetTransactionCount(ctx context.Context, sender ethtypes.EthAddress, blkParam ethtypes.EthBlockNumberOrHash) (ethtypes.EthUint64, error) { return 0, ErrModuleDisabled } -func (EthTransactionDisabled) EthGetTransactionReceipt(ctx context.Context, txHash ethtypes.EthHash) (*api.EthTxReceipt, error) { +func (EthTransactionDisabled) EthGetTransactionReceipt(ctx context.Context, txHash ethtypes.EthHash) (*ethtypes.EthTxReceipt, error) { return nil, ErrModuleDisabled } -func (EthTransactionDisabled) EthGetTransactionReceiptLimited(ctx context.Context, txHash ethtypes.EthHash, limit abi.ChainEpoch) (*api.EthTxReceipt, error) { +func (EthTransactionDisabled) EthGetTransactionReceiptLimited(ctx context.Context, txHash ethtypes.EthHash, limit abi.ChainEpoch) (*ethtypes.EthTxReceipt, error) { return nil, ErrModuleDisabled } -func (EthTransactionDisabled) EthGetBlockReceipts(ctx context.Context, blockParam ethtypes.EthBlockNumberOrHash) ([]*api.EthTxReceipt, error) { +func (EthTransactionDisabled) EthGetBlockReceipts(ctx context.Context, blockParam ethtypes.EthBlockNumberOrHash) ([]*ethtypes.EthTxReceipt, error) { return nil, ErrModuleDisabled } -func (EthTransactionDisabled) EthGetBlockReceiptsLimited(ctx context.Context, blockParam ethtypes.EthBlockNumberOrHash, limit abi.ChainEpoch) ([]*api.EthTxReceipt, error) { +func (EthTransactionDisabled) EthGetBlockReceiptsLimited(ctx context.Context, blockParam ethtypes.EthBlockNumberOrHash, limit abi.ChainEpoch) ([]*ethtypes.EthTxReceipt, error) { return nil, ErrModuleDisabled } diff --git a/node/impl/eth/utils.go b/node/impl/eth/utils.go index 5d104ebadbc..c40575f003d 100644 --- a/node/impl/eth/utils.go +++ b/node/impl/eth/utils.go @@ -9,6 +9,7 @@ import ( "github.com/ipfs/go-cid" "github.com/multiformats/go-multicodec" + cbg "github.com/whyrusleeping/cbor-gen" "golang.org/x/xerrors" "github.com/filecoin-project/go-address" @@ -22,7 +23,6 @@ import ( "github.com/filecoin-project/lotus/api" "github.com/filecoin-project/lotus/build/buildconstants" "github.com/filecoin-project/lotus/chain/actors/builtin" - "github.com/filecoin-project/lotus/chain/actors/policy" "github.com/filecoin-project/lotus/chain/state" "github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/types/ethtypes" @@ -41,63 +41,6 @@ func init() { } } -func getTipsetByEthBlockNumberOrHash(ctx context.Context, cs ChainStore, blkParam ethtypes.EthBlockNumberOrHash) (*types.TipSet, error) { - head := cs.GetHeaviestTipSet() - - predefined := blkParam.PredefinedBlock - if predefined != nil { - if *predefined == "earliest" { - return nil, xerrors.New("block param \"earliest\" is not supported") - } else if *predefined == "pending" { - return head, nil - } else if *predefined == "latest" { - parent, err := cs.GetTipSetFromKey(ctx, head.Parents()) - if err != nil { - return nil, xerrors.New("cannot get parent tipset") - } - return parent, nil - } - return nil, xerrors.Errorf("unknown predefined block %s", *predefined) - } - - if blkParam.BlockNumber != nil { - height := abi.ChainEpoch(*blkParam.BlockNumber) - if height > head.Height()-1 { - return nil, xerrors.New("requested a future epoch (beyond 'latest')") - } - ts, err := cs.GetTipsetByHeight(ctx, height, head, true) - if err != nil { - return nil, xerrors.Errorf("cannot get tipset at height: %v", height) - } - return ts, nil - } - - if blkParam.BlockHash != nil { - ts, err := cs.GetTipSetByCid(ctx, blkParam.BlockHash.ToCid()) - if err != nil { - return nil, xerrors.Errorf("cannot get tipset by hash: %v", err) - } - - // verify that the tipset is in the canonical chain - if blkParam.RequireCanonical { - // walk up the current chain (our head) until we reach ts.Height() - walkTs, err := cs.GetTipsetByHeight(ctx, ts.Height(), head, true) - if err != nil { - return nil, xerrors.Errorf("cannot get tipset at height: %v", ts.Height()) - } - - // verify that it equals the expected tipset - if !walkTs.Equals(ts) { - return nil, xerrors.New("tipset is not canonical") - } - } - - return ts, nil - } - - return nil, xerrors.New("invalid block param") -} - func newEthBlockFromFilecoinTipSet(ctx context.Context, ts *types.TipSet, fullTxInfo bool, cs ChainStore, sm StateManager) (ethtypes.EthBlock, error) { parentKeyCid, err := ts.Parents().Cid() if err != nil { @@ -572,7 +515,7 @@ func newEthTx( return tx, nil } -func newEthTxReceipt(ctx context.Context, tx ethtypes.EthTx, baseFee big.Int, msgReceipt types.MessageReceipt, ev EthEventsInternal) (api.EthTxReceipt, error) { +func newEthTxReceipt(ctx context.Context, tx ethtypes.EthTx, baseFee big.Int, msgReceipt types.MessageReceipt, ev EthEventsInternal) (ethtypes.EthTxReceipt, error) { var ( transactionIndex ethtypes.EthUint64 blockHash ethtypes.EthHash @@ -589,7 +532,7 @@ func newEthTxReceipt(ctx context.Context, tx ethtypes.EthTx, baseFee big.Int, ms blockNumber = *tx.BlockNumber } - txReceipt := api.EthTxReceipt{ + txReceipt := ethtypes.EthTxReceipt{ TransactionHash: tx.Hash, From: tx.From, To: tx.To, @@ -614,11 +557,11 @@ func newEthTxReceipt(ctx context.Context, tx ethtypes.EthTx, baseFee big.Int, ms gasFeeCap, err := tx.GasFeeCap() if err != nil { - return api.EthTxReceipt{}, xerrors.Errorf("failed to get gas fee cap: %w", err) + return ethtypes.EthTxReceipt{}, xerrors.Errorf("failed to get gas fee cap: %w", err) } gasPremium, err := tx.GasPremium() if err != nil { - return api.EthTxReceipt{}, xerrors.Errorf("failed to get gas premium: %w", err) + return ethtypes.EthTxReceipt{}, xerrors.Errorf("failed to get gas premium: %w", err) } gasOutputs := vm.ComputeGasOutputs(msgReceipt.GasUsed, int64(tx.Gas), baseFee, big.Int(gasFeeCap), @@ -635,7 +578,7 @@ func newEthTxReceipt(ctx context.Context, tx ethtypes.EthTx, baseFee big.Int, ms // Create and Create2 return the same things. var ret eam.CreateExternalReturn if err := ret.UnmarshalCBOR(bytes.NewReader(msgReceipt.Return)); err != nil { - return api.EthTxReceipt{}, xerrors.Errorf("failed to parse contract creation result: %w", err) + return ethtypes.EthTxReceipt{}, xerrors.Errorf("failed to parse contract creation result: %w", err) } addr := ethtypes.EthAddress(ret.EthAddress) txReceipt.ContractAddress = &addr @@ -644,7 +587,7 @@ func newEthTxReceipt(ctx context.Context, tx ethtypes.EthTx, baseFee big.Int, ms if rct := msgReceipt; rct.EventsRoot != nil { logs, err := ev.GetEthLogsForBlockAndTransaction(ctx, &blockHash, tx.Hash) if err != nil { - return api.EthTxReceipt{}, xerrors.Errorf("failed to get eth logs for block and transaction: %w", err) + return ethtypes.EthTxReceipt{}, xerrors.Errorf("failed to get eth logs for block and transaction: %w", err) } if len(logs) > 0 { txReceipt.Logs = logs @@ -703,53 +646,65 @@ func encodeAsABIHelper(param1 uint64, param2 uint64, data []byte) []byte { return buf } -func getTipsetByBlockNumber(ctx context.Context, cs ChainStore, blkParam string, strict bool) (*types.TipSet, error) { - if blkParam == "earliest" { - return nil, xerrors.New("block param \"earliest\" is not supported") - } - - head := cs.GetHeaviestTipSet() - switch blkParam { - case "pending": - return head, nil - case "latest": - parent, err := cs.GetTipSetFromKey(ctx, head.Parents()) - if err != nil { - return nil, xerrors.New("cannot get parent tipset") - } - return parent, nil - case "safe": - latestHeight := head.Height() - 1 - safeHeight := latestHeight - ethtypes.SafeEpochDelay - ts, err := cs.GetTipsetByHeight(ctx, safeHeight, head, true) +// decodePayload is a utility function which decodes the payload using the given codec +func decodePayload(payload []byte, codec uint64) (ethtypes.EthBytes, error) { + switch multicodec.Code(codec) { + case multicodec.Identity: + return nil, nil + case multicodec.DagCbor, multicodec.Cbor: + buf, err := cbg.ReadByteArray(bytes.NewReader(payload), uint64(len(payload))) if err != nil { - return nil, xerrors.Errorf("cannot get tipset at height: %v", safeHeight) + return nil, xerrors.Errorf("decodePayload: failed to decode cbor payload: %w", err) } - return ts, nil - case "finalized": - latestHeight := head.Height() - 1 - safeHeight := latestHeight - policy.ChainFinality - ts, err := cs.GetTipsetByHeight(ctx, safeHeight, head, true) - if err != nil { - return nil, xerrors.Errorf("cannot get tipset at height: %v", safeHeight) - } - return ts, nil + return buf, nil + case multicodec.Raw: + return ethtypes.EthBytes(payload), nil + } + + return nil, xerrors.Errorf("decodePayload: unsupported codec: %d", codec) +} + +func decodeParams[P any, T interface { + *P + cbg.CBORUnmarshaler +}](msg *types.MessageTrace) (T, error) { + var params T = new(P) + switch msg.ParamsCodec { + case uint64(multicodec.DagCbor), uint64(multicodec.Cbor): default: - var num ethtypes.EthUint64 - err := num.UnmarshalJSON([]byte(`"` + blkParam + `"`)) - if err != nil { - return nil, xerrors.Errorf("cannot parse block number: %v", err) - } - if abi.ChainEpoch(num) > head.Height()-1 { - return nil, xerrors.New("requested a future epoch (beyond 'latest')") - } - ts, err := cs.GetTipsetByHeight(ctx, abi.ChainEpoch(num), head, true) - if err != nil { - return nil, xerrors.Errorf("cannot get tipset at height: %v", num) - } - if strict && ts.Height() != abi.ChainEpoch(num) { - return nil, api.NewErrNullRound(abi.ChainEpoch(num)) + return nil, xerrors.Errorf("Method called with unexpected codec %d", msg.ParamsCodec) + } + + if err := params.UnmarshalCBOR(bytes.NewReader(msg.Params)); err != nil { + return nil, xerrors.Errorf("failed to decode params: %w", err) + } + + return params, nil +} + +func decodeReturn[R any, T interface { + *R + cbg.CBORUnmarshaler +}](ret *types.ReturnTrace) (T, error) { + var retval T = new(R) + switch ret.ReturnCodec { + case uint64(multicodec.DagCbor), uint64(multicodec.Cbor): + default: + return nil, xerrors.Errorf("Method returned an unexpected codec %d", ret.ReturnCodec) + } + + if err := retval.UnmarshalCBOR(bytes.NewReader(ret.Return)); err != nil { + return nil, xerrors.Errorf("failed to decode return value: %w", err) + } + + return retval, nil +} + +func find[T any](values []T, cb func(t *T) *T) *T { + for i := range values { + if o := cb(&values[i]); o != nil { + return o } - return ts, nil } + return nil } diff --git a/node/impl/full.go b/node/impl/full.go index 681a62b23d2..99492176ef9 100644 --- a/node/impl/full.go +++ b/node/impl/full.go @@ -35,7 +35,7 @@ type FullNodeAPI struct { full.MsigAPI full.WalletAPI full.SyncAPI - full.FullEthAPI + full.FullEthAPIV1 full.ActorEventsAPI full.F3API full.ChainIndexAPI @@ -129,6 +129,7 @@ type FullNodeAPIv2 struct { full.ChainModuleAPIv2 full.StateModuleAPIv2 + full.FullEthAPIV2 } var _ v2api.FullNode = &FullNodeAPIv2{} diff --git a/node/impl/full/chain_v2.go b/node/impl/full/chain_v2.go index 5d538789fe2..d128e302e89 100644 --- a/node/impl/full/chain_v2.go +++ b/node/impl/full/chain_v2.go @@ -10,7 +10,7 @@ import ( "github.com/filecoin-project/go-f3" "github.com/filecoin-project/lotus/api" - "github.com/filecoin-project/lotus/build" + "github.com/filecoin-project/lotus/build/buildconstants" "github.com/filecoin-project/lotus/chain/actors/policy" "github.com/filecoin-project/lotus/chain/lf3" "github.com/filecoin-project/lotus/chain/store" @@ -79,7 +79,7 @@ func (cm *ChainModuleV2) getLatestSafeTipSet(ctx context.Context) (*types.TipSet if heaviest == nil { return nil, xerrors.Errorf("no known heaviest tipset") } - safeHeight := max(0, heaviest.Height()-build.SafeHeightDistance) + safeHeight := max(0, heaviest.Height()-buildconstants.SafeHeightDistance) if finalized != nil && finalized.Height() >= safeHeight { return finalized, nil } diff --git a/node/impl/full/eth.go b/node/impl/full/eth.go index 7e4f9b10444..b89779a490f 100644 --- a/node/impl/full/eth.go +++ b/node/impl/full/eth.go @@ -3,10 +3,8 @@ package full import ( "context" - "github.com/ipfs/go-cid" "go.uber.org/fx" - "github.com/filecoin-project/go-jsonrpc" "github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/lotus/api" @@ -14,73 +12,61 @@ import ( "github.com/filecoin-project/lotus/node/impl/eth" ) -type EthModuleAPI interface { - EthBlockNumber(ctx context.Context) (ethtypes.EthUint64, error) - EthAccounts(ctx context.Context) ([]ethtypes.EthAddress, error) - EthGetBlockTransactionCountByNumber(ctx context.Context, blkNum ethtypes.EthUint64) (ethtypes.EthUint64, error) - EthGetBlockTransactionCountByHash(ctx context.Context, blkHash ethtypes.EthHash) (ethtypes.EthUint64, error) - EthGetBlockByHash(ctx context.Context, blkHash ethtypes.EthHash, fullTxInfo bool) (ethtypes.EthBlock, error) - EthGetBlockByNumber(ctx context.Context, blkNum string, fullTxInfo bool) (ethtypes.EthBlock, error) - EthGetTransactionByHash(ctx context.Context, txHash *ethtypes.EthHash) (*ethtypes.EthTx, error) +// gatewayWithTrusted exists just to do type assertions on api.Gateway, but we know it won't have +// certain trusted-only APIs +type gatewayWithTrusted interface { + api.Gateway EthGetTransactionByHashLimited(ctx context.Context, txHash *ethtypes.EthHash, limit abi.ChainEpoch) (*ethtypes.EthTx, error) - EthGetMessageCidByTransactionHash(ctx context.Context, txHash *ethtypes.EthHash) (*cid.Cid, error) - EthGetTransactionHashByCid(ctx context.Context, cid cid.Cid) (*ethtypes.EthHash, error) - EthGetTransactionCount(ctx context.Context, sender ethtypes.EthAddress, blkParam ethtypes.EthBlockNumberOrHash) (ethtypes.EthUint64, error) - EthGetTransactionReceipt(ctx context.Context, txHash ethtypes.EthHash) (*api.EthTxReceipt, error) - EthGetTransactionReceiptLimited(ctx context.Context, txHash ethtypes.EthHash, limit abi.ChainEpoch) (*api.EthTxReceipt, error) - EthGetCode(ctx context.Context, address ethtypes.EthAddress, blkParam ethtypes.EthBlockNumberOrHash) (ethtypes.EthBytes, error) - EthGetStorageAt(ctx context.Context, address ethtypes.EthAddress, position ethtypes.EthBytes, blkParam ethtypes.EthBlockNumberOrHash) (ethtypes.EthBytes, error) - EthGetBalance(ctx context.Context, address ethtypes.EthAddress, blkParam ethtypes.EthBlockNumberOrHash) (ethtypes.EthBigInt, error) - EthFeeHistory(ctx context.Context, p jsonrpc.RawParams) (ethtypes.EthFeeHistory, error) - EthChainId(ctx context.Context) (ethtypes.EthUint64, error) - EthSyncing(ctx context.Context) (ethtypes.EthSyncingResult, error) - NetVersion(ctx context.Context) (string, error) - NetListening(ctx context.Context) (bool, error) - EthProtocolVersion(ctx context.Context) (ethtypes.EthUint64, error) - EthGasPrice(ctx context.Context) (ethtypes.EthBigInt, error) - EthEstimateGas(ctx context.Context, p jsonrpc.RawParams) (ethtypes.EthUint64, error) - EthCall(ctx context.Context, tx ethtypes.EthCall, blkParam ethtypes.EthBlockNumberOrHash) (ethtypes.EthBytes, error) - EthMaxPriorityFeePerGas(ctx context.Context) (ethtypes.EthBigInt, error) - EthSendRawTransaction(ctx context.Context, rawTx ethtypes.EthBytes) (ethtypes.EthHash, error) - Web3ClientVersion(ctx context.Context) (string, error) - EthTraceBlock(ctx context.Context, blkNum string) ([]*ethtypes.EthTraceBlock, error) - EthTraceReplayBlockTransactions(ctx context.Context, blkNum string, traceTypes []string) ([]*ethtypes.EthTraceReplayBlockTransaction, error) - EthTraceTransaction(ctx context.Context, txHash string) ([]*ethtypes.EthTraceTransaction, error) - EthTraceFilter(ctx context.Context, filter ethtypes.EthTraceFilterCriteria) ([]*ethtypes.EthTraceFilterResult, error) - EthGetBlockReceiptsLimited(ctx context.Context, blkParam ethtypes.EthBlockNumberOrHash, limit abi.ChainEpoch) ([]*api.EthTxReceipt, error) - EthGetBlockReceipts(ctx context.Context, blkParam ethtypes.EthBlockNumberOrHash) ([]*api.EthTxReceipt, error) -} - -type EthEventAPI interface { - EthGetLogs(ctx context.Context, filter *ethtypes.EthFilterSpec) (*ethtypes.EthFilterResult, error) - EthGetFilterChanges(ctx context.Context, id ethtypes.EthFilterID) (*ethtypes.EthFilterResult, error) - EthGetFilterLogs(ctx context.Context, id ethtypes.EthFilterID) (*ethtypes.EthFilterResult, error) - EthNewFilter(ctx context.Context, filter *ethtypes.EthFilterSpec) (ethtypes.EthFilterID, error) - EthNewBlockFilter(ctx context.Context) (ethtypes.EthFilterID, error) - EthNewPendingTransactionFilter(ctx context.Context) (ethtypes.EthFilterID, error) - EthUninstallFilter(ctx context.Context, id ethtypes.EthFilterID) (bool, error) - EthSubscribe(ctx context.Context, params jsonrpc.RawParams) (ethtypes.EthSubscriptionID, error) - EthUnsubscribe(ctx context.Context, id ethtypes.EthSubscriptionID) (bool, error) + EthGetTransactionReceiptLimited(ctx context.Context, txHash ethtypes.EthHash, limit abi.ChainEpoch) (*ethtypes.EthTxReceipt, error) + EthGetBlockReceiptsLimited(ctx context.Context, blkParam ethtypes.EthBlockNumberOrHash, limit abi.ChainEpoch) ([]*ethtypes.EthTxReceipt, error) + EthSendRawTransactionUntrusted(ctx context.Context, rawTx ethtypes.EthBytes) (ethtypes.EthHash, error) } var ( - _ EthModuleAPI = *new(api.FullNode) - _ EthEventAPI = *new(api.FullNode) - _ EthModuleAPI = *new(FullEthAPI) - _ EthEventAPI = *new(FullEthAPI) - _ EthModuleAPI = *new(api.Gateway) - _ EthEventAPI = *new(api.Gateway) + _ eth.EthModuleAPI = *new(FullEthAPIV1) + _ eth.EthModuleAPI = *new(api.FullNode) + _ eth.EthModuleAPI = *new(gatewayWithTrusted) ) -type FullEthAPI struct { +// The Eth*V{1,2} interfaces are distinct interface for DI purposes. By making them separate, we can +// construct separate modules for v1 and v2 APIs and provide different TipSetResolvers for them. + +type EthTipSetResolverV1 interface{ eth.TipSetResolver } +type EthFilecoinAPIV1 interface{ eth.EthFilecoinAPI } +type EthTransactionAPIV1 interface{ eth.EthTransactionAPI } +type EthLookupAPIV1 interface{ eth.EthLookupAPI } +type EthTraceAPIV1 interface{ eth.EthTraceAPI } +type EthGasAPIV1 interface{ eth.EthGasAPI } + +type EthTipSetResolverV2 interface{ eth.TipSetResolver } +type EthFilecoinAPIV2 interface{ eth.EthFilecoinAPI } +type EthTransactionAPIV2 interface{ eth.EthTransactionAPI } +type EthLookupAPIV2 interface{ eth.EthLookupAPI } +type EthTraceAPIV2 interface{ eth.EthTraceAPI } +type EthGasAPIV2 interface{ eth.EthGasAPI } + +type FullEthAPIV1 struct { fx.In - eth.EthFilecoinAPI + EthFilecoinAPIV1 eth.EthBasicAPI - eth.EthTransactionAPI - eth.EthLookupAPI - eth.EthTraceAPI - eth.EthGasAPI + eth.EthSendAPI + EthTransactionAPIV1 + EthLookupAPIV1 + EthTraceAPIV1 + EthGasAPIV1 eth.EthEventsAPI +} + +type FullEthAPIV2 struct { + fx.In + + EthFilecoinAPIV2 + eth.EthBasicAPI eth.EthSendAPI + EthTransactionAPIV2 + EthLookupAPIV2 + EthTraceAPIV2 + EthGasAPIV2 + eth.EthEventsAPI } diff --git a/node/impl/gasutils/gasutils.go b/node/impl/gasutils/gasutils.go index 3200ec224d5..529e2614def 100644 --- a/node/impl/gasutils/gasutils.go +++ b/node/impl/gasutils/gasutils.go @@ -172,7 +172,7 @@ func GasEstimateGasLimit( ret := res.MsgRct.GasUsed - log.Debugw("GasEstimateMessageGas CallWithGas Result", "GasUsed", ret, "ExitCode", res.MsgRct.ExitCode) + log.Debugw("GasEstimateGasLimit CallWithGas Result", "GasUsed", ret, "ExitCode", res.MsgRct.ExitCode) transitionalMulti := 1.0 // Overestimate gas around the upgrade diff --git a/node/modules/eth.go b/node/modules/eth.go index 1fbd205c51b..686d1bac07e 100644 --- a/node/modules/eth.go +++ b/node/modules/eth.go @@ -10,10 +10,10 @@ import ( "github.com/filecoin-project/go-address" "github.com/filecoin-project/go-state-types/abi" - "github.com/filecoin-project/lotus/api" "github.com/filecoin-project/lotus/chain/events" "github.com/filecoin-project/lotus/chain/events/filter" "github.com/filecoin-project/lotus/chain/index" + "github.com/filecoin-project/lotus/chain/lf3" "github.com/filecoin-project/lotus/chain/messagepool" "github.com/filecoin-project/lotus/chain/stmgr" "github.com/filecoin-project/lotus/chain/store" @@ -22,9 +22,72 @@ import ( "github.com/filecoin-project/lotus/node/config" "github.com/filecoin-project/lotus/node/impl/eth" "github.com/filecoin-project/lotus/node/impl/full" + "github.com/filecoin-project/lotus/node/modules/dtypes" "github.com/filecoin-project/lotus/node/modules/helpers" ) +type TipSetResolverParams struct { + fx.In + ChainStore eth.ChainStore + F3 lf3.F3Backend `optional:"true"` +} + +func MakeV1TipSetResolver(params TipSetResolverParams) full.EthTipSetResolverV2 { + return eth.NewTipSetResolver(params.ChainStore, nil, false) +} + +func MakeV2TipSetResolver(params TipSetResolverParams) full.EthTipSetResolverV2 { + return eth.NewTipSetResolver(params.ChainStore, params.F3, true) +} + +func MakeEthFilecoinV1(stateManager eth.StateManager, tipsetResolver full.EthTipSetResolverV1) full.EthFilecoinAPIV1 { + return eth.NewEthFilecoinAPI(stateManager, tipsetResolver) +} + +func MakeEthFilecoinV2(stateManager eth.StateManager, tipsetResolver full.EthTipSetResolverV2) full.EthFilecoinAPIV1 { + return eth.NewEthFilecoinAPI(stateManager, tipsetResolver) +} + +func MakeEthLookupV1( + chainStore eth.ChainStore, + stateManager eth.StateManager, + syncApi eth.SyncAPI, + stateBlockstore dtypes.StateBlockstore, + tipsetResolver full.EthTipSetResolverV1, +) full.EthLookupAPIV1 { + return eth.NewEthLookupAPI(chainStore, stateManager, syncApi, stateBlockstore, tipsetResolver) +} + +func MakeEthLookupV2( + chainStore eth.ChainStore, + stateManager eth.StateManager, + syncApi eth.SyncAPI, + stateBlockstore dtypes.StateBlockstore, + tipsetResolver full.EthTipSetResolverV2, +) full.EthLookupAPIV2 { + return eth.NewEthLookupAPI(chainStore, stateManager, syncApi, stateBlockstore, tipsetResolver) +} + +func MakeEthGasV1( + chainStore eth.ChainStore, + stateManager eth.StateManager, + messagePool eth.MessagePool, + gasApi eth.GasAPI, + tipsetResolver full.EthTipSetResolverV1, +) full.EthGasAPIV1 { + return eth.NewEthGasAPI(chainStore, stateManager, messagePool, gasApi, tipsetResolver) +} + +func MakeEthGasV2( + chainStore eth.ChainStore, + stateManager eth.StateManager, + messagePool eth.MessagePool, + gasApi eth.GasAPI, + tipsetResolver full.EthTipSetResolverV2, +) full.EthGasAPIV2 { + return eth.NewEthGasAPI(chainStore, stateManager, messagePool, gasApi, tipsetResolver) +} + type EthTransactionParams struct { fx.In @@ -38,47 +101,77 @@ type EthTransactionParams struct { Indexer index.Indexer } -func MakeEthTransaction(cfg config.FevmConfig) func(EthTransactionParams) (eth.EthTransactionAPI, error) { - return func(params EthTransactionParams) (eth.EthTransactionAPI, error) { - // Prime the tipset cache with the entire chain to make sure tx and block lookups are fast - params.Lifecycle.Append(fx.Hook{ - OnStart: func(context.Context) error { - go func() { - start := time.Now() - log.Infoln("Start prefilling GetTipsetByHeight cache") - _, err := params.ChainStore.GetTipsetByHeight(params.MetricsCtx, abi.ChainEpoch(0), params.ChainStore.GetHeaviestTipSet(), false) - if err != nil { - log.Warnf("error when prefilling GetTipsetByHeight cache: %w", err) - } - log.Infof("Prefilling GetTipsetByHeight done in %s", time.Since(start)) - }() - return nil - }, - }) +func MakeEthTransactionV1(cfg config.FevmConfig) func(EthTransactionParams, full.EthTipSetResolverV1) (full.EthTransactionAPIV1, error) { + return func(params EthTransactionParams, tipSetResolver full.EthTipSetResolverV1) (full.EthTransactionAPIV1, error) { + return makeEthTransaction(params, tipSetResolver, cfg.EthBlkCacheSize) + } +} - return eth.NewEthTransactionAPI( - params.ChainStore, - params.StateManager, - params.StateAPI, - params.MpoolAPI, - params.Indexer, - params.EthEventsExtended, - cfg.EthBlkCacheSize, - ) +func MakeEthTransactionV2(cfg config.FevmConfig) func(EthTransactionParams, full.EthTipSetResolverV2) (full.EthTransactionAPIV2, error) { + return func(params EthTransactionParams, tipSetResolver full.EthTipSetResolverV2) (full.EthTransactionAPIV2, error) { + return makeEthTransaction(params, tipSetResolver, cfg.EthBlkCacheSize) } } -func MakeEthTrace(cfg config.FevmConfig) func( +func makeEthTransaction(params EthTransactionParams, tipSetResolver eth.TipSetResolver, ethBlkCacheSize int) (full.EthTransactionAPIV1, error) { + // Prime the tipset cache with the entire chain to make sure tx and block lookups are fast + ctx := helpers.LifecycleCtx(params.MetricsCtx, params.Lifecycle) // cancelled OnStop + params.Lifecycle.Append(fx.Hook{ + OnStart: func(_ context.Context) error { + go func() { + start := time.Now() + log.Infoln("Start prefilling GetTipsetByHeight cache") + _, err := params.ChainStore.GetTipsetByHeight(ctx, abi.ChainEpoch(0), params.ChainStore.GetHeaviestTipSet(), false) + if err != nil { + log.Warnf("error when prefilling GetTipsetByHeight cache: %w", err) + } + log.Infof("Prefilling GetTipsetByHeight done in %s", time.Since(start)) + }() + return nil + }, + }) + + return eth.NewEthTransactionAPI( + params.ChainStore, + params.StateManager, + params.StateAPI, + params.MpoolAPI, + params.Indexer, + params.EthEventsExtended, + tipSetResolver, + ethBlkCacheSize, + ) +} + +func MakeEthTraceV1(cfg config.FevmConfig) func( chainStore eth.ChainStore, stateManager eth.StateManager, - ethTransaction eth.EthTransactionAPI, -) eth.EthTraceAPI { + ethTransaction full.EthTransactionAPIV1, + tipsetResolver full.EthTipSetResolverV1, +) full.EthTraceAPIV1 { return func( chainStore eth.ChainStore, stateManager eth.StateManager, - ethTransaction eth.EthTransactionAPI, - ) eth.EthTraceAPI { - return eth.NewEthTraceAPI(chainStore, stateManager, ethTransaction, cfg.EthTraceFilterMaxResults) + ethTransaction full.EthTransactionAPIV1, + tipsetResolver full.EthTipSetResolverV1, + ) full.EthTraceAPIV1 { + return eth.NewEthTraceAPI(chainStore, stateManager, ethTransaction, tipsetResolver, cfg.EthTraceFilterMaxResults) + } +} + +func MakeEthTraceV2(cfg config.FevmConfig) func( + chainStore eth.ChainStore, + stateManager eth.StateManager, + ethTransaction full.EthTransactionAPIV2, + tipsetResolver full.EthTipSetResolverV2, +) full.EthTraceAPIV2 { + return func( + chainStore eth.ChainStore, + stateManager eth.StateManager, + ethTransaction full.EthTransactionAPIV2, + tipsetResolver full.EthTipSetResolverV2, + ) full.EthTraceAPIV2 { + return eth.NewEthTraceAPI(chainStore, stateManager, ethTransaction, tipsetResolver, cfg.EthTraceFilterMaxResults) } } @@ -187,13 +280,32 @@ func MakeEthEventsExtended(cfg config.EventsConfig, enableEthRPC bool) func(EthE // precautionary measure. type GatewayEthSend struct { fx.In - api.Gateway + eth.EthSendAPI } func (*GatewayEthSend) EthSendRawTransactionUntrusted(ctx context.Context, rawTx ethtypes.EthBytes) (ethtypes.EthHash, error) { return ethtypes.EthHash{}, xerrors.New("EthSendRawTransactionUntrusted is not supported in gateway mode") } +// GatewayEthTransaction is a helper to provide the Gateway with the EthTransactionAPI but block the +// use of EthGetTransactionByHashLimited, EthGetTransactionReceiptLimited and +// EthGetBlockReceiptsLimited. The Gateway API doesn't expose these methods, so this is a +// precautionary measure. +type GatewayEthTransaction struct { + fx.In + eth.EthTransactionAPI +} + +func (*GatewayEthTransaction) EthGetTransactionByHashLimited(ctx context.Context, txHash *ethtypes.EthHash, limit abi.ChainEpoch) (*ethtypes.EthTx, error) { + return nil, xerrors.New("EthGetTransactionByHashLimited is not supported in gateway mode") +} +func (*GatewayEthTransaction) EthGetTransactionReceiptLimited(ctx context.Context, txHash ethtypes.EthHash, limit abi.ChainEpoch) (*ethtypes.EthTxReceipt, error) { + return nil, xerrors.New("EthGetTransactionByHashLimited is not supported in gateway mode") +} +func (*GatewayEthTransaction) EthGetBlockReceiptsLimited(ctx context.Context, blkParam ethtypes.EthBlockNumberOrHash, limit abi.ChainEpoch) ([]*ethtypes.EthTxReceipt, error) { + return nil, xerrors.New("EthGetTransactionByHashLimited is not supported in gateway mode") +} + type EventFilterManagerParams struct { fx.In