Skip to content

Instantly share code, notes, and snippets.

const refreshInterval = 5 // minutes
const BASE_URL = 'https://basepaint.xyz'
const IMAGE_URL = `${BASE_URL}/api/art/image?day=painting`
const STARTED_AT = 1691599315
const EPOCH_DURATION = 86400
const day = getCurrentDay()
const theme = await getTheme(day)
const title = theme?.theme || `Day #${day}`
@w1nt3r-eth
w1nt3r-eth / deploy.ts
Created December 16, 2021 18:29
Deploy a contract when gas is cheap
// $ yarn hardhat run --network mainnet scripts/deploy.ts
import {BigNumber} from '@ethersproject/bignumber';
import {formatUnits, parseUnits} from '@ethersproject/units';
import {ethers} from 'hardhat';
async function main() {
const gasPrice = await waitForGasPriceBelow(parseUnits('40', 'gwei'));
const Greeter = await ethers.getContractFactory('Greeter');