Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

F/add deployment script #37

Open
wants to merge 10 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified .yarn/install-state.gz
Binary file not shown.
2,020 changes: 2,020 additions & 0 deletions package-lock.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ import '@openzeppelin/contracts/governance/Governor.sol';
import '@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol';
import '@openzeppelin/contracts/governance/extensions/GovernorVotes.sol';

contract GovernanceA is Governor, GovernorCountingSimple, GovernorVotes {
constructor(IVotes _token) Governor('GovernorA') GovernorVotes(_token) {}
contract Governance is Governor, GovernorCountingSimple, GovernorVotes {
constructor(string memory _name, IVotes _token) Governor(_name) GovernorVotes(_token) {}

function votingDelay() public pure override returns (uint256) {
return 0; // 1 block
return 0; // blocks
}

function votingPeriod() public pure override returns (uint256) {
return 4; // 1 week
return 40; // blocks
}

function quorum(uint256 blockNumber) public pure override returns (uint256) {
Expand Down
30 changes: 13 additions & 17 deletions packages/hardhat/hardhat.config.js
Original file line number Diff line number Diff line change
@@ -1,27 +1,23 @@
require('dotenv').config()
require('@nomiclabs/hardhat-waffle')
require('hardhat-gas-reporter')
require('@nomiclabs/hardhat-etherscan')

// This is a sample Hardhat task. To learn how to create your own go to
// https://hardhat.org/guides/create-task.html
task('accounts', 'Prints the list of accounts', async (taskArgs, hre) => {
const accounts = await hre.ethers.getSigners()

for (const account of accounts) {
console.log(account.address)
}
})

// You need to export an object to set up your config
// Go to https://hardhat.org/config/ to learn more

/**
* @type import('hardhat/config').HardhatUserConfig
*/
module.exports = {
solidity: '0.8.6',
defaultNetwork: 'hardhat',
networks: {
hardhat: {},
localhost: {
url: 'http://localhost:8545',
chainId: 31337,
},
rinkeby: {
url: process.env.RINKEBY_URL,
accounts: [process.env.PRIVATE_KEY],
},
},
etherscan: {
apiKey: process.env.ETHERSCAN_API_KEY,
},
gasReporter: {
currency: 'USD',
Expand Down
Loading