-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[occ] Add batch tx delivery interface (#327)
## Describe your changes and provide context - `sei-cosmos` will receive a list of transactions, so that sei-chain does not need to hold the logic for OCC - This will make the logic easier to test, as sei-cosmos will be fairly self-contained - Types can be extended within a tx and within request/response Example interaction: <img src="https://github.com/sei-protocol/sei-cosmos/assets/6051744/58c9a263-7bc6-4ede-83ab-5e34794510b1" width=50% height=50%> ## Testing performed to validate your change - This is a skeleton for a batch interface
- Loading branch information
1 parent
ca79280
commit 5dad903
Showing
2 changed files
with
42 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package types | ||
|
||
import abci "github.com/tendermint/tendermint/abci/types" | ||
|
||
// DeliverTxEntry represents an individual transaction's request within a batch. | ||
// This can be extended to include tx-level tracing or metadata | ||
type DeliverTxEntry struct { | ||
Request abci.RequestDeliverTx | ||
} | ||
|
||
// DeliverTxBatchRequest represents a request object for a batch of transactions. | ||
// This can be extended to include request-level tracing or metadata | ||
type DeliverTxBatchRequest struct { | ||
TxEntries []*DeliverTxEntry | ||
} | ||
|
||
// DeliverTxResult represents an individual transaction's response within a batch. | ||
// This can be extended to include tx-level tracing or metadata | ||
type DeliverTxResult struct { | ||
Response abci.ResponseDeliverTx | ||
} | ||
|
||
// DeliverTxBatchResponse represents a response object for a batch of transactions. | ||
// This can be extended to include response-level tracing or metadata | ||
type DeliverTxBatchResponse struct { | ||
Results []*DeliverTxResult | ||
} |