Skip to content

Commit 6621327

Browse files
authored
fix: replace eth.EthTransactionAPI with full.EthTransactionAPIV1 (#1358)
* fix: replace eth.EthTransactionAPI with full.EthTransactionAPIV1
1 parent db21387 commit 6621327

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

lens/interface.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ type API interface {
2424
StateAPI
2525
VMAPI
2626
ActorEventAPI
27-
EthTransactionAPI
27+
EthTransactionAPIV1
2828

2929
GetMessageExecutionsForTipSet(ctx context.Context, ts, pts *types.TipSet) ([]*MessageExecution, error)
3030
}
@@ -93,6 +93,12 @@ type EthTransactionAPI interface {
9393
EthGetTransactionByHash(ctx context.Context, txHash *ethtypes.EthHash) (*ethtypes.EthTx, error)
9494
}
9595

96+
type EthTransactionAPIV1 interface {
97+
EthGetBlockByHash(ctx context.Context, blkHash ethtypes.EthHash, fullTxInfo bool) (ethtypes.EthBlock, error)
98+
EthGetTransactionReceipt(ctx context.Context, txHash ethtypes.EthHash) (*api.EthTxReceipt, error)
99+
EthGetTransactionByHash(ctx context.Context, txHash *ethtypes.EthHash) (*ethtypes.EthTx, error)
100+
}
101+
96102
type ActorEventAPI interface {
97103
GetActorEventsRaw(ctx context.Context, filter *types.ActorEventFilter) ([]*types.ActorEvent, error)
98104
}

lens/lily/impl.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ import (
4444
"github.com/filecoin-project/lotus/chain/types/ethtypes"
4545
"github.com/filecoin-project/lotus/chain/vm"
4646
"github.com/filecoin-project/lotus/node/impl/common"
47-
"github.com/filecoin-project/lotus/node/impl/eth"
4847
"github.com/filecoin-project/lotus/node/impl/full"
4948
"github.com/filecoin-project/lotus/node/impl/net"
5049
)
@@ -60,7 +59,7 @@ type LilyNodeAPI struct {
6059
full.StateAPI
6160
full.SyncAPI
6261

63-
eth.EthTransactionAPI
62+
full.EthTransactionAPIV1
6463
full.ActorEventAPI
6564
common.CommonAPI
6665
Events *events.Events
@@ -559,15 +558,15 @@ func (m *LilyNodeAPI) ComputeBaseFee(ctx context.Context, ts *types.TipSet) (abi
559558
}
560559

561560
func (m *LilyNodeAPI) EthGetBlockByHash(ctx context.Context, blkHash ethtypes.EthHash, fullTxInfo bool) (ethtypes.EthBlock, error) {
562-
return m.EthTransactionAPI.EthGetBlockByHash(ctx, blkHash, fullTxInfo)
561+
return m.EthTransactionAPIV1.EthGetBlockByHash(ctx, blkHash, fullTxInfo)
563562
}
564563

565564
func (m *LilyNodeAPI) EthGetTransactionByHash(ctx context.Context, txHash *ethtypes.EthHash) (*ethtypes.EthTx, error) {
566-
return m.EthTransactionAPI.EthGetTransactionByHash(ctx, txHash)
565+
return m.EthTransactionAPIV1.EthGetTransactionByHash(ctx, txHash)
567566
}
568567

569568
func (m *LilyNodeAPI) EthGetTransactionReceipt(ctx context.Context, txHash ethtypes.EthHash) (*api.EthTxReceipt, error) {
570-
return m.EthTransactionAPI.EthGetTransactionReceipt(ctx, txHash)
569+
return m.EthTransactionAPIV1.EthGetTransactionReceipt(ctx, txHash)
571570
}
572571

573572
func (m *LilyNodeAPI) ChainGetMessagesInTipset(ctx context.Context, tsk types.TipSetKey) ([]api.Message, error) {

0 commit comments

Comments
 (0)