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

Conversation

@CAGS295
Copy link
Contributor

@CAGS295 CAGS295 commented Oct 17, 2023

Summary of Changes

Testing

> $cd devenv
> devenv$ ./build.sh
> devenv$ cd -
> $ ./down.sh && ./up.sh
# wait until the contracts are deployed
> $./logs.sh sbtc
[SIGINT] manual CTRL + C 
> $ cd utils
> utils$ ./mine_btc.sh 201
> utils$ ./deposit.sh
> utils$ ./withdraw.sh

Succesful sbtc logs look like:

Waiting on Stacks API http://stacks:20443/v2/info
Waiting on Stacks height 1
The following deployment plan will be applied:
---
id: 0
name: Devnet deployment
network: devnet
stacks-node: "http://stacks:20443"
bitcoin-node: "http://devnet:devnet@bitcoin:18443"
plan:
  batches:
    - id: 0
      transactions:
        - contract-publish:
            contract-name: clarity-bitcoin-mini
            expected-sender: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM
            cost: 54370
            path: contracts/clarity-bitcoin-mini-deploy.clar
            anchor-block-only: true
            clarity-version: 2
        - contract-publish:
            contract-name: asset
            expected-sender: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM
            cost: 38610
            path: contracts/asset.clar
            anchor-block-only: true
            clarity-version: 2
      epoch: "2.4"


Total cost:     0.00092980 STX
Duration:       1 blocks
~~~snip~~~
➡ Confirmed Publish ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.asset
➡ Confirmed Publish ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.clarity-bitcoin-mini
✔ Transactions successfully confirmed on Devnet
/
2023-10-17T00:00:21.164744Z  INFO electrum_client::raw_client: Trying to connect to 172.24.0.8:60401 (attempt 1/1) with timeout 10s    
2023-10-17T00:00:21.176515Z  INFO romeo::system: Starting replay of persisted events
2023-10-17T00:00:21.176631Z  INFO romeo::system: Replay finished with state: Uninitialized
2023-10-17T00:00:21.176640Z  INFO spawn: romeo::system: Spawning task=GetContractBlockHeight
2023-10-17T00:00:21.192556Z  INFO update: romeo::state: Processing event=ContractBlockHeight(2, 222)
2023-10-17T00:00:21.192566Z  INFO spawn: romeo::system: Spawning task=UpdateContractPublicKey
2023-10-17T00:00:21.204827Z  INFO update: romeo::state: Processing event=ContractPublicKeySetBroadcasted(2739ec19c92c552ce3d8d3beb8224da1729b7fa00604c8282d3cd5484d9acbe2)

Risks

How were these changes tested?

What future testing should occur?

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

@CAGS295 CAGS295 linked an issue Oct 17, 2023 that may be closed by this pull request
3 tasks
@codecov
Copy link

codecov bot commented Oct 17, 2023

Codecov Report

Merging #294 (4d5b770) into main (5dbcc26) will increase coverage by 33.18%.
Report is 1 commits behind head on main.
The diff coverage is n/a.

@@             Coverage Diff             @@
##             main     #294       +/-   ##
===========================================
+ Coverage   43.42%   76.61%   +33.18%     
===========================================
  Files          45        5       -40     
  Lines        5322      248     -5074     
  Branches       47       47               
===========================================
- Hits         2311      190     -2121     
+ Misses       3010       57     -2953     
  Partials        1        1               
Flag Coverage Δ
unittests 76.61% <ø> (ø)

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

see 40 files with indirect coverage changes

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

@friedger
Copy link
Contributor

New sbtc image: 291MB -> 939MB

Where does the increase come from?

@stjepangolemac
Copy link
Contributor

New sbtc image: 291MB -> 939MB

Where does the increase come from?

Final sbtc image seems like it went from alpine to bookworm-slim. Not a big deal but I would prefer to keep using alpine if anyhow possible.

Copy link
Contributor

@friedger friedger left a comment

Choose a reason for hiding this comment

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

Automatic contract deployment worked for me :-)

LGTM

@friedger friedger merged commit 53b6644 into main Oct 17, 2023
@friedger friedger deleted the 231-sbtc-automatically-deploy-contracts branch October 17, 2023 11:02
@CAGS295
Copy link
Contributor Author

CAGS295 commented Oct 17, 2023

Last time, I couldn't install clarinet on alpine. I will try again.

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: automatically deploy contracts

4 participants