Token Store
What everyone needs to know
- A token store contract manages project token balances, as well as minting and burning.
- All projects using the protocol share a token store (within one protocol version). It is a core protocol contract – for Juicebox, this is
JBTokenStore
. JBTokenStore
contains several useful read methods:JBTokenStore.balanceOf(...)
returns a holder's total token balance for a project (including claimed and unclaimed tokens), andJBTokenStore.totalSupplyOf(...)
returns a project token's total supply (also including claimed and unclaimed tokens).- Project owners can call
JBTokenStore.issueFor(...)
to issue a claimable ERC-20 for their project token.
What you'll want to know if you're building
- A token store is a core protocol contract which must adhere to the
IJBTokenStore
interface. - A project's token store address can be accessed via
JBController3_1.tokenStore
. - Projects do not typically interact directly with
JBTokenStore
, instead using methods on the project's controller. For new projects, this isJBController3_1
.