Skip to content

Commit c92f4f9

Browse files
committed
docs: Add note in the circuit ante with authz info
1 parent a19a98b commit c92f4f9

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

x/circuit/ante/circuit.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ func NewCircuitBreakerDecorator(ck CircuitBreaker) CircuitBreakerDecorator {
2424
}
2525
}
2626

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

0 commit comments

Comments
 (0)