Skip to content

Commit

Permalink
Merge pull request #36 from yan-man/release/v0.1.9-alpha
Browse files Browse the repository at this point in the history
Release/v0.1.9 alpha
  • Loading branch information
yan-man authored Jun 15, 2022
2 parents 39a9f61 + 5e2fb35 commit 9f36a67
Show file tree
Hide file tree
Showing 11 changed files with 2,489 additions and 362 deletions.
Binary file modified .DS_Store
Binary file not shown.
1 change: 1 addition & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ commands:
test:
steps:
- run: npm i
- run: npx hardhat compile
- run: npx hardhat coverage
- codecov/upload
executors:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ node_modules
.idea
coverage
coverage.json
typechain-types

#Hardhat files
cache
Expand Down
13 changes: 0 additions & 13 deletions contracts/Lottery.sol
Original file line number Diff line number Diff line change
Expand Up @@ -106,19 +106,6 @@ contract Lottery is Ownable {
_;
}

/* @dev check that minting period is still open
for when user tries to mint more tickets
*/
modifier isLotteryMintingOpen() {
if (
!(lotteries[currentLotteryId].isActive == true &&
lotteries[currentLotteryId].endTime > block.timestamp &&
lotteries[currentLotteryId].startTime <= block.timestamp)
) {
revert Lottery__MintingPeriodClosed();
}
_;
}
/* @dev check that minting period is completed, and lottery drawing can begin
either:
1) minting period manually ended, ie lottery is inactive. Then drawing can begin immediately.
Expand Down
2 changes: 1 addition & 1 deletion contracts/Random.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity >=0.8.9;
pragma solidity ^0.8.0;

library Random {
/*
Expand Down
19 changes: 0 additions & 19 deletions hardhat.config.js

This file was deleted.

64 changes: 64 additions & 0 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
import { task, HardhatUserConfig } from "hardhat/config";
import "@nomiclabs/hardhat-waffle";
import "hardhat-gas-reporter";
import "solidity-coverage";
import "hardhat-contract-sizer";
import "@typechain/hardhat";
import "@nomiclabs/hardhat-ethers";
import "hardhat-watcher";

// The next line is part of the sample project, you don't need it in your
// project. It imports a Hardhat task definition, that can be used for
// testing the frontend.
require("./tasks/faucet");

// If you are using MetaMask, be sure to change the chainId to 1337
const config: HardhatUserConfig = {
solidity: {
version: "0.8.9",
settings: {
optimizer: {
enabled: true,
runs: 150,
},
},
},
networks: {
hardhat: {
chainId: 31337,
allowUnlimitedContractSize: true,
},
// rinkeby: {
// url: "https://eth-rinkeby.alchemyapi.io/v2/123abc123abc123abc123abc123abcde",
// accounts: [privateKey1, privateKey2, ...]
// },
},
paths: {
sources: "./contracts",
tests: "./test",
cache: "./cache",
artifacts: "./artifacts",
},
contractSizer: {
alphaSort: true,
runOnCompile: false,
},
watcher: {
test: {
tasks: [
"clean",
{ command: "compile", params: { quiet: true } },
{
command: "test",
params: {
testFiles: ["./test/unit/index.ts"],
},
},
],
files: ["./test/**/*"],
verbose: true,
},
},
};

export default config;
Loading

0 comments on commit 9f36a67

Please sign in to comment.