From 73a4ecf675f6714e1fdf49904ce9426841de2e02 Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Wed, 18 Dec 2024 19:46:15 +0100 Subject: [PATCH] core/types: rename SetCodeAuthorization 'v' to 'yParity' The API spec requires the name yParity. --- core/types/gen_authorization.go | 6 +++--- core/types/tx_setcode.go | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/types/gen_authorization.go b/core/types/gen_authorization.go index c9ab3590bff7..be5467c50d0d 100644 --- a/core/types/gen_authorization.go +++ b/core/types/gen_authorization.go @@ -19,7 +19,7 @@ func (s SetCodeAuthorization) MarshalJSON() ([]byte, error) { ChainID hexutil.Uint64 `json:"chainId" gencodec:"required"` Address common.Address `json:"address" gencodec:"required"` Nonce hexutil.Uint64 `json:"nonce" gencodec:"required"` - V hexutil.Uint64 `json:"v" gencodec:"required"` + V hexutil.Uint64 `json:"yParity" gencodec:"required"` R hexutil.U256 `json:"r" gencodec:"required"` S hexutil.U256 `json:"s" gencodec:"required"` } @@ -39,7 +39,7 @@ func (s *SetCodeAuthorization) UnmarshalJSON(input []byte) error { ChainID *hexutil.Uint64 `json:"chainId" gencodec:"required"` Address *common.Address `json:"address" gencodec:"required"` Nonce *hexutil.Uint64 `json:"nonce" gencodec:"required"` - V *hexutil.Uint64 `json:"v" gencodec:"required"` + V *hexutil.Uint64 `json:"yParity" gencodec:"required"` R *hexutil.U256 `json:"r" gencodec:"required"` S *hexutil.U256 `json:"s" gencodec:"required"` } @@ -60,7 +60,7 @@ func (s *SetCodeAuthorization) UnmarshalJSON(input []byte) error { } s.Nonce = uint64(*dec.Nonce) if dec.V == nil { - return errors.New("missing required field 'v' for SetCodeAuthorization") + return errors.New("missing required field 'yParity' for SetCodeAuthorization") } s.V = uint8(*dec.V) if dec.R == nil { diff --git a/core/types/tx_setcode.go b/core/types/tx_setcode.go index 1be90df615f6..f14ae3bc9d2f 100644 --- a/core/types/tx_setcode.go +++ b/core/types/tx_setcode.go @@ -73,7 +73,7 @@ type SetCodeAuthorization struct { ChainID uint64 `json:"chainId" gencodec:"required"` Address common.Address `json:"address" gencodec:"required"` Nonce uint64 `json:"nonce" gencodec:"required"` - V uint8 `json:"v" gencodec:"required"` + V uint8 `json:"yParity" gencodec:"required"` R uint256.Int `json:"r" gencodec:"required"` S uint256.Int `json:"s" gencodec:"required"` }