跳到主要内容

JBDirectory

Keeps a reference of which terminal contracts each project is currently accepting funds through, and which controller contract is managing each project's tokens and funding cycles.

Code

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

Addresses

Ethereum mainnet: 0x65572FB928b46f9aDB7cfe5A4c41226F636161ea

Goerli testnet: 0x8E05bcD2812E1449f0EC3aE24E2C395F533d9A99

Interfaces

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

Inheritance

ContractDescription
JBOperatableIncludes convenience functionality for checking a message sender's permissions before executing certain transactions.
OwnableIncludes 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 _fundingCycleStore A contract storing all funding cycle configurations.
@param _owner The address that will own the contract.
*/
constructor(
IJBOperatorStore _operatorStore,
IJBProjects _projects,
IJBFundingCycleStore _fundingCycleStore,
address _owner
) JBOperatable(_operatorStore) {
projects = _projects;
fundingCycleStore = _fundingCycleStore;
_transferOwnership(_owner);
}
  • _operatorStore is an IJBOperatorStore contract storing operator assignments.
  • _projects is an IJBProjects contract which mints ERC-721's that represent project ownership and transfers.
  • _fundingCycleStore is an IJBFundingCycleStore contract storing all funding cycle configurations.
  • _owner is the address that will own the contract.

Events

NameData
SetController
  • int256 indexed projectId
  • IJBController indexed controller
  • address caller
AddTerminal
SetTerminals
SetPrimaryTerminal
  • uint256 indexed projectId
  • address indexed token
  • IJBPaymentTerminal indexed terminal
  • address caller
SetIsAllowedToSetFirstController
  • address indexed addr
  • bool indexed flag
  • address caller

Properties

FunctionDefinition
projects

Traits

  • immutable

Returns

fundingCycleStore

Traits

  • immutable

Returns

controllerOf

Params

  • uint256 _projectId

Returns

  • address
isAllowedToSetFirstController

Params

  • address _address

Returns

  • bool

Read

FunctionDefinition
terminalsOf

Params

  • uint256 _projectId

Returns

isTerminalOf

Params

Returns

  • bool isTerminal
primaryTerminalOf

Params

  • uint256 _projectId
  • address _token

Returns

Write

FunctionDefinition
setControllerOf

Traits

Params

  • uint256 _projectId
  • address _controller
setTerminalsOf

Traits

Params

setPrimaryTerminalOf

Traits

Params

setIsAllowedToSetFirstController

Traits

Params

  • address _address
  • bool _flag