@@ -49,7 +49,7 @@ func AddressToDelegation(addr common.Address) []byte {
4949// SetCodeTx implements the EIP-7702 transaction type which temporarily installs
5050// the code at the signer's address.
5151type SetCodeTx struct {
52- ChainID uint64
52+ ChainID * uint256. Int
5353 Nonce uint64
5454 GasTipCap * uint256.Int // a.k.a. maxPriorityFeePerGas
5555 GasFeeCap * uint256.Int // a.k.a. maxFeePerGas
@@ -61,16 +61,16 @@ type SetCodeTx struct {
6161 AuthList []SetCodeAuthorization
6262
6363 // Signature values
64- V * uint256.Int `json:"v" gencodec:"required"`
65- R * uint256.Int `json:"r" gencodec:"required"`
66- S * uint256.Int `json:"s" gencodec:"required"`
64+ V * uint256.Int
65+ R * uint256.Int
66+ S * uint256.Int
6767}
6868
6969//go:generate go run github.com/fjl/gencodec -type SetCodeAuthorization -field-override authorizationMarshaling -out gen_authorization.go
7070
7171// SetCodeAuthorization is an authorization from an account to deploy code at its address.
7272type SetCodeAuthorization struct {
73- ChainID uint64 `json:"chainId" gencodec:"required"`
73+ ChainID uint256. Int `json:"chainId" gencodec:"required"`
7474 Address common.Address `json:"address" gencodec:"required"`
7575 Nonce uint64 `json:"nonce" gencodec:"required"`
7676 V uint8 `json:"yParity" gencodec:"required"`
@@ -80,7 +80,7 @@ type SetCodeAuthorization struct {
8080
8181// field type overrides for gencodec
8282type authorizationMarshaling struct {
83- ChainID hexutil.Uint64
83+ ChainID hexutil.U256
8484 Nonce hexutil.Uint64
8585 V hexutil.Uint64
8686 R hexutil.U256
@@ -180,7 +180,7 @@ func (tx *SetCodeTx) copy() TxData {
180180
181181// accessors for innerTx.
182182func (tx * SetCodeTx ) txType () byte { return SetCodeTxType }
183- func (tx * SetCodeTx ) chainID () * big.Int { return big . NewInt ( int64 ( tx .ChainID ) ) }
183+ func (tx * SetCodeTx ) chainID () * big.Int { return tx .ChainID . ToBig ( ) }
184184func (tx * SetCodeTx ) accessList () AccessList { return tx .AccessList }
185185func (tx * SetCodeTx ) data () []byte { return tx .Data }
186186func (tx * SetCodeTx ) gas () uint64 { return tx .Gas }
@@ -207,7 +207,7 @@ func (tx *SetCodeTx) rawSignatureValues() (v, r, s *big.Int) {
207207}
208208
209209func (tx * SetCodeTx ) setSignatureValues (chainID , v , r , s * big.Int ) {
210- tx .ChainID = chainID . Uint64 ( )
210+ tx .ChainID = uint256 . MustFromBig ( chainID )
211211 tx .V .SetFromBig (v )
212212 tx .R .SetFromBig (r )
213213 tx .S .SetFromBig (s )
0 commit comments