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

Add entitlement to LockedTokenManager #429

Merged
merged 2 commits into from
May 14, 2024

Conversation

joshuahannan
Copy link
Member

@joshuahannan joshuahannan commented May 9, 2024

Adds entitlements to LockedTokens.LockedTokenManager to prevent accessing privileged methods via reference downcasting

Need to make sure that these will still be valid with the migrations

@joshuahannan
Copy link
Member Author

The only entitlement we've added for LockedTokens.LockedTokenManager is the UnlockTokens entitlement and we use that everywhere there is a LockedTokenMananger capability, so that should mean that the migrations will all work because the capabilities will all be migrated to their fully entitled types.

Additionally, I changed a lot of the fields in LockedTokenManager to be access(account). This is fine because none of those are accessed in transactions, only in the LockedTokens and FlowStakingCollection contract

@joshuahannan joshuahannan changed the title Add entitlements to LockedTokenManager Add entitlement to LockedTokenManager May 9, 2024
@joshuahannan joshuahannan force-pushed the address-gio-comments branch from 2079900 to 47c184b Compare May 9, 2024 20:41
@sisyphusSmiling
Copy link
Contributor

Approved for merge to #319, only concern is the migrated type as you called out

@joshuahannan joshuahannan merged commit 4f23668 into stable-cadence May 14, 2024
2 checks passed
@joshuahannan joshuahannan deleted the address-gio-comments branch May 14, 2024 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants