Skip to content

Commit

Permalink
feat(upgrade): add a new upgrade task check
Browse files Browse the repository at this point in the history
  • Loading branch information
bdeneux committed Feb 1, 2023
1 parent cc2d63b commit d0607a9
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 4 deletions.
14 changes: 12 additions & 2 deletions app/nemeton/bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,11 +196,21 @@ Share the content links to botanik#4248 on Discord. Only one submission per drui
"0",
"Vote for governance proposal to whitelist address for smart contract deployment",
"",
time.Date(2023, time.January, 2, 0, 0, 0, 0, time.UTC), // TODO:⚠️ CHANGE DATE
time.Date(2023, time.January, 31, 23, 59, 59, 0, time.UTC), // TODO:⚠️ CHANGE DATE
time.Date(2023, time.February, 1, 0, 0, 0, 0, time.UTC), // TODO:⚠️ CHANGE DATE
time.Date(2023, time.February, 15, 23, 59, 59, 0, time.UTC), // TODO:⚠️ CHANGE DATE
1500,
1,
),
makeUpgradeTask(
"1",
"",
"",
time.Date(2023, time.February, 1, 0, 0, 0, 0, time.UTC), // TODO:⚠️ CHANGE DATE
time.Date(2023, time.February, 31, 23, 59, 59, 0, time.UTC), // TODO:⚠️ CHANGE DATE
2500,
110000,
110300,
),
},
},
}
Expand Down
14 changes: 12 additions & 2 deletions app/nemeton/task.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,12 @@ const (
TaskTypeSnapshots = "snapshots"
TaskTypeDashboard = "dashboard"
TaskTypeVoteProposal = "vote-proposal"
TaskTypeUpgrade = "upgrade"

taskParamMaxPoints = "max-points"
taskParamProposalID = "proposal-id"
taskParamMaxPoints = "max-points"
taskParamProposalID = "proposal-id"
taskParamUpgradeStartBlock = "start-block"
taskParamUpgradeEndBlock = "end-block"
)

type TaskState struct {
Expand Down Expand Up @@ -144,3 +147,10 @@ func makeVoteProposalTask(id, name, description string, start, end time.Time, re
taskParamProposalID: proposalID,
})
}

func makeUpgradeTask(id, name, description string, start, end time.Time, rewards uint64, startBlock, endBlock uint64) Task {
return makeTask(TaskTypeUpgrade, id, name, description, start, end, &rewards, map[string]interface{}{
taskParamUpgradeStartBlock: startBlock,
taskParamUpgradeEndBlock: endBlock,
})
}

0 comments on commit d0607a9

Please sign in to comment.