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 is-sac-contract route #74

Merged
merged 3 commits into from
Jun 17, 2024
Merged

add is-sac-contract route #74

merged 3 commits into from
Jun 17, 2024

Conversation

piyalbasu
Copy link
Contributor

No description provided.

@stellar-jenkins
Copy link

@aristidesstaffieri
Copy link
Contributor

aristidesstaffieri commented May 15, 2024

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.

https://stellarfoundation.slack.com/archives/C03347FNAHK/p1713989176211199?thread_ts=1713988162.815059&cid=C03347FNAHK

const isSacContract = (

@piyalbasu piyalbasu marked this pull request as ready for review June 17, 2024 17:55
@stellar-jenkins
Copy link


reply.code(200).send({ isSacContract });
} catch (error) {
reply.code(500).send("Unexpected Server Error");
Copy link
Contributor

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.

Copy link
Contributor

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?

@stellar-jenkins
Copy link

@piyalbasu piyalbasu changed the base branch from main to release/1.3.0 June 17, 2024 19:00
@piyalbasu piyalbasu merged commit aad2734 into release/1.3.0 Jun 17, 2024
4 checks passed
@piyalbasu piyalbasu deleted the feature/is-sac-route branch June 17, 2024 19:03
piyalbasu added a commit that referenced this pull request Jun 17, 2024
* add is-sac-contract route

* remove throw from isSacContract helper
piyalbasu added a commit that referenced this pull request Jun 18, 2024
* 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
piyalbasu added a commit that referenced this pull request Jun 18, 2024
* 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>
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.

None yet

3 participants