Skip to content

feat(pulse-sdk-solidity): Create Pulse solidity SDK #2667

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

Merged
merged 9 commits into from
May 27, 2025

Conversation

tejasbadadare
Copy link
Contributor

@tejasbadadare tejasbadadare commented May 8, 2025

Summary

  • Extract public interfaces, data structures, and ABIs from the Pulse contracts out into an SDK. Now the Scheduler contract implements the IScheduler interface from the SDK.
  • Add quickstart docs in README.md
  • Fix abi_generator script to handle non-path imports

Rationale

This makes it possible for other services and contracts to easily interact with the Pulse protocol and consume its ABIs.

How has this been tested?

  • Current tests cover my changes
  • Added new tests
  • Manually tested the code

Will manually test installing and using the package from NPM after this gets merged and published. Locally installing and using the SDK in contracts works fine.

@tejasbadadare tejasbadadare requested a review from a team as a code owner May 8, 2025 22:47
Copy link

vercel bot commented May 8, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

8 Skipped Deployments
Name Status Preview Comments Updated (UTC)
api-reference ⬜️ Skipped (Inspect) May 27, 2025 10:35pm
component-library ⬜️ Skipped (Inspect) May 27, 2025 10:35pm
developer-hub ⬜️ Skipped (Inspect) May 27, 2025 10:35pm
entropy-debugger ⬜️ Skipped (Inspect) May 27, 2025 10:35pm
entropy-explorer ⬜️ Skipped (Inspect) May 27, 2025 10:35pm
insights ⬜️ Skipped (Inspect) May 27, 2025 10:35pm
proposals ⬜️ Skipped (Inspect) May 27, 2025 10:35pm
staking ⬜️ Skipped (Inspect) May 27, 2025 10:35pm

Comment on lines +51 to +52
// We can still generate ABIs with warnings, only throw for errors
const errors = output.errors.filter((e) => e.severity === "error");
Copy link
Contributor Author

@tejasbadadare tejasbadadare May 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI i excluded warnings due to this warning in PythAggregatorV3.sol blocking the precommit for the Pulse SDK. Turns out there is no simple way to disable solc warnings for a single line/file 🙃

image

We should enforce warnings somewhere else anyway, probably turbo test:lint and/or CI

Copy link
Collaborator

@ali-bahjati ali-bahjati left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice!

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I recommend you add the signatures for these as well. (you can use cast sig)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good call!

@vercel vercel bot temporarily deployed to Preview – proposals May 27, 2025 22:28 Inactive
@vercel vercel bot temporarily deployed to Preview – component-library May 27, 2025 22:28 Inactive
@vercel vercel bot temporarily deployed to Preview – developer-hub May 27, 2025 22:28 Inactive
@vercel vercel bot temporarily deployed to Preview – api-reference May 27, 2025 22:28 Inactive
@vercel vercel bot temporarily deployed to Preview – staking May 27, 2025 22:28 Inactive
@vercel vercel bot temporarily deployed to Preview – entropy-explorer May 27, 2025 22:28 Inactive
@vercel vercel bot temporarily deployed to Preview – entropy-debugger May 27, 2025 22:28 Inactive
@vercel vercel bot temporarily deployed to Preview – insights May 27, 2025 22:28 Inactive
@vercel vercel bot temporarily deployed to Preview – api-reference May 27, 2025 22:35 Inactive
@vercel vercel bot temporarily deployed to Preview – entropy-explorer May 27, 2025 22:35 Inactive
@vercel vercel bot temporarily deployed to Preview – insights May 27, 2025 22:35 Inactive
@vercel vercel bot temporarily deployed to Preview – proposals May 27, 2025 22:35 Inactive
@vercel vercel bot temporarily deployed to Preview – staking May 27, 2025 22:35 Inactive
@vercel vercel bot temporarily deployed to Preview – component-library May 27, 2025 22:35 Inactive
@vercel vercel bot temporarily deployed to Preview – entropy-debugger May 27, 2025 22:35 Inactive
@vercel vercel bot temporarily deployed to Preview – developer-hub May 27, 2025 22:35 Inactive
@tejasbadadare tejasbadadare merged commit 9a1b059 into main May 27, 2025
12 checks passed
@tejasbadadare tejasbadadare deleted the tb/pulse/solidity-sdk branch May 27, 2025 22:44
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