From 4a2c13d445437863462b3f763dae64b96a35da44 Mon Sep 17 00:00:00 2001 From: Aleksandr Bezobchuk Date: Sat, 30 Dec 2023 06:16:22 -0500 Subject: [PATCH] chore(docs): update AnteHandler godoc (#18913) --- types/handler.go | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/types/handler.go b/types/handler.go index 456c3904e4..42774086c2 100644 --- a/types/handler.go +++ b/types/handler.go @@ -1,7 +1,14 @@ package types -// AnteHandler authenticates transactions, before their internal messages are handled. -// If newCtx.IsZero(), ctx is used instead. +// AnteHandler authenticates transactions, before their internal messages are +// executed. The provided ctx is expected to contain all relevant information +// needed to process the transaction, e.g. fee payment information. If new data +// is required for the remainder of the AnteHandler execution, a new Context should +// be created off of the provided Context and returned as . +// +// The simulate argument is provided to indicate if the AnteHandler is being executed +// in simulation mode, which attempts to estimate a gas cost for the tx. Any state +// modifications made will be discarded if simulate is true. type AnteHandler func(ctx Context, tx Tx, simulate bool) (newCtx Context, err error) // PostHandler like AnteHandler but it executes after RunMsgs. Runs on success