Skip to content

Commit

Permalink
docs: Add note in the circuit ante with authz info
Browse files Browse the repository at this point in the history
  • Loading branch information
Reecepbcups committed Apr 22, 2024
1 parent a19a98b commit c92f4f9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions x/circuit/ante/circuit.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ func NewCircuitBreakerDecorator(ck CircuitBreaker) CircuitBreakerDecorator {
}
}

// If you copy this as reference and your app has the authz module enabled, you must either:
// - recessively check for nested authz.Exec messages in this function.
// - or error early if a nested authz grant is found.
// The circuit AnteHandler handles this with baseapp's service router: https://github.com/cosmos/cosmos-sdk/issues/18632.
func (cbd CircuitBreakerDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (sdk.Context, error) {
// loop through all the messages and check if the message type is allowed
for _, msg := range tx.GetMsgs() {
Expand Down

0 comments on commit c92f4f9

Please sign in to comment.