Skip to main content

JBController

Stitches together funding cycles and project tokens, making sure all activity is accounted for and correct.

Code

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

Addresses

Ethereum mainnet: 0xFFdD70C318915879d5192e8a0dcbFcB0285b3C98

Goerli testnet: 0x7Cb86D43B665196BC719b6974D320bf674AFb395

Interfaces

NameDescription
IJBControllerGeneral interface for the generic controller methods in this contract that interacts with funding cycles and tokens according to the protocol's rules.
IJBMigratableAllows migrating to this contract, with a hook called to prepare for the migration.

Inheritance

ContractDescription
JBOperatableIncludes convenience functionality for checking a message sender's permissions before executing certain transactions.
ERC165Introspection on interface adherance.

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.
@param _tokenStore A contract that manages token minting and burning.
@param _splitsStore A contract that stores splits for each project.
*/
constructor(
IJBOperatorStore _operatorStore,
IJBProjects _projects,
IJBDirectory _directory,
IJBFundingCycleStore _fundingCycleStore,
IJBTokenStore _tokenStore,
IJBSplitsStore _splitsStore
) JBOperatable(_operatorStore) {
projects = _projects;
directory = _directory;
fundingCycleStore = _fundingCycleStore;
tokenStore = _tokenStore;
splitsStore = _splitsStore;
}
  • _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.
  • _tokenStore is an IJBTokenStore contract that manages token minting and burning.
  • _splitsStore is an IJBSplitsStore contract that stores splits for each project.

Events

NameData
LaunchProject
  • uint256 configuration
  • uint256 projectId
  • string memo
  • address caller
LaunchFundingCycles
  • uint256 configuration
  • uint256 projectId
  • string memo
  • address caller
ReconfigureFundingCycles
  • uint256 configuration
  • uint256 projectId
  • string memo
  • address caller
SetFundAccessConstraints
  • uint256 indexed fundingCycleConfiguration
  • uint256 indexed fundingCycleNumber
  • uint256 indexed projectId
  • JBFundAccessConstraints constraints
  • address caller
DistributeReservedTokens
  • uint256 indexed fundingCycleConfiguration
  • uint256 indexed fundingCycleNumber
  • uint256 indexed projectId
  • address beneficiary
  • uint256 tokenCount
  • uint256 beneficiaryTokenCount
  • string memo
  • address caller
DistributeToReservedTokenSplit
  • uint256 indexed projectId
  • uint256 indexed domain
  • uint256 indexed group
  • JBSplit split
  • uint256 count
  • address caller
MintTokens
  • address indexed beneficiary
  • uint256 indexed projectId
  • uint256 tokenCount
  • string memo
  • uint256 reservedRate
  • address caller
BurnTokens
  • address indexed holder
  • uint256 indexed projectId
  • uint256 tokenCount
  • string memo
  • address caller
PrepMigration
Migrate

Properties

FunctionDefinition
projects

Traits

  • immutable

Returns

fundingCycleStore

Traits

  • immutable

Returns

tokenStore

Traits

  • immutable

Returns

splitsStore

Traits

  • immutable

Returns

directory

Traits

  • immutable

Returns

Read

FunctionDefinition
distributionLimitOf

Params

Returns

  • uint256 distributionLimit
overflowAllowanceOf

Params

Returns

  • uint256 overflowAllowance
reservedTokenBalanceOf

Params

  • uint256 _projectId
  • uint256 _reservedRate

Returns

  • uint256 reservedTokenBalance
totalOutstandingTokensOf

Params

  • uint256 _projectId
  • uint256 _reservedRate

Returns

  • uint256 totalOutstandingTokens
getFundingCycleOf

Params

  • uint256 _projectId
  • uint256 _configuration

Returns

latestConfiguredFundingCycleOf

Params

  • uint256 _projectId

Returns

currentFundingCycleOf

Params

  • uint256 _projectId

Returns

queuedFundingCycleOf

Params

  • uint256 _projectId

Returns

supportsInterface

Params

  • uint256 _interfaceId

Returns

  • bool

Write

FunctionDefinition
launchProjectFor

Traits

  • virtual

Params

Returns

  • uint256 projectId
launchFundingCyclesFor

Traits

Params

Returns

  • uint256 configuration
reconfigureFundingCyclesOf

Traits

Params

Returns

  • uint256 configuration
mintTokensOf

Traits

Params

  • uint256 _projectId
  • uint256 _tokenCount
  • address _beneficiary
  • string _memo
  • bool _preferClaimedTokens,
  • bool _useReservedRate

Returns

  • uint256 beneficiaryTokenCount
burnTokensOf

Traits

Params

  • address _holder
  • uint256 _projectId
  • uint256 _tokenCount
  • string _memo
  • bool _preferClaimedTokens
distributeReservedTokensOf

Traits

  • virtual

Params

  • uint256 _projectId
  • string _memo

Returns

  • uint256 tokenCount
prepForMigrationOf

Traits

  • virtual

Params

  • uint256 _projectId
  • address _from
migrate

Traits

Params