跳到主要内容

JBTiered721DelegateProjectDeployer

Git Source

Inherits: JBOperatable, IJBTiered721DelegateProjectDeployer

Deploys a project with an associated tiered 721 delegate.

State Variables

directory

The directory of terminals and controllers for projects.

IJBDirectory public immutable override directory;

delegateDeployer

The contract responsible for deploying the delegate.

IJBTiered721DelegateDeployer public immutable override delegateDeployer;

Functions

constructor

constructor(IJBDirectory _directory, IJBTiered721DelegateDeployer _delegateDeployer, IJBOperatorStore _operatorStore)
JBOperatable(_operatorStore);

Parameters

NameTypeDescription
_directoryIJBDirectoryThe directory of terminals and controllers for projects.
_delegateDeployerIJBTiered721DelegateDeployerThe delegate deployer.
_operatorStoreIJBOperatorStoreA contract storing operator assignments.

launchProjectFor

Launches a new project with a tiered 721 delegate attached.

function launchProjectFor(
address _owner,
JBDeployTiered721DelegateData memory _deployTiered721DelegateData,
JBLaunchProjectData memory _launchProjectData,
IJBController3_1 _controller
) external override returns (uint256 projectId);

Parameters

NameTypeDescription
_owneraddressThe address to set as the owner of the project. The project's ERC-721 will be owned by this address.
_deployTiered721DelegateDataJBDeployTiered721DelegateDataData necessary to deploy the delegate.
_launchProjectDataJBLaunchProjectDataData necessary to launch the project.
_controllerIJBController3_1The controller with which the funding cycles should be configured.

Returns

NameTypeDescription
projectIduint256The ID of the newly configured project.

launchFundingCyclesFor

Launches funding cycles for a project with an attached delegate.

Only a project's owner or operator can launch its funding cycles.

function launchFundingCyclesFor(
uint256 _projectId,
JBDeployTiered721DelegateData memory _deployTiered721DelegateData,
JBLaunchFundingCyclesData memory _launchFundingCyclesData,
IJBController3_1 _controller
)
external
override
requirePermission(directory.projects().ownerOf(_projectId), _projectId, JBOperations.RECONFIGURE)
returns (uint256 configuration);

Parameters

NameTypeDescription
_projectIduint256The ID of the project for which the funding cycles will be launched.
_deployTiered721DelegateDataJBDeployTiered721DelegateDataData necessary to deploy a delegate.
_launchFundingCyclesDataJBLaunchFundingCyclesDataData necessary to launch the funding cycles for the project.
_controllerIJBController3_1The controller with which the funding cycles should be configured.

Returns

NameTypeDescription
configurationuint256The configuration of the funding cycle that was successfully created.

reconfigureFundingCyclesOf

Reconfigures funding cycles for a project with an attached delegate.

Only a project's owner or operator can configure its funding cycles.

function reconfigureFundingCyclesOf(
uint256 _projectId,
JBDeployTiered721DelegateData memory _deployTiered721DelegateData,
JBReconfigureFundingCyclesData memory _reconfigureFundingCyclesData,
IJBController3_1 _controller
)
external
override
requirePermission(directory.projects().ownerOf(_projectId), _projectId, JBOperations.RECONFIGURE)
returns (uint256 configuration);

Parameters

NameTypeDescription
_projectIduint256The ID of the project for which funding cycles are being reconfigured.
_deployTiered721DelegateDataJBDeployTiered721DelegateDataData necessary to deploy a delegate.
_reconfigureFundingCyclesDataJBReconfigureFundingCyclesDataData necessary to reconfigure the funding cycle.
_controllerIJBController3_1The controller with which the funding cycles should be configured.

Returns

NameTypeDescription
configurationuint256The configuration of the successfully reconfigured funding cycle.

_launchProjectFor

Launches a project.

function _launchProjectFor(
address _owner,
JBLaunchProjectData memory _launchProjectData,
IJBTiered721Delegate _dataSource,
IJBController3_1 _controller
) internal;

Parameters

NameTypeDescription
_owneraddressThe address to set as the project's owner.
_launchProjectDataJBLaunchProjectDataData needed to launch the project.
_dataSourceIJBTiered721DelegateThe data source to set for the project.
_controllerIJBController3_1The controller to be used for configuring the project's funding cycles.

_launchFundingCyclesFor

Launches a funding cycle for a project.

function _launchFundingCyclesFor(
uint256 _projectId,
JBLaunchFundingCyclesData memory _launchFundingCyclesData,
IJBTiered721Delegate _dataSource,
IJBController3_1 _controller
) internal returns (uint256);

Parameters

NameTypeDescription
_projectIduint256The project ID to launch a funding cycle for.
_launchFundingCyclesDataJBLaunchFundingCyclesDataData necessary to launch a funding cycle for the project.
_dataSourceIJBTiered721DelegateThe data source to be set for the project.
_controllerIJBController3_1The controller to configure the project's funding cycles with.

Returns

NameTypeDescription
<none>uint256configuration The configuration of the funding cycle that was successfully created.

_reconfigureFundingCyclesOf

Reconfigure funding cycles for a project.

function _reconfigureFundingCyclesOf(
uint256 _projectId,
JBReconfigureFundingCyclesData memory _reconfigureFundingCyclesData,
IJBTiered721Delegate _dataSource,
IJBController3_1 _controller
) internal returns (uint256);

Parameters

NameTypeDescription
_projectIduint256The ID of the project for which the funding cycles are being reconfigured.
_reconfigureFundingCyclesDataJBReconfigureFundingCyclesDataData necessary to reconfigure the project's funding cycles.
_dataSourceIJBTiered721DelegateThe data source to be set for the project.
_controllerIJBController3_1The controller to be used for configuring the project's funding cycles.

Returns

NameTypeDescription
<none>uint256The configuration of the successfully reconfigured funding cycle.