aaa12d6
Thanks @hstove! - Fixed an issue where a project's requirements didn't have the correct contract identifier for simnet environment
127a4ad
Thanks @hstove! - Fixes an issue when running the Clarinet wrapper using externally-installed cli
4904ab9
Thanks @hstove! - Fixesclarigen init
command due to .toml files not being included from deno.land package manager
174a74a
Thanks @hstove! - Fixes an issue when getting contract variables/constants for project requirements
-
22a2ea7
Thanks @hstove! - Updates theClarityAbiNonFungibleToken
type to include a JS-native type.Fixed an issue when fetching variables in projects that use requirements.
-
b73538d
Thanks @hstove! - The documentation generator has been updated to include maps and variables!Previously, generated docs only included functions. Now, all maps and variables are included as well. Additionally, if you include comments directly above any maps, variables, and constants, those comments will be parsed and included in generated documentation.
-
e919d0a
Thanks @hstove! - You can now output multiple Clarigen generated type files. To do so, useoutputs
with an array of paths, instead ofoutput
. Example:[esm] outputs = ["src/clarigen.ts", "other/types.ts"]
You can also exclude specific contracts from having documentation generated. To do so, use the
exclude
(array) in yourClarigen.toml
. Each entry inexclude
should be the contract name - without file extensions or paths. Example:[docs] exclude = ["ft-trait"]
15a3f18
Thanks @hstove! - UpdatedcontractFactory
behavior - now all contract calls will have the full identifier - not just the contractName.
-
cc58a0f
Thanks @hstove! - Clarigen now outputs a "constants" property with each contract. This allows you to get the value for your constants from within the JS runtime.Example:
(define-constant my-const u1) (define-data-var my-var uint u2)
Both the constant and the variable's initial value will be added to your contract's type definitions. You can access it like:
console.log(contract.constants.myConst); // 1n console.log(contract.constants.myVar); // 2n
For variables, only the initial value (when the contract is deployed) is added to the contract's types.
588876f
Thanks @hstove! - Adds adeno.helper
configuration option. If present, a helper file will be generated, which includes helpful and common imports for Clarinet testing environments.
7c9073e
Thanks @hstove! - Fixed an issue withclarigen --watch
, where the "file watcher" would be triggered multiple times in a row, where it should have been debounced.
fa41cd0
Thanks @hstove! - Fixed an issue with contracts that have an NFT where the "key" is a tuple type
6636047
Thanks @hstove! - When generating files, contracts are sorted by name. This prevents git changes due to the indeterminant way that Clarinet outputs contract order
89ce01f
Thanks @hstove! - - Fixed a bug where an error would throw if there was nooutput
in theesm
section of config- Added
chain.burnBlockHeight
- Added
-
Added a new
docs
command to the CLI! This will parse your contracts and automatically generate documentation for each of your contracts. Included in the docs are comments and rich type information. -
daaf0b5
Thanks @hstove! - Internally updated to Clarinet v1!
daaf0b5
Thanks @hstove! - Updated the types forrovOk
androvErr
to properly throw type errors if the function doesn't return aresponse
52d697e
Thanks @hstove! - Clarigen now comes with a fully-featured CLI, powered by Deno and Clarinet
- Updated type stubs to remove unnecessary code
-
17abcf1
Thanks @hstove! - Big DX updates:- Contract calls support an "object" syntax
- Tuples are properly "camel-cased"
- Integer types are
number | bigint
now in all arguments
Updates the contract call syntax to support function arguments either as an object or an array. Previously, the only supported syntax was to "spread".
For example, given the function:
(define-read-only (add (a uint) (b uint)))
The "spread" syntax is:
contract.add(1, 2);
Now you can also do:
contract.add({ a: 1, b: 2 });
Previously, tuples (either as arguments or as results) were not properly camel-cased. Now, they are, which makes writing JS much easier.
Example function:
(define-read-only (merge-tuple (i { min-height: uint })) (merge i { max-height: u100000 }) )
Previously, the tuples in both arguments and results were not camel-case:
// old const result = contract.mergeTuple({ "min-height": 1n }); const max = result["max-height"];
Now it's much cleaner:
const result = contract.mergeTuple({ minHeight: 1n }); const max = result.maxHeight;
Previously, if a function had a
uint
orint
argument, you could already pass the argument asnumber | bigint
. However, if you had a type where the integer was within a type (like(list uint)
), you could only usebigint
.Now, you can use
number | bigint
within any argument type that has an integer.
- b66cb90: Fixed - removed accounts from index file
- 7cf0c8f: Updates generated files for Clarinet unit test environments
- 4dd63d4: Fixed code not included in version
- 8b4467e: Fixed camelCasing, adds variables to abi
- c7273ce: Version bump to trigger deno push
- 0acb708: Changed the outputted file from CLI from 'single.ts' to 'index.ts'
-
185f6db: First version:
- CLI to generate types
- Type-friendly test runner