Skip to content

Commit

Permalink
Update DepositTx for monorepo #1410 (#42)
Browse files Browse the repository at this point in the history
astriaorg/astria#1410 changes the `Deposit`
message in the `sequencer_block` API, necessitating changes to
`DepositTx` in Geth
  • Loading branch information
ethanoroshiba authored Sep 11, 2024
1 parent e5c5013 commit 401c3d5
Show file tree
Hide file tree
Showing 6 changed files with 138 additions and 12 deletions.
8 changes: 8 additions & 0 deletions core/types/deposit_tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (

"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/rlp"
primitivev1 "buf.build/gen/go/astria/primitives/protocolbuffers/go/astria/primitive/v1"
)

var _ TxData = &DepositTx{}
Expand All @@ -24,6 +25,11 @@ type DepositTx struct {
// if this is an ERC20 mint, the following field is set
// to the `mint` function calldata.
Data []byte
// the transaction ID of the source action for the deposit, consisting
// of the transaction hash.
SourceTransactionId primitivev1.TransactionId
// index of the deposit's source action within its transaction
SourceTransactionIndex uint64
}

func (tx *DepositTx) copy() TxData {
Expand All @@ -38,6 +44,8 @@ func (tx *DepositTx) copy() TxData {
Gas: tx.Gas,
To: to,
Data: make([]byte, len(tx.Data)),
SourceTransactionId: tx.SourceTransactionId,
SourceTransactionIndex: tx.SourceTransactionIndex,
}

if tx.Value != nil {
Expand Down
26 changes: 14 additions & 12 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ module github.com/ethereum/go-ethereum
go 1.21

require (
buf.build/gen/go/astria/execution-apis/grpc/go v1.4.0-20240627184145-202c666b5a8a.2
buf.build/gen/go/astria/execution-apis/protocolbuffers/go v1.34.2-20240723183210-193b02425a52.2
buf.build/gen/go/astria/primitives/protocolbuffers/go v1.34.2-20240723183210-d00b2a17ea5b.2
buf.build/gen/go/astria/sequencerblock-apis/protocolbuffers/go v1.34.2-20240723183210-414756da3320.2
buf.build/gen/go/astria/execution-apis/grpc/go v1.4.0-20240725205400-4746841755df.1
buf.build/gen/go/astria/execution-apis/protocolbuffers/go v1.34.1-20240725205400-4746841755df.1
buf.build/gen/go/astria/primitives/protocolbuffers/go v1.34.2-20240911152449-eeebd3decdce.2
buf.build/gen/go/astria/sequencerblock-apis/protocolbuffers/go v1.34.2-20240911152449-b41cca615e35.2
github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.2.0
github.com/Microsoft/go-winio v0.6.1
github.com/VictoriaMetrics/fastcache v1.12.1
Expand Down Expand Up @@ -72,21 +72,23 @@ require (
github.com/tyler-smith/go-bip39 v1.1.0
github.com/urfave/cli/v2 v2.25.7
go.uber.org/automaxprocs v1.5.2
golang.org/x/crypto v0.22.0
golang.org/x/crypto v0.24.0
golang.org/x/sync v0.7.0
golang.org/x/sys v0.19.0
golang.org/x/text v0.14.0
golang.org/x/sys v0.21.0
golang.org/x/text v0.16.0
golang.org/x/time v0.5.0
golang.org/x/tools v0.20.0
google.golang.org/grpc v1.64.0
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d
google.golang.org/grpc v1.64.1
google.golang.org/protobuf v1.34.2
gopkg.in/natefinch/lumberjack.v2 v2.0.0
gopkg.in/yaml.v3 v3.0.1
)

require (
buf.build/gen/go/astria/protocol-apis/grpc/go v1.4.0-00000000000000-71710707f61c.2 // indirect
buf.build/gen/go/astria/protocol-apis/protocolbuffers/go v1.34.2-20240723183210-71710707f61c.2 // indirect
buf.build/gen/go/astria/primitives/grpc/go v1.5.1-20240911152449-eeebd3decdce.1 // indirect
buf.build/gen/go/astria/protocol-apis/grpc/go v1.3.0-20240829200558-cd9207200425.3 // indirect
buf.build/gen/go/astria/protocol-apis/protocolbuffers/go v1.34.1-20240829200558-cd9207200425.1 // indirect
buf.build/gen/go/astria/sequencerblock-apis/grpc/go v1.5.1-20240911152449-b41cca615e35.1 // indirect
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.0 // indirect
github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 // indirect
github.com/DataDog/zstd v1.4.5 // indirect
Expand Down Expand Up @@ -151,7 +153,7 @@ require (
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect
golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa // indirect
golang.org/x/mod v0.17.0 // indirect
golang.org/x/net v0.24.0 // indirect
golang.org/x/net v0.26.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240318140521-94a12d6c2237 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
Expand Down
Loading

0 comments on commit 401c3d5

Please sign in to comment.