Skip to content

Commit

Permalink
feat: clarity 3 support
Browse files Browse the repository at this point in the history
  • Loading branch information
hugocaillard committed Aug 1, 2024
1 parent 76109e6 commit ee37671
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 179 deletions.
4 changes: 2 additions & 2 deletions Clarinet.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ requirements = []

[contracts.counter]
path = 'contracts/counter.clar'
clarity_version = 2
epoch = 2.5
epoch = 3.0
clarity_version = 3

[repl.analysis]
passes = ['check_checker']
Expand Down
2 changes: 1 addition & 1 deletion contracts/counter.clar
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

(define-read-only (get-count-at-block (block uint))
(ok (at-block
(unwrap! (get-block-info? id-header-hash block) ERR_BLOCK_NOT_FOUND)
(unwrap! (get-stacks-block-info? id-header-hash block) ERR_BLOCK_NOT_FOUND)
(var-get count)
))
)
Expand Down
6 changes: 3 additions & 3 deletions deployments/default.devnet-plan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ plan:
- contract-publish:
contract-name: counter
expected-sender: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM
cost: 10760
cost: 10830
path: contracts/counter.clar
anchor-block-only: true
clarity-version: 2
epoch: "2.5"
clarity-version: 3
epoch: "3.0"
4 changes: 2 additions & 2 deletions deployments/default.simnet-plan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ plan:
contract-name: counter
emulated-sender: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM
path: contracts/counter.clar
clarity-version: 2
clarity-version: 3
- emulated-contract-call:
contract-id: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.counter
emulated-sender: ST1SJ3DTE5DN7X54YDH5D64R3BCB6A2AG2ZQ8YPD5
Expand All @@ -65,4 +65,4 @@ plan:
mstx-amount: 2222222
cost: 1000
anchor-block-only: true
epoch: "2.5"
epoch: "3.0"
163 changes: 9 additions & 154 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"author": "",
"license": "ISC",
"dependencies": {
"@hirosystems/clarinet-sdk": "^2.7.0",
"@hirosystems/clarinet-sdk": "^2.8.0",
"@stacks/transactions": "^6.8.1",
"chokidar-cli": "^3.0.0",
"typescript": "^5.3.3",
Expand Down
15 changes: 8 additions & 7 deletions settings/Devnet.toml
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,14 @@ balance = 100_000_000_000_000
[devnet]
disable_stacks_explorer = false
disable_stacks_api = false
bitcoin_controller_block_time = 6000
# stacks_node_image_url = "localhost:5001/stacks-node:local"
# stacks_signer_image_url = "localhost:5001/stacks-signer:local"
# stacks_node_image_url = "quay.io/hirosystems/stacks-node:devnet-2.5"
# stacks_signer_image_url = "quay.io/hirosystems/stacks-signer:devnet-2.5"

epoch_3_0 = 144

stacks_node_image_url = "quay.io/hirosystems/stacks-node:devnet-3.0"
stacks_signer_image_url = "quay.io/hirosystems/stacks-signer:devnet-3.0"
stacks_api_image_url = "hirosystems/stacks-blockchain-api:7.13.1-beta.1"

# use_docker_gateway_routing = true

# disable_bitcoin_explorer = true
# working_dir = "tmp/devnet"
Expand All @@ -102,7 +105,6 @@ bitcoin_controller_block_time = 6000
# bitcoin_node_image_url = "quay.io/hirosystems/bitcoind:devnet-v2"
# stacks_node_image_url = "quay.io/hirosystems/stacks-node:devnet-with-signer-beta4"
# stacks_signer_image_url = "quay.io/hirosystems/stacks-node:devnet-with-signer-beta4"
# stacks_api_image_url = "hirosystems/stacks-blockchain-api:7.9.0-nakamoto.1"
# stacks_explorer_image_url = "hirosystems/explorer:latest"
# bitcoin_explorer_image_url = "quay.io/hirosystems/bitcoin-explorer:devnet"
# postgres_image_url = "postgres:14"
Expand All @@ -113,7 +115,6 @@ bitcoin_controller_block_time = 6000
# epoch_2_2 = 104
# epoch_2_3 = 105
# epoch_2_4 = 106
# epoch_3_0 = 124

# Send some stacking orders
[[devnet.pox_stacking_orders]]
Expand Down
Loading

0 comments on commit ee37671

Please sign in to comment.