diff --git a/contracts/test/TestnetRewardRatePool.sol b/contracts/test/TestnetRewardRatePool.sol new file mode 100644 index 0000000..152be48 --- /dev/null +++ b/contracts/test/TestnetRewardRatePool.sol @@ -0,0 +1,21 @@ +// SPDX-License-Identifier: GPL-3.0 +pragma solidity ^0.8.20; + +import "../RewardRatePool.sol"; + +contract TestnetRewardRatePool is RewardRatePool { + using SafeERC20 for IERC20; + // Function to set the lastPaidOutTime (onlyOwner) + function setLastPaidOutTime(uint256 _lastPaidOutTime) external onlyOwner { + lastPaidOutTime = _lastPaidOutTime; + } + + event SENTWithdrawn(uint256 amount); + + // Function to withdraw SENT tokens back to the owner + function withdrawSENT(uint256 amount) external onlyOwner { + SENT.safeTransfer(owner(), amount); + emit SENTWithdrawn(amount); + } + +} diff --git a/contracts/test/TestnetServiceNodeRewards.sol b/contracts/test/TestnetServiceNodeRewards.sol new file mode 100644 index 0000000..909fe1a --- /dev/null +++ b/contracts/test/TestnetServiceNodeRewards.sol @@ -0,0 +1,12 @@ +// SPDX-License-Identifier: GPL-3.0 +pragma solidity ^0.8.20; + +import "../ServiceNodeRewards.sol"; + +contract TestnetServiceNodeRewards is ServiceNodeRewards { + // New function for owner to remove nodes without BLS signature validation + function removeNodeByOwner(uint64 serviceNodeID) external onlyOwner { + IServiceNodeRewards.ServiceNode memory node = this.serviceNodes(serviceNodeID); + _removeBLSPublicKey(serviceNodeID, node.deposit); + } +} diff --git a/scripts/deploy-testnet.js b/scripts/deploy-testnet.js new file mode 100644 index 0000000..9dcf8fb --- /dev/null +++ b/scripts/deploy-testnet.js @@ -0,0 +1,82 @@ +// We require the Hardhat Runtime Environment explicitly here. This is optional +// but useful for running the script in a standalone fashion through `node