aiken/examples/one_shot
rvcas 7ea8aeda01 feat: one_shot example
Co-authored-by: Kasey White <kwhitemsg@gmail.com>
2023-03-14 19:13:21 -04:00
..
validators feat: one_shot example 2023-03-14 19:13:21 -04:00
.gitignore feat: one_shot example 2023-03-14 19:13:21 -04:00
README.md feat: one_shot example 2023-03-14 19:13:21 -04:00
aiken.lock feat: one_shot example 2023-03-14 19:13:21 -04:00
aiken.toml feat: one_shot example 2023-03-14 19:13:21 -04:00
plutus.json feat: one_shot example 2023-03-14 19:13:21 -04:00

README.md

mint_lock_burn

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 spend {
  pub fn spend(_datum: Data, _redeemer: Data, _context: Data) -> Bool {
    True
  }
}

Validators are named after their purpose, so one of:

  • spent
  • mint
  • withdraw
  • publish

Building

aiken build

Testing

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

Documentation

If you're writing a library, you might want to generate an HTML documentation for it.

Use:

aiken docs

Resources

Find more on the Aiken's user manual.