setDefaultSplits
Contract: JBETHERC20SplitsPayer
Interface: IJBSplitsPayer
- Step by step
- Code
- Events
- Bug bounty
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β
-
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:
-
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:
-
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:
-
Emit a
SetDefaultSplits
event with all relevant parameters.emit SetDefaultSplits(_projectId, _domain, _group, msg.sender);
Event references:
/**
@notice
Sets the location of the splits that payments this contract receives will be split between.
@param _projectId The ID of project for which the default splits are stored.
@param _domain The domain within which the default splits are stored.
@param _group The group within which the default splits are stored.
*/
function setDefaultSplits(
uint256 _projectId,
uint256 _domain,
uint256 _group
) external virtual override onlyOwner {
// Set the default splits project ID if it's changing.
if (_projectId != defaultSplitsProjectId) defaultSplitsProjectId = _projectId;
// Set the default splits domain if it's changing.
if (_domain != defaultSplitsDomain) defaultSplitsDomain = _domain;
// Set the default splits group if it's changing.
if (_group != defaultSplitsGroup) defaultSplitsGroup = _group;
emit SetDefaultSplits(_projectId, _domain, _group, msg.sender);
}
Name | Data |
---|---|
SetDefaultSplits |
|
Category | Description | Reward |
---|---|---|
Optimization | Help make this operation more efficient. | 0.5ETH |
Low severity | Identify a vulnerability in this operation that could lead to an inconvenience for a user of the protocol or for a protocol developer. | 1ETH |
High severity | Identify a vulnerability in this operation that could lead to data corruption or loss of funds. | 5+ETH |