-
Notifications
You must be signed in to change notification settings - Fork 46
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
feat(KC): add foundry test file #1765
Merged
Merged
Changes from 3 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
6b24daa
feat(KC): add foundry test file
unknownunknown1 7d8e858
fix(SortitionModule): delayed stake frontrun bug
unknownunknown1 236f9e1
Merge branch 'dev' into feat/foundry-tests
jaybuidl 917b82e
docs: license pragma
jaybuidl 6437726
fix: typos
jaybuidl 889cf63
chore: github actions workflow to run the foundry tests
jaybuidl b9810b2
test: combined test coverage reports from Hardhat and Foundry
jaybuidl 9025a05
test: fix
jaybuidl 2b62297
chore: temporarily disabling foundry tests in Github CI due to a stra…
jaybuidl b4fcc4e
test: attempt to fix randomly failing tx due to duplicate nounce
jaybuidl f281135
test: coverage script
jaybuidl 229ed9c
Merge branch 'dev' into feat/foundry-tests
jaybuidl 8e916d0
Merge branch 'dev' into feat/foundry-tests
jaybuidl fed3d93
chore: testing workflow debugging
jaybuidl 0220cc2
chore: testing workflow debugging
jaybuidl File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Submodule forge-std
updated
43 files
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
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
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,25 @@ | ||
// SPDX-License-Identifier: MIT | ||
|
||
/// @custom:authors: [@unknownunknown1] | ||
/// @custom:reviewers: [] | ||
/// @custom:auditors: [] | ||
/// @custom:bounties: [] | ||
/// @custom:deployments: [] | ||
|
||
pragma solidity 0.8.24; | ||
|
||
import "../arbitration/KlerosCore.sol"; | ||
|
||
/// @title KlerosCoreMock | ||
/// KlerosCore with view functions to use in Foundry tests. | ||
contract KlerosCoreMock is KlerosCore { | ||
function getCourtChildren(uint256 _courtId) external view returns (uint256[] memory children) { | ||
children = courts[_courtId].children; | ||
} | ||
|
||
function extraDataToCourtIDMinJurorsDisputeKit( | ||
bytes memory _extraData | ||
) external view returns (uint96 courtID, uint256 minJurors, uint256 disputeKitID) { | ||
(courtID, minJurors, disputeKitID) = _extraDataToCourtIDMinJurorsDisputeKit(_extraData); | ||
} | ||
} |
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,23 @@ | ||
// SPDX-License-Identifier: MIT | ||
|
||
/** | ||
* @custom:authors: [unknownunknown1] | ||
* @custom:reviewers: [] | ||
* @custom:auditors: [] | ||
* @custom:bounties: [] | ||
* @custom:deployments: [] | ||
*/ | ||
|
||
pragma solidity 0.8.24; | ||
|
||
import "../arbitration/SortitionModule.sol"; | ||
|
||
/// @title SortitionModuleMock | ||
/// @dev Adds getter functions to sortition module for Foundry tests. | ||
contract SortitionModuleMock is SortitionModule { | ||
function getSortitionProperties(bytes32 _key) external view returns (uint256 K, uint256 nodeLength) { | ||
SortitionSumTree storage tree = sortitionSumTrees[_key]; | ||
K = tree.K; | ||
nodeLength = tree.nodes.length; | ||
} | ||
} |
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
Empty file.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.