跳到主要内容

JB721TiersHookDeployer

Git Source

Inherits: ERC2771Context, IJB721TiersHookDeployer

Deploys a JB721TiersHook for an existing project.

State Variables

ADDRESS_REGISTRY

A registry which stores references to contracts and their deployers.

IJBAddressRegistry public immutable ADDRESS_REGISTRY;

HOOK

A 721 tiers hook.

JB721TiersHook public immutable HOOK;

STORE

The contract that stores and manages data for this contract's NFTs.

IJB721TiersHookStore public immutable STORE;

_nonce

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

uint256 internal _nonce;

Functions

constructor

constructor(
JB721TiersHook hook,
IJB721TiersHookStore store,
IJBAddressRegistry addressRegistry,
address trustedForwarder
)
ERC2771Context(trustedForwarder);

Parameters

NameTypeDescription
hookJB721TiersHookReference copy of a hook.
storeIJB721TiersHookStoreThe contract that stores and manages data for this contract's NFTs.
addressRegistryIJBAddressRegistryA registry which stores references to contracts and their deployers.
trustedForwarderaddressThe trusted forwarder for the ERC2771Context.

deployHookFor

Deploys a 721 tiers hook for the specified project.

function deployHookFor(
uint256 projectId,
JBDeploy721TiersHookConfig calldata deployTiersHookConfig,
bytes32 salt
)
external
override
returns (IJB721TiersHook newHook);

Parameters

NameTypeDescription
projectIduint256The ID of the project to deploy the hook for.
deployTiersHookConfigJBDeploy721TiersHookConfigThe config to deploy the hook with, which determines its behavior.
saltbytes32A salt to use for the deterministic deployment.

Returns

NameTypeDescription
newHookIJB721TiersHookThe address of the newly deployed hook.