diff --git a/encoding/da.go b/encoding/da.go index 814cbf3..e20dc0a 100644 --- a/encoding/da.go +++ b/encoding/da.go @@ -9,6 +9,7 @@ import ( "math/big" "slices" + "github.com/holiman/uint256" "github.com/klauspost/compress/zstd" "github.com/scroll-tech/go-ethereum/crypto" @@ -261,7 +262,24 @@ func convertTxDataToRLPEncoding(txData *types.TransactionData) ([]byte, error) { S: txData.S.ToInt(), }) - default: // BlobTxType, SetCodeTxType, L1MessageTxType + case types.SetCodeTxType: + tx = types.NewTx(&types.SetCodeTx{ + ChainID: uint256.MustFromBig(txData.ChainId.ToInt()), + Nonce: txData.Nonce, + To: *txData.To, + Value: uint256.MustFromBig(txData.Value.ToInt()), + Gas: txData.Gas, + GasTipCap: uint256.MustFromBig(txData.GasTipCap.ToInt()), + GasFeeCap: uint256.MustFromBig(txData.GasFeeCap.ToInt()), + Data: data, + AccessList: txData.AccessList, + AuthList: txData.AuthorizationList, + V: uint256.MustFromBig(txData.V.ToInt()), + R: uint256.MustFromBig(txData.R.ToInt()), + S: uint256.MustFromBig(txData.S.ToInt()), + }) + + default: // BlobTxType, L1MessageTxType return nil, fmt.Errorf("unsupported tx type: %d", txData.Type) } diff --git a/go.mod b/go.mod index f9cae06..8785417 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.21 require ( github.com/agiledragon/gomonkey/v2 v2.12.0 - github.com/scroll-tech/go-ethereum v1.10.14-0.20250206083728-ea43834c198f + github.com/scroll-tech/go-ethereum v1.10.14-0.20250225152658-bcfdb48dd939 github.com/stretchr/testify v1.9.0 ) @@ -18,7 +18,7 @@ require ( github.com/ethereum/c-kzg-4844/bindings/go v0.0.0-20230126171313-363c7d7593b4 // indirect github.com/go-ole/go-ole v1.3.0 // indirect github.com/go-stack/stack v1.8.1 // indirect - github.com/holiman/uint256 v1.2.4 // indirect + github.com/holiman/uint256 v1.2.4 github.com/iden3/go-iden3-crypto v0.0.15 // indirect github.com/klauspost/compress v1.17.9 github.com/kr/text v0.2.0 // indirect diff --git a/go.sum b/go.sum index e7cda67..0199528 100644 --- a/go.sum +++ b/go.sum @@ -78,8 +78,8 @@ github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis= github.com/rivo/uniseg v0.4.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= -github.com/scroll-tech/go-ethereum v1.10.14-0.20250206083728-ea43834c198f h1:WgIRuMWa7Q/xD1LHPEbQ9PpltasNiYR04qFzatiP/R0= -github.com/scroll-tech/go-ethereum v1.10.14-0.20250206083728-ea43834c198f/go.mod h1:Ik3OBLl7cJxPC+CFyCBYNXBPek4wpdzkWehn/y5qLM8= +github.com/scroll-tech/go-ethereum v1.10.14-0.20250225152658-bcfdb48dd939 h1:KODmYD4s4BY/SBheCHqGbATnGPLQKzTJVuAElA8Eh+0= +github.com/scroll-tech/go-ethereum v1.10.14-0.20250225152658-bcfdb48dd939/go.mod h1:AgU8JJxC7+nfs7R7ma35AU7dMAGW7wCw3dRZRefIKyQ= github.com/scroll-tech/zktrie v0.8.4 h1:UagmnZ4Z3ITCk+aUq9NQZJNAwnWl4gSxsLb2Nl7IgRE= github.com/scroll-tech/zktrie v0.8.4/go.mod h1:XvNo7vAk8yxNyTjBDj5WIiFzYW4bx/gJ78+NK6Zn6Uk= github.com/shirou/gopsutil v3.21.11+incompatible h1:+1+c1VGhc88SSonWP6foOcLhvnKlUeu/erjjvaPEYiI=