Function: contributeFunds()
This function allows any caller to contribute SENT tokens. The caller will be added to the contributorAddresses list. When the necessary amount of contribution is reached, the stakingRewardsContract.addBLSPublicKey() function will be called for service-node registration.
Inputs
amountValidation: The caller should have enough tokens to send.
Impact: The amount of SENT tokens to send to this contract.
Branches and code coverage (including function calls)
Intended branches
Function call analysis
SENT.safeTransferFrom(msg.sender, address(this), amount);External/Internal? External.
Argument control:
amount.Impact: Transfer SENT
amountof tokens from the caller to the contract.
finalizeNode() -> SENT.approve(address(stakingRewardsContract), stakingRequirement);External/Internal? External.
Argument control:
stakingRequirement.Impact: Give the contract
stakingRewardsContractthe approval to spendstakingRequirementamount of SENT tokens.
finalizeNode() -> stakingRewardsContract.addBLSPublicKey(blsPubkey, blsSignature, serviceNodeParams, contributors)External/Internal? External.
Argument control: N/A.
Impact: The
stakingRequirementof SENT tokens will be transferred to thestakingRewardsContractcontract.