Skip to main content

JBTiered721DelegateDeployer

Git Source

Inherits: IJBTiered721DelegateDeployer

Deploys a JBTiered721Delegate.

State Variables

_nonce

This contract's current nonce, used for the Juicebox delegates registry.

uint256 internal _nonce;

onchainGovernance

A contract that supports on-chain governance across all tiers.

JBTiered721GovernanceDelegate public immutable onchainGovernance;

noGovernance

A contract with no on-chain governance mechanism.

JBTiered721Delegate public immutable noGovernance;

delegatesRegistry

A contract that stores references to deployer contracts of delegates.

IJBDelegatesRegistry public immutable delegatesRegistry;

Functions

constructor

constructor(
JBTiered721GovernanceDelegate _onchainGovernance,
JBTiered721Delegate _noGovernance,
IJBDelegatesRegistry _delegatesRegistry
);

Parameters

NameTypeDescription
_onchainGovernanceJBTiered721GovernanceDelegateReference copy of the delegate that works with onchain governance.
_noGovernanceJBTiered721DelegateReference copy of a simpler delegate without on-chain governance.
_delegatesRegistryIJBDelegatesRegistryA contract that stores references to delegate deployer contracts.

deployDelegateFor

Deploys a delegate for the provided project.

function deployDelegateFor(uint256 _projectId, JBDeployTiered721DelegateData memory _deployTiered721DelegateData)
external
override
returns (IJBTiered721Delegate newDelegate);

Parameters

NameTypeDescription
_projectIduint256The ID of the project for which the delegate will be deployed.
_deployTiered721DelegateDataJBDeployTiered721DelegateDataStructure containing data necessary for delegate deployment.

Returns

NameTypeDescription
newDelegateIJBTiered721DelegateThe address of the newly deployed delegate.

Errors

INVALID_GOVERNANCE_TYPE

error INVALID_GOVERNANCE_TYPE();