Skip to main content

TerminalDirectory

Git Source

Mainnet: 0x46C9999A2EDCD5aA177ed7E8af90c68b7d75Ba46

Inherits: ITerminalDirectory, Operatable

Allows project owners to deploy proxy contracts that can pay them when receiving funds directly.

State Variables

_addressesOf

mapping(uint256 => IDirectPaymentAddress[]) private _addressesOf;

projects

The Projects contract which mints ERC-721's that represent project ownership and transfers.

IProjects public immutable override projects;

terminalOf

For each project ID, the juicebox terminal that the direct payment addresses are proxies for.

mapping(uint256 => ITerminal) public override terminalOf;

beneficiaryOf

For each address, the address that will be used as the beneficiary of direct payments made.

mapping(address => address) public override beneficiaryOf;

unstakedTicketsPreferenceOf

For each address, the preference of whether ticket will be auto claimed as ERC20s when a payment is made.

mapping(address => bool) public override unstakedTicketsPreferenceOf;

Functions

addressesOf

A list of all direct payment addresses for the specified project ID.

function addressesOf(uint256 _projectId) external view override returns (IDirectPaymentAddress[] memory);

Parameters

NameTypeDescription
_projectIduint256The ID of the project to get direct payment addresses for.

Returns

NameTypeDescription
<none>IDirectPaymentAddress[]A list of direct payment addresses for the specified project ID.

constructor

constructor(IProjects _projects, IOperatorStore _operatorStore) Operatable(_operatorStore);

Parameters

NameTypeDescription
_projectsIProjectsA Projects contract which mints ERC-721's that represent project ownership and transfers.
_operatorStoreIOperatorStoreA contract storing operator assignments.

deployAddress

Allows anyone to deploy a new direct payment address for a project.

function deployAddress(uint256 _projectId, string calldata _memo) external override;

Parameters

NameTypeDescription
_projectIduint256The ID of the project to deploy a direct payment address for.
_memostringThe note to use for payments made through the new direct payment address.

setTerminal

Update the juicebox terminal that payments to direct payment addresses will be forwarded for the specified project ID.

function setTerminal(uint256 _projectId, ITerminal _terminal) external override;

Parameters

NameTypeDescription
_projectIduint256The ID of the project to set a new terminal for.
_terminalITerminalThe new terminal to set.

setPayerPreferences

Allows any address to pre set the beneficiary of their payments to any direct payment address, and to pre set whether to prefer to unstake tickets into ERC20's when making a payment.

function setPayerPreferences(address _beneficiary, bool _preferUnstakedTickets) external override;

Parameters

NameTypeDescription
_beneficiaryaddressThe beneficiary to set.
_preferUnstakedTicketsboolThe preference to set.