Set up codespell (#3643)
This commit is contained in:
@ -55,7 +55,7 @@ abstract contract GovernorVotesQuorumFraction is GovernorVotes {
|
||||
return latest._value;
|
||||
}
|
||||
|
||||
// Otherwize, do the binary search
|
||||
// Otherwise, do the binary search
|
||||
return _quorumNumeratorHistory.getAtBlock(blockNumber);
|
||||
}
|
||||
|
||||
|
||||
@ -147,7 +147,7 @@ abstract contract ERC4626 is ERC20, IERC4626 {
|
||||
* @dev Internal conversion function (from assets to shares) with support for rounding direction.
|
||||
*
|
||||
* Will revert if assets > 0, totalSupply > 0 and totalAssets = 0. That corresponds to a case where any asset
|
||||
* would represent an infinite amout of shares.
|
||||
* would represent an infinite amount of shares.
|
||||
*/
|
||||
function _convertToShares(uint256 assets, Math.Rounding rounding) internal view virtual returns (uint256 shares) {
|
||||
uint256 supply = totalSupply();
|
||||
@ -182,7 +182,7 @@ abstract contract ERC4626 is ERC20, IERC4626 {
|
||||
// calls the vault, which is assumed not malicious.
|
||||
//
|
||||
// Conclusion: we need to do the transfer before we mint so that any reentrancy would happen before the
|
||||
// assets are transfered and before the shares are minted, which is a valid state.
|
||||
// assets are transferred and before the shares are minted, which is a valid state.
|
||||
// slither-disable-next-line reentrancy-no-eth
|
||||
SafeERC20.safeTransferFrom(_asset, caller, address(this), assets);
|
||||
_mint(receiver, shares);
|
||||
@ -209,7 +209,7 @@ abstract contract ERC4626 is ERC20, IERC4626 {
|
||||
// calls the vault, which is assumed not malicious.
|
||||
//
|
||||
// Conclusion: we need to do the transfer after the burn so that any reentrancy would happen after the
|
||||
// shares are burned and after the assets are transfered, which is a valid state.
|
||||
// shares are burned and after the assets are transferred, which is a valid state.
|
||||
_burn(owner, shares);
|
||||
SafeERC20.safeTransfer(_asset, receiver, assets);
|
||||
|
||||
|
||||
@ -324,7 +324,7 @@ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
|
||||
|
||||
unchecked {
|
||||
// Cannot overflow, as that would require more tokens to be burned/transferred
|
||||
// out than the owner initialy received through minting and transferring in.
|
||||
// out than the owner initially received through minting and transferring in.
|
||||
_balances[owner] -= 1;
|
||||
}
|
||||
delete _owners[tokenId];
|
||||
@ -355,7 +355,7 @@ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
|
||||
|
||||
_beforeTokenTransfer(from, to, tokenId);
|
||||
|
||||
// Check that tokenId was not transfered by `_beforeTokenTransfer` hook
|
||||
// Check that tokenId was not transferred by `_beforeTokenTransfer` hook
|
||||
require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner");
|
||||
|
||||
// Clear approvals from the previous owner
|
||||
|
||||
Reference in New Issue
Block a user