friedger / clarity-catamaranswaps

Smart contracts for swapping assets
https://catamaranswaps.org
Apache License 2.0
16 stars 10 forks source link

[catamaran-btc] Upgrade to clarity-bitcoin-lib-v5 #3

Open friedger opened 11 months ago

friedger commented 11 months ago

In catamaran-btc,

Oyeins-GUI commented 11 months ago

@friedger I replaced the clarity-bitcoin code in catamaran-btc, but there is this function that is unresolved

;; Create a list with n elments `true`. n must be smaller than 9.
(define-private (bool-list-of-len (n uint))
    (unwrap-panic (slice? (list true true true true true true true true) u0 n)))

this slice? is throwing an unresolved error - https://github.com/friedger/clarity-bitcoin/blob/main/contracts/clarity-bitcoin-v5.clar line 27 and it's found in 15 places throughout the code

friedger commented 11 months ago

You need to add clarity 2 for clarinet-bitcoin in Clarinet.toml.

Oyeins-GUI commented 11 months ago

You need to add clarity 2 for clarinet-bitcoin in Clarinet.toml.

Oh! It seems it's a function in clarity 2 Okay