ethrpc: Add missing fields to EthTx
This commit is contained in:
parent
9339267e6e
commit
e321761a72
Binary file not shown.
Binary file not shown.
@ -37,7 +37,8 @@ type EthTx struct {
|
||||
Gas EthUint64 `json:"gas"`
|
||||
MaxFeePerGas EthBigInt `json:"maxFeePerGas"`
|
||||
MaxPriorityFeePerGas EthBigInt `json:"maxPriorityFeePerGas"`
|
||||
V EthBigInt `json:"v"`
|
||||
AccessList []EthHash `json:"accessList"`
|
||||
V EthBigInt `json:"yParity"`
|
||||
R EthBigInt `json:"r"`
|
||||
S EthBigInt `json:"s"`
|
||||
}
|
||||
@ -86,6 +87,7 @@ func EthTxFromSignedEthMessage(smsg *types.SignedMessage) (EthTx, error) {
|
||||
Gas: EthUint64(txArgs.GasLimit),
|
||||
MaxFeePerGas: EthBigInt(txArgs.MaxFeePerGas),
|
||||
MaxPriorityFeePerGas: EthBigInt(txArgs.MaxPriorityFeePerGas),
|
||||
AccessList: []EthHash{},
|
||||
V: v,
|
||||
R: r,
|
||||
S: s,
|
||||
|
@ -2644,7 +2644,10 @@ Response:
|
||||
"gas": "0x5",
|
||||
"maxFeePerGas": "0x0",
|
||||
"maxPriorityFeePerGas": "0x0",
|
||||
"v": "0x0",
|
||||
"accessList": [
|
||||
"0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e"
|
||||
],
|
||||
"yParity": "0x0",
|
||||
"r": "0x0",
|
||||
"s": "0x0"
|
||||
}
|
||||
@ -2680,7 +2683,10 @@ Response:
|
||||
"gas": "0x5",
|
||||
"maxFeePerGas": "0x0",
|
||||
"maxPriorityFeePerGas": "0x0",
|
||||
"v": "0x0",
|
||||
"accessList": [
|
||||
"0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e"
|
||||
],
|
||||
"yParity": "0x0",
|
||||
"r": "0x0",
|
||||
"s": "0x0"
|
||||
}
|
||||
@ -2715,7 +2721,10 @@ Response:
|
||||
"gas": "0x5",
|
||||
"maxFeePerGas": "0x0",
|
||||
"maxPriorityFeePerGas": "0x0",
|
||||
"v": "0x0",
|
||||
"accessList": [
|
||||
"0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e"
|
||||
],
|
||||
"yParity": "0x0",
|
||||
"r": "0x0",
|
||||
"s": "0x0"
|
||||
}
|
||||
|
@ -139,8 +139,6 @@ func TestEthOpenRPCConformance(t *testing.T) {
|
||||
require.NoError(t, err)
|
||||
defer closer()
|
||||
|
||||
const skipUntilIssue10106 = "Skipped until EthTx is updated, see https://github.com/filecoin-project/lotus/issues/10106"
|
||||
|
||||
testCases := []struct {
|
||||
method string
|
||||
variant string // suffix applied to the test name to distinguish different variants of a method call
|
||||
@ -227,7 +225,6 @@ func TestEthOpenRPCConformance(t *testing.T) {
|
||||
call: func(a *ethAPIRaw) (json.RawMessage, error) {
|
||||
return ethapi.EthGetBlockByHash(context.Background(), blockHashWithMessage, true)
|
||||
},
|
||||
skipReason: skipUntilIssue10106,
|
||||
},
|
||||
|
||||
{
|
||||
@ -236,7 +233,7 @@ func TestEthOpenRPCConformance(t *testing.T) {
|
||||
call: func(a *ethAPIRaw) (json.RawMessage, error) {
|
||||
return ethapi.EthGetBlockByNumber(context.Background(), "earliest", true)
|
||||
},
|
||||
skipReason: skipUntilIssue10106,
|
||||
skipReason: "earliest block is not supported",
|
||||
},
|
||||
|
||||
{
|
||||
@ -245,7 +242,6 @@ func TestEthOpenRPCConformance(t *testing.T) {
|
||||
call: func(a *ethAPIRaw) (json.RawMessage, error) {
|
||||
return ethapi.EthGetBlockByNumber(context.Background(), "pending", true)
|
||||
},
|
||||
skipReason: skipUntilIssue10106,
|
||||
},
|
||||
|
||||
{
|
||||
@ -253,7 +249,6 @@ func TestEthOpenRPCConformance(t *testing.T) {
|
||||
call: func(a *ethAPIRaw) (json.RawMessage, error) {
|
||||
return ethapi.EthGetBlockByNumber(context.Background(), blockNumberWithMessage.Hex(), true)
|
||||
},
|
||||
skipReason: skipUntilIssue10106,
|
||||
},
|
||||
|
||||
{
|
||||
@ -329,7 +324,7 @@ func TestEthOpenRPCConformance(t *testing.T) {
|
||||
call: func(a *ethAPIRaw) (json.RawMessage, error) {
|
||||
return ethapi.EthGetTransactionByBlockHashAndIndex(context.Background(), blockHashWithMessage, ethtypes.EthUint64(0))
|
||||
},
|
||||
skipReason: skipUntilIssue10106,
|
||||
skipReason: "unimplemented",
|
||||
},
|
||||
|
||||
{
|
||||
@ -337,7 +332,7 @@ func TestEthOpenRPCConformance(t *testing.T) {
|
||||
call: func(a *ethAPIRaw) (json.RawMessage, error) {
|
||||
return ethapi.EthGetTransactionByBlockNumberAndIndex(context.Background(), blockNumberWithMessage, ethtypes.EthUint64(0))
|
||||
},
|
||||
skipReason: skipUntilIssue10106,
|
||||
skipReason: "unimplemented",
|
||||
},
|
||||
|
||||
{
|
||||
@ -345,7 +340,6 @@ func TestEthOpenRPCConformance(t *testing.T) {
|
||||
call: func(a *ethAPIRaw) (json.RawMessage, error) {
|
||||
return ethapi.EthGetTransactionByHash(context.Background(), &messageWithEvents)
|
||||
},
|
||||
skipReason: skipUntilIssue10106,
|
||||
},
|
||||
|
||||
{
|
||||
|
@ -1757,6 +1757,7 @@ func ethTxFromNativeMessage(ctx context.Context, msg *types.Message, sa StateAPI
|
||||
Gas: ethtypes.EthUint64(msg.GasLimit),
|
||||
MaxFeePerGas: ethtypes.EthBigInt(msg.GasFeeCap),
|
||||
MaxPriorityFeePerGas: ethtypes.EthBigInt(msg.GasPremium),
|
||||
AccessList: []ethtypes.EthHash{},
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user