Skip to content

v1.0.0-beta.16

Pre-release
Pre-release
Compare
Choose a tag to compare
@Janther Janther released this 15 Jul 20:49
· 396 commits to main since this release
b488f73

This release contains a bug fix and an improvement in our opinionated standardised code.

  • (#557) We fixed a problem in our indentation in MemberAccess chains.
// input
int256 amount = SafeCast.toInt256(amount.mul(10**(18 - underlyingAssetDecimals))).neg();

// v1.0.0-beta.15
int256 amount = SafeCast
.toInt256(amount.mul(10**(18 - underlyingAssetDecimals)))
.neg();

// v1.0.0-beta.16
int256 amount = SafeCast
    .toInt256(amount.mul(10**(18 - underlyingAssetDecimals)))
    .neg();
  • (#555) We also made the decision to enforce parentheses in ModifierDeclarations without parameters,
// input
modifier onlyOwner {
    require(owner() == _msgSender(), "Ownable: caller is not the owner");
    _;
}

// v1.0.0-beta.15
modifier onlyOwner {
    require(owner() == _msgSender(), "Ownable: caller is not the owner");
    _;
}

// v1.0.0-beta.16
modifier onlyOwner() {
    require(owner() == _msgSender(), "Ownable: caller is not the owner");
    _;
}

and remove them from ModifierInvocations without arguments.

// input
function renounceOwnership() public virtual onlyOwner() {
    _setOwner(address(0));
}

// v1.0.0-beta.15
function renounceOwnership() public virtual onlyOwner() {
    _setOwner(address(0));
}

// v1.0.0-beta.16
function renounceOwnership() public virtual onlyOwner {
    _setOwner(address(0));
}