diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md new file mode 100644 index 0000000..5ba8eeb --- /dev/null +++ b/.github/CONTRIBUTING.md @@ -0,0 +1,16 @@ +# Contributing to Velodrome + +Thanks for your interest in contributing to Velodrome! + +## Pull Requests + +1. Fork the repo and create your branch from `main`. +2. If you've added code that should be tested, add tests. +3. If you've changed APIs, update the documentation. +4. Ensure the test suite passes. +5. Make sure your code lints. +6. Issue that pull request! + +## License + +By contributing, you agree that your contributions will be licensed under its Apache-2.0 License. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..723694a --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +## Summary + + +## Changelog + + +## Test Plan + diff --git a/.gitignore b/.gitignore index b2aa99b..44c3088 100644 --- a/.gitignore +++ b/.gitignore @@ -16,4 +16,9 @@ deployments/ artifacts/ # Coverage -lcov.info \ No newline at end of file +lcov.info + +# Editor files +.DS_Store +.vscode/ +*.log diff --git a/README.md b/README.md index c769927..981a334 100644 --- a/README.md +++ b/README.md @@ -112,3 +112,7 @@ guideline for licensing. See LICENSE and NOTICE files. | SinkGaugeFactory | [0xe62b4BC24eB6446675A1cB3facA2339676E9e5a2](https://optimistic.etherscan.io/address/0xe62b4BC24eB6446675A1cB3facA2339676E9e5a2#code) | | SinkPool | [0x333030A736B47D20346d82A473680658ac1C2b88](https://optimistic.etherscan.io/address/0x333030A736B47D20346d82A473680658ac1C2b88#code) | | SinkPoolFactory | [0xd173B8d1A91bA0D434f393ad7A1680515a069091](https://optimistic.etherscan.io/address/0xd173B8d1A91bA0D434f393ad7A1680515a069091#code) | + +## Community + +For support and discussion, join the Velodrome community on [Discord](https://discord.com/invite/velodrome) and follow us on [Twitter](https://twitter.com/velodromefi). diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..60e5ab0 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,9 @@ +# Security Policy + +## Reporting a Vulnerability + +Please report security vulnerabilities to security@velodrome.finance. + +## Bug Bounty + +Velodrome features an active bug bounty program on Immunefi. diff --git a/contracts/Minter.sol b/contracts/Minter.sol index 5d6f975..f67e491 100644 --- a/contracts/Minter.sol +++ b/contracts/Minter.sol @@ -122,6 +122,7 @@ contract Minter is IMinter { } /// @inheritdoc IMinter + /// @notice Updates the period and manages emissions function updatePeriod() external returns (uint256 _period) { _period = activePeriod; if (block.timestamp >= _period + WEEK) { diff --git a/contracts/Velo.sol b/contracts/Velo.sol index a3dba1c..c16575c 100644 --- a/contracts/Velo.sol +++ b/contracts/Velo.sol @@ -24,6 +24,7 @@ contract Velo is IVelo, ERC20Permit { minter = _minter; } + /// @notice Mints new tokens to the account function mint(address account, uint256 amount) external returns (bool) { if (msg.sender != minter) revert NotMinter(); _mint(account, amount); diff --git a/contracts/Voter.sol b/contracts/Voter.sol index 3b2738a..3d56b62 100644 --- a/contracts/Voter.sol +++ b/contracts/Voter.sol @@ -123,6 +123,7 @@ contract Voter is IVoter, ERC2771Context, ReentrancyGuardTransient { } /// @dev requires initialization with at least rewardToken + /// @notice Initializes the Voter contract function initialize(address[] calldata _tokens, address _minter) external { if (_msgSender() != minter) revert NotMinter(); uint256 _length = _tokens.length; diff --git a/contracts/VotingEscrow.sol b/contracts/VotingEscrow.sol index fc1f7e5..4f81329 100644 --- a/contracts/VotingEscrow.sol +++ b/contracts/VotingEscrow.sol @@ -771,6 +771,7 @@ contract VotingEscrow is IVotingEscrow, ERC2771Context, ReentrancyGuardTransient } /// @inheritdoc IVotingEscrow + /// @notice Records a global checkpoint function checkpoint() external nonReentrant { _checkpoint(0, LockedBalance(0, 0, false), LockedBalance(0, 0, false)); } diff --git a/package.json b/package.json index 574b6ed..3569a5b 100644 --- a/package.json +++ b/package.json @@ -14,10 +14,17 @@ "solhint-plugin-prettier": "^0.0.5", "solidity-coverage": "^0.8.2" }, + "keywords": [ + "amm", + "defi", + "optimism", + "velodrome", + "solidity" + ], "scripts": { "format": "prettier --write 'contracts/**/*.(sol|json)' 'test/**/*.(sol|json)' 'script/**/*.(sol|ts)'", "format:check": "prettier --check 'contracts/**/*.*(sol|json)' 'test/**/*.(sol|json)' 'script/**/*.(sol|ts)'", "lint": "solhint --fix 'contracts/**/*.sol' 'test/**/*.sol' 'script/**/*.sol'", "lint:check": "solhint 'contracts/**/*.sol' 'test/**/*.sol' 'script/**/*.sol'" } -} +} \ No newline at end of file