Commit graph

2557 commits

Author SHA1 Message Date
g 0bda5a5ee1 typings 2023-02-08 18:17:44 -08:00
Brian Meek 3a37ec2b6a Merge update of Dendrite CI coverage (#1449)
Signed-off-by: Brian Meek <brian@hntlabs.com>
2023-02-08 17:19:39 -08:00
Giuseppe Rodriguez d9801a3dbf store channel network id in struct (#1447) 2023-02-08 17:13:08 -08:00
Brian Meek b90114cda3 Merge upstream Dendrite 0.11 changes, Dendrite and lib tests passing (#1440)
Signed-off-by: Brian Meek <brian@hntlabs.com>
2023-02-08 16:58:48 -08:00
Giuseppe Rodriguez 9a85e1b3c1 Audit Fixes 6 - Code quality checks (#1439) 2023-02-08 14:38:06 -08:00
Giuseppe Rodriguez 6bdd949235 Audit Fixes 5 - Updates to channel based functionality (#1435)
Fixes HNT-716
Fixes HNT-710
Fixes HNT-708
2023-02-08 14:09:03 -08:00
Giuseppe Rodriguez 72d43d8baa getter for channels (#1441) 2023-02-08 11:41:38 -08:00
Giuseppe Rodriguez 3757e0f596 Audit Fixes 4 - Upgradeability of Entitlement Modules is controlled by OpenZeppelin owner() and not SpaceOwner NFT holder (#1431)
Fixes HNT-704
Fixes HNT-715
Fixes HNT-714
Fixes HNT-711
Fixes HNT-706
Fixes HNT-707
2023-02-07 19:43:32 -08:00
Giuseppe Rodriguez cade6d1de3 Audit Fixes 3 - [M-1] More than one Role can contain the Permissions.Owner permission (#1429)
Impact: High

Likelihood: Low

According to the discussion with the team, it is expected that in Space
contracts, only one Role can have the Permissions.Owner permission.
Currently, multiple Roles can be created containing this permission.
This is caused by Space.sol’s createRole() function allowing the
OpenZeppelin owner to create new owner-permissioned roles without limit.

Remediations to consider:

Do not allow multiple roles to be created with the ownership permission.
This could be done with something like: if Space.sol’s ownerRoleId is
set, do not allow new roles to be created with the Permissions.Owner
permission.

 Fixes HNT-703 as well
2023-02-07 19:23:07 -08:00
Giuseppe Rodriguez 7d6ffad2de Audit Fixes 1 - Removes OZ Ownable from Space contract and makes checks for space token ownership to see if caller is space owner (#1424)
Removing the OpenZeppelin ownership logic, and, checking directly for
the ownership of the Space’s SpaceOwner NFT. The SpaceFactory could be
the owner during the bootstrapping phase, and afterwards, could transfer
the NFT to the proper owner. Doing a direct check like
_spaceOwner().ownerOf(tokenId) == _msgSender() would be safe because
that’s what the owner entitlement is going to check eventually.

---------

Co-authored-by: Kerem Kazan <kerem.kazan@gmail.com>
2023-02-07 15:57:39 -08:00
texuf 8a688ef92a Update contract addresses (#1354) 2023-01-27 16:08:13 -08:00
Giuseppe Rodriguez d7cabc8352 Clean up Spaces V1 contracts and testing (#1273) 2023-01-27 15:15:01 -08:00
Tak Wai Wong e3a98393a1 generate user entitlement types for localhost and goerli (#1272)
Need this to get user entitlement role details.
2023-01-24 13:08:46 -08:00
Tak Wai Wong 2506761678 delete v1 smart contract-related code from dendrite (#1263) 2023-01-19 17:08:30 -08:00
Tak Wai Wong 1c61837bfd fix client and dendrite to always use v2 smart contracts (#1259)
Remove the logic to switch between v1 and v2 smart contracts. Always use
v2.
2023-01-19 13:11:35 -08:00
Tak Wai Wong 425b28f2cc Add goerli types to client lib and dendrite (#1247) 2023-01-19 09:42:09 -08:00
Pat Fives 2020161369 Add comments for iSpace and the entitlements (#1233)
Co-authored-by: g <5714678+giuseppecrj@users.noreply.github.com>
2023-01-18 17:27:30 -08:00
Giuseppe Rodriguez fdc253e2ae deploy spaces v2 (#1235) 2023-01-17 17:26:08 -08:00
Tak Wai Wong 69609d885b hnt-571 client integration for v2 (#1237)
Fixes the remaining issues in tests, client lib, and dendrite to interact with v2 smart contracts
2023-01-17 16:04:56 -08:00
Giuseppe Rodriguez 34d457c8b0 Deploy latest space goerli types and contracts (#1230) 2023-01-13 17:02:33 -08:00
Kerem Kazan bf303908fa dendrite version from commit hash (#1221)
this pr computes dendrite docker version from the commit hash, instead
of bumping versions. the previous setup caused issues and conflicts when
branch protection is enabled. this way we can seamlessly keep pushing to
main and it will keep getting built and published
2023-01-13 15:39:39 -05:00
Giuseppe Rodriguez b8fd046e51 Updates UserEntitlement to take array of addresses (#1213) 2023-01-13 12:10:38 -08:00
Tak Wai Wong 7f3d10905a regenerate json addresses (#1218)
json addresses changed when i run the deploy script on a new instance of
anvil. Regenerated the json
2023-01-13 09:39:22 -08:00
Giuseppe Rodriguez e51eb13a13 0xMacro Updates (#1200)
Fixes HNT-417, HNT-411, HNT-403, HNT-398, HNT-394
2023-01-12 11:08:20 -08:00
Giuseppe Rodriguez 6745cd8162 adds multicall and updates create role with entitlements and entitlementdata arguments (#1192) 2023-01-10 19:43:14 -08:00
Tak Wai Wong 3700bcbde4 rename isEntitled to isEntitledToSpace (#1174) 2023-01-06 12:12:35 -08:00
Tak Wai Wong b09cd18803 Rename isEntitled func for channel (#1168)
Overloaded isEntitled func in ISpace.sol and Space.sol caused the generated client types to turn into string names. Renaming one of them to isEntitledToChannel.
2023-01-04 14:13:39 -08:00
Evan Salzbrenner 45185aaed0 fix space manager deployment json order (#1164) 2023-01-03 12:58:14 -08:00
texuf 1d13259cf1 New localhost contract addresses (#1160) 2023-01-02 10:38:56 -08:00
Evan Salzbrenner 83fbf169ec regenerate contract addresses (#1159) 2022-12-30 14:58:56 -08:00
Giuseppe Rodriguez 197e74169c Creates SpacesUpgrade script to update the implementation address of a space on space factory and space (#1156) 2022-12-29 20:33:41 -08:00
Automated Version Bump 0f01e2a629 ci: version bump to 1.0.38 2022-12-29 23:37:22 +00:00
Tak Wai Wong 982ce71aad fix dendrite to interact with v1 / v2 contracts (#1155)
dendrite uses commandline flag v1 or v2 to choose the smart contracts for the isEntitled check
2022-12-29 15:37:03 -08:00
Giuseppe Rodriguez d04b25996e Space v2 Updates (#1145) 2022-12-28 20:23:01 -08:00
Tak Wai Wong 751030a658 Add a config flag on dendrite to switch between zion contracts v1 / v2 (#1151)
Temporary flag to implement v2 smart contract integration. Once v2 is
done, will remove this flag.
2022-12-28 18:56:40 -08:00
Automated Version Bump f901b88c55 ci: version bump to 1.0.37 2022-12-29 01:19:25 +00:00
Automated Version Bump 01dcc1bfbc ci: version bump to 1.0.36 2022-12-29 01:08:45 +00:00
Tak Wai Wong 7baa59114b update dendrite ver to 1.0.35 (#1148)
workaround a hardcoded logic in github action that auto-bumps the
version. See
https://linear.app/hnt-labs/issue/HNT-548/github-action-that-auto-bump-dendrite-version-blocked-deployment
2022-12-28 12:26:42 -08:00
Tak Wai Wong cb002f138d bump dendrite version to 1.0.36 (#1147) 2022-12-28 11:11:16 -08:00
Giuseppe Rodriguez 6aa7e26d52 Space Manager v2 with Upgradeability (#1005) 2022-12-27 18:26:43 -08:00
Giuseppe Rodriguez f690a2ace9 deploy latest goerli (#1143) 2022-12-27 16:38:50 -08:00
Tak Wai Wong ad3be52a8d hnt-535 add modify role function to change roleName, permissions, token and user entitlement data (#1141)
- Add new functions to modify role name, permissions, token entitlement
and user entitlement with a single call
- Add new solidity tests for the new functions
- Re-generated TypeScript and Go types for both localhost and goerli
2022-12-27 14:27:02 -08:00
Tak Wai Wong 88c1b4c7b5 Refactor SpaceManager.createRole to take additional parameters (#1137)
Fixes hnt-445. This change would let the client create a new role by
paying gas 1 time instead of 8+ times.
Re-generated the localhost types
2022-12-22 12:54:46 -08:00
Kerem Kazan 1b47ba86d6 Dendrite auto publish (#1050)
- Created a package.json in servers/dendrite. Moving forward, this file
is our canonical dendrite version, and our docker builds will depend on
this version.
- Created a script that extracts the package.json version and puts it
into the GitHub actions build environment as `RELEASE_VERSION`.
- Updated the GitHub action so that it builds and publishes the docker
image to dockerhub whenever we merge dendrite changes to main.

Co-authored-by: Automated Version Bump <gh-action-bump-version@users.noreply.github.com>
2022-12-14 15:03:01 -05:00
Giuseppe Rodriguez 4586351a29 deploy latest space manager contracts (#1061)
update goerli addresses
2022-12-09 12:49:06 -08:00
Kerem Kazan 74b820079c deleted accidental package.json artifact 2022-12-07 14:59:10 -05:00
Kerem Kazan 4b35774881 e2e test failure slack notification added (#1039)
With this PR, we'll notify the `#ci` slack channel when an e2e test
fails.
2022-12-07 14:51:41 -05:00
Tak Wai Wong 8f4d1828b4 matrix room Id does not resolve to channelId or spaceId correctly (#1010)
Issue: matrix room id does not always resolve to spaceId or channelId
correctly.

Root cause: The clientApi routing endpoint and the syncapi routing
endpoint uses different stores to query for the current room states.

One is correct, the other has incomplete events. Fix the issue by using
the correct store in both routing code paths.
2022-11-30 20:12:00 -08:00
Tak Wai Wong a8127f9bdc Re-generate contract types due to ZionSpaceManger.sol changes (#1015)
- fix build-contract-types.sh to generate goerli
- re-generate types after ZionSpaceManager.sol changes.
2022-11-30 19:46:54 -08:00
Kerem Kazan dcf838c3b2 dendrite-zion.yaml added into the docker image (#965)
This PR adds the dendrite-zion.yaml into the production docker image for
dendrite
2022-11-18 18:11:48 -05:00