-
Notifications
You must be signed in to change notification settings - Fork 2
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 is-sac-contract route #74
Conversation
Preview is available here: |
One thing I learned recently is that SAC addresses are deterministic so you can actually derive them without looking at the executable at all. Assuming you have the "name" field from the contract and the contract ID.
|
Preview is available here: |
src/route/index.ts
Outdated
|
||
reply.code(200).send({ isSacContract }); | ||
} catch (error) { | ||
reply.code(500).send("Unexpected Server Error"); |
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.
since isSacContractExecutable
can throw for legitimate errors, I don't think we want a 500 in this catch block. For example if you pass it a contract ID for an expired contract and it can't fetch the entries, it will throw an ERROR.ENTRY_NOT_FOUND.CONTRACT_CODE
error.
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.
Maybe it makes more sense not to throw in that helper?
Preview is available here: |
* adapt to new mercury schema, no more muxed or byAccountId fields * default to using sdk v12.1.0 on all networks (#87) * add is-sac-contract route (#74) (#86) * add is-sac-contract route * remove throw from isSacContract helper * default to using sdk v12.1.0 on all networks * update sdk-next and contract spec api --------- Co-authored-by: Aristides Staffieri <aristides.staffieri@stellar.org>
No description provided.