[INFO] cloning repository https://github.com/kyne-lang/kyne
[INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/kyne-lang/kyne" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fkyne-lang%2Fkyne", kill_on_drop: false }`
[INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fkyne-lang%2Fkyne'...
[INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }`
[INFO] [stdout] cee9df46701eca80dcd55fc68b454a65d959d277
[INFO] testing kyne-lang/kyne against 1.98.0-beta.8+cargoflags=--release for beta-release-1.99-2
[INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fkyne-lang%2Fkyne" "/workspace/builds/worker-5-tc1/source", kill_on_drop: false }`
[INFO] [stderr] Cloning into '/workspace/builds/worker-5-tc1/source'...
[INFO] [stderr] done.
[INFO] removed /workspace/builds/worker-5-tc1/source/rust-toolchain.toml
[INFO] started tweaking git repo https://github.com/kyne-lang/kyne
[INFO] finished tweaking git repo https://github.com/kyne-lang/kyne
[INFO] tweaked toml for git repo https://github.com/kyne-lang/kyne written to /workspace/builds/worker-5-tc1/source/Cargo.toml
[INFO] validating manifest of git repo https://github.com/kyne-lang/kyne on toolchain 1.98.0-beta.8
[INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+1.98.0-beta.8" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }`
[INFO] crate git repo https://github.com/kyne-lang/kyne already has a lockfile, it will not be regenerated
[INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+1.98.0-beta.8" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-m" "1610612736" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:8683fc1fc2eb5c9ac98e0d076ab094b2ffac7f99da555d2b6a2e27f346de2ec7" "sleep" "infinity", kill_on_drop: false }`
[INFO] [stdout] 14d7a06cc4d270d6f13d70b37e2952b2f515f1589adb46b316e55ab92f56a891
[INFO] running `Command { std: "docker" "start" "14d7a06cc4d270d6f13d70b37e2952b2f515f1589adb46b316e55ab92f56a891", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "inspect" "14d7a06cc4d270d6f13d70b37e2952b2f515f1589adb46b316e55ab92f56a891", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "exec" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-w" "/opt/rustwide/workdir" "--user" "0:0" "14d7a06cc4d270d6f13d70b37e2952b2f515f1589adb46b316e55ab92f56a891" "/opt/rustwide/cargo-home/bin/cargo" "+1.98.0-beta.8" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "inspect" "14d7a06cc4d270d6f13d70b37e2952b2f515f1589adb46b316e55ab92f56a891", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "exec" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=warn" "-e" "RUSTDOCFLAGS=--cap-lints=warn" "-w" "/opt/rustwide/workdir" "--user" "0:0" "14d7a06cc4d270d6f13d70b37e2952b2f515f1589adb46b316e55ab92f56a891" "/opt/rustwide/cargo-home/bin/cargo" "+1.98.0-beta.8" "build" "--frozen" "--message-format=json" "--release", kill_on_drop: false }`
[INFO] [stderr]    Compiling kyne_lexer v0.1.0 (/opt/rustwide/workdir/compiler/lexer)
[INFO] [stderr]    Compiling kyne_diagnostics v0.1.0 (/opt/rustwide/workdir/compiler/diagnostics)
[INFO] [stderr]    Compiling kyne_cache v0.1.0 (/opt/rustwide/workdir/compiler/cache)
[INFO] [stderr]    Compiling kyne_stdlib_ledger v0.1.0 (/opt/rustwide/workdir/stdlib/ledger)
[INFO] [stderr]    Compiling kyne_stdlib_events v0.1.0 (/opt/rustwide/workdir/stdlib/events)
[INFO] [stderr]    Compiling kyne_stdlib_test v0.1.0 (/opt/rustwide/workdir/stdlib/test)
[INFO] [stderr]    Compiling kyne_stdlib_collections v0.1.0 (/opt/rustwide/workdir/stdlib/collections)
[INFO] [stderr]    Compiling kyne_stdlib_debug v0.1.0 (/opt/rustwide/workdir/stdlib/debug)
[INFO] [stderr]    Compiling kyne_stdlib_auth v0.1.0 (/opt/rustwide/workdir/stdlib/auth)
[INFO] [stderr]    Compiling kyne_stdlib_math v0.1.0 (/opt/rustwide/workdir/stdlib/math)
[INFO] [stderr]    Compiling kyne_stdlib_storage v0.1.0 (/opt/rustwide/workdir/stdlib/storage)
[INFO] [stderr]    Compiling kyne_stdlib_convert v0.1.0 (/opt/rustwide/workdir/stdlib/convert)
[INFO] [stderr]    Compiling kyne_stdlib_crypto v0.1.0 (/opt/rustwide/workdir/stdlib/crypto)
[INFO] [stderr]    Compiling kyne_golden v0.1.0 (/opt/rustwide/workdir/tests/golden)
[INFO] [stderr]    Compiling kyne_stdlib_core v0.1.0 (/opt/rustwide/workdir/stdlib/core)
[INFO] [stderr]    Compiling kyne_stdlib_time v0.1.0 (/opt/rustwide/workdir/stdlib/time)
[INFO] [stderr]    Compiling kyne_parser v0.1.0 (/opt/rustwide/workdir/compiler/parser)
[INFO] [stderr]    Compiling kyne_cst v0.1.0 (/opt/rustwide/workdir/compiler/cst)
[INFO] [stderr]    Compiling kyne_fuzz v0.1.0 (/opt/rustwide/workdir/tests/fuzz)
[INFO] [stderr]    Compiling kyne_ast v0.1.0 (/opt/rustwide/workdir/compiler/ast)
[INFO] [stderr]    Compiling kyne_formatter v0.1.0 (/opt/rustwide/workdir/tools/formatter)
[INFO] [stderr]    Compiling kyne_resolver v0.1.0 (/opt/rustwide/workdir/compiler/resolver)
[INFO] [stderr]    Compiling kyne_docgen v0.1.0 (/opt/rustwide/workdir/tools/docgen)
[INFO] [stderr]    Compiling kyne_types v0.1.0 (/opt/rustwide/workdir/compiler/types)
[INFO] [stderr]    Compiling kyne_semantics v0.1.0 (/opt/rustwide/workdir/compiler/semantics)
[INFO] [stderr]    Compiling kyne_security v0.1.0 (/opt/rustwide/workdir/compiler/security)
[INFO] [stderr]    Compiling kyne_lsp v0.1.0 (/opt/rustwide/workdir/tools/lsp)
[INFO] [stderr]    Compiling kyne_hir v0.1.0 (/opt/rustwide/workdir/compiler/hir)
[INFO] [stderr]    Compiling kyne_rir v0.1.0 (/opt/rustwide/workdir/compiler/rir)
[INFO] [stderr]    Compiling kyne_optimizer v0.1.0 (/opt/rustwide/workdir/compiler/optimizer)
[INFO] [stderr]    Compiling kyne_codegen v0.1.0 (/opt/rustwide/workdir/compiler/codegen)
[INFO] [stderr]    Compiling kyne_driver v0.1.0 (/opt/rustwide/workdir/compiler/driver)
[INFO] [stderr]    Compiling kyne_playground v0.1.0 (/opt/rustwide/workdir/tools/playground)
[INFO] [stderr]    Compiling kyne_test_runner v0.1.0 (/opt/rustwide/workdir/tools/test_runner)
[INFO] [stderr]    Compiling kyne_cli v0.1.0 (/opt/rustwide/workdir/compiler/cli)
[INFO] [stderr]     Finished `release` profile [optimized] target(s) in 9.91s
[INFO] running `Command { std: "docker" "inspect" "14d7a06cc4d270d6f13d70b37e2952b2f515f1589adb46b316e55ab92f56a891", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "exec" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=warn" "-e" "RUSTDOCFLAGS=--cap-lints=warn" "-w" "/opt/rustwide/workdir" "--user" "0:0" "14d7a06cc4d270d6f13d70b37e2952b2f515f1589adb46b316e55ab92f56a891" "/opt/rustwide/cargo-home/bin/cargo" "+1.98.0-beta.8" "test" "--frozen" "--no-run" "--message-format=json" "--release", kill_on_drop: false }`
[INFO] [stderr]    Compiling kyne_stdlib_math v0.1.0 (/opt/rustwide/workdir/stdlib/math)
[INFO] [stderr]    Compiling kyne_stdlib_events v0.1.0 (/opt/rustwide/workdir/stdlib/events)
[INFO] [stderr]    Compiling kyne_parser v0.1.0 (/opt/rustwide/workdir/compiler/parser)
[INFO] [stderr]    Compiling kyne_stdlib_time v0.1.0 (/opt/rustwide/workdir/stdlib/time)
[INFO] [stderr]    Compiling kyne_lexer v0.1.0 (/opt/rustwide/workdir/compiler/lexer)
[INFO] [stderr]    Compiling kyne_fuzz v0.1.0 (/opt/rustwide/workdir/tests/fuzz)
[INFO] [stderr]    Compiling kyne_cst v0.1.0 (/opt/rustwide/workdir/compiler/cst)
[INFO] [stderr]    Compiling kyne_ast v0.1.0 (/opt/rustwide/workdir/compiler/ast)
[INFO] [stderr]    Compiling kyne_formatter v0.1.0 (/opt/rustwide/workdir/tools/formatter)
[INFO] [stderr]    Compiling kyne_resolver v0.1.0 (/opt/rustwide/workdir/compiler/resolver)
[INFO] [stderr]    Compiling kyne_codegen v0.1.0 (/opt/rustwide/workdir/compiler/codegen)
[INFO] [stderr]    Compiling kyne_driver v0.1.0 (/opt/rustwide/workdir/compiler/driver)
[INFO] [stderr]    Compiling kyne_playground v0.1.0 (/opt/rustwide/workdir/tools/playground)
[INFO] [stderr]    Compiling kyne_test_runner v0.1.0 (/opt/rustwide/workdir/tools/test_runner)
[INFO] [stderr]    Compiling kyne_cli v0.1.0 (/opt/rustwide/workdir/compiler/cli)
[INFO] [stderr]    Compiling kyne_rir v0.1.0 (/opt/rustwide/workdir/compiler/rir)
[INFO] [stderr]    Compiling kyne_hir v0.1.0 (/opt/rustwide/workdir/compiler/hir)
[INFO] [stderr]    Compiling kyne_optimizer v0.1.0 (/opt/rustwide/workdir/compiler/optimizer)
[INFO] [stderr]    Compiling kyne_semantics v0.1.0 (/opt/rustwide/workdir/compiler/semantics)
[INFO] [stderr]    Compiling kyne_types v0.1.0 (/opt/rustwide/workdir/compiler/types)
[INFO] [stderr]    Compiling kyne_security v0.1.0 (/opt/rustwide/workdir/compiler/security)
[INFO] [stderr]    Compiling kyne_lsp v0.1.0 (/opt/rustwide/workdir/tools/lsp)
[INFO] [stderr]    Compiling kyne_docgen v0.1.0 (/opt/rustwide/workdir/tools/docgen)
[INFO] [stderr]    Compiling kyne_stdlib_storage v0.1.0 (/opt/rustwide/workdir/stdlib/storage)
[INFO] [stderr]    Compiling kyne_cache v0.1.0 (/opt/rustwide/workdir/compiler/cache)
[INFO] [stderr]    Compiling kyne_stdlib_convert v0.1.0 (/opt/rustwide/workdir/stdlib/convert)
[INFO] [stderr]    Compiling kyne_diagnostics v0.1.0 (/opt/rustwide/workdir/compiler/diagnostics)
[INFO] [stderr]    Compiling kyne_stdlib_collections v0.1.0 (/opt/rustwide/workdir/stdlib/collections)
[INFO] [stderr]    Compiling kyne_stdlib_crypto v0.1.0 (/opt/rustwide/workdir/stdlib/crypto)
[INFO] [stderr]    Compiling kyne_golden v0.1.0 (/opt/rustwide/workdir/tests/golden)
[INFO] [stderr]    Compiling kyne_stdlib_test v0.1.0 (/opt/rustwide/workdir/stdlib/test)
[INFO] [stderr]    Compiling kyne_stdlib_core v0.1.0 (/opt/rustwide/workdir/stdlib/core)
[INFO] [stderr]    Compiling kyne_stdlib_ledger v0.1.0 (/opt/rustwide/workdir/stdlib/ledger)
[INFO] [stderr]    Compiling kyne_stdlib_debug v0.1.0 (/opt/rustwide/workdir/stdlib/debug)
[INFO] [stderr]    Compiling kyne_stdlib_auth v0.1.0 (/opt/rustwide/workdir/stdlib/auth)
[INFO] [stderr]     Finished `release` profile [optimized] target(s) in 15.87s
[INFO] running `Command { std: "docker" "inspect" "14d7a06cc4d270d6f13d70b37e2952b2f515f1589adb46b316e55ab92f56a891", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "exec" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=warn" "-e" "RUSTDOCFLAGS=--cap-lints=warn" "-w" "/opt/rustwide/workdir" "--user" "0:0" "14d7a06cc4d270d6f13d70b37e2952b2f515f1589adb46b316e55ab92f56a891" "/opt/rustwide/cargo-home/bin/cargo" "+1.98.0-beta.8" "test" "--frozen" "--release", kill_on_drop: false }`
[INFO] [stderr]     Finished `release` profile [optimized] target(s) in 0.05s
[INFO] [stderr]      Running unittests src/lib.rs (/opt/rustwide/target/release/deps/kyne_ast-8874599a3f21fc29)
[INFO] [stdout] 
[INFO] [stdout] running 11 tests
[INFO] [stdout] test tests::field_init_shorthand_is_expanded ... ok
[INFO] [stdout] test tests::if_and_else_if_chain_lowers_correctly ... ok
[INFO] [stdout] test tests::lowering_never_panics_on_a_cst_with_parser_errors ... ok
[INFO] [stdout] test tests::lowers_fn_visibility ... ok
[INFO] [stdout] test tests::lowers_state_const_and_types ... ok
[INFO] [stdout] test tests::lowers_imports ... ok
[INFO] [stdout] test tests::match_arm_bare_return_and_throw_lower_correctly ... ok
[INFO] [stdout] test tests::redundant_parens_collapse_during_lowering ... ok
[INFO] [stdout] test tests::visitor_counts_every_binary_expression ... ok
[INFO] [stdout] test tests::string_escapes_are_decoded ... ok
[INFO] [stdout] test tests::binary_operators_lower_to_the_right_variant ... ok
[INFO] [stderr]      Running tests/canonical_examples.rs (/opt/rustwide/target/release/deps/canonical_examples-767316f6700caedd)
[INFO] [stdout] 
[INFO] [stdout] test result: ok. 11 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] running 6 tests
[INFO] [stdout] test counter ... ok
[INFO] [stdout] test escrow ... ok
[INFO] [stdout] test marketplace ... ok
[INFO] [stdout] test multisig_wallet ... ok
[INFO] [stdout] test voting ... ok
[INFO] [stdout] test token ... ok
[INFO] [stderr]      Running unittests src/lib.rs (/opt/rustwide/target/release/deps/kyne_cache-5cca114c80549065)
[INFO] [stdout] 
[INFO] [stdout] test result: ok. 6 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] running 0 tests
[INFO] [stdout] 
[INFO] [stdout] test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
[INFO] [stdout] 
[INFO] [stderr]      Running unittests src/main.rs (/opt/rustwide/target/release/deps/kyne-8995e47b9d04f59e)
[INFO] [stdout] 
[INFO] [stdout] running 4 tests
[INFO] [stdout] test scaffold::tests::kyne_toml_is_valid_looking_and_names_the_package ... ok
[INFO] [stdout] test scaffold::tests::every_template_contract_is_already_canonically_formatted ... ok
[INFO] [stdout] test scaffold::tests::every_template_contract_parses_cleanly ... ok
[INFO] [stdout] test scaffold::tests::find_template_is_case_sensitive_and_total ... ok
[INFO] [stdout] 
[INFO] [stdout] test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
[INFO] [stdout] 
[INFO] [stderr]      Running unittests src/lib.rs (/opt/rustwide/target/release/deps/kyne_codegen-68d9f3eddd87f0f0)
[INFO] [stdout] 
[INFO] [stdout] running 0 tests
[INFO] [stdout] 
[INFO] [stdout] test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
[INFO] [stdout] 
[INFO] [stderr]      Running tests/canonical_examples.rs (/opt/rustwide/target/release/deps/canonical_examples-fafd3a87994541ac)
[INFO] [stdout] 
[INFO] [stdout] running 7 tests
[INFO] [stdout] test generation_is_deterministic ... FAILED
[INFO] [stdout] test arithmetic_is_checked_not_bare ... FAILED
[INFO] [stdout] test non_copy_parameter_reused_more_than_once_is_cloned ... FAILED
[INFO] [stdout] test counter_matches_golden_file ... FAILED
[INFO] [stdout] test token_matches_golden_file ... FAILED
[INFO] [stdout] test compound_state_assignment_is_a_storage_write ... FAILED
[INFO] [stderr] error: test failed, to rerun pass `-p kyne_codegen --test canonical_examples`
[INFO] [stdout] test applies_soroban_attribute_macros ... FAILED
[INFO] [stdout] 
[INFO] [stdout] failures:
[INFO] [stdout] 
[INFO] [stdout] ---- generation_is_deterministic stdout ----
[INFO] [stdout] 
[INFO] [stdout] thread 'generation_is_deterministic' (2110) panicked at compiler/codegen/tests/canonical_examples.rs:32:53:
[INFO] [stdout] token.kyn: codegen failed: rustfmt rejected generated Rust (this is a kyne_codegen bug, not a user error):
[INFO] [stdout] error: 'rustfmt' is not installed for the toolchain '1.98.0-beta.8-x86_64-unknown-linux-gnu'.
[INFO] [stdout] help: run `rustup component add --toolchain 1.98.0-beta.8-x86_64-unknown-linux-gnu rustfmt` to install it
[INFO] [stdout] 
[INFO] [stdout] --- unformatted source ---
[INFO] [stdout] #![no_std]
[INFO] [stdout] 
[INFO] [stdout] use soroban_sdk::{Address, Env, Map, Symbol, contract, contracterror, contractimpl};
[INFO] [stdout] 
[INFO] [stdout] pub const NAME: &str = "Kyne Example Token";
[INFO] [stdout] pub const SYMBOL: &str = "KYN";
[INFO] [stdout] pub const DECIMALS: u32 = 7;
[INFO] [stdout] 
[INFO] [stdout] #[contract]
[INFO] [stdout] pub struct Token;
[INFO] [stdout] 
[INFO] [stdout] #[contracterror]
[INFO] [stdout] #[derive(Copy, Clone, Debug, Eq, PartialEq, PartialOrd, Ord)]
[INFO] [stdout] #[repr(u32)]
[INFO] [stdout] pub enum TokenError {
[INFO] [stdout]     InsufficientBalance = 1,
[INFO] [stdout]     InvalidAmount = 2,
[INFO] [stdout] }
[INFO] [stdout] 
[INFO] [stdout] #[contractimpl]
[INFO] [stdout] impl Token {
[INFO] [stdout] pub fn init(env: Env, admin: Address) {
[INFO] [stdout] admin.clone().require_auth();
[INFO] [stdout] env.storage().persistent().set(&Symbol::new(&env, "total_supply"), &(0));
[INFO] [stdout] }
[INFO] [stdout] 
[INFO] [stdout] pub fn mint(env: Env, admin: Address, to: Address, amount: i128) -> Result<bool, TokenError> {
[INFO] [stdout] if amount <= 0 {
[INFO] [stdout] return Err(TokenError::InvalidAmount);
[INFO] [stdout] }
[INFO] [stdout] admin.clone().require_auth();
[INFO] [stdout] let mut balances = env.storage().persistent().get::<Symbol, Map<Address, i128>>(&Symbol::new(&env, "balances")).unwrap_or(Map::new(&env));
[INFO] [stdout] balances.set(to.clone(), (Self::balance_of(env.clone(), to.clone())).checked_add(amount).expect("arithmetic overflow"));
[INFO] [stdout] env.storage().persistent().set(&Symbol::new(&env, "balances"), &balances);
[INFO] [stdout] env.storage().persistent().set(&Symbol::new(&env, "total_supply"), &((env.storage().persistent().get::<Symbol, i128>(&Symbol::new(&env, "total_supply")).unwrap_or(0)).checked_add(amount).expect("arithmetic overflow")));
[INFO] [stdout] env.events().publish((Symbol::new(&env, "Mint"),), (to.clone(), amount));
[INFO] [stdout] return Ok(true);
[INFO] [stdout] }
[INFO] [stdout] 
[INFO] [stdout] pub fn transfer(env: Env, from: Address, to: Address, amount: i128) -> Result<bool, TokenError> {
[INFO] [stdout] if amount <= 0 {
[INFO] [stdout] return Err(TokenError::InvalidAmount);
[INFO] [stdout] }
[INFO] [stdout] from.clone().require_auth();
[INFO] [stdout] let from_balance = Self::balance_of(env.clone(), from.clone());
[INFO] [stdout] if from_balance.clone() < amount {
[INFO] [stdout] return Err(TokenError::InsufficientBalance);
[INFO] [stdout] }
[INFO] [stdout] let mut balances = env.storage().persistent().get::<Symbol, Map<Address, i128>>(&Symbol::new(&env, "balances")).unwrap_or(Map::new(&env));
[INFO] [stdout] balances.set(from.clone(), (from_balance.clone()).checked_sub(amount).expect("arithmetic overflow"));
[INFO] [stdout] env.storage().persistent().set(&Symbol::new(&env, "balances"), &balances);
[INFO] [stdout] let mut balances = env.storage().persistent().get::<Symbol, Map<Address, i128>>(&Symbol::new(&env, "balances")).unwrap_or(Map::new(&env));
[INFO] [stdout] balances.set(to.clone(), (Self::balance_of(env.clone(), to.clone())).checked_add(amount).expect("arithmetic overflow"));
[INFO] [stdout] env.storage().persistent().set(&Symbol::new(&env, "balances"), &balances);
[INFO] [stdout] env.events().publish((Symbol::new(&env, "Transfer"),), (from.clone(), to.clone(), amount));
[INFO] [stdout] return Ok(true);
[INFO] [stdout] }
[INFO] [stdout] 
[INFO] [stdout] pub fn balance_of(env: Env, account: Address) -> i128 {
[INFO] [stdout] return env.storage().persistent().get::<Symbol, Map<Address, i128>>(&Symbol::new(&env, "balances")).unwrap_or(Map::new(&env)).get(account.clone()).unwrap_or(0);
[INFO] [stdout] }
[INFO] [stdout] }
[INFO] [stdout] 
[INFO] [stdout] stack backtrace:
[INFO] [stdout]    0:     0x60385398f491 - <<std[97b98282bc616a66]::sys::backtrace::BacktraceLock>::print::DisplayBacktrace as core[832e9a552fc17241]::fmt::Display>::fmt
[INFO] [stdout]    1:     0x6038539a357a - core[832e9a552fc17241]::fmt::write
[INFO] [stdout]    2:     0x6038539939bc - <alloc[3ecab9f82c41dc7d]::vec::Vec<u8> as std[97b98282bc616a66]::io::Write>::write_fmt
[INFO] [stdout]    3:     0x60385396c886 - std[97b98282bc616a66]::panicking::default_hook::{closure#0}
[INFO] [stdout]    4:     0x603853987149 - std[97b98282bc616a66]::panicking::default_hook
[INFO] [stdout]    5:     0x603853920de0 - test[39766f3d73431624]::test_main_inner::<test[39766f3d73431624]::test_main_static::{closure#0}>::{closure#0}
[INFO] [stdout]    6:     0x603853987302 - std[97b98282bc616a66]::panicking::panic_with_hook
[INFO] [stdout]    7:     0x60385396c932 - std[97b98282bc616a66]::panicking::panic_handler::{closure#0}
[INFO] [stdout]    8:     0x603853963fd9 - std[97b98282bc616a66]::sys::backtrace::__rust_end_short_backtrace::<std[97b98282bc616a66]::panicking::panic_handler::{closure#0}, !>
[INFO] [stdout]    9:     0x60385396d52d - __rustc[e3d8617bb01b7f69]::rust_begin_unwind
[INFO] [stdout]   10:     0x6038539a3cac - core[832e9a552fc17241]::panicking::panic_fmt
[INFO] [stdout]   11:     0x6038538afb05 - canonical_examples[7a207e92bcf17fcc]::generate_source::{closure#0}
[INFO] [stdout]   12:     0x6038538b008b - canonical_examples[7a207e92bcf17fcc]::generate_source
[INFO] [stdout]   13:     0x6038538b0e83 - <canonical_examples[7a207e92bcf17fcc]::generation_is_deterministic::{closure#0} as core[832e9a552fc17241]::ops::function::FnOnce<()>>::call_once
[INFO] [stdout]   14:     0x60385391411b - test[39766f3d73431624]::__rust_begin_short_backtrace::<core[832e9a552fc17241]::result::Result<(), alloc[3ecab9f82c41dc7d]::string::String>, fn() -> core[832e9a552fc17241]::result::Result<(), alloc[3ecab9f82c41dc7d]::string::String>>
[INFO] [stdout]   15:     0x603853921765 - test[39766f3d73431624]::run_test::{closure#0}
[INFO] [stdout]   16:     0x60385391c214 - std[97b98282bc616a66]::sys::backtrace::__rust_begin_short_backtrace::<test[39766f3d73431624]::run_test::{closure#1}, ()>
[INFO] [stdout]   17:     0x6038539248b2 - <std[97b98282bc616a66]::thread::lifecycle::spawn_unchecked<test[39766f3d73431624]::run_test::{closure#1}, ()>::{closure#1} as core[832e9a552fc17241]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
[INFO] [stdout]   18:     0x60385398e7af - <std[97b98282bc616a66]::sys::thread::unix::Thread>::new::thread_start
[INFO] [stdout]   19:     0x76e2e473307a - <unknown>
[INFO] [stdout]   20:     0x76e2e47c6534 - clone
[INFO] [stdout]   21:                0x0 - <unknown>
[INFO] [stdout] 
[INFO] [stdout] ---- arithmetic_is_checked_not_bare stdout ----
[INFO] [stdout] 
[INFO] [stdout] thread 'arithmetic_is_checked_not_bare' (2107) panicked at compiler/codegen/tests/canonical_examples.rs:32:53:
[INFO] [stdout] token.kyn: codegen failed: rustfmt rejected generated Rust (this is a kyne_codegen bug, not a user error):
[INFO] [stdout] error: 'rustfmt' is not installed for the toolchain '1.98.0-beta.8-x86_64-unknown-linux-gnu'.
[INFO] [stdout] help: run `rustup component add --toolchain 1.98.0-beta.8-x86_64-unknown-linux-gnu rustfmt` to install it
[INFO] [stdout] 
[INFO] [stdout] --- unformatted source ---
[INFO] [stdout] #![no_std]
[INFO] [stdout] 
[INFO] [stdout] use soroban_sdk::{Address, Env, Map, Symbol, contract, contracterror, contractimpl};
[INFO] [stdout] 
[INFO] [stdout] pub const NAME: &str = "Kyne Example Token";
[INFO] [stdout] pub const SYMBOL: &str = "KYN";
[INFO] [stdout] pub const DECIMALS: u32 = 7;
[INFO] [stdout] 
[INFO] [stdout] #[contract]
[INFO] [stdout] pub struct Token;
[INFO] [stdout] 
[INFO] [stdout] #[contracterror]
[INFO] [stdout] #[derive(Copy, Clone, Debug, Eq, PartialEq, PartialOrd, Ord)]
[INFO] [stdout] #[repr(u32)]
[INFO] [stdout] pub enum TokenError {
[INFO] [stdout]     InsufficientBalance = 1,
[INFO] [stdout]     InvalidAmount = 2,
[INFO] [stdout] }
[INFO] [stdout] 
[INFO] [stdout] #[contractimpl]
[INFO] [stdout] impl Token {
[INFO] [stdout] pub fn init(env: Env, admin: Address) {
[INFO] [stdout] admin.clone().require_auth();
[INFO] [stdout] env.storage().persistent().set(&Symbol::new(&env, "total_supply"), &(0));
[INFO] [stdout] }
[INFO] [stdout] 
[INFO] [stdout] pub fn mint(env: Env, admin: Address, to: Address, amount: i128) -> Result<bool, TokenError> {
[INFO] [stdout] if amount <= 0 {
[INFO] [stdout] return Err(TokenError::InvalidAmount);
[INFO] [stdout] }
[INFO] [stdout] admin.clone().require_auth();
[INFO] [stdout] let mut balances = env.storage().persistent().get::<Symbol, Map<Address, i128>>(&Symbol::new(&env, "balances")).unwrap_or(Map::new(&env));
[INFO] [stdout] balances.set(to.clone(), (Self::balance_of(env.clone(), to.clone())).checked_add(amount).expect("arithmetic overflow"));
[INFO] [stdout] env.storage().persistent().set(&Symbol::new(&env, "balances"), &balances);
[INFO] [stdout] env.storage().persistent().set(&Symbol::new(&env, "total_supply"), &((env.storage().persistent().get::<Symbol, i128>(&Symbol::new(&env, "total_supply")).unwrap_or(0)).checked_add(amount).expect("arithmetic overflow")));
[INFO] [stdout] env.events().publish((Symbol::new(&env, "Mint"),), (to.clone(), amount));
[INFO] [stdout] return Ok(true);
[INFO] [stdout] }
[INFO] [stdout] 
[INFO] [stdout] pub fn transfer(env: Env, from: Address, to: Address, amount: i128) -> Result<bool, TokenError> {
[INFO] [stdout] if amount <= 0 {
[INFO] [stdout] return Err(TokenError::InvalidAmount);
[INFO] [stdout] }
[INFO] [stdout] from.clone().require_auth();
[INFO] [stdout] let from_balance = Self::balance_of(env.clone(), from.clone());
[INFO] [stdout] if from_balance.clone() < amount {
[INFO] [stdout] return Err(TokenError::InsufficientBalance);
[INFO] [stdout] }
[INFO] [stdout] let mut balances = env.storage().persistent().get::<Symbol, Map<Address, i128>>(&Symbol::new(&env, "balances")).unwrap_or(Map::new(&env));
[INFO] [stdout] balances.set(from.clone(), (from_balance.clone()).checked_sub(amount).expect("arithmetic overflow"));
[INFO] [stdout] env.storage().persistent().set(&Symbol::new(&env, "balances"), &balances);
[INFO] [stdout] let mut balances = env.storage().persistent().get::<Symbol, Map<Address, i128>>(&Symbol::new(&env, "balances")).unwrap_or(Map::new(&env));
[INFO] [stdout] balances.set(to.clone(), (Self::balance_of(env.clone(), to.clone())).checked_add(amount).expect("arithmetic overflow"));
[INFO] [stdout] env.storage().persistent().set(&Symbol::new(&env, "balances"), &balances);
[INFO] [stdout] env.events().publish((Symbol::new(&env, "Transfer"),), (from.clone(), to.clone(), amount));
[INFO] [stdout] return Ok(true);
[INFO] [stdout] }
[INFO] [stdout] 
[INFO] [stdout] pub fn balance_of(env: Env, account: Address) -> i128 {
[INFO] [stdout] return env.storage().persistent().get::<Symbol, Map<Address, i128>>(&Symbol::new(&env, "balances")).unwrap_or(Map::new(&env)).get(account.clone()).unwrap_or(0);
[INFO] [stdout] }
[INFO] [stdout] }
[INFO] [stdout] 
[INFO] [stdout] stack backtrace:
[INFO] [stdout]    0:     0x60385398f491 - <<std[97b98282bc616a66]::sys::backtrace::BacktraceLock>::print::DisplayBacktrace as core[832e9a552fc17241]::fmt::Display>::fmt
[INFO] [stdout]    1:     0x6038539a357a - core[832e9a552fc17241]::fmt::write
[INFO] [stdout]    2:     0x6038539939bc - <alloc[3ecab9f82c41dc7d]::vec::Vec<u8> as std[97b98282bc616a66]::io::Write>::write_fmt
[INFO] [stdout]    3:     0x60385396c886 - std[97b98282bc616a66]::panicking::default_hook::{closure#0}
[INFO] [stdout]    4:     0x603853987149 - std[97b98282bc616a66]::panicking::default_hook
[INFO] [stdout]    5:     0x603853920de0 - test[39766f3d73431624]::test_main_inner::<test[39766f3d73431624]::test_main_static::{closure#0}>::{closure#0}
[INFO] [stdout]    6:     0x603853987302 - std[97b98282bc616a66]::panicking::panic_with_hook
[INFO] [stdout]    7:     0x60385396c932 - std[97b98282bc616a66]::panicking::panic_handler::{closure#0}
[INFO] [stdout]    8:     0x603853963fd9 - std[97b98282bc616a66]::sys::backtrace::__rust_end_short_backtrace::<std[97b98282bc616a66]::panicking::panic_handler::{closure#0}, !>
[INFO] [stdout]    9:     0x60385396d52d - __rustc[e3d8617bb01b7f69]::rust_begin_unwind
[INFO] [stdout]   10:     0x6038539a3cac - core[832e9a552fc17241]::panicking::panic_fmt
[INFO] [stdout]   11:     0x6038538afb05 - canonical_examples[7a207e92bcf17fcc]::generate_source::{closure#0}
[INFO] [stdout]   12:     0x6038538b008b - canonical_examples[7a207e92bcf17fcc]::generate_source
[INFO] [stdout]   13:     0x6038538b0f8b - <canonical_examples[7a207e92bcf17fcc]::arithmetic_is_checked_not_bare::{closure#0} as core[832e9a552fc17241]::ops::function::FnOnce<()>>::call_once
[INFO] [stdout]   14:     0x60385391411b - test[39766f3d73431624]::__rust_begin_short_backtrace::<core[832e9a552fc17241]::result::Result<(), alloc[3ecab9f82c41dc7d]::string::String>, fn() -> core[832e9a552fc17241]::result::Result<(), alloc[3ecab9f82c41dc7d]::string::String>>
[INFO] [stdout]   15:     0x603853921765 - test[39766f3d73431624]::run_test::{closure#0}
[INFO] [stdout]   16:     0x60385391c214 - std[97b98282bc616a66]::sys::backtrace::__rust_begin_short_backtrace::<test[39766f3d73431624]::run_test::{closure#1}, ()>
[INFO] [stdout]   17:     0x6038539248b2 - <std[97b98282bc616a66]::thread::lifecycle::spawn_unchecked<test[39766f3d73431624]::run_test::{closure#1}, ()>::{closure#1} as core[832e9a552fc17241]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
[INFO] [stdout]   18:     0x60385398e7af - <std[97b98282bc616a66]::sys::thread::unix::Thread>::new::thread_start
[INFO] [stdout]   19:     0x76e2e473307a - <unknown>
[INFO] [stdout]   20:     0x76e2e47c6534 - clone
[INFO] [stdout]   21:                0x0 - <unknown>
[INFO] [stdout] 
[INFO] [stdout] ---- non_copy_parameter_reused_more_than_once_is_cloned stdout ----
[INFO] [stdout] 
[INFO] [stdout] thread 'non_copy_parameter_reused_more_than_once_is_cloned' (2111) panicked at compiler/codegen/tests/canonical_examples.rs:32:53:
[INFO] [stdout] token.kyn: codegen failed: rustfmt rejected generated Rust (this is a kyne_codegen bug, not a user error):
[INFO] [stdout] error: 'rustfmt' is not installed for the toolchain '1.98.0-beta.8-x86_64-unknown-linux-gnu'.
[INFO] [stdout] help: run `rustup component add --toolchain 1.98.0-beta.8-x86_64-unknown-linux-gnu rustfmt` to install it
[INFO] [stdout] 
[INFO] [stdout] --- unformatted source ---
[INFO] [stdout] #![no_std]
[INFO] [stdout] 
[INFO] [stdout] use soroban_sdk::{Address, Env, Map, Symbol, contract, contracterror, contractimpl};
[INFO] [stdout] 
[INFO] [stdout] pub const NAME: &str = "Kyne Example Token";
[INFO] [stdout] pub const SYMBOL: &str = "KYN";
[INFO] [stdout] pub const DECIMALS: u32 = 7;
[INFO] [stdout] 
[INFO] [stdout] #[contract]
[INFO] [stdout] pub struct Token;
[INFO] [stdout] 
[INFO] [stdout] #[contracterror]
[INFO] [stdout] #[derive(Copy, Clone, Debug, Eq, PartialEq, PartialOrd, Ord)]
[INFO] [stdout] #[repr(u32)]
[INFO] [stdout] pub enum TokenError {
[INFO] [stdout]     InsufficientBalance = 1,
[INFO] [stdout]     InvalidAmount = 2,
[INFO] [stdout] }
[INFO] [stdout] 
[INFO] [stdout] #[contractimpl]
[INFO] [stdout] impl Token {
[INFO] [stdout] pub fn init(env: Env, admin: Address) {
[INFO] [stdout] admin.clone().require_auth();
[INFO] [stdout] env.storage().persistent().set(&Symbol::new(&env, "total_supply"), &(0));
[INFO] [stdout] }
[INFO] [stdout] 
[INFO] [stdout] pub fn mint(env: Env, admin: Address, to: Address, amount: i128) -> Result<bool, TokenError> {
[INFO] [stdout] if amount <= 0 {
[INFO] [stdout] return Err(TokenError::InvalidAmount);
[INFO] [stdout] }
[INFO] [stdout] admin.clone().require_auth();
[INFO] [stdout] let mut balances = env.storage().persistent().get::<Symbol, Map<Address, i128>>(&Symbol::new(&env, "balances")).unwrap_or(Map::new(&env));
[INFO] [stdout] balances.set(to.clone(), (Self::balance_of(env.clone(), to.clone())).checked_add(amount).expect("arithmetic overflow"));
[INFO] [stdout] env.storage().persistent().set(&Symbol::new(&env, "balances"), &balances);
[INFO] [stdout] env.storage().persistent().set(&Symbol::new(&env, "total_supply"), &((env.storage().persistent().get::<Symbol, i128>(&Symbol::new(&env, "total_supply")).unwrap_or(0)).checked_add(amount).expect("arithmetic overflow")));
[INFO] [stdout] env.events().publish((Symbol::new(&env, "Mint"),), (to.clone(), amount));
[INFO] [stdout] return Ok(true);
[INFO] [stdout] }
[INFO] [stdout] 
[INFO] [stdout] pub fn transfer(env: Env, from: Address, to: Address, amount: i128) -> Result<bool, TokenError> {
[INFO] [stdout] if amount <= 0 {
[INFO] [stdout] return Err(TokenError::InvalidAmount);
[INFO] [stdout] }
[INFO] [stdout] from.clone().require_auth();
[INFO] [stdout] let from_balance = Self::balance_of(env.clone(), from.clone());
[INFO] [stdout] if from_balance.clone() < amount {
[INFO] [stdout] return Err(TokenError::InsufficientBalance);
[INFO] [stdout] }
[INFO] [stdout] let mut balances = env.storage().persistent().get::<Symbol, Map<Address, i128>>(&Symbol::new(&env, "balances")).unwrap_or(Map::new(&env));
[INFO] [stdout] balances.set(from.clone(), (from_balance.clone()).checked_sub(amount).expect("arithmetic overflow"));
[INFO] [stdout] env.storage().persistent().set(&Symbol::new(&env, "balances"), &balances);
[INFO] [stdout] let mut balances = env.storage().persistent().get::<Symbol, Map<Address, i128>>(&Symbol::new(&env, "balances")).unwrap_or(Map::new(&env));
[INFO] [stdout] balances.set(to.clone(), (Self::balance_of(env.clone(), to.clone())).checked_add(amount).expect("arithmetic overflow"));
[INFO] [stdout] env.storage().persistent().set(&Symbol::new(&env, "balances"), &balances);
[INFO] [stdout] env.events().publish((Symbol::new(&env, "Transfer"),), (from.clone(), to.clone(), amount));
[INFO] [stdout] return Ok(true);
[INFO] [stdout] }
[INFO] [stdout] 
[INFO] [stdout] pub fn balance_of(env: Env, account: Address) -> i128 {
[INFO] [stdout] return env.storage().persistent().get::<Symbol, Map<Address, i128>>(&Symbol::new(&env, "balances")).unwrap_or(Map::new(&env)).get(account.clone()).unwrap_or(0);
[INFO] [stdout] }
[INFO] [stdout] }
[INFO] [stdout] 
[INFO] [stdout] stack backtrace:
[INFO] [stdout]    0:     0x60385398f491 - <<std[97b98282bc616a66]::sys::backtrace::BacktraceLock>::print::DisplayBacktrace as core[832e9a552fc17241]::fmt::Display>::fmt
[INFO] [stdout]    1:     0x6038539a357a - core[832e9a552fc17241]::fmt::write
[INFO] [stdout]    2:     0x6038539939bc - <alloc[3ecab9f82c41dc7d]::vec::Vec<u8> as std[97b98282bc616a66]::io::Write>::write_fmt
[INFO] [stdout]    3:     0x60385396c886 - std[97b98282bc616a66]::panicking::default_hook::{closure#0}
[INFO] [stdout]    4:     0x603853987149 - std[97b98282bc616a66]::panicking::default_hook
[INFO] [stdout]    5:     0x603853920de0 - test[39766f3d73431624]::test_main_inner::<test[39766f3d73431624]::test_main_static::{closure#0}>::{closure#0}
[INFO] [stdout]    6:     0x603853987302 - std[97b98282bc616a66]::panicking::panic_with_hook
[INFO] [stdout]    7:     0x60385396c932 - std[97b98282bc616a66]::panicking::panic_handler::{closure#0}
[INFO] [stdout]    8:     0x603853963fd9 - std[97b98282bc616a66]::sys::backtrace::__rust_end_short_backtrace::<std[97b98282bc616a66]::panicking::panic_handler::{closure#0}, !>
[INFO] [stdout]    9:     0x60385396d52d - __rustc[e3d8617bb01b7f69]::rust_begin_unwind
[INFO] [stdout]   10:     0x6038539a3cac - core[832e9a552fc17241]::panicking::panic_fmt
[INFO] [stdout]   11:     0x6038538afb05 - canonical_examples[7a207e92bcf17fcc]::generate_source::{closure#0}
[INFO] [stdout]   12:     0x6038538b008b - canonical_examples[7a207e92bcf17fcc]::generate_source
[INFO] [stdout]   13:     0x6038538b1262 - <canonical_examples[7a207e92bcf17fcc]::non_copy_parameter_reused_more_than_once_is_cloned::{closure#0} as core[832e9a552fc17241]::ops::function::FnOnce<()>>::call_once
[INFO] [stdout]   14:     0x60385391411b - test[39766f3d73431624]::__rust_begin_short_backtrace::<core[832e9a552fc17241]::result::Result<(), alloc[3ecab9f82c41dc7d]::string::String>, fn() -> core[832e9a552fc17241]::result::Result<(), alloc[3ecab9f82c41dc7d]::string::String>>
[INFO] [stdout]   15:     0x603853921765 - test[39766f3d73431624]::run_test::{closure#0}
[INFO] [stdout]   16:     0x60385391c214 - std[97b98282bc616a66]::sys::backtrace::__rust_begin_short_backtrace::<test[39766f3d73431624]::run_test::{closure#1}, ()>
[INFO] [stdout]   17:     0x6038539248b2 - <std[97b98282bc616a66]::thread::lifecycle::spawn_unchecked<test[39766f3d73431624]::run_test::{closure#1}, ()>::{closure#1} as core[832e9a552fc17241]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
[INFO] [stdout]   18:     0x60385398e7af - <std[97b98282bc616a66]::sys::thread::unix::Thread>::new::thread_start
[INFO] [stdout]   19:     0x76e2e473307a - <unknown>
[INFO] [stdout]   20:     0x76e2e47c6534 - clone
[INFO] [stdout]   21:                0x0 - <unknown>
[INFO] [stdout] 
[INFO] [stdout] ---- counter_matches_golden_file stdout ----
[INFO] [stdout] 
[INFO] [stdout] thread 'counter_matches_golden_file' (2109) panicked at compiler/codegen/tests/canonical_examples.rs:32:53:
[INFO] [stdout] counter.kyn: codegen failed: rustfmt rejected generated Rust (this is a kyne_codegen bug, not a user error):
[INFO] [stdout] error: 'rustfmt' is not installed for the toolchain '1.98.0-beta.8-x86_64-unknown-linux-gnu'.
[INFO] [stdout] help: run `rustup component add --toolchain 1.98.0-beta.8-x86_64-unknown-linux-gnu rustfmt` to install it
[INFO] [stdout] 
[INFO] [stdout] --- unformatted source ---
[INFO] [stdout] #![no_std]
[INFO] [stdout] 
[INFO] [stdout] use soroban_sdk::{Address, Env, Symbol, contract, contractimpl};
[INFO] [stdout] 
[INFO] [stdout] #[contract]
[INFO] [stdout] pub struct Counter;
[INFO] [stdout] 
[INFO] [stdout] #[contractimpl]
[INFO] [stdout] impl Counter {
[INFO] [stdout] pub fn init(env: Env) {
[INFO] [stdout] env.storage().persistent().set(&Symbol::new(&env, "count"), &(0));
[INFO] [stdout] }
[INFO] [stdout] 
[INFO] [stdout] pub fn increment(env: Env, by: Address) -> i64 {
[INFO] [stdout] by.clone().require_auth();
[INFO] [stdout] env.storage().persistent().set(&Symbol::new(&env, "count"), &((env.storage().persistent().get::<Symbol, i64>(&Symbol::new(&env, "count")).unwrap_or(0)).checked_add(1).expect("arithmetic overflow")));
[INFO] [stdout] env.events().publish((Symbol::new(&env, "Incremented"),), (by.clone(), env.storage().persistent().get::<Symbol, i64>(&Symbol::new(&env, "count")).unwrap_or(0)));
[INFO] [stdout] return env.storage().persistent().get::<Symbol, i64>(&Symbol::new(&env, "count")).unwrap_or(0);
[INFO] [stdout] }
[INFO] [stdout] 
[INFO] [stdout] pub fn get(env: Env) -> i64 {
[INFO] [stdout] return env.storage().persistent().get::<Symbol, i64>(&Symbol::new(&env, "count")).unwrap_or(0);
[INFO] [stdout] }
[INFO] [stdout] }
[INFO] [stdout] 
[INFO] [stdout] stack backtrace:
[INFO] [stdout]    0:     0x60385398f491 - <<std[97b98282bc616a66]::sys::backtrace::BacktraceLock>::print::DisplayBacktrace as core[832e9a552fc17241]::fmt::Display>::fmt
[INFO] [stdout]    1:     0x6038539a357a - core[832e9a552fc17241]::fmt::write
[INFO] [stdout]    2:     0x6038539939bc - <alloc[3ecab9f82c41dc7d]::vec::Vec<u8> as std[97b98282bc616a66]::io::Write>::write_fmt
[INFO] [stdout]    3:     0x60385396c886 - std[97b98282bc616a66]::panicking::default_hook::{closure#0}
[INFO] [stdout]    4:     0x603853987149 - std[97b98282bc616a66]::panicking::default_hook
[INFO] [stdout]    5:     0x603853920de0 - test[39766f3d73431624]::test_main_inner::<test[39766f3d73431624]::test_main_static::{closure#0}>::{closure#0}
[INFO] [stdout]    6:     0x603853987302 - std[97b98282bc616a66]::panicking::panic_with_hook
[INFO] [stdout]    7:     0x60385396c932 - std[97b98282bc616a66]::panicking::panic_handler::{closure#0}
[INFO] [stdout]    8:     0x603853963fd9 - std[97b98282bc616a66]::sys::backtrace::__rust_end_short_backtrace::<std[97b98282bc616a66]::panicking::panic_handler::{closure#0}, !>
[INFO] [stdout]    9:     0x60385396d52d - __rustc[e3d8617bb01b7f69]::rust_begin_unwind
[INFO] [stdout]   10:     0x6038539a3cac - core[832e9a552fc17241]::panicking::panic_fmt
[INFO] [stdout]   11:     0x6038538afb05 - canonical_examples[7a207e92bcf17fcc]::generate_source::{closure#0}
[INFO] [stdout]   12:     0x6038538b008b - canonical_examples[7a207e92bcf17fcc]::generate_source
[INFO] [stdout]   13:     0x6038538b0ddb - <canonical_examples[7a207e92bcf17fcc]::counter_matches_golden_file::{closure#0} as core[832e9a552fc17241]::ops::function::FnOnce<()>>::call_once
[INFO] [stdout]   14:     0x60385391411b - test[39766f3d73431624]::__rust_begin_short_backtrace::<core[832e9a552fc17241]::result::Result<(), alloc[3ecab9f82c41dc7d]::string::String>, fn() -> core[832e9a552fc17241]::result::Result<(), alloc[3ecab9f82c41dc7d]::string::String>>
[INFO] [stdout]   15:     0x603853921765 - test[39766f3d73431624]::run_test::{closure#0}
[INFO] [stdout]   16:     0x60385391c214 - std[97b98282bc616a66]::sys::backtrace::__rust_begin_short_backtrace::<test[39766f3d73431624]::run_test::{closure#1}, ()>
[INFO] [stdout]   17:     0x6038539248b2 - <std[97b98282bc616a66]::thread::lifecycle::spawn_unchecked<test[39766f3d73431624]::run_test::{closure#1}, ()>::{closure#1} as core[832e9a552fc17241]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
[INFO] [stdout]   18:     0x60385398e7af - <std[97b98282bc616a66]::sys::thread::unix::Thread>::new::thread_start
[INFO] [stdout]   19:     0x76e2e473307a - <unknown>
[INFO] [stdout]   20:     0x76e2e47c6534 - clone
[INFO] [stdout]   21:                0x0 - <unknown>
[INFO] [stdout] 
[INFO] [stdout] ---- token_matches_golden_file stdout ----
[INFO] [stdout] 
[INFO] [stdout] thread 'token_matches_golden_file' (2112) panicked at compiler/codegen/tests/canonical_examples.rs:32:53:
[INFO] [stdout] token.kyn: codegen failed: rustfmt rejected generated Rust (this is a kyne_codegen bug, not a user error):
[INFO] [stdout] error: 'rustfmt' is not installed for the toolchain '1.98.0-beta.8-x86_64-unknown-linux-gnu'.
[INFO] [stdout] help: run `rustup component add --toolchain 1.98.0-beta.8-x86_64-unknown-linux-gnu rustfmt` to install it
[INFO] [stdout] 
[INFO] [stdout] --- unformatted source ---
[INFO] [stdout] #![no_std]
[INFO] [stdout] 
[INFO] [stdout] use soroban_sdk::{Address, Env, Map, Symbol, contract, contracterror, contractimpl};
[INFO] [stdout] 
[INFO] [stdout] pub const NAME: &str = "Kyne Example Token";
[INFO] [stdout] pub const SYMBOL: &str = "KYN";
[INFO] [stdout] pub const DECIMALS: u32 = 7;
[INFO] [stdout] 
[INFO] [stdout] #[contract]
[INFO] [stdout] pub struct Token;
[INFO] [stdout] 
[INFO] [stdout] #[contracterror]
[INFO] [stdout] #[derive(Copy, Clone, Debug, Eq, PartialEq, PartialOrd, Ord)]
[INFO] [stdout] #[repr(u32)]
[INFO] [stdout] pub enum TokenError {
[INFO] [stdout]     InsufficientBalance = 1,
[INFO] [stdout]     InvalidAmount = 2,
[INFO] [stdout] }
[INFO] [stdout] 
[INFO] [stdout] #[contractimpl]
[INFO] [stdout] impl Token {
[INFO] [stdout] pub fn init(env: Env, admin: Address) {
[INFO] [stdout] admin.clone().require_auth();
[INFO] [stdout] env.storage().persistent().set(&Symbol::new(&env, "total_supply"), &(0));
[INFO] [stdout] }
[INFO] [stdout] 
[INFO] [stdout] pub fn mint(env: Env, admin: Address, to: Address, amount: i128) -> Result<bool, TokenError> {
[INFO] [stdout] if amount <= 0 {
[INFO] [stdout] return Err(TokenError::InvalidAmount);
[INFO] [stdout] }
[INFO] [stdout] admin.clone().require_auth();
[INFO] [stdout] let mut balances = env.storage().persistent().get::<Symbol, Map<Address, i128>>(&Symbol::new(&env, "balances")).unwrap_or(Map::new(&env));
[INFO] [stdout] balances.set(to.clone(), (Self::balance_of(env.clone(), to.clone())).checked_add(amount).expect("arithmetic overflow"));
[INFO] [stdout] env.storage().persistent().set(&Symbol::new(&env, "balances"), &balances);
[INFO] [stdout] env.storage().persistent().set(&Symbol::new(&env, "total_supply"), &((env.storage().persistent().get::<Symbol, i128>(&Symbol::new(&env, "total_supply")).unwrap_or(0)).checked_add(amount).expect("arithmetic overflow")));
[INFO] [stdout] env.events().publish((Symbol::new(&env, "Mint"),), (to.clone(), amount));
[INFO] [stdout] return Ok(true);
[INFO] [stdout] }
[INFO] [stdout] 
[INFO] [stdout] pub fn transfer(env: Env, from: Address, to: Address, amount: i128) -> Result<bool, TokenError> {
[INFO] [stdout] if amount <= 0 {
[INFO] [stdout] return Err(TokenError::InvalidAmount);
[INFO] [stdout] }
[INFO] [stdout] from.clone().require_auth();
[INFO] [stdout] let from_balance = Self::balance_of(env.clone(), from.clone());
[INFO] [stdout] if from_balance.clone() < amount {
[INFO] [stdout] return Err(TokenError::InsufficientBalance);
[INFO] [stdout] }
[INFO] [stdout] let mut balances = env.storage().persistent().get::<Symbol, Map<Address, i128>>(&Symbol::new(&env, "balances")).unwrap_or(Map::new(&env));
[INFO] [stdout] balances.set(from.clone(), (from_balance.clone()).checked_sub(amount).expect("arithmetic overflow"));
[INFO] [stdout] env.storage().persistent().set(&Symbol::new(&env, "balances"), &balances);
[INFO] [stdout] let mut balances = env.storage().persistent().get::<Symbol, Map<Address, i128>>(&Symbol::new(&env, "balances")).unwrap_or(Map::new(&env));
[INFO] [stdout] balances.set(to.clone(), (Self::balance_of(env.clone(), to.clone())).checked_add(amount).expect("arithmetic overflow"));
[INFO] [stdout] env.storage().persistent().set(&Symbol::new(&env, "balances"), &balances);
[INFO] [stdout] env.events().publish((Symbol::new(&env, "Transfer"),), (from.clone(), to.clone(), amount));
[INFO] [stdout] return Ok(true);
[INFO] [stdout] }
[INFO] [stdout] 
[INFO] [stdout] pub fn balance_of(env: Env, account: Address) -> i128 {
[INFO] [stdout] return env.storage().persistent().get::<Symbol, Map<Address, i128>>(&Symbol::new(&env, "balances")).unwrap_or(Map::new(&env)).get(account.clone()).unwrap_or(0);
[INFO] [stdout] }
[INFO] [stdout] }
[INFO] [stdout] 
[INFO] [stdout] stack backtrace:
[INFO] [stdout]    0:     0x60385398f491 - <<std[97b98282bc616a66]::sys::backtrace::BacktraceLock>::print::DisplayBacktrace as core[832e9a552fc17241]::fmt::Display>::fmt
[INFO] [stdout]    1:     0x6038539a357a - core[832e9a552fc17241]::fmt::write
[INFO] [stdout]    2:     0x6038539939bc - <alloc[3ecab9f82c41dc7d]::vec::Vec<u8> as std[97b98282bc616a66]::io::Write>::write_fmt
[INFO] [stdout]    3:     0x60385396c886 - std[97b98282bc616a66]::panicking::default_hook::{closure#0}
[INFO] [stdout]    4:     0x603853987149 - std[97b98282bc616a66]::panicking::default_hook
[INFO] [stdout]    5:     0x603853920de0 - test[39766f3d73431624]::test_main_inner::<test[39766f3d73431624]::test_main_static::{closure#0}>::{closure#0}
[INFO] [stdout]    6:     0x603853987302 - std[97b98282bc616a66]::panicking::panic_with_hook
[INFO] [stdout]    7:     0x60385396c932 - std[97b98282bc616a66]::panicking::panic_handler::{closure#0}
[INFO] [stdout]    8:     0x603853963fd9 - std[97b98282bc616a66]::sys::backtrace::__rust_end_short_backtrace::<std[97b98282bc616a66]::panicking::panic_handler::{closure#0}, !>
[INFO] [stdout]    9:     0x60385396d52d - __rustc[e3d8617bb01b7f69]::rust_begin_unwind
[INFO] [stdout]   10:     0x6038539a3cac - core[832e9a552fc17241]::panicking::panic_fmt
[INFO] [stdout]   11:     0x6038538afb05 - canonical_examples[7a207e92bcf17fcc]::generate_source::{closure#0}
[INFO] [stdout]   12:     0x6038538b008b - canonical_examples[7a207e92bcf17fcc]::generate_source
[INFO] [stdout]   13:     0x6038538b0d3b - <canonical_examples[7a207e92bcf17fcc]::token_matches_golden_file::{closure#0} as core[832e9a552fc17241]::ops::function::FnOnce<()>>::call_once
[INFO] [stdout]   14:     0x60385391411b - test[39766f3d73431624]::__rust_begin_short_backtrace::<core[832e9a552fc17241]::result::Result<(), alloc[3ecab9f82c41dc7d]::string::String>, fn() -> core[832e9a552fc17241]::result::Result<(), alloc[3ecab9f82c41dc7d]::string::String>>
[INFO] [stdout]   15:     0x603853921765 - test[39766f3d73431624]::run_test::{closure#0}
[INFO] [stdout]   16:     0x60385391c214 - std[97b98282bc616a66]::sys::backtrace::__rust_begin_short_backtrace::<test[39766f3d73431624]::run_test::{closure#1}, ()>
[INFO] [stdout]   17:     0x6038539248b2 - <std[97b98282bc616a66]::thread::lifecycle::spawn_unchecked<test[39766f3d73431624]::run_test::{closure#1}, ()>::{closure#1} as core[832e9a552fc17241]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
[INFO] [stdout]   18:     0x60385398e7af - <std[97b98282bc616a66]::sys::thread::unix::Thread>::new::thread_start
[INFO] [stdout]   19:     0x76e2e473307a - <unknown>
[INFO] [stdout]   20:     0x76e2e47c6534 - clone
[INFO] [stdout]   21:                0x0 - <unknown>
[INFO] [stdout] 
[INFO] [stdout] ---- compound_state_assignment_is_a_storage_write stdout ----
[INFO] [stdout] 
[INFO] [stdout] thread 'compound_state_assignment_is_a_storage_write' (2108) panicked at compiler/codegen/tests/canonical_examples.rs:32:53:
[INFO] [stdout] token.kyn: codegen failed: rustfmt rejected generated Rust (this is a kyne_codegen bug, not a user error):
[INFO] [stdout] error: 'rustfmt' is not installed for the toolchain '1.98.0-beta.8-x86_64-unknown-linux-gnu'.
[INFO] [stdout] help: run `rustup component add --toolchain 1.98.0-beta.8-x86_64-unknown-linux-gnu rustfmt` to install it
[INFO] [stdout] 
[INFO] [stdout] --- unformatted source ---
[INFO] [stdout] #![no_std]
[INFO] [stdout] 
[INFO] [stdout] use soroban_sdk::{Address, Env, Map, Symbol, contract, contracterror, contractimpl};
[INFO] [stdout] 
[INFO] [stdout] pub const NAME: &str = "Kyne Example Token";
[INFO] [stdout] pub const SYMBOL: &str = "KYN";
[INFO] [stdout] pub const DECIMALS: u32 = 7;
[INFO] [stdout] 
[INFO] [stdout] #[contract]
[INFO] [stdout] pub struct Token;
[INFO] [stdout] 
[INFO] [stdout] #[contracterror]
[INFO] [stdout] #[derive(Copy, Clone, Debug, Eq, PartialEq, PartialOrd, Ord)]
[INFO] [stdout] #[repr(u32)]
[INFO] [stdout] pub enum TokenError {
[INFO] [stdout]     InsufficientBalance = 1,
[INFO] [stdout]     InvalidAmount = 2,
[INFO] [stdout] }
[INFO] [stdout] 
[INFO] [stdout] #[contractimpl]
[INFO] [stdout] impl Token {
[INFO] [stdout] pub fn init(env: Env, admin: Address) {
[INFO] [stdout] admin.clone().require_auth();
[INFO] [stdout] env.storage().persistent().set(&Symbol::new(&env, "total_supply"), &(0));
[INFO] [stdout] }
[INFO] [stdout] 
[INFO] [stdout] pub fn mint(env: Env, admin: Address, to: Address, amount: i128) -> Result<bool, TokenError> {
[INFO] [stdout] if amount <= 0 {
[INFO] [stdout] return Err(TokenError::InvalidAmount);
[INFO] [stdout] }
[INFO] [stdout] admin.clone().require_auth();
[INFO] [stdout] let mut balances = env.storage().persistent().get::<Symbol, Map<Address, i128>>(&Symbol::new(&env, "balances")).unwrap_or(Map::new(&env));
[INFO] [stdout] balances.set(to.clone(), (Self::balance_of(env.clone(), to.clone())).checked_add(amount).expect("arithmetic overflow"));
[INFO] [stdout] env.storage().persistent().set(&Symbol::new(&env, "balances"), &balances);
[INFO] [stdout] env.storage().persistent().set(&Symbol::new(&env, "total_supply"), &((env.storage().persistent().get::<Symbol, i128>(&Symbol::new(&env, "total_supply")).unwrap_or(0)).checked_add(amount).expect("arithmetic overflow")));
[INFO] [stdout] env.events().publish((Symbol::new(&env, "Mint"),), (to.clone(), amount));
[INFO] [stdout] return Ok(true);
[INFO] [stdout] }
[INFO] [stdout] 
[INFO] [stdout] pub fn transfer(env: Env, from: Address, to: Address, amount: i128) -> Result<bool, TokenError> {
[INFO] [stdout] if amount <= 0 {
[INFO] [stdout] return Err(TokenError::InvalidAmount);
[INFO] [stdout] }
[INFO] [stdout] from.clone().require_auth();
[INFO] [stdout] let from_balance = Self::balance_of(env.clone(), from.clone());
[INFO] [stdout] if from_balance.clone() < amount {
[INFO] [stdout] return Err(TokenError::InsufficientBalance);
[INFO] [stdout] }
[INFO] [stdout] let mut balances = env.storage().persistent().get::<Symbol, Map<Address, i128>>(&Symbol::new(&env, "balances")).unwrap_or(Map::new(&env));
[INFO] [stdout] balances.set(from.clone(), (from_balance.clone()).checked_sub(amount).expect("arithmetic overflow"));
[INFO] [stdout] env.storage().persistent().set(&Symbol::new(&env, "balances"), &balances);
[INFO] [stdout] let mut balances = env.storage().persistent().get::<Symbol, Map<Address, i128>>(&Symbol::new(&env, "balances")).unwrap_or(Map::new(&env));
[INFO] [stdout] balances.set(to.clone(), (Self::balance_of(env.clone(), to.clone())).checked_add(amount).expect("arithmetic overflow"));
[INFO] [stdout] env.storage().persistent().set(&Symbol::new(&env, "balances"), &balances);
[INFO] [stdout] env.events().publish((Symbol::new(&env, "Transfer"),), (from.clone(), to.clone(), amount));
[INFO] [stdout] return Ok(true);
[INFO] [stdout] }
[INFO] [stdout] 
[INFO] [stdout] pub fn balance_of(env: Env, account: Address) -> i128 {
[INFO] [stdout] return env.storage().persistent().get::<Symbol, Map<Address, i128>>(&Symbol::new(&env, "balances")).unwrap_or(Map::new(&env)).get(account.clone()).unwrap_or(0);
[INFO] [stdout] }
[INFO] [stdout] }
[INFO] [stdout] 
[INFO] [stdout] stack backtrace:
[INFO] [stdout]    0:     0x60385398f491 - <<std[97b98282bc616a66]::sys::backtrace::BacktraceLock>::print::DisplayBacktrace as core[832e9a552fc17241]::fmt::Display>::fmt
[INFO] [stdout]    1:     0x6038539a357a - core[832e9a552fc17241]::fmt::write
[INFO] [stdout]    2:     0x6038539939bc - <alloc[3ecab9f82c41dc7d]::vec::Vec<u8> as std[97b98282bc616a66]::io::Write>::write_fmt
[INFO] [stdout]    3:     0x60385396c886 - std[97b98282bc616a66]::panicking::default_hook::{closure#0}
[INFO] [stdout]    4:     0x603853987149 - std[97b98282bc616a66]::panicking::default_hook
[INFO] [stdout]    5:     0x603853920de0 - test[39766f3d73431624]::test_main_inner::<test[39766f3d73431624]::test_main_static::{closure#0}>::{closure#0}
[INFO] [stdout]    6:     0x603853987302 - std[97b98282bc616a66]::panicking::panic_with_hook
[INFO] [stdout]    7:     0x60385396c932 - std[97b98282bc616a66]::panicking::panic_handler::{closure#0}
[INFO] [stdout]    8:     0x603853963fd9 - std[97b98282bc616a66]::sys::backtrace::__rust_end_short_backtrace::<std[97b98282bc616a66]::panicking::panic_handler::{closure#0}, !>
[INFO] [stdout]    9:     0x60385396d52d - __rustc[e3d8617bb01b7f69]::rust_begin_unwind
[INFO] [stdout]   10:     0x6038539a3cac - core[832e9a552fc17241]::panicking::panic_fmt
[INFO] [stdout]   11:     0x6038538afb05 - canonical_examples[7a207e92bcf17fcc]::generate_source::{closure#0}
[INFO] [stdout]   12:     0x6038538b008b - canonical_examples[7a207e92bcf17fcc]::generate_source
[INFO] [stdout]   13:     0x6038538b116f - <canonical_examples[7a207e92bcf17fcc]::compound_state_assignment_is_a_storage_write::{closure#0} as core[832e9a552fc17241]::ops::function::FnOnce<()>>::call_once
[INFO] [stdout]   14:     0x60385391411b - test[39766f3d73431624]::__rust_begin_short_backtrace::<core[832e9a552fc17241]::result::Result<(), alloc[3ecab9f82c41dc7d]::string::String>, fn() -> core[832e9a552fc17241]::result::Result<(), alloc[3ecab9f82c41dc7d]::string::String>>
[INFO] [stdout]   15:     0x603853921765 - test[39766f3d73431624]::run_test::{closure#0}
[INFO] [stdout]   16:     0x60385391c214 - std[97b98282bc616a66]::sys::backtrace::__rust_begin_short_backtrace::<test[39766f3d73431624]::run_test::{closure#1}, ()>
[INFO] [stdout]   17:     0x6038539248b2 - <std[97b98282bc616a66]::thread::lifecycle::spawn_unchecked<test[39766f3d73431624]::run_test::{closure#1}, ()>::{closure#1} as core[832e9a552fc17241]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
[INFO] [stdout]   18:     0x60385398e7af - <std[97b98282bc616a66]::sys::thread::unix::Thread>::new::thread_start
[INFO] [stdout]   19:     0x76e2e473307a - <unknown>
[INFO] [stdout]   20:     0x76e2e47c6534 - clone
[INFO] [stdout]   21:                0x0 - <unknown>
[INFO] [stdout] 
[INFO] [stdout] ---- applies_soroban_attribute_macros stdout ----
[INFO] [stdout] 
[INFO] [stdout] thread 'applies_soroban_attribute_macros' (2106) panicked at compiler/codegen/tests/canonical_examples.rs:32:53:
[INFO] [stdout] token.kyn: codegen failed: rustfmt rejected generated Rust (this is a kyne_codegen bug, not a user error):
[INFO] [stdout] error: 'rustfmt' is not installed for the toolchain '1.98.0-beta.8-x86_64-unknown-linux-gnu'.
[INFO] [stdout] help: run `rustup component add --toolchain 1.98.0-beta.8-x86_64-unknown-linux-gnu rustfmt` to install it
[INFO] [stdout] 
[INFO] [stdout] --- unformatted source ---
[INFO] [stdout] #![no_std]
[INFO] [stdout] 
[INFO] [stdout] use soroban_sdk::{Address, Env, Map, Symbol, contract, contracterror, contractimpl};
[INFO] [stdout] 
[INFO] [stdout] pub const NAME: &str = "Kyne Example Token";
[INFO] [stdout] pub const SYMBOL: &str = "KYN";
[INFO] [stdout] pub const DECIMALS: u32 = 7;
[INFO] [stdout] 
[INFO] [stdout] #[contract]
[INFO] [stdout] pub struct Token;
[INFO] [stdout] 
[INFO] [stdout] #[contracterror]
[INFO] [stdout] #[derive(Copy, Clone, Debug, Eq, PartialEq, PartialOrd, Ord)]
[INFO] [stdout] #[repr(u32)]
[INFO] [stdout] pub enum TokenError {
[INFO] [stdout]     InsufficientBalance = 1,
[INFO] [stdout]     InvalidAmount = 2,
[INFO] [stdout] }
[INFO] [stdout] 
[INFO] [stdout] #[contractimpl]
[INFO] [stdout] impl Token {
[INFO] [stdout] pub fn init(env: Env, admin: Address) {
[INFO] [stdout] admin.clone().require_auth();
[INFO] [stdout] env.storage().persistent().set(&Symbol::new(&env, "total_supply"), &(0));
[INFO] [stdout] }
[INFO] [stdout] 
[INFO] [stdout] pub fn mint(env: Env, admin: Address, to: Address, amount: i128) -> Result<bool, TokenError> {
[INFO] [stdout] if amount <= 0 {
[INFO] [stdout] return Err(TokenError::InvalidAmount);
[INFO] [stdout] }
[INFO] [stdout] admin.clone().require_auth();
[INFO] [stdout] let mut balances = env.storage().persistent().get::<Symbol, Map<Address, i128>>(&Symbol::new(&env, "balances")).unwrap_or(Map::new(&env));
[INFO] [stdout] balances.set(to.clone(), (Self::balance_of(env.clone(), to.clone())).checked_add(amount).expect("arithmetic overflow"));
[INFO] [stdout] env.storage().persistent().set(&Symbol::new(&env, "balances"), &balances);
[INFO] [stdout] env.storage().persistent().set(&Symbol::new(&env, "total_supply"), &((env.storage().persistent().get::<Symbol, i128>(&Symbol::new(&env, "total_supply")).unwrap_or(0)).checked_add(amount).expect("arithmetic overflow")));
[INFO] [stdout] env.events().publish((Symbol::new(&env, "Mint"),), (to.clone(), amount));
[INFO] [stdout] return Ok(true);
[INFO] [stdout] }
[INFO] [stdout] 
[INFO] [stdout] pub fn transfer(env: Env, from: Address, to: Address, amount: i128) -> Result<bool, TokenError> {
[INFO] [stdout] if amount <= 0 {
[INFO] [stdout] return Err(TokenError::InvalidAmount);
[INFO] [stdout] }
[INFO] [stdout] from.clone().require_auth();
[INFO] [stdout] let from_balance = Self::balance_of(env.clone(), from.clone());
[INFO] [stdout] if from_balance.clone() < amount {
[INFO] [stdout] return Err(TokenError::InsufficientBalance);
[INFO] [stdout] }
[INFO] [stdout] let mut balances = env.storage().persistent().get::<Symbol, Map<Address, i128>>(&Symbol::new(&env, "balances")).unwrap_or(Map::new(&env));
[INFO] [stdout] balances.set(from.clone(), (from_balance.clone()).checked_sub(amount).expect("arithmetic overflow"));
[INFO] [stdout] env.storage().persistent().set(&Symbol::new(&env, "balances"), &balances);
[INFO] [stdout] let mut balances = env.storage().persistent().get::<Symbol, Map<Address, i128>>(&Symbol::new(&env, "balances")).unwrap_or(Map::new(&env));
[INFO] [stdout] balances.set(to.clone(), (Self::balance_of(env.clone(), to.clone())).checked_add(amount).expect("arithmetic overflow"));
[INFO] [stdout] env.storage().persistent().set(&Symbol::new(&env, "balances"), &balances);
[INFO] [stdout] env.events().publish((Symbol::new(&env, "Transfer"),), (from.clone(), to.clone(), amount));
[INFO] [stdout] return Ok(true);
[INFO] [stdout] }
[INFO] [stdout] 
[INFO] [stdout] pub fn balance_of(env: Env, account: Address) -> i128 {
[INFO] [stdout] return env.storage().persistent().get::<Symbol, Map<Address, i128>>(&Symbol::new(&env, "balances")).unwrap_or(Map::new(&env)).get(account.clone()).unwrap_or(0);
[INFO] [stdout] }
[INFO] [stdout] }
[INFO] [stdout] 
[INFO] [stdout] stack backtrace:
[INFO] [stdout]    0:     0x60385398f491 - <<std[97b98282bc616a66]::sys::backtrace::BacktraceLock>::print::DisplayBacktrace as core[832e9a552fc17241]::fmt::Display>::fmt
[INFO] [stdout]    1:     0x6038539a357a - core[832e9a552fc17241]::fmt::write
[INFO] [stdout]    2:     0x6038539939bc - <alloc[3ecab9f82c41dc7d]::vec::Vec<u8> as std[97b98282bc616a66]::io::Write>::write_fmt
[INFO] [stdout]    3:     0x60385396c886 - std[97b98282bc616a66]::panicking::default_hook::{closure#0}
[INFO] [stdout]    4:     0x603853987149 - std[97b98282bc616a66]::panicking::default_hook
[INFO] [stdout]    5:     0x603853920de0 - test[39766f3d73431624]::test_main_inner::<test[39766f3d73431624]::test_main_static::{closure#0}>::{closure#0}
[INFO] [stdout]    6:     0x603853987302 - std[97b98282bc616a66]::panicking::panic_with_hook
[INFO] [stdout]    7:     0x60385396c932 - std[97b98282bc616a66]::panicking::panic_handler::{closure#0}
[INFO] [stdout]    8:     0x603853963fd9 - std[97b98282bc616a66]::sys::backtrace::__rust_end_short_backtrace::<std[97b98282bc616a66]::panicking::panic_handler::{closure#0}, !>
[INFO] [stdout]    9:     0x60385396d52d - __rustc[e3d8617bb01b7f69]::rust_begin_unwind
[INFO] [stdout]   10:     0x6038539a3cac - core[832e9a552fc17241]::panicking::panic_fmt
[INFO] [stdout]   11:     0x6038538afb05 - canonical_examples[7a207e92bcf17fcc]::generate_source::{closure#0}
[INFO] [stdout]   12:     0x6038538b008b - canonical_examples[7a207e92bcf17fcc]::generate_source
[INFO] [stdout]   13:     0x6038538b104f - <canonical_examples[7a207e92bcf17fcc]::applies_soroban_attribute_macros::{closure#0} as core[832e9a552fc17241]::ops::function::FnOnce<()>>::call_once
[INFO] [stdout]   14:     0x60385391411b - test[39766f3d73431624]::__rust_begin_short_backtrace::<core[832e9a552fc17241]::result::Result<(), alloc[3ecab9f82c41dc7d]::string::String>, fn() -> core[832e9a552fc17241]::result::Result<(), alloc[3ecab9f82c41dc7d]::string::String>>
[INFO] [stdout]   15:     0x603853921765 - test[39766f3d73431624]::run_test::{closure#0}
[INFO] [stdout]   16:     0x60385391c214 - std[97b98282bc616a66]::sys::backtrace::__rust_begin_short_backtrace::<test[39766f3d73431624]::run_test::{closure#1}, ()>
[INFO] [stdout]   17:     0x6038539248b2 - <std[97b98282bc616a66]::thread::lifecycle::spawn_unchecked<test[39766f3d73431624]::run_test::{closure#1}, ()>::{closure#1} as core[832e9a552fc17241]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
[INFO] [stdout]   18:     0x60385398e7af - <std[97b98282bc616a66]::sys::thread::unix::Thread>::new::thread_start
[INFO] [stdout]   19:     0x76e2e473307a - <unknown>
[INFO] [stdout]   20:     0x76e2e47c6534 - clone
[INFO] [stdout]   21:                0x0 - <unknown>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] failures:
[INFO] [stdout]     applies_soroban_attribute_macros
[INFO] [stdout]     arithmetic_is_checked_not_bare
[INFO] [stdout]     compound_state_assignment_is_a_storage_write
[INFO] [stdout]     counter_matches_golden_file
[INFO] [stdout]     generation_is_deterministic
[INFO] [stdout]     non_copy_parameter_reused_more_than_once_is_cloned
[INFO] [stdout]     token_matches_golden_file
[INFO] [stdout] 
[INFO] [stdout] test result: FAILED. 0 passed; 7 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.37s
[INFO] [stdout] 
[INFO] running `Command { std: "docker" "inspect" "14d7a06cc4d270d6f13d70b37e2952b2f515f1589adb46b316e55ab92f56a891", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "rm" "-f" "14d7a06cc4d270d6f13d70b37e2952b2f515f1589adb46b316e55ab92f56a891", kill_on_drop: false }`
[INFO] [stdout] 14d7a06cc4d270d6f13d70b37e2952b2f515f1589adb46b316e55ab92f56a891
