-
Notifications
You must be signed in to change notification settings - Fork 0
feat: configure rewards controller && update init params #64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: staging
Are you sure you want to change the base?
Changes from all commits
e1130c3
b5d6ec2
ca568bc
6bcd965
086c171
cbc74ae
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| +6 −48 | .github/workflows/ci.yml | |
| +0 −29 | .github/workflows/sync.yml | |
| +1 −1 | foundry.toml | |
| +1 −1 | lib/ds-test | |
| +1 −1 | package.json | |
| +3 −5 | src/Base.sol | |
| +2 −3 | src/Script.sol | |
| +8 −8 | src/StdAssertions.sol | |
| +21 −17 | src/StdChains.sol | |
| +11 −98 | src/StdCheats.sol | |
| +1 −1 | src/StdInvariant.sol | |
| +2 −2 | src/StdStyle.sol | |
| +3 −12 | src/StdUtils.sol | |
| +2 −4 | src/Test.sol | |
| +10 −98 | src/Vm.sol | |
| +382 −394 | src/console2.sol | |
| +0 −13,248 | src/safeconsole.sol | |
| +0 −51 | test/StdAssertions.t.sol | |
| +36 −91 | test/StdChains.t.sol | |
| +3 −151 | test/StdCheats.t.sol | |
| +2 −17 | test/StdMath.t.sol | |
| +4 −4 | test/StdStyle.t.sol | |
| +8 −53 | test/StdUtils.t.sol |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| // SPDX-License-Identifier: MIT | ||
| pragma solidity 0.8.18; | ||
|
|
||
| interface IRewardsController { | ||
| function tierOf(uint256 tokenId) external view returns (uint8); | ||
| } |
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -3,6 +3,7 @@ pragma solidity 0.8.18; | |||||||||||
|
|
||||||||||||
| import { AppStorage } from "./AppStorage.sol"; | ||||||||||||
| import { IStratosphere } from "../interfaces/IStratosphere.sol"; | ||||||||||||
| import { IRewardsController } from "../interfaces/IRewardsController.sol"; | ||||||||||||
|
|
||||||||||||
| /// @title LStratosphere | ||||||||||||
| /// @notice Library in charge of Stratosphere related logic | ||||||||||||
|
|
@@ -22,9 +23,11 @@ library LStratosphere { | |||||||||||
| ) internal view returns (bool isStratosphereMember, uint8 tier) { | ||||||||||||
| IStratosphere _stratosphere = IStratosphere(s.stratosphereAddress); | ||||||||||||
| uint256 _tokenId = _stratosphere.tokenIdOf(_address); | ||||||||||||
|
|
||||||||||||
| if (_tokenId > 0) { | ||||||||||||
| isStratosphereMember = true; | ||||||||||||
| tier = 0; | ||||||||||||
| IRewardsController _rewardsController = IRewardsController(s.rewardsControllerAddress); | ||||||||||||
| tier = _rewardsController.tierOf(_tokenId); // Revert if rewardsControllerAddress is not set | ||||||||||||
|
Comment on lines
+29
to
+30
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Potential Issue: Ensure The code now depends on - tier = _rewardsController.tierOf(_tokenId); // Revert if rewardsControllerAddress is not set
+ if (s.rewardsControllerAddress == address(0)) revert("RewardsController address not set");
+ tier = _rewardsController.tierOf(_tokenId);Committable suggestion
Suggested change
|
||||||||||||
| } | ||||||||||||
| } | ||||||||||||
| } | ||||||||||||
Uh oh!
There was an error while loading. Please reload this page.