-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bumped up to 0.8x and using latest oz deps
- Loading branch information
1 parent
ee3c08f
commit e11141c
Showing
5 changed files
with
79 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// SPDX-License-Identifier: GPL-3.0-or-later | ||
// solhint-disable-next-line compiler-version | ||
|
||
// solhint-disable-next-line no-unused-import | ||
import { UFragments } from "ampleforth-contracts/contracts/UFragments.sol"; |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.24; | ||
|
||
// NOTE: Adding an intermediate library to support older version of safemath. | ||
library SafeMathCompatibility { | ||
function add(uint256 a, uint256 b) internal pure returns (uint256) { | ||
return a + b; | ||
} | ||
|
||
function sub(uint256 a, uint256 b) internal pure returns (uint256) { | ||
return a - b; | ||
} | ||
|
||
function mul(uint256 a, uint256 b) internal pure returns (uint256) { | ||
return a * b; | ||
} | ||
|
||
function div(uint256 a, uint256 b) internal pure returns (uint256) { | ||
// solhint-disable-next-line custom-errors | ||
require(b > 0, "SafeMath: division by zero"); | ||
return a / b; | ||
} | ||
|
||
function mod(uint256 a, uint256 b) internal pure returns (uint256) { | ||
// solhint-disable-next-line custom-errors | ||
require(b > 0, "SafeMath: modulo by zero"); | ||
return a % b; | ||
} | ||
} |