Skip to content
Cosmopediaby Unity Nodes
DiscussionsCosmos-SDKGet total supply in bank keeperForum ↗

Get total supply in bank keeper

Cosmos-SDK1 posts616 viewsLast activity Sep 2019
JW
jws325OP
Sep 2019

Hi,

I need to access supplyKeeper.GetSupply inside of the bank’s keeper.go.

I noticed that the bank keeper is passed to the supply keeper’s constructor, so supply keeper has a reference to bank keeper.

Can I pass supply keeper to bank keeper’s constructor, or is that a circular reference?

If this is not allowed, how can the bank keeper figure out what the total supply is?

Thanks.

← Back to Discussions