Skip to main content

setDefaultSplits

Contract: JBETHERC20SplitsPayer

Interface: IJBSplitsPayer

Sets the location of the splits that payments this contract receives will be split between.

Definition​

function setDefaultSplits(
uint256 _projectId,
uint256 _domain,
uint256 _group
) external virtual override onlyOwner { ... }
  • Arguments:
    • _projectId is the ID of project for which the default splits are stored.
    • _domain is the domain within which the default splits are stored.
    • _group is the group within which the default splits are stored.
  • Through the onlyOwner modifier, this function can only be accessed by the address that owns this contract.
  • The function can be overriden by inheriting contracts.
  • The function overrides a function definition from the IJBSplitsPayer interface.
  • The function doesn't return anything.

Body​

  1. Set the default splits project ID if it has changed.

    // Set the default splits project ID if it's changing.
    if (_projectId != defaultSplitsProjectId) defaultSplitsProjectId = _projectId;

    Internal references:

  2. Set the default splits domain if it has changed.

    // Set the default splits domain if it's changing.
    if (_domain != defaultSplitsDomain) defaultSplitsDomain = _domain;

    Internal references:

  3. Set the default splits group if it has changed.

    // Set the default splits group if it's changing.
    if (_group != defaultSplitsGroup) defaultSplitsGroup = _group;

    Internal references:

  4. Emit a SetDefaultSplits event with all relevant parameters.

    emit SetDefaultSplits(_projectId, _domain, _group, msg.sender);

    Event references: