-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Separate types for Application and ApplicationId #3570
Conversation
b161afc
to
2bf2eb2
Compare
We haven't really discussed what to do with ApplicationId yet. I was hoping we don't need to change this. |
We can discuss but I don't see what's controversial here. We keep all the security and features as before - users can use type-safe |
dbb70cd
to
b7c5975
Compare
eef4aff
to
9aee4a1
Compare
b7c5975
to
734f9ec
Compare
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.
Thanks for the PR.
I'd rather keep application_id: ApplicationId<A>
for the SDK: Application
feels a bit vague and requires a massive refactoring of variable names -- including for our SDK users.
Why not use UserApplicationId
for the (internal) use case without a type parameter?
@@ -113,7 +113,7 @@ impl EthereumTrackerContract { | |||
r#"query {{ readTransferEvents(endBlock: {end_block}) }}"# | |||
)); | |||
|
|||
let application_id = self.runtime.application_id(); | |||
let application_id = self.runtime.application(); |
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.
This PR ruins the field/variable naming convention in many places.
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.
See #3582 for alternative.
In my mind
What does the |
9aee4a1
to
3ab8c5a
Compare
734f9ec
to
eea0b62
Compare
Closing this in favor of #3582 which has far fewer changes (avoids client-facing renames). |
Motivation
We want to fix and expand our notion of
Address
(currentlyOwner
,GenericApplicationId
, etc.) to different type of addresses (32-byte Linera/Solana, 20-byte EVM). In order to do that we need to prepare the code for the introduction of new variants.Proposal
Add a separate type for
ApplicationId(hash)
vsApplication
(a hash + type-safe ABI). Previously the presence ofA
type parameter in "address" enum made it more difficult to refactor. After this PR we have separate types for application's address and application with ABI (used mostly in tests and CLI now).Test Plan
CI should catch regressions.
Release Plan
Links