Fix many spelling errors (#3274)

pull/3284/head
Pandapip1 3 years ago committed by GitHub
parent 0eba5112c8
commit faf5820f03
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      CHANGELOG.md
  2. 2
      audit/2017-03.md
  3. 2
      certora/applyHarness.patch
  4. 6
      certora/specs/GovernorBase.spec
  5. 10
      certora/specs/GovernorCountingSimple.spec
  6. 2
      contracts/finance/VestingWallet.sol
  7. 14
      contracts/governance/Governor.sol
  8. 4
      contracts/governance/IGovernor.sol
  9. 2
      contracts/governance/README.adoc
  10. 20
      contracts/governance/TimelockController.sol
  11. 6
      contracts/governance/extensions/GovernorTimelockCompound.sol
  12. 6
      contracts/governance/extensions/GovernorTimelockControl.sol
  13. 2
      contracts/interfaces/IERC2981.sol
  14. 4
      contracts/proxy/Proxy.sol
  15. 2
      contracts/utils/math/SafeMath.sol
  16. 2
      contracts/utils/structs/DoubleEndedQueue.sol
  17. 48
      test/governance/TimelockController.test.js
  18. 2
      test/governance/compatibility/GovernorCompatibilityBravo.test.js
  19. 6
      test/helpers/governance.js
  20. 2
      test/utils/cryptography/ECDSA.test.js
  21. 2
      test/utils/structs/DoubleEndedQueue.test.js

@ -458,7 +458,7 @@ Refer to the table below to adjust your inheritance list.
* `SignedSafeMath`: added overflow-safe operations for signed integers (`int256`). ([#1559](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1559), [#1588](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1588))
### Improvements
* The compiler version required by `Array` was behind the rest of the libray so it was updated to `v0.4.24`. ([#1553](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1553))
* The compiler version required by `Array` was behind the rest of the library so it was updated to `v0.4.24`. ([#1553](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1553))
* Now conforming to a 4-space indentation code style. ([1508](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1508))
* `ERC20`: more gas efficient due to removed redundant `require`s. ([#1409](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1409))
* `ERC721`: fixed a bug that prevented internal data structures from being properly cleaned, missing potential gas refunds. ([#1539](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1539) and [#1549](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1549))

@ -133,7 +133,7 @@ I presume that the goal of this contract is to allow and annotate a migration to
We like these pauses! Note that these allow significant griefing potential by owners, and that this might not be obvious to participants in smart contracts using the OpenZeppelin framework. We would recommend that additional sample logic be added to for instance the TokenContract showing safer use of the pause and resume functions. In particular, we would recommend a timelock after which anyone could unpause the contract.
The modifers use the pattern `if(bool){_;}`. This is fine for functions that return false upon failure, but could be problematic for functions expected to throw upon failure. See our comments above on standardizing on `throw` or `return(false)`.
The modifiers use the pattern `if(bool){_;}`. This is fine for functions that return false upon failure, but could be problematic for functions expected to throw upon failure. See our comments above on standardizing on `throw` or `return(false)`.
## Ownership

@ -71,7 +71,7 @@ diff -ruN governance/Governor.sol governance/Governor.sol
+
/**
* @dev Restrict access to governor executing address. Some module might override the _executor function to make
* sure this modifier is consistant with the execution model.
* sure this modifier is consistent with the execution model.
@@ -167,12 +167,12 @@
/**
* @dev Amount of votes already cast passes the threshold limit.

@ -173,11 +173,11 @@ rule executionOnlyIfQuoromReachedAndVoteSucceeded(uint256 pId, env e, method f){
/*
* A user cannot vote twice
*/
// Checked for castVote only. all 3 castVote functions call _castVote, so the completness of the verification is counted on
// the fact that the 3 functions themselves makes no chages, but rather call an internal function to execute.
// Checked for castVote only. all 3 castVote functions call _castVote, so the completeness of the verification is counted on
// the fact that the 3 functions themselves makes no changes, but rather call an internal function to execute.
// That means that we do not check those 3 functions directly, however for castVote & castVoteWithReason it is quite trivial
// to understand why this is ok. For castVoteBySig we basically assume that the signature referendum is correct without checking it.
// We could check each function seperately and pass the rule, but that would have uglyfied the code with no concrete
// We could check each function separately and pass the rule, but that would have uglyfied the code with no concrete
// benefit, as it is evident that nothing is happening in the first 2 functions (calling a view function), and we do not desire to check the signature verification.
rule doubleVoting(uint256 pId, uint8 sup, method f) {
env e;

@ -128,11 +128,11 @@ invariant OneIsNotMoreThanAll(uint256 pId)
/*
* Only sender's voting status can be changed by execution of any cast vote function
*/
// Checked for castVote only. all 3 castVote functions call _castVote, so the completness of the verification is counted on
// the fact that the 3 functions themselves makes no chages, but rather call an internal function to execute.
// Checked for castVote only. all 3 castVote functions call _castVote, so the completeness of the verification is counted on
// the fact that the 3 functions themselves makes no changes, but rather call an internal function to execute.
// That means that we do not check those 3 functions directly, however for castVote & castVoteWithReason it is quite trivial
// to understand why this is ok. For castVoteBySig we basically assume that the signature referendum is correct without checking it.
// We could check each function seperately and pass the rule, but that would have uglyfied the code with no concrete
// We could check each function separately and pass the rule, but that would have uglyfied the code with no concrete
// benefit, as it is evident that nothing is happening in the first 2 functions (calling a view function), and we do not desire to check the signature verification.
rule noVoteForSomeoneElse(uint256 pId, uint8 sup, method f) {
env e; calldataarg args;
@ -205,7 +205,7 @@ rule privilegedOnlyNumerator(method f, uint256 newQuorumNumerator){
uint256 quorumNumAfter = quorumNumerator(e);
address executorCheck = getExecutor(e);
assert quorumNumBefore != quorumNumAfter => e.msg.sender == executorCheck, "non priveleged user changed quorum numerator";
assert quorumNumBefore != quorumNumAfter => e.msg.sender == executorCheck, "non privileged user changed quorum numerator";
}
rule privilegedOnlyTimelock(method f, uint256 newQuorumNumerator){
@ -217,5 +217,5 @@ rule privilegedOnlyTimelock(method f, uint256 newQuorumNumerator){
uint256 timelockAfter = timelock(e);
assert timelockBefore != timelockAfter => e.msg.sender == timelockBefore, "non priveleged user changed timelock";
assert timelockBefore != timelockAfter => e.msg.sender == timelockBefore, "non privileged user changed timelock";
}

@ -120,7 +120,7 @@ contract VestingWallet is Context {
}
/**
* @dev Virtual implementation of the vesting formula. This returns the amout vested, as a function of time, for
* @dev Virtual implementation of the vesting formula. This returns the amount vested, as a function of time, for
* an asset given its total historical allocation.
*/
function _vestingSchedule(uint256 totalAllocation, uint64 timestamp) internal view virtual returns (uint256) {

@ -46,7 +46,7 @@ abstract contract Governor is Context, ERC165, EIP712, IGovernor {
// This queue keeps track of the governor operating on itself. Calls to functions protected by the
// {onlyGovernance} modifier needs to be whitelisted in this queue. Whitelisting is set in {_beforeExecute},
// consummed by the {onlyGovernance} modifier and eventually reset in {_afterExecute}. This ensures that the
// consumed by the {onlyGovernance} modifier and eventually reset in {_afterExecute}. This ensures that the
// execution of {onlyGovernance} protected calls can only be achieved through successful proposals.
DoubleEndedQueue.Bytes32Deque private _governanceCall;
@ -64,7 +64,7 @@ abstract contract Governor is Context, ERC165, EIP712, IGovernor {
require(_msgSender() == _executor(), "Governor: onlyGovernance");
if (_executor() != address(this)) {
bytes32 msgDataHash = keccak256(_msgData());
// loop until poping the expected operation - throw if deque is empty (operation not authorized)
// loop until popping the expected operation - throw if deque is empty (operation not authorized)
while (_governanceCall.popFront() != msgDataHash) {}
}
_;
@ -124,7 +124,7 @@ abstract contract Governor is Context, ERC165, EIP712, IGovernor {
*
* Note that the chainId and the governor address are not part of the proposal id computation. Consequently, the
* same proposal (with same operation and same description) will have the same id if submitted on multiple governors
* accross multiple networks. This also means that in order to execute the same operation twice (on the same
* across multiple networks. This also means that in order to execute the same operation twice (on the same
* governor) the proposer will have to change the description in order to avoid proposal id conflicts.
*/
function hashProposal(
@ -229,7 +229,7 @@ abstract contract Governor is Context, ERC165, EIP712, IGovernor {
/**
* @dev Default additional encoded parameters used by castVote methods that don't include them
*
* Note: Should be overriden by specific implementations to use an appropriate value, the
* Note: Should be overridden by specific implementations to use an appropriate value, the
* meaning of the additional params, in the context of that implementation
*/
function _defaultParams() internal view virtual returns (bytes memory) {
@ -308,7 +308,7 @@ abstract contract Governor is Context, ERC165, EIP712, IGovernor {
}
/**
* @dev Internal execution mechanism. Can be overriden to implement different execution mechanism
* @dev Internal execution mechanism. Can be overridden to implement different execution mechanism
*/
function _execute(
uint256, /* proposalId */
@ -325,7 +325,7 @@ abstract contract Governor is Context, ERC165, EIP712, IGovernor {
}
/**
* @dev Hook before execution is trigerred.
* @dev Hook before execution is triggered.
*/
function _beforeExecute(
uint256, /* proposalId */
@ -344,7 +344,7 @@ abstract contract Governor is Context, ERC165, EIP712, IGovernor {
}
/**
* @dev Hook after execution is trigerred.
* @dev Hook after execution is triggered.
*/
function _afterExecute(
uint256, /* proposalId */

@ -158,8 +158,8 @@ abstract contract IGovernor is IERC165 {
* @notice module:user-config
* @dev Minimum number of cast voted required 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}).
* Note: The `blockNumber` parameter corresponds to the snapshot used for counting vote. This allows to scale the
* quorum depending on values such as the totalSupply of a token at this block (see {ERC20Votes}).
*/
function quorum(uint256 blockNumber) public view virtual returns (uint256);

@ -40,7 +40,7 @@ Other extensions can customize the behavior or interface in multiple ways.
* {GovernorCompatibilityBravo}: Extends the interface to be fully `GovernorBravo`-compatible. Note that events are compatible regardless of whether this extension is included or not.
* {GovernorSettings}: Manages some of the settings (voting delay, voting period duration, and proposal threshold) in a way that can be updated through a governance proposal, without requiering an upgrade.
* {GovernorSettings}: Manages some of the settings (voting delay, voting period duration, and proposal threshold) in a way that can be updated through a governance proposal, without requiring an upgrade.
* {GovernorPreventLateQuorum}: Ensures there is a minimum voting period after quorum is reached as a security protection against large voters.

@ -185,11 +185,11 @@ contract TimelockController is AccessControl {
function hashOperationBatch(
address[] calldata targets,
uint256[] calldata values,
bytes[] calldata datas,
bytes[] calldata payloads,
bytes32 predecessor,
bytes32 salt
) public pure virtual returns (bytes32 hash) {
return keccak256(abi.encode(targets, values, datas, predecessor, salt));
return keccak256(abi.encode(targets, values, payloads, predecessor, salt));
}
/**
@ -226,18 +226,18 @@ contract TimelockController is AccessControl {
function scheduleBatch(
address[] calldata targets,
uint256[] calldata values,
bytes[] calldata datas,
bytes[] calldata payloads,
bytes32 predecessor,
bytes32 salt,
uint256 delay
) public virtual onlyRole(PROPOSER_ROLE) {
require(targets.length == values.length, "TimelockController: length mismatch");
require(targets.length == datas.length, "TimelockController: length mismatch");
require(targets.length == payloads.length, "TimelockController: length mismatch");
bytes32 id = hashOperationBatch(targets, values, datas, predecessor, salt);
bytes32 id = hashOperationBatch(targets, values, payloads, predecessor, salt);
_schedule(id, delay);
for (uint256 i = 0; i < targets.length; ++i) {
emit CallScheduled(id, i, targets[i], values[i], datas[i], predecessor, delay);
emit CallScheduled(id, i, targets[i], values[i], payloads[i], predecessor, delay);
}
}
@ -301,17 +301,17 @@ contract TimelockController is AccessControl {
function executeBatch(
address[] calldata targets,
uint256[] calldata values,
bytes[] calldata datas,
bytes[] calldata payloads,
bytes32 predecessor,
bytes32 salt
) public payable virtual onlyRoleOrOpenRole(EXECUTOR_ROLE) {
require(targets.length == values.length, "TimelockController: length mismatch");
require(targets.length == datas.length, "TimelockController: length mismatch");
require(targets.length == payloads.length, "TimelockController: length mismatch");
bytes32 id = hashOperationBatch(targets, values, datas, predecessor, salt);
bytes32 id = hashOperationBatch(targets, values, payloads, predecessor, salt);
_beforeCall(id, predecessor);
for (uint256 i = 0; i < targets.length; ++i) {
_call(id, i, targets[i], values[i], datas[i]);
_call(id, i, targets[i], values[i], payloads[i]);
}
_afterCall(id);
}

@ -105,7 +105,7 @@ abstract contract GovernorTimelockCompound is IGovernorTimelock, Governor {
}
/**
* @dev Overriden version of the {Governor-state} function with added support for the `Queued` and `Expired` status.
* @dev Overridden version of the {Governor-state} function with added support for the `Queued` and `Expired` status.
*/
function state(uint256 proposalId) public view virtual override(IGovernor, Governor) returns (ProposalState) {
ProposalState status = super.state(proposalId);
@ -167,7 +167,7 @@ abstract contract GovernorTimelockCompound is IGovernorTimelock, Governor {
}
/**
* @dev Overriden execute function that run the already queued proposal through the timelock.
* @dev Overridden execute function that run the already queued proposal through the timelock.
*/
function _execute(
uint256 proposalId,
@ -185,7 +185,7 @@ abstract contract GovernorTimelockCompound is IGovernorTimelock, Governor {
}
/**
* @dev Overriden version of the {Governor-_cancel} function to cancel the timelocked proposal if it as already
* @dev Overridden version of the {Governor-_cancel} function to cancel the timelocked proposal if it as already
* been queued.
*/
function _cancel(

@ -47,7 +47,7 @@ abstract contract GovernorTimelockControl is IGovernorTimelock, Governor {
}
/**
* @dev Overriden version of the {Governor-state} function with added support for the `Queued` status.
* @dev Overridden version of the {Governor-state} function with added support for the `Queued` status.
*/
function state(uint256 proposalId) public view virtual override(IGovernor, Governor) returns (ProposalState) {
ProposalState status = super.state(proposalId);
@ -107,7 +107,7 @@ abstract contract GovernorTimelockControl is IGovernorTimelock, Governor {
}
/**
* @dev Overriden execute function that run the already queued proposal through the timelock.
* @dev Overridden execute function that run the already queued proposal through the timelock.
*/
function _execute(
uint256, /* proposalId */
@ -120,7 +120,7 @@ abstract contract GovernorTimelockControl is IGovernorTimelock, Governor {
}
/**
* @dev Overriden version of the {Governor-_cancel} function to cancel the timelocked proposal if it as already
* @dev Overridden version of the {Governor-_cancel} function to cancel the timelocked proposal if it as already
* been queued.
*/
// This function can reenter through the external call to the timelock, but we assume the timelock is trusted and

@ -16,7 +16,7 @@ import "../utils/introspection/IERC165.sol";
interface IERC2981 is IERC165 {
/**
* @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of
* exchange. The royalty amount is denominated and should be payed in that same unit of exchange.
* exchange. The royalty amount is denominated and should be paid in that same unit of exchange.
*/
function royaltyInfo(uint256 tokenId, uint256 salePrice)
external

@ -45,7 +45,7 @@ abstract contract Proxy {
}
/**
* @dev This is a virtual function that should be overriden so it returns the address to which the fallback function
* @dev This is a virtual function that should be overridden so it returns the address to which the fallback function
* and {_fallback} should delegate.
*/
function _implementation() internal view virtual returns (address);
@ -80,7 +80,7 @@ abstract contract Proxy {
* @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`
* call, or as part of the Solidity `fallback` or `receive` functions.
*
* If overriden should call `super._beforeFallback()`.
* If overridden should call `super._beforeFallback()`.
*/
function _beforeFallback() internal virtual {}
}

@ -28,7 +28,7 @@ library SafeMath {
}
/**
* @dev Returns the substraction of two unsigned integers, with an overflow flag.
* @dev Returns the subtraction of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/

@ -24,7 +24,7 @@ library DoubleEndedQueue {
error Empty();
/**
* @dev An operation (e.g. {at}) could't be completed due to an index being out of bounds.
* @dev An operation (e.g. {at}) couldn't be completed due to an index being out of bounds.
*/
error OutOfBounds();

@ -25,7 +25,7 @@ function genOperation (target, value, data, predecessor, salt) {
return { id, target, value, data, predecessor, salt };
}
function genOperationBatch (targets, values, datas, predecessor, salt) {
function genOperationBatch (targets, values, payloads, predecessor, salt) {
const id = web3.utils.keccak256(web3.eth.abi.encodeParameters([
'address[]',
'uint256[]',
@ -35,11 +35,11 @@ function genOperationBatch (targets, values, datas, predecessor, salt) {
], [
targets,
values,
datas,
payloads,
predecessor,
salt,
]));
return { id, targets, values, datas, predecessor, salt };
return { id, targets, values, payloads, predecessor, salt };
}
contract('TimelockController', function (accounts) {
@ -119,7 +119,7 @@ contract('TimelockController', function (accounts) {
expect(await this.timelock.hashOperationBatch(
this.operation.targets,
this.operation.values,
this.operation.datas,
this.operation.payloads,
this.operation.predecessor,
this.operation.salt,
)).to.be.equal(this.operation.id);
@ -163,7 +163,7 @@ contract('TimelockController', function (accounts) {
.to.be.bignumber.equal(web3.utils.toBN(block.timestamp).add(MINDELAY));
});
it('prevent overwritting active operation', async function () {
it('prevent overwriting active operation', async function () {
await this.timelock.schedule(
this.operation.target,
this.operation.value,
@ -346,7 +346,7 @@ contract('TimelockController', function (accounts) {
const receipt = await this.timelock.scheduleBatch(
this.operation.targets,
this.operation.values,
this.operation.datas,
this.operation.payloads,
this.operation.predecessor,
this.operation.salt,
MINDELAY,
@ -358,7 +358,7 @@ contract('TimelockController', function (accounts) {
index: web3.utils.toBN(i),
target: this.operation.targets[i],
value: web3.utils.toBN(this.operation.values[i]),
data: this.operation.datas[i],
data: this.operation.payloads[i],
predecessor: this.operation.predecessor,
delay: MINDELAY,
});
@ -370,11 +370,11 @@ contract('TimelockController', function (accounts) {
.to.be.bignumber.equal(web3.utils.toBN(block.timestamp).add(MINDELAY));
});
it('prevent overwritting active operation', async function () {
it('prevent overwriting active operation', async function () {
await this.timelock.scheduleBatch(
this.operation.targets,
this.operation.values,
this.operation.datas,
this.operation.payloads,
this.operation.predecessor,
this.operation.salt,
MINDELAY,
@ -385,7 +385,7 @@ contract('TimelockController', function (accounts) {
this.timelock.scheduleBatch(
this.operation.targets,
this.operation.values,
this.operation.datas,
this.operation.payloads,
this.operation.predecessor,
this.operation.salt,
MINDELAY,
@ -400,7 +400,7 @@ contract('TimelockController', function (accounts) {
this.timelock.scheduleBatch(
this.operation.targets,
[],
this.operation.datas,
this.operation.payloads,
this.operation.predecessor,
this.operation.salt,
MINDELAY,
@ -430,7 +430,7 @@ contract('TimelockController', function (accounts) {
this.timelock.scheduleBatch(
this.operation.targets,
this.operation.values,
this.operation.datas,
this.operation.payloads,
this.operation.predecessor,
this.operation.salt,
MINDELAY,
@ -445,7 +445,7 @@ contract('TimelockController', function (accounts) {
this.timelock.scheduleBatch(
this.operation.targets,
this.operation.values,
this.operation.datas,
this.operation.payloads,
this.operation.predecessor,
this.operation.salt,
MINDELAY - 1,
@ -472,7 +472,7 @@ contract('TimelockController', function (accounts) {
this.timelock.executeBatch(
this.operation.targets,
this.operation.values,
this.operation.datas,
this.operation.payloads,
this.operation.predecessor,
this.operation.salt,
{ from: executor },
@ -486,7 +486,7 @@ contract('TimelockController', function (accounts) {
({ receipt: this.receipt, logs: this.logs } = await this.timelock.scheduleBatch(
this.operation.targets,
this.operation.values,
this.operation.datas,
this.operation.payloads,
this.operation.predecessor,
this.operation.salt,
MINDELAY,
@ -499,7 +499,7 @@ contract('TimelockController', function (accounts) {
this.timelock.executeBatch(
this.operation.targets,
this.operation.values,
this.operation.datas,
this.operation.payloads,
this.operation.predecessor,
this.operation.salt,
{ from: executor },
@ -516,7 +516,7 @@ contract('TimelockController', function (accounts) {
this.timelock.executeBatch(
this.operation.targets,
this.operation.values,
this.operation.datas,
this.operation.payloads,
this.operation.predecessor,
this.operation.salt,
{ from: executor },
@ -535,7 +535,7 @@ contract('TimelockController', function (accounts) {
const receipt = await this.timelock.executeBatch(
this.operation.targets,
this.operation.values,
this.operation.datas,
this.operation.payloads,
this.operation.predecessor,
this.operation.salt,
{ from: executor },
@ -546,7 +546,7 @@ contract('TimelockController', function (accounts) {
index: web3.utils.toBN(i),
target: this.operation.targets[i],
value: web3.utils.toBN(this.operation.values[i]),
data: this.operation.datas[i],
data: this.operation.payloads[i],
});
}
});
@ -556,7 +556,7 @@ contract('TimelockController', function (accounts) {
this.timelock.executeBatch(
this.operation.targets,
this.operation.values,
this.operation.datas,
this.operation.payloads,
this.operation.predecessor,
this.operation.salt,
{ from: other },
@ -570,7 +570,7 @@ contract('TimelockController', function (accounts) {
this.timelock.executeBatch(
[],
this.operation.values,
this.operation.datas,
this.operation.payloads,
this.operation.predecessor,
this.operation.salt,
{ from: executor },
@ -584,7 +584,7 @@ contract('TimelockController', function (accounts) {
this.timelock.executeBatch(
this.operation.targets,
[],
this.operation.datas,
this.operation.payloads,
this.operation.predecessor,
this.operation.salt,
{ from: executor },
@ -633,7 +633,7 @@ contract('TimelockController', function (accounts) {
await this.timelock.scheduleBatch(
operation.targets,
operation.values,
operation.datas,
operation.payloads,
operation.predecessor,
operation.salt,
MINDELAY,
@ -644,7 +644,7 @@ contract('TimelockController', function (accounts) {
this.timelock.executeBatch(
operation.targets,
operation.values,
operation.datas,
operation.payloads,
operation.predecessor,
operation.salt,
{ from: executor },

@ -215,7 +215,7 @@ contract('GovernorCompatibilityBravo', function (accounts) {
describe('should revert', function () {
describe('on propose', function () {
it('if proposal doesnt meet proposalThreshold', async function () {
it('if proposal does not meet proposalThreshold', async function () {
await expectRevert(
this.helper.propose({ from: other }),
'GovernorCompatibilityBravo: proposer votes below proposal threshold',

@ -106,13 +106,13 @@ class GovernorHelper {
opts,
)))
: vote.params
// otherwize if params
// otherwise if params
? this.governor.castVoteWithReasonAndParams(...concatOpts(
[ proposal.id, vote.support, vote.reason || '', vote.params ],
opts,
))
: vote.reason
// otherwize if reason
// otherwise if reason
? this.governor.castVoteWithReason(...concatOpts(
[ proposal.id, vote.support, vote.reason ],
opts,
@ -165,7 +165,7 @@ class GovernorHelper {
const descriptionHash = web3.utils.keccak256(description);
// condensed version for queing end executing
// condensed version for queueing end executing
const shortProposal = [
targets,
values,

@ -47,7 +47,7 @@ function split (signature) {
web3.utils.bytesToHex(raw.slice(32, 64)), // s
];
default:
expect.fail('Invalid siganture length, cannot split');
expect.fail('Invalid signature length, cannot split');
}
}

@ -69,7 +69,7 @@ contract('DoubleEndedQueue', function (accounts) {
describe('push', function () {
it('front', async function () {
await this.deque.pushFront(bytesD);
this.content.unshift(bytesD); // add element at the begining
this.content.unshift(bytesD); // add element at the beginning
expect(await getContent(this.deque)).to.have.ordered.members(this.content);
});

Loading…
Cancel
Save