Skip to main content

JBTokenStore

Manage token minting, burning, and account balances.

Code

https://github.com/jbx-protocol/juice-contracts-v3/blob/main/contracts/JBTokenStore.sol

Addresses

Ethereum mainnet: 0x6FA996581D7edaABE62C15eaE19fEeD4F1DdDfE7

Goerli testnet: 0x1246a50e3aDaF684Ac566f0c40816fF738F309B3

Interfaces

NameDescription
IJBTokenStoreGeneral interface for the methods in this contract that interact with the blockchain's state according to the protocol's rules.

Inheritance

ContractDescription
JBControllerUtilityIncludes convenience functionality for checking if the message sender is the current controller of the project whose data is being manipulated.
JBOperatableIncludes convenience functionality for checking a message sender's permissions before executing certain transactions.

Constructor

/**
@param _operatorStore A contract storing operator assignments.
@param _projects A contract which mints ERC-721's that represent project ownership and transfers.
@param _directory A contract storing directories of terminals and controllers for each project.
@param _fundingCycleStore A contract storing all funding cycle configurations.

*/
constructor(
IJBOperatorStore _operatorStore,
IJBProjects _projects,
IJBDirectory _directory,
IJBFundingCycleStore _fundingCycleStore
) JBOperatable(_operatorStore) JBControllerUtility(_directory) {
projects = _projects;
fundingCycleStore = _fundingCycleStore;
}
  • _operatorStore is an IJBOperatorStore contract storing operator assignments.
  • _projects is an IJBProjects contract which mints ERC-721's that represent project ownership and transfers.
  • _directory is an IJBDirectory contract storing directories of terminals and controllers for each project.
  • _fundingCycleStore is an IJBFundingCycleStore contract storing all funding cycle configurations.

Events

NameData
Issue
  • uint256 indexed projectId
  • IJBToken indexed token
  • string name
  • string symbol
  • address caller
Mint
  • address indexed holder
  • uint256 indexed projectId
  • uint256 amount
  • bool tokensWereClaimed
  • bool preferClaimedTokens
  • address caller
Burn
  • address indexed holder
  • uint256 indexed projectId
  • uint256 amount
  • uint256 initialUnclaimedBalance
  • uint256 initialClaimedBalance
  • bool preferClaimedTokens
  • address caller
Claim
  • address indexed holder
  • uint256 indexed projectId
  • uint256 initialUnclaimedBalance
  • uint256 amount
  • address caller
Set
  • uint256 indexed projectId
  • IJBToken indexed newToken
  • address caller
Transfer
  • address indexed holder
  • uint256 indexed projectId
  • address indexed recipient
  • uint256 amount
  • address caller

Properties

FunctionDefinition
projects

Traits

  • immutable

Returns

fundingCycleStore

Traits

  • immutable

Returns

tokenOf

Params

  • uint256 _projectId

Returns

projectOf

Params

  • uint256 _token

Returns

  • uint256
unclaimedBalanceOf

Params

  • address _holder
  • uint256 _projectId

Returns

  • uint256
unclaimedTotalSupplyOf

Params

  • uint256 _projectId

Returns

  • uint256

Read

FunctionDefinition
totalSupplyOf

Params

  • uint256 _projectId

Returns

  • uint256 totalSupply
balanceOf

Params

  • uint256 _holder
  • uint256 _projectId

Returns

  • uint256 balance

Write

FunctionDefinition
issueFor

Traits

Params

  • uint256 _projectId
  • string _name
  • string _symbol

Returns

setFor

Traits

Params

  • uint256 _projectId
  • IJBToken _token
mintFor

Traits

Params

  • address _holder
  • uint256 _projectId
  • uint256 _amount
  • bool _preferClaimedTokens
burnFrom

Traits

Params

  • address _holder
  • uint256 _projectId
  • uint256 _amount
  • bool _preferClaimedTokens
claimFor

Traits

Params

  • address _holder
  • uint256 _projectId
  • uint256 _amount
transferFrom

Traits

Params

  • address _holder
  • uint256 _projectId
  • address _recipient
  • uint256 _amount