From c50c6b25495188bb2f2ff111b551ef36d9e40975 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juli=C3=A1n=20Toledano?= Date: Mon, 19 Aug 2024 12:16:35 +0200 Subject: [PATCH] docs: update upgrading for nested messages simulation (#21354) --- UPGRADING.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/UPGRADING.md b/UPGRADING.md index d1cf652c23..7218b4e516 100644 --- a/UPGRADING.md +++ b/UPGRADING.md @@ -39,6 +39,11 @@ baseAppOptions = append(baseAppOptions, baseapp.SetIncludeNestedMsgsGas([]sdk.Me app.App = appBuilder.Build(db, traceStore, baseAppOptions...) ``` +To be able to simulate nested messages within a transaction, message types containing nested messages must implement the +`HasNestedMsgs` interface. This interface requires a single method: `GetMsgs() ([]sdk.Msg, error)`, which should return +the nested messages. By implementing this interface, the BaseApp can simulate these nested messages during +transaction simulation. + ## [v0.52.x](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.52.0-alpha.0) Documentation to migrate an application from v0.50.x to server/v2 is available elsewhere.