-
Notifications
You must be signed in to change notification settings - Fork 12
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
Crescendo #164
Crescendo #164
Conversation
- Switch dependency management to npm package for now since submodules aren't yet fully working
…and give borrowAccount the Owner entitlement
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.
Just reviewed the contracts so far. They look pretty good! I made some comments about migrating capability types, but I'm not 100% sure about the answer, so I didn't put it on every single instance that the comment would apply to in case I'm wrong. I'll flag the other ones if it turns out I am right
@@ -27,39 +29,43 @@ import "CapabilityFilter" | |||
/// | |||
/// Repo reference: https://github.com/onflow/hybrid-custody | |||
/// | |||
pub contract HybridCustody { | |||
access(all) contract HybridCustody { | |||
access(all) entitlement Owner |
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.
I think adding some notes about entitlements that explains what permission they will give is good here. Like will Owner give you all of the below or not? I think best practise in flow around entitlements should describe what they do briefly where they are defined. thoughts?
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.
Not opposed at all. I started writing some comments out for each entitlement then realized they might just end up changing anyway which is why they're missing right now
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.
Great refactor so far, thank you! I was only able to look over the contracts, but left some comments. I'm also wondering if we'll need to introduce new Factory implementations for deployment covering Vault
& Collection
with the migration given the move from nested resources to interfaces within FT & NFT v2 standards.
Quick update to this PR that I'm back from a company offsite so we're picking this up again. Core questions are around entitlements (expected, I'll start focusing on them soon), and on how migrations are going to work. For migrations, my understanding right now is that all capabilities are going to be migrated to their conformance types. That is |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #164 +/- ##
==========================================
+ Coverage 83.95% 91.48% +7.52%
==========================================
Files 4 4
Lines 349 364 +15
==========================================
+ Hits 293 333 +40
+ Misses 56 31 -25 ☔ View full report in Codecov by Sentry. |
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.
Only got through the contracts again but can revisit tomorrow to cover txns & scripts. The entitlement assignments make sense to me, they look well done! Just have one question about GetterPrivate
using Get
vs Capabilities
- curious what you think there.
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.
Great work!
Update: All HC contracts (except FTVaultFactory and NFTCollectionFactory) up to 2b22935 on crescendo branch have been staged on Testnet. However, as-is I needed to skip validation due to errors. See ongoing discussion around migration errors in this discord thread.
Update after latest migration - looks like migration failed. A couple failures stand out:
I think addressing these should fix the migration issue. We'll need a new pre-release version of CLI (currently in progress) to validate the changes via Cadence tests though since the capability retrieval pattern has been updated since the current |
Thanks for summarizing 🙏 I believe I've addressed everything for this week's migration, but if we're able to dry-run it locally that's probably a good idea as well |
Local migration passed! All contracts up to this point have been staged on Testnet, so we'll get a sanity check in the next network migration run. |
Following up on office hours discussion about merging these changes. Looks like the past two migrations have been successful. Maybe we a last call for reviews before merging - thoughts @austinkline? |
Good with me! I'll reach out to folks and see if we can't get some approvals/comments going |
Merging! Thanks everyone for the feedback and participation in this PR. We still have time until Crescendo goes live, so if there are any other things that come up or need addressing, please open a ticket and flag it 🙏 https://discord.com/channels/613813861610684416/1162086721471647874/1245041945013780601 |
Closes: #165 #171 ### Description - Replaces existing node modules dependency system with Flow CLI's dependency manager for consistency with other onflow repos - Updates CI commands to use the Flow CLI `flow` command found in `v2.0.0` - Removes Previewnet deployment addresses as that network will be deprecated - Removes the code normalization script which has been integrated with the `flow test` command - Removes the outdated `.gitmodules` file, a remnant from when this repo used git submodules Also, outside of the context of this PR, the new `NFTCollectionFactory` and `FTVaultFactory` (#164) contracts have been deployed on Testnet & Mainnet. After deployment, the existing hosted factory managers (see README) have been configured with the setup transactions already found in this repo.
This PR covers changes needed to upgrade HybridCustody to Cadence 1.0
Some key points:
getCapability
that takes aCapabilityPath
type had to be moved to take a Capability Controller ID instead.AuthAccount
reference currently, we have migrated all AuthAccount types to a fully entitled&Account
reference. It does seem to need nearly all of them with the exception of theContract
entitlement.The main questions coming out of this work as I see them are around Entitlements and whether the use of each entitlement gives us the access control pattern(s) we want. Personally, I had a hard time justifying splitting entitlements beyond each resource type.