Skip to content

Commit

Permalink
fix solidity version to 0.8.19
Browse files Browse the repository at this point in the history
  • Loading branch information
trmid committed Nov 1, 2023
1 parent 4f3b885 commit 40eea17
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 27 deletions.
2 changes: 1 addition & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{
"files": "*.sol",
"options": {
"compiler": "0.8.21",
"compiler": "0.8.19",
"bracketSpacing": true,
"printWidth": 120,
"tabWidth": 4
Expand Down
2 changes: 1 addition & 1 deletion .solhint.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"plugins": ["prettier"],
"rules": {
"avoid-low-level-calls": "off",
"compiler-version": ["error", "0.8.21"],
"compiler-version": ["error", "0.8.19"],
"func-visibility": "off",
"no-empty-blocks": "off",
"no-inline-assembly": "off"
Expand Down
2 changes: 1 addition & 1 deletion foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ src = 'src'
out = 'out'
test = 'test'
libs = ['lib']
solc = "0.8.21"
solc = "0.8.19"
fs_permissions = [{ access = "read", path = "./broadcast" }]
gas_reports = ["Foo"]

Expand Down
14 changes: 3 additions & 11 deletions src/TwabRewards.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;
pragma solidity 0.8.19;

import { IERC20 } from "openzeppelin-contracts/token/ERC20/IERC20.sol";
import { SafeERC20 } from "openzeppelin-contracts/token/ERC20/utils/SafeERC20.sol";
Expand Down Expand Up @@ -112,11 +112,7 @@ contract TwabRewards is ITwabRewards {
* @param vault The address of the vault that the promotion applies to
* @param token The token that will be rewarded from the promotion
*/
event PromotionCreated(
uint256 indexed promotionId,
address indexed vault,
IERC20 indexed token
);
event PromotionCreated(uint256 indexed promotionId, address indexed vault, IERC20 indexed token);

/**
* @notice Emitted when a promotion is ended.
Expand Down Expand Up @@ -210,11 +206,7 @@ contract TwabRewards is ITwabRewards {
if (_afterBalance < _beforeBalance + _amount)
revert TokensReceivedLessThanExpected(_afterBalance - _beforeBalance, _amount);

emit PromotionCreated(
_nextPromotionId,
_vault,
_token
);
emit PromotionCreated(_nextPromotionId, _vault, _token);

return _nextPromotionId;
}
Expand Down
2 changes: 1 addition & 1 deletion src/interfaces/ITwabRewards.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;
pragma solidity 0.8.19;

import { IERC20 } from "openzeppelin-contracts/token/ERC20/IERC20.sol";

Expand Down
14 changes: 3 additions & 11 deletions test/TwabRewards.t.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;
pragma solidity 0.8.19;

import "forge-std/Test.sol";
import { IERC20 } from "openzeppelin-contracts/token/ERC20/IERC20.sol";
Expand Down Expand Up @@ -52,11 +52,7 @@ contract TwabRewardsTest is Test {

/* ============ Events ============ */

event PromotionCreated(
uint256 indexed promotionId,
address indexed vault,
IERC20 indexed token
);
event PromotionCreated(uint256 indexed promotionId, address indexed vault, IERC20 indexed token);
event PromotionEnded(uint256 indexed promotionId, address indexed recipient, uint256 amount, uint8 epochNumber);
event PromotionDestroyed(uint256 indexed promotionId, address indexed recipient, uint256 amount);
event PromotionExtended(uint256 indexed promotionId, uint256 numberOfEpochs);
Expand Down Expand Up @@ -103,11 +99,7 @@ contract TwabRewardsTest is Test {
uint64 _startTimestamp = 1 days;
uint256 _promotionId = 2;
vm.expectEmit();
emit PromotionCreated(
_promotionId,
vaultAddress,
IERC20(mockToken)
);
emit PromotionCreated(_promotionId, vaultAddress, IERC20(mockToken));
twabRewards.createPromotion(
vaultAddress,
mockToken,
Expand Down
2 changes: 1 addition & 1 deletion test/mocks/FeeERC20.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;
pragma solidity 0.8.19;

import { ERC20Mock } from "openzeppelin-contracts/mocks/ERC20Mock.sol";

Expand Down

0 comments on commit 40eea17

Please sign in to comment.