Skip to content

Commit 6f74c82

Browse files
author
colinlyguo
committed
feat: support set code transaction
1 parent e1a0bab commit 6f74c82

File tree

4 files changed

+25
-27
lines changed

4 files changed

+25
-27
lines changed

go.work.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1358,11 +1358,13 @@ github.com/scroll-tech/da-codec v0.1.1-0.20241005172014-aca0bef21638 h1:2KIfClLB
13581358
github.com/scroll-tech/da-codec v0.1.1-0.20241005172014-aca0bef21638/go.mod h1:6jxEQvNc7GQKMSUi25PthAUY3WnZL8CN0yWivBgAXi0=
13591359
github.com/scroll-tech/da-codec v0.1.1-0.20241014152913-2703f226fb0b h1:5H6V6ybacXFJ2ti+eFwtf+12Otufod6goxK6/u7Nu1k=
13601360
github.com/scroll-tech/da-codec v0.1.1-0.20241014152913-2703f226fb0b/go.mod h1:48uxaqVgpD8ulH8p+nrBtfeLHZ9tX82bVVdPNkW3rPE=
1361+
github.com/scroll-tech/da-codec v0.1.3-0.20250210041951-d028c537b995/go.mod h1:UZhhjzqYsyEhcvY0Y+SP+oMdeOUqFn/UXpbAYuPGzg0=
13611362
github.com/scroll-tech/go-ethereum v1.10.14-0.20240607130425-e2becce6a1a4/go.mod h1:byf/mZ8jLYUCnUePTicjJWn+RvKdxDn7buS6glTnMwQ=
13621363
github.com/scroll-tech/go-ethereum v1.10.14-0.20240821074444-b3fa00861e5e/go.mod h1:swB5NSp8pKNDuYsTxfR08bHS6L56i119PBx8fxvV8Cs=
13631364
github.com/scroll-tech/go-ethereum v1.10.14-0.20241010064814-3d88e870ae22/go.mod h1:r9FwtxCtybMkTbWYCyBuevT9TW3zHmOTHqD082Uh+Oo=
13641365
github.com/scroll-tech/go-ethereum v1.10.14-0.20250103082839-ea3ec93d8c1e/go.mod h1:Ik3OBLl7cJxPC+CFyCBYNXBPek4wpdzkWehn/y5qLM8=
13651366
github.com/scroll-tech/go-ethereum v1.10.14-0.20250206083728-ea43834c198f h1:WgIRuMWa7Q/xD1LHPEbQ9PpltasNiYR04qFzatiP/R0=
1367+
github.com/scroll-tech/go-ethereum v1.10.14-0.20250206083728-ea43834c198f/go.mod h1:Ik3OBLl7cJxPC+CFyCBYNXBPek4wpdzkWehn/y5qLM8=
13661368
github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I=
13671369
github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc=
13681370
github.com/segmentio/kafka-go v0.1.0/go.mod h1:X6itGqS9L4jDletMsxZ7Dz+JFWxM6JHfPOCvTvk+EJo=

