跳到主要内容

JBMigrationOperator

Git Source

Mainnet: 0x004d50E8552f7E811E7DF913A3205ABf48E47b52

Goerli: 0x0Da2f87c14EA33686E0fFAAF56EE1f1f82cA59A9


Allows projects to migrate their controller & terminal to 3.1 version

The project owner needs to give the migration permission to this contract for carrying out the migrations for both controller & terminal.

The current funding cycle needs to be a reconfigured one before migration, so metadata flags allowControllerMigration, allowTerminalMigration & global.allowSetTerminals need to be set true.

State Variables

directory

directory instance which keeps a track of which controller is linked to which project.

IJBDirectory public immutable directory;

projects

The NFT granting ownership to a Juicebox project

IJBProjects public immutable projects;

Functions

constructor

constructor(IJBDirectory _directory);

Parameters

NameTypeDescription
_directoryIJBDirectoryA contract storing directories of terminals and controllers for each project.

migrate

Allows project owners to migrate the controller & terminal linked to their project to the latest version

function migrate(
uint256 _projectId,
IJBMigratable _newController,
IJBPaymentTerminal _newJbTerminal,
IJBPayoutRedemptionPaymentTerminal _oldJbTerminal
) external;

Parameters

NameTypeDescription
_projectIduint256The project id whose controller & terminal are to be migrated
_newControllerIJBMigratableController 3.1 address to migrate to.
_newJbTerminalIJBPaymentTerminalTerminal 3.1 address to migrate to.
_oldJbTerminalIJBPayoutRedemptionPaymentTerminalOld terminal address to migrate from.

Errors

UNAUTHORIZED

error UNAUTHORIZED();