Your new Fresh project is ready to go. You can follow the Fresh "Getting Started" guide here: https://fresh.deno.dev/docs/getting-started
Make sure to install Deno: https://deno.land/manual/getting_started/installation
Then start the project:
deno task start
This will watch the project directory and restart as necessary.
Write validators in the validators
folder, and supporting functions in the lib
folder using .ak
as a file extension.
For example, as validators/always_true.ak
validator {
fn spend(_datum: Data, _redeemer: Data, _context: Data) -> Bool {
True
}
}
aiken build
You can write tests in any module using the test
keyword. For example:
test foo() {
1 + 1 == 2
}
To run all tests, simply do:
aiken check
To run only tests matching the string foo
, do:
aiken check -m foo
If you're writing a library, you might want to generate an HTML documentation for it.
Use:
aiken docs
Find more on the Aiken's user manual.