Skip to content

Commit

Permalink
change min votes, add bck jito realm, add more test crons, change mai…
Browse files Browse the repository at this point in the history
…n cron to 6am eastern (#17)
  • Loading branch information
ggnine-jito authored Jan 9, 2024
1 parent d928bf1 commit 12b2e9d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
7 changes: 4 additions & 3 deletions scripts/governance-notifier.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,14 @@ if (!process.env.MAINNET_RPC) {
}

export function errorWrapper() {
console.log("Running in errorWrapper")
runNotifier().catch((error) => {
console.error(error)
})
}

const REALM = 'jeet'
const REALM = 'Jito'
const MIN_VOTES_NEEDED = 30_000_000

export async function runNotifier(summaryOnly = false) {
console.log('Starting governance notifier')
Expand Down Expand Up @@ -115,8 +117,7 @@ export async function runNotifier(summaryOnly = false) {
votingTokenDecimals
)

const minVotesNeeded = 100000000
const quorumReached = yesVotes >= minVotesNeeded
const quorumReached = yesVotes >= MIN_VOTES_NEEDED
const isSuccess = yesVotes > noVotes && quorumReached

const msg = `
Expand Down
10 changes: 9 additions & 1 deletion vercel.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,15 @@
"crons": [
{
"path": "/api/gov-notifier-summary",
"schedule": "59 19 * * *"
"schedule": "0 12 * * *"
},
{
"path": "/api/gov-notifier-summary",
"schedule": "0 22 * * *"
},
{
"path": "/api/gov-notifier-summary",
"schedule": "0 23 * * *"
},
{
"path": "/api/gov-notifier",
Expand Down

0 comments on commit 12b2e9d

Please sign in to comment.