-
Notifications
You must be signed in to change notification settings - Fork 14
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
Feat: initial contracts folder setup, registry structs #127
Conversation
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.
Not entirely too familiar with the the Clarigen/PNPM setup so don't have much feedback on anything except for the actual contract kickoff.
Only one question I have on an event emitted, once answered / updated we should be good to get this kickoff merge in!
A note on this template, @hstove I assumed this template was from the |
@AshtonStephens I'm not quite sure what you mean - that we should or shouldn't use this template? Or that this PR doesn't follow the template well enough? |
Added |
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.
LGTM! Kudos on the setup.
I'm just asking you if we want to, but I'm not suggesting either way. |
@AshtonStephens I found the template to be pretty helpful - I didn't follow it to the tee, but most of it seemed pretty applicable. That's partly because, for example, this PR actually needs testing instructions, but in the future we'll know how to test (and they'll be in CI). There are some things to probably remove (ie "tag X and Y"), but otherwise I like it. In general, I think templates are overall helpful, as long as they don't have to be 100% matched 100% of the time. |
Description
This PR introduces the
contracts
folder, which is where sBTC Clarity contracts and contract unit tests will be located.Within that folder is the start of the
sbtc-registry
contract, which is where data structures for deposits and withdrawals will live. This PR implements the data structures for withdrawals, along with a function and tests for writing new withdrawal requests.Note that this does not implement the user-facing
initiate-withdrawal-request
contract function. Instead, this is only an "internal" function for storing the necessary data.The unit tests are located in
./contracts/tests/sbtc-registry.test.ts
.PNPM workspace
This also introduces a PNPM workspace, which allows for efficiently installing and managing multiple folders that include JS packages. It also allows easily running a command multiple workspace packages at once (such as
pnpm test -r
to runtest
in each package).Type of Change
Does this introduce a breaking change?
List the APIs or describe the functionality that this PR breaks.
Workarounds for or expected timeline for deprecation
Are documentation updates required?
Testing information
pnpm test
in the contracts folder.Checklist
pnpm test
passes