rollup/go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ require (
1313
github.com/holiman/uint256 v1.3.2
1414
github.com/mitchellh/mapstructure v1.5.0
1515
github.com/prometheus/client_golang v1.16.0
16-
github.com/scroll-tech/da-codec v0.1.3-0.20250220081745-fca406cec624
17-
github.com/scroll-tech/go-ethereum v1.10.14-0.20250206083728-ea43834c198f
16+
github.com/scroll-tech/da-codec v0.1.3-0.20250226072559-f8a8d3898f54
17+
github.com/scroll-tech/go-ethereum v1.10.14-0.20250225152658-bcfdb48dd939
1818
github.com/smartystreets/goconvey v1.8.0
1919
github.com/spf13/viper v1.19.0
2020
github.com/stretchr/testify v1.10.0

rollup/go.sum

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -249,15 +249,10 @@ github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6ke
249249
github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4=
250250
github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE=
251251
github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ=
252-
github.com/scroll-tech/da-codec v0.1.3-0.20250206084714-d61e2cbe7cd5 h1:vsSXTjYDggo6TgHxS8KYl4IYHi+EawpzeqQ64X2W/cw=
253-
github.com/scroll-tech/da-codec v0.1.3-0.20250206084714-d61e2cbe7cd5/go.mod h1:RCDoKwQgZMr/GbD1rKiLA90+0faOzOD6JJm0Bq/7vQs=
254-
github.com/scroll-tech/da-codec v0.1.3-0.20250220070949-01bd9b5cfff4 h1:0YWE0uUitjdt8xyQsWTErfhQIgALJhRlwRZ6bU0xLhA=
255-
github.com/scroll-tech/da-codec v0.1.3-0.20250220070949-01bd9b5cfff4/go.mod h1:UZhhjzqYsyEhcvY0Y+SP+oMdeOUqFn/UXpbAYuPGzg0=
256-
github.com/scroll-tech/da-codec v0.1.3-0.20250220081745-fca406cec624 h1:tKaCH0STAsKODYODc5AjpRaiQaCSq4tycKtBoYBvMFs=
257-
github.com/scroll-tech/da-codec v0.1.3-0.20250220081745-fca406cec624/go.mod h1:UZhhjzqYsyEhcvY0Y+SP+oMdeOUqFn/UXpbAYuPGzg0=
258-
github.com/scroll-tech/go-ethereum v1.10.14-0.20250205135740-4bdf6d096c38 h1:IKkevP42IQx8DQvtVq9WOmZDQrto59CGdEheXPf20HA=
259-
github.com/scroll-tech/go-ethereum v1.10.14-0.20250205135740-4bdf6d096c38/go.mod h1:Ik3OBLl7cJxPC+CFyCBYNXBPek4wpdzkWehn/y5qLM8=
260-
github.com/scroll-tech/go-ethereum v1.10.14-0.20250206083728-ea43834c198f/go.mod h1:Ik3OBLl7cJxPC+CFyCBYNXBPek4wpdzkWehn/y5qLM8=
252+
github.com/scroll-tech/da-codec v0.1.3-0.20250226072559-f8a8d3898f54 h1:qVpsVu1J91opTn6HYeuzWcBRVhQmPR8g05i+PlOjlI4=
253+
github.com/scroll-tech/da-codec v0.1.3-0.20250226072559-f8a8d3898f54/go.mod h1:xECEHZLVzbdUn+tNbRJhRIjLGTOTmnFQuTgUTeVLX58=
254+
github.com/scroll-tech/go-ethereum v1.10.14-0.20250225152658-bcfdb48dd939 h1:KODmYD4s4BY/SBheCHqGbATnGPLQKzTJVuAElA8Eh+0=
255+
github.com/scroll-tech/go-ethereum v1.10.14-0.20250225152658-bcfdb48dd939/go.mod h1:AgU8JJxC7+nfs7R7ma35AU7dMAGW7wCw3dRZRefIKyQ=
261256
github.com/scroll-tech/zktrie v0.8.4 h1:UagmnZ4Z3ITCk+aUq9NQZJNAwnWl4gSxsLb2Nl7IgRE=
262257
github.com/scroll-tech/zktrie v0.8.4/go.mod h1:XvNo7vAk8yxNyTjBDj5WIiFzYW4bx/gJ78+NK6Zn6Uk=
263258
github.com/shirou/gopsutil v3.21.11+incompatible h1:+1+c1VGhc88SSonWP6foOcLhvnKlUeu/erjjvaPEYiI=

rollup/internal/controller/watcher/l2_watcher.go

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -101,22 +101,23 @@ func txsToTxsData(txs gethTypes.Transactions) []*gethTypes.TransactionData {
101101
}
102102

103103
txsData[i] = &gethTypes.TransactionData{
104-
Type: tx.Type(),
105-
TxHash: tx.Hash().String(),
106-
Nonce: nonce,
107-
ChainId: (*hexutil.Big)(tx.ChainId()),
108-
Gas: tx.Gas(),
109-
GasPrice: (*hexutil.Big)(tx.GasPrice()),
110-
GasTipCap: (*hexutil.Big)(tx.GasTipCap()),
111-
GasFeeCap: (*hexutil.Big)(tx.GasFeeCap()),
112-
To: tx.To(),
113-
Value: (*hexutil.Big)(tx.Value()),
114-
Data: hexutil.Encode(tx.Data()),
115-
IsCreate: tx.To() == nil,
116-
AccessList: tx.AccessList(),
117-
V: (*hexutil.Big)(v),
118-
R: (*hexutil.Big)(r),
119-
S: (*hexutil.Big)(s),
104+
Type: tx.Type(),
105+
TxHash: tx.Hash().String(),
106+
Nonce: nonce,
107+
ChainId: (*hexutil.Big)(tx.ChainId()),
108+
Gas: tx.Gas(),
109+
GasPrice: (*hexutil.Big)(tx.GasPrice()),
110+
GasTipCap: (*hexutil.Big)(tx.GasTipCap()),
111+
GasFeeCap: (*hexutil.Big)(tx.GasFeeCap()),
112+
To: tx.To(),
113+
Value: (*hexutil.Big)(tx.Value()),
114+
Data: hexutil.Encode(tx.Data()),
115+
IsCreate: tx.To() == nil,
116+
AccessList: tx.AccessList(),
117+
AuthorizationList: tx.SetCodeAuthorizations(),
118+
V: (*hexutil.Big)(v),
119+
R: (*hexutil.Big)(r),
120+
S: (*hexutil.Big)(s),
120121
}
121122
}
122123
return txsData

0 commit comments

Comments
 (0)