Commit bd3eea64 by github-actions

Merge upstream master into patched/master

parents ba08261a b174f067
name: Upgradeable Trigger
on:
push:
branches:
- master
- release-v*
jobs:
trigger:
runs-on: ubuntu-latest
steps:
- id: app
uses: getsentry/action-github-app-token@v1
with:
app_id: ${{ secrets.UPGRADEABLE_APP_ID }}
private_key: ${{ secrets.UPGRADEABLE_APP_PK }}
- run: |
curl -X POST \
https://api.github.com/repos/OpenZeppelin/openzeppelin-contracts-upgradeable/dispatches \
-H 'Accept: application/vnd.github.v3+json' \
-H 'Authorization: token ${{ steps.app.outputs.token }}' \
-d '{ "event_type": "Update", "client_payload": { "ref": "${{ github.ref }}" } }'
......@@ -137,7 +137,7 @@ abstract contract Governor is Context, ERC165, EIP712, IGovernor {
}
/**
* @dev Amount of votes already casted passes the threshold limit.
* @dev Amount of votes already cast passes the threshold limit.
*/
function _quorumReached(uint256 proposalId) internal view virtual returns (bool);
......@@ -305,7 +305,7 @@ abstract contract Governor is Context, ERC165, EIP712, IGovernor {
}
/**
* @dev Internal vote casting mechanism: Check that the vote is pending, that it has not been casted yet, retrieve
* @dev Internal vote casting mechanism: Check that the vote is pending, that it has not been cast yet, retrieve
* voting weight using {IGovernor-getVotes} and call the {_countVote} internal function.
*
* Emits a {IGovernor-VoteCast} event.
......
......@@ -47,7 +47,7 @@ abstract contract IGovernor is IERC165 {
event ProposalExecuted(uint256 proposalId);
/**
* @dev Emitted when a vote is casted.
* @dev Emitted when a vote is cast.
*
* Note: `support` values should be seen as buckets. There interpretation depends on the voting module used.
*/
......@@ -131,7 +131,7 @@ abstract contract IGovernor is IERC165 {
/**
* @notice module:user-config
* @dev Minimum number of casted voted requiered for a proposal to be successful.
* @dev Minimum number of cast voted requiered for a proposal to be successful.
*
* Note: The `blockNumber` parameter corresponds to the snaphot used for counting vote. This allows to scale the
* quroum depending on values such as the totalSupply of a token at this block (see {ERC20Votes}).
......@@ -149,7 +149,7 @@ abstract contract IGovernor is IERC165 {
/**
* @notice module:voting
* @dev Returns weither `account` has casted a vote on `proposalId`.
* @dev Returns weither `account` has cast a vote on `proposalId`.
*/
function hasVoted(uint256 proposalId, address account) public view virtual returns (bool);
......
......@@ -283,7 +283,7 @@ abstract contract GovernorCompatibilityBravo is
ProposalDetails storage details = _proposalDetails[proposalId];
Receipt storage receipt = details.receipts[account];
require(!receipt.hasVoted, "GovernorCompatibilityBravo: vote already casted");
require(!receipt.hasVoted, "GovernorCompatibilityBravo: vote already cast");
receipt.hasVoted = true;
receipt.support = support;
receipt.votes = SafeCast.toUint96(weight);
......
......@@ -89,7 +89,7 @@ abstract contract GovernorCountingSimple is Governor {
) internal virtual override {
ProposalVote storage proposalvote = _proposalVotes[proposalId];
require(!proposalvote.hasVoted[account], "GovernorVotingSimple: vote already casted");
require(!proposalvote.hasVoted[account], "GovernorVotingSimple: vote already cast");
proposalvote.hasVoted[account] = true;
if (support == uint8(VoteType.Against)) {
......
......@@ -59,6 +59,7 @@ module.exports = {
},
networks: {
hardhat: {
hardfork: process.env.COVERAGE ? 'berlin' : 'london',
blockGasLimit: 10000000,
allowUnlimitedContractSize: !withOptimizations,
},
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -13,7 +13,7 @@
},
"scripts": {
"compile": "hardhat compile",
"coverage": "hardhat coverage",
"coverage": "env COVERAGE=true hardhat coverage",
"docs": "oz-docs",
"docs:watch": "npm run docs watch contracts 'docs/*.hbs' docs/helpers.js",
"prepare-docs": "scripts/prepare-docs.sh",
......@@ -54,7 +54,8 @@
"@nomiclabs/hardhat-truffle5": "^2.0.0",
"@nomiclabs/hardhat-web3": "^2.0.0",
"@openzeppelin/docs-utils": "^0.1.0",
"@openzeppelin/test-helpers": "^0.5.9",
"@openzeppelin/test-helpers": "^0.5.13",
"@truffle/abi-utils": "^0.2.3",
"chai": "^4.2.0",
"eslint": "^6.5.1",
"eslint-config-standard": "^14.1.1",
......
......@@ -102,21 +102,21 @@ contract('PaymentSplitter', function (accounts) {
// distribute to payees
const initAmount1 = await balance.current(payee1);
const { logs: logs1 } = await this.contract.release(payee1, { gasPrice: 0 });
const profit1 = (await balance.current(payee1)).sub(initAmount1);
const tracker1 = await balance.tracker(payee1);
const { logs: logs1 } = await this.contract.release(payee1);
const profit1 = await tracker1.delta();
expect(profit1).to.be.bignumber.equal(ether('0.20'));
expectEvent.inLogs(logs1, 'PaymentReleased', { to: payee1, amount: profit1 });
const initAmount2 = await balance.current(payee2);
const { logs: logs2 } = await this.contract.release(payee2, { gasPrice: 0 });
const profit2 = (await balance.current(payee2)).sub(initAmount2);
const tracker2 = await balance.tracker(payee2);
const { logs: logs2 } = await this.contract.release(payee2);
const profit2 = await tracker2.delta();
expect(profit2).to.be.bignumber.equal(ether('0.10'));
expectEvent.inLogs(logs2, 'PaymentReleased', { to: payee2, amount: profit2 });
const initAmount3 = await balance.current(payee3);
const { logs: logs3 } = await this.contract.release(payee3, { gasPrice: 0 });
const profit3 = (await balance.current(payee3)).sub(initAmount3);
const tracker3 = await balance.tracker(payee3);
const { logs: logs3 } = await this.contract.release(payee3);
const profit3 = await tracker3.delta();
expect(profit3).to.be.bignumber.equal(ether('0.70'));
expectEvent.inLogs(logs3, 'PaymentReleased', { to: payee3, amount: profit3 });
......
......@@ -440,7 +440,7 @@ contract('Governor', function (accounts) {
voter: voter1,
weight: web3.utils.toWei('5'),
support: Enums.VoteType.For,
error: 'GovernorVotingSimple: vote already casted',
error: 'GovernorVotingSimple: vote already cast',
},
],
};
......
......@@ -110,7 +110,7 @@ contract('GovernorCompatibilityBravo', function (accounts) {
{
voter: voter1,
support: Enums.VoteType.For,
error: 'GovernorCompatibilityBravo: vote already casted',
error: 'GovernorCompatibilityBravo: vote already cast',
skip: true,
},
],
......@@ -296,7 +296,7 @@ contract('GovernorCompatibilityBravo', function (accounts) {
{
voter: voter1,
support: Enums.VoteType.For,
error: 'GovernorCompatibilityBravo: vote already casted',
error: 'GovernorCompatibilityBravo: vote already cast',
skip: true,
},
],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment