{"_id":"@chanceprotocol/v4-timelocks","name":"@chanceprotocol/v4-timelocks","dist-tags":{"latest":"1.1.0"},"versions":{"1.1.0":{"name":"@chanceprotocol/v4-timelocks","version":"1.1.0","description":"PoolTogether V4 Timelocks","main":"index.js","license":"MIT","peerDependencies":{"@chanceprotocol/owner-manager-contracts":"1.1.0","@chanceprotocol/pooltogether-rng-contracts":"1.5.3","@chanceprotocol/v4-core":"1.3.1"},"devDependencies":{"@nomiclabs/hardhat-ethers":"2.0.2","@nomiclabs/hardhat-etherscan":"2.1.3","@nomiclabs/hardhat-waffle":"2.0.1","@openzeppelin/contracts":"4.3.1","@openzeppelin/hardhat-upgrades":"1.6.0","@types/chai":"4.2.15","@types/debug":"4.1.5","@types/mocha":"8.2.1","@types/node":"14.14.32","chai":"4.3.4","chalk":"4.1.0","debug":"4.3.1","ethereum-waffle":"3.3.0","ethers":"5.0.32","hardhat":"2.6.2","hardhat-abi-exporter":"2.1.2","hardhat-dependency-compiler":"1.1.1","hardhat-deploy":"0.7.0-beta.47","hardhat-deploy-ethers":"0.3.0-beta.10","hardhat-gas-reporter":"1.0.4","hardhat-log-remover":"2.0.2","prettier":"2.4.1","prettier-plugin-solidity":"1.0.0-beta.18","solc":"0.8.6","solhint":"3.3.3","solidity-coverage":"0.7.17","solidity-docgen":"^0.5.16","ts-generator":"0.1.1","ts-node":"9.1.1","typescript":"4.2.3","@chanceprotocol/owner-manager-contracts":"1.1.0","@chanceprotocol/pooltogether-rng-contracts":"1.5.3","@chanceprotocol/v4-core":"1.3.1"},"dependencies":{"@ethersproject/bignumber":"^5.7.0"},"scripts":{"clean":"rm -rf cache/ artifacts/","compile":"mkdir -p abis && hardhat --show-stack-traces --max-memory 8192 compile","coverage":"HIDE_DEPLOY_LOG=true OPTIMIZER_DISABLED=true hardhat coverage","deploy":"hardhat deploy --write true --network","docs":"solidity-docgen --solc-module solc -i contracts -o docs -t templates","verify":"hardhat etherscan-verify --license MIT --solc-input --network","etherscan-verify":"hardhat etherscan:verify --network","etherscan-verify-polygon":"hardhat --config hardhat.config.polygon.js run ./scripts/verify.js --network","format":"prettier --config .prettierrc --write \"**/*.{ts,js}\" \"contracts/**/*.sol\"","format:file":"prettier --config .prettierrc --write","hint":"solhint \"contracts/**/*.sol\"","start-fork":"FORK_ENABLED=true hardhat node --no-reset --no-deploy","impersonate-accounts":"hardhat --network localhost fork:impersonate-accounts ","distribute-ether":"hardhat --network localhost fork:distribute-ether-from-binance","create-prize-pool":"hardhat --network localhost fork:create-aave-prize-pool","run-fork":"yarn impersonate-accounts && yarn distribute-ether && yarn create-prize-pool","test":"HIDE_DEPLOY_LOG=true hardhat test"},"_id":"@chanceprotocol/v4-timelocks@1.1.0","_integrity":"sha512-CrQ+SbDS0zEFjbS2FHjHVX9qQw4f2/fV7hwK7nRmC9F8oKcuiCeaIWvvZcAVY3gMCsVdKXa0nM6xL4DR9dXwAw==","_resolved":"/tmp/a772c29f8babde330aa2a4000b2dc839/chanceprotocol-v4-timelocks-1.1.0.tgz","_from":"file:chanceprotocol-v4-timelocks-1.1.0.tgz","_nodeVersion":"16.15.1","_npmVersion":"9.6.5","dist":{"integrity":"sha512-CrQ+SbDS0zEFjbS2FHjHVX9qQw4f2/fV7hwK7nRmC9F8oKcuiCeaIWvvZcAVY3gMCsVdKXa0nM6xL4DR9dXwAw==","shasum":"3b373aa5c4af353a211d8a1ce042c45ec312d6e3","tarball":"https://registry.npmjs.org/@chanceprotocol/v4-timelocks/-/v4-timelocks-1.1.0.tgz","fileCount":105,"unpackedSize":9757029,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCwPcoe3fxVrLoFEvKS1QwnnxrnCkaUXtip7d1WeET7DQIgBFRPZgscrRZXxOvaUGJ2N26cUnzE79of1MO1nezJjAI="}]},"_npmUser":{"name":"chanceprotocol","email":"chance@netixsol.com"},"directories":{},"maintainers":[{"name":"chanceprotocol","email":"chance@netixsol.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/v4-timelocks_1.1.0_1692257311382_0.4316837889256602"},"_hasShrinkwrap":false}},"time":{"created":"2023-08-17T07:28:31.320Z","1.1.0":"2023-08-17T07:28:31.799Z","modified":"2023-08-17T07:28:32.072Z"},"maintainers":[{"name":"chanceprotocol","email":"chance@netixsol.com"}],"description":"PoolTogether V4 Timelocks","license":"MIT","readme":"# PoolTogether V4 Timelocks Contracts\n\n![Tests](https://github.com/pooltogether/v4-timelocks/actions/workflows/main.yml/badge.svg)\n[![Coverage Status](https://coveralls.io/repos/github/pooltogether/v4-timelocks/badge.svg?branch=master)](https://coveralls.io/github/pooltogether/v4-timelocks?branch=master&asdf=1)\n[![built-with openzeppelin](https://img.shields.io/badge/built%20with-OpenZeppelin-3677FF)](https://docs.openzeppelin.com/)\n[![GPLv3 license](https://img.shields.io/badge/License-GPLv3-blue.svg)](http://perso.crans.org/besson/LICENSE.html)\n\n<strong>Have questions or want the latest news?</strong>\n<br/>Join the PoolTogether Discord or follow us on Twitter:\n\n[![Discord](https://badgen.net/badge/icon/discord?icon=discord&label)](https://discord.gg/JFBPMxv5tr)\n[![Twitter](https://badgen.net/badge/icon/twitter?icon=twitter&label)](https://twitter.com/PoolTogether_)\n\n**Documentation**<br>\nhttps://v4.docs.pooltogether.com\n\n**Deployments**<br>\n- [Ethereum](https://v4.docs.pooltogether.com/protocol/deployments/mainnet#mainnet)\n- [Polygon](https://v4.docs.pooltogether.com/protocol/deployments/mainnet#polygon)\n- [Avalanche](https://v4.docs.pooltogether.com/protocol/deployments/mainnet#avalanche)\n\n# Overview\n- [BeaconTimelockTrigger](/contracts/BeaconTimelockTrigger.sol)\n- [DrawCalculatorTimelock](/contracts/DrawCalculatorTimelock.sol)\n- [L1TimelockTrigger](/contracts/L1TimelockTrigger.sol)\n- [L2TimelockTrigger](/contracts/L2TimelockTrigger.sol)\n- [ReceiverTimelockTrigger](/contracts/ReceiverTimelockTrigger.sol)\n\nTimelock contracts assist with Phase 1 in the roll-out of V4. Granting authority to the operations teams to prevent a \"bad actor\" oracle from incorrectly setting a draw or prize distribution params. \n\n### DrawCalculatorTimelock\nThe DrawCalculatorTimelock adds a timelock for PrizeDistributor to execute a claim with the most recently pushed PrizeDistribution params pushed. \n\n### L1TimelockTrigger & L2TimelockTrigger\nBoth L1TimelockTrigger/L2TimelockTrigger contracts set a timelock or a \"cooldown\" period in the linked `DrawCalculatorTimelock` contract. The `DrawCalculatorTimelock` routes `calculate` execution through a `DrawCalculator` contract for the linked `PrizeDistributor` contract.\n\n### L1TimelockTrigger\nThe `L1TimelockTrigger` contract pushes `DrawLib.Draw` and `DrawLib.PrizeDistribution` params onto the `DrawBuffer` and `PrizeDistributionBuffer` contracts.\n\n### L2TimelockTrigger\nThe `L2TimelockTrigger` pushes `DrawLib.PrizeDistribution` params onto a `PrizeDistributionBuffer` contract.\n\n**Core and Periphery contracts:**\n\n- https://github.com/pooltogether/v4-core\n- https://github.com/pooltogether/v4-periphery\n\n# Getting Started\n\nThe project is made available as a NPM package.\n\n```sh\n$ yarn add @chanceprotocol/pooltogether-contracts\n```\n\nThe repo can be cloned from Github for contributions.\n\n```sh\n$ git clone https://github.com/pooltogether/v4-timelock\n```\n\n```sh\n$ yarn\n```\n\nWe use [direnv](https://direnv.net/) to manage environment variables.  You'll likely need to install it.\n\n```sh\ncp .envrc.example .envrc\n```\n\nTo run fork scripts, deploy or perform any operation with a mainnet/testnet node you will need an Infura API key.\n\n# Testing\n\nWe use [Hardhat](https://hardhat.dev) and [hardhat-deploy](https://github.com/wighawag/hardhat-deploy)\n\nTo run unit & integration tests:\n\n```sh\n$ yarn test\n```\n\nTo run coverage:\n\n```sh\n$ yarn coverage\n```\n\n# Fork Testing\n\nEnsure your environment variables are set up.  Make sure your Alchemy URL is set.  Now start a local fork:\n\n```sh\n$ yarn start-fork\n```\n\nSetup account impersonation and transfer eth:\n\n```sh\n$ ./scripts/setup.sh\n```\n\n# Deployment\n\n## Deploy Locally\n\nStart a local node and deploy the top-level contracts:\n\n```bash\n$ yarn start\n```\n\nNOTE: When you run this command it will reset the local blockchain.\n\n## Testnets\nDeployment is maintained in a different [repo](https://github.com/pooltogether/v4-testnet).\n\n## Mainnet\nDeployment is maintained in a different [repo](https://github.com/pooltogether/v4-mainnet).\n\n","readmeFilename":"README.md"}