Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calculate rewards up to 10 years #1109

Merged
merged 2 commits into from
Aug 28, 2024
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
4 changes: 2 additions & 2 deletions contracts/delegation/Distributor.sol
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,8 @@

earned = 0;
endMonth = currentMonth;
if (endMonth > startMonth + 12) {
endMonth = startMonth + 12;
if (endMonth > startMonth + 120) {
endMonth = startMonth + 120;

Check warning on line 226 in contracts/delegation/Distributor.sol

View check run for this annotation

Codecov / codecov/patch

contracts/delegation/Distributor.sol#L226

Added line #L226 was not covered by tests
}
for (uint256 i = startMonth; i < endMonth; ++i) {
uint256 effectiveDelegatedToValidator = delegationController
Expand Down
1 change: 1 addition & 0 deletions migrations/upgrade.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ async function prepareContractsList(instance: Instance) {
async function main() {
const skaleManager = await getSkaleManagerInstance();
let contractsToUpgrade = [
"Distributor",
"Nodes",
"Schains",
"ValidatorService"
Expand Down
6 changes: 4 additions & 2 deletions scripts/calculate_version.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
#!/usr/bin/env bash

set -e

VERSION=$(cat VERSION)
USAGE_MSG='Usage: BRANCH=[BRANCH] calculate_version.sh'

if [ -z "$BRANCH" ]
then
(>&2 echo 'You should provide branch')
echo $USAGE_MSG
echo "$USAGE_MSG"
exit 1
fi


if [ -z $VERSION ]; then
if [ -z "$VERSION" ]; then
echo "The base version is not set."
exit 1
fi
Expand Down
2 changes: 1 addition & 1 deletion test/delegation/Delegation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ describe("Delegation", () => {
for (let i = 0; i < holdersAmount; ++i) {
holders.push(Wallet.createRandom().connect(ethers.provider));
}
const etherAmount = ethers.parseEther("5000");
const etherAmount = ethers.parseEther("500");

await constantsHolder.setLaunchTimestamp(0);

Expand Down
Loading