Skip to content
This repository has been archived by the owner on Dec 4, 2024. It is now read-only.

Only use btc tx once #206

Merged
merged 2 commits into from
Oct 3, 2023
Merged

Only use btc tx once #206

merged 2 commits into from
Oct 3, 2023

Conversation

friedger
Copy link
Collaborator

Summary of Changes

This PR

Testing

Risks

Engine might not handle failed mints and burns correctly.

Users might think that the contract verifies all of the content of the text. It does not, the contract only verifies that the btc tx was not yet used for minting or burning.

How were these changes tested?

manual in devenv

What future testing should occur?

Automated integration test

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@codecov
Copy link

codecov bot commented Sep 30, 2023

Codecov Report

Merging #206 (dfda661) into main (e78c1d2) will increase coverage by 0.15%.
Report is 4 commits behind head on main.
The diff coverage is 70.96%.

@@            Coverage Diff             @@
##             main     #206      +/-   ##
==========================================
+ Coverage   38.27%   38.42%   +0.15%     
==========================================
  Files          44       44              
  Lines        5029     5051      +22     
  Branches       28       38      +10     
==========================================
+ Hits         1925     1941      +16     
- Misses       3102     3109       +7     
+ Partials        2        1       -1     
Flag Coverage Δ
unittests 83.24% <70.96%> (-1.48%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
romeo/asset-contract/contracts/asset.clar 100.00% <100.00%> (+6.06%) ⬆️
romeo/asset-contract/tests/asset_test.clar 74.07% <67.85%> (-8.79%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Collaborator

@setzeus setzeus left a comment

Choose a reason for hiding this comment

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

Pulled & ran locally, can confirm all unit tests passing - LGTM.

@setzeus setzeus self-requested a review October 2, 2023 10:30
Copy link
Collaborator

@setzeus setzeus left a comment

Choose a reason for hiding this comment

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

Additional comment but re-reading everything here I'm not sure why we now have two clarity-bitcoin-mini files?

We now have our original one & a "boot" version with v little difference. I don't think that was part of this commit history but wanted to flag that we likely have a duplicate file - is this intentional @friedger ?

@friedger
Copy link
Collaborator Author

friedger commented Oct 2, 2023

@setzeus we have two versions of the contract, one for unit tests and one for deployment.

Related issue #173

setzeus
setzeus previously approved these changes Oct 2, 2023
Copy link
Collaborator

@setzeus setzeus left a comment

Choose a reason for hiding this comment

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

Pulled & working - LGTM!

@friedger friedger merged commit dbb45dd into main Oct 3, 2023
6 checks passed
@friedger friedger deleted the 116-amounts-by-txid branch October 3, 2023 11:39
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[sBTC DR] binary can use the same tx several times
4 participants