2022-11-10 03:52:36 +00:00
|
|
|
package full
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
"errors"
|
|
|
|
|
2022-12-14 06:12:52 +00:00
|
|
|
"github.com/filecoin-project/lotus/chain/eth"
|
2022-11-10 03:52:36 +00:00
|
|
|
)
|
|
|
|
|
2022-11-10 03:55:59 +00:00
|
|
|
var ErrImplementMe = errors.New("Not implemented yet")
|
2022-11-10 03:52:36 +00:00
|
|
|
|
|
|
|
type EthModuleDummy struct{}
|
|
|
|
|
2022-12-14 06:12:52 +00:00
|
|
|
func (e *EthModuleDummy) EthBlockNumber(ctx context.Context) (eth.EthUint64, error) {
|
2022-11-10 03:55:59 +00:00
|
|
|
return 0, ErrImplementMe
|
2022-11-10 03:52:36 +00:00
|
|
|
}
|
|
|
|
|
2022-12-14 06:12:52 +00:00
|
|
|
func (e *EthModuleDummy) EthAccounts(ctx context.Context) ([]eth.EthAddress, error) {
|
2022-11-10 03:55:59 +00:00
|
|
|
return nil, ErrImplementMe
|
2022-11-10 03:52:36 +00:00
|
|
|
}
|
|
|
|
|
2022-12-14 06:12:52 +00:00
|
|
|
func (e *EthModuleDummy) EthGetBlockTransactionCountByNumber(ctx context.Context, blkNum eth.EthUint64) (eth.EthUint64, error) {
|
2022-11-10 03:55:59 +00:00
|
|
|
return 0, ErrImplementMe
|
2022-11-10 03:52:36 +00:00
|
|
|
}
|
|
|
|
|
2022-12-14 06:12:52 +00:00
|
|
|
func (e *EthModuleDummy) EthGetBlockTransactionCountByHash(ctx context.Context, blkHash eth.EthHash) (eth.EthUint64, error) {
|
2022-11-10 03:55:59 +00:00
|
|
|
return 0, ErrImplementMe
|
2022-11-10 03:52:36 +00:00
|
|
|
}
|
|
|
|
|
2022-12-14 06:12:52 +00:00
|
|
|
func (e *EthModuleDummy) EthGetBlockByHash(ctx context.Context, blkHash eth.EthHash, fullTxInfo bool) (eth.EthBlock, error) {
|
|
|
|
return eth.EthBlock{}, ErrImplementMe
|
2022-11-10 03:52:36 +00:00
|
|
|
}
|
|
|
|
|
2022-12-14 06:12:52 +00:00
|
|
|
func (e *EthModuleDummy) EthGetBlockByNumber(ctx context.Context, blkNum string, fullTxInfo bool) (eth.EthBlock, error) {
|
|
|
|
return eth.EthBlock{}, ErrImplementMe
|
2022-11-10 03:52:36 +00:00
|
|
|
}
|
|
|
|
|
2022-12-14 06:12:52 +00:00
|
|
|
func (e *EthModuleDummy) EthGetTransactionByHash(ctx context.Context, txHash *eth.EthHash) (*eth.EthTx, error) {
|
2022-11-10 03:55:59 +00:00
|
|
|
return nil, ErrImplementMe
|
2022-11-10 03:52:36 +00:00
|
|
|
}
|
|
|
|
|
2022-12-14 06:12:52 +00:00
|
|
|
func (e *EthModuleDummy) EthGetTransactionCount(ctx context.Context, sender eth.EthAddress, blkOpt string) (eth.EthUint64, error) {
|
2022-11-10 03:55:59 +00:00
|
|
|
return 0, ErrImplementMe
|
2022-11-10 03:52:36 +00:00
|
|
|
}
|
|
|
|
|
2022-12-14 06:12:52 +00:00
|
|
|
func (e *EthModuleDummy) EthGetTransactionReceipt(ctx context.Context, txHash eth.EthHash) (*eth.EthTxReceipt, error) {
|
2022-11-10 03:55:59 +00:00
|
|
|
return nil, ErrImplementMe
|
2022-11-10 03:52:36 +00:00
|
|
|
}
|
|
|
|
|
2022-12-14 06:12:52 +00:00
|
|
|
func (e *EthModuleDummy) EthGetTransactionByBlockHashAndIndex(ctx context.Context, blkHash eth.EthHash, txIndex eth.EthUint64) (eth.EthTx, error) {
|
|
|
|
return eth.EthTx{}, ErrImplementMe
|
2022-11-10 03:52:36 +00:00
|
|
|
}
|
|
|
|
|
2022-12-14 06:12:52 +00:00
|
|
|
func (e *EthModuleDummy) EthGetTransactionByBlockNumberAndIndex(ctx context.Context, blkNum eth.EthUint64, txIndex eth.EthUint64) (eth.EthTx, error) {
|
|
|
|
return eth.EthTx{}, ErrImplementMe
|
2022-11-10 03:52:36 +00:00
|
|
|
}
|
|
|
|
|
2022-12-14 06:12:52 +00:00
|
|
|
func (e *EthModuleDummy) EthGetCode(ctx context.Context, address eth.EthAddress, blkOpt string) (eth.EthBytes, error) {
|
2022-11-10 03:55:59 +00:00
|
|
|
return nil, ErrImplementMe
|
2022-11-10 03:52:36 +00:00
|
|
|
}
|
|
|
|
|
2022-12-14 06:12:52 +00:00
|
|
|
func (e *EthModuleDummy) EthGetStorageAt(ctx context.Context, address eth.EthAddress, position eth.EthBytes, blkParam string) (eth.EthBytes, error) {
|
2022-11-10 03:55:59 +00:00
|
|
|
return nil, ErrImplementMe
|
2022-11-10 03:52:36 +00:00
|
|
|
}
|
|
|
|
|
2022-12-14 06:12:52 +00:00
|
|
|
func (e *EthModuleDummy) EthGetBalance(ctx context.Context, address eth.EthAddress, blkParam string) (eth.EthBigInt, error) {
|
|
|
|
return eth.EthBigIntZero, ErrImplementMe
|
2022-11-10 03:52:36 +00:00
|
|
|
}
|
|
|
|
|
2022-12-14 06:12:52 +00:00
|
|
|
func (e *EthModuleDummy) EthFeeHistory(ctx context.Context, blkCount eth.EthUint64, newestBlk string, rewardPercentiles []float64) (eth.EthFeeHistory, error) {
|
|
|
|
return eth.EthFeeHistory{}, ErrImplementMe
|
2022-11-10 03:52:36 +00:00
|
|
|
}
|
|
|
|
|
2022-12-14 06:12:52 +00:00
|
|
|
func (e *EthModuleDummy) EthChainId(ctx context.Context) (eth.EthUint64, error) {
|
2022-11-10 03:55:59 +00:00
|
|
|
return 0, ErrImplementMe
|
2022-11-10 03:52:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (e *EthModuleDummy) NetVersion(ctx context.Context) (string, error) {
|
2022-11-10 03:55:59 +00:00
|
|
|
return "", ErrImplementMe
|
2022-11-10 03:52:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (e *EthModuleDummy) NetListening(ctx context.Context) (bool, error) {
|
2022-11-10 03:55:59 +00:00
|
|
|
return false, ErrImplementMe
|
2022-11-10 03:52:36 +00:00
|
|
|
}
|
|
|
|
|
2022-12-14 06:12:52 +00:00
|
|
|
func (e *EthModuleDummy) EthProtocolVersion(ctx context.Context) (eth.EthUint64, error) {
|
2022-11-10 03:55:59 +00:00
|
|
|
return 0, ErrImplementMe
|
2022-11-10 03:52:36 +00:00
|
|
|
}
|
|
|
|
|
2022-12-14 06:12:52 +00:00
|
|
|
func (e *EthModuleDummy) EthGasPrice(ctx context.Context) (eth.EthBigInt, error) {
|
|
|
|
return eth.EthBigIntZero, ErrImplementMe
|
2022-11-10 03:52:36 +00:00
|
|
|
}
|
|
|
|
|
2022-12-14 06:12:52 +00:00
|
|
|
func (e *EthModuleDummy) EthEstimateGas(ctx context.Context, tx eth.EthCall) (eth.EthUint64, error) {
|
2022-11-10 03:55:59 +00:00
|
|
|
return 0, ErrImplementMe
|
2022-11-10 03:52:36 +00:00
|
|
|
}
|
|
|
|
|
2022-12-14 06:12:52 +00:00
|
|
|
func (e *EthModuleDummy) EthCall(ctx context.Context, tx eth.EthCall, blkParam string) (eth.EthBytes, error) {
|
2022-11-10 03:55:59 +00:00
|
|
|
return nil, ErrImplementMe
|
2022-11-10 03:52:36 +00:00
|
|
|
}
|
|
|
|
|
2022-12-14 06:12:52 +00:00
|
|
|
func (e *EthModuleDummy) EthMaxPriorityFeePerGas(ctx context.Context) (eth.EthBigInt, error) {
|
|
|
|
return eth.EthBigIntZero, ErrImplementMe
|
2022-11-10 03:52:36 +00:00
|
|
|
}
|
|
|
|
|
2022-12-14 06:12:52 +00:00
|
|
|
func (e *EthModuleDummy) EthSendRawTransaction(ctx context.Context, rawTx eth.EthBytes) (eth.EthHash, error) {
|
|
|
|
return eth.EthHash{}, ErrImplementMe
|
2022-11-10 03:52:36 +00:00
|
|
|
}
|