Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion contracts/ServiceNodeContribution.sol
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ contract ServiceNodeContribution is Shared, IServiceNodeContribution {
/// key, a signature and the fee the operator is charging.
/// @param reserved The new array of reserved contributors with their
/// proportion of stake they must fulfill in the node.
/// @param _operator The owner and operator of the node that will be
/// deployed from this multi-contribution contract and consequently the
/// recipient of the operator fee and admin access control of the
/// multi-contribution contract.
/// @param _manualFinalize Configure if the contract automatically (or does
/// not) finalize the contract upon receipt of a contribution that
/// funds the total required staking requirement of the contract.
Expand All @@ -100,13 +104,14 @@ contract ServiceNodeContribution is Shared, IServiceNodeContribution {
IServiceNodeRewards.BLSSignatureParams memory sig,
IServiceNodeRewards.ServiceNodeParams memory params,
IServiceNodeRewards.ReservedContributor[] memory reserved,
address _operator,
bool _manualFinalize
) nzAddr(_stakingRewardsContract) nzUint(_maxContributors) {
stakingRewardsContract = IServiceNodeRewards(_stakingRewardsContract);
stakingRequirement = stakingRewardsContract.stakingRequirement();
SESH = IERC20(stakingRewardsContract.designatedToken());
maxContributors = _maxContributors;
operator = tx.origin; // NOTE: Creation is delegated by operator through factory
operator = _operator;
address nilBeneficiary = address(0);
_resetUpdateAndContribute(key, sig, params, reserved, _manualFinalize, nilBeneficiary, 0);
}
Expand Down
3 changes: 2 additions & 1 deletion contracts/ServiceNodeContributionFactory.sol
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,13 @@ contract ServiceNodeContributionFactory is Initializable, Ownable2StepUpgradeabl
sig,
params,
reserved,
msg.sender,
manualFinalize
);

result = address(newContract);
deployedContracts[result] = true;
emit NewServiceNodeContributionContract(result, params.serviceNodePubkey, tx.origin);
emit NewServiceNodeContributionContract(result, params.serviceNodePubkey, msg.sender);
return result;
}

Expand Down
1 change: 1 addition & 0 deletions contracts/test/ServiceNodeContributionEchidnaTest.sol
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ contract ServiceNodeContributionEchidnaTest {
/*sig*/ blsSig,
/*serviceNodeParams*/ snParams,
/*reserved*/ reserved,
/*operator*/ snOperator,
/*manualFinalize*/ false
);

Expand Down