Skip to content
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: contract in epoch 3.0 #9

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions Clarinet.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@ description = ''
authors = []
telemetry = false
cache_dir = './.cache'
requirements = []

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

[repl.analysis]
passes = ['check_checker']
Expand Down
12 changes: 6 additions & 6 deletions contracts/counter.clar
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
(var-get count)
)

(define-read-only (get-count-at-block (block uint))
(ok (at-block
(unwrap! (get-block-info? id-header-hash block) ERR_BLOCK_NOT_FOUND)
(var-get count)
))
)
;; (define-read-only (get-count-at-block (block uint))
;; (ok (at-block
;; (unwrap! (get-stacks-block-info? id-header-hash block) ERR_BLOCK_NOT_FOUND)
;; (var-get count)
;; ))
;; )

(define-public (increment)
(begin
Expand Down
12 changes: 1 addition & 11 deletions deployments/default.devnet-plan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,4 @@ network: devnet
stacks-node: "http://localhost:20443"
bitcoin-node: "http://devnet:devnet@localhost:18443"
plan:
batches:
- id: 0
transactions:
- contract-publish:
contract-name: counter
expected-sender: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM
cost: 10760
path: contracts/counter.clar
anchor-block-only: true
clarity-version: 2
epoch: "2.5"
batches: []
15 changes: 2 additions & 13 deletions deployments/default.simnet-plan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,5 @@ plan:
contract-name: counter
emulated-sender: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM
path: contracts/counter.clar
clarity-version: 2
- emulated-contract-call:
contract-id: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.counter
emulated-sender: ST1SJ3DTE5DN7X54YDH5D64R3BCB6A2AG2ZQ8YPD5
method: increment
parameters: []
- stx-transfer:
expected-sender: ST3PF13W7Z0RRM42A8VZRVFQ75SV1K26RXEP8YGKJ
recipient: ST3NBRSFKX28FQ2ZJ1MAKX58HKHSDGNV5N7R21XCP
mstx-amount: 2222222
cost: 1000
anchor-block-only: true
epoch: "2.5"
clarity-version: 3
epoch: "3.0"
Loading