Skip to content

Commit 846374b

Browse files
Transpile acaa5975d
1 parent a8ad58f commit 846374b

File tree

12 files changed

+24
-32
lines changed

12 files changed

+24
-32
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
#### Custom error changes
1010

11+
- Replace `AccessControlNonRevokable` with `AccessControlNonRevocable`.
1112
- Replace `GovernorAlreadyOverridenVote` with `GovernorAlreadyOverriddenVote`.
1213
- Replace `GovernorOnlyProposer` with `GovernorUnableToCancel`.
1314

contracts/mocks/docs/access-control/AccessControlModifiedUpgradeable.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {AccessControlUpgradeable} from "../../../access/AccessControlUpgradeable
66
import {Initializable} from "../../../proxy/utils/Initializable.sol";
77

88
contract AccessControlModifiedUpgradeable is Initializable, AccessControlUpgradeable {
9-
error AccessControlNonRevokable();
9+
error AccessControlNonRevocable();
1010

1111
function __AccessControlModified_init() internal onlyInitializing {
1212
}
@@ -15,6 +15,6 @@ contract AccessControlModifiedUpgradeable is Initializable, AccessControlUpgrade
1515
}
1616
// Override the revokeRole function
1717
function revokeRole(bytes32, address) public pure override {
18-
revert AccessControlNonRevokable();
18+
revert AccessControlNonRevocable();
1919
}
2020
}

contracts/mocks/token/ERC20ForceApproveMockUpgradeable.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ pragma solidity ^0.8.20;
55
import {ERC20Upgradeable} from "../../token/ERC20/ERC20Upgradeable.sol";
66
import {Initializable} from "../../proxy/utils/Initializable.sol";
77

