-
Notifications
You must be signed in to change notification settings - Fork 17
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
Update client to support Preview 10 #103
Conversation
src/server.ts
Outdated
*/ | ||
public async getContractData( | ||
contractId: string, | ||
key: xdr.ScVal, | ||
expirationType: 'temporary' | 'persistent' = 'temporary' |
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.
3 suggestions:
- Let's call this durability to match the API elsewhere, and in the xdr.
- wdyt of making
persistent
the default? That is what we are pushing people towards. - Maybe extract the Durability to a type or enum?
expirationType: 'temporary' | 'persistent' = 'temporary' | |
durability: Durability = 'persistent' |
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.
Oh really? I thought temporary was actually preferred (i.e. if you want to pay for and worry about persistence, you should know its purpose & understand it better).
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 that this dialog suggests that not having a default might be the preferred way to go?
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 guess it begs the question of "how much do we want people to care about storage durability?" is the answer "when it's important", "usually", or "always"?
Co-authored-by: Paul Bellamy <paul@stellar.org>
NEEDS RPC CHANGES MERGED FIRST.
Done:
yarn upgrade-interactive --latest
on dev dependencies'persistent' | 'temporary'
) support to ledger keysRemaining:
as unknown
hack: Fix TypeScript definition forOperation.invokeHostFunction
options js-stellar-base#635The major change is to
getContractData()
, adding an optional parameter: