Skip to content

Commit

Permalink
Update for monorepo change
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanoroshiba committed Sep 9, 2024
1 parent 4059165 commit 2decffc
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 18 deletions.
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ require (
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-00000000000000-b105b5fe0803.2
buf.build/gen/go/astria/sequencerblock-apis/protocolbuffers/go v1.34.2-00000000000000-b39f8a7c1a92.2
buf.build/gen/go/astria/sequencerblock-apis/protocolbuffers/go v1.34.2-00000000000000-052018b21b15.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 @@ -88,7 +88,7 @@ require (
buf.build/gen/go/astria/primitives/grpc/go v1.5.1-00000000000000-b105b5fe0803.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-00000000000000-b39f8a7c1a92.1 // indirect
buf.build/gen/go/astria/sequencerblock-apis/grpc/go v1.5.1-00000000000000-052018b21b15.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
4 changes: 4 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ buf.build/gen/go/astria/sequencerblock-apis/grpc/go v1.4.0-20240627184145-00f432
buf.build/gen/go/astria/sequencerblock-apis/grpc/go v1.4.0-20240627184145-00f432997496.1/go.mod h1:viF0ZoRvyO5qpIZb1wB3aBBt9WWKOg5x5t6AFKKuKQU=
buf.build/gen/go/astria/sequencerblock-apis/grpc/go v1.4.0-20240723183210-414756da3320.2 h1:rhJ4gciZvp0H2IHAF72yrlDFAgy72s8l/X7cm61oVk4=
buf.build/gen/go/astria/sequencerblock-apis/grpc/go v1.4.0-20240723183210-414756da3320.2/go.mod h1:bq36IyO59yTRbhgGQ4o09smhvdlX4VbWxmxsW3cZeks=
buf.build/gen/go/astria/sequencerblock-apis/grpc/go v1.5.1-00000000000000-052018b21b15.1 h1:y6pjKtmP2dBECJmtXs/7B9jIpZBihpkV+WbyrixWDHQ=
buf.build/gen/go/astria/sequencerblock-apis/grpc/go v1.5.1-00000000000000-052018b21b15.1/go.mod h1:5fNPa9zOUcbAfoEHep2OrjI8mHatAWzcctF8XzEReDs=
buf.build/gen/go/astria/sequencerblock-apis/grpc/go v1.5.1-00000000000000-0e78da5ba4c9.1 h1:nfW9T6i2Dg3hJnlgrQG3g8W+I2WF+tLDtCTkwdPe3DQ=
buf.build/gen/go/astria/sequencerblock-apis/grpc/go v1.5.1-00000000000000-0e78da5ba4c9.1/go.mod h1:L8S1yyeNSgkQchKxEJjdKwFNJs0rqKyjbSIztS3qmKg=
buf.build/gen/go/astria/sequencerblock-apis/grpc/go v1.5.1-00000000000000-5ed8a932ed80.1 h1:YLShZCj89DBmsZElX8BBG/nGtZur/Trq+4gFOBFifio=
Expand All @@ -82,6 +84,8 @@ buf.build/gen/go/astria/sequencerblock-apis/grpc/go v1.5.1-20240807170122-24ff5b
buf.build/gen/go/astria/sequencerblock-apis/grpc/go v1.5.1-20240807170122-24ff5bcd4581.1/go.mod h1:ApPfVXzFQPCqlRfdLVR8KxIp9PN1SvfUBXhteZKX/Yk=
buf.build/gen/go/astria/sequencerblock-apis/protocolbuffers/go v1.34.0-20240627184145-00f432997496.1/go.mod h1:qct0qusz8ErM7XwIwAL1fWCIbyjOnlKGUNJwnURUhD8=
buf.build/gen/go/astria/sequencerblock-apis/protocolbuffers/go v1.34.1-20240627184145-00f432997496.1/go.mod h1:KkZ92tBsbbl5HTuN/AbQLkW2ALXsaV5MsEU9PPy/n9c=
buf.build/gen/go/astria/sequencerblock-apis/protocolbuffers/go v1.34.2-00000000000000-052018b21b15.2 h1:w3WWYikMWrA1Co3ANmpRLOxcsJ0sr2v3ECdwE78/k5Y=
buf.build/gen/go/astria/sequencerblock-apis/protocolbuffers/go v1.34.2-00000000000000-052018b21b15.2/go.mod h1:GShpCrRMWSWehIzL2nP8faSYO/x79trwjhlY+mN8dIw=
buf.build/gen/go/astria/sequencerblock-apis/protocolbuffers/go v1.34.2-00000000000000-0e78da5ba4c9.2 h1:EAxdP6CmcWPVdmLaypadNGKnvMiawwYjxr843E5FmAk=
buf.build/gen/go/astria/sequencerblock-apis/protocolbuffers/go v1.34.2-00000000000000-0e78da5ba4c9.2/go.mod h1:hWPoL+J3ri6/uTPKe9hHBPYV6mqYwnS3J3P1n5RTKe0=
buf.build/gen/go/astria/sequencerblock-apis/protocolbuffers/go v1.34.2-00000000000000-5ed8a932ed80.2 h1:5pWDT2BBWoFTPCmlBciX1iaotjFCpsW9bQgBQLevnCw=
Expand Down
8 changes: 4 additions & 4 deletions grpc/execution/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -302,10 +302,10 @@ func TestExecutionServiceServerV1Alpha2_ExecuteBlock(t *testing.T) {
Amount: depositAmount,
RollupId: genesisInfo.RollupId,
DestinationChainAddress: chainDestinationAddress.String(),
IdOfSourceTransaction: &primitivev1.TransactionId{
SourceTransactionId: &primitivev1.TransactionId{
Inner: "test_tx_hash",
},
PositionInSourceTransaction: 0,
SourceActionIndex: 0,
}}}

marshalledTxs = append(marshalledTxs, depositTx)
Expand Down Expand Up @@ -399,10 +399,10 @@ func TestExecutionServiceServerV1Alpha2_ExecuteBlockAndUpdateCommitment(t *testi
Amount: depositAmount,
RollupId: genesisInfo.RollupId,
DestinationChainAddress: chainDestinationAddress.String(),
IdOfSourceTransaction: &primitivev1.TransactionId{
SourceTransactionId: &primitivev1.TransactionId{
Inner: "test_tx_hash",
},
PositionInSourceTransaction: 0,
SourceActionIndex: 0,
}}}

