Skip to content
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

Next MAINNET upgrade #154

Merged
merged 59 commits into from
Dec 30, 2024
Merged
Changes from 1 commit
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
b75feab
chore: cleanup obsolete project configs
amarinkovic Oct 11, 2024
50a0dbe
chore: remove obsolete docgen scripts
amarinkovic Oct 11, 2024
aea04d0
chore: remove unused error
amarinkovic Oct 16, 2024
728ac25
fix: stable diamond address for the local node
amarinkovic Oct 16, 2024
9815f3c
chore: bump gemforge to 2.12.0
amarinkovic Oct 17, 2024
9cc6abd
feat: build onboarding approval hash
amarinkovic Oct 14, 2024
6ba881b
feat: add onboarding via signature verification
amarinkovic Oct 16, 2024
f69ccfa
chore: rename sig onboarding methods
amarinkovic Oct 21, 2024
eec4431
refactor: rename sig helper method
amarinkovic Oct 21, 2024
76bec7e
test: fix failing tests
amarinkovic Oct 21, 2024
00d0024
chore: remove unused errors
amarinkovic Oct 22, 2024
392cc67
doc: add natspec for new onboarding methods
amarinkovic Oct 23, 2024
514de17
chore: bump version to v3.9.4
amarinkovic Oct 23, 2024
de25728
chore: minor clean up
amarinkovic Oct 23, 2024
41329d4
fix: emit event when onboarding via signature
amarinkovic Oct 25, 2024
d47a2ac
fix: remove whitespace from sig struct description
amarinkovic Oct 30, 2024
c329789
chore: remove old approval implementation
amarinkovic Nov 1, 2024
7e28f0a
fix: don't assign capital provider role in self context
amarinkovic Nov 8, 2024
e44563b
feat: zap
kevin-fruitful Oct 16, 2024
9e576f1
fix: zapUnstake
kevin-fruitful Oct 17, 2024
514eca4
fix: rename to ZapFacet
kevin-fruitful Oct 17, 2024
3483420
feat: zap execute limit offer
kevin-fruitful Oct 21, 2024
92c8823
refactor: remove zapUnstake
kevin-fruitful Oct 23, 2024
343ce4a
fix: zaps require calling erc20 permit functions
kevin-fruitful Oct 28, 2024
a4dc3d8
refactor: rename param to parentId
kevin-fruitful Oct 28, 2024
e32d97b
refactor: move PermitSignature struct into FreeStructs.sol
kevin-fruitful Oct 28, 2024
e0be503
test: update test erc20 with permit method and related variables
kevin-fruitful Oct 28, 2024
7bb6f57
refactor: rename param to _depositAmount
kevin-fruitful Oct 28, 2024
2a44f9a
test: add tests for zaps
kevin-fruitful Oct 28, 2024
bdfac2c
test: fix failing transfer tests
amarinkovic Nov 5, 2024
a441dc1
test: assert erc20 address requirement
amarinkovic Nov 5, 2024
80a25c9
feat: combine zaps with onboarding approval
amarinkovic Nov 6, 2024
9de881d
fix: compilation issues after rebase
amarinkovic Nov 8, 2024
65ed3b2
fix: onboarding trigger condition
amarinkovic Nov 12, 2024
6cd5772
fix: assert zap priviledge after eventual onboarding
amarinkovic Nov 12, 2024
18cb8d0
refactor: improve zap order testability
amarinkovic Nov 13, 2024
442297f
Fix amounts emitted with OrderMatched event (#153)
amarinkovic Nov 25, 2024
b7ffa64
chore: bump gemforge to 2.13.1
amarinkovic Nov 25, 2024
afd834c
fix: add entity admin to cancel offer group
amarinkovic Nov 26, 2024
86efab1
chore: upgrade testnets and bump version to 3.9.5
amarinkovic Nov 26, 2024
6e3cd82
feat: read available balance for entity
amarinkovic Nov 28, 2024
47c3d82
feat: verify contracts via gemforge
amarinkovic Nov 28, 2024
f2c3039
chore: remove unused event
amarinkovic Dec 2, 2024
ade813c
feat: add auto compound rewards capability
amarinkovic Dec 2, 2024
3536c9a
test: basic NAYM reward compounding
amarinkovic Dec 3, 2024
ed590a8
refactor: improve compounding test
amarinkovic Dec 3, 2024
17b3f22
feat: fuzz reward compounding
amarinkovic Dec 3, 2024
2596dfc
chore: bump version to 3.9.7
amarinkovic Dec 4, 2024
6397bab
chore: cleanup submodules
amarinkovic Dec 4, 2024
9952799
test: uncommment ownership transfer fuzzer
amarinkovic Dec 4, 2024
1dd4d97
chore: fix warnings in tests
amarinkovic Dec 4, 2024
2cab4e6
chore: purge custom verification, use gemforge
amarinkovic Dec 13, 2024
10d5684
Merge branch 'main' into dev
amarinkovic Dec 13, 2024
b859c04
test: ownership fuzzer assumption added
amarinkovic Dec 24, 2024
c14a923
fix: zaps locking
amarinkovic Dec 23, 2024
12df9b9
fix: revert on invalid signature length
amarinkovic Dec 23, 2024
d2ef1d7
fix: stop using deprecated role const
amarinkovic Dec 24, 2024
c439e5b
S4 gas optimizations (#160)
amarinkovic Dec 30, 2024
f989cd7
S5 chores (#161)
amarinkovic Dec 30, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore: upgrade testnets and bump version to 3.9.5
amarinkovic committed Nov 26, 2024
commit 86efab16f1f18f98921a19067556a59961833cb5
Loading

Unchanged files with check annotations Beta

*/
function assignRole(bytes32 _objectId, bytes32 _contextId, string memory _role) external {
bytes32 assignerId = LibHelpers._getSenderId();
require(LibACL._canAssign(assignerId, _objectId, _contextId, LibHelpers._stringToBytes32(_role)), "not in assigners group");

Check warning on line 27 in src/facets/ACLFacet.sol

GitHub Actions / Lint contracts

Use Custom Errors instead of require statements
/// @dev First, assigner attempts to unassign the role.
bytes32 roleId = LibACL._getRoleInContext(_objectId, _contextId);
function unassignRole(bytes32 _objectId, bytes32 _contextId) external {
bytes32 roleId = LibACL._getRoleInContext(_objectId, _contextId);
bytes32 assignerId = LibHelpers._getSenderId();
require(LibACL._canAssign(assignerId, _objectId, _contextId, roleId), "not in assigners group");

Check warning on line 48 in src/facets/ACLFacet.sol

GitHub Actions / Lint contracts

Use Custom Errors instead of require statements
LibACL._unassignRole(_objectId, _contextId);
}
* @param _roleInGroup is member of
*/
function updateRoleGroup(string memory _role, string memory _group, bool _roleInGroup) external assertPrivilege(LibAdmin._getSystemId(), LC.GROUP_SYSTEM_ADMINS) {
require(_group._stringToBytes32() != LC.GROUP_SYSTEM_ADMINS._stringToBytes32(), "system admins group is not modifiable");

Check warning on line 149 in src/facets/ACLFacet.sol

GitHub Actions / Lint contracts

Use Custom Errors instead of require statements
LibACL._updateRoleGroup(_role, _group, _roleInGroup);
}
}
AppStorage storage s = LibAppStorage.diamondStorage();
if (s.upgradeScheduled[id] > block.timestamp) {
revert("Upgrade has already been scheduled");

Check warning on line 46 in src/facets/GovernanceFacet.sol

GitHub Actions / Lint contracts

Use Custom Errors instead of revert statements
}
// 0 == upgrade is not scheduled / has been cancelled
// block.timestamp + upgradeExpiration == upgrade is scheduled and expires at this time
function updateUpgradeExpiration(uint256 duration) external assertPrivilege(LibAdmin._getSystemId(), LC.GROUP_SYSTEM_ADMINS) {
AppStorage storage s = LibAppStorage.diamondStorage();
require(1 minutes < duration && duration < 1 weeks, "invalid upgrade expiration period");

Check warning on line 64 in src/facets/GovernanceFacet.sol

GitHub Actions / Lint contracts

Use Custom Errors instead of require statements
s.upgradeExpiration = duration;
emit UpdateUpgradeExpiration(duration);
function cancelUpgrade(bytes32 id) external assertPrivilege(LibAdmin._getSystemId(), LC.GROUP_SYSTEM_ADMINS) {
AppStorage storage s = LibAppStorage.diamondStorage();
require(s.upgradeScheduled[id] > 0, "invalid upgrade ID");

Check warning on line 78 in src/facets/GovernanceFacet.sol

GitHub Actions / Lint contracts

Use Custom Errors instead of require statements
s.upgradeScheduled[id] = 0;
* @param _offerId offer ID
*/
function cancelOffer(uint256 _offerId) external notLocked nonReentrant assertPrivilege(LibObject._getParentFromAddress(msg.sender), LC.GROUP_CANCEL_OFFER) {
require(LibMarket._getOffer(_offerId).state == LC.OFFER_STATE_ACTIVE, "offer not active");

Check warning on line 36 in src/facets/MarketFacet.sol

GitHub Actions / Lint contracts

Use Custom Errors instead of require statements
bytes32 creator = LibMarket._getOffer(_offerId).creator;
require(LibObject._getParent(LibHelpers._getSenderId()) == creator, "only member of entity can cancel");

Check warning on line 38 in src/facets/MarketFacet.sol

GitHub Actions / Lint contracts

Use Custom Errors instead of require statements
LibMarket._cancelOffer(_offerId);
}
bytes32 systemID = LibHelpers._stringToBytes32(LC.SYSTEM_IDENTIFIER);
bytes32 newAcc1Id = LibHelpers._getIdForAddress(_newOwner);
require(!LibACL._isInGroup(newAcc1Id, systemID, LibHelpers._stringToBytes32(LC.GROUP_SYSTEM_ADMINS)), "NEW owner MUST NOT be sys admin");

Check warning on line 17 in src/facets/NaymsOwnershipFacet.sol

GitHub Actions / Lint contracts

Use Custom Errors instead of require statements
require(!LibACL._isInGroup(newAcc1Id, systemID, LibHelpers._stringToBytes32(LC.GROUP_SYSTEM_MANAGERS)), "NEW owner MUST NOT be sys manager");

Check warning on line 18 in src/facets/NaymsOwnershipFacet.sol

GitHub Actions / Lint contracts

Use Custom Errors instead of require statements
LibDiamond.setContractOwner(_newOwner);
}