Skip to content

Commit

Permalink
feat: Share cosmos-sdk runtime [viper] configuration with the cosmic-…
Browse files Browse the repository at this point in the history
…swingset VM

Ref #9946
  • Loading branch information
gibson042 authored and siarhei-agoric committed Aug 30, 2024
1 parent c0984ef commit a262a3f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions golang/cosmos/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,10 @@ func NewAgoricApp(
tkeys: tkeys,
memKeys: memKeys,
}
// The VM is entitled to full awareness of runtime configuration.
if resolvedConfig, ok := appOpts.(*viper.Viper); ok {
app.resolvedConfig = resolvedConfig.AllSettings()
}

app.ParamsKeeper = initParamsKeeper(
appCodec,
Expand Down
1 change: 1 addition & 0 deletions packages/cosmic-swingset/src/chain-main.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ const makeBootMsg = initAction => {
blockHeight,
chainID,
params,
resolvedConfig,
supplyCoins,
};
};
Expand Down

0 comments on commit a262a3f

Please sign in to comment.