JB721TiersHookProjectDeployer
Inherits: ERC2771Context, JBPermissioned, IJB721TiersHookProjectDeployer
Deploys a project and a 721 tiers hook for it. Can be used to queue rulesets for the project if given
JBPermissionIds.QUEUE_RULESETS
.
State Variables
DIRECTORY
The directory of terminals and controllers for projects.
IJBDirectory public immutable override DIRECTORY;
HOOK_DEPLOYER
The 721 tiers hook deployer.
IJB721TiersHookDeployer public immutable override HOOK_DEPLOYER;
Functions
constructor
constructor(
IJBDirectory directory,
IJBPermissions permissions,
IJB721TiersHookDeployer hookDeployer,
address trustedForwarder
)
JBPermissioned(permissions)
ERC2771Context(trustedForwarder);
Parameters
Name | Type | Description |
---|---|---|
directory | IJBDirectory | The directory of terminals and controllers for projects. |
permissions | IJBPermissions | A contract storing permissions. |
hookDeployer | IJB721TiersHookDeployer | The 721 tiers hook deployer. |
trustedForwarder | address | The trusted forwarder for the ERC2771Context. |
launchProjectFor
Launches a new project with a 721 tiers hook attached.
function launchProjectFor(
address owner,
JBDeploy721TiersHookConfig calldata deployTiersHookConfig,
JBLaunchProjectConfig calldata launchProjectConfig,
IJBController controller,
bytes32 salt
)
external
override
returns (uint256 projectId, IJB721TiersHook hook);
Parameters
Name | Type | Description |
---|---|---|
owner | address | The address to set as the owner of the project. The ERC-721 which confers this project's ownership will be sent to this address. |
deployTiersHookConfig | JBDeploy721TiersHookConfig | Configuration which dictates the behavior of the 721 tiers hook which is being deployed. |
launchProjectConfig | JBLaunchProjectConfig | Configuration which dictates the behavior of the project which is being launched. |
controller | IJBController | The controller that the project's rulesets will be queued with. |
salt | bytes32 | A salt to use for the deterministic deployment. |
Returns
Name | Type | Description |
---|---|---|
projectId | uint256 | The ID of the newly launched project. |
hook | IJB721TiersHook | The 721 tiers hook that was deployed for the project. |
launchRulesetsFor
Launches rulesets for a project with an attached 721 tiers hook.
Only a project's owner or an operator with the QUEUE_RULESETS & SET_TERMINALS
permission can launch its
rulesets.
function launchRulesetsFor(
uint256 projectId,
JBDeploy721TiersHookConfig calldata deployTiersHookConfig,
JBLaunchRulesetsConfig calldata launchRulesetsConfig,
IJBController controller,
bytes32 salt
)
external
override
returns (uint256 rulesetId, IJB721TiersHook hook);
Parameters
Name | Type | Description |
---|---|---|
projectId | uint256 | The ID of the project that rulesets are being launched for. |
deployTiersHookConfig | JBDeploy721TiersHookConfig | Configuration which dictates the behavior of the 721 tiers hook which is being deployed. |
launchRulesetsConfig | JBLaunchRulesetsConfig | Configuration which dictates the project's new rulesets. |
controller | IJBController | The controller that the project's rulesets will be queued with. |
salt | bytes32 | A salt to use for the deterministic deployment. |
Returns
Name | Type | Description |
---|---|---|
rulesetId | uint256 | The ID of the successfully created ruleset. |
hook | IJB721TiersHook | The 721 tiers hook that was deployed for the project. |