Skip to content
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
16 changes: 16 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -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.
8 changes: 8 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
## Summary
<!-- Explain the changes you've made -->

## Changelog
<!-- List the files changed and what was done -->

## Test Plan
<!-- How did you test this change? -->
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,9 @@ deployments/
artifacts/

# Coverage
lcov.info
lcov.info

# Editor files
.DS_Store
.vscode/
*.log
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
9 changes: 9 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -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.
1 change: 1 addition & 0 deletions contracts/Minter.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
1 change: 1 addition & 0 deletions contracts/Velo.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 1 addition & 0 deletions contracts/Voter.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions contracts/VotingEscrow.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
Expand Down
9 changes: 8 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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'"
}
}
}