diff --git a/accounts/external/backend.go b/accounts/external/backend.go index 0de4afeabd..0b336448fc 100644 --- a/accounts/external/backend.go +++ b/accounts/external/backend.go @@ -245,7 +245,7 @@ func (api *ExternalSigner) SignTx(account accounts.Account, tx *types.Transactio args.Commitments = sidecar.Commitments args.Proofs = sidecar.Proofs } - + var res signTransactionResult if err := api.client.Call(&res, "account_signTransaction", args); err != nil { return nil, err diff --git a/internal/ethapi/api.go b/internal/ethapi/api.go index 93d1d4e241..8114bdaf3e 100644 --- a/internal/ethapi/api.go +++ b/internal/ethapi/api.go @@ -1895,9 +1895,9 @@ func (s *TransactionAPI) SignTransaction(ctx context.Context, args TransactionAr // to put back the blob(s). if args.IsEIP4844() { signed = signed.WithBlobTxSidecar(&types.BlobTxSidecar{ - args.Blobs, - args.Commitments, - args.Proofs, + Blobs: args.Blobs, + Commitments: args.Commitments, + Proofs: args.Proofs, }) } data, err := signed.MarshalBinary() diff --git a/signer/core/apitypes/types.go b/signer/core/apitypes/types.go index d966172a58..1aa040b890 100644 --- a/signer/core/apitypes/types.go +++ b/signer/core/apitypes/types.go @@ -18,6 +18,7 @@ package apitypes import ( "bytes" + "crypto/sha256" "encoding/json" "errors" "fmt" @@ -28,7 +29,6 @@ import ( "strconv" "strings" - "crypto/sha256" "github.com/ethereum/go-ethereum/accounts" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" diff --git a/signer/core/apitypes/types_test.go b/signer/core/apitypes/types_test.go index daffdefc2a..324ff8a840 100644 --- a/signer/core/apitypes/types_test.go +++ b/signer/core/apitypes/types_test.go @@ -17,10 +17,10 @@ package apitypes import ( + "crypto/sha256" "encoding/json" "testing" - "crypto/sha256" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto/kzg4844" @@ -67,7 +67,6 @@ func TestTxArgs(t *testing.T) { wantType: types.DynamicFeeTxType, }, } { - var txArgs SendTxArgs if err := json.Unmarshal(tc.data, &txArgs); err != nil { t.Fatal(err) @@ -110,16 +109,16 @@ func TestTxArgs(t *testing.T) { func TestBlobTxs(t *testing.T) { blob := kzg4844.Blob{0x1} - committment, err := kzg4844.BlobToCommitment(blob) + commitment, err := kzg4844.BlobToCommitment(blob) if err != nil { t.Fatal(err) } - proof, err := kzg4844.ComputeBlobProof(blob, committment) + proof, err := kzg4844.ComputeBlobProof(blob, commitment) if err != nil { t.Fatal(err) } - hash := kzg4844.CalcBlobHashV1(sha256.New(), &committment) + hash := kzg4844.CalcBlobHashV1(sha256.New(), &commitment) b := &types.BlobTx{ ChainID: uint256.NewInt(6), Nonce: 8, @@ -131,7 +130,7 @@ func TestBlobTxs(t *testing.T) { Value: uint256.NewInt(100), Sidecar: &types.BlobTxSidecar{ Blobs: []kzg4844.Blob{blob}, - Commitments: []kzg4844.Commitment{committment}, + Commitments: []kzg4844.Commitment{commitment}, Proofs: []kzg4844.Proof{proof}, }, } @@ -141,5 +140,4 @@ func TestBlobTxs(t *testing.T) { t.Fatal(err) } t.Logf("tx %v", string(data)) - }