diff --git a/CHANGELOG.md b/CHANGELOG.md index fd837af..be3c76e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # Changelog +## v2.2.0 - UNRELEASED + +### Added + +- Transaction specific functionality: + - Assets / Value Fuzzers + - Certificate Fuzzers + - Credential and Address Fuzzers + - Transaction Fuzzer helpers + ## v2.1.0 - 2024-09-24 ### Added diff --git a/aiken.toml b/aiken.toml index d19db56..cb6ae36 100644 --- a/aiken.toml +++ b/aiken.toml @@ -1,6 +1,6 @@ name = "aiken-lang/fuzz" version = "main" -compiler = "v1.1.3" +compiler = "v1.1.9" plutus = "v3" license = "Apache-2.0" description = "A library for writing Aiken's fuzzers." diff --git a/lib/aiken/fuzz/scenario.ak b/lib/aiken/fuzz/scenario.ak new file mode 100644 index 0000000..b50c0d5 --- /dev/null +++ b/lib/aiken/fuzz/scenario.ak @@ -0,0 +1,441 @@ +//// This Source Code Form is subject to the terms of the Mozilla Public +//// License, v. 2.0. If a copy of the MPL was not distributed with this +//// file, You can obtain one at http://mozilla.org/MPL/2.0/. +//// This is a modified distribution of https://github.com/CardanoSolutions/zhuli/blob/main/lib/aiken/fuzz/scenario.ak + +use aiken/cbor.{serialise} +use aiken/collection/dict +use aiken/collection/list +use aiken/collection/pairs +use aiken/crypto.{ScriptHash, blake2b_256} +use aiken/fuzz.{and_then, byte, constant, map} +use cardano/address.{Credential, Script} +use cardano/assets.{PolicyId} +use cardano/certificate.{ + AuthorizeConstitutionalCommitteeProxy, Certificate, DelegateCredential, + RegisterAndDelegateCredential, RegisterDelegateRepresentative, + RetireFromConstitutionalCommittee, UnregisterCredential, + UnregisterDelegateRepresentative, UpdateDelegateRepresentative, +} +use cardano/governance.{ + ConstitutionalCommitteeMember, DelegateRepresentative, Voter, +} +use cardano/script_context.{ + Minting, Publishing, ScriptContext, Spending, Voting, Withdrawing, +} +use cardano/transaction.{ + DatumHash, InlineDatum, Input, Mint, NoDatum, OutputReference, Publish, Spend, + Transaction, Vote, Withdraw, +} + +const max_tries: Int = 50 + +const max_byte: Int = 255 + +pub type Label = + String + +pub type Scenario { + Done + Scenario(List