marshalledTxs = append(marshalledTxs, depositTx)
Expand Down
8 changes: 4 additions & 4 deletions grpc/execution/validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ func validateAndUnmarshalSequencerTx(
Gas: 16000,
To: &bac.Erc20Asset.ContractAddress,
Data: calldata,
IdOfSourceTransaction: *deposit.IdOfSourceTransaction,
PositionInSourceTransaction: deposit.PositionInSourceTransaction,
IdOfSourceTransaction: *deposit.SourceTransactionId,
PositionInSourceTransaction: deposit.SourceActionIndex,
}

tx := types.NewTx(&txdata)
Expand All @@ -83,8 +83,8 @@ func validateAndUnmarshalSequencerTx(
To: &recipient,
Value: amount,
Gas: 0,
IdOfSourceTransaction: *deposit.IdOfSourceTransaction,
PositionInSourceTransaction: deposit.PositionInSourceTransaction,
IdOfSourceTransaction: *deposit.SourceTransactionId,
PositionInSourceTransaction: deposit.SourceActionIndex,
}
return types.NewTx(&txdata), nil
} else {
Expand Down
16 changes: 8 additions & 8 deletions grpc/execution/validation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,10 @@ func TestSequenceTxValidation(t *testing.T) {
Amount: bigIntToProtoU128(big.NewInt(1000000000000000000)),
RollupId: &primitivev1.RollupId{Inner: make([]byte, 0)},
DestinationChainAddress: chainDestinationAddress.String(),
IdOfSourceTransaction: &primitivev1.TransactionId{
SourceTransactionId: &primitivev1.TransactionId{
Inner: "test_tx_hash",
},
PositionInSourceTransaction: 0,
SourceActionIndex: 0,
}}},
wantErr: "unknown bridge address",
},
Expand All @@ -144,10 +144,10 @@ func TestSequenceTxValidation(t *testing.T) {
Amount: bigIntToProtoU128(big.NewInt(1000000000000000000)),
RollupId: &primitivev1.RollupId{Inner: make([]byte, 0)},
DestinationChainAddress: chainDestinationAddress.String(),
IdOfSourceTransaction: &primitivev1.TransactionId{
SourceTransactionId: &primitivev1.TransactionId{
Inner: "test_tx_hash",
},
PositionInSourceTransaction: 0,
SourceActionIndex: 0,
}}},
wantErr: "disallowed asset",
},
Expand All @@ -161,10 +161,10 @@ func TestSequenceTxValidation(t *testing.T) {
Amount: bigIntToProtoU128(big.NewInt(1000000000000000000)),
RollupId: &primitivev1.RollupId{Inner: make([]byte, 0)},
DestinationChainAddress: chainDestinationAddress.String(),
IdOfSourceTransaction: &primitivev1.TransactionId{
SourceTransactionId: &primitivev1.TransactionId{
Inner: "test_tx_hash",
},
PositionInSourceTransaction: 0,
SourceActionIndex: 0,
}}},
wantErr: "not allowed before height",
},
Expand All @@ -178,10 +178,10 @@ func TestSequenceTxValidation(t *testing.T) {
Amount: bigIntToProtoU128(big.NewInt(1000000000000000000)),
RollupId: &primitivev1.RollupId{Inner: make([]byte, 0)},
DestinationChainAddress: chainDestinationAddress.String(),
IdOfSourceTransaction: &primitivev1.TransactionId{
SourceTransactionId: &primitivev1.TransactionId{
Inner: "test_tx_hash",
},
PositionInSourceTransaction: 0,
SourceActionIndex: 0,
}}},
wantErr: "",
},
Expand Down

0 comments on commit 2decffc

Please sign in to comment.