@generationsoftware/pt-v5-autotasks-library
Advanced tools
Comparing version 1.7.1 to 1.7.2
@@ -0,4 +1,4 @@ | ||
import chalk from 'chalk'; | ||
import { getEthersMulticallProviderResults } from '@generationsoftware/pt-v5-utils-js'; | ||
import { ethers } from 'ethers'; | ||
import { getEthersMulticallProviderResults } from '@generationsoftware/pt-v5-utils-js'; | ||
import chalk from 'chalk'; | ||
import ethersMulticallProviderPkg from 'ethers-multicall-provider'; | ||
@@ -79,4 +79,5 @@ import { ERC20Abi } from '../abis/ERC20Abi.js'; | ||
const rewardTokenAddress = resultsOne[QUERY_KEYS.PRIZE_POOL_PRIZE_TOKEN_ADDRESS_KEY]; | ||
const closedDrawId = drawId - 1; | ||
const startDrawError = canStartDraw && closedDrawId === lastStartDrawAuction.rngRequestId; | ||
const lastRngRequestDiffSeconds = Math.floor(Date.now() / 1000) - lastStartDrawAuction.closedAt; | ||
const lastRngRequestIsRecent = lastRngRequestDiffSeconds / 3600 < 12; | ||
const startDrawError = canStartDraw && lastRngRequestIsRecent; | ||
let queriesTwo = {}; | ||
@@ -83,0 +84,0 @@ queriesTwo[QUERY_KEYS.PRIZE_POOL_DRAW_CLOSES_AT_KEY] = prizePoolContract.drawClosesAt(drawId); |
{ | ||
"name": "@generationsoftware/pt-v5-autotasks-library", | ||
"version": "1.7.1", | ||
"version": "1.7.2", | ||
"description": "Library of shared utils to run PoolTogether v5 hyperstructure autotasks.", | ||
@@ -5,0 +5,0 @@ "author": { |
Sorry, the diff of this file is not supported yet
740008
11716