Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
c8892fe
macros: add `RandomArguments` and `RandomWitness` trait implementatio…
ikripaka Jun 8, 2026
e67d76f
simplex: move ui tests code into separate functions
ikripaka Jun 9, 2026
3d24092
feat: add mutantesting (draft)
ikripaka Jun 10, 2026
60cd7bc
smplx_test: add util for random type generation
ikripaka Jun 10, 2026
9e5655e
simplex: update ui tests with random value generation
ikripaka Jun 10, 2026
3918064
ui tests: remove iterative generation for custom value in mutation te…
ikripaka Jun 16, 2026
0541a17
proptests: come up with another interface and implement it
ikripaka Jun 16, 2026
76922f8
macros: add ProgramFactory trait for programs instantiating
ikripaka Jun 17, 2026
abd1ac4
test: remove MockProvider
ikripaka Jun 17, 2026
e7db4f5
fixtures: fix and adapt config
ikripaka Jun 17, 2026
8ee7097
deps: remove unused `glob` and `rand-core` dependency from simplex-build
ikripaka Jun 18, 2026
82d1e49
proptest: edit the interface, now user can declare only Strategy<Args…
ikripaka Jun 18, 2026
79c89c9
proptest: simplify implementation, remove some explicit generics defi…
ikripaka Jun 18, 2026
2c4504e
build: fix typo in AND operation
ikripaka Jun 18, 2026
b1f1314
deps: sort deps in edited files
ikripaka Jun 18, 2026
ca8ad3c
config: add proptest config for simplex binary
ikripaka Jun 19, 2026
dd38fc2
proptesting: add another builder structs structure
ikripaka Jun 24, 2026
4659e62
feat: add new traits alignment to rely on proptest::TestRunner
ikripaka Jun 30, 2026
1c395df
fuzz_engine: edit function naming to reduce confusion
ikripaka Jun 30, 2026
3da255c
ui: fix tests imports
ikripaka Jun 30, 2026
b2c4bfd
change test config title namings in Simple.toml examples
ikripaka Jun 30, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
140 changes: 132 additions & 8 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ smplx-regtest = { path = "./crates/regtest", version = "0.0.7" }
smplx-sdk = { path = "./crates/sdk", version = "0.0.7" }
smplx-std = { path = "./crates/simplex", version = "0.0.7" }

rand_core = { version = "0.9.5" }
rand = { version = "0.9.4" }
serde = { version = "1.0.228", features = ["derive"] }
hex = { version = "0.4.3" }
hmac = { version = "0.12.1" }
Expand Down
3 changes: 1 addition & 2 deletions crates/build/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,4 @@ proc-macro2 = { version = "1.0.106", features = ["span-locations"] }
quote = { version = "1.0.44" }
pathdiff = { version = "0.2.3" }
prettyplease = { version = "0.2.37" }
glob = { version = "0.3.3"}
globwalk = { version = "0.9.1"}
globwalk = { version = "0.9.1" }
17 changes: 6 additions & 11 deletions crates/build/src/generator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ use simplicityhl::source::CanonPath;
use simplicityhl::source::CanonSourceFile;

use crate::macros::codegen::{
convert_contract_name_to_contract_module, convert_contract_name_to_contract_source_const,
convert_contract_name_to_struct_name,
construct_program_name, convert_contract_name_to_contract_module, convert_contract_name_to_contract_source_const,
};
use crate::macros::parse::SimfContent;

Expand Down Expand Up @@ -241,22 +240,19 @@ impl ArtifactsGenerator {
}

fn generate_simf_binding_code(contract_name: &str, target_simf: &Path) -> Result<TokenStream, BuildError> {
let program_name = {
let base_name = convert_contract_name_to_struct_name(contract_name);
format_ident!("{base_name}Program")
};

let program_name = construct_program_name(contract_name);
let include_simf_source_const = convert_contract_name_to_contract_source_const(contract_name);
let include_simf_module = convert_contract_name_to_contract_module(contract_name);
let target_simf_str = target_simf.to_string_lossy().into_owned();

let code = quote! {
use simplex::include_simf;
use simplex::program::{ArgumentsTrait, Program};
use simplex::program::{Program};
use simplex::provider::SimplicityNetwork;
use simplex::simplicityhl::elements::Script;
use simplex::simplicityhl::elements::secp256k1_zkp::XOnlyPublicKey;

#[derive(Clone)]
pub struct #program_name {
program: Program,
}
Expand All @@ -265,9 +261,9 @@ impl ArtifactsGenerator {
pub const SOURCE: &'static str = #include_simf_module::#include_simf_source_const;

#[must_use]
pub fn new(arguments: impl ArgumentsTrait + 'static) -> Self {
pub fn new(arguments: impl Into<simplex::simplicityhl::Arguments>) -> Self {
Self {
program: Program::new(Self::SOURCE, Box::new(arguments)),
program: Program::new(Self::SOURCE, arguments.into()),
}
}

Expand All @@ -283,7 +279,6 @@ impl ArtifactsGenerator {
self
}

#[must_use]
pub fn set_storage_at(&mut self, index: usize, new_value: [u8; 32]) {
self.program.set_storage_at(index, new_value);
}
Expand Down
Loading