8-
// contract that replicate USDT (0xdac17f958d2ee523a2206206994597c13d831ec7) approval behavior
8+
// contract that replicates USDT (0xdac17f958d2ee523a2206206994597c13d831ec7) approval behavior
99
abstract contract ERC20ForceApproveMockUpgradeable is Initializable, ERC20Upgradeable {
1010
function __ERC20ForceApproveMock_init() internal onlyInitializing {
1111
}

contracts/token/ERC20/ERC20Upgradeable.sol

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,7 @@ abstract contract ERC20Upgradeable is Initializable, ContextUpgradeable, IERC20,
5252
/**
5353
* @dev Sets the values for {name} and {symbol}.
5454
*
55-
* All two of these values are immutable: they can only be set once during
56-
* construction.
55+
* Both values are immutable: they can only be set once during construction.
5756
*/
5857
function __ERC20_init(string memory name_, string memory symbol_) internal onlyInitializing {
5958
__ERC20_init_unchained(name_, symbol_);

contracts/token/ERC20/README.adoc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ This set of interfaces, contracts, and utilities are all related to the https://
77

88
TIP: For an overview of ERC-20 tokens and a walk through on how to create a token contract read our xref:ROOT:erc20.adoc[ERC-20 guide].
99

10-
There are a few core contracts that implement the behavior specified in the ERC:
10+
There are a few core contracts that implement the behavior specified in the ERC-20 standard:
1111

1212
* {IERC20}: the interface all ERC-20 implementations should conform to.
13-
* {IERC20Metadata}: the extended ERC-20 interface including the <<ERC20-name,`name`>>, <<ERC20-symbol,`symbol`>> and <<ERC20-decimals,`decimals`>> functions.
14-
* {ERC20}: the implementation of the ERC-20 interface, including the <<ERC20-name,`name`>>, <<ERC20-symbol,`symbol`>> and <<ERC20-decimals,`decimals`>> optional standard extension to the base interface.
13+
* {IERC20Metadata}: the extended ERC-20 interface including the <<ERC20-name--,`name`>>, <<ERC20-symbol--,`symbol`>> and <<ERC20-decimals--,`decimals`>> functions.
14+
* {ERC20}: the implementation of the ERC-20 interface, including the <<ERC20-name--,`name`>>, <<ERC20-symbol--,`symbol`>> and <<ERC20-decimals--,`decimals`>> optional extensions to the standard interface.
1515
1616
Additionally there are multiple custom extensions, including:
1717

@@ -30,9 +30,9 @@ Finally, there are some utilities to interact with ERC-20 contracts in various w
3030

3131
* {SafeERC20}: a wrapper around the interface that eliminates the need to handle boolean return values.
3232
33-
Other utilities that support ERC-20 assets can be found in codebase:
33+
Other utilities that support ERC-20 assets can be found in the codebase:
3434

35-
* ERC-20 tokens can be timelocked (held tokens for a beneficiary until a specified time) or vested (released following a given schedule) using a {VestingWallet}.
35+
* ERC-20 tokens can be timelocked (held for a beneficiary until a specified time) or vested (released following a given schedule) using a {VestingWallet}.
3636
3737
NOTE: This core set of contracts is designed to be unopinionated, allowing developers to access the internal functions in ERC-20 (such as <<ERC20-_mint-address-uint256-,`_mint`>>) and expose them as external functions in the way they prefer.
3838

docs/modules/ROOT/pages/utilities.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ At a high level, signatures are a set of cryptographic algorithms that allow for
1212

1313
==== Ethereum Signatures (secp256k1)
1414

15-
xref:api:utils.adoc#ECDSA[`ECDSA`] provides functions for recovering and managing Ethereum account ECDSA signatures. These are often generated via https://web3js.readthedocs.io/en/v1.7.3/web3-eth.html#sign[`web3.eth.sign`], and are a 65 byte array (of type `bytes` in Solidity) arranged the following way: `[[v (1)], [r (32)], [s (32)]]`.
15+
xref:api:utils.adoc#ECDSA[`ECDSA`] provides functions for recovering and managing Ethereum account ECDSA signatures. These are often generated via https://web3js.readthedocs.io/en/v1.7.3/web3-eth.html#sign[`web3.eth.sign`], and form a 65-byte array (of type `bytes` in Solidity) arranged the following way: `[[v (1)], [r (32)], [s (32)]]`.
1616

1717
The data signer can be recovered with xref:api:utils.adoc#ECDSA-recover-bytes32-bytes-[`ECDSA.recover`], and its address compared to verify the signature. Most wallets will hash the data to sign and add the prefix `\x19Ethereum Signed Message:\n`, so when attempting to recover the signer of an Ethereum signed message hash, you'll want to use xref:api:utils.adoc#MessageHashUtils-toEthSignedMessageHash-bytes32-[`toEthSignedMessageHash`].
1818

@@ -197,7 +197,7 @@ The `Enumerable*` structures are similar to mappings in that they store and remo
197197

198198
Building an on-chain Merkle Tree allows developers to keep track of the history of roots in a decentralized manner. For these cases, the xref:api:utils.adoc#MerkleTree[`MerkleTree`] includes a predefined structure with functions to manipulate the tree (e.g. pushing values or resetting the tree).
199199

200-
The Merkle Tree does not keep track of the roots purposely, so that developers can choose their tracking mechanism. Setting up and using a Merkle Tree in Solidity is as simple as follows:
200+
The Merkle Tree does not keep track of the roots intentionally, so that developers can choose their tracking mechanism. Setting up and using a Merkle Tree in Solidity is as simple as follows:
201201

202202
NOTE: Functions are exposed without access control for demonstration purposes
203203

@@ -243,7 +243,7 @@ function _hashFn(bytes32 a, bytes32 b) internal view returns(bytes32) {
243243

244244
=== Using a Heap
245245

246-
A https://en.wikipedia.org/wiki/Binary_heap[binary heap] is a data structure that always store the most important element at its peak and it can be used as a priority queue.
246+
A https://en.wikipedia.org/wiki/Binary_heap[binary heap] is a data structure that always stores the most important element at its peak and it can be used as a priority queue.
247247

248248
To define what is most important in a heap, these frequently take comparator functions that tell the binary heap whether a value has more relevance than another.
249249

@@ -358,7 +358,7 @@ This is especially useful for building URL-safe tokenURIs for both xref:api:toke
358358

359359
Here is an example to send JSON Metadata through a Base64 Data URI using an ERC-721:
360360

361-
[source, solidity]
361+
[source,solidity]
362362
----
363363
include::api:example$utilities/Base64NFT.sol[]
364364
----

hardhat/ignore-unreachable-warnings.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// with hardhat-ignore-warnings we are not able to selectively ignore them without potentially ignoring relevant
44
// warnings that we don't want to miss.
55
// Thus, we need to handle these warnings separately. We force Hardhat to compile them in a separate compilation job and
6-
// then ignore the warnings about unreachable code that come from that compilation job.
6+
// then ignore the warnings about unreachable code coming from that compilation job.
77

88
const { task } = require('hardhat/config');
99
const {

scripts/generate/templates/TransientSlot.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ pragma solidity ^0.8.24;
3434

3535
const udvt = ({ type, name }) => `\
3636
/**
37-
* @dev UDVT that represents a slot holding a ${type}.
37+
* @dev UDVT that represents a slot holding ${type == 'address' ? 'an' : 'a'} ${type}.
3838
*/
3939
type ${name}Slot is bytes32;
4040

test/governance/extensions/GovernorVotesSuperQuorumFraction.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ describe('GovernorVotesSuperQuorumFraction', function () {
7070
});
7171

7272
it('deployment check', async function () {
73-
await expect(this.mock.name()).to.eventually.eventually.equal(name);
73+
await expect(this.mock.name()).to.eventually.equal(name);
7474
await expect(this.mock.token()).to.eventually.equal(this.token);
7575
await expect(this.mock.votingDelay()).to.eventually.equal(votingDelay);
7676
await expect(this.mock.votingPeriod()).to.eventually.equal(votingPeriod);

0 commit comments

Comments
 (0)