diff --git a/.ci_logs/0_WASM compile check.txt b/.ci_logs/0_WASM compile check.txt new file mode 100644 index 0000000..321750f --- /dev/null +++ b/.ci_logs/0_WASM compile check.txt @@ -0,0 +1,497 @@ +2026-06-21T01:26:23.6791471Z Current runner version: '2.335.1' +2026-06-21T01:26:23.6813122Z ##[group]Runner Image Provisioner +2026-06-21T01:26:23.6813901Z Hosted Compute Agent +2026-06-21T01:26:23.6814464Z Version: 20260611.554 +2026-06-21T01:26:23.6815041Z Commit: 5e0782fdc9014723d3be820dd114dd31555c2bd1 +2026-06-21T01:26:23.6815691Z Build Date: 2026-06-11T21:40:46Z +2026-06-21T01:26:23.6816492Z Worker ID: {86e8e81c-0ff0-47b4-929e-9710d480b6b9} +2026-06-21T01:26:23.6817173Z Azure Region: westcentralus +2026-06-21T01:26:23.6817712Z ##[endgroup] +2026-06-21T01:26:23.6819031Z ##[group]Operating System +2026-06-21T01:26:23.6819581Z Ubuntu +2026-06-21T01:26:23.6820084Z 24.04.4 +2026-06-21T01:26:23.6820551Z LTS +2026-06-21T01:26:23.6821003Z ##[endgroup] +2026-06-21T01:26:23.6821500Z ##[group]Runner Image +2026-06-21T01:26:23.6822031Z Image: ubuntu-24.04 +2026-06-21T01:26:23.6822586Z Version: 20260615.205.1 +2026-06-21T01:26:23.6823664Z Included Software: https://github.com/actions/runner-images/blob/ubuntu24/20260615.205/images/ubuntu/Ubuntu2404-Readme.md +2026-06-21T01:26:23.6825024Z Image Release: https://github.com/actions/runner-images/releases/tag/ubuntu24%2F20260615.205 +2026-06-21T01:26:23.6825865Z ##[endgroup] +2026-06-21T01:26:23.6827125Z ##[group]GITHUB_TOKEN Permissions +2026-06-21T01:26:23.6828895Z Contents: read +2026-06-21T01:26:23.6829401Z Metadata: read +2026-06-21T01:26:23.6829983Z ##[endgroup] +2026-06-21T01:26:23.6831844Z Secret source: Actions +2026-06-21T01:26:23.6832536Z Prepare workflow directory +2026-06-21T01:26:23.7192004Z Prepare all required actions +2026-06-21T01:26:23.7228575Z Getting action download info +2026-06-21T01:26:24.0187403Z Download action repository 'actions/checkout@v4' (SHA:34e114876b0b11c390a56381ad16ebd13914f8d5) +2026-06-21T01:26:24.0788989Z Download action repository 'dtolnay/rust-toolchain@stable' (SHA:29eef336d9b2848a0b548edc03f92a220660cdb8) +2026-06-21T01:26:24.2733671Z Download action repository 'Swatinem/rust-cache@v2' (SHA:e18b497796c12c097a38f9edb9d0641fb99eee32) +2026-06-21T01:26:25.2527477Z Complete job name: WASM compile check +2026-06-21T01:26:25.3312045Z Node 20 is being deprecated. This workflow is running with Node 24 by default. If you need to temporarily use Node 20, you can set the ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true environment variable. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/ +2026-06-21T01:26:25.3321885Z ##[group]Run actions/checkout@v4 +2026-06-21T01:26:25.3322636Z with: +2026-06-21T01:26:25.3323192Z repository: OrbitChainLabs/OrbitChain-Contracts +2026-06-21T01:26:25.3328203Z token: *** +2026-06-21T01:26:25.3328691Z ssh-strict: true +2026-06-21T01:26:25.3329177Z ssh-user: git +2026-06-21T01:26:25.3329686Z persist-credentials: true +2026-06-21T01:26:25.3330236Z clean: true +2026-06-21T01:26:25.3330737Z sparse-checkout-cone-mode: true +2026-06-21T01:26:25.3331299Z fetch-depth: 1 +2026-06-21T01:26:25.3331789Z fetch-tags: false +2026-06-21T01:26:25.3332283Z show-progress: true +2026-06-21T01:26:25.3332778Z lfs: false +2026-06-21T01:26:25.3333311Z submodules: false +2026-06-21T01:26:25.3333814Z set-safe-directory: true +2026-06-21T01:26:25.3334607Z env: +2026-06-21T01:26:25.3335062Z CARGO_TERM_COLOR: always +2026-06-21T01:26:25.3335592Z RUST_BACKTRACE: short +2026-06-21T01:26:25.3336716Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:25.3337706Z ##[endgroup] +2026-06-21T01:26:25.4249765Z Syncing repository: OrbitChainLabs/OrbitChain-Contracts +2026-06-21T01:26:25.4251871Z ##[group]Getting Git version info +2026-06-21T01:26:25.4252821Z Working directory is '/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts' +2026-06-21T01:26:25.4254219Z [command]/usr/bin/git version +2026-06-21T01:26:25.4296002Z git version 2.54.0 +2026-06-21T01:26:25.4313001Z ##[endgroup] +2026-06-21T01:26:25.4325410Z Temporarily overriding HOME='/home/runner/work/_temp/51556e1d-f0b4-4bb5-b4a6-86f084ae7955' before making global git config changes +2026-06-21T01:26:25.4327064Z Adding repository directory to the temporary git global config as a safe directory +2026-06-21T01:26:25.4330947Z [command]/usr/bin/git config --global --add safe.directory /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts +2026-06-21T01:26:25.4368883Z Deleting the contents of '/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts' +2026-06-21T01:26:25.4371852Z ##[group]Initializing the repository +2026-06-21T01:26:25.4376457Z [command]/usr/bin/git init /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts +2026-06-21T01:26:25.4438262Z hint: Using 'master' as the name for the initial branch. This default branch name +2026-06-21T01:26:25.4440004Z hint: will change to "main" in Git 3.0. To configure the initial branch name +2026-06-21T01:26:25.4442102Z hint: to use in all of your new repositories, which will suppress this warning, +2026-06-21T01:26:25.4443636Z hint: call: +2026-06-21T01:26:25.4444556Z hint: +2026-06-21T01:26:25.4445605Z hint: git config --global init.defaultBranch +2026-06-21T01:26:25.4447116Z hint: +2026-06-21T01:26:25.4448347Z hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and +2026-06-21T01:26:25.4450215Z hint: 'development'. The just-created branch can be renamed via this command: +2026-06-21T01:26:25.4451782Z hint: +2026-06-21T01:26:25.4452631Z hint: git branch -m +2026-06-21T01:26:25.4453583Z hint: +2026-06-21T01:26:25.4454856Z hint: Disable this message with "git config set advice.defaultBranchName false" +2026-06-21T01:26:25.4457243Z Initialized empty Git repository in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/.git/ +2026-06-21T01:26:25.4459319Z [command]/usr/bin/git remote add origin https://github.com/OrbitChainLabs/OrbitChain-Contracts +2026-06-21T01:26:25.4483855Z ##[endgroup] +2026-06-21T01:26:25.4485460Z ##[group]Disabling automatic garbage collection +2026-06-21T01:26:25.4487417Z [command]/usr/bin/git config --local gc.auto 0 +2026-06-21T01:26:25.4512012Z ##[endgroup] +2026-06-21T01:26:25.4513976Z ##[group]Setting up auth +2026-06-21T01:26:25.4518281Z [command]/usr/bin/git config --local --name-only --get-regexp core\.sshCommand +2026-06-21T01:26:25.4545091Z [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || :" +2026-06-21T01:26:25.4798404Z [command]/usr/bin/git config --local --name-only --get-regexp http\.https\:\/\/github\.com\/\.extraheader +2026-06-21T01:26:25.4820743Z [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http\.https\:\/\/github\.com\/\.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :" +2026-06-21T01:26:25.4981147Z [command]/usr/bin/git config --local --name-only --get-regexp ^includeIf\.gitdir: +2026-06-21T01:26:25.5003738Z [command]/usr/bin/git submodule foreach --recursive git config --local --show-origin --name-only --get-regexp remote.origin.url +2026-06-21T01:26:25.5163011Z [command]/usr/bin/git config --local http.https://github.com/.extraheader AUTHORIZATION: basic *** +2026-06-21T01:26:25.5187316Z ##[endgroup] +2026-06-21T01:26:25.5188437Z ##[group]Fetching the repository +2026-06-21T01:26:25.5195419Z [command]/usr/bin/git -c protocol.version=2 fetch --no-tags --prune --no-recurse-submodules --depth=1 origin +1be331ea57707748b39835c9fac837ddeb283d53:refs/remotes/pull/60/merge +2026-06-21T01:26:26.0126883Z From https://github.com/OrbitChainLabs/OrbitChain-Contracts +2026-06-21T01:26:26.0130466Z * [new ref] 1be331ea57707748b39835c9fac837ddeb283d53 -> pull/60/merge +2026-06-21T01:26:26.0158772Z ##[endgroup] +2026-06-21T01:26:26.0160241Z ##[group]Determining the checkout info +2026-06-21T01:26:26.0161828Z ##[endgroup] +2026-06-21T01:26:26.0166503Z [command]/usr/bin/git sparse-checkout disable +2026-06-21T01:26:26.0201939Z [command]/usr/bin/git config --local --unset-all extensions.worktreeConfig +2026-06-21T01:26:26.0228763Z ##[group]Checking out the ref +2026-06-21T01:26:26.0232366Z [command]/usr/bin/git checkout --progress --force refs/remotes/pull/60/merge +2026-06-21T01:26:26.0333088Z Note: switching to 'refs/remotes/pull/60/merge'. +2026-06-21T01:26:26.0333522Z +2026-06-21T01:26:26.0333879Z You are in 'detached HEAD' state. You can look around, make experimental +2026-06-21T01:26:26.0334708Z changes and commit them, and you can discard any commits you make in this +2026-06-21T01:26:26.0335529Z state without impacting any branches by switching back to a branch. +2026-06-21T01:26:26.0336004Z +2026-06-21T01:26:26.0336417Z If you want to create a new branch to retain commits you create, you may +2026-06-21T01:26:26.0337174Z do so (now or later) by using -c with the switch command. Example: +2026-06-21T01:26:26.0337611Z +2026-06-21T01:26:26.0337820Z git switch -c +2026-06-21T01:26:26.0338121Z +2026-06-21T01:26:26.0338317Z Or undo this operation with: +2026-06-21T01:26:26.0338596Z +2026-06-21T01:26:26.0338772Z git switch - +2026-06-21T01:26:26.0339017Z +2026-06-21T01:26:26.0339768Z Turn off this advice by setting config variable advice.detachedHead to false +2026-06-21T01:26:26.0340404Z +2026-06-21T01:26:26.0341273Z HEAD is now at 1be331e Merge 4b973bcdef5a40b4714ec76b0c3c3d5e9b026c2d into dc3d5e2b821bb2a0f2655582265c562926415b02 +2026-06-21T01:26:26.0343630Z ##[endgroup] +2026-06-21T01:26:26.0367535Z [command]/usr/bin/git log -1 --format=%H +2026-06-21T01:26:26.0385759Z 1be331ea57707748b39835c9fac837ddeb283d53 +2026-06-21T01:26:26.0700973Z ##[warning]Unexpected input(s) 'cache', valid inputs are ['toolchain', 'targets', 'target', 'components'] +2026-06-21T01:26:26.0715793Z ##[group]Run dtolnay/rust-toolchain@stable +2026-06-21T01:26:26.0716461Z with: +2026-06-21T01:26:26.0716830Z targets: wasm32v1-none +2026-06-21T01:26:26.0717246Z cache: false +2026-06-21T01:26:26.0717618Z toolchain: stable +2026-06-21T01:26:26.0717997Z env: +2026-06-21T01:26:26.0718349Z CARGO_TERM_COLOR: always +2026-06-21T01:26:26.0718775Z RUST_BACKTRACE: short +2026-06-21T01:26:26.0719537Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:26.0720373Z ##[endgroup] +2026-06-21T01:26:26.0844640Z ##[group]Run : parse toolchain version +2026-06-21T01:26:26.0845270Z : parse toolchain version +2026-06-21T01:26:26.0845779Z if [[ -z $toolchain ]]; then +2026-06-21T01:26:26.0846933Z  # GitHub does not enforce `required: true` inputs itself. https://github.com/actions/runner/issues/1070 +2026-06-21T01:26:26.0847840Z  echo "'toolchain' is a required input" >&2 +2026-06-21T01:26:26.0848369Z  exit 1 +2026-06-21T01:26:26.0848955Z elif [[ $toolchain =~ ^stable' '[0-9]+' '(year|month|week|day)s?' 'ago$ ]]; then +2026-06-21T01:26:26.0849676Z  if [[ Linux == macOS ]]; then +2026-06-21T01:26:26.0850560Z  echo "toolchain=1.$((($(date -v-$(sed 's/stable \([0-9]*\) \(.\).*/\1\2/' <<< $toolchain) +%s)/60/60/24-16569)/7/6))" >> $GITHUB_OUTPUT +2026-06-21T01:26:26.0851434Z  else +2026-06-21T01:26:26.0852132Z  echo "toolchain=1.$((($(date --date "${toolchain#stable }" +%s)/60/60/24-16569)/7/6))" >> $GITHUB_OUTPUT +2026-06-21T01:26:26.0852937Z  fi +2026-06-21T01:26:26.0853474Z elif [[ $toolchain =~ ^stable' 'minus' '[0-9]+' 'releases?$ ]]; then +2026-06-21T01:26:26.0854388Z  echo "toolchain=1.$((($(date +%s)/60/60/24-16569)/7/6-${toolchain//[^0-9]/}))" >> $GITHUB_OUTPUT +2026-06-21T01:26:26.0855192Z elif [[ $toolchain =~ ^1\.[0-9]+$ ]]; then +2026-06-21T01:26:26.0856171Z  echo "toolchain=1.$((i=${toolchain#1.}, c=($(date +%s)/60/60/24-16569)/7/6, i+9*i*(10*i<=c)+90*i*(100*i<=c)))" >> $GITHUB_OUTPUT +2026-06-21T01:26:26.0857034Z else +2026-06-21T01:26:26.0857488Z  echo "toolchain=$toolchain" >> $GITHUB_OUTPUT +2026-06-21T01:26:26.0858038Z fi +2026-06-21T01:26:26.0979212Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:26.0979833Z env: +2026-06-21T01:26:26.0980205Z CARGO_TERM_COLOR: always +2026-06-21T01:26:26.0980818Z RUST_BACKTRACE: short +2026-06-21T01:26:26.0981600Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:26.0982438Z toolchain: stable +2026-06-21T01:26:26.0982832Z ##[endgroup] +2026-06-21T01:26:26.1128283Z ##[group]Run : construct rustup command line +2026-06-21T01:26:26.1128897Z : construct rustup command line +2026-06-21T01:26:26.1129681Z echo "targets=$(for t in ${targets//,/ }; do echo -n ' --target' $t; done)" >> $GITHUB_OUTPUT +2026-06-21T01:26:26.1130737Z echo "components=$(for c in ${components//,/ }; do echo -n ' --component' $c; done)" >> $GITHUB_OUTPUT +2026-06-21T01:26:26.1131582Z echo "downgrade=" >> $GITHUB_OUTPUT +2026-06-21T01:26:26.1148641Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:26.1149228Z env: +2026-06-21T01:26:26.1149596Z CARGO_TERM_COLOR: always +2026-06-21T01:26:26.1150035Z RUST_BACKTRACE: short +2026-06-21T01:26:26.1150814Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:26.1151650Z targets: wasm32v1-none +2026-06-21T01:26:26.1152060Z components: +2026-06-21T01:26:26.1152519Z ##[endgroup] +2026-06-21T01:26:26.1226743Z ##[group]Run : set $CARGO_HOME +2026-06-21T01:26:26.1227247Z : set $CARGO_HOME +2026-06-21T01:26:26.1227957Z echo CARGO_HOME=${CARGO_HOME:-"$HOME/.cargo"} >> $GITHUB_ENV +2026-06-21T01:26:26.1243958Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:26.1244528Z env: +2026-06-21T01:26:26.1244889Z CARGO_TERM_COLOR: always +2026-06-21T01:26:26.1245320Z RUST_BACKTRACE: short +2026-06-21T01:26:26.1246282Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:26.1247121Z ##[endgroup] +2026-06-21T01:26:26.1319462Z ##[group]Run : install rustup if needed +2026-06-21T01:26:26.1320000Z : install rustup if needed +2026-06-21T01:26:26.1320540Z if ! command -v rustup &>/dev/null; then +2026-06-21T01:26:26.1321744Z  curl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused --location --silent --show-error --fail https://sh.rustup.rs | sh -s -- --default-toolchain none -y +2026-06-21T01:26:26.1322930Z  echo "$CARGO_HOME/bin" >> $GITHUB_PATH +2026-06-21T01:26:26.1323441Z fi +2026-06-21T01:26:26.1339167Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:26.1339738Z env: +2026-06-21T01:26:26.1340096Z CARGO_TERM_COLOR: always +2026-06-21T01:26:26.1340525Z RUST_BACKTRACE: short +2026-06-21T01:26:26.1341286Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:26.1342126Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:26:26.1342577Z ##[endgroup] +2026-06-21T01:26:26.1416292Z ##[group]Run rustup toolchain install stable --target wasm32v1-none --profile minimal --no-self-update +2026-06-21T01:26:26.1417467Z rustup toolchain install stable --target wasm32v1-none --profile minimal --no-self-update +2026-06-21T01:26:26.1433527Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:26.1434090Z env: +2026-06-21T01:26:26.1434448Z CARGO_TERM_COLOR: always +2026-06-21T01:26:26.1434877Z RUST_BACKTRACE: short +2026-06-21T01:26:26.1435694Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:26.1436684Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:26:26.1437163Z RUSTUP_PERMIT_COPY_RENAME: 1 +2026-06-21T01:26:26.1437608Z ##[endgroup] +2026-06-21T01:26:26.3030997Z info: syncing channel updates for stable-x86_64-unknown-linux-gnu +2026-06-21T01:26:26.6141033Z info: latest update on 2026-05-28 for version 1.96.0 (ac68faa20 2026-05-25) +2026-06-21T01:26:26.6287612Z info: downloading component rust-std +2026-06-21T01:26:27.8672939Z +2026-06-21T01:26:27.8745144Z stable-x86_64-unknown-linux-gnu updated - rustc 1.96.0 (ac68faa20 2026-05-25) (from rustc 1.96.0 (ac68faa20 2026-05-25)) +2026-06-21T01:26:27.8746356Z +2026-06-21T01:26:27.8806699Z ##[group]Run rustup default stable +2026-06-21T01:26:27.8807063Z rustup default stable +2026-06-21T01:26:27.8828662Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:27.8829045Z env: +2026-06-21T01:26:27.8829287Z CARGO_TERM_COLOR: always +2026-06-21T01:26:27.8829577Z RUST_BACKTRACE: short +2026-06-21T01:26:27.8830081Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:27.8830611Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:26:27.8830894Z ##[endgroup] +2026-06-21T01:26:27.8916328Z info: using existing install for stable-x86_64-unknown-linux-gnu +2026-06-21T01:26:27.8921428Z info: default toolchain set to stable-x86_64-unknown-linux-gnu +2026-06-21T01:26:27.8921739Z +2026-06-21T01:26:27.8989031Z stable-x86_64-unknown-linux-gnu unchanged - rustc 1.96.0 (ac68faa20 2026-05-25) +2026-06-21T01:26:27.8989569Z +2026-06-21T01:26:27.8991535Z info: note that the toolchain 'stable-x86_64-unknown-linux-gnu' is currently in use (overridden by '/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/rust-toolchain.toml') +2026-06-21T01:26:27.9105943Z ##[group]Run : create cachekey +2026-06-21T01:26:27.9106744Z : create cachekey +2026-06-21T01:26:27.9107829Z DATE=$(rustc +stable --version --verbose | sed -ne 's/^commit-date: \(20[0-9][0-9]\)-\([01][0-9]\)-\([0-3][0-9]\)$/\1\2\3/p') +2026-06-21T01:26:27.9109075Z HASH=$(rustc +stable --version --verbose | sed -ne 's/^commit-hash: //p') +2026-06-21T01:26:27.9110003Z echo "cachekey=$(echo $DATE$HASH | head -c12)" >> $GITHUB_OUTPUT +2026-06-21T01:26:27.9133070Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:27.9133450Z env: +2026-06-21T01:26:27.9133708Z CARGO_TERM_COLOR: always +2026-06-21T01:26:27.9133984Z RUST_BACKTRACE: short +2026-06-21T01:26:27.9134482Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:27.9135021Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:26:27.9135337Z ##[endgroup] +2026-06-21T01:26:27.9471777Z ##[group]Run : disable incremental compilation +2026-06-21T01:26:27.9472205Z : disable incremental compilation +2026-06-21T01:26:27.9472601Z if [ -z "${CARGO_INCREMENTAL+set}" ]; then +2026-06-21T01:26:27.9473005Z  echo CARGO_INCREMENTAL=0 >> $GITHUB_ENV +2026-06-21T01:26:27.9473376Z fi +2026-06-21T01:26:27.9494204Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:27.9494617Z env: +2026-06-21T01:26:27.9494868Z CARGO_TERM_COLOR: always +2026-06-21T01:26:27.9495146Z RUST_BACKTRACE: short +2026-06-21T01:26:27.9495653Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:27.9496501Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:26:27.9496812Z ##[endgroup] +2026-06-21T01:26:27.9567081Z ##[group]Run : enable colors in Cargo output +2026-06-21T01:26:27.9567480Z : enable colors in Cargo output +2026-06-21T01:26:27.9567841Z if [ -z "${CARGO_TERM_COLOR+set}" ]; then +2026-06-21T01:26:27.9568232Z  echo CARGO_TERM_COLOR=always >> $GITHUB_ENV +2026-06-21T01:26:27.9568572Z fi +2026-06-21T01:26:27.9588839Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:27.9589225Z env: +2026-06-21T01:26:27.9589479Z CARGO_TERM_COLOR: always +2026-06-21T01:26:27.9589762Z RUST_BACKTRACE: short +2026-06-21T01:26:27.9590270Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:27.9590818Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:26:27.9591134Z CARGO_INCREMENTAL: 0 +2026-06-21T01:26:27.9591389Z ##[endgroup] +2026-06-21T01:26:27.9660819Z ##[group]Run : enable Cargo sparse registry +2026-06-21T01:26:27.9661196Z : enable Cargo sparse registry +2026-06-21T01:26:27.9661598Z # implemented in 1.66, stabilized in 1.68, made default in 1.70 +2026-06-21T01:26:27.9662450Z if [ -z "${CARGO_REGISTRIES_CRATES_IO_PROTOCOL+set}" -o -f "/home/runner/work/_temp"/.implicit_cargo_registries_crates_io_protocol ]; then +2026-06-21T01:26:27.9663193Z  if rustc +stable --version --verbose | grep -q '^release: 1\.6[89]\.'; then +2026-06-21T01:26:27.9663799Z  touch "/home/runner/work/_temp"/.implicit_cargo_registries_crates_io_protocol || true +2026-06-21T01:26:27.9664369Z  echo CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse >> $GITHUB_ENV +2026-06-21T01:26:27.9664899Z  elif rustc +stable --version --verbose | grep -q '^release: 1\.6[67]\.'; then +2026-06-21T01:26:27.9665501Z  touch "/home/runner/work/_temp"/.implicit_cargo_registries_crates_io_protocol || true +2026-06-21T01:26:27.9666237Z  echo CARGO_REGISTRIES_CRATES_IO_PROTOCOL=git >> $GITHUB_ENV +2026-06-21T01:26:27.9666634Z  fi +2026-06-21T01:26:27.9666871Z fi +2026-06-21T01:26:27.9686463Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:27.9686861Z env: +2026-06-21T01:26:27.9687109Z CARGO_TERM_COLOR: always +2026-06-21T01:26:27.9687384Z RUST_BACKTRACE: short +2026-06-21T01:26:27.9687883Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:27.9688534Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:26:27.9688844Z CARGO_INCREMENTAL: 0 +2026-06-21T01:26:27.9689104Z ##[endgroup] +2026-06-21T01:26:27.9990910Z ##[group]Run : work around spurious network errors in curl 8.0 +2026-06-21T01:26:27.9991397Z : work around spurious network errors in curl 8.0 +2026-06-21T01:26:27.9992135Z # https://rust-lang.zulipchat.com/#narrow/stream/246057-t-cargo/topic/timeout.20investigation +2026-06-21T01:26:27.9992801Z if rustc +stable --version --verbose | grep -q '^release: 1\.7[01]\.'; then +2026-06-21T01:26:27.9993296Z  echo CARGO_HTTP_MULTIPLEXING=false >> $GITHUB_ENV +2026-06-21T01:26:27.9993667Z fi +2026-06-21T01:26:28.0016394Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:28.0016831Z env: +2026-06-21T01:26:28.0017098Z CARGO_TERM_COLOR: always +2026-06-21T01:26:28.0017384Z RUST_BACKTRACE: short +2026-06-21T01:26:28.0017910Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:28.0018454Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:26:28.0018744Z CARGO_INCREMENTAL: 0 +2026-06-21T01:26:28.0019000Z ##[endgroup] +2026-06-21T01:26:28.0204295Z ##[group]Run rustc +stable --version --verbose +2026-06-21T01:26:28.0204697Z rustc +stable --version --verbose +2026-06-21T01:26:28.0226322Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:28.0226713Z env: +2026-06-21T01:26:28.0226969Z CARGO_TERM_COLOR: always +2026-06-21T01:26:28.0227250Z RUST_BACKTRACE: short +2026-06-21T01:26:28.0227763Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:28.0228320Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:26:28.0228619Z CARGO_INCREMENTAL: 0 +2026-06-21T01:26:28.0228871Z ##[endgroup] +2026-06-21T01:26:28.0369520Z rustc 1.96.0 (ac68faa20 2026-05-25) +2026-06-21T01:26:28.0370463Z binary: rustc +2026-06-21T01:26:28.0371177Z commit-hash: ac68faa20c58cbccd01ee7208bf3b6e93a7d7f96 +2026-06-21T01:26:28.0371905Z commit-date: 2026-05-25 +2026-06-21T01:26:28.0372523Z host: x86_64-unknown-linux-gnu +2026-06-21T01:26:28.0373230Z release: 1.96.0 +2026-06-21T01:26:28.0377033Z LLVM version: 22.1.2 +2026-06-21T01:26:28.0524287Z ##[group]Run Swatinem/rust-cache@v2 +2026-06-21T01:26:28.0524624Z with: +2026-06-21T01:26:28.0524869Z cache-on-failure: true +2026-06-21T01:26:28.0525139Z prefix-key: v0-rust +2026-06-21T01:26:28.0525397Z add-job-id-key: true +2026-06-21T01:26:28.0525673Z add-rust-environment-hash-key: true +2026-06-21T01:26:28.0525981Z cache-targets: true +2026-06-21T01:26:28.0526520Z cache-all-crates: false +2026-06-21T01:26:28.0526802Z cache-workspace-crates: false +2026-06-21T01:26:28.0527088Z save-if: true +2026-06-21T01:26:28.0527336Z cache-provider: github +2026-06-21T01:26:28.0527595Z cache-bin: true +2026-06-21T01:26:28.0527833Z lookup-only: false +2026-06-21T01:26:28.0528083Z cmd-format: {0} +2026-06-21T01:26:28.0528317Z env: +2026-06-21T01:26:28.0528544Z CARGO_TERM_COLOR: always +2026-06-21T01:26:28.0528815Z RUST_BACKTRACE: short +2026-06-21T01:26:28.0529309Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:28.0529860Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:26:28.0530159Z CARGO_INCREMENTAL: 0 +2026-06-21T01:26:28.0530407Z ##[endgroup] +2026-06-21T01:26:28.3173124Z (node:2365) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead. +2026-06-21T01:26:28.3174371Z (Use `node --trace-deprecation ...` to show where the warning was created) +2026-06-21T01:26:31.2011636Z ##[group]Cache Configuration +2026-06-21T01:26:31.2012179Z Cache Provider: +2026-06-21T01:26:31.2012485Z github +2026-06-21T01:26:31.2012763Z Workspaces: +2026-06-21T01:26:31.2013185Z /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts +2026-06-21T01:26:31.2013739Z Cache Paths: +2026-06-21T01:26:31.2014068Z /home/runner/.cargo/bin +2026-06-21T01:26:31.2014448Z /home/runner/.cargo/.crates.toml +2026-06-21T01:26:31.2014862Z /home/runner/.cargo/.crates2.json +2026-06-21T01:26:31.2015304Z /home/runner/.cargo/registry +2026-06-21T01:26:31.2015751Z /home/runner/.cargo/git +2026-06-21T01:26:31.2016501Z /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/target +2026-06-21T01:26:31.2017501Z Restore Key: +2026-06-21T01:26:31.2017873Z v0-rust-wasm-check-Linux-x64-1f47b3b1 +2026-06-21T01:26:31.2018281Z Cache Key: +2026-06-21T01:26:31.2018506Z v0-rust-wasm-check-Linux-x64-1f47b3b1-8243978e +2026-06-21T01:26:31.2018786Z .. Prefix: +2026-06-21T01:26:31.2019003Z - v0-rust-wasm-check-Linux-x64 +2026-06-21T01:26:31.2019302Z .. Environment considered: +2026-06-21T01:26:31.2019601Z - Rust Versions: +2026-06-21T01:26:31.2020038Z - 1.96.0 x86_64-unknown-linux-gnu ac68faa20c58cbccd01ee7208bf3b6e93a7d7f96 +2026-06-21T01:26:31.2020653Z - 1.96.0 x86_64-unknown-linux-gnu ac68faa20c58cbccd01ee7208bf3b6e93a7d7f96 +2026-06-21T01:26:31.2021001Z - CARGO_HOME +2026-06-21T01:26:31.2021186Z - CARGO_INCREMENTAL +2026-06-21T01:26:31.2021385Z - CARGO_TERM_COLOR +2026-06-21T01:26:31.2021580Z - RUST_BACKTRACE +2026-06-21T01:26:31.2021778Z .. Lockfiles considered: +2026-06-21T01:26:31.2022145Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/.cargo/config.toml +2026-06-21T01:26:31.2022671Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/Cargo.toml +2026-06-21T01:26:31.2023196Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/common/Cargo.toml +2026-06-21T01:26:31.2023754Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/contracts/core/Cargo.toml +2026-06-21T01:26:31.2024633Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/Cargo.toml +2026-06-21T01:26:31.2025252Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/rust-toolchain.toml +2026-06-21T01:26:31.2025776Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/token-bridge/Cargo.toml +2026-06-21T01:26:31.2026649Z ##[endgroup] +2026-06-21T01:26:31.2026759Z +2026-06-21T01:26:31.2026860Z ... Restoring cache ... +2026-06-21T01:26:31.3741147Z Cache hit for: v0-rust-wasm-check-Linux-x64-1f47b3b1-8243978e +2026-06-21T01:26:32.6120887Z Received 39797766 of 39797766 (100.0%), 37.6 MBs/sec +2026-06-21T01:26:32.6121349Z Cache Size: ~38 MB (39797766 B) +2026-06-21T01:26:32.6143887Z [command]/usr/bin/tar -xf /home/runner/work/_temp/8d99bb99-1c5d-4bc4-a2e4-19fc890f6d01/cache.tzst -P -C /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts --use-compress-program unzstd +2026-06-21T01:26:32.7872139Z Cache restored successfully +2026-06-21T01:26:32.7888779Z Restored from cache key "v0-rust-wasm-check-Linux-x64-1f47b3b1-8243978e" full match: true. +2026-06-21T01:26:32.7975710Z ##[group]Run cargo check -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge --target wasm32v1-none +2026-06-21T01:26:32.7977276Z cargo check -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge --target wasm32v1-none +2026-06-21T01:26:32.7997176Z shell: /usr/bin/bash -e {0} +2026-06-21T01:26:32.7997427Z env: +2026-06-21T01:26:32.7997623Z CARGO_TERM_COLOR: always +2026-06-21T01:26:32.7997855Z RUST_BACKTRACE: short +2026-06-21T01:26:32.7998303Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:32.7998783Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:26:32.7999039Z CARGO_INCREMENTAL: 0 +2026-06-21T01:26:32.7999250Z CACHE_ON_FAILURE: true +2026-06-21T01:26:32.7999464Z ##[endgroup] +2026-06-21T01:26:33.0708469Z  Updating crates.io index +2026-06-21T01:26:34.7290009Z  Locking 212 packages to latest compatible versions +2026-06-21T01:26:34.7325905Z  Adding arbitrary v1.3.2 (available: v1.4.2) +2026-06-21T01:26:34.7418874Z  Adding crypto-common v0.1.6 (available: v0.1.7) +2026-06-21T01:26:34.7481968Z  Adding derive_arbitrary v1.3.2 (available: v1.4.2) +2026-06-21T01:26:34.7752703Z  Adding rand v0.8.6 (available: v0.10.1) +2026-06-21T01:26:34.7845801Z  Adding sha2 v0.10.9 (available: v0.11.0) +2026-06-21T01:26:34.8168455Z  Adding toml v0.8.23 (available: v1.1.2+spec-1.1.0) +2026-06-21T01:26:35.2305387Z  Compiling syn v2.0.118 +2026-06-21T01:26:35.2308118Z  Compiling serde_json v1.0.150 +2026-06-21T01:26:35.2336836Z  Compiling block-buffer v0.10.4 +2026-06-21T01:26:35.2337697Z  Compiling crypto-common v0.1.6 +2026-06-21T01:26:35.4616198Z  Compiling digest v0.10.7 +2026-06-21T01:26:35.4617386Z  Compiling cpufeatures v0.2.17 +2026-06-21T01:26:35.4927366Z  Compiling data-encoding v2.11.0 +2026-06-21T01:26:35.5902219Z  Compiling cfg-if v1.0.4 +2026-06-21T01:26:35.6140526Z  Compiling sha2 v0.10.9 +2026-06-21T01:26:36.1398276Z  Compiling ethnum v1.5.3 +2026-06-21T01:26:36.3849038Z  Compiling escape-bytes v0.1.1 +2026-06-21T01:26:36.4537472Z  Compiling num-traits v0.2.19 +2026-06-21T01:26:36.4587159Z  Compiling semver v1.0.28 +2026-06-21T01:26:36.7272654Z  Compiling either v1.16.0 +2026-06-21T01:26:36.8497485Z  Compiling equivalent v1.0.2 +2026-06-21T01:26:36.8803439Z  Compiling itertools v0.13.0 +2026-06-21T01:26:36.8849757Z  Compiling thiserror v1.0.69 +2026-06-21T01:26:37.0988702Z  Compiling hashbrown v0.17.1 +2026-06-21T01:26:37.5329837Z  Compiling indexmap v2.14.0 +2026-06-21T01:26:37.6380442Z  Compiling fnv v1.0.7 +2026-06-21T01:26:37.6857952Z  Compiling prettyplease v0.2.37 +2026-06-21T01:26:37.7777826Z  Compiling darling_core v0.23.0 +2026-06-21T01:26:38.2031507Z  Compiling wasmparser v0.116.1 +2026-06-21T01:26:38.2065238Z  Compiling darling_core v0.20.11 +2026-06-21T01:26:40.4108496Z  Compiling serde_derive v1.0.228 +2026-06-21T01:26:41.3758065Z  Compiling cfg_eval v0.1.2 +2026-06-21T01:26:41.5087419Z  Compiling darling_macro v0.23.0 +2026-06-21T01:26:41.7237460Z  Compiling num-derive v0.4.2 +2026-06-21T01:26:41.7817543Z  Compiling darling v0.23.0 +2026-06-21T01:26:41.8131920Z  Compiling serde_with_macros v3.21.0 +2026-06-21T01:26:42.6252412Z  Compiling thiserror-impl v1.0.69 +2026-06-21T01:26:43.3487524Z  Compiling heapless v0.8.0 +2026-06-21T01:26:43.5323702Z  Checking byteorder v1.5.0 +2026-06-21T01:26:43.6397799Z  Compiling base64 v0.22.1 +2026-06-21T01:26:43.9037496Z  Checking hash32 v0.3.1 +2026-06-21T01:26:44.0447772Z  Compiling serde v1.0.228 +2026-06-21T01:26:44.3071616Z  Compiling darling_macro v0.20.11 +2026-06-21T01:26:44.6017551Z  Compiling crate-git-revision v0.0.6 +2026-06-21T01:26:44.6526979Z  Compiling schemars v0.8.22 +2026-06-21T01:26:44.7879846Z  Compiling hex v0.4.3 +2026-06-21T01:26:44.8098015Z  Compiling stellar-strkey v0.0.13 +2026-06-21T01:26:44.9137550Z  Compiling stellar-xdr v26.0.1 +2026-06-21T01:26:45.0167490Z  Compiling soroban-env-common v26.1.3 +2026-06-21T01:26:45.2588156Z  Compiling stellar-strkey v0.0.16 +2026-06-21T01:26:45.3667991Z  Compiling num-integer v0.1.46 +2026-06-21T01:26:45.7007462Z  Compiling serde_with v3.21.0 +2026-06-21T01:26:45.7277474Z  Compiling rustc_version v0.4.1 +2026-06-21T01:26:46.0427565Z  Compiling static_assertions v1.1.0 +2026-06-21T01:26:46.0987261Z  Checking stable_deref_trait v1.2.1 +2026-06-21T01:26:46.5956947Z  Compiling soroban-sdk v26.1.0 +2026-06-21T01:26:46.6587785Z  Compiling num-bigint v0.4.6 +2026-06-21T01:26:46.7315404Z  Compiling darling v0.20.11 +2026-06-21T01:26:46.7628214Z  Compiling macro-string v0.1.4 +2026-06-21T01:26:47.0339356Z  Compiling heck v0.5.0 +2026-06-21T01:26:47.5647505Z  Compiling visibility v0.1.1 +2026-06-21T01:26:47.9872603Z  Compiling bytes-lit v0.0.5 +2026-06-21T01:26:59.5794404Z  Compiling soroban-spec v26.1.0 +2026-06-21T01:26:59.6746809Z  Compiling soroban-spec-rust v26.1.0 +2026-06-21T01:27:00.5252717Z  Compiling soroban-env-macros v26.1.3 +2026-06-21T01:27:02.4908236Z  Checking soroban-env-guest v26.1.3 +2026-06-21T01:27:02.6756818Z  Compiling soroban-sdk-macros v26.1.0 +2026-06-21T01:27:04.8428471Z  Checking orbitchain-common v0.1.0 (/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/common) +2026-06-21T01:27:04.8430387Z  Checking orbitchain-core v0.1.0 (/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/contracts/core) +2026-06-21T01:27:04.8934840Z  Checking orbitchain-campaign v0.1.0 (/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign) +2026-06-21T01:27:04.8936740Z  Checking orbitchain-token-bridge v0.1.0 (/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/token-bridge) +2026-06-21T01:27:05.0619209Z warning: unused import: `Address` +2026-06-21T01:27:05.0619916Z --> campaign/src/contract.rs:6:37 +2026-06-21T01:27:05.0620471Z | +2026-06-21T01:27:05.0626991Z 6 | use soroban_sdk::{panic_with_error, Address, Env}; +2026-06-21T01:27:05.0627827Z | ^^^^^^^ +2026-06-21T01:27:05.0628374Z | +2026-06-21T01:27:05.0629085Z = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default +2026-06-21T01:27:05.0629650Z +2026-06-21T01:27:05.2954366Z warning: `orbitchain-campaign` (lib) generated 1 warning (run `cargo fix --lib -p orbitchain-campaign` to apply 1 suggestion) +2026-06-21T01:27:05.2955584Z  Finished `dev` profile [unoptimized + debuginfo] target(s) in 32.47s +2026-06-21T01:27:05.3454387Z Post job cleanup. +2026-06-21T01:27:05.6081298Z Cache up-to-date. +2026-06-21T01:27:05.6084155Z (node:3509) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead. +2026-06-21T01:27:05.6084809Z (Use `node --trace-deprecation ...` to show where the warning was created) +2026-06-21T01:27:05.6220004Z Node 20 is being deprecated. This workflow is running with Node 24 by default. If you need to temporarily use Node 20, you can set the ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true environment variable. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/ +2026-06-21T01:27:05.6221155Z Post job cleanup. +2026-06-21T01:27:05.7028973Z [command]/usr/bin/git version +2026-06-21T01:27:05.7061314Z git version 2.54.0 +2026-06-21T01:27:05.7092835Z Temporarily overriding HOME='/home/runner/work/_temp/ced60acb-1fb8-470c-93bc-14a624b22182' before making global git config changes +2026-06-21T01:27:05.7094117Z Adding repository directory to the temporary git global config as a safe directory +2026-06-21T01:27:05.7097760Z [command]/usr/bin/git config --global --add safe.directory /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts +2026-06-21T01:27:05.7127481Z [command]/usr/bin/git config --local --name-only --get-regexp core\.sshCommand +2026-06-21T01:27:05.7153280Z [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || :" +2026-06-21T01:27:05.7318321Z [command]/usr/bin/git config --local --name-only --get-regexp http\.https\:\/\/github\.com\/\.extraheader +2026-06-21T01:27:05.7338256Z http.https://github.com/.extraheader +2026-06-21T01:27:05.7346507Z [command]/usr/bin/git config --local --unset-all http.https://github.com/.extraheader +2026-06-21T01:27:05.7370099Z [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http\.https\:\/\/github\.com\/\.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :" +2026-06-21T01:27:05.7530141Z [command]/usr/bin/git config --local --name-only --get-regexp ^includeIf\.gitdir: +2026-06-21T01:27:05.7554738Z [command]/usr/bin/git submodule foreach --recursive git config --local --show-origin --name-only --get-regexp remote.origin.url +2026-06-21T01:27:05.7818188Z Cleaning up orphan processes +2026-06-21T01:27:05.8051127Z ##[warning]Node.js 20 is deprecated. The following actions target Node.js 20 but are being forced to run on Node.js 24: actions/checkout@v4. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/ diff --git a/.ci_logs/1_Format check.txt b/.ci_logs/1_Format check.txt new file mode 100644 index 0000000..b79ba75 --- /dev/null +++ b/.ci_logs/1_Format check.txt @@ -0,0 +1,4350 @@ +2026-06-21T01:26:23.9033457Z Current runner version: '2.335.1' +2026-06-21T01:26:23.9059042Z ##[group]Runner Image Provisioner +2026-06-21T01:26:23.9059913Z Hosted Compute Agent +2026-06-21T01:26:23.9060670Z Version: 20260611.554 +2026-06-21T01:26:23.9061317Z Commit: 5e0782fdc9014723d3be820dd114dd31555c2bd1 +2026-06-21T01:26:23.9062088Z Build Date: 2026-06-11T21:40:46Z +2026-06-21T01:26:23.9062829Z Worker ID: {827c5e07-8b9f-47e9-a57c-b18a25cd1efc} +2026-06-21T01:26:23.9063559Z Azure Region: westcentralus +2026-06-21T01:26:23.9064224Z ##[endgroup] +2026-06-21T01:26:23.9065709Z ##[group]Operating System +2026-06-21T01:26:23.9066324Z Ubuntu +2026-06-21T01:26:23.9067012Z 24.04.4 +2026-06-21T01:26:23.9067587Z LTS +2026-06-21T01:26:23.9068203Z ##[endgroup] +2026-06-21T01:26:23.9068913Z ##[group]Runner Image +2026-06-21T01:26:23.9069504Z Image: ubuntu-24.04 +2026-06-21T01:26:23.9070160Z Version: 20260615.205.1 +2026-06-21T01:26:23.9071419Z Included Software: https://github.com/actions/runner-images/blob/ubuntu24/20260615.205/images/ubuntu/Ubuntu2404-Readme.md +2026-06-21T01:26:23.9073014Z Image Release: https://github.com/actions/runner-images/releases/tag/ubuntu24%2F20260615.205 +2026-06-21T01:26:23.9073984Z ##[endgroup] +2026-06-21T01:26:23.9075146Z ##[group]GITHUB_TOKEN Permissions +2026-06-21T01:26:23.9077067Z Contents: read +2026-06-21T01:26:23.9077825Z Metadata: read +2026-06-21T01:26:23.9078416Z ##[endgroup] +2026-06-21T01:26:23.9080848Z Secret source: Actions +2026-06-21T01:26:23.9081631Z Prepare workflow directory +2026-06-21T01:26:23.9512730Z Prepare all required actions +2026-06-21T01:26:23.9550910Z Getting action download info +2026-06-21T01:26:24.2776400Z Download action repository 'actions/checkout@v4' (SHA:34e114876b0b11c390a56381ad16ebd13914f8d5) +2026-06-21T01:26:24.3551462Z Download action repository 'dtolnay/rust-toolchain@stable' (SHA:29eef336d9b2848a0b548edc03f92a220660cdb8) +2026-06-21T01:26:24.5713220Z Download action repository 'Swatinem/rust-cache@v2' (SHA:e18b497796c12c097a38f9edb9d0641fb99eee32) +2026-06-21T01:26:25.6520949Z Complete job name: Format check +2026-06-21T01:26:25.7446470Z Node 20 is being deprecated. This workflow is running with Node 24 by default. If you need to temporarily use Node 20, you can set the ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true environment variable. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/ +2026-06-21T01:26:25.7455790Z ##[group]Run actions/checkout@v4 +2026-06-21T01:26:25.7456568Z with: +2026-06-21T01:26:25.7457113Z repository: OrbitChainLabs/OrbitChain-Contracts +2026-06-21T01:26:25.7462255Z token: *** +2026-06-21T01:26:25.7462731Z ssh-strict: true +2026-06-21T01:26:25.7463216Z ssh-user: git +2026-06-21T01:26:25.7463706Z persist-credentials: true +2026-06-21T01:26:25.7464244Z clean: true +2026-06-21T01:26:25.7464751Z sparse-checkout-cone-mode: true +2026-06-21T01:26:25.7465321Z fetch-depth: 1 +2026-06-21T01:26:25.7465789Z fetch-tags: false +2026-06-21T01:26:25.7466277Z show-progress: true +2026-06-21T01:26:25.7466787Z lfs: false +2026-06-21T01:26:25.7467339Z submodules: false +2026-06-21T01:26:25.7467831Z set-safe-directory: true +2026-06-21T01:26:25.7468732Z env: +2026-06-21T01:26:25.7469194Z CARGO_TERM_COLOR: always +2026-06-21T01:26:25.7469732Z RUST_BACKTRACE: short +2026-06-21T01:26:25.7470661Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:25.7471647Z ##[endgroup] +2026-06-21T01:26:25.8528363Z Syncing repository: OrbitChainLabs/OrbitChain-Contracts +2026-06-21T01:26:25.8530634Z ##[group]Getting Git version info +2026-06-21T01:26:25.8531566Z Working directory is '/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts' +2026-06-21T01:26:25.8532876Z [command]/usr/bin/git version +2026-06-21T01:26:25.8585547Z git version 2.54.0 +2026-06-21T01:26:25.8605278Z ##[endgroup] +2026-06-21T01:26:25.8619933Z Temporarily overriding HOME='/home/runner/work/_temp/9300d159-5054-4046-a522-97c6b931ac11' before making global git config changes +2026-06-21T01:26:25.8621575Z Adding repository directory to the temporary git global config as a safe directory +2026-06-21T01:26:25.8626002Z [command]/usr/bin/git config --global --add safe.directory /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts +2026-06-21T01:26:25.8678403Z Deleting the contents of '/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts' +2026-06-21T01:26:25.8682787Z ##[group]Initializing the repository +2026-06-21T01:26:25.8688137Z [command]/usr/bin/git init /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts +2026-06-21T01:26:25.8791094Z hint: Using 'master' as the name for the initial branch. This default branch name +2026-06-21T01:26:25.8793072Z hint: will change to "main" in Git 3.0. To configure the initial branch name +2026-06-21T01:26:25.8794936Z hint: to use in all of your new repositories, which will suppress this warning, +2026-06-21T01:26:25.8796441Z hint: call: +2026-06-21T01:26:25.8797309Z hint: +2026-06-21T01:26:25.8798342Z hint: git config --global init.defaultBranch +2026-06-21T01:26:25.8799744Z hint: +2026-06-21T01:26:25.8800426Z hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and +2026-06-21T01:26:25.8801489Z hint: 'development'. The just-created branch can be renamed via this command: +2026-06-21T01:26:25.8802327Z hint: +2026-06-21T01:26:25.8802792Z hint: git branch -m +2026-06-21T01:26:25.8803316Z hint: +2026-06-21T01:26:25.8803996Z hint: Disable this message with "git config set advice.defaultBranchName false" +2026-06-21T01:26:25.8805307Z Initialized empty Git repository in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/.git/ +2026-06-21T01:26:25.8810061Z [command]/usr/bin/git remote add origin https://github.com/OrbitChainLabs/OrbitChain-Contracts +2026-06-21T01:26:25.8856940Z ##[endgroup] +2026-06-21T01:26:25.8857839Z ##[group]Disabling automatic garbage collection +2026-06-21T01:26:25.8860959Z [command]/usr/bin/git config --local gc.auto 0 +2026-06-21T01:26:25.8891243Z ##[endgroup] +2026-06-21T01:26:25.8892058Z ##[group]Setting up auth +2026-06-21T01:26:25.8897945Z [command]/usr/bin/git config --local --name-only --get-regexp core\.sshCommand +2026-06-21T01:26:25.8932873Z [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || :" +2026-06-21T01:26:25.9301806Z [command]/usr/bin/git config --local --name-only --get-regexp http\.https\:\/\/github\.com\/\.extraheader +2026-06-21T01:26:25.9340055Z [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http\.https\:\/\/github\.com\/\.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :" +2026-06-21T01:26:25.9600557Z [command]/usr/bin/git config --local --name-only --get-regexp ^includeIf\.gitdir: +2026-06-21T01:26:25.9634983Z [command]/usr/bin/git submodule foreach --recursive git config --local --show-origin --name-only --get-regexp remote.origin.url +2026-06-21T01:26:25.9894134Z [command]/usr/bin/git config --local http.https://github.com/.extraheader AUTHORIZATION: basic *** +2026-06-21T01:26:25.9927712Z ##[endgroup] +2026-06-21T01:26:25.9929346Z ##[group]Fetching the repository +2026-06-21T01:26:25.9937028Z [command]/usr/bin/git -c protocol.version=2 fetch --no-tags --prune --no-recurse-submodules --depth=1 origin +1be331ea57707748b39835c9fac837ddeb283d53:refs/remotes/pull/60/merge +2026-06-21T01:26:26.4722393Z From https://github.com/OrbitChainLabs/OrbitChain-Contracts +2026-06-21T01:26:26.4724258Z * [new ref] 1be331ea57707748b39835c9fac837ddeb283d53 -> pull/60/merge +2026-06-21T01:26:26.4759933Z ##[endgroup] +2026-06-21T01:26:26.4760824Z ##[group]Determining the checkout info +2026-06-21T01:26:26.4762153Z ##[endgroup] +2026-06-21T01:26:26.4767605Z [command]/usr/bin/git sparse-checkout disable +2026-06-21T01:26:26.4813938Z [command]/usr/bin/git config --local --unset-all extensions.worktreeConfig +2026-06-21T01:26:26.4843081Z ##[group]Checking out the ref +2026-06-21T01:26:26.4848057Z [command]/usr/bin/git checkout --progress --force refs/remotes/pull/60/merge +2026-06-21T01:26:26.5047800Z Note: switching to 'refs/remotes/pull/60/merge'. +2026-06-21T01:26:26.5048822Z +2026-06-21T01:26:26.5049862Z You are in 'detached HEAD' state. You can look around, make experimental +2026-06-21T01:26:26.5051433Z changes and commit them, and you can discard any commits you make in this +2026-06-21T01:26:26.5052899Z state without impacting any branches by switching back to a branch. +2026-06-21T01:26:26.5053735Z +2026-06-21T01:26:26.5054179Z If you want to create a new branch to retain commits you create, you may +2026-06-21T01:26:26.5055088Z do so (now or later) by using -c with the switch command. Example: +2026-06-21T01:26:26.5055601Z +2026-06-21T01:26:26.5055938Z git switch -c +2026-06-21T01:26:26.5056299Z +2026-06-21T01:26:26.5056523Z Or undo this operation with: +2026-06-21T01:26:26.5056861Z +2026-06-21T01:26:26.5057057Z git switch - +2026-06-21T01:26:26.5057322Z +2026-06-21T01:26:26.5057778Z Turn off this advice by setting config variable advice.detachedHead to false +2026-06-21T01:26:26.5058464Z +2026-06-21T01:26:26.5060086Z HEAD is now at 1be331e Merge 4b973bcdef5a40b4714ec76b0c3c3d5e9b026c2d into dc3d5e2b821bb2a0f2655582265c562926415b02 +2026-06-21T01:26:26.5064504Z ##[endgroup] +2026-06-21T01:26:26.5205822Z [command]/usr/bin/git log -1 --format=%H +2026-06-21T01:26:26.5207560Z 1be331ea57707748b39835c9fac837ddeb283d53 +2026-06-21T01:26:26.5684013Z ##[warning]Unexpected input(s) 'cache', valid inputs are ['toolchain', 'targets', 'target', 'components'] +2026-06-21T01:26:26.5706217Z ##[group]Run dtolnay/rust-toolchain@stable +2026-06-21T01:26:26.5707067Z with: +2026-06-21T01:26:26.5707563Z cache: false +2026-06-21T01:26:26.5708107Z toolchain: stable +2026-06-21T01:26:26.5708804Z env: +2026-06-21T01:26:26.5709305Z CARGO_TERM_COLOR: always +2026-06-21T01:26:26.5709958Z RUST_BACKTRACE: short +2026-06-21T01:26:26.5711325Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:26.5712855Z ##[endgroup] +2026-06-21T01:26:26.5849484Z ##[group]Run : parse toolchain version +2026-06-21T01:26:26.5850398Z : parse toolchain version +2026-06-21T01:26:26.5851176Z if [[ -z $toolchain ]]; then +2026-06-21T01:26:26.5852702Z  # GitHub does not enforce `required: true` inputs itself. https://github.com/actions/runner/issues/1070 +2026-06-21T01:26:26.5854414Z  echo "'toolchain' is a required input" >&2 +2026-06-21T01:26:26.5855267Z  exit 1 +2026-06-21T01:26:26.5856208Z elif [[ $toolchain =~ ^stable' '[0-9]+' '(year|month|week|day)s?' 'ago$ ]]; then +2026-06-21T01:26:26.5857419Z  if [[ Linux == macOS ]]; then +2026-06-21T01:26:26.5859321Z  echo "toolchain=1.$((($(date -v-$(sed 's/stable \([0-9]*\) \(.\).*/\1\2/' <<< $toolchain) +%s)/60/60/24-16569)/7/6))" >> $GITHUB_OUTPUT +2026-06-21T01:26:26.5860873Z  else +2026-06-21T01:26:26.5862028Z  echo "toolchain=1.$((($(date --date "${toolchain#stable }" +%s)/60/60/24-16569)/7/6))" >> $GITHUB_OUTPUT +2026-06-21T01:26:26.5863405Z  fi +2026-06-21T01:26:26.5864246Z elif [[ $toolchain =~ ^stable' 'minus' '[0-9]+' 'releases?$ ]]; then +2026-06-21T01:26:26.5865828Z  echo "toolchain=1.$((($(date +%s)/60/60/24-16569)/7/6-${toolchain//[^0-9]/}))" >> $GITHUB_OUTPUT +2026-06-21T01:26:26.5867191Z elif [[ $toolchain =~ ^1\.[0-9]+$ ]]; then +2026-06-21T01:26:26.5868902Z  echo "toolchain=1.$((i=${toolchain#1.}, c=($(date +%s)/60/60/24-16569)/7/6, i+9*i*(10*i<=c)+90*i*(100*i<=c)))" >> $GITHUB_OUTPUT +2026-06-21T01:26:26.5870403Z else +2026-06-21T01:26:26.5871059Z  echo "toolchain=$toolchain" >> $GITHUB_OUTPUT +2026-06-21T01:26:26.5871910Z fi +2026-06-21T01:26:26.6045487Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:26.6046443Z env: +2026-06-21T01:26:26.6046938Z CARGO_TERM_COLOR: always +2026-06-21T01:26:26.6047575Z RUST_BACKTRACE: short +2026-06-21T01:26:26.6049323Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:26.6050804Z toolchain: stable +2026-06-21T01:26:26.6051338Z ##[endgroup] +2026-06-21T01:26:26.6228230Z ##[group]Run : construct rustup command line +2026-06-21T01:26:26.6229362Z : construct rustup command line +2026-06-21T01:26:26.6230653Z echo "targets=$(for t in ${targets//,/ }; do echo -n ' --target' $t; done)" >> $GITHUB_OUTPUT +2026-06-21T01:26:26.6232887Z echo "components=$(for c in ${components//,/ }; do echo -n ' --component' $c; done)" >> $GITHUB_OUTPUT +2026-06-21T01:26:26.6234585Z echo "downgrade=" >> $GITHUB_OUTPUT +2026-06-21T01:26:26.6268888Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:26.6269897Z env: +2026-06-21T01:26:26.6270385Z CARGO_TERM_COLOR: always +2026-06-21T01:26:26.6271006Z RUST_BACKTRACE: short +2026-06-21T01:26:26.6272281Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:26.6273724Z targets: +2026-06-21T01:26:26.6274197Z components: +2026-06-21T01:26:26.6274690Z ##[endgroup] +2026-06-21T01:26:26.6385171Z ##[group]Run : set $CARGO_HOME +2026-06-21T01:26:26.6385840Z : set $CARGO_HOME +2026-06-21T01:26:26.6386718Z echo CARGO_HOME=${CARGO_HOME:-"$HOME/.cargo"} >> $GITHUB_ENV +2026-06-21T01:26:26.6418884Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:26.6419823Z env: +2026-06-21T01:26:26.6420300Z CARGO_TERM_COLOR: always +2026-06-21T01:26:26.6420925Z RUST_BACKTRACE: short +2026-06-21T01:26:26.6422195Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:26.6423648Z ##[endgroup] +2026-06-21T01:26:26.6534030Z ##[group]Run : install rustup if needed +2026-06-21T01:26:26.6534834Z : install rustup if needed +2026-06-21T01:26:26.6535639Z if ! command -v rustup &>/dev/null; then +2026-06-21T01:26:26.6537832Z  curl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused --location --silent --show-error --fail https://sh.rustup.rs | sh -s -- --default-toolchain none -y +2026-06-21T01:26:26.6540204Z  echo "$CARGO_HOME/bin" >> $GITHUB_PATH +2026-06-21T01:26:26.6540986Z fi +2026-06-21T01:26:26.6572084Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:26.6572994Z env: +2026-06-21T01:26:26.6573473Z CARGO_TERM_COLOR: always +2026-06-21T01:26:26.6574107Z RUST_BACKTRACE: short +2026-06-21T01:26:26.6575377Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:26.6576841Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:26:26.6577499Z ##[endgroup] +2026-06-21T01:26:26.6687881Z ##[group]Run rustup toolchain install stable --profile minimal --no-self-update +2026-06-21T01:26:26.6689626Z rustup toolchain install stable --profile minimal --no-self-update +2026-06-21T01:26:26.6720787Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:26.6721688Z env: +2026-06-21T01:26:26.6722159Z CARGO_TERM_COLOR: always +2026-06-21T01:26:26.6722769Z RUST_BACKTRACE: short +2026-06-21T01:26:26.6724021Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:26.6725482Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:26:26.6726173Z RUSTUP_PERMIT_COPY_RENAME: 1 +2026-06-21T01:26:26.6726801Z ##[endgroup] +2026-06-21T01:26:26.8526412Z info: syncing channel updates for stable-x86_64-unknown-linux-gnu +2026-06-21T01:26:27.0165119Z +2026-06-21T01:26:27.0258447Z stable-x86_64-unknown-linux-gnu unchanged - rustc 1.96.0 (ac68faa20 2026-05-25) +2026-06-21T01:26:27.0259891Z +2026-06-21T01:26:27.0341300Z ##[group]Run rustup default stable +2026-06-21T01:26:27.0342464Z rustup default stable +2026-06-21T01:26:27.0380234Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:27.0381582Z env: +2026-06-21T01:26:27.0382702Z CARGO_TERM_COLOR: always +2026-06-21T01:26:27.0383723Z RUST_BACKTRACE: short +2026-06-21T01:26:27.0385468Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:27.0387444Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:26:27.0388534Z ##[endgroup] +2026-06-21T01:26:27.0515284Z info: using existing install for stable-x86_64-unknown-linux-gnu +2026-06-21T01:26:27.0520799Z info: default toolchain set to stable-x86_64-unknown-linux-gnu +2026-06-21T01:26:27.0521849Z +2026-06-21T01:26:27.0612056Z stable-x86_64-unknown-linux-gnu unchanged - rustc 1.96.0 (ac68faa20 2026-05-25) +2026-06-21T01:26:27.0613737Z +2026-06-21T01:26:27.0616089Z info: note that the toolchain 'stable-x86_64-unknown-linux-gnu' is currently in use (overridden by '/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/rust-toolchain.toml') +2026-06-21T01:26:27.0770366Z ##[group]Run : create cachekey +2026-06-21T01:26:27.0771517Z : create cachekey +2026-06-21T01:26:27.0773459Z DATE=$(rustc +stable --version --verbose | sed -ne 's/^commit-date: \(20[0-9][0-9]\)-\([01][0-9]\)-\([0-3][0-9]\)$/\1\2\3/p') +2026-06-21T01:26:27.0775952Z HASH=$(rustc +stable --version --verbose | sed -ne 's/^commit-hash: //p') +2026-06-21T01:26:27.0777825Z echo "cachekey=$(echo $DATE$HASH | head -c12)" >> $GITHUB_OUTPUT +2026-06-21T01:26:27.0816045Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:27.0817292Z env: +2026-06-21T01:26:27.0818034Z CARGO_TERM_COLOR: always +2026-06-21T01:26:27.0819128Z RUST_BACKTRACE: short +2026-06-21T01:26:27.0820820Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:27.0822723Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:26:27.0823679Z ##[endgroup] +2026-06-21T01:26:27.1280715Z ##[group]Run : disable incremental compilation +2026-06-21T01:26:27.1281956Z : disable incremental compilation +2026-06-21T01:26:27.1283184Z if [ -z "${CARGO_INCREMENTAL+set}" ]; then +2026-06-21T01:26:27.1284420Z  echo CARGO_INCREMENTAL=0 >> $GITHUB_ENV +2026-06-21T01:26:27.1285517Z fi +2026-06-21T01:26:27.1322539Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:27.1323771Z env: +2026-06-21T01:26:27.1324499Z CARGO_TERM_COLOR: always +2026-06-21T01:26:27.1325412Z RUST_BACKTRACE: short +2026-06-21T01:26:27.1327067Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:27.1329159Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:26:27.1330103Z ##[endgroup] +2026-06-21T01:26:27.1447616Z ##[group]Run : enable colors in Cargo output +2026-06-21T01:26:27.1448980Z : enable colors in Cargo output +2026-06-21T01:26:27.1450188Z if [ -z "${CARGO_TERM_COLOR+set}" ]; then +2026-06-21T01:26:27.1451493Z  echo CARGO_TERM_COLOR=always >> $GITHUB_ENV +2026-06-21T01:26:27.1452648Z fi +2026-06-21T01:26:27.1488026Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:27.1489470Z env: +2026-06-21T01:26:27.1490215Z CARGO_TERM_COLOR: always +2026-06-21T01:26:27.1491133Z RUST_BACKTRACE: short +2026-06-21T01:26:27.1492779Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:27.1494680Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:26:27.1495659Z CARGO_INCREMENTAL: 0 +2026-06-21T01:26:27.1496493Z ##[endgroup] +2026-06-21T01:26:27.1616131Z ##[group]Run : enable Cargo sparse registry +2026-06-21T01:26:27.1617303Z : enable Cargo sparse registry +2026-06-21T01:26:27.1618828Z # implemented in 1.66, stabilized in 1.68, made default in 1.70 +2026-06-21T01:26:27.1621386Z if [ -z "${CARGO_REGISTRIES_CRATES_IO_PROTOCOL+set}" -o -f "/home/runner/work/_temp"/.implicit_cargo_registries_crates_io_protocol ]; then +2026-06-21T01:26:27.1624027Z  if rustc +stable --version --verbose | grep -q '^release: 1\.6[89]\.'; then +2026-06-21T01:26:27.1626271Z  touch "/home/runner/work/_temp"/.implicit_cargo_registries_crates_io_protocol || true +2026-06-21T01:26:27.1628261Z  echo CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse >> $GITHUB_ENV +2026-06-21T01:26:27.1630297Z  elif rustc +stable --version --verbose | grep -q '^release: 1\.6[67]\.'; then +2026-06-21T01:26:27.1632436Z  touch "/home/runner/work/_temp"/.implicit_cargo_registries_crates_io_protocol || true +2026-06-21T01:26:27.1634374Z  echo CARGO_REGISTRIES_CRATES_IO_PROTOCOL=git >> $GITHUB_ENV +2026-06-21T01:26:27.1635697Z  fi +2026-06-21T01:26:27.1636448Z fi +2026-06-21T01:26:27.1673428Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:27.1674660Z env: +2026-06-21T01:26:27.1675419Z CARGO_TERM_COLOR: always +2026-06-21T01:26:27.1676322Z RUST_BACKTRACE: short +2026-06-21T01:26:27.1677926Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:27.1680016Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:26:27.1681006Z CARGO_INCREMENTAL: 0 +2026-06-21T01:26:27.1681842Z ##[endgroup] +2026-06-21T01:26:27.2116955Z ##[group]Run : work around spurious network errors in curl 8.0 +2026-06-21T01:26:27.2118426Z : work around spurious network errors in curl 8.0 +2026-06-21T01:26:27.2120823Z # https://rust-lang.zulipchat.com/#narrow/stream/246057-t-cargo/topic/timeout.20investigation +2026-06-21T01:26:27.2123028Z if rustc +stable --version --verbose | grep -q '^release: 1\.7[01]\.'; then +2026-06-21T01:26:27.2124694Z  echo CARGO_HTTP_MULTIPLEXING=false >> $GITHUB_ENV +2026-06-21T01:26:27.2125876Z fi +2026-06-21T01:26:27.2165971Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:27.2167177Z env: +2026-06-21T01:26:27.2167923Z CARGO_TERM_COLOR: always +2026-06-21T01:26:27.2169042Z RUST_BACKTRACE: short +2026-06-21T01:26:27.2170667Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:27.2172467Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:26:27.2173431Z CARGO_INCREMENTAL: 0 +2026-06-21T01:26:27.2174256Z ##[endgroup] +2026-06-21T01:26:27.2441251Z ##[group]Run rustc +stable --version --verbose +2026-06-21T01:26:27.2442454Z rustc +stable --version --verbose +2026-06-21T01:26:27.2480345Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:27.2481536Z env: +2026-06-21T01:26:27.2482264Z CARGO_TERM_COLOR: always +2026-06-21T01:26:27.2483169Z RUST_BACKTRACE: short +2026-06-21T01:26:27.2484751Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:27.2486535Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:26:27.2487467Z CARGO_INCREMENTAL: 0 +2026-06-21T01:26:27.2488269Z ##[endgroup] +2026-06-21T01:26:27.2680160Z rustc 1.96.0 (ac68faa20 2026-05-25) +2026-06-21T01:26:27.2681552Z binary: rustc +2026-06-21T01:26:27.2682981Z commit-hash: ac68faa20c58cbccd01ee7208bf3b6e93a7d7f96 +2026-06-21T01:26:27.2684880Z commit-date: 2026-05-25 +2026-06-21T01:26:27.2686275Z host: x86_64-unknown-linux-gnu +2026-06-21T01:26:27.2687756Z release: 1.96.0 +2026-06-21T01:26:27.2689306Z LLVM version: 22.1.2 +2026-06-21T01:26:27.2916590Z ##[group]Run Swatinem/rust-cache@v2 +2026-06-21T01:26:27.2917562Z with: +2026-06-21T01:26:27.2918285Z cache-on-failure: true +2026-06-21T01:26:27.2919321Z prefix-key: v0-rust +2026-06-21T01:26:27.2920149Z add-job-id-key: true +2026-06-21T01:26:27.2921021Z add-rust-environment-hash-key: true +2026-06-21T01:26:27.2921998Z cache-targets: true +2026-06-21T01:26:27.2922814Z cache-all-crates: false +2026-06-21T01:26:27.2923688Z cache-workspace-crates: false +2026-06-21T01:26:27.2924576Z save-if: true +2026-06-21T01:26:27.2925336Z cache-provider: github +2026-06-21T01:26:27.2926163Z cache-bin: true +2026-06-21T01:26:27.2926917Z lookup-only: false +2026-06-21T01:26:27.2927928Z cmd-format: {0} +2026-06-21T01:26:27.2928869Z env: +2026-06-21T01:26:27.2929580Z CARGO_TERM_COLOR: always +2026-06-21T01:26:27.2930438Z RUST_BACKTRACE: short +2026-06-21T01:26:27.2931993Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:27.2933766Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:26:27.2934700Z CARGO_INCREMENTAL: 0 +2026-06-21T01:26:27.2935498Z ##[endgroup] +2026-06-21T01:26:27.5683347Z (node:2385) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead. +2026-06-21T01:26:27.5686978Z (Use `node --trace-deprecation ...` to show where the warning was created) +2026-06-21T01:26:31.2861667Z ##[group]Cache Configuration +2026-06-21T01:26:31.2862375Z Cache Provider: +2026-06-21T01:26:31.2862804Z github +2026-06-21T01:26:31.2863201Z Workspaces: +2026-06-21T01:26:31.2863750Z /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts +2026-06-21T01:26:31.2864382Z Cache Paths: +2026-06-21T01:26:31.2864848Z /home/runner/.cargo/bin +2026-06-21T01:26:31.2865365Z /home/runner/.cargo/.crates.toml +2026-06-21T01:26:31.2865883Z /home/runner/.cargo/.crates2.json +2026-06-21T01:26:31.2866410Z /home/runner/.cargo/registry +2026-06-21T01:26:31.2866939Z /home/runner/.cargo/git +2026-06-21T01:26:31.2867593Z /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/target +2026-06-21T01:26:31.2868277Z Restore Key: +2026-06-21T01:26:31.2868935Z v0-rust-fmt-Linux-x64-1f47b3b1 +2026-06-21T01:26:31.2869489Z Cache Key: +2026-06-21T01:26:31.2869982Z v0-rust-fmt-Linux-x64-1f47b3b1-8243978e +2026-06-21T01:26:31.2870562Z .. Prefix: +2026-06-21T01:26:31.2870989Z - v0-rust-fmt-Linux-x64 +2026-06-21T01:26:31.2871483Z .. Environment considered: +2026-06-21T01:26:31.2871945Z - Rust Versions: +2026-06-21T01:26:31.2872584Z - 1.96.0 x86_64-unknown-linux-gnu ac68faa20c58cbccd01ee7208bf3b6e93a7d7f96 +2026-06-21T01:26:31.2873496Z - 1.96.0 x86_64-unknown-linux-gnu ac68faa20c58cbccd01ee7208bf3b6e93a7d7f96 +2026-06-21T01:26:31.2874205Z - CARGO_HOME +2026-06-21T01:26:31.2874619Z - CARGO_INCREMENTAL +2026-06-21T01:26:31.2875091Z - CARGO_TERM_COLOR +2026-06-21T01:26:31.2875523Z - RUST_BACKTRACE +2026-06-21T01:26:31.2875969Z .. Lockfiles considered: +2026-06-21T01:26:31.2876700Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/.cargo/config.toml +2026-06-21T01:26:31.2877705Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/Cargo.toml +2026-06-21T01:26:31.2879085Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/common/Cargo.toml +2026-06-21T01:26:31.2880302Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/contracts/core/Cargo.toml +2026-06-21T01:26:31.2881511Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/Cargo.toml +2026-06-21T01:26:31.2882631Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/rust-toolchain.toml +2026-06-21T01:26:31.2883763Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/token-bridge/Cargo.toml +2026-06-21T01:26:31.2885017Z ##[endgroup] +2026-06-21T01:26:31.2885264Z +2026-06-21T01:26:31.2885496Z ... Restoring cache ... +2026-06-21T01:26:31.4804655Z Cache hit for: v0-rust-fmt-Linux-x64-1f47b3b1-8243978e +2026-06-21T01:26:32.7280590Z Received 12154443 of 16348747 (74.3%), 11.6 MBs/sec +2026-06-21T01:26:32.8941462Z Received 16348747 of 16348747 (100.0%), 13.4 MBs/sec +2026-06-21T01:26:32.8942149Z Cache Size: ~16 MB (16348747 B) +2026-06-21T01:26:32.8970000Z [command]/usr/bin/tar -xf /home/runner/work/_temp/4712cffc-1c54-4deb-88cf-eb169764797b/cache.tzst -P -C /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts --use-compress-program unzstd +2026-06-21T01:26:32.9722208Z Cache restored successfully +2026-06-21T01:26:32.9735595Z Restored from cache key "v0-rust-fmt-Linux-x64-1f47b3b1-8243978e" full match: true. +2026-06-21T01:26:32.9875852Z ##[group]Run cargo fmt --all -- --check && cargo fmt -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge -- --check +2026-06-21T01:26:32.9877048Z cargo fmt --all -- --check && cargo fmt -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge -- --check +2026-06-21T01:26:32.9911590Z shell: /usr/bin/bash -e {0} +2026-06-21T01:26:32.9911868Z env: +2026-06-21T01:26:32.9912084Z CARGO_TERM_COLOR: always +2026-06-21T01:26:32.9912342Z RUST_BACKTRACE: short +2026-06-21T01:26:32.9912815Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:32.9913336Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:26:32.9913603Z CARGO_INCREMENTAL: 0 +2026-06-21T01:26:32.9913835Z CACHE_ON_FAILURE: true +2026-06-21T01:26:32.9914067Z ##[endgroup] +2026-06-21T01:26:33.2159717Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/contract.rs:3: +2026-06-21T01:26:33.2160871Z //! These are wired into the contract impl in `lib.rs` as methods on +2026-06-21T01:26:33.2161552Z //! `CampaignContract`. +2026-06-21T01:26:33.2162015Z +2026-06-21T01:26:33.2167137Z -use soroban_sdk::{panic_with_error, Address, Env}; +2026-06-21T01:26:33.2167742Z use crate::event; +2026-06-21T01:26:33.2168226Z use crate::storage::{get_campaign, is_frozen, set_campaign}; +2026-06-21T01:26:33.2169094Z use crate::types::{CampaignStatus, Error}; +2026-06-21T01:26:33.2169918Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/contract.rs:10: +2026-06-21T01:26:33.2170879Z use crate::{validate_campaign_transition, MAX_DEADLINE_GAP_SECONDS}; +2026-06-21T01:26:33.2171544Z +use soroban_sdk::{panic_with_error, Address, Env}; +2026-06-21T01:26:33.2171910Z +2026-06-21T01:26:33.2172448Z /// Issue #212 – End the campaign early (before deadline). +2026-06-21T01:26:33.2172776Z /// +2026-06-21T01:26:33.2173197Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/contract.rs:20: +2026-06-21T01:26:33.2173841Z /// - `Error::ContractFrozen` if contract is frozen (freeze invariant: all writes rejected) +2026-06-21T01:26:33.2174422Z /// - `Error::InvalidCampaignTransition` if campaign is already Ended or Cancelled +2026-06-21T01:26:33.2174844Z pub fn end_campaign(env: &Env) { +2026-06-21T01:26:33.2175125Z - let mut campaign = get_campaign(env) +2026-06-21T01:26:33.2175511Z - .unwrap_or_else(|| panic_with_error!(env, Error::NotInitialized)); +2026-06-21T01:26:33.2175894Z + let mut campaign = +2026-06-21T01:26:33.2176300Z + get_campaign(env).unwrap_or_else(|| panic_with_error!(env, Error::NotInitialized)); +2026-06-21T01:26:33.2176710Z +2026-06-21T01:26:33.2176921Z campaign.creator.require_auth(); +2026-06-21T01:26:33.2177182Z +2026-06-21T01:26:33.2177582Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/contract.rs:51: +2026-06-21T01:26:33.2178229Z /// - `Error::ContractFrozen` if contract is frozen (freeze invariant: all writes rejected) +2026-06-21T01:26:33.2179091Z /// - `Error::InvalidCampaignTransition` if campaign is already Cancelled +2026-06-21T01:26:33.2179712Z pub fn cancel_campaign(env: &Env) { +2026-06-21T01:26:33.2180085Z - let mut campaign = get_campaign(env) +2026-06-21T01:26:33.2180464Z - .unwrap_or_else(|| panic_with_error!(env, Error::NotInitialized)); +2026-06-21T01:26:33.2180826Z + let mut campaign = +2026-06-21T01:26:33.2181196Z + get_campaign(env).unwrap_or_else(|| panic_with_error!(env, Error::NotInitialized)); +2026-06-21T01:26:33.2181587Z +2026-06-21T01:26:33.2181798Z campaign.creator.require_auth(); +2026-06-21T01:26:33.2182053Z +2026-06-21T01:26:33.2182423Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/contract.rs:87: +2026-06-21T01:26:33.2182974Z /// - `Error::InvalidEndTime` if `new_end_time` is more than ten years out +2026-06-21T01:26:33.2183825Z /// - `Error::InvalidCampaignTransition` if campaign is not Active or GoalReached +2026-06-21T01:26:33.2184286Z pub fn extend_deadline(env: &Env, new_end_time: u64) { +2026-06-21T01:26:33.2184611Z - let mut campaign = get_campaign(env) +2026-06-21T01:26:33.2185111Z - .unwrap_or_else(|| panic_with_error!(env, Error::NotInitialized)); +2026-06-21T01:26:33.2185486Z + let mut campaign = +2026-06-21T01:26:33.2185846Z + get_campaign(env).unwrap_or_else(|| panic_with_error!(env, Error::NotInitialized)); +2026-06-21T01:26:33.2186232Z +2026-06-21T01:26:33.2186436Z campaign.creator.require_auth(); +2026-06-21T01:26:33.2186835Z +2026-06-21T01:26:33.2187221Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/contract.rs:128: +2026-06-21T01:26:33.2187687Z #[must_use] +2026-06-21T01:26:33.2188028Z pub fn get_campaign_status(env: &Env) -> crate::types::CampaignStatusResponse { +2026-06-21T01:26:33.2188459Z use crate::types::CampaignStatusResponse; +2026-06-21T01:26:33.2188936Z - +2026-06-21T01:26:33.2189165Z - let campaign = get_campaign(env) +2026-06-21T01:26:33.2189544Z - .unwrap_or_else(|| panic_with_error!(env, Error::NotInitialized)); +2026-06-21T01:26:33.2189898Z + +2026-06-21T01:26:33.2190089Z + let campaign = +2026-06-21T01:26:33.2190452Z + get_campaign(env).unwrap_or_else(|| panic_with_error!(env, Error::NotInitialized)); +2026-06-21T01:26:33.2190850Z +2026-06-21T01:26:33.2191049Z let now = env.ledger().timestamp(); +2026-06-21T01:26:33.2191365Z let days_remaining = if now < campaign.end_time { +2026-06-21T01:26:33.2229290Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/lib.rs:213: +2026-06-21T01:26:33.2230040Z // Update donor record +2026-06-21T01:26:33.2230347Z let existing_donor = get_donor(&env, &donor); +2026-06-21T01:26:33.2230683Z let is_new_donor = existing_donor.is_none(); +2026-06-21T01:26:33.2231216Z - let mut donor_record = existing_donor.unwrap_or_else(|| DonorRecord::new_for(donor.clone(), asset.clone())); +2026-06-21T01:26:33.2231719Z + let mut donor_record = +2026-06-21T01:26:33.2232127Z + existing_donor.unwrap_or_else(|| DonorRecord::new_for(donor.clone(), asset.clone())); +2026-06-21T01:26:33.2232550Z +2026-06-21T01:26:33.2232756Z donor_record.apply_donation( +2026-06-21T01:26:33.2233034Z &env, +2026-06-21T01:26:33.2331733Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/test/integration_tests.rs:93: +2026-06-21T01:26:33.2332508Z let end_time = env.ledger().timestamp() + 86_400; +2026-06-21T01:26:33.2332891Z let new_end_time = env.ledger().timestamp() + (2 * 86_400); +2026-06-21T01:26:33.2333215Z +2026-06-21T01:26:33.2333439Z - CampaignContract::initialize( +2026-06-21T01:26:33.2333728Z - env.clone(), +2026-06-21T01:26:33.2333960Z - creator, +2026-06-21T01:26:33.2334176Z - 1000, +2026-06-21T01:26:33.2334379Z - end_time, +2026-06-21T01:26:33.2334588Z - assets, +2026-06-21T01:26:33.2334815Z - milestones, +2026-06-21T01:26:33.2335037Z - 0, +2026-06-21T01:26:33.2335239Z - ) +2026-06-21T01:26:33.2335436Z - .unwrap(); +2026-06-21T01:26:33.2335830Z + CampaignContract::initialize(env.clone(), creator, 1000, end_time, assets, milestones, 0) +2026-06-21T01:26:33.2336279Z + .unwrap(); +2026-06-21T01:26:33.2336490Z +2026-06-21T01:26:33.2336778Z CampaignContract::extend_deadline(env.clone(), new_end_time); +2026-06-21T01:26:33.2337113Z +2026-06-21T01:26:33.2424772Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/test/negative_path_tests.rs:6: +2026-06-21T01:26:33.2425958Z #![cfg(test)] +2026-06-21T01:26:33.2426300Z +2026-06-21T01:26:33.2426743Z use soroban_sdk::testutils::{Address as AddressTestUtils, Ledger}; +2026-06-21T01:26:33.2428078Z -use soroban_sdk::{Address, Env, String, Vec, BytesN}; +2026-06-21T01:26:33.2429470Z +use soroban_sdk::{Address, BytesN, Env, String, Vec}; +2026-06-21T01:26:33.2429948Z +2026-06-21T01:26:33.2430592Z +use super::with_contract; +2026-06-21T01:26:33.2431163Z +use crate::storage::{get_campaign, set_campaign, set_donor, set_milestone}; +2026-06-21T01:26:33.2431941Z use crate::types::{ +2026-06-21T01:26:33.2432541Z - CampaignData, CampaignStatus, DonorRecord, AssetInfo, StellarAsset, MilestoneData, +2026-06-21T01:26:33.2433245Z - MilestoneStatus, Error, DataKey, +2026-06-21T01:26:33.2433930Z + AssetInfo, CampaignData, CampaignStatus, DataKey, DonorRecord, Error, MilestoneData, +2026-06-21T01:26:33.2434631Z + MilestoneStatus, StellarAsset, +2026-06-21T01:26:33.2435019Z }; +2026-06-21T01:26:33.2435479Z -use crate::storage::{set_campaign, set_donor, set_milestone, get_campaign}; +2026-06-21T01:26:33.2436169Z -use crate::{CampaignContract, MAX_DEADLINE_GAP_SECONDS}; +2026-06-21T01:26:33.2436712Z use crate::CampaignContractClient; +2026-06-21T01:26:33.2437132Z -use super::with_contract; +2026-06-21T01:26:33.2437583Z +use crate::{CampaignContract, MAX_DEADLINE_GAP_SECONDS}; +2026-06-21T01:26:33.2438066Z +2026-06-21T01:26:33.2438501Z /// Base ledger timestamp (1 year in seconds) so we can safely subtract +2026-06-21T01:26:33.2439420Z /// to simulate "past" end_times without underflow. +2026-06-21T01:26:33.2439970Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/test/negative_path_tests.rs:82: +2026-06-21T01:26:33.2440497Z set_donor(env, donor, &record); +2026-06-21T01:26:33.2440746Z } +2026-06-21T01:26:33.2440926Z +2026-06-21T01:26:33.2441115Z -fn create_donor_record( +2026-06-21T01:26:33.2441353Z - env: &Env, +2026-06-21T01:26:33.2441565Z - donor: &Address, +2026-06-21T01:26:33.2441792Z - total_donated: i128, +2026-06-21T01:26:33.2442036Z - refund_claimed: bool, +2026-06-21T01:26:33.2442271Z -) { +2026-06-21T01:26:33.2442644Z +fn create_donor_record(env: &Env, donor: &Address, total_donated: i128, refund_claimed: bool) { +2026-06-21T01:26:33.2443082Z let record = DonorRecord { +2026-06-21T01:26:33.2443336Z donor: donor.clone(), +2026-06-21T01:26:33.2443593Z total_donated, +2026-06-21T01:26:33.2444068Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/test/negative_path_tests.rs:132: +2026-06-21T01:26:33.2444629Z let creator = Address::generate(&env); +2026-06-21T01:26:33.2444964Z let end_time = env.ledger().timestamp() + 100_000; +2026-06-21T01:26:33.2445422Z let _ = CampaignContract::initialize( +2026-06-21T01:26:33.2445750Z - env.clone(), creator, 0, end_time, +2026-06-21T01:26:33.2446110Z - default_accepted_assets(&env), default_milestones(&env), 0, +2026-06-21T01:26:33.2446470Z + env.clone(), +2026-06-21T01:26:33.2446697Z + creator, +2026-06-21T01:26:33.2446910Z + 0, +2026-06-21T01:26:33.2447109Z + end_time, +2026-06-21T01:26:33.2447347Z + default_accepted_assets(&env), +2026-06-21T01:26:33.2447642Z + default_milestones(&env), +2026-06-21T01:26:33.2447896Z + 0, +2026-06-21T01:26:33.2448096Z ); +2026-06-21T01:26:33.2448281Z }); +2026-06-21T01:26:33.2448467Z } +2026-06-21T01:26:33.2449487Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/test/negative_path_tests.rs:147: +2026-06-21T01:26:33.2450160Z let creator = Address::generate(&env); +2026-06-21T01:26:33.2450508Z let end_time = env.ledger().timestamp() + 100_000; +2026-06-21T01:26:33.2450863Z let _ = CampaignContract::initialize( +2026-06-21T01:26:33.2451179Z - env.clone(), creator, -100, end_time, +2026-06-21T01:26:33.2451544Z - default_accepted_assets(&env), default_milestones(&env), 0, +2026-06-21T01:26:33.2451898Z + env.clone(), +2026-06-21T01:26:33.2452131Z + creator, +2026-06-21T01:26:33.2452345Z + -100, +2026-06-21T01:26:33.2452554Z + end_time, +2026-06-21T01:26:33.2452785Z + default_accepted_assets(&env), +2026-06-21T01:26:33.2453073Z + default_milestones(&env), +2026-06-21T01:26:33.2453542Z + 0, +2026-06-21T01:26:33.2453743Z ); +2026-06-21T01:26:33.2453930Z }); +2026-06-21T01:26:33.2454113Z } +2026-06-21T01:26:33.2454690Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/test/negative_path_tests.rs:163: +2026-06-21T01:26:33.2455236Z let creator = Address::generate(&env); +2026-06-21T01:26:33.2455556Z let end_time = env.ledger().timestamp() - 1; +2026-06-21T01:26:33.2455877Z let _ = CampaignContract::initialize( +2026-06-21T01:26:33.2456170Z - env.clone(), creator, 1000, end_time, +2026-06-21T01:26:33.2456522Z - default_accepted_assets(&env), default_milestones(&env), 0, +2026-06-21T01:26:33.2456866Z + env.clone(), +2026-06-21T01:26:33.2457083Z + creator, +2026-06-21T01:26:33.2457288Z + 1000, +2026-06-21T01:26:33.2457489Z + end_time, +2026-06-21T01:26:33.2457721Z + default_accepted_assets(&env), +2026-06-21T01:26:33.2458026Z + default_milestones(&env), +2026-06-21T01:26:33.2458287Z + 0, +2026-06-21T01:26:33.2458489Z ); +2026-06-21T01:26:33.2458879Z }); +2026-06-21T01:26:33.2459070Z } +2026-06-21T01:26:33.2459520Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/test/negative_path_tests.rs:179: +2026-06-21T01:26:33.2460083Z let end_time = env.ledger().timestamp() + 100_000; +2026-06-21T01:26:33.2460463Z let empty_assets: Vec = Vec::new(&env); +2026-06-21T01:26:33.2460808Z let _ = CampaignContract::initialize( +2026-06-21T01:26:33.2461115Z - env.clone(), creator, 1000, end_time, +2026-06-21T01:26:33.2461436Z - empty_assets, default_milestones(&env), 0, +2026-06-21T01:26:33.2461734Z + env.clone(), +2026-06-21T01:26:33.2461958Z + creator, +2026-06-21T01:26:33.2462166Z + 1000, +2026-06-21T01:26:33.2462370Z + end_time, +2026-06-21T01:26:33.2462589Z + empty_assets, +2026-06-21T01:26:33.2462837Z + default_milestones(&env), +2026-06-21T01:26:33.2463090Z + 0, +2026-06-21T01:26:33.2463282Z ); +2026-06-21T01:26:33.2463479Z }); +2026-06-21T01:26:33.2463660Z } +2026-06-21T01:26:33.2464087Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/test/negative_path_tests.rs:199: +2026-06-21T01:26:33.2464624Z issuer: Some(Address::generate(&env)), +2026-06-21T01:26:33.2464903Z }); +2026-06-21T01:26:33.2465130Z let _ = CampaignContract::initialize( +2026-06-21T01:26:33.2465424Z - env.clone(), creator, 1000, end_time, +2026-06-21T01:26:33.2465729Z - assets, default_milestones(&env), 0, +2026-06-21T01:26:33.2466007Z + env.clone(), +2026-06-21T01:26:33.2466226Z + creator, +2026-06-21T01:26:33.2466435Z + 1000, +2026-06-21T01:26:33.2466632Z + end_time, +2026-06-21T01:26:33.2466835Z + assets, +2026-06-21T01:26:33.2467054Z + default_milestones(&env), +2026-06-21T01:26:33.2467310Z + 0, +2026-06-21T01:26:33.2467507Z ); +2026-06-21T01:26:33.2467687Z }); +2026-06-21T01:26:33.2467870Z } +2026-06-21T01:26:33.2468291Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/test/negative_path_tests.rs:215: +2026-06-21T01:26:33.2469032Z let end_time = env.ledger().timestamp() + 100_000; +2026-06-21T01:26:33.2469422Z let empty_milestones: Vec = Vec::new(&env); +2026-06-21T01:26:33.2469775Z let _ = CampaignContract::initialize( +2026-06-21T01:26:33.2470068Z - env.clone(), creator, 1000, end_time, +2026-06-21T01:26:33.2470407Z - default_accepted_assets(&env), empty_milestones, 0, +2026-06-21T01:26:33.2470726Z + env.clone(), +2026-06-21T01:26:33.2470942Z + creator, +2026-06-21T01:26:33.2471144Z + 1000, +2026-06-21T01:26:33.2471548Z + end_time, +2026-06-21T01:26:33.2471783Z + default_accepted_assets(&env), +2026-06-21T01:26:33.2472220Z + empty_milestones, +2026-06-21T01:26:33.2472464Z + 0, +2026-06-21T01:26:33.2472662Z ); +2026-06-21T01:26:33.2472965Z }); +2026-06-21T01:26:33.2473148Z } +2026-06-21T01:26:33.2473579Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/test/negative_path_tests.rs:244: +2026-06-21T01:26:33.2474100Z }); +2026-06-21T01:26:33.2474311Z } +2026-06-21T01:26:33.2474541Z let _ = CampaignContract::initialize( +2026-06-21T01:26:33.2474843Z - env.clone(), creator, 6000, end_time, +2026-06-21T01:26:33.2475173Z - default_accepted_assets(&env), milestones, 0, +2026-06-21T01:26:33.2475485Z + env.clone(), +2026-06-21T01:26:33.2475704Z + creator, +2026-06-21T01:26:33.2475922Z + 6000, +2026-06-21T01:26:33.2476129Z + end_time, +2026-06-21T01:26:33.2476354Z + default_accepted_assets(&env), +2026-06-21T01:26:33.2476620Z + milestones, +2026-06-21T01:26:33.2476844Z + 0, +2026-06-21T01:26:33.2477038Z ); +2026-06-21T01:26:33.2477218Z }); +2026-06-21T01:26:33.2477407Z } +2026-06-21T01:26:33.2477855Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/test/negative_path_tests.rs:260: +2026-06-21T01:26:33.2478402Z let end_time = env.ledger().timestamp() + 100_000; +2026-06-21T01:26:33.2479023Z let mut milestones: Vec = Vec::new(&env); +2026-06-21T01:26:33.2479394Z milestones.push_back(MilestoneData { +2026-06-21T01:26:33.2479743Z - index: 0, target_amount: 500, released_amount: 0, +2026-06-21T01:26:33.2480079Z + index: 0, +2026-06-21T01:26:33.2480311Z + target_amount: 500, +2026-06-21T01:26:33.2480566Z + released_amount: 0, +2026-06-21T01:26:33.2480888Z description_hash: BytesN::from_array(&env, &[0u8; 32]), +2026-06-21T01:26:33.2481245Z status: MilestoneStatus::Locked, +2026-06-21T01:26:33.2481574Z - released_at: None, released_at_ledger: None, +2026-06-21T01:26:33.2481901Z - release_tx: None, released_to: None, +2026-06-21T01:26:33.2482208Z + released_at: None, +2026-06-21T01:26:33.2482465Z + released_at_ledger: None, +2026-06-21T01:26:33.2482734Z + release_tx: None, +2026-06-21T01:26:33.2482973Z + released_to: None, +2026-06-21T01:26:33.2483200Z }); +2026-06-21T01:26:33.2483430Z milestones.push_back(MilestoneData { +2026-06-21T01:26:33.2483750Z - index: 1, target_amount: 300, released_amount: 0, +2026-06-21T01:26:33.2484051Z + index: 1, +2026-06-21T01:26:33.2484272Z + target_amount: 300, +2026-06-21T01:26:33.2484514Z + released_amount: 0, +2026-06-21T01:26:33.2484819Z description_hash: BytesN::from_array(&env, &[0u8; 32]), +2026-06-21T01:26:33.2485161Z status: MilestoneStatus::Locked, +2026-06-21T01:26:33.2485466Z - released_at: None, released_at_ledger: None, +2026-06-21T01:26:33.2485781Z - release_tx: None, released_to: None, +2026-06-21T01:26:33.2486064Z + released_at: None, +2026-06-21T01:26:33.2486318Z + released_at_ledger: None, +2026-06-21T01:26:33.2486576Z + release_tx: None, +2026-06-21T01:26:33.2486809Z + released_to: None, +2026-06-21T01:26:33.2487034Z }); +2026-06-21T01:26:33.2487257Z let _ = CampaignContract::initialize( +2026-06-21T01:26:33.2487560Z - env.clone(), creator, 500, end_time, +2026-06-21T01:26:33.2487875Z - default_accepted_assets(&env), milestones, 0, +2026-06-21T01:26:33.2488182Z + env.clone(), +2026-06-21T01:26:33.2488406Z + creator, +2026-06-21T01:26:33.2488827Z + 500, +2026-06-21T01:26:33.2489040Z + end_time, +2026-06-21T01:26:33.2489271Z + default_accepted_assets(&env), +2026-06-21T01:26:33.2489546Z + milestones, +2026-06-21T01:26:33.2489766Z + 0, +2026-06-21T01:26:33.2490107Z ); +2026-06-21T01:26:33.2490304Z }); +2026-06-21T01:26:33.2490492Z } +2026-06-21T01:26:33.2490946Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/test/negative_path_tests.rs:290: +2026-06-21T01:26:33.2491686Z let end_time = env.ledger().timestamp() + 100_000; +2026-06-21T01:26:33.2492081Z let mut milestones: Vec = Vec::new(&env); +2026-06-21T01:26:33.2492424Z milestones.push_back(MilestoneData { +2026-06-21T01:26:33.2492743Z - index: 0, target_amount: 500, released_amount: 0, +2026-06-21T01:26:33.2493045Z + index: 0, +2026-06-21T01:26:33.2493265Z + target_amount: 500, +2026-06-21T01:26:33.2493516Z + released_amount: 0, +2026-06-21T01:26:33.2493818Z description_hash: BytesN::from_array(&env, &[0u8; 32]), +2026-06-21T01:26:33.2494169Z status: MilestoneStatus::Locked, +2026-06-21T01:26:33.2494478Z - released_at: None, released_at_ledger: None, +2026-06-21T01:26:33.2494799Z - release_tx: None, released_to: None, +2026-06-21T01:26:33.2495089Z + released_at: None, +2026-06-21T01:26:33.2495341Z + released_at_ledger: None, +2026-06-21T01:26:33.2495601Z + release_tx: None, +2026-06-21T01:26:33.2495833Z + released_to: None, +2026-06-21T01:26:33.2496110Z }); +2026-06-21T01:26:33.2496472Z let _ = CampaignContract::initialize( +2026-06-21T01:26:33.2497232Z - env.clone(), creator, 1000, end_time, +2026-06-21T01:26:33.2497750Z - default_accepted_assets(&env), milestones, 0, +2026-06-21T01:26:33.2498224Z + env.clone(), +2026-06-21T01:26:33.2498705Z + creator, +2026-06-21T01:26:33.2499027Z + 1000, +2026-06-21T01:26:33.2499331Z + end_time, +2026-06-21T01:26:33.2499691Z + default_accepted_assets(&env), +2026-06-21T01:26:33.2500112Z + milestones, +2026-06-21T01:26:33.2500454Z + 0, +2026-06-21T01:26:33.2500752Z ); +2026-06-21T01:26:33.2501047Z }); +2026-06-21T01:26:33.2501323Z } +2026-06-21T01:26:33.2502150Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/test/negative_path_tests.rs:375: +2026-06-21T01:26:33.2503076Z let creator = Address::generate(&env); +2026-06-21T01:26:33.2503604Z let end_time = env.ledger().timestamp() + 100_000; +2026-06-21T01:26:33.2504136Z let _ = CampaignContract::initialize( +2026-06-21T01:26:33.2504616Z - env.clone(), creator, 1000, end_time, +2026-06-21T01:26:33.2505204Z - default_accepted_assets(&env), default_milestones(&env), 100, +2026-06-21T01:26:33.2505768Z + env.clone(), +2026-06-21T01:26:33.2506003Z + creator, +2026-06-21T01:26:33.2506210Z + 1000, +2026-06-21T01:26:33.2506414Z + end_time, +2026-06-21T01:26:33.2506648Z + default_accepted_assets(&env), +2026-06-21T01:26:33.2506947Z + default_milestones(&env), +2026-06-21T01:26:33.2507208Z + 100, +2026-06-21T01:26:33.2507414Z ); +2026-06-21T01:26:33.2507632Z let donor = Address::generate(&env); +2026-06-21T01:26:33.2508033Z CampaignContract::donate(env.clone(), donor, 50, AssetInfo::Native); +2026-06-21T01:26:33.2509238Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/test/negative_path_tests.rs:506: +2026-06-21T01:26:33.2510055Z let creator = Address::generate(&env); +2026-06-21T01:26:33.2510391Z let end_time = env.ledger().timestamp() + 100_000; +2026-06-21T01:26:33.2510727Z let _ = CampaignContract::initialize( +2026-06-21T01:26:33.2511032Z - env.clone(), creator, 1000, end_time, +2026-06-21T01:26:33.2511395Z - default_accepted_assets(&env), default_milestones(&env), 0, +2026-06-21T01:26:33.2511741Z + env.clone(), +2026-06-21T01:26:33.2511964Z + creator, +2026-06-21T01:26:33.2512178Z + 1000, +2026-06-21T01:26:33.2512380Z + end_time, +2026-06-21T01:26:33.2512804Z + default_accepted_assets(&env), +2026-06-21T01:26:33.2513090Z + default_milestones(&env), +2026-06-21T01:26:33.2513453Z + 0, +2026-06-21T01:26:33.2513654Z ); +2026-06-21T01:26:33.2513896Z let mut campaign = get_campaign(&env).unwrap(); +2026-06-21T01:26:33.2514253Z campaign.status = CampaignStatus::GoalReached; +2026-06-21T01:26:33.2514797Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/test/negative_path_tests.rs:530: +2026-06-21T01:26:33.2515408Z // Initialize with future end_time, then manually set to past + Ended +2026-06-21T01:26:33.2515834Z let future_end = env.ledger().timestamp() + 100_000; +2026-06-21T01:26:33.2516171Z let _ = CampaignContract::initialize( +2026-06-21T01:26:33.2516490Z - env.clone(), creator.clone(), 1000, future_end, +2026-06-21T01:26:33.2516870Z - default_accepted_assets(&env), default_milestones(&env), 0, +2026-06-21T01:26:33.2517219Z + env.clone(), +2026-06-21T01:26:33.2517450Z + creator.clone(), +2026-06-21T01:26:33.2517681Z + 1000, +2026-06-21T01:26:33.2517896Z + future_end, +2026-06-21T01:26:33.2518133Z + default_accepted_assets(&env), +2026-06-21T01:26:33.2518419Z + default_milestones(&env), +2026-06-21T01:26:33.2518901Z + 0, +2026-06-21T01:26:33.2519101Z ); +2026-06-21T01:26:33.2519332Z let mut campaign = get_campaign(&env).unwrap(); +2026-06-21T01:26:33.2519727Z campaign.end_time = env.ledger().timestamp() - (31 * 24 * 60 * 60); +2026-06-21T01:26:33.2520332Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/test/negative_path_tests.rs:572: +2026-06-21T01:26:33.2520866Z let donor = Address::generate(&env); +2026-06-21T01:26:33.2521179Z create_donor_record(&env, &donor, 100, false); +2026-06-21T01:26:33.2521596Z let eligible = CampaignContract::is_refund_eligible(env.clone(), donor); +2026-06-21T01:26:33.2522151Z - assert!(!eligible, "Ended campaign with released milestone should not allow refunds"); +2026-06-21T01:26:33.2522577Z + assert!( +2026-06-21T01:26:33.2522789Z + !eligible, +2026-06-21T01:26:33.2523095Z + "Ended campaign with released milestone should not allow refunds" +2026-06-21T01:26:33.2523445Z + ); +2026-06-21T01:26:33.2523633Z }); +2026-06-21T01:26:33.2523814Z } +2026-06-21T01:26:33.2523994Z +2026-06-21T01:26:33.2524432Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/test/negative_path_tests.rs:731: +2026-06-21T01:26:33.2524963Z let donor = Address::generate(&env); +2026-06-21T01:26:33.2525274Z create_donor_record(&env, &donor, 500, false); +2026-06-21T01:26:33.2525674Z let eligible = CampaignContract::is_refund_eligible(env.clone(), donor); +2026-06-21T01:26:33.2526169Z - assert!(eligible, "Donor should be eligible for refund on cancelled campaign"); +2026-06-21T01:26:33.2526564Z + assert!( +2026-06-21T01:26:33.2526771Z + eligible, +2026-06-21T01:26:33.2527064Z + "Donor should be eligible for refund on cancelled campaign" +2026-06-21T01:26:33.2527396Z + ); +2026-06-21T01:26:33.2527580Z }); +2026-06-21T01:26:33.2527759Z } +2026-06-21T01:26:33.2527939Z +2026-06-21T01:26:33.2528355Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/test/negative_path_tests.rs:802: +2026-06-21T01:26:33.2529422Z // Initialize with future end_time, then manually set to exact boundary +2026-06-21T01:26:33.2530030Z let future_end = env.ledger().timestamp() + 100_000; +2026-06-21T01:26:33.2530379Z let _ = CampaignContract::initialize( +2026-06-21T01:26:33.2530719Z - env.clone(), creator.clone(), 1000, future_end, +2026-06-21T01:26:33.2531105Z - default_accepted_assets(&env), default_milestones(&env), 0, +2026-06-21T01:26:33.2531450Z + env.clone(), +2026-06-21T01:26:33.2531870Z + creator.clone(), +2026-06-21T01:26:33.2532116Z + 1000, +2026-06-21T01:26:33.2532326Z + future_end, +2026-06-21T01:26:33.2532570Z + default_accepted_assets(&env), +2026-06-21T01:26:33.2532990Z + default_milestones(&env), +2026-06-21T01:26:33.2533244Z + 0, +2026-06-21T01:26:33.2533447Z ); +2026-06-21T01:26:33.2533681Z let mut campaign = get_campaign(&env).unwrap(); +2026-06-21T01:26:33.2534079Z campaign.end_time = env.ledger().timestamp() - (30 * 24 * 60 * 60); +2026-06-21T01:26:33.2534680Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/test/negative_path_tests.rs:826: +2026-06-21T01:26:33.2535336Z // Initialize with future end_time, then manually set to just past boundary +2026-06-21T01:26:33.2535773Z let future_end = env.ledger().timestamp() + 100_000; +2026-06-21T01:26:33.2536117Z let _ = CampaignContract::initialize( +2026-06-21T01:26:33.2536441Z - env.clone(), creator.clone(), 1000, future_end, +2026-06-21T01:26:33.2536814Z - default_accepted_assets(&env), default_milestones(&env), 0, +2026-06-21T01:26:33.2537164Z + env.clone(), +2026-06-21T01:26:33.2537393Z + creator.clone(), +2026-06-21T01:26:33.2537619Z + 1000, +2026-06-21T01:26:33.2537825Z + future_end, +2026-06-21T01:26:33.2538060Z + default_accepted_assets(&env), +2026-06-21T01:26:33.2538348Z + default_milestones(&env), +2026-06-21T01:26:33.2538742Z + 0, +2026-06-21T01:26:33.2538954Z ); +2026-06-21T01:26:33.2539201Z let mut campaign = get_campaign(&env).unwrap(); +2026-06-21T01:26:33.2539610Z campaign.end_time = env.ledger().timestamp() - (30 * 24 * 60 * 60 + 1); +2026-06-21T01:26:33.2540229Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/test/negative_path_tests.rs:836: +2026-06-21T01:26:33.2540774Z let donor = Address::generate(&env); +2026-06-21T01:26:33.2541104Z create_donor_record(&env, &donor, 100, false); +2026-06-21T01:26:33.2541518Z let eligible = CampaignContract::is_refund_eligible(env.clone(), donor); +2026-06-21T01:26:33.2542008Z - assert!(!eligible, "Should NOT be eligible just past 30-day boundary"); +2026-06-21T01:26:33.2542365Z + assert!( +2026-06-21T01:26:33.2542579Z + !eligible, +2026-06-21T01:26:33.2542858Z + "Should NOT be eligible just past 30-day boundary" +2026-06-21T01:26:33.2543164Z + ); +2026-06-21T01:26:33.2543358Z }); +2026-06-21T01:26:33.2543545Z } +2026-06-21T01:26:33.2543732Z +2026-06-21T01:26:33.2544176Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/test/negative_path_tests.rs:864: +2026-06-21T01:26:33.2544828Z // Verify the contract is not frozen by default; upgrade should not panic on the +2026-06-21T01:26:33.2545352Z // freeze check (it will panic later when the deployer rejects the dummy hash, +2026-06-21T01:26:33.2545832Z // so we only assert that is_frozen returns false before the call). +2026-06-21T01:26:33.2546334Z - assert!(!crate::storage::is_frozen(&env), "Contract should not be frozen initially"); +2026-06-21T01:26:33.2546743Z + assert!( +2026-06-21T01:26:33.2546989Z + !crate::storage::is_frozen(&env), +2026-06-21T01:26:33.2547309Z + "Contract should not be frozen initially" +2026-06-21T01:26:33.2547594Z + ); +2026-06-21T01:26:33.2547781Z }); +2026-06-21T01:26:33.2547965Z } +2026-06-21T01:26:33.2548153Z +2026-06-21T01:26:33.2548693Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/test/negative_path_tests.rs:877: +2026-06-21T01:26:33.2549249Z CampaignContract::freeze(env.clone()); +2026-06-21T01:26:33.2549641Z assert!(crate::storage::is_frozen(&env), "Contract should be frozen"); +2026-06-21T01:26:33.2550037Z CampaignContract::unfreeze(env.clone()); +2026-06-21T01:26:33.2550691Z - assert!(!crate::storage::is_frozen(&env), "Contract should be unfrozen after unfreeze"); +2026-06-21T01:26:33.2551112Z + assert!( +2026-06-21T01:26:33.2551358Z + !crate::storage::is_frozen(&env), +2026-06-21T01:26:33.2551786Z + "Contract should be unfrozen after unfreeze" +2026-06-21T01:26:33.2552084Z + ); +2026-06-21T01:26:33.2552279Z }); +2026-06-21T01:26:33.2552466Z } +2026-06-21T01:26:33.2552645Z +2026-06-21T01:26:33.2553076Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/test/negative_path_tests.rs:906: +2026-06-21T01:26:33.2553622Z let creator = Address::generate(&env); +2026-06-21T01:26:33.2553954Z let end_time = env.ledger().timestamp() + 100_000; +2026-06-21T01:26:33.2554290Z let _ = CampaignContract::initialize( +2026-06-21T01:26:33.2554596Z - env.clone(), creator, 1000, end_time, +2026-06-21T01:26:33.2554960Z - default_accepted_assets(&env), default_milestones(&env), 0, +2026-06-21T01:26:33.2555319Z + env.clone(), +2026-06-21T01:26:33.2555549Z + creator, +2026-06-21T01:26:33.2555766Z + 1000, +2026-06-21T01:26:33.2555976Z + end_time, +2026-06-21T01:26:33.2556213Z + default_accepted_assets(&env), +2026-06-21T01:26:33.2556507Z + default_milestones(&env), +2026-06-21T01:26:33.2556920Z + 0, +2026-06-21T01:26:33.2557119Z ); +2026-06-21T01:26:33.2557306Z }); +2026-06-21T01:26:33.2557492Z } +2026-06-21T01:26:33.2557863Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/types.rs:1: +2026-06-21T01:26:33.2558320Z // src/types.rs +2026-06-21T01:26:33.2558534Z +2026-06-21T01:26:33.2559080Z -use soroban_sdk::{contracttype, contracterror, Address, BytesN, String, Vec, Env}; +2026-06-21T01:26:33.2559641Z +use soroban_sdk::{contracterror, contracttype, Address, BytesN, Env, String, Vec}; +2026-06-21T01:26:33.2560035Z +2026-06-21T01:26:33.2560584Z // ─── Error enum ─────────────────────────────────────────────────────────────── +2026-06-21T01:26:33.2560961Z +2026-06-21T01:26:33.2561343Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/types.rs:14: +2026-06-21T01:26:33.2561814Z pub enum Error { +2026-06-21T01:26:33.2562215Z // ── Requested contract error codes ──────────────────────────────────── +2026-06-21T01:26:33.2562659Z /// `initialize` called on an already-initialised contract. +2026-06-21T01:26:33.2563004Z - AlreadyInitialized = 1, +2026-06-21T01:26:33.2563291Z + AlreadyInitialized = 1, +2026-06-21T01:26:33.2563577Z /// Contract has not been initialised yet. +2026-06-21T01:26:33.2563875Z - NotInitialized = 2, +2026-06-21T01:26:33.2564137Z + NotInitialized = 2, +2026-06-21T01:26:33.2564426Z /// Caller is not authorised to perform the operation. +2026-06-21T01:26:33.2564746Z - Unauthorized = 3, +2026-06-21T01:26:33.2565135Z + Unauthorized = 3, +2026-06-21T01:26:33.2565396Z /// The campaign deadline has already passed. +2026-06-21T01:26:33.2565710Z - CampaignEnded = 4, +2026-06-21T01:26:33.2565969Z + CampaignEnded = 4, +2026-06-21T01:26:33.2566294Z /// Operation requires the campaign to be `Active` or `GoalReached`. +2026-06-21T01:26:33.2566678Z - CampaignNotActive = 5, +2026-06-21T01:26:33.2566943Z + CampaignNotActive = 5, +2026-06-21T01:26:33.2567255Z /// Donated asset is not in the campaign's accepted assets list. +2026-06-21T01:26:33.2567603Z - AssetNotAccepted = 6, +2026-06-21T01:26:33.2567875Z + AssetNotAccepted = 6, +2026-06-21T01:26:33.2568195Z /// Donation amount is below the campaign's minimum threshold. +2026-06-21T01:26:33.2568537Z - DonationTooSmall = 7, +2026-06-21T01:26:33.2569012Z + DonationTooSmall = 7, +2026-06-21T01:26:33.2569293Z /// Milestone index is out of range for this campaign. +2026-06-21T01:26:33.2569614Z - MilestoneNotFound = 8, +2026-06-21T01:26:33.2569876Z + MilestoneNotFound = 8, +2026-06-21T01:26:33.2570344Z /// Milestone has not been unlocked yet and cannot be released. +2026-06-21T01:26:33.2570717Z - MilestoneNotUnlocked = 9, +2026-06-21T01:26:33.2571105Z + MilestoneNotUnlocked = 9, +2026-06-21T01:26:33.2571471Z /// A previous milestone must be released before this one can be released. +2026-06-21T01:26:33.2571870Z PreviousMilestoneNotReleased = 10, +2026-06-21T01:26:33.2572212Z /// Cannot cancel the campaign while it still holds funds. +2026-06-21T01:26:33.2573171Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/types.rs:37: +2026-06-21T01:26:33.2573650Z - CannotCancelWithFunds = 11, +2026-06-21T01:26:33.2573936Z + CannotCancelWithFunds = 11, +2026-06-21T01:26:33.2574241Z /// Refunds are no longer permitted for this campaign. +2026-06-21T01:26:33.2574676Z - RefundWindowClosed = 12, +2026-06-21T01:26:33.2574952Z + RefundWindowClosed = 12, +2026-06-21T01:26:33.2575235Z /// `goal_amount` must be strictly positive. +2026-06-21T01:26:33.2575543Z - InvalidGoalAmount = 13, +2026-06-21T01:26:33.2575813Z + InvalidGoalAmount = 13, +2026-06-21T01:26:33.2576155Z /// `end_time` must be strictly greater than the current ledger timestamp. +2026-06-21T01:26:33.2576536Z - InvalidEndTime = 14, +2026-06-21T01:26:33.2576803Z + InvalidEndTime = 14, +2026-06-21T01:26:33.2577162Z /// Milestones must be strictly ascending and the last must equal `goal_amount`. +2026-06-21T01:26:33.2577564Z - InvalidMilestones = 15, +2026-06-21T01:26:33.2577831Z + InvalidMilestones = 15, +2026-06-21T01:26:33.2578184Z /// Contract does not hold enough funds to fulfil the requested transfer. +2026-06-21T01:26:33.2578705Z InsufficientContractBalance = 16, +2026-06-21T01:26:33.2579012Z /// A checked arithmetic operation overflowed. +2026-06-21T01:26:33.2579482Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/types.rs:49: +2026-06-21T01:26:33.2579926Z - Overflow = 17, +2026-06-21T01:26:33.2580222Z + Overflow = 17, +2026-06-21T01:26:33.2580436Z +2026-06-21T01:26:33.2581023Z // ── Additional contract errors ───────────────────────────────────────── +2026-06-21T01:26:33.2581622Z /// `accepted_assets` must be non-empty. +2026-06-21T01:26:33.2582262Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/types.rs:53: +2026-06-21T01:26:33.2582954Z - InvalidAssets = 18, +2026-06-21T01:26:33.2583445Z + InvalidAssets = 18, +2026-06-21T01:26:33.2584125Z /// `asset_code` must be non-empty and ≤ 12 characters (Stellar limit). +2026-06-21T01:26:33.2584721Z - InvalidAssetCode = 19, +2026-06-21T01:26:33.2585104Z + InvalidAssetCode = 19, +2026-06-21T01:26:33.2585553Z /// Last milestone `target_amount` does not equal `goal_amount`. +2026-06-21T01:26:33.2586052Z - MilestoneMismatch = 20, +2026-06-21T01:26:33.2586458Z + MilestoneMismatch = 20, +2026-06-21T01:26:33.2586940Z /// Milestone count must be in the range [1, MAX_MILESTONES]. +2026-06-21T01:26:33.2603140Z - InvalidMilestoneCount = 21, +2026-06-21T01:26:33.2603667Z + InvalidMilestoneCount = 21, +2026-06-21T01:26:33.2604181Z /// The requested campaign status transition is not permitted. +2026-06-21T01:26:33.2604706Z - InvalidCampaignTransition = 22, +2026-06-21T01:26:33.2605144Z + InvalidCampaignTransition = 22, +2026-06-21T01:26:33.2605667Z /// The requested milestone status transition is not permitted. +2026-06-21T01:26:33.2606190Z - InvalidMilestoneTransition = 23, +2026-06-21T01:26:33.2606608Z + InvalidMilestoneTransition = 23, +2026-06-21T01:26:33.2607258Z /// Cannot transition to `GoalReached` — raised amount < goal. +2026-06-21T01:26:33.2607757Z - GoalNotReached = 24, +2026-06-21T01:26:33.2608175Z + GoalNotReached = 24, +2026-06-21T01:26:33.2608519Z +2026-06-21T01:26:33.2609110Z /// A storage read returned an unexpectedly invalid value. +2026-06-21T01:26:33.2609887Z - InvalidStorageValue = 25, +2026-06-21T01:26:33.2610310Z + InvalidStorageValue = 25, +2026-06-21T01:26:33.2610827Z /// A storage write failed (entry too large, quota exceeded, etc.). +2026-06-21T01:26:33.2611588Z - StorageWriteError = 26, +2026-06-21T01:26:33.2611933Z + StorageWriteError = 26, +2026-06-21T01:26:33.2612184Z +2026-06-21T01:26:33.2612637Z // ── Asset / transfer ───────────────────────────────────────────────── 3x +2026-06-21T01:26:33.2613216Z /// Recipient address is the contract itself — would lock funds permanently. +2026-06-21T01:26:33.2613817Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/types.rs:74: +2026-06-21T01:26:33.2614308Z - InvalidRecipient = 30, +2026-06-21T01:26:33.2614604Z + InvalidRecipient = 30, +2026-06-21T01:26:33.2614981Z /// The asset has no issuer address; transfers require a token contract address. +2026-06-21T01:26:33.2615381Z - MissingIssuerAddress = 31, +2026-06-21T01:26:33.2615753Z + MissingIssuerAddress = 31, +2026-06-21T01:26:33.2616121Z /// Computed release amount is zero after proportional rounding. +2026-06-21T01:26:33.2616511Z - ZeroReleaseAmount = 32, +2026-06-21T01:26:33.2616793Z + ZeroReleaseAmount = 32, +2026-06-21T01:26:33.2617168Z /// `released_amount` already equals `target_amount`; nothing left to release. +2026-06-21T01:26:33.2617571Z - NothingToRelease = 33, +2026-06-21T01:26:33.2617840Z + NothingToRelease = 33, +2026-06-21T01:26:33.2618182Z /// `released_amount` would exceed `target_amount` after this operation. +2026-06-21T01:26:33.2618787Z MilestoneReleasedExceedsTarget = 34, +2026-06-21T01:26:33.2619080Z +2026-06-21T01:26:33.2619463Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/types.rs:84: +2026-06-21T01:26:33.2620140Z // ── Milestone ──────────────────────────────────────────────────────── 4x +2026-06-21T01:26:33.2620557Z /// Milestone is already in the `Released` state. +2026-06-21T01:26:33.2620901Z - MilestoneAlreadyReleased = 40, +2026-06-21T01:26:33.2621198Z + MilestoneAlreadyReleased = 40, +2026-06-21T01:26:33.2621587Z /// All milestones must be Released before the campaign can be concluded. +2026-06-21T01:26:33.2621976Z - UnreleasedMilestonesExist = 41, +2026-06-21T01:26:33.2622258Z + UnreleasedMilestonesExist = 41, +2026-06-21T01:26:33.2622514Z +2026-06-21T01:26:33.2622871Z // ── Refunds ────────────────────────────────────────────────────────── 5x +2026-06-21T01:26:33.2623311Z /// Refunds are only permitted when the campaign is `Cancelled` or +2026-06-21T01:26:33.2623854Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/types.rs:92: +2026-06-21T01:26:33.2624323Z /// `Ended` without reaching the goal. +2026-06-21T01:26:33.2624616Z - RefundNotPermitted = 50, +2026-06-21T01:26:33.2624899Z + RefundNotPermitted = 50, +2026-06-21T01:26:33.2625200Z /// No donor record found for the requesting address. +2026-06-21T01:26:33.2625529Z - NoDonorRecord = 51, +2026-06-21T01:26:33.2625792Z + NoDonorRecord = 51, +2026-06-21T01:26:33.2626087Z /// Donor has already claimed a refund for this campaign. +2026-06-21T01:26:33.2626434Z - RefundAlreadyClaimed = 52, +2026-06-21T01:26:33.2626712Z + RefundAlreadyClaimed = 52, +2026-06-21T01:26:33.2627057Z // RefundWindowClosed is defined above as RefundWindowClosed = 12 +2026-06-21T01:26:33.2627411Z +2026-06-21T01:26:33.2627792Z // ── Re-entrancy / concurrency ──────────────────────────────────────── 6x +2026-06-21T01:26:33.2628342Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/types.rs:101: +2026-06-21T01:26:33.2628961Z /// A re-entrant call was detected; operation aborted. +2026-06-21T01:26:33.2629289Z - ReentrantCall = 60, +2026-06-21T01:26:33.2629572Z + ReentrantCall = 60, +2026-06-21T01:26:33.2629808Z +2026-06-21T01:26:33.2630365Z // ── Amount validation ───────────────────────────────────────────────────────── 7x +2026-06-21T01:26:33.2630832Z /// A generic negative or otherwise invalid amount was supplied. +2026-06-21T01:26:33.2631480Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/types.rs:106: +2026-06-21T01:26:33.2631938Z - InvalidAmount = 70, +2026-06-21T01:26:33.2632207Z + InvalidAmount = 70, +2026-06-21T01:26:33.2632431Z +2026-06-21T01:26:33.2632807Z // ── Upgrade / freeze ─────────────────────────────────────────────────── 8x +2026-06-21T01:26:33.2633238Z /// Contract is frozen; all mutating operations are blocked. +2026-06-21T01:26:33.2633737Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/types.rs:110: +2026-06-21T01:26:33.2634189Z - ContractFrozen = 80, +2026-06-21T01:26:33.2634457Z + ContractFrozen = 80, +2026-06-21T01:26:33.2634683Z } +2026-06-21T01:26:33.2634865Z +2026-06-21T01:26:33.2635043Z - +2026-06-21T01:26:33.2635453Z // ─── Campaign lifecycle ─────────────────────────────────────────────────────── +2026-06-21T01:26:33.2635813Z +2026-06-21T01:26:33.2636042Z /// Campaign status with documented transition rules. +2026-06-21T01:26:33.2636537Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/types.rs:163: +2026-06-21T01:26:33.2637025Z pub fn can_transition_to(self, next: Self) -> bool { +2026-06-21T01:26:33.2637333Z matches!( +2026-06-21T01:26:33.2637558Z (self, next), +2026-06-21T01:26:33.2637838Z - (Self::Active, Self::GoalReached) +2026-06-21T01:26:33.2638155Z - | (Self::Active, Self::Ended) +2026-06-21T01:26:33.2638470Z - | (Self::Active, Self::Cancelled) +2026-06-21T01:26:33.2639030Z - | (Self::GoalReached, Self::Ended) +2026-06-21T01:26:33.2639345Z - | (Self::GoalReached, Self::Cancelled) +2026-06-21T01:26:33.2639658Z + (Self::Active, Self::GoalReached) +2026-06-21T01:26:33.2639948Z + | (Self::Active, Self::Ended) +2026-06-21T01:26:33.2640258Z + | (Self::Active, Self::Cancelled) +2026-06-21T01:26:33.2640567Z + | (Self::GoalReached, Self::Ended) +2026-06-21T01:26:33.2640910Z + | (Self::GoalReached, Self::Cancelled) +2026-06-21T01:26:33.2641217Z ) +2026-06-21T01:26:33.2641411Z } +2026-06-21T01:26:33.2641600Z } +2026-06-21T01:26:33.2641993Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/types.rs:453: +2026-06-21T01:26:33.2642448Z +2026-06-21T01:26:33.2642755Z /// Apply a new donation to this record. Panics with `Error::Overflow` if +2026-06-21T01:26:33.2643180Z /// `total_donated` or `donation_count` overflows. +2026-06-21T01:26:33.2643676Z - pub fn apply_donation(&mut self, env: &Env, amount: i128, time: u64, ledger: u32, asset: AssetInfo) { +2026-06-21T01:26:33.2644148Z - self.total_donated = self.total_donated +2026-06-21T01:26:33.2644451Z + pub fn apply_donation( +2026-06-21T01:26:33.2644693Z + &mut self, +2026-06-21T01:26:33.2645049Z + env: &Env, +2026-06-21T01:26:33.2645263Z + amount: i128, +2026-06-21T01:26:33.2645485Z + time: u64, +2026-06-21T01:26:33.2645806Z + ledger: u32, +2026-06-21T01:26:33.2646034Z + asset: AssetInfo, +2026-06-21T01:26:33.2646286Z + ) { +2026-06-21T01:26:33.2646493Z + self.total_donated = self +2026-06-21T01:26:33.2646752Z + .total_donated +2026-06-21T01:26:33.2646989Z .checked_add(amount) +2026-06-21T01:26:33.2647328Z .unwrap_or_else(|| env.panic_with_error(Error::Overflow)); +2026-06-21T01:26:33.2647693Z self.last_donation_time = time; +2026-06-21T01:26:33.2648153Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/types.rs:461: +2026-06-21T01:26:33.2648737Z self.last_donation_ledger = ledger; +2026-06-21T01:26:33.2649054Z - self.donation_count = self.donation_count +2026-06-21T01:26:33.2649362Z + self.donation_count = self +2026-06-21T01:26:33.2649643Z + .donation_count +2026-06-21T01:26:33.2649888Z .checked_add(1) +2026-06-21T01:26:33.2650196Z .unwrap_or_else(|| env.panic_with_error(Error::Overflow)); +2026-06-21T01:26:33.2650538Z self.asset = asset; +2026-06-21T01:26:33.2650947Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/types.rs:569: +2026-06-21T01:26:33.2651389Z pub asset: AssetInfo, +2026-06-21T01:26:33.2651627Z pub ledger: u32, +2026-06-21T01:26:33.2651841Z } +2026-06-21T01:26:33.2652022Z - +2026-06-21T01:26:33.2652212Z - +2026-06-21T01:26:33.2652387Z +2026-06-21T01:26:33.2739447Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/asset_issuing.rs:26: +2026-06-21T01:26:33.2740334Z pub fn from_env() -> Result { +2026-06-21T01:26:33.2740804Z dotenv::dotenv().ok(); +2026-06-21T01:26:33.2741182Z +2026-06-21T01:26:33.2741505Z - let code = env::var("ASSET_CODE") +2026-06-21T01:26:33.2742031Z - .unwrap_or_else(|_| "ORBIT".to_string()); +2026-06-21T01:26:33.2742494Z - +2026-06-21T01:26:33.2742821Z - let name = env::var("ASSET_NAME") +2026-06-21T01:26:33.2743349Z - .unwrap_or_else(|_| "OrbitChain Token".to_string()); +2026-06-21T01:26:33.2743868Z + let code = env::var("ASSET_CODE").unwrap_or_else(|_| "ORBIT".to_string()); +2026-06-21T01:26:33.2744240Z +2026-06-21T01:26:33.2744575Z + let name = env::var("ASSET_NAME").unwrap_or_else(|_| "OrbitChain Token".to_string()); +2026-06-21T01:26:33.2744972Z + +2026-06-21T01:26:33.2745250Z let issuing_secret_key = env::var("SOROBAN_ISSUING_SECRET_KEY") +2026-06-21T01:26:33.2745662Z .context("SOROBAN_ISSUING_SECRET_KEY is required")?; +2026-06-21T01:26:33.2745973Z +2026-06-21T01:26:33.2746395Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/asset_issuing.rs:74: +2026-06-21T01:26:33.2746931Z println!("Asset Code: {}", self.code); +2026-06-21T01:26:33.2747254Z println!("Asset Name: {}", self.name); +2026-06-21T01:26:33.2747617Z println!("Issuer Public Key: {}", self.issuing_public_key); +2026-06-21T01:26:33.2747954Z - +2026-06-21T01:26:33.2748143Z + +2026-06-21T01:26:33.2748361Z if self.issuing_secret_key.len() > 10 { +2026-06-21T01:26:33.2748865Z println!( +2026-06-21T01:26:33.2749123Z "Issuer Secret Key: {}...{}", +2026-06-21T01:26:33.2749638Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/asset_issuing.rs:102: +2026-06-21T01:26:33.2750212Z pub fn generate_issuing_keypair() -> Result<(String, String)> { +2026-06-21T01:26:33.2750655Z // In a real implementation, this would use the stellar-strkey crate +2026-06-21T01:26:33.2751083Z // For now, we provide guidance on how to generate keys +2026-06-21T01:26:33.2751400Z - +2026-06-21T01:26:33.2751587Z + +2026-06-21T01:26:33.2751945Z println!("🔑 Generating Issuing Keypair"); +2026-06-21T01:26:33.2752570Z println!("━━━━━━━━━━━━━━━━━━━━━━━━━━"); +2026-06-21T01:26:33.2752850Z println!(); +2026-06-21T01:26:33.2753318Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/asset_issuing.rs:115: +2026-06-21T01:26:33.2753964Z println!("Then set in your .env file:"); +2026-06-21T01:26:33.2754292Z println!(" SOROBAN_ISSUING_SECRET_KEY=S..."); +2026-06-21T01:26:33.2754623Z println!(" SOROBAN_ISSUING_PUBLIC_KEY=G..."); +2026-06-21T01:26:33.2754912Z - +2026-06-21T01:26:33.2755103Z + +2026-06-21T01:26:33.2755289Z Ok(( +2026-06-21T01:26:33.2755563Z "S_PLACEHOLDER_REPLACE_WITH_YOUR_SECRET_KEY".to_string(), +2026-06-21T01:26:33.2755962Z "G_PLACEHOLDER_REPLACE_WITH_YOUR_PUBLIC_KEY".to_string(), +2026-06-21T01:26:33.2756506Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/asset_issuing.rs:130: +2026-06-21T01:26:33.2757037Z println!("Holder: {}", config.holder_public_key); +2026-06-21T01:26:33.2757358Z println!("Network: {}", network); +2026-06-21T01:26:33.2757631Z println!(); +2026-06-21T01:26:33.2757837Z - +2026-06-21T01:26:33.2758026Z + +2026-06-21T01:26:33.2758227Z // Validate configuration +2026-06-21T01:26:33.2758501Z if config.asset_code.is_empty() { +2026-06-21T01:26:33.2758938Z anyhow::bail!("Asset code is required"); +2026-06-21T01:26:33.2759451Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/asset_issuing.rs:137: +2026-06-21T01:26:33.2759932Z } +2026-06-21T01:26:33.2760117Z - +2026-06-21T01:26:33.2760298Z + +2026-06-21T01:26:33.2760515Z if !config.asset_issuer.starts_with('G') { +2026-06-21T01:26:33.2760927Z anyhow::bail!("Asset issuer must be a valid public key starting with 'G'"); +2026-06-21T01:26:33.2761316Z } +2026-06-21T01:26:33.2761719Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/asset_issuing.rs:142: +2026-06-21T01:26:33.2762187Z - +2026-06-21T01:26:33.2762370Z + +2026-06-21T01:26:33.2762607Z if !config.holder_public_key.starts_with('G') { +2026-06-21T01:26:33.2762983Z anyhow::bail!("Holder public key must start with 'G'"); +2026-06-21T01:26:33.2763305Z } +2026-06-21T01:26:33.2763704Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/asset_issuing.rs:155: +2026-06-21T01:26:33.2764253Z println!(" soroban contract invoke \\"); +2026-06-21T01:26:33.2764728Z println!(" --network {} \\", network); +2026-06-21T01:26:33.2765206Z println!(" --source-account holder \\"); +2026-06-21T01:26:33.2765779Z - println!(" -- change_trust --asset '{}:{}'", +2026-06-21T01:26:33.2767404Z - config.asset_code, config.asset_issuer); +2026-06-21T01:26:33.2767880Z - +2026-06-21T01:26:33.2768177Z + println!( +2026-06-21T01:26:33.2768769Z + " -- change_trust --asset '{}:{}'", +2026-06-21T01:26:33.2769309Z + config.asset_code, config.asset_issuer +2026-06-21T01:26:33.2769747Z + ); +2026-06-21T01:26:33.2770032Z + +2026-06-21T01:26:33.2770310Z Ok(()) +2026-06-21T01:26:33.2770588Z } +2026-06-21T01:26:33.2770850Z +2026-06-21T01:26:33.2771527Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/asset_issuing.rs:170: +2026-06-21T01:26:33.2772340Z ) -> Result<()> { +2026-06-21T01:26:33.2772805Z println!("💰 Issuing Assets"); +2026-06-21T01:26:33.2773122Z println!("━━━━━━━━━━━━━━━━"); +2026-06-21T01:26:33.2773497Z - println!("Asset: {}:{}", asset_config.code, asset_config.issuing_public_key); +2026-06-21T01:26:33.2773947Z + println!( +2026-06-21T01:26:33.2774305Z + "Asset: {}:{}", +2026-06-21T01:26:33.2774689Z + asset_config.code, asset_config.issuing_public_key +2026-06-21T01:26:33.2775004Z + ); +2026-06-21T01:26:33.2775228Z println!("Recipient: {}", recipient); +2026-06-21T01:26:33.2775515Z println!("Amount: {}", amount); +2026-06-21T01:26:33.2775790Z println!("Network: {}", network); +2026-06-21T01:26:33.2776522Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/asset_issuing.rs:178: +2026-06-21T01:26:33.2777014Z +2026-06-21T01:26:33.2777197Z // Validate +2026-06-21T01:26:33.2777541Z asset_config.validate()?; +2026-06-21T01:26:33.2777789Z - +2026-06-21T01:26:33.2777973Z + +2026-06-21T01:26:33.2778173Z if !recipient.starts_with('G') { +2026-06-21T01:26:33.2778761Z anyhow::bail!("Recipient must be a valid public key starting with 'G'"); +2026-06-21T01:26:33.2779160Z } +2026-06-21T01:26:33.2779584Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/asset_issuing.rs:185: +2026-06-21T01:26:33.2780056Z - +2026-06-21T01:26:33.2780242Z + +2026-06-21T01:26:33.2780435Z if amount <= 0.0 { +2026-06-21T01:26:33.2780715Z anyhow::bail!("Amount must be greater than 0"); +2026-06-21T01:26:33.2781016Z } +2026-06-21T01:26:33.2781416Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/asset_issuing.rs:199: +2026-06-21T01:26:33.2781967Z println!(" --source-account issuing_account \\"); +2026-06-21T01:26:33.2782315Z println!(" --destination {} \\", recipient); +2026-06-21T01:26:33.2782639Z println!(" --amount {} \\", amount); +2026-06-21T01:26:33.2783049Z - println!(" --asset '{}:{}' \\", asset_config.code, asset_config.issuing_public_key); +2026-06-21T01:26:33.2783434Z + println!( +2026-06-21T01:26:33.2783649Z + " --asset '{}:{}' \\", +2026-06-21T01:26:33.2783955Z + asset_config.code, asset_config.issuing_public_key +2026-06-21T01:26:33.2784269Z + ); +2026-06-21T01:26:33.2784476Z println!(" --network {}", network); +2026-06-21T01:26:33.2784742Z +2026-06-21T01:26:33.2784918Z Ok(()) +2026-06-21T01:26:33.2785332Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/asset_issuing.rs:211: +2026-06-21T01:26:33.2785929Z println!("━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"); +2026-06-21T01:26:33.2786207Z +2026-06-21T01:26:33.2786444Z let asset_config = AssetConfig::from_env()?; +2026-06-21T01:26:33.2786726Z - +2026-06-21T01:26:33.2786910Z + +2026-06-21T01:26:33.2787114Z // Display current config +2026-06-21T01:26:33.2787383Z asset_config.display(); +2026-06-21T01:26:33.2787626Z println!(); +2026-06-21T01:26:33.2788154Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/blockchain_verification.rs:3: +2026-06-21T01:26:33.2789299Z //! Fetches and verifies Stellar transactions by hash, validates timestamps, +2026-06-21T01:26:33.2790074Z //! generates block explorer URLs, and supports verifiable certificates. +2026-06-21T01:26:33.2790654Z +2026-06-21T01:26:33.2790988Z -use anyhow::{Result, Context, anyhow}; +2026-06-21T01:26:33.2791441Z -use serde::{Serialize, Deserialize}; +2026-06-21T01:26:33.2791876Z +use anyhow::{anyhow, Context, Result}; +2026-06-21T01:26:33.2792307Z +use serde::{Deserialize, Serialize}; +2026-06-21T01:26:33.2792724Z use std::time::{Duration, Instant}; +2026-06-21T01:26:33.2793124Z +2026-06-21T01:26:33.2793412Z /// Transaction verification result +2026-06-21T01:26:33.2793996Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/blockchain_verification.rs:106: +2026-06-21T01:26:33.2796426Z } +2026-06-21T01:26:33.2796744Z +2026-06-21T01:26:33.2797061Z /// Verify a transaction by its hash +2026-06-21T01:26:33.2797848Z - pub async fn verify_transaction(&self, transaction_hash: &str) -> Result { +2026-06-21T01:26:33.2798805Z + pub async fn verify_transaction( +2026-06-21T01:26:33.2799216Z + &self, +2026-06-21T01:26:33.2799481Z + transaction_hash: &str, +2026-06-21T01:26:33.2799772Z + ) -> Result { +2026-06-21T01:26:33.2800088Z let start_time = Instant::now(); +2026-06-21T01:26:33.2800348Z +2026-06-21T01:26:33.2800746Z println!("🔍 Verifying transaction: {}", transaction_hash); +2026-06-21T01:26:33.2801596Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/blockchain_verification.rs:150: +2026-06-21T01:26:33.2802163Z ) -> Result { +2026-06-21T01:26:33.2802461Z let start_time = Instant::now(); +2026-06-21T01:26:33.2802839Z +2026-06-21T01:26:33.2803236Z - println!("🔐 Verifying transaction with state proof: {}", transaction_hash); +2026-06-21T01:26:33.2803643Z + println!( +2026-06-21T01:26:33.2803973Z + "🔐 Verifying transaction with state proof: {}", +2026-06-21T01:26:33.2804298Z + transaction_hash +2026-06-21T01:26:33.2804531Z + ); +2026-06-21T01:26:33.2804718Z +2026-06-21T01:26:33.2804939Z // Fetch transaction with full state +2026-06-21T01:26:33.2805337Z let tx_data = self.fetch_transaction_with_state(transaction_hash).await?; +2026-06-21T01:26:33.2805983Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/blockchain_verification.rs:190: +2026-06-21T01:26:33.2806503Z }; +2026-06-21T01:26:33.2806707Z +2026-06-21T01:26:33.2806920Z let valid = time_diff <= 60; +2026-06-21T01:26:33.2807186Z - +2026-06-21T01:26:33.2807376Z + +2026-06-21T01:26:33.2807573Z if valid { +2026-06-21T01:26:33.2807931Z println!("✅ Timestamp verified (diff: {}s)", time_diff); +2026-06-21T01:26:33.2808277Z } else { +2026-06-21T01:26:33.2809062Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/blockchain_verification.rs:207: +2026-06-21T01:26:33.2810131Z async fn fetch_transaction(&self, hash: &str) -> Result { +2026-06-21T01:26:33.2810630Z // In production, this would make an actual HTTP request to Horizon/RPC +2026-06-21T01:26:33.2811028Z // For now, simulate the structure +2026-06-21T01:26:33.2811297Z - +2026-06-21T01:26:33.2811485Z + +2026-06-21T01:26:33.2811684Z // Simulate network call +2026-06-21T01:26:33.2812009Z tokio::time::sleep(Duration::from_millis(100)).await; +2026-06-21T01:26:33.2812329Z +2026-06-21T01:26:33.2812779Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/blockchain_verification.rs:240: +2026-06-21T01:26:33.2813301Z } +2026-06-21T01:26:33.2813501Z +2026-06-21T01:26:33.2813696Z /// Verify transaction details +2026-06-21T01:26:33.2814171Z - async fn verify_transaction_details(&self, tx_data: &TransactionData) -> Result { +2026-06-21T01:26:33.2814651Z + async fn verify_transaction_details( +2026-06-21T01:26:33.2815006Z + &self, +2026-06-21T01:26:33.2815353Z + tx_data: &TransactionData, +2026-06-21T01:26:33.2815772Z + ) -> Result { +2026-06-21T01:26:33.2816215Z let mut warnings = Vec::new(); +2026-06-21T01:26:33.2816605Z +2026-06-21T01:26:33.2817295Z // Verify signature (placeholder - would use Stellar SDK in production) +2026-06-21T01:26:33.2818352Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/blockchain_verification.rs:323: +2026-06-21T01:26:33.2819789Z println!("\n📋 Transaction Verification Result"); +2026-06-21T01:26:33.2820453Z println!("━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"); +2026-06-21T01:26:33.2821043Z println!("Transaction Hash: {}", result.transaction_hash); +2026-06-21T01:26:33.2821869Z - println!("Verified: {}", if result.verified { "✅ Yes" } else { "❌ No" }); +2026-06-21T01:26:33.2822450Z + println!( +2026-06-21T01:26:33.2822776Z + "Verified: {}", +2026-06-21T01:26:33.2823293Z + if result.verified { "✅ Yes" } else { "❌ No" } +2026-06-21T01:26:33.2823754Z + ); +2026-06-21T01:26:33.2824122Z println!("Status: {}", result.details.status); +2026-06-21T01:26:33.2824575Z - +2026-06-21T01:26:33.2824847Z + +2026-06-21T01:26:33.2825186Z if let Some(ledger) = result.ledger_number { +2026-06-21T01:26:33.2825665Z println!("Ledger: {}", ledger); +2026-06-21T01:26:33.2826082Z } +2026-06-21T01:26:33.2827037Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/blockchain_verification.rs:332: +2026-06-21T01:26:33.2827898Z - +2026-06-21T01:26:33.2828315Z + +2026-06-21T01:26:33.2828787Z if let Some(time) = result.ledger_close_time { +2026-06-21T01:26:33.2829288Z println!("Timestamp: {}", time); +2026-06-21T01:26:33.2830123Z - println!("Timestamp Valid: {}", if result.details.timestamp_valid { "✅" } else { "❌" }); +2026-06-21T01:26:33.2830798Z + println!( +2026-06-21T01:26:33.2831141Z + "Timestamp Valid: {}", +2026-06-21T01:26:33.2831611Z + if result.details.timestamp_valid { +2026-06-21T01:26:33.2832111Z + "✅" +2026-06-21T01:26:33.2832447Z + } else { +2026-06-21T01:26:33.2832827Z + "❌" +2026-06-21T01:26:33.2833148Z + } +2026-06-21T01:26:33.2833537Z + ); +2026-06-21T01:26:33.2833828Z } +2026-06-21T01:26:33.2834095Z +2026-06-21T01:26:33.2834515Z println!("\n🔍 Verification Details:"); +2026-06-21T01:26:33.2835171Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/blockchain_verification.rs:339: +2026-06-21T01:26:33.2835948Z - println!(" Signature Valid: {}", if result.details.signature_valid { "✅" } else { "❌" }); +2026-06-21T01:26:33.2836594Z - println!(" Sequence Valid: {}", if result.details.sequence_valid { "✅" } else { "❌" }); +2026-06-21T01:26:33.2837279Z - println!(" Balance Sufficient: {}", if result.details.balance_sufficient { "✅" } else { "❌" }); +2026-06-21T01:26:33.2837925Z - println!(" Network Match: {}", if result.details.network_match { "✅" } else { "❌" }); +2026-06-21T01:26:33.2838326Z + println!( +2026-06-21T01:26:33.2838846Z + " Signature Valid: {}", +2026-06-21T01:26:33.2839370Z + if result.details.signature_valid { +2026-06-21T01:26:33.2839834Z + "✅" +2026-06-21T01:26:33.2840055Z + } else { +2026-06-21T01:26:33.2840319Z + "❌" +2026-06-21T01:26:33.2840585Z + } +2026-06-21T01:26:33.2840884Z + ); +2026-06-21T01:26:33.2841182Z + println!( +2026-06-21T01:26:33.2841525Z + " Sequence Valid: {}", +2026-06-21T01:26:33.2841976Z + if result.details.sequence_valid { +2026-06-21T01:26:33.2842459Z + "✅" +2026-06-21T01:26:33.2842762Z + } else { +2026-06-21T01:26:33.2843108Z + "❌" +2026-06-21T01:26:33.2843411Z + } +2026-06-21T01:26:33.2843716Z + ); +2026-06-21T01:26:33.2843990Z + println!( +2026-06-21T01:26:33.2844325Z + " Balance Sufficient: {}", +2026-06-21T01:26:33.2844792Z + if result.details.balance_sufficient { +2026-06-21T01:26:33.2845276Z + "✅" +2026-06-21T01:26:33.2845585Z + } else { +2026-06-21T01:26:33.2845937Z + "❌" +2026-06-21T01:26:33.2846232Z + } +2026-06-21T01:26:33.2846512Z + ); +2026-06-21T01:26:33.2846789Z + println!( +2026-06-21T01:26:33.2847133Z + " Network Match: {}", +2026-06-21T01:26:33.2847564Z + if result.details.network_match { +2026-06-21T01:26:33.2848041Z + "✅" +2026-06-21T01:26:33.2848346Z + } else { +2026-06-21T01:26:33.2848845Z + "❌" +2026-06-21T01:26:33.2849152Z + } +2026-06-21T01:26:33.2849438Z + ); +2026-06-21T01:26:33.2849715Z +2026-06-21T01:26:33.2850052Z if !result.details.warnings.is_empty() { +2026-06-21T01:26:33.2850620Z println!("\n⚠️ Warnings:"); +2026-06-21T01:26:33.2851504Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/blockchain_verification.rs:389: +2026-06-21T01:26:33.2852357Z } +2026-06-21T01:26:33.2852630Z +2026-06-21T01:26:33.2852990Z /// Verify the certificate's blockchain transaction +2026-06-21T01:26:33.2853804Z - pub async fn verify(&mut self, verifier: &BlockchainVerifier) -> Result<&TransactionVerification> { +2026-06-21T01:26:33.2854766Z + pub async fn verify( +2026-06-21T01:26:33.2855116Z + &mut self, +2026-06-21T01:26:33.2855456Z + verifier: &BlockchainVerifier, +2026-06-21T01:26:33.2856057Z + ) -> Result<&TransactionVerification> { +2026-06-21T01:26:33.2856718Z let verification = verifier.verify_transaction(&self.transaction_hash).await?; +2026-06-21T01:26:33.2857428Z self.verification = Some(verification); +2026-06-21T01:26:33.2857997Z - self.verified_at = Some(std::time::SystemTime::now() +2026-06-21T01:26:33.2858548Z - .duration_since(std::time::UNIX_EPOCH) +2026-06-21T01:26:33.2859152Z - .unwrap() +2026-06-21T01:26:33.2859490Z - .as_secs()); +2026-06-21T01:26:33.2859836Z - +2026-06-21T01:26:33.2860141Z + self.verified_at = Some( +2026-06-21T01:26:33.2860587Z + std::time::SystemTime::now() +2026-06-21T01:26:33.2861063Z + .duration_since(std::time::UNIX_EPOCH) +2026-06-21T01:26:33.2861525Z + .unwrap() +2026-06-21T01:26:33.2861884Z + .as_secs(), +2026-06-21T01:26:33.2862226Z + ); +2026-06-21T01:26:33.2862502Z + +2026-06-21T01:26:33.2862721Z Ok(self.verification.as_ref().unwrap()) +2026-06-21T01:26:33.2863002Z } +2026-06-21T01:26:33.2863196Z +2026-06-21T01:26:33.2863655Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/blockchain_verification.rs:422: +2026-06-21T01:26:33.2864238Z async fn test_verify_transaction() { +2026-06-21T01:26:33.2864544Z let verifier = BlockchainVerifier::new(); +2026-06-21T01:26:33.2864950Z let result = verifier.verify_transaction("test_hash_123").await.unwrap(); +2026-06-21T01:26:33.2865329Z - +2026-06-21T01:26:33.2865515Z + +2026-06-21T01:26:33.2865765Z assert_eq!(result.transaction_hash, "test_hash_123"); +2026-06-21T01:26:33.2866099Z assert!(result.verified); +2026-06-21T01:26:33.2866411Z assert!(!result.block_explorer_url.is_empty()); +2026-06-21T01:26:33.2866975Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/blockchain_verification.rs:431: +2026-06-21T01:26:33.2867514Z #[tokio::test] +2026-06-21T01:26:33.2867752Z async fn test_verify_timestamp() { +2026-06-21T01:26:33.2868055Z let verifier = BlockchainVerifier::new(); +2026-06-21T01:26:33.2868495Z - let result = verifier.verify_timestamp("test_hash_123", 1234567890).await.unwrap(); +2026-06-21T01:26:33.2869139Z - +2026-06-21T01:26:33.2869341Z + let result = verifier +2026-06-21T01:26:33.2869622Z + .verify_timestamp("test_hash_123", 1234567890) +2026-06-21T01:26:33.2869920Z + .await +2026-06-21T01:26:33.2870195Z + .unwrap(); +2026-06-21T01:26:33.2870512Z + +2026-06-21T01:26:33.2870789Z assert!(result); +2026-06-21T01:26:33.2871122Z } +2026-06-21T01:26:33.2871387Z +2026-06-21T01:26:33.2872022Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/blockchain_verification.rs:445: +2026-06-21T01:26:33.2872541Z }; +2026-06-21T01:26:33.2872810Z let verifier = BlockchainVerifier::with_config(config); +2026-06-21T01:26:33.2873187Z let url = verifier.generate_explorer_url("abc123"); +2026-06-21T01:26:33.2873502Z - +2026-06-21T01:26:33.2873685Z + +2026-06-21T01:26:33.2874034Z assert_eq!(url, "https://stellar.expert/explorer/public/tx/abc123"); +2026-06-21T01:26:33.2874402Z } +2026-06-21T01:26:33.2874584Z +2026-06-21T01:26:33.2875028Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/blockchain_verification.rs:452: +2026-06-21T01:26:33.2875569Z #[tokio::test] +2026-06-21T01:26:33.2875815Z async fn test_verifiable_certificate() { +2026-06-21T01:26:33.2876133Z - let mut cert = VerifiableCertificate::new( +2026-06-21T01:26:33.2876442Z - "cert_001".to_string(), +2026-06-21T01:26:33.2876711Z - "tx_hash_456".to_string(), +2026-06-21T01:26:33.2876972Z - ); +2026-06-21T01:26:33.2877163Z - +2026-06-21T01:26:33.2877519Z + let mut cert = +2026-06-21T01:26:33.2877894Z + VerifiableCertificate::new("cert_001".to_string(), "tx_hash_456".to_string()); +2026-06-21T01:26:33.2878422Z + +2026-06-21T01:26:33.2878738Z assert!(!cert.is_verified()); +2026-06-21T01:26:33.2878998Z - +2026-06-21T01:26:33.2879178Z + +2026-06-21T01:26:33.2879396Z let verifier = BlockchainVerifier::new(); +2026-06-21T01:26:33.2879724Z cert.verify(&verifier).await.unwrap(); +2026-06-21T01:26:33.2879996Z - +2026-06-21T01:26:33.2880179Z + +2026-06-21T01:26:33.2880374Z assert!(cert.is_verified()); +2026-06-21T01:26:33.2880656Z assert!(cert.verified_at.is_some()); +2026-06-21T01:26:33.2880963Z assert!(!cert.explorer_url().is_empty()); +2026-06-21T01:26:33.2881482Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/campaign_totals.rs:19: +2026-06-21T01:26:33.2881977Z #[must_use] +2026-06-21T01:26:33.2882178Z #[inline] +2026-06-21T01:26:33.2882536Z pub fn increment(&mut self, campaign_id: u64, asset: &str, amount: i128) -> i128 { +2026-06-21T01:26:33.2883071Z - let entry = self.asset_totals.entry((campaign_id, asset.to_string())).or_insert(0); +2026-06-21T01:26:33.2883169Z + let entry = self +2026-06-21T01:26:33.2883266Z + .asset_totals +2026-06-21T01:26:33.2883395Z + .entry((campaign_id, asset.to_string())) +2026-06-21T01:26:33.2883481Z + .or_insert(0); +2026-06-21T01:26:33.2883574Z *entry += amount; +2026-06-21T01:26:33.2883653Z *entry +2026-06-21T01:26:33.2883739Z } +2026-06-21T01:26:33.2884056Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/campaign_totals.rs:27: +2026-06-21T01:26:33.2884277Z /// Returns the total for a specific `campaign_id` + `asset`, or 0 if none recorded. +2026-06-21T01:26:33.2884367Z #[must_use] +2026-06-21T01:26:33.2884521Z pub fn get(&self, campaign_id: u64, asset: &str) -> i128 { +2026-06-21T01:26:33.2884726Z - *self.asset_totals.get(&(campaign_id, asset.to_string())).unwrap_or(&0) +2026-06-21T01:26:33.2884819Z + *self +2026-06-21T01:26:33.2884912Z + .asset_totals +2026-06-21T01:26:33.2885035Z + .get(&(campaign_id, asset.to_string())) +2026-06-21T01:26:33.2885129Z + .unwrap_or(&0) +2026-06-21T01:26:33.2885206Z } +2026-06-21T01:26:33.2885292Z +2026-06-21T01:26:33.2885586Z /// Returns all asset totals for a campaign as a map of asset → total. +2026-06-21T01:26:33.2886128Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/certificate_pdf.rs:3: +2026-06-21T01:26:33.2886469Z //! Generates PDF certificates from campaign donation data with support for +2026-06-21T01:26:33.2886724Z //! large datasets via chunked processing and streaming mode. +2026-06-21T01:26:33.2886841Z +2026-06-21T01:26:33.2887019Z -use anyhow::{Result, Context, anyhow}; +2026-06-21T01:26:33.2887179Z -use serde::{Serialize, Deserialize}; +2026-06-21T01:26:33.2887357Z +use anyhow::{anyhow, Context, Result}; +2026-06-21T01:26:33.2887518Z +use serde::{Deserialize, Serialize}; +2026-06-21T01:26:33.2887673Z use std::time::{Duration, Instant}; +2026-06-21T01:26:33.2887803Z +2026-06-21T01:26:33.2887961Z /// Configuration for PDF generation +2026-06-21T01:26:33.2888494Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/certificate_pdf.rs:131: +2026-06-21T01:26:33.2888754Z total_pages, +2026-06-21T01:26:33.2888884Z total_chunks, +2026-06-21T01:26:33.2889175Z generation_time_ms: start_time.elapsed().as_millis() as u64, +2026-06-21T01:26:33.2889548Z - error: Some(format!("Timeout after {} seconds", self.config.timeout_seconds)), +2026-06-21T01:26:33.2889699Z + error: Some(format!( +2026-06-21T01:26:33.2889880Z + "Timeout after {} seconds", +2026-06-21T01:26:33.2890041Z + self.config.timeout_seconds +2026-06-21T01:26:33.2890350Z + )), +2026-06-21T01:26:33.2890498Z is_streamed: true, +2026-06-21T01:26:33.2890749Z }); +2026-06-21T01:26:33.2890877Z } +2026-06-21T01:26:33.2891408Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/certificate_pdf.rs:138: +2026-06-21T01:26:33.2891523Z +2026-06-21T01:26:33.2891786Z - println!(" Processing chunk {}/{} ({} certificates)...", +2026-06-21T01:26:33.2892040Z - chunk_idx + 1, total_chunks, chunk.certificates.len()); +2026-06-21T01:26:33.2892175Z + println!( +2026-06-21T01:26:33.2892396Z + " Processing chunk {}/{} ({} certificates)...", +2026-06-21T01:26:33.2892530Z + chunk_idx + 1, +2026-06-21T01:26:33.2892673Z + total_chunks, +2026-06-21T01:26:33.2892837Z + chunk.certificates.len() +2026-06-21T01:26:33.2892955Z + ); +2026-06-21T01:26:33.2893077Z +2026-06-21T01:26:33.2893219Z // Process chunk +2026-06-21T01:26:33.2893518Z let chunk_pages = self.process_chunk(chunk, &mut pdf_buffer)?; +2026-06-21T01:26:33.2893936Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/certificate_pdf.rs:145: +2026-06-21T01:26:33.2894014Z +2026-06-21T01:26:33.2894111Z // Log progress +2026-06-21T01:26:33.2894301Z let progress = ((chunk_idx + 1) as f64 / total_chunks as f64) * 100.0; +2026-06-21T01:26:33.2894513Z - println!(" Progress: {:.1}% ({} pages generated)", progress, total_pages); +2026-06-21T01:26:33.2894605Z + println!( +2026-06-21T01:26:33.2894729Z + " Progress: {:.1}% ({} pages generated)", +2026-06-21T01:26:33.2894839Z + progress, total_pages +2026-06-21T01:26:33.2894925Z + ); +2026-06-21T01:26:33.2895003Z } +2026-06-21T01:26:33.2895086Z +2026-06-21T01:26:33.2895178Z // Finalize PDF +2026-06-21T01:26:33.2895505Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/certificate_pdf.rs:157: +2026-06-21T01:26:33.2895592Z +2026-06-21T01:26:33.2895722Z let generation_time = start_time.elapsed(); +2026-06-21T01:26:33.2895808Z +2026-06-21T01:26:33.2896074Z - println!("✅ PDF generation complete: {} pages in {:.2}s", +2026-06-21T01:26:33.2896216Z - total_pages, generation_time.as_secs_f64()); +2026-06-21T01:26:33.2896305Z + println!( +2026-06-21T01:26:33.2896498Z + "✅ PDF generation complete: {} pages in {:.2}s", +2026-06-21T01:26:33.2896596Z + total_pages, +2026-06-21T01:26:33.2896706Z + generation_time.as_secs_f64() +2026-06-21T01:26:33.2896787Z + ); +2026-06-21T01:26:33.2896869Z +2026-06-21T01:26:33.2896972Z Ok(PdfGenerationResult { +2026-06-21T01:26:33.2897071Z success: true, +2026-06-21T01:26:33.2897409Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/certificate_pdf.rs:217: +2026-06-21T01:26:33.2897522Z /// Split certificates into chunks +2026-06-21T01:26:33.2897769Z fn create_chunks(&self, certificates: &[CertificateData]) -> Vec { +2026-06-21T01:26:33.2897897Z let total_certs = certificates.len(); +2026-06-21T01:26:33.2898177Z - let chunks_per_set = (total_certs + self.config.pages_per_chunk - 1) / self.config.pages_per_chunk; +2026-06-21T01:26:33.2898277Z + let chunks_per_set = +2026-06-21T01:26:33.2898508Z + (total_certs + self.config.pages_per_chunk - 1) / self.config.pages_per_chunk; +2026-06-21T01:26:33.2898826Z let mut chunks = Vec::new(); +2026-06-21T01:26:33.2898911Z +2026-06-21T01:26:33.2899022Z for chunk_idx in 0..chunks_per_set { +2026-06-21T01:26:33.2899348Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/certificate_pdf.rs:224: +2026-06-21T01:26:33.2899503Z let start = chunk_idx * self.config.pages_per_chunk; +2026-06-21T01:26:33.2899827Z let end = (start + self.config.pages_per_chunk).min(total_certs); +2026-06-21T01:26:33.2899918Z - +2026-06-21T01:26:33.2900003Z + +2026-06-21T01:26:33.2900261Z let chunk_certs = certificates[start..end].to_vec(); +2026-06-21T01:26:33.2900424Z let page_count = self.estimate_page_count(&chunk_certs); +2026-06-21T01:26:33.2900500Z +2026-06-21T01:26:33.2900814Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/certificate_pdf.rs:242: +2026-06-21T01:26:33.2901026Z fn estimate_page_count(&self, certificates: &[CertificateData]) -> usize { +2026-06-21T01:26:33.2901128Z // Base: 1 page per certificate +2026-06-21T01:26:33.2901333Z // Additional pages for attachments (roughly 1 page per 5 attachments) +2026-06-21T01:26:33.2901442Z - certificates.iter().map(|cert| { +2026-06-21T01:26:33.2901558Z - 1 + (cert.attachments.len() + 4) / 5 +2026-06-21T01:26:33.2901648Z - }).sum() +2026-06-21T01:26:33.2901742Z + certificates +2026-06-21T01:26:33.2901835Z + .iter() +2026-06-21T01:26:33.2901982Z + .map(|cert| 1 + (cert.attachments.len() + 4) / 5) +2026-06-21T01:26:33.2902070Z + .sum() +2026-06-21T01:26:33.2902155Z } +2026-06-21T01:26:33.2902232Z +2026-06-21T01:26:33.2902346Z /// Initialize PDF document structure +2026-06-21T01:26:33.2902653Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/certificate_pdf.rs:257: +2026-06-21T01:26:33.2902729Z } +2026-06-21T01:26:33.2902817Z +2026-06-21T01:26:33.2902924Z /// Process a chunk of certificates +2026-06-21T01:26:33.2903017Z - fn process_chunk( +2026-06-21T01:26:33.2903114Z - &self, +2026-06-21T01:26:33.2903214Z - chunk: &CertificateChunk, +2026-06-21T01:26:33.2903316Z - buffer: &mut Vec, +2026-06-21T01:26:33.2903413Z - ) -> Result { +2026-06-21T01:26:33.2903670Z + fn process_chunk(&self, chunk: &CertificateChunk, buffer: &mut Vec) -> Result { +2026-06-21T01:26:33.2903867Z let pages = self.render_certificates(&chunk.certificates, buffer)?; +2026-06-21T01:26:33.2903954Z Ok(pages) +2026-06-21T01:26:33.2904046Z } +2026-06-21T01:26:33.2904355Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/certificate_pdf.rs:276: +2026-06-21T01:26:33.2904431Z +2026-06-21T01:26:33.2904541Z for cert in certificates { +2026-06-21T01:26:33.2904647Z // Render certificate header +2026-06-21T01:26:33.2904744Z - let cert_header = format!( +2026-06-21T01:26:33.2904853Z - "\n% Certificate: {}\n", +2026-06-21T01:26:33.2904937Z - cert.id +2026-06-21T01:26:33.2905026Z - ); +2026-06-21T01:26:33.2905194Z + let cert_header = format!("\n% Certificate: {}\n", cert.id); +2026-06-21T01:26:33.2905333Z buffer.extend_from_slice(cert_header.as_bytes()); +2026-06-21T01:26:33.2905420Z +2026-06-21T01:26:33.2905531Z // Render certificate content +2026-06-21T01:26:33.2905846Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/certificate_pdf.rs:286: +2026-06-21T01:26:33.2905951Z let content = format!( +2026-06-21T01:26:33.2906117Z "Recipient: {}\nCampaign: {}\nAmount: {}\nTimestamp: {}\n", +2026-06-21T01:26:33.2906224Z - cert.recipient_name, +2026-06-21T01:26:33.2906326Z - cert.campaign_name, +2026-06-21T01:26:33.2906416Z - cert.amount, +2026-06-21T01:26:33.2906515Z - cert.timestamp +2026-06-21T01:26:33.2906732Z + cert.recipient_name, cert.campaign_name, cert.amount, cert.timestamp +2026-06-21T01:26:33.2906812Z ); +2026-06-21T01:26:33.2906953Z buffer.extend_from_slice(content.as_bytes()); +2026-06-21T01:26:33.2907032Z +2026-06-21T01:26:33.2907344Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/certificate_pdf.rs:296: +2026-06-21T01:26:33.2907613Z if !cert.attachments.is_empty() { +2026-06-21T01:26:33.2907819Z let att_header = format!("Attachments ({}):\n", cert.attachments.len()); +2026-06-21T01:26:33.2908052Z buffer.extend_from_slice(att_header.as_bytes()); +2026-06-21T01:26:33.2908139Z - +2026-06-21T01:26:33.2908216Z + +2026-06-21T01:26:33.2908396Z for (idx, attachment) in cert.attachments.iter().enumerate() { +2026-06-21T01:26:33.2908547Z let att_line = format!(" {}. {}\n", idx + 1, attachment); +2026-06-21T01:26:33.2908808Z buffer.extend_from_slice(att_line.as_bytes()); +2026-06-21T01:26:33.2909123Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/certificate_pdf.rs:322: +2026-06-21T01:26:33.2909228Z certificates: &[CertificateData], +2026-06-21T01:26:33.2909329Z output_path: &str, +2026-06-21T01:26:33.2909441Z ) -> Result { +2026-06-21T01:26:33.2909545Z - use std::io::Write; +2026-06-21T01:26:33.2909644Z use std::fs::File; +2026-06-21T01:26:33.2909734Z + use std::io::Write; +2026-06-21T01:26:33.2909824Z +2026-06-21T01:26:33.2909931Z let start_time = Instant::now(); +2026-06-21T01:26:33.2910107Z let timeout = Duration::from_secs(self.config.timeout_seconds); +2026-06-21T01:26:33.2910416Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/certificate_pdf.rs:330: +2026-06-21T01:26:33.2910499Z +2026-06-21T01:26:33.2910620Z - let mut file = File::create(output_path) +2026-06-21T01:26:33.2910798Z - .context(format!("Failed to create file: {}", output_path))?; +2026-06-21T01:26:33.2910886Z + let mut file = +2026-06-21T01:26:33.2911145Z + File::create(output_path).context(format!("Failed to create file: {}", output_path))?; +2026-06-21T01:26:33.2911226Z +2026-06-21T01:26:33.2911316Z // Write PDF header +2026-06-21T01:26:33.2911426Z writeln!(file, "%PDF-1.4")?; +2026-06-21T01:26:33.2911746Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/certificate_pdf.rs:336: +2026-06-21T01:26:33.2911987Z - writeln!(file, "%% Generated by OrbitChain Certificate Generator (Streaming Mode)")?; +2026-06-21T01:26:33.2912077Z + writeln!( +2026-06-21T01:26:33.2912157Z + file, +2026-06-21T01:26:33.2912351Z + "%% Generated by OrbitChain Certificate Generator (Streaming Mode)" +2026-06-21T01:26:33.2912437Z + )?; +2026-06-21T01:26:33.2912512Z +2026-06-21T01:26:33.2912632Z let total_certs = certificates.len(); +2026-06-21T01:26:33.2912730Z let mut page_count = 0; +2026-06-21T01:26:33.2913035Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/certificate_pdf.rs:346: +2026-06-21T01:26:33.2913134Z success: false, +2026-06-21T01:26:33.2913264Z file_path: Some(output_path.to_string()), +2026-06-21T01:26:33.2913384Z total_pages: page_count, +2026-06-21T01:26:33.2913671Z - total_chunks: (total_certs + self.config.pages_per_chunk - 1) / self.config.pages_per_chunk, +2026-06-21T01:26:33.2913855Z + total_chunks: (total_certs + self.config.pages_per_chunk - 1) +2026-06-21T01:26:33.2913983Z + / self.config.pages_per_chunk, +2026-06-21T01:26:33.2914169Z generation_time_ms: start_time.elapsed().as_millis() as u64, +2026-06-21T01:26:33.2914397Z - error: Some(format!("Timeout after {} seconds", self.config.timeout_seconds)), +2026-06-21T01:26:33.2914498Z + error: Some(format!( +2026-06-21T01:26:33.2914610Z + "Timeout after {} seconds", +2026-06-21T01:26:33.2914723Z + self.config.timeout_seconds +2026-06-21T01:26:33.2914812Z + )), +2026-06-21T01:26:33.2914907Z is_streamed: true, +2026-06-21T01:26:33.2914997Z }); +2026-06-21T01:26:33.2915223Z } +2026-06-21T01:26:33.2915535Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/certificate_pdf.rs:359: +2026-06-21T01:26:33.2915809Z writeln!(file, "Campaign: {}", cert.campaign_name)?; +2026-06-21T01:26:33.2915938Z writeln!(file, "Amount: {}", cert.amount)?; +2026-06-21T01:26:33.2916089Z writeln!(file, "Timestamp: {}", cert.timestamp)?; +2026-06-21T01:26:33.2916178Z - +2026-06-21T01:26:33.2916256Z + +2026-06-21T01:26:33.2916381Z if !cert.attachments.is_empty() { +2026-06-21T01:26:33.2916565Z writeln!(file, "Attachments ({}):", cert.attachments.len())?; +2026-06-21T01:26:33.2916748Z for (idx, attachment) in cert.attachments.iter().enumerate() { +2026-06-21T01:26:33.2917057Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/certificate_pdf.rs:366: +2026-06-21T01:26:33.2917201Z writeln!(file, " {}. {}", idx + 1, attachment)?; +2026-06-21T01:26:33.2917292Z } +2026-06-21T01:26:33.2917376Z } +2026-06-21T01:26:33.2917458Z - +2026-06-21T01:26:33.2917542Z + +2026-06-21T01:26:33.2917645Z writeln!(file, "---")?; +2026-06-21T01:26:33.2917790Z page_count += 1 + (cert.attachments.len() + 4) / 5; +2026-06-21T01:26:33.2917890Z processed += 1; +2026-06-21T01:26:33.2918187Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/certificate_pdf.rs:375: +2026-06-21T01:26:33.2918312Z // Flush periodically to manage memory +2026-06-21T01:26:33.2918420Z if processed % 100 == 0 { +2026-06-21T01:26:33.2918510Z file.flush()?; +2026-06-21T01:26:33.2918830Z - println!(" Processed {} / {} certificates...", processed, total_certs); +2026-06-21T01:26:33.2918925Z + println!( +2026-06-21T01:26:33.2919056Z + " Processed {} / {} certificates...", +2026-06-21T01:26:33.2919165Z + processed, total_certs +2026-06-21T01:26:33.2919249Z + ); +2026-06-21T01:26:33.2919335Z } +2026-06-21T01:26:33.2919421Z } +2026-06-21T01:26:33.2919497Z +2026-06-21T01:26:33.2919806Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/certificate_pdf.rs:388: +2026-06-21T01:26:33.2919896Z success: true, +2026-06-21T01:26:33.2920027Z file_path: Some(output_path.to_string()), +2026-06-21T01:26:33.2920132Z total_pages: page_count, +2026-06-21T01:26:33.2920402Z - total_chunks: (total_certs + self.config.pages_per_chunk - 1) / self.config.pages_per_chunk, +2026-06-21T01:26:33.2920577Z + total_chunks: (total_certs + self.config.pages_per_chunk - 1) +2026-06-21T01:26:33.2920701Z + / self.config.pages_per_chunk, +2026-06-21T01:26:33.2920864Z generation_time_ms: generation_time.as_millis() as u64, +2026-06-21T01:26:33.2920962Z error: None, +2026-06-21T01:26:33.2921054Z is_streamed: true, +2026-06-21T01:26:33.2921375Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/certificate_pdf.rs:401: +2026-06-21T01:26:33.2921475Z use super::*; +2026-06-21T01:26:33.2921555Z +2026-06-21T01:26:33.2921744Z fn create_test_certificates(count: usize) -> Vec { +2026-06-21T01:26:33.2921861Z - (0..count).map(|i| CertificateData { +2026-06-21T01:26:33.2921962Z - id: format!("cert_{:04}", i), +2026-06-21T01:26:33.2922101Z - recipient_name: format!("Recipient {}", i), +2026-06-21T01:26:33.2922230Z - campaign_name: format!("Campaign {}", i % 10), +2026-06-21T01:26:33.2922333Z - amount: 1000 + (i as i128), +2026-06-21T01:26:33.2922448Z - timestamp: 1234567890 + (i as u64), +2026-06-21T01:26:33.2922543Z - attachments: if i % 5 == 0 { +2026-06-21T01:26:33.2922838Z - vec!["doc1.pdf".to_string(), "doc2.pdf".to_string()] +2026-06-21T01:26:33.2922934Z - } else { +2026-06-21T01:26:33.2923132Z - vec![] +2026-06-21T01:26:33.2923221Z - }, +2026-06-21T01:26:33.2923303Z - }).collect() +2026-06-21T01:26:33.2923395Z + (0..count) +2026-06-21T01:26:33.2923508Z + .map(|i| CertificateData { +2026-06-21T01:26:33.2923622Z + id: format!("cert_{:04}", i), +2026-06-21T01:26:33.2923767Z + recipient_name: format!("Recipient {}", i), +2026-06-21T01:26:33.2923910Z + campaign_name: format!("Campaign {}", i % 10), +2026-06-21T01:26:33.2924011Z + amount: 1000 + (i as i128), +2026-06-21T01:26:33.2924130Z + timestamp: 1234567890 + (i as u64), +2026-06-21T01:26:33.2924232Z + attachments: if i % 5 == 0 { +2026-06-21T01:26:33.2924390Z + vec!["doc1.pdf".to_string(), "doc2.pdf".to_string()] +2026-06-21T01:26:33.2924489Z + } else { +2026-06-21T01:26:33.2924576Z + vec![] +2026-06-21T01:26:33.2924666Z + }, +2026-06-21T01:26:33.2924753Z + }) +2026-06-21T01:26:33.2924845Z + .collect() +2026-06-21T01:26:33.2924938Z } +2026-06-21T01:26:33.2934078Z +2026-06-21T01:26:33.2934269Z #[test] +2026-06-21T01:26:33.2934649Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/certificate_pdf.rs:419: +2026-06-21T01:26:33.2934771Z fn test_small_pdf_generation() { +2026-06-21T01:26:33.2934944Z let generator = CertificatePdfGenerator::new(); +2026-06-21T01:26:33.2935068Z let certs = create_test_certificates(10); +2026-06-21T01:26:33.2935309Z - let result = generator.generate_pdf(&certs, "/tmp/test_small.pdf").unwrap(); +2026-06-21T01:26:33.2935399Z - +2026-06-21T01:26:33.2935497Z + let result = generator +2026-06-21T01:26:33.2935640Z + .generate_pdf(&certs, "/tmp/test_small.pdf") +2026-06-21T01:26:33.2935750Z + .unwrap(); +2026-06-21T01:26:33.2935833Z + +2026-06-21T01:26:33.2935940Z assert!(result.success); +2026-06-21T01:26:33.2936060Z assert_eq!(result.total_chunks, 1); +2026-06-21T01:26:33.2936170Z assert!(!result.is_streamed); +2026-06-21T01:26:33.2936519Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/certificate_pdf.rs:427: +2026-06-21T01:26:33.2936598Z - +2026-06-21T01:26:33.2936683Z + +2026-06-21T01:26:33.2936768Z // Cleanup +2026-06-21T01:26:33.2936925Z let _ = std::fs::remove_file("/tmp/test_small.pdf"); +2026-06-21T01:26:33.2937010Z } +2026-06-21T01:26:33.2937313Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/certificate_pdf.rs:433: +2026-06-21T01:26:33.2937442Z fn test_large_pdf_generation_with_chunking() { +2026-06-21T01:26:33.2937586Z let generator = CertificatePdfGenerator::new(); +2026-06-21T01:26:33.2937815Z let certs = create_test_certificates(150); // Should trigger chunking (>50 pages) +2026-06-21T01:26:33.2938032Z - let result = generator.generate_pdf(&certs, "/tmp/test_large.pdf").unwrap(); +2026-06-21T01:26:33.2938117Z - +2026-06-21T01:26:33.2938218Z + let result = generator +2026-06-21T01:26:33.2938346Z + .generate_pdf(&certs, "/tmp/test_large.pdf") +2026-06-21T01:26:33.2938429Z + .unwrap(); +2026-06-21T01:26:33.2938514Z + +2026-06-21T01:26:33.2938741Z assert!(result.success); +2026-06-21T01:26:33.2938849Z assert!(result.total_chunks > 1); +2026-06-21T01:26:33.2938952Z assert!(result.is_streamed); +2026-06-21T01:26:33.2939268Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/certificate_pdf.rs:441: +2026-06-21T01:26:33.2939354Z - +2026-06-21T01:26:33.2939434Z + +2026-06-21T01:26:33.2939516Z // Cleanup +2026-06-21T01:26:33.2939664Z let _ = std::fs::remove_file("/tmp/test_large.pdf"); +2026-06-21T01:26:33.2939936Z } +2026-06-21T01:26:33.2940246Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/certificate_pdf.rs:447: +2026-06-21T01:26:33.2940472Z fn test_streaming_pdf_generation() { +2026-06-21T01:26:33.2940608Z let generator = CertificatePdfGenerator::new(); +2026-06-21T01:26:33.2940731Z let certs = create_test_certificates(200); +2026-06-21T01:26:33.2941008Z - let result = generator.generate_streaming_pdf(&certs, "/tmp/test_streaming.pdf").unwrap(); +2026-06-21T01:26:33.2941086Z - +2026-06-21T01:26:33.2941186Z + let result = generator +2026-06-21T01:26:33.2941362Z + .generate_streaming_pdf(&certs, "/tmp/test_streaming.pdf") +2026-06-21T01:26:33.2941445Z + .unwrap(); +2026-06-21T01:26:33.2941527Z + +2026-06-21T01:26:33.2941622Z assert!(result.success); +2026-06-21T01:26:33.2941725Z assert!(result.is_streamed); +2026-06-21T01:26:33.2941828Z assert!(result.total_pages > 0); +2026-06-21T01:26:33.2942137Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/certificate_pdf.rs:455: +2026-06-21T01:26:33.2942223Z - +2026-06-21T01:26:33.2942305Z + +2026-06-21T01:26:33.2942393Z // Cleanup +2026-06-21T01:26:33.2942547Z let _ = std::fs::remove_file("/tmp/test_streaming.pdf"); +2026-06-21T01:26:33.2942624Z } +2026-06-21T01:26:33.2942926Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/certificate_pdf.rs:462: +2026-06-21T01:26:33.2943058Z let generator = CertificatePdfGenerator::new(); +2026-06-21T01:26:33.2943175Z let certs = create_test_certificates(150); +2026-06-21T01:26:33.2943308Z let chunks = generator.create_chunks(&certs); +2026-06-21T01:26:33.2943387Z - +2026-06-21T01:26:33.2943471Z + +2026-06-21T01:26:33.2943574Z assert!(chunks.len() > 1); +2026-06-21T01:26:33.2943787Z - assert_eq!(chunks.iter().map(|c| c.certificates.len()).sum::(), 150); +2026-06-21T01:26:33.2943881Z + assert_eq!( +2026-06-21T01:26:33.2944054Z + chunks.iter().map(|c| c.certificates.len()).sum::(), +2026-06-21T01:26:33.2944139Z + 150 +2026-06-21T01:26:33.2944225Z + ); +2026-06-21T01:26:33.2944303Z } +2026-06-21T01:26:33.2944387Z +2026-06-21T01:26:33.2944472Z #[test] +2026-06-21T01:26:33.2944790Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/certificate_pdf.rs:472: +2026-06-21T01:26:33.2944933Z let generator = CertificatePdfGenerator::new(); +2026-06-21T01:26:33.2945056Z let certs = create_test_certificates(10); +2026-06-21T01:26:33.2945197Z let pages = generator.estimate_page_count(&certs); +2026-06-21T01:26:33.2945280Z - +2026-06-21T01:26:33.2945355Z + +2026-06-21T01:26:33.2945514Z assert!(pages >= 10); // At least 1 page per certificate +2026-06-21T01:26:33.2945595Z } +2026-06-21T01:26:33.2945671Z +2026-06-21T01:26:33.2945988Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/certificate_pdf.rs:485: +2026-06-21T01:26:33.2946087Z streaming_threshold_mb: 5, +2026-06-21T01:26:33.2946177Z }; +2026-06-21T01:26:33.2946358Z let generator = CertificatePdfGenerator::with_config(config); +2026-06-21T01:26:33.2946436Z - +2026-06-21T01:26:33.2946517Z + +2026-06-21T01:26:33.2946636Z let certs = create_test_certificates(100); +2026-06-21T01:26:33.2946847Z - let result = generator.generate_pdf(&certs, "/tmp/test_config.pdf").unwrap(); +2026-06-21T01:26:33.2946933Z - +2026-06-21T01:26:33.2947026Z + let result = generator +2026-06-21T01:26:33.2947163Z + .generate_pdf(&certs, "/tmp/test_config.pdf") +2026-06-21T01:26:33.2947255Z + .unwrap(); +2026-06-21T01:26:33.2947330Z + +2026-06-21T01:26:33.2947432Z assert!(result.success); +2026-06-21T01:26:33.2947535Z assert!(result.total_chunks > 1); +2026-06-21T01:26:33.2947622Z - +2026-06-21T01:26:33.2947703Z + +2026-06-21T01:26:33.2947883Z // Cleanup +2026-06-21T01:26:33.2948035Z let _ = std::fs::remove_file("/tmp/test_config.pdf"); +2026-06-21T01:26:33.2948198Z } +2026-06-21T01:26:33.2948515Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/encrypted_vault.rs:73: +2026-06-21T01:26:33.2948710Z +2026-06-21T01:26:33.2948803Z // Load public keys +2026-06-21T01:26:33.2948965Z if let Ok(admin_pub) = env::var("SOROBAN_ADMIN_PUBLIC_KEY") { +2026-06-21T01:26:33.2949169Z - vault.public_keys.insert("admin_public_key".to_string(), admin_pub); +2026-06-21T01:26:33.2949251Z + vault +2026-06-21T01:26:33.2949345Z + .public_keys +2026-06-21T01:26:33.2949492Z + .insert("admin_public_key".to_string(), admin_pub); +2026-06-21T01:26:33.2949569Z } +2026-06-21T01:26:33.2949742Z if let Ok(issuing_pub) = env::var("SOROBAN_ISSUING_PUBLIC_KEY") { +2026-06-21T01:26:33.2949950Z - vault.public_keys.insert("issuing_public_key".to_string(), issuing_pub); +2026-06-21T01:26:33.2950039Z + vault +2026-06-21T01:26:33.2950131Z + .public_keys +2026-06-21T01:26:33.2950289Z + .insert("issuing_public_key".to_string(), issuing_pub); +2026-06-21T01:26:33.2950372Z } +2026-06-21T01:26:33.2950452Z +2026-06-21T01:26:33.2950640Z // Load encrypted keys (stored as VAR_NAME_ENCRYPTED=hex:data format) +2026-06-21T01:26:33.2950952Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/encrypted_vault.rs:83: +2026-06-21T01:26:33.2951135Z if let Ok(admin_enc) = env::var("SOROBAN_ADMIN_SECRET_KEY_ENCRYPTED") { +2026-06-21T01:26:33.2951339Z - vault.encrypted_keys.insert("admin_secret_key".to_string(), admin_enc); +2026-06-21T01:26:33.2951425Z + vault +2026-06-21T01:26:33.2951517Z + .encrypted_keys +2026-06-21T01:26:33.2951660Z + .insert("admin_secret_key".to_string(), admin_enc); +2026-06-21T01:26:33.2951746Z } +2026-06-21T01:26:33.2951930Z if let Ok(issuing_enc) = env::var("SOROBAN_ISSUING_SECRET_KEY_ENCRYPTED") { +2026-06-21T01:26:33.2952151Z - vault.encrypted_keys.insert("issuing_secret_key".to_string(), issuing_enc); +2026-06-21T01:26:33.2952229Z + vault +2026-06-21T01:26:33.2952325Z + .encrypted_keys +2026-06-21T01:26:33.2952477Z + .insert("issuing_secret_key".to_string(), issuing_enc); +2026-06-21T01:26:33.2952553Z } +2026-06-21T01:26:33.2952634Z +2026-06-21T01:26:33.2952721Z Ok(vault) +2026-06-21T01:26:33.2953027Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/encrypted_vault.rs:104: +2026-06-21T01:26:33.2953125Z // Encrypt and store +2026-06-21T01:26:33.2953266Z let key_manager = self.key_manager.as_ref().unwrap(); +2026-06-21T01:26:33.2953446Z let encrypted_hex = key_manager.export_encrypted(secret_key)?; +2026-06-21T01:26:33.2953636Z - self.encrypted_keys.insert(key_name.to_string(), encrypted_hex); +2026-06-21T01:26:33.2953728Z + self.encrypted_keys +2026-06-21T01:26:33.2953863Z + .insert(key_name.to_string(), encrypted_hex); +2026-06-21T01:26:33.2953948Z +2026-06-21T01:26:33.2954028Z Ok(()) +2026-06-21T01:26:33.2954112Z } +2026-06-21T01:26:33.2954413Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/encrypted_vault.rs:133: +2026-06-21T01:26:33.2954501Z #[must_use] +2026-06-21T01:26:33.2954727Z pub fn store_public_key(&mut self, key_name: &str, public_key: &str) -> Result<()> { +2026-06-21T01:26:33.2954856Z KeyManager::validate_public_key(public_key)?; +2026-06-21T01:26:33.2955060Z - self.public_keys.insert(key_name.to_string(), public_key.to_string()); +2026-06-21T01:26:33.2955156Z + self.public_keys +2026-06-21T01:26:33.2955306Z + .insert(key_name.to_string(), public_key.to_string()); +2026-06-21T01:26:33.2955389Z Ok(()) +2026-06-21T01:26:33.2955599Z } +2026-06-21T01:26:33.2955687Z +2026-06-21T01:26:33.2955997Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/encrypted_vault.rs:159: +2026-06-21T01:26:33.2956187Z +2026-06-21T01:26:33.2956328Z content.push_str("\n# Encrypted Secret Keys\n"); +2026-06-21T01:26:33.2956465Z for (name, encrypted) in &self.encrypted_keys { +2026-06-21T01:26:33.2956694Z - content.push_str(&format!("{}_ENCRYPTED={}\n", name.to_uppercase(), encrypted)); +2026-06-21T01:26:33.2956799Z + content.push_str(&format!( +2026-06-21T01:26:33.2956895Z + "{}_ENCRYPTED={}\n", +2026-06-21T01:26:33.2956995Z + name.to_uppercase(), +2026-06-21T01:26:33.2957087Z + encrypted +2026-06-21T01:26:33.2957167Z + )); +2026-06-21T01:26:33.2957251Z } +2026-06-21T01:26:33.2957325Z +2026-06-21T01:26:33.2957504Z fs::write(path, content).context("Failed to write vault file")?; +2026-06-21T01:26:33.2957814Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/encrypted_vault.rs:314: +2026-06-21T01:26:33.2957895Z #[test] +2026-06-21T01:26:33.2958026Z fn test_save_and_load_vault() -> Result<()> { +2026-06-21T01:26:33.2958144Z let temp_path = "/tmp/test_vault.enc"; +2026-06-21T01:26:33.2958221Z - +2026-06-21T01:26:33.2958303Z + +2026-06-21T01:26:33.2958474Z let mut vault = EncryptedVault::with_password("test_password")?; +2026-06-21T01:26:33.2958927Z - vault.store_secret_key("admin_secret_key", "SBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU")?; +2026-06-21T01:26:33.2959251Z - vault.store_public_key("admin_public_key", "GBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU")?; +2026-06-21T01:26:33.2959329Z - +2026-06-21T01:26:33.2959433Z + vault.store_secret_key( +2026-06-21T01:26:33.2959530Z + "admin_secret_key", +2026-06-21T01:26:33.2959733Z + "SBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU", +2026-06-21T01:26:33.2959823Z + )?; +2026-06-21T01:26:33.2959917Z + vault.store_public_key( +2026-06-21T01:26:33.2960010Z + "admin_public_key", +2026-06-21T01:26:33.2960207Z + "GBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU", +2026-06-21T01:26:33.2960283Z + )?; +2026-06-21T01:26:33.2960369Z + +2026-06-21T01:26:33.2960477Z vault.save_to_file(temp_path)?; +2026-06-21T01:26:33.2960553Z +2026-06-21T01:26:33.2960789Z let loaded_vault = EncryptedVault::load_from_file(temp_path, "test_password")?; +2026-06-21T01:26:33.2961123Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/encrypted_vault.rs:325: +2026-06-21T01:26:33.2961311Z let secret = loaded_vault.retrieve_secret_key("admin_secret_key")?; +2026-06-21T01:26:33.2961483Z let public = loaded_vault.retrieve_public_key("admin_public_key")?; +2026-06-21T01:26:33.2961559Z +2026-06-21T01:26:33.2961822Z - assert_eq!(secret, "SBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU"); +2026-06-21T01:26:33.2962062Z - assert_eq!(public, "GBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU"); +2026-06-21T01:26:33.2962151Z + assert_eq!( +2026-06-21T01:26:33.2962238Z + secret, +2026-06-21T01:26:33.2962433Z + "SBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU" +2026-06-21T01:26:33.2962519Z + ); +2026-06-21T01:26:33.2962605Z + assert_eq!( +2026-06-21T01:26:33.2962687Z + public, +2026-06-21T01:26:33.2962872Z + "GBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU" +2026-06-21T01:26:33.2962960Z + ); +2026-06-21T01:26:33.2963035Z +2026-06-21T01:26:33.2963124Z // Cleanup +2026-06-21T01:26:33.2963235Z let _ = fs::remove_file(temp_path); +2026-06-21T01:26:33.2963551Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/encrypted_vault.rs:336: +2026-06-21T01:26:33.2963634Z #[test] +2026-06-21T01:26:33.2963927Z fn test_export_to_env_vars() -> Result<()> { +2026-06-21T01:26:33.2964055Z let mut vault = EncryptedVault::new(); +2026-06-21T01:26:33.2964387Z - vault.store_public_key("admin_public_key", "GBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU")?; +2026-06-21T01:26:33.2964592Z + vault.store_public_key( +2026-06-21T01:26:33.2964687Z + "admin_public_key", +2026-06-21T01:26:33.2964879Z + "GBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU", +2026-06-21T01:26:33.2964964Z + )?; +2026-06-21T01:26:33.2965045Z +2026-06-21T01:26:33.2965150Z let vars = vault.export_to_env_vars(); +2026-06-21T01:26:33.2965255Z assert!(!vars.is_empty()); +2026-06-21T01:26:33.2965583Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/environment_config.rs:108: +2026-06-21T01:26:33.2965668Z } +2026-06-21T01:26:33.2965749Z +2026-06-21T01:26:33.2965897Z pub fn save_to_file(&self, path: &str) -> Result<()> { +2026-06-21T01:26:33.2966033Z - let content = toml::to_string_pretty(self) +2026-06-21T01:26:33.2966163Z - .context("Failed to serialize config")?; +2026-06-21T01:26:33.2966395Z + let content = toml::to_string_pretty(self).context("Failed to serialize config")?; +2026-06-21T01:26:33.2966575Z fs::write(path, content).context("Failed to write config file")?; +2026-06-21T01:26:33.2966655Z Ok(()) +2026-06-21T01:26:33.2966740Z } +2026-06-21T01:26:33.2967066Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/environment_config.rs:136: +2026-06-21T01:26:33.2967321Z println!("✅ Testnet configuration is valid"); +2026-06-21T01:26:33.2967523Z println!("💡 To test connection, ensure you have:"); +2026-06-21T01:26:33.2967705Z println!(" 1. Installed Soroban CLI: cargo install soroban-cli"); +2026-06-21T01:26:33.2967988Z - println!(" 2. Generated a testnet keypair: soroban keys generate test_account --network testnet"); +2026-06-21T01:26:33.2968080Z + println!( +2026-06-21T01:26:33.2968337Z + " 2. Generated a testnet keypair: soroban keys generate test_account --network testnet" +2026-06-21T01:26:33.2968424Z + ); +2026-06-21T01:26:33.2968848Z println!(" 3. Funded account from: https://laboratory.stellar.org/#account-creator?network=testnet"); +2026-06-21T01:26:33.2968925Z +2026-06-21T01:26:33.2969009Z Ok(()) +2026-06-21T01:26:33.2969318Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/key_manager.rs:105: +2026-06-21T01:26:33.2969396Z +2026-06-21T01:26:33.2969498Z let plaintext = cipher +2026-06-21T01:26:33.2969681Z .decrypt(nonce, Payload::from(encrypted.ciphertext.as_ref())) +2026-06-21T01:26:33.2969937Z - .map_err(|e| anyhow::anyhow!("Decryption failed (wrong key or corrupted data): {}", e))?; +2026-06-21T01:26:33.2970034Z + .map_err(|e| { +2026-06-21T01:26:33.2970244Z + anyhow::anyhow!("Decryption failed (wrong key or corrupted data): {}", e) +2026-06-21T01:26:33.2970336Z + })?; +2026-06-21T01:26:33.2970417Z +2026-06-21T01:26:33.2970625Z String::from_utf8(plaintext).context("Decrypted key is not valid UTF-8") +2026-06-21T01:26:33.2970718Z } +2026-06-21T01:26:33.2971016Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/key_manager.rs:132: +2026-06-21T01:26:33.2971233Z let ciphertext = hex::decode(parts[1]).context("Failed to decode ciphertext")?; +2026-06-21T01:26:33.2971317Z +2026-06-21T01:26:33.2971406Z if nonce.len() != 12 { +2026-06-21T01:26:33.2971630Z - anyhow::bail!("Invalid nonce length: expected 12 bytes, got {}", nonce.len()); +2026-06-21T01:26:33.2971722Z + anyhow::bail!( +2026-06-21T01:26:33.2971867Z + "Invalid nonce length: expected 12 bytes, got {}", +2026-06-21T01:26:33.2971965Z + nonce.len() +2026-06-21T01:26:33.2972048Z + ); +2026-06-21T01:26:33.2972126Z } +2026-06-21T01:26:33.2972208Z +2026-06-21T01:26:33.2972456Z Ok(EncryptedKey { nonce, ciphertext }) +2026-06-21T01:26:33.2972758Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/key_manager.rs:211: +2026-06-21T01:26:33.2972951Z +2026-06-21T01:26:33.2973030Z #[test] +2026-06-21T01:26:33.2973137Z fn test_validate_secret_key() { +2026-06-21T01:26:33.2973500Z - assert!(KeyManager::validate_secret_key("SBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU").is_ok()); +2026-06-21T01:26:33.2973850Z - assert!(KeyManager::validate_secret_key("GBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU").is_err()); +2026-06-21T01:26:33.2973972Z + assert!(KeyManager::validate_secret_key( +2026-06-21T01:26:33.2974164Z + "SBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU" +2026-06-21T01:26:33.2974248Z + ) +2026-06-21T01:26:33.2974334Z + .is_ok()); +2026-06-21T01:26:33.2974444Z + assert!(KeyManager::validate_secret_key( +2026-06-21T01:26:33.2974634Z + "GBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU" +2026-06-21T01:26:33.2974712Z + ) +2026-06-21T01:26:33.2974799Z + .is_err()); +2026-06-21T01:26:33.2974966Z assert!(KeyManager::validate_secret_key("short").is_err()); +2026-06-21T01:26:33.2975042Z } +2026-06-21T01:26:33.2975123Z +2026-06-21T01:26:33.2975420Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/key_manager.rs:219: +2026-06-21T01:26:33.2975498Z #[test] +2026-06-21T01:26:33.2975598Z fn test_validate_public_key() { +2026-06-21T01:26:33.2975935Z - assert!(KeyManager::validate_public_key("GBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU").is_ok()); +2026-06-21T01:26:33.2976273Z - assert!(KeyManager::validate_public_key("SBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU").is_err()); +2026-06-21T01:26:33.2976387Z + assert!(KeyManager::validate_public_key( +2026-06-21T01:26:33.2976564Z + "GBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU" +2026-06-21T01:26:33.2976651Z + ) +2026-06-21T01:26:33.2976739Z + .is_ok()); +2026-06-21T01:26:33.2976848Z + assert!(KeyManager::validate_public_key( +2026-06-21T01:26:33.2977033Z + "SBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU" +2026-06-21T01:26:33.2977110Z + ) +2026-06-21T01:26:33.2977196Z + .is_err()); +2026-06-21T01:26:33.2977278Z } +2026-06-21T01:26:33.2977352Z +2026-06-21T01:26:33.2977435Z #[test] +2026-06-21T01:26:33.2977752Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/keypair_manager.rs:1: +2026-06-21T01:26:33.2977841Z use anyhow::Result; +2026-06-21T01:26:33.2977933Z use std::env; +2026-06-21T01:26:33.2978008Z +2026-06-21T01:26:33.2978115Z -use crate::key_manager::KeyManager; +2026-06-21T01:26:33.2978236Z use crate::encrypted_vault::EncryptedVault; +2026-06-21T01:26:33.2978336Z +use crate::key_manager::KeyManager; +2026-06-21T01:26:33.2978419Z +2026-06-21T01:26:33.2978517Z /// Master keypair for the platform +2026-06-21T01:26:33.2978727Z #[derive(Debug, Clone)] +2026-06-21T01:26:33.2979046Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/keypair_manager.rs:63: +2026-06-21T01:26:33.2979220Z println!("🔑 Master Keypair"); +2026-06-21T01:26:33.2979370Z println!("━━━━━━━━━━━━━━━━"); +2026-06-21T01:26:33.2979509Z println!("Public Key: {}", self.public_key); +2026-06-21T01:26:33.2979610Z - println!("Secret Key: {}...{}", +2026-06-21T01:26:33.2979708Z - &self.secret_key[..4], +2026-06-21T01:26:33.2979790Z + println!( +2026-06-21T01:26:33.2979891Z + "Secret Key: {}...{}", +2026-06-21T01:26:33.2980003Z + &self.secret_key[..4], +2026-06-21T01:26:33.2980139Z &self.secret_key[self.secret_key.len() - 4..] +2026-06-21T01:26:33.2980223Z ); +2026-06-21T01:26:33.2980336Z println!("Network: {}", self.network); +2026-06-21T01:26:33.2980836Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/keypair_manager.rs:140: +2026-06-21T01:26:33.2980995Z println!("━━━━━━━━━━━━━━━━━━━━━"); +2026-06-21T01:26:33.2981157Z println!("Distribution Public Key: {}", self.public_key); +2026-06-21T01:26:33.2981449Z println!("Issuing Public Key: {}", self.issuing_public_key); +2026-06-21T01:26:33.2981553Z - println!("Secret Key: {}...{}", +2026-06-21T01:26:33.2981647Z - &self.secret_key[..4], +2026-06-21T01:26:33.2981734Z + println!( +2026-06-21T01:26:33.2981821Z + "Secret Key: {}...{}", +2026-06-21T01:26:33.2981924Z + &self.secret_key[..4], +2026-06-21T01:26:33.2982103Z &self.secret_key[self.secret_key.len() - 4..] +2026-06-21T01:26:33.2982191Z ); +2026-06-21T01:26:33.2982302Z println!("Network: {}", self.network); +2026-06-21T01:26:33.2982620Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/keypair_manager.rs:203: +2026-06-21T01:26:33.2982768Z println!("Account: {}", self.account_public_key); +2026-06-21T01:26:33.2982885Z println!("Network: {}", self.network); +2026-06-21T01:26:33.2983008Z println!("Balance: {} XLM", self.balance); +2026-06-21T01:26:33.2983305Z - println!("Status: {}", if self.is_funded { "✅ Funded" } else { "⏳ Not Funded" }); +2026-06-21T01:26:33.2983399Z + println!( +2026-06-21T01:26:33.2983494Z + "Status: {}", +2026-06-21T01:26:33.2983589Z + if self.is_funded { +2026-06-21T01:26:33.2983712Z + "✅ Funded" +2026-06-21T01:26:33.2983794Z + } else { +2026-06-21T01:26:33.2983920Z + "⏳ Not Funded" +2026-06-21T01:26:33.2984005Z + } +2026-06-21T01:26:33.2984082Z + ); +2026-06-21T01:26:33.2984168Z } +2026-06-21T01:26:33.2984246Z } +2026-06-21T01:26:33.2984330Z +2026-06-21T01:26:33.2984650Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/keypair_manager.rs:226: +2026-06-21T01:26:33.2984768Z let dist = DistributionAccount { +2026-06-21T01:26:33.2985049Z public_key: "GBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU".to_string(), +2026-06-21T01:26:33.2985318Z secret_key: "SBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU".to_string(), +2026-06-21T01:26:33.2985611Z - issuing_public_key: "GBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU".to_string(), +2026-06-21T01:26:33.2985864Z + issuing_public_key: "GBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU" +2026-06-21T01:26:33.2985960Z + .to_string(), +2026-06-21T01:26:33.2986066Z network: "testnet".to_string(), +2026-06-21T01:26:33.2986150Z }; +2026-06-21T01:26:33.2986262Z // Should fail because they're the same +2026-06-21T01:26:33.2986574Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/keypair_manager.rs:237: +2026-06-21T01:26:33.2986736Z fn test_account_funding_positive_amount() -> Result<()> { +2026-06-21T01:26:33.2986858Z let mut funding = AccountFunding::new( +2026-06-21T01:26:33.2987066Z "GBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU", +2026-06-21T01:26:33.2987164Z - "testnet" +2026-06-21T01:26:33.2987249Z + "testnet", +2026-06-21T01:26:33.2987332Z )?; +2026-06-21T01:26:33.2987433Z funding.fund_testnet(100.0)?; +2026-06-21T01:26:33.2987536Z assert!(funding.is_funded); +2026-06-21T01:26:33.2987847Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/keypair_manager.rs:249: +2026-06-21T01:26:33.2987995Z fn test_account_funding_invalid_amount() -> Result<()> { +2026-06-21T01:26:33.2988114Z let mut funding = AccountFunding::new( +2026-06-21T01:26:33.2988303Z "GBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU", +2026-06-21T01:26:33.2988385Z - "testnet" +2026-06-21T01:26:33.2988474Z + "testnet", +2026-06-21T01:26:33.2988663Z )?; +2026-06-21T01:26:33.2988966Z let result = funding.fund_testnet(-50.0); +2026-06-21T01:26:33.2989068Z assert!(result.is_err()); +2026-06-21T01:26:33.2989370Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/keypair_manager.rs:260: +2026-06-21T01:26:33.2989639Z fn test_account_funding_mainnet_fails() -> Result<()> { +2026-06-21T01:26:33.2989753Z let mut funding = AccountFunding::new( +2026-06-21T01:26:33.2989935Z "GBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU", +2026-06-21T01:26:33.2990024Z - "mainnet" +2026-06-21T01:26:33.2990106Z + "mainnet", +2026-06-21T01:26:33.2990188Z )?; +2026-06-21T01:26:33.2990303Z let result = funding.fund_testnet(100.0); +2026-06-21T01:26:33.2990394Z assert!(result.is_err()); +2026-06-21T01:26:33.2990661Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/lib.rs:3: +2026-06-21T01:26:33.2990873Z //! Provides modules for environment configuration, secure key management, +2026-06-21T01:26:33.2991068Z //! transaction signing, asset issuing, and campaign payment processing. +2026-06-21T01:26:33.2991148Z +2026-06-21T01:26:33.2991242Z -pub mod key_manager; +2026-06-21T01:26:33.2991338Z +pub mod asset_issuing; +2026-06-21T01:26:33.2991436Z +pub mod campaign_totals; +2026-06-21T01:26:33.2991526Z pub mod encrypted_vault; +2026-06-21T01:26:33.2991622Z pub mod environment_config; +2026-06-21T01:26:33.2991709Z -pub mod secure_vault; +2026-06-21T01:26:33.2991804Z -pub mod asset_issuing; +2026-06-21T01:26:33.2991893Z +pub mod key_manager; +2026-06-21T01:26:33.2991982Z pub mod keypair_manager; +2026-06-21T01:26:33.2992077Z -pub mod signing_request; +2026-06-21T01:26:33.2992167Z pub mod response_handler; +2026-06-21T01:26:33.2992262Z -pub mod campaign_totals; +2026-06-21T01:26:33.2992353Z +pub mod secure_vault; +2026-06-21T01:26:33.2992443Z +pub mod signing_request; +2026-06-21T01:26:33.2992540Z pub mod withdrawal_audit; +2026-06-21T01:26:33.2992636Z pub mod withdrawal_limits; +2026-06-21T01:26:33.2992718Z +2026-06-21T01:26:33.3674257Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/response_handler.rs:3: +2026-06-21T01:26:33.3674657Z //! Parses wallet signing responses, validates signed transactions, +2026-06-21T01:26:33.3674930Z //! and persists/loads them from JSON files for later submission. +2026-06-21T01:26:33.3675054Z +2026-06-21T01:26:33.3675254Z -use anyhow::{Result, Context, anyhow}; +2026-06-21T01:26:33.3675415Z -use serde::{Serialize, Deserialize}; +2026-06-21T01:26:33.3675581Z +use anyhow::{anyhow, Context, Result}; +2026-06-21T01:26:33.3675744Z +use serde::{Deserialize, Serialize}; +2026-06-21T01:26:33.3675883Z use serde_json::json; +2026-06-21T01:26:33.3676018Z use std::fs; +2026-06-21T01:26:33.3676140Z +2026-06-21T01:26:33.3676687Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/response_handler.rs:51: +2026-06-21T01:26:33.3676819Z #[must_use] +2026-06-21T01:26:33.3677158Z pub fn parse_response(response_json: &str) -> Result { +2026-06-21T01:26:33.3677327Z let parsed: serde_json::Value = +2026-06-21T01:26:33.3677518Z - serde_json::from_str(response_json) +2026-06-21T01:26:33.3677732Z - .context("Failed to parse response JSON")?; +2026-06-21T01:26:33.3678013Z + serde_json::from_str(response_json).context("Failed to parse response JSON")?; +2026-06-21T01:26:33.3678102Z +2026-06-21T01:26:33.3678205Z Ok(SignedTransaction { +2026-06-21T01:26:33.3678323Z request_id: parsed["requestId"] +2026-06-21T01:26:33.3678870Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/response_handler.rs:66: +2026-06-21T01:26:33.3678988Z signed_at: parsed["signedAt"] +2026-06-21T01:26:33.3679087Z .as_u64() +2026-06-21T01:26:33.3679273Z .unwrap_or_else(|| chrono::Local::now().timestamp() as u64), +2026-06-21T01:26:33.3679380Z - signer: parsed["signer"] +2026-06-21T01:26:33.3679801Z - .as_str() +2026-06-21T01:26:33.3679905Z - .unwrap_or("unknown") +2026-06-21T01:26:33.3680004Z - .to_string(), +2026-06-21T01:26:33.3680319Z + signer: parsed["signer"].as_str().unwrap_or("unknown").to_string(), +2026-06-21T01:26:33.3680448Z status: TransactionStatus::Signed, +2026-06-21T01:26:33.3680535Z }) +2026-06-21T01:26:33.3680619Z } +2026-06-21T01:26:33.3680937Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/response_handler.rs:95: +2026-06-21T01:26:33.3681048Z /// Save signed transaction to file. +2026-06-21T01:26:33.3681133Z #[must_use] +2026-06-21T01:26:33.3681328Z pub fn save_to_file(tx: &SignedTransaction, path: &str) -> Result<()> { +2026-06-21T01:26:33.3681459Z - let json = serde_json::to_string_pretty(tx) +2026-06-21T01:26:33.3681606Z - .context("Failed to serialize transaction")?; +2026-06-21T01:26:33.3681873Z + let json = serde_json::to_string_pretty(tx).context("Failed to serialize transaction")?; +2026-06-21T01:26:33.3681956Z +2026-06-21T01:26:33.3682061Z - fs::write(path, json) +2026-06-21T01:26:33.3682252Z - .context(format!("Failed to write transaction to {}", path))?; +2026-06-21T01:26:33.3682480Z + fs::write(path, json).context(format!("Failed to write transaction to {}", path))?; +2026-06-21T01:26:33.3682566Z +2026-06-21T01:26:33.3682650Z Ok(()) +2026-06-21T01:26:33.3682737Z } +2026-06-21T01:26:33.3683075Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/response_handler.rs:110: +2026-06-21T01:26:33.3683192Z let content = fs::read_to_string(path) +2026-06-21T01:26:33.3683370Z .context(format!("Failed to read transaction from {}", path))?; +2026-06-21T01:26:33.3683456Z +2026-06-21T01:26:33.3683565Z - serde_json::from_str(&content) +2026-06-21T01:26:33.3683702Z - .context("Failed to deserialize transaction") +2026-06-21T01:26:33.3683914Z + serde_json::from_str(&content).context("Failed to deserialize transaction") +2026-06-21T01:26:33.3683998Z } +2026-06-21T01:26:33.3684086Z +2026-06-21T01:26:33.3684240Z /// Process wallet response and return signed transaction +2026-06-21T01:26:33.3684556Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/response_handler.rs:171: +2026-06-21T01:26:33.3684632Z +2026-06-21T01:26:33.3684732Z /// Export as JSON +2026-06-21T01:26:33.3684857Z pub fn to_json(&self) -> Result { +2026-06-21T01:26:33.3684966Z - serde_json::to_string_pretty(self) +2026-06-21T01:26:33.3685095Z - .context("Failed to serialize response") +2026-06-21T01:26:33.3685306Z + serde_json::to_string_pretty(self).context("Failed to serialize response") +2026-06-21T01:26:33.3685384Z } +2026-06-21T01:26:33.3685468Z } +2026-06-21T01:26:33.3685546Z +2026-06-21T01:26:33.3685864Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/response_handler.rs:216: +2026-06-21T01:26:33.3685949Z +2026-06-21T01:26:33.3686045Z impl ResponseBuilder { +2026-06-21T01:26:33.3686159Z /// Create a test response JSON +2026-06-21T01:26:33.3686259Z - pub fn build_response( +2026-06-21T01:26:33.3686364Z - request_id: String, +2026-06-21T01:26:33.3686456Z - xdr: String, +2026-06-21T01:26:33.3686546Z - signer: String, +2026-06-21T01:26:33.3686642Z - ) -> String { +2026-06-21T01:26:33.3686871Z + pub fn build_response(request_id: String, xdr: String, signer: String) -> String { +2026-06-21T01:26:33.3686955Z json!({ +2026-06-21T01:26:33.3687060Z "requestId": request_id, +2026-06-21T01:26:33.3687146Z "xdr": xdr, +2026-06-21T01:26:33.3687458Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/response_handler.rs:257: +2026-06-21T01:26:33.3687561Z "xdr": "AAAAAA==test", +2026-06-21T01:26:33.3687900Z "signer": "GBJCHUKZMTFSLOMNC2P4TS4VJJBTCYL3SDKW3KSMSGQUZ6EFLXVX77JVH", +2026-06-21T01:26:33.3688005Z "signedAt": 1234567890 +2026-06-21T01:26:33.3688098Z - }).to_string(); +2026-06-21T01:26:33.3688264Z + }) +2026-06-21T01:26:33.3688356Z + .to_string(); +2026-06-21T01:26:33.3688435Z +2026-06-21T01:26:33.3688715Z let result = ResponseHandler::parse_response(&response); +2026-06-21T01:26:33.3688822Z assert!(result.is_ok()); +2026-06-21T01:26:33.3732069Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/security_tests.rs:82: +2026-06-21T01:26:33.3732364Z fn test_sql_payload(payload: &str) -> Result { +2026-06-21T01:26:33.3732540Z // Simulate SQL parameter validation +2026-06-21T01:26:33.3732806Z // In production, this would test against actual database queries +2026-06-21T01:26:33.3732936Z - +2026-06-21T01:26:33.3733054Z + +2026-06-21T01:26:33.3733215Z let dangerous_patterns = [ +2026-06-21T01:26:33.3733493Z - "'", "--", ";", "UNION", "SELECT", "DROP", "INSERT", "UPDATE", "DELETE", +2026-06-21T01:26:33.3733726Z - "WAITFOR", "SLEEP", "BENCHMARK", "information_schema", +2026-06-21T01:26:33.3733861Z + "'", +2026-06-21T01:26:33.3733989Z + "--", +2026-06-21T01:26:33.3734105Z + ";", +2026-06-21T01:26:33.3734281Z + "UNION", +2026-06-21T01:26:33.3734412Z + "SELECT", +2026-06-21T01:26:33.3734543Z + "DROP", +2026-06-21T01:26:33.3734666Z + "INSERT", +2026-06-21T01:26:33.3734796Z + "UPDATE", +2026-06-21T01:26:33.3734915Z + "DELETE", +2026-06-21T01:26:33.3735049Z + "WAITFOR", +2026-06-21T01:26:33.3735179Z + "SLEEP", +2026-06-21T01:26:33.3735307Z + "BENCHMARK", +2026-06-21T01:26:33.3735459Z + "information_schema", +2026-06-21T01:26:33.3735581Z ]; +2026-06-21T01:26:33.3735708Z +2026-06-21T01:26:33.3735915Z let payload_upper = payload.to_uppercase(); +2026-06-21T01:26:33.3736441Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/security_tests.rs:147: +2026-06-21T01:26:33.3736575Z +2026-06-21T01:26:33.3736737Z for payload in &test_cases { +2026-06-21T01:26:33.3736946Z let sanitized = Self::sanitize_xss(payload); +2026-06-21T01:26:33.3737077Z - +2026-06-21T01:26:33.3737192Z + +2026-06-21T01:26:33.3737374Z // Check if sanitization was effective +2026-06-21T01:26:33.3737560Z - if sanitized.contains(" String { +2026-06-21T01:26:33.3740625Z let mut sanitized = input.to_string(); +2026-06-21T01:26:33.3740754Z - +2026-06-21T01:26:33.3740871Z + +2026-06-21T01:26:33.3741019Z // Remove script tags +2026-06-21T01:26:33.3741307Z sanitized = sanitized.replace("", "</script>"); +2026-06-21T01:26:33.3742312Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/security_tests.rs:181: +2026-06-21T01:26:33.3742568Z - +2026-06-21T01:26:33.3742694Z + +2026-06-21T01:26:33.3742843Z // Remove event handlers +2026-06-21T01:26:33.3743148Z sanitized = sanitized.replace("onerror=", "data-blocked-onerror="); +2026-06-21T01:26:33.3743444Z sanitized = sanitized.replace("onload=", "data-blocked-onload="); +2026-06-21T01:26:33.3743956Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/security_tests.rs:185: +2026-06-21T01:26:33.3744258Z sanitized = sanitized.replace("onfocus=", "data-blocked-onfocus="); +2026-06-21T01:26:33.3744382Z - +2026-06-21T01:26:33.3744496Z + +2026-06-21T01:26:33.3744664Z // Remove javascript: protocol +2026-06-21T01:26:33.3745021Z sanitized = sanitized.replace("javascript:", "data-blocked-javascript:"); +2026-06-21T01:26:33.3745137Z - +2026-06-21T01:26:33.3745266Z + +2026-06-21T01:26:33.3745392Z sanitized +2026-06-21T01:26:33.3745518Z } +2026-06-21T01:26:33.3745639Z +2026-06-21T01:26:33.3746151Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/security_tests.rs:209: +2026-06-21T01:26:33.3746315Z // Test 2: Check token randomness +2026-06-21T01:26:33.3746506Z let token1 = Self::generate_csrf_token(); +2026-06-21T01:26:33.3746679Z let token2 = Self::generate_csrf_token(); +2026-06-21T01:26:33.3746804Z - +2026-06-21T01:26:33.3746920Z + +2026-06-21T01:26:33.3747066Z if token1 == token2 { +2026-06-21T01:26:33.3747254Z vulnerabilities.push(Vulnerability { +2026-06-21T01:26:33.3747471Z test_case: "Predictable CSRF token".to_string(), +2026-06-21T01:26:33.3747983Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/security_tests.rs:251: +2026-06-21T01:26:33.3748122Z /// Generate CSRF token +2026-06-21T01:26:33.3748291Z fn generate_csrf_token() -> String { +2026-06-21T01:26:33.3748449Z use std::time::SystemTime; +2026-06-21T01:26:33.3748700Z - +2026-06-21T01:26:33.3748821Z + +2026-06-21T01:26:33.3748983Z let duration = SystemTime::now() +2026-06-21T01:26:33.3749169Z .duration_since(SystemTime::UNIX_EPOCH) +2026-06-21T01:26:33.3749307Z .unwrap(); +2026-06-21T01:26:33.3749810Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/security_tests.rs:258: +2026-06-21T01:26:33.3749938Z - +2026-06-21T01:26:33.3750061Z + +2026-06-21T01:26:33.3750231Z format!("csrf_{:x}", duration.as_nanos()) +2026-06-21T01:26:33.3750359Z } +2026-06-21T01:26:33.3750490Z +2026-06-21T01:26:33.3750806Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/security_tests.rs:357: +2026-06-21T01:26:33.3750893Z +2026-06-21T01:26:33.3750996Z /// Test password policy +2026-06-21T01:26:33.3751113Z fn test_password_policy() -> bool { +2026-06-21T01:26:33.3751218Z - let weak_passwords = vec![ +2026-06-21T01:26:33.3751309Z - "password", +2026-06-21T01:26:33.3751405Z - "123456", +2026-06-21T01:26:33.3751489Z - "admin", +2026-06-21T01:26:33.3751582Z - "qwerty", +2026-06-21T01:26:33.3751669Z - ]; +2026-06-21T01:26:33.3751846Z + let weak_passwords = vec!["password", "123456", "admin", "qwerty"]; +2026-06-21T01:26:33.3751934Z +2026-06-21T01:26:33.3752040Z let mut all_rejected = true; +2026-06-21T01:26:33.3752142Z for pwd in weak_passwords { +2026-06-21T01:26:33.3752445Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/security_tests.rs:384: +2026-06-21T01:26:33.3752608Z let has_upper = password.chars().any(|c| c.is_uppercase()); +2026-06-21T01:26:33.3752762Z let has_lower = password.chars().any(|c| c.is_lowercase()); +2026-06-21T01:26:33.3753066Z let has_digit = password.chars().any(|c| c.is_numeric()); +2026-06-21T01:26:33.3753300Z - let has_special = password.chars().any(|c| "!@#$%^&*()_+-=[]{}|;:,.<>?".contains(c)); +2026-06-21T01:26:33.3753528Z + let has_special = password +2026-06-21T01:26:33.3753617Z + .chars() +2026-06-21T01:26:33.3753752Z + .any(|c| "!@#$%^&*()_+-=[]{}|;:,.<>?".contains(c)); +2026-06-21T01:26:33.3753840Z +2026-06-21T01:26:33.3753984Z has_upper && has_lower && has_digit && has_special +2026-06-21T01:26:33.3754073Z } +2026-06-21T01:26:33.3754402Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/security_tests.rs:522: +2026-06-21T01:26:33.3754500Z if input.contains('\x00') { +2026-06-21T01:26:33.3754600Z return false; +2026-06-21T01:26:33.3754687Z } +2026-06-21T01:26:33.3754766Z - +2026-06-21T01:26:33.3754848Z + +2026-06-21T01:26:33.3754944Z if input.contains("..") { +2026-06-21T01:26:33.3755041Z return false; +2026-06-21T01:26:33.3755149Z } +2026-06-21T01:26:33.3755449Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/security_tests.rs:554: +2026-06-21T01:26:33.3755537Z +2026-06-21T01:26:33.3755654Z for (input, description) in &test_cases { +2026-06-21T01:26:33.3755801Z let sanitized = Self::sanitize_input(input); +2026-06-21T01:26:33.3755888Z - +2026-06-21T01:26:33.3755966Z + +2026-06-21T01:26:33.3756082Z // Check if dangerous content remains +2026-06-21T01:26:33.3756205Z - if sanitized.contains(" String { +2026-06-21T01:26:33.3757886Z let mut sanitized = input.to_string(); +2026-06-21T01:26:33.3757967Z - +2026-06-21T01:26:33.3758050Z + +2026-06-21T01:26:33.3758148Z // HTML entity encoding +2026-06-21T01:26:33.3758276Z sanitized = sanitized.replace("<", "<"); +2026-06-21T01:26:33.3758396Z sanitized = sanitized.replace(">", ">"); +2026-06-21T01:26:33.3758930Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/security_tests.rs:587: +2026-06-21T01:26:33.3759072Z sanitized = sanitized.replace("\"", """); +2026-06-21T01:26:33.3759202Z sanitized = sanitized.replace("'", "'"); +2026-06-21T01:26:33.3759286Z - +2026-06-21T01:26:33.3759370Z + +2026-06-21T01:26:33.3759473Z // Remove dangerous protocols +2026-06-21T01:26:33.3759696Z sanitized = sanitized.replace("javascript:", ""); +2026-06-21T01:26:33.3759883Z sanitized = sanitized.replace("data:", ""); +2026-06-21T01:26:33.3760388Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/security_tests.rs:593: +2026-06-21T01:26:33.3760516Z - +2026-06-21T01:26:33.3760639Z + +2026-06-21T01:26:33.3760765Z sanitized +2026-06-21T01:26:33.3760902Z } +2026-06-21T01:26:33.3761018Z } +2026-06-21T01:26:33.3761541Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/security_tests.rs:650: +2026-06-21T01:26:33.3762033Z println!("Total Vulnerabilities: {}\n", self.total_vulnerabilities); +2026-06-21T01:26:33.3762146Z +2026-06-21T01:26:33.3762330Z for (category, result) in &self.results { +2026-06-21T01:26:33.3763113Z - let status = if result.passed { "✅ PASS" } else { "❌ FAIL" }; +2026-06-21T01:26:33.3763342Z - println!("{} {} ({} tests, {} vulnerabilities)", +2026-06-21T01:26:33.3763488Z - status, +2026-06-21T01:26:33.3763624Z - category, +2026-06-21T01:26:33.3763790Z - result.total_tests, +2026-06-21T01:26:33.3763985Z - result.vulnerabilities.len()); +2026-06-21T01:26:33.3764150Z + let status = if result.passed { +2026-06-21T01:26:33.3764344Z + "✅ PASS" +2026-06-21T01:26:33.3764471Z + } else { +2026-06-21T01:26:33.3764650Z + "❌ FAIL" +2026-06-21T01:26:33.3764748Z + }; +2026-06-21T01:26:33.3764840Z + println!( +2026-06-21T01:26:33.3764973Z + "{} {} ({} tests, {} vulnerabilities)", +2026-06-21T01:26:33.3765079Z + status, +2026-06-21T01:26:33.3765167Z + category, +2026-06-21T01:26:33.3765274Z + result.total_tests, +2026-06-21T01:26:33.3765401Z + result.vulnerabilities.len() +2026-06-21T01:26:33.3765492Z + ); +2026-06-21T01:26:33.3765579Z +2026-06-21T01:26:33.3765707Z if !result.vulnerabilities.is_empty() { +2026-06-21T01:26:33.3765839Z for vuln in &result.vulnerabilities { +2026-06-21T01:26:33.3766180Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/security_tests.rs:662: +2026-06-21T01:26:33.3766367Z - println!(" ⚠️ [{}] {} - {}", +2026-06-21T01:26:33.3766479Z - vuln.severity, +2026-06-21T01:26:33.3766584Z - vuln.test_case, +2026-06-21T01:26:33.3766699Z - vuln.description); +2026-06-21T01:26:33.3766797Z + println!( +2026-06-21T01:26:33.3766949Z + " ⚠️ [{}] {} - {}", +2026-06-21T01:26:33.3767111Z + vuln.severity, vuln.test_case, vuln.description +2026-06-21T01:26:33.3767203Z + ); +2026-06-21T01:26:33.3767293Z } +2026-06-21T01:26:33.3767379Z } +2026-06-21T01:26:33.3767461Z } +2026-06-21T01:26:33.3767776Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/security_tests.rs:671: +2026-06-21T01:26:33.3767894Z if self.total_vulnerabilities == 0 { +2026-06-21T01:26:33.3768176Z println!("🎉 All security tests passed! No vulnerabilities found."); +2026-06-21T01:26:33.3768265Z } else { +2026-06-21T01:26:33.3768533Z - println!("⚠️ {} vulnerabilities found. Review and fix immediately.", +2026-06-21T01:26:33.3768876Z - self.total_vulnerabilities); +2026-06-21T01:26:33.3769002Z + println!( +2026-06-21T01:26:33.3769247Z + "⚠️ {} vulnerabilities found. Review and fix immediately.", +2026-06-21T01:26:33.3769359Z + self.total_vulnerabilities +2026-06-21T01:26:33.3769447Z + ); +2026-06-21T01:26:33.3769536Z } +2026-06-21T01:26:33.3769626Z } +2026-06-21T01:26:33.3769706Z } +2026-06-21T01:26:33.3770077Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/signing_request.rs:3: +2026-06-21T01:26:33.3770275Z //! Builds signing requests for donation, campaign creation, and custom +2026-06-21T01:26:33.3770507Z //! transactions, with JSON serialization for wallet compatibility and QR export. +2026-06-21T01:26:33.3770585Z +2026-06-21T01:26:33.3770710Z -use anyhow::{Result, Context, anyhow}; +2026-06-21T01:26:33.3770820Z -use serde::{Serialize, Deserialize}; +2026-06-21T01:26:33.3770931Z +use anyhow::{anyhow, Context, Result}; +2026-06-21T01:26:33.3771041Z +use serde::{Deserialize, Serialize}; +2026-06-21T01:26:33.3771133Z use serde_json::json; +2026-06-21T01:26:33.3771240Z use sha2::{Digest, Sha256}; +2026-06-21T01:26:33.3771481Z use std::env; +2026-06-21T01:26:33.3771807Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/signing_request.rs:35: +2026-06-21T01:26:33.3772160Z env::var("SOROBAN_NETWORK").unwrap_or_else(|_| "testnet".to_string()) +2026-06-21T01:26:33.3772244Z }); +2026-06-21T01:26:33.3772330Z +2026-06-21T01:26:33.3772429Z - let id = format!( +2026-06-21T01:26:33.3772512Z - "req_{}", +2026-06-21T01:26:33.3772641Z - chrono::Local::now().timestamp_millis() +2026-06-21T01:26:33.3772723Z - ); +2026-06-21T01:26:33.3772907Z + let id = format!("req_{}", chrono::Local::now().timestamp_millis()); +2026-06-21T01:26:33.3772995Z +2026-06-21T01:26:33.3773099Z Ok(SigningRequestBuilder { +2026-06-21T01:26:33.3773188Z id, +2026-06-21T01:26:33.3773500Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/signing_request.rs:83: +2026-06-21T01:26:33.3773594Z asset: String, +2026-06-21T01:26:33.3773701Z memo: Option, +2026-06-21T01:26:33.3773803Z ) -> Result { +2026-06-21T01:26:33.3773906Z - let desc = format!( +2026-06-21T01:26:33.3774018Z - "Donate {} {} to campaign #{}", +2026-06-21T01:26:33.3774118Z - amount, asset, campaign_id +2026-06-21T01:26:33.3774219Z - ); +2026-06-21T01:26:33.3774559Z + let desc = format!("Donate {} {} to campaign #{}", amount, asset, campaign_id); +2026-06-21T01:26:33.3774686Z +2026-06-21T01:26:33.3774961Z // Placeholder XDR - in real implementation, this would be built from actual transaction +2026-06-21T01:26:33.3775065Z - let transaction_xdr = format!( +2026-06-21T01:26:33.3775168Z - "AAAAAA=={}{}{}", +2026-06-21T01:26:33.3775292Z - donor_address, campaign_id, amount +2026-06-21T01:26:33.3775375Z - ); +2026-06-21T01:26:33.3775610Z + let transaction_xdr = format!("AAAAAA=={}{}{}", donor_address, campaign_id, amount); +2026-06-21T01:26:33.3775698Z +2026-06-21T01:26:33.3775909Z - let mut builder = SigningRequestBuilder::new(transaction_xdr, None)? +2026-06-21T01:26:33.3776025Z - .with_description(desc); +2026-06-21T01:26:33.3776298Z + let mut builder = SigningRequestBuilder::new(transaction_xdr, None)?.with_description(desc); +2026-06-21T01:26:33.3776385Z +2026-06-21T01:26:33.3776489Z if let Some(m) = memo { +2026-06-21T01:26:33.3776652Z let desc = format!("{} [memo: {}]", builder.description, m); +2026-06-21T01:26:33.3776985Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/signing_request.rs:117: +2026-06-21T01:26:33.3777089Z title, goal, deadline +2026-06-21T01:26:33.3777172Z ); +2026-06-21T01:26:33.3777256Z +2026-06-21T01:26:33.3777358Z - let transaction_xdr = format!( +2026-06-21T01:26:33.3777457Z - "AAAAAA=={}{}{}{}", +2026-06-21T01:26:33.3777583Z - creator_address, title, goal, deadline +2026-06-21T01:26:33.3777667Z - ); +2026-06-21T01:26:33.3777917Z + let transaction_xdr = format!("AAAAAA=={}{}{}{}", creator_address, title, goal, deadline); +2026-06-21T01:26:33.3777999Z +2026-06-21T01:26:33.3778161Z SigningRequestBuilder::new(transaction_xdr, None)? +2026-06-21T01:26:33.3778265Z .with_description(desc) +2026-06-21T01:26:33.3778742Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/signing_request.rs:132: +2026-06-21T01:26:33.3778934Z /// Convert signing request to JSON for transmission. +2026-06-21T01:26:33.3779026Z #[must_use] +2026-06-21T01:26:33.3779148Z pub fn to_json(&self) -> Result { +2026-06-21T01:26:33.3779267Z - serde_json::to_string_pretty(self) +2026-06-21T01:26:33.3779428Z - .context("Failed to serialize signing request to JSON") +2026-06-21T01:26:33.3779687Z + serde_json::to_string_pretty(self).context("Failed to serialize signing request to JSON") +2026-06-21T01:26:33.3779919Z } +2026-06-21T01:26:33.3780000Z +2026-06-21T01:26:33.3780107Z /// Create from JSON string. +2026-06-21T01:26:33.3780427Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/signing_request.rs:140: +2026-06-21T01:26:33.3780629Z #[must_use] +2026-06-21T01:26:33.3780760Z pub fn from_json(json: &str) -> Result { +2026-06-21T01:26:33.3780865Z - serde_json::from_str(json) +2026-06-21T01:26:33.3781040Z - .context("Failed to deserialize signing request from JSON") +2026-06-21T01:26:33.3781284Z + serde_json::from_str(json).context("Failed to deserialize signing request from JSON") +2026-06-21T01:26:33.3781367Z } +2026-06-21T01:26:33.3781455Z +2026-06-21T01:26:33.3781633Z /// Convert to wallet signing format (for Freighter and similar) +2026-06-21T01:26:33.3781936Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/signing_request.rs:231: +2026-06-21T01:26:33.3782342Z /// Issue #132 – Sign using the secret key stored in the SOROBAN_SECRET_KEY env var. +2026-06-21T01:26:33.3782470Z #[must_use] +2026-06-21T01:26:33.3782662Z pub fn sign_from_env(&self) -> Result { +2026-06-21T01:26:33.3782813Z - let secret_key = env::var("SOROBAN_SECRET_KEY") +2026-06-21T01:26:33.3782967Z - .context("SOROBAN_SECRET_KEY not set in environment")?; +2026-06-21T01:26:33.3783069Z + let secret_key = +2026-06-21T01:26:33.3783315Z + env::var("SOROBAN_SECRET_KEY").context("SOROBAN_SECRET_KEY not set in environment")?; +2026-06-21T01:26:33.3783422Z self.sign_server_side(&secret_key) +2026-06-21T01:26:33.3783509Z } +2026-06-21T01:26:33.3783589Z } +2026-06-21T01:26:33.3783910Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/signing_request.rs:324: +2026-06-21T01:26:33.3784030Z description: "Test".to_string(), +2026-06-21T01:26:33.3784121Z created_at: 0, +2026-06-21T01:26:33.3784209Z }; +2026-06-21T01:26:33.3784590Z - let sig1 = req.sign_server_side("SBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU").unwrap().signature; +2026-06-21T01:26:33.3784946Z - let sig2 = req.sign_server_side("SCZANGBA5QDPSBM5QOTSXSI7JKEFYABMUQRPTGMWNJKFA5ENDNSQSTE").unwrap().signature; +2026-06-21T01:26:33.3785050Z + let sig1 = req +2026-06-21T01:26:33.3785470Z + .sign_server_side("SBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU") +2026-06-21T01:26:33.3785608Z + .unwrap() +2026-06-21T01:26:33.3785760Z + .signature; +2026-06-21T01:26:33.3785897Z + let sig2 = req +2026-06-21T01:26:33.3786163Z + .sign_server_side("SCZANGBA5QDPSBM5QOTSXSI7JKEFYABMUQRPTGMWNJKFA5ENDNSQSTE") +2026-06-21T01:26:33.3786255Z + .unwrap() +2026-06-21T01:26:33.3786344Z + .signature; +2026-06-21T01:26:33.3786446Z assert_ne!(sig1, sig2); +2026-06-21T01:26:33.3786525Z } +2026-06-21T01:26:33.3786612Z +2026-06-21T01:26:33.3796605Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/streaming_processor.rs:3: +2026-06-21T01:26:33.3796937Z //! Processes large datasets in configurable batch sizes with memory limits, +2026-06-21T01:26:33.3797299Z //! disk-based cache support, per-chunk aggregation, and chunked file loading. +2026-06-21T01:26:33.3797426Z +2026-06-21T01:26:33.3797603Z -use anyhow::{Result, Context, anyhow}; +2026-06-21T01:26:33.3797780Z -use serde::{Serialize, Deserialize}; +2026-06-21T01:26:33.3797940Z +use anyhow::{anyhow, Context, Result}; +2026-06-21T01:26:33.3798111Z +use serde::{Deserialize, Serialize}; +2026-06-21T01:26:33.3798281Z use std::collections::VecDeque; +2026-06-21T01:26:33.3798436Z use std::marker::PhantomData; +2026-06-21T01:26:33.3798827Z use std::time::{Duration, Instant}; +2026-06-21T01:26:33.3799389Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/streaming_processor.rs:56: +2026-06-21T01:26:33.3799553Z start_time: Option, +2026-06-21T01:26:33.3799870Z } +2026-06-21T01:26:33.3800000Z +2026-06-21T01:26:33.3800166Z -impl StreamingProcessor +2026-06-21T01:26:33.3800318Z +impl StreamingProcessor +2026-06-21T01:26:33.3800580Z where +2026-06-21T01:26:33.3800870Z T: Serialize + for<'de> Deserialize<'de> + Clone + std::fmt::Debug, +2026-06-21T01:26:33.3800998Z { +2026-06-21T01:26:33.3801566Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/streaming_processor.rs:100: +2026-06-21T01:26:33.3801678Z +2026-06-21T01:26:33.3801946Z /// Process a large dataset using streaming/chunked approach +2026-06-21T01:26:33.3802083Z #[must_use] +2026-06-21T01:26:33.3802237Z - pub fn process_stream( +2026-06-21T01:26:33.3802367Z - &mut self, +2026-06-21T01:26:33.3802496Z - data: &[T], +2026-06-21T01:26:33.3802643Z - mut processor: F, +2026-06-21T01:26:33.3802783Z - ) -> Result> +2026-06-21T01:26:33.3803167Z + pub fn process_stream(&mut self, data: &[T], mut processor: F) -> Result> +2026-06-21T01:26:33.3803299Z where +2026-06-21T01:26:33.3803452Z F: FnMut(&[T]) -> Result>, +2026-06-21T01:26:33.3803585Z { +2026-06-21T01:26:33.3804149Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/streaming_processor.rs:112: +2026-06-21T01:26:33.3804301Z let total_records = data.len(); +2026-06-21T01:26:33.3804471Z let mut results = Vec::new(); +2026-06-21T01:26:33.3804596Z +2026-06-21T01:26:33.3805072Z - println!("🔄 Processing {} records in streaming mode...", total_records); +2026-06-21T01:26:33.3805212Z + println!( +2026-06-21T01:26:33.3805506Z + "🔄 Processing {} records in streaming mode...", +2026-06-21T01:26:33.3805648Z + total_records +2026-06-21T01:26:33.3805780Z + ); +2026-06-21T01:26:33.3806041Z println!(" Batch size: {} records", self.config.batch_size); +2026-06-21T01:26:33.3806294Z println!(" Max memory: {} MB", self.config.max_memory_mb); +2026-06-21T01:26:33.3806429Z +2026-06-21T01:26:33.3806980Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/streaming_processor.rs:140: +2026-06-21T01:26:33.3807138Z // Log progress +2026-06-21T01:26:33.3807512Z let progress = (self.stats.total_processed as f64 / total_records as f64) * 100.0; +2026-06-21T01:26:33.3807743Z let elapsed = self.start_time.unwrap().elapsed(); +2026-06-21T01:26:33.3807871Z - +2026-06-21T01:26:33.3808281Z - if self.stats.batches_processed % 10 == 0 || self.stats.total_processed == total_records { +2026-06-21T01:26:33.3808715Z - println!(" Progress: {:.1}% ({}/{} records, {:.2}s elapsed)", +2026-06-21T01:26:33.3809106Z - progress, self.stats.total_processed, total_records, elapsed.as_secs_f64()); +2026-06-21T01:26:33.3809220Z + +2026-06-21T01:26:33.3809629Z + if self.stats.batches_processed % 10 == 0 || self.stats.total_processed == total_records +2026-06-21T01:26:33.3809759Z + { +2026-06-21T01:26:33.3809891Z + println!( +2026-06-21T01:26:33.3810119Z + " Progress: {:.1}% ({}/{} records, {:.2}s elapsed)", +2026-06-21T01:26:33.3810256Z + progress, +2026-06-21T01:26:33.3810431Z + self.stats.total_processed, +2026-06-21T01:26:33.3810581Z + total_records, +2026-06-21T01:26:33.3810729Z + elapsed.as_secs_f64() +2026-06-21T01:26:33.3810859Z + ); +2026-06-21T01:26:33.3810976Z } +2026-06-21T01:26:33.3811097Z +2026-06-21T01:26:33.3811251Z // Periodic flush if needed +2026-06-21T01:26:33.3811799Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/streaming_processor.rs:160: +2026-06-21T01:26:33.3811922Z +2026-06-21T01:26:33.3812128Z /// Process data from an iterator (true streaming) +2026-06-21T01:26:33.3812249Z #[must_use] +2026-06-21T01:26:33.3812578Z - pub fn process_iterator( +2026-06-21T01:26:33.3812706Z - &mut self, +2026-06-21T01:26:33.3812844Z - iterator: I, +2026-06-21T01:26:33.3813129Z - mut processor: F, +2026-06-21T01:26:33.3813262Z - ) -> Result> +2026-06-21T01:26:33.3813659Z + pub fn process_iterator(&mut self, iterator: I, mut processor: F) -> Result> +2026-06-21T01:26:33.3813782Z where +2026-06-21T01:26:33.3813928Z I: Iterator, +2026-06-21T01:26:33.3814086Z F: FnMut(&[T]) -> Result>, +2026-06-21T01:26:33.3814625Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/streaming_processor.rs:174: +2026-06-21T01:26:33.3814897Z let mut batch = Vec::with_capacity(self.config.batch_size); +2026-06-21T01:26:33.3815054Z let mut total_count = 0; +2026-06-21T01:26:33.3815175Z +2026-06-21T01:26:33.3815764Z - println!("🔄 Processing data stream (batch size: {})...", self.config.batch_size); +2026-06-21T01:26:33.3815906Z + println!( +2026-06-21T01:26:33.3816200Z + "🔄 Processing data stream (batch size: {})...", +2026-06-21T01:26:33.3816356Z + self.config.batch_size +2026-06-21T01:26:33.3816489Z + ); +2026-06-21T01:26:33.3816616Z +2026-06-21T01:26:33.3816761Z for item in iterator { +2026-06-21T01:26:33.3816904Z batch.push(item); +2026-06-21T01:26:33.3817315Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/streaming_processor.rs:205: +2026-06-21T01:26:33.3817398Z } +2026-06-21T01:26:33.3817487Z +2026-06-21T01:26:33.3817593Z self.update_memory_stats(); +2026-06-21T01:26:33.3817814Z - println!("✅ Processed {} total records in {} batches", +2026-06-21T01:26:33.3818001Z - self.stats.total_processed, self.stats.batches_processed); +2026-06-21T01:26:33.3818094Z + println!( +2026-06-21T01:26:33.3818271Z + "✅ Processed {} total records in {} batches", +2026-06-21T01:26:33.3818448Z + self.stats.total_processed, self.stats.batches_processed +2026-06-21T01:26:33.3818532Z + ); +2026-06-21T01:26:33.3818817Z +2026-06-21T01:26:33.3818962Z Ok(results) +2026-06-21T01:26:33.3819043Z } +2026-06-21T01:26:33.3819590Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/streaming_processor.rs:214: +2026-06-21T01:26:33.3819789Z /// Check current memory usage and enforce limits +2026-06-21T01:26:33.3819989Z fn check_memory_usage(&self) -> Result<()> { +2026-06-21T01:26:33.3820213Z let current_mem = self.estimate_memory_usage_mb(); +2026-06-21T01:26:33.3820330Z - +2026-06-21T01:26:33.3820453Z + +2026-06-21T01:26:33.3820692Z if current_mem > self.config.max_memory_mb as f64 { +2026-06-21T01:26:33.3820836Z return Err(anyhow!( +2026-06-21T01:26:33.3821038Z "Memory limit exceeded: {:.1} MB > {} MB", +2026-06-21T01:26:33.3821403Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/streaming_processor.rs:237: +2026-06-21T01:26:33.3821519Z fn update_memory_stats(&mut self) { +2026-06-21T01:26:33.3821655Z let current = self.estimate_memory_usage_mb(); +2026-06-21T01:26:33.3821776Z self.stats.current_memory_mb = current; +2026-06-21T01:26:33.3821866Z - +2026-06-21T01:26:33.3821952Z + +2026-06-21T01:26:33.3822070Z if current > self.stats.peak_memory_mb { +2026-06-21T01:26:33.3822186Z self.stats.peak_memory_mb = current; +2026-06-21T01:26:33.3822265Z } +2026-06-21T01:26:33.3822591Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/streaming_processor.rs:254: +2026-06-21T01:26:33.3822707Z /// Print final processing statistics +2026-06-21T01:26:33.3822845Z fn print_final_stats(&self, total_records: usize) { +2026-06-21T01:26:33.3822988Z let elapsed = self.start_time.unwrap().elapsed(); +2026-06-21T01:26:33.3823077Z - +2026-06-21T01:26:33.3823159Z + +2026-06-21T01:26:33.3823532Z println!("\n📊 Processing Statistics:"); +2026-06-21T01:26:33.3823711Z println!("━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"); +2026-06-21T01:26:33.3823970Z println!("Total Records: {}", total_records); +2026-06-21T01:26:33.3824305Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/streaming_processor.rs:261: +2026-06-21T01:26:33.3824490Z println!("Batches Processed: {}", self.stats.batches_processed); +2026-06-21T01:26:33.3824676Z println!("Peak Memory: {:.2} MB", self.stats.peak_memory_mb); +2026-06-21T01:26:33.3824851Z println!("Processing Time: {:.2}s", elapsed.as_secs_f64()); +2026-06-21T01:26:33.3824980Z - println!("Throughput: {:.0} records/sec", +2026-06-21T01:26:33.3825124Z - total_records as f64 / elapsed.as_secs_f64()); +2026-06-21T01:26:33.3825211Z + println!( +2026-06-21T01:26:33.3825337Z + "Throughput: {:.0} records/sec", +2026-06-21T01:26:33.3825484Z + total_records as f64 / elapsed.as_secs_f64() +2026-06-21T01:26:33.3825565Z + ); +2026-06-21T01:26:33.3825654Z } +2026-06-21T01:26:33.3825742Z +2026-06-21T01:26:33.3825853Z /// Get current memory statistics +2026-06-21T01:26:33.3826196Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/streaming_processor.rs:288: +2026-06-21T01:26:33.3826274Z { +2026-06-21T01:26:33.3826381Z /// Create a new chunked loader +2026-06-21T01:26:33.3826519Z pub fn new(config: StreamingConfig) -> Self { +2026-06-21T01:26:33.3826639Z - Self { config, _phantom: PhantomData } +2026-06-21T01:26:33.3826733Z + Self { +2026-06-21T01:26:33.3826824Z + config, +2026-06-21T01:26:33.3826940Z + _phantom: PhantomData, +2026-06-21T01:26:33.3827030Z + } +2026-06-21T01:26:33.3827112Z } +2026-06-21T01:26:33.3827203Z +2026-06-21T01:26:33.3827310Z /// Load data from a file in chunks +2026-06-21T01:26:33.3827665Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/streaming_processor.rs:295: +2026-06-21T01:26:33.3827779Z - pub fn load_from_file( +2026-06-21T01:26:33.3827871Z - &self, +2026-06-21T01:26:33.3827979Z - file_path: &str, +2026-06-21T01:26:33.3828095Z - mut chunk_handler: F, +2026-06-21T01:26:33.3828193Z - ) -> Result<()> +2026-06-21T01:26:33.3828427Z + pub fn load_from_file(&self, file_path: &str, mut chunk_handler: F) -> Result<()> +2026-06-21T01:26:33.3828515Z where +2026-06-21T01:26:33.3828752Z F: FnMut(&[T]) -> Result<()>, +2026-06-21T01:26:33.3828844Z { +2026-06-21T01:26:33.3829191Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/streaming_processor.rs:307: +2026-06-21T01:26:33.3829405Z println!("📂 Loading data from: {}", file_path); +2026-06-21T01:26:33.3829492Z +2026-06-21T01:26:33.3829594Z // Read file in chunks +2026-06-21T01:26:33.3829726Z - let file = File::open(file_path) +2026-06-21T01:26:33.3829904Z - .context(format!("Failed to open file: {}", file_path))?; +2026-06-21T01:26:33.3830163Z + let file = File::open(file_path).context(format!("Failed to open file: {}", file_path))?; +2026-06-21T01:26:33.3830302Z let mut reader = BufReader::new(file); +2026-06-21T01:26:33.3830382Z +2026-06-21T01:26:33.3830563Z let mut buffer = Vec::with_capacity(self.config.batch_size); +2026-06-21T01:26:33.3830916Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/streaming_processor.rs:340: +2026-06-21T01:26:33.3831001Z } +2026-06-21T01:26:33.3831091Z +2026-06-21T01:26:33.3831200Z /// Load data from a JSON array file +2026-06-21T01:26:33.3831306Z - pub fn load_json_array( +2026-06-21T01:26:33.3831399Z - &self, +2026-06-21T01:26:33.3831496Z - file_path: &str, +2026-06-21T01:26:33.3831603Z - mut chunk_handler: F, +2026-06-21T01:26:33.3831699Z - ) -> Result +2026-06-21T01:26:33.3832079Z + pub fn load_json_array(&self, file_path: &str, mut chunk_handler: F) -> Result +2026-06-21T01:26:33.3832171Z where +2026-06-21T01:26:33.3832276Z F: FnMut(&[T]) -> Result<()>, +2026-06-21T01:26:33.3832483Z { +2026-06-21T01:26:33.3832818Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/streaming_processor.rs:351: +2026-06-21T01:26:33.3832920Z use std::fs::File; +2026-06-21T01:26:33.3833032Z use std::io::BufReader; +2026-06-21T01:26:33.3833114Z +2026-06-21T01:26:33.3833231Z - let file = File::open(file_path) +2026-06-21T01:26:33.3833395Z - .context(format!("Failed to open file: {}", file_path))?; +2026-06-21T01:26:33.3833635Z + let file = File::open(file_path).context(format!("Failed to open file: {}", file_path))?; +2026-06-21T01:26:33.3833754Z let reader = BufReader::new(file); +2026-06-21T01:26:33.3833844Z +2026-06-21T01:26:33.3834007Z let mut buffer = Vec::with_capacity(self.config.batch_size); +2026-06-21T01:26:33.3834353Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/streaming_processor.rs:402: +2026-06-21T01:26:33.3834445Z } +2026-06-21T01:26:33.3834526Z +2026-06-21T01:26:33.3834654Z /// Process records and compute aggregates +2026-06-21T01:26:33.3834753Z - pub fn aggregate( +2026-06-21T01:26:33.3834850Z - &mut self, +2026-06-21T01:26:33.3834946Z - data: &[T], +2026-06-21T01:26:33.3835042Z - value_extractor: F, +2026-06-21T01:26:33.3835158Z - ) -> Result +2026-06-21T01:26:33.3835410Z + pub fn aggregate(&mut self, data: &[T], value_extractor: F) -> Result +2026-06-21T01:26:33.3835502Z where +2026-06-21T01:26:33.3835603Z F: Fn(&T) -> f64, +2026-06-21T01:26:33.3835688Z { +2026-06-21T01:26:33.3836017Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/streaming_processor.rs:425: +2026-06-21T01:26:33.3836124Z Ok(AggregationResult { +2026-06-21T01:26:33.3836224Z count: self.count, +2026-06-21T01:26:33.3836322Z sum: self.sum, +2026-06-21T01:26:33.3836520Z - mean: if self.count > 0 { self.sum / self.count as f64 } else { 0.0 }, +2026-06-21T01:26:33.3836635Z + mean: if self.count > 0 { +2026-06-21T01:26:33.3836753Z + self.sum / self.count as f64 +2026-06-21T01:26:33.3836843Z + } else { +2026-06-21T01:26:33.3836937Z + 0.0 +2026-06-21T01:26:33.3837022Z + }, +2026-06-21T01:26:33.3837118Z min: self.min, +2026-06-21T01:26:33.3837214Z max: self.max, +2026-06-21T01:26:33.3837298Z }) +2026-06-21T01:26:33.3837626Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/streaming_processor.rs:467: +2026-06-21T01:26:33.3837717Z #[test] +2026-06-21T01:26:33.3837846Z fn test_streaming_processor_small_dataset() { +2026-06-21T01:26:33.3837994Z let mut processor = StreamingProcessor::new(); +2026-06-21T01:26:33.3838080Z - +2026-06-21T01:26:33.3838170Z + +2026-06-21T01:26:33.3838284Z let data: Vec = (0..100) +2026-06-21T01:26:33.3838387Z .map(|i| TestRecord { +2026-06-21T01:26:33.3838483Z id: i, +2026-06-21T01:26:33.3838922Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/streaming_processor.rs:476: +2026-06-21T01:26:33.3839015Z }) +2026-06-21T01:26:33.3839114Z .collect(); +2026-06-21T01:26:33.3839196Z +2026-06-21T01:26:33.3839373Z - let results = processor.process_stream(&data, |chunk| { +2026-06-21T01:26:33.3839511Z - Ok(chunk.iter().map(|r| r.id * 2).collect()) +2026-06-21T01:26:33.3839600Z - }).unwrap(); +2026-06-21T01:26:33.3839707Z + let results = processor +2026-06-21T01:26:33.3839921Z + .process_stream(&data, |chunk| Ok(chunk.iter().map(|r| r.id * 2).collect())) +2026-06-21T01:26:33.3840019Z + .unwrap(); +2026-06-21T01:26:33.3840108Z +2026-06-21T01:26:33.3840355Z assert_eq!(results.len(), 100); +2026-06-21T01:26:33.3840466Z assert_eq!(results[0], 0); +2026-06-21T01:26:33.3840913Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/streaming_processor.rs:501: +2026-06-21T01:26:33.3840999Z }) +2026-06-21T01:26:33.3841093Z .collect(); +2026-06-21T01:26:33.3841173Z +2026-06-21T01:26:33.3841329Z - let results = processor.process_stream(&data, |chunk| { +2026-06-21T01:26:33.3841462Z - Ok(chunk.iter().map(|r| r.value).collect()) +2026-06-21T01:26:33.3841549Z - }).unwrap(); +2026-06-21T01:26:33.3841649Z + let results = processor +2026-06-21T01:26:33.3841850Z + .process_stream(&data, |chunk| Ok(chunk.iter().map(|r| r.value).collect())) +2026-06-21T01:26:33.3842031Z + .unwrap(); +2026-06-21T01:26:33.3842111Z +2026-06-21T01:26:33.3842221Z assert_eq!(results.len(), 1000); +2026-06-21T01:26:33.3842369Z assert!(processor.stats.batches_processed > 1); +2026-06-21T01:26:33.3842689Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/streaming_processor.rs:512: +2026-06-21T01:26:33.3842787Z #[test] +2026-06-21T01:26:33.3842891Z fn test_memory_usage_tracking() { +2026-06-21T01:26:33.3843036Z let mut processor = StreamingProcessor::new(); +2026-06-21T01:26:33.3843131Z - +2026-06-21T01:26:33.3843210Z + +2026-06-21T01:26:33.3843326Z let data: Vec = (0..500) +2026-06-21T01:26:33.3843427Z .map(|i| TestRecord { +2026-06-21T01:26:33.3843524Z id: i, +2026-06-21T01:26:33.3843844Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/streaming_processor.rs:521: +2026-06-21T01:26:33.3843928Z }) +2026-06-21T01:26:33.3844025Z .collect(); +2026-06-21T01:26:33.3844113Z +2026-06-21T01:26:33.3844239Z - processor.process_stream(&data, |chunk| { +2026-06-21T01:26:33.3844397Z - Ok(chunk.iter().map(|r| r.id).collect::>()) +2026-06-21T01:26:33.3844484Z - }).unwrap(); +2026-06-21T01:26:33.3844581Z + processor +2026-06-21T01:26:33.3844696Z + .process_stream(&data, |chunk| { +2026-06-21T01:26:33.3844846Z + Ok(chunk.iter().map(|r| r.id).collect::>()) +2026-06-21T01:26:33.3844938Z + }) +2026-06-21T01:26:33.3845034Z + .unwrap(); +2026-06-21T01:26:33.3845116Z +2026-06-21T01:26:33.3845259Z assert!(processor.stats.peak_memory_mb > 0.0); +2026-06-21T01:26:33.3845403Z assert_eq!(processor.stats.total_processed, 500); +2026-06-21T01:26:33.3845747Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/streaming_processor.rs:557: +2026-06-21T01:26:33.3845860Z ..StreamingConfig::default() +2026-06-21T01:26:33.3845944Z }); +2026-06-21T01:26:33.3846033Z +2026-06-21T01:26:33.3846193Z - let data: Vec = (0..100).map(|i| TestRecord { +2026-06-21T01:26:33.3846292Z - id: i, +2026-06-21T01:26:33.3846395Z - value: i as f64, +2026-06-21T01:26:33.3846498Z - name: format!("Item {}", i), +2026-06-21T01:26:33.3846599Z - }).collect(); +2026-06-21T01:26:33.3846713Z + let data: Vec = (0..100) +2026-06-21T01:26:33.3846811Z + .map(|i| TestRecord { +2026-06-21T01:26:33.3846903Z + id: i, +2026-06-21T01:26:33.3846997Z + value: i as f64, +2026-06-21T01:26:33.3847106Z + name: format!("Item {}", i), +2026-06-21T01:26:33.3847194Z + }) +2026-06-21T01:26:33.3847283Z + .collect(); +2026-06-21T01:26:33.3847372Z +2026-06-21T01:26:33.3847467Z let mut batch_count = 0; +2026-06-21T01:26:33.3847629Z - let results = processor.process_stream(&data, |chunk| { +2026-06-21T01:26:33.3847731Z - batch_count += 1; +2026-06-21T01:26:33.3847874Z - Ok(chunk.iter().map(|r| r.id).collect::>()) +2026-06-21T01:26:33.3848069Z - }).unwrap(); +2026-06-21T01:26:33.3848177Z + let results = processor +2026-06-21T01:26:33.3848281Z + .process_stream(&data, |chunk| { +2026-06-21T01:26:33.3848473Z + batch_count += 1; +2026-06-21T01:26:33.3848815Z + Ok(chunk.iter().map(|r| r.id).collect::>()) +2026-06-21T01:26:33.3848923Z + }) +2026-06-21T01:26:33.3849019Z + .unwrap(); +2026-06-21T01:26:33.3849099Z +2026-06-21T01:26:33.3849270Z assert_eq!(batch_count, 10); // 100 records / 10 batch_size +2026-06-21T01:26:33.3849375Z assert_eq!(results.len(), 100); +2026-06-21T01:26:33.3849712Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/withdrawal_audit.rs:46: +2026-06-21T01:26:33.3849800Z } +2026-06-21T01:26:33.3849881Z +2026-06-21T01:26:33.3849985Z /// Log a withdrawal action. +2026-06-21T01:26:33.3850329Z - pub fn log(&mut self, campaign_id: u64, action: WithdrawalAction, actor: &str, amount: i128, note: Option) { +2026-06-21T01:26:33.3850424Z + pub fn log( +2026-06-21T01:26:33.3850518Z + &mut self, +2026-06-21T01:26:33.3850615Z + campaign_id: u64, +2026-06-21T01:26:33.3850732Z + action: WithdrawalAction, +2026-06-21T01:26:33.3850835Z + actor: &str, +2026-06-21T01:26:33.3850925Z + amount: i128, +2026-06-21T01:26:33.3851031Z + note: Option, +2026-06-21T01:26:33.3851120Z + ) { +2026-06-21T01:26:33.3851249Z self.entries.push(WithdrawalLogEntry { +2026-06-21T01:26:33.3851351Z campaign_id, +2026-06-21T01:26:33.3851437Z action, +2026-06-21T01:26:33.3851769Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/withdrawal_audit.rs:60: +2026-06-21T01:26:33.3851895Z /// Returns all log entries for a campaign. +2026-06-21T01:26:33.3851982Z #[must_use] +2026-06-21T01:26:33.3852205Z pub fn get_by_campaign(&self, campaign_id: u64) -> Vec<&WithdrawalLogEntry> { +2026-06-21T01:26:33.3852417Z - self.entries.iter().filter(|e| e.campaign_id == campaign_id).collect() +2026-06-21T01:26:33.3852508Z + self.entries +2026-06-21T01:26:33.3852597Z + .iter() +2026-06-21T01:26:33.3852728Z + .filter(|e| e.campaign_id == campaign_id) +2026-06-21T01:26:33.3852823Z + .collect() +2026-06-21T01:26:33.3852912Z } +2026-06-21T01:26:33.3852994Z +2026-06-21T01:26:33.3853099Z /// Returns all entries in the log. +2026-06-21T01:26:33.3853413Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/withdrawal_audit.rs:93: +2026-06-21T01:26:33.3853525Z fn logs_and_retrieves_entries() { +2026-06-21T01:26:33.3853662Z let mut log = WithdrawalAuditLog::new(); +2026-06-21T01:26:33.3853843Z log.log(1, WithdrawalAction::Requested, "creator_A", 500, None); +2026-06-21T01:26:33.3854092Z - log.log(1, WithdrawalAction::Approved, "admin", 500, Some("looks good".to_string())); +2026-06-21T01:26:33.3854182Z + log.log( +2026-06-21T01:26:33.3854269Z + 1, +2026-06-21T01:26:33.3854383Z + WithdrawalAction::Approved, +2026-06-21T01:26:33.3854470Z + "admin", +2026-06-21T01:26:33.3854565Z + 500, +2026-06-21T01:26:33.3854679Z + Some("looks good".to_string()), +2026-06-21T01:26:33.3854763Z + ); +2026-06-21T01:26:33.3854851Z +2026-06-21T01:26:33.3854976Z let entries = log.get_by_campaign(1); +2026-06-21T01:26:33.3855079Z assert_eq!(entries.len(), 2); +2026-06-21T01:26:33.3855399Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/withdrawal_limits.rs:29: +2026-06-21T01:26:33.3855507Z impl Default for WithdrawalLimits { +2026-06-21T01:26:33.3855611Z fn default() -> Self { +2026-06-21T01:26:33.3855699Z Self { +2026-06-21T01:26:33.3855853Z - min_per_withdrawal: 100, // 100 stroops minimum +2026-06-21T01:26:33.3856014Z + min_per_withdrawal: 100, // 100 stroops minimum +2026-06-21T01:26:33.3856352Z max_per_withdrawal: 10_000_000_000, // 1000 XLM maximum per withdrawal +2026-06-21T01:26:33.3856515Z - max_total: None, // no global cap by default +2026-06-21T01:26:33.3856836Z + max_total: None, // no global cap by default +2026-06-21T01:26:33.3856919Z } +2026-06-21T01:26:33.3857010Z } +2026-06-21T01:26:33.3857098Z } +2026-06-21T01:26:33.3857410Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/withdrawal_limits.rs:44: +2026-06-21T01:26:33.3857503Z if max < min { +2026-06-21T01:26:33.3857644Z return Err(anyhow!("Maximum must be >= minimum")); +2026-06-21T01:26:33.3857734Z } +2026-06-21T01:26:33.3857936Z - Ok(Self { min_per_withdrawal: min, max_per_withdrawal: max, max_total }) +2026-06-21T01:26:33.3858023Z + Ok(Self { +2026-06-21T01:26:33.3858130Z + min_per_withdrawal: min, +2026-06-21T01:26:33.3858233Z + max_per_withdrawal: max, +2026-06-21T01:26:33.3858329Z + max_total, +2026-06-21T01:26:33.3858417Z + }) +2026-06-21T01:26:33.3858499Z } +2026-06-21T01:26:33.3858770Z +2026-06-21T01:26:33.3858983Z /// Validates a proposed withdrawal amount against the limits. +2026-06-21T01:26:33.3859293Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/withdrawal_limits.rs:54: +2026-06-21T01:26:33.3859414Z if amount < self.min_per_withdrawal { +2026-06-21T01:26:33.3859519Z return Err(anyhow!( +2026-06-21T01:26:33.3859662Z "Withdrawal amount {} is below the minimum of {}", +2026-06-21T01:26:33.3859787Z - amount, self.min_per_withdrawal +2026-06-21T01:26:33.3859875Z + amount, +2026-06-21T01:26:33.3859984Z + self.min_per_withdrawal +2026-06-21T01:26:33.3860073Z )); +2026-06-21T01:26:33.3860154Z } +2026-06-21T01:26:33.3860266Z if amount > self.max_per_withdrawal { +2026-06-21T01:26:33.3860577Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/withdrawal_limits.rs:61: +2026-06-21T01:26:33.3860681Z return Err(anyhow!( +2026-06-21T01:26:33.3860837Z "Withdrawal amount {} exceeds the maximum of {}", +2026-06-21T01:26:33.3860946Z - amount, self.max_per_withdrawal +2026-06-21T01:26:33.3861043Z + amount, +2026-06-21T01:26:33.3861147Z + self.max_per_withdrawal +2026-06-21T01:26:33.3861230Z )); +2026-06-21T01:26:33.3861317Z } +2026-06-21T01:26:33.3861423Z if let Some(cap) = self.max_total { +2026-06-21T01:26:33.3861737Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/withdrawal_limits.rs:67: +2026-06-21T01:26:33.3861862Z if already_withdrawn + amount > cap { +2026-06-21T01:26:33.3861960Z return Err(anyhow!( +2026-06-21T01:26:33.3862135Z "Total withdrawn {} would exceed the campaign cap of {}", +2026-06-21T01:26:33.3862265Z - already_withdrawn + amount, cap +2026-06-21T01:26:33.3862371Z + already_withdrawn + amount, +2026-06-21T01:26:33.3862473Z + cap +2026-06-21T01:26:33.3862558Z )); +2026-06-21T01:26:33.3862647Z } +2026-06-21T01:26:33.3862734Z } +2026-06-21T01:26:33.3881976Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/asset_issuing.rs:26: +2026-06-21T01:26:33.3882147Z pub fn from_env() -> Result { +2026-06-21T01:26:33.3882312Z dotenv::dotenv().ok(); +2026-06-21T01:26:33.3882431Z +2026-06-21T01:26:33.3882599Z - let code = env::var("ASSET_CODE") +2026-06-21T01:26:33.3882775Z - .unwrap_or_else(|_| "ORBIT".to_string()); +2026-06-21T01:26:33.3882901Z - +2026-06-21T01:26:33.3883068Z - let name = env::var("ASSET_NAME") +2026-06-21T01:26:33.3883292Z - .unwrap_or_else(|_| "OrbitChain Token".to_string()); +2026-06-21T01:26:33.3883800Z + let code = env::var("ASSET_CODE").unwrap_or_else(|_| "ORBIT".to_string()); +2026-06-21T01:26:33.3883925Z +2026-06-21T01:26:33.3884273Z + let name = env::var("ASSET_NAME").unwrap_or_else(|_| "OrbitChain Token".to_string()); +2026-06-21T01:26:33.3892321Z + +2026-06-21T01:26:33.3892841Z let issuing_secret_key = env::var("SOROBAN_ISSUING_SECRET_KEY") +2026-06-21T01:26:33.3893081Z .context("SOROBAN_ISSUING_SECRET_KEY is required")?; +2026-06-21T01:26:33.3893214Z +2026-06-21T01:26:33.3893749Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/asset_issuing.rs:74: +2026-06-21T01:26:33.3893930Z println!("Asset Code: {}", self.code); +2026-06-21T01:26:33.3894104Z println!("Asset Name: {}", self.name); +2026-06-21T01:26:33.3894374Z println!("Issuer Public Key: {}", self.issuing_public_key); +2026-06-21T01:26:33.3894493Z - +2026-06-21T01:26:33.3894667Z + +2026-06-21T01:26:33.3894849Z if self.issuing_secret_key.len() > 10 { +2026-06-21T01:26:33.3894998Z println!( +2026-06-21T01:26:33.3895165Z "Issuer Secret Key: {}...{}", +2026-06-21T01:26:33.3895694Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/asset_issuing.rs:102: +2026-06-21T01:26:33.3895970Z pub fn generate_issuing_keypair() -> Result<(String, String)> { +2026-06-21T01:26:33.3896260Z // In a real implementation, this would use the stellar-strkey crate +2026-06-21T01:26:33.3896480Z // For now, we provide guidance on how to generate keys +2026-06-21T01:26:33.3896611Z - +2026-06-21T01:26:33.3896728Z + +2026-06-21T01:26:33.3897057Z println!("🔑 Generating Issuing Keypair"); +2026-06-21T01:26:33.3897308Z println!("━━━━━━━━━━━━━━━━━━━━━━━━━━"); +2026-06-21T01:26:33.3897440Z println!(); +2026-06-21T01:26:33.3897971Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/asset_issuing.rs:115: +2026-06-21T01:26:33.3898148Z println!("Then set in your .env file:"); +2026-06-21T01:26:33.3898347Z println!(" SOROBAN_ISSUING_SECRET_KEY=S..."); +2026-06-21T01:26:33.3898535Z println!(" SOROBAN_ISSUING_PUBLIC_KEY=G..."); +2026-06-21T01:26:33.3898830Z - +2026-06-21T01:26:33.3898960Z + +2026-06-21T01:26:33.3899088Z Ok(( +2026-06-21T01:26:33.3899333Z "S_PLACEHOLDER_REPLACE_WITH_YOUR_SECRET_KEY".to_string(), +2026-06-21T01:26:33.3899572Z "G_PLACEHOLDER_REPLACE_WITH_YOUR_PUBLIC_KEY".to_string(), +2026-06-21T01:26:33.3900077Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/asset_issuing.rs:130: +2026-06-21T01:26:33.3900275Z println!("Holder: {}", config.holder_public_key); +2026-06-21T01:26:33.3900434Z println!("Network: {}", network); +2026-06-21T01:26:33.3900559Z println!(); +2026-06-21T01:26:33.3900682Z - +2026-06-21T01:26:33.3900803Z + +2026-06-21T01:26:33.3900950Z // Validate configuration +2026-06-21T01:26:33.3901111Z if config.asset_code.is_empty() { +2026-06-21T01:26:33.3901309Z anyhow::bail!("Asset code is required"); +2026-06-21T01:26:33.3901818Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/asset_issuing.rs:137: +2026-06-21T01:26:33.3901926Z } +2026-06-21T01:26:33.3902007Z - +2026-06-21T01:26:33.3902092Z + +2026-06-21T01:26:33.3902220Z if !config.asset_issuer.starts_with('G') { +2026-06-21T01:26:33.3902443Z anyhow::bail!("Asset issuer must be a valid public key starting with 'G'"); +2026-06-21T01:26:33.3902530Z } +2026-06-21T01:26:33.3902842Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/asset_issuing.rs:142: +2026-06-21T01:26:33.3902927Z - +2026-06-21T01:26:33.3903011Z + +2026-06-21T01:26:33.3903146Z if !config.holder_public_key.starts_with('G') { +2026-06-21T01:26:33.3903313Z anyhow::bail!("Holder public key must start with 'G'"); +2026-06-21T01:26:33.3903405Z } +2026-06-21T01:26:33.3904030Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/asset_issuing.rs:155: +2026-06-21T01:26:33.3904161Z println!(" soroban contract invoke \\"); +2026-06-21T01:26:33.3904272Z println!(" --network {} \\", network); +2026-06-21T01:26:33.3904510Z println!(" --source-account holder \\"); +2026-06-21T01:26:33.3904686Z - println!(" -- change_trust --asset '{}:{}'", +2026-06-21T01:26:33.3904817Z - config.asset_code, config.asset_issuer); +2026-06-21T01:26:33.3904908Z - +2026-06-21T01:26:33.3905005Z + println!( +2026-06-21T01:26:33.3905147Z + " -- change_trust --asset '{}:{}'", +2026-06-21T01:26:33.3905272Z + config.asset_code, config.asset_issuer +2026-06-21T01:26:33.3905356Z + ); +2026-06-21T01:26:33.3905446Z + +2026-06-21T01:26:33.3905537Z Ok(()) +2026-06-21T01:26:33.3905623Z } +2026-06-21T01:26:33.3905710Z +2026-06-21T01:26:33.3906019Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/asset_issuing.rs:170: +2026-06-21T01:26:33.3906124Z ) -> Result<()> { +2026-06-21T01:26:33.3906297Z println!("💰 Issuing Assets"); +2026-06-21T01:26:33.3906432Z println!("━━━━━━━━━━━━━━━━"); +2026-06-21T01:26:33.3906653Z - println!("Asset: {}:{}", asset_config.code, asset_config.issuing_public_key); +2026-06-21T01:26:33.3906743Z + println!( +2026-06-21T01:26:33.3906835Z + "Asset: {}:{}", +2026-06-21T01:26:33.3906988Z + asset_config.code, asset_config.issuing_public_key +2026-06-21T01:26:33.3907068Z + ); +2026-06-21T01:26:33.3907185Z println!("Recipient: {}", recipient); +2026-06-21T01:26:33.3907290Z println!("Amount: {}", amount); +2026-06-21T01:26:33.3907393Z println!("Network: {}", network); +2026-06-21T01:26:33.3907698Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/asset_issuing.rs:178: +2026-06-21T01:26:33.3907784Z +2026-06-21T01:26:33.3907868Z // Validate +2026-06-21T01:26:33.3907974Z asset_config.validate()?; +2026-06-21T01:26:33.3908054Z - +2026-06-21T01:26:33.3908148Z + +2026-06-21T01:26:33.3908262Z if !recipient.starts_with('G') { +2026-06-21T01:26:33.3908472Z anyhow::bail!("Recipient must be a valid public key starting with 'G'"); +2026-06-21T01:26:33.3908840Z } +2026-06-21T01:26:33.3909142Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/asset_issuing.rs:185: +2026-06-21T01:26:33.3909232Z - +2026-06-21T01:26:33.3909319Z + +2026-06-21T01:26:33.3909410Z if amount <= 0.0 { +2026-06-21T01:26:33.3909557Z anyhow::bail!("Amount must be greater than 0"); +2026-06-21T01:26:33.3909642Z } +2026-06-21T01:26:33.3909940Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/asset_issuing.rs:199: +2026-06-21T01:26:33.3910091Z println!(" --source-account issuing_account \\"); +2026-06-21T01:26:33.3910220Z println!(" --destination {} \\", recipient); +2026-06-21T01:26:33.3910338Z println!(" --amount {} \\", amount); +2026-06-21T01:26:33.3910574Z - println!(" --asset '{}:{}' \\", asset_config.code, asset_config.issuing_public_key); +2026-06-21T01:26:33.3910664Z + println!( +2026-06-21T01:26:33.3910776Z + " --asset '{}:{}' \\", +2026-06-21T01:26:33.3910923Z + asset_config.code, asset_config.issuing_public_key +2026-06-21T01:26:33.3911005Z + ); +2026-06-21T01:26:33.3911117Z println!(" --network {}", network); +2026-06-21T01:26:33.3911195Z +2026-06-21T01:26:33.3911286Z Ok(()) +2026-06-21T01:26:33.3911591Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/asset_issuing.rs:211: +2026-06-21T01:26:33.3911772Z println!("━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"); +2026-06-21T01:26:33.3911860Z +2026-06-21T01:26:33.3911994Z let asset_config = AssetConfig::from_env()?; +2026-06-21T01:26:33.3912075Z - +2026-06-21T01:26:33.3912158Z + +2026-06-21T01:26:33.3912259Z // Display current config +2026-06-21T01:26:33.3912369Z asset_config.display(); +2026-06-21T01:26:33.3912460Z println!(); +2026-06-21T01:26:33.3912976Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/campaign_totals.rs:19: +2026-06-21T01:26:33.3913192Z #[must_use] +2026-06-21T01:26:33.3913286Z #[inline] +2026-06-21T01:26:33.3913516Z pub fn increment(&mut self, campaign_id: u64, asset: &str, amount: i128) -> i128 { +2026-06-21T01:26:33.3913750Z - let entry = self.asset_totals.entry((campaign_id, asset.to_string())).or_insert(0); +2026-06-21T01:26:33.3913853Z + let entry = self +2026-06-21T01:26:33.3913943Z + .asset_totals +2026-06-21T01:26:33.3914077Z + .entry((campaign_id, asset.to_string())) +2026-06-21T01:26:33.3914174Z + .or_insert(0); +2026-06-21T01:26:33.3914262Z *entry += amount; +2026-06-21T01:26:33.3914351Z *entry +2026-06-21T01:26:33.3914439Z } +2026-06-21T01:26:33.3914751Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/campaign_totals.rs:27: +2026-06-21T01:26:33.3914985Z /// Returns the total for a specific `campaign_id` + `asset`, or 0 if none recorded. +2026-06-21T01:26:33.3915070Z #[must_use] +2026-06-21T01:26:33.3915236Z pub fn get(&self, campaign_id: u64, asset: &str) -> i128 { +2026-06-21T01:26:33.3915448Z - *self.asset_totals.get(&(campaign_id, asset.to_string())).unwrap_or(&0) +2026-06-21T01:26:33.3915530Z + *self +2026-06-21T01:26:33.3915627Z + .asset_totals +2026-06-21T01:26:33.3915756Z + .get(&(campaign_id, asset.to_string())) +2026-06-21T01:26:33.3915848Z + .unwrap_or(&0) +2026-06-21T01:26:33.3915936Z } +2026-06-21T01:26:33.3916017Z +2026-06-21T01:26:33.3916290Z /// Returns all asset totals for a campaign as a map of asset → total. +2026-06-21T01:26:33.3916621Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/encrypted_vault.rs:73: +2026-06-21T01:26:33.3916700Z +2026-06-21T01:26:33.3916803Z // Load public keys +2026-06-21T01:26:33.3916988Z if let Ok(admin_pub) = env::var("SOROBAN_ADMIN_PUBLIC_KEY") { +2026-06-21T01:26:33.3917189Z - vault.public_keys.insert("admin_public_key".to_string(), admin_pub); +2026-06-21T01:26:33.3917284Z + vault +2026-06-21T01:26:33.3917378Z + .public_keys +2026-06-21T01:26:33.3917529Z + .insert("admin_public_key".to_string(), admin_pub); +2026-06-21T01:26:33.3917617Z } +2026-06-21T01:26:33.3917790Z if let Ok(issuing_pub) = env::var("SOROBAN_ISSUING_PUBLIC_KEY") { +2026-06-21T01:26:33.3918008Z - vault.public_keys.insert("issuing_public_key".to_string(), issuing_pub); +2026-06-21T01:26:33.3918099Z + vault +2026-06-21T01:26:33.3918186Z + .public_keys +2026-06-21T01:26:33.3918352Z + .insert("issuing_public_key".to_string(), issuing_pub); +2026-06-21T01:26:33.3918435Z } +2026-06-21T01:26:33.3918522Z +2026-06-21T01:26:33.3918991Z // Load encrypted keys (stored as VAR_NAME_ENCRYPTED=hex:data format) +2026-06-21T01:26:33.3919537Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/encrypted_vault.rs:83: +2026-06-21T01:26:33.3919838Z if let Ok(admin_enc) = env::var("SOROBAN_ADMIN_SECRET_KEY_ENCRYPTED") { +2026-06-21T01:26:33.3920174Z - vault.encrypted_keys.insert("admin_secret_key".to_string(), admin_enc); +2026-06-21T01:26:33.3920257Z + vault +2026-06-21T01:26:33.3920358Z + .encrypted_keys +2026-06-21T01:26:33.3920502Z + .insert("admin_secret_key".to_string(), admin_enc); +2026-06-21T01:26:33.3920589Z } +2026-06-21T01:26:33.3920791Z if let Ok(issuing_enc) = env::var("SOROBAN_ISSUING_SECRET_KEY_ENCRYPTED") { +2026-06-21T01:26:33.3921010Z - vault.encrypted_keys.insert("issuing_secret_key".to_string(), issuing_enc); +2026-06-21T01:26:33.3921106Z + vault +2026-06-21T01:26:33.3921211Z + .encrypted_keys +2026-06-21T01:26:33.3921373Z + .insert("issuing_secret_key".to_string(), issuing_enc); +2026-06-21T01:26:33.3921617Z } +2026-06-21T01:26:33.3921701Z +2026-06-21T01:26:33.3921799Z Ok(vault) +2026-06-21T01:26:33.3922257Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/encrypted_vault.rs:104: +2026-06-21T01:26:33.3922358Z // Encrypt and store +2026-06-21T01:26:33.3922519Z let key_manager = self.key_manager.as_ref().unwrap(); +2026-06-21T01:26:33.3922702Z let encrypted_hex = key_manager.export_encrypted(secret_key)?; +2026-06-21T01:26:33.3922885Z - self.encrypted_keys.insert(key_name.to_string(), encrypted_hex); +2026-06-21T01:26:33.3922986Z + self.encrypted_keys +2026-06-21T01:26:33.3923118Z + .insert(key_name.to_string(), encrypted_hex); +2026-06-21T01:26:33.3923210Z +2026-06-21T01:26:33.3923302Z Ok(()) +2026-06-21T01:26:33.3923383Z } +2026-06-21T01:26:33.3923719Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/encrypted_vault.rs:133: +2026-06-21T01:26:33.3923812Z #[must_use] +2026-06-21T01:26:33.3924042Z pub fn store_public_key(&mut self, key_name: &str, public_key: &str) -> Result<()> { +2026-06-21T01:26:33.3924197Z KeyManager::validate_public_key(public_key)?; +2026-06-21T01:26:33.3924403Z - self.public_keys.insert(key_name.to_string(), public_key.to_string()); +2026-06-21T01:26:33.3924505Z + self.public_keys +2026-06-21T01:26:33.3924660Z + .insert(key_name.to_string(), public_key.to_string()); +2026-06-21T01:26:33.3924742Z Ok(()) +2026-06-21T01:26:33.3924828Z } +2026-06-21T01:26:33.3924911Z +2026-06-21T01:26:33.3925224Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/encrypted_vault.rs:159: +2026-06-21T01:26:33.3925310Z +2026-06-21T01:26:33.3925450Z content.push_str("\n# Encrypted Secret Keys\n"); +2026-06-21T01:26:33.3925590Z for (name, encrypted) in &self.encrypted_keys { +2026-06-21T01:26:33.3925834Z - content.push_str(&format!("{}_ENCRYPTED={}\n", name.to_uppercase(), encrypted)); +2026-06-21T01:26:33.3925937Z + content.push_str(&format!( +2026-06-21T01:26:33.3926047Z + "{}_ENCRYPTED={}\n", +2026-06-21T01:26:33.3926144Z + name.to_uppercase(), +2026-06-21T01:26:33.3926246Z + encrypted +2026-06-21T01:26:33.3926335Z + )); +2026-06-21T01:26:33.3926417Z } +2026-06-21T01:26:33.3926502Z +2026-06-21T01:26:33.3926681Z fs::write(path, content).context("Failed to write vault file")?; +2026-06-21T01:26:33.3926986Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/encrypted_vault.rs:314: +2026-06-21T01:26:33.3927145Z #[test] +2026-06-21T01:26:33.3927330Z fn test_save_and_load_vault() -> Result<()> { +2026-06-21T01:26:33.3927518Z let temp_path = "/tmp/test_vault.enc"; +2026-06-21T01:26:33.3927644Z - +2026-06-21T01:26:33.3927760Z + +2026-06-21T01:26:33.3928067Z let mut vault = EncryptedVault::with_password("test_password")?; +2026-06-21T01:26:33.3928747Z - vault.store_secret_key("admin_secret_key", "SBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU")?; +2026-06-21T01:26:33.3929287Z - vault.store_public_key("admin_public_key", "GBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU")?; +2026-06-21T01:26:33.3929413Z - +2026-06-21T01:26:33.3929556Z + vault.store_secret_key( +2026-06-21T01:26:33.3929702Z + "admin_secret_key", +2026-06-21T01:26:33.3930035Z + "SBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU", +2026-06-21T01:26:33.3930151Z + )?; +2026-06-21T01:26:33.3930304Z + vault.store_public_key( +2026-06-21T01:26:33.3930445Z + "admin_public_key", +2026-06-21T01:26:33.3930750Z + "GBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU", +2026-06-21T01:26:33.3930876Z + )?; +2026-06-21T01:26:33.3930992Z + +2026-06-21T01:26:33.3931157Z vault.save_to_file(temp_path)?; +2026-06-21T01:26:33.3931280Z +2026-06-21T01:26:33.3931799Z let loaded_vault = EncryptedVault::load_from_file(temp_path, "test_password")?; +2026-06-21T01:26:33.3932151Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/encrypted_vault.rs:325: +2026-06-21T01:26:33.3932463Z let secret = loaded_vault.retrieve_secret_key("admin_secret_key")?; +2026-06-21T01:26:33.3932635Z let public = loaded_vault.retrieve_public_key("admin_public_key")?; +2026-06-21T01:26:33.3932719Z +2026-06-21T01:26:33.3932969Z - assert_eq!(secret, "SBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU"); +2026-06-21T01:26:33.3933211Z - assert_eq!(public, "GBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU"); +2026-06-21T01:26:33.3933303Z + assert_eq!( +2026-06-21T01:26:33.3933384Z + secret, +2026-06-21T01:26:33.3933586Z + "SBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU" +2026-06-21T01:26:33.3933671Z + ); +2026-06-21T01:26:33.3933756Z + assert_eq!( +2026-06-21T01:26:33.3933851Z + public, +2026-06-21T01:26:33.3934029Z + "GBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU" +2026-06-21T01:26:33.3934120Z + ); +2026-06-21T01:26:33.3934203Z +2026-06-21T01:26:33.3934288Z // Cleanup +2026-06-21T01:26:33.3934409Z let _ = fs::remove_file(temp_path); +2026-06-21T01:26:33.3934722Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/encrypted_vault.rs:336: +2026-06-21T01:26:33.3934810Z #[test] +2026-06-21T01:26:33.3934939Z fn test_export_to_env_vars() -> Result<()> { +2026-06-21T01:26:33.3935055Z let mut vault = EncryptedVault::new(); +2026-06-21T01:26:33.3935394Z - vault.store_public_key("admin_public_key", "GBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU")?; +2026-06-21T01:26:33.3935506Z + vault.store_public_key( +2026-06-21T01:26:33.3935600Z + "admin_public_key", +2026-06-21T01:26:33.3935799Z + "GBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU", +2026-06-21T01:26:33.3935886Z + )?; +2026-06-21T01:26:33.3935974Z +2026-06-21T01:26:33.3936093Z let vars = vault.export_to_env_vars(); +2026-06-21T01:26:33.3936200Z assert!(!vars.is_empty()); +2026-06-21T01:26:33.3936557Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/environment_config.rs:108: +2026-06-21T01:26:33.3936645Z } +2026-06-21T01:26:33.3936725Z +2026-06-21T01:26:33.3936876Z pub fn save_to_file(&self, path: &str) -> Result<()> { +2026-06-21T01:26:33.3937001Z - let content = toml::to_string_pretty(self) +2026-06-21T01:26:33.3937135Z - .context("Failed to serialize config")?; +2026-06-21T01:26:33.3937373Z + let content = toml::to_string_pretty(self).context("Failed to serialize config")?; +2026-06-21T01:26:33.3937554Z fs::write(path, content).context("Failed to write config file")?; +2026-06-21T01:26:33.3937648Z Ok(()) +2026-06-21T01:26:33.3937733Z } +2026-06-21T01:26:33.3938056Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/environment_config.rs:136: +2026-06-21T01:26:33.3938281Z println!("✅ Testnet configuration is valid"); +2026-06-21T01:26:33.3938488Z println!("💡 To test connection, ensure you have:"); +2026-06-21T01:26:33.3938913Z println!(" 1. Installed Soroban CLI: cargo install soroban-cli"); +2026-06-21T01:26:33.3939204Z - println!(" 2. Generated a testnet keypair: soroban keys generate test_account --network testnet"); +2026-06-21T01:26:33.3939291Z + println!( +2026-06-21T01:26:33.3939542Z + " 2. Generated a testnet keypair: soroban keys generate test_account --network testnet" +2026-06-21T01:26:33.3939632Z + ); +2026-06-21T01:26:33.3939990Z println!(" 3. Funded account from: https://laboratory.stellar.org/#account-creator?network=testnet"); +2026-06-21T01:26:33.3940079Z +2026-06-21T01:26:33.3940167Z Ok(()) +2026-06-21T01:26:33.3942188Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/key_manager.rs:105: +2026-06-21T01:26:33.3942317Z +2026-06-21T01:26:33.3942462Z let plaintext = cipher +2026-06-21T01:26:33.3942906Z .decrypt(nonce, Payload::from(encrypted.ciphertext.as_ref())) +2026-06-21T01:26:33.3943317Z - .map_err(|e| anyhow::anyhow!("Decryption failed (wrong key or corrupted data): {}", e))?; +2026-06-21T01:26:33.3943452Z + .map_err(|e| { +2026-06-21T01:26:33.3943796Z + anyhow::anyhow!("Decryption failed (wrong key or corrupted data): {}", e) +2026-06-21T01:26:33.3943925Z + })?; +2026-06-21T01:26:33.3944038Z +2026-06-21T01:26:33.3944369Z String::from_utf8(plaintext).context("Decrypted key is not valid UTF-8") +2026-06-21T01:26:33.3944491Z } +2026-06-21T01:26:33.3945018Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/key_manager.rs:132: +2026-06-21T01:26:33.3945371Z let ciphertext = hex::decode(parts[1]).context("Failed to decode ciphertext")?; +2026-06-21T01:26:33.3945498Z +2026-06-21T01:26:33.3945636Z if nonce.len() != 12 { +2026-06-21T01:26:33.3945990Z - anyhow::bail!("Invalid nonce length: expected 12 bytes, got {}", nonce.len()); +2026-06-21T01:26:33.3946131Z + anyhow::bail!( +2026-06-21T01:26:33.3946362Z + "Invalid nonce length: expected 12 bytes, got {}", +2026-06-21T01:26:33.3946501Z + nonce.len() +2026-06-21T01:26:33.3946618Z + ); +2026-06-21T01:26:33.3946744Z } +2026-06-21T01:26:33.3946864Z +2026-06-21T01:26:33.3947037Z Ok(EncryptedKey { nonce, ciphertext }) +2026-06-21T01:26:33.3947538Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/key_manager.rs:211: +2026-06-21T01:26:33.3947650Z +2026-06-21T01:26:33.3947776Z #[test] +2026-06-21T01:26:33.3947930Z fn test_validate_secret_key() { +2026-06-21T01:26:33.3948535Z - assert!(KeyManager::validate_secret_key("SBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU").is_ok()); +2026-06-21T01:26:33.3949316Z - assert!(KeyManager::validate_secret_key("GBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU").is_err()); +2026-06-21T01:26:33.3949514Z + assert!(KeyManager::validate_secret_key( +2026-06-21T01:26:33.3949772Z + "SBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU" +2026-06-21T01:26:33.3949859Z + ) +2026-06-21T01:26:33.3949945Z + .is_ok()); +2026-06-21T01:26:33.3950079Z + assert!(KeyManager::validate_secret_key( +2026-06-21T01:26:33.3950270Z + "GBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU" +2026-06-21T01:26:33.3950346Z + ) +2026-06-21T01:26:33.3950433Z + .is_err()); +2026-06-21T01:26:33.3950592Z assert!(KeyManager::validate_secret_key("short").is_err()); +2026-06-21T01:26:33.3950677Z } +2026-06-21T01:26:33.3950759Z +2026-06-21T01:26:33.3951064Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/key_manager.rs:219: +2026-06-21T01:26:33.3951158Z #[test] +2026-06-21T01:26:33.3951262Z fn test_validate_public_key() { +2026-06-21T01:26:33.3951610Z - assert!(KeyManager::validate_public_key("GBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU").is_ok()); +2026-06-21T01:26:33.3951966Z - assert!(KeyManager::validate_public_key("SBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU").is_err()); +2026-06-21T01:26:33.3952079Z + assert!(KeyManager::validate_public_key( +2026-06-21T01:26:33.3952269Z + "GBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU" +2026-06-21T01:26:33.3952351Z + ) +2026-06-21T01:26:33.3952431Z + .is_ok()); +2026-06-21T01:26:33.3952546Z + assert!(KeyManager::validate_public_key( +2026-06-21T01:26:33.3952728Z + "SBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU" +2026-06-21T01:26:33.3952806Z + ) +2026-06-21T01:26:33.3952892Z + .is_err()); +2026-06-21T01:26:33.3952970Z } +2026-06-21T01:26:33.3953052Z +2026-06-21T01:26:33.3953134Z #[test] +2026-06-21T01:26:33.3957270Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/keypair_manager.rs:1: +2026-06-21T01:26:33.3957548Z use anyhow::Result; +2026-06-21T01:26:33.3957675Z use std::env; +2026-06-21T01:26:33.3957784Z +2026-06-21T01:26:33.3957944Z -use crate::key_manager::KeyManager; +2026-06-21T01:26:33.3958122Z use crate::encrypted_vault::EncryptedVault; +2026-06-21T01:26:33.3958273Z +use crate::key_manager::KeyManager; +2026-06-21T01:26:33.3958390Z +2026-06-21T01:26:33.3958717Z /// Master keypair for the platform +2026-06-21T01:26:33.3958852Z #[derive(Debug, Clone)] +2026-06-21T01:26:33.3959382Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/keypair_manager.rs:63: +2026-06-21T01:26:33.3959640Z println!("🔑 Master Keypair"); +2026-06-21T01:26:33.3959861Z println!("━━━━━━━━━━━━━━━━"); +2026-06-21T01:26:33.3960061Z println!("Public Key: {}", self.public_key); +2026-06-21T01:26:33.3960226Z - println!("Secret Key: {}...{}", +2026-06-21T01:26:33.3960372Z - &self.secret_key[..4], +2026-06-21T01:26:33.3960505Z + println!( +2026-06-21T01:26:33.3960650Z + "Secret Key: {}...{}", +2026-06-21T01:26:33.3960786Z + &self.secret_key[..4], +2026-06-21T01:26:33.3960987Z &self.secret_key[self.secret_key.len() - 4..] +2026-06-21T01:26:33.3961107Z ); +2026-06-21T01:26:33.3961287Z println!("Network: {}", self.network); +2026-06-21T01:26:33.3961639Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/keypair_manager.rs:140: +2026-06-21T01:26:33.3961795Z println!("━━━━━━━━━━━━━━━━━━━━━"); +2026-06-21T01:26:33.3961958Z println!("Distribution Public Key: {}", self.public_key); +2026-06-21T01:26:33.3962122Z println!("Issuing Public Key: {}", self.issuing_public_key); +2026-06-21T01:26:33.3962230Z - println!("Secret Key: {}...{}", +2026-06-21T01:26:33.3962330Z - &self.secret_key[..4], +2026-06-21T01:26:33.3962434Z + println!( +2026-06-21T01:26:33.3962533Z + "Secret Key: {}...{}", +2026-06-21T01:26:33.3962627Z + &self.secret_key[..4], +2026-06-21T01:26:33.3962773Z &self.secret_key[self.secret_key.len() - 4..] +2026-06-21T01:26:33.3962853Z ); +2026-06-21T01:26:33.3962975Z println!("Network: {}", self.network); +2026-06-21T01:26:33.3963299Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/keypair_manager.rs:203: +2026-06-21T01:26:33.3963431Z println!("Account: {}", self.account_public_key); +2026-06-21T01:26:33.3963546Z println!("Network: {}", self.network); +2026-06-21T01:26:33.3963666Z println!("Balance: {} XLM", self.balance); +2026-06-21T01:26:33.3963949Z - println!("Status: {}", if self.is_funded { "✅ Funded" } else { "⏳ Not Funded" }); +2026-06-21T01:26:33.3964035Z + println!( +2026-06-21T01:26:33.3964125Z + "Status: {}", +2026-06-21T01:26:33.3964232Z + if self.is_funded { +2026-06-21T01:26:33.3964351Z + "✅ Funded" +2026-06-21T01:26:33.3964434Z + } else { +2026-06-21T01:26:33.3964563Z + "⏳ Not Funded" +2026-06-21T01:26:33.3964645Z + } +2026-06-21T01:26:33.3964723Z + ); +2026-06-21T01:26:33.3964805Z } +2026-06-21T01:26:33.3964884Z } +2026-06-21T01:26:33.3964966Z +2026-06-21T01:26:33.3965287Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/keypair_manager.rs:226: +2026-06-21T01:26:33.3965397Z let dist = DistributionAccount { +2026-06-21T01:26:33.3965678Z public_key: "GBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU".to_string(), +2026-06-21T01:26:33.3965931Z secret_key: "SBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU".to_string(), +2026-06-21T01:26:33.3966231Z - issuing_public_key: "GBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU".to_string(), +2026-06-21T01:26:33.3966674Z + issuing_public_key: "GBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU" +2026-06-21T01:26:33.3966768Z + .to_string(), +2026-06-21T01:26:33.3966991Z network: "testnet".to_string(), +2026-06-21T01:26:33.3967073Z }; +2026-06-21T01:26:33.3967185Z // Should fail because they're the same +2026-06-21T01:26:33.3967492Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/keypair_manager.rs:237: +2026-06-21T01:26:33.3967649Z fn test_account_funding_positive_amount() -> Result<()> { +2026-06-21T01:26:33.3967767Z let mut funding = AccountFunding::new( +2026-06-21T01:26:33.3967964Z "GBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU", +2026-06-21T01:26:33.3968049Z - "testnet" +2026-06-21T01:26:33.3968137Z + "testnet", +2026-06-21T01:26:33.3968221Z )?; +2026-06-21T01:26:33.3968325Z funding.fund_testnet(100.0)?; +2026-06-21T01:26:33.3968429Z assert!(funding.is_funded); +2026-06-21T01:26:33.3968976Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/keypair_manager.rs:249: +2026-06-21T01:26:33.3969139Z fn test_account_funding_invalid_amount() -> Result<()> { +2026-06-21T01:26:33.3969271Z let mut funding = AccountFunding::new( +2026-06-21T01:26:33.3969466Z "GBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU", +2026-06-21T01:26:33.3969558Z - "testnet" +2026-06-21T01:26:33.3969646Z + "testnet", +2026-06-21T01:26:33.3969725Z )?; +2026-06-21T01:26:33.3969846Z let result = funding.fund_testnet(-50.0); +2026-06-21T01:26:33.3969945Z assert!(result.is_err()); +2026-06-21T01:26:33.3970257Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/keypair_manager.rs:260: +2026-06-21T01:26:33.3970404Z fn test_account_funding_mainnet_fails() -> Result<()> { +2026-06-21T01:26:33.3970515Z let mut funding = AccountFunding::new( +2026-06-21T01:26:33.3970707Z "GBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU", +2026-06-21T01:26:33.3970792Z - "mainnet" +2026-06-21T01:26:33.3970874Z + "mainnet", +2026-06-21T01:26:33.3970961Z )?; +2026-06-21T01:26:33.3971075Z let result = funding.fund_testnet(100.0); +2026-06-21T01:26:33.3971176Z assert!(result.is_err()); +2026-06-21T01:26:33.4038530Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/main.rs:3: +2026-06-21T01:26:33.4039015Z //! Parses sub-commands for config, network, vault, asset, signing, response, +2026-06-21T01:26:33.4039295Z //! keymanager, keypair, deploy, invoke, and account operations. +2026-06-21T01:26:33.4039423Z +2026-06-21T01:26:33.4039583Z -use anyhow::{Result, Context}; +2026-06-21T01:26:33.4039733Z +use anyhow::{Context, Result}; +2026-06-21T01:26:33.4039864Z use std::env; +2026-06-21T01:26:33.4039980Z +2026-06-21T01:26:33.4040170Z mod environment_config; +2026-06-21T01:26:33.4040635Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/main.rs:10: +2026-06-21T01:26:33.4040963Z -use environment_config::{EnvironmentConfig, check_testnet_connection}; +2026-06-21T01:26:33.4041274Z +use environment_config::{check_testnet_connection, EnvironmentConfig}; +2026-06-21T01:26:33.4041401Z +2026-06-21T01:26:33.4041532Z mod secure_vault; +2026-06-21T01:26:33.4041853Z -use secure_vault::{SecureVault, check_mainnet_readiness, toggle_network}; +2026-06-21T01:26:33.4042172Z +use secure_vault::{check_mainnet_readiness, toggle_network, SecureVault}; +2026-06-21T01:26:33.4042288Z +2026-06-21T01:26:33.4042429Z mod asset_issuing; +2026-06-21T01:26:33.4043099Z -use asset_issuing::{AssetConfig, check_issuing_readiness, generate_issuing_keypair, establish_trustline, issue_asset, TrustlineConfig}; +2026-06-21T01:26:33.4043232Z +use asset_issuing::{ +2026-06-21T01:26:33.4043631Z + check_issuing_readiness, establish_trustline, generate_issuing_keypair, issue_asset, +2026-06-21T01:26:33.4043782Z + AssetConfig, TrustlineConfig, +2026-06-21T01:26:33.4044138Z +}; +2026-06-21T01:26:33.4044257Z +2026-06-21T01:26:33.4044379Z mod key_manager; +2026-06-21T01:26:33.4044535Z use key_manager::KeyManager; +2026-06-21T01:26:33.4045138Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/main.rs:22: +2026-06-21T01:26:33.4045300Z use encrypted_vault::EncryptedVault; +2026-06-21T01:26:33.4045419Z +2026-06-21T01:26:33.4045548Z mod keypair_manager; +2026-06-21T01:26:33.4045882Z -use keypair_manager::{MasterKeypair, DistributionAccount, AccountFunding}; +2026-06-21T01:26:33.4046204Z +use keypair_manager::{AccountFunding, DistributionAccount, MasterKeypair}; +2026-06-21T01:26:33.4046314Z +2026-06-21T01:26:33.4046445Z mod signing_request; +2026-06-21T01:26:33.4046814Z use signing_request::{SigningRequest, SigningRequestBuilder, TransactionBuilder}; +2026-06-21T01:26:33.4047262Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/main.rs:31: +2026-06-21T01:26:33.4047530Z use response_handler::{ResponseHandler, SignedTransaction}; +2026-06-21T01:26:33.4047645Z +2026-06-21T01:26:33.4047971Z // Issue #128 – worker health monitoring modules +2026-06-21T01:26:33.4048117Z -mod worker_logger; +2026-06-21T01:26:33.4048253Z mod polling_scheduler; +2026-06-21T01:26:33.4048384Z +mod worker_logger; +2026-06-21T01:26:33.4048495Z +2026-06-21T01:26:33.4048898Z // Issue #141 – per-asset campaign totals +2026-06-21T01:26:33.4049036Z mod campaign_totals; +2026-06-21T01:26:33.4049478Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/main.rs:83: +2026-06-21T01:26:33.4049601Z +2026-06-21T01:26:33.4049758Z fn handle_config() -> Result<()> { +2026-06-21T01:26:33.4049946Z let config = EnvironmentConfig::from_env()?; +2026-06-21T01:26:33.4050072Z - +2026-06-21T01:26:33.4050188Z + +2026-06-21T01:26:33.4050420Z println!("📋 Configuration Check"); +2026-06-21T01:26:33.4050644Z println!("━━━━━━━━━━━━━━━━━━━━━"); +2026-06-21T01:26:33.4050854Z println!("Active Network: {}", config.network); +2026-06-21T01:26:33.4051309Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/main.rs:120: +2026-06-21T01:26:33.4051434Z +2026-06-21T01:26:33.4051580Z fn handle_network() -> Result<()> { +2026-06-21T01:26:33.4051771Z let config = EnvironmentConfig::from_env()?; +2026-06-21T01:26:33.4051886Z - +2026-06-21T01:26:33.4052008Z + +2026-06-21T01:26:33.4052238Z println!("🌐 Network Configuration"); +2026-06-21T01:26:33.4052456Z println!("━━━━━━━━━━━━━━━━━━━━━━━━"); +2026-06-21T01:26:33.4052646Z println!("Active Network: {}", config.network); +2026-06-21T01:26:33.4053087Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/main.rs:153: +2026-06-21T01:26:33.4053225Z return Ok(()); +2026-06-21T01:26:33.4053347Z } +2026-06-21T01:26:33.4053460Z +2026-06-21T01:26:33.4053869Z - println!("🔄 Invoke method '{}' functionality coming soon...", args[0]); +2026-06-21T01:26:33.4054000Z + println!( +2026-06-21T01:26:33.4054316Z + "🔄 Invoke method '{}' functionality coming soon...", +2026-06-21T01:26:33.4054443Z + args[0] +2026-06-21T01:26:33.4054567Z + ); +2026-06-21T01:26:33.4054691Z Ok(()) +2026-06-21T01:26:33.4054810Z } +2026-06-21T01:26:33.4054923Z +2026-06-21T01:26:33.4055391Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/main.rs:165: +2026-06-21T01:26:33.4055537Z fn handle_vault() -> Result<()> { +2026-06-21T01:26:33.4055703Z let vault = SecureVault::from_env(); +2026-06-21T01:26:33.4055851Z vault.display_safe(); +2026-06-21T01:26:33.4055965Z - +2026-06-21T01:26:33.4056085Z + +2026-06-21T01:26:33.4056212Z println!(); +2026-06-21T01:26:33.4056455Z println!("💡 Security Best Practices:"); +2026-06-21T01:26:33.4056708Z println!(" - Never commit secret keys to version control"); +2026-06-21T01:26:33.4057154Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/main.rs:172: +2026-06-21T01:26:33.4057595Z println!(" - Use .env files and add them to .gitignore"); +2026-06-21T01:26:33.4057768Z println!(" - Rotate keys regularly"); +2026-06-21T01:26:33.4058145Z println!(" - Use separate keys for testnet and mainnet"); +2026-06-21T01:26:33.4058266Z - +2026-06-21T01:26:33.4058386Z + +2026-06-21T01:26:33.4058506Z Ok(()) +2026-06-21T01:26:33.4058804Z } +2026-06-21T01:26:33.4058885Z +2026-06-21T01:26:33.4059159Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/main.rs:216: +2026-06-21T01:26:33.4059413Z println!("Usage: orbitchain-cli asset trustline [asset_code]"); +2026-06-21T01:26:33.4059506Z return Ok(()); +2026-06-21T01:26:33.4059593Z } +2026-06-21T01:26:33.4059673Z - +2026-06-21T01:26:33.4059757Z + +2026-06-21T01:26:33.4059856Z let holder = &args[1]; +2026-06-21T01:26:33.4059996Z let asset_config = AssetConfig::from_env()?; +2026-06-21T01:26:33.4060117Z let asset_code = if args.len() > 2 { +2026-06-21T01:26:33.4060385Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/main.rs:224: +2026-06-21T01:26:33.4060475Z } else { +2026-06-21T01:26:33.4060582Z asset_config.code.clone() +2026-06-21T01:26:33.4060662Z }; +2026-06-21T01:26:33.4060744Z - +2026-06-21T01:26:33.4060823Z + +2026-06-21T01:26:33.4061048Z let network = env::var("SOROBAN_NETWORK").unwrap_or_else(|_| "testnet".to_string()); +2026-06-21T01:26:33.4061132Z - +2026-06-21T01:26:33.4061216Z + +2026-06-21T01:26:33.4061341Z let trustline_config = TrustlineConfig { +2026-06-21T01:26:33.4061437Z asset_code, +2026-06-21T01:26:33.4061580Z asset_issuer: asset_config.issuing_public_key, +2026-06-21T01:26:33.4061852Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/main.rs:233: +2026-06-21T01:26:33.4061981Z holder_public_key: holder.clone(), +2026-06-21T01:26:33.4062061Z }; +2026-06-21T01:26:33.4062147Z - +2026-06-21T01:26:33.4062228Z + +2026-06-21T01:26:33.4062374Z establish_trustline(&trustline_config, &network)?; +2026-06-21T01:26:33.4062460Z } +2026-06-21T01:26:33.4062545Z "issue" => { +2026-06-21T01:26:33.4062837Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/main.rs:240: +2026-06-21T01:26:33.4063037Z println!("Usage: orbitchain-cli asset issue "); +2026-06-21T01:26:33.4063129Z return Ok(()); +2026-06-21T01:26:33.4063214Z } +2026-06-21T01:26:33.4063295Z - +2026-06-21T01:26:33.4063380Z + +2026-06-21T01:26:33.4063483Z let recipient = &args[1]; +2026-06-21T01:26:33.4063658Z let amount: f64 = args[2].parse().context("Invalid amount")?; +2026-06-21T01:26:33.4064045Z let network = env::var("SOROBAN_NETWORK").unwrap_or_else(|_| "testnet".to_string()); +2026-06-21T01:26:33.4064484Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/main.rs:247: +2026-06-21T01:26:33.4064676Z let asset_config = AssetConfig::from_env()?; +2026-06-21T01:26:33.4064793Z - +2026-06-21T01:26:33.4064902Z + +2026-06-21T01:26:33.4065148Z issue_asset(&asset_config, recipient, amount, &network)?; +2026-06-21T01:26:33.4065264Z } +2026-06-21T01:26:33.4065375Z _ => { +2026-06-21T01:26:33.4065820Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/main.rs:279: +2026-06-21T01:26:33.4066186Z println!("Usage: orbitchain-cli keymanager encrypt "); +2026-06-21T01:26:33.4066316Z return Ok(()); +2026-06-21T01:26:33.4066436Z } +2026-06-21T01:26:33.4066553Z - +2026-06-21T01:26:33.4066676Z + +2026-06-21T01:26:33.4066834Z let password = &args[1]; +2026-06-21T01:26:33.4067167Z let secret_key = &args[2]; +2026-06-21T01:26:33.4067296Z - +2026-06-21T01:26:33.4067409Z + +2026-06-21T01:26:33.4067759Z KeyManager::validate_secret_key(secret_key)?; +2026-06-21T01:26:33.4067992Z let manager = KeyManager::from_password(password)?; +2026-06-21T01:26:33.4068248Z let encrypted_hex = manager.export_encrypted(secret_key)?; +2026-06-21T01:26:33.4068824Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/main.rs:289: +2026-06-21T01:26:33.4068947Z - +2026-06-21T01:26:33.4069060Z + +2026-06-21T01:26:33.4069363Z println!("✅ Key encrypted successfully"); +2026-06-21T01:26:33.4069627Z println!("━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"); +2026-06-21T01:26:33.4069813Z println!("Encrypted Key (hex format):"); +2026-06-21T01:26:33.4070264Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/main.rs:299: +2026-06-21T01:26:33.4070645Z println!("Usage: orbitchain-cli keymanager decrypt "); +2026-06-21T01:26:33.4070785Z return Ok(()); +2026-06-21T01:26:33.4070912Z } +2026-06-21T01:26:33.4071024Z - +2026-06-21T01:26:33.4071146Z + +2026-06-21T01:26:33.4071286Z let password = &args[1]; +2026-06-21T01:26:33.4071440Z let encrypted_hex = &args[2]; +2026-06-21T01:26:33.4071559Z - +2026-06-21T01:26:33.4071670Z + +2026-06-21T01:26:33.4071898Z let manager = KeyManager::from_password(password)?; +2026-06-21T01:26:33.4072148Z let encrypted = manager.import_encrypted(encrypted_hex)?; +2026-06-21T01:26:33.4072361Z let secret_key = manager.decrypt_key(&encrypted)?; +2026-06-21T01:26:33.4072803Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/main.rs:309: +2026-06-21T01:26:33.4072917Z - +2026-06-21T01:26:33.4073038Z + +2026-06-21T01:26:33.4073314Z println!("✅ Key decrypted successfully"); +2026-06-21T01:26:33.4073562Z println!("━━━━━━━━━━━━━━━━━━━━━━━━"); +2026-06-21T01:26:33.4073743Z println!("Secret Key: {}", secret_key); +2026-06-21T01:26:33.4074211Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/main.rs:318: +2026-06-21T01:26:33.4074520Z println!("Usage: orbitchain-cli keymanager init-vault "); +2026-06-21T01:26:33.4074658Z return Ok(()); +2026-06-21T01:26:33.4074773Z } +2026-06-21T01:26:33.4074898Z - +2026-06-21T01:26:33.4075015Z + +2026-06-21T01:26:33.4075152Z let password = &args[1]; +2026-06-21T01:26:33.4075407Z let mut vault = EncryptedVault::with_password(password)?; +2026-06-21T01:26:33.4075533Z - +2026-06-21T01:26:33.4075648Z + +2026-06-21T01:26:33.4075921Z println!("✅ Encrypted vault initialized"); +2026-06-21T01:26:33.4076022Z vault.display_status(); +2026-06-21T01:26:33.4076137Z println!(); +2026-06-21T01:26:33.4076411Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/main.rs:328: +2026-06-21T01:26:33.4076687Z - println!("💡 Set VAULT_MASTER_PASSWORD={} in your .env file", password); +2026-06-21T01:26:33.4076781Z + println!( +2026-06-21T01:26:33.4076984Z + "💡 Set VAULT_MASTER_PASSWORD={} in your .env file", +2026-06-21T01:26:33.4077077Z + password +2026-06-21T01:26:33.4077179Z + ); +2026-06-21T01:26:33.4077257Z } +2026-06-21T01:26:33.4077360Z "vault-status" => { +2026-06-21T01:26:33.4077492Z let vault = EncryptedVault::from_env()?; +2026-06-21T01:26:33.4077762Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/main.rs:336: +2026-06-21T01:26:33.4077955Z println!("Usage: orbitchain-cli keymanager vault-save "); +2026-06-21T01:26:33.4078051Z return Ok(()); +2026-06-21T01:26:33.4078304Z } +2026-06-21T01:26:33.4078392Z - +2026-06-21T01:26:33.4078473Z + +2026-06-21T01:26:33.4078741Z let path = &args[1]; +2026-06-21T01:26:33.4079031Z let vault = EncryptedVault::from_env()?; +2026-06-21T01:26:33.4079136Z vault.save_to_file(path)?; +2026-06-21T01:26:33.4079427Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/main.rs:346: +2026-06-21T01:26:33.4079656Z println!("Usage: orbitchain-cli keymanager vault-load "); +2026-06-21T01:26:33.4079756Z return Ok(()); +2026-06-21T01:26:33.4079842Z } +2026-06-21T01:26:33.4079920Z - +2026-06-21T01:26:33.4080004Z + +2026-06-21T01:26:33.4080100Z let path = &args[1]; +2026-06-21T01:26:33.4080198Z let password = &args[2]; +2026-06-21T01:26:33.4080282Z - +2026-06-21T01:26:33.4080360Z + +2026-06-21T01:26:33.4080549Z let vault = EncryptedVault::load_from_file(path, password)?; +2026-06-21T01:26:33.4080656Z vault.display_status(); +2026-06-21T01:26:33.4080735Z } +2026-06-21T01:26:33.4081013Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/main.rs:382: +2026-06-21T01:26:33.4081106Z match args[0].as_str() { +2026-06-21T01:26:33.4081207Z "generate-master" => { +2026-06-21T01:26:33.4081440Z let network = env::var("SOROBAN_NETWORK").unwrap_or_else(|_| "testnet".to_string()); +2026-06-21T01:26:33.4081520Z - +2026-06-21T01:26:33.4081603Z + +2026-06-21T01:26:33.4081793Z println!("🔑 Generating Master Keypair"); +2026-06-21T01:26:33.4081958Z println!("━━━━━━━━━━━━━━━━━━━━━━━━━━━"); +2026-06-21T01:26:33.4082041Z - +2026-06-21T01:26:33.4082119Z + +2026-06-21T01:26:33.4082272Z let keypair = MasterKeypair::generate(&network)?; +2026-06-21T01:26:33.4082373Z keypair.display_safe(); +2026-06-21T01:26:33.4082452Z - +2026-06-21T01:26:33.4082545Z + +2026-06-21T01:26:33.4082641Z println!(); +2026-06-21T01:26:33.4082821Z println!("💡 Store this keypair securely:"); +2026-06-21T01:26:33.4083093Z - println!(" orbitchain-cli keymanager encrypt '' '{}'", keypair.secret_key); +2026-06-21T01:26:33.4083181Z + println!( +2026-06-21T01:26:33.4083351Z + " orbitchain-cli keymanager encrypt '' '{}'", +2026-06-21T01:26:33.4083452Z + keypair.secret_key +2026-06-21T01:26:33.4083533Z + ); +2026-06-21T01:26:33.4083619Z } +2026-06-21T01:26:33.4083723Z "generate-distribution" => { +2026-06-21T01:26:33.4083823Z if args.len() < 2 { +2026-06-21T01:26:33.4084093Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/main.rs:398: +2026-06-21T01:26:33.4084350Z - println!("Usage: orbitchain-cli keypair generate-distribution "); +2026-06-21T01:26:33.4084579Z + println!( +2026-06-21T01:26:33.4084813Z + "Usage: orbitchain-cli keypair generate-distribution " +2026-06-21T01:26:33.4084982Z + ); +2026-06-21T01:26:33.4085079Z return Ok(()); +2026-06-21T01:26:33.4085163Z } +2026-06-21T01:26:33.4085244Z - +2026-06-21T01:26:33.4085387Z + +2026-06-21T01:26:33.4085489Z let issuing_pub = &args[1]; +2026-06-21T01:26:33.4085727Z let network = env::var("SOROBAN_NETWORK").unwrap_or_else(|_| "testnet".to_string()); +2026-06-21T01:26:33.4085815Z - +2026-06-21T01:26:33.4085892Z + +2026-06-21T01:26:33.4086099Z println!("💰 Generating Distribution Account"); +2026-06-21T01:26:33.4086279Z println!("━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"); +2026-06-21T01:26:33.4086369Z - +2026-06-21T01:26:33.4086452Z + +2026-06-21T01:26:33.4086647Z let dist = DistributionAccount::generate(&network, issuing_pub)?; +2026-06-21T01:26:33.4086764Z dist.display_safe(); +2026-06-21T01:26:33.4086850Z - +2026-06-21T01:26:33.4086930Z + +2026-06-21T01:26:33.4087036Z println!(); +2026-06-21T01:26:33.4087299Z println!("💡 Link this distribution account to your issuing account"); +2026-06-21T01:26:33.4087388Z } +2026-06-21T01:26:33.4087670Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/main.rs:440: +2026-06-21T01:26:33.4087905Z println!("Usage: orbitchain-cli keypair fund "); +2026-06-21T01:26:33.4088008Z return Ok(()); +2026-06-21T01:26:33.4088094Z } +2026-06-21T01:26:33.4088174Z - +2026-06-21T01:26:33.4088258Z + +2026-06-21T01:26:33.4088359Z let account_pub = &args[1]; +2026-06-21T01:26:33.4088533Z let amount: f64 = args[2].parse().context("Invalid amount")?; +2026-06-21T01:26:33.4089013Z let network = env::var("SOROBAN_NETWORK").unwrap_or_else(|_| "testnet".to_string()); +2026-06-21T01:26:33.4089283Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/main.rs:447: +2026-06-21T01:26:33.4089380Z - +2026-06-21T01:26:33.4089464Z + +2026-06-21T01:26:33.4089643Z let mut funding = AccountFunding::new(account_pub, &network)?; +2026-06-21T01:26:33.4089754Z funding.fund_testnet(amount)?; +2026-06-21T01:26:33.4089858Z funding.display_status(); +2026-06-21T01:26:33.4090129Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/main.rs:452: +2026-06-21T01:26:33.4090233Z "validate-master" => { +2026-06-21T01:26:33.4090362Z let vault = EncryptedVault::from_env()?; +2026-06-21T01:26:33.4090508Z match MasterKeypair::load_from_vault(&vault) { +2026-06-21T01:26:33.4090606Z - Ok(keypair) => { +2026-06-21T01:26:33.4090720Z - match keypair.validate() { +2026-06-21T01:26:33.4090820Z - Ok(_) => { +2026-06-21T01:26:33.4091022Z - println!("✅ Master keypair is valid"); +2026-06-21T01:26:33.4091151Z - keypair.display_safe(); +2026-06-21T01:26:33.4091244Z - } +2026-06-21T01:26:33.4091336Z - Err(e) => { +2026-06-21T01:26:33.4091576Z - println!("❌ Master keypair validation failed: {}", e); +2026-06-21T01:26:33.4091668Z - } +2026-06-21T01:26:33.4091798Z + Ok(keypair) => match keypair.validate() { +2026-06-21T01:26:33.4091889Z + Ok(_) => { +2026-06-21T01:26:33.4092072Z + println!("✅ Master keypair is valid"); +2026-06-21T01:26:33.4092192Z + keypair.display_safe(); +2026-06-21T01:26:33.4092280Z } +2026-06-21T01:26:33.4092361Z - } +2026-06-21T01:26:33.4092459Z + Err(e) => { +2026-06-21T01:26:33.4092835Z + println!("❌ Master keypair validation failed: {}", e); +2026-06-21T01:26:33.4092920Z + } +2026-06-21T01:26:33.4093212Z + }, +2026-06-21T01:26:33.4093303Z Err(_) => { +2026-06-21T01:26:33.4093514Z println!("❌ Master keypair not found in vault"); +2026-06-21T01:26:33.4093603Z } +2026-06-21T01:26:33.4093871Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/main.rs:471: +2026-06-21T01:26:33.4093982Z "validate-distribution" => { +2026-06-21T01:26:33.4094114Z let vault = EncryptedVault::from_env()?; +2026-06-21T01:26:33.4094270Z match DistributionAccount::load_from_vault(&vault) { +2026-06-21T01:26:33.4094369Z - Ok(dist) => { +2026-06-21T01:26:33.4094476Z - match dist.validate() { +2026-06-21T01:26:33.4094573Z - Ok(_) => { +2026-06-21T01:26:33.4094791Z - println!("✅ Distribution account is valid"); +2026-06-21T01:26:33.4094902Z - dist.display_safe(); +2026-06-21T01:26:33.4094990Z - } +2026-06-21T01:26:33.4095093Z - Err(e) => { +2026-06-21T01:26:33.4095344Z - println!("❌ Distribution account validation failed: {}", e); +2026-06-21T01:26:33.4095432Z - } +2026-06-21T01:26:33.4095548Z + Ok(dist) => match dist.validate() { +2026-06-21T01:26:33.4095642Z + Ok(_) => { +2026-06-21T01:26:33.4095837Z + println!("✅ Distribution account is valid"); +2026-06-21T01:26:33.4095944Z + dist.display_safe(); +2026-06-21T01:26:33.4096030Z } +2026-06-21T01:26:33.4096110Z - } +2026-06-21T01:26:33.4096202Z + Err(e) => { +2026-06-21T01:26:33.4096444Z + println!("❌ Distribution account validation failed: {}", e); +2026-06-21T01:26:33.4096534Z + } +2026-06-21T01:26:33.4096619Z + }, +2026-06-21T01:26:33.4096708Z Err(_) => { +2026-06-21T01:26:33.4096926Z println!("❌ Distribution account not found in vault"); +2026-06-21T01:26:33.4097011Z } +2026-06-21T01:26:33.4097279Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/main.rs:519: +2026-06-21T01:26:33.4097369Z } +2026-06-21T01:26:33.4097454Z +2026-06-21T01:26:33.4097556Z let donor = args[1].clone(); +2026-06-21T01:26:33.4097680Z - let campaign_id: u64 = args[2].parse() +2026-06-21T01:26:33.4097801Z - .context("Invalid campaign ID")?; +2026-06-21T01:26:33.4097908Z - let amount: i128 = args[3].parse() +2026-06-21T01:26:33.4098020Z - .context("Invalid amount")?; +2026-06-21T01:26:33.4098214Z + let campaign_id: u64 = args[2].parse().context("Invalid campaign ID")?; +2026-06-21T01:26:33.4098389Z + let amount: i128 = args[3].parse().context("Invalid amount")?; +2026-06-21T01:26:33.4098497Z let asset = if args.len() > 4 { +2026-06-21T01:26:33.4098710Z args[4].clone() +2026-06-21T01:26:33.4098805Z } else { +2026-06-21T01:26:33.4099074Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/main.rs:534: +2026-06-21T01:26:33.4099156Z None +2026-06-21T01:26:33.4099245Z }; +2026-06-21T01:26:33.4099325Z +2026-06-21T01:26:33.4099622Z - match TransactionBuilder::build_donation_request(donor, campaign_id, amount, asset, memo) { +2026-06-21T01:26:33.4099772Z + match TransactionBuilder::build_donation_request( +2026-06-21T01:26:33.4099859Z + donor, +2026-06-21T01:26:33.4099957Z + campaign_id, +2026-06-21T01:26:33.4100049Z + amount, +2026-06-21T01:26:33.4100175Z + asset, +2026-06-21T01:26:33.4100307Z + memo, +2026-06-21T01:26:33.4100605Z + ) { +2026-06-21T01:26:33.4100742Z Ok(req) => { +2026-06-21T01:26:33.4100886Z req.display(); +2026-06-21T01:26:33.4101164Z println!(); +2026-06-21T01:26:33.4101613Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/main.rs:556: +2026-06-21T01:26:33.4101727Z +2026-06-21T01:26:33.4101882Z let creator = args[1].clone(); +2026-06-21T01:26:33.4102029Z let title = args[2].clone(); +2026-06-21T01:26:33.4102176Z - let goal: i128 = args[3].parse() +2026-06-21T01:26:33.4102332Z - .context("Invalid goal")?; +2026-06-21T01:26:33.4102497Z - let deadline: u64 = args[4].parse() +2026-06-21T01:26:33.4102654Z - .context("Invalid deadline")?; +2026-06-21T01:26:33.4102898Z + let goal: i128 = args[3].parse().context("Invalid goal")?; +2026-06-21T01:26:33.4103171Z + let deadline: u64 = args[4].parse().context("Invalid deadline")?; +2026-06-21T01:26:33.4103297Z +2026-06-21T01:26:33.4103706Z match TransactionBuilder::build_campaign_request(creator, title, goal, deadline) { +2026-06-21T01:26:33.4103840Z Ok(req) => { +2026-06-21T01:26:33.4104286Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/main.rs:589: +2026-06-21T01:26:33.4104410Z }; +2026-06-21T01:26:33.4104522Z +2026-06-21T01:26:33.4104735Z match SigningRequestBuilder::new(xdr, None) { +2026-06-21T01:26:33.4104871Z - Ok(builder) => { +2026-06-21T01:26:33.4105127Z - match builder.with_description(description).build() { +2026-06-21T01:26:33.4105265Z - Ok(req) => { +2026-06-21T01:26:33.4105404Z - req.display(); +2026-06-21T01:26:33.4105549Z - println!(); +2026-06-21T01:26:33.4105920Z - println!("✅ Signing request created successfully"); +2026-06-21T01:26:33.4106050Z - } +2026-06-21T01:26:33.4106186Z - Err(e) => { +2026-06-21T01:26:33.4106494Z - println!("❌ Failed to build request: {}", e); +2026-06-21T01:26:33.4106631Z - } +2026-06-21T01:26:33.4106933Z + Ok(builder) => match builder.with_description(description).build() { +2026-06-21T01:26:33.4107024Z + Ok(req) => { +2026-06-21T01:26:33.4107128Z + req.display(); +2026-06-21T01:26:33.4107224Z + println!(); +2026-06-21T01:26:33.4107440Z + println!("✅ Signing request created successfully"); +2026-06-21T01:26:33.4107531Z } +2026-06-21T01:26:33.4107612Z - } +2026-06-21T01:26:33.4107709Z + Err(e) => { +2026-06-21T01:26:33.4107912Z + println!("❌ Failed to build request: {}", e); +2026-06-21T01:26:33.4107992Z + } +2026-06-21T01:26:33.4108129Z + }, +2026-06-21T01:26:33.4108278Z Err(e) => { +2026-06-21T01:26:33.4108703Z println!("❌ Failed to create builder: {}", e); +2026-06-21T01:26:33.4108838Z } +2026-06-21T01:26:33.4109288Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/main.rs:614: +2026-06-21T01:26:33.4109411Z +2026-06-21T01:26:33.4109552Z let path = &args[1]; +2026-06-21T01:26:33.4109730Z match std::fs::read_to_string(path) { +2026-06-21T01:26:33.4109870Z - Ok(content) => { +2026-06-21T01:26:33.4110083Z - match SigningRequest::from_json(&content) { +2026-06-21T01:26:33.4110222Z - Ok(req) => { +2026-06-21T01:26:33.4110390Z - match req.validate() { +2026-06-21T01:26:33.4110523Z - Ok(_) => { +2026-06-21T01:26:33.4110845Z - println!("✅ Signing request is valid"); +2026-06-21T01:26:33.4111248Z - req.display(); +2026-06-21T01:26:33.4111377Z - } +2026-06-21T01:26:33.4111524Z - Err(e) => { +2026-06-21T01:26:33.4111969Z - println!("❌ Validation failed: {}", e); +2026-06-21T01:26:33.4112100Z - } +2026-06-21T01:26:33.4112230Z - } +2026-06-21T01:26:33.4112480Z + Ok(content) => match SigningRequest::from_json(&content) { +2026-06-21T01:26:33.4112657Z + Ok(req) => match req.validate() { +2026-06-21T01:26:33.4112790Z + Ok(_) => { +2026-06-21T01:26:33.4113078Z + println!("✅ Signing request is valid"); +2026-06-21T01:26:33.4113219Z + req.display(); +2026-06-21T01:26:33.4113337Z } +2026-06-21T01:26:33.4113474Z Err(e) => { +2026-06-21T01:26:33.4113799Z - println!("❌ Failed to parse request: {}", e); +2026-06-21T01:26:33.4114075Z + println!("❌ Validation failed: {}", e); +2026-06-21T01:26:33.4114220Z } +2026-06-21T01:26:33.4114335Z + }, +2026-06-21T01:26:33.4114423Z + Err(e) => { +2026-06-21T01:26:33.4114623Z + println!("❌ Failed to parse request: {}", e); +2026-06-21T01:26:33.4114707Z } +2026-06-21T01:26:33.4114796Z - } +2026-06-21T01:26:33.4114882Z + }, +2026-06-21T01:26:33.4114970Z Err(e) => { +2026-06-21T01:26:33.4115277Z println!("❌ Failed to read file: {}", e); +2026-06-21T01:26:33.4115399Z } +2026-06-21T01:26:33.4115863Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/main.rs:647: +2026-06-21T01:26:33.4115979Z +2026-06-21T01:26:33.4116113Z let path = &args[1]; +2026-06-21T01:26:33.4116304Z match std::fs::read_to_string(path) { +2026-06-21T01:26:33.4116437Z - Ok(content) => { +2026-06-21T01:26:33.4116638Z - match SigningRequest::from_json(&content) { +2026-06-21T01:26:33.4116787Z - Ok(req) => { +2026-06-21T01:26:33.4116964Z - match req.to_wallet_format() { +2026-06-21T01:26:33.4117133Z - Ok(wallet_format) => { +2026-06-21T01:26:33.4117423Z - println!("📤 Wallet Format:"); +2026-06-21T01:26:33.4117603Z - println!("{}", wallet_format); +2026-06-21T01:26:33.4117740Z - } +2026-06-21T01:26:33.4117886Z - Err(e) => { +2026-06-21T01:26:33.4118183Z - println!("❌ Failed to export: {}", e); +2026-06-21T01:26:33.4118316Z - } +2026-06-21T01:26:33.4118438Z - } +2026-06-21T01:26:33.4118835Z + Ok(content) => match SigningRequest::from_json(&content) { +2026-06-21T01:26:33.4119031Z + Ok(req) => match req.to_wallet_format() { +2026-06-21T01:26:33.4119192Z + Ok(wallet_format) => { +2026-06-21T01:26:33.4119456Z + println!("📤 Wallet Format:"); +2026-06-21T01:26:33.4119634Z + println!("{}", wallet_format); +2026-06-21T01:26:33.4119756Z } +2026-06-21T01:26:33.4119893Z Err(e) => { +2026-06-21T01:26:33.4120199Z - println!("❌ Failed to parse request: {}", e); +2026-06-21T01:26:33.4120478Z + println!("❌ Failed to export: {}", e); +2026-06-21T01:26:33.4120608Z } +2026-06-21T01:26:33.4120728Z + }, +2026-06-21T01:26:33.4120865Z + Err(e) => { +2026-06-21T01:26:33.4121175Z + println!("❌ Failed to parse request: {}", e); +2026-06-21T01:26:33.4121480Z } +2026-06-21T01:26:33.4121573Z - } +2026-06-21T01:26:33.4121657Z + }, +2026-06-21T01:26:33.4121871Z Err(e) => { +2026-06-21T01:26:33.4122054Z println!("❌ Failed to read file: {}", e); +2026-06-21T01:26:33.4122137Z } +2026-06-21T01:26:33.4122484Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/main.rs:723: +2026-06-21T01:26:33.4122603Z +2026-06-21T01:26:33.4122742Z let path = &args[1]; +2026-06-21T01:26:33.4122925Z match std::fs::read_to_string(path) { +2026-06-21T01:26:33.4123053Z - Ok(content) => { +2026-06-21T01:26:33.4123289Z - match ResponseHandler::parse_response(&content) { +2026-06-21T01:26:33.4123424Z - Ok(tx) => { +2026-06-21T01:26:33.4123622Z - match ResponseHandler::validate(&tx) { +2026-06-21T01:26:33.4123775Z - Ok(_) => { +2026-06-21T01:26:33.4124084Z - println!("✅ Transaction is valid"); +2026-06-21T01:26:33.4124330Z - println!("Request ID: {}", tx.request_id); +2026-06-21T01:26:33.4124548Z - println!("Signer: {}", tx.signer); +2026-06-21T01:26:33.4124747Z - println!("Status: {}", tx.status); +2026-06-21T01:26:33.4125068Z - println!("XDR Length: {} bytes", tx.transaction_xdr.len()); +2026-06-21T01:26:33.4125198Z - } +2026-06-21T01:26:33.4125336Z - Err(e) => { +2026-06-21T01:26:33.4125650Z - println!("❌ Validation failed: {}", e); +2026-06-21T01:26:33.4125777Z - } +2026-06-21T01:26:33.4125895Z - } +2026-06-21T01:26:33.4126193Z + Ok(content) => match ResponseHandler::parse_response(&content) { +2026-06-21T01:26:33.4126406Z + Ok(tx) => match ResponseHandler::validate(&tx) { +2026-06-21T01:26:33.4126547Z + Ok(_) => { +2026-06-21T01:26:33.4126771Z + println!("✅ Transaction is valid"); +2026-06-21T01:26:33.4126909Z + println!("Request ID: {}", tx.request_id); +2026-06-21T01:26:33.4127040Z + println!("Signer: {}", tx.signer); +2026-06-21T01:26:33.4127165Z + println!("Status: {}", tx.status); +2026-06-21T01:26:33.4127349Z + println!("XDR Length: {} bytes", tx.transaction_xdr.len()); +2026-06-21T01:26:33.4127436Z } +2026-06-21T01:26:33.4127524Z Err(e) => { +2026-06-21T01:26:33.4127729Z - println!("❌ Failed to parse response: {}", e); +2026-06-21T01:26:33.4127929Z + println!("❌ Validation failed: {}", e); +2026-06-21T01:26:33.4128012Z } +2026-06-21T01:26:33.4128104Z + }, +2026-06-21T01:26:33.4128202Z + Err(e) => { +2026-06-21T01:26:33.4128397Z + println!("❌ Failed to parse response: {}", e); +2026-06-21T01:26:33.4128485Z } +2026-06-21T01:26:33.4128742Z - } +2026-06-21T01:26:33.4128863Z + }, +2026-06-21T01:26:33.4128963Z Err(e) => { +2026-06-21T01:26:33.4129141Z println!("❌ Failed to read file: {}", e); +2026-06-21T01:26:33.4129228Z } +2026-06-21T01:26:33.4129504Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/main.rs:759: +2026-06-21T01:26:33.4129603Z let output_path = &args[2]; +2026-06-21T01:26:33.4129691Z +2026-06-21T01:26:33.4129845Z match ResponseHandler::parse_response(&response) { +2026-06-21T01:26:33.4129940Z - Ok(tx) => { +2026-06-21T01:26:33.4130272Z - match ResponseHandler::save_to_file(&tx, output_path) { +2026-06-21T01:26:33.4130366Z - Ok(_) => { +2026-06-21T01:26:33.4130716Z - println!("✅ Transaction saved to {}", output_path); +2026-06-21T01:26:33.4130855Z - println!("Request ID: {}", tx.request_id); +2026-06-21T01:26:33.4130941Z - } +2026-06-21T01:26:33.4131037Z - Err(e) => { +2026-06-21T01:26:33.4131244Z - println!("❌ Failed to save transaction: {}", e); +2026-06-21T01:26:33.4131334Z - } +2026-06-21T01:26:33.4131518Z + Ok(tx) => match ResponseHandler::save_to_file(&tx, output_path) { +2026-06-21T01:26:33.4131606Z + Ok(_) => { +2026-06-21T01:26:33.4131815Z + println!("✅ Transaction saved to {}", output_path); +2026-06-21T01:26:33.4131960Z + println!("Request ID: {}", tx.request_id); +2026-06-21T01:26:33.4132045Z } +2026-06-21T01:26:33.4132131Z - } +2026-06-21T01:26:33.4132222Z + Err(e) => { +2026-06-21T01:26:33.4132438Z + println!("❌ Failed to save transaction: {}", e); +2026-06-21T01:26:33.4132528Z + } +2026-06-21T01:26:33.4132608Z + }, +2026-06-21T01:26:33.4132706Z Err(e) => { +2026-06-21T01:26:33.4132897Z println!("❌ Failed to parse response: {}", e); +2026-06-21T01:26:33.4132980Z } +2026-06-21T01:26:33.4133478Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/main.rs:835: +2026-06-21T01:26:33.4133596Z +2026-06-21T01:26:33.4133730Z Ok(()) +2026-06-21T01:26:33.4133855Z } +2026-06-21T01:26:33.4133968Z - +2026-06-21T01:26:33.4134088Z +2026-06-21T01:26:33.4134636Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/polling_scheduler.rs:23: +2026-06-21T01:26:33.4134788Z Err(e) => { +2026-06-21T01:26:33.4135090Z logger.log(LogLevel::Error, format!("Poll cycle failed: {e}")); +2026-06-21T01:26:33.4135250Z if !logger.is_healthy() { +2026-06-21T01:26:33.4135655Z - logger.log(LogLevel::Warn, format!("Worker health: {:?}", logger.health_status())); +2026-06-21T01:26:33.4135795Z + logger.log( +2026-06-21T01:26:33.4135940Z + LogLevel::Warn, +2026-06-21T01:26:33.4136192Z + format!("Worker health: {:?}", logger.health_status()), +2026-06-21T01:26:33.4136313Z + ); +2026-06-21T01:26:33.4136440Z } +2026-06-21T01:26:33.4136567Z } +2026-06-21T01:26:33.4136682Z } +2026-06-21T01:26:33.4137228Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/response_handler.rs:3: +2026-06-21T01:26:33.4137766Z //! Parses wallet signing responses, validates signed transactions, +2026-06-21T01:26:33.4138031Z //! and persists/loads them from JSON files for later submission. +2026-06-21T01:26:33.4138157Z +2026-06-21T01:26:33.4138324Z -use anyhow::{Result, Context, anyhow}; +2026-06-21T01:26:33.4138496Z -use serde::{Serialize, Deserialize}; +2026-06-21T01:26:33.4138799Z +use anyhow::{anyhow, Context, Result}; +2026-06-21T01:26:33.4138955Z +use serde::{Deserialize, Serialize}; +2026-06-21T01:26:33.4139101Z use serde_json::json; +2026-06-21T01:26:33.4139228Z use std::fs; +2026-06-21T01:26:33.4139355Z +2026-06-21T01:26:33.4139843Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/response_handler.rs:51: +2026-06-21T01:26:33.4139928Z #[must_use] +2026-06-21T01:26:33.4140148Z pub fn parse_response(response_json: &str) -> Result { +2026-06-21T01:26:33.4140266Z let parsed: serde_json::Value = +2026-06-21T01:26:33.4140390Z - serde_json::from_str(response_json) +2026-06-21T01:26:33.4140698Z - .context("Failed to parse response JSON")?; +2026-06-21T01:26:33.4140946Z + serde_json::from_str(response_json).context("Failed to parse response JSON")?; +2026-06-21T01:26:33.4141143Z +2026-06-21T01:26:33.4141248Z Ok(SignedTransaction { +2026-06-21T01:26:33.4141356Z request_id: parsed["requestId"] +2026-06-21T01:26:33.4141681Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/response_handler.rs:66: +2026-06-21T01:26:33.4141791Z signed_at: parsed["signedAt"] +2026-06-21T01:26:33.4142004Z .as_u64() +2026-06-21T01:26:33.4142189Z .unwrap_or_else(|| chrono::Local::now().timestamp() as u64), +2026-06-21T01:26:33.4142296Z - signer: parsed["signer"] +2026-06-21T01:26:33.4142386Z - .as_str() +2026-06-21T01:26:33.4142494Z - .unwrap_or("unknown") +2026-06-21T01:26:33.4142584Z - .to_string(), +2026-06-21T01:26:33.4142787Z + signer: parsed["signer"].as_str().unwrap_or("unknown").to_string(), +2026-06-21T01:26:33.4142916Z status: TransactionStatus::Signed, +2026-06-21T01:26:33.4143001Z }) +2026-06-21T01:26:33.4143098Z } +2026-06-21T01:26:33.4143404Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/response_handler.rs:95: +2026-06-21T01:26:33.4143517Z /// Save signed transaction to file. +2026-06-21T01:26:33.4143608Z #[must_use] +2026-06-21T01:26:33.4143796Z pub fn save_to_file(tx: &SignedTransaction, path: &str) -> Result<()> { +2026-06-21T01:26:33.4143931Z - let json = serde_json::to_string_pretty(tx) +2026-06-21T01:26:33.4144072Z - .context("Failed to serialize transaction")?; +2026-06-21T01:26:33.4144325Z + let json = serde_json::to_string_pretty(tx).context("Failed to serialize transaction")?; +2026-06-21T01:26:33.4144412Z +2026-06-21T01:26:33.4144510Z - fs::write(path, json) +2026-06-21T01:26:33.4144699Z - .context(format!("Failed to write transaction to {}", path))?; +2026-06-21T01:26:33.4144942Z + fs::write(path, json).context(format!("Failed to write transaction to {}", path))?; +2026-06-21T01:26:33.4145121Z +2026-06-21T01:26:33.4145215Z Ok(()) +2026-06-21T01:26:33.4145301Z } +2026-06-21T01:26:33.4145635Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/response_handler.rs:110: +2026-06-21T01:26:33.4145764Z let content = fs::read_to_string(path) +2026-06-21T01:26:33.4145940Z .context(format!("Failed to read transaction from {}", path))?; +2026-06-21T01:26:33.4146029Z +2026-06-21T01:26:33.4146142Z - serde_json::from_str(&content) +2026-06-21T01:26:33.4146274Z - .context("Failed to deserialize transaction") +2026-06-21T01:26:33.4146490Z + serde_json::from_str(&content).context("Failed to deserialize transaction") +2026-06-21T01:26:33.4146576Z } +2026-06-21T01:26:33.4146655Z +2026-06-21T01:26:33.4146816Z /// Process wallet response and return signed transaction +2026-06-21T01:26:33.4147147Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/response_handler.rs:171: +2026-06-21T01:26:33.4147239Z +2026-06-21T01:26:33.4147334Z /// Export as JSON +2026-06-21T01:26:33.4147452Z pub fn to_json(&self) -> Result { +2026-06-21T01:26:33.4147569Z - serde_json::to_string_pretty(self) +2026-06-21T01:26:33.4147697Z - .context("Failed to serialize response") +2026-06-21T01:26:33.4147905Z + serde_json::to_string_pretty(self).context("Failed to serialize response") +2026-06-21T01:26:33.4147991Z } +2026-06-21T01:26:33.4148070Z } +2026-06-21T01:26:33.4148155Z +2026-06-21T01:26:33.4148466Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/response_handler.rs:216: +2026-06-21T01:26:33.4148545Z +2026-06-21T01:26:33.4148878Z impl ResponseBuilder { +2026-06-21T01:26:33.4149015Z /// Create a test response JSON +2026-06-21T01:26:33.4149124Z - pub fn build_response( +2026-06-21T01:26:33.4149366Z - request_id: String, +2026-06-21T01:26:33.4149455Z - xdr: String, +2026-06-21T01:26:33.4149552Z - signer: String, +2026-06-21T01:26:33.4149760Z - ) -> String { +2026-06-21T01:26:33.4149988Z + pub fn build_response(request_id: String, xdr: String, signer: String) -> String { +2026-06-21T01:26:33.4150079Z json!({ +2026-06-21T01:26:33.4150181Z "requestId": request_id, +2026-06-21T01:26:33.4150279Z "xdr": xdr, +2026-06-21T01:26:33.4150597Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/response_handler.rs:257: +2026-06-21T01:26:33.4150696Z "xdr": "AAAAAA==test", +2026-06-21T01:26:33.4150931Z "signer": "GBJCHUKZMTFSLOMNC2P4TS4VJJBTCYL3SDKW3KSMSGQUZ6EFLXVX77JVH", +2026-06-21T01:26:33.4151028Z "signedAt": 1234567890 +2026-06-21T01:26:33.4151118Z - }).to_string(); +2026-06-21T01:26:33.4151206Z + }) +2026-06-21T01:26:33.4151291Z + .to_string(); +2026-06-21T01:26:33.4151385Z +2026-06-21T01:26:33.4151559Z let result = ResponseHandler::parse_response(&response); +2026-06-21T01:26:33.4151659Z assert!(result.is_ok()); +2026-06-21T01:26:33.4152042Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/signing_request.rs:3: +2026-06-21T01:26:33.4152240Z //! Builds signing requests for donation, campaign creation, and custom +2026-06-21T01:26:33.4152471Z //! transactions, with JSON serialization for wallet compatibility and QR export. +2026-06-21T01:26:33.4152559Z +2026-06-21T01:26:33.4152671Z -use anyhow::{Result, Context, anyhow}; +2026-06-21T01:26:33.4152785Z -use serde::{Serialize, Deserialize}; +2026-06-21T01:26:33.4152893Z +use anyhow::{anyhow, Context, Result}; +2026-06-21T01:26:33.4152994Z +use serde::{Deserialize, Serialize}; +2026-06-21T01:26:33.4153095Z use serde_json::json; +2026-06-21T01:26:33.4153198Z use sha2::{Digest, Sha256}; +2026-06-21T01:26:33.4153285Z use std::env; +2026-06-21T01:26:33.4153625Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/signing_request.rs:35: +2026-06-21T01:26:33.4153814Z env::var("SOROBAN_NETWORK").unwrap_or_else(|_| "testnet".to_string()) +2026-06-21T01:26:33.4153906Z }); +2026-06-21T01:26:33.4153988Z +2026-06-21T01:26:33.4154078Z - let id = format!( +2026-06-21T01:26:33.4154166Z - "req_{}", +2026-06-21T01:26:33.4154294Z - chrono::Local::now().timestamp_millis() +2026-06-21T01:26:33.4154381Z - ); +2026-06-21T01:26:33.4154565Z + let id = format!("req_{}", chrono::Local::now().timestamp_millis()); +2026-06-21T01:26:33.4154647Z +2026-06-21T01:26:33.4154758Z Ok(SigningRequestBuilder { +2026-06-21T01:26:33.4154846Z id, +2026-06-21T01:26:33.4155157Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/signing_request.rs:83: +2026-06-21T01:26:33.4155253Z asset: String, +2026-06-21T01:26:33.4155350Z memo: Option, +2026-06-21T01:26:33.4155462Z ) -> Result { +2026-06-21T01:26:33.4155558Z - let desc = format!( +2026-06-21T01:26:33.4155664Z - "Donate {} {} to campaign #{}", +2026-06-21T01:26:33.4155780Z - amount, asset, campaign_id +2026-06-21T01:26:33.4155869Z - ); +2026-06-21T01:26:33.4156074Z + let desc = format!("Donate {} {} to campaign #{}", amount, asset, campaign_id); +2026-06-21T01:26:33.4156159Z +2026-06-21T01:26:33.4156413Z // Placeholder XDR - in real implementation, this would be built from actual transaction +2026-06-21T01:26:33.4156520Z - let transaction_xdr = format!( +2026-06-21T01:26:33.4156614Z - "AAAAAA=={}{}{}", +2026-06-21T01:26:33.4156726Z - donor_address, campaign_id, amount +2026-06-21T01:26:33.4156813Z - ); +2026-06-21T01:26:33.4157038Z + let transaction_xdr = format!("AAAAAA=={}{}{}", donor_address, campaign_id, amount); +2026-06-21T01:26:33.4157125Z +2026-06-21T01:26:33.4157436Z - let mut builder = SigningRequestBuilder::new(transaction_xdr, None)? +2026-06-21T01:26:33.4157536Z - .with_description(desc); +2026-06-21T01:26:33.4157897Z + let mut builder = SigningRequestBuilder::new(transaction_xdr, None)?.with_description(desc); +2026-06-21T01:26:33.4157981Z +2026-06-21T01:26:33.4158080Z if let Some(m) = memo { +2026-06-21T01:26:33.4158248Z let desc = format!("{} [memo: {}]", builder.description, m); +2026-06-21T01:26:33.4158719Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/signing_request.rs:117: +2026-06-21T01:26:33.4158850Z title, goal, deadline +2026-06-21T01:26:33.4158937Z ); +2026-06-21T01:26:33.4159017Z +2026-06-21T01:26:33.4159127Z - let transaction_xdr = format!( +2026-06-21T01:26:33.4159223Z - "AAAAAA=={}{}{}{}", +2026-06-21T01:26:33.4159345Z - creator_address, title, goal, deadline +2026-06-21T01:26:33.4159430Z - ); +2026-06-21T01:26:33.4159671Z + let transaction_xdr = format!("AAAAAA=={}{}{}{}", creator_address, title, goal, deadline); +2026-06-21T01:26:33.4159756Z +2026-06-21T01:26:33.4159915Z SigningRequestBuilder::new(transaction_xdr, None)? +2026-06-21T01:26:33.4160019Z .with_description(desc) +2026-06-21T01:26:33.4160336Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/signing_request.rs:132: +2026-06-21T01:26:33.4160480Z /// Convert signing request to JSON for transmission. +2026-06-21T01:26:33.4160566Z #[must_use] +2026-06-21T01:26:33.4160689Z pub fn to_json(&self) -> Result { +2026-06-21T01:26:33.4160796Z - serde_json::to_string_pretty(self) +2026-06-21T01:26:33.4160963Z - .context("Failed to serialize signing request to JSON") +2026-06-21T01:26:33.4161219Z + serde_json::to_string_pretty(self).context("Failed to serialize signing request to JSON") +2026-06-21T01:26:33.4161300Z } +2026-06-21T01:26:33.4161386Z +2026-06-21T01:26:33.4161491Z /// Create from JSON string. +2026-06-21T01:26:33.4161794Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/signing_request.rs:140: +2026-06-21T01:26:33.4161887Z #[must_use] +2026-06-21T01:26:33.4162010Z pub fn from_json(json: &str) -> Result { +2026-06-21T01:26:33.4162118Z - serde_json::from_str(json) +2026-06-21T01:26:33.4162291Z - .context("Failed to deserialize signing request from JSON") +2026-06-21T01:26:33.4162524Z + serde_json::from_str(json).context("Failed to deserialize signing request from JSON") +2026-06-21T01:26:33.4162611Z } +2026-06-21T01:26:33.4162725Z +2026-06-21T01:26:33.4162897Z /// Convert to wallet signing format (for Freighter and similar) +2026-06-21T01:26:33.4163204Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/signing_request.rs:231: +2026-06-21T01:26:33.4163532Z /// Issue #132 – Sign using the secret key stored in the SOROBAN_SECRET_KEY env var. +2026-06-21T01:26:33.4163635Z #[must_use] +2026-06-21T01:26:33.4163808Z pub fn sign_from_env(&self) -> Result { +2026-06-21T01:26:33.4163952Z - let secret_key = env::var("SOROBAN_SECRET_KEY") +2026-06-21T01:26:33.4164116Z - .context("SOROBAN_SECRET_KEY not set in environment")?; +2026-06-21T01:26:33.4164212Z + let secret_key = +2026-06-21T01:26:33.4164450Z + env::var("SOROBAN_SECRET_KEY").context("SOROBAN_SECRET_KEY not set in environment")?; +2026-06-21T01:26:33.4164560Z self.sign_server_side(&secret_key) +2026-06-21T01:26:33.4164639Z } +2026-06-21T01:26:33.4164726Z } +2026-06-21T01:26:33.4165048Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/signing_request.rs:324: +2026-06-21T01:26:33.4165158Z description: "Test".to_string(), +2026-06-21T01:26:33.4165258Z created_at: 0, +2026-06-21T01:26:33.4165343Z }; +2026-06-21T01:26:33.4165848Z - let sig1 = req.sign_server_side("SBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU").unwrap().signature; +2026-06-21T01:26:33.4166205Z - let sig2 = req.sign_server_side("SCZANGBA5QDPSBM5QOTSXSI7JKEFYABMUQRPTGMWNJKFA5ENDNSQSTE").unwrap().signature; +2026-06-21T01:26:33.4166484Z + let sig1 = req +2026-06-21T01:26:33.4166862Z + .sign_server_side("SBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU") +2026-06-21T01:26:33.4166987Z + .unwrap() +2026-06-21T01:26:33.4167117Z + .signature; +2026-06-21T01:26:33.4167250Z + let sig2 = req +2026-06-21T01:26:33.4167638Z + .sign_server_side("SCZANGBA5QDPSBM5QOTSXSI7JKEFYABMUQRPTGMWNJKFA5ENDNSQSTE") +2026-06-21T01:26:33.4167761Z + .unwrap() +2026-06-21T01:26:33.4167897Z + .signature; +2026-06-21T01:26:33.4168038Z assert_ne!(sig1, sig2); +2026-06-21T01:26:33.4168163Z } +2026-06-21T01:26:33.4168287Z +2026-06-21T01:26:33.4169010Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/withdrawal_audit.rs:46: +2026-06-21T01:26:33.4169135Z } +2026-06-21T01:26:33.4169248Z +2026-06-21T01:26:33.4169409Z /// Log a withdrawal action. +2026-06-21T01:26:33.4169784Z - pub fn log(&mut self, campaign_id: u64, action: WithdrawalAction, actor: &str, amount: i128, note: Option) { +2026-06-21T01:26:33.4169872Z + pub fn log( +2026-06-21T01:26:33.4169965Z + &mut self, +2026-06-21T01:26:33.4170066Z + campaign_id: u64, +2026-06-21T01:26:33.4170166Z + action: WithdrawalAction, +2026-06-21T01:26:33.4170259Z + actor: &str, +2026-06-21T01:26:33.4170345Z + amount: i128, +2026-06-21T01:26:33.4170446Z + note: Option, +2026-06-21T01:26:33.4170534Z + ) { +2026-06-21T01:26:33.4170660Z self.entries.push(WithdrawalLogEntry { +2026-06-21T01:26:33.4170755Z campaign_id, +2026-06-21T01:26:33.4170838Z action, +2026-06-21T01:26:33.4171169Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/withdrawal_audit.rs:60: +2026-06-21T01:26:33.4171296Z /// Returns all log entries for a campaign. +2026-06-21T01:26:33.4171378Z #[must_use] +2026-06-21T01:26:33.4171602Z pub fn get_by_campaign(&self, campaign_id: u64) -> Vec<&WithdrawalLogEntry> { +2026-06-21T01:26:33.4171809Z - self.entries.iter().filter(|e| e.campaign_id == campaign_id).collect() +2026-06-21T01:26:33.4171895Z + self.entries +2026-06-21T01:26:33.4171986Z + .iter() +2026-06-21T01:26:33.4172168Z + .filter(|e| e.campaign_id == campaign_id) +2026-06-21T01:26:33.4172353Z + .collect() +2026-06-21T01:26:33.4172519Z } +2026-06-21T01:26:33.4172637Z +2026-06-21T01:26:33.4172941Z /// Returns all entries in the log. +2026-06-21T01:26:33.4173466Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/withdrawal_audit.rs:93: +2026-06-21T01:26:33.4173608Z fn logs_and_retrieves_entries() { +2026-06-21T01:26:33.4173798Z let mut log = WithdrawalAuditLog::new(); +2026-06-21T01:26:33.4174094Z log.log(1, WithdrawalAction::Requested, "creator_A", 500, None); +2026-06-21T01:26:33.4174474Z - log.log(1, WithdrawalAction::Approved, "admin", 500, Some("looks good".to_string())); +2026-06-21T01:26:33.4174612Z + log.log( +2026-06-21T01:26:33.4174736Z + 1, +2026-06-21T01:26:33.4174871Z + WithdrawalAction::Approved, +2026-06-21T01:26:33.4174966Z + "admin", +2026-06-21T01:26:33.4175052Z + 500, +2026-06-21T01:26:33.4175169Z + Some("looks good".to_string()), +2026-06-21T01:26:33.4175259Z + ); +2026-06-21T01:26:33.4175344Z +2026-06-21T01:26:33.4175466Z let entries = log.get_by_campaign(1); +2026-06-21T01:26:33.4175569Z assert_eq!(entries.len(), 2); +2026-06-21T01:26:33.4175906Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/withdrawal_limits.rs:29: +2026-06-21T01:26:33.4176022Z impl Default for WithdrawalLimits { +2026-06-21T01:26:33.4176120Z fn default() -> Self { +2026-06-21T01:26:33.4176377Z Self { +2026-06-21T01:26:33.4176539Z - min_per_withdrawal: 100, // 100 stroops minimum +2026-06-21T01:26:33.4176861Z + min_per_withdrawal: 100, // 100 stroops minimum +2026-06-21T01:26:33.4177062Z max_per_withdrawal: 10_000_000_000, // 1000 XLM maximum per withdrawal +2026-06-21T01:26:33.4177219Z - max_total: None, // no global cap by default +2026-06-21T01:26:33.4177386Z + max_total: None, // no global cap by default +2026-06-21T01:26:33.4177473Z } +2026-06-21T01:26:33.4177554Z } +2026-06-21T01:26:33.4177641Z } +2026-06-21T01:26:33.4177961Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/withdrawal_limits.rs:44: +2026-06-21T01:26:33.4178058Z if max < min { +2026-06-21T01:26:33.4178208Z return Err(anyhow!("Maximum must be >= minimum")); +2026-06-21T01:26:33.4178290Z } +2026-06-21T01:26:33.4178501Z - Ok(Self { min_per_withdrawal: min, max_per_withdrawal: max, max_total }) +2026-06-21T01:26:33.4184796Z + Ok(Self { +2026-06-21T01:26:33.4185023Z + min_per_withdrawal: min, +2026-06-21T01:26:33.4185138Z + max_per_withdrawal: max, +2026-06-21T01:26:33.4185229Z + max_total, +2026-06-21T01:26:33.4185322Z + }) +2026-06-21T01:26:33.4185405Z } +2026-06-21T01:26:33.4185483Z +2026-06-21T01:26:33.4185684Z /// Validates a proposed withdrawal amount against the limits. +2026-06-21T01:26:33.4186036Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/withdrawal_limits.rs:54: +2026-06-21T01:26:33.4186165Z if amount < self.min_per_withdrawal { +2026-06-21T01:26:33.4186270Z return Err(anyhow!( +2026-06-21T01:26:33.4186418Z "Withdrawal amount {} is below the minimum of {}", +2026-06-21T01:26:33.4186540Z - amount, self.min_per_withdrawal +2026-06-21T01:26:33.4186640Z + amount, +2026-06-21T01:26:33.4186745Z + self.min_per_withdrawal +2026-06-21T01:26:33.4186838Z )); +2026-06-21T01:26:33.4186923Z } +2026-06-21T01:26:33.4187040Z if amount > self.max_per_withdrawal { +2026-06-21T01:26:33.4187376Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/withdrawal_limits.rs:61: +2026-06-21T01:26:33.4187470Z return Err(anyhow!( +2026-06-21T01:26:33.4187623Z "Withdrawal amount {} exceeds the maximum of {}", +2026-06-21T01:26:33.4187740Z - amount, self.max_per_withdrawal +2026-06-21T01:26:33.4187827Z + amount, +2026-06-21T01:26:33.4187931Z + self.max_per_withdrawal +2026-06-21T01:26:33.4188012Z )); +2026-06-21T01:26:33.4188097Z } +2026-06-21T01:26:33.4188208Z if let Some(cap) = self.max_total { +2026-06-21T01:26:33.4188522Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/withdrawal_limits.rs:67: +2026-06-21T01:26:33.4188878Z if already_withdrawn + amount > cap { +2026-06-21T01:26:33.4188976Z return Err(anyhow!( +2026-06-21T01:26:33.4189159Z "Total withdrawn {} would exceed the campaign cap of {}", +2026-06-21T01:26:33.4189286Z - already_withdrawn + amount, cap +2026-06-21T01:26:33.4189391Z + already_withdrawn + amount, +2026-06-21T01:26:33.4189485Z + cap +2026-06-21T01:26:33.4189573Z )); +2026-06-21T01:26:33.4189655Z } +2026-06-21T01:26:33.4189739Z } +2026-06-21T01:26:33.4190049Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/worker_logger.rs:13: +2026-06-21T01:26:33.4190227Z fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +2026-06-21T01:26:33.4190318Z match self { +2026-06-21T01:26:33.4190439Z LogLevel::Debug => write!(f, "DEBUG"), +2026-06-21T01:26:33.4190772Z - LogLevel::Info => write!(f, "INFO"), +2026-06-21T01:26:33.4190889Z - LogLevel::Warn => write!(f, "WARN"), +2026-06-21T01:26:33.4191001Z + LogLevel::Info => write!(f, "INFO"), +2026-06-21T01:26:33.4191216Z + LogLevel::Warn => write!(f, "WARN"), +2026-06-21T01:26:33.4191326Z LogLevel::Error => write!(f, "ERROR"), +2026-06-21T01:26:33.4191412Z } +2026-06-21T01:26:33.4191498Z } +2026-06-21T01:26:33.4191800Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/worker_logger.rs:23: +2026-06-21T01:26:33.4191953Z /// A single structured log entry produced by the worker. +2026-06-21T01:26:33.4192050Z #[derive(Debug, Clone)] +2026-06-21T01:26:33.4192145Z pub struct LogEntry { +2026-06-21T01:26:33.4192247Z - pub level: LogLevel, +2026-06-21T01:26:33.4192338Z + pub level: LogLevel, +2026-06-21T01:26:33.4192434Z pub message: String, +2026-06-21T01:26:33.4192517Z } +2026-06-21T01:26:33.4192595Z +2026-06-21T01:26:33.4192913Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/worker_logger.rs:64: +2026-06-21T01:26:33.4192996Z #[inline] +2026-06-21T01:26:33.4193190Z pub fn log(&mut self, level: LogLevel, message: impl Into) { +2026-06-21T01:26:33.4193340Z if self.min_level.map_or(true, |min| level >= min) { +2026-06-21T01:26:33.4193502Z - let entry = LogEntry { level, message: message.into() }; +2026-06-21T01:26:33.4193604Z + let entry = LogEntry { +2026-06-21T01:26:33.4193693Z + level, +2026-06-21T01:26:33.4193794Z + message: message.into(), +2026-06-21T01:26:33.4193882Z + }; +2026-06-21T01:26:33.4194024Z eprintln!("[{}] {}", entry.level, entry.message); +2026-06-21T01:26:33.4194332Z // Issue #128 – track consecutive errors for health monitoring +2026-06-21T01:26:33.4194448Z if level == LogLevel::Error { +2026-06-21T01:26:33.4194775Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/worker_logger.rs:71: +2026-06-21T01:26:33.4194894Z self.consecutive_errors += 1; +2026-06-21T01:26:33.4195021Z if self.consecutive_errors >= 3 { +2026-06-21T01:26:33.4195304Z - eprintln!("[ALERT] Worker health degraded: {} consecutive errors", self.consecutive_errors); +2026-06-21T01:26:33.4195404Z + eprintln!( +2026-06-21T01:26:33.4195581Z + "[ALERT] Worker health degraded: {} consecutive errors", +2026-06-21T01:26:33.4195689Z + self.consecutive_errors +2026-06-21T01:26:33.4195779Z + ); +2026-06-21T01:26:33.4195861Z } +2026-06-21T01:26:33.4195953Z } else { +2026-06-21T01:26:33.4196065Z self.consecutive_errors = 0; +2026-06-21T01:26:33.4196387Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/tests/integration_test.rs:9: +2026-06-21T01:26:33.4196476Z #[test] +2026-06-21T01:26:33.4196597Z fn test_signing_and_response_integration() { +2026-06-21T01:26:33.4196841Z // Simulate the complete flow of building a signing request and handling the response +2026-06-21T01:26:33.4196931Z - +2026-06-21T01:26:33.4197010Z + +2026-06-21T01:26:33.4197120Z // Step 1: Build a signing request +2026-06-21T01:26:33.4197440Z let request_xdr = "AAAAAgAAAADDRVZm3Wgf40kMCwbWI6txY5T7PX0J8p5hJF3J+VBDAAAAAAAAA".to_string(); +2026-06-21T01:26:33.4197729Z - let request = signing_request::SigningRequestBuilder::new(request_xdr, Some("testnet".to_string())) +2026-06-21T01:26:33.4197843Z - .expect("Failed to create builder") +2026-06-21T01:26:33.4198014Z - .with_description("Test donation to campaign #1".to_string()) +2026-06-21T01:26:33.4198104Z - .build() +2026-06-21T01:26:33.4198213Z - .expect("Failed to build request"); +2026-06-21T01:26:33.4198292Z - +2026-06-21T01:26:33.4198382Z + let request = +2026-06-21T01:26:33.4198965Z + signing_request::SigningRequestBuilder::new(request_xdr, Some("testnet".to_string())) +2026-06-21T01:26:33.4199079Z + .expect("Failed to create builder") +2026-06-21T01:26:33.4199364Z + .with_description("Test donation to campaign #1".to_string()) +2026-06-21T01:26:33.4199447Z + .build() +2026-06-21T01:26:33.4199558Z + .expect("Failed to build request"); +2026-06-21T01:26:33.4199642Z + +2026-06-21T01:26:33.4199739Z // Verify request structure +2026-06-21T01:26:33.4199853Z assert!(!request.id.is_empty()); +2026-06-21T01:26:33.4199963Z assert_eq!(request.network, "testnet"); +2026-06-21T01:26:33.4200299Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/tests/integration_test.rs:24: +2026-06-21T01:26:33.4200480Z assert_eq!(request.description, "Test donation to campaign #1"); +2026-06-21T01:26:33.4200558Z - +2026-06-21T01:26:33.4200645Z + +2026-06-21T01:26:33.4200773Z // Step 2: Serialize request to JSON for wallet +2026-06-21T01:26:33.4200958Z let request_json = request.to_json().expect("Failed to serialize"); +2026-06-21T01:26:33.4201082Z assert!(request_json.contains("testnet")); +2026-06-21T01:26:33.4201403Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/tests/integration_test.rs:29: +2026-06-21T01:26:33.4201484Z - +2026-06-21T01:26:33.4201568Z + +2026-06-21T01:26:33.4201684Z // Step 3: Simulate wallet signing response +2026-06-21T01:26:33.4201800Z - let response_json = format!(r#"{{ +2026-06-21T01:26:33.4201905Z + let response_json = format!( +2026-06-21T01:26:33.4201987Z + r#"{{ +2026-06-21T01:26:33.4202087Z "requestId": "{}", +2026-06-21T01:26:33.4202330Z "xdr": "AAAAAgAAAADDRVZm3Wgf40kMCwbWI6txY5T7PX0J8p5hJF3J+VBDAAAAAAAAA==", +2026-06-21T01:26:33.4202570Z "signer": "GBJCHUKZMTFSLOMNC2P4TS4VJJBTCYL3SDKW3KSMSGQUZ6EFLXVX77JVH", +2026-06-21T01:26:33.4202912Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/tests/integration_test.rs:35: +2026-06-21T01:26:33.4203009Z "signedAt": 1234567890 +2026-06-21T01:26:33.4203105Z - }}"#, request.id); +2026-06-21T01:26:33.4203189Z - +2026-06-21T01:26:33.4203275Z + }}"#, +2026-06-21T01:26:33.4203367Z + request.id +2026-06-21T01:26:33.4203449Z + ); +2026-06-21T01:26:33.4203533Z + +2026-06-21T01:26:33.4203641Z // Step 4: Process the response +2026-06-21T01:26:33.4203893Z let processed = response_handler::ResponseHandler::process_response(&response_json) +2026-06-21T01:26:33.4204018Z .expect("Failed to process response"); +2026-06-21T01:26:33.4204340Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/tests/integration_test.rs:41: +2026-06-21T01:26:33.4204420Z - +2026-06-21T01:26:33.4204505Z + +2026-06-21T01:26:33.4204607Z assert!(processed.is_valid()); +2026-06-21T01:26:33.4204794Z assert_eq!(processed.signed_transaction.request_id, request.id); +2026-06-21T01:26:33.4204887Z assert_eq!( +2026-06-21T01:26:33.4205202Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/tests/integration_test.rs:45: +2026-06-21T01:26:33.4205326Z processed.signed_transaction.signer, +2026-06-21T01:26:33.4205536Z "GBJCHUKZMTFSLOMNC2P4TS4VJJBTCYL3SDKW3KSMSGQUZ6EFLXVX77JVH" +2026-06-21T01:26:33.4205615Z ); +2026-06-21T01:26:33.4205699Z - +2026-06-21T01:26:33.4205778Z + +2026-06-21T01:26:33.4205933Z // Step 5: Save signed transaction for later submission +2026-06-21T01:26:33.4206056Z let temp_file = "/tmp/test_signed_tx.json"; +2026-06-21T01:26:33.4206320Z response_handler::ResponseHandler::save_to_file(&processed.signed_transaction, temp_file) +2026-06-21T01:26:33.4206633Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/tests/integration_test.rs:52: +2026-06-21T01:26:33.4206749Z .expect("Failed to save transaction"); +2026-06-21T01:26:33.4206826Z - +2026-06-21T01:26:33.4206912Z + +2026-06-21T01:26:33.4207027Z // Step 6: Load and verify saved transaction +2026-06-21T01:26:33.4207349Z let loaded_tx = response_handler::ResponseHandler::load_from_file(temp_file) +2026-06-21T01:26:33.4207464Z .expect("Failed to load transaction"); +2026-06-21T01:26:33.4207852Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/tests/integration_test.rs:57: +2026-06-21T01:26:33.4207936Z - +2026-06-21T01:26:33.4208019Z + +2026-06-21T01:26:33.4208144Z assert_eq!(loaded_tx.request_id, request.id); +2026-06-21T01:26:33.4208335Z assert_eq!(loaded_tx.signer, processed.signed_transaction.signer); +2026-06-21T01:26:33.4208412Z - +2026-06-21T01:26:33.4208498Z + +2026-06-21T01:26:33.4208805Z // Cleanup +2026-06-21T01:26:33.4208915Z let _ = fs::remove_file(temp_file); +2026-06-21T01:26:33.4209000Z } +2026-06-21T01:26:33.4212377Z ##[error]Process completed with exit code 1. +2026-06-21T01:26:33.4324048Z Post job cleanup. +2026-06-21T01:26:33.7028171Z Cache up-to-date. +2026-06-21T01:26:33.7040060Z (node:2471) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead. +2026-06-21T01:26:33.7059519Z (Use `node --trace-deprecation ...` to show where the warning was created) +2026-06-21T01:26:33.7224293Z Node 20 is being deprecated. This workflow is running with Node 24 by default. If you need to temporarily use Node 20, you can set the ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true environment variable. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/ +2026-06-21T01:26:33.7225505Z Post job cleanup. +2026-06-21T01:26:33.8054837Z [command]/usr/bin/git version +2026-06-21T01:26:33.8092523Z git version 2.54.0 +2026-06-21T01:26:33.8126804Z Temporarily overriding HOME='/home/runner/work/_temp/3785f8a4-0a3e-458f-8923-b3023c3c74fb' before making global git config changes +2026-06-21T01:26:33.8127721Z Adding repository directory to the temporary git global config as a safe directory +2026-06-21T01:26:33.8132457Z [command]/usr/bin/git config --global --add safe.directory /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts +2026-06-21T01:26:33.8167708Z [command]/usr/bin/git config --local --name-only --get-regexp core\.sshCommand +2026-06-21T01:26:33.8200524Z [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || :" +2026-06-21T01:26:33.8472840Z [command]/usr/bin/git config --local --name-only --get-regexp http\.https\:\/\/github\.com\/\.extraheader +2026-06-21T01:26:33.8499556Z http.https://github.com/.extraheader +2026-06-21T01:26:33.8510326Z [command]/usr/bin/git config --local --unset-all http.https://github.com/.extraheader +2026-06-21T01:26:33.8542679Z [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http\.https\:\/\/github\.com\/\.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :" +2026-06-21T01:26:33.8777720Z [command]/usr/bin/git config --local --name-only --get-regexp ^includeIf\.gitdir: +2026-06-21T01:26:33.8809382Z [command]/usr/bin/git submodule foreach --recursive git config --local --show-origin --name-only --get-regexp remote.origin.url +2026-06-21T01:26:33.9176892Z Cleaning up orphan processes +2026-06-21T01:26:33.9451326Z ##[warning]Node.js 20 is deprecated. The following actions target Node.js 20 but are being forced to run on Node.js 24: actions/checkout@v4. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/ diff --git a/.ci_logs/2_Clippy lint.txt b/.ci_logs/2_Clippy lint.txt new file mode 100644 index 0000000..c2cd717 --- /dev/null +++ b/.ci_logs/2_Clippy lint.txt @@ -0,0 +1,492 @@ +2026-06-21T01:26:23.3045699Z Current runner version: '2.335.1' +2026-06-21T01:26:23.3073901Z ##[group]Runner Image Provisioner +2026-06-21T01:26:23.3074941Z Hosted Compute Agent +2026-06-21T01:26:23.3075634Z Version: 20260611.554 +2026-06-21T01:26:23.3076293Z Commit: 5e0782fdc9014723d3be820dd114dd31555c2bd1 +2026-06-21T01:26:23.3077087Z Build Date: 2026-06-11T21:40:46Z +2026-06-21T01:26:23.3077887Z Worker ID: {f9ff5cae-4324-4f27-bfc5-ea0d04b86dfb} +2026-06-21T01:26:23.3078620Z Azure Region: eastus +2026-06-21T01:26:23.3079239Z ##[endgroup] +2026-06-21T01:26:23.3080728Z ##[group]Operating System +2026-06-21T01:26:23.3081405Z Ubuntu +2026-06-21T01:26:23.3082065Z 24.04.4 +2026-06-21T01:26:23.3082602Z LTS +2026-06-21T01:26:23.3083164Z ##[endgroup] +2026-06-21T01:26:23.3083914Z ##[group]Runner Image +2026-06-21T01:26:23.3084587Z Image: ubuntu-24.04 +2026-06-21T01:26:23.3085227Z Version: 20260615.205.1 +2026-06-21T01:26:23.3086532Z Included Software: https://github.com/actions/runner-images/blob/ubuntu24/20260615.205/images/ubuntu/Ubuntu2404-Readme.md +2026-06-21T01:26:23.3088108Z Image Release: https://github.com/actions/runner-images/releases/tag/ubuntu24%2F20260615.205 +2026-06-21T01:26:23.3089133Z ##[endgroup] +2026-06-21T01:26:23.3090297Z ##[group]GITHUB_TOKEN Permissions +2026-06-21T01:26:23.3092718Z Contents: read +2026-06-21T01:26:23.3093585Z Metadata: read +2026-06-21T01:26:23.3094176Z ##[endgroup] +2026-06-21T01:26:23.3096555Z Secret source: Actions +2026-06-21T01:26:23.3097776Z Prepare workflow directory +2026-06-21T01:26:23.3497931Z Prepare all required actions +2026-06-21T01:26:23.3537481Z Getting action download info +2026-06-21T01:26:23.6049143Z Download action repository 'actions/checkout@v4' (SHA:34e114876b0b11c390a56381ad16ebd13914f8d5) +2026-06-21T01:26:23.6746343Z Download action repository 'dtolnay/rust-toolchain@stable' (SHA:29eef336d9b2848a0b548edc03f92a220660cdb8) +2026-06-21T01:26:23.7614835Z Download action repository 'Swatinem/rust-cache@v2' (SHA:e18b497796c12c097a38f9edb9d0641fb99eee32) +2026-06-21T01:26:24.1124965Z Complete job name: Clippy lint +2026-06-21T01:26:24.1876060Z Node 20 is being deprecated. This workflow is running with Node 24 by default. If you need to temporarily use Node 20, you can set the ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true environment variable. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/ +2026-06-21T01:26:24.1884968Z ##[group]Run actions/checkout@v4 +2026-06-21T01:26:24.1885672Z with: +2026-06-21T01:26:24.1886172Z repository: OrbitChainLabs/OrbitChain-Contracts +2026-06-21T01:26:24.1890906Z token: *** +2026-06-21T01:26:24.1891338Z ssh-strict: true +2026-06-21T01:26:24.1891788Z ssh-user: git +2026-06-21T01:26:24.1892230Z persist-credentials: true +2026-06-21T01:26:24.1892726Z clean: true +2026-06-21T01:26:24.1893565Z sparse-checkout-cone-mode: true +2026-06-21T01:26:24.1894247Z fetch-depth: 1 +2026-06-21T01:26:24.1894677Z fetch-tags: false +2026-06-21T01:26:24.1895116Z show-progress: true +2026-06-21T01:26:24.1895560Z lfs: false +2026-06-21T01:26:24.1896044Z submodules: false +2026-06-21T01:26:24.1896490Z set-safe-directory: true +2026-06-21T01:26:24.1897272Z env: +2026-06-21T01:26:24.1897690Z CARGO_TERM_COLOR: always +2026-06-21T01:26:24.1898171Z RUST_BACKTRACE: short +2026-06-21T01:26:24.1899033Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:24.1899992Z ##[endgroup] +2026-06-21T01:26:24.2997096Z Syncing repository: OrbitChainLabs/OrbitChain-Contracts +2026-06-21T01:26:24.2999408Z ##[group]Getting Git version info +2026-06-21T01:26:24.3000282Z Working directory is '/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts' +2026-06-21T01:26:24.3001396Z [command]/usr/bin/git version +2026-06-21T01:26:24.3057736Z git version 2.54.0 +2026-06-21T01:26:24.3080245Z ##[endgroup] +2026-06-21T01:26:24.3096789Z Temporarily overriding HOME='/home/runner/work/_temp/64aae6a0-561e-446e-819e-e0993ab1e723' before making global git config changes +2026-06-21T01:26:24.3099137Z Adding repository directory to the temporary git global config as a safe directory +2026-06-21T01:26:24.3104318Z [command]/usr/bin/git config --global --add safe.directory /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts +2026-06-21T01:26:24.3155139Z Deleting the contents of '/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts' +2026-06-21T01:26:24.3161659Z ##[group]Initializing the repository +2026-06-21T01:26:24.3167331Z [command]/usr/bin/git init /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts +2026-06-21T01:26:24.3241858Z hint: Using 'master' as the name for the initial branch. This default branch name +2026-06-21T01:26:24.3244122Z hint: will change to "main" in Git 3.0. To configure the initial branch name +2026-06-21T01:26:24.3245826Z hint: to use in all of your new repositories, which will suppress this warning, +2026-06-21T01:26:24.3247178Z hint: call: +2026-06-21T01:26:24.3247980Z hint: +2026-06-21T01:26:24.3248925Z hint: git config --global init.defaultBranch +2026-06-21T01:26:24.3250107Z hint: +2026-06-21T01:26:24.3251200Z hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and +2026-06-21T01:26:24.3252822Z hint: 'development'. The just-created branch can be renamed via this command: +2026-06-21T01:26:24.3254320Z hint: +2026-06-21T01:26:24.3255311Z hint: git branch -m +2026-06-21T01:26:24.3256210Z hint: +2026-06-21T01:26:24.3257402Z hint: Disable this message with "git config set advice.defaultBranchName false" +2026-06-21T01:26:24.3259522Z Initialized empty Git repository in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/.git/ +2026-06-21T01:26:24.3263860Z [command]/usr/bin/git remote add origin https://github.com/OrbitChainLabs/OrbitChain-Contracts +2026-06-21T01:26:24.3301218Z ##[endgroup] +2026-06-21T01:26:24.3302412Z ##[group]Disabling automatic garbage collection +2026-06-21T01:26:24.3307030Z [command]/usr/bin/git config --local gc.auto 0 +2026-06-21T01:26:24.3341073Z ##[endgroup] +2026-06-21T01:26:24.3342224Z ##[group]Setting up auth +2026-06-21T01:26:24.3349841Z [command]/usr/bin/git config --local --name-only --get-regexp core\.sshCommand +2026-06-21T01:26:24.3388909Z [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || :" +2026-06-21T01:26:24.3771605Z [command]/usr/bin/git config --local --name-only --get-regexp http\.https\:\/\/github\.com\/\.extraheader +2026-06-21T01:26:24.3813234Z [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http\.https\:\/\/github\.com\/\.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :" +2026-06-21T01:26:24.4076223Z [command]/usr/bin/git config --local --name-only --get-regexp ^includeIf\.gitdir: +2026-06-21T01:26:24.4114829Z [command]/usr/bin/git submodule foreach --recursive git config --local --show-origin --name-only --get-regexp remote.origin.url +2026-06-21T01:26:24.4361594Z [command]/usr/bin/git config --local http.https://github.com/.extraheader AUTHORIZATION: basic *** +2026-06-21T01:26:24.4400020Z ##[endgroup] +2026-06-21T01:26:24.4400845Z ##[group]Fetching the repository +2026-06-21T01:26:24.4409714Z [command]/usr/bin/git -c protocol.version=2 fetch --no-tags --prune --no-recurse-submodules --depth=1 origin +1be331ea57707748b39835c9fac837ddeb283d53:refs/remotes/pull/60/merge +2026-06-21T01:26:24.6668585Z From https://github.com/OrbitChainLabs/OrbitChain-Contracts +2026-06-21T01:26:24.6670129Z * [new ref] 1be331ea57707748b39835c9fac837ddeb283d53 -> pull/60/merge +2026-06-21T01:26:24.6700151Z ##[endgroup] +2026-06-21T01:26:24.6700916Z ##[group]Determining the checkout info +2026-06-21T01:26:24.6702152Z ##[endgroup] +2026-06-21T01:26:24.6708245Z [command]/usr/bin/git sparse-checkout disable +2026-06-21T01:26:24.6752557Z [command]/usr/bin/git config --local --unset-all extensions.worktreeConfig +2026-06-21T01:26:24.6782736Z ##[group]Checking out the ref +2026-06-21T01:26:24.6786691Z [command]/usr/bin/git checkout --progress --force refs/remotes/pull/60/merge +2026-06-21T01:26:24.6936035Z Note: switching to 'refs/remotes/pull/60/merge'. +2026-06-21T01:26:24.6936842Z +2026-06-21T01:26:24.6937533Z You are in 'detached HEAD' state. You can look around, make experimental +2026-06-21T01:26:24.6939024Z changes and commit them, and you can discard any commits you make in this +2026-06-21T01:26:24.6940199Z state without impacting any branches by switching back to a branch. +2026-06-21T01:26:24.6940742Z +2026-06-21T01:26:24.6941110Z If you want to create a new branch to retain commits you create, you may +2026-06-21T01:26:24.6941979Z do so (now or later) by using -c with the switch command. Example: +2026-06-21T01:26:24.6942462Z +2026-06-21T01:26:24.6942689Z git switch -c +2026-06-21T01:26:24.6943028Z +2026-06-21T01:26:24.6943243Z Or undo this operation with: +2026-06-21T01:26:24.6944002Z +2026-06-21T01:26:24.6944299Z git switch - +2026-06-21T01:26:24.6944673Z +2026-06-21T01:26:24.6945336Z Turn off this advice by setting config variable advice.detachedHead to false +2026-06-21T01:26:24.6945936Z +2026-06-21T01:26:24.6946577Z HEAD is now at 1be331e Merge 4b973bcdef5a40b4714ec76b0c3c3d5e9b026c2d into dc3d5e2b821bb2a0f2655582265c562926415b02 +2026-06-21T01:26:24.6948879Z ##[endgroup] +2026-06-21T01:26:24.7036980Z [command]/usr/bin/git log -1 --format=%H +2026-06-21T01:26:24.7038005Z 1be331ea57707748b39835c9fac837ddeb283d53 +2026-06-21T01:26:24.7390276Z ##[warning]Unexpected input(s) 'cache', valid inputs are ['toolchain', 'targets', 'target', 'components'] +2026-06-21T01:26:24.7409107Z ##[group]Run dtolnay/rust-toolchain@stable +2026-06-21T01:26:24.7409673Z with: +2026-06-21T01:26:24.7410070Z cache: false +2026-06-21T01:26:24.7410491Z toolchain: stable +2026-06-21T01:26:24.7410914Z env: +2026-06-21T01:26:24.7411314Z CARGO_TERM_COLOR: always +2026-06-21T01:26:24.7411793Z RUST_BACKTRACE: short +2026-06-21T01:26:24.7412652Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:24.7413735Z ##[endgroup] +2026-06-21T01:26:24.7545658Z ##[group]Run : parse toolchain version +2026-06-21T01:26:24.7546364Z : parse toolchain version +2026-06-21T01:26:24.7546945Z if [[ -z $toolchain ]]; then +2026-06-21T01:26:24.7547891Z  # GitHub does not enforce `required: true` inputs itself. https://github.com/actions/runner/issues/1070 +2026-06-21T01:26:24.7548959Z  echo "'toolchain' is a required input" >&2 +2026-06-21T01:26:24.7549553Z  exit 1 +2026-06-21T01:26:24.7550199Z elif [[ $toolchain =~ ^stable' '[0-9]+' '(year|month|week|day)s?' 'ago$ ]]; then +2026-06-21T01:26:24.7550961Z  if [[ Linux == macOS ]]; then +2026-06-21T01:26:24.7551916Z  echo "toolchain=1.$((($(date -v-$(sed 's/stable \([0-9]*\) \(.\).*/\1\2/' <<< $toolchain) +%s)/60/60/24-16569)/7/6))" >> $GITHUB_OUTPUT +2026-06-21T01:26:24.7552825Z  else +2026-06-21T01:26:24.7553733Z  echo "toolchain=1.$((($(date --date "${toolchain#stable }" +%s)/60/60/24-16569)/7/6))" >> $GITHUB_OUTPUT +2026-06-21T01:26:24.7554588Z  fi +2026-06-21T01:26:24.7555179Z elif [[ $toolchain =~ ^stable' 'minus' '[0-9]+' 'releases?$ ]]; then +2026-06-21T01:26:24.7556178Z  echo "toolchain=1.$((($(date +%s)/60/60/24-16569)/7/6-${toolchain//[^0-9]/}))" >> $GITHUB_OUTPUT +2026-06-21T01:26:24.7557027Z elif [[ $toolchain =~ ^1\.[0-9]+$ ]]; then +2026-06-21T01:26:24.7557977Z  echo "toolchain=1.$((i=${toolchain#1.}, c=($(date +%s)/60/60/24-16569)/7/6, i+9*i*(10*i<=c)+90*i*(100*i<=c)))" >> $GITHUB_OUTPUT +2026-06-21T01:26:24.7558866Z else +2026-06-21T01:26:24.7559356Z  echo "toolchain=$toolchain" >> $GITHUB_OUTPUT +2026-06-21T01:26:24.7559936Z fi +2026-06-21T01:26:24.7694412Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:24.7695124Z env: +2026-06-21T01:26:24.7695539Z CARGO_TERM_COLOR: always +2026-06-21T01:26:24.7696035Z RUST_BACKTRACE: short +2026-06-21T01:26:24.7697146Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:24.7698047Z toolchain: stable +2026-06-21T01:26:24.7698475Z ##[endgroup] +2026-06-21T01:26:24.7869908Z ##[group]Run : construct rustup command line +2026-06-21T01:26:24.7870555Z : construct rustup command line +2026-06-21T01:26:24.7871408Z echo "targets=$(for t in ${targets//,/ }; do echo -n ' --target' $t; done)" >> $GITHUB_OUTPUT +2026-06-21T01:26:24.7872523Z echo "components=$(for c in ${components//,/ }; do echo -n ' --component' $c; done)" >> $GITHUB_OUTPUT +2026-06-21T01:26:24.7873645Z echo "downgrade=" >> $GITHUB_OUTPUT +2026-06-21T01:26:24.7907918Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:24.7908578Z env: +2026-06-21T01:26:24.7908984Z CARGO_TERM_COLOR: always +2026-06-21T01:26:24.7909464Z RUST_BACKTRACE: short +2026-06-21T01:26:24.7910314Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:24.7911251Z targets: +2026-06-21T01:26:24.7911649Z components: +2026-06-21T01:26:24.7912057Z ##[endgroup] +2026-06-21T01:26:24.8016967Z ##[group]Run : set $CARGO_HOME +2026-06-21T01:26:24.8017507Z : set $CARGO_HOME +2026-06-21T01:26:24.8018135Z echo CARGO_HOME=${CARGO_HOME:-"$HOME/.cargo"} >> $GITHUB_ENV +2026-06-21T01:26:24.8050929Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:24.8051590Z env: +2026-06-21T01:26:24.8051996Z CARGO_TERM_COLOR: always +2026-06-21T01:26:24.8052471Z RUST_BACKTRACE: short +2026-06-21T01:26:24.8053473Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:24.8054463Z ##[endgroup] +2026-06-21T01:26:24.8159466Z ##[group]Run : install rustup if needed +2026-06-21T01:26:24.8160067Z : install rustup if needed +2026-06-21T01:26:24.8160659Z if ! command -v rustup &>/dev/null; then +2026-06-21T01:26:24.8161995Z  curl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused --location --silent --show-error --fail https://sh.rustup.rs | sh -s -- --default-toolchain none -y +2026-06-21T01:26:24.8163284Z  echo "$CARGO_HOME/bin" >> $GITHUB_PATH +2026-06-21T01:26:24.8164054Z fi +2026-06-21T01:26:24.8196757Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:24.8197400Z env: +2026-06-21T01:26:24.8197815Z CARGO_TERM_COLOR: always +2026-06-21T01:26:24.8198296Z RUST_BACKTRACE: short +2026-06-21T01:26:24.8199150Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:24.8200084Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:26:24.8200577Z ##[endgroup] +2026-06-21T01:26:24.8308771Z ##[group]Run rustup toolchain install stable --profile minimal --no-self-update +2026-06-21T01:26:24.8309797Z rustup toolchain install stable --profile minimal --no-self-update +2026-06-21T01:26:24.8343449Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:24.8344106Z env: +2026-06-21T01:26:24.8344503Z CARGO_TERM_COLOR: always +2026-06-21T01:26:24.8344975Z RUST_BACKTRACE: short +2026-06-21T01:26:24.8345801Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:24.8346738Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:26:24.8347253Z RUSTUP_PERMIT_COPY_RENAME: 1 +2026-06-21T01:26:24.8347727Z ##[endgroup] +2026-06-21T01:26:24.9873532Z info: syncing channel updates for stable-x86_64-unknown-linux-gnu +2026-06-21T01:26:25.0808001Z +2026-06-21T01:26:25.0901220Z stable-x86_64-unknown-linux-gnu unchanged - rustc 1.96.0 (ac68faa20 2026-05-25) +2026-06-21T01:26:25.0902561Z +2026-06-21T01:26:25.0993292Z ##[group]Run rustup default stable +2026-06-21T01:26:25.0994336Z rustup default stable +2026-06-21T01:26:25.1040379Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:25.1041239Z env: +2026-06-21T01:26:25.1041877Z CARGO_TERM_COLOR: always +2026-06-21T01:26:25.1042434Z RUST_BACKTRACE: short +2026-06-21T01:26:25.1043773Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:25.1045013Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:26:25.1045597Z ##[endgroup] +2026-06-21T01:26:25.1171170Z info: using existing install for stable-x86_64-unknown-linux-gnu +2026-06-21T01:26:25.1178122Z info: default toolchain set to stable-x86_64-unknown-linux-gnu +2026-06-21T01:26:25.1178815Z +2026-06-21T01:26:25.1267877Z stable-x86_64-unknown-linux-gnu unchanged - rustc 1.96.0 (ac68faa20 2026-05-25) +2026-06-21T01:26:25.1268727Z +2026-06-21T01:26:25.1272092Z info: note that the toolchain 'stable-x86_64-unknown-linux-gnu' is currently in use (overridden by '/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/rust-toolchain.toml') +2026-06-21T01:26:25.1409890Z ##[group]Run : create cachekey +2026-06-21T01:26:25.1410716Z : create cachekey +2026-06-21T01:26:25.1412483Z DATE=$(rustc +stable --version --verbose | sed -ne 's/^commit-date: \(20[0-9][0-9]\)-\([01][0-9]\)-\([0-3][0-9]\)$/\1\2\3/p') +2026-06-21T01:26:25.1415084Z HASH=$(rustc +stable --version --verbose | sed -ne 's/^commit-hash: //p') +2026-06-21T01:26:25.1416832Z echo "cachekey=$(echo $DATE$HASH | head -c12)" >> $GITHUB_OUTPUT +2026-06-21T01:26:25.1452486Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:25.1453634Z env: +2026-06-21T01:26:25.1454120Z CARGO_TERM_COLOR: always +2026-06-21T01:26:25.1454773Z RUST_BACKTRACE: short +2026-06-21T01:26:25.1456321Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:25.1458053Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:26:25.1458785Z ##[endgroup] +2026-06-21T01:26:25.1913803Z ##[group]Run : disable incremental compilation +2026-06-21T01:26:25.1914796Z : disable incremental compilation +2026-06-21T01:26:25.1915758Z if [ -z "${CARGO_INCREMENTAL+set}" ]; then +2026-06-21T01:26:25.1916717Z  echo CARGO_INCREMENTAL=0 >> $GITHUB_ENV +2026-06-21T01:26:25.1917589Z fi +2026-06-21T01:26:25.1952239Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:25.1953204Z env: +2026-06-21T01:26:25.1953838Z CARGO_TERM_COLOR: always +2026-06-21T01:26:25.1954482Z RUST_BACKTRACE: short +2026-06-21T01:26:25.1955917Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:25.1957578Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:26:25.1958267Z ##[endgroup] +2026-06-21T01:26:25.2063994Z ##[group]Run : enable colors in Cargo output +2026-06-21T01:26:25.2064916Z : enable colors in Cargo output +2026-06-21T01:26:25.2065804Z if [ -z "${CARGO_TERM_COLOR+set}" ]; then +2026-06-21T01:26:25.2066815Z  echo CARGO_TERM_COLOR=always >> $GITHUB_ENV +2026-06-21T01:26:25.2067688Z fi +2026-06-21T01:26:25.2101070Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:25.2102066Z env: +2026-06-21T01:26:25.2102534Z CARGO_TERM_COLOR: always +2026-06-21T01:26:25.2103172Z RUST_BACKTRACE: short +2026-06-21T01:26:25.2104863Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:25.2106530Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:26:25.2107245Z CARGO_INCREMENTAL: 0 +2026-06-21T01:26:25.2107813Z ##[endgroup] +2026-06-21T01:26:25.2215449Z ##[group]Run : enable Cargo sparse registry +2026-06-21T01:26:25.2216348Z : enable Cargo sparse registry +2026-06-21T01:26:25.2217436Z # implemented in 1.66, stabilized in 1.68, made default in 1.70 +2026-06-21T01:26:25.2219761Z if [ -z "${CARGO_REGISTRIES_CRATES_IO_PROTOCOL+set}" -o -f "/home/runner/work/_temp"/.implicit_cargo_registries_crates_io_protocol ]; then +2026-06-21T01:26:25.2222204Z  if rustc +stable --version --verbose | grep -q '^release: 1\.6[89]\.'; then +2026-06-21T01:26:25.2224503Z  touch "/home/runner/work/_temp"/.implicit_cargo_registries_crates_io_protocol || true +2026-06-21T01:26:25.2226311Z  echo CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse >> $GITHUB_ENV +2026-06-21T01:26:25.2227955Z  elif rustc +stable --version --verbose | grep -q '^release: 1\.6[67]\.'; then +2026-06-21T01:26:25.2229877Z  touch "/home/runner/work/_temp"/.implicit_cargo_registries_crates_io_protocol || true +2026-06-21T01:26:25.2231611Z  echo CARGO_REGISTRIES_CRATES_IO_PROTOCOL=git >> $GITHUB_ENV +2026-06-21T01:26:25.2232684Z  fi +2026-06-21T01:26:25.2233152Z fi +2026-06-21T01:26:25.2266703Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:25.2267663Z env: +2026-06-21T01:26:25.2268275Z CARGO_TERM_COLOR: always +2026-06-21T01:26:25.2268910Z RUST_BACKTRACE: short +2026-06-21T01:26:25.2270290Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:25.2271944Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:26:25.2272649Z CARGO_INCREMENTAL: 0 +2026-06-21T01:26:25.2273191Z ##[endgroup] +2026-06-21T01:26:25.2684500Z ##[group]Run : work around spurious network errors in curl 8.0 +2026-06-21T01:26:25.2685738Z : work around spurious network errors in curl 8.0 +2026-06-21T01:26:25.2687771Z # https://rust-lang.zulipchat.com/#narrow/stream/246057-t-cargo/topic/timeout.20investigation +2026-06-21T01:26:25.2689766Z if rustc +stable --version --verbose | grep -q '^release: 1\.7[01]\.'; then +2026-06-21T01:26:25.2691404Z  echo CARGO_HTTP_MULTIPLEXING=false >> $GITHUB_ENV +2026-06-21T01:26:25.2692459Z fi +2026-06-21T01:26:25.2727099Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:25.2728067Z env: +2026-06-21T01:26:25.2728530Z CARGO_TERM_COLOR: always +2026-06-21T01:26:25.2729137Z RUST_BACKTRACE: short +2026-06-21T01:26:25.2730548Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:25.2732142Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:26:25.2732828Z CARGO_INCREMENTAL: 0 +2026-06-21T01:26:25.2733535Z ##[endgroup] +2026-06-21T01:26:25.2991622Z ##[group]Run rustc +stable --version --verbose +2026-06-21T01:26:25.2992580Z rustc +stable --version --verbose +2026-06-21T01:26:25.3027462Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:25.3028418Z env: +2026-06-21T01:26:25.3028876Z CARGO_TERM_COLOR: always +2026-06-21T01:26:25.3029483Z RUST_BACKTRACE: short +2026-06-21T01:26:25.3030858Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:25.3032456Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:26:25.3033130Z CARGO_INCREMENTAL: 0 +2026-06-21T01:26:25.3033814Z ##[endgroup] +2026-06-21T01:26:25.3228294Z rustc 1.96.0 (ac68faa20 2026-05-25) +2026-06-21T01:26:25.3229625Z binary: rustc +2026-06-21T01:26:25.3230360Z commit-hash: ac68faa20c58cbccd01ee7208bf3b6e93a7d7f96 +2026-06-21T01:26:25.3231291Z commit-date: 2026-05-25 +2026-06-21T01:26:25.3231893Z host: x86_64-unknown-linux-gnu +2026-06-21T01:26:25.3232537Z release: 1.96.0 +2026-06-21T01:26:25.3233103Z LLVM version: 22.1.2 +2026-06-21T01:26:25.3453581Z ##[group]Run Swatinem/rust-cache@v2 +2026-06-21T01:26:25.3454363Z with: +2026-06-21T01:26:25.3454830Z cache-on-failure: true +2026-06-21T01:26:25.3455441Z prefix-key: v0-rust +2026-06-21T01:26:25.3455988Z add-job-id-key: true +2026-06-21T01:26:25.3456595Z add-rust-environment-hash-key: true +2026-06-21T01:26:25.3457325Z cache-targets: true +2026-06-21T01:26:25.3457881Z cache-all-crates: false +2026-06-21T01:26:25.3458494Z cache-workspace-crates: false +2026-06-21T01:26:25.3459129Z save-if: true +2026-06-21T01:26:25.3459628Z cache-provider: github +2026-06-21T01:26:25.3460198Z cache-bin: true +2026-06-21T01:26:25.3460701Z lookup-only: false +2026-06-21T01:26:25.3461444Z cmd-format: {0} +2026-06-21T01:26:25.3461923Z env: +2026-06-21T01:26:25.3462364Z CARGO_TERM_COLOR: always +2026-06-21T01:26:25.3462958Z RUST_BACKTRACE: short +2026-06-21T01:26:25.3464483Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:25.3466086Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:26:25.3466759Z CARGO_INCREMENTAL: 0 +2026-06-21T01:26:25.3467296Z ##[endgroup] +2026-06-21T01:26:25.6441497Z (node:2370) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead. +2026-06-21T01:26:25.6444101Z (Use `node --trace-deprecation ...` to show where the warning was created) +2026-06-21T01:26:29.2762691Z ##[group]Cache Configuration +2026-06-21T01:26:29.2763268Z Cache Provider: +2026-06-21T01:26:29.2764016Z github +2026-06-21T01:26:29.2764341Z Workspaces: +2026-06-21T01:26:29.2764803Z /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts +2026-06-21T01:26:29.2765385Z Cache Paths: +2026-06-21T01:26:29.2765810Z /home/runner/.cargo/bin +2026-06-21T01:26:29.2766185Z /home/runner/.cargo/.crates.toml +2026-06-21T01:26:29.2766629Z /home/runner/.cargo/.crates2.json +2026-06-21T01:26:29.2767075Z /home/runner/.cargo/registry +2026-06-21T01:26:29.2767525Z /home/runner/.cargo/git +2026-06-21T01:26:29.2768072Z /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/target +2026-06-21T01:26:29.2768827Z Restore Key: +2026-06-21T01:26:29.2784300Z v0-rust-clippy-Linux-x64-1f47b3b1 +2026-06-21T01:26:29.2794589Z Cache Key: +2026-06-21T01:26:29.2795017Z v0-rust-clippy-Linux-x64-1f47b3b1-8243978e +2026-06-21T01:26:29.2795501Z .. Prefix: +2026-06-21T01:26:29.2795826Z - v0-rust-clippy-Linux-x64 +2026-06-21T01:26:29.2796244Z .. Environment considered: +2026-06-21T01:26:29.2796611Z - Rust Versions: +2026-06-21T01:26:29.2797145Z - 1.96.0 x86_64-unknown-linux-gnu ac68faa20c58cbccd01ee7208bf3b6e93a7d7f96 +2026-06-21T01:26:29.2797942Z - 1.96.0 x86_64-unknown-linux-gnu ac68faa20c58cbccd01ee7208bf3b6e93a7d7f96 +2026-06-21T01:26:29.2798585Z - CARGO_HOME +2026-06-21T01:26:29.2798901Z - CARGO_INCREMENTAL +2026-06-21T01:26:29.2799229Z - CARGO_TERM_COLOR +2026-06-21T01:26:29.2799554Z - RUST_BACKTRACE +2026-06-21T01:26:29.2799881Z .. Lockfiles considered: +2026-06-21T01:26:29.2800532Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/.cargo/config.toml +2026-06-21T01:26:29.2802077Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/Cargo.toml +2026-06-21T01:26:29.2803110Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/common/Cargo.toml +2026-06-21T01:26:29.2804666Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/contracts/core/Cargo.toml +2026-06-21T01:26:29.2805929Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/Cargo.toml +2026-06-21T01:26:29.2806890Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/rust-toolchain.toml +2026-06-21T01:26:29.2807838Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/token-bridge/Cargo.toml +2026-06-21T01:26:29.2809021Z ##[endgroup] +2026-06-21T01:26:29.2809274Z +2026-06-21T01:26:29.2809678Z ... Restoring cache ... +2026-06-21T01:26:29.3524643Z Cache hit for: v0-rust-clippy-Linux-x64-1f47b3b1-8243978e +2026-06-21T01:26:30.1774551Z Received 181650538 of 181650538 (100.0%), 224.1 MBs/sec +2026-06-21T01:26:30.1775454Z Cache Size: ~173 MB (181650538 B) +2026-06-21T01:26:30.1927880Z [command]/usr/bin/tar -xf /home/runner/work/_temp/87cefaba-3f5e-4187-8b26-51b2cc0010f6/cache.tzst -P -C /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts --use-compress-program unzstd +2026-06-21T01:26:31.1966816Z Cache restored successfully +2026-06-21T01:26:31.2059576Z Restored from cache key "v0-rust-clippy-Linux-x64-1f47b3b1-8243978e" full match: true. +2026-06-21T01:26:31.2255264Z ##[group]Run cargo clippy -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge -- -D warnings +2026-06-21T01:26:31.2256913Z cargo clippy -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge -- -D warnings +2026-06-21T01:26:31.2295233Z shell: /usr/bin/bash -e {0} +2026-06-21T01:26:31.2295518Z env: +2026-06-21T01:26:31.2295730Z CARGO_TERM_COLOR: always +2026-06-21T01:26:31.2295982Z RUST_BACKTRACE: short +2026-06-21T01:26:31.2296445Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:31.2296964Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:26:31.2297243Z CARGO_INCREMENTAL: 0 +2026-06-21T01:26:31.2297480Z CACHE_ON_FAILURE: true +2026-06-21T01:26:31.2297715Z ##[endgroup] +2026-06-21T01:26:31.7086759Z  Updating crates.io index +2026-06-21T01:26:31.9124317Z  Locking 212 packages to latest compatible versions +2026-06-21T01:26:31.9166195Z  Adding arbitrary v1.3.2 (available: v1.4.2) +2026-06-21T01:26:31.9272448Z  Adding crypto-common v0.1.6 (available: v0.1.7) +2026-06-21T01:26:31.9335272Z  Adding derive_arbitrary v1.3.2 (available: v1.4.2) +2026-06-21T01:26:31.9627036Z  Adding rand v0.8.6 (available: v0.10.1) +2026-06-21T01:26:31.9732365Z  Adding sha2 v0.10.9 (available: v0.11.0) +2026-06-21T01:26:32.0086623Z  Adding toml v0.8.23 (available: v1.1.2+spec-1.1.0) +2026-06-21T01:26:32.7202280Z  Compiling serde_core v1.0.228 +2026-06-21T01:26:32.7205174Z  Compiling serde_json v1.0.150 +2026-06-21T01:26:32.7238902Z  Checking zeroize v1.9.0 +2026-06-21T01:26:32.7302265Z  Compiling schemars v0.8.22 +2026-06-21T01:26:32.7364935Z  Compiling thiserror v1.0.69 +2026-06-21T01:26:33.0375050Z  Checking generic-array v0.14.9 +2026-06-21T01:26:33.0515841Z  Checking der v0.7.10 +2026-06-21T01:26:33.4545429Z  Checking hex v0.4.3 +2026-06-21T01:26:33.5555531Z  Checking block-buffer v0.10.4 +2026-06-21T01:26:33.6005242Z  Checking crypto-common v0.1.6 +2026-06-21T01:26:33.6285766Z  Checking sec1 v0.7.3 +2026-06-21T01:26:33.6324589Z  Checking crypto-bigint v0.5.5 +2026-06-21T01:26:33.6604979Z  Checking digest v0.10.7 +2026-06-21T01:26:33.8025524Z  Checking signature v2.2.0 +2026-06-21T01:26:33.8645493Z  Checking sha2 v0.10.9 +2026-06-21T01:26:34.2125344Z  Checking ark-serialize v0.5.0 +2026-06-21T01:26:34.4547475Z  Checking ark-ff v0.5.0 +2026-06-21T01:26:34.6231258Z  Checking elliptic-curve v0.13.8 +2026-06-21T01:26:34.8770975Z  Checking hmac v0.12.1 +2026-06-21T01:26:34.9484933Z  Compiling serde v1.0.228 +2026-06-21T01:26:35.7644833Z  Checking rfc6979 v0.4.0 +2026-06-21T01:26:35.7875015Z  Checking primeorder v0.13.6 +2026-06-21T01:26:35.8225299Z  Compiling crate-git-revision v0.0.6 +2026-06-21T01:26:35.9960798Z  Checking ecdsa v0.16.9 +2026-06-21T01:26:36.0735368Z  Compiling stellar-strkey v0.0.13 +2026-06-21T01:26:36.1853638Z  Compiling stellar-xdr v26.0.1 +2026-06-21T01:26:36.5653081Z  Compiling soroban-env-common v26.1.3 +2026-06-21T01:26:36.6885328Z  Compiling stellar-strkey v0.0.16 +2026-06-21T01:26:36.7980446Z  Checking ed25519 v2.2.3 +2026-06-21T01:26:36.8755327Z  Checking curve25519-dalek v4.1.3 +2026-06-21T01:26:37.3344746Z  Compiling serde_with v3.21.0 +2026-06-21T01:26:37.7645055Z  Compiling soroban-env-host v26.1.3 +2026-06-21T01:26:37.9806302Z  Checking sha3 v0.10.9 +2026-06-21T01:26:38.1615396Z  Checking ed25519-dalek v2.2.0 +2026-06-21T01:26:38.3104975Z  Checking k256 v0.13.4 +2026-06-21T01:26:38.6594962Z  Checking p256 v0.13.2 +2026-06-21T01:26:38.8734998Z  Compiling soroban-sdk v26.1.0 +2026-06-21T01:26:39.3655003Z  Checking ark-poly v0.5.0 +2026-06-21T01:26:40.0729021Z  Checking ark-ec v0.5.0 +2026-06-21T01:26:41.7449436Z  Checking ark-bls12-381 v0.5.0 +2026-06-21T01:26:41.7452474Z  Checking ark-bn254 v0.5.0 +2026-06-21T01:26:54.1840506Z  Compiling soroban-spec v26.1.0 +2026-06-21T01:26:54.3158934Z  Compiling soroban-spec-rust v26.1.0 +2026-06-21T01:26:54.7929143Z  Compiling soroban-env-macros v26.1.3 +2026-06-21T01:26:57.0821564Z  Compiling soroban-sdk-macros v26.1.0 +2026-06-21T01:27:00.9615853Z  Checking orbitchain-common v0.1.0 (/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/common) +2026-06-21T01:27:00.9617380Z  Checking orbitchain-core v0.1.0 (/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/contracts/core) +2026-06-21T01:27:02.1208620Z  Checking orbitchain-campaign v0.1.0 (/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign) +2026-06-21T01:27:02.1210122Z  Checking orbitchain-token-bridge v0.1.0 (/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/token-bridge) +2026-06-21T01:27:02.2864579Z error: unused import: `Address` +2026-06-21T01:27:02.2865303Z --> campaign/src/contract.rs:6:37 +2026-06-21T01:27:02.2865827Z | +2026-06-21T01:27:02.2875563Z 6 | use soroban_sdk::{panic_with_error, Address, Env}; +2026-06-21T01:27:02.2876371Z | ^^^^^^^ +2026-06-21T01:27:02.2876928Z | +2026-06-21T01:27:02.2877555Z = note: `-D unused-imports` implied by `-D warnings` +2026-06-21T01:27:02.2878424Z = help: to override `-D warnings` add `#[allow(unused_imports)]` +2026-06-21T01:27:02.2878908Z +2026-06-21T01:27:02.5954891Z error: manual saturating arithmetic +2026-06-21T01:27:02.5955635Z --> campaign/src/contract.rs:106:24 +2026-06-21T01:27:02.5956142Z | +2026-06-21T01:27:02.5956676Z 106 | let max_end_time = current_time +2026-06-21T01:27:02.5957318Z |  ________________________^ +2026-06-21T01:27:02.5958038Z 107 | | .checked_add(MAX_DEADLINE_GAP_SECONDS) +2026-06-21T01:27:02.5959125Z 108 | | .unwrap_or(u64::MAX); +2026-06-21T01:27:02.5960478Z | |____________________________^ help: consider using `saturating_add`: `current_time.saturating_add(MAX_DEADLINE_GAP_SECONDS)` +2026-06-21T01:27:02.5961524Z | +2026-06-21T01:27:02.5962660Z = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#manual_saturating_arithmetic +2026-06-21T01:27:02.5964522Z = note: `-D clippy::manual-saturating-arithmetic` implied by `-D warnings` +2026-06-21T01:27:02.5965678Z = help: to override `-D warnings` add `#[allow(clippy::manual_saturating_arithmetic)]` +2026-06-21T01:27:02.5966284Z +2026-06-21T01:27:02.9211008Z error: could not compile `orbitchain-campaign` (lib) due to 2 previous errors +2026-06-21T01:27:03.0925345Z ##[error]Process completed with exit code 101. +2026-06-21T01:27:03.1037176Z Post job cleanup. +2026-06-21T01:27:03.4069687Z Cache up-to-date. +2026-06-21T01:27:03.4072646Z (node:3051) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead. +2026-06-21T01:27:03.4074152Z (Use `node --trace-deprecation ...` to show where the warning was created) +2026-06-21T01:27:03.4289747Z Node 20 is being deprecated. This workflow is running with Node 24 by default. If you need to temporarily use Node 20, you can set the ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true environment variable. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/ +2026-06-21T01:27:03.4291146Z Post job cleanup. +2026-06-21T01:27:03.5214185Z [command]/usr/bin/git version +2026-06-21T01:27:03.5253289Z git version 2.54.0 +2026-06-21T01:27:03.5290169Z Temporarily overriding HOME='/home/runner/work/_temp/dfa57ae5-7b76-496d-bb7d-0092c3455a01' before making global git config changes +2026-06-21T01:27:03.5290953Z Adding repository directory to the temporary git global config as a safe directory +2026-06-21T01:27:03.5296793Z [command]/usr/bin/git config --global --add safe.directory /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts +2026-06-21T01:27:03.5807257Z [command]/usr/bin/git config --local --name-only --get-regexp core\.sshCommand +2026-06-21T01:27:03.5857013Z [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || :" +2026-06-21T01:27:03.6107958Z [command]/usr/bin/git config --local --name-only --get-regexp http\.https\:\/\/github\.com\/\.extraheader +2026-06-21T01:27:03.7679760Z http.https://github.com/.extraheader +2026-06-21T01:27:03.7689200Z [command]/usr/bin/git config --local --unset-all http.https://github.com/.extraheader +2026-06-21T01:27:03.8336878Z [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http\.https\:\/\/github\.com\/\.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :" +2026-06-21T01:27:03.8592159Z [command]/usr/bin/git config --local --name-only --get-regexp ^includeIf\.gitdir: +2026-06-21T01:27:03.8627826Z [command]/usr/bin/git submodule foreach --recursive git config --local --show-origin --name-only --get-regexp remote.origin.url +2026-06-21T01:27:03.9019828Z Cleaning up orphan processes +2026-06-21T01:27:03.9335236Z ##[warning]Node.js 20 is deprecated. The following actions target Node.js 20 but are being forced to run on Node.js 24: actions/checkout@v4. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/ diff --git a/.ci_logs/3_Tests (host target).txt b/.ci_logs/3_Tests (host target).txt new file mode 100644 index 0000000..bb2d746 --- /dev/null +++ b/.ci_logs/3_Tests (host target).txt @@ -0,0 +1,787 @@ +2026-06-21T01:26:24.1303803Z Current runner version: '2.335.1' +2026-06-21T01:26:24.1328421Z ##[group]Runner Image Provisioner +2026-06-21T01:26:24.1329345Z Hosted Compute Agent +2026-06-21T01:26:24.1330043Z Version: 20260611.554 +2026-06-21T01:26:24.1330683Z Commit: 5e0782fdc9014723d3be820dd114dd31555c2bd1 +2026-06-21T01:26:24.1331455Z Build Date: 2026-06-11T21:40:46Z +2026-06-21T01:26:24.1332188Z Worker ID: {00149bb9-2830-4838-b0c8-4bdd090a015f} +2026-06-21T01:26:24.1332937Z Azure Region: westus +2026-06-21T01:26:24.1333553Z ##[endgroup] +2026-06-21T01:26:24.1335027Z ##[group]Operating System +2026-06-21T01:26:24.1335663Z Ubuntu +2026-06-21T01:26:24.1336513Z 24.04.4 +2026-06-21T01:26:24.1337069Z LTS +2026-06-21T01:26:24.1337621Z ##[endgroup] +2026-06-21T01:26:24.1338236Z ##[group]Runner Image +2026-06-21T01:26:24.1338822Z Image: ubuntu-24.04 +2026-06-21T01:26:24.1339455Z Version: 20260615.205.1 +2026-06-21T01:26:24.1340711Z Included Software: https://github.com/actions/runner-images/blob/ubuntu24/20260615.205/images/ubuntu/Ubuntu2404-Readme.md +2026-06-21T01:26:24.1342313Z Image Release: https://github.com/actions/runner-images/releases/tag/ubuntu24%2F20260615.205 +2026-06-21T01:26:24.1343256Z ##[endgroup] +2026-06-21T01:26:24.1344384Z ##[group]GITHUB_TOKEN Permissions +2026-06-21T01:26:24.1346548Z Contents: read +2026-06-21T01:26:24.1347266Z Metadata: read +2026-06-21T01:26:24.1347829Z ##[endgroup] +2026-06-21T01:26:24.1349946Z Secret source: Actions +2026-06-21T01:26:24.1350730Z Prepare workflow directory +2026-06-21T01:26:24.1751064Z Prepare all required actions +2026-06-21T01:26:24.1790797Z Getting action download info +2026-06-21T01:26:24.5546347Z Download action repository 'actions/checkout@v4' (SHA:34e114876b0b11c390a56381ad16ebd13914f8d5) +2026-06-21T01:26:24.6522865Z Download action repository 'dtolnay/rust-toolchain@stable' (SHA:29eef336d9b2848a0b548edc03f92a220660cdb8) +2026-06-21T01:26:24.8611319Z Download action repository 'Swatinem/rust-cache@v2' (SHA:e18b497796c12c097a38f9edb9d0641fb99eee32) +2026-06-21T01:26:25.6085795Z Complete job name: Tests (host target) +2026-06-21T01:26:25.6862391Z Node 20 is being deprecated. This workflow is running with Node 24 by default. If you need to temporarily use Node 20, you can set the ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true environment variable. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/ +2026-06-21T01:26:25.6872255Z ##[group]Run actions/checkout@v4 +2026-06-21T01:26:25.6873084Z with: +2026-06-21T01:26:25.6873644Z repository: OrbitChainLabs/OrbitChain-Contracts +2026-06-21T01:26:25.6878710Z token: *** +2026-06-21T01:26:25.6879251Z ssh-strict: true +2026-06-21T01:26:25.6879733Z ssh-user: git +2026-06-21T01:26:25.6880213Z persist-credentials: true +2026-06-21T01:26:25.6880750Z clean: true +2026-06-21T01:26:25.6881235Z sparse-checkout-cone-mode: true +2026-06-21T01:26:25.6881807Z fetch-depth: 1 +2026-06-21T01:26:25.6882275Z fetch-tags: false +2026-06-21T01:26:25.6882755Z show-progress: true +2026-06-21T01:26:25.6883240Z lfs: false +2026-06-21T01:26:25.6883777Z submodules: false +2026-06-21T01:26:25.6884263Z set-safe-directory: true +2026-06-21T01:26:25.6885071Z env: +2026-06-21T01:26:25.6885528Z CARGO_TERM_COLOR: always +2026-06-21T01:26:25.6886242Z RUST_BACKTRACE: short +2026-06-21T01:26:25.6887185Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:25.6888188Z ##[endgroup] +2026-06-21T01:26:25.7908843Z Syncing repository: OrbitChainLabs/OrbitChain-Contracts +2026-06-21T01:26:25.7911139Z ##[group]Getting Git version info +2026-06-21T01:26:25.7912108Z Working directory is '/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts' +2026-06-21T01:26:25.7913377Z [command]/usr/bin/git version +2026-06-21T01:26:25.7977934Z git version 2.54.0 +2026-06-21T01:26:25.8032741Z ##[endgroup] +2026-06-21T01:26:25.8050704Z Temporarily overriding HOME='/home/runner/work/_temp/24b5ece7-acc0-48e8-8a67-644af7a5faee' before making global git config changes +2026-06-21T01:26:25.8053622Z Adding repository directory to the temporary git global config as a safe directory +2026-06-21T01:26:25.8057594Z [command]/usr/bin/git config --global --add safe.directory /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts +2026-06-21T01:26:25.8111782Z Deleting the contents of '/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts' +2026-06-21T01:26:25.8116701Z ##[group]Initializing the repository +2026-06-21T01:26:25.8122939Z [command]/usr/bin/git init /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts +2026-06-21T01:26:25.8256511Z hint: Using 'master' as the name for the initial branch. This default branch name +2026-06-21T01:26:25.8257826Z hint: will change to "main" in Git 3.0. To configure the initial branch name +2026-06-21T01:26:25.8258967Z hint: to use in all of your new repositories, which will suppress this warning, +2026-06-21T01:26:25.8259972Z hint: call: +2026-06-21T01:26:25.8260441Z hint: +2026-06-21T01:26:25.8261286Z hint: git config --global init.defaultBranch +2026-06-21T01:26:25.8262760Z hint: +2026-06-21T01:26:25.8264118Z hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and +2026-06-21T01:26:25.8266460Z hint: 'development'. The just-created branch can be renamed via this command: +2026-06-21T01:26:25.8268089Z hint: +2026-06-21T01:26:25.8268987Z hint: git branch -m +2026-06-21T01:26:25.8270021Z hint: +2026-06-21T01:26:25.8271318Z hint: Disable this message with "git config set advice.defaultBranchName false" +2026-06-21T01:26:25.8273612Z Initialized empty Git repository in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/.git/ +2026-06-21T01:26:25.8278104Z [command]/usr/bin/git remote add origin https://github.com/OrbitChainLabs/OrbitChain-Contracts +2026-06-21T01:26:25.8325513Z ##[endgroup] +2026-06-21T01:26:25.8327317Z ##[group]Disabling automatic garbage collection +2026-06-21T01:26:25.8329796Z [command]/usr/bin/git config --local gc.auto 0 +2026-06-21T01:26:25.8360939Z ##[endgroup] +2026-06-21T01:26:25.8362500Z ##[group]Setting up auth +2026-06-21T01:26:25.8369088Z [command]/usr/bin/git config --local --name-only --get-regexp core\.sshCommand +2026-06-21T01:26:25.8405727Z [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || :" +2026-06-21T01:26:25.8769316Z [command]/usr/bin/git config --local --name-only --get-regexp http\.https\:\/\/github\.com\/\.extraheader +2026-06-21T01:26:25.8803279Z [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http\.https\:\/\/github\.com\/\.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :" +2026-06-21T01:26:25.9017729Z [command]/usr/bin/git config --local --name-only --get-regexp ^includeIf\.gitdir: +2026-06-21T01:26:25.9050060Z [command]/usr/bin/git submodule foreach --recursive git config --local --show-origin --name-only --get-regexp remote.origin.url +2026-06-21T01:26:25.9267455Z [command]/usr/bin/git config --local http.https://github.com/.extraheader AUTHORIZATION: basic *** +2026-06-21T01:26:25.9301579Z ##[endgroup] +2026-06-21T01:26:25.9303261Z ##[group]Fetching the repository +2026-06-21T01:26:25.9312911Z [command]/usr/bin/git -c protocol.version=2 fetch --no-tags --prune --no-recurse-submodules --depth=1 origin +1be331ea57707748b39835c9fac837ddeb283d53:refs/remotes/pull/60/merge +2026-06-21T01:26:26.3898451Z From https://github.com/OrbitChainLabs/OrbitChain-Contracts +2026-06-21T01:26:26.3900263Z * [new ref] 1be331ea57707748b39835c9fac837ddeb283d53 -> pull/60/merge +2026-06-21T01:26:26.3934465Z ##[endgroup] +2026-06-21T01:26:26.3935240Z ##[group]Determining the checkout info +2026-06-21T01:26:26.3938121Z ##[endgroup] +2026-06-21T01:26:26.3944994Z [command]/usr/bin/git sparse-checkout disable +2026-06-21T01:26:26.3991120Z [command]/usr/bin/git config --local --unset-all extensions.worktreeConfig +2026-06-21T01:26:26.4019835Z ##[group]Checking out the ref +2026-06-21T01:26:26.4024033Z [command]/usr/bin/git checkout --progress --force refs/remotes/pull/60/merge +2026-06-21T01:26:26.4180659Z Note: switching to 'refs/remotes/pull/60/merge'. +2026-06-21T01:26:26.4181562Z +2026-06-21T01:26:26.4182290Z You are in 'detached HEAD' state. You can look around, make experimental +2026-06-21T01:26:26.4184069Z changes and commit them, and you can discard any commits you make in this +2026-06-21T01:26:26.4185836Z state without impacting any branches by switching back to a branch. +2026-06-21T01:26:26.4187107Z +2026-06-21T01:26:26.4187707Z If you want to create a new branch to retain commits you create, you may +2026-06-21T01:26:26.4189384Z do so (now or later) by using -c with the switch command. Example: +2026-06-21T01:26:26.4190329Z +2026-06-21T01:26:26.4190742Z git switch -c +2026-06-21T01:26:26.4191387Z +2026-06-21T01:26:26.4191786Z Or undo this operation with: +2026-06-21T01:26:26.4192333Z +2026-06-21T01:26:26.4192573Z git switch - +2026-06-21T01:26:26.4192883Z +2026-06-21T01:26:26.4193397Z Turn off this advice by setting config variable advice.detachedHead to false +2026-06-21T01:26:26.4194113Z +2026-06-21T01:26:26.4194919Z HEAD is now at 1be331e Merge 4b973bcdef5a40b4714ec76b0c3c3d5e9b026c2d into dc3d5e2b821bb2a0f2655582265c562926415b02 +2026-06-21T01:26:26.4197502Z ##[endgroup] +2026-06-21T01:26:26.4228374Z [command]/usr/bin/git log -1 --format=%H +2026-06-21T01:26:26.4250185Z 1be331ea57707748b39835c9fac837ddeb283d53 +2026-06-21T01:26:26.4721283Z ##[warning]Unexpected input(s) 'cache', valid inputs are ['toolchain', 'targets', 'target', 'components'] +2026-06-21T01:26:26.4743760Z ##[group]Run dtolnay/rust-toolchain@stable +2026-06-21T01:26:26.4744356Z with: +2026-06-21T01:26:26.4744750Z cache: false +2026-06-21T01:26:26.4745164Z toolchain: stable +2026-06-21T01:26:26.4745582Z env: +2026-06-21T01:26:26.4746223Z CARGO_TERM_COLOR: always +2026-06-21T01:26:26.4746730Z RUST_BACKTRACE: short +2026-06-21T01:26:26.4747584Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:26.4748518Z ##[endgroup] +2026-06-21T01:26:26.4884650Z ##[group]Run : parse toolchain version +2026-06-21T01:26:26.4885334Z : parse toolchain version +2026-06-21T01:26:26.4885897Z if [[ -z $toolchain ]]; then +2026-06-21T01:26:26.4887101Z  # GitHub does not enforce `required: true` inputs itself. https://github.com/actions/runner/issues/1070 +2026-06-21T01:26:26.4888165Z  echo "'toolchain' is a required input" >&2 +2026-06-21T01:26:26.4888753Z  exit 1 +2026-06-21T01:26:26.4889399Z elif [[ $toolchain =~ ^stable' '[0-9]+' '(year|month|week|day)s?' 'ago$ ]]; then +2026-06-21T01:26:26.4890172Z  if [[ Linux == macOS ]]; then +2026-06-21T01:26:26.4891116Z  echo "toolchain=1.$((($(date -v-$(sed 's/stable \([0-9]*\) \(.\).*/\1\2/' <<< $toolchain) +%s)/60/60/24-16569)/7/6))" >> $GITHUB_OUTPUT +2026-06-21T01:26:26.4892030Z  else +2026-06-21T01:26:26.4892786Z  echo "toolchain=1.$((($(date --date "${toolchain#stable }" +%s)/60/60/24-16569)/7/6))" >> $GITHUB_OUTPUT +2026-06-21T01:26:26.4893639Z  fi +2026-06-21T01:26:26.4894224Z elif [[ $toolchain =~ ^stable' 'minus' '[0-9]+' 'releases?$ ]]; then +2026-06-21T01:26:26.4895196Z  echo "toolchain=1.$((($(date +%s)/60/60/24-16569)/7/6-${toolchain//[^0-9]/}))" >> $GITHUB_OUTPUT +2026-06-21T01:26:26.4896181Z elif [[ $toolchain =~ ^1\.[0-9]+$ ]]; then +2026-06-21T01:26:26.4897159Z  echo "toolchain=1.$((i=${toolchain#1.}, c=($(date +%s)/60/60/24-16569)/7/6, i+9*i*(10*i<=c)+90*i*(100*i<=c)))" >> $GITHUB_OUTPUT +2026-06-21T01:26:26.4898058Z else +2026-06-21T01:26:26.4898552Z  echo "toolchain=$toolchain" >> $GITHUB_OUTPUT +2026-06-21T01:26:26.4899136Z fi +2026-06-21T01:26:26.5097707Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:26.5098406Z env: +2026-06-21T01:26:26.5098813Z CARGO_TERM_COLOR: always +2026-06-21T01:26:26.5099305Z RUST_BACKTRACE: short +2026-06-21T01:26:26.5100417Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:26.5101372Z toolchain: stable +2026-06-21T01:26:26.5101802Z ##[endgroup] +2026-06-21T01:26:26.5262296Z ##[group]Run : construct rustup command line +2026-06-21T01:26:26.5262930Z : construct rustup command line +2026-06-21T01:26:26.5263797Z echo "targets=$(for t in ${targets//,/ }; do echo -n ' --target' $t; done)" >> $GITHUB_OUTPUT +2026-06-21T01:26:26.5264954Z echo "components=$(for c in ${components//,/ }; do echo -n ' --component' $c; done)" >> $GITHUB_OUTPUT +2026-06-21T01:26:26.5265856Z echo "downgrade=" >> $GITHUB_OUTPUT +2026-06-21T01:26:26.5294986Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:26.5295651Z env: +2026-06-21T01:26:26.5296351Z CARGO_TERM_COLOR: always +2026-06-21T01:26:26.5296848Z RUST_BACKTRACE: short +2026-06-21T01:26:26.5297690Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:26.5298598Z targets: +2026-06-21T01:26:26.5298995Z components: +2026-06-21T01:26:26.5299409Z ##[endgroup] +2026-06-21T01:26:26.5432670Z ##[group]Run : set $CARGO_HOME +2026-06-21T01:26:26.5433614Z : set $CARGO_HOME +2026-06-21T01:26:26.5434813Z echo CARGO_HOME=${CARGO_HOME:-"$HOME/.cargo"} >> $GITHUB_ENV +2026-06-21T01:26:26.5480042Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:26.5481260Z env: +2026-06-21T01:26:26.5481996Z CARGO_TERM_COLOR: always +2026-06-21T01:26:26.5482895Z RUST_BACKTRACE: short +2026-06-21T01:26:26.5484430Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:26.5485748Z ##[endgroup] +2026-06-21T01:26:26.5589968Z ##[group]Run : install rustup if needed +2026-06-21T01:26:26.5590571Z : install rustup if needed +2026-06-21T01:26:26.5591154Z if ! command -v rustup &>/dev/null; then +2026-06-21T01:26:26.5592479Z  curl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused --location --silent --show-error --fail https://sh.rustup.rs | sh -s -- --default-toolchain none -y +2026-06-21T01:26:26.5593781Z  echo "$CARGO_HOME/bin" >> $GITHUB_PATH +2026-06-21T01:26:26.5594346Z fi +2026-06-21T01:26:26.5625131Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:26.5625783Z env: +2026-06-21T01:26:26.5626476Z CARGO_TERM_COLOR: always +2026-06-21T01:26:26.5626963Z RUST_BACKTRACE: short +2026-06-21T01:26:26.5627813Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:26.5628768Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:26:26.5629262Z ##[endgroup] +2026-06-21T01:26:26.5733481Z ##[group]Run rustup toolchain install stable --profile minimal --no-self-update +2026-06-21T01:26:26.5734493Z rustup toolchain install stable --profile minimal --no-self-update +2026-06-21T01:26:26.5764664Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:26.5765319Z env: +2026-06-21T01:26:26.5765803Z CARGO_TERM_COLOR: always +2026-06-21T01:26:26.5766614Z RUST_BACKTRACE: short +2026-06-21T01:26:26.5767459Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:26.5768398Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:26:26.5768922Z RUSTUP_PERMIT_COPY_RENAME: 1 +2026-06-21T01:26:26.5769404Z ##[endgroup] +2026-06-21T01:26:26.8828112Z info: syncing channel updates for stable-x86_64-unknown-linux-gnu +2026-06-21T01:26:27.1443546Z +2026-06-21T01:26:27.1528156Z stable-x86_64-unknown-linux-gnu unchanged - rustc 1.96.0 (ac68faa20 2026-05-25) +2026-06-21T01:26:27.1529427Z +2026-06-21T01:26:27.1655808Z ##[group]Run rustup default stable +2026-06-21T01:26:27.1657479Z rustup default stable +2026-06-21T01:26:27.1691117Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:27.1692670Z env: +2026-06-21T01:26:27.1693762Z CARGO_TERM_COLOR: always +2026-06-21T01:26:27.1694885Z RUST_BACKTRACE: short +2026-06-21T01:26:27.1697312Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:27.1699758Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:26:27.1700940Z ##[endgroup] +2026-06-21T01:26:27.1815672Z info: using existing install for stable-x86_64-unknown-linux-gnu +2026-06-21T01:26:27.1822611Z info: default toolchain set to stable-x86_64-unknown-linux-gnu +2026-06-21T01:26:27.1824555Z +2026-06-21T01:26:27.1924255Z stable-x86_64-unknown-linux-gnu unchanged - rustc 1.96.0 (ac68faa20 2026-05-25) +2026-06-21T01:26:27.1929473Z info: note that the toolchain 'stable-x86_64-unknown-linux-gnu' is currently in use (overridden by '/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/rust-toolchain.toml') +2026-06-21T01:26:27.1932613Z +2026-06-21T01:26:27.2053834Z ##[group]Run : create cachekey +2026-06-21T01:26:27.2054902Z : create cachekey +2026-06-21T01:26:27.2057329Z DATE=$(rustc +stable --version --verbose | sed -ne 's/^commit-date: \(20[0-9][0-9]\)-\([01][0-9]\)-\([0-3][0-9]\)$/\1\2\3/p') +2026-06-21T01:26:27.2060287Z HASH=$(rustc +stable --version --verbose | sed -ne 's/^commit-hash: //p') +2026-06-21T01:26:27.2084977Z echo "cachekey=$(echo $DATE$HASH | head -c12)" >> $GITHUB_OUTPUT +2026-06-21T01:26:27.2125089Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:27.2126724Z env: +2026-06-21T01:26:27.2127487Z CARGO_TERM_COLOR: always +2026-06-21T01:26:27.2128448Z RUST_BACKTRACE: short +2026-06-21T01:26:27.2130340Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:27.2132466Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:26:27.2133468Z ##[endgroup] +2026-06-21T01:26:27.2886227Z ##[group]Run : disable incremental compilation +2026-06-21T01:26:27.2887609Z : disable incremental compilation +2026-06-21T01:26:27.2888949Z if [ -z "${CARGO_INCREMENTAL+set}" ]; then +2026-06-21T01:26:27.2890319Z  echo CARGO_INCREMENTAL=0 >> $GITHUB_ENV +2026-06-21T01:26:27.2891506Z fi +2026-06-21T01:26:27.2926410Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:27.2927770Z env: +2026-06-21T01:26:27.2928500Z CARGO_TERM_COLOR: always +2026-06-21T01:26:27.2929462Z RUST_BACKTRACE: short +2026-06-21T01:26:27.2931308Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:27.2933417Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:26:27.2934408Z ##[endgroup] +2026-06-21T01:26:27.3047094Z ##[group]Run : enable colors in Cargo output +2026-06-21T01:26:27.3048399Z : enable colors in Cargo output +2026-06-21T01:26:27.3049709Z if [ -z "${CARGO_TERM_COLOR+set}" ]; then +2026-06-21T01:26:27.3051112Z  echo CARGO_TERM_COLOR=always >> $GITHUB_ENV +2026-06-21T01:26:27.3052333Z fi +2026-06-21T01:26:27.3083516Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:27.3084843Z env: +2026-06-21T01:26:27.3085587Z CARGO_TERM_COLOR: always +2026-06-21T01:26:27.3086710Z RUST_BACKTRACE: short +2026-06-21T01:26:27.3088520Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:27.3090639Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:26:27.3091650Z CARGO_INCREMENTAL: 0 +2026-06-21T01:26:27.3092497Z ##[endgroup] +2026-06-21T01:26:27.3204571Z ##[group]Run : enable Cargo sparse registry +2026-06-21T01:26:27.3205794Z : enable Cargo sparse registry +2026-06-21T01:26:27.3207563Z # implemented in 1.66, stabilized in 1.68, made default in 1.70 +2026-06-21T01:26:27.3210469Z if [ -z "${CARGO_REGISTRIES_CRATES_IO_PROTOCOL+set}" -o -f "/home/runner/work/_temp"/.implicit_cargo_registries_crates_io_protocol ]; then +2026-06-21T01:26:27.3213494Z  if rustc +stable --version --verbose | grep -q '^release: 1\.6[89]\.'; then +2026-06-21T01:26:27.3216281Z  touch "/home/runner/work/_temp"/.implicit_cargo_registries_crates_io_protocol || true +2026-06-21T01:26:27.3218556Z  echo CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse >> $GITHUB_ENV +2026-06-21T01:26:27.3220634Z  elif rustc +stable --version --verbose | grep -q '^release: 1\.6[67]\.'; then +2026-06-21T01:26:27.3223037Z  touch "/home/runner/work/_temp"/.implicit_cargo_registries_crates_io_protocol || true +2026-06-21T01:26:27.3225243Z  echo CARGO_REGISTRIES_CRATES_IO_PROTOCOL=git >> $GITHUB_ENV +2026-06-21T01:26:27.3226963Z  fi +2026-06-21T01:26:27.3227711Z fi +2026-06-21T01:26:27.3260367Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:27.3261676Z env: +2026-06-21T01:26:27.3262406Z CARGO_TERM_COLOR: always +2026-06-21T01:26:27.3263332Z RUST_BACKTRACE: short +2026-06-21T01:26:27.3265144Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:27.3267536Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:26:27.3268545Z CARGO_INCREMENTAL: 0 +2026-06-21T01:26:27.3269380Z ##[endgroup] +2026-06-21T01:26:27.3659486Z ##[group]Run : work around spurious network errors in curl 8.0 +2026-06-21T01:26:27.3661075Z : work around spurious network errors in curl 8.0 +2026-06-21T01:26:27.3663368Z # https://rust-lang.zulipchat.com/#narrow/stream/246057-t-cargo/topic/timeout.20investigation +2026-06-21T01:26:27.3665806Z if rustc +stable --version --verbose | grep -q '^release: 1\.7[01]\.'; then +2026-06-21T01:26:27.3668140Z  echo CARGO_HTTP_MULTIPLEXING=false >> $GITHUB_ENV +2026-06-21T01:26:27.3669417Z fi +2026-06-21T01:26:27.3705579Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:27.3707160Z env: +2026-06-21T01:26:27.3707901Z CARGO_TERM_COLOR: always +2026-06-21T01:26:27.3708807Z RUST_BACKTRACE: short +2026-06-21T01:26:27.3710579Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:27.3712562Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:26:27.3713548Z CARGO_INCREMENTAL: 0 +2026-06-21T01:26:27.3714383Z ##[endgroup] +2026-06-21T01:26:27.3960876Z ##[group]Run rustc +stable --version --verbose +2026-06-21T01:26:27.3962117Z rustc +stable --version --verbose +2026-06-21T01:26:27.3996993Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:27.3998253Z env: +2026-06-21T01:26:27.3998968Z CARGO_TERM_COLOR: always +2026-06-21T01:26:27.3999863Z RUST_BACKTRACE: short +2026-06-21T01:26:27.4001588Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:27.4003553Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:26:27.4004523Z CARGO_INCREMENTAL: 0 +2026-06-21T01:26:27.4005331Z ##[endgroup] +2026-06-21T01:26:27.4204954Z rustc 1.96.0 (ac68faa20 2026-05-25) +2026-06-21T01:26:27.4207371Z binary: rustc +2026-06-21T01:26:27.4208384Z commit-hash: ac68faa20c58cbccd01ee7208bf3b6e93a7d7f96 +2026-06-21T01:26:27.4209623Z commit-date: 2026-05-25 +2026-06-21T01:26:27.4210497Z host: x86_64-unknown-linux-gnu +2026-06-21T01:26:27.4211421Z release: 1.96.0 +2026-06-21T01:26:27.4212477Z LLVM version: 22.1.2 +2026-06-21T01:26:27.4451742Z ##[group]Run Swatinem/rust-cache@v2 +2026-06-21T01:26:27.4452748Z with: +2026-06-21T01:26:27.4453466Z cache-on-failure: true +2026-06-21T01:26:27.4454317Z prefix-key: v0-rust +2026-06-21T01:26:27.4455136Z add-job-id-key: true +2026-06-21T01:26:27.4456405Z add-rust-environment-hash-key: true +2026-06-21T01:26:27.4457505Z cache-targets: true +2026-06-21T01:26:27.4458333Z cache-all-crates: false +2026-06-21T01:26:27.4459238Z cache-workspace-crates: false +2026-06-21T01:26:27.4460141Z save-if: true +2026-06-21T01:26:27.4460901Z cache-provider: github +2026-06-21T01:26:27.4461732Z cache-bin: true +2026-06-21T01:26:27.4462490Z lookup-only: false +2026-06-21T01:26:27.4463475Z cmd-format: {0} +2026-06-21T01:26:27.4464204Z env: +2026-06-21T01:26:27.4464904Z CARGO_TERM_COLOR: always +2026-06-21T01:26:27.4465781Z RUST_BACKTRACE: short +2026-06-21T01:26:27.4467614Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:27.4469521Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:26:27.4470459Z CARGO_INCREMENTAL: 0 +2026-06-21T01:26:27.4471241Z ##[endgroup] +2026-06-21T01:26:27.7321926Z (node:2362) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead. +2026-06-21T01:26:27.7324803Z (Use `node --trace-deprecation ...` to show where the warning was created) +2026-06-21T01:26:32.1547269Z ##[group]Cache Configuration +2026-06-21T01:26:32.1548016Z Cache Provider: +2026-06-21T01:26:32.1548513Z github +2026-06-21T01:26:32.1548957Z Workspaces: +2026-06-21T01:26:32.1549605Z /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts +2026-06-21T01:26:32.1550415Z Cache Paths: +2026-06-21T01:26:32.1550972Z /home/runner/.cargo/bin +2026-06-21T01:26:32.1551554Z /home/runner/.cargo/.crates.toml +2026-06-21T01:26:32.1552142Z /home/runner/.cargo/.crates2.json +2026-06-21T01:26:32.1552703Z /home/runner/.cargo/registry +2026-06-21T01:26:32.1553265Z /home/runner/.cargo/git +2026-06-21T01:26:32.1554048Z /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/target +2026-06-21T01:26:32.1554866Z Restore Key: +2026-06-21T01:26:32.1555374Z v0-rust-test-Linux-x64-1f47b3b1 +2026-06-21T01:26:32.1556242Z Cache Key: +2026-06-21T01:26:32.1556840Z v0-rust-test-Linux-x64-1f47b3b1-8243978e +2026-06-21T01:26:32.1557454Z .. Prefix: +2026-06-21T01:26:32.1557920Z - v0-rust-test-Linux-x64 +2026-06-21T01:26:32.1558437Z .. Environment considered: +2026-06-21T01:26:32.1558951Z - Rust Versions: +2026-06-21T01:26:32.1559587Z - 1.96.0 x86_64-unknown-linux-gnu ac68faa20c58cbccd01ee7208bf3b6e93a7d7f96 +2026-06-21T01:26:32.1560499Z - 1.96.0 x86_64-unknown-linux-gnu ac68faa20c58cbccd01ee7208bf3b6e93a7d7f96 +2026-06-21T01:26:32.1561269Z - CARGO_HOME +2026-06-21T01:26:32.1561735Z - CARGO_INCREMENTAL +2026-06-21T01:26:32.1562231Z - CARGO_TERM_COLOR +2026-06-21T01:26:32.1562774Z - RUST_BACKTRACE +2026-06-21T01:26:32.1563284Z .. Lockfiles considered: +2026-06-21T01:26:32.1564199Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/.cargo/config.toml +2026-06-21T01:26:32.1565435Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/Cargo.toml +2026-06-21T01:26:32.1566809Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/common/Cargo.toml +2026-06-21T01:26:32.1567609Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/contracts/core/Cargo.toml +2026-06-21T01:26:32.1568310Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/Cargo.toml +2026-06-21T01:26:32.1568961Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/rust-toolchain.toml +2026-06-21T01:26:32.1569595Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/token-bridge/Cargo.toml +2026-06-21T01:26:32.1570333Z ##[endgroup] +2026-06-21T01:26:32.1570478Z +2026-06-21T01:26:32.1570597Z ... Restoring cache ... +2026-06-21T01:26:32.4156651Z Cache hit for: v0-rust-test-Linux-x64-1f47b3b1-8243978e +2026-06-21T01:26:33.7324559Z Received 0 of 277338844 (0.0%), 0.0 MBs/sec +2026-06-21T01:26:34.7325685Z Received 92274688 of 277338844 (33.3%), 44.0 MBs/sec +2026-06-21T01:26:35.7324624Z Received 226492416 of 277338844 (81.7%), 72.0 MBs/sec +2026-06-21T01:26:36.4108527Z Received 277338844 of 277338844 (100.0%), 71.9 MBs/sec +2026-06-21T01:26:36.4147031Z Cache Size: ~264 MB (277338844 B) +2026-06-21T01:26:36.4276284Z [command]/usr/bin/tar -xf /home/runner/work/_temp/ce8d8233-21a5-4bfc-8fb7-f871fee6e021/cache.tzst -P -C /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts --use-compress-program unzstd +2026-06-21T01:26:38.1205232Z Cache restored successfully +2026-06-21T01:26:38.1325759Z Restored from cache key "v0-rust-test-Linux-x64-1f47b3b1-8243978e" full match: true. +2026-06-21T01:26:38.1499563Z ##[group]Run cargo test -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:38.1500452Z cargo test -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:38.1533657Z shell: /usr/bin/bash -e {0} +2026-06-21T01:26:38.1533934Z env: +2026-06-21T01:26:38.1534150Z CARGO_TERM_COLOR: always +2026-06-21T01:26:38.1534395Z RUST_BACKTRACE: short +2026-06-21T01:26:38.1534865Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:38.1535398Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:26:38.1535662Z CARGO_INCREMENTAL: 0 +2026-06-21T01:26:38.1535896Z CACHE_ON_FAILURE: true +2026-06-21T01:26:38.1536364Z ##[endgroup] +2026-06-21T01:26:38.8303422Z  Updating crates.io index +2026-06-21T01:26:39.2158556Z  Locking 212 packages to latest compatible versions +2026-06-21T01:26:39.2193019Z  Adding arbitrary v1.3.2 (available: v1.4.2) +2026-06-21T01:26:39.2278706Z  Adding crypto-common v0.1.6 (available: v0.1.7) +2026-06-21T01:26:39.2337407Z  Adding derive_arbitrary v1.3.2 (available: v1.4.2) +2026-06-21T01:26:39.2599432Z  Adding rand v0.8.6 (available: v0.10.1) +2026-06-21T01:26:39.2691520Z  Adding sha2 v0.10.9 (available: v0.11.0) +2026-06-21T01:26:39.3005060Z  Adding toml v0.8.23 (available: v1.1.2+spec-1.1.0) +2026-06-21T01:26:40.0589531Z  Compiling zeroize v1.9.0 +2026-06-21T01:26:40.0658070Z  Compiling crypto-common v0.1.6 +2026-06-21T01:26:42.8567523Z  Compiling digest v0.10.7 +2026-06-21T01:26:43.1193003Z  Compiling sha2 v0.10.9 +2026-06-21T01:26:43.3350695Z  Compiling generic-array v0.14.9 +2026-06-21T01:26:43.3827401Z  Compiling der v0.7.10 +2026-06-21T01:26:44.4257771Z  Compiling block-buffer v0.10.4 +2026-06-21T01:26:44.4539463Z  Compiling crypto-bigint v0.5.5 +2026-06-21T01:26:44.6597761Z  Compiling stellar-xdr v26.0.1 +2026-06-21T01:26:44.7897622Z  Compiling signature v2.2.0 +2026-06-21T01:26:44.8677547Z  Compiling ark-serialize v0.5.0 +2026-06-21T01:26:45.2208948Z  Compiling sec1 v0.7.3 +2026-06-21T01:26:45.2826685Z  Compiling ark-ff v0.5.0 +2026-06-21T01:26:45.4357607Z  Compiling hmac v0.12.1 +2026-06-21T01:26:45.5106375Z  Compiling elliptic-curve v0.13.8 +2026-06-21T01:26:45.7757483Z  Compiling rfc6979 v0.4.0 +2026-06-21T01:26:45.7758287Z  Compiling primeorder v0.13.6 +2026-06-21T01:26:45.8477747Z  Compiling ecdsa v0.16.9 +2026-06-21T01:26:46.2219569Z  Compiling ed25519 v2.2.3 +2026-06-21T01:26:46.3722472Z  Compiling curve25519-dalek v4.1.3 +2026-06-21T01:26:47.9517560Z  Compiling ed25519-dalek v2.2.0 +2026-06-21T01:26:48.1854250Z  Compiling p256 v0.13.2 +2026-06-21T01:26:48.5669468Z  Compiling k256 v0.13.4 +2026-06-21T01:26:49.1607590Z  Compiling sha3 v0.10.9 +2026-06-21T01:26:50.1708950Z  Compiling ark-poly v0.5.0 +2026-06-21T01:26:50.8435078Z  Compiling ark-ec v0.5.0 +2026-06-21T01:26:51.9807469Z  Compiling ark-bn254 v0.5.0 +2026-06-21T01:26:52.0049559Z  Compiling ark-bls12-381 v0.5.0 +2026-06-21T01:27:00.7613668Z  Compiling soroban-spec v26.1.0 +2026-06-21T01:27:01.2157356Z  Compiling soroban-spec-rust v26.1.0 +2026-06-21T01:27:01.4225253Z  Compiling soroban-env-macros v26.1.3 +2026-06-21T01:27:04.3261499Z  Compiling soroban-env-common v26.1.3 +2026-06-21T01:27:05.4657057Z  Compiling soroban-sdk-macros v26.1.0 +2026-06-21T01:27:08.7728573Z  Compiling soroban-env-host v26.1.3 +2026-06-21T01:27:13.9255835Z  Compiling soroban-ledger-snapshot v26.1.0 +2026-06-21T01:27:14.0857718Z  Compiling soroban-sdk v26.1.0 +2026-06-21T01:27:19.2572435Z  Compiling orbitchain-common v0.1.0 (/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/common) +2026-06-21T01:27:19.2574205Z  Compiling orbitchain-core v0.1.0 (/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/contracts/core) +2026-06-21T01:27:19.8888633Z  Compiling orbitchain-campaign v0.1.0 (/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign) +2026-06-21T01:27:19.8891169Z  Compiling orbitchain-token-bridge v0.1.0 (/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/token-bridge) +2026-06-21T01:27:20.2147340Z warning: unused import: `Address` +2026-06-21T01:27:20.2167052Z --> campaign/src/contract.rs:6:37 +2026-06-21T01:27:20.2167816Z | +2026-06-21T01:27:20.2205548Z 6 | use soroban_sdk::{panic_with_error, Address, Env}; +2026-06-21T01:27:20.2206689Z | ^^^^^^^ +2026-06-21T01:27:20.2207220Z | +2026-06-21T01:27:20.2207883Z = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default +2026-06-21T01:27:20.2208455Z +2026-06-21T01:27:20.5803295Z warning: unused import: `core::ops::Add` +2026-06-21T01:27:20.5817125Z --> campaign/src/test/claim_refund_tests.rs:8:5 +2026-06-21T01:27:20.5856516Z | +2026-06-21T01:27:20.5857647Z 8 | use core::ops::Add; +2026-06-21T01:27:20.5886959Z | ^^^^^^^^^^^^^^ +2026-06-21T01:27:20.5916229Z +2026-06-21T01:27:20.5946818Z warning: unused import: `log` +2026-06-21T01:27:20.5947885Z --> campaign/src/test/claim_refund_tests.rs:12:19 +2026-06-21T01:27:20.5973802Z | +2026-06-21T01:27:20.5997569Z 12 | use soroban_sdk::{log, vec, Address, Env, Vec}; +2026-06-21T01:27:20.6026897Z | ^^^ +2026-06-21T01:27:20.6029817Z +2026-06-21T01:27:20.6030459Z warning: unused import: `BytesN` +2026-06-21T01:27:20.6031558Z --> campaign/src/test/get_campaign_status_tests.rs:8:28 +2026-06-21T01:27:20.6032562Z | +2026-06-21T01:27:20.6033665Z 8 | use soroban_sdk::{Address, BytesN, Env, String, Vec}; +2026-06-21T01:27:20.6034781Z | ^^^^^^ +2026-06-21T01:27:20.6035409Z +2026-06-21T01:27:20.6036404Z warning: unused imports: `MilestoneData` and `MilestoneStatus` +2026-06-21T01:27:20.6037727Z --> campaign/src/test/get_campaign_status_tests.rs:12:50 +2026-06-21T01:27:20.6038664Z | +2026-06-21T01:27:20.6040027Z 12 | use crate::types::{CampaignData, CampaignStatus, MilestoneData, MilestoneStatus, StellarAsset}; +2026-06-21T01:27:20.6041598Z | ^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ +2026-06-21T01:27:20.6042418Z +2026-06-21T01:27:20.6043115Z warning: unused imports: `CampaignData` and `DonorRecord` +2026-06-21T01:27:20.6044299Z --> campaign/src/test/integration_tests.rs:13:16 +2026-06-21T01:27:20.6045221Z | +2026-06-21T01:27:20.6046709Z 13 | AssetInfo, CampaignData, CampaignStatus, DonorRecord, MilestoneData, MilestoneStatus, +2026-06-21T01:27:20.6048342Z | ^^^^^^^^^^^^ ^^^^^^^^^^^ +2026-06-21T01:27:20.6049125Z +2026-06-21T01:27:20.6049949Z warning: unused imports: `CampaignData`, `DataKey`, and `Error` +2026-06-21T01:27:20.6051829Z --> campaign/src/test/negative_path_tests.rs:12:5 +2026-06-21T01:27:20.6052797Z | +2026-06-21T01:27:20.6054028Z 12 | CampaignData, CampaignStatus, DonorRecord, AssetInfo, StellarAsset, MilestoneData, +2026-06-21T01:27:20.6055340Z | ^^^^^^^^^^^^ +2026-06-21T01:27:20.6056641Z 13 | MilestoneStatus, Error, DataKey, +2026-06-21T01:27:20.6057753Z | ^^^^^ ^^^^^^^ +2026-06-21T01:27:20.6058406Z +2026-06-21T01:27:22.1191819Z warning: unused variable: `creator` +2026-06-21T01:27:22.1193641Z --> campaign/src/test/negative_path_tests.rs:325:14 +2026-06-21T01:27:22.1194761Z | +2026-06-21T01:27:22.1195809Z 325 | let (creator, _) = initialize_default_campaign(&env); +2026-06-21T01:27:22.1197714Z | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_creator` +2026-06-21T01:27:22.1198941Z | +2026-06-21T01:27:22.1200024Z = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default +2026-06-21T01:27:22.1200965Z +2026-06-21T01:27:22.1344451Z warning: unused variable: `env` +2026-06-21T01:27:22.1345476Z --> campaign/src/test/negative_path_tests.rs:888:9 +2026-06-21T01:27:22.1346565Z | +2026-06-21T01:27:22.1347207Z 888 | let env = make_env(); +2026-06-21T01:27:22.1348427Z | ^^^ help: if this is intentional, prefix it with an underscore: `_env` +2026-06-21T01:27:22.1349299Z +2026-06-21T01:27:22.1360276Z warning: unused variable: `creator` +2026-06-21T01:27:22.1361265Z --> campaign/src/test/negative_path_tests.rs:922:14 +2026-06-21T01:27:22.1362087Z | +2026-06-21T01:27:22.1362919Z 922 | let (creator, _) = initialize_default_campaign(&env); +2026-06-21T01:27:22.1364292Z | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_creator` +2026-06-21T01:27:22.1365158Z +2026-06-21T01:27:22.5017880Z warning: `orbitchain-campaign` (lib) generated 1 warning (run `cargo fix --lib -p orbitchain-campaign` to apply 1 suggestion) +2026-06-21T01:27:22.5251713Z warning: unused return value of `get_all_milestones::get_all_milestones_view` that must be used +2026-06-21T01:27:22.5253206Z --> campaign/src/get_all_milestones.rs:130:13 +2026-06-21T01:27:22.5253980Z | +2026-06-21T01:27:22.5254730Z 130 | get_all_milestones_view(&env); +2026-06-21T01:27:22.5255347Z | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +2026-06-21T01:27:22.5255776Z | +2026-06-21T01:27:22.5256735Z = note: `#[warn(unused_must_use)]` (part of `#[warn(unused)]`) on by default +2026-06-21T01:27:22.5257438Z help: use `let _ = ...` to ignore the resulting value +2026-06-21T01:27:22.5257903Z | +2026-06-21T01:27:22.5258450Z 130 |  let _ = get_all_milestones_view(&env); +2026-06-21T01:27:22.5258989Z | +++++++ +2026-06-21T01:27:22.5259227Z +2026-06-21T01:27:22.5259823Z warning: unused return value of `get_milestone::get_milestone_view` that must be used +2026-06-21T01:27:22.5260516Z --> campaign/src/get_milestone.rs:148:13 +2026-06-21T01:27:22.5260906Z | +2026-06-21T01:27:22.5261298Z 148 | get_milestone_view(&env, 1); +2026-06-21T01:27:22.5261819Z | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +2026-06-21T01:27:22.5262213Z | +2026-06-21T01:27:22.5262969Z help: use `let _ = ...` to ignore the resulting value +2026-06-21T01:27:22.5263403Z | +2026-06-21T01:27:22.5263839Z 148 |  let _ = get_milestone_view(&env, 1); +2026-06-21T01:27:22.5264352Z | +++++++ +2026-06-21T01:27:22.5264587Z +2026-06-21T01:27:22.5265064Z warning: unused return value of `get_milestone::get_milestone_view` that must be used +2026-06-21T01:27:22.5265738Z --> campaign/src/get_milestone.rs:159:13 +2026-06-21T01:27:22.5266496Z | +2026-06-21T01:27:22.5267086Z 159 | get_milestone_view(&env, 99); +2026-06-21T01:27:22.5267965Z | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +2026-06-21T01:27:22.5268606Z | +2026-06-21T01:27:22.5269001Z help: use `let _ = ...` to ignore the resulting value +2026-06-21T01:27:22.5269353Z | +2026-06-21T01:27:22.5269733Z 159 |  let _ = get_milestone_view(&env, 99); +2026-06-21T01:27:22.5270154Z | +++++++ +2026-06-21T01:27:22.5270349Z +2026-06-21T01:27:22.5270773Z warning: unused return value of `get_milestone::get_milestone_view` that must be used +2026-06-21T01:27:22.5271319Z --> campaign/src/get_milestone.rs:168:13 +2026-06-21T01:27:22.5271649Z | +2026-06-21T01:27:22.5271975Z 168 | get_milestone_view(&env, 0); +2026-06-21T01:27:22.5272405Z | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +2026-06-21T01:27:22.5272729Z | +2026-06-21T01:27:22.5273048Z help: use `let _ = ...` to ignore the resulting value +2026-06-21T01:27:22.5273392Z | +2026-06-21T01:27:22.5273751Z 168 |  let _ = get_milestone_view(&env, 0); +2026-06-21T01:27:22.5274175Z | +++++++ +2026-06-21T01:27:22.5274359Z +2026-06-21T01:27:22.5346156Z warning: hiding a lifetime that's elided elsewhere is confusing +2026-06-21T01:27:22.5347185Z --> campaign/src/test/claim_refund_tests.rs:336:25 +2026-06-21T01:27:22.5347648Z | +2026-06-21T01:27:22.5348290Z 336 | fn token_asset<'a>(env: &Env) -> (StellarAssetClient<'a>, Address, TokenClient) { +2026-06-21T01:27:22.5349260Z | ^^^^ the lifetime is elided here ^^^^^^^^^^^ the same lifetime is hidden here +2026-06-21T01:27:22.5349832Z | +2026-06-21T01:27:22.5350346Z = help: the same lifetime is referred to in inconsistent ways, making the signature confusing +2026-06-21T01:27:22.5350994Z = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default +2026-06-21T01:27:22.5351446Z help: use `'_` for type paths +2026-06-21T01:27:22.5351743Z | +2026-06-21T01:27:22.5352271Z 336 | fn token_asset<'a>(env: &Env) -> (StellarAssetClient<'a>, Address, TokenClient<'_>) { +2026-06-21T01:27:22.5352987Z | ++++ +2026-06-21T01:27:22.5353262Z +2026-06-21T01:27:24.4453628Z warning: `orbitchain-campaign` (lib test) generated 15 warnings (1 duplicate) (run `cargo fix --lib -p orbitchain-campaign --tests` to apply 10 suggestions) +2026-06-21T01:27:24.4454730Z  Finished `test` profile [unoptimized + debuginfo] target(s) in 46.26s +2026-06-21T01:27:24.4865474Z  Running unittests src/lib.rs (target/debug/deps/orbitchain_campaign-b15e2173e8c5098e) +2026-06-21T01:27:24.4885674Z +2026-06-21T01:27:24.4886267Z running 142 tests +2026-06-21T01:27:24.4967071Z test get_all_milestones::tests::returns_all_milestones_when_empty ... ok +2026-06-21T01:27:24.5007083Z test get_all_milestones::tests::returns_all_milestones_for_single ... ok +2026-06-21T01:27:24.5074430Z test get_all_milestones::tests::returns_all_milestones_for_multiple ... ok +2026-06-21T01:27:24.5117188Z test get_milestone::tests::enriched_carries_pending_release_and_is_next_pending ... ok +2026-06-21T01:27:24.5136762Z test get_milestone::tests::enriched_is_fully_released_when_milestone_is_released ... ok +2026-06-21T01:27:24.5181871Z test get_milestone::tests::enriched_locked_milestone_is_not_marked_next_pending ... ok +2026-06-21T01:27:24.5427095Z test get_all_milestones::tests::panics_when_not_initialised - should panic ... ok +2026-06-21T01:27:24.5466396Z test get_milestone::tests::panics_when_contract_not_initialised - should panic ... ok +2026-06-21T01:27:24.5468012Z test get_milestone::tests::panics_on_index_equal_to_milestone_count - should panic ... ok +2026-06-21T01:27:24.5469332Z test multi_asset_release::tests::proportional_release_dust_below_minimum ... ok +2026-06-21T01:27:24.5470580Z test multi_asset_release::tests::proportional_release_equal_split ... ok +2026-06-21T01:27:24.5472330Z test get_milestone::tests::panics_on_index_far_exceeding_milestone_count - should panic ... ok +2026-06-21T01:27:24.5473535Z test multi_asset_release::tests::proportional_release_full_amount ... ok +2026-06-21T01:27:24.5474715Z test multi_asset_release::tests::proportional_release_negative_asset_raised ... ok +2026-06-21T01:27:24.5475864Z test multi_asset_release::tests::proportional_release_rounds_down ... ok +2026-06-21T01:27:24.5477200Z test multi_asset_release::tests::proportional_release_unequal_split ... ok +2026-06-21T01:27:24.5478388Z test multi_asset_release::tests::proportional_release_zero_asset_raised ... ok +2026-06-21T01:27:24.5496765Z test multi_asset_release::tests::proportional_release_zero_total_raised ... ok +2026-06-21T01:27:24.5515780Z test get_milestone::tests::returns_raw_data_for_index_zero ... ok +2026-06-21T01:27:24.5576662Z test get_milestone::tests::returns_correct_milestone_for_non_zero_index ... ok +2026-06-21T01:27:24.5593881Z test test::claim_refund_tests::test_claim_refund_active_campaign - should panic ... ok +2026-06-21T01:27:24.5606877Z test test::claim_refund_tests::test_claim_refund_already_claimed - should panic ... ok +2026-06-21T01:27:24.5725929Z test test::claim_refund_tests::test_claim_refund_ended_no_milestones_eligibility ... ok +2026-06-21T01:27:24.5882363Z test test::claim_refund_tests::test_claim_refund_ended_with_milestone_released - should panic ... ok +2026-06-21T01:27:24.5998828Z test test::claim_refund_tests::test_claim_refund_ended_with_released_milestone_eligibility ... ok +2026-06-21T01:27:24.6089683Z test test::claim_refund_tests::test_claim_refund_exactly_at_window_boundary ... ok +2026-06-21T01:27:24.6206915Z test test::claim_refund_tests::test_claim_refund_goal_reached_campaign - should panic ... ok +2026-06-21T01:27:24.6263101Z test test::claim_refund_tests::test_claim_refund_ended_full_refund ... ok +2026-06-21T01:27:24.6266672Z test test::claim_refund_tests::test_claim_refund_no_donor_eligibility ... ok +2026-06-21T01:27:24.6288214Z test test::claim_refund_tests::test_claim_refund_ended_donor_1 ... ok +2026-06-21T01:27:24.6336971Z test test::claim_refund_tests::test_claim_refund_no_donor_record - should panic ... ok +2026-06-21T01:27:24.6366942Z test test::claim_refund_tests::test_claim_refund_not_initialized - should panic ... ok +2026-06-21T01:27:24.6367957Z test test::claim_refund_tests::test_claim_refund_one_second_past_window ... ok +2026-06-21T01:27:24.6406988Z test test::claim_refund_tests::test_claim_refund_ended_donor_100 ... ok +2026-06-21T01:27:24.6423278Z test test::get_campaign_status_tests::calculates_days_remaining ... ok +2026-06-21T01:27:24.6434632Z test test::get_campaign_status_tests::returns_active_status ... ok +2026-06-21T01:27:24.6466898Z test test::claim_refund_tests::test_claim_refund_window_closed - should panic ... ok +2026-06-21T01:27:24.6487196Z test test::integration_tests::test_analytics_defaults_before_initialize ... ok +2026-06-21T01:27:24.6516714Z test test::get_campaign_status_tests::returns_cancelled_status ... ok +2026-06-21T01:27:24.6526697Z test test::get_campaign_status_tests::returns_ended_status ... ok +2026-06-21T01:27:24.6576850Z test test::integration_tests::test_donate_uninitialized - should panic ... ok +2026-06-21T01:27:24.6622193Z test test::integration_tests::test_donate_below_minimum_panics_assert - should panic ... ok +2026-06-21T01:27:24.6656626Z test test::integration_tests::test_get_donor_record_non_donor ... ok +2026-06-21T01:27:24.6695261Z test test::integration_tests::test_get_total_raised_default ... ok +2026-06-21T01:27:24.6736653Z test test::integration_tests::test_hello ... ok +2026-06-21T01:27:24.6796700Z test test::integration_tests::test_extend_deadline_happy_path ... ok +2026-06-21T01:27:24.6856990Z test test::integration_tests::test_campaign_analytics_report_and_summary ... ok +2026-06-21T01:27:24.6886795Z test test::integration_tests::test_initialize_happy_path ... ok +2026-06-21T01:27:24.6916581Z test test::integration_tests::test_version ... ok +2026-06-21T01:27:24.6926836Z test test::integration_tests::test_donate_happy_path ... ok +2026-06-21T01:27:24.6928249Z test test::integration_tests::test_lifecycle_end_and_refund_eligibility ... ok +2026-06-21T01:27:24.7036971Z test test::invariant_tests::invariant_milestone_targets_strictly_ascending ... ok +2026-06-21T01:27:24.7066891Z test test::invariant_tests::invariant_last_milestone_target_equals_goal ... ok +2026-06-21T01:27:24.7158031Z test test::invariant_tests::invariant_no_released_milestones_while_active ... ok +2026-06-21T01:27:24.7203910Z test test::invariant_tests::invariant_raised_amount_never_exceeds_goal ... ok +2026-06-21T01:27:24.7265876Z test test::negative_path_tests::test_cancel_campaign_fails_not_initialized - should panic ... ok +2026-06-21T01:27:24.7361818Z test test::invariant_tests::invariant_total_donations_match_raised ... ok +2026-06-21T01:27:24.7372847Z test test::negative_path_tests::test_cancel_campaign_fails_already_cancelled - should panic ... ok +2026-06-21T01:27:24.7396906Z test test::negative_path_tests::test_cancel_campaign_frozen_panics - should panic ... ok +2026-06-21T01:27:24.7426952Z test test::integration_tests::test_lifecycle_multi_milestone_unlock ... ok +2026-06-21T01:27:24.7496724Z test test::negative_path_tests::test_cancel_campaign_not_frozen_succeeds ... ok +2026-06-21T01:27:24.7546806Z test test::negative_path_tests::test_claim_refund_eligible_cancelled ... ok +2026-06-21T01:27:24.7586752Z test test::negative_path_tests::test_cancel_then_refund_eligible ... ok +2026-06-21T01:27:24.7616960Z test test::negative_path_tests::test_claim_refund_fails_not_initialized - should panic ... ok +2026-06-21T01:27:24.7636909Z test test::negative_path_tests::test_claim_refund_fails_already_claimed - should panic ... ok +2026-06-21T01:27:24.7676796Z test test::negative_path_tests::test_claim_refund_fails_no_donor_record - should panic ... ok +2026-06-21T01:27:24.7696956Z test test::negative_path_tests::test_claim_refund_fails_campaign_active - should panic ... ok +2026-06-21T01:27:24.7730381Z test test::negative_path_tests::test_donate_fails_below_minimum - should panic ... ok +2026-06-21T01:27:24.7749949Z test test::negative_path_tests::test_donate_fails_campaign_cancelled - should panic ... ok +2026-06-21T01:27:24.7786323Z test test::negative_path_tests::test_donate_fails_not_initialized - should panic ... ok +2026-06-21T01:27:24.7807380Z test test::negative_path_tests::test_donate_fails_campaign_ended - should panic ... ok +2026-06-21T01:27:24.7847023Z test test::negative_path_tests::test_donate_fails_negative_amount - should panic ... ok +2026-06-21T01:27:24.7940343Z test test::negative_path_tests::test_edge_case_zero_donations ... ok +2026-06-21T01:27:24.7942921Z test test::negative_path_tests::test_donate_fails_on_donation_count_overflow - should panic ... ok +2026-06-21T01:27:24.7956988Z test test::negative_path_tests::test_edge_case_no_donor_record ... ok +2026-06-21T01:27:24.8017210Z test test::negative_path_tests::test_donate_fails_zero_amount - should panic ... ok +2026-06-21T01:27:24.8046793Z test test::negative_path_tests::test_end_campaign_fails_not_initialized - should panic ... ok +2026-06-21T01:27:24.8076726Z test test::negative_path_tests::test_end_campaign_fails_already_ended - should panic ... ok +2026-06-21T01:27:24.8107499Z test test::negative_path_tests::test_end_campaign_frozen_panics - should panic ... ok +2026-06-21T01:27:24.8108560Z test test::negative_path_tests::test_end_campaign_fails_cancelled - should panic ... ok +2026-06-21T01:27:24.8176842Z test test::negative_path_tests::test_end_campaign_not_frozen_succeeds ... ok +2026-06-21T01:27:24.8196724Z test test::negative_path_tests::test_extend_deadline_fails_not_initialized - should panic ... ok +2026-06-21T01:27:24.8207712Z test test::negative_path_tests::test_end_then_refund_eligible ... ok +2026-06-21T01:27:24.8231866Z test test::negative_path_tests::test_extend_deadline_fails_cancelled - should panic ... ok +2026-06-21T01:27:24.8237741Z test test::negative_path_tests::test_extend_deadline_fails_absurd_future_time - should panic ... ok +2026-06-21T01:27:24.8341650Z test test::negative_path_tests::test_extend_deadline_fails_past_time - should panic ... ok +2026-06-21T01:27:24.8343131Z test test::negative_path_tests::test_extend_deadline_frozen_panics - should panic ... ok +2026-06-21T01:27:24.8382368Z test test::negative_path_tests::test_extend_deadline_not_frozen_succeeds ... ok +2026-06-21T01:27:24.8406728Z test test::negative_path_tests::test_hello ... ok +2026-06-21T01:27:24.8436976Z test test::negative_path_tests::test_get_milestone_view_fails_not_initialized - should panic ... ok +2026-06-21T01:27:24.8466779Z test test::negative_path_tests::test_initialize_fails_empty_asset_code - should panic ... ok +2026-06-21T01:27:24.8467821Z test test::negative_path_tests::test_full_lifecycle_happy_path ... ok +2026-06-21T01:27:24.8518143Z test test::negative_path_tests::test_initialize_fails_empty_assets - should panic ... ok +2026-06-21T01:27:24.8519444Z test test::negative_path_tests::test_initialize_fails_milestone_last_target_not_equal_goal - should panic ... ok +2026-06-21T01:27:24.8536879Z test test::negative_path_tests::test_get_milestone_view_fails_out_of_bounds - should panic ... ok +2026-06-21T01:27:24.8561679Z test test::negative_path_tests::test_initialize_fails_milestone_targets_not_ascending - should panic ... ok +2026-06-21T01:27:24.8563269Z test test::negative_path_tests::test_initialize_fails_already_initialized - should panic ... ok +2026-06-21T01:27:24.8564555Z test test::negative_path_tests::test_initialize_fails_negative_goal - should panic ... ok +2026-06-21T01:27:24.8565713Z test test::negative_path_tests::test_initialize_fails_past_end_time - should panic ... ok +2026-06-21T01:27:24.8567352Z test test::negative_path_tests::test_initialize_fails_too_many_milestones - should panic ... ok +2026-06-21T01:27:24.8568840Z test test::negative_path_tests::test_initialize_fails_zero_goal - should panic ... ok +2026-06-21T01:27:24.8570156Z test test::negative_path_tests::test_initialize_fails_zero_milestones - should panic ... ok +2026-06-21T01:27:24.8606908Z test test::negative_path_tests::test_initialize_requires_auth - should panic ... ok +2026-06-21T01:27:24.8722760Z test test::negative_path_tests::test_is_refund_eligible_fails_active_campaign ... ok +2026-06-21T01:27:24.8727031Z test test::negative_path_tests::test_is_refund_eligible_fails_already_claimed ... ok +2026-06-21T01:27:24.8728291Z test test::negative_path_tests::test_is_refund_eligible_fails_ended_with_released_milestones ... ok +2026-06-21T01:27:24.8756274Z test test::negative_path_tests::test_is_refund_eligible_fails_goal_reached ... ok +2026-06-21T01:27:24.8757355Z test test::negative_path_tests::test_is_refund_eligible_returns_false_no_campaign ... ok +2026-06-21T01:27:24.8836706Z test test::negative_path_tests::test_is_refund_eligible_fails_no_campaign ... ok +2026-06-21T01:27:24.8874065Z test test::negative_path_tests::test_is_refund_eligible_fails_no_donor_record ... ok +2026-06-21T01:27:24.8917166Z test test::negative_path_tests::test_is_refund_eligible_fails_window_closed ... ok +2026-06-21T01:27:24.8976589Z test test::negative_path_tests::test_refund_window_edge_boundary ... ok +2026-06-21T01:27:24.9012232Z test test::negative_path_tests::test_upgrade_fails_when_frozen - should panic ... ok +2026-06-21T01:27:24.9036953Z test test::negative_path_tests::test_reentrancy_lock_donate_twice_succeeds ... ok +2026-06-21T01:27:24.9066576Z test test::negative_path_tests::test_version ... ok +2026-06-21T01:27:24.9096576Z test test::negative_path_tests::test_refund_window_just_after_boundary ... ok +2026-06-21T01:27:24.9126577Z test test::negative_path_tests::test_upgrade_succeeds_after_unfreeze ... ok +2026-06-21T01:27:24.9137032Z test test::negative_path_tests::test_upgrade_succeeds_when_not_frozen ... ok +2026-06-21T01:27:24.9138055Z test test::refund_eligibility_tests::test_refund_eligible_campaign_cancelled ... ok +2026-06-21T01:27:24.9139115Z test test::refund_eligibility_tests::test_refund_eligibility_all_conditions ... ok +2026-06-21T01:27:24.9236926Z test test::refund_eligibility_tests::test_refund_not_eligible_campaign_goal_reached ... ok +2026-06-21T01:27:24.9240857Z test test::refund_eligibility_tests::test_refund_not_eligible_already_claimed ... ok +2026-06-21T01:27:24.9258135Z test test::refund_eligibility_tests::test_refund_eligible_campaign_ended_no_milestone_released ... ok +2026-06-21T01:27:24.9276933Z test test::refund_eligibility_tests::test_refund_not_eligible_campaign_active ... ok +2026-06-21T01:27:24.9279032Z test test::refund_eligibility_tests::test_refund_not_eligible_no_campaign ... ok +2026-06-21T01:27:24.9376838Z test test::refund_eligibility_tests::test_refund_not_eligible_no_donor_record ... ok +2026-06-21T01:27:24.9397332Z test test::refund_eligibility_tests::test_refund_window_edge_case_one_second_after_30_days ... ok +2026-06-21T01:27:24.9398524Z test test::refund_eligibility_tests::test_refund_window_edge_case_exactly_30_days ... ok +2026-06-21T01:27:24.9399538Z test test::refund_eligibility_tests::test_refund_not_eligible_window_closed ... ok +2026-06-21T01:27:24.9587029Z test test::release_milestone_tests::test_frozen_contract_release_panics - should panic ... ok +2026-06-21T01:27:24.9706788Z test test::release_milestone_tests::test_first_milestone_release_succeeds_regardless_of_previous ... ok +2026-06-21T01:27:24.9726897Z test test::release_milestone_tests::test_locked_milestone_release_panics - should panic ... ok +2026-06-21T01:27:24.9727774Z test test::release_milestone_tests::test_double_release_panics - should panic ... ok +2026-06-21T01:27:24.9805296Z test test::release_milestone_tests::test_final_milestone_releases_remaining_balance ... ok +2026-06-21T01:27:24.9896901Z test test::release_milestone_tests::test_non_creator_release_panics - should panic ... ok +2026-06-21T01:27:24.9936876Z test test::release_milestone_tests::test_release_non_existent_milestone_panics - should panic ... ok +2026-06-21T01:27:25.0114991Z test test::release_milestone_tests::test_release_with_single_asset_transfers_correct_amount ... ok +2026-06-21T01:27:25.0117116Z test test::release_milestone_tests::test_skipping_milestone_release_panics - should panic ... ok +2026-06-21T01:27:25.0367134Z test test::release_milestone_tests::test_valid_release_updates_milestone_status ... ok +2026-06-21T01:27:25.0408279Z test test::release_milestone_tests::test_valid_release_sets_released_amount ... ok +2026-06-21T01:27:25.0427708Z test test::release_milestone_tests::test_sequential_milestone_release_succeeds ... ok +2026-06-21T01:27:25.0464716Z test test::release_milestone_tests::test_release_with_multiple_assets_only_debits_first_asset ... ok +2026-06-21T01:27:25.0465432Z +2026-06-21T01:27:25.0465862Z test result: ok. 142 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.56s +2026-06-21T01:27:25.0466707Z +2026-06-21T01:27:25.0500931Z  Running unittests src/lib.rs (target/debug/deps/orbitchain_common-a7e91c53777a8f47) +2026-06-21T01:27:25.0514048Z +2026-06-21T01:27:25.0514408Z running 0 tests +2026-06-21T01:27:25.0514584Z +2026-06-21T01:27:25.0515517Z test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s +2026-06-21T01:27:25.0516258Z +2026-06-21T01:27:25.0530885Z  Running unittests src/lib.rs (target/debug/deps/orbitchain_core-64120678b644eb93) +2026-06-21T01:27:25.0543385Z +2026-06-21T01:27:25.0543542Z running 14 tests +2026-06-21T01:27:25.0616783Z test tests::test_dashboard_metrics_empty_contract ... ok +2026-06-21T01:27:25.0705126Z test tests::test_campaign_report_progress_clamped ... ok +2026-06-21T01:27:25.0713926Z test tests::test_create_and_donate_with_metadata_and_tracking ... ok +2026-06-21T01:27:25.0886918Z test tests::test_count_total_transactions_split ... ok +2026-06-21T01:27:25.0921280Z test tests::test_get_campaign_report_accuracy ... ok +2026-06-21T01:27:25.0936518Z test tests::test_initialize ... ok +2026-06-21T01:27:25.0964431Z test tests::test_ping ... ok +2026-06-21T01:27:25.0965060Z test tests::test_get_platform_summary ... ok +2026-06-21T01:27:25.1066660Z test tests::test_get_dashboard_metrics ... ok +2026-06-21T01:27:25.1076703Z test tests::test_validate_recipient ... ok +2026-06-21T01:27:25.1166660Z test tests::test_total_tx_count ... ok +2026-06-21T01:27:25.1179759Z test tests::test_submit_transaction ... ok +2026-06-21T01:27:25.1266393Z test tests::test_withdraw_and_approve ... ok +2026-06-21T01:27:25.1585860Z test tests::test_prevent_double_withdrawal - should panic ... ok +2026-06-21T01:27:25.1586686Z +2026-06-21T01:27:25.1587230Z test result: ok. 14 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.10s +2026-06-21T01:27:25.1588011Z +2026-06-21T01:27:25.1614874Z  Running unittests src/lib.rs (target/debug/deps/orbitchain_token_bridge-e7a55db06a538a5c) +2026-06-21T01:27:25.1626880Z +2026-06-21T01:27:25.1627084Z running 0 tests +2026-06-21T01:27:25.1627293Z +2026-06-21T01:27:25.1627573Z test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s +2026-06-21T01:27:25.1627937Z +2026-06-21T01:27:25.1629702Z  Doc-tests orbitchain_campaign +2026-06-21T01:27:25.8858897Z +2026-06-21T01:27:25.8859429Z running 0 tests +2026-06-21T01:27:25.8859649Z +2026-06-21T01:27:25.8916196Z test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s +2026-06-21T01:27:25.8917061Z +2026-06-21T01:27:25.8994084Z  Doc-tests orbitchain_common +2026-06-21T01:27:25.9409054Z +2026-06-21T01:27:25.9409707Z running 0 tests +2026-06-21T01:27:25.9409983Z +2026-06-21T01:27:25.9410428Z test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s +2026-06-21T01:27:25.9410851Z +2026-06-21T01:27:25.9439625Z  Doc-tests orbitchain_token_bridge +2026-06-21T01:27:25.9779514Z +2026-06-21T01:27:25.9780124Z running 0 tests +2026-06-21T01:27:25.9780452Z +2026-06-21T01:27:25.9781032Z test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s +2026-06-21T01:27:25.9781785Z +2026-06-21T01:27:26.0067832Z Post job cleanup. +2026-06-21T01:27:26.2852598Z Cache up-to-date. +2026-06-21T01:27:26.2854963Z (node:3242) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead. +2026-06-21T01:27:26.2856338Z (Use `node --trace-deprecation ...` to show where the warning was created) +2026-06-21T01:27:26.3072187Z Node 20 is being deprecated. This workflow is running with Node 24 by default. If you need to temporarily use Node 20, you can set the ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true environment variable. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/ +2026-06-21T01:27:26.3073462Z Post job cleanup. +2026-06-21T01:27:26.3886614Z [command]/usr/bin/git version +2026-06-21T01:27:26.3923196Z git version 2.54.0 +2026-06-21T01:27:26.3961079Z Temporarily overriding HOME='/home/runner/work/_temp/a641ec8c-02e0-4842-969d-f9b126d0d724' before making global git config changes +2026-06-21T01:27:26.3962378Z Adding repository directory to the temporary git global config as a safe directory +2026-06-21T01:27:26.3968019Z [command]/usr/bin/git config --global --add safe.directory /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts +2026-06-21T01:27:26.4005140Z [command]/usr/bin/git config --local --name-only --get-regexp core\.sshCommand +2026-06-21T01:27:26.4038600Z [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || :" +2026-06-21T01:27:26.4260520Z [command]/usr/bin/git config --local --name-only --get-regexp http\.https\:\/\/github\.com\/\.extraheader +2026-06-21T01:27:26.4285510Z http.https://github.com/.extraheader +2026-06-21T01:27:26.4296958Z [command]/usr/bin/git config --local --unset-all http.https://github.com/.extraheader +2026-06-21T01:27:26.4327127Z [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http\.https\:\/\/github\.com\/\.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :" +2026-06-21T01:27:26.4540927Z [command]/usr/bin/git config --local --name-only --get-regexp ^includeIf\.gitdir: +2026-06-21T01:27:26.4571083Z [command]/usr/bin/git submodule foreach --recursive git config --local --show-origin --name-only --get-regexp remote.origin.url +2026-06-21T01:27:26.4915184Z Cleaning up orphan processes +2026-06-21T01:27:26.5297550Z ##[warning]Node.js 20 is deprecated. The following actions target Node.js 20 but are being forced to run on Node.js 24: actions/checkout@v4. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/ diff --git a/.ci_logs/Clippy lint/10_Post Run actions_checkout@v4.txt b/.ci_logs/Clippy lint/10_Post Run actions_checkout@v4.txt new file mode 100644 index 0000000..aba6e8e --- /dev/null +++ b/.ci_logs/Clippy lint/10_Post Run actions_checkout@v4.txt @@ -0,0 +1,15 @@ +2026-06-21T01:27:03.4289731Z Node 20 is being deprecated. This workflow is running with Node 24 by default. If you need to temporarily use Node 20, you can set the ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true environment variable. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/ +2026-06-21T01:27:03.4291142Z Post job cleanup. +2026-06-21T01:27:03.5214129Z [command]/usr/bin/git version +2026-06-21T01:27:03.5253256Z git version 2.54.0 +2026-06-21T01:27:03.5290149Z Temporarily overriding HOME='/home/runner/work/_temp/dfa57ae5-7b76-496d-bb7d-0092c3455a01' before making global git config changes +2026-06-21T01:27:03.5290950Z Adding repository directory to the temporary git global config as a safe directory +2026-06-21T01:27:03.5296787Z [command]/usr/bin/git config --global --add safe.directory /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts +2026-06-21T01:27:03.5807106Z [command]/usr/bin/git config --local --name-only --get-regexp core\.sshCommand +2026-06-21T01:27:03.5856967Z [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || :" +2026-06-21T01:27:03.6107910Z [command]/usr/bin/git config --local --name-only --get-regexp http\.https\:\/\/github\.com\/\.extraheader +2026-06-21T01:27:03.7679711Z http.https://github.com/.extraheader +2026-06-21T01:27:03.7689166Z [command]/usr/bin/git config --local --unset-all http.https://github.com/.extraheader +2026-06-21T01:27:03.8336826Z [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http\.https\:\/\/github\.com\/\.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :" +2026-06-21T01:27:03.8592115Z [command]/usr/bin/git config --local --name-only --get-regexp ^includeIf\.gitdir: +2026-06-21T01:27:03.8627748Z [command]/usr/bin/git submodule foreach --recursive git config --local --show-origin --name-only --get-regexp remote.origin.url diff --git a/.ci_logs/Clippy lint/11_Complete job.txt b/.ci_logs/Clippy lint/11_Complete job.txt new file mode 100644 index 0000000..4f9166d --- /dev/null +++ b/.ci_logs/Clippy lint/11_Complete job.txt @@ -0,0 +1,2 @@ +2026-06-21T01:27:03.9019812Z Cleaning up orphan processes +2026-06-21T01:27:03.9335204Z ##[warning]Node.js 20 is deprecated. The following actions target Node.js 20 but are being forced to run on Node.js 24: actions/checkout@v4. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/ diff --git a/.ci_logs/Clippy lint/1_Set up job.txt b/.ci_logs/Clippy lint/1_Set up job.txt new file mode 100644 index 0000000..0dfe324 --- /dev/null +++ b/.ci_logs/Clippy lint/1_Set up job.txt @@ -0,0 +1,32 @@ +2026-06-21T01:26:23.3044734Z Current runner version: '2.335.1' +2026-06-21T01:26:23.3073869Z ##[group]Runner Image Provisioner +2026-06-21T01:26:23.3074935Z Hosted Compute Agent +2026-06-21T01:26:23.3075630Z Version: 20260611.554 +2026-06-21T01:26:23.3076287Z Commit: 5e0782fdc9014723d3be820dd114dd31555c2bd1 +2026-06-21T01:26:23.3077083Z Build Date: 2026-06-11T21:40:46Z +2026-06-21T01:26:23.3077881Z Worker ID: {f9ff5cae-4324-4f27-bfc5-ea0d04b86dfb} +2026-06-21T01:26:23.3078617Z Azure Region: eastus +2026-06-21T01:26:23.3079237Z ##[endgroup] +2026-06-21T01:26:23.3080720Z ##[group]Operating System +2026-06-21T01:26:23.3081401Z Ubuntu +2026-06-21T01:26:23.3082058Z 24.04.4 +2026-06-21T01:26:23.3082598Z LTS +2026-06-21T01:26:23.3083162Z ##[endgroup] +2026-06-21T01:26:23.3083907Z ##[group]Runner Image +2026-06-21T01:26:23.3084585Z Image: ubuntu-24.04 +2026-06-21T01:26:23.3085222Z Version: 20260615.205.1 +2026-06-21T01:26:23.3086304Z Included Software: https://github.com/actions/runner-images/blob/ubuntu24/20260615.205/images/ubuntu/Ubuntu2404-Readme.md +2026-06-21T01:26:23.3088103Z Image Release: https://github.com/actions/runner-images/releases/tag/ubuntu24%2F20260615.205 +2026-06-21T01:26:23.3089128Z ##[endgroup] +2026-06-21T01:26:23.3090293Z ##[group]GITHUB_TOKEN Permissions +2026-06-21T01:26:23.3092698Z Contents: read +2026-06-21T01:26:23.3093581Z Metadata: read +2026-06-21T01:26:23.3094171Z ##[endgroup] +2026-06-21T01:26:23.3096537Z Secret source: Actions +2026-06-21T01:26:23.3097771Z Prepare workflow directory +2026-06-21T01:26:23.3497889Z Prepare all required actions +2026-06-21T01:26:23.3537439Z Getting action download info +2026-06-21T01:26:23.6049102Z Download action repository 'actions/checkout@v4' (SHA:34e114876b0b11c390a56381ad16ebd13914f8d5) +2026-06-21T01:26:23.6746309Z Download action repository 'dtolnay/rust-toolchain@stable' (SHA:29eef336d9b2848a0b548edc03f92a220660cdb8) +2026-06-21T01:26:23.7614809Z Download action repository 'Swatinem/rust-cache@v2' (SHA:e18b497796c12c097a38f9edb9d0641fb99eee32) +2026-06-21T01:26:24.1124909Z Complete job name: Clippy lint diff --git a/.ci_logs/Clippy lint/2_Run actions_checkout@v4.txt b/.ci_logs/Clippy lint/2_Run actions_checkout@v4.txt new file mode 100644 index 0000000..b99b0bf --- /dev/null +++ b/.ci_logs/Clippy lint/2_Run actions_checkout@v4.txt @@ -0,0 +1,93 @@ +2026-06-21T01:26:24.1876023Z Node 20 is being deprecated. This workflow is running with Node 24 by default. If you need to temporarily use Node 20, you can set the ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true environment variable. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/ +2026-06-21T01:26:24.1884939Z ##[group]Run actions/checkout@v4 +2026-06-21T01:26:24.1885667Z with: +2026-06-21T01:26:24.1886167Z repository: OrbitChainLabs/OrbitChain-Contracts +2026-06-21T01:26:24.1890902Z token: *** +2026-06-21T01:26:24.1891334Z ssh-strict: true +2026-06-21T01:26:24.1891785Z ssh-user: git +2026-06-21T01:26:24.1892226Z persist-credentials: true +2026-06-21T01:26:24.1892723Z clean: true +2026-06-21T01:26:24.1893558Z sparse-checkout-cone-mode: true +2026-06-21T01:26:24.1894242Z fetch-depth: 1 +2026-06-21T01:26:24.1894674Z fetch-tags: false +2026-06-21T01:26:24.1895113Z show-progress: true +2026-06-21T01:26:24.1895556Z lfs: false +2026-06-21T01:26:24.1895993Z submodules: false +2026-06-21T01:26:24.1896487Z set-safe-directory: true +2026-06-21T01:26:24.1897267Z env: +2026-06-21T01:26:24.1897686Z CARGO_TERM_COLOR: always +2026-06-21T01:26:24.1898168Z RUST_BACKTRACE: short +2026-06-21T01:26:24.1899027Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:24.1899989Z ##[endgroup] +2026-06-21T01:26:24.2997017Z Syncing repository: OrbitChainLabs/OrbitChain-Contracts +2026-06-21T01:26:24.2999391Z ##[group]Getting Git version info +2026-06-21T01:26:24.3000276Z Working directory is '/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts' +2026-06-21T01:26:24.3001391Z [command]/usr/bin/git version +2026-06-21T01:26:24.3057692Z git version 2.54.0 +2026-06-21T01:26:24.3080205Z ##[endgroup] +2026-06-21T01:26:24.3096751Z Temporarily overriding HOME='/home/runner/work/_temp/64aae6a0-561e-446e-819e-e0993ab1e723' before making global git config changes +2026-06-21T01:26:24.3099075Z Adding repository directory to the temporary git global config as a safe directory +2026-06-21T01:26:24.3104285Z [command]/usr/bin/git config --global --add safe.directory /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts +2026-06-21T01:26:24.3155097Z Deleting the contents of '/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts' +2026-06-21T01:26:24.3161632Z ##[group]Initializing the repository +2026-06-21T01:26:24.3167300Z [command]/usr/bin/git init /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts +2026-06-21T01:26:24.3241801Z hint: Using 'master' as the name for the initial branch. This default branch name +2026-06-21T01:26:24.3244103Z hint: will change to "main" in Git 3.0. To configure the initial branch name +2026-06-21T01:26:24.3245815Z hint: to use in all of your new repositories, which will suppress this warning, +2026-06-21T01:26:24.3247166Z hint: call: +2026-06-21T01:26:24.3247973Z hint: +2026-06-21T01:26:24.3248916Z hint: git config --global init.defaultBranch +2026-06-21T01:26:24.3250045Z hint: +2026-06-21T01:26:24.3251182Z hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and +2026-06-21T01:26:24.3252813Z hint: 'development'. The just-created branch can be renamed via this command: +2026-06-21T01:26:24.3254314Z hint: +2026-06-21T01:26:24.3255299Z hint: git branch -m +2026-06-21T01:26:24.3256201Z hint: +2026-06-21T01:26:24.3257382Z hint: Disable this message with "git config set advice.defaultBranchName false" +2026-06-21T01:26:24.3259497Z Initialized empty Git repository in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/.git/ +2026-06-21T01:26:24.3263795Z [command]/usr/bin/git remote add origin https://github.com/OrbitChainLabs/OrbitChain-Contracts +2026-06-21T01:26:24.3301195Z ##[endgroup] +2026-06-21T01:26:24.3302403Z ##[group]Disabling automatic garbage collection +2026-06-21T01:26:24.3307004Z [command]/usr/bin/git config --local gc.auto 0 +2026-06-21T01:26:24.3341044Z ##[endgroup] +2026-06-21T01:26:24.3342212Z ##[group]Setting up auth +2026-06-21T01:26:24.3349374Z [command]/usr/bin/git config --local --name-only --get-regexp core\.sshCommand +2026-06-21T01:26:24.3388870Z [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || :" +2026-06-21T01:26:24.3771529Z [command]/usr/bin/git config --local --name-only --get-regexp http\.https\:\/\/github\.com\/\.extraheader +2026-06-21T01:26:24.3813173Z [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http\.https\:\/\/github\.com\/\.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :" +2026-06-21T01:26:24.4076131Z [command]/usr/bin/git config --local --name-only --get-regexp ^includeIf\.gitdir: +2026-06-21T01:26:24.4114780Z [command]/usr/bin/git submodule foreach --recursive git config --local --show-origin --name-only --get-regexp remote.origin.url +2026-06-21T01:26:24.4361452Z [command]/usr/bin/git config --local http.https://github.com/.extraheader AUTHORIZATION: basic *** +2026-06-21T01:26:24.4399965Z ##[endgroup] +2026-06-21T01:26:24.4400840Z ##[group]Fetching the repository +2026-06-21T01:26:24.4409696Z [command]/usr/bin/git -c protocol.version=2 fetch --no-tags --prune --no-recurse-submodules --depth=1 origin +1be331ea57707748b39835c9fac837ddeb283d53:refs/remotes/pull/60/merge +2026-06-21T01:26:24.6668489Z From https://github.com/OrbitChainLabs/OrbitChain-Contracts +2026-06-21T01:26:24.6670121Z * [new ref] 1be331ea57707748b39835c9fac837ddeb283d53 -> pull/60/merge +2026-06-21T01:26:24.6700117Z ##[endgroup] +2026-06-21T01:26:24.6700910Z ##[group]Determining the checkout info +2026-06-21T01:26:24.6702147Z ##[endgroup] +2026-06-21T01:26:24.6708236Z [command]/usr/bin/git sparse-checkout disable +2026-06-21T01:26:24.6752526Z [command]/usr/bin/git config --local --unset-all extensions.worktreeConfig +2026-06-21T01:26:24.6782710Z ##[group]Checking out the ref +2026-06-21T01:26:24.6786616Z [command]/usr/bin/git checkout --progress --force refs/remotes/pull/60/merge +2026-06-21T01:26:24.6935957Z Note: switching to 'refs/remotes/pull/60/merge'. +2026-06-21T01:26:24.6936834Z +2026-06-21T01:26:24.6937519Z You are in 'detached HEAD' state. You can look around, make experimental +2026-06-21T01:26:24.6939018Z changes and commit them, and you can discard any commits you make in this +2026-06-21T01:26:24.6940190Z state without impacting any branches by switching back to a branch. +2026-06-21T01:26:24.6940738Z +2026-06-21T01:26:24.6941105Z If you want to create a new branch to retain commits you create, you may +2026-06-21T01:26:24.6941965Z do so (now or later) by using -c with the switch command. Example: +2026-06-21T01:26:24.6942460Z +2026-06-21T01:26:24.6942686Z git switch -c +2026-06-21T01:26:24.6943025Z +2026-06-21T01:26:24.6943240Z Or undo this operation with: +2026-06-21T01:26:24.6943996Z +2026-06-21T01:26:24.6944294Z git switch - +2026-06-21T01:26:24.6944668Z +2026-06-21T01:26:24.6945274Z Turn off this advice by setting config variable advice.detachedHead to false +2026-06-21T01:26:24.6945933Z +2026-06-21T01:26:24.6946564Z HEAD is now at 1be331e Merge 4b973bcdef5a40b4714ec76b0c3c3d5e9b026c2d into dc3d5e2b821bb2a0f2655582265c562926415b02 +2026-06-21T01:26:24.6948873Z ##[endgroup] +2026-06-21T01:26:24.7036910Z [command]/usr/bin/git log -1 --format=%H +2026-06-21T01:26:24.7037998Z 1be331ea57707748b39835c9fac837ddeb283d53 diff --git a/.ci_logs/Clippy lint/3_Install Rust toolchain.txt b/.ci_logs/Clippy lint/3_Install Rust toolchain.txt new file mode 100644 index 0000000..b4c8394 --- /dev/null +++ b/.ci_logs/Clippy lint/3_Install Rust toolchain.txt @@ -0,0 +1,188 @@ +2026-06-21T01:26:24.7390242Z ##[warning]Unexpected input(s) 'cache', valid inputs are ['toolchain', 'targets', 'target', 'components'] +2026-06-21T01:26:24.7409089Z ##[group]Run dtolnay/rust-toolchain@stable +2026-06-21T01:26:24.7409669Z with: +2026-06-21T01:26:24.7410067Z cache: false +2026-06-21T01:26:24.7410488Z toolchain: stable +2026-06-21T01:26:24.7410911Z env: +2026-06-21T01:26:24.7411311Z CARGO_TERM_COLOR: always +2026-06-21T01:26:24.7411790Z RUST_BACKTRACE: short +2026-06-21T01:26:24.7412648Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:24.7413731Z ##[endgroup] +2026-06-21T01:26:24.7545624Z ##[group]Run : parse toolchain version +2026-06-21T01:26:24.7546359Z : parse toolchain version +2026-06-21T01:26:24.7546941Z if [[ -z $toolchain ]]; then +2026-06-21T01:26:24.7547885Z  # GitHub does not enforce `required: true` inputs itself. https://github.com/actions/runner/issues/1070 +2026-06-21T01:26:24.7548891Z  echo "'toolchain' is a required input" >&2 +2026-06-21T01:26:24.7549550Z  exit 1 +2026-06-21T01:26:24.7550195Z elif [[ $toolchain =~ ^stable' '[0-9]+' '(year|month|week|day)s?' 'ago$ ]]; then +2026-06-21T01:26:24.7550958Z  if [[ Linux == macOS ]]; then +2026-06-21T01:26:24.7551911Z  echo "toolchain=1.$((($(date -v-$(sed 's/stable \([0-9]*\) \(.\).*/\1\2/' <<< $toolchain) +%s)/60/60/24-16569)/7/6))" >> $GITHUB_OUTPUT +2026-06-21T01:26:24.7552822Z  else +2026-06-21T01:26:24.7553728Z  echo "toolchain=1.$((($(date --date "${toolchain#stable }" +%s)/60/60/24-16569)/7/6))" >> $GITHUB_OUTPUT +2026-06-21T01:26:24.7554585Z  fi +2026-06-21T01:26:24.7555176Z elif [[ $toolchain =~ ^stable' 'minus' '[0-9]+' 'releases?$ ]]; then +2026-06-21T01:26:24.7556174Z  echo "toolchain=1.$((($(date +%s)/60/60/24-16569)/7/6-${toolchain//[^0-9]/}))" >> $GITHUB_OUTPUT +2026-06-21T01:26:24.7557019Z elif [[ $toolchain =~ ^1\.[0-9]+$ ]]; then +2026-06-21T01:26:24.7557973Z  echo "toolchain=1.$((i=${toolchain#1.}, c=($(date +%s)/60/60/24-16569)/7/6, i+9*i*(10*i<=c)+90*i*(100*i<=c)))" >> $GITHUB_OUTPUT +2026-06-21T01:26:24.7558863Z else +2026-06-21T01:26:24.7559353Z  echo "toolchain=$toolchain" >> $GITHUB_OUTPUT +2026-06-21T01:26:24.7559934Z fi +2026-06-21T01:26:24.7694371Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:24.7695120Z env: +2026-06-21T01:26:24.7695535Z CARGO_TERM_COLOR: always +2026-06-21T01:26:24.7696031Z RUST_BACKTRACE: short +2026-06-21T01:26:24.7697139Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:24.7698043Z toolchain: stable +2026-06-21T01:26:24.7698471Z ##[endgroup] +2026-06-21T01:26:24.7869876Z ##[group]Run : construct rustup command line +2026-06-21T01:26:24.7870552Z : construct rustup command line +2026-06-21T01:26:24.7871382Z echo "targets=$(for t in ${targets//,/ }; do echo -n ' --target' $t; done)" >> $GITHUB_OUTPUT +2026-06-21T01:26:24.7872520Z echo "components=$(for c in ${components//,/ }; do echo -n ' --component' $c; done)" >> $GITHUB_OUTPUT +2026-06-21T01:26:24.7873641Z echo "downgrade=" >> $GITHUB_OUTPUT +2026-06-21T01:26:24.7907904Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:24.7908574Z env: +2026-06-21T01:26:24.7908981Z CARGO_TERM_COLOR: always +2026-06-21T01:26:24.7909461Z RUST_BACKTRACE: short +2026-06-21T01:26:24.7910309Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:24.7911247Z targets: +2026-06-21T01:26:24.7911647Z components: +2026-06-21T01:26:24.7912054Z ##[endgroup] +2026-06-21T01:26:24.8016946Z ##[group]Run : set $CARGO_HOME +2026-06-21T01:26:24.8017501Z : set $CARGO_HOME +2026-06-21T01:26:24.8018132Z echo CARGO_HOME=${CARGO_HOME:-"$HOME/.cargo"} >> $GITHUB_ENV +2026-06-21T01:26:24.8050678Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:24.8051587Z env: +2026-06-21T01:26:24.8051992Z CARGO_TERM_COLOR: always +2026-06-21T01:26:24.8052468Z RUST_BACKTRACE: short +2026-06-21T01:26:24.8053467Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:24.8054459Z ##[endgroup] +2026-06-21T01:26:24.8159438Z ##[group]Run : install rustup if needed +2026-06-21T01:26:24.8160062Z : install rustup if needed +2026-06-21T01:26:24.8160656Z if ! command -v rustup &>/dev/null; then +2026-06-21T01:26:24.8161988Z  curl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused --location --silent --show-error --fail https://sh.rustup.rs | sh -s -- --default-toolchain none -y +2026-06-21T01:26:24.8163280Z  echo "$CARGO_HOME/bin" >> $GITHUB_PATH +2026-06-21T01:26:24.8164049Z fi +2026-06-21T01:26:24.8196720Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:24.8197396Z env: +2026-06-21T01:26:24.8197812Z CARGO_TERM_COLOR: always +2026-06-21T01:26:24.8198294Z RUST_BACKTRACE: short +2026-06-21T01:26:24.8199145Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:24.8200081Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:26:24.8200575Z ##[endgroup] +2026-06-21T01:26:24.8308740Z ##[group]Run rustup toolchain install stable --profile minimal --no-self-update +2026-06-21T01:26:24.8309791Z rustup toolchain install stable --profile minimal --no-self-update +2026-06-21T01:26:24.8343286Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:24.8344102Z env: +2026-06-21T01:26:24.8344500Z CARGO_TERM_COLOR: always +2026-06-21T01:26:24.8344972Z RUST_BACKTRACE: short +2026-06-21T01:26:24.8345795Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:24.8346715Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:26:24.8347250Z RUSTUP_PERMIT_COPY_RENAME: 1 +2026-06-21T01:26:24.8347724Z ##[endgroup] +2026-06-21T01:26:24.9873248Z info: syncing channel updates for stable-x86_64-unknown-linux-gnu +2026-06-21T01:26:25.0807863Z +2026-06-21T01:26:25.0901099Z stable-x86_64-unknown-linux-gnu unchanged - rustc 1.96.0 (ac68faa20 2026-05-25) +2026-06-21T01:26:25.0902551Z +2026-06-21T01:26:25.0993263Z ##[group]Run rustup default stable +2026-06-21T01:26:25.0994331Z rustup default stable +2026-06-21T01:26:25.1040352Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:25.1041235Z env: +2026-06-21T01:26:25.1041871Z CARGO_TERM_COLOR: always +2026-06-21T01:26:25.1042430Z RUST_BACKTRACE: short +2026-06-21T01:26:25.1043761Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:25.1045009Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:26:25.1045594Z ##[endgroup] +2026-06-21T01:26:25.1171058Z info: using existing install for stable-x86_64-unknown-linux-gnu +2026-06-21T01:26:25.1178085Z info: default toolchain set to stable-x86_64-unknown-linux-gnu +2026-06-21T01:26:25.1178796Z +2026-06-21T01:26:25.1267792Z stable-x86_64-unknown-linux-gnu unchanged - rustc 1.96.0 (ac68faa20 2026-05-25) +2026-06-21T01:26:25.1268721Z +2026-06-21T01:26:25.1272079Z info: note that the toolchain 'stable-x86_64-unknown-linux-gnu' is currently in use (overridden by '/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/rust-toolchain.toml') +2026-06-21T01:26:25.1409860Z ##[group]Run : create cachekey +2026-06-21T01:26:25.1410711Z : create cachekey +2026-06-21T01:26:25.1412476Z DATE=$(rustc +stable --version --verbose | sed -ne 's/^commit-date: \(20[0-9][0-9]\)-\([01][0-9]\)-\([0-3][0-9]\)$/\1\2\3/p') +2026-06-21T01:26:25.1415076Z HASH=$(rustc +stable --version --verbose | sed -ne 's/^commit-hash: //p') +2026-06-21T01:26:25.1416828Z echo "cachekey=$(echo $DATE$HASH | head -c12)" >> $GITHUB_OUTPUT +2026-06-21T01:26:25.1452235Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:25.1453629Z env: +2026-06-21T01:26:25.1454115Z CARGO_TERM_COLOR: always +2026-06-21T01:26:25.1454770Z RUST_BACKTRACE: short +2026-06-21T01:26:25.1456316Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:25.1458050Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:26:25.1458781Z ##[endgroup] +2026-06-21T01:26:25.1913767Z ##[group]Run : disable incremental compilation +2026-06-21T01:26:25.1914790Z : disable incremental compilation +2026-06-21T01:26:25.1915753Z if [ -z "${CARGO_INCREMENTAL+set}" ]; then +2026-06-21T01:26:25.1916713Z  echo CARGO_INCREMENTAL=0 >> $GITHUB_ENV +2026-06-21T01:26:25.1917583Z fi +2026-06-21T01:26:25.1952223Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:25.1953200Z env: +2026-06-21T01:26:25.1953834Z CARGO_TERM_COLOR: always +2026-06-21T01:26:25.1954459Z RUST_BACKTRACE: short +2026-06-21T01:26:25.1955911Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:25.1957574Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:26:25.1958264Z ##[endgroup] +2026-06-21T01:26:25.2063973Z ##[group]Run : enable colors in Cargo output +2026-06-21T01:26:25.2064912Z : enable colors in Cargo output +2026-06-21T01:26:25.2065800Z if [ -z "${CARGO_TERM_COLOR+set}" ]; then +2026-06-21T01:26:25.2066803Z  echo CARGO_TERM_COLOR=always >> $GITHUB_ENV +2026-06-21T01:26:25.2067684Z fi +2026-06-21T01:26:25.2101056Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:25.2102060Z env: +2026-06-21T01:26:25.2102530Z CARGO_TERM_COLOR: always +2026-06-21T01:26:25.2103168Z RUST_BACKTRACE: short +2026-06-21T01:26:25.2104854Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:25.2106509Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:26:25.2107242Z CARGO_INCREMENTAL: 0 +2026-06-21T01:26:25.2107810Z ##[endgroup] +2026-06-21T01:26:25.2215427Z ##[group]Run : enable Cargo sparse registry +2026-06-21T01:26:25.2216343Z : enable Cargo sparse registry +2026-06-21T01:26:25.2217432Z # implemented in 1.66, stabilized in 1.68, made default in 1.70 +2026-06-21T01:26:25.2219749Z if [ -z "${CARGO_REGISTRIES_CRATES_IO_PROTOCOL+set}" -o -f "/home/runner/work/_temp"/.implicit_cargo_registries_crates_io_protocol ]; then +2026-06-21T01:26:25.2222200Z  if rustc +stable --version --verbose | grep -q '^release: 1\.6[89]\.'; then +2026-06-21T01:26:25.2224494Z  touch "/home/runner/work/_temp"/.implicit_cargo_registries_crates_io_protocol || true +2026-06-21T01:26:25.2226306Z  echo CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse >> $GITHUB_ENV +2026-06-21T01:26:25.2227951Z  elif rustc +stable --version --verbose | grep -q '^release: 1\.6[67]\.'; then +2026-06-21T01:26:25.2229859Z  touch "/home/runner/work/_temp"/.implicit_cargo_registries_crates_io_protocol || true +2026-06-21T01:26:25.2231607Z  echo CARGO_REGISTRIES_CRATES_IO_PROTOCOL=git >> $GITHUB_ENV +2026-06-21T01:26:25.2232680Z  fi +2026-06-21T01:26:25.2233149Z fi +2026-06-21T01:26:25.2266688Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:25.2267659Z env: +2026-06-21T01:26:25.2268270Z CARGO_TERM_COLOR: always +2026-06-21T01:26:25.2268906Z RUST_BACKTRACE: short +2026-06-21T01:26:25.2270286Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:25.2271940Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:26:25.2272646Z CARGO_INCREMENTAL: 0 +2026-06-21T01:26:25.2273188Z ##[endgroup] +2026-06-21T01:26:25.2684459Z ##[group]Run : work around spurious network errors in curl 8.0 +2026-06-21T01:26:25.2685733Z : work around spurious network errors in curl 8.0 +2026-06-21T01:26:25.2687577Z # https://rust-lang.zulipchat.com/#narrow/stream/246057-t-cargo/topic/timeout.20investigation +2026-06-21T01:26:25.2689760Z if rustc +stable --version --verbose | grep -q '^release: 1\.7[01]\.'; then +2026-06-21T01:26:25.2691395Z  echo CARGO_HTTP_MULTIPLEXING=false >> $GITHUB_ENV +2026-06-21T01:26:25.2692455Z fi +2026-06-21T01:26:25.2727087Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:25.2728058Z env: +2026-06-21T01:26:25.2728526Z CARGO_TERM_COLOR: always +2026-06-21T01:26:25.2729134Z RUST_BACKTRACE: short +2026-06-21T01:26:25.2730543Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:25.2732138Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:26:25.2732823Z CARGO_INCREMENTAL: 0 +2026-06-21T01:26:25.2733530Z ##[endgroup] +2026-06-21T01:26:25.2991588Z ##[group]Run rustc +stable --version --verbose +2026-06-21T01:26:25.2992545Z rustc +stable --version --verbose +2026-06-21T01:26:25.3027449Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:25.3028413Z env: +2026-06-21T01:26:25.3028873Z CARGO_TERM_COLOR: always +2026-06-21T01:26:25.3029481Z RUST_BACKTRACE: short +2026-06-21T01:26:25.3030849Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:25.3032452Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:26:25.3033127Z CARGO_INCREMENTAL: 0 +2026-06-21T01:26:25.3033810Z ##[endgroup] +2026-06-21T01:26:25.3228194Z rustc 1.96.0 (ac68faa20 2026-05-25) +2026-06-21T01:26:25.3229609Z binary: rustc +2026-06-21T01:26:25.3230354Z commit-hash: ac68faa20c58cbccd01ee7208bf3b6e93a7d7f96 +2026-06-21T01:26:25.3231287Z commit-date: 2026-05-25 +2026-06-21T01:26:25.3231889Z host: x86_64-unknown-linux-gnu +2026-06-21T01:26:25.3232534Z release: 1.96.0 +2026-06-21T01:26:25.3233100Z LLVM version: 22.1.2 diff --git a/.ci_logs/Clippy lint/4_Cache cargo registry and target.txt b/.ci_logs/Clippy lint/4_Cache cargo registry and target.txt new file mode 100644 index 0000000..75176bd --- /dev/null +++ b/.ci_logs/Clippy lint/4_Cache cargo registry and target.txt @@ -0,0 +1,66 @@ +2026-06-21T01:26:25.3453542Z ##[group]Run Swatinem/rust-cache@v2 +2026-06-21T01:26:25.3454358Z with: +2026-06-21T01:26:25.3454826Z cache-on-failure: true +2026-06-21T01:26:25.3455437Z prefix-key: v0-rust +2026-06-21T01:26:25.3455984Z add-job-id-key: true +2026-06-21T01:26:25.3456591Z add-rust-environment-hash-key: true +2026-06-21T01:26:25.3457322Z cache-targets: true +2026-06-21T01:26:25.3457878Z cache-all-crates: false +2026-06-21T01:26:25.3458491Z cache-workspace-crates: false +2026-06-21T01:26:25.3459127Z save-if: true +2026-06-21T01:26:25.3459624Z cache-provider: github +2026-06-21T01:26:25.3460195Z cache-bin: true +2026-06-21T01:26:25.3460698Z lookup-only: false +2026-06-21T01:26:25.3461434Z cmd-format: {0} +2026-06-21T01:26:25.3461920Z env: +2026-06-21T01:26:25.3462360Z CARGO_TERM_COLOR: always +2026-06-21T01:26:25.3462954Z RUST_BACKTRACE: short +2026-06-21T01:26:25.3464476Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:25.3466029Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:26:25.3466756Z CARGO_INCREMENTAL: 0 +2026-06-21T01:26:25.3467292Z ##[endgroup] +2026-06-21T01:26:25.6441371Z (node:2370) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead. +2026-06-21T01:26:25.6444095Z (Use `node --trace-deprecation ...` to show where the warning was created) +2026-06-21T01:26:29.2762600Z ##[group]Cache Configuration +2026-06-21T01:26:29.2763261Z Cache Provider: +2026-06-21T01:26:29.2764005Z github +2026-06-21T01:26:29.2764333Z Workspaces: +2026-06-21T01:26:29.2764786Z /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts +2026-06-21T01:26:29.2765368Z Cache Paths: +2026-06-21T01:26:29.2765803Z /home/runner/.cargo/bin +2026-06-21T01:26:29.2766178Z /home/runner/.cargo/.crates.toml +2026-06-21T01:26:29.2766622Z /home/runner/.cargo/.crates2.json +2026-06-21T01:26:29.2767058Z /home/runner/.cargo/registry +2026-06-21T01:26:29.2767495Z /home/runner/.cargo/git +2026-06-21T01:26:29.2768062Z /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/target +2026-06-21T01:26:29.2768804Z Restore Key: +2026-06-21T01:26:29.2784281Z v0-rust-clippy-Linux-x64-1f47b3b1 +2026-06-21T01:26:29.2794554Z Cache Key: +2026-06-21T01:26:29.2795011Z v0-rust-clippy-Linux-x64-1f47b3b1-8243978e +2026-06-21T01:26:29.2795496Z .. Prefix: +2026-06-21T01:26:29.2795820Z - v0-rust-clippy-Linux-x64 +2026-06-21T01:26:29.2796239Z .. Environment considered: +2026-06-21T01:26:29.2796606Z - Rust Versions: +2026-06-21T01:26:29.2797138Z - 1.96.0 x86_64-unknown-linux-gnu ac68faa20c58cbccd01ee7208bf3b6e93a7d7f96 +2026-06-21T01:26:29.2797937Z - 1.96.0 x86_64-unknown-linux-gnu ac68faa20c58cbccd01ee7208bf3b6e93a7d7f96 +2026-06-21T01:26:29.2798580Z - CARGO_HOME +2026-06-21T01:26:29.2798895Z - CARGO_INCREMENTAL +2026-06-21T01:26:29.2799225Z - CARGO_TERM_COLOR +2026-06-21T01:26:29.2799549Z - RUST_BACKTRACE +2026-06-21T01:26:29.2799875Z .. Lockfiles considered: +2026-06-21T01:26:29.2800498Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/.cargo/config.toml +2026-06-21T01:26:29.2802068Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/Cargo.toml +2026-06-21T01:26:29.2803104Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/common/Cargo.toml +2026-06-21T01:26:29.2804654Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/contracts/core/Cargo.toml +2026-06-21T01:26:29.2805921Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/Cargo.toml +2026-06-21T01:26:29.2806884Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/rust-toolchain.toml +2026-06-21T01:26:29.2807833Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/token-bridge/Cargo.toml +2026-06-21T01:26:29.2809015Z ##[endgroup] +2026-06-21T01:26:29.2809268Z +2026-06-21T01:26:29.2809671Z ... Restoring cache ... +2026-06-21T01:26:29.3524616Z Cache hit for: v0-rust-clippy-Linux-x64-1f47b3b1-8243978e +2026-06-21T01:26:30.1773749Z Received 181650538 of 181650538 (100.0%), 224.1 MBs/sec +2026-06-21T01:26:30.1775447Z Cache Size: ~173 MB (181650538 B) +2026-06-21T01:26:30.1927824Z [command]/usr/bin/tar -xf /home/runner/work/_temp/87cefaba-3f5e-4187-8b26-51b2cc0010f6/cache.tzst -P -C /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts --use-compress-program unzstd +2026-06-21T01:26:31.1966763Z Cache restored successfully +2026-06-21T01:26:31.2059544Z Restored from cache key "v0-rust-clippy-Linux-x64-1f47b3b1-8243978e" full match: true. diff --git a/.ci_logs/Clippy lint/5_cargo clippy (contracts).txt b/.ci_logs/Clippy lint/5_cargo clippy (contracts).txt new file mode 100644 index 0000000..bc59610 --- /dev/null +++ b/.ci_logs/Clippy lint/5_cargo clippy (contracts).txt @@ -0,0 +1,92 @@ +2026-06-21T01:26:31.2255246Z ##[group]Run cargo clippy -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge -- -D warnings +2026-06-21T01:26:31.2256908Z cargo clippy -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge -- -D warnings +2026-06-21T01:26:31.2295223Z shell: /usr/bin/bash -e {0} +2026-06-21T01:26:31.2295516Z env: +2026-06-21T01:26:31.2295727Z CARGO_TERM_COLOR: always +2026-06-21T01:26:31.2295980Z RUST_BACKTRACE: short +2026-06-21T01:26:31.2296442Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:31.2296961Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:26:31.2297240Z CARGO_INCREMENTAL: 0 +2026-06-21T01:26:31.2297479Z CACHE_ON_FAILURE: true +2026-06-21T01:26:31.2297713Z ##[endgroup] +2026-06-21T01:26:31.7086707Z  Updating crates.io index +2026-06-21T01:26:31.9124146Z  Locking 212 packages to latest compatible versions +2026-06-21T01:26:31.9166162Z  Adding arbitrary v1.3.2 (available: v1.4.2) +2026-06-21T01:26:31.9272401Z  Adding crypto-common v0.1.6 (available: v0.1.7) +2026-06-21T01:26:31.9335241Z  Adding derive_arbitrary v1.3.2 (available: v1.4.2) +2026-06-21T01:26:31.9627003Z  Adding rand v0.8.6 (available: v0.10.1) +2026-06-21T01:26:31.9732344Z  Adding sha2 v0.10.9 (available: v0.11.0) +2026-06-21T01:26:32.0086537Z  Adding toml v0.8.23 (available: v1.1.2+spec-1.1.0) +2026-06-21T01:26:32.7202235Z  Compiling serde_core v1.0.228 +2026-06-21T01:26:32.7205171Z  Compiling serde_json v1.0.150 +2026-06-21T01:26:32.7238865Z  Checking zeroize v1.9.0 +2026-06-21T01:26:32.7302240Z  Compiling schemars v0.8.22 +2026-06-21T01:26:32.7364897Z  Compiling thiserror v1.0.69 +2026-06-21T01:26:33.0374954Z  Checking generic-array v0.14.9 +2026-06-21T01:26:33.0515789Z  Checking der v0.7.10 +2026-06-21T01:26:33.4545380Z  Checking hex v0.4.3 +2026-06-21T01:26:33.5555476Z  Checking block-buffer v0.10.4 +2026-06-21T01:26:33.6005194Z  Checking crypto-common v0.1.6 +2026-06-21T01:26:33.6285716Z  Checking sec1 v0.7.3 +2026-06-21T01:26:33.6324536Z  Checking crypto-bigint v0.5.5 +2026-06-21T01:26:33.6604923Z  Checking digest v0.10.7 +2026-06-21T01:26:33.8025468Z  Checking signature v2.2.0 +2026-06-21T01:26:33.8645441Z  Checking sha2 v0.10.9 +2026-06-21T01:26:34.2125291Z  Checking ark-serialize v0.5.0 +2026-06-21T01:26:34.4547417Z  Checking ark-ff v0.5.0 +2026-06-21T01:26:34.6231208Z  Checking elliptic-curve v0.13.8 +2026-06-21T01:26:34.8770924Z  Checking hmac v0.12.1 +2026-06-21T01:26:34.9484838Z  Compiling serde v1.0.228 +2026-06-21T01:26:35.7644782Z  Checking rfc6979 v0.4.0 +2026-06-21T01:26:35.7874959Z  Checking primeorder v0.13.6 +2026-06-21T01:26:35.8225246Z  Compiling crate-git-revision v0.0.6 +2026-06-21T01:26:35.9960746Z  Checking ecdsa v0.16.9 +2026-06-21T01:26:36.0735318Z  Compiling stellar-strkey v0.0.13 +2026-06-21T01:26:36.1853589Z  Compiling stellar-xdr v26.0.1 +2026-06-21T01:26:36.5653028Z  Compiling soroban-env-common v26.1.3 +2026-06-21T01:26:36.6885273Z  Compiling stellar-strkey v0.0.16 +2026-06-21T01:26:36.7980388Z  Checking ed25519 v2.2.3 +2026-06-21T01:26:36.8755270Z  Checking curve25519-dalek v4.1.3 +2026-06-21T01:26:37.3344695Z  Compiling serde_with v3.21.0 +2026-06-21T01:26:37.7644999Z  Compiling soroban-env-host v26.1.3 +2026-06-21T01:26:37.9806248Z  Checking sha3 v0.10.9 +2026-06-21T01:26:38.1614860Z  Checking ed25519-dalek v2.2.0 +2026-06-21T01:26:38.3104915Z  Checking k256 v0.13.4 +2026-06-21T01:26:38.6594903Z  Checking p256 v0.13.2 +2026-06-21T01:26:38.8734941Z  Compiling soroban-sdk v26.1.0 +2026-06-21T01:26:39.3654948Z  Checking ark-poly v0.5.0 +2026-06-21T01:26:40.0728970Z  Checking ark-ec v0.5.0 +2026-06-21T01:26:41.7449384Z  Checking ark-bls12-381 v0.5.0 +2026-06-21T01:26:41.7452460Z  Checking ark-bn254 v0.5.0 +2026-06-21T01:26:54.1840451Z  Compiling soroban-spec v26.1.0 +2026-06-21T01:26:54.3158876Z  Compiling soroban-spec-rust v26.1.0 +2026-06-21T01:26:54.7929089Z  Compiling soroban-env-macros v26.1.3 +2026-06-21T01:26:57.0821514Z  Compiling soroban-sdk-macros v26.1.0 +2026-06-21T01:27:00.9615759Z  Checking orbitchain-common v0.1.0 (/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/common) +2026-06-21T01:27:00.9617373Z  Checking orbitchain-core v0.1.0 (/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/contracts/core) +2026-06-21T01:27:02.1208563Z  Checking orbitchain-campaign v0.1.0 (/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign) +2026-06-21T01:27:02.1210115Z  Checking orbitchain-token-bridge v0.1.0 (/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/token-bridge) +2026-06-21T01:27:02.2864524Z error: unused import: `Address` +2026-06-21T01:27:02.2865299Z --> campaign/src/contract.rs:6:37 +2026-06-21T01:27:02.2865823Z | +2026-06-21T01:27:02.2875544Z 6 | use soroban_sdk::{panic_with_error, Address, Env}; +2026-06-21T01:27:02.2876366Z | ^^^^^^^ +2026-06-21T01:27:02.2876925Z | +2026-06-21T01:27:02.2877507Z = note: `-D unused-imports` implied by `-D warnings` +2026-06-21T01:27:02.2878419Z = help: to override `-D warnings` add `#[allow(unused_imports)]` +2026-06-21T01:27:02.2878904Z +2026-06-21T01:27:02.5954835Z error: manual saturating arithmetic +2026-06-21T01:27:02.5955618Z --> campaign/src/contract.rs:106:24 +2026-06-21T01:27:02.5956139Z | +2026-06-21T01:27:02.5956673Z 106 | let max_end_time = current_time +2026-06-21T01:27:02.5957314Z |  ________________________^ +2026-06-21T01:27:02.5958032Z 107 | | .checked_add(MAX_DEADLINE_GAP_SECONDS) +2026-06-21T01:27:02.5959120Z 108 | | .unwrap_or(u64::MAX); +2026-06-21T01:27:02.5960473Z | |____________________________^ help: consider using `saturating_add`: `current_time.saturating_add(MAX_DEADLINE_GAP_SECONDS)` +2026-06-21T01:27:02.5961477Z | +2026-06-21T01:27:02.5962656Z = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#manual_saturating_arithmetic +2026-06-21T01:27:02.5964515Z = note: `-D clippy::manual-saturating-arithmetic` implied by `-D warnings` +2026-06-21T01:27:02.5965673Z = help: to override `-D warnings` add `#[allow(clippy::manual_saturating_arithmetic)]` +2026-06-21T01:27:02.5966279Z +2026-06-21T01:27:02.9210959Z error: could not compile `orbitchain-campaign` (lib) due to 2 previous errors +2026-06-21T01:27:03.0925316Z ##[error]Process completed with exit code 101. diff --git a/.ci_logs/Clippy lint/9_Post Cache cargo registry and target.txt b/.ci_logs/Clippy lint/9_Post Cache cargo registry and target.txt new file mode 100644 index 0000000..de3aeda --- /dev/null +++ b/.ci_logs/Clippy lint/9_Post Cache cargo registry and target.txt @@ -0,0 +1,4 @@ +2026-06-21T01:27:03.1037164Z Post job cleanup. +2026-06-21T01:27:03.4069629Z Cache up-to-date. +2026-06-21T01:27:03.4072622Z (node:3051) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead. +2026-06-21T01:27:03.4074140Z (Use `node --trace-deprecation ...` to show where the warning was created) diff --git a/.ci_logs/Clippy lint/system.txt b/.ci_logs/Clippy lint/system.txt new file mode 100644 index 0000000..0016782 --- /dev/null +++ b/.ci_logs/Clippy lint/system.txt @@ -0,0 +1,8 @@ +2026-06-21T01:26:21.5330000Z Evaluating clippy.if +2026-06-21T01:26:21.5330000Z Evaluating: success() +2026-06-21T01:26:21.5330000Z Result: true +2026-06-21T01:26:21.5350000Z Job is waiting for a hosted runner to come online. +2026-06-21T01:26:21.5350000Z Job is about to start running on the hosted runner: GitHub Actions 1000000143 +2026-06-21T01:26:21.5340000Z Requested labels: ubuntu-latest +2026-06-21T01:26:21.5340000Z Job defined at: OrbitChainLabs/OrbitChain-Contracts/.github/workflows/ci.yml@refs/pull/60/merge +2026-06-21T01:26:21.5340000Z Waiting for a runner to pick up this job... \ No newline at end of file diff --git a/.ci_logs/Format check/10_Post Run actions_checkout@v4.txt b/.ci_logs/Format check/10_Post Run actions_checkout@v4.txt new file mode 100644 index 0000000..d98fe8f --- /dev/null +++ b/.ci_logs/Format check/10_Post Run actions_checkout@v4.txt @@ -0,0 +1,15 @@ +2026-06-21T01:26:33.7224274Z Node 20 is being deprecated. This workflow is running with Node 24 by default. If you need to temporarily use Node 20, you can set the ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true environment variable. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/ +2026-06-21T01:26:33.7225502Z Post job cleanup. +2026-06-21T01:26:33.8054799Z [command]/usr/bin/git version +2026-06-21T01:26:33.8092506Z git version 2.54.0 +2026-06-21T01:26:33.8126789Z Temporarily overriding HOME='/home/runner/work/_temp/3785f8a4-0a3e-458f-8923-b3023c3c74fb' before making global git config changes +2026-06-21T01:26:33.8127714Z Adding repository directory to the temporary git global config as a safe directory +2026-06-21T01:26:33.8132446Z [command]/usr/bin/git config --global --add safe.directory /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts +2026-06-21T01:26:33.8167621Z [command]/usr/bin/git config --local --name-only --get-regexp core\.sshCommand +2026-06-21T01:26:33.8200510Z [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || :" +2026-06-21T01:26:33.8472823Z [command]/usr/bin/git config --local --name-only --get-regexp http\.https\:\/\/github\.com\/\.extraheader +2026-06-21T01:26:33.8499540Z http.https://github.com/.extraheader +2026-06-21T01:26:33.8510314Z [command]/usr/bin/git config --local --unset-all http.https://github.com/.extraheader +2026-06-21T01:26:33.8542664Z [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http\.https\:\/\/github\.com\/\.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :" +2026-06-21T01:26:33.8777682Z [command]/usr/bin/git config --local --name-only --get-regexp ^includeIf\.gitdir: +2026-06-21T01:26:33.8809339Z [command]/usr/bin/git submodule foreach --recursive git config --local --show-origin --name-only --get-regexp remote.origin.url diff --git a/.ci_logs/Format check/11_Complete job.txt b/.ci_logs/Format check/11_Complete job.txt new file mode 100644 index 0000000..a3e29f4 --- /dev/null +++ b/.ci_logs/Format check/11_Complete job.txt @@ -0,0 +1,2 @@ +2026-06-21T01:26:33.9176880Z Cleaning up orphan processes +2026-06-21T01:26:33.9451296Z ##[warning]Node.js 20 is deprecated. The following actions target Node.js 20 but are being forced to run on Node.js 24: actions/checkout@v4. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/ diff --git a/.ci_logs/Format check/1_Set up job.txt b/.ci_logs/Format check/1_Set up job.txt new file mode 100644 index 0000000..584b6b9 --- /dev/null +++ b/.ci_logs/Format check/1_Set up job.txt @@ -0,0 +1,32 @@ +2026-06-21T01:26:23.9032639Z Current runner version: '2.335.1' +2026-06-21T01:26:23.9059016Z ##[group]Runner Image Provisioner +2026-06-21T01:26:23.9059907Z Hosted Compute Agent +2026-06-21T01:26:23.9060665Z Version: 20260611.554 +2026-06-21T01:26:23.9061312Z Commit: 5e0782fdc9014723d3be820dd114dd31555c2bd1 +2026-06-21T01:26:23.9062085Z Build Date: 2026-06-11T21:40:46Z +2026-06-21T01:26:23.9062824Z Worker ID: {827c5e07-8b9f-47e9-a57c-b18a25cd1efc} +2026-06-21T01:26:23.9063556Z Azure Region: westcentralus +2026-06-21T01:26:23.9064218Z ##[endgroup] +2026-06-21T01:26:23.9065701Z ##[group]Operating System +2026-06-21T01:26:23.9066320Z Ubuntu +2026-06-21T01:26:23.9067007Z 24.04.4 +2026-06-21T01:26:23.9067583Z LTS +2026-06-21T01:26:23.9068198Z ##[endgroup] +2026-06-21T01:26:23.9068906Z ##[group]Runner Image +2026-06-21T01:26:23.9069501Z Image: ubuntu-24.04 +2026-06-21T01:26:23.9070153Z Version: 20260615.205.1 +2026-06-21T01:26:23.9071217Z Included Software: https://github.com/actions/runner-images/blob/ubuntu24/20260615.205/images/ubuntu/Ubuntu2404-Readme.md +2026-06-21T01:26:23.9073009Z Image Release: https://github.com/actions/runner-images/releases/tag/ubuntu24%2F20260615.205 +2026-06-21T01:26:23.9073979Z ##[endgroup] +2026-06-21T01:26:23.9075141Z ##[group]GITHUB_TOKEN Permissions +2026-06-21T01:26:23.9077054Z Contents: read +2026-06-21T01:26:23.9077821Z Metadata: read +2026-06-21T01:26:23.9078410Z ##[endgroup] +2026-06-21T01:26:23.9080830Z Secret source: Actions +2026-06-21T01:26:23.9081626Z Prepare workflow directory +2026-06-21T01:26:23.9512700Z Prepare all required actions +2026-06-21T01:26:23.9550879Z Getting action download info +2026-06-21T01:26:24.2776364Z Download action repository 'actions/checkout@v4' (SHA:34e114876b0b11c390a56381ad16ebd13914f8d5) +2026-06-21T01:26:24.3551434Z Download action repository 'dtolnay/rust-toolchain@stable' (SHA:29eef336d9b2848a0b548edc03f92a220660cdb8) +2026-06-21T01:26:24.5713193Z Download action repository 'Swatinem/rust-cache@v2' (SHA:e18b497796c12c097a38f9edb9d0641fb99eee32) +2026-06-21T01:26:25.6520888Z Complete job name: Format check diff --git a/.ci_logs/Format check/2_Run actions_checkout@v4.txt b/.ci_logs/Format check/2_Run actions_checkout@v4.txt new file mode 100644 index 0000000..6bb2285 --- /dev/null +++ b/.ci_logs/Format check/2_Run actions_checkout@v4.txt @@ -0,0 +1,93 @@ +2026-06-21T01:26:25.7446431Z Node 20 is being deprecated. This workflow is running with Node 24 by default. If you need to temporarily use Node 20, you can set the ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true environment variable. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/ +2026-06-21T01:26:25.7455763Z ##[group]Run actions/checkout@v4 +2026-06-21T01:26:25.7456562Z with: +2026-06-21T01:26:25.7457106Z repository: OrbitChainLabs/OrbitChain-Contracts +2026-06-21T01:26:25.7462249Z token: *** +2026-06-21T01:26:25.7462728Z ssh-strict: true +2026-06-21T01:26:25.7463212Z ssh-user: git +2026-06-21T01:26:25.7463701Z persist-credentials: true +2026-06-21T01:26:25.7464240Z clean: true +2026-06-21T01:26:25.7464747Z sparse-checkout-cone-mode: true +2026-06-21T01:26:25.7465317Z fetch-depth: 1 +2026-06-21T01:26:25.7465784Z fetch-tags: false +2026-06-21T01:26:25.7466273Z show-progress: true +2026-06-21T01:26:25.7466772Z lfs: false +2026-06-21T01:26:25.7467283Z submodules: false +2026-06-21T01:26:25.7467827Z set-safe-directory: true +2026-06-21T01:26:25.7468724Z env: +2026-06-21T01:26:25.7469188Z CARGO_TERM_COLOR: always +2026-06-21T01:26:25.7469728Z RUST_BACKTRACE: short +2026-06-21T01:26:25.7470655Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:25.7471643Z ##[endgroup] +2026-06-21T01:26:25.8528282Z Syncing repository: OrbitChainLabs/OrbitChain-Contracts +2026-06-21T01:26:25.8530618Z ##[group]Getting Git version info +2026-06-21T01:26:25.8531559Z Working directory is '/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts' +2026-06-21T01:26:25.8532872Z [command]/usr/bin/git version +2026-06-21T01:26:25.8585515Z git version 2.54.0 +2026-06-21T01:26:25.8605254Z ##[endgroup] +2026-06-21T01:26:25.8619911Z Temporarily overriding HOME='/home/runner/work/_temp/9300d159-5054-4046-a522-97c6b931ac11' before making global git config changes +2026-06-21T01:26:25.8621538Z Adding repository directory to the temporary git global config as a safe directory +2026-06-21T01:26:25.8625947Z [command]/usr/bin/git config --global --add safe.directory /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts +2026-06-21T01:26:25.8678370Z Deleting the contents of '/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts' +2026-06-21T01:26:25.8682760Z ##[group]Initializing the repository +2026-06-21T01:26:25.8688104Z [command]/usr/bin/git init /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts +2026-06-21T01:26:25.8791052Z hint: Using 'master' as the name for the initial branch. This default branch name +2026-06-21T01:26:25.8793046Z hint: will change to "main" in Git 3.0. To configure the initial branch name +2026-06-21T01:26:25.8794914Z hint: to use in all of your new repositories, which will suppress this warning, +2026-06-21T01:26:25.8796421Z hint: call: +2026-06-21T01:26:25.8797300Z hint: +2026-06-21T01:26:25.8798325Z hint: git config --global init.defaultBranch +2026-06-21T01:26:25.8799723Z hint: +2026-06-21T01:26:25.8800408Z hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and +2026-06-21T01:26:25.8801484Z hint: 'development'. The just-created branch can be renamed via this command: +2026-06-21T01:26:25.8802324Z hint: +2026-06-21T01:26:25.8802789Z hint: git branch -m +2026-06-21T01:26:25.8803310Z hint: +2026-06-21T01:26:25.8803990Z hint: Disable this message with "git config set advice.defaultBranchName false" +2026-06-21T01:26:25.8805302Z Initialized empty Git repository in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/.git/ +2026-06-21T01:26:25.8810031Z [command]/usr/bin/git remote add origin https://github.com/OrbitChainLabs/OrbitChain-Contracts +2026-06-21T01:26:25.8856913Z ##[endgroup] +2026-06-21T01:26:25.8857834Z ##[group]Disabling automatic garbage collection +2026-06-21T01:26:25.8860942Z [command]/usr/bin/git config --local gc.auto 0 +2026-06-21T01:26:25.8891218Z ##[endgroup] +2026-06-21T01:26:25.8892044Z ##[group]Setting up auth +2026-06-21T01:26:25.8897639Z [command]/usr/bin/git config --local --name-only --get-regexp core\.sshCommand +2026-06-21T01:26:25.8932836Z [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || :" +2026-06-21T01:26:25.9301715Z [command]/usr/bin/git config --local --name-only --get-regexp http\.https\:\/\/github\.com\/\.extraheader +2026-06-21T01:26:25.9340007Z [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http\.https\:\/\/github\.com\/\.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :" +2026-06-21T01:26:25.9600511Z [command]/usr/bin/git config --local --name-only --get-regexp ^includeIf\.gitdir: +2026-06-21T01:26:25.9634940Z [command]/usr/bin/git submodule foreach --recursive git config --local --show-origin --name-only --get-regexp remote.origin.url +2026-06-21T01:26:25.9893954Z [command]/usr/bin/git config --local http.https://github.com/.extraheader AUTHORIZATION: basic *** +2026-06-21T01:26:25.9927656Z ##[endgroup] +2026-06-21T01:26:25.9929333Z ##[group]Fetching the repository +2026-06-21T01:26:25.9937010Z [command]/usr/bin/git -c protocol.version=2 fetch --no-tags --prune --no-recurse-submodules --depth=1 origin +1be331ea57707748b39835c9fac837ddeb283d53:refs/remotes/pull/60/merge +2026-06-21T01:26:26.4722283Z From https://github.com/OrbitChainLabs/OrbitChain-Contracts +2026-06-21T01:26:26.4724236Z * [new ref] 1be331ea57707748b39835c9fac837ddeb283d53 -> pull/60/merge +2026-06-21T01:26:26.4759903Z ##[endgroup] +2026-06-21T01:26:26.4760820Z ##[group]Determining the checkout info +2026-06-21T01:26:26.4762135Z ##[endgroup] +2026-06-21T01:26:26.4767591Z [command]/usr/bin/git sparse-checkout disable +2026-06-21T01:26:26.4813897Z [command]/usr/bin/git config --local --unset-all extensions.worktreeConfig +2026-06-21T01:26:26.4843049Z ##[group]Checking out the ref +2026-06-21T01:26:26.4847951Z [command]/usr/bin/git checkout --progress --force refs/remotes/pull/60/merge +2026-06-21T01:26:26.5047739Z Note: switching to 'refs/remotes/pull/60/merge'. +2026-06-21T01:26:26.5048812Z +2026-06-21T01:26:26.5049841Z You are in 'detached HEAD' state. You can look around, make experimental +2026-06-21T01:26:26.5051424Z changes and commit them, and you can discard any commits you make in this +2026-06-21T01:26:26.5052892Z state without impacting any branches by switching back to a branch. +2026-06-21T01:26:26.5053728Z +2026-06-21T01:26:26.5054173Z If you want to create a new branch to retain commits you create, you may +2026-06-21T01:26:26.5055083Z do so (now or later) by using -c with the switch command. Example: +2026-06-21T01:26:26.5055598Z +2026-06-21T01:26:26.5055934Z git switch -c +2026-06-21T01:26:26.5056296Z +2026-06-21T01:26:26.5056520Z Or undo this operation with: +2026-06-21T01:26:26.5056857Z +2026-06-21T01:26:26.5057054Z git switch - +2026-06-21T01:26:26.5057316Z +2026-06-21T01:26:26.5057733Z Turn off this advice by setting config variable advice.detachedHead to false +2026-06-21T01:26:26.5058460Z +2026-06-21T01:26:26.5060066Z HEAD is now at 1be331e Merge 4b973bcdef5a40b4714ec76b0c3c3d5e9b026c2d into dc3d5e2b821bb2a0f2655582265c562926415b02 +2026-06-21T01:26:26.5064481Z ##[endgroup] +2026-06-21T01:26:26.5205721Z [command]/usr/bin/git log -1 --format=%H +2026-06-21T01:26:26.5207552Z 1be331ea57707748b39835c9fac837ddeb283d53 diff --git a/.ci_logs/Format check/3_Install Rust toolchain.txt b/.ci_logs/Format check/3_Install Rust toolchain.txt new file mode 100644 index 0000000..8d981a2 --- /dev/null +++ b/.ci_logs/Format check/3_Install Rust toolchain.txt @@ -0,0 +1,188 @@ +2026-06-21T01:26:26.5683976Z ##[warning]Unexpected input(s) 'cache', valid inputs are ['toolchain', 'targets', 'target', 'components'] +2026-06-21T01:26:26.5706199Z ##[group]Run dtolnay/rust-toolchain@stable +2026-06-21T01:26:26.5707063Z with: +2026-06-21T01:26:26.5707558Z cache: false +2026-06-21T01:26:26.5708103Z toolchain: stable +2026-06-21T01:26:26.5708801Z env: +2026-06-21T01:26:26.5709302Z CARGO_TERM_COLOR: always +2026-06-21T01:26:26.5709955Z RUST_BACKTRACE: short +2026-06-21T01:26:26.5711320Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:26.5712850Z ##[endgroup] +2026-06-21T01:26:26.5849453Z ##[group]Run : parse toolchain version +2026-06-21T01:26:26.5850392Z : parse toolchain version +2026-06-21T01:26:26.5851172Z if [[ -z $toolchain ]]; then +2026-06-21T01:26:26.5852695Z  # GitHub does not enforce `required: true` inputs itself. https://github.com/actions/runner/issues/1070 +2026-06-21T01:26:26.5854346Z  echo "'toolchain' is a required input" >&2 +2026-06-21T01:26:26.5855263Z  exit 1 +2026-06-21T01:26:26.5856203Z elif [[ $toolchain =~ ^stable' '[0-9]+' '(year|month|week|day)s?' 'ago$ ]]; then +2026-06-21T01:26:26.5857415Z  if [[ Linux == macOS ]]; then +2026-06-21T01:26:26.5859312Z  echo "toolchain=1.$((($(date -v-$(sed 's/stable \([0-9]*\) \(.\).*/\1\2/' <<< $toolchain) +%s)/60/60/24-16569)/7/6))" >> $GITHUB_OUTPUT +2026-06-21T01:26:26.5860868Z  else +2026-06-21T01:26:26.5862023Z  echo "toolchain=1.$((($(date --date "${toolchain#stable }" +%s)/60/60/24-16569)/7/6))" >> $GITHUB_OUTPUT +2026-06-21T01:26:26.5863401Z  fi +2026-06-21T01:26:26.5864241Z elif [[ $toolchain =~ ^stable' 'minus' '[0-9]+' 'releases?$ ]]; then +2026-06-21T01:26:26.5865824Z  echo "toolchain=1.$((($(date +%s)/60/60/24-16569)/7/6-${toolchain//[^0-9]/}))" >> $GITHUB_OUTPUT +2026-06-21T01:26:26.5867183Z elif [[ $toolchain =~ ^1\.[0-9]+$ ]]; then +2026-06-21T01:26:26.5868898Z  echo "toolchain=1.$((i=${toolchain#1.}, c=($(date +%s)/60/60/24-16569)/7/6, i+9*i*(10*i<=c)+90*i*(100*i<=c)))" >> $GITHUB_OUTPUT +2026-06-21T01:26:26.5870399Z else +2026-06-21T01:26:26.5871055Z  echo "toolchain=$toolchain" >> $GITHUB_OUTPUT +2026-06-21T01:26:26.5871907Z fi +2026-06-21T01:26:26.6045467Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:26.6046439Z env: +2026-06-21T01:26:26.6046933Z CARGO_TERM_COLOR: always +2026-06-21T01:26:26.6047571Z RUST_BACKTRACE: short +2026-06-21T01:26:26.6049317Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:26.6050793Z toolchain: stable +2026-06-21T01:26:26.6051336Z ##[endgroup] +2026-06-21T01:26:26.6228216Z ##[group]Run : construct rustup command line +2026-06-21T01:26:26.6229354Z : construct rustup command line +2026-06-21T01:26:26.6230633Z echo "targets=$(for t in ${targets//,/ }; do echo -n ' --target' $t; done)" >> $GITHUB_OUTPUT +2026-06-21T01:26:26.6232880Z echo "components=$(for c in ${components//,/ }; do echo -n ' --component' $c; done)" >> $GITHUB_OUTPUT +2026-06-21T01:26:26.6234578Z echo "downgrade=" >> $GITHUB_OUTPUT +2026-06-21T01:26:26.6268876Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:26.6269892Z env: +2026-06-21T01:26:26.6270380Z CARGO_TERM_COLOR: always +2026-06-21T01:26:26.6271003Z RUST_BACKTRACE: short +2026-06-21T01:26:26.6272277Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:26.6273720Z targets: +2026-06-21T01:26:26.6274194Z components: +2026-06-21T01:26:26.6274687Z ##[endgroup] +2026-06-21T01:26:26.6385155Z ##[group]Run : set $CARGO_HOME +2026-06-21T01:26:26.6385836Z : set $CARGO_HOME +2026-06-21T01:26:26.6386715Z echo CARGO_HOME=${CARGO_HOME:-"$HOME/.cargo"} >> $GITHUB_ENV +2026-06-21T01:26:26.6418492Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:26.6419819Z env: +2026-06-21T01:26:26.6420296Z CARGO_TERM_COLOR: always +2026-06-21T01:26:26.6420922Z RUST_BACKTRACE: short +2026-06-21T01:26:26.6422191Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:26.6423645Z ##[endgroup] +2026-06-21T01:26:26.6534010Z ##[group]Run : install rustup if needed +2026-06-21T01:26:26.6534828Z : install rustup if needed +2026-06-21T01:26:26.6535633Z if ! command -v rustup &>/dev/null; then +2026-06-21T01:26:26.6537826Z  curl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused --location --silent --show-error --fail https://sh.rustup.rs | sh -s -- --default-toolchain none -y +2026-06-21T01:26:26.6540197Z  echo "$CARGO_HOME/bin" >> $GITHUB_PATH +2026-06-21T01:26:26.6540983Z fi +2026-06-21T01:26:26.6572054Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:26.6572990Z env: +2026-06-21T01:26:26.6573469Z CARGO_TERM_COLOR: always +2026-06-21T01:26:26.6574103Z RUST_BACKTRACE: short +2026-06-21T01:26:26.6575371Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:26.6576837Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:26:26.6577496Z ##[endgroup] +2026-06-21T01:26:26.6687860Z ##[group]Run rustup toolchain install stable --profile minimal --no-self-update +2026-06-21T01:26:26.6689619Z rustup toolchain install stable --profile minimal --no-self-update +2026-06-21T01:26:26.6720771Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:26.6721684Z env: +2026-06-21T01:26:26.6722156Z CARGO_TERM_COLOR: always +2026-06-21T01:26:26.6722765Z RUST_BACKTRACE: short +2026-06-21T01:26:26.6724016Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:26.6725465Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:26:26.6726170Z RUSTUP_PERMIT_COPY_RENAME: 1 +2026-06-21T01:26:26.6726798Z ##[endgroup] +2026-06-21T01:26:26.8526306Z info: syncing channel updates for stable-x86_64-unknown-linux-gnu +2026-06-21T01:26:27.0165017Z +2026-06-21T01:26:27.0258414Z stable-x86_64-unknown-linux-gnu unchanged - rustc 1.96.0 (ac68faa20 2026-05-25) +2026-06-21T01:26:27.0259886Z +2026-06-21T01:26:27.0341284Z ##[group]Run rustup default stable +2026-06-21T01:26:27.0342457Z rustup default stable +2026-06-21T01:26:27.0380217Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:27.0381575Z env: +2026-06-21T01:26:27.0382695Z CARGO_TERM_COLOR: always +2026-06-21T01:26:27.0383717Z RUST_BACKTRACE: short +2026-06-21T01:26:27.0385454Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:27.0387438Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:26:27.0388528Z ##[endgroup] +2026-06-21T01:26:27.0515222Z info: using existing install for stable-x86_64-unknown-linux-gnu +2026-06-21T01:26:27.0520772Z info: default toolchain set to stable-x86_64-unknown-linux-gnu +2026-06-21T01:26:27.0521845Z +2026-06-21T01:26:27.0612025Z stable-x86_64-unknown-linux-gnu unchanged - rustc 1.96.0 (ac68faa20 2026-05-25) +2026-06-21T01:26:27.0613732Z +2026-06-21T01:26:27.0616081Z info: note that the toolchain 'stable-x86_64-unknown-linux-gnu' is currently in use (overridden by '/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/rust-toolchain.toml') +2026-06-21T01:26:27.0770344Z ##[group]Run : create cachekey +2026-06-21T01:26:27.0771509Z : create cachekey +2026-06-21T01:26:27.0773452Z DATE=$(rustc +stable --version --verbose | sed -ne 's/^commit-date: \(20[0-9][0-9]\)-\([01][0-9]\)-\([0-3][0-9]\)$/\1\2\3/p') +2026-06-21T01:26:27.0775945Z HASH=$(rustc +stable --version --verbose | sed -ne 's/^commit-hash: //p') +2026-06-21T01:26:27.0777820Z echo "cachekey=$(echo $DATE$HASH | head -c12)" >> $GITHUB_OUTPUT +2026-06-21T01:26:27.0815833Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:27.0817287Z env: +2026-06-21T01:26:27.0818030Z CARGO_TERM_COLOR: always +2026-06-21T01:26:27.0819121Z RUST_BACKTRACE: short +2026-06-21T01:26:27.0820812Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:27.0822718Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:26:27.0823675Z ##[endgroup] +2026-06-21T01:26:27.1280681Z ##[group]Run : disable incremental compilation +2026-06-21T01:26:27.1281950Z : disable incremental compilation +2026-06-21T01:26:27.1283176Z if [ -z "${CARGO_INCREMENTAL+set}" ]; then +2026-06-21T01:26:27.1284415Z  echo CARGO_INCREMENTAL=0 >> $GITHUB_ENV +2026-06-21T01:26:27.1285513Z fi +2026-06-21T01:26:27.1322522Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:27.1323765Z env: +2026-06-21T01:26:27.1324494Z CARGO_TERM_COLOR: always +2026-06-21T01:26:27.1325391Z RUST_BACKTRACE: short +2026-06-21T01:26:27.1327061Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:27.1329151Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:26:27.1330099Z ##[endgroup] +2026-06-21T01:26:27.1447592Z ##[group]Run : enable colors in Cargo output +2026-06-21T01:26:27.1448971Z : enable colors in Cargo output +2026-06-21T01:26:27.1450181Z if [ -z "${CARGO_TERM_COLOR+set}" ]; then +2026-06-21T01:26:27.1451479Z  echo CARGO_TERM_COLOR=always >> $GITHUB_ENV +2026-06-21T01:26:27.1452644Z fi +2026-06-21T01:26:27.1488012Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:27.1489462Z env: +2026-06-21T01:26:27.1490210Z CARGO_TERM_COLOR: always +2026-06-21T01:26:27.1491126Z RUST_BACKTRACE: short +2026-06-21T01:26:27.1492773Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:27.1494658Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:26:27.1495653Z CARGO_INCREMENTAL: 0 +2026-06-21T01:26:27.1496489Z ##[endgroup] +2026-06-21T01:26:27.1616105Z ##[group]Run : enable Cargo sparse registry +2026-06-21T01:26:27.1617298Z : enable Cargo sparse registry +2026-06-21T01:26:27.1618824Z # implemented in 1.66, stabilized in 1.68, made default in 1.70 +2026-06-21T01:26:27.1621376Z if [ -z "${CARGO_REGISTRIES_CRATES_IO_PROTOCOL+set}" -o -f "/home/runner/work/_temp"/.implicit_cargo_registries_crates_io_protocol ]; then +2026-06-21T01:26:27.1624021Z  if rustc +stable --version --verbose | grep -q '^release: 1\.6[89]\.'; then +2026-06-21T01:26:27.1626264Z  touch "/home/runner/work/_temp"/.implicit_cargo_registries_crates_io_protocol || true +2026-06-21T01:26:27.1628256Z  echo CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse >> $GITHUB_ENV +2026-06-21T01:26:27.1630289Z  elif rustc +stable --version --verbose | grep -q '^release: 1\.6[67]\.'; then +2026-06-21T01:26:27.1632410Z  touch "/home/runner/work/_temp"/.implicit_cargo_registries_crates_io_protocol || true +2026-06-21T01:26:27.1634369Z  echo CARGO_REGISTRIES_CRATES_IO_PROTOCOL=git >> $GITHUB_ENV +2026-06-21T01:26:27.1635693Z  fi +2026-06-21T01:26:27.1636445Z fi +2026-06-21T01:26:27.1673407Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:27.1674654Z env: +2026-06-21T01:26:27.1675412Z CARGO_TERM_COLOR: always +2026-06-21T01:26:27.1676315Z RUST_BACKTRACE: short +2026-06-21T01:26:27.1677920Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:27.1680007Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:26:27.1681001Z CARGO_INCREMENTAL: 0 +2026-06-21T01:26:27.1681838Z ##[endgroup] +2026-06-21T01:26:27.2116923Z ##[group]Run : work around spurious network errors in curl 8.0 +2026-06-21T01:26:27.2118416Z : work around spurious network errors in curl 8.0 +2026-06-21T01:26:27.2120608Z # https://rust-lang.zulipchat.com/#narrow/stream/246057-t-cargo/topic/timeout.20investigation +2026-06-21T01:26:27.2123021Z if rustc +stable --version --verbose | grep -q '^release: 1\.7[01]\.'; then +2026-06-21T01:26:27.2124689Z  echo CARGO_HTTP_MULTIPLEXING=false >> $GITHUB_ENV +2026-06-21T01:26:27.2125872Z fi +2026-06-21T01:26:27.2165954Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:27.2167173Z env: +2026-06-21T01:26:27.2167917Z CARGO_TERM_COLOR: always +2026-06-21T01:26:27.2169034Z RUST_BACKTRACE: short +2026-06-21T01:26:27.2170659Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:27.2172462Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:26:27.2173426Z CARGO_INCREMENTAL: 0 +2026-06-21T01:26:27.2174252Z ##[endgroup] +2026-06-21T01:26:27.2441219Z ##[group]Run rustc +stable --version --verbose +2026-06-21T01:26:27.2442421Z rustc +stable --version --verbose +2026-06-21T01:26:27.2480327Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:27.2481530Z env: +2026-06-21T01:26:27.2482259Z CARGO_TERM_COLOR: always +2026-06-21T01:26:27.2483163Z RUST_BACKTRACE: short +2026-06-21T01:26:27.2484744Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:27.2486531Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:26:27.2487463Z CARGO_INCREMENTAL: 0 +2026-06-21T01:26:27.2488266Z ##[endgroup] +2026-06-21T01:26:27.2680100Z rustc 1.96.0 (ac68faa20 2026-05-25) +2026-06-21T01:26:27.2681544Z binary: rustc +2026-06-21T01:26:27.2682970Z commit-hash: ac68faa20c58cbccd01ee7208bf3b6e93a7d7f96 +2026-06-21T01:26:27.2684872Z commit-date: 2026-05-25 +2026-06-21T01:26:27.2686265Z host: x86_64-unknown-linux-gnu +2026-06-21T01:26:27.2687749Z release: 1.96.0 +2026-06-21T01:26:27.2689296Z LLVM version: 22.1.2 diff --git a/.ci_logs/Format check/4_Cache cargo registry and target.txt b/.ci_logs/Format check/4_Cache cargo registry and target.txt new file mode 100644 index 0000000..3e7682e --- /dev/null +++ b/.ci_logs/Format check/4_Cache cargo registry and target.txt @@ -0,0 +1,67 @@ +2026-06-21T01:26:27.2916570Z ##[group]Run Swatinem/rust-cache@v2 +2026-06-21T01:26:27.2917556Z with: +2026-06-21T01:26:27.2918280Z cache-on-failure: true +2026-06-21T01:26:27.2919313Z prefix-key: v0-rust +2026-06-21T01:26:27.2920144Z add-job-id-key: true +2026-06-21T01:26:27.2921017Z add-rust-environment-hash-key: true +2026-06-21T01:26:27.2921995Z cache-targets: true +2026-06-21T01:26:27.2922811Z cache-all-crates: false +2026-06-21T01:26:27.2923684Z cache-workspace-crates: false +2026-06-21T01:26:27.2924572Z save-if: true +2026-06-21T01:26:27.2925332Z cache-provider: github +2026-06-21T01:26:27.2926160Z cache-bin: true +2026-06-21T01:26:27.2926913Z lookup-only: false +2026-06-21T01:26:27.2927923Z cmd-format: {0} +2026-06-21T01:26:27.2928865Z env: +2026-06-21T01:26:27.2929574Z CARGO_TERM_COLOR: always +2026-06-21T01:26:27.2930434Z RUST_BACKTRACE: short +2026-06-21T01:26:27.2931987Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:27.2933730Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:26:27.2934696Z CARGO_INCREMENTAL: 0 +2026-06-21T01:26:27.2935494Z ##[endgroup] +2026-06-21T01:26:27.5683289Z (node:2385) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead. +2026-06-21T01:26:27.5686961Z (Use `node --trace-deprecation ...` to show where the warning was created) +2026-06-21T01:26:31.2861586Z ##[group]Cache Configuration +2026-06-21T01:26:31.2862365Z Cache Provider: +2026-06-21T01:26:31.2862796Z github +2026-06-21T01:26:31.2863195Z Workspaces: +2026-06-21T01:26:31.2863741Z /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts +2026-06-21T01:26:31.2864373Z Cache Paths: +2026-06-21T01:26:31.2864842Z /home/runner/.cargo/bin +2026-06-21T01:26:31.2865359Z /home/runner/.cargo/.crates.toml +2026-06-21T01:26:31.2865878Z /home/runner/.cargo/.crates2.json +2026-06-21T01:26:31.2866405Z /home/runner/.cargo/registry +2026-06-21T01:26:31.2866889Z /home/runner/.cargo/git +2026-06-21T01:26:31.2867584Z /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/target +2026-06-21T01:26:31.2868269Z Restore Key: +2026-06-21T01:26:31.2868915Z v0-rust-fmt-Linux-x64-1f47b3b1 +2026-06-21T01:26:31.2869464Z Cache Key: +2026-06-21T01:26:31.2869974Z v0-rust-fmt-Linux-x64-1f47b3b1-8243978e +2026-06-21T01:26:31.2870554Z .. Prefix: +2026-06-21T01:26:31.2870981Z - v0-rust-fmt-Linux-x64 +2026-06-21T01:26:31.2871478Z .. Environment considered: +2026-06-21T01:26:31.2871940Z - Rust Versions: +2026-06-21T01:26:31.2872576Z - 1.96.0 x86_64-unknown-linux-gnu ac68faa20c58cbccd01ee7208bf3b6e93a7d7f96 +2026-06-21T01:26:31.2873491Z - 1.96.0 x86_64-unknown-linux-gnu ac68faa20c58cbccd01ee7208bf3b6e93a7d7f96 +2026-06-21T01:26:31.2874199Z - CARGO_HOME +2026-06-21T01:26:31.2874613Z - CARGO_INCREMENTAL +2026-06-21T01:26:31.2875082Z - CARGO_TERM_COLOR +2026-06-21T01:26:31.2875515Z - RUST_BACKTRACE +2026-06-21T01:26:31.2875961Z .. Lockfiles considered: +2026-06-21T01:26:31.2876674Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/.cargo/config.toml +2026-06-21T01:26:31.2877696Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/Cargo.toml +2026-06-21T01:26:31.2879057Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/common/Cargo.toml +2026-06-21T01:26:31.2880288Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/contracts/core/Cargo.toml +2026-06-21T01:26:31.2881494Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/Cargo.toml +2026-06-21T01:26:31.2882619Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/rust-toolchain.toml +2026-06-21T01:26:31.2883749Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/token-bridge/Cargo.toml +2026-06-21T01:26:31.2885005Z ##[endgroup] +2026-06-21T01:26:31.2885257Z +2026-06-21T01:26:31.2885456Z ... Restoring cache ... +2026-06-21T01:26:31.4804612Z Cache hit for: v0-rust-fmt-Linux-x64-1f47b3b1-8243978e +2026-06-21T01:26:32.7279973Z Received 12154443 of 16348747 (74.3%), 11.6 MBs/sec +2026-06-21T01:26:32.8941413Z Received 16348747 of 16348747 (100.0%), 13.4 MBs/sec +2026-06-21T01:26:32.8942142Z Cache Size: ~16 MB (16348747 B) +2026-06-21T01:26:32.8969979Z [command]/usr/bin/tar -xf /home/runner/work/_temp/4712cffc-1c54-4deb-88cf-eb169764797b/cache.tzst -P -C /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts --use-compress-program unzstd +2026-06-21T01:26:32.9722177Z Cache restored successfully +2026-06-21T01:26:32.9735567Z Restored from cache key "v0-rust-fmt-Linux-x64-1f47b3b1-8243978e" full match: true. diff --git a/.ci_logs/Format check/5_cargo fmt --check (contracts).txt b/.ci_logs/Format check/5_cargo fmt --check (contracts).txt new file mode 100644 index 0000000..a13387b --- /dev/null +++ b/.ci_logs/Format check/5_cargo fmt --check (contracts).txt @@ -0,0 +1,3949 @@ +2026-06-21T01:26:32.9875842Z ##[group]Run cargo fmt --all -- --check && cargo fmt -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge -- --check +2026-06-21T01:26:32.9877042Z cargo fmt --all -- --check && cargo fmt -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge -- --check +2026-06-21T01:26:32.9911581Z shell: /usr/bin/bash -e {0} +2026-06-21T01:26:32.9911865Z env: +2026-06-21T01:26:32.9912082Z CARGO_TERM_COLOR: always +2026-06-21T01:26:32.9912339Z RUST_BACKTRACE: short +2026-06-21T01:26:32.9912812Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:32.9913333Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:26:32.9913600Z CARGO_INCREMENTAL: 0 +2026-06-21T01:26:32.9913833Z CACHE_ON_FAILURE: true +2026-06-21T01:26:32.9914064Z ##[endgroup] +2026-06-21T01:26:33.2159599Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/contract.rs:3: +2026-06-21T01:26:33.2160865Z //! These are wired into the contract impl in `lib.rs` as methods on +2026-06-21T01:26:33.2161548Z //! `CampaignContract`. +2026-06-21T01:26:33.2162010Z +2026-06-21T01:26:33.2167121Z -use soroban_sdk::{panic_with_error, Address, Env}; +2026-06-21T01:26:33.2167738Z use crate::event; +2026-06-21T01:26:33.2168222Z use crate::storage::{get_campaign, is_frozen, set_campaign}; +2026-06-21T01:26:33.2169090Z use crate::types::{CampaignStatus, Error}; +2026-06-21T01:26:33.2169914Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/contract.rs:10: +2026-06-21T01:26:33.2170876Z use crate::{validate_campaign_transition, MAX_DEADLINE_GAP_SECONDS}; +2026-06-21T01:26:33.2171540Z +use soroban_sdk::{panic_with_error, Address, Env}; +2026-06-21T01:26:33.2171907Z +2026-06-21T01:26:33.2172444Z /// Issue #212 – End the campaign early (before deadline). +2026-06-21T01:26:33.2172773Z /// +2026-06-21T01:26:33.2173173Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/contract.rs:20: +2026-06-21T01:26:33.2173838Z /// - `Error::ContractFrozen` if contract is frozen (freeze invariant: all writes rejected) +2026-06-21T01:26:33.2174419Z /// - `Error::InvalidCampaignTransition` if campaign is already Ended or Cancelled +2026-06-21T01:26:33.2174842Z pub fn end_campaign(env: &Env) { +2026-06-21T01:26:33.2175123Z - let mut campaign = get_campaign(env) +2026-06-21T01:26:33.2175508Z - .unwrap_or_else(|| panic_with_error!(env, Error::NotInitialized)); +2026-06-21T01:26:33.2175892Z + let mut campaign = +2026-06-21T01:26:33.2176297Z + get_campaign(env).unwrap_or_else(|| panic_with_error!(env, Error::NotInitialized)); +2026-06-21T01:26:33.2176708Z +2026-06-21T01:26:33.2176919Z campaign.creator.require_auth(); +2026-06-21T01:26:33.2177181Z +2026-06-21T01:26:33.2177580Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/contract.rs:51: +2026-06-21T01:26:33.2178204Z /// - `Error::ContractFrozen` if contract is frozen (freeze invariant: all writes rejected) +2026-06-21T01:26:33.2179086Z /// - `Error::InvalidCampaignTransition` if campaign is already Cancelled +2026-06-21T01:26:33.2179708Z pub fn cancel_campaign(env: &Env) { +2026-06-21T01:26:33.2180083Z - let mut campaign = get_campaign(env) +2026-06-21T01:26:33.2180461Z - .unwrap_or_else(|| panic_with_error!(env, Error::NotInitialized)); +2026-06-21T01:26:33.2180823Z + let mut campaign = +2026-06-21T01:26:33.2181193Z + get_campaign(env).unwrap_or_else(|| panic_with_error!(env, Error::NotInitialized)); +2026-06-21T01:26:33.2181584Z +2026-06-21T01:26:33.2181796Z campaign.creator.require_auth(); +2026-06-21T01:26:33.2182052Z +2026-06-21T01:26:33.2182421Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/contract.rs:87: +2026-06-21T01:26:33.2182971Z /// - `Error::InvalidEndTime` if `new_end_time` is more than ten years out +2026-06-21T01:26:33.2183483Z /// - `Error::InvalidCampaignTransition` if campaign is not Active or GoalReached +2026-06-21T01:26:33.2184283Z pub fn extend_deadline(env: &Env, new_end_time: u64) { +2026-06-21T01:26:33.2184609Z - let mut campaign = get_campaign(env) +2026-06-21T01:26:33.2185107Z - .unwrap_or_else(|| panic_with_error!(env, Error::NotInitialized)); +2026-06-21T01:26:33.2185484Z + let mut campaign = +2026-06-21T01:26:33.2185844Z + get_campaign(env).unwrap_or_else(|| panic_with_error!(env, Error::NotInitialized)); +2026-06-21T01:26:33.2186231Z +2026-06-21T01:26:33.2186434Z campaign.creator.require_auth(); +2026-06-21T01:26:33.2186833Z +2026-06-21T01:26:33.2187218Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/contract.rs:128: +2026-06-21T01:26:33.2187683Z #[must_use] +2026-06-21T01:26:33.2188025Z pub fn get_campaign_status(env: &Env) -> crate::types::CampaignStatusResponse { +2026-06-21T01:26:33.2188456Z use crate::types::CampaignStatusResponse; +2026-06-21T01:26:33.2188934Z - +2026-06-21T01:26:33.2189141Z - let campaign = get_campaign(env) +2026-06-21T01:26:33.2189541Z - .unwrap_or_else(|| panic_with_error!(env, Error::NotInitialized)); +2026-06-21T01:26:33.2189895Z + +2026-06-21T01:26:33.2190086Z + let campaign = +2026-06-21T01:26:33.2190450Z + get_campaign(env).unwrap_or_else(|| panic_with_error!(env, Error::NotInitialized)); +2026-06-21T01:26:33.2190847Z +2026-06-21T01:26:33.2191047Z let now = env.ledger().timestamp(); +2026-06-21T01:26:33.2191362Z let days_remaining = if now < campaign.end_time { +2026-06-21T01:26:33.2229279Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/lib.rs:213: +2026-06-21T01:26:33.2230036Z // Update donor record +2026-06-21T01:26:33.2230343Z let existing_donor = get_donor(&env, &donor); +2026-06-21T01:26:33.2230681Z let is_new_donor = existing_donor.is_none(); +2026-06-21T01:26:33.2231213Z - let mut donor_record = existing_donor.unwrap_or_else(|| DonorRecord::new_for(donor.clone(), asset.clone())); +2026-06-21T01:26:33.2231702Z + let mut donor_record = +2026-06-21T01:26:33.2232124Z + existing_donor.unwrap_or_else(|| DonorRecord::new_for(donor.clone(), asset.clone())); +2026-06-21T01:26:33.2232547Z +2026-06-21T01:26:33.2232754Z donor_record.apply_donation( +2026-06-21T01:26:33.2233031Z &env, +2026-06-21T01:26:33.2331716Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/test/integration_tests.rs:93: +2026-06-21T01:26:33.2332504Z let end_time = env.ledger().timestamp() + 86_400; +2026-06-21T01:26:33.2332888Z let new_end_time = env.ledger().timestamp() + (2 * 86_400); +2026-06-21T01:26:33.2333213Z +2026-06-21T01:26:33.2333436Z - CampaignContract::initialize( +2026-06-21T01:26:33.2333725Z - env.clone(), +2026-06-21T01:26:33.2333957Z - creator, +2026-06-21T01:26:33.2334170Z - 1000, +2026-06-21T01:26:33.2334377Z - end_time, +2026-06-21T01:26:33.2334586Z - assets, +2026-06-21T01:26:33.2334801Z - milestones, +2026-06-21T01:26:33.2335035Z - 0, +2026-06-21T01:26:33.2335237Z - ) +2026-06-21T01:26:33.2335434Z - .unwrap(); +2026-06-21T01:26:33.2335828Z + CampaignContract::initialize(env.clone(), creator, 1000, end_time, assets, milestones, 0) +2026-06-21T01:26:33.2336277Z + .unwrap(); +2026-06-21T01:26:33.2336488Z +2026-06-21T01:26:33.2336775Z CampaignContract::extend_deadline(env.clone(), new_end_time); +2026-06-21T01:26:33.2337111Z +2026-06-21T01:26:33.2424764Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/test/negative_path_tests.rs:6: +2026-06-21T01:26:33.2425951Z #![cfg(test)] +2026-06-21T01:26:33.2426297Z +2026-06-21T01:26:33.2426740Z use soroban_sdk::testutils::{Address as AddressTestUtils, Ledger}; +2026-06-21T01:26:33.2428068Z -use soroban_sdk::{Address, Env, String, Vec, BytesN}; +2026-06-21T01:26:33.2429464Z +use soroban_sdk::{Address, BytesN, Env, String, Vec}; +2026-06-21T01:26:33.2429944Z +2026-06-21T01:26:33.2430243Z +use super::with_contract; +2026-06-21T01:26:33.2431158Z +use crate::storage::{get_campaign, set_campaign, set_donor, set_milestone}; +2026-06-21T01:26:33.2431937Z use crate::types::{ +2026-06-21T01:26:33.2432537Z - CampaignData, CampaignStatus, DonorRecord, AssetInfo, StellarAsset, MilestoneData, +2026-06-21T01:26:33.2433240Z - MilestoneStatus, Error, DataKey, +2026-06-21T01:26:33.2433924Z + AssetInfo, CampaignData, CampaignStatus, DataKey, DonorRecord, Error, MilestoneData, +2026-06-21T01:26:33.2434627Z + MilestoneStatus, StellarAsset, +2026-06-21T01:26:33.2435015Z }; +2026-06-21T01:26:33.2435474Z -use crate::storage::{set_campaign, set_donor, set_milestone, get_campaign}; +2026-06-21T01:26:33.2436164Z -use crate::{CampaignContract, MAX_DEADLINE_GAP_SECONDS}; +2026-06-21T01:26:33.2436708Z use crate::CampaignContractClient; +2026-06-21T01:26:33.2437128Z -use super::with_contract; +2026-06-21T01:26:33.2437579Z +use crate::{CampaignContract, MAX_DEADLINE_GAP_SECONDS}; +2026-06-21T01:26:33.2438049Z +2026-06-21T01:26:33.2438490Z /// Base ledger timestamp (1 year in seconds) so we can safely subtract +2026-06-21T01:26:33.2439417Z /// to simulate "past" end_times without underflow. +2026-06-21T01:26:33.2439967Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/test/negative_path_tests.rs:82: +2026-06-21T01:26:33.2440494Z set_donor(env, donor, &record); +2026-06-21T01:26:33.2440744Z } +2026-06-21T01:26:33.2440924Z +2026-06-21T01:26:33.2441113Z -fn create_donor_record( +2026-06-21T01:26:33.2441350Z - env: &Env, +2026-06-21T01:26:33.2441563Z - donor: &Address, +2026-06-21T01:26:33.2441790Z - total_donated: i128, +2026-06-21T01:26:33.2442034Z - refund_claimed: bool, +2026-06-21T01:26:33.2442268Z -) { +2026-06-21T01:26:33.2442641Z +fn create_donor_record(env: &Env, donor: &Address, total_donated: i128, refund_claimed: bool) { +2026-06-21T01:26:33.2443080Z let record = DonorRecord { +2026-06-21T01:26:33.2443334Z donor: donor.clone(), +2026-06-21T01:26:33.2443581Z total_donated, +2026-06-21T01:26:33.2444065Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/test/negative_path_tests.rs:132: +2026-06-21T01:26:33.2444626Z let creator = Address::generate(&env); +2026-06-21T01:26:33.2444962Z let end_time = env.ledger().timestamp() + 100_000; +2026-06-21T01:26:33.2445420Z let _ = CampaignContract::initialize( +2026-06-21T01:26:33.2445748Z - env.clone(), creator, 0, end_time, +2026-06-21T01:26:33.2446107Z - default_accepted_assets(&env), default_milestones(&env), 0, +2026-06-21T01:26:33.2446467Z + env.clone(), +2026-06-21T01:26:33.2446695Z + creator, +2026-06-21T01:26:33.2446908Z + 0, +2026-06-21T01:26:33.2447107Z + end_time, +2026-06-21T01:26:33.2447345Z + default_accepted_assets(&env), +2026-06-21T01:26:33.2447640Z + default_milestones(&env), +2026-06-21T01:26:33.2447895Z + 0, +2026-06-21T01:26:33.2448089Z ); +2026-06-21T01:26:33.2448278Z }); +2026-06-21T01:26:33.2448465Z } +2026-06-21T01:26:33.2449475Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/test/negative_path_tests.rs:147: +2026-06-21T01:26:33.2450157Z let creator = Address::generate(&env); +2026-06-21T01:26:33.2450505Z let end_time = env.ledger().timestamp() + 100_000; +2026-06-21T01:26:33.2450861Z let _ = CampaignContract::initialize( +2026-06-21T01:26:33.2451176Z - env.clone(), creator, -100, end_time, +2026-06-21T01:26:33.2451543Z - default_accepted_assets(&env), default_milestones(&env), 0, +2026-06-21T01:26:33.2451896Z + env.clone(), +2026-06-21T01:26:33.2452129Z + creator, +2026-06-21T01:26:33.2452343Z + -100, +2026-06-21T01:26:33.2452553Z + end_time, +2026-06-21T01:26:33.2452783Z + default_accepted_assets(&env), +2026-06-21T01:26:33.2453071Z + default_milestones(&env), +2026-06-21T01:26:33.2453331Z + 0, +2026-06-21T01:26:33.2453741Z ); +2026-06-21T01:26:33.2453928Z }); +2026-06-21T01:26:33.2454111Z } +2026-06-21T01:26:33.2454685Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/test/negative_path_tests.rs:163: +2026-06-21T01:26:33.2455234Z let creator = Address::generate(&env); +2026-06-21T01:26:33.2455553Z let end_time = env.ledger().timestamp() - 1; +2026-06-21T01:26:33.2455875Z let _ = CampaignContract::initialize( +2026-06-21T01:26:33.2456167Z - env.clone(), creator, 1000, end_time, +2026-06-21T01:26:33.2456520Z - default_accepted_assets(&env), default_milestones(&env), 0, +2026-06-21T01:26:33.2456863Z + env.clone(), +2026-06-21T01:26:33.2457082Z + creator, +2026-06-21T01:26:33.2457286Z + 1000, +2026-06-21T01:26:33.2457487Z + end_time, +2026-06-21T01:26:33.2457719Z + default_accepted_assets(&env), +2026-06-21T01:26:33.2458017Z + default_milestones(&env), +2026-06-21T01:26:33.2458285Z + 0, +2026-06-21T01:26:33.2458487Z ); +2026-06-21T01:26:33.2458877Z }); +2026-06-21T01:26:33.2459067Z } +2026-06-21T01:26:33.2459516Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/test/negative_path_tests.rs:179: +2026-06-21T01:26:33.2460081Z let end_time = env.ledger().timestamp() + 100_000; +2026-06-21T01:26:33.2460460Z let empty_assets: Vec = Vec::new(&env); +2026-06-21T01:26:33.2460805Z let _ = CampaignContract::initialize( +2026-06-21T01:26:33.2461113Z - env.clone(), creator, 1000, end_time, +2026-06-21T01:26:33.2461434Z - empty_assets, default_milestones(&env), 0, +2026-06-21T01:26:33.2461732Z + env.clone(), +2026-06-21T01:26:33.2461956Z + creator, +2026-06-21T01:26:33.2462164Z + 1000, +2026-06-21T01:26:33.2462367Z + end_time, +2026-06-21T01:26:33.2462587Z + empty_assets, +2026-06-21T01:26:33.2462828Z + default_milestones(&env), +2026-06-21T01:26:33.2463088Z + 0, +2026-06-21T01:26:33.2463281Z ); +2026-06-21T01:26:33.2463477Z }); +2026-06-21T01:26:33.2463659Z } +2026-06-21T01:26:33.2464085Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/test/negative_path_tests.rs:199: +2026-06-21T01:26:33.2464622Z issuer: Some(Address::generate(&env)), +2026-06-21T01:26:33.2464901Z }); +2026-06-21T01:26:33.2465128Z let _ = CampaignContract::initialize( +2026-06-21T01:26:33.2465423Z - env.clone(), creator, 1000, end_time, +2026-06-21T01:26:33.2465727Z - assets, default_milestones(&env), 0, +2026-06-21T01:26:33.2466005Z + env.clone(), +2026-06-21T01:26:33.2466224Z + creator, +2026-06-21T01:26:33.2466434Z + 1000, +2026-06-21T01:26:33.2466630Z + end_time, +2026-06-21T01:26:33.2466834Z + assets, +2026-06-21T01:26:33.2467053Z + default_milestones(&env), +2026-06-21T01:26:33.2467301Z + 0, +2026-06-21T01:26:33.2467505Z ); +2026-06-21T01:26:33.2467685Z }); +2026-06-21T01:26:33.2467868Z } +2026-06-21T01:26:33.2468289Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/test/negative_path_tests.rs:215: +2026-06-21T01:26:33.2469028Z let end_time = env.ledger().timestamp() + 100_000; +2026-06-21T01:26:33.2469420Z let empty_milestones: Vec = Vec::new(&env); +2026-06-21T01:26:33.2469773Z let _ = CampaignContract::initialize( +2026-06-21T01:26:33.2470066Z - env.clone(), creator, 1000, end_time, +2026-06-21T01:26:33.2470405Z - default_accepted_assets(&env), empty_milestones, 0, +2026-06-21T01:26:33.2470724Z + env.clone(), +2026-06-21T01:26:33.2470940Z + creator, +2026-06-21T01:26:33.2471142Z + 1000, +2026-06-21T01:26:33.2471546Z + end_time, +2026-06-21T01:26:33.2471780Z + default_accepted_assets(&env), +2026-06-21T01:26:33.2472067Z + empty_milestones, +2026-06-21T01:26:33.2472461Z + 0, +2026-06-21T01:26:33.2472660Z ); +2026-06-21T01:26:33.2472963Z }); +2026-06-21T01:26:33.2473147Z } +2026-06-21T01:26:33.2473576Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/test/negative_path_tests.rs:244: +2026-06-21T01:26:33.2474098Z }); +2026-06-21T01:26:33.2474309Z } +2026-06-21T01:26:33.2474539Z let _ = CampaignContract::initialize( +2026-06-21T01:26:33.2474841Z - env.clone(), creator, 6000, end_time, +2026-06-21T01:26:33.2475171Z - default_accepted_assets(&env), milestones, 0, +2026-06-21T01:26:33.2475483Z + env.clone(), +2026-06-21T01:26:33.2475702Z + creator, +2026-06-21T01:26:33.2475920Z + 6000, +2026-06-21T01:26:33.2476118Z + end_time, +2026-06-21T01:26:33.2476352Z + default_accepted_assets(&env), +2026-06-21T01:26:33.2476618Z + milestones, +2026-06-21T01:26:33.2476835Z + 0, +2026-06-21T01:26:33.2477036Z ); +2026-06-21T01:26:33.2477216Z }); +2026-06-21T01:26:33.2477405Z } +2026-06-21T01:26:33.2477853Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/test/negative_path_tests.rs:260: +2026-06-21T01:26:33.2478400Z let end_time = env.ledger().timestamp() + 100_000; +2026-06-21T01:26:33.2479020Z let mut milestones: Vec = Vec::new(&env); +2026-06-21T01:26:33.2479392Z milestones.push_back(MilestoneData { +2026-06-21T01:26:33.2479741Z - index: 0, target_amount: 500, released_amount: 0, +2026-06-21T01:26:33.2480077Z + index: 0, +2026-06-21T01:26:33.2480308Z + target_amount: 500, +2026-06-21T01:26:33.2480563Z + released_amount: 0, +2026-06-21T01:26:33.2480886Z description_hash: BytesN::from_array(&env, &[0u8; 32]), +2026-06-21T01:26:33.2481243Z status: MilestoneStatus::Locked, +2026-06-21T01:26:33.2481563Z - released_at: None, released_at_ledger: None, +2026-06-21T01:26:33.2481899Z - release_tx: None, released_to: None, +2026-06-21T01:26:33.2482199Z + released_at: None, +2026-06-21T01:26:33.2482463Z + released_at_ledger: None, +2026-06-21T01:26:33.2482732Z + release_tx: None, +2026-06-21T01:26:33.2482972Z + released_to: None, +2026-06-21T01:26:33.2483198Z }); +2026-06-21T01:26:33.2483421Z milestones.push_back(MilestoneData { +2026-06-21T01:26:33.2483748Z - index: 1, target_amount: 300, released_amount: 0, +2026-06-21T01:26:33.2484049Z + index: 1, +2026-06-21T01:26:33.2484270Z + target_amount: 300, +2026-06-21T01:26:33.2484512Z + released_amount: 0, +2026-06-21T01:26:33.2484818Z description_hash: BytesN::from_array(&env, &[0u8; 32]), +2026-06-21T01:26:33.2485159Z status: MilestoneStatus::Locked, +2026-06-21T01:26:33.2485464Z - released_at: None, released_at_ledger: None, +2026-06-21T01:26:33.2485773Z - release_tx: None, released_to: None, +2026-06-21T01:26:33.2486061Z + released_at: None, +2026-06-21T01:26:33.2486316Z + released_at_ledger: None, +2026-06-21T01:26:33.2486574Z + release_tx: None, +2026-06-21T01:26:33.2486807Z + released_to: None, +2026-06-21T01:26:33.2487033Z }); +2026-06-21T01:26:33.2487255Z let _ = CampaignContract::initialize( +2026-06-21T01:26:33.2487558Z - env.clone(), creator, 500, end_time, +2026-06-21T01:26:33.2487873Z - default_accepted_assets(&env), milestones, 0, +2026-06-21T01:26:33.2488180Z + env.clone(), +2026-06-21T01:26:33.2488404Z + creator, +2026-06-21T01:26:33.2488824Z + 500, +2026-06-21T01:26:33.2489038Z + end_time, +2026-06-21T01:26:33.2489269Z + default_accepted_assets(&env), +2026-06-21T01:26:33.2489544Z + milestones, +2026-06-21T01:26:33.2489764Z + 0, +2026-06-21T01:26:33.2489961Z ); +2026-06-21T01:26:33.2490302Z }); +2026-06-21T01:26:33.2490490Z } +2026-06-21T01:26:33.2490943Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/test/negative_path_tests.rs:290: +2026-06-21T01:26:33.2491683Z let end_time = env.ledger().timestamp() + 100_000; +2026-06-21T01:26:33.2492073Z let mut milestones: Vec = Vec::new(&env); +2026-06-21T01:26:33.2492422Z milestones.push_back(MilestoneData { +2026-06-21T01:26:33.2492741Z - index: 0, target_amount: 500, released_amount: 0, +2026-06-21T01:26:33.2493042Z + index: 0, +2026-06-21T01:26:33.2493262Z + target_amount: 500, +2026-06-21T01:26:33.2493513Z + released_amount: 0, +2026-06-21T01:26:33.2493816Z description_hash: BytesN::from_array(&env, &[0u8; 32]), +2026-06-21T01:26:33.2494167Z status: MilestoneStatus::Locked, +2026-06-21T01:26:33.2494476Z - released_at: None, released_at_ledger: None, +2026-06-21T01:26:33.2494788Z - release_tx: None, released_to: None, +2026-06-21T01:26:33.2495087Z + released_at: None, +2026-06-21T01:26:33.2495339Z + released_at_ledger: None, +2026-06-21T01:26:33.2495599Z + release_tx: None, +2026-06-21T01:26:33.2495831Z + released_to: None, +2026-06-21T01:26:33.2496107Z }); +2026-06-21T01:26:33.2496469Z let _ = CampaignContract::initialize( +2026-06-21T01:26:33.2497228Z - env.clone(), creator, 1000, end_time, +2026-06-21T01:26:33.2497747Z - default_accepted_assets(&env), milestones, 0, +2026-06-21T01:26:33.2498220Z + env.clone(), +2026-06-21T01:26:33.2498701Z + creator, +2026-06-21T01:26:33.2499023Z + 1000, +2026-06-21T01:26:33.2499327Z + end_time, +2026-06-21T01:26:33.2499687Z + default_accepted_assets(&env), +2026-06-21T01:26:33.2500109Z + milestones, +2026-06-21T01:26:33.2500449Z + 0, +2026-06-21T01:26:33.2500748Z ); +2026-06-21T01:26:33.2501032Z }); +2026-06-21T01:26:33.2501318Z } +2026-06-21T01:26:33.2502145Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/test/negative_path_tests.rs:375: +2026-06-21T01:26:33.2503070Z let creator = Address::generate(&env); +2026-06-21T01:26:33.2503599Z let end_time = env.ledger().timestamp() + 100_000; +2026-06-21T01:26:33.2504133Z let _ = CampaignContract::initialize( +2026-06-21T01:26:33.2504613Z - env.clone(), creator, 1000, end_time, +2026-06-21T01:26:33.2505199Z - default_accepted_assets(&env), default_milestones(&env), 100, +2026-06-21T01:26:33.2505765Z + env.clone(), +2026-06-21T01:26:33.2506000Z + creator, +2026-06-21T01:26:33.2506208Z + 1000, +2026-06-21T01:26:33.2506412Z + end_time, +2026-06-21T01:26:33.2506646Z + default_accepted_assets(&env), +2026-06-21T01:26:33.2506945Z + default_milestones(&env), +2026-06-21T01:26:33.2507206Z + 100, +2026-06-21T01:26:33.2507404Z ); +2026-06-21T01:26:33.2507630Z let donor = Address::generate(&env); +2026-06-21T01:26:33.2508023Z CampaignContract::donate(env.clone(), donor, 50, AssetInfo::Native); +2026-06-21T01:26:33.2509231Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/test/negative_path_tests.rs:506: +2026-06-21T01:26:33.2510051Z let creator = Address::generate(&env); +2026-06-21T01:26:33.2510388Z let end_time = env.ledger().timestamp() + 100_000; +2026-06-21T01:26:33.2510725Z let _ = CampaignContract::initialize( +2026-06-21T01:26:33.2511030Z - env.clone(), creator, 1000, end_time, +2026-06-21T01:26:33.2511392Z - default_accepted_assets(&env), default_milestones(&env), 0, +2026-06-21T01:26:33.2511739Z + env.clone(), +2026-06-21T01:26:33.2511962Z + creator, +2026-06-21T01:26:33.2512169Z + 1000, +2026-06-21T01:26:33.2512378Z + end_time, +2026-06-21T01:26:33.2512609Z + default_accepted_assets(&env), +2026-06-21T01:26:33.2513088Z + default_milestones(&env), +2026-06-21T01:26:33.2513450Z + 0, +2026-06-21T01:26:33.2513643Z ); +2026-06-21T01:26:33.2513894Z let mut campaign = get_campaign(&env).unwrap(); +2026-06-21T01:26:33.2514250Z campaign.status = CampaignStatus::GoalReached; +2026-06-21T01:26:33.2514794Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/test/negative_path_tests.rs:530: +2026-06-21T01:26:33.2515406Z // Initialize with future end_time, then manually set to past + Ended +2026-06-21T01:26:33.2515832Z let future_end = env.ledger().timestamp() + 100_000; +2026-06-21T01:26:33.2516168Z let _ = CampaignContract::initialize( +2026-06-21T01:26:33.2516488Z - env.clone(), creator.clone(), 1000, future_end, +2026-06-21T01:26:33.2516868Z - default_accepted_assets(&env), default_milestones(&env), 0, +2026-06-21T01:26:33.2517210Z + env.clone(), +2026-06-21T01:26:33.2517447Z + creator.clone(), +2026-06-21T01:26:33.2517679Z + 1000, +2026-06-21T01:26:33.2517893Z + future_end, +2026-06-21T01:26:33.2518131Z + default_accepted_assets(&env), +2026-06-21T01:26:33.2518417Z + default_milestones(&env), +2026-06-21T01:26:33.2518898Z + 0, +2026-06-21T01:26:33.2519100Z ); +2026-06-21T01:26:33.2519330Z let mut campaign = get_campaign(&env).unwrap(); +2026-06-21T01:26:33.2519724Z campaign.end_time = env.ledger().timestamp() - (31 * 24 * 60 * 60); +2026-06-21T01:26:33.2520329Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/test/negative_path_tests.rs:572: +2026-06-21T01:26:33.2520863Z let donor = Address::generate(&env); +2026-06-21T01:26:33.2521177Z create_donor_record(&env, &donor, 100, false); +2026-06-21T01:26:33.2521594Z let eligible = CampaignContract::is_refund_eligible(env.clone(), donor); +2026-06-21T01:26:33.2522141Z - assert!(!eligible, "Ended campaign with released milestone should not allow refunds"); +2026-06-21T01:26:33.2522575Z + assert!( +2026-06-21T01:26:33.2522787Z + !eligible, +2026-06-21T01:26:33.2523093Z + "Ended campaign with released milestone should not allow refunds" +2026-06-21T01:26:33.2523443Z + ); +2026-06-21T01:26:33.2523631Z }); +2026-06-21T01:26:33.2523811Z } +2026-06-21T01:26:33.2523992Z +2026-06-21T01:26:33.2524429Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/test/negative_path_tests.rs:731: +2026-06-21T01:26:33.2524961Z let donor = Address::generate(&env); +2026-06-21T01:26:33.2525272Z create_donor_record(&env, &donor, 500, false); +2026-06-21T01:26:33.2525672Z let eligible = CampaignContract::is_refund_eligible(env.clone(), donor); +2026-06-21T01:26:33.2526167Z - assert!(eligible, "Donor should be eligible for refund on cancelled campaign"); +2026-06-21T01:26:33.2526556Z + assert!( +2026-06-21T01:26:33.2526769Z + eligible, +2026-06-21T01:26:33.2527062Z + "Donor should be eligible for refund on cancelled campaign" +2026-06-21T01:26:33.2527394Z + ); +2026-06-21T01:26:33.2527578Z }); +2026-06-21T01:26:33.2527757Z } +2026-06-21T01:26:33.2527930Z +2026-06-21T01:26:33.2528354Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/test/negative_path_tests.rs:802: +2026-06-21T01:26:33.2529415Z // Initialize with future end_time, then manually set to exact boundary +2026-06-21T01:26:33.2530027Z let future_end = env.ledger().timestamp() + 100_000; +2026-06-21T01:26:33.2530376Z let _ = CampaignContract::initialize( +2026-06-21T01:26:33.2530717Z - env.clone(), creator.clone(), 1000, future_end, +2026-06-21T01:26:33.2531102Z - default_accepted_assets(&env), default_milestones(&env), 0, +2026-06-21T01:26:33.2531449Z + env.clone(), +2026-06-21T01:26:33.2531679Z + creator.clone(), +2026-06-21T01:26:33.2532109Z + 1000, +2026-06-21T01:26:33.2532324Z + future_end, +2026-06-21T01:26:33.2532567Z + default_accepted_assets(&env), +2026-06-21T01:26:33.2532987Z + default_milestones(&env), +2026-06-21T01:26:33.2533241Z + 0, +2026-06-21T01:26:33.2533438Z ); +2026-06-21T01:26:33.2533679Z let mut campaign = get_campaign(&env).unwrap(); +2026-06-21T01:26:33.2534077Z campaign.end_time = env.ledger().timestamp() - (30 * 24 * 60 * 60); +2026-06-21T01:26:33.2534678Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/test/negative_path_tests.rs:826: +2026-06-21T01:26:33.2535334Z // Initialize with future end_time, then manually set to just past boundary +2026-06-21T01:26:33.2535771Z let future_end = env.ledger().timestamp() + 100_000; +2026-06-21T01:26:33.2536113Z let _ = CampaignContract::initialize( +2026-06-21T01:26:33.2536431Z - env.clone(), creator.clone(), 1000, future_end, +2026-06-21T01:26:33.2536812Z - default_accepted_assets(&env), default_milestones(&env), 0, +2026-06-21T01:26:33.2537161Z + env.clone(), +2026-06-21T01:26:33.2537391Z + creator.clone(), +2026-06-21T01:26:33.2537617Z + 1000, +2026-06-21T01:26:33.2537824Z + future_end, +2026-06-21T01:26:33.2538058Z + default_accepted_assets(&env), +2026-06-21T01:26:33.2538346Z + default_milestones(&env), +2026-06-21T01:26:33.2538739Z + 0, +2026-06-21T01:26:33.2538952Z ); +2026-06-21T01:26:33.2539199Z let mut campaign = get_campaign(&env).unwrap(); +2026-06-21T01:26:33.2539608Z campaign.end_time = env.ledger().timestamp() - (30 * 24 * 60 * 60 + 1); +2026-06-21T01:26:33.2540227Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/test/negative_path_tests.rs:836: +2026-06-21T01:26:33.2540772Z let donor = Address::generate(&env); +2026-06-21T01:26:33.2541095Z create_donor_record(&env, &donor, 100, false); +2026-06-21T01:26:33.2541516Z let eligible = CampaignContract::is_refund_eligible(env.clone(), donor); +2026-06-21T01:26:33.2542006Z - assert!(!eligible, "Should NOT be eligible just past 30-day boundary"); +2026-06-21T01:26:33.2542363Z + assert!( +2026-06-21T01:26:33.2542577Z + !eligible, +2026-06-21T01:26:33.2542855Z + "Should NOT be eligible just past 30-day boundary" +2026-06-21T01:26:33.2543162Z + ); +2026-06-21T01:26:33.2543356Z }); +2026-06-21T01:26:33.2543543Z } +2026-06-21T01:26:33.2543730Z +2026-06-21T01:26:33.2544173Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/test/negative_path_tests.rs:864: +2026-06-21T01:26:33.2544826Z // Verify the contract is not frozen by default; upgrade should not panic on the +2026-06-21T01:26:33.2545350Z // freeze check (it will panic later when the deployer rejects the dummy hash, +2026-06-21T01:26:33.2545824Z // so we only assert that is_frozen returns false before the call). +2026-06-21T01:26:33.2546331Z - assert!(!crate::storage::is_frozen(&env), "Contract should not be frozen initially"); +2026-06-21T01:26:33.2546741Z + assert!( +2026-06-21T01:26:33.2546988Z + !crate::storage::is_frozen(&env), +2026-06-21T01:26:33.2547306Z + "Contract should not be frozen initially" +2026-06-21T01:26:33.2547592Z + ); +2026-06-21T01:26:33.2547779Z }); +2026-06-21T01:26:33.2547964Z } +2026-06-21T01:26:33.2548145Z +2026-06-21T01:26:33.2548691Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/test/negative_path_tests.rs:877: +2026-06-21T01:26:33.2549246Z CampaignContract::freeze(env.clone()); +2026-06-21T01:26:33.2549639Z assert!(crate::storage::is_frozen(&env), "Contract should be frozen"); +2026-06-21T01:26:33.2550035Z CampaignContract::unfreeze(env.clone()); +2026-06-21T01:26:33.2550500Z - assert!(!crate::storage::is_frozen(&env), "Contract should be unfrozen after unfreeze"); +2026-06-21T01:26:33.2551110Z + assert!( +2026-06-21T01:26:33.2551356Z + !crate::storage::is_frozen(&env), +2026-06-21T01:26:33.2551784Z + "Contract should be unfrozen after unfreeze" +2026-06-21T01:26:33.2552082Z + ); +2026-06-21T01:26:33.2552277Z }); +2026-06-21T01:26:33.2552464Z } +2026-06-21T01:26:33.2552643Z +2026-06-21T01:26:33.2553074Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/test/negative_path_tests.rs:906: +2026-06-21T01:26:33.2553620Z let creator = Address::generate(&env); +2026-06-21T01:26:33.2553952Z let end_time = env.ledger().timestamp() + 100_000; +2026-06-21T01:26:33.2554288Z let _ = CampaignContract::initialize( +2026-06-21T01:26:33.2554594Z - env.clone(), creator, 1000, end_time, +2026-06-21T01:26:33.2554957Z - default_accepted_assets(&env), default_milestones(&env), 0, +2026-06-21T01:26:33.2555317Z + env.clone(), +2026-06-21T01:26:33.2555541Z + creator, +2026-06-21T01:26:33.2555764Z + 1000, +2026-06-21T01:26:33.2555974Z + end_time, +2026-06-21T01:26:33.2556211Z + default_accepted_assets(&env), +2026-06-21T01:26:33.2556505Z + default_milestones(&env), +2026-06-21T01:26:33.2556917Z + 0, +2026-06-21T01:26:33.2557117Z ); +2026-06-21T01:26:33.2557304Z }); +2026-06-21T01:26:33.2557490Z } +2026-06-21T01:26:33.2557861Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/types.rs:1: +2026-06-21T01:26:33.2558318Z // src/types.rs +2026-06-21T01:26:33.2558532Z +2026-06-21T01:26:33.2559077Z -use soroban_sdk::{contracttype, contracterror, Address, BytesN, String, Vec, Env}; +2026-06-21T01:26:33.2559639Z +use soroban_sdk::{contracterror, contracttype, Address, BytesN, Env, String, Vec}; +2026-06-21T01:26:33.2560032Z +2026-06-21T01:26:33.2560581Z // ─── Error enum ─────────────────────────────────────────────────────────────── +2026-06-21T01:26:33.2560941Z +2026-06-21T01:26:33.2561341Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/types.rs:14: +2026-06-21T01:26:33.2561804Z pub enum Error { +2026-06-21T01:26:33.2562211Z // ── Requested contract error codes ──────────────────────────────────── +2026-06-21T01:26:33.2562656Z /// `initialize` called on an already-initialised contract. +2026-06-21T01:26:33.2563002Z - AlreadyInitialized = 1, +2026-06-21T01:26:33.2563289Z + AlreadyInitialized = 1, +2026-06-21T01:26:33.2563575Z /// Contract has not been initialised yet. +2026-06-21T01:26:33.2563873Z - NotInitialized = 2, +2026-06-21T01:26:33.2564135Z + NotInitialized = 2, +2026-06-21T01:26:33.2564424Z /// Caller is not authorised to perform the operation. +2026-06-21T01:26:33.2564744Z - Unauthorized = 3, +2026-06-21T01:26:33.2565132Z + Unauthorized = 3, +2026-06-21T01:26:33.2565393Z /// The campaign deadline has already passed. +2026-06-21T01:26:33.2565696Z - CampaignEnded = 4, +2026-06-21T01:26:33.2565967Z + CampaignEnded = 4, +2026-06-21T01:26:33.2566291Z /// Operation requires the campaign to be `Active` or `GoalReached`. +2026-06-21T01:26:33.2566676Z - CampaignNotActive = 5, +2026-06-21T01:26:33.2566941Z + CampaignNotActive = 5, +2026-06-21T01:26:33.2567253Z /// Donated asset is not in the campaign's accepted assets list. +2026-06-21T01:26:33.2567601Z - AssetNotAccepted = 6, +2026-06-21T01:26:33.2567866Z + AssetNotAccepted = 6, +2026-06-21T01:26:33.2568192Z /// Donation amount is below the campaign's minimum threshold. +2026-06-21T01:26:33.2568535Z - DonationTooSmall = 7, +2026-06-21T01:26:33.2569008Z + DonationTooSmall = 7, +2026-06-21T01:26:33.2569291Z /// Milestone index is out of range for this campaign. +2026-06-21T01:26:33.2569612Z - MilestoneNotFound = 8, +2026-06-21T01:26:33.2569874Z + MilestoneNotFound = 8, +2026-06-21T01:26:33.2570184Z /// Milestone has not been unlocked yet and cannot be released. +2026-06-21T01:26:33.2570715Z - MilestoneNotUnlocked = 9, +2026-06-21T01:26:33.2571102Z + MilestoneNotUnlocked = 9, +2026-06-21T01:26:33.2571469Z /// A previous milestone must be released before this one can be released. +2026-06-21T01:26:33.2571869Z PreviousMilestoneNotReleased = 10, +2026-06-21T01:26:33.2572210Z /// Cannot cancel the campaign while it still holds funds. +2026-06-21T01:26:33.2573169Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/types.rs:37: +2026-06-21T01:26:33.2573641Z - CannotCancelWithFunds = 11, +2026-06-21T01:26:33.2573934Z + CannotCancelWithFunds = 11, +2026-06-21T01:26:33.2574239Z /// Refunds are no longer permitted for this campaign. +2026-06-21T01:26:33.2574672Z - RefundWindowClosed = 12, +2026-06-21T01:26:33.2574950Z + RefundWindowClosed = 12, +2026-06-21T01:26:33.2575233Z /// `goal_amount` must be strictly positive. +2026-06-21T01:26:33.2575533Z - InvalidGoalAmount = 13, +2026-06-21T01:26:33.2575811Z + InvalidGoalAmount = 13, +2026-06-21T01:26:33.2576153Z /// `end_time` must be strictly greater than the current ledger timestamp. +2026-06-21T01:26:33.2576533Z - InvalidEndTime = 14, +2026-06-21T01:26:33.2576801Z + InvalidEndTime = 14, +2026-06-21T01:26:33.2577160Z /// Milestones must be strictly ascending and the last must equal `goal_amount`. +2026-06-21T01:26:33.2577562Z - InvalidMilestones = 15, +2026-06-21T01:26:33.2577829Z + InvalidMilestones = 15, +2026-06-21T01:26:33.2578182Z /// Contract does not hold enough funds to fulfil the requested transfer. +2026-06-21T01:26:33.2578704Z InsufficientContractBalance = 16, +2026-06-21T01:26:33.2579010Z /// A checked arithmetic operation overflowed. +2026-06-21T01:26:33.2579480Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/types.rs:49: +2026-06-21T01:26:33.2579924Z - Overflow = 17, +2026-06-21T01:26:33.2580213Z + Overflow = 17, +2026-06-21T01:26:33.2580434Z +2026-06-21T01:26:33.2581019Z // ── Additional contract errors ───────────────────────────────────────── +2026-06-21T01:26:33.2581619Z /// `accepted_assets` must be non-empty. +2026-06-21T01:26:33.2582258Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/types.rs:53: +2026-06-21T01:26:33.2582950Z - InvalidAssets = 18, +2026-06-21T01:26:33.2583441Z + InvalidAssets = 18, +2026-06-21T01:26:33.2584121Z /// `asset_code` must be non-empty and ≤ 12 characters (Stellar limit). +2026-06-21T01:26:33.2584718Z - InvalidAssetCode = 19, +2026-06-21T01:26:33.2585101Z + InvalidAssetCode = 19, +2026-06-21T01:26:33.2585550Z /// Last milestone `target_amount` does not equal `goal_amount`. +2026-06-21T01:26:33.2586049Z - MilestoneMismatch = 20, +2026-06-21T01:26:33.2586455Z + MilestoneMismatch = 20, +2026-06-21T01:26:33.2586916Z /// Milestone count must be in the range [1, MAX_MILESTONES]. +2026-06-21T01:26:33.2603121Z - InvalidMilestoneCount = 21, +2026-06-21T01:26:33.2603664Z + InvalidMilestoneCount = 21, +2026-06-21T01:26:33.2604177Z /// The requested campaign status transition is not permitted. +2026-06-21T01:26:33.2604702Z - InvalidCampaignTransition = 22, +2026-06-21T01:26:33.2605142Z + InvalidCampaignTransition = 22, +2026-06-21T01:26:33.2605661Z /// The requested milestone status transition is not permitted. +2026-06-21T01:26:33.2606186Z - InvalidMilestoneTransition = 23, +2026-06-21T01:26:33.2606606Z + InvalidMilestoneTransition = 23, +2026-06-21T01:26:33.2607246Z /// Cannot transition to `GoalReached` — raised amount < goal. +2026-06-21T01:26:33.2607753Z - GoalNotReached = 24, +2026-06-21T01:26:33.2608171Z + GoalNotReached = 24, +2026-06-21T01:26:33.2608515Z +2026-06-21T01:26:33.2609104Z /// A storage read returned an unexpectedly invalid value. +2026-06-21T01:26:33.2609629Z - InvalidStorageValue = 25, +2026-06-21T01:26:33.2610307Z + InvalidStorageValue = 25, +2026-06-21T01:26:33.2610820Z /// A storage write failed (entry too large, quota exceeded, etc.). +2026-06-21T01:26:33.2611583Z - StorageWriteError = 26, +2026-06-21T01:26:33.2611931Z + StorageWriteError = 26, +2026-06-21T01:26:33.2612182Z +2026-06-21T01:26:33.2612631Z // ── Asset / transfer ───────────────────────────────────────────────── 3x +2026-06-21T01:26:33.2613211Z /// Recipient address is the contract itself — would lock funds permanently. +2026-06-21T01:26:33.2613814Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/types.rs:74: +2026-06-21T01:26:33.2614298Z - InvalidRecipient = 30, +2026-06-21T01:26:33.2614602Z + InvalidRecipient = 30, +2026-06-21T01:26:33.2614979Z /// The asset has no issuer address; transfers require a token contract address. +2026-06-21T01:26:33.2615380Z - MissingIssuerAddress = 31, +2026-06-21T01:26:33.2615735Z + MissingIssuerAddress = 31, +2026-06-21T01:26:33.2616119Z /// Computed release amount is zero after proportional rounding. +2026-06-21T01:26:33.2616509Z - ZeroReleaseAmount = 32, +2026-06-21T01:26:33.2616790Z + ZeroReleaseAmount = 32, +2026-06-21T01:26:33.2617166Z /// `released_amount` already equals `target_amount`; nothing left to release. +2026-06-21T01:26:33.2617569Z - NothingToRelease = 33, +2026-06-21T01:26:33.2617838Z + NothingToRelease = 33, +2026-06-21T01:26:33.2618180Z /// `released_amount` would exceed `target_amount` after this operation. +2026-06-21T01:26:33.2618783Z MilestoneReleasedExceedsTarget = 34, +2026-06-21T01:26:33.2619078Z +2026-06-21T01:26:33.2619460Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/types.rs:84: +2026-06-21T01:26:33.2620136Z // ── Milestone ──────────────────────────────────────────────────────── 4x +2026-06-21T01:26:33.2620555Z /// Milestone is already in the `Released` state. +2026-06-21T01:26:33.2620885Z - MilestoneAlreadyReleased = 40, +2026-06-21T01:26:33.2621195Z + MilestoneAlreadyReleased = 40, +2026-06-21T01:26:33.2621584Z /// All milestones must be Released before the campaign can be concluded. +2026-06-21T01:26:33.2621974Z - UnreleasedMilestonesExist = 41, +2026-06-21T01:26:33.2622256Z + UnreleasedMilestonesExist = 41, +2026-06-21T01:26:33.2622512Z +2026-06-21T01:26:33.2622868Z // ── Refunds ────────────────────────────────────────────────────────── 5x +2026-06-21T01:26:33.2623308Z /// Refunds are only permitted when the campaign is `Cancelled` or +2026-06-21T01:26:33.2623852Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/types.rs:92: +2026-06-21T01:26:33.2624321Z /// `Ended` without reaching the goal. +2026-06-21T01:26:33.2624614Z - RefundNotPermitted = 50, +2026-06-21T01:26:33.2624897Z + RefundNotPermitted = 50, +2026-06-21T01:26:33.2625197Z /// No donor record found for the requesting address. +2026-06-21T01:26:33.2625518Z - NoDonorRecord = 51, +2026-06-21T01:26:33.2625790Z + NoDonorRecord = 51, +2026-06-21T01:26:33.2626084Z /// Donor has already claimed a refund for this campaign. +2026-06-21T01:26:33.2626432Z - RefundAlreadyClaimed = 52, +2026-06-21T01:26:33.2626709Z + RefundAlreadyClaimed = 52, +2026-06-21T01:26:33.2627055Z // RefundWindowClosed is defined above as RefundWindowClosed = 12 +2026-06-21T01:26:33.2627409Z +2026-06-21T01:26:33.2627789Z // ── Re-entrancy / concurrency ──────────────────────────────────────── 6x +2026-06-21T01:26:33.2628340Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/types.rs:101: +2026-06-21T01:26:33.2628958Z /// A re-entrant call was detected; operation aborted. +2026-06-21T01:26:33.2629287Z - ReentrantCall = 60, +2026-06-21T01:26:33.2629570Z + ReentrantCall = 60, +2026-06-21T01:26:33.2629800Z +2026-06-21T01:26:33.2630210Z // ── Amount validation ───────────────────────────────────────────────────────── 7x +2026-06-21T01:26:33.2630830Z /// A generic negative or otherwise invalid amount was supplied. +2026-06-21T01:26:33.2631476Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/types.rs:106: +2026-06-21T01:26:33.2631935Z - InvalidAmount = 70, +2026-06-21T01:26:33.2632205Z + InvalidAmount = 70, +2026-06-21T01:26:33.2632429Z +2026-06-21T01:26:33.2632803Z // ── Upgrade / freeze ─────────────────────────────────────────────────── 8x +2026-06-21T01:26:33.2633236Z /// Contract is frozen; all mutating operations are blocked. +2026-06-21T01:26:33.2633735Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/types.rs:110: +2026-06-21T01:26:33.2634187Z - ContractFrozen = 80, +2026-06-21T01:26:33.2634455Z + ContractFrozen = 80, +2026-06-21T01:26:33.2634680Z } +2026-06-21T01:26:33.2634863Z +2026-06-21T01:26:33.2635041Z - +2026-06-21T01:26:33.2635438Z // ─── Campaign lifecycle ─────────────────────────────────────────────────────── +2026-06-21T01:26:33.2635811Z +2026-06-21T01:26:33.2636040Z /// Campaign status with documented transition rules. +2026-06-21T01:26:33.2636535Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/types.rs:163: +2026-06-21T01:26:33.2637022Z pub fn can_transition_to(self, next: Self) -> bool { +2026-06-21T01:26:33.2637331Z matches!( +2026-06-21T01:26:33.2637555Z (self, next), +2026-06-21T01:26:33.2637835Z - (Self::Active, Self::GoalReached) +2026-06-21T01:26:33.2638153Z - | (Self::Active, Self::Ended) +2026-06-21T01:26:33.2638468Z - | (Self::Active, Self::Cancelled) +2026-06-21T01:26:33.2639027Z - | (Self::GoalReached, Self::Ended) +2026-06-21T01:26:33.2639342Z - | (Self::GoalReached, Self::Cancelled) +2026-06-21T01:26:33.2639656Z + (Self::Active, Self::GoalReached) +2026-06-21T01:26:33.2639946Z + | (Self::Active, Self::Ended) +2026-06-21T01:26:33.2640245Z + | (Self::Active, Self::Cancelled) +2026-06-21T01:26:33.2640566Z + | (Self::GoalReached, Self::Ended) +2026-06-21T01:26:33.2640908Z + | (Self::GoalReached, Self::Cancelled) +2026-06-21T01:26:33.2641215Z ) +2026-06-21T01:26:33.2641410Z } +2026-06-21T01:26:33.2641598Z } +2026-06-21T01:26:33.2641990Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/types.rs:453: +2026-06-21T01:26:33.2642445Z +2026-06-21T01:26:33.2642752Z /// Apply a new donation to this record. Panics with `Error::Overflow` if +2026-06-21T01:26:33.2643171Z /// `total_donated` or `donation_count` overflows. +2026-06-21T01:26:33.2643673Z - pub fn apply_donation(&mut self, env: &Env, amount: i128, time: u64, ledger: u32, asset: AssetInfo) { +2026-06-21T01:26:33.2644146Z - self.total_donated = self.total_donated +2026-06-21T01:26:33.2644448Z + pub fn apply_donation( +2026-06-21T01:26:33.2644691Z + &mut self, +2026-06-21T01:26:33.2644907Z + env: &Env, +2026-06-21T01:26:33.2645261Z + amount: i128, +2026-06-21T01:26:33.2645484Z + time: u64, +2026-06-21T01:26:33.2645804Z + ledger: u32, +2026-06-21T01:26:33.2646032Z + asset: AssetInfo, +2026-06-21T01:26:33.2646284Z + ) { +2026-06-21T01:26:33.2646490Z + self.total_donated = self +2026-06-21T01:26:33.2646750Z + .total_donated +2026-06-21T01:26:33.2646987Z .checked_add(amount) +2026-06-21T01:26:33.2647325Z .unwrap_or_else(|| env.panic_with_error(Error::Overflow)); +2026-06-21T01:26:33.2647691Z self.last_donation_time = time; +2026-06-21T01:26:33.2648150Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/types.rs:461: +2026-06-21T01:26:33.2648735Z self.last_donation_ledger = ledger; +2026-06-21T01:26:33.2649051Z - self.donation_count = self.donation_count +2026-06-21T01:26:33.2649360Z + self.donation_count = self +2026-06-21T01:26:33.2649634Z + .donation_count +2026-06-21T01:26:33.2649887Z .checked_add(1) +2026-06-21T01:26:33.2650194Z .unwrap_or_else(|| env.panic_with_error(Error::Overflow)); +2026-06-21T01:26:33.2650535Z self.asset = asset; +2026-06-21T01:26:33.2650945Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/types.rs:569: +2026-06-21T01:26:33.2651387Z pub asset: AssetInfo, +2026-06-21T01:26:33.2651625Z pub ledger: u32, +2026-06-21T01:26:33.2651839Z } +2026-06-21T01:26:33.2652020Z - +2026-06-21T01:26:33.2652210Z - +2026-06-21T01:26:33.2652386Z +2026-06-21T01:26:33.2739431Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/asset_issuing.rs:26: +2026-06-21T01:26:33.2740330Z pub fn from_env() -> Result { +2026-06-21T01:26:33.2740798Z dotenv::dotenv().ok(); +2026-06-21T01:26:33.2741178Z +2026-06-21T01:26:33.2741499Z - let code = env::var("ASSET_CODE") +2026-06-21T01:26:33.2741994Z - .unwrap_or_else(|_| "ORBIT".to_string()); +2026-06-21T01:26:33.2742482Z - +2026-06-21T01:26:33.2742818Z - let name = env::var("ASSET_NAME") +2026-06-21T01:26:33.2743346Z - .unwrap_or_else(|_| "OrbitChain Token".to_string()); +2026-06-21T01:26:33.2743865Z + let code = env::var("ASSET_CODE").unwrap_or_else(|_| "ORBIT".to_string()); +2026-06-21T01:26:33.2744237Z +2026-06-21T01:26:33.2744573Z + let name = env::var("ASSET_NAME").unwrap_or_else(|_| "OrbitChain Token".to_string()); +2026-06-21T01:26:33.2744970Z + +2026-06-21T01:26:33.2745248Z let issuing_secret_key = env::var("SOROBAN_ISSUING_SECRET_KEY") +2026-06-21T01:26:33.2745659Z .context("SOROBAN_ISSUING_SECRET_KEY is required")?; +2026-06-21T01:26:33.2745971Z +2026-06-21T01:26:33.2746393Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/asset_issuing.rs:74: +2026-06-21T01:26:33.2746928Z println!("Asset Code: {}", self.code); +2026-06-21T01:26:33.2747247Z println!("Asset Name: {}", self.name); +2026-06-21T01:26:33.2747609Z println!("Issuer Public Key: {}", self.issuing_public_key); +2026-06-21T01:26:33.2747952Z - +2026-06-21T01:26:33.2748141Z + +2026-06-21T01:26:33.2748359Z if self.issuing_secret_key.len() > 10 { +2026-06-21T01:26:33.2748862Z println!( +2026-06-21T01:26:33.2749121Z "Issuer Secret Key: {}...{}", +2026-06-21T01:26:33.2749636Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/asset_issuing.rs:102: +2026-06-21T01:26:33.2750209Z pub fn generate_issuing_keypair() -> Result<(String, String)> { +2026-06-21T01:26:33.2750653Z // In a real implementation, this would use the stellar-strkey crate +2026-06-21T01:26:33.2751081Z // For now, we provide guidance on how to generate keys +2026-06-21T01:26:33.2751398Z - +2026-06-21T01:26:33.2751585Z + +2026-06-21T01:26:33.2751941Z println!("🔑 Generating Issuing Keypair"); +2026-06-21T01:26:33.2752316Z println!("━━━━━━━━━━━━━━━━━━━━━━━━━━"); +2026-06-21T01:26:33.2752848Z println!(); +2026-06-21T01:26:33.2753314Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/asset_issuing.rs:115: +2026-06-21T01:26:33.2753961Z println!("Then set in your .env file:"); +2026-06-21T01:26:33.2754289Z println!(" SOROBAN_ISSUING_SECRET_KEY=S..."); +2026-06-21T01:26:33.2754621Z println!(" SOROBAN_ISSUING_PUBLIC_KEY=G..."); +2026-06-21T01:26:33.2754903Z - +2026-06-21T01:26:33.2755101Z + +2026-06-21T01:26:33.2755287Z Ok(( +2026-06-21T01:26:33.2755561Z "S_PLACEHOLDER_REPLACE_WITH_YOUR_SECRET_KEY".to_string(), +2026-06-21T01:26:33.2755960Z "G_PLACEHOLDER_REPLACE_WITH_YOUR_PUBLIC_KEY".to_string(), +2026-06-21T01:26:33.2756498Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/asset_issuing.rs:130: +2026-06-21T01:26:33.2757035Z println!("Holder: {}", config.holder_public_key); +2026-06-21T01:26:33.2757356Z println!("Network: {}", network); +2026-06-21T01:26:33.2757621Z println!(); +2026-06-21T01:26:33.2757835Z - +2026-06-21T01:26:33.2758025Z + +2026-06-21T01:26:33.2758225Z // Validate configuration +2026-06-21T01:26:33.2758500Z if config.asset_code.is_empty() { +2026-06-21T01:26:33.2758935Z anyhow::bail!("Asset code is required"); +2026-06-21T01:26:33.2759448Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/asset_issuing.rs:137: +2026-06-21T01:26:33.2759930Z } +2026-06-21T01:26:33.2760115Z - +2026-06-21T01:26:33.2760295Z + +2026-06-21T01:26:33.2760513Z if !config.asset_issuer.starts_with('G') { +2026-06-21T01:26:33.2760924Z anyhow::bail!("Asset issuer must be a valid public key starting with 'G'"); +2026-06-21T01:26:33.2761314Z } +2026-06-21T01:26:33.2761717Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/asset_issuing.rs:142: +2026-06-21T01:26:33.2762185Z - +2026-06-21T01:26:33.2762368Z + +2026-06-21T01:26:33.2762598Z if !config.holder_public_key.starts_with('G') { +2026-06-21T01:26:33.2762981Z anyhow::bail!("Holder public key must start with 'G'"); +2026-06-21T01:26:33.2763303Z } +2026-06-21T01:26:33.2763703Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/asset_issuing.rs:155: +2026-06-21T01:26:33.2764249Z println!(" soroban contract invoke \\"); +2026-06-21T01:26:33.2764723Z println!(" --network {} \\", network); +2026-06-21T01:26:33.2765202Z println!(" --source-account holder \\"); +2026-06-21T01:26:33.2765773Z - println!(" -- change_trust --asset '{}:{}'", +2026-06-21T01:26:33.2767396Z - config.asset_code, config.asset_issuer); +2026-06-21T01:26:33.2767876Z - +2026-06-21T01:26:33.2768173Z + println!( +2026-06-21T01:26:33.2768765Z + " -- change_trust --asset '{}:{}'", +2026-06-21T01:26:33.2769303Z + config.asset_code, config.asset_issuer +2026-06-21T01:26:33.2769744Z + ); +2026-06-21T01:26:33.2770014Z + +2026-06-21T01:26:33.2770306Z Ok(()) +2026-06-21T01:26:33.2770583Z } +2026-06-21T01:26:33.2770846Z +2026-06-21T01:26:33.2771522Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/asset_issuing.rs:170: +2026-06-21T01:26:33.2772335Z ) -> Result<()> { +2026-06-21T01:26:33.2772801Z println!("💰 Issuing Assets"); +2026-06-21T01:26:33.2773119Z println!("━━━━━━━━━━━━━━━━"); +2026-06-21T01:26:33.2773494Z - println!("Asset: {}:{}", asset_config.code, asset_config.issuing_public_key); +2026-06-21T01:26:33.2773943Z + println!( +2026-06-21T01:26:33.2774299Z + "Asset: {}:{}", +2026-06-21T01:26:33.2774687Z + asset_config.code, asset_config.issuing_public_key +2026-06-21T01:26:33.2775002Z + ); +2026-06-21T01:26:33.2775225Z println!("Recipient: {}", recipient); +2026-06-21T01:26:33.2775513Z println!("Amount: {}", amount); +2026-06-21T01:26:33.2775789Z println!("Network: {}", network); +2026-06-21T01:26:33.2776287Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/asset_issuing.rs:178: +2026-06-21T01:26:33.2777012Z +2026-06-21T01:26:33.2777195Z // Validate +2026-06-21T01:26:33.2777538Z asset_config.validate()?; +2026-06-21T01:26:33.2777782Z - +2026-06-21T01:26:33.2777971Z + +2026-06-21T01:26:33.2778171Z if !recipient.starts_with('G') { +2026-06-21T01:26:33.2778758Z anyhow::bail!("Recipient must be a valid public key starting with 'G'"); +2026-06-21T01:26:33.2779157Z } +2026-06-21T01:26:33.2779575Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/asset_issuing.rs:185: +2026-06-21T01:26:33.2780054Z - +2026-06-21T01:26:33.2780240Z + +2026-06-21T01:26:33.2780433Z if amount <= 0.0 { +2026-06-21T01:26:33.2780713Z anyhow::bail!("Amount must be greater than 0"); +2026-06-21T01:26:33.2781014Z } +2026-06-21T01:26:33.2781414Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/asset_issuing.rs:199: +2026-06-21T01:26:33.2781955Z println!(" --source-account issuing_account \\"); +2026-06-21T01:26:33.2782313Z println!(" --destination {} \\", recipient); +2026-06-21T01:26:33.2782637Z println!(" --amount {} \\", amount); +2026-06-21T01:26:33.2783046Z - println!(" --asset '{}:{}' \\", asset_config.code, asset_config.issuing_public_key); +2026-06-21T01:26:33.2783432Z + println!( +2026-06-21T01:26:33.2783647Z + " --asset '{}:{}' \\", +2026-06-21T01:26:33.2783953Z + asset_config.code, asset_config.issuing_public_key +2026-06-21T01:26:33.2784260Z + ); +2026-06-21T01:26:33.2784474Z println!(" --network {}", network); +2026-06-21T01:26:33.2784741Z +2026-06-21T01:26:33.2784916Z Ok(()) +2026-06-21T01:26:33.2785329Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/asset_issuing.rs:211: +2026-06-21T01:26:33.2785919Z println!("━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"); +2026-06-21T01:26:33.2786205Z +2026-06-21T01:26:33.2786430Z let asset_config = AssetConfig::from_env()?; +2026-06-21T01:26:33.2786725Z - +2026-06-21T01:26:33.2786909Z + +2026-06-21T01:26:33.2787105Z // Display current config +2026-06-21T01:26:33.2787381Z asset_config.display(); +2026-06-21T01:26:33.2787624Z println!(); +2026-06-21T01:26:33.2788151Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/blockchain_verification.rs:3: +2026-06-21T01:26:33.2789287Z //! Fetches and verifies Stellar transactions by hash, validates timestamps, +2026-06-21T01:26:33.2790068Z //! generates block explorer URLs, and supports verifiable certificates. +2026-06-21T01:26:33.2790650Z +2026-06-21T01:26:33.2790983Z -use anyhow::{Result, Context, anyhow}; +2026-06-21T01:26:33.2791437Z -use serde::{Serialize, Deserialize}; +2026-06-21T01:26:33.2791873Z +use anyhow::{anyhow, Context, Result}; +2026-06-21T01:26:33.2792304Z +use serde::{Deserialize, Serialize}; +2026-06-21T01:26:33.2792720Z use std::time::{Duration, Instant}; +2026-06-21T01:26:33.2793121Z +2026-06-21T01:26:33.2793397Z /// Transaction verification result +2026-06-21T01:26:33.2793991Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/blockchain_verification.rs:106: +2026-06-21T01:26:33.2796415Z } +2026-06-21T01:26:33.2796739Z +2026-06-21T01:26:33.2797057Z /// Verify a transaction by its hash +2026-06-21T01:26:33.2797843Z - pub async fn verify_transaction(&self, transaction_hash: &str) -> Result { +2026-06-21T01:26:33.2798801Z + pub async fn verify_transaction( +2026-06-21T01:26:33.2799212Z + &self, +2026-06-21T01:26:33.2799478Z + transaction_hash: &str, +2026-06-21T01:26:33.2799769Z + ) -> Result { +2026-06-21T01:26:33.2800086Z let start_time = Instant::now(); +2026-06-21T01:26:33.2800345Z +2026-06-21T01:26:33.2800742Z println!("🔍 Verifying transaction: {}", transaction_hash); +2026-06-21T01:26:33.2801384Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/blockchain_verification.rs:150: +2026-06-21T01:26:33.2802161Z ) -> Result { +2026-06-21T01:26:33.2802459Z let start_time = Instant::now(); +2026-06-21T01:26:33.2802837Z +2026-06-21T01:26:33.2803230Z - println!("🔐 Verifying transaction with state proof: {}", transaction_hash); +2026-06-21T01:26:33.2803641Z + println!( +2026-06-21T01:26:33.2803970Z + "🔐 Verifying transaction with state proof: {}", +2026-06-21T01:26:33.2804296Z + transaction_hash +2026-06-21T01:26:33.2804529Z + ); +2026-06-21T01:26:33.2804716Z +2026-06-21T01:26:33.2804936Z // Fetch transaction with full state +2026-06-21T01:26:33.2805334Z let tx_data = self.fetch_transaction_with_state(transaction_hash).await?; +2026-06-21T01:26:33.2805980Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/blockchain_verification.rs:190: +2026-06-21T01:26:33.2806501Z }; +2026-06-21T01:26:33.2806698Z +2026-06-21T01:26:33.2806908Z let valid = time_diff <= 60; +2026-06-21T01:26:33.2807184Z - +2026-06-21T01:26:33.2807375Z + +2026-06-21T01:26:33.2807571Z if valid { +2026-06-21T01:26:33.2807927Z println!("✅ Timestamp verified (diff: {}s)", time_diff); +2026-06-21T01:26:33.2808275Z } else { +2026-06-21T01:26:33.2809057Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/blockchain_verification.rs:207: +2026-06-21T01:26:33.2810128Z async fn fetch_transaction(&self, hash: &str) -> Result { +2026-06-21T01:26:33.2810628Z // In production, this would make an actual HTTP request to Horizon/RPC +2026-06-21T01:26:33.2811025Z // For now, simulate the structure +2026-06-21T01:26:33.2811295Z - +2026-06-21T01:26:33.2811483Z + +2026-06-21T01:26:33.2811675Z // Simulate network call +2026-06-21T01:26:33.2812007Z tokio::time::sleep(Duration::from_millis(100)).await; +2026-06-21T01:26:33.2812314Z +2026-06-21T01:26:33.2812777Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/blockchain_verification.rs:240: +2026-06-21T01:26:33.2813299Z } +2026-06-21T01:26:33.2813499Z +2026-06-21T01:26:33.2813693Z /// Verify transaction details +2026-06-21T01:26:33.2814169Z - async fn verify_transaction_details(&self, tx_data: &TransactionData) -> Result { +2026-06-21T01:26:33.2814649Z + async fn verify_transaction_details( +2026-06-21T01:26:33.2815001Z + &self, +2026-06-21T01:26:33.2815350Z + tx_data: &TransactionData, +2026-06-21T01:26:33.2815769Z + ) -> Result { +2026-06-21T01:26:33.2816211Z let mut warnings = Vec::new(); +2026-06-21T01:26:33.2816602Z +2026-06-21T01:26:33.2817291Z // Verify signature (placeholder - would use Stellar SDK in production) +2026-06-21T01:26:33.2818348Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/blockchain_verification.rs:323: +2026-06-21T01:26:33.2819772Z println!("\n📋 Transaction Verification Result"); +2026-06-21T01:26:33.2820448Z println!("━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"); +2026-06-21T01:26:33.2821037Z println!("Transaction Hash: {}", result.transaction_hash); +2026-06-21T01:26:33.2821864Z - println!("Verified: {}", if result.verified { "✅ Yes" } else { "❌ No" }); +2026-06-21T01:26:33.2822447Z + println!( +2026-06-21T01:26:33.2822772Z + "Verified: {}", +2026-06-21T01:26:33.2823288Z + if result.verified { "✅ Yes" } else { "❌ No" } +2026-06-21T01:26:33.2823751Z + ); +2026-06-21T01:26:33.2824117Z println!("Status: {}", result.details.status); +2026-06-21T01:26:33.2824571Z - +2026-06-21T01:26:33.2824843Z + +2026-06-21T01:26:33.2825182Z if let Some(ledger) = result.ledger_number { +2026-06-21T01:26:33.2825662Z println!("Ledger: {}", ledger); +2026-06-21T01:26:33.2826079Z } +2026-06-21T01:26:33.2826817Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/blockchain_verification.rs:332: +2026-06-21T01:26:33.2827895Z - +2026-06-21T01:26:33.2828310Z + +2026-06-21T01:26:33.2828783Z if let Some(time) = result.ledger_close_time { +2026-06-21T01:26:33.2829282Z println!("Timestamp: {}", time); +2026-06-21T01:26:33.2830117Z - println!("Timestamp Valid: {}", if result.details.timestamp_valid { "✅" } else { "❌" }); +2026-06-21T01:26:33.2830794Z + println!( +2026-06-21T01:26:33.2831137Z + "Timestamp Valid: {}", +2026-06-21T01:26:33.2831607Z + if result.details.timestamp_valid { +2026-06-21T01:26:33.2832108Z + "✅" +2026-06-21T01:26:33.2832443Z + } else { +2026-06-21T01:26:33.2832824Z + "❌" +2026-06-21T01:26:33.2833144Z + } +2026-06-21T01:26:33.2833533Z + ); +2026-06-21T01:26:33.2833826Z } +2026-06-21T01:26:33.2834092Z +2026-06-21T01:26:33.2834493Z println!("\n🔍 Verification Details:"); +2026-06-21T01:26:33.2835166Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/blockchain_verification.rs:339: +2026-06-21T01:26:33.2835943Z - println!(" Signature Valid: {}", if result.details.signature_valid { "✅" } else { "❌" }); +2026-06-21T01:26:33.2836590Z - println!(" Sequence Valid: {}", if result.details.sequence_valid { "✅" } else { "❌" }); +2026-06-21T01:26:33.2837274Z - println!(" Balance Sufficient: {}", if result.details.balance_sufficient { "✅" } else { "❌" }); +2026-06-21T01:26:33.2837922Z - println!(" Network Match: {}", if result.details.network_match { "✅" } else { "❌" }); +2026-06-21T01:26:33.2838324Z + println!( +2026-06-21T01:26:33.2838547Z + " Signature Valid: {}", +2026-06-21T01:26:33.2839364Z + if result.details.signature_valid { +2026-06-21T01:26:33.2839830Z + "✅" +2026-06-21T01:26:33.2840053Z + } else { +2026-06-21T01:26:33.2840298Z + "❌" +2026-06-21T01:26:33.2840581Z + } +2026-06-21T01:26:33.2840881Z + ); +2026-06-21T01:26:33.2841178Z + println!( +2026-06-21T01:26:33.2841522Z + " Sequence Valid: {}", +2026-06-21T01:26:33.2841972Z + if result.details.sequence_valid { +2026-06-21T01:26:33.2842456Z + "✅" +2026-06-21T01:26:33.2842757Z + } else { +2026-06-21T01:26:33.2843105Z + "❌" +2026-06-21T01:26:33.2843407Z + } +2026-06-21T01:26:33.2843712Z + ); +2026-06-21T01:26:33.2843987Z + println!( +2026-06-21T01:26:33.2844322Z + " Balance Sufficient: {}", +2026-06-21T01:26:33.2844788Z + if result.details.balance_sufficient { +2026-06-21T01:26:33.2845273Z + "✅" +2026-06-21T01:26:33.2845582Z + } else { +2026-06-21T01:26:33.2845934Z + "❌" +2026-06-21T01:26:33.2846229Z + } +2026-06-21T01:26:33.2846508Z + ); +2026-06-21T01:26:33.2846786Z + println!( +2026-06-21T01:26:33.2847107Z + " Network Match: {}", +2026-06-21T01:26:33.2847560Z + if result.details.network_match { +2026-06-21T01:26:33.2848038Z + "✅" +2026-06-21T01:26:33.2848342Z + } else { +2026-06-21T01:26:33.2848841Z + "❌" +2026-06-21T01:26:33.2849140Z + } +2026-06-21T01:26:33.2849435Z + ); +2026-06-21T01:26:33.2849711Z +2026-06-21T01:26:33.2850048Z if !result.details.warnings.is_empty() { +2026-06-21T01:26:33.2850615Z println!("\n⚠️ Warnings:"); +2026-06-21T01:26:33.2851489Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/blockchain_verification.rs:389: +2026-06-21T01:26:33.2852353Z } +2026-06-21T01:26:33.2852626Z +2026-06-21T01:26:33.2852986Z /// Verify the certificate's blockchain transaction +2026-06-21T01:26:33.2853799Z - pub async fn verify(&mut self, verifier: &BlockchainVerifier) -> Result<&TransactionVerification> { +2026-06-21T01:26:33.2854558Z + pub async fn verify( +2026-06-21T01:26:33.2855112Z + &mut self, +2026-06-21T01:26:33.2855452Z + verifier: &BlockchainVerifier, +2026-06-21T01:26:33.2856053Z + ) -> Result<&TransactionVerification> { +2026-06-21T01:26:33.2856715Z let verification = verifier.verify_transaction(&self.transaction_hash).await?; +2026-06-21T01:26:33.2857422Z self.verification = Some(verification); +2026-06-21T01:26:33.2857989Z - self.verified_at = Some(std::time::SystemTime::now() +2026-06-21T01:26:33.2858543Z - .duration_since(std::time::UNIX_EPOCH) +2026-06-21T01:26:33.2859148Z - .unwrap() +2026-06-21T01:26:33.2859486Z - .as_secs()); +2026-06-21T01:26:33.2859833Z - +2026-06-21T01:26:33.2860137Z + self.verified_at = Some( +2026-06-21T01:26:33.2860582Z + std::time::SystemTime::now() +2026-06-21T01:26:33.2861059Z + .duration_since(std::time::UNIX_EPOCH) +2026-06-21T01:26:33.2861509Z + .unwrap() +2026-06-21T01:26:33.2861871Z + .as_secs(), +2026-06-21T01:26:33.2862223Z + ); +2026-06-21T01:26:33.2862499Z + +2026-06-21T01:26:33.2862719Z Ok(self.verification.as_ref().unwrap()) +2026-06-21T01:26:33.2863000Z } +2026-06-21T01:26:33.2863194Z +2026-06-21T01:26:33.2863652Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/blockchain_verification.rs:422: +2026-06-21T01:26:33.2864234Z async fn test_verify_transaction() { +2026-06-21T01:26:33.2864542Z let verifier = BlockchainVerifier::new(); +2026-06-21T01:26:33.2864947Z let result = verifier.verify_transaction("test_hash_123").await.unwrap(); +2026-06-21T01:26:33.2865327Z - +2026-06-21T01:26:33.2865513Z + +2026-06-21T01:26:33.2865763Z assert_eq!(result.transaction_hash, "test_hash_123"); +2026-06-21T01:26:33.2866097Z assert!(result.verified); +2026-06-21T01:26:33.2866409Z assert!(!result.block_explorer_url.is_empty()); +2026-06-21T01:26:33.2866965Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/blockchain_verification.rs:431: +2026-06-21T01:26:33.2867511Z #[tokio::test] +2026-06-21T01:26:33.2867750Z async fn test_verify_timestamp() { +2026-06-21T01:26:33.2868052Z let verifier = BlockchainVerifier::new(); +2026-06-21T01:26:33.2868492Z - let result = verifier.verify_timestamp("test_hash_123", 1234567890).await.unwrap(); +2026-06-21T01:26:33.2869136Z - +2026-06-21T01:26:33.2869338Z + let result = verifier +2026-06-21T01:26:33.2869620Z + .verify_timestamp("test_hash_123", 1234567890) +2026-06-21T01:26:33.2869918Z + .await +2026-06-21T01:26:33.2870192Z + .unwrap(); +2026-06-21T01:26:33.2870509Z + +2026-06-21T01:26:33.2870785Z assert!(result); +2026-06-21T01:26:33.2871119Z } +2026-06-21T01:26:33.2871383Z +2026-06-21T01:26:33.2872020Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/blockchain_verification.rs:445: +2026-06-21T01:26:33.2872531Z }; +2026-06-21T01:26:33.2872807Z let verifier = BlockchainVerifier::with_config(config); +2026-06-21T01:26:33.2873185Z let url = verifier.generate_explorer_url("abc123"); +2026-06-21T01:26:33.2873500Z - +2026-06-21T01:26:33.2873683Z + +2026-06-21T01:26:33.2874032Z assert_eq!(url, "https://stellar.expert/explorer/public/tx/abc123"); +2026-06-21T01:26:33.2874399Z } +2026-06-21T01:26:33.2874583Z +2026-06-21T01:26:33.2875025Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/blockchain_verification.rs:452: +2026-06-21T01:26:33.2875567Z #[tokio::test] +2026-06-21T01:26:33.2875812Z async fn test_verifiable_certificate() { +2026-06-21T01:26:33.2876131Z - let mut cert = VerifiableCertificate::new( +2026-06-21T01:26:33.2876440Z - "cert_001".to_string(), +2026-06-21T01:26:33.2876709Z - "tx_hash_456".to_string(), +2026-06-21T01:26:33.2876970Z - ); +2026-06-21T01:26:33.2877161Z - +2026-06-21T01:26:33.2877350Z + let mut cert = +2026-06-21T01:26:33.2877891Z + VerifiableCertificate::new("cert_001".to_string(), "tx_hash_456".to_string()); +2026-06-21T01:26:33.2878418Z + +2026-06-21T01:26:33.2878735Z assert!(!cert.is_verified()); +2026-06-21T01:26:33.2878997Z - +2026-06-21T01:26:33.2879176Z + +2026-06-21T01:26:33.2879394Z let verifier = BlockchainVerifier::new(); +2026-06-21T01:26:33.2879722Z cert.verify(&verifier).await.unwrap(); +2026-06-21T01:26:33.2879994Z - +2026-06-21T01:26:33.2880177Z + +2026-06-21T01:26:33.2880372Z assert!(cert.is_verified()); +2026-06-21T01:26:33.2880654Z assert!(cert.verified_at.is_some()); +2026-06-21T01:26:33.2880961Z assert!(!cert.explorer_url().is_empty()); +2026-06-21T01:26:33.2881479Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/campaign_totals.rs:19: +2026-06-21T01:26:33.2881975Z #[must_use] +2026-06-21T01:26:33.2882176Z #[inline] +2026-06-21T01:26:33.2882519Z pub fn increment(&mut self, campaign_id: u64, asset: &str, amount: i128) -> i128 { +2026-06-21T01:26:33.2883068Z - let entry = self.asset_totals.entry((campaign_id, asset.to_string())).or_insert(0); +2026-06-21T01:26:33.2883167Z + let entry = self +2026-06-21T01:26:33.2883264Z + .asset_totals +2026-06-21T01:26:33.2883392Z + .entry((campaign_id, asset.to_string())) +2026-06-21T01:26:33.2883480Z + .or_insert(0); +2026-06-21T01:26:33.2883572Z *entry += amount; +2026-06-21T01:26:33.2883651Z *entry +2026-06-21T01:26:33.2883737Z } +2026-06-21T01:26:33.2884054Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/campaign_totals.rs:27: +2026-06-21T01:26:33.2884274Z /// Returns the total for a specific `campaign_id` + `asset`, or 0 if none recorded. +2026-06-21T01:26:33.2884365Z #[must_use] +2026-06-21T01:26:33.2884519Z pub fn get(&self, campaign_id: u64, asset: &str) -> i128 { +2026-06-21T01:26:33.2884720Z - *self.asset_totals.get(&(campaign_id, asset.to_string())).unwrap_or(&0) +2026-06-21T01:26:33.2884817Z + *self +2026-06-21T01:26:33.2884910Z + .asset_totals +2026-06-21T01:26:33.2885033Z + .get(&(campaign_id, asset.to_string())) +2026-06-21T01:26:33.2885128Z + .unwrap_or(&0) +2026-06-21T01:26:33.2885205Z } +2026-06-21T01:26:33.2885290Z +2026-06-21T01:26:33.2885574Z /// Returns all asset totals for a campaign as a map of asset → total. +2026-06-21T01:26:33.2886124Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/certificate_pdf.rs:3: +2026-06-21T01:26:33.2886466Z //! Generates PDF certificates from campaign donation data with support for +2026-06-21T01:26:33.2886710Z //! large datasets via chunked processing and streaming mode. +2026-06-21T01:26:33.2886838Z +2026-06-21T01:26:33.2887015Z -use anyhow::{Result, Context, anyhow}; +2026-06-21T01:26:33.2887176Z -use serde::{Serialize, Deserialize}; +2026-06-21T01:26:33.2887342Z +use anyhow::{anyhow, Context, Result}; +2026-06-21T01:26:33.2887515Z +use serde::{Deserialize, Serialize}; +2026-06-21T01:26:33.2887670Z use std::time::{Duration, Instant}; +2026-06-21T01:26:33.2887799Z +2026-06-21T01:26:33.2887958Z /// Configuration for PDF generation +2026-06-21T01:26:33.2888489Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/certificate_pdf.rs:131: +2026-06-21T01:26:33.2888750Z total_pages, +2026-06-21T01:26:33.2888881Z total_chunks, +2026-06-21T01:26:33.2889171Z generation_time_ms: start_time.elapsed().as_millis() as u64, +2026-06-21T01:26:33.2889544Z - error: Some(format!("Timeout after {} seconds", self.config.timeout_seconds)), +2026-06-21T01:26:33.2889696Z + error: Some(format!( +2026-06-21T01:26:33.2889876Z + "Timeout after {} seconds", +2026-06-21T01:26:33.2890038Z + self.config.timeout_seconds +2026-06-21T01:26:33.2890171Z + )), +2026-06-21T01:26:33.2890495Z is_streamed: true, +2026-06-21T01:26:33.2890746Z }); +2026-06-21T01:26:33.2890873Z } +2026-06-21T01:26:33.2891404Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/certificate_pdf.rs:138: +2026-06-21T01:26:33.2891520Z +2026-06-21T01:26:33.2891782Z - println!(" Processing chunk {}/{} ({} certificates)...", +2026-06-21T01:26:33.2892036Z - chunk_idx + 1, total_chunks, chunk.certificates.len()); +2026-06-21T01:26:33.2892172Z + println!( +2026-06-21T01:26:33.2892392Z + " Processing chunk {}/{} ({} certificates)...", +2026-06-21T01:26:33.2892527Z + chunk_idx + 1, +2026-06-21T01:26:33.2892671Z + total_chunks, +2026-06-21T01:26:33.2892834Z + chunk.certificates.len() +2026-06-21T01:26:33.2892952Z + ); +2026-06-21T01:26:33.2893074Z +2026-06-21T01:26:33.2893208Z // Process chunk +2026-06-21T01:26:33.2893514Z let chunk_pages = self.process_chunk(chunk, &mut pdf_buffer)?; +2026-06-21T01:26:33.2893934Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/certificate_pdf.rs:145: +2026-06-21T01:26:33.2894012Z +2026-06-21T01:26:33.2894109Z // Log progress +2026-06-21T01:26:33.2894299Z let progress = ((chunk_idx + 1) as f64 / total_chunks as f64) * 100.0; +2026-06-21T01:26:33.2894510Z - println!(" Progress: {:.1}% ({} pages generated)", progress, total_pages); +2026-06-21T01:26:33.2894602Z + println!( +2026-06-21T01:26:33.2894727Z + " Progress: {:.1}% ({} pages generated)", +2026-06-21T01:26:33.2894837Z + progress, total_pages +2026-06-21T01:26:33.2894923Z + ); +2026-06-21T01:26:33.2895001Z } +2026-06-21T01:26:33.2895084Z +2026-06-21T01:26:33.2895176Z // Finalize PDF +2026-06-21T01:26:33.2895496Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/certificate_pdf.rs:157: +2026-06-21T01:26:33.2895590Z +2026-06-21T01:26:33.2895719Z let generation_time = start_time.elapsed(); +2026-06-21T01:26:33.2895807Z +2026-06-21T01:26:33.2896064Z - println!("✅ PDF generation complete: {} pages in {:.2}s", +2026-06-21T01:26:33.2896213Z - total_pages, generation_time.as_secs_f64()); +2026-06-21T01:26:33.2896303Z + println!( +2026-06-21T01:26:33.2896496Z + "✅ PDF generation complete: {} pages in {:.2}s", +2026-06-21T01:26:33.2896594Z + total_pages, +2026-06-21T01:26:33.2896704Z + generation_time.as_secs_f64() +2026-06-21T01:26:33.2896785Z + ); +2026-06-21T01:26:33.2896867Z +2026-06-21T01:26:33.2896969Z Ok(PdfGenerationResult { +2026-06-21T01:26:33.2897069Z success: true, +2026-06-21T01:26:33.2897407Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/certificate_pdf.rs:217: +2026-06-21T01:26:33.2897511Z /// Split certificates into chunks +2026-06-21T01:26:33.2897767Z fn create_chunks(&self, certificates: &[CertificateData]) -> Vec { +2026-06-21T01:26:33.2897895Z let total_certs = certificates.len(); +2026-06-21T01:26:33.2898175Z - let chunks_per_set = (total_certs + self.config.pages_per_chunk - 1) / self.config.pages_per_chunk; +2026-06-21T01:26:33.2898275Z + let chunks_per_set = +2026-06-21T01:26:33.2898498Z + (total_certs + self.config.pages_per_chunk - 1) / self.config.pages_per_chunk; +2026-06-21T01:26:33.2898824Z let mut chunks = Vec::new(); +2026-06-21T01:26:33.2898909Z +2026-06-21T01:26:33.2899020Z for chunk_idx in 0..chunks_per_set { +2026-06-21T01:26:33.2899346Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/certificate_pdf.rs:224: +2026-06-21T01:26:33.2899501Z let start = chunk_idx * self.config.pages_per_chunk; +2026-06-21T01:26:33.2899677Z let end = (start + self.config.pages_per_chunk).min(total_certs); +2026-06-21T01:26:33.2899916Z - +2026-06-21T01:26:33.2899993Z + +2026-06-21T01:26:33.2900259Z let chunk_certs = certificates[start..end].to_vec(); +2026-06-21T01:26:33.2900422Z let page_count = self.estimate_page_count(&chunk_certs); +2026-06-21T01:26:33.2900498Z +2026-06-21T01:26:33.2900812Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/certificate_pdf.rs:242: +2026-06-21T01:26:33.2901023Z fn estimate_page_count(&self, certificates: &[CertificateData]) -> usize { +2026-06-21T01:26:33.2901126Z // Base: 1 page per certificate +2026-06-21T01:26:33.2901331Z // Additional pages for attachments (roughly 1 page per 5 attachments) +2026-06-21T01:26:33.2901440Z - certificates.iter().map(|cert| { +2026-06-21T01:26:33.2901556Z - 1 + (cert.attachments.len() + 4) / 5 +2026-06-21T01:26:33.2901646Z - }).sum() +2026-06-21T01:26:33.2901735Z + certificates +2026-06-21T01:26:33.2901833Z + .iter() +2026-06-21T01:26:33.2901980Z + .map(|cert| 1 + (cert.attachments.len() + 4) / 5) +2026-06-21T01:26:33.2902069Z + .sum() +2026-06-21T01:26:33.2902153Z } +2026-06-21T01:26:33.2902231Z +2026-06-21T01:26:33.2902344Z /// Initialize PDF document structure +2026-06-21T01:26:33.2902651Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/certificate_pdf.rs:257: +2026-06-21T01:26:33.2902728Z } +2026-06-21T01:26:33.2902815Z +2026-06-21T01:26:33.2902916Z /// Process a chunk of certificates +2026-06-21T01:26:33.2903015Z - fn process_chunk( +2026-06-21T01:26:33.2903112Z - &self, +2026-06-21T01:26:33.2903212Z - chunk: &CertificateChunk, +2026-06-21T01:26:33.2903314Z - buffer: &mut Vec, +2026-06-21T01:26:33.2903411Z - ) -> Result { +2026-06-21T01:26:33.2903667Z + fn process_chunk(&self, chunk: &CertificateChunk, buffer: &mut Vec) -> Result { +2026-06-21T01:26:33.2903859Z let pages = self.render_certificates(&chunk.certificates, buffer)?; +2026-06-21T01:26:33.2903952Z Ok(pages) +2026-06-21T01:26:33.2904044Z } +2026-06-21T01:26:33.2904353Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/certificate_pdf.rs:276: +2026-06-21T01:26:33.2904430Z +2026-06-21T01:26:33.2904539Z for cert in certificates { +2026-06-21T01:26:33.2904644Z // Render certificate header +2026-06-21T01:26:33.2904742Z - let cert_header = format!( +2026-06-21T01:26:33.2904851Z - "\n% Certificate: {}\n", +2026-06-21T01:26:33.2904935Z - cert.id +2026-06-21T01:26:33.2905024Z - ); +2026-06-21T01:26:33.2905192Z + let cert_header = format!("\n% Certificate: {}\n", cert.id); +2026-06-21T01:26:33.2905331Z buffer.extend_from_slice(cert_header.as_bytes()); +2026-06-21T01:26:33.2905418Z +2026-06-21T01:26:33.2905518Z // Render certificate content +2026-06-21T01:26:33.2905844Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/certificate_pdf.rs:286: +2026-06-21T01:26:33.2905949Z let content = format!( +2026-06-21T01:26:33.2906115Z "Recipient: {}\nCampaign: {}\nAmount: {}\nTimestamp: {}\n", +2026-06-21T01:26:33.2906222Z - cert.recipient_name, +2026-06-21T01:26:33.2906325Z - cert.campaign_name, +2026-06-21T01:26:33.2906414Z - cert.amount, +2026-06-21T01:26:33.2906513Z - cert.timestamp +2026-06-21T01:26:33.2906723Z + cert.recipient_name, cert.campaign_name, cert.amount, cert.timestamp +2026-06-21T01:26:33.2906811Z ); +2026-06-21T01:26:33.2906951Z buffer.extend_from_slice(content.as_bytes()); +2026-06-21T01:26:33.2907030Z +2026-06-21T01:26:33.2907342Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/certificate_pdf.rs:296: +2026-06-21T01:26:33.2907461Z if !cert.attachments.is_empty() { +2026-06-21T01:26:33.2907817Z let att_header = format!("Attachments ({}):\n", cert.attachments.len()); +2026-06-21T01:26:33.2908050Z buffer.extend_from_slice(att_header.as_bytes()); +2026-06-21T01:26:33.2908137Z - +2026-06-21T01:26:33.2908214Z + +2026-06-21T01:26:33.2908394Z for (idx, attachment) in cert.attachments.iter().enumerate() { +2026-06-21T01:26:33.2908545Z let att_line = format!(" {}. {}\n", idx + 1, attachment); +2026-06-21T01:26:33.2908806Z buffer.extend_from_slice(att_line.as_bytes()); +2026-06-21T01:26:33.2909121Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/certificate_pdf.rs:322: +2026-06-21T01:26:33.2909226Z certificates: &[CertificateData], +2026-06-21T01:26:33.2909327Z output_path: &str, +2026-06-21T01:26:33.2909439Z ) -> Result { +2026-06-21T01:26:33.2909539Z - use std::io::Write; +2026-06-21T01:26:33.2909642Z use std::fs::File; +2026-06-21T01:26:33.2909733Z + use std::io::Write; +2026-06-21T01:26:33.2909822Z +2026-06-21T01:26:33.2909929Z let start_time = Instant::now(); +2026-06-21T01:26:33.2910105Z let timeout = Duration::from_secs(self.config.timeout_seconds); +2026-06-21T01:26:33.2910414Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/certificate_pdf.rs:330: +2026-06-21T01:26:33.2910497Z +2026-06-21T01:26:33.2910618Z - let mut file = File::create(output_path) +2026-06-21T01:26:33.2910796Z - .context(format!("Failed to create file: {}", output_path))?; +2026-06-21T01:26:33.2910884Z + let mut file = +2026-06-21T01:26:33.2911143Z + File::create(output_path).context(format!("Failed to create file: {}", output_path))?; +2026-06-21T01:26:33.2911224Z +2026-06-21T01:26:33.2911314Z // Write PDF header +2026-06-21T01:26:33.2911424Z writeln!(file, "%PDF-1.4")?; +2026-06-21T01:26:33.2911727Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/certificate_pdf.rs:336: +2026-06-21T01:26:33.2911984Z - writeln!(file, "%% Generated by OrbitChain Certificate Generator (Streaming Mode)")?; +2026-06-21T01:26:33.2912075Z + writeln!( +2026-06-21T01:26:33.2912155Z + file, +2026-06-21T01:26:33.2912349Z + "%% Generated by OrbitChain Certificate Generator (Streaming Mode)" +2026-06-21T01:26:33.2912435Z + )?; +2026-06-21T01:26:33.2912511Z +2026-06-21T01:26:33.2912630Z let total_certs = certificates.len(); +2026-06-21T01:26:33.2912728Z let mut page_count = 0; +2026-06-21T01:26:33.2913033Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/certificate_pdf.rs:346: +2026-06-21T01:26:33.2913132Z success: false, +2026-06-21T01:26:33.2913262Z file_path: Some(output_path.to_string()), +2026-06-21T01:26:33.2913377Z total_pages: page_count, +2026-06-21T01:26:33.2913668Z - total_chunks: (total_certs + self.config.pages_per_chunk - 1) / self.config.pages_per_chunk, +2026-06-21T01:26:33.2913853Z + total_chunks: (total_certs + self.config.pages_per_chunk - 1) +2026-06-21T01:26:33.2913981Z + / self.config.pages_per_chunk, +2026-06-21T01:26:33.2914160Z generation_time_ms: start_time.elapsed().as_millis() as u64, +2026-06-21T01:26:33.2914395Z - error: Some(format!("Timeout after {} seconds", self.config.timeout_seconds)), +2026-06-21T01:26:33.2914496Z + error: Some(format!( +2026-06-21T01:26:33.2914608Z + "Timeout after {} seconds", +2026-06-21T01:26:33.2914721Z + self.config.timeout_seconds +2026-06-21T01:26:33.2914810Z + )), +2026-06-21T01:26:33.2914905Z is_streamed: true, +2026-06-21T01:26:33.2914996Z }); +2026-06-21T01:26:33.2915075Z } +2026-06-21T01:26:33.2915533Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/certificate_pdf.rs:359: +2026-06-21T01:26:33.2915807Z writeln!(file, "Campaign: {}", cert.campaign_name)?; +2026-06-21T01:26:33.2915936Z writeln!(file, "Amount: {}", cert.amount)?; +2026-06-21T01:26:33.2916087Z writeln!(file, "Timestamp: {}", cert.timestamp)?; +2026-06-21T01:26:33.2916176Z - +2026-06-21T01:26:33.2916254Z + +2026-06-21T01:26:33.2916379Z if !cert.attachments.is_empty() { +2026-06-21T01:26:33.2916556Z writeln!(file, "Attachments ({}):", cert.attachments.len())?; +2026-06-21T01:26:33.2916746Z for (idx, attachment) in cert.attachments.iter().enumerate() { +2026-06-21T01:26:33.2917055Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/certificate_pdf.rs:366: +2026-06-21T01:26:33.2917194Z writeln!(file, " {}. {}", idx + 1, attachment)?; +2026-06-21T01:26:33.2917290Z } +2026-06-21T01:26:33.2917374Z } +2026-06-21T01:26:33.2917457Z - +2026-06-21T01:26:33.2917540Z + +2026-06-21T01:26:33.2917636Z writeln!(file, "---")?; +2026-06-21T01:26:33.2917788Z page_count += 1 + (cert.attachments.len() + 4) / 5; +2026-06-21T01:26:33.2917888Z processed += 1; +2026-06-21T01:26:33.2918185Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/certificate_pdf.rs:375: +2026-06-21T01:26:33.2918310Z // Flush periodically to manage memory +2026-06-21T01:26:33.2918418Z if processed % 100 == 0 { +2026-06-21T01:26:33.2918508Z file.flush()?; +2026-06-21T01:26:33.2918828Z - println!(" Processed {} / {} certificates...", processed, total_certs); +2026-06-21T01:26:33.2918918Z + println!( +2026-06-21T01:26:33.2919049Z + " Processed {} / {} certificates...", +2026-06-21T01:26:33.2919163Z + processed, total_certs +2026-06-21T01:26:33.2919247Z + ); +2026-06-21T01:26:33.2919333Z } +2026-06-21T01:26:33.2919418Z } +2026-06-21T01:26:33.2919495Z +2026-06-21T01:26:33.2919804Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/certificate_pdf.rs:388: +2026-06-21T01:26:33.2919894Z success: true, +2026-06-21T01:26:33.2920025Z file_path: Some(output_path.to_string()), +2026-06-21T01:26:33.2920131Z total_pages: page_count, +2026-06-21T01:26:33.2920400Z - total_chunks: (total_certs + self.config.pages_per_chunk - 1) / self.config.pages_per_chunk, +2026-06-21T01:26:33.2920574Z + total_chunks: (total_certs + self.config.pages_per_chunk - 1) +2026-06-21T01:26:33.2920699Z + / self.config.pages_per_chunk, +2026-06-21T01:26:33.2920857Z generation_time_ms: generation_time.as_millis() as u64, +2026-06-21T01:26:33.2920961Z error: None, +2026-06-21T01:26:33.2921052Z is_streamed: true, +2026-06-21T01:26:33.2921372Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/certificate_pdf.rs:401: +2026-06-21T01:26:33.2921473Z use super::*; +2026-06-21T01:26:33.2921553Z +2026-06-21T01:26:33.2921742Z fn create_test_certificates(count: usize) -> Vec { +2026-06-21T01:26:33.2921860Z - (0..count).map(|i| CertificateData { +2026-06-21T01:26:33.2921960Z - id: format!("cert_{:04}", i), +2026-06-21T01:26:33.2922099Z - recipient_name: format!("Recipient {}", i), +2026-06-21T01:26:33.2922227Z - campaign_name: format!("Campaign {}", i % 10), +2026-06-21T01:26:33.2922331Z - amount: 1000 + (i as i128), +2026-06-21T01:26:33.2922445Z - timestamp: 1234567890 + (i as u64), +2026-06-21T01:26:33.2922541Z - attachments: if i % 5 == 0 { +2026-06-21T01:26:33.2922698Z - vec!["doc1.pdf".to_string(), "doc2.pdf".to_string()] +2026-06-21T01:26:33.2922932Z - } else { +2026-06-21T01:26:33.2923130Z - vec![] +2026-06-21T01:26:33.2923219Z - }, +2026-06-21T01:26:33.2923302Z - }).collect() +2026-06-21T01:26:33.2923393Z + (0..count) +2026-06-21T01:26:33.2923506Z + .map(|i| CertificateData { +2026-06-21T01:26:33.2923618Z + id: format!("cert_{:04}", i), +2026-06-21T01:26:33.2923764Z + recipient_name: format!("Recipient {}", i), +2026-06-21T01:26:33.2923901Z + campaign_name: format!("Campaign {}", i % 10), +2026-06-21T01:26:33.2924009Z + amount: 1000 + (i as i128), +2026-06-21T01:26:33.2924128Z + timestamp: 1234567890 + (i as u64), +2026-06-21T01:26:33.2924230Z + attachments: if i % 5 == 0 { +2026-06-21T01:26:33.2924388Z + vec!["doc1.pdf".to_string(), "doc2.pdf".to_string()] +2026-06-21T01:26:33.2924483Z + } else { +2026-06-21T01:26:33.2924574Z + vec![] +2026-06-21T01:26:33.2924665Z + }, +2026-06-21T01:26:33.2924751Z + }) +2026-06-21T01:26:33.2924843Z + .collect() +2026-06-21T01:26:33.2924936Z } +2026-06-21T01:26:33.2934060Z +2026-06-21T01:26:33.2934265Z #[test] +2026-06-21T01:26:33.2934645Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/certificate_pdf.rs:419: +2026-06-21T01:26:33.2934769Z fn test_small_pdf_generation() { +2026-06-21T01:26:33.2934941Z let generator = CertificatePdfGenerator::new(); +2026-06-21T01:26:33.2935065Z let certs = create_test_certificates(10); +2026-06-21T01:26:33.2935307Z - let result = generator.generate_pdf(&certs, "/tmp/test_small.pdf").unwrap(); +2026-06-21T01:26:33.2935396Z - +2026-06-21T01:26:33.2935495Z + let result = generator +2026-06-21T01:26:33.2935638Z + .generate_pdf(&certs, "/tmp/test_small.pdf") +2026-06-21T01:26:33.2935725Z + .unwrap(); +2026-06-21T01:26:33.2935830Z + +2026-06-21T01:26:33.2935937Z assert!(result.success); +2026-06-21T01:26:33.2936057Z assert_eq!(result.total_chunks, 1); +2026-06-21T01:26:33.2936168Z assert!(!result.is_streamed); +2026-06-21T01:26:33.2936516Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/certificate_pdf.rs:427: +2026-06-21T01:26:33.2936596Z - +2026-06-21T01:26:33.2936681Z + +2026-06-21T01:26:33.2936766Z // Cleanup +2026-06-21T01:26:33.2936922Z let _ = std::fs::remove_file("/tmp/test_small.pdf"); +2026-06-21T01:26:33.2937008Z } +2026-06-21T01:26:33.2937311Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/certificate_pdf.rs:433: +2026-06-21T01:26:33.2937440Z fn test_large_pdf_generation_with_chunking() { +2026-06-21T01:26:33.2937584Z let generator = CertificatePdfGenerator::new(); +2026-06-21T01:26:33.2937809Z let certs = create_test_certificates(150); // Should trigger chunking (>50 pages) +2026-06-21T01:26:33.2938030Z - let result = generator.generate_pdf(&certs, "/tmp/test_large.pdf").unwrap(); +2026-06-21T01:26:33.2938115Z - +2026-06-21T01:26:33.2938216Z + let result = generator +2026-06-21T01:26:33.2938344Z + .generate_pdf(&certs, "/tmp/test_large.pdf") +2026-06-21T01:26:33.2938427Z + .unwrap(); +2026-06-21T01:26:33.2938512Z + +2026-06-21T01:26:33.2938739Z assert!(result.success); +2026-06-21T01:26:33.2938847Z assert!(result.total_chunks > 1); +2026-06-21T01:26:33.2938950Z assert!(result.is_streamed); +2026-06-21T01:26:33.2939266Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/certificate_pdf.rs:441: +2026-06-21T01:26:33.2939352Z - +2026-06-21T01:26:33.2939432Z + +2026-06-21T01:26:33.2939514Z // Cleanup +2026-06-21T01:26:33.2939662Z let _ = std::fs::remove_file("/tmp/test_large.pdf"); +2026-06-21T01:26:33.2939738Z } +2026-06-21T01:26:33.2940243Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/certificate_pdf.rs:447: +2026-06-21T01:26:33.2940469Z fn test_streaming_pdf_generation() { +2026-06-21T01:26:33.2940607Z let generator = CertificatePdfGenerator::new(); +2026-06-21T01:26:33.2940729Z let certs = create_test_certificates(200); +2026-06-21T01:26:33.2941006Z - let result = generator.generate_streaming_pdf(&certs, "/tmp/test_streaming.pdf").unwrap(); +2026-06-21T01:26:33.2941084Z - +2026-06-21T01:26:33.2941184Z + let result = generator +2026-06-21T01:26:33.2941360Z + .generate_streaming_pdf(&certs, "/tmp/test_streaming.pdf") +2026-06-21T01:26:33.2941443Z + .unwrap(); +2026-06-21T01:26:33.2941525Z + +2026-06-21T01:26:33.2941621Z assert!(result.success); +2026-06-21T01:26:33.2941723Z assert!(result.is_streamed); +2026-06-21T01:26:33.2941827Z assert!(result.total_pages > 0); +2026-06-21T01:26:33.2942128Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/certificate_pdf.rs:455: +2026-06-21T01:26:33.2942221Z - +2026-06-21T01:26:33.2942303Z + +2026-06-21T01:26:33.2942392Z // Cleanup +2026-06-21T01:26:33.2942545Z let _ = std::fs::remove_file("/tmp/test_streaming.pdf"); +2026-06-21T01:26:33.2942622Z } +2026-06-21T01:26:33.2942924Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/certificate_pdf.rs:462: +2026-06-21T01:26:33.2943056Z let generator = CertificatePdfGenerator::new(); +2026-06-21T01:26:33.2943173Z let certs = create_test_certificates(150); +2026-06-21T01:26:33.2943306Z let chunks = generator.create_chunks(&certs); +2026-06-21T01:26:33.2943385Z - +2026-06-21T01:26:33.2943469Z + +2026-06-21T01:26:33.2943572Z assert!(chunks.len() > 1); +2026-06-21T01:26:33.2943784Z - assert_eq!(chunks.iter().map(|c| c.certificates.len()).sum::(), 150); +2026-06-21T01:26:33.2943875Z + assert_eq!( +2026-06-21T01:26:33.2944052Z + chunks.iter().map(|c| c.certificates.len()).sum::(), +2026-06-21T01:26:33.2944137Z + 150 +2026-06-21T01:26:33.2944223Z + ); +2026-06-21T01:26:33.2944301Z } +2026-06-21T01:26:33.2944386Z +2026-06-21T01:26:33.2944471Z #[test] +2026-06-21T01:26:33.2944789Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/certificate_pdf.rs:472: +2026-06-21T01:26:33.2944931Z let generator = CertificatePdfGenerator::new(); +2026-06-21T01:26:33.2945048Z let certs = create_test_certificates(10); +2026-06-21T01:26:33.2945195Z let pages = generator.estimate_page_count(&certs); +2026-06-21T01:26:33.2945278Z - +2026-06-21T01:26:33.2945353Z + +2026-06-21T01:26:33.2945512Z assert!(pages >= 10); // At least 1 page per certificate +2026-06-21T01:26:33.2945594Z } +2026-06-21T01:26:33.2945669Z +2026-06-21T01:26:33.2945982Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/certificate_pdf.rs:485: +2026-06-21T01:26:33.2946085Z streaming_threshold_mb: 5, +2026-06-21T01:26:33.2946175Z }; +2026-06-21T01:26:33.2946356Z let generator = CertificatePdfGenerator::with_config(config); +2026-06-21T01:26:33.2946434Z - +2026-06-21T01:26:33.2946516Z + +2026-06-21T01:26:33.2946634Z let certs = create_test_certificates(100); +2026-06-21T01:26:33.2946845Z - let result = generator.generate_pdf(&certs, "/tmp/test_config.pdf").unwrap(); +2026-06-21T01:26:33.2946931Z - +2026-06-21T01:26:33.2947025Z + let result = generator +2026-06-21T01:26:33.2947161Z + .generate_pdf(&certs, "/tmp/test_config.pdf") +2026-06-21T01:26:33.2947253Z + .unwrap(); +2026-06-21T01:26:33.2947328Z + +2026-06-21T01:26:33.2947430Z assert!(result.success); +2026-06-21T01:26:33.2947533Z assert!(result.total_chunks > 1); +2026-06-21T01:26:33.2947621Z - +2026-06-21T01:26:33.2947701Z + +2026-06-21T01:26:33.2947781Z // Cleanup +2026-06-21T01:26:33.2948033Z let _ = std::fs::remove_file("/tmp/test_config.pdf"); +2026-06-21T01:26:33.2948197Z } +2026-06-21T01:26:33.2948513Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/encrypted_vault.rs:73: +2026-06-21T01:26:33.2948708Z +2026-06-21T01:26:33.2948801Z // Load public keys +2026-06-21T01:26:33.2948963Z if let Ok(admin_pub) = env::var("SOROBAN_ADMIN_PUBLIC_KEY") { +2026-06-21T01:26:33.2949167Z - vault.public_keys.insert("admin_public_key".to_string(), admin_pub); +2026-06-21T01:26:33.2949248Z + vault +2026-06-21T01:26:33.2949343Z + .public_keys +2026-06-21T01:26:33.2949491Z + .insert("admin_public_key".to_string(), admin_pub); +2026-06-21T01:26:33.2949568Z } +2026-06-21T01:26:33.2949741Z if let Ok(issuing_pub) = env::var("SOROBAN_ISSUING_PUBLIC_KEY") { +2026-06-21T01:26:33.2949942Z - vault.public_keys.insert("issuing_public_key".to_string(), issuing_pub); +2026-06-21T01:26:33.2950037Z + vault +2026-06-21T01:26:33.2950129Z + .public_keys +2026-06-21T01:26:33.2950287Z + .insert("issuing_public_key".to_string(), issuing_pub); +2026-06-21T01:26:33.2950370Z } +2026-06-21T01:26:33.2950451Z +2026-06-21T01:26:33.2950637Z // Load encrypted keys (stored as VAR_NAME_ENCRYPTED=hex:data format) +2026-06-21T01:26:33.2950950Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/encrypted_vault.rs:83: +2026-06-21T01:26:33.2951133Z if let Ok(admin_enc) = env::var("SOROBAN_ADMIN_SECRET_KEY_ENCRYPTED") { +2026-06-21T01:26:33.2951337Z - vault.encrypted_keys.insert("admin_secret_key".to_string(), admin_enc); +2026-06-21T01:26:33.2951423Z + vault +2026-06-21T01:26:33.2951515Z + .encrypted_keys +2026-06-21T01:26:33.2951658Z + .insert("admin_secret_key".to_string(), admin_enc); +2026-06-21T01:26:33.2951739Z } +2026-06-21T01:26:33.2951929Z if let Ok(issuing_enc) = env::var("SOROBAN_ISSUING_SECRET_KEY_ENCRYPTED") { +2026-06-21T01:26:33.2952149Z - vault.encrypted_keys.insert("issuing_secret_key".to_string(), issuing_enc); +2026-06-21T01:26:33.2952228Z + vault +2026-06-21T01:26:33.2952323Z + .encrypted_keys +2026-06-21T01:26:33.2952475Z + .insert("issuing_secret_key".to_string(), issuing_enc); +2026-06-21T01:26:33.2952551Z } +2026-06-21T01:26:33.2952632Z +2026-06-21T01:26:33.2952719Z Ok(vault) +2026-06-21T01:26:33.2953026Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/encrypted_vault.rs:104: +2026-06-21T01:26:33.2953123Z // Encrypt and store +2026-06-21T01:26:33.2953263Z let key_manager = self.key_manager.as_ref().unwrap(); +2026-06-21T01:26:33.2953445Z let encrypted_hex = key_manager.export_encrypted(secret_key)?; +2026-06-21T01:26:33.2953629Z - self.encrypted_keys.insert(key_name.to_string(), encrypted_hex); +2026-06-21T01:26:33.2953727Z + self.encrypted_keys +2026-06-21T01:26:33.2953861Z + .insert(key_name.to_string(), encrypted_hex); +2026-06-21T01:26:33.2953946Z +2026-06-21T01:26:33.2954027Z Ok(()) +2026-06-21T01:26:33.2954111Z } +2026-06-21T01:26:33.2954412Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/encrypted_vault.rs:133: +2026-06-21T01:26:33.2954499Z #[must_use] +2026-06-21T01:26:33.2954725Z pub fn store_public_key(&mut self, key_name: &str, public_key: &str) -> Result<()> { +2026-06-21T01:26:33.2954854Z KeyManager::validate_public_key(public_key)?; +2026-06-21T01:26:33.2955058Z - self.public_keys.insert(key_name.to_string(), public_key.to_string()); +2026-06-21T01:26:33.2955153Z + self.public_keys +2026-06-21T01:26:33.2955304Z + .insert(key_name.to_string(), public_key.to_string()); +2026-06-21T01:26:33.2955387Z Ok(()) +2026-06-21T01:26:33.2955463Z } +2026-06-21T01:26:33.2955685Z +2026-06-21T01:26:33.2955994Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/encrypted_vault.rs:159: +2026-06-21T01:26:33.2956185Z +2026-06-21T01:26:33.2956325Z content.push_str("\n# Encrypted Secret Keys\n"); +2026-06-21T01:26:33.2956456Z for (name, encrypted) in &self.encrypted_keys { +2026-06-21T01:26:33.2956692Z - content.push_str(&format!("{}_ENCRYPTED={}\n", name.to_uppercase(), encrypted)); +2026-06-21T01:26:33.2956796Z + content.push_str(&format!( +2026-06-21T01:26:33.2956893Z + "{}_ENCRYPTED={}\n", +2026-06-21T01:26:33.2956993Z + name.to_uppercase(), +2026-06-21T01:26:33.2957085Z + encrypted +2026-06-21T01:26:33.2957165Z + )); +2026-06-21T01:26:33.2957249Z } +2026-06-21T01:26:33.2957323Z +2026-06-21T01:26:33.2957502Z fs::write(path, content).context("Failed to write vault file")?; +2026-06-21T01:26:33.2957807Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/encrypted_vault.rs:314: +2026-06-21T01:26:33.2957893Z #[test] +2026-06-21T01:26:33.2958024Z fn test_save_and_load_vault() -> Result<()> { +2026-06-21T01:26:33.2958142Z let temp_path = "/tmp/test_vault.enc"; +2026-06-21T01:26:33.2958220Z - +2026-06-21T01:26:33.2958301Z + +2026-06-21T01:26:33.2958472Z let mut vault = EncryptedVault::with_password("test_password")?; +2026-06-21T01:26:33.2958924Z - vault.store_secret_key("admin_secret_key", "SBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU")?; +2026-06-21T01:26:33.2959249Z - vault.store_public_key("admin_public_key", "GBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU")?; +2026-06-21T01:26:33.2959327Z - +2026-06-21T01:26:33.2959431Z + vault.store_secret_key( +2026-06-21T01:26:33.2959528Z + "admin_secret_key", +2026-06-21T01:26:33.2959731Z + "SBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU", +2026-06-21T01:26:33.2959815Z + )?; +2026-06-21T01:26:33.2959916Z + vault.store_public_key( +2026-06-21T01:26:33.2960008Z + "admin_public_key", +2026-06-21T01:26:33.2960205Z + "GBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU", +2026-06-21T01:26:33.2960281Z + )?; +2026-06-21T01:26:33.2960367Z + +2026-06-21T01:26:33.2960470Z vault.save_to_file(temp_path)?; +2026-06-21T01:26:33.2960551Z +2026-06-21T01:26:33.2960787Z let loaded_vault = EncryptedVault::load_from_file(temp_path, "test_password")?; +2026-06-21T01:26:33.2961121Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/encrypted_vault.rs:325: +2026-06-21T01:26:33.2961309Z let secret = loaded_vault.retrieve_secret_key("admin_secret_key")?; +2026-06-21T01:26:33.2961481Z let public = loaded_vault.retrieve_public_key("admin_public_key")?; +2026-06-21T01:26:33.2961557Z +2026-06-21T01:26:33.2961815Z - assert_eq!(secret, "SBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU"); +2026-06-21T01:26:33.2962058Z - assert_eq!(public, "GBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU"); +2026-06-21T01:26:33.2962149Z + assert_eq!( +2026-06-21T01:26:33.2962236Z + secret, +2026-06-21T01:26:33.2962431Z + "SBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU" +2026-06-21T01:26:33.2962517Z + ); +2026-06-21T01:26:33.2962603Z + assert_eq!( +2026-06-21T01:26:33.2962685Z + public, +2026-06-21T01:26:33.2962870Z + "GBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU" +2026-06-21T01:26:33.2962953Z + ); +2026-06-21T01:26:33.2963033Z +2026-06-21T01:26:33.2963122Z // Cleanup +2026-06-21T01:26:33.2963233Z let _ = fs::remove_file(temp_path); +2026-06-21T01:26:33.2963549Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/encrypted_vault.rs:336: +2026-06-21T01:26:33.2963632Z #[test] +2026-06-21T01:26:33.2963791Z fn test_export_to_env_vars() -> Result<()> { +2026-06-21T01:26:33.2964053Z let mut vault = EncryptedVault::new(); +2026-06-21T01:26:33.2964379Z - vault.store_public_key("admin_public_key", "GBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU")?; +2026-06-21T01:26:33.2964590Z + vault.store_public_key( +2026-06-21T01:26:33.2964685Z + "admin_public_key", +2026-06-21T01:26:33.2964877Z + "GBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU", +2026-06-21T01:26:33.2964962Z + )?; +2026-06-21T01:26:33.2965043Z +2026-06-21T01:26:33.2965148Z let vars = vault.export_to_env_vars(); +2026-06-21T01:26:33.2965253Z assert!(!vars.is_empty()); +2026-06-21T01:26:33.2965581Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/environment_config.rs:108: +2026-06-21T01:26:33.2965667Z } +2026-06-21T01:26:33.2965747Z +2026-06-21T01:26:33.2965895Z pub fn save_to_file(&self, path: &str) -> Result<()> { +2026-06-21T01:26:33.2966027Z - let content = toml::to_string_pretty(self) +2026-06-21T01:26:33.2966161Z - .context("Failed to serialize config")?; +2026-06-21T01:26:33.2966393Z + let content = toml::to_string_pretty(self).context("Failed to serialize config")?; +2026-06-21T01:26:33.2966573Z fs::write(path, content).context("Failed to write config file")?; +2026-06-21T01:26:33.2966653Z Ok(()) +2026-06-21T01:26:33.2966738Z } +2026-06-21T01:26:33.2967064Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/environment_config.rs:136: +2026-06-21T01:26:33.2967318Z println!("✅ Testnet configuration is valid"); +2026-06-21T01:26:33.2967521Z println!("💡 To test connection, ensure you have:"); +2026-06-21T01:26:33.2967702Z println!(" 1. Installed Soroban CLI: cargo install soroban-cli"); +2026-06-21T01:26:33.2967986Z - println!(" 2. Generated a testnet keypair: soroban keys generate test_account --network testnet"); +2026-06-21T01:26:33.2968079Z + println!( +2026-06-21T01:26:33.2968320Z + " 2. Generated a testnet keypair: soroban keys generate test_account --network testnet" +2026-06-21T01:26:33.2968422Z + ); +2026-06-21T01:26:33.2968845Z println!(" 3. Funded account from: https://laboratory.stellar.org/#account-creator?network=testnet"); +2026-06-21T01:26:33.2968923Z +2026-06-21T01:26:33.2969007Z Ok(()) +2026-06-21T01:26:33.2969315Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/key_manager.rs:105: +2026-06-21T01:26:33.2969394Z +2026-06-21T01:26:33.2969495Z let plaintext = cipher +2026-06-21T01:26:33.2969678Z .decrypt(nonce, Payload::from(encrypted.ciphertext.as_ref())) +2026-06-21T01:26:33.2969935Z - .map_err(|e| anyhow::anyhow!("Decryption failed (wrong key or corrupted data): {}", e))?; +2026-06-21T01:26:33.2970032Z + .map_err(|e| { +2026-06-21T01:26:33.2970243Z + anyhow::anyhow!("Decryption failed (wrong key or corrupted data): {}", e) +2026-06-21T01:26:33.2970327Z + })?; +2026-06-21T01:26:33.2970416Z +2026-06-21T01:26:33.2970623Z String::from_utf8(plaintext).context("Decrypted key is not valid UTF-8") +2026-06-21T01:26:33.2970716Z } +2026-06-21T01:26:33.2971009Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/key_manager.rs:132: +2026-06-21T01:26:33.2971231Z let ciphertext = hex::decode(parts[1]).context("Failed to decode ciphertext")?; +2026-06-21T01:26:33.2971315Z +2026-06-21T01:26:33.2971404Z if nonce.len() != 12 { +2026-06-21T01:26:33.2971627Z - anyhow::bail!("Invalid nonce length: expected 12 bytes, got {}", nonce.len()); +2026-06-21T01:26:33.2971720Z + anyhow::bail!( +2026-06-21T01:26:33.2971865Z + "Invalid nonce length: expected 12 bytes, got {}", +2026-06-21T01:26:33.2971963Z + nonce.len() +2026-06-21T01:26:33.2972047Z + ); +2026-06-21T01:26:33.2972125Z } +2026-06-21T01:26:33.2972206Z +2026-06-21T01:26:33.2972320Z Ok(EncryptedKey { nonce, ciphertext }) +2026-06-21T01:26:33.2972756Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/key_manager.rs:211: +2026-06-21T01:26:33.2972949Z +2026-06-21T01:26:33.2973028Z #[test] +2026-06-21T01:26:33.2973134Z fn test_validate_secret_key() { +2026-06-21T01:26:33.2973497Z - assert!(KeyManager::validate_secret_key("SBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU").is_ok()); +2026-06-21T01:26:33.2973848Z - assert!(KeyManager::validate_secret_key("GBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU").is_err()); +2026-06-21T01:26:33.2973970Z + assert!(KeyManager::validate_secret_key( +2026-06-21T01:26:33.2974162Z + "SBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU" +2026-06-21T01:26:33.2974246Z + ) +2026-06-21T01:26:33.2974332Z + .is_ok()); +2026-06-21T01:26:33.2974443Z + assert!(KeyManager::validate_secret_key( +2026-06-21T01:26:33.2974627Z + "GBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU" +2026-06-21T01:26:33.2974711Z + ) +2026-06-21T01:26:33.2974797Z + .is_err()); +2026-06-21T01:26:33.2974964Z assert!(KeyManager::validate_secret_key("short").is_err()); +2026-06-21T01:26:33.2975040Z } +2026-06-21T01:26:33.2975121Z +2026-06-21T01:26:33.2975418Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/key_manager.rs:219: +2026-06-21T01:26:33.2975497Z #[test] +2026-06-21T01:26:33.2975596Z fn test_validate_public_key() { +2026-06-21T01:26:33.2975933Z - assert!(KeyManager::validate_public_key("GBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU").is_ok()); +2026-06-21T01:26:33.2976272Z - assert!(KeyManager::validate_public_key("SBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU").is_err()); +2026-06-21T01:26:33.2976385Z + assert!(KeyManager::validate_public_key( +2026-06-21T01:26:33.2976562Z + "GBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU" +2026-06-21T01:26:33.2976644Z + ) +2026-06-21T01:26:33.2976737Z + .is_ok()); +2026-06-21T01:26:33.2976846Z + assert!(KeyManager::validate_public_key( +2026-06-21T01:26:33.2977031Z + "SBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU" +2026-06-21T01:26:33.2977108Z + ) +2026-06-21T01:26:33.2977194Z + .is_err()); +2026-06-21T01:26:33.2977276Z } +2026-06-21T01:26:33.2977351Z +2026-06-21T01:26:33.2977433Z #[test] +2026-06-21T01:26:33.2977745Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/keypair_manager.rs:1: +2026-06-21T01:26:33.2977839Z use anyhow::Result; +2026-06-21T01:26:33.2977931Z use std::env; +2026-06-21T01:26:33.2978007Z +2026-06-21T01:26:33.2978113Z -use crate::key_manager::KeyManager; +2026-06-21T01:26:33.2978233Z use crate::encrypted_vault::EncryptedVault; +2026-06-21T01:26:33.2978335Z +use crate::key_manager::KeyManager; +2026-06-21T01:26:33.2978417Z +2026-06-21T01:26:33.2978515Z /// Master keypair for the platform +2026-06-21T01:26:33.2978719Z #[derive(Debug, Clone)] +2026-06-21T01:26:33.2979044Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/keypair_manager.rs:63: +2026-06-21T01:26:33.2979217Z println!("🔑 Master Keypair"); +2026-06-21T01:26:33.2979367Z println!("━━━━━━━━━━━━━━━━"); +2026-06-21T01:26:33.2979507Z println!("Public Key: {}", self.public_key); +2026-06-21T01:26:33.2979608Z - println!("Secret Key: {}...{}", +2026-06-21T01:26:33.2979705Z - &self.secret_key[..4], +2026-06-21T01:26:33.2979788Z + println!( +2026-06-21T01:26:33.2979888Z + "Secret Key: {}...{}", +2026-06-21T01:26:33.2979999Z + &self.secret_key[..4], +2026-06-21T01:26:33.2980137Z &self.secret_key[self.secret_key.len() - 4..] +2026-06-21T01:26:33.2980221Z ); +2026-06-21T01:26:33.2980334Z println!("Network: {}", self.network); +2026-06-21T01:26:33.2980653Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/keypair_manager.rs:140: +2026-06-21T01:26:33.2980992Z println!("━━━━━━━━━━━━━━━━━━━━━"); +2026-06-21T01:26:33.2981154Z println!("Distribution Public Key: {}", self.public_key); +2026-06-21T01:26:33.2981446Z println!("Issuing Public Key: {}", self.issuing_public_key); +2026-06-21T01:26:33.2981550Z - println!("Secret Key: {}...{}", +2026-06-21T01:26:33.2981646Z - &self.secret_key[..4], +2026-06-21T01:26:33.2981732Z + println!( +2026-06-21T01:26:33.2981819Z + "Secret Key: {}...{}", +2026-06-21T01:26:33.2981922Z + &self.secret_key[..4], +2026-06-21T01:26:33.2982100Z &self.secret_key[self.secret_key.len() - 4..] +2026-06-21T01:26:33.2982189Z ); +2026-06-21T01:26:33.2982299Z println!("Network: {}", self.network); +2026-06-21T01:26:33.2982618Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/keypair_manager.rs:203: +2026-06-21T01:26:33.2982756Z println!("Account: {}", self.account_public_key); +2026-06-21T01:26:33.2982883Z println!("Network: {}", self.network); +2026-06-21T01:26:33.2983006Z println!("Balance: {} XLM", self.balance); +2026-06-21T01:26:33.2983301Z - println!("Status: {}", if self.is_funded { "✅ Funded" } else { "⏳ Not Funded" }); +2026-06-21T01:26:33.2983397Z + println!( +2026-06-21T01:26:33.2983492Z + "Status: {}", +2026-06-21T01:26:33.2983587Z + if self.is_funded { +2026-06-21T01:26:33.2983709Z + "✅ Funded" +2026-06-21T01:26:33.2983792Z + } else { +2026-06-21T01:26:33.2983918Z + "⏳ Not Funded" +2026-06-21T01:26:33.2984002Z + } +2026-06-21T01:26:33.2984081Z + ); +2026-06-21T01:26:33.2984166Z } +2026-06-21T01:26:33.2984244Z } +2026-06-21T01:26:33.2984328Z +2026-06-21T01:26:33.2984647Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/keypair_manager.rs:226: +2026-06-21T01:26:33.2984757Z let dist = DistributionAccount { +2026-06-21T01:26:33.2985046Z public_key: "GBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU".to_string(), +2026-06-21T01:26:33.2985315Z secret_key: "SBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU".to_string(), +2026-06-21T01:26:33.2985609Z - issuing_public_key: "GBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU".to_string(), +2026-06-21T01:26:33.2985862Z + issuing_public_key: "GBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU" +2026-06-21T01:26:33.2985958Z + .to_string(), +2026-06-21T01:26:33.2986064Z network: "testnet".to_string(), +2026-06-21T01:26:33.2986148Z }; +2026-06-21T01:26:33.2986260Z // Should fail because they're the same +2026-06-21T01:26:33.2986572Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/keypair_manager.rs:237: +2026-06-21T01:26:33.2986733Z fn test_account_funding_positive_amount() -> Result<()> { +2026-06-21T01:26:33.2986852Z let mut funding = AccountFunding::new( +2026-06-21T01:26:33.2987064Z "GBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU", +2026-06-21T01:26:33.2987162Z - "testnet" +2026-06-21T01:26:33.2987247Z + "testnet", +2026-06-21T01:26:33.2987330Z )?; +2026-06-21T01:26:33.2987431Z funding.fund_testnet(100.0)?; +2026-06-21T01:26:33.2987535Z assert!(funding.is_funded); +2026-06-21T01:26:33.2987845Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/keypair_manager.rs:249: +2026-06-21T01:26:33.2987993Z fn test_account_funding_invalid_amount() -> Result<()> { +2026-06-21T01:26:33.2988112Z let mut funding = AccountFunding::new( +2026-06-21T01:26:33.2988301Z "GBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU", +2026-06-21T01:26:33.2988384Z - "testnet" +2026-06-21T01:26:33.2988473Z + "testnet", +2026-06-21T01:26:33.2988661Z )?; +2026-06-21T01:26:33.2988794Z let result = funding.fund_testnet(-50.0); +2026-06-21T01:26:33.2989066Z assert!(result.is_err()); +2026-06-21T01:26:33.2989368Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/keypair_manager.rs:260: +2026-06-21T01:26:33.2989637Z fn test_account_funding_mainnet_fails() -> Result<()> { +2026-06-21T01:26:33.2989751Z let mut funding = AccountFunding::new( +2026-06-21T01:26:33.2989933Z "GBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU", +2026-06-21T01:26:33.2990022Z - "mainnet" +2026-06-21T01:26:33.2990104Z + "mainnet", +2026-06-21T01:26:33.2990186Z )?; +2026-06-21T01:26:33.2990301Z let result = funding.fund_testnet(100.0); +2026-06-21T01:26:33.2990392Z assert!(result.is_err()); +2026-06-21T01:26:33.2990659Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/lib.rs:3: +2026-06-21T01:26:33.2990860Z //! Provides modules for environment configuration, secure key management, +2026-06-21T01:26:33.2991066Z //! transaction signing, asset issuing, and campaign payment processing. +2026-06-21T01:26:33.2991147Z +2026-06-21T01:26:33.2991240Z -pub mod key_manager; +2026-06-21T01:26:33.2991336Z +pub mod asset_issuing; +2026-06-21T01:26:33.2991434Z +pub mod campaign_totals; +2026-06-21T01:26:33.2991524Z pub mod encrypted_vault; +2026-06-21T01:26:33.2991620Z pub mod environment_config; +2026-06-21T01:26:33.2991708Z -pub mod secure_vault; +2026-06-21T01:26:33.2991802Z -pub mod asset_issuing; +2026-06-21T01:26:33.2991891Z +pub mod key_manager; +2026-06-21T01:26:33.2991980Z pub mod keypair_manager; +2026-06-21T01:26:33.2992075Z -pub mod signing_request; +2026-06-21T01:26:33.2992166Z pub mod response_handler; +2026-06-21T01:26:33.2992261Z -pub mod campaign_totals; +2026-06-21T01:26:33.2992351Z +pub mod secure_vault; +2026-06-21T01:26:33.2992442Z +pub mod signing_request; +2026-06-21T01:26:33.2992538Z pub mod withdrawal_audit; +2026-06-21T01:26:33.2992634Z pub mod withdrawal_limits; +2026-06-21T01:26:33.2992711Z +2026-06-21T01:26:33.3674229Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/response_handler.rs:3: +2026-06-21T01:26:33.3674652Z //! Parses wallet signing responses, validates signed transactions, +2026-06-21T01:26:33.3674926Z //! and persists/loads them from JSON files for later submission. +2026-06-21T01:26:33.3675050Z +2026-06-21T01:26:33.3675250Z -use anyhow::{Result, Context, anyhow}; +2026-06-21T01:26:33.3675412Z -use serde::{Serialize, Deserialize}; +2026-06-21T01:26:33.3675577Z +use anyhow::{anyhow, Context, Result}; +2026-06-21T01:26:33.3675741Z +use serde::{Deserialize, Serialize}; +2026-06-21T01:26:33.3675879Z use serde_json::json; +2026-06-21T01:26:33.3676015Z use std::fs; +2026-06-21T01:26:33.3676130Z +2026-06-21T01:26:33.3676682Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/response_handler.rs:51: +2026-06-21T01:26:33.3676814Z #[must_use] +2026-06-21T01:26:33.3677144Z pub fn parse_response(response_json: &str) -> Result { +2026-06-21T01:26:33.3677324Z let parsed: serde_json::Value = +2026-06-21T01:26:33.3677514Z - serde_json::from_str(response_json) +2026-06-21T01:26:33.3677729Z - .context("Failed to parse response JSON")?; +2026-06-21T01:26:33.3678011Z + serde_json::from_str(response_json).context("Failed to parse response JSON")?; +2026-06-21T01:26:33.3678100Z +2026-06-21T01:26:33.3678203Z Ok(SignedTransaction { +2026-06-21T01:26:33.3678321Z request_id: parsed["requestId"] +2026-06-21T01:26:33.3678868Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/response_handler.rs:66: +2026-06-21T01:26:33.3678986Z signed_at: parsed["signedAt"] +2026-06-21T01:26:33.3679085Z .as_u64() +2026-06-21T01:26:33.3679270Z .unwrap_or_else(|| chrono::Local::now().timestamp() as u64), +2026-06-21T01:26:33.3679379Z - signer: parsed["signer"] +2026-06-21T01:26:33.3679470Z - .as_str() +2026-06-21T01:26:33.3679902Z - .unwrap_or("unknown") +2026-06-21T01:26:33.3680002Z - .to_string(), +2026-06-21T01:26:33.3680316Z + signer: parsed["signer"].as_str().unwrap_or("unknown").to_string(), +2026-06-21T01:26:33.3680445Z status: TransactionStatus::Signed, +2026-06-21T01:26:33.3680532Z }) +2026-06-21T01:26:33.3680617Z } +2026-06-21T01:26:33.3680935Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/response_handler.rs:95: +2026-06-21T01:26:33.3681041Z /// Save signed transaction to file. +2026-06-21T01:26:33.3681131Z #[must_use] +2026-06-21T01:26:33.3681326Z pub fn save_to_file(tx: &SignedTransaction, path: &str) -> Result<()> { +2026-06-21T01:26:33.3681456Z - let json = serde_json::to_string_pretty(tx) +2026-06-21T01:26:33.3681605Z - .context("Failed to serialize transaction")?; +2026-06-21T01:26:33.3681864Z + let json = serde_json::to_string_pretty(tx).context("Failed to serialize transaction")?; +2026-06-21T01:26:33.3681954Z +2026-06-21T01:26:33.3682059Z - fs::write(path, json) +2026-06-21T01:26:33.3682245Z - .context(format!("Failed to write transaction to {}", path))?; +2026-06-21T01:26:33.3682477Z + fs::write(path, json).context(format!("Failed to write transaction to {}", path))?; +2026-06-21T01:26:33.3682565Z +2026-06-21T01:26:33.3682648Z Ok(()) +2026-06-21T01:26:33.3682735Z } +2026-06-21T01:26:33.3683073Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/response_handler.rs:110: +2026-06-21T01:26:33.3683191Z let content = fs::read_to_string(path) +2026-06-21T01:26:33.3683369Z .context(format!("Failed to read transaction from {}", path))?; +2026-06-21T01:26:33.3683447Z +2026-06-21T01:26:33.3683562Z - serde_json::from_str(&content) +2026-06-21T01:26:33.3683700Z - .context("Failed to deserialize transaction") +2026-06-21T01:26:33.3683907Z + serde_json::from_str(&content).context("Failed to deserialize transaction") +2026-06-21T01:26:33.3683997Z } +2026-06-21T01:26:33.3684084Z +2026-06-21T01:26:33.3684238Z /// Process wallet response and return signed transaction +2026-06-21T01:26:33.3684554Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/response_handler.rs:171: +2026-06-21T01:26:33.3684631Z +2026-06-21T01:26:33.3684730Z /// Export as JSON +2026-06-21T01:26:33.3684855Z pub fn to_json(&self) -> Result { +2026-06-21T01:26:33.3684964Z - serde_json::to_string_pretty(self) +2026-06-21T01:26:33.3685093Z - .context("Failed to serialize response") +2026-06-21T01:26:33.3685304Z + serde_json::to_string_pretty(self).context("Failed to serialize response") +2026-06-21T01:26:33.3685382Z } +2026-06-21T01:26:33.3685466Z } +2026-06-21T01:26:33.3685545Z +2026-06-21T01:26:33.3685857Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/response_handler.rs:216: +2026-06-21T01:26:33.3685947Z +2026-06-21T01:26:33.3686043Z impl ResponseBuilder { +2026-06-21T01:26:33.3686157Z /// Create a test response JSON +2026-06-21T01:26:33.3686257Z - pub fn build_response( +2026-06-21T01:26:33.3686362Z - request_id: String, +2026-06-21T01:26:33.3686454Z - xdr: String, +2026-06-21T01:26:33.3686544Z - signer: String, +2026-06-21T01:26:33.3686640Z - ) -> String { +2026-06-21T01:26:33.3686869Z + pub fn build_response(request_id: String, xdr: String, signer: String) -> String { +2026-06-21T01:26:33.3686954Z json!({ +2026-06-21T01:26:33.3687058Z "requestId": request_id, +2026-06-21T01:26:33.3687144Z "xdr": xdr, +2026-06-21T01:26:33.3687456Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/response_handler.rs:257: +2026-06-21T01:26:33.3687559Z "xdr": "AAAAAA==test", +2026-06-21T01:26:33.3687788Z "signer": "GBJCHUKZMTFSLOMNC2P4TS4VJJBTCYL3SDKW3KSMSGQUZ6EFLXVX77JVH", +2026-06-21T01:26:33.3688003Z "signedAt": 1234567890 +2026-06-21T01:26:33.3688096Z - }).to_string(); +2026-06-21T01:26:33.3688262Z + }) +2026-06-21T01:26:33.3688354Z + .to_string(); +2026-06-21T01:26:33.3688433Z +2026-06-21T01:26:33.3688713Z let result = ResponseHandler::parse_response(&response); +2026-06-21T01:26:33.3688819Z assert!(result.is_ok()); +2026-06-21T01:26:33.3732060Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/security_tests.rs:82: +2026-06-21T01:26:33.3732361Z fn test_sql_payload(payload: &str) -> Result { +2026-06-21T01:26:33.3732537Z // Simulate SQL parameter validation +2026-06-21T01:26:33.3732803Z // In production, this would test against actual database queries +2026-06-21T01:26:33.3732933Z - +2026-06-21T01:26:33.3733051Z + +2026-06-21T01:26:33.3733212Z let dangerous_patterns = [ +2026-06-21T01:26:33.3733474Z - "'", "--", ";", "UNION", "SELECT", "DROP", "INSERT", "UPDATE", "DELETE", +2026-06-21T01:26:33.3733723Z - "WAITFOR", "SLEEP", "BENCHMARK", "information_schema", +2026-06-21T01:26:33.3733858Z + "'", +2026-06-21T01:26:33.3733986Z + "--", +2026-06-21T01:26:33.3734102Z + ";", +2026-06-21T01:26:33.3734278Z + "UNION", +2026-06-21T01:26:33.3734409Z + "SELECT", +2026-06-21T01:26:33.3734540Z + "DROP", +2026-06-21T01:26:33.3734663Z + "INSERT", +2026-06-21T01:26:33.3734793Z + "UPDATE", +2026-06-21T01:26:33.3734912Z + "DELETE", +2026-06-21T01:26:33.3735046Z + "WAITFOR", +2026-06-21T01:26:33.3735177Z + "SLEEP", +2026-06-21T01:26:33.3735304Z + "BENCHMARK", +2026-06-21T01:26:33.3735456Z + "information_schema", +2026-06-21T01:26:33.3735578Z ]; +2026-06-21T01:26:33.3735705Z +2026-06-21T01:26:33.3735912Z let payload_upper = payload.to_uppercase(); +2026-06-21T01:26:33.3736433Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/security_tests.rs:147: +2026-06-21T01:26:33.3736572Z +2026-06-21T01:26:33.3736734Z for payload in &test_cases { +2026-06-21T01:26:33.3736943Z let sanitized = Self::sanitize_xss(payload); +2026-06-21T01:26:33.3737073Z - +2026-06-21T01:26:33.3737189Z + +2026-06-21T01:26:33.3737371Z // Check if sanitization was effective +2026-06-21T01:26:33.3737557Z - if sanitized.contains(" String { +2026-06-21T01:26:33.3740622Z let mut sanitized = input.to_string(); +2026-06-21T01:26:33.3740751Z - +2026-06-21T01:26:33.3740869Z + +2026-06-21T01:26:33.3741016Z // Remove script tags +2026-06-21T01:26:33.3741303Z sanitized = sanitized.replace("", "</script>"); +2026-06-21T01:26:33.3742308Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/security_tests.rs:181: +2026-06-21T01:26:33.3742565Z - +2026-06-21T01:26:33.3742691Z + +2026-06-21T01:26:33.3742840Z // Remove event handlers +2026-06-21T01:26:33.3743145Z sanitized = sanitized.replace("onerror=", "data-blocked-onerror="); +2026-06-21T01:26:33.3743440Z sanitized = sanitized.replace("onload=", "data-blocked-onload="); +2026-06-21T01:26:33.3743953Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/security_tests.rs:185: +2026-06-21T01:26:33.3744254Z sanitized = sanitized.replace("onfocus=", "data-blocked-onfocus="); +2026-06-21T01:26:33.3744379Z - +2026-06-21T01:26:33.3744494Z + +2026-06-21T01:26:33.3744661Z // Remove javascript: protocol +2026-06-21T01:26:33.3745018Z sanitized = sanitized.replace("javascript:", "data-blocked-javascript:"); +2026-06-21T01:26:33.3745134Z - +2026-06-21T01:26:33.3745256Z + +2026-06-21T01:26:33.3745389Z sanitized +2026-06-21T01:26:33.3745515Z } +2026-06-21T01:26:33.3745636Z +2026-06-21T01:26:33.3746148Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/security_tests.rs:209: +2026-06-21T01:26:33.3746312Z // Test 2: Check token randomness +2026-06-21T01:26:33.3746496Z let token1 = Self::generate_csrf_token(); +2026-06-21T01:26:33.3746676Z let token2 = Self::generate_csrf_token(); +2026-06-21T01:26:33.3746801Z - +2026-06-21T01:26:33.3746917Z + +2026-06-21T01:26:33.3747063Z if token1 == token2 { +2026-06-21T01:26:33.3747251Z vulnerabilities.push(Vulnerability { +2026-06-21T01:26:33.3747467Z test_case: "Predictable CSRF token".to_string(), +2026-06-21T01:26:33.3747979Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/security_tests.rs:251: +2026-06-21T01:26:33.3748119Z /// Generate CSRF token +2026-06-21T01:26:33.3748281Z fn generate_csrf_token() -> String { +2026-06-21T01:26:33.3748445Z use std::time::SystemTime; +2026-06-21T01:26:33.3748697Z - +2026-06-21T01:26:33.3748818Z + +2026-06-21T01:26:33.3748979Z let duration = SystemTime::now() +2026-06-21T01:26:33.3749165Z .duration_since(SystemTime::UNIX_EPOCH) +2026-06-21T01:26:33.3749305Z .unwrap(); +2026-06-21T01:26:33.3749807Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/security_tests.rs:258: +2026-06-21T01:26:33.3749934Z - +2026-06-21T01:26:33.3750058Z + +2026-06-21T01:26:33.3750228Z format!("csrf_{:x}", duration.as_nanos()) +2026-06-21T01:26:33.3750356Z } +2026-06-21T01:26:33.3750478Z +2026-06-21T01:26:33.3750803Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/security_tests.rs:357: +2026-06-21T01:26:33.3750891Z +2026-06-21T01:26:33.3750993Z /// Test password policy +2026-06-21T01:26:33.3751106Z fn test_password_policy() -> bool { +2026-06-21T01:26:33.3751216Z - let weak_passwords = vec![ +2026-06-21T01:26:33.3751308Z - "password", +2026-06-21T01:26:33.3751404Z - "123456", +2026-06-21T01:26:33.3751487Z - "admin", +2026-06-21T01:26:33.3751580Z - "qwerty", +2026-06-21T01:26:33.3751667Z - ]; +2026-06-21T01:26:33.3751844Z + let weak_passwords = vec!["password", "123456", "admin", "qwerty"]; +2026-06-21T01:26:33.3751933Z +2026-06-21T01:26:33.3752034Z let mut all_rejected = true; +2026-06-21T01:26:33.3752140Z for pwd in weak_passwords { +2026-06-21T01:26:33.3752443Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/security_tests.rs:384: +2026-06-21T01:26:33.3752606Z let has_upper = password.chars().any(|c| c.is_uppercase()); +2026-06-21T01:26:33.3752761Z let has_lower = password.chars().any(|c| c.is_lowercase()); +2026-06-21T01:26:33.3752917Z let has_digit = password.chars().any(|c| c.is_numeric()); +2026-06-21T01:26:33.3753297Z - let has_special = password.chars().any(|c| "!@#$%^&*()_+-=[]{}|;:,.<>?".contains(c)); +2026-06-21T01:26:33.3753525Z + let has_special = password +2026-06-21T01:26:33.3753616Z + .chars() +2026-06-21T01:26:33.3753750Z + .any(|c| "!@#$%^&*()_+-=[]{}|;:,.<>?".contains(c)); +2026-06-21T01:26:33.3753838Z +2026-06-21T01:26:33.3753982Z has_upper && has_lower && has_digit && has_special +2026-06-21T01:26:33.3754072Z } +2026-06-21T01:26:33.3754400Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/security_tests.rs:522: +2026-06-21T01:26:33.3754498Z if input.contains('\x00') { +2026-06-21T01:26:33.3754598Z return false; +2026-06-21T01:26:33.3754680Z } +2026-06-21T01:26:33.3754764Z - +2026-06-21T01:26:33.3754846Z + +2026-06-21T01:26:33.3754942Z if input.contains("..") { +2026-06-21T01:26:33.3755039Z return false; +2026-06-21T01:26:33.3755142Z } +2026-06-21T01:26:33.3755447Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/security_tests.rs:554: +2026-06-21T01:26:33.3755535Z +2026-06-21T01:26:33.3755652Z for (input, description) in &test_cases { +2026-06-21T01:26:33.3755799Z let sanitized = Self::sanitize_input(input); +2026-06-21T01:26:33.3755886Z - +2026-06-21T01:26:33.3755964Z + +2026-06-21T01:26:33.3756080Z // Check if dangerous content remains +2026-06-21T01:26:33.3756196Z - if sanitized.contains(" String { +2026-06-21T01:26:33.3757884Z let mut sanitized = input.to_string(); +2026-06-21T01:26:33.3757965Z - +2026-06-21T01:26:33.3758049Z + +2026-06-21T01:26:33.3758146Z // HTML entity encoding +2026-06-21T01:26:33.3758274Z sanitized = sanitized.replace("<", "<"); +2026-06-21T01:26:33.3758394Z sanitized = sanitized.replace(">", ">"); +2026-06-21T01:26:33.3758928Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/security_tests.rs:587: +2026-06-21T01:26:33.3759067Z sanitized = sanitized.replace("\"", """); +2026-06-21T01:26:33.3759200Z sanitized = sanitized.replace("'", "'"); +2026-06-21T01:26:33.3759284Z - +2026-06-21T01:26:33.3759369Z + +2026-06-21T01:26:33.3759471Z // Remove dangerous protocols +2026-06-21T01:26:33.3759693Z sanitized = sanitized.replace("javascript:", ""); +2026-06-21T01:26:33.3759880Z sanitized = sanitized.replace("data:", ""); +2026-06-21T01:26:33.3760385Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/security_tests.rs:593: +2026-06-21T01:26:33.3760513Z - +2026-06-21T01:26:33.3760637Z + +2026-06-21T01:26:33.3760761Z sanitized +2026-06-21T01:26:33.3760899Z } +2026-06-21T01:26:33.3761015Z } +2026-06-21T01:26:33.3761537Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/security_tests.rs:650: +2026-06-21T01:26:33.3761853Z println!("Total Vulnerabilities: {}\n", self.total_vulnerabilities); +2026-06-21T01:26:33.3762143Z +2026-06-21T01:26:33.3762326Z for (category, result) in &self.results { +2026-06-21T01:26:33.3763106Z - let status = if result.passed { "✅ PASS" } else { "❌ FAIL" }; +2026-06-21T01:26:33.3763337Z - println!("{} {} ({} tests, {} vulnerabilities)", +2026-06-21T01:26:33.3763485Z - status, +2026-06-21T01:26:33.3763621Z - category, +2026-06-21T01:26:33.3763785Z - result.total_tests, +2026-06-21T01:26:33.3763982Z - result.vulnerabilities.len()); +2026-06-21T01:26:33.3764147Z + let status = if result.passed { +2026-06-21T01:26:33.3764340Z + "✅ PASS" +2026-06-21T01:26:33.3764467Z + } else { +2026-06-21T01:26:33.3764648Z + "❌ FAIL" +2026-06-21T01:26:33.3764746Z + }; +2026-06-21T01:26:33.3764838Z + println!( +2026-06-21T01:26:33.3764971Z + "{} {} ({} tests, {} vulnerabilities)", +2026-06-21T01:26:33.3765062Z + status, +2026-06-21T01:26:33.3765165Z + category, +2026-06-21T01:26:33.3765272Z + result.total_tests, +2026-06-21T01:26:33.3765399Z + result.vulnerabilities.len() +2026-06-21T01:26:33.3765490Z + ); +2026-06-21T01:26:33.3765578Z +2026-06-21T01:26:33.3765705Z if !result.vulnerabilities.is_empty() { +2026-06-21T01:26:33.3765837Z for vuln in &result.vulnerabilities { +2026-06-21T01:26:33.3766177Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/security_tests.rs:662: +2026-06-21T01:26:33.3766365Z - println!(" ⚠️ [{}] {} - {}", +2026-06-21T01:26:33.3766476Z - vuln.severity, +2026-06-21T01:26:33.3766582Z - vuln.test_case, +2026-06-21T01:26:33.3766697Z - vuln.description); +2026-06-21T01:26:33.3766795Z + println!( +2026-06-21T01:26:33.3766941Z + " ⚠️ [{}] {} - {}", +2026-06-21T01:26:33.3767109Z + vuln.severity, vuln.test_case, vuln.description +2026-06-21T01:26:33.3767201Z + ); +2026-06-21T01:26:33.3767291Z } +2026-06-21T01:26:33.3767377Z } +2026-06-21T01:26:33.3767459Z } +2026-06-21T01:26:33.3767774Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/security_tests.rs:671: +2026-06-21T01:26:33.3767892Z if self.total_vulnerabilities == 0 { +2026-06-21T01:26:33.3768172Z println!("🎉 All security tests passed! No vulnerabilities found."); +2026-06-21T01:26:33.3768264Z } else { +2026-06-21T01:26:33.3768530Z - println!("⚠️ {} vulnerabilities found. Review and fix immediately.", +2026-06-21T01:26:33.3768874Z - self.total_vulnerabilities); +2026-06-21T01:26:33.3769000Z + println!( +2026-06-21T01:26:33.3769235Z + "⚠️ {} vulnerabilities found. Review and fix immediately.", +2026-06-21T01:26:33.3769357Z + self.total_vulnerabilities +2026-06-21T01:26:33.3769445Z + ); +2026-06-21T01:26:33.3769534Z } +2026-06-21T01:26:33.3769625Z } +2026-06-21T01:26:33.3769704Z } +2026-06-21T01:26:33.3770075Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/signing_request.rs:3: +2026-06-21T01:26:33.3770272Z //! Builds signing requests for donation, campaign creation, and custom +2026-06-21T01:26:33.3770504Z //! transactions, with JSON serialization for wallet compatibility and QR export. +2026-06-21T01:26:33.3770583Z +2026-06-21T01:26:33.3770708Z -use anyhow::{Result, Context, anyhow}; +2026-06-21T01:26:33.3770818Z -use serde::{Serialize, Deserialize}; +2026-06-21T01:26:33.3770929Z +use anyhow::{anyhow, Context, Result}; +2026-06-21T01:26:33.3771040Z +use serde::{Deserialize, Serialize}; +2026-06-21T01:26:33.3771132Z use serde_json::json; +2026-06-21T01:26:33.3771238Z use sha2::{Digest, Sha256}; +2026-06-21T01:26:33.3771326Z use std::env; +2026-06-21T01:26:33.3771805Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/signing_request.rs:35: +2026-06-21T01:26:33.3772157Z env::var("SOROBAN_NETWORK").unwrap_or_else(|_| "testnet".to_string()) +2026-06-21T01:26:33.3772241Z }); +2026-06-21T01:26:33.3772329Z +2026-06-21T01:26:33.3772427Z - let id = format!( +2026-06-21T01:26:33.3772510Z - "req_{}", +2026-06-21T01:26:33.3772639Z - chrono::Local::now().timestamp_millis() +2026-06-21T01:26:33.3772721Z - ); +2026-06-21T01:26:33.3772904Z + let id = format!("req_{}", chrono::Local::now().timestamp_millis()); +2026-06-21T01:26:33.3772993Z +2026-06-21T01:26:33.3773097Z Ok(SigningRequestBuilder { +2026-06-21T01:26:33.3773186Z id, +2026-06-21T01:26:33.3773496Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/signing_request.rs:83: +2026-06-21T01:26:33.3773587Z asset: String, +2026-06-21T01:26:33.3773699Z memo: Option, +2026-06-21T01:26:33.3773802Z ) -> Result { +2026-06-21T01:26:33.3773904Z - let desc = format!( +2026-06-21T01:26:33.3774016Z - "Donate {} {} to campaign #{}", +2026-06-21T01:26:33.3774116Z - amount, asset, campaign_id +2026-06-21T01:26:33.3774216Z - ); +2026-06-21T01:26:33.3774547Z + let desc = format!("Donate {} {} to campaign #{}", amount, asset, campaign_id); +2026-06-21T01:26:33.3774683Z +2026-06-21T01:26:33.3774958Z // Placeholder XDR - in real implementation, this would be built from actual transaction +2026-06-21T01:26:33.3775063Z - let transaction_xdr = format!( +2026-06-21T01:26:33.3775166Z - "AAAAAA=={}{}{}", +2026-06-21T01:26:33.3775290Z - donor_address, campaign_id, amount +2026-06-21T01:26:33.3775373Z - ); +2026-06-21T01:26:33.3775608Z + let transaction_xdr = format!("AAAAAA=={}{}{}", donor_address, campaign_id, amount); +2026-06-21T01:26:33.3775689Z +2026-06-21T01:26:33.3775907Z - let mut builder = SigningRequestBuilder::new(transaction_xdr, None)? +2026-06-21T01:26:33.3776023Z - .with_description(desc); +2026-06-21T01:26:33.3776296Z + let mut builder = SigningRequestBuilder::new(transaction_xdr, None)?.with_description(desc); +2026-06-21T01:26:33.3776383Z +2026-06-21T01:26:33.3776487Z if let Some(m) = memo { +2026-06-21T01:26:33.3776650Z let desc = format!("{} [memo: {}]", builder.description, m); +2026-06-21T01:26:33.3776983Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/signing_request.rs:117: +2026-06-21T01:26:33.3777081Z title, goal, deadline +2026-06-21T01:26:33.3777170Z ); +2026-06-21T01:26:33.3777254Z +2026-06-21T01:26:33.3777356Z - let transaction_xdr = format!( +2026-06-21T01:26:33.3777455Z - "AAAAAA=={}{}{}{}", +2026-06-21T01:26:33.3777581Z - creator_address, title, goal, deadline +2026-06-21T01:26:33.3777662Z - ); +2026-06-21T01:26:33.3777915Z + let transaction_xdr = format!("AAAAAA=={}{}{}{}", creator_address, title, goal, deadline); +2026-06-21T01:26:33.3777997Z +2026-06-21T01:26:33.3778159Z SigningRequestBuilder::new(transaction_xdr, None)? +2026-06-21T01:26:33.3778263Z .with_description(desc) +2026-06-21T01:26:33.3778739Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/signing_request.rs:132: +2026-06-21T01:26:33.3778932Z /// Convert signing request to JSON for transmission. +2026-06-21T01:26:33.3779024Z #[must_use] +2026-06-21T01:26:33.3779146Z pub fn to_json(&self) -> Result { +2026-06-21T01:26:33.3779265Z - serde_json::to_string_pretty(self) +2026-06-21T01:26:33.3779426Z - .context("Failed to serialize signing request to JSON") +2026-06-21T01:26:33.3779685Z + serde_json::to_string_pretty(self).context("Failed to serialize signing request to JSON") +2026-06-21T01:26:33.3779775Z } +2026-06-21T01:26:33.3779998Z +2026-06-21T01:26:33.3780105Z /// Create from JSON string. +2026-06-21T01:26:33.3780425Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/signing_request.rs:140: +2026-06-21T01:26:33.3780626Z #[must_use] +2026-06-21T01:26:33.3780758Z pub fn from_json(json: &str) -> Result { +2026-06-21T01:26:33.3780863Z - serde_json::from_str(json) +2026-06-21T01:26:33.3781038Z - .context("Failed to deserialize signing request from JSON") +2026-06-21T01:26:33.3781282Z + serde_json::from_str(json).context("Failed to deserialize signing request from JSON") +2026-06-21T01:26:33.3781365Z } +2026-06-21T01:26:33.3781453Z +2026-06-21T01:26:33.3781622Z /// Convert to wallet signing format (for Freighter and similar) +2026-06-21T01:26:33.3781935Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/signing_request.rs:231: +2026-06-21T01:26:33.3782329Z /// Issue #132 – Sign using the secret key stored in the SOROBAN_SECRET_KEY env var. +2026-06-21T01:26:33.3782467Z #[must_use] +2026-06-21T01:26:33.3782660Z pub fn sign_from_env(&self) -> Result { +2026-06-21T01:26:33.3782811Z - let secret_key = env::var("SOROBAN_SECRET_KEY") +2026-06-21T01:26:33.3782966Z - .context("SOROBAN_SECRET_KEY not set in environment")?; +2026-06-21T01:26:33.3783067Z + let secret_key = +2026-06-21T01:26:33.3783313Z + env::var("SOROBAN_SECRET_KEY").context("SOROBAN_SECRET_KEY not set in environment")?; +2026-06-21T01:26:33.3783420Z self.sign_server_side(&secret_key) +2026-06-21T01:26:33.3783507Z } +2026-06-21T01:26:33.3783587Z } +2026-06-21T01:26:33.3783908Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/signing_request.rs:324: +2026-06-21T01:26:33.3784028Z description: "Test".to_string(), +2026-06-21T01:26:33.3784119Z created_at: 0, +2026-06-21T01:26:33.3784207Z }; +2026-06-21T01:26:33.3784577Z - let sig1 = req.sign_server_side("SBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU").unwrap().signature; +2026-06-21T01:26:33.3784943Z - let sig2 = req.sign_server_side("SCZANGBA5QDPSBM5QOTSXSI7JKEFYABMUQRPTGMWNJKFA5ENDNSQSTE").unwrap().signature; +2026-06-21T01:26:33.3785043Z + let sig1 = req +2026-06-21T01:26:33.3785466Z + .sign_server_side("SBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU") +2026-06-21T01:26:33.3785606Z + .unwrap() +2026-06-21T01:26:33.3785756Z + .signature; +2026-06-21T01:26:33.3785894Z + let sig2 = req +2026-06-21T01:26:33.3786160Z + .sign_server_side("SCZANGBA5QDPSBM5QOTSXSI7JKEFYABMUQRPTGMWNJKFA5ENDNSQSTE") +2026-06-21T01:26:33.3786253Z + .unwrap() +2026-06-21T01:26:33.3786342Z + .signature; +2026-06-21T01:26:33.3786444Z assert_ne!(sig1, sig2); +2026-06-21T01:26:33.3786524Z } +2026-06-21T01:26:33.3786610Z +2026-06-21T01:26:33.3796590Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/streaming_processor.rs:3: +2026-06-21T01:26:33.3796934Z //! Processes large datasets in configurable batch sizes with memory limits, +2026-06-21T01:26:33.3797295Z //! disk-based cache support, per-chunk aggregation, and chunked file loading. +2026-06-21T01:26:33.3797423Z +2026-06-21T01:26:33.3797600Z -use anyhow::{Result, Context, anyhow}; +2026-06-21T01:26:33.3797777Z -use serde::{Serialize, Deserialize}; +2026-06-21T01:26:33.3797937Z +use anyhow::{anyhow, Context, Result}; +2026-06-21T01:26:33.3798108Z +use serde::{Deserialize, Serialize}; +2026-06-21T01:26:33.3798277Z use std::collections::VecDeque; +2026-06-21T01:26:33.3798433Z use std::marker::PhantomData; +2026-06-21T01:26:33.3798813Z use std::time::{Duration, Instant}; +2026-06-21T01:26:33.3799385Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/streaming_processor.rs:56: +2026-06-21T01:26:33.3799550Z start_time: Option, +2026-06-21T01:26:33.3799668Z } +2026-06-21T01:26:33.3799998Z +2026-06-21T01:26:33.3800162Z -impl StreamingProcessor +2026-06-21T01:26:33.3800314Z +impl StreamingProcessor +2026-06-21T01:26:33.3800576Z where +2026-06-21T01:26:33.3800866Z T: Serialize + for<'de> Deserialize<'de> + Clone + std::fmt::Debug, +2026-06-21T01:26:33.3800995Z { +2026-06-21T01:26:33.3801562Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/streaming_processor.rs:100: +2026-06-21T01:26:33.3801675Z +2026-06-21T01:26:33.3801943Z /// Process a large dataset using streaming/chunked approach +2026-06-21T01:26:33.3802080Z #[must_use] +2026-06-21T01:26:33.3802233Z - pub fn process_stream( +2026-06-21T01:26:33.3802364Z - &mut self, +2026-06-21T01:26:33.3802493Z - data: &[T], +2026-06-21T01:26:33.3802639Z - mut processor: F, +2026-06-21T01:26:33.3802780Z - ) -> Result> +2026-06-21T01:26:33.3803152Z + pub fn process_stream(&mut self, data: &[T], mut processor: F) -> Result> +2026-06-21T01:26:33.3803296Z where +2026-06-21T01:26:33.3803449Z F: FnMut(&[T]) -> Result>, +2026-06-21T01:26:33.3803582Z { +2026-06-21T01:26:33.3804145Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/streaming_processor.rs:112: +2026-06-21T01:26:33.3804298Z let total_records = data.len(); +2026-06-21T01:26:33.3804468Z let mut results = Vec::new(); +2026-06-21T01:26:33.3804593Z +2026-06-21T01:26:33.3805067Z - println!("🔄 Processing {} records in streaming mode...", total_records); +2026-06-21T01:26:33.3805209Z + println!( +2026-06-21T01:26:33.3805502Z + "🔄 Processing {} records in streaming mode...", +2026-06-21T01:26:33.3805645Z + total_records +2026-06-21T01:26:33.3805777Z + ); +2026-06-21T01:26:33.3806037Z println!(" Batch size: {} records", self.config.batch_size); +2026-06-21T01:26:33.3806291Z println!(" Max memory: {} MB", self.config.max_memory_mb); +2026-06-21T01:26:33.3806415Z +2026-06-21T01:26:33.3806977Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/streaming_processor.rs:140: +2026-06-21T01:26:33.3807135Z // Log progress +2026-06-21T01:26:33.3807509Z let progress = (self.stats.total_processed as f64 / total_records as f64) * 100.0; +2026-06-21T01:26:33.3807739Z let elapsed = self.start_time.unwrap().elapsed(); +2026-06-21T01:26:33.3807868Z - +2026-06-21T01:26:33.3808278Z - if self.stats.batches_processed % 10 == 0 || self.stats.total_processed == total_records { +2026-06-21T01:26:33.3808711Z - println!(" Progress: {:.1}% ({}/{} records, {:.2}s elapsed)", +2026-06-21T01:26:33.3809102Z - progress, self.stats.total_processed, total_records, elapsed.as_secs_f64()); +2026-06-21T01:26:33.3809217Z + +2026-06-21T01:26:33.3809614Z + if self.stats.batches_processed % 10 == 0 || self.stats.total_processed == total_records +2026-06-21T01:26:33.3809748Z + { +2026-06-21T01:26:33.3809888Z + println!( +2026-06-21T01:26:33.3810116Z + " Progress: {:.1}% ({}/{} records, {:.2}s elapsed)", +2026-06-21T01:26:33.3810253Z + progress, +2026-06-21T01:26:33.3810428Z + self.stats.total_processed, +2026-06-21T01:26:33.3810578Z + total_records, +2026-06-21T01:26:33.3810726Z + elapsed.as_secs_f64() +2026-06-21T01:26:33.3810856Z + ); +2026-06-21T01:26:33.3810973Z } +2026-06-21T01:26:33.3811095Z +2026-06-21T01:26:33.3811248Z // Periodic flush if needed +2026-06-21T01:26:33.3811796Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/streaming_processor.rs:160: +2026-06-21T01:26:33.3811920Z +2026-06-21T01:26:33.3812125Z /// Process data from an iterator (true streaming) +2026-06-21T01:26:33.3812246Z #[must_use] +2026-06-21T01:26:33.3812410Z - pub fn process_iterator( +2026-06-21T01:26:33.3812702Z - &mut self, +2026-06-21T01:26:33.3812841Z - iterator: I, +2026-06-21T01:26:33.3813124Z - mut processor: F, +2026-06-21T01:26:33.3813259Z - ) -> Result> +2026-06-21T01:26:33.3813655Z + pub fn process_iterator(&mut self, iterator: I, mut processor: F) -> Result> +2026-06-21T01:26:33.3813779Z where +2026-06-21T01:26:33.3813926Z I: Iterator, +2026-06-21T01:26:33.3814083Z F: FnMut(&[T]) -> Result>, +2026-06-21T01:26:33.3814621Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/streaming_processor.rs:174: +2026-06-21T01:26:33.3814893Z let mut batch = Vec::with_capacity(self.config.batch_size); +2026-06-21T01:26:33.3815051Z let mut total_count = 0; +2026-06-21T01:26:33.3815172Z +2026-06-21T01:26:33.3815759Z - println!("🔄 Processing data stream (batch size: {})...", self.config.batch_size); +2026-06-21T01:26:33.3815892Z + println!( +2026-06-21T01:26:33.3816196Z + "🔄 Processing data stream (batch size: {})...", +2026-06-21T01:26:33.3816353Z + self.config.batch_size +2026-06-21T01:26:33.3816486Z + ); +2026-06-21T01:26:33.3816613Z +2026-06-21T01:26:33.3816758Z for item in iterator { +2026-06-21T01:26:33.3816901Z batch.push(item); +2026-06-21T01:26:33.3817310Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/streaming_processor.rs:205: +2026-06-21T01:26:33.3817396Z } +2026-06-21T01:26:33.3817485Z +2026-06-21T01:26:33.3817591Z self.update_memory_stats(); +2026-06-21T01:26:33.3817811Z - println!("✅ Processed {} total records in {} batches", +2026-06-21T01:26:33.3817998Z - self.stats.total_processed, self.stats.batches_processed); +2026-06-21T01:26:33.3818083Z + println!( +2026-06-21T01:26:33.3818269Z + "✅ Processed {} total records in {} batches", +2026-06-21T01:26:33.3818436Z + self.stats.total_processed, self.stats.batches_processed +2026-06-21T01:26:33.3818530Z + ); +2026-06-21T01:26:33.3818813Z +2026-06-21T01:26:33.3818960Z Ok(results) +2026-06-21T01:26:33.3819041Z } +2026-06-21T01:26:33.3819586Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/streaming_processor.rs:214: +2026-06-21T01:26:33.3819786Z /// Check current memory usage and enforce limits +2026-06-21T01:26:33.3819985Z fn check_memory_usage(&self) -> Result<()> { +2026-06-21T01:26:33.3820207Z let current_mem = self.estimate_memory_usage_mb(); +2026-06-21T01:26:33.3820327Z - +2026-06-21T01:26:33.3820451Z + +2026-06-21T01:26:33.3820688Z if current_mem > self.config.max_memory_mb as f64 { +2026-06-21T01:26:33.3820833Z return Err(anyhow!( +2026-06-21T01:26:33.3821033Z "Memory limit exceeded: {:.1} MB > {} MB", +2026-06-21T01:26:33.3821390Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/streaming_processor.rs:237: +2026-06-21T01:26:33.3821517Z fn update_memory_stats(&mut self) { +2026-06-21T01:26:33.3821653Z let current = self.estimate_memory_usage_mb(); +2026-06-21T01:26:33.3821774Z self.stats.current_memory_mb = current; +2026-06-21T01:26:33.3821865Z - +2026-06-21T01:26:33.3821949Z + +2026-06-21T01:26:33.3822068Z if current > self.stats.peak_memory_mb { +2026-06-21T01:26:33.3822184Z self.stats.peak_memory_mb = current; +2026-06-21T01:26:33.3822263Z } +2026-06-21T01:26:33.3822588Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/streaming_processor.rs:254: +2026-06-21T01:26:33.3822705Z /// Print final processing statistics +2026-06-21T01:26:33.3822843Z fn print_final_stats(&self, total_records: usize) { +2026-06-21T01:26:33.3822986Z let elapsed = self.start_time.unwrap().elapsed(); +2026-06-21T01:26:33.3823067Z - +2026-06-21T01:26:33.3823157Z + +2026-06-21T01:26:33.3823370Z println!("\n📊 Processing Statistics:"); +2026-06-21T01:26:33.3823709Z println!("━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"); +2026-06-21T01:26:33.3823967Z println!("Total Records: {}", total_records); +2026-06-21T01:26:33.3824303Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/streaming_processor.rs:261: +2026-06-21T01:26:33.3824488Z println!("Batches Processed: {}", self.stats.batches_processed); +2026-06-21T01:26:33.3824674Z println!("Peak Memory: {:.2} MB", self.stats.peak_memory_mb); +2026-06-21T01:26:33.3824849Z println!("Processing Time: {:.2}s", elapsed.as_secs_f64()); +2026-06-21T01:26:33.3824978Z - println!("Throughput: {:.0} records/sec", +2026-06-21T01:26:33.3825122Z - total_records as f64 / elapsed.as_secs_f64()); +2026-06-21T01:26:33.3825209Z + println!( +2026-06-21T01:26:33.3825335Z + "Throughput: {:.0} records/sec", +2026-06-21T01:26:33.3825472Z + total_records as f64 / elapsed.as_secs_f64() +2026-06-21T01:26:33.3825563Z + ); +2026-06-21T01:26:33.3825652Z } +2026-06-21T01:26:33.3825741Z +2026-06-21T01:26:33.3825851Z /// Get current memory statistics +2026-06-21T01:26:33.3826194Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/streaming_processor.rs:288: +2026-06-21T01:26:33.3826272Z { +2026-06-21T01:26:33.3826379Z /// Create a new chunked loader +2026-06-21T01:26:33.3826517Z pub fn new(config: StreamingConfig) -> Self { +2026-06-21T01:26:33.3826637Z - Self { config, _phantom: PhantomData } +2026-06-21T01:26:33.3826731Z + Self { +2026-06-21T01:26:33.3826822Z + config, +2026-06-21T01:26:33.3826938Z + _phantom: PhantomData, +2026-06-21T01:26:33.3827029Z + } +2026-06-21T01:26:33.3827110Z } +2026-06-21T01:26:33.3827201Z +2026-06-21T01:26:33.3827308Z /// Load data from a file in chunks +2026-06-21T01:26:33.3827658Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/streaming_processor.rs:295: +2026-06-21T01:26:33.3827777Z - pub fn load_from_file( +2026-06-21T01:26:33.3827869Z - &self, +2026-06-21T01:26:33.3827977Z - file_path: &str, +2026-06-21T01:26:33.3828094Z - mut chunk_handler: F, +2026-06-21T01:26:33.3828192Z - ) -> Result<()> +2026-06-21T01:26:33.3828425Z + pub fn load_from_file(&self, file_path: &str, mut chunk_handler: F) -> Result<()> +2026-06-21T01:26:33.3828513Z where +2026-06-21T01:26:33.3828749Z F: FnMut(&[T]) -> Result<()>, +2026-06-21T01:26:33.3828842Z { +2026-06-21T01:26:33.3829189Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/streaming_processor.rs:307: +2026-06-21T01:26:33.3829402Z println!("📂 Loading data from: {}", file_path); +2026-06-21T01:26:33.3829491Z +2026-06-21T01:26:33.3829592Z // Read file in chunks +2026-06-21T01:26:33.3829724Z - let file = File::open(file_path) +2026-06-21T01:26:33.3829891Z - .context(format!("Failed to open file: {}", file_path))?; +2026-06-21T01:26:33.3830160Z + let file = File::open(file_path).context(format!("Failed to open file: {}", file_path))?; +2026-06-21T01:26:33.3830300Z let mut reader = BufReader::new(file); +2026-06-21T01:26:33.3830381Z +2026-06-21T01:26:33.3830562Z let mut buffer = Vec::with_capacity(self.config.batch_size); +2026-06-21T01:26:33.3830914Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/streaming_processor.rs:340: +2026-06-21T01:26:33.3830999Z } +2026-06-21T01:26:33.3831089Z +2026-06-21T01:26:33.3831198Z /// Load data from a JSON array file +2026-06-21T01:26:33.3831304Z - pub fn load_json_array( +2026-06-21T01:26:33.3831397Z - &self, +2026-06-21T01:26:33.3831494Z - file_path: &str, +2026-06-21T01:26:33.3831601Z - mut chunk_handler: F, +2026-06-21T01:26:33.3831697Z - ) -> Result +2026-06-21T01:26:33.3831940Z + pub fn load_json_array(&self, file_path: &str, mut chunk_handler: F) -> Result +2026-06-21T01:26:33.3832170Z where +2026-06-21T01:26:33.3832274Z F: FnMut(&[T]) -> Result<()>, +2026-06-21T01:26:33.3832481Z { +2026-06-21T01:26:33.3832816Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/streaming_processor.rs:351: +2026-06-21T01:26:33.3832918Z use std::fs::File; +2026-06-21T01:26:33.3833030Z use std::io::BufReader; +2026-06-21T01:26:33.3833113Z +2026-06-21T01:26:33.3833228Z - let file = File::open(file_path) +2026-06-21T01:26:33.3833393Z - .context(format!("Failed to open file: {}", file_path))?; +2026-06-21T01:26:33.3833632Z + let file = File::open(file_path).context(format!("Failed to open file: {}", file_path))?; +2026-06-21T01:26:33.3833752Z let reader = BufReader::new(file); +2026-06-21T01:26:33.3833842Z +2026-06-21T01:26:33.3834005Z let mut buffer = Vec::with_capacity(self.config.batch_size); +2026-06-21T01:26:33.3834345Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/streaming_processor.rs:402: +2026-06-21T01:26:33.3834439Z } +2026-06-21T01:26:33.3834525Z +2026-06-21T01:26:33.3834652Z /// Process records and compute aggregates +2026-06-21T01:26:33.3834751Z - pub fn aggregate( +2026-06-21T01:26:33.3834848Z - &mut self, +2026-06-21T01:26:33.3834944Z - data: &[T], +2026-06-21T01:26:33.3835040Z - value_extractor: F, +2026-06-21T01:26:33.3835156Z - ) -> Result +2026-06-21T01:26:33.3835407Z + pub fn aggregate(&mut self, data: &[T], value_extractor: F) -> Result +2026-06-21T01:26:33.3835500Z where +2026-06-21T01:26:33.3835601Z F: Fn(&T) -> f64, +2026-06-21T01:26:33.3835686Z { +2026-06-21T01:26:33.3836015Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/streaming_processor.rs:425: +2026-06-21T01:26:33.3836114Z Ok(AggregationResult { +2026-06-21T01:26:33.3836217Z count: self.count, +2026-06-21T01:26:33.3836320Z sum: self.sum, +2026-06-21T01:26:33.3836518Z - mean: if self.count > 0 { self.sum / self.count as f64 } else { 0.0 }, +2026-06-21T01:26:33.3836633Z + mean: if self.count > 0 { +2026-06-21T01:26:33.3836751Z + self.sum / self.count as f64 +2026-06-21T01:26:33.3836841Z + } else { +2026-06-21T01:26:33.3836935Z + 0.0 +2026-06-21T01:26:33.3837020Z + }, +2026-06-21T01:26:33.3837117Z min: self.min, +2026-06-21T01:26:33.3837212Z max: self.max, +2026-06-21T01:26:33.3837296Z }) +2026-06-21T01:26:33.3837624Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/streaming_processor.rs:467: +2026-06-21T01:26:33.3837715Z #[test] +2026-06-21T01:26:33.3837844Z fn test_streaming_processor_small_dataset() { +2026-06-21T01:26:33.3837992Z let mut processor = StreamingProcessor::new(); +2026-06-21T01:26:33.3838075Z - +2026-06-21T01:26:33.3838168Z + +2026-06-21T01:26:33.3838283Z let data: Vec = (0..100) +2026-06-21T01:26:33.3838385Z .map(|i| TestRecord { +2026-06-21T01:26:33.3838481Z id: i, +2026-06-21T01:26:33.3838919Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/streaming_processor.rs:476: +2026-06-21T01:26:33.3839013Z }) +2026-06-21T01:26:33.3839112Z .collect(); +2026-06-21T01:26:33.3839195Z +2026-06-21T01:26:33.3839371Z - let results = processor.process_stream(&data, |chunk| { +2026-06-21T01:26:33.3839509Z - Ok(chunk.iter().map(|r| r.id * 2).collect()) +2026-06-21T01:26:33.3839598Z - }).unwrap(); +2026-06-21T01:26:33.3839705Z + let results = processor +2026-06-21T01:26:33.3839919Z + .process_stream(&data, |chunk| Ok(chunk.iter().map(|r| r.id * 2).collect())) +2026-06-21T01:26:33.3840018Z + .unwrap(); +2026-06-21T01:26:33.3840106Z +2026-06-21T01:26:33.3840210Z assert_eq!(results.len(), 100); +2026-06-21T01:26:33.3840463Z assert_eq!(results[0], 0); +2026-06-21T01:26:33.3840904Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/streaming_processor.rs:501: +2026-06-21T01:26:33.3840997Z }) +2026-06-21T01:26:33.3841091Z .collect(); +2026-06-21T01:26:33.3841171Z +2026-06-21T01:26:33.3841327Z - let results = processor.process_stream(&data, |chunk| { +2026-06-21T01:26:33.3841460Z - Ok(chunk.iter().map(|r| r.value).collect()) +2026-06-21T01:26:33.3841547Z - }).unwrap(); +2026-06-21T01:26:33.3841647Z + let results = processor +2026-06-21T01:26:33.3841848Z + .process_stream(&data, |chunk| Ok(chunk.iter().map(|r| r.value).collect())) +2026-06-21T01:26:33.3842029Z + .unwrap(); +2026-06-21T01:26:33.3842109Z +2026-06-21T01:26:33.3842218Z assert_eq!(results.len(), 1000); +2026-06-21T01:26:33.3842355Z assert!(processor.stats.batches_processed > 1); +2026-06-21T01:26:33.3842687Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/streaming_processor.rs:512: +2026-06-21T01:26:33.3842785Z #[test] +2026-06-21T01:26:33.3842889Z fn test_memory_usage_tracking() { +2026-06-21T01:26:33.3843034Z let mut processor = StreamingProcessor::new(); +2026-06-21T01:26:33.3843127Z - +2026-06-21T01:26:33.3843209Z + +2026-06-21T01:26:33.3843324Z let data: Vec = (0..500) +2026-06-21T01:26:33.3843425Z .map(|i| TestRecord { +2026-06-21T01:26:33.3843522Z id: i, +2026-06-21T01:26:33.3843842Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/streaming_processor.rs:521: +2026-06-21T01:26:33.3843926Z }) +2026-06-21T01:26:33.3844023Z .collect(); +2026-06-21T01:26:33.3844112Z +2026-06-21T01:26:33.3844237Z - processor.process_stream(&data, |chunk| { +2026-06-21T01:26:33.3844391Z - Ok(chunk.iter().map(|r| r.id).collect::>()) +2026-06-21T01:26:33.3844482Z - }).unwrap(); +2026-06-21T01:26:33.3844579Z + processor +2026-06-21T01:26:33.3844695Z + .process_stream(&data, |chunk| { +2026-06-21T01:26:33.3844844Z + Ok(chunk.iter().map(|r| r.id).collect::>()) +2026-06-21T01:26:33.3844936Z + }) +2026-06-21T01:26:33.3845025Z + .unwrap(); +2026-06-21T01:26:33.3845114Z +2026-06-21T01:26:33.3845258Z assert!(processor.stats.peak_memory_mb > 0.0); +2026-06-21T01:26:33.3845401Z assert_eq!(processor.stats.total_processed, 500); +2026-06-21T01:26:33.3845745Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/streaming_processor.rs:557: +2026-06-21T01:26:33.3845858Z ..StreamingConfig::default() +2026-06-21T01:26:33.3845942Z }); +2026-06-21T01:26:33.3846031Z +2026-06-21T01:26:33.3846191Z - let data: Vec = (0..100).map(|i| TestRecord { +2026-06-21T01:26:33.3846286Z - id: i, +2026-06-21T01:26:33.3846393Z - value: i as f64, +2026-06-21T01:26:33.3846496Z - name: format!("Item {}", i), +2026-06-21T01:26:33.3846596Z - }).collect(); +2026-06-21T01:26:33.3846711Z + let data: Vec = (0..100) +2026-06-21T01:26:33.3846808Z + .map(|i| TestRecord { +2026-06-21T01:26:33.3846901Z + id: i, +2026-06-21T01:26:33.3846995Z + value: i as f64, +2026-06-21T01:26:33.3847104Z + name: format!("Item {}", i), +2026-06-21T01:26:33.3847192Z + }) +2026-06-21T01:26:33.3847282Z + .collect(); +2026-06-21T01:26:33.3847370Z +2026-06-21T01:26:33.3847465Z let mut batch_count = 0; +2026-06-21T01:26:33.3847627Z - let results = processor.process_stream(&data, |chunk| { +2026-06-21T01:26:33.3847729Z - batch_count += 1; +2026-06-21T01:26:33.3847872Z - Ok(chunk.iter().map(|r| r.id).collect::>()) +2026-06-21T01:26:33.3847966Z - }).unwrap(); +2026-06-21T01:26:33.3848175Z + let results = processor +2026-06-21T01:26:33.3848279Z + .process_stream(&data, |chunk| { +2026-06-21T01:26:33.3848471Z + batch_count += 1; +2026-06-21T01:26:33.3848811Z + Ok(chunk.iter().map(|r| r.id).collect::>()) +2026-06-21T01:26:33.3848921Z + }) +2026-06-21T01:26:33.3849018Z + .unwrap(); +2026-06-21T01:26:33.3849098Z +2026-06-21T01:26:33.3849268Z assert_eq!(batch_count, 10); // 100 records / 10 batch_size +2026-06-21T01:26:33.3849373Z assert_eq!(results.len(), 100); +2026-06-21T01:26:33.3849710Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/withdrawal_audit.rs:46: +2026-06-21T01:26:33.3849799Z } +2026-06-21T01:26:33.3849879Z +2026-06-21T01:26:33.3849983Z /// Log a withdrawal action. +2026-06-21T01:26:33.3850326Z - pub fn log(&mut self, campaign_id: u64, action: WithdrawalAction, actor: &str, amount: i128, note: Option) { +2026-06-21T01:26:33.3850417Z + pub fn log( +2026-06-21T01:26:33.3850516Z + &mut self, +2026-06-21T01:26:33.3850613Z + campaign_id: u64, +2026-06-21T01:26:33.3850730Z + action: WithdrawalAction, +2026-06-21T01:26:33.3850833Z + actor: &str, +2026-06-21T01:26:33.3850923Z + amount: i128, +2026-06-21T01:26:33.3851029Z + note: Option, +2026-06-21T01:26:33.3851118Z + ) { +2026-06-21T01:26:33.3851247Z self.entries.push(WithdrawalLogEntry { +2026-06-21T01:26:33.3851349Z campaign_id, +2026-06-21T01:26:33.3851435Z action, +2026-06-21T01:26:33.3851767Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/withdrawal_audit.rs:60: +2026-06-21T01:26:33.3851893Z /// Returns all log entries for a campaign. +2026-06-21T01:26:33.3851980Z #[must_use] +2026-06-21T01:26:33.3852203Z pub fn get_by_campaign(&self, campaign_id: u64) -> Vec<&WithdrawalLogEntry> { +2026-06-21T01:26:33.3852406Z - self.entries.iter().filter(|e| e.campaign_id == campaign_id).collect() +2026-06-21T01:26:33.3852506Z + self.entries +2026-06-21T01:26:33.3852595Z + .iter() +2026-06-21T01:26:33.3852726Z + .filter(|e| e.campaign_id == campaign_id) +2026-06-21T01:26:33.3852822Z + .collect() +2026-06-21T01:26:33.3852910Z } +2026-06-21T01:26:33.3852993Z +2026-06-21T01:26:33.3853098Z /// Returns all entries in the log. +2026-06-21T01:26:33.3853411Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/withdrawal_audit.rs:93: +2026-06-21T01:26:33.3853523Z fn logs_and_retrieves_entries() { +2026-06-21T01:26:33.3853660Z let mut log = WithdrawalAuditLog::new(); +2026-06-21T01:26:33.3853841Z log.log(1, WithdrawalAction::Requested, "creator_A", 500, None); +2026-06-21T01:26:33.3854090Z - log.log(1, WithdrawalAction::Approved, "admin", 500, Some("looks good".to_string())); +2026-06-21T01:26:33.3854181Z + log.log( +2026-06-21T01:26:33.3854262Z + 1, +2026-06-21T01:26:33.3854381Z + WithdrawalAction::Approved, +2026-06-21T01:26:33.3854468Z + "admin", +2026-06-21T01:26:33.3854564Z + 500, +2026-06-21T01:26:33.3854677Z + Some("looks good".to_string()), +2026-06-21T01:26:33.3854761Z + ); +2026-06-21T01:26:33.3854850Z +2026-06-21T01:26:33.3854965Z let entries = log.get_by_campaign(1); +2026-06-21T01:26:33.3855077Z assert_eq!(entries.len(), 2); +2026-06-21T01:26:33.3855397Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/withdrawal_limits.rs:29: +2026-06-21T01:26:33.3855505Z impl Default for WithdrawalLimits { +2026-06-21T01:26:33.3855609Z fn default() -> Self { +2026-06-21T01:26:33.3855697Z Self { +2026-06-21T01:26:33.3855851Z - min_per_withdrawal: 100, // 100 stroops minimum +2026-06-21T01:26:33.3856012Z + min_per_withdrawal: 100, // 100 stroops minimum +2026-06-21T01:26:33.3856204Z max_per_withdrawal: 10_000_000_000, // 1000 XLM maximum per withdrawal +2026-06-21T01:26:33.3856514Z - max_total: None, // no global cap by default +2026-06-21T01:26:33.3856833Z + max_total: None, // no global cap by default +2026-06-21T01:26:33.3856917Z } +2026-06-21T01:26:33.3857009Z } +2026-06-21T01:26:33.3857096Z } +2026-06-21T01:26:33.3857408Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/withdrawal_limits.rs:44: +2026-06-21T01:26:33.3857501Z if max < min { +2026-06-21T01:26:33.3857642Z return Err(anyhow!("Maximum must be >= minimum")); +2026-06-21T01:26:33.3857733Z } +2026-06-21T01:26:33.3857934Z - Ok(Self { min_per_withdrawal: min, max_per_withdrawal: max, max_total }) +2026-06-21T01:26:33.3858021Z + Ok(Self { +2026-06-21T01:26:33.3858128Z + min_per_withdrawal: min, +2026-06-21T01:26:33.3858231Z + max_per_withdrawal: max, +2026-06-21T01:26:33.3858322Z + max_total, +2026-06-21T01:26:33.3858415Z + }) +2026-06-21T01:26:33.3858498Z } +2026-06-21T01:26:33.3858767Z +2026-06-21T01:26:33.3858981Z /// Validates a proposed withdrawal amount against the limits. +2026-06-21T01:26:33.3859291Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/withdrawal_limits.rs:54: +2026-06-21T01:26:33.3859412Z if amount < self.min_per_withdrawal { +2026-06-21T01:26:33.3859517Z return Err(anyhow!( +2026-06-21T01:26:33.3859660Z "Withdrawal amount {} is below the minimum of {}", +2026-06-21T01:26:33.3859785Z - amount, self.min_per_withdrawal +2026-06-21T01:26:33.3859873Z + amount, +2026-06-21T01:26:33.3859982Z + self.min_per_withdrawal +2026-06-21T01:26:33.3860071Z )); +2026-06-21T01:26:33.3860152Z } +2026-06-21T01:26:33.3860264Z if amount > self.max_per_withdrawal { +2026-06-21T01:26:33.3860568Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/withdrawal_limits.rs:61: +2026-06-21T01:26:33.3860679Z return Err(anyhow!( +2026-06-21T01:26:33.3860835Z "Withdrawal amount {} exceeds the maximum of {}", +2026-06-21T01:26:33.3860945Z - amount, self.max_per_withdrawal +2026-06-21T01:26:33.3861041Z + amount, +2026-06-21T01:26:33.3861145Z + self.max_per_withdrawal +2026-06-21T01:26:33.3861228Z )); +2026-06-21T01:26:33.3861315Z } +2026-06-21T01:26:33.3861422Z if let Some(cap) = self.max_total { +2026-06-21T01:26:33.3861735Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/withdrawal_limits.rs:67: +2026-06-21T01:26:33.3861860Z if already_withdrawn + amount > cap { +2026-06-21T01:26:33.3861958Z return Err(anyhow!( +2026-06-21T01:26:33.3862133Z "Total withdrawn {} would exceed the campaign cap of {}", +2026-06-21T01:26:33.3862259Z - already_withdrawn + amount, cap +2026-06-21T01:26:33.3862369Z + already_withdrawn + amount, +2026-06-21T01:26:33.3862471Z + cap +2026-06-21T01:26:33.3862557Z )); +2026-06-21T01:26:33.3862645Z } +2026-06-21T01:26:33.3862733Z } +2026-06-21T01:26:33.3881970Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/asset_issuing.rs:26: +2026-06-21T01:26:33.3882144Z pub fn from_env() -> Result { +2026-06-21T01:26:33.3882309Z dotenv::dotenv().ok(); +2026-06-21T01:26:33.3882428Z +2026-06-21T01:26:33.3882596Z - let code = env::var("ASSET_CODE") +2026-06-21T01:26:33.3882772Z - .unwrap_or_else(|_| "ORBIT".to_string()); +2026-06-21T01:26:33.3882896Z - +2026-06-21T01:26:33.3883065Z - let name = env::var("ASSET_NAME") +2026-06-21T01:26:33.3883289Z - .unwrap_or_else(|_| "OrbitChain Token".to_string()); +2026-06-21T01:26:33.3883598Z + let code = env::var("ASSET_CODE").unwrap_or_else(|_| "ORBIT".to_string()); +2026-06-21T01:26:33.3883922Z +2026-06-21T01:26:33.3884269Z + let name = env::var("ASSET_NAME").unwrap_or_else(|_| "OrbitChain Token".to_string()); +2026-06-21T01:26:33.3892302Z + +2026-06-21T01:26:33.3892837Z let issuing_secret_key = env::var("SOROBAN_ISSUING_SECRET_KEY") +2026-06-21T01:26:33.3893077Z .context("SOROBAN_ISSUING_SECRET_KEY is required")?; +2026-06-21T01:26:33.3893211Z +2026-06-21T01:26:33.3893745Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/asset_issuing.rs:74: +2026-06-21T01:26:33.3893926Z println!("Asset Code: {}", self.code); +2026-06-21T01:26:33.3894100Z println!("Asset Name: {}", self.name); +2026-06-21T01:26:33.3894370Z println!("Issuer Public Key: {}", self.issuing_public_key); +2026-06-21T01:26:33.3894490Z - +2026-06-21T01:26:33.3894664Z + +2026-06-21T01:26:33.3894839Z if self.issuing_secret_key.len() > 10 { +2026-06-21T01:26:33.3894978Z println!( +2026-06-21T01:26:33.3895162Z "Issuer Secret Key: {}...{}", +2026-06-21T01:26:33.3895690Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/asset_issuing.rs:102: +2026-06-21T01:26:33.3895965Z pub fn generate_issuing_keypair() -> Result<(String, String)> { +2026-06-21T01:26:33.3896257Z // In a real implementation, this would use the stellar-strkey crate +2026-06-21T01:26:33.3896477Z // For now, we provide guidance on how to generate keys +2026-06-21T01:26:33.3896608Z - +2026-06-21T01:26:33.3896725Z + +2026-06-21T01:26:33.3897052Z println!("🔑 Generating Issuing Keypair"); +2026-06-21T01:26:33.3897304Z println!("━━━━━━━━━━━━━━━━━━━━━━━━━━"); +2026-06-21T01:26:33.3897437Z println!(); +2026-06-21T01:26:33.3897967Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/asset_issuing.rs:115: +2026-06-21T01:26:33.3898144Z println!("Then set in your .env file:"); +2026-06-21T01:26:33.3898332Z println!(" SOROBAN_ISSUING_SECRET_KEY=S..."); +2026-06-21T01:26:33.3898531Z println!(" SOROBAN_ISSUING_PUBLIC_KEY=G..."); +2026-06-21T01:26:33.3898827Z - +2026-06-21T01:26:33.3898955Z + +2026-06-21T01:26:33.3899085Z Ok(( +2026-06-21T01:26:33.3899330Z "S_PLACEHOLDER_REPLACE_WITH_YOUR_SECRET_KEY".to_string(), +2026-06-21T01:26:33.3899569Z "G_PLACEHOLDER_REPLACE_WITH_YOUR_PUBLIC_KEY".to_string(), +2026-06-21T01:26:33.3900074Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/asset_issuing.rs:130: +2026-06-21T01:26:33.3900272Z println!("Holder: {}", config.holder_public_key); +2026-06-21T01:26:33.3900431Z println!("Network: {}", network); +2026-06-21T01:26:33.3900556Z println!(); +2026-06-21T01:26:33.3900679Z - +2026-06-21T01:26:33.3900800Z + +2026-06-21T01:26:33.3900947Z // Validate configuration +2026-06-21T01:26:33.3901108Z if config.asset_code.is_empty() { +2026-06-21T01:26:33.3901291Z anyhow::bail!("Asset code is required"); +2026-06-21T01:26:33.3901815Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/asset_issuing.rs:137: +2026-06-21T01:26:33.3901923Z } +2026-06-21T01:26:33.3902006Z - +2026-06-21T01:26:33.3902090Z + +2026-06-21T01:26:33.3902218Z if !config.asset_issuer.starts_with('G') { +2026-06-21T01:26:33.3902440Z anyhow::bail!("Asset issuer must be a valid public key starting with 'G'"); +2026-06-21T01:26:33.3902528Z } +2026-06-21T01:26:33.3902840Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/asset_issuing.rs:142: +2026-06-21T01:26:33.3902925Z - +2026-06-21T01:26:33.3903009Z + +2026-06-21T01:26:33.3903143Z if !config.holder_public_key.starts_with('G') { +2026-06-21T01:26:33.3903310Z anyhow::bail!("Holder public key must start with 'G'"); +2026-06-21T01:26:33.3903400Z } +2026-06-21T01:26:33.3903721Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/asset_issuing.rs:155: +2026-06-21T01:26:33.3904159Z println!(" soroban contract invoke \\"); +2026-06-21T01:26:33.3904270Z println!(" --network {} \\", network); +2026-06-21T01:26:33.3904508Z println!(" --source-account holder \\"); +2026-06-21T01:26:33.3904683Z - println!(" -- change_trust --asset '{}:{}'", +2026-06-21T01:26:33.3904815Z - config.asset_code, config.asset_issuer); +2026-06-21T01:26:33.3904907Z - +2026-06-21T01:26:33.3905003Z + println!( +2026-06-21T01:26:33.3905145Z + " -- change_trust --asset '{}:{}'", +2026-06-21T01:26:33.3905271Z + config.asset_code, config.asset_issuer +2026-06-21T01:26:33.3905354Z + ); +2026-06-21T01:26:33.3905444Z + +2026-06-21T01:26:33.3905535Z Ok(()) +2026-06-21T01:26:33.3905621Z } +2026-06-21T01:26:33.3905709Z +2026-06-21T01:26:33.3906017Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/asset_issuing.rs:170: +2026-06-21T01:26:33.3906118Z ) -> Result<()> { +2026-06-21T01:26:33.3906293Z println!("💰 Issuing Assets"); +2026-06-21T01:26:33.3906430Z println!("━━━━━━━━━━━━━━━━"); +2026-06-21T01:26:33.3906650Z - println!("Asset: {}:{}", asset_config.code, asset_config.issuing_public_key); +2026-06-21T01:26:33.3906741Z + println!( +2026-06-21T01:26:33.3906832Z + "Asset: {}:{}", +2026-06-21T01:26:33.3906986Z + asset_config.code, asset_config.issuing_public_key +2026-06-21T01:26:33.3907066Z + ); +2026-06-21T01:26:33.3907183Z println!("Recipient: {}", recipient); +2026-06-21T01:26:33.3907287Z println!("Amount: {}", amount); +2026-06-21T01:26:33.3907391Z println!("Network: {}", network); +2026-06-21T01:26:33.3907697Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/asset_issuing.rs:178: +2026-06-21T01:26:33.3907782Z +2026-06-21T01:26:33.3907866Z // Validate +2026-06-21T01:26:33.3907972Z asset_config.validate()?; +2026-06-21T01:26:33.3908053Z - +2026-06-21T01:26:33.3908138Z + +2026-06-21T01:26:33.3908260Z if !recipient.starts_with('G') { +2026-06-21T01:26:33.3908470Z anyhow::bail!("Recipient must be a valid public key starting with 'G'"); +2026-06-21T01:26:33.3908837Z } +2026-06-21T01:26:33.3909140Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/asset_issuing.rs:185: +2026-06-21T01:26:33.3909230Z - +2026-06-21T01:26:33.3909317Z + +2026-06-21T01:26:33.3909408Z if amount <= 0.0 { +2026-06-21T01:26:33.3909555Z anyhow::bail!("Amount must be greater than 0"); +2026-06-21T01:26:33.3909641Z } +2026-06-21T01:26:33.3909938Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/asset_issuing.rs:199: +2026-06-21T01:26:33.3910089Z println!(" --source-account issuing_account \\"); +2026-06-21T01:26:33.3910219Z println!(" --destination {} \\", recipient); +2026-06-21T01:26:33.3910336Z println!(" --amount {} \\", amount); +2026-06-21T01:26:33.3910563Z - println!(" --asset '{}:{}' \\", asset_config.code, asset_config.issuing_public_key); +2026-06-21T01:26:33.3910660Z + println!( +2026-06-21T01:26:33.3910774Z + " --asset '{}:{}' \\", +2026-06-21T01:26:33.3910922Z + asset_config.code, asset_config.issuing_public_key +2026-06-21T01:26:33.3911004Z + ); +2026-06-21T01:26:33.3911115Z println!(" --network {}", network); +2026-06-21T01:26:33.3911193Z +2026-06-21T01:26:33.3911284Z Ok(()) +2026-06-21T01:26:33.3911589Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/asset_issuing.rs:211: +2026-06-21T01:26:33.3911769Z println!("━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"); +2026-06-21T01:26:33.3911859Z +2026-06-21T01:26:33.3911985Z let asset_config = AssetConfig::from_env()?; +2026-06-21T01:26:33.3912073Z - +2026-06-21T01:26:33.3912157Z + +2026-06-21T01:26:33.3912257Z // Display current config +2026-06-21T01:26:33.3912367Z asset_config.display(); +2026-06-21T01:26:33.3912458Z println!(); +2026-06-21T01:26:33.3912818Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/campaign_totals.rs:19: +2026-06-21T01:26:33.3913189Z #[must_use] +2026-06-21T01:26:33.3913284Z #[inline] +2026-06-21T01:26:33.3913513Z pub fn increment(&mut self, campaign_id: u64, asset: &str, amount: i128) -> i128 { +2026-06-21T01:26:33.3913748Z - let entry = self.asset_totals.entry((campaign_id, asset.to_string())).or_insert(0); +2026-06-21T01:26:33.3913850Z + let entry = self +2026-06-21T01:26:33.3913942Z + .asset_totals +2026-06-21T01:26:33.3914075Z + .entry((campaign_id, asset.to_string())) +2026-06-21T01:26:33.3914172Z + .or_insert(0); +2026-06-21T01:26:33.3914260Z *entry += amount; +2026-06-21T01:26:33.3914349Z *entry +2026-06-21T01:26:33.3914438Z } +2026-06-21T01:26:33.3914749Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/campaign_totals.rs:27: +2026-06-21T01:26:33.3914979Z /// Returns the total for a specific `campaign_id` + `asset`, or 0 if none recorded. +2026-06-21T01:26:33.3915068Z #[must_use] +2026-06-21T01:26:33.3915234Z pub fn get(&self, campaign_id: u64, asset: &str) -> i128 { +2026-06-21T01:26:33.3915446Z - *self.asset_totals.get(&(campaign_id, asset.to_string())).unwrap_or(&0) +2026-06-21T01:26:33.3915529Z + *self +2026-06-21T01:26:33.3915626Z + .asset_totals +2026-06-21T01:26:33.3915754Z + .get(&(campaign_id, asset.to_string())) +2026-06-21T01:26:33.3915846Z + .unwrap_or(&0) +2026-06-21T01:26:33.3915934Z } +2026-06-21T01:26:33.3916015Z +2026-06-21T01:26:33.3916287Z /// Returns all asset totals for a campaign as a map of asset → total. +2026-06-21T01:26:33.3916618Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/encrypted_vault.rs:73: +2026-06-21T01:26:33.3916699Z +2026-06-21T01:26:33.3916801Z // Load public keys +2026-06-21T01:26:33.3916973Z if let Ok(admin_pub) = env::var("SOROBAN_ADMIN_PUBLIC_KEY") { +2026-06-21T01:26:33.3917187Z - vault.public_keys.insert("admin_public_key".to_string(), admin_pub); +2026-06-21T01:26:33.3917282Z + vault +2026-06-21T01:26:33.3917376Z + .public_keys +2026-06-21T01:26:33.3917527Z + .insert("admin_public_key".to_string(), admin_pub); +2026-06-21T01:26:33.3917616Z } +2026-06-21T01:26:33.3917788Z if let Ok(issuing_pub) = env::var("SOROBAN_ISSUING_PUBLIC_KEY") { +2026-06-21T01:26:33.3918006Z - vault.public_keys.insert("issuing_public_key".to_string(), issuing_pub); +2026-06-21T01:26:33.3918097Z + vault +2026-06-21T01:26:33.3918184Z + .public_keys +2026-06-21T01:26:33.3918350Z + .insert("issuing_public_key".to_string(), issuing_pub); +2026-06-21T01:26:33.3918433Z } +2026-06-21T01:26:33.3918520Z +2026-06-21T01:26:33.3918986Z // Load encrypted keys (stored as VAR_NAME_ENCRYPTED=hex:data format) +2026-06-21T01:26:33.3919523Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/encrypted_vault.rs:83: +2026-06-21T01:26:33.3919835Z if let Ok(admin_enc) = env::var("SOROBAN_ADMIN_SECRET_KEY_ENCRYPTED") { +2026-06-21T01:26:33.3920171Z - vault.encrypted_keys.insert("admin_secret_key".to_string(), admin_enc); +2026-06-21T01:26:33.3920255Z + vault +2026-06-21T01:26:33.3920356Z + .encrypted_keys +2026-06-21T01:26:33.3920500Z + .insert("admin_secret_key".to_string(), admin_enc); +2026-06-21T01:26:33.3920588Z } +2026-06-21T01:26:33.3920789Z if let Ok(issuing_enc) = env::var("SOROBAN_ISSUING_SECRET_KEY_ENCRYPTED") { +2026-06-21T01:26:33.3921008Z - vault.encrypted_keys.insert("issuing_secret_key".to_string(), issuing_enc); +2026-06-21T01:26:33.3921104Z + vault +2026-06-21T01:26:33.3921209Z + .encrypted_keys +2026-06-21T01:26:33.3921371Z + .insert("issuing_secret_key".to_string(), issuing_enc); +2026-06-21T01:26:33.3921460Z } +2026-06-21T01:26:33.3921699Z +2026-06-21T01:26:33.3921797Z Ok(vault) +2026-06-21T01:26:33.3922252Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/encrypted_vault.rs:104: +2026-06-21T01:26:33.3922356Z // Encrypt and store +2026-06-21T01:26:33.3922516Z let key_manager = self.key_manager.as_ref().unwrap(); +2026-06-21T01:26:33.3922695Z let encrypted_hex = key_manager.export_encrypted(secret_key)?; +2026-06-21T01:26:33.3922883Z - self.encrypted_keys.insert(key_name.to_string(), encrypted_hex); +2026-06-21T01:26:33.3922984Z + self.encrypted_keys +2026-06-21T01:26:33.3923116Z + .insert(key_name.to_string(), encrypted_hex); +2026-06-21T01:26:33.3923208Z +2026-06-21T01:26:33.3923300Z Ok(()) +2026-06-21T01:26:33.3923382Z } +2026-06-21T01:26:33.3923717Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/encrypted_vault.rs:133: +2026-06-21T01:26:33.3923802Z #[must_use] +2026-06-21T01:26:33.3924040Z pub fn store_public_key(&mut self, key_name: &str, public_key: &str) -> Result<()> { +2026-06-21T01:26:33.3924194Z KeyManager::validate_public_key(public_key)?; +2026-06-21T01:26:33.3924401Z - self.public_keys.insert(key_name.to_string(), public_key.to_string()); +2026-06-21T01:26:33.3924503Z + self.public_keys +2026-06-21T01:26:33.3924658Z + .insert(key_name.to_string(), public_key.to_string()); +2026-06-21T01:26:33.3924740Z Ok(()) +2026-06-21T01:26:33.3924826Z } +2026-06-21T01:26:33.3924907Z +2026-06-21T01:26:33.3925222Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/encrypted_vault.rs:159: +2026-06-21T01:26:33.3925308Z +2026-06-21T01:26:33.3925448Z content.push_str("\n# Encrypted Secret Keys\n"); +2026-06-21T01:26:33.3925589Z for (name, encrypted) in &self.encrypted_keys { +2026-06-21T01:26:33.3925827Z - content.push_str(&format!("{}_ENCRYPTED={}\n", name.to_uppercase(), encrypted)); +2026-06-21T01:26:33.3925935Z + content.push_str(&format!( +2026-06-21T01:26:33.3926045Z + "{}_ENCRYPTED={}\n", +2026-06-21T01:26:33.3926143Z + name.to_uppercase(), +2026-06-21T01:26:33.3926244Z + encrypted +2026-06-21T01:26:33.3926333Z + )); +2026-06-21T01:26:33.3926415Z } +2026-06-21T01:26:33.3926501Z +2026-06-21T01:26:33.3926679Z fs::write(path, content).context("Failed to write vault file")?; +2026-06-21T01:26:33.3926984Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/encrypted_vault.rs:314: +2026-06-21T01:26:33.3927142Z #[test] +2026-06-21T01:26:33.3927326Z fn test_save_and_load_vault() -> Result<()> { +2026-06-21T01:26:33.3927515Z let temp_path = "/tmp/test_vault.enc"; +2026-06-21T01:26:33.3927641Z - +2026-06-21T01:26:33.3927757Z + +2026-06-21T01:26:33.3928055Z let mut vault = EncryptedVault::with_password("test_password")?; +2026-06-21T01:26:33.3928744Z - vault.store_secret_key("admin_secret_key", "SBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU")?; +2026-06-21T01:26:33.3929284Z - vault.store_public_key("admin_public_key", "GBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU")?; +2026-06-21T01:26:33.3929410Z - +2026-06-21T01:26:33.3929552Z + vault.store_secret_key( +2026-06-21T01:26:33.3929698Z + "admin_secret_key", +2026-06-21T01:26:33.3930032Z + "SBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU", +2026-06-21T01:26:33.3930148Z + )?; +2026-06-21T01:26:33.3930297Z + vault.store_public_key( +2026-06-21T01:26:33.3930443Z + "admin_public_key", +2026-06-21T01:26:33.3930746Z + "GBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU", +2026-06-21T01:26:33.3930874Z + )?; +2026-06-21T01:26:33.3930989Z + +2026-06-21T01:26:33.3931154Z vault.save_to_file(temp_path)?; +2026-06-21T01:26:33.3931277Z +2026-06-21T01:26:33.3931644Z let loaded_vault = EncryptedVault::load_from_file(temp_path, "test_password")?; +2026-06-21T01:26:33.3932148Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/encrypted_vault.rs:325: +2026-06-21T01:26:33.3932456Z let secret = loaded_vault.retrieve_secret_key("admin_secret_key")?; +2026-06-21T01:26:33.3932633Z let public = loaded_vault.retrieve_public_key("admin_public_key")?; +2026-06-21T01:26:33.3932717Z +2026-06-21T01:26:33.3932967Z - assert_eq!(secret, "SBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU"); +2026-06-21T01:26:33.3933209Z - assert_eq!(public, "GBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU"); +2026-06-21T01:26:33.3933301Z + assert_eq!( +2026-06-21T01:26:33.3933382Z + secret, +2026-06-21T01:26:33.3933584Z + "SBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU" +2026-06-21T01:26:33.3933670Z + ); +2026-06-21T01:26:33.3933754Z + assert_eq!( +2026-06-21T01:26:33.3933843Z + public, +2026-06-21T01:26:33.3934027Z + "GBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU" +2026-06-21T01:26:33.3934119Z + ); +2026-06-21T01:26:33.3934202Z +2026-06-21T01:26:33.3934286Z // Cleanup +2026-06-21T01:26:33.3934407Z let _ = fs::remove_file(temp_path); +2026-06-21T01:26:33.3934720Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/encrypted_vault.rs:336: +2026-06-21T01:26:33.3934808Z #[test] +2026-06-21T01:26:33.3934937Z fn test_export_to_env_vars() -> Result<()> { +2026-06-21T01:26:33.3935054Z let mut vault = EncryptedVault::new(); +2026-06-21T01:26:33.3935392Z - vault.store_public_key("admin_public_key", "GBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU")?; +2026-06-21T01:26:33.3935504Z + vault.store_public_key( +2026-06-21T01:26:33.3935598Z + "admin_public_key", +2026-06-21T01:26:33.3935797Z + "GBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU", +2026-06-21T01:26:33.3935880Z + )?; +2026-06-21T01:26:33.3935972Z +2026-06-21T01:26:33.3936091Z let vars = vault.export_to_env_vars(); +2026-06-21T01:26:33.3936197Z assert!(!vars.is_empty()); +2026-06-21T01:26:33.3936555Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/environment_config.rs:108: +2026-06-21T01:26:33.3936643Z } +2026-06-21T01:26:33.3936723Z +2026-06-21T01:26:33.3936873Z pub fn save_to_file(&self, path: &str) -> Result<()> { +2026-06-21T01:26:33.3936999Z - let content = toml::to_string_pretty(self) +2026-06-21T01:26:33.3937133Z - .context("Failed to serialize config")?; +2026-06-21T01:26:33.3937371Z + let content = toml::to_string_pretty(self).context("Failed to serialize config")?; +2026-06-21T01:26:33.3937550Z fs::write(path, content).context("Failed to write config file")?; +2026-06-21T01:26:33.3937646Z Ok(()) +2026-06-21T01:26:33.3937731Z } +2026-06-21T01:26:33.3938050Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/environment_config.rs:136: +2026-06-21T01:26:33.3938279Z println!("✅ Testnet configuration is valid"); +2026-06-21T01:26:33.3938485Z println!("💡 To test connection, ensure you have:"); +2026-06-21T01:26:33.3938911Z println!(" 1. Installed Soroban CLI: cargo install soroban-cli"); +2026-06-21T01:26:33.3939202Z - println!(" 2. Generated a testnet keypair: soroban keys generate test_account --network testnet"); +2026-06-21T01:26:33.3939290Z + println!( +2026-06-21T01:26:33.3939540Z + " 2. Generated a testnet keypair: soroban keys generate test_account --network testnet" +2026-06-21T01:26:33.3939630Z + ); +2026-06-21T01:26:33.3939987Z println!(" 3. Funded account from: https://laboratory.stellar.org/#account-creator?network=testnet"); +2026-06-21T01:26:33.3940078Z +2026-06-21T01:26:33.3940166Z Ok(()) +2026-06-21T01:26:33.3941988Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/key_manager.rs:105: +2026-06-21T01:26:33.3942314Z +2026-06-21T01:26:33.3942458Z let plaintext = cipher +2026-06-21T01:26:33.3942902Z .decrypt(nonce, Payload::from(encrypted.ciphertext.as_ref())) +2026-06-21T01:26:33.3943313Z - .map_err(|e| anyhow::anyhow!("Decryption failed (wrong key or corrupted data): {}", e))?; +2026-06-21T01:26:33.3943449Z + .map_err(|e| { +2026-06-21T01:26:33.3943791Z + anyhow::anyhow!("Decryption failed (wrong key or corrupted data): {}", e) +2026-06-21T01:26:33.3943922Z + })?; +2026-06-21T01:26:33.3944035Z +2026-06-21T01:26:33.3944365Z String::from_utf8(plaintext).context("Decrypted key is not valid UTF-8") +2026-06-21T01:26:33.3944488Z } +2026-06-21T01:26:33.3945014Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/key_manager.rs:132: +2026-06-21T01:26:33.3945367Z let ciphertext = hex::decode(parts[1]).context("Failed to decode ciphertext")?; +2026-06-21T01:26:33.3945489Z +2026-06-21T01:26:33.3945633Z if nonce.len() != 12 { +2026-06-21T01:26:33.3945985Z - anyhow::bail!("Invalid nonce length: expected 12 bytes, got {}", nonce.len()); +2026-06-21T01:26:33.3946128Z + anyhow::bail!( +2026-06-21T01:26:33.3946358Z + "Invalid nonce length: expected 12 bytes, got {}", +2026-06-21T01:26:33.3946498Z + nonce.len() +2026-06-21T01:26:33.3946615Z + ); +2026-06-21T01:26:33.3946741Z } +2026-06-21T01:26:33.3946861Z +2026-06-21T01:26:33.3947034Z Ok(EncryptedKey { nonce, ciphertext }) +2026-06-21T01:26:33.3947534Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/key_manager.rs:211: +2026-06-21T01:26:33.3947647Z +2026-06-21T01:26:33.3947773Z #[test] +2026-06-21T01:26:33.3947927Z fn test_validate_secret_key() { +2026-06-21T01:26:33.3948524Z - assert!(KeyManager::validate_secret_key("SBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU").is_ok()); +2026-06-21T01:26:33.3949312Z - assert!(KeyManager::validate_secret_key("GBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU").is_err()); +2026-06-21T01:26:33.3949510Z + assert!(KeyManager::validate_secret_key( +2026-06-21T01:26:33.3949769Z + "SBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU" +2026-06-21T01:26:33.3949857Z + ) +2026-06-21T01:26:33.3949943Z + .is_ok()); +2026-06-21T01:26:33.3950077Z + assert!(KeyManager::validate_secret_key( +2026-06-21T01:26:33.3950268Z + "GBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU" +2026-06-21T01:26:33.3950345Z + ) +2026-06-21T01:26:33.3950431Z + .is_err()); +2026-06-21T01:26:33.3950590Z assert!(KeyManager::validate_secret_key("short").is_err()); +2026-06-21T01:26:33.3950675Z } +2026-06-21T01:26:33.3950757Z +2026-06-21T01:26:33.3951062Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/key_manager.rs:219: +2026-06-21T01:26:33.3951150Z #[test] +2026-06-21T01:26:33.3951260Z fn test_validate_public_key() { +2026-06-21T01:26:33.3951608Z - assert!(KeyManager::validate_public_key("GBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU").is_ok()); +2026-06-21T01:26:33.3951964Z - assert!(KeyManager::validate_public_key("SBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU").is_err()); +2026-06-21T01:26:33.3952078Z + assert!(KeyManager::validate_public_key( +2026-06-21T01:26:33.3952267Z + "GBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU" +2026-06-21T01:26:33.3952350Z + ) +2026-06-21T01:26:33.3952429Z + .is_ok()); +2026-06-21T01:26:33.3952544Z + assert!(KeyManager::validate_public_key( +2026-06-21T01:26:33.3952727Z + "SBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU" +2026-06-21T01:26:33.3952804Z + ) +2026-06-21T01:26:33.3952891Z + .is_err()); +2026-06-21T01:26:33.3952968Z } +2026-06-21T01:26:33.3953050Z +2026-06-21T01:26:33.3953132Z #[test] +2026-06-21T01:26:33.3957080Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/keypair_manager.rs:1: +2026-06-21T01:26:33.3957545Z use anyhow::Result; +2026-06-21T01:26:33.3957672Z use std::env; +2026-06-21T01:26:33.3957781Z +2026-06-21T01:26:33.3957940Z -use crate::key_manager::KeyManager; +2026-06-21T01:26:33.3958119Z use crate::encrypted_vault::EncryptedVault; +2026-06-21T01:26:33.3958269Z +use crate::key_manager::KeyManager; +2026-06-21T01:26:33.3958387Z +2026-06-21T01:26:33.3958713Z /// Master keypair for the platform +2026-06-21T01:26:33.3958849Z #[derive(Debug, Clone)] +2026-06-21T01:26:33.3959378Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/keypair_manager.rs:63: +2026-06-21T01:26:33.3959635Z println!("🔑 Master Keypair"); +2026-06-21T01:26:33.3959857Z println!("━━━━━━━━━━━━━━━━"); +2026-06-21T01:26:33.3960056Z println!("Public Key: {}", self.public_key); +2026-06-21T01:26:33.3960210Z - println!("Secret Key: {}...{}", +2026-06-21T01:26:33.3960367Z - &self.secret_key[..4], +2026-06-21T01:26:33.3960494Z + println!( +2026-06-21T01:26:33.3960646Z + "Secret Key: {}...{}", +2026-06-21T01:26:33.3960783Z + &self.secret_key[..4], +2026-06-21T01:26:33.3960984Z &self.secret_key[self.secret_key.len() - 4..] +2026-06-21T01:26:33.3961104Z ); +2026-06-21T01:26:33.3961281Z println!("Network: {}", self.network); +2026-06-21T01:26:33.3961635Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/keypair_manager.rs:140: +2026-06-21T01:26:33.3961792Z println!("━━━━━━━━━━━━━━━━━━━━━"); +2026-06-21T01:26:33.3961955Z println!("Distribution Public Key: {}", self.public_key); +2026-06-21T01:26:33.3962120Z println!("Issuing Public Key: {}", self.issuing_public_key); +2026-06-21T01:26:33.3962228Z - println!("Secret Key: {}...{}", +2026-06-21T01:26:33.3962328Z - &self.secret_key[..4], +2026-06-21T01:26:33.3962422Z + println!( +2026-06-21T01:26:33.3962531Z + "Secret Key: {}...{}", +2026-06-21T01:26:33.3962625Z + &self.secret_key[..4], +2026-06-21T01:26:33.3962771Z &self.secret_key[self.secret_key.len() - 4..] +2026-06-21T01:26:33.3962851Z ); +2026-06-21T01:26:33.3962973Z println!("Network: {}", self.network); +2026-06-21T01:26:33.3963297Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/keypair_manager.rs:203: +2026-06-21T01:26:33.3963429Z println!("Account: {}", self.account_public_key); +2026-06-21T01:26:33.3963544Z println!("Network: {}", self.network); +2026-06-21T01:26:33.3963664Z println!("Balance: {} XLM", self.balance); +2026-06-21T01:26:33.3963947Z - println!("Status: {}", if self.is_funded { "✅ Funded" } else { "⏳ Not Funded" }); +2026-06-21T01:26:33.3964033Z + println!( +2026-06-21T01:26:33.3964122Z + "Status: {}", +2026-06-21T01:26:33.3964223Z + if self.is_funded { +2026-06-21T01:26:33.3964348Z + "✅ Funded" +2026-06-21T01:26:33.3964432Z + } else { +2026-06-21T01:26:33.3964561Z + "⏳ Not Funded" +2026-06-21T01:26:33.3964640Z + } +2026-06-21T01:26:33.3964721Z + ); +2026-06-21T01:26:33.3964803Z } +2026-06-21T01:26:33.3964882Z } +2026-06-21T01:26:33.3964964Z +2026-06-21T01:26:33.3965284Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/keypair_manager.rs:226: +2026-06-21T01:26:33.3965395Z let dist = DistributionAccount { +2026-06-21T01:26:33.3965675Z public_key: "GBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU".to_string(), +2026-06-21T01:26:33.3965929Z secret_key: "SBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU".to_string(), +2026-06-21T01:26:33.3966229Z - issuing_public_key: "GBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU".to_string(), +2026-06-21T01:26:33.3966478Z + issuing_public_key: "GBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU" +2026-06-21T01:26:33.3966765Z + .to_string(), +2026-06-21T01:26:33.3966988Z network: "testnet".to_string(), +2026-06-21T01:26:33.3967070Z }; +2026-06-21T01:26:33.3967183Z // Should fail because they're the same +2026-06-21T01:26:33.3967490Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/keypair_manager.rs:237: +2026-06-21T01:26:33.3967644Z fn test_account_funding_positive_amount() -> Result<()> { +2026-06-21T01:26:33.3967765Z let mut funding = AccountFunding::new( +2026-06-21T01:26:33.3967962Z "GBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU", +2026-06-21T01:26:33.3968047Z - "testnet" +2026-06-21T01:26:33.3968135Z + "testnet", +2026-06-21T01:26:33.3968219Z )?; +2026-06-21T01:26:33.3968323Z funding.fund_testnet(100.0)?; +2026-06-21T01:26:33.3968428Z assert!(funding.is_funded); +2026-06-21T01:26:33.3968967Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/keypair_manager.rs:249: +2026-06-21T01:26:33.3969137Z fn test_account_funding_invalid_amount() -> Result<()> { +2026-06-21T01:26:33.3969269Z let mut funding = AccountFunding::new( +2026-06-21T01:26:33.3969464Z "GBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU", +2026-06-21T01:26:33.3969556Z - "testnet" +2026-06-21T01:26:33.3969645Z + "testnet", +2026-06-21T01:26:33.3969723Z )?; +2026-06-21T01:26:33.3969844Z let result = funding.fund_testnet(-50.0); +2026-06-21T01:26:33.3969943Z assert!(result.is_err()); +2026-06-21T01:26:33.3970255Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/keypair_manager.rs:260: +2026-06-21T01:26:33.3970401Z fn test_account_funding_mainnet_fails() -> Result<()> { +2026-06-21T01:26:33.3970513Z let mut funding = AccountFunding::new( +2026-06-21T01:26:33.3970701Z "GBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU", +2026-06-21T01:26:33.3970790Z - "mainnet" +2026-06-21T01:26:33.3970872Z + "mainnet", +2026-06-21T01:26:33.3970959Z )?; +2026-06-21T01:26:33.3971073Z let result = funding.fund_testnet(100.0); +2026-06-21T01:26:33.3971174Z assert!(result.is_err()); +2026-06-21T01:26:33.4038516Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/main.rs:3: +2026-06-21T01:26:33.4039010Z //! Parses sub-commands for config, network, vault, asset, signing, response, +2026-06-21T01:26:33.4039291Z //! keymanager, keypair, deploy, invoke, and account operations. +2026-06-21T01:26:33.4039420Z +2026-06-21T01:26:33.4039579Z -use anyhow::{Result, Context}; +2026-06-21T01:26:33.4039730Z +use anyhow::{Context, Result}; +2026-06-21T01:26:33.4039861Z use std::env; +2026-06-21T01:26:33.4039977Z +2026-06-21T01:26:33.4040167Z mod environment_config; +2026-06-21T01:26:33.4040618Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/main.rs:10: +2026-06-21T01:26:33.4040960Z -use environment_config::{EnvironmentConfig, check_testnet_connection}; +2026-06-21T01:26:33.4041270Z +use environment_config::{check_testnet_connection, EnvironmentConfig}; +2026-06-21T01:26:33.4041398Z +2026-06-21T01:26:33.4041529Z mod secure_vault; +2026-06-21T01:26:33.4041849Z -use secure_vault::{SecureVault, check_mainnet_readiness, toggle_network}; +2026-06-21T01:26:33.4042169Z +use secure_vault::{check_mainnet_readiness, toggle_network, SecureVault}; +2026-06-21T01:26:33.4042285Z +2026-06-21T01:26:33.4042426Z mod asset_issuing; +2026-06-21T01:26:33.4043095Z -use asset_issuing::{AssetConfig, check_issuing_readiness, generate_issuing_keypair, establish_trustline, issue_asset, TrustlineConfig}; +2026-06-21T01:26:33.4043229Z +use asset_issuing::{ +2026-06-21T01:26:33.4043628Z + check_issuing_readiness, establish_trustline, generate_issuing_keypair, issue_asset, +2026-06-21T01:26:33.4043779Z + AssetConfig, TrustlineConfig, +2026-06-21T01:26:33.4043900Z +}; +2026-06-21T01:26:33.4044254Z +2026-06-21T01:26:33.4044376Z mod key_manager; +2026-06-21T01:26:33.4044532Z use key_manager::KeyManager; +2026-06-21T01:26:33.4045130Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/main.rs:22: +2026-06-21T01:26:33.4045297Z use encrypted_vault::EncryptedVault; +2026-06-21T01:26:33.4045415Z +2026-06-21T01:26:33.4045545Z mod keypair_manager; +2026-06-21T01:26:33.4045878Z -use keypair_manager::{MasterKeypair, DistributionAccount, AccountFunding}; +2026-06-21T01:26:33.4046200Z +use keypair_manager::{AccountFunding, DistributionAccount, MasterKeypair}; +2026-06-21T01:26:33.4046311Z +2026-06-21T01:26:33.4046443Z mod signing_request; +2026-06-21T01:26:33.4046807Z use signing_request::{SigningRequest, SigningRequestBuilder, TransactionBuilder}; +2026-06-21T01:26:33.4047258Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/main.rs:31: +2026-06-21T01:26:33.4047522Z use response_handler::{ResponseHandler, SignedTransaction}; +2026-06-21T01:26:33.4047643Z +2026-06-21T01:26:33.4047966Z // Issue #128 – worker health monitoring modules +2026-06-21T01:26:33.4048114Z -mod worker_logger; +2026-06-21T01:26:33.4048250Z mod polling_scheduler; +2026-06-21T01:26:33.4048381Z +mod worker_logger; +2026-06-21T01:26:33.4048492Z +2026-06-21T01:26:33.4048893Z // Issue #141 – per-asset campaign totals +2026-06-21T01:26:33.4049033Z mod campaign_totals; +2026-06-21T01:26:33.4049474Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/main.rs:83: +2026-06-21T01:26:33.4049598Z +2026-06-21T01:26:33.4049755Z fn handle_config() -> Result<()> { +2026-06-21T01:26:33.4049942Z let config = EnvironmentConfig::from_env()?; +2026-06-21T01:26:33.4050069Z - +2026-06-21T01:26:33.4050185Z + +2026-06-21T01:26:33.4050416Z println!("📋 Configuration Check"); +2026-06-21T01:26:33.4050640Z println!("━━━━━━━━━━━━━━━━━━━━━"); +2026-06-21T01:26:33.4050836Z println!("Active Network: {}", config.network); +2026-06-21T01:26:33.4051305Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/main.rs:120: +2026-06-21T01:26:33.4051431Z +2026-06-21T01:26:33.4051577Z fn handle_network() -> Result<()> { +2026-06-21T01:26:33.4051767Z let config = EnvironmentConfig::from_env()?; +2026-06-21T01:26:33.4051883Z - +2026-06-21T01:26:33.4052005Z + +2026-06-21T01:26:33.4052233Z println!("🌐 Network Configuration"); +2026-06-21T01:26:33.4052452Z println!("━━━━━━━━━━━━━━━━━━━━━━━━"); +2026-06-21T01:26:33.4052643Z println!("Active Network: {}", config.network); +2026-06-21T01:26:33.4053083Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/main.rs:153: +2026-06-21T01:26:33.4053222Z return Ok(()); +2026-06-21T01:26:33.4053344Z } +2026-06-21T01:26:33.4053457Z +2026-06-21T01:26:33.4053864Z - println!("🔄 Invoke method '{}' functionality coming soon...", args[0]); +2026-06-21T01:26:33.4053997Z + println!( +2026-06-21T01:26:33.4054301Z + "🔄 Invoke method '{}' functionality coming soon...", +2026-06-21T01:26:33.4054440Z + args[0] +2026-06-21T01:26:33.4054564Z + ); +2026-06-21T01:26:33.4054688Z Ok(()) +2026-06-21T01:26:33.4054807Z } +2026-06-21T01:26:33.4054921Z +2026-06-21T01:26:33.4055388Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/main.rs:165: +2026-06-21T01:26:33.4055534Z fn handle_vault() -> Result<()> { +2026-06-21T01:26:33.4055700Z let vault = SecureVault::from_env(); +2026-06-21T01:26:33.4055848Z vault.display_safe(); +2026-06-21T01:26:33.4055962Z - +2026-06-21T01:26:33.4056082Z + +2026-06-21T01:26:33.4056209Z println!(); +2026-06-21T01:26:33.4056450Z println!("💡 Security Best Practices:"); +2026-06-21T01:26:33.4056704Z println!(" - Never commit secret keys to version control"); +2026-06-21T01:26:33.4057150Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/main.rs:172: +2026-06-21T01:26:33.4057396Z println!(" - Use .env files and add them to .gitignore"); +2026-06-21T01:26:33.4057764Z println!(" - Rotate keys regularly"); +2026-06-21T01:26:33.4058142Z println!(" - Use separate keys for testnet and mainnet"); +2026-06-21T01:26:33.4058263Z - +2026-06-21T01:26:33.4058383Z + +2026-06-21T01:26:33.4058503Z Ok(()) +2026-06-21T01:26:33.4058802Z } +2026-06-21T01:26:33.4058883Z +2026-06-21T01:26:33.4059156Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/main.rs:216: +2026-06-21T01:26:33.4059410Z println!("Usage: orbitchain-cli asset trustline [asset_code]"); +2026-06-21T01:26:33.4059504Z return Ok(()); +2026-06-21T01:26:33.4059591Z } +2026-06-21T01:26:33.4059671Z - +2026-06-21T01:26:33.4059755Z + +2026-06-21T01:26:33.4059854Z let holder = &args[1]; +2026-06-21T01:26:33.4059994Z let asset_config = AssetConfig::from_env()?; +2026-06-21T01:26:33.4060107Z let asset_code = if args.len() > 2 { +2026-06-21T01:26:33.4060383Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/main.rs:224: +2026-06-21T01:26:33.4060473Z } else { +2026-06-21T01:26:33.4060580Z asset_config.code.clone() +2026-06-21T01:26:33.4060660Z }; +2026-06-21T01:26:33.4060742Z - +2026-06-21T01:26:33.4060821Z + +2026-06-21T01:26:33.4061046Z let network = env::var("SOROBAN_NETWORK").unwrap_or_else(|_| "testnet".to_string()); +2026-06-21T01:26:33.4061131Z - +2026-06-21T01:26:33.4061207Z + +2026-06-21T01:26:33.4061339Z let trustline_config = TrustlineConfig { +2026-06-21T01:26:33.4061435Z asset_code, +2026-06-21T01:26:33.4061578Z asset_issuer: asset_config.issuing_public_key, +2026-06-21T01:26:33.4061851Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/main.rs:233: +2026-06-21T01:26:33.4061974Z holder_public_key: holder.clone(), +2026-06-21T01:26:33.4062059Z }; +2026-06-21T01:26:33.4062145Z - +2026-06-21T01:26:33.4062226Z + +2026-06-21T01:26:33.4062372Z establish_trustline(&trustline_config, &network)?; +2026-06-21T01:26:33.4062458Z } +2026-06-21T01:26:33.4062543Z "issue" => { +2026-06-21T01:26:33.4062835Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/main.rs:240: +2026-06-21T01:26:33.4063035Z println!("Usage: orbitchain-cli asset issue "); +2026-06-21T01:26:33.4063128Z return Ok(()); +2026-06-21T01:26:33.4063212Z } +2026-06-21T01:26:33.4063294Z - +2026-06-21T01:26:33.4063378Z + +2026-06-21T01:26:33.4063481Z let recipient = &args[1]; +2026-06-21T01:26:33.4063650Z let amount: f64 = args[2].parse().context("Invalid amount")?; +2026-06-21T01:26:33.4064035Z let network = env::var("SOROBAN_NETWORK").unwrap_or_else(|_| "testnet".to_string()); +2026-06-21T01:26:33.4064480Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/main.rs:247: +2026-06-21T01:26:33.4064672Z let asset_config = AssetConfig::from_env()?; +2026-06-21T01:26:33.4064790Z - +2026-06-21T01:26:33.4064899Z + +2026-06-21T01:26:33.4065144Z issue_asset(&asset_config, recipient, amount, &network)?; +2026-06-21T01:26:33.4065261Z } +2026-06-21T01:26:33.4065373Z _ => { +2026-06-21T01:26:33.4065816Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/main.rs:279: +2026-06-21T01:26:33.4066183Z println!("Usage: orbitchain-cli keymanager encrypt "); +2026-06-21T01:26:33.4066313Z return Ok(()); +2026-06-21T01:26:33.4066433Z } +2026-06-21T01:26:33.4066550Z - +2026-06-21T01:26:33.4066673Z + +2026-06-21T01:26:33.4066831Z let password = &args[1]; +2026-06-21T01:26:33.4066971Z let secret_key = &args[2]; +2026-06-21T01:26:33.4067292Z - +2026-06-21T01:26:33.4067406Z + +2026-06-21T01:26:33.4067754Z KeyManager::validate_secret_key(secret_key)?; +2026-06-21T01:26:33.4067988Z let manager = KeyManager::from_password(password)?; +2026-06-21T01:26:33.4068244Z let encrypted_hex = manager.export_encrypted(secret_key)?; +2026-06-21T01:26:33.4068821Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/main.rs:289: +2026-06-21T01:26:33.4068944Z - +2026-06-21T01:26:33.4069057Z + +2026-06-21T01:26:33.4069356Z println!("✅ Key encrypted successfully"); +2026-06-21T01:26:33.4069624Z println!("━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"); +2026-06-21T01:26:33.4069809Z println!("Encrypted Key (hex format):"); +2026-06-21T01:26:33.4070260Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/main.rs:299: +2026-06-21T01:26:33.4070624Z println!("Usage: orbitchain-cli keymanager decrypt "); +2026-06-21T01:26:33.4070781Z return Ok(()); +2026-06-21T01:26:33.4070910Z } +2026-06-21T01:26:33.4071021Z - +2026-06-21T01:26:33.4071143Z + +2026-06-21T01:26:33.4071283Z let password = &args[1]; +2026-06-21T01:26:33.4071437Z let encrypted_hex = &args[2]; +2026-06-21T01:26:33.4071556Z - +2026-06-21T01:26:33.4071667Z + +2026-06-21T01:26:33.4071895Z let manager = KeyManager::from_password(password)?; +2026-06-21T01:26:33.4072145Z let encrypted = manager.import_encrypted(encrypted_hex)?; +2026-06-21T01:26:33.4072357Z let secret_key = manager.decrypt_key(&encrypted)?; +2026-06-21T01:26:33.4072800Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/main.rs:309: +2026-06-21T01:26:33.4072915Z - +2026-06-21T01:26:33.4073035Z + +2026-06-21T01:26:33.4073303Z println!("✅ Key decrypted successfully"); +2026-06-21T01:26:33.4073559Z println!("━━━━━━━━━━━━━━━━━━━━━━━━"); +2026-06-21T01:26:33.4073738Z println!("Secret Key: {}", secret_key); +2026-06-21T01:26:33.4074207Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/main.rs:318: +2026-06-21T01:26:33.4074516Z println!("Usage: orbitchain-cli keymanager init-vault "); +2026-06-21T01:26:33.4074655Z return Ok(()); +2026-06-21T01:26:33.4074770Z } +2026-06-21T01:26:33.4074895Z - +2026-06-21T01:26:33.4075012Z + +2026-06-21T01:26:33.4075149Z let password = &args[1]; +2026-06-21T01:26:33.4075402Z let mut vault = EncryptedVault::with_password(password)?; +2026-06-21T01:26:33.4075530Z - +2026-06-21T01:26:33.4075645Z + +2026-06-21T01:26:33.4075918Z println!("✅ Encrypted vault initialized"); +2026-06-21T01:26:33.4076020Z vault.display_status(); +2026-06-21T01:26:33.4076124Z println!(); +2026-06-21T01:26:33.4076409Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/main.rs:328: +2026-06-21T01:26:33.4076684Z - println!("💡 Set VAULT_MASTER_PASSWORD={} in your .env file", password); +2026-06-21T01:26:33.4076779Z + println!( +2026-06-21T01:26:33.4076976Z + "💡 Set VAULT_MASTER_PASSWORD={} in your .env file", +2026-06-21T01:26:33.4077075Z + password +2026-06-21T01:26:33.4077177Z + ); +2026-06-21T01:26:33.4077255Z } +2026-06-21T01:26:33.4077359Z "vault-status" => { +2026-06-21T01:26:33.4077489Z let vault = EncryptedVault::from_env()?; +2026-06-21T01:26:33.4077760Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/main.rs:336: +2026-06-21T01:26:33.4077953Z println!("Usage: orbitchain-cli keymanager vault-save "); +2026-06-21T01:26:33.4078042Z return Ok(()); +2026-06-21T01:26:33.4078130Z } +2026-06-21T01:26:33.4078390Z - +2026-06-21T01:26:33.4078471Z + +2026-06-21T01:26:33.4078737Z let path = &args[1]; +2026-06-21T01:26:33.4079028Z let vault = EncryptedVault::from_env()?; +2026-06-21T01:26:33.4079133Z vault.save_to_file(path)?; +2026-06-21T01:26:33.4079425Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/main.rs:346: +2026-06-21T01:26:33.4079653Z println!("Usage: orbitchain-cli keymanager vault-load "); +2026-06-21T01:26:33.4079754Z return Ok(()); +2026-06-21T01:26:33.4079840Z } +2026-06-21T01:26:33.4079918Z - +2026-06-21T01:26:33.4080002Z + +2026-06-21T01:26:33.4080094Z let path = &args[1]; +2026-06-21T01:26:33.4080196Z let password = &args[2]; +2026-06-21T01:26:33.4080280Z - +2026-06-21T01:26:33.4080358Z + +2026-06-21T01:26:33.4080539Z let vault = EncryptedVault::load_from_file(path, password)?; +2026-06-21T01:26:33.4080654Z vault.display_status(); +2026-06-21T01:26:33.4080733Z } +2026-06-21T01:26:33.4081011Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/main.rs:382: +2026-06-21T01:26:33.4081104Z match args[0].as_str() { +2026-06-21T01:26:33.4081205Z "generate-master" => { +2026-06-21T01:26:33.4081439Z let network = env::var("SOROBAN_NETWORK").unwrap_or_else(|_| "testnet".to_string()); +2026-06-21T01:26:33.4081518Z - +2026-06-21T01:26:33.4081601Z + +2026-06-21T01:26:33.4081790Z println!("🔑 Generating Master Keypair"); +2026-06-21T01:26:33.4081955Z println!("━━━━━━━━━━━━━━━━━━━━━━━━━━━"); +2026-06-21T01:26:33.4082039Z - +2026-06-21T01:26:33.4082117Z + +2026-06-21T01:26:33.4082270Z let keypair = MasterKeypair::generate(&network)?; +2026-06-21T01:26:33.4082371Z keypair.display_safe(); +2026-06-21T01:26:33.4082450Z - +2026-06-21T01:26:33.4082532Z + +2026-06-21T01:26:33.4082639Z println!(); +2026-06-21T01:26:33.4082819Z println!("💡 Store this keypair securely:"); +2026-06-21T01:26:33.4083091Z - println!(" orbitchain-cli keymanager encrypt '' '{}'", keypair.secret_key); +2026-06-21T01:26:33.4083179Z + println!( +2026-06-21T01:26:33.4083349Z + " orbitchain-cli keymanager encrypt '' '{}'", +2026-06-21T01:26:33.4083450Z + keypair.secret_key +2026-06-21T01:26:33.4083531Z + ); +2026-06-21T01:26:33.4083617Z } +2026-06-21T01:26:33.4083721Z "generate-distribution" => { +2026-06-21T01:26:33.4083822Z if args.len() < 2 { +2026-06-21T01:26:33.4084091Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/main.rs:398: +2026-06-21T01:26:33.4084348Z - println!("Usage: orbitchain-cli keypair generate-distribution "); +2026-06-21T01:26:33.4084442Z + println!( +2026-06-21T01:26:33.4084811Z + "Usage: orbitchain-cli keypair generate-distribution " +2026-06-21T01:26:33.4084980Z + ); +2026-06-21T01:26:33.4085076Z return Ok(()); +2026-06-21T01:26:33.4085156Z } +2026-06-21T01:26:33.4085243Z - +2026-06-21T01:26:33.4085385Z + +2026-06-21T01:26:33.4085487Z let issuing_pub = &args[1]; +2026-06-21T01:26:33.4085725Z let network = env::var("SOROBAN_NETWORK").unwrap_or_else(|_| "testnet".to_string()); +2026-06-21T01:26:33.4085813Z - +2026-06-21T01:26:33.4085890Z + +2026-06-21T01:26:33.4086096Z println!("💰 Generating Distribution Account"); +2026-06-21T01:26:33.4086277Z println!("━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"); +2026-06-21T01:26:33.4086366Z - +2026-06-21T01:26:33.4086450Z + +2026-06-21T01:26:33.4086645Z let dist = DistributionAccount::generate(&network, issuing_pub)?; +2026-06-21T01:26:33.4086751Z dist.display_safe(); +2026-06-21T01:26:33.4086848Z - +2026-06-21T01:26:33.4086929Z + +2026-06-21T01:26:33.4087035Z println!(); +2026-06-21T01:26:33.4087296Z println!("💡 Link this distribution account to your issuing account"); +2026-06-21T01:26:33.4087386Z } +2026-06-21T01:26:33.4087668Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/main.rs:440: +2026-06-21T01:26:33.4087903Z println!("Usage: orbitchain-cli keypair fund "); +2026-06-21T01:26:33.4088005Z return Ok(()); +2026-06-21T01:26:33.4088092Z } +2026-06-21T01:26:33.4088172Z - +2026-06-21T01:26:33.4088257Z + +2026-06-21T01:26:33.4088357Z let account_pub = &args[1]; +2026-06-21T01:26:33.4088530Z let amount: f64 = args[2].parse().context("Invalid amount")?; +2026-06-21T01:26:33.4089002Z let network = env::var("SOROBAN_NETWORK").unwrap_or_else(|_| "testnet".to_string()); +2026-06-21T01:26:33.4089280Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/main.rs:447: +2026-06-21T01:26:33.4089378Z - +2026-06-21T01:26:33.4089463Z + +2026-06-21T01:26:33.4089641Z let mut funding = AccountFunding::new(account_pub, &network)?; +2026-06-21T01:26:33.4089752Z funding.fund_testnet(amount)?; +2026-06-21T01:26:33.4089855Z funding.display_status(); +2026-06-21T01:26:33.4090128Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/main.rs:452: +2026-06-21T01:26:33.4090231Z "validate-master" => { +2026-06-21T01:26:33.4090359Z let vault = EncryptedVault::from_env()?; +2026-06-21T01:26:33.4090506Z match MasterKeypair::load_from_vault(&vault) { +2026-06-21T01:26:33.4090604Z - Ok(keypair) => { +2026-06-21T01:26:33.4090718Z - match keypair.validate() { +2026-06-21T01:26:33.4090813Z - Ok(_) => { +2026-06-21T01:26:33.4091019Z - println!("✅ Master keypair is valid"); +2026-06-21T01:26:33.4091149Z - keypair.display_safe(); +2026-06-21T01:26:33.4091242Z - } +2026-06-21T01:26:33.4091334Z - Err(e) => { +2026-06-21T01:26:33.4091574Z - println!("❌ Master keypair validation failed: {}", e); +2026-06-21T01:26:33.4091666Z - } +2026-06-21T01:26:33.4091796Z + Ok(keypair) => match keypair.validate() { +2026-06-21T01:26:33.4091887Z + Ok(_) => { +2026-06-21T01:26:33.4092070Z + println!("✅ Master keypair is valid"); +2026-06-21T01:26:33.4092190Z + keypair.display_safe(); +2026-06-21T01:26:33.4092278Z } +2026-06-21T01:26:33.4092360Z - } +2026-06-21T01:26:33.4092457Z + Err(e) => { +2026-06-21T01:26:33.4092686Z + println!("❌ Master keypair validation failed: {}", e); +2026-06-21T01:26:33.4092918Z + } +2026-06-21T01:26:33.4093210Z + }, +2026-06-21T01:26:33.4093301Z Err(_) => { +2026-06-21T01:26:33.4093511Z println!("❌ Master keypair not found in vault"); +2026-06-21T01:26:33.4093600Z } +2026-06-21T01:26:33.4093869Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/main.rs:471: +2026-06-21T01:26:33.4093980Z "validate-distribution" => { +2026-06-21T01:26:33.4094105Z let vault = EncryptedVault::from_env()?; +2026-06-21T01:26:33.4094268Z match DistributionAccount::load_from_vault(&vault) { +2026-06-21T01:26:33.4094367Z - Ok(dist) => { +2026-06-21T01:26:33.4094474Z - match dist.validate() { +2026-06-21T01:26:33.4094571Z - Ok(_) => { +2026-06-21T01:26:33.4094780Z - println!("✅ Distribution account is valid"); +2026-06-21T01:26:33.4094900Z - dist.display_safe(); +2026-06-21T01:26:33.4094988Z - } +2026-06-21T01:26:33.4095084Z - Err(e) => { +2026-06-21T01:26:33.4095341Z - println!("❌ Distribution account validation failed: {}", e); +2026-06-21T01:26:33.4095430Z - } +2026-06-21T01:26:33.4095546Z + Ok(dist) => match dist.validate() { +2026-06-21T01:26:33.4095640Z + Ok(_) => { +2026-06-21T01:26:33.4095835Z + println!("✅ Distribution account is valid"); +2026-06-21T01:26:33.4095942Z + dist.display_safe(); +2026-06-21T01:26:33.4096028Z } +2026-06-21T01:26:33.4096108Z - } +2026-06-21T01:26:33.4096200Z + Err(e) => { +2026-06-21T01:26:33.4096442Z + println!("❌ Distribution account validation failed: {}", e); +2026-06-21T01:26:33.4096525Z + } +2026-06-21T01:26:33.4096617Z + }, +2026-06-21T01:26:33.4096706Z Err(_) => { +2026-06-21T01:26:33.4096923Z println!("❌ Distribution account not found in vault"); +2026-06-21T01:26:33.4097010Z } +2026-06-21T01:26:33.4097277Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/main.rs:519: +2026-06-21T01:26:33.4097367Z } +2026-06-21T01:26:33.4097452Z +2026-06-21T01:26:33.4097553Z let donor = args[1].clone(); +2026-06-21T01:26:33.4097678Z - let campaign_id: u64 = args[2].parse() +2026-06-21T01:26:33.4097799Z - .context("Invalid campaign ID")?; +2026-06-21T01:26:33.4097906Z - let amount: i128 = args[3].parse() +2026-06-21T01:26:33.4098018Z - .context("Invalid amount")?; +2026-06-21T01:26:33.4098212Z + let campaign_id: u64 = args[2].parse().context("Invalid campaign ID")?; +2026-06-21T01:26:33.4098380Z + let amount: i128 = args[3].parse().context("Invalid amount")?; +2026-06-21T01:26:33.4098495Z let asset = if args.len() > 4 { +2026-06-21T01:26:33.4098708Z args[4].clone() +2026-06-21T01:26:33.4098804Z } else { +2026-06-21T01:26:33.4099072Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/main.rs:534: +2026-06-21T01:26:33.4099154Z None +2026-06-21T01:26:33.4099243Z }; +2026-06-21T01:26:33.4099324Z +2026-06-21T01:26:33.4099619Z - match TransactionBuilder::build_donation_request(donor, campaign_id, amount, asset, memo) { +2026-06-21T01:26:33.4099769Z + match TransactionBuilder::build_donation_request( +2026-06-21T01:26:33.4099857Z + donor, +2026-06-21T01:26:33.4099955Z + campaign_id, +2026-06-21T01:26:33.4100042Z + amount, +2026-06-21T01:26:33.4100172Z + asset, +2026-06-21T01:26:33.4100303Z + memo, +2026-06-21T01:26:33.4100423Z + ) { +2026-06-21T01:26:33.4100738Z Ok(req) => { +2026-06-21T01:26:33.4100883Z req.display(); +2026-06-21T01:26:33.4101160Z println!(); +2026-06-21T01:26:33.4101609Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/main.rs:556: +2026-06-21T01:26:33.4101724Z +2026-06-21T01:26:33.4101879Z let creator = args[1].clone(); +2026-06-21T01:26:33.4102026Z let title = args[2].clone(); +2026-06-21T01:26:33.4102173Z - let goal: i128 = args[3].parse() +2026-06-21T01:26:33.4102328Z - .context("Invalid goal")?; +2026-06-21T01:26:33.4102494Z - let deadline: u64 = args[4].parse() +2026-06-21T01:26:33.4102652Z - .context("Invalid deadline")?; +2026-06-21T01:26:33.4102895Z + let goal: i128 = args[3].parse().context("Invalid goal")?; +2026-06-21T01:26:33.4103167Z + let deadline: u64 = args[4].parse().context("Invalid deadline")?; +2026-06-21T01:26:33.4103288Z +2026-06-21T01:26:33.4103702Z match TransactionBuilder::build_campaign_request(creator, title, goal, deadline) { +2026-06-21T01:26:33.4103838Z Ok(req) => { +2026-06-21T01:26:33.4104282Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/main.rs:589: +2026-06-21T01:26:33.4104408Z }; +2026-06-21T01:26:33.4104519Z +2026-06-21T01:26:33.4104731Z match SigningRequestBuilder::new(xdr, None) { +2026-06-21T01:26:33.4104868Z - Ok(builder) => { +2026-06-21T01:26:33.4105123Z - match builder.with_description(description).build() { +2026-06-21T01:26:33.4105262Z - Ok(req) => { +2026-06-21T01:26:33.4105401Z - req.display(); +2026-06-21T01:26:33.4105546Z - println!(); +2026-06-21T01:26:33.4105916Z - println!("✅ Signing request created successfully"); +2026-06-21T01:26:33.4106040Z - } +2026-06-21T01:26:33.4106183Z - Err(e) => { +2026-06-21T01:26:33.4106490Z - println!("❌ Failed to build request: {}", e); +2026-06-21T01:26:33.4106628Z - } +2026-06-21T01:26:33.4106930Z + Ok(builder) => match builder.with_description(description).build() { +2026-06-21T01:26:33.4107022Z + Ok(req) => { +2026-06-21T01:26:33.4107126Z + req.display(); +2026-06-21T01:26:33.4107222Z + println!(); +2026-06-21T01:26:33.4107438Z + println!("✅ Signing request created successfully"); +2026-06-21T01:26:33.4107529Z } +2026-06-21T01:26:33.4107610Z - } +2026-06-21T01:26:33.4107707Z + Err(e) => { +2026-06-21T01:26:33.4107910Z + println!("❌ Failed to build request: {}", e); +2026-06-21T01:26:33.4107991Z + } +2026-06-21T01:26:33.4108126Z + }, +2026-06-21T01:26:33.4108263Z Err(e) => { +2026-06-21T01:26:33.4108699Z println!("❌ Failed to create builder: {}", e); +2026-06-21T01:26:33.4108835Z } +2026-06-21T01:26:33.4109284Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/main.rs:614: +2026-06-21T01:26:33.4109408Z +2026-06-21T01:26:33.4109550Z let path = &args[1]; +2026-06-21T01:26:33.4109725Z match std::fs::read_to_string(path) { +2026-06-21T01:26:33.4109867Z - Ok(content) => { +2026-06-21T01:26:33.4110078Z - match SigningRequest::from_json(&content) { +2026-06-21T01:26:33.4110220Z - Ok(req) => { +2026-06-21T01:26:33.4110388Z - match req.validate() { +2026-06-21T01:26:33.4110520Z - Ok(_) => { +2026-06-21T01:26:33.4110841Z - println!("✅ Signing request is valid"); +2026-06-21T01:26:33.4111005Z - req.display(); +2026-06-21T01:26:33.4111374Z - } +2026-06-21T01:26:33.4111521Z - Err(e) => { +2026-06-21T01:26:33.4111965Z - println!("❌ Validation failed: {}", e); +2026-06-21T01:26:33.4112097Z - } +2026-06-21T01:26:33.4112226Z - } +2026-06-21T01:26:33.4112476Z + Ok(content) => match SigningRequest::from_json(&content) { +2026-06-21T01:26:33.4112654Z + Ok(req) => match req.validate() { +2026-06-21T01:26:33.4112787Z + Ok(_) => { +2026-06-21T01:26:33.4113074Z + println!("✅ Signing request is valid"); +2026-06-21T01:26:33.4113216Z + req.display(); +2026-06-21T01:26:33.4113334Z } +2026-06-21T01:26:33.4113471Z Err(e) => { +2026-06-21T01:26:33.4113786Z - println!("❌ Failed to parse request: {}", e); +2026-06-21T01:26:33.4114071Z + println!("❌ Validation failed: {}", e); +2026-06-21T01:26:33.4114217Z } +2026-06-21T01:26:33.4114333Z + }, +2026-06-21T01:26:33.4114421Z + Err(e) => { +2026-06-21T01:26:33.4114621Z + println!("❌ Failed to parse request: {}", e); +2026-06-21T01:26:33.4114705Z } +2026-06-21T01:26:33.4114795Z - } +2026-06-21T01:26:33.4114880Z + }, +2026-06-21T01:26:33.4114968Z Err(e) => { +2026-06-21T01:26:33.4115274Z println!("❌ Failed to read file: {}", e); +2026-06-21T01:26:33.4115395Z } +2026-06-21T01:26:33.4115859Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/main.rs:647: +2026-06-21T01:26:33.4115976Z +2026-06-21T01:26:33.4116110Z let path = &args[1]; +2026-06-21T01:26:33.4116285Z match std::fs::read_to_string(path) { +2026-06-21T01:26:33.4116434Z - Ok(content) => { +2026-06-21T01:26:33.4116634Z - match SigningRequest::from_json(&content) { +2026-06-21T01:26:33.4116784Z - Ok(req) => { +2026-06-21T01:26:33.4116960Z - match req.to_wallet_format() { +2026-06-21T01:26:33.4117130Z - Ok(wallet_format) => { +2026-06-21T01:26:33.4117418Z - println!("📤 Wallet Format:"); +2026-06-21T01:26:33.4117600Z - println!("{}", wallet_format); +2026-06-21T01:26:33.4117736Z - } +2026-06-21T01:26:33.4117883Z - Err(e) => { +2026-06-21T01:26:33.4118179Z - println!("❌ Failed to export: {}", e); +2026-06-21T01:26:33.4118313Z - } +2026-06-21T01:26:33.4118435Z - } +2026-06-21T01:26:33.4118823Z + Ok(content) => match SigningRequest::from_json(&content) { +2026-06-21T01:26:33.4119027Z + Ok(req) => match req.to_wallet_format() { +2026-06-21T01:26:33.4119188Z + Ok(wallet_format) => { +2026-06-21T01:26:33.4119452Z + println!("📤 Wallet Format:"); +2026-06-21T01:26:33.4119630Z + println!("{}", wallet_format); +2026-06-21T01:26:33.4119753Z } +2026-06-21T01:26:33.4119889Z Err(e) => { +2026-06-21T01:26:33.4120195Z - println!("❌ Failed to parse request: {}", e); +2026-06-21T01:26:33.4120474Z + println!("❌ Failed to export: {}", e); +2026-06-21T01:26:33.4120605Z } +2026-06-21T01:26:33.4120726Z + }, +2026-06-21T01:26:33.4120862Z + Err(e) => { +2026-06-21T01:26:33.4121170Z + println!("❌ Failed to parse request: {}", e); +2026-06-21T01:26:33.4121293Z } +2026-06-21T01:26:33.4121571Z - } +2026-06-21T01:26:33.4121655Z + }, +2026-06-21T01:26:33.4121869Z Err(e) => { +2026-06-21T01:26:33.4122051Z println!("❌ Failed to read file: {}", e); +2026-06-21T01:26:33.4122135Z } +2026-06-21T01:26:33.4122481Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/main.rs:723: +2026-06-21T01:26:33.4122600Z +2026-06-21T01:26:33.4122739Z let path = &args[1]; +2026-06-21T01:26:33.4122922Z match std::fs::read_to_string(path) { +2026-06-21T01:26:33.4123050Z - Ok(content) => { +2026-06-21T01:26:33.4123286Z - match ResponseHandler::parse_response(&content) { +2026-06-21T01:26:33.4123421Z - Ok(tx) => { +2026-06-21T01:26:33.4123618Z - match ResponseHandler::validate(&tx) { +2026-06-21T01:26:33.4123760Z - Ok(_) => { +2026-06-21T01:26:33.4124072Z - println!("✅ Transaction is valid"); +2026-06-21T01:26:33.4124325Z - println!("Request ID: {}", tx.request_id); +2026-06-21T01:26:33.4124544Z - println!("Signer: {}", tx.signer); +2026-06-21T01:26:33.4124744Z - println!("Status: {}", tx.status); +2026-06-21T01:26:33.4125064Z - println!("XDR Length: {} bytes", tx.transaction_xdr.len()); +2026-06-21T01:26:33.4125196Z - } +2026-06-21T01:26:33.4125333Z - Err(e) => { +2026-06-21T01:26:33.4125646Z - println!("❌ Validation failed: {}", e); +2026-06-21T01:26:33.4125774Z - } +2026-06-21T01:26:33.4125892Z - } +2026-06-21T01:26:33.4126178Z + Ok(content) => match ResponseHandler::parse_response(&content) { +2026-06-21T01:26:33.4126402Z + Ok(tx) => match ResponseHandler::validate(&tx) { +2026-06-21T01:26:33.4126544Z + Ok(_) => { +2026-06-21T01:26:33.4126768Z + println!("✅ Transaction is valid"); +2026-06-21T01:26:33.4126907Z + println!("Request ID: {}", tx.request_id); +2026-06-21T01:26:33.4127038Z + println!("Signer: {}", tx.signer); +2026-06-21T01:26:33.4127163Z + println!("Status: {}", tx.status); +2026-06-21T01:26:33.4127347Z + println!("XDR Length: {} bytes", tx.transaction_xdr.len()); +2026-06-21T01:26:33.4127434Z } +2026-06-21T01:26:33.4127522Z Err(e) => { +2026-06-21T01:26:33.4127726Z - println!("❌ Failed to parse response: {}", e); +2026-06-21T01:26:33.4127920Z + println!("❌ Validation failed: {}", e); +2026-06-21T01:26:33.4128011Z } +2026-06-21T01:26:33.4128103Z + }, +2026-06-21T01:26:33.4128200Z + Err(e) => { +2026-06-21T01:26:33.4128394Z + println!("❌ Failed to parse response: {}", e); +2026-06-21T01:26:33.4128483Z } +2026-06-21T01:26:33.4128739Z - } +2026-06-21T01:26:33.4128861Z + }, +2026-06-21T01:26:33.4128961Z Err(e) => { +2026-06-21T01:26:33.4129138Z println!("❌ Failed to read file: {}", e); +2026-06-21T01:26:33.4129227Z } +2026-06-21T01:26:33.4129502Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/main.rs:759: +2026-06-21T01:26:33.4129602Z let output_path = &args[2]; +2026-06-21T01:26:33.4129690Z +2026-06-21T01:26:33.4129843Z match ResponseHandler::parse_response(&response) { +2026-06-21T01:26:33.4129938Z - Ok(tx) => { +2026-06-21T01:26:33.4130110Z - match ResponseHandler::save_to_file(&tx, output_path) { +2026-06-21T01:26:33.4130364Z - Ok(_) => { +2026-06-21T01:26:33.4130713Z - println!("✅ Transaction saved to {}", output_path); +2026-06-21T01:26:33.4130853Z - println!("Request ID: {}", tx.request_id); +2026-06-21T01:26:33.4130939Z - } +2026-06-21T01:26:33.4131035Z - Err(e) => { +2026-06-21T01:26:33.4131241Z - println!("❌ Failed to save transaction: {}", e); +2026-06-21T01:26:33.4131332Z - } +2026-06-21T01:26:33.4131516Z + Ok(tx) => match ResponseHandler::save_to_file(&tx, output_path) { +2026-06-21T01:26:33.4131604Z + Ok(_) => { +2026-06-21T01:26:33.4131813Z + println!("✅ Transaction saved to {}", output_path); +2026-06-21T01:26:33.4131949Z + println!("Request ID: {}", tx.request_id); +2026-06-21T01:26:33.4132043Z } +2026-06-21T01:26:33.4132129Z - } +2026-06-21T01:26:33.4132220Z + Err(e) => { +2026-06-21T01:26:33.4132436Z + println!("❌ Failed to save transaction: {}", e); +2026-06-21T01:26:33.4132526Z + } +2026-06-21T01:26:33.4132607Z + }, +2026-06-21T01:26:33.4132704Z Err(e) => { +2026-06-21T01:26:33.4132888Z println!("❌ Failed to parse response: {}", e); +2026-06-21T01:26:33.4132978Z } +2026-06-21T01:26:33.4133475Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/main.rs:835: +2026-06-21T01:26:33.4133594Z +2026-06-21T01:26:33.4133727Z Ok(()) +2026-06-21T01:26:33.4133852Z } +2026-06-21T01:26:33.4133965Z - +2026-06-21T01:26:33.4134085Z +2026-06-21T01:26:33.4134632Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/polling_scheduler.rs:23: +2026-06-21T01:26:33.4134773Z Err(e) => { +2026-06-21T01:26:33.4135086Z logger.log(LogLevel::Error, format!("Poll cycle failed: {e}")); +2026-06-21T01:26:33.4135247Z if !logger.is_healthy() { +2026-06-21T01:26:33.4135652Z - logger.log(LogLevel::Warn, format!("Worker health: {:?}", logger.health_status())); +2026-06-21T01:26:33.4135792Z + logger.log( +2026-06-21T01:26:33.4135937Z + LogLevel::Warn, +2026-06-21T01:26:33.4136189Z + format!("Worker health: {:?}", logger.health_status()), +2026-06-21T01:26:33.4136310Z + ); +2026-06-21T01:26:33.4136437Z } +2026-06-21T01:26:33.4136564Z } +2026-06-21T01:26:33.4136679Z } +2026-06-21T01:26:33.4137224Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/response_handler.rs:3: +2026-06-21T01:26:33.4137763Z //! Parses wallet signing responses, validates signed transactions, +2026-06-21T01:26:33.4138021Z //! and persists/loads them from JSON files for later submission. +2026-06-21T01:26:33.4138154Z +2026-06-21T01:26:33.4138321Z -use anyhow::{Result, Context, anyhow}; +2026-06-21T01:26:33.4138492Z -use serde::{Serialize, Deserialize}; +2026-06-21T01:26:33.4138796Z +use anyhow::{anyhow, Context, Result}; +2026-06-21T01:26:33.4138952Z +use serde::{Deserialize, Serialize}; +2026-06-21T01:26:33.4139098Z use serde_json::json; +2026-06-21T01:26:33.4139225Z use std::fs; +2026-06-21T01:26:33.4139352Z +2026-06-21T01:26:33.4139839Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/response_handler.rs:51: +2026-06-21T01:26:33.4139927Z #[must_use] +2026-06-21T01:26:33.4140146Z pub fn parse_response(response_json: &str) -> Result { +2026-06-21T01:26:33.4140264Z let parsed: serde_json::Value = +2026-06-21T01:26:33.4140388Z - serde_json::from_str(response_json) +2026-06-21T01:26:33.4140536Z - .context("Failed to parse response JSON")?; +2026-06-21T01:26:33.4140936Z + serde_json::from_str(response_json).context("Failed to parse response JSON")?; +2026-06-21T01:26:33.4141141Z +2026-06-21T01:26:33.4141245Z Ok(SignedTransaction { +2026-06-21T01:26:33.4141354Z request_id: parsed["requestId"] +2026-06-21T01:26:33.4141679Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/response_handler.rs:66: +2026-06-21T01:26:33.4141789Z signed_at: parsed["signedAt"] +2026-06-21T01:26:33.4142002Z .as_u64() +2026-06-21T01:26:33.4142187Z .unwrap_or_else(|| chrono::Local::now().timestamp() as u64), +2026-06-21T01:26:33.4142286Z - signer: parsed["signer"] +2026-06-21T01:26:33.4142384Z - .as_str() +2026-06-21T01:26:33.4142492Z - .unwrap_or("unknown") +2026-06-21T01:26:33.4142582Z - .to_string(), +2026-06-21T01:26:33.4142777Z + signer: parsed["signer"].as_str().unwrap_or("unknown").to_string(), +2026-06-21T01:26:33.4142914Z status: TransactionStatus::Signed, +2026-06-21T01:26:33.4142999Z }) +2026-06-21T01:26:33.4143096Z } +2026-06-21T01:26:33.4143402Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/response_handler.rs:95: +2026-06-21T01:26:33.4143516Z /// Save signed transaction to file. +2026-06-21T01:26:33.4143606Z #[must_use] +2026-06-21T01:26:33.4143794Z pub fn save_to_file(tx: &SignedTransaction, path: &str) -> Result<()> { +2026-06-21T01:26:33.4143929Z - let json = serde_json::to_string_pretty(tx) +2026-06-21T01:26:33.4144070Z - .context("Failed to serialize transaction")?; +2026-06-21T01:26:33.4144323Z + let json = serde_json::to_string_pretty(tx).context("Failed to serialize transaction")?; +2026-06-21T01:26:33.4144410Z +2026-06-21T01:26:33.4144508Z - fs::write(path, json) +2026-06-21T01:26:33.4144697Z - .context(format!("Failed to write transaction to {}", path))?; +2026-06-21T01:26:33.4144933Z + fs::write(path, json).context(format!("Failed to write transaction to {}", path))?; +2026-06-21T01:26:33.4145119Z +2026-06-21T01:26:33.4145213Z Ok(()) +2026-06-21T01:26:33.4145299Z } +2026-06-21T01:26:33.4145632Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/response_handler.rs:110: +2026-06-21T01:26:33.4145762Z let content = fs::read_to_string(path) +2026-06-21T01:26:33.4145938Z .context(format!("Failed to read transaction from {}", path))?; +2026-06-21T01:26:33.4146027Z +2026-06-21T01:26:33.4146140Z - serde_json::from_str(&content) +2026-06-21T01:26:33.4146272Z - .context("Failed to deserialize transaction") +2026-06-21T01:26:33.4146488Z + serde_json::from_str(&content).context("Failed to deserialize transaction") +2026-06-21T01:26:33.4146575Z } +2026-06-21T01:26:33.4146653Z +2026-06-21T01:26:33.4146814Z /// Process wallet response and return signed transaction +2026-06-21T01:26:33.4147139Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/response_handler.rs:171: +2026-06-21T01:26:33.4147238Z +2026-06-21T01:26:33.4147332Z /// Export as JSON +2026-06-21T01:26:33.4147450Z pub fn to_json(&self) -> Result { +2026-06-21T01:26:33.4147567Z - serde_json::to_string_pretty(self) +2026-06-21T01:26:33.4147695Z - .context("Failed to serialize response") +2026-06-21T01:26:33.4147903Z + serde_json::to_string_pretty(self).context("Failed to serialize response") +2026-06-21T01:26:33.4147989Z } +2026-06-21T01:26:33.4148068Z } +2026-06-21T01:26:33.4148153Z +2026-06-21T01:26:33.4148464Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/response_handler.rs:216: +2026-06-21T01:26:33.4148544Z +2026-06-21T01:26:33.4148874Z impl ResponseBuilder { +2026-06-21T01:26:33.4149013Z /// Create a test response JSON +2026-06-21T01:26:33.4149122Z - pub fn build_response( +2026-06-21T01:26:33.4149224Z - request_id: String, +2026-06-21T01:26:33.4149453Z - xdr: String, +2026-06-21T01:26:33.4149550Z - signer: String, +2026-06-21T01:26:33.4149758Z - ) -> String { +2026-06-21T01:26:33.4149986Z + pub fn build_response(request_id: String, xdr: String, signer: String) -> String { +2026-06-21T01:26:33.4150077Z json!({ +2026-06-21T01:26:33.4150179Z "requestId": request_id, +2026-06-21T01:26:33.4150277Z "xdr": xdr, +2026-06-21T01:26:33.4150595Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/response_handler.rs:257: +2026-06-21T01:26:33.4150693Z "xdr": "AAAAAA==test", +2026-06-21T01:26:33.4150930Z "signer": "GBJCHUKZMTFSLOMNC2P4TS4VJJBTCYL3SDKW3KSMSGQUZ6EFLXVX77JVH", +2026-06-21T01:26:33.4151020Z "signedAt": 1234567890 +2026-06-21T01:26:33.4151116Z - }).to_string(); +2026-06-21T01:26:33.4151204Z + }) +2026-06-21T01:26:33.4151289Z + .to_string(); +2026-06-21T01:26:33.4151377Z +2026-06-21T01:26:33.4151557Z let result = ResponseHandler::parse_response(&response); +2026-06-21T01:26:33.4151657Z assert!(result.is_ok()); +2026-06-21T01:26:33.4152039Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/signing_request.rs:3: +2026-06-21T01:26:33.4152238Z //! Builds signing requests for donation, campaign creation, and custom +2026-06-21T01:26:33.4152469Z //! transactions, with JSON serialization for wallet compatibility and QR export. +2026-06-21T01:26:33.4152557Z +2026-06-21T01:26:33.4152669Z -use anyhow::{Result, Context, anyhow}; +2026-06-21T01:26:33.4152783Z -use serde::{Serialize, Deserialize}; +2026-06-21T01:26:33.4152891Z +use anyhow::{anyhow, Context, Result}; +2026-06-21T01:26:33.4152993Z +use serde::{Deserialize, Serialize}; +2026-06-21T01:26:33.4153093Z use serde_json::json; +2026-06-21T01:26:33.4153189Z use sha2::{Digest, Sha256}; +2026-06-21T01:26:33.4153283Z use std::env; +2026-06-21T01:26:33.4153619Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/signing_request.rs:35: +2026-06-21T01:26:33.4153812Z env::var("SOROBAN_NETWORK").unwrap_or_else(|_| "testnet".to_string()) +2026-06-21T01:26:33.4153905Z }); +2026-06-21T01:26:33.4153986Z +2026-06-21T01:26:33.4154076Z - let id = format!( +2026-06-21T01:26:33.4154165Z - "req_{}", +2026-06-21T01:26:33.4154292Z - chrono::Local::now().timestamp_millis() +2026-06-21T01:26:33.4154379Z - ); +2026-06-21T01:26:33.4154563Z + let id = format!("req_{}", chrono::Local::now().timestamp_millis()); +2026-06-21T01:26:33.4154645Z +2026-06-21T01:26:33.4154756Z Ok(SigningRequestBuilder { +2026-06-21T01:26:33.4154844Z id, +2026-06-21T01:26:33.4155155Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/signing_request.rs:83: +2026-06-21T01:26:33.4155251Z asset: String, +2026-06-21T01:26:33.4155348Z memo: Option, +2026-06-21T01:26:33.4155455Z ) -> Result { +2026-06-21T01:26:33.4155556Z - let desc = format!( +2026-06-21T01:26:33.4155662Z - "Donate {} {} to campaign #{}", +2026-06-21T01:26:33.4155778Z - amount, asset, campaign_id +2026-06-21T01:26:33.4155860Z - ); +2026-06-21T01:26:33.4156072Z + let desc = format!("Donate {} {} to campaign #{}", amount, asset, campaign_id); +2026-06-21T01:26:33.4156157Z +2026-06-21T01:26:33.4156410Z // Placeholder XDR - in real implementation, this would be built from actual transaction +2026-06-21T01:26:33.4156518Z - let transaction_xdr = format!( +2026-06-21T01:26:33.4156612Z - "AAAAAA=={}{}{}", +2026-06-21T01:26:33.4156725Z - donor_address, campaign_id, amount +2026-06-21T01:26:33.4156811Z - ); +2026-06-21T01:26:33.4157035Z + let transaction_xdr = format!("AAAAAA=={}{}{}", donor_address, campaign_id, amount); +2026-06-21T01:26:33.4157123Z +2026-06-21T01:26:33.4157321Z - let mut builder = SigningRequestBuilder::new(transaction_xdr, None)? +2026-06-21T01:26:33.4157534Z - .with_description(desc); +2026-06-21T01:26:33.4157894Z + let mut builder = SigningRequestBuilder::new(transaction_xdr, None)?.with_description(desc); +2026-06-21T01:26:33.4157980Z +2026-06-21T01:26:33.4158078Z if let Some(m) = memo { +2026-06-21T01:26:33.4158246Z let desc = format!("{} [memo: {}]", builder.description, m); +2026-06-21T01:26:33.4158716Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/signing_request.rs:117: +2026-06-21T01:26:33.4158848Z title, goal, deadline +2026-06-21T01:26:33.4158935Z ); +2026-06-21T01:26:33.4159015Z +2026-06-21T01:26:33.4159125Z - let transaction_xdr = format!( +2026-06-21T01:26:33.4159221Z - "AAAAAA=={}{}{}{}", +2026-06-21T01:26:33.4159343Z - creator_address, title, goal, deadline +2026-06-21T01:26:33.4159429Z - ); +2026-06-21T01:26:33.4159664Z + let transaction_xdr = format!("AAAAAA=={}{}{}{}", creator_address, title, goal, deadline); +2026-06-21T01:26:33.4159755Z +2026-06-21T01:26:33.4159913Z SigningRequestBuilder::new(transaction_xdr, None)? +2026-06-21T01:26:33.4160017Z .with_description(desc) +2026-06-21T01:26:33.4160334Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/signing_request.rs:132: +2026-06-21T01:26:33.4160478Z /// Convert signing request to JSON for transmission. +2026-06-21T01:26:33.4160564Z #[must_use] +2026-06-21T01:26:33.4160687Z pub fn to_json(&self) -> Result { +2026-06-21T01:26:33.4160795Z - serde_json::to_string_pretty(self) +2026-06-21T01:26:33.4160961Z - .context("Failed to serialize signing request to JSON") +2026-06-21T01:26:33.4161217Z + serde_json::to_string_pretty(self).context("Failed to serialize signing request to JSON") +2026-06-21T01:26:33.4161298Z } +2026-06-21T01:26:33.4161384Z +2026-06-21T01:26:33.4161483Z /// Create from JSON string. +2026-06-21T01:26:33.4161792Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/signing_request.rs:140: +2026-06-21T01:26:33.4161886Z #[must_use] +2026-06-21T01:26:33.4162008Z pub fn from_json(json: &str) -> Result { +2026-06-21T01:26:33.4162116Z - serde_json::from_str(json) +2026-06-21T01:26:33.4162289Z - .context("Failed to deserialize signing request from JSON") +2026-06-21T01:26:33.4162522Z + serde_json::from_str(json).context("Failed to deserialize signing request from JSON") +2026-06-21T01:26:33.4162609Z } +2026-06-21T01:26:33.4162723Z +2026-06-21T01:26:33.4162895Z /// Convert to wallet signing format (for Freighter and similar) +2026-06-21T01:26:33.4163203Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/signing_request.rs:231: +2026-06-21T01:26:33.4163528Z /// Issue #132 – Sign using the secret key stored in the SOROBAN_SECRET_KEY env var. +2026-06-21T01:26:33.4163625Z #[must_use] +2026-06-21T01:26:33.4163806Z pub fn sign_from_env(&self) -> Result { +2026-06-21T01:26:33.4163949Z - let secret_key = env::var("SOROBAN_SECRET_KEY") +2026-06-21T01:26:33.4164114Z - .context("SOROBAN_SECRET_KEY not set in environment")?; +2026-06-21T01:26:33.4164210Z + let secret_key = +2026-06-21T01:26:33.4164448Z + env::var("SOROBAN_SECRET_KEY").context("SOROBAN_SECRET_KEY not set in environment")?; +2026-06-21T01:26:33.4164558Z self.sign_server_side(&secret_key) +2026-06-21T01:26:33.4164637Z } +2026-06-21T01:26:33.4164725Z } +2026-06-21T01:26:33.4165046Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/signing_request.rs:324: +2026-06-21T01:26:33.4165156Z description: "Test".to_string(), +2026-06-21T01:26:33.4165256Z created_at: 0, +2026-06-21T01:26:33.4165341Z }; +2026-06-21T01:26:33.4165702Z - let sig1 = req.sign_server_side("SBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU").unwrap().signature; +2026-06-21T01:26:33.4166203Z - let sig2 = req.sign_server_side("SCZANGBA5QDPSBM5QOTSXSI7JKEFYABMUQRPTGMWNJKFA5ENDNSQSTE").unwrap().signature; +2026-06-21T01:26:33.4166480Z + let sig1 = req +2026-06-21T01:26:33.4166858Z + .sign_server_side("SBZXVMIRWXL5VZVKXWV2FGKYTQ5VV5VRNJYQVZKYWW3XYVYP3IXGKDU") +2026-06-21T01:26:33.4166984Z + .unwrap() +2026-06-21T01:26:33.4167114Z + .signature; +2026-06-21T01:26:33.4167246Z + let sig2 = req +2026-06-21T01:26:33.4167635Z + .sign_server_side("SCZANGBA5QDPSBM5QOTSXSI7JKEFYABMUQRPTGMWNJKFA5ENDNSQSTE") +2026-06-21T01:26:33.4167758Z + .unwrap() +2026-06-21T01:26:33.4167895Z + .signature; +2026-06-21T01:26:33.4168035Z assert_ne!(sig1, sig2); +2026-06-21T01:26:33.4168160Z } +2026-06-21T01:26:33.4168284Z +2026-06-21T01:26:33.4168995Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/withdrawal_audit.rs:46: +2026-06-21T01:26:33.4169132Z } +2026-06-21T01:26:33.4169245Z +2026-06-21T01:26:33.4169406Z /// Log a withdrawal action. +2026-06-21T01:26:33.4169781Z - pub fn log(&mut self, campaign_id: u64, action: WithdrawalAction, actor: &str, amount: i128, note: Option) { +2026-06-21T01:26:33.4169870Z + pub fn log( +2026-06-21T01:26:33.4169963Z + &mut self, +2026-06-21T01:26:33.4170064Z + campaign_id: u64, +2026-06-21T01:26:33.4170164Z + action: WithdrawalAction, +2026-06-21T01:26:33.4170257Z + actor: &str, +2026-06-21T01:26:33.4170343Z + amount: i128, +2026-06-21T01:26:33.4170445Z + note: Option, +2026-06-21T01:26:33.4170532Z + ) { +2026-06-21T01:26:33.4170658Z self.entries.push(WithdrawalLogEntry { +2026-06-21T01:26:33.4170753Z campaign_id, +2026-06-21T01:26:33.4170836Z action, +2026-06-21T01:26:33.4171167Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/withdrawal_audit.rs:60: +2026-06-21T01:26:33.4171289Z /// Returns all log entries for a campaign. +2026-06-21T01:26:33.4171376Z #[must_use] +2026-06-21T01:26:33.4171599Z pub fn get_by_campaign(&self, campaign_id: u64) -> Vec<&WithdrawalLogEntry> { +2026-06-21T01:26:33.4171807Z - self.entries.iter().filter(|e| e.campaign_id == campaign_id).collect() +2026-06-21T01:26:33.4171893Z + self.entries +2026-06-21T01:26:33.4171984Z + .iter() +2026-06-21T01:26:33.4172164Z + .filter(|e| e.campaign_id == campaign_id) +2026-06-21T01:26:33.4172350Z + .collect() +2026-06-21T01:26:33.4172516Z } +2026-06-21T01:26:33.4172634Z +2026-06-21T01:26:33.4172938Z /// Returns all entries in the log. +2026-06-21T01:26:33.4173463Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/withdrawal_audit.rs:93: +2026-06-21T01:26:33.4173605Z fn logs_and_retrieves_entries() { +2026-06-21T01:26:33.4173794Z let mut log = WithdrawalAuditLog::new(); +2026-06-21T01:26:33.4174082Z log.log(1, WithdrawalAction::Requested, "creator_A", 500, None); +2026-06-21T01:26:33.4174470Z - log.log(1, WithdrawalAction::Approved, "admin", 500, Some("looks good".to_string())); +2026-06-21T01:26:33.4174609Z + log.log( +2026-06-21T01:26:33.4174732Z + 1, +2026-06-21T01:26:33.4174869Z + WithdrawalAction::Approved, +2026-06-21T01:26:33.4174964Z + "admin", +2026-06-21T01:26:33.4175051Z + 500, +2026-06-21T01:26:33.4175167Z + Some("looks good".to_string()), +2026-06-21T01:26:33.4175251Z + ); +2026-06-21T01:26:33.4175343Z +2026-06-21T01:26:33.4175464Z let entries = log.get_by_campaign(1); +2026-06-21T01:26:33.4175567Z assert_eq!(entries.len(), 2); +2026-06-21T01:26:33.4175904Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/withdrawal_limits.rs:29: +2026-06-21T01:26:33.4176020Z impl Default for WithdrawalLimits { +2026-06-21T01:26:33.4176118Z fn default() -> Self { +2026-06-21T01:26:33.4176210Z Self { +2026-06-21T01:26:33.4176536Z - min_per_withdrawal: 100, // 100 stroops minimum +2026-06-21T01:26:33.4176858Z + min_per_withdrawal: 100, // 100 stroops minimum +2026-06-21T01:26:33.4177060Z max_per_withdrawal: 10_000_000_000, // 1000 XLM maximum per withdrawal +2026-06-21T01:26:33.4177217Z - max_total: None, // no global cap by default +2026-06-21T01:26:33.4177384Z + max_total: None, // no global cap by default +2026-06-21T01:26:33.4177471Z } +2026-06-21T01:26:33.4177553Z } +2026-06-21T01:26:33.4177639Z } +2026-06-21T01:26:33.4177959Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/withdrawal_limits.rs:44: +2026-06-21T01:26:33.4178055Z if max < min { +2026-06-21T01:26:33.4178206Z return Err(anyhow!("Maximum must be >= minimum")); +2026-06-21T01:26:33.4178288Z } +2026-06-21T01:26:33.4178493Z - Ok(Self { min_per_withdrawal: min, max_per_withdrawal: max, max_total }) +2026-06-21T01:26:33.4184783Z + Ok(Self { +2026-06-21T01:26:33.4185020Z + min_per_withdrawal: min, +2026-06-21T01:26:33.4185136Z + max_per_withdrawal: max, +2026-06-21T01:26:33.4185227Z + max_total, +2026-06-21T01:26:33.4185320Z + }) +2026-06-21T01:26:33.4185403Z } +2026-06-21T01:26:33.4185481Z +2026-06-21T01:26:33.4185681Z /// Validates a proposed withdrawal amount against the limits. +2026-06-21T01:26:33.4186033Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/withdrawal_limits.rs:54: +2026-06-21T01:26:33.4186163Z if amount < self.min_per_withdrawal { +2026-06-21T01:26:33.4186268Z return Err(anyhow!( +2026-06-21T01:26:33.4186416Z "Withdrawal amount {} is below the minimum of {}", +2026-06-21T01:26:33.4186538Z - amount, self.min_per_withdrawal +2026-06-21T01:26:33.4186632Z + amount, +2026-06-21T01:26:33.4186743Z + self.min_per_withdrawal +2026-06-21T01:26:33.4186836Z )); +2026-06-21T01:26:33.4186921Z } +2026-06-21T01:26:33.4187038Z if amount > self.max_per_withdrawal { +2026-06-21T01:26:33.4187373Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/withdrawal_limits.rs:61: +2026-06-21T01:26:33.4187468Z return Err(anyhow!( +2026-06-21T01:26:33.4187621Z "Withdrawal amount {} exceeds the maximum of {}", +2026-06-21T01:26:33.4187732Z - amount, self.max_per_withdrawal +2026-06-21T01:26:33.4187825Z + amount, +2026-06-21T01:26:33.4187930Z + self.max_per_withdrawal +2026-06-21T01:26:33.4188010Z )); +2026-06-21T01:26:33.4188095Z } +2026-06-21T01:26:33.4188206Z if let Some(cap) = self.max_total { +2026-06-21T01:26:33.4188515Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/withdrawal_limits.rs:67: +2026-06-21T01:26:33.4188875Z if already_withdrawn + amount > cap { +2026-06-21T01:26:33.4188974Z return Err(anyhow!( +2026-06-21T01:26:33.4189156Z "Total withdrawn {} would exceed the campaign cap of {}", +2026-06-21T01:26:33.4189283Z - already_withdrawn + amount, cap +2026-06-21T01:26:33.4189389Z + already_withdrawn + amount, +2026-06-21T01:26:33.4189483Z + cap +2026-06-21T01:26:33.4189571Z )); +2026-06-21T01:26:33.4189653Z } +2026-06-21T01:26:33.4189737Z } +2026-06-21T01:26:33.4190046Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/worker_logger.rs:13: +2026-06-21T01:26:33.4190224Z fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +2026-06-21T01:26:33.4190316Z match self { +2026-06-21T01:26:33.4190437Z LogLevel::Debug => write!(f, "DEBUG"), +2026-06-21T01:26:33.4190557Z - LogLevel::Info => write!(f, "INFO"), +2026-06-21T01:26:33.4190887Z - LogLevel::Warn => write!(f, "WARN"), +2026-06-21T01:26:33.4190999Z + LogLevel::Info => write!(f, "INFO"), +2026-06-21T01:26:33.4191214Z + LogLevel::Warn => write!(f, "WARN"), +2026-06-21T01:26:33.4191324Z LogLevel::Error => write!(f, "ERROR"), +2026-06-21T01:26:33.4191411Z } +2026-06-21T01:26:33.4191496Z } +2026-06-21T01:26:33.4191798Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/worker_logger.rs:23: +2026-06-21T01:26:33.4191952Z /// A single structured log entry produced by the worker. +2026-06-21T01:26:33.4192048Z #[derive(Debug, Clone)] +2026-06-21T01:26:33.4192143Z pub struct LogEntry { +2026-06-21T01:26:33.4192245Z - pub level: LogLevel, +2026-06-21T01:26:33.4192336Z + pub level: LogLevel, +2026-06-21T01:26:33.4192432Z pub message: String, +2026-06-21T01:26:33.4192515Z } +2026-06-21T01:26:33.4192594Z +2026-06-21T01:26:33.4192904Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/worker_logger.rs:64: +2026-06-21T01:26:33.4192994Z #[inline] +2026-06-21T01:26:33.4193188Z pub fn log(&mut self, level: LogLevel, message: impl Into) { +2026-06-21T01:26:33.4193338Z if self.min_level.map_or(true, |min| level >= min) { +2026-06-21T01:26:33.4193500Z - let entry = LogEntry { level, message: message.into() }; +2026-06-21T01:26:33.4193602Z + let entry = LogEntry { +2026-06-21T01:26:33.4193692Z + level, +2026-06-21T01:26:33.4193792Z + message: message.into(), +2026-06-21T01:26:33.4193880Z + }; +2026-06-21T01:26:33.4194022Z eprintln!("[{}] {}", entry.level, entry.message); +2026-06-21T01:26:33.4194329Z // Issue #128 – track consecutive errors for health monitoring +2026-06-21T01:26:33.4194446Z if level == LogLevel::Error { +2026-06-21T01:26:33.4194764Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/src/worker_logger.rs:71: +2026-06-21T01:26:33.4194893Z self.consecutive_errors += 1; +2026-06-21T01:26:33.4195020Z if self.consecutive_errors >= 3 { +2026-06-21T01:26:33.4195301Z - eprintln!("[ALERT] Worker health degraded: {} consecutive errors", self.consecutive_errors); +2026-06-21T01:26:33.4195402Z + eprintln!( +2026-06-21T01:26:33.4195571Z + "[ALERT] Worker health degraded: {} consecutive errors", +2026-06-21T01:26:33.4195687Z + self.consecutive_errors +2026-06-21T01:26:33.4195777Z + ); +2026-06-21T01:26:33.4195859Z } +2026-06-21T01:26:33.4195951Z } else { +2026-06-21T01:26:33.4196063Z self.consecutive_errors = 0; +2026-06-21T01:26:33.4196385Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/tests/integration_test.rs:9: +2026-06-21T01:26:33.4196474Z #[test] +2026-06-21T01:26:33.4196591Z fn test_signing_and_response_integration() { +2026-06-21T01:26:33.4196838Z // Simulate the complete flow of building a signing request and handling the response +2026-06-21T01:26:33.4196929Z - +2026-06-21T01:26:33.4197008Z + +2026-06-21T01:26:33.4197118Z // Step 1: Build a signing request +2026-06-21T01:26:33.4197438Z let request_xdr = "AAAAAgAAAADDRVZm3Wgf40kMCwbWI6txY5T7PX0J8p5hJF3J+VBDAAAAAAAAA".to_string(); +2026-06-21T01:26:33.4197727Z - let request = signing_request::SigningRequestBuilder::new(request_xdr, Some("testnet".to_string())) +2026-06-21T01:26:33.4197841Z - .expect("Failed to create builder") +2026-06-21T01:26:33.4198012Z - .with_description("Test donation to campaign #1".to_string()) +2026-06-21T01:26:33.4198102Z - .build() +2026-06-21T01:26:33.4198211Z - .expect("Failed to build request"); +2026-06-21T01:26:33.4198290Z - +2026-06-21T01:26:33.4198380Z + let request = +2026-06-21T01:26:33.4198819Z + signing_request::SigningRequestBuilder::new(request_xdr, Some("testnet".to_string())) +2026-06-21T01:26:33.4199077Z + .expect("Failed to create builder") +2026-06-21T01:26:33.4199361Z + .with_description("Test donation to campaign #1".to_string()) +2026-06-21T01:26:33.4199445Z + .build() +2026-06-21T01:26:33.4199556Z + .expect("Failed to build request"); +2026-06-21T01:26:33.4199640Z + +2026-06-21T01:26:33.4199737Z // Verify request structure +2026-06-21T01:26:33.4199850Z assert!(!request.id.is_empty()); +2026-06-21T01:26:33.4199962Z assert_eq!(request.network, "testnet"); +2026-06-21T01:26:33.4200296Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/tests/integration_test.rs:24: +2026-06-21T01:26:33.4200479Z assert_eq!(request.description, "Test donation to campaign #1"); +2026-06-21T01:26:33.4200556Z - +2026-06-21T01:26:33.4200643Z + +2026-06-21T01:26:33.4200771Z // Step 2: Serialize request to JSON for wallet +2026-06-21T01:26:33.4200951Z let request_json = request.to_json().expect("Failed to serialize"); +2026-06-21T01:26:33.4201080Z assert!(request_json.contains("testnet")); +2026-06-21T01:26:33.4201397Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/tests/integration_test.rs:29: +2026-06-21T01:26:33.4201483Z - +2026-06-21T01:26:33.4201567Z + +2026-06-21T01:26:33.4201683Z // Step 3: Simulate wallet signing response +2026-06-21T01:26:33.4201798Z - let response_json = format!(r#"{{ +2026-06-21T01:26:33.4201903Z + let response_json = format!( +2026-06-21T01:26:33.4201985Z + r#"{{ +2026-06-21T01:26:33.4202085Z "requestId": "{}", +2026-06-21T01:26:33.4202328Z "xdr": "AAAAAgAAAADDRVZm3Wgf40kMCwbWI6txY5T7PX0J8p5hJF3J+VBDAAAAAAAAA==", +2026-06-21T01:26:33.4202568Z "signer": "GBJCHUKZMTFSLOMNC2P4TS4VJJBTCYL3SDKW3KSMSGQUZ6EFLXVX77JVH", +2026-06-21T01:26:33.4202910Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/tests/integration_test.rs:35: +2026-06-21T01:26:33.4203003Z "signedAt": 1234567890 +2026-06-21T01:26:33.4203104Z - }}"#, request.id); +2026-06-21T01:26:33.4203188Z - +2026-06-21T01:26:33.4203273Z + }}"#, +2026-06-21T01:26:33.4203365Z + request.id +2026-06-21T01:26:33.4203446Z + ); +2026-06-21T01:26:33.4203531Z + +2026-06-21T01:26:33.4203639Z // Step 4: Process the response +2026-06-21T01:26:33.4203890Z let processed = response_handler::ResponseHandler::process_response(&response_json) +2026-06-21T01:26:33.4204015Z .expect("Failed to process response"); +2026-06-21T01:26:33.4204338Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/tests/integration_test.rs:41: +2026-06-21T01:26:33.4204418Z - +2026-06-21T01:26:33.4204503Z + +2026-06-21T01:26:33.4204605Z assert!(processed.is_valid()); +2026-06-21T01:26:33.4204792Z assert_eq!(processed.signed_transaction.request_id, request.id); +2026-06-21T01:26:33.4204885Z assert_eq!( +2026-06-21T01:26:33.4205194Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/tests/integration_test.rs:45: +2026-06-21T01:26:33.4205324Z processed.signed_transaction.signer, +2026-06-21T01:26:33.4205534Z "GBJCHUKZMTFSLOMNC2P4TS4VJJBTCYL3SDKW3KSMSGQUZ6EFLXVX77JVH" +2026-06-21T01:26:33.4205613Z ); +2026-06-21T01:26:33.4205697Z - +2026-06-21T01:26:33.4205777Z + +2026-06-21T01:26:33.4205931Z // Step 5: Save signed transaction for later submission +2026-06-21T01:26:33.4206054Z let temp_file = "/tmp/test_signed_tx.json"; +2026-06-21T01:26:33.4206317Z response_handler::ResponseHandler::save_to_file(&processed.signed_transaction, temp_file) +2026-06-21T01:26:33.4206631Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/tests/integration_test.rs:52: +2026-06-21T01:26:33.4206747Z .expect("Failed to save transaction"); +2026-06-21T01:26:33.4206825Z - +2026-06-21T01:26:33.4206910Z + +2026-06-21T01:26:33.4207025Z // Step 6: Load and verify saved transaction +2026-06-21T01:26:33.4207240Z let loaded_tx = response_handler::ResponseHandler::load_from_file(temp_file) +2026-06-21T01:26:33.4207462Z .expect("Failed to load transaction"); +2026-06-21T01:26:33.4207850Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/tests/integration_test.rs:57: +2026-06-21T01:26:33.4207934Z - +2026-06-21T01:26:33.4208017Z + +2026-06-21T01:26:33.4208142Z assert_eq!(loaded_tx.request_id, request.id); +2026-06-21T01:26:33.4208333Z assert_eq!(loaded_tx.signer, processed.signed_transaction.signer); +2026-06-21T01:26:33.4208410Z - +2026-06-21T01:26:33.4208496Z + +2026-06-21T01:26:33.4208803Z // Cleanup +2026-06-21T01:26:33.4208912Z let _ = fs::remove_file(temp_file); +2026-06-21T01:26:33.4208998Z } +2026-06-21T01:26:33.4212370Z ##[error]Process completed with exit code 1. diff --git a/.ci_logs/Format check/9_Post Cache cargo registry and target.txt b/.ci_logs/Format check/9_Post Cache cargo registry and target.txt new file mode 100644 index 0000000..4d380b9 --- /dev/null +++ b/.ci_logs/Format check/9_Post Cache cargo registry and target.txt @@ -0,0 +1,4 @@ +2026-06-21T01:26:33.4324039Z Post job cleanup. +2026-06-21T01:26:33.7028120Z Cache up-to-date. +2026-06-21T01:26:33.7040045Z (node:2471) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead. +2026-06-21T01:26:33.7059500Z (Use `node --trace-deprecation ...` to show where the warning was created) diff --git a/.ci_logs/Format check/system.txt b/.ci_logs/Format check/system.txt new file mode 100644 index 0000000..ac1aae1 --- /dev/null +++ b/.ci_logs/Format check/system.txt @@ -0,0 +1,8 @@ +2026-06-21T01:26:21.5330000Z Evaluating fmt.if +2026-06-21T01:26:21.5330000Z Evaluating: success() +2026-06-21T01:26:21.5330000Z Result: true +2026-06-21T01:26:21.5360000Z Job is about to start running on the hosted runner: GitHub Actions 1000000144 +2026-06-21T01:26:21.5340000Z Requested labels: ubuntu-latest +2026-06-21T01:26:21.5340000Z Job defined at: OrbitChainLabs/OrbitChain-Contracts/.github/workflows/ci.yml@refs/pull/60/merge +2026-06-21T01:26:21.5340000Z Waiting for a runner to pick up this job... +2026-06-21T01:26:21.5350000Z Job is waiting for a hosted runner to come online. \ No newline at end of file diff --git a/.ci_logs/Tests (host target)/10_Post Run actions_checkout@v4.txt b/.ci_logs/Tests (host target)/10_Post Run actions_checkout@v4.txt new file mode 100644 index 0000000..c39bc21 --- /dev/null +++ b/.ci_logs/Tests (host target)/10_Post Run actions_checkout@v4.txt @@ -0,0 +1,15 @@ +2026-06-21T01:27:26.3072174Z Node 20 is being deprecated. This workflow is running with Node 24 by default. If you need to temporarily use Node 20, you can set the ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true environment variable. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/ +2026-06-21T01:27:26.3073459Z Post job cleanup. +2026-06-21T01:27:26.3886584Z [command]/usr/bin/git version +2026-06-21T01:27:26.3923180Z git version 2.54.0 +2026-06-21T01:27:26.3961063Z Temporarily overriding HOME='/home/runner/work/_temp/a641ec8c-02e0-4842-969d-f9b126d0d724' before making global git config changes +2026-06-21T01:27:26.3962373Z Adding repository directory to the temporary git global config as a safe directory +2026-06-21T01:27:26.3968008Z [command]/usr/bin/git config --global --add safe.directory /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts +2026-06-21T01:27:26.4005044Z [command]/usr/bin/git config --local --name-only --get-regexp core\.sshCommand +2026-06-21T01:27:26.4038585Z [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || :" +2026-06-21T01:27:26.4260499Z [command]/usr/bin/git config --local --name-only --get-regexp http\.https\:\/\/github\.com\/\.extraheader +2026-06-21T01:27:26.4285495Z http.https://github.com/.extraheader +2026-06-21T01:27:26.4296945Z [command]/usr/bin/git config --local --unset-all http.https://github.com/.extraheader +2026-06-21T01:27:26.4327112Z [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http\.https\:\/\/github\.com\/\.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :" +2026-06-21T01:27:26.4540911Z [command]/usr/bin/git config --local --name-only --get-regexp ^includeIf\.gitdir: +2026-06-21T01:27:26.4571035Z [command]/usr/bin/git submodule foreach --recursive git config --local --show-origin --name-only --get-regexp remote.origin.url diff --git a/.ci_logs/Tests (host target)/11_Complete job.txt b/.ci_logs/Tests (host target)/11_Complete job.txt new file mode 100644 index 0000000..257d861 --- /dev/null +++ b/.ci_logs/Tests (host target)/11_Complete job.txt @@ -0,0 +1,2 @@ +2026-06-21T01:27:26.4915172Z Cleaning up orphan processes +2026-06-21T01:27:26.5297534Z ##[warning]Node.js 20 is deprecated. The following actions target Node.js 20 but are being forced to run on Node.js 24: actions/checkout@v4. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/ diff --git a/.ci_logs/Tests (host target)/1_Set up job.txt b/.ci_logs/Tests (host target)/1_Set up job.txt new file mode 100644 index 0000000..d3636db --- /dev/null +++ b/.ci_logs/Tests (host target)/1_Set up job.txt @@ -0,0 +1,32 @@ +2026-06-21T01:26:24.1302996Z Current runner version: '2.335.1' +2026-06-21T01:26:24.1328398Z ##[group]Runner Image Provisioner +2026-06-21T01:26:24.1329339Z Hosted Compute Agent +2026-06-21T01:26:24.1330039Z Version: 20260611.554 +2026-06-21T01:26:24.1330680Z Commit: 5e0782fdc9014723d3be820dd114dd31555c2bd1 +2026-06-21T01:26:24.1331452Z Build Date: 2026-06-11T21:40:46Z +2026-06-21T01:26:24.1332185Z Worker ID: {00149bb9-2830-4838-b0c8-4bdd090a015f} +2026-06-21T01:26:24.1332933Z Azure Region: westus +2026-06-21T01:26:24.1333550Z ##[endgroup] +2026-06-21T01:26:24.1335010Z ##[group]Operating System +2026-06-21T01:26:24.1335659Z Ubuntu +2026-06-21T01:26:24.1336508Z 24.04.4 +2026-06-21T01:26:24.1337066Z LTS +2026-06-21T01:26:24.1337618Z ##[endgroup] +2026-06-21T01:26:24.1338234Z ##[group]Runner Image +2026-06-21T01:26:24.1338819Z Image: ubuntu-24.04 +2026-06-21T01:26:24.1339451Z Version: 20260615.205.1 +2026-06-21T01:26:24.1340544Z Included Software: https://github.com/actions/runner-images/blob/ubuntu24/20260615.205/images/ubuntu/Ubuntu2404-Readme.md +2026-06-21T01:26:24.1342271Z Image Release: https://github.com/actions/runner-images/releases/tag/ubuntu24%2F20260615.205 +2026-06-21T01:26:24.1343253Z ##[endgroup] +2026-06-21T01:26:24.1344380Z ##[group]GITHUB_TOKEN Permissions +2026-06-21T01:26:24.1346528Z Contents: read +2026-06-21T01:26:24.1347262Z Metadata: read +2026-06-21T01:26:24.1347826Z ##[endgroup] +2026-06-21T01:26:24.1349926Z Secret source: Actions +2026-06-21T01:26:24.1350726Z Prepare workflow directory +2026-06-21T01:26:24.1751023Z Prepare all required actions +2026-06-21T01:26:24.1790762Z Getting action download info +2026-06-21T01:26:24.5546304Z Download action repository 'actions/checkout@v4' (SHA:34e114876b0b11c390a56381ad16ebd13914f8d5) +2026-06-21T01:26:24.6522834Z Download action repository 'dtolnay/rust-toolchain@stable' (SHA:29eef336d9b2848a0b548edc03f92a220660cdb8) +2026-06-21T01:26:24.8611293Z Download action repository 'Swatinem/rust-cache@v2' (SHA:e18b497796c12c097a38f9edb9d0641fb99eee32) +2026-06-21T01:26:25.6085733Z Complete job name: Tests (host target) diff --git a/.ci_logs/Tests (host target)/2_Run actions_checkout@v4.txt b/.ci_logs/Tests (host target)/2_Run actions_checkout@v4.txt new file mode 100644 index 0000000..931caa4 --- /dev/null +++ b/.ci_logs/Tests (host target)/2_Run actions_checkout@v4.txt @@ -0,0 +1,93 @@ +2026-06-21T01:26:25.6862340Z Node 20 is being deprecated. This workflow is running with Node 24 by default. If you need to temporarily use Node 20, you can set the ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true environment variable. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/ +2026-06-21T01:26:25.6872228Z ##[group]Run actions/checkout@v4 +2026-06-21T01:26:25.6873072Z with: +2026-06-21T01:26:25.6873638Z repository: OrbitChainLabs/OrbitChain-Contracts +2026-06-21T01:26:25.6878702Z token: *** +2026-06-21T01:26:25.6879246Z ssh-strict: true +2026-06-21T01:26:25.6879728Z ssh-user: git +2026-06-21T01:26:25.6880209Z persist-credentials: true +2026-06-21T01:26:25.6880746Z clean: true +2026-06-21T01:26:25.6881230Z sparse-checkout-cone-mode: true +2026-06-21T01:26:25.6881804Z fetch-depth: 1 +2026-06-21T01:26:25.6882271Z fetch-tags: false +2026-06-21T01:26:25.6882751Z show-progress: true +2026-06-21T01:26:25.6883226Z lfs: false +2026-06-21T01:26:25.6883728Z submodules: false +2026-06-21T01:26:25.6884258Z set-safe-directory: true +2026-06-21T01:26:25.6885059Z env: +2026-06-21T01:26:25.6885524Z CARGO_TERM_COLOR: always +2026-06-21T01:26:25.6886236Z RUST_BACKTRACE: short +2026-06-21T01:26:25.6887178Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:25.6888184Z ##[endgroup] +2026-06-21T01:26:25.7908771Z Syncing repository: OrbitChainLabs/OrbitChain-Contracts +2026-06-21T01:26:25.7911114Z ##[group]Getting Git version info +2026-06-21T01:26:25.7912100Z Working directory is '/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts' +2026-06-21T01:26:25.7913371Z [command]/usr/bin/git version +2026-06-21T01:26:25.7977899Z git version 2.54.0 +2026-06-21T01:26:25.8032709Z ##[endgroup] +2026-06-21T01:26:25.8050665Z Temporarily overriding HOME='/home/runner/work/_temp/24b5ece7-acc0-48e8-8a67-644af7a5faee' before making global git config changes +2026-06-21T01:26:25.8053561Z Adding repository directory to the temporary git global config as a safe directory +2026-06-21T01:26:25.8057559Z [command]/usr/bin/git config --global --add safe.directory /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts +2026-06-21T01:26:25.8111724Z Deleting the contents of '/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts' +2026-06-21T01:26:25.8116671Z ##[group]Initializing the repository +2026-06-21T01:26:25.8122903Z [command]/usr/bin/git init /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts +2026-06-21T01:26:25.8256430Z hint: Using 'master' as the name for the initial branch. This default branch name +2026-06-21T01:26:25.8257819Z hint: will change to "main" in Git 3.0. To configure the initial branch name +2026-06-21T01:26:25.8258962Z hint: to use in all of your new repositories, which will suppress this warning, +2026-06-21T01:26:25.8259966Z hint: call: +2026-06-21T01:26:25.8260436Z hint: +2026-06-21T01:26:25.8261265Z hint: git config --global init.defaultBranch +2026-06-21T01:26:25.8262658Z hint: +2026-06-21T01:26:25.8264087Z hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and +2026-06-21T01:26:25.8266427Z hint: 'development'. The just-created branch can be renamed via this command: +2026-06-21T01:26:25.8268063Z hint: +2026-06-21T01:26:25.8268968Z hint: git branch -m +2026-06-21T01:26:25.8270000Z hint: +2026-06-21T01:26:25.8271302Z hint: Disable this message with "git config set advice.defaultBranchName false" +2026-06-21T01:26:25.8273599Z Initialized empty Git repository in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/.git/ +2026-06-21T01:26:25.8278073Z [command]/usr/bin/git remote add origin https://github.com/OrbitChainLabs/OrbitChain-Contracts +2026-06-21T01:26:25.8325485Z ##[endgroup] +2026-06-21T01:26:25.8327299Z ##[group]Disabling automatic garbage collection +2026-06-21T01:26:25.8329759Z [command]/usr/bin/git config --local gc.auto 0 +2026-06-21T01:26:25.8360909Z ##[endgroup] +2026-06-21T01:26:25.8362472Z ##[group]Setting up auth +2026-06-21T01:26:25.8368692Z [command]/usr/bin/git config --local --name-only --get-regexp core\.sshCommand +2026-06-21T01:26:25.8405685Z [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || :" +2026-06-21T01:26:25.8769262Z [command]/usr/bin/git config --local --name-only --get-regexp http\.https\:\/\/github\.com\/\.extraheader +2026-06-21T01:26:25.8803241Z [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http\.https\:\/\/github\.com\/\.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :" +2026-06-21T01:26:25.9017693Z [command]/usr/bin/git config --local --name-only --get-regexp ^includeIf\.gitdir: +2026-06-21T01:26:25.9050012Z [command]/usr/bin/git submodule foreach --recursive git config --local --show-origin --name-only --get-regexp remote.origin.url +2026-06-21T01:26:25.9267304Z [command]/usr/bin/git config --local http.https://github.com/.extraheader AUTHORIZATION: basic *** +2026-06-21T01:26:25.9301538Z ##[endgroup] +2026-06-21T01:26:25.9303233Z ##[group]Fetching the repository +2026-06-21T01:26:25.9312875Z [command]/usr/bin/git -c protocol.version=2 fetch --no-tags --prune --no-recurse-submodules --depth=1 origin +1be331ea57707748b39835c9fac837ddeb283d53:refs/remotes/pull/60/merge +2026-06-21T01:26:26.3898382Z From https://github.com/OrbitChainLabs/OrbitChain-Contracts +2026-06-21T01:26:26.3900250Z * [new ref] 1be331ea57707748b39835c9fac837ddeb283d53 -> pull/60/merge +2026-06-21T01:26:26.3934444Z ##[endgroup] +2026-06-21T01:26:26.3935234Z ##[group]Determining the checkout info +2026-06-21T01:26:26.3938095Z ##[endgroup] +2026-06-21T01:26:26.3944964Z [command]/usr/bin/git sparse-checkout disable +2026-06-21T01:26:26.3991089Z [command]/usr/bin/git config --local --unset-all extensions.worktreeConfig +2026-06-21T01:26:26.4019810Z ##[group]Checking out the ref +2026-06-21T01:26:26.4023953Z [command]/usr/bin/git checkout --progress --force refs/remotes/pull/60/merge +2026-06-21T01:26:26.4180625Z Note: switching to 'refs/remotes/pull/60/merge'. +2026-06-21T01:26:26.4181552Z +2026-06-21T01:26:26.4182281Z You are in 'detached HEAD' state. You can look around, make experimental +2026-06-21T01:26:26.4184062Z changes and commit them, and you can discard any commits you make in this +2026-06-21T01:26:26.4185829Z state without impacting any branches by switching back to a branch. +2026-06-21T01:26:26.4187097Z +2026-06-21T01:26:26.4187696Z If you want to create a new branch to retain commits you create, you may +2026-06-21T01:26:26.4189364Z do so (now or later) by using -c with the switch command. Example: +2026-06-21T01:26:26.4190322Z +2026-06-21T01:26:26.4190736Z git switch -c +2026-06-21T01:26:26.4191382Z +2026-06-21T01:26:26.4191780Z Or undo this operation with: +2026-06-21T01:26:26.4192329Z +2026-06-21T01:26:26.4192568Z git switch - +2026-06-21T01:26:26.4192879Z +2026-06-21T01:26:26.4193371Z Turn off this advice by setting config variable advice.detachedHead to false +2026-06-21T01:26:26.4194109Z +2026-06-21T01:26:26.4194914Z HEAD is now at 1be331e Merge 4b973bcdef5a40b4714ec76b0c3c3d5e9b026c2d into dc3d5e2b821bb2a0f2655582265c562926415b02 +2026-06-21T01:26:26.4197492Z ##[endgroup] +2026-06-21T01:26:26.4228349Z [command]/usr/bin/git log -1 --format=%H +2026-06-21T01:26:26.4250158Z 1be331ea57707748b39835c9fac837ddeb283d53 diff --git a/.ci_logs/Tests (host target)/3_Install Rust toolchain.txt b/.ci_logs/Tests (host target)/3_Install Rust toolchain.txt new file mode 100644 index 0000000..16d4c02 --- /dev/null +++ b/.ci_logs/Tests (host target)/3_Install Rust toolchain.txt @@ -0,0 +1,188 @@ +2026-06-21T01:26:26.4721250Z ##[warning]Unexpected input(s) 'cache', valid inputs are ['toolchain', 'targets', 'target', 'components'] +2026-06-21T01:26:26.4743739Z ##[group]Run dtolnay/rust-toolchain@stable +2026-06-21T01:26:26.4744351Z with: +2026-06-21T01:26:26.4744746Z cache: false +2026-06-21T01:26:26.4745160Z toolchain: stable +2026-06-21T01:26:26.4745579Z env: +2026-06-21T01:26:26.4746217Z CARGO_TERM_COLOR: always +2026-06-21T01:26:26.4746726Z RUST_BACKTRACE: short +2026-06-21T01:26:26.4747579Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:26.4748515Z ##[endgroup] +2026-06-21T01:26:26.4884627Z ##[group]Run : parse toolchain version +2026-06-21T01:26:26.4885329Z : parse toolchain version +2026-06-21T01:26:26.4885893Z if [[ -z $toolchain ]]; then +2026-06-21T01:26:26.4887093Z  # GitHub does not enforce `required: true` inputs itself. https://github.com/actions/runner/issues/1070 +2026-06-21T01:26:26.4888111Z  echo "'toolchain' is a required input" >&2 +2026-06-21T01:26:26.4888749Z  exit 1 +2026-06-21T01:26:26.4889394Z elif [[ $toolchain =~ ^stable' '[0-9]+' '(year|month|week|day)s?' 'ago$ ]]; then +2026-06-21T01:26:26.4890168Z  if [[ Linux == macOS ]]; then +2026-06-21T01:26:26.4891111Z  echo "toolchain=1.$((($(date -v-$(sed 's/stable \([0-9]*\) \(.\).*/\1\2/' <<< $toolchain) +%s)/60/60/24-16569)/7/6))" >> $GITHUB_OUTPUT +2026-06-21T01:26:26.4892026Z  else +2026-06-21T01:26:26.4892773Z  echo "toolchain=1.$((($(date --date "${toolchain#stable }" +%s)/60/60/24-16569)/7/6))" >> $GITHUB_OUTPUT +2026-06-21T01:26:26.4893636Z  fi +2026-06-21T01:26:26.4894219Z elif [[ $toolchain =~ ^stable' 'minus' '[0-9]+' 'releases?$ ]]; then +2026-06-21T01:26:26.4895192Z  echo "toolchain=1.$((($(date +%s)/60/60/24-16569)/7/6-${toolchain//[^0-9]/}))" >> $GITHUB_OUTPUT +2026-06-21T01:26:26.4896168Z elif [[ $toolchain =~ ^1\.[0-9]+$ ]]; then +2026-06-21T01:26:26.4897154Z  echo "toolchain=1.$((i=${toolchain#1.}, c=($(date +%s)/60/60/24-16569)/7/6, i+9*i*(10*i<=c)+90*i*(100*i<=c)))" >> $GITHUB_OUTPUT +2026-06-21T01:26:26.4898054Z else +2026-06-21T01:26:26.4898548Z  echo "toolchain=$toolchain" >> $GITHUB_OUTPUT +2026-06-21T01:26:26.4899133Z fi +2026-06-21T01:26:26.5097685Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:26.5098401Z env: +2026-06-21T01:26:26.5098809Z CARGO_TERM_COLOR: always +2026-06-21T01:26:26.5099302Z RUST_BACKTRACE: short +2026-06-21T01:26:26.5100404Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:26.5101368Z toolchain: stable +2026-06-21T01:26:26.5101799Z ##[endgroup] +2026-06-21T01:26:26.5262282Z ##[group]Run : construct rustup command line +2026-06-21T01:26:26.5262925Z : construct rustup command line +2026-06-21T01:26:26.5263779Z echo "targets=$(for t in ${targets//,/ }; do echo -n ' --target' $t; done)" >> $GITHUB_OUTPUT +2026-06-21T01:26:26.5264948Z echo "components=$(for c in ${components//,/ }; do echo -n ' --component' $c; done)" >> $GITHUB_OUTPUT +2026-06-21T01:26:26.5265852Z echo "downgrade=" >> $GITHUB_OUTPUT +2026-06-21T01:26:26.5294976Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:26.5295647Z env: +2026-06-21T01:26:26.5296343Z CARGO_TERM_COLOR: always +2026-06-21T01:26:26.5296844Z RUST_BACKTRACE: short +2026-06-21T01:26:26.5297685Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:26.5298594Z targets: +2026-06-21T01:26:26.5298991Z components: +2026-06-21T01:26:26.5299405Z ##[endgroup] +2026-06-21T01:26:26.5432646Z ##[group]Run : set $CARGO_HOME +2026-06-21T01:26:26.5433597Z : set $CARGO_HOME +2026-06-21T01:26:26.5434790Z echo CARGO_HOME=${CARGO_HOME:-"$HOME/.cargo"} >> $GITHUB_ENV +2026-06-21T01:26:26.5479684Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:26.5481239Z env: +2026-06-21T01:26:26.5481978Z CARGO_TERM_COLOR: always +2026-06-21T01:26:26.5482880Z RUST_BACKTRACE: short +2026-06-21T01:26:26.5484409Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:26.5485743Z ##[endgroup] +2026-06-21T01:26:26.5589951Z ##[group]Run : install rustup if needed +2026-06-21T01:26:26.5590566Z : install rustup if needed +2026-06-21T01:26:26.5591150Z if ! command -v rustup &>/dev/null; then +2026-06-21T01:26:26.5592473Z  curl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused --location --silent --show-error --fail https://sh.rustup.rs | sh -s -- --default-toolchain none -y +2026-06-21T01:26:26.5593777Z  echo "$CARGO_HOME/bin" >> $GITHUB_PATH +2026-06-21T01:26:26.5594342Z fi +2026-06-21T01:26:26.5625102Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:26.5625778Z env: +2026-06-21T01:26:26.5626469Z CARGO_TERM_COLOR: always +2026-06-21T01:26:26.5626958Z RUST_BACKTRACE: short +2026-06-21T01:26:26.5627807Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:26.5628765Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:26:26.5629258Z ##[endgroup] +2026-06-21T01:26:26.5733458Z ##[group]Run rustup toolchain install stable --profile minimal --no-self-update +2026-06-21T01:26:26.5734487Z rustup toolchain install stable --profile minimal --no-self-update +2026-06-21T01:26:26.5764653Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:26.5765315Z env: +2026-06-21T01:26:26.5765798Z CARGO_TERM_COLOR: always +2026-06-21T01:26:26.5766606Z RUST_BACKTRACE: short +2026-06-21T01:26:26.5767453Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:26.5768376Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:26:26.5768918Z RUSTUP_PERMIT_COPY_RENAME: 1 +2026-06-21T01:26:26.5769400Z ##[endgroup] +2026-06-21T01:26:26.8828035Z info: syncing channel updates for stable-x86_64-unknown-linux-gnu +2026-06-21T01:26:27.1443453Z +2026-06-21T01:26:27.1528102Z stable-x86_64-unknown-linux-gnu unchanged - rustc 1.96.0 (ac68faa20 2026-05-25) +2026-06-21T01:26:27.1529421Z +2026-06-21T01:26:27.1655796Z ##[group]Run rustup default stable +2026-06-21T01:26:27.1657470Z rustup default stable +2026-06-21T01:26:27.1691106Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:27.1692666Z env: +2026-06-21T01:26:27.1693757Z CARGO_TERM_COLOR: always +2026-06-21T01:26:27.1694882Z RUST_BACKTRACE: short +2026-06-21T01:26:27.1697297Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:27.1699754Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:26:27.1700936Z ##[endgroup] +2026-06-21T01:26:27.1815627Z info: using existing install for stable-x86_64-unknown-linux-gnu +2026-06-21T01:26:27.1822584Z info: default toolchain set to stable-x86_64-unknown-linux-gnu +2026-06-21T01:26:27.1824548Z +2026-06-21T01:26:27.1924213Z stable-x86_64-unknown-linux-gnu unchanged - rustc 1.96.0 (ac68faa20 2026-05-25) +2026-06-21T01:26:27.1929453Z info: note that the toolchain 'stable-x86_64-unknown-linux-gnu' is currently in use (overridden by '/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/rust-toolchain.toml') +2026-06-21T01:26:27.1932606Z +2026-06-21T01:26:27.2053821Z ##[group]Run : create cachekey +2026-06-21T01:26:27.2054898Z : create cachekey +2026-06-21T01:26:27.2057318Z DATE=$(rustc +stable --version --verbose | sed -ne 's/^commit-date: \(20[0-9][0-9]\)-\([01][0-9]\)-\([0-3][0-9]\)$/\1\2\3/p') +2026-06-21T01:26:27.2060283Z HASH=$(rustc +stable --version --verbose | sed -ne 's/^commit-hash: //p') +2026-06-21T01:26:27.2084936Z echo "cachekey=$(echo $DATE$HASH | head -c12)" >> $GITHUB_OUTPUT +2026-06-21T01:26:27.2124898Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:27.2126717Z env: +2026-06-21T01:26:27.2127483Z CARGO_TERM_COLOR: always +2026-06-21T01:26:27.2128445Z RUST_BACKTRACE: short +2026-06-21T01:26:27.2130331Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:27.2132462Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:26:27.2133464Z ##[endgroup] +2026-06-21T01:26:27.2886196Z ##[group]Run : disable incremental compilation +2026-06-21T01:26:27.2887603Z : disable incremental compilation +2026-06-21T01:26:27.2888944Z if [ -z "${CARGO_INCREMENTAL+set}" ]; then +2026-06-21T01:26:27.2890315Z  echo CARGO_INCREMENTAL=0 >> $GITHUB_ENV +2026-06-21T01:26:27.2891502Z fi +2026-06-21T01:26:27.2926393Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:27.2927765Z env: +2026-06-21T01:26:27.2928496Z CARGO_TERM_COLOR: always +2026-06-21T01:26:27.2929441Z RUST_BACKTRACE: short +2026-06-21T01:26:27.2931303Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:27.2933414Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:26:27.2934404Z ##[endgroup] +2026-06-21T01:26:27.3047078Z ##[group]Run : enable colors in Cargo output +2026-06-21T01:26:27.3048395Z : enable colors in Cargo output +2026-06-21T01:26:27.3049706Z if [ -z "${CARGO_TERM_COLOR+set}" ]; then +2026-06-21T01:26:27.3051099Z  echo CARGO_TERM_COLOR=always >> $GITHUB_ENV +2026-06-21T01:26:27.3052329Z fi +2026-06-21T01:26:27.3083504Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:27.3084838Z env: +2026-06-21T01:26:27.3085583Z CARGO_TERM_COLOR: always +2026-06-21T01:26:27.3086705Z RUST_BACKTRACE: short +2026-06-21T01:26:27.3088515Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:27.3090622Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:26:27.3091647Z CARGO_INCREMENTAL: 0 +2026-06-21T01:26:27.3092494Z ##[endgroup] +2026-06-21T01:26:27.3204556Z ##[group]Run : enable Cargo sparse registry +2026-06-21T01:26:27.3205790Z : enable Cargo sparse registry +2026-06-21T01:26:27.3207555Z # implemented in 1.66, stabilized in 1.68, made default in 1.70 +2026-06-21T01:26:27.3210464Z if [ -z "${CARGO_REGISTRIES_CRATES_IO_PROTOCOL+set}" -o -f "/home/runner/work/_temp"/.implicit_cargo_registries_crates_io_protocol ]; then +2026-06-21T01:26:27.3213490Z  if rustc +stable --version --verbose | grep -q '^release: 1\.6[89]\.'; then +2026-06-21T01:26:27.3216272Z  touch "/home/runner/work/_temp"/.implicit_cargo_registries_crates_io_protocol || true +2026-06-21T01:26:27.3218552Z  echo CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse >> $GITHUB_ENV +2026-06-21T01:26:27.3220630Z  elif rustc +stable --version --verbose | grep -q '^release: 1\.6[67]\.'; then +2026-06-21T01:26:27.3223023Z  touch "/home/runner/work/_temp"/.implicit_cargo_registries_crates_io_protocol || true +2026-06-21T01:26:27.3225240Z  echo CARGO_REGISTRIES_CRATES_IO_PROTOCOL=git >> $GITHUB_ENV +2026-06-21T01:26:27.3226957Z  fi +2026-06-21T01:26:27.3227707Z fi +2026-06-21T01:26:27.3260356Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:27.3261672Z env: +2026-06-21T01:26:27.3262402Z CARGO_TERM_COLOR: always +2026-06-21T01:26:27.3263329Z RUST_BACKTRACE: short +2026-06-21T01:26:27.3265140Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:27.3267527Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:26:27.3268541Z CARGO_INCREMENTAL: 0 +2026-06-21T01:26:27.3269376Z ##[endgroup] +2026-06-21T01:26:27.3659459Z ##[group]Run : work around spurious network errors in curl 8.0 +2026-06-21T01:26:27.3661072Z : work around spurious network errors in curl 8.0 +2026-06-21T01:26:27.3663197Z # https://rust-lang.zulipchat.com/#narrow/stream/246057-t-cargo/topic/timeout.20investigation +2026-06-21T01:26:27.3665802Z if rustc +stable --version --verbose | grep -q '^release: 1\.7[01]\.'; then +2026-06-21T01:26:27.3668129Z  echo CARGO_HTTP_MULTIPLEXING=false >> $GITHUB_ENV +2026-06-21T01:26:27.3669413Z fi +2026-06-21T01:26:27.3705568Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:27.3707153Z env: +2026-06-21T01:26:27.3707897Z CARGO_TERM_COLOR: always +2026-06-21T01:26:27.3708804Z RUST_BACKTRACE: short +2026-06-21T01:26:27.3710575Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:27.3712559Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:26:27.3713544Z CARGO_INCREMENTAL: 0 +2026-06-21T01:26:27.3714379Z ##[endgroup] +2026-06-21T01:26:27.3960855Z ##[group]Run rustc +stable --version --verbose +2026-06-21T01:26:27.3962087Z rustc +stable --version --verbose +2026-06-21T01:26:27.3996981Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:27.3998249Z env: +2026-06-21T01:26:27.3998964Z CARGO_TERM_COLOR: always +2026-06-21T01:26:27.3999860Z RUST_BACKTRACE: short +2026-06-21T01:26:27.4001583Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:27.4003550Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:26:27.4004520Z CARGO_INCREMENTAL: 0 +2026-06-21T01:26:27.4005328Z ##[endgroup] +2026-06-21T01:26:27.4204775Z rustc 1.96.0 (ac68faa20 2026-05-25) +2026-06-21T01:26:27.4207352Z binary: rustc +2026-06-21T01:26:27.4208379Z commit-hash: ac68faa20c58cbccd01ee7208bf3b6e93a7d7f96 +2026-06-21T01:26:27.4209619Z commit-date: 2026-05-25 +2026-06-21T01:26:27.4210493Z host: x86_64-unknown-linux-gnu +2026-06-21T01:26:27.4211417Z release: 1.96.0 +2026-06-21T01:26:27.4212468Z LLVM version: 22.1.2 diff --git a/.ci_logs/Tests (host target)/4_Cache cargo registry and target.txt b/.ci_logs/Tests (host target)/4_Cache cargo registry and target.txt new file mode 100644 index 0000000..7122414 --- /dev/null +++ b/.ci_logs/Tests (host target)/4_Cache cargo registry and target.txt @@ -0,0 +1,69 @@ +2026-06-21T01:26:27.4451721Z ##[group]Run Swatinem/rust-cache@v2 +2026-06-21T01:26:27.4452742Z with: +2026-06-21T01:26:27.4453462Z cache-on-failure: true +2026-06-21T01:26:27.4454314Z prefix-key: v0-rust +2026-06-21T01:26:27.4455132Z add-job-id-key: true +2026-06-21T01:26:27.4456391Z add-rust-environment-hash-key: true +2026-06-21T01:26:27.4457500Z cache-targets: true +2026-06-21T01:26:27.4458329Z cache-all-crates: false +2026-06-21T01:26:27.4459235Z cache-workspace-crates: false +2026-06-21T01:26:27.4460137Z save-if: true +2026-06-21T01:26:27.4460898Z cache-provider: github +2026-06-21T01:26:27.4461729Z cache-bin: true +2026-06-21T01:26:27.4462487Z lookup-only: false +2026-06-21T01:26:27.4463471Z cmd-format: {0} +2026-06-21T01:26:27.4464200Z env: +2026-06-21T01:26:27.4464900Z CARGO_TERM_COLOR: always +2026-06-21T01:26:27.4465778Z RUST_BACKTRACE: short +2026-06-21T01:26:27.4467608Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:27.4469475Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:26:27.4470456Z CARGO_INCREMENTAL: 0 +2026-06-21T01:26:27.4471237Z ##[endgroup] +2026-06-21T01:26:27.7321851Z (node:2362) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead. +2026-06-21T01:26:27.7324797Z (Use `node --trace-deprecation ...` to show where the warning was created) +2026-06-21T01:26:32.1547208Z ##[group]Cache Configuration +2026-06-21T01:26:32.1548005Z Cache Provider: +2026-06-21T01:26:32.1548499Z github +2026-06-21T01:26:32.1548945Z Workspaces: +2026-06-21T01:26:32.1549584Z /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts +2026-06-21T01:26:32.1550400Z Cache Paths: +2026-06-21T01:26:32.1550960Z /home/runner/.cargo/bin +2026-06-21T01:26:32.1551525Z /home/runner/.cargo/.crates.toml +2026-06-21T01:26:32.1552136Z /home/runner/.cargo/.crates2.json +2026-06-21T01:26:32.1552694Z /home/runner/.cargo/registry +2026-06-21T01:26:32.1553231Z /home/runner/.cargo/git +2026-06-21T01:26:32.1554032Z /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/target +2026-06-21T01:26:32.1554850Z Restore Key: +2026-06-21T01:26:32.1555344Z v0-rust-test-Linux-x64-1f47b3b1 +2026-06-21T01:26:32.1556204Z Cache Key: +2026-06-21T01:26:32.1556816Z v0-rust-test-Linux-x64-1f47b3b1-8243978e +2026-06-21T01:26:32.1557443Z .. Prefix: +2026-06-21T01:26:32.1557911Z - v0-rust-test-Linux-x64 +2026-06-21T01:26:32.1558428Z .. Environment considered: +2026-06-21T01:26:32.1558937Z - Rust Versions: +2026-06-21T01:26:32.1559581Z - 1.96.0 x86_64-unknown-linux-gnu ac68faa20c58cbccd01ee7208bf3b6e93a7d7f96 +2026-06-21T01:26:32.1560493Z - 1.96.0 x86_64-unknown-linux-gnu ac68faa20c58cbccd01ee7208bf3b6e93a7d7f96 +2026-06-21T01:26:32.1561260Z - CARGO_HOME +2026-06-21T01:26:32.1561722Z - CARGO_INCREMENTAL +2026-06-21T01:26:32.1562219Z - CARGO_TERM_COLOR +2026-06-21T01:26:32.1562762Z - RUST_BACKTRACE +2026-06-21T01:26:32.1563272Z .. Lockfiles considered: +2026-06-21T01:26:32.1564160Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/.cargo/config.toml +2026-06-21T01:26:32.1565417Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/Cargo.toml +2026-06-21T01:26:32.1566785Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/common/Cargo.toml +2026-06-21T01:26:32.1567604Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/contracts/core/Cargo.toml +2026-06-21T01:26:32.1568306Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/Cargo.toml +2026-06-21T01:26:32.1568958Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/rust-toolchain.toml +2026-06-21T01:26:32.1569591Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/token-bridge/Cargo.toml +2026-06-21T01:26:32.1570328Z ##[endgroup] +2026-06-21T01:26:32.1570474Z +2026-06-21T01:26:32.1570594Z ... Restoring cache ... +2026-06-21T01:26:32.4156623Z Cache hit for: v0-rust-test-Linux-x64-1f47b3b1-8243978e +2026-06-21T01:26:33.7323616Z Received 0 of 277338844 (0.0%), 0.0 MBs/sec +2026-06-21T01:26:34.7325633Z Received 92274688 of 277338844 (33.3%), 44.0 MBs/sec +2026-06-21T01:26:35.7324576Z Received 226492416 of 277338844 (81.7%), 72.0 MBs/sec +2026-06-21T01:26:36.4108477Z Received 277338844 of 277338844 (100.0%), 71.9 MBs/sec +2026-06-21T01:26:36.4147006Z Cache Size: ~264 MB (277338844 B) +2026-06-21T01:26:36.4276240Z [command]/usr/bin/tar -xf /home/runner/work/_temp/ce8d8233-21a5-4bfc-8fb7-f871fee6e021/cache.tzst -P -C /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts --use-compress-program unzstd +2026-06-21T01:26:38.1205185Z Cache restored successfully +2026-06-21T01:26:38.1325727Z Restored from cache key "v0-rust-test-Linux-x64-1f47b3b1-8243978e" full match: true. diff --git a/.ci_logs/Tests (host target)/5_cargo test (contracts).txt b/.ci_logs/Tests (host target)/5_cargo test (contracts).txt new file mode 100644 index 0000000..8888c6e --- /dev/null +++ b/.ci_logs/Tests (host target)/5_cargo test (contracts).txt @@ -0,0 +1,384 @@ +2026-06-21T01:26:38.1499550Z ##[group]Run cargo test -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:38.1500448Z cargo test -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:38.1533650Z shell: /usr/bin/bash -e {0} +2026-06-21T01:26:38.1533932Z env: +2026-06-21T01:26:38.1534148Z CARGO_TERM_COLOR: always +2026-06-21T01:26:38.1534393Z RUST_BACKTRACE: short +2026-06-21T01:26:38.1534862Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:38.1535395Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:26:38.1535660Z CARGO_INCREMENTAL: 0 +2026-06-21T01:26:38.1535895Z CACHE_ON_FAILURE: true +2026-06-21T01:26:38.1536360Z ##[endgroup] +2026-06-21T01:26:38.8303385Z  Updating crates.io index +2026-06-21T01:26:39.2158524Z  Locking 212 packages to latest compatible versions +2026-06-21T01:26:39.2192922Z  Adding arbitrary v1.3.2 (available: v1.4.2) +2026-06-21T01:26:39.2278695Z  Adding crypto-common v0.1.6 (available: v0.1.7) +2026-06-21T01:26:39.2337397Z  Adding derive_arbitrary v1.3.2 (available: v1.4.2) +2026-06-21T01:26:39.2599414Z  Adding rand v0.8.6 (available: v0.10.1) +2026-06-21T01:26:39.2691502Z  Adding sha2 v0.10.9 (available: v0.11.0) +2026-06-21T01:26:39.3005027Z  Adding toml v0.8.23 (available: v1.1.2+spec-1.1.0) +2026-06-21T01:26:40.0589494Z  Compiling zeroize v1.9.0 +2026-06-21T01:26:40.0658029Z  Compiling crypto-common v0.1.6 +2026-06-21T01:26:42.8567466Z  Compiling digest v0.10.7 +2026-06-21T01:26:43.1192948Z  Compiling sha2 v0.10.9 +2026-06-21T01:26:43.3350650Z  Compiling generic-array v0.14.9 +2026-06-21T01:26:43.3827319Z  Compiling der v0.7.10 +2026-06-21T01:26:44.4257724Z  Compiling block-buffer v0.10.4 +2026-06-21T01:26:44.4539420Z  Compiling crypto-bigint v0.5.5 +2026-06-21T01:26:44.6597717Z  Compiling stellar-xdr v26.0.1 +2026-06-21T01:26:44.7897573Z  Compiling signature v2.2.0 +2026-06-21T01:26:44.8677499Z  Compiling ark-serialize v0.5.0 +2026-06-21T01:26:45.2208906Z  Compiling sec1 v0.7.3 +2026-06-21T01:26:45.2826636Z  Compiling ark-ff v0.5.0 +2026-06-21T01:26:45.4357560Z  Compiling hmac v0.12.1 +2026-06-21T01:26:45.5106349Z  Compiling elliptic-curve v0.13.8 +2026-06-21T01:26:45.7757435Z  Compiling rfc6979 v0.4.0 +2026-06-21T01:26:45.7758275Z  Compiling primeorder v0.13.6 +2026-06-21T01:26:45.8477703Z  Compiling ecdsa v0.16.9 +2026-06-21T01:26:46.2219520Z  Compiling ed25519 v2.2.3 +2026-06-21T01:26:46.3722268Z  Compiling curve25519-dalek v4.1.3 +2026-06-21T01:26:47.9517508Z  Compiling ed25519-dalek v2.2.0 +2026-06-21T01:26:48.1854205Z  Compiling p256 v0.13.2 +2026-06-21T01:26:48.5669420Z  Compiling k256 v0.13.4 +2026-06-21T01:26:49.1607542Z  Compiling sha3 v0.10.9 +2026-06-21T01:26:50.1708902Z  Compiling ark-poly v0.5.0 +2026-06-21T01:26:50.8435033Z  Compiling ark-ec v0.5.0 +2026-06-21T01:26:51.9807425Z  Compiling ark-bn254 v0.5.0 +2026-06-21T01:26:52.0049504Z  Compiling ark-bls12-381 v0.5.0 +2026-06-21T01:27:00.7613621Z  Compiling soroban-spec v26.1.0 +2026-06-21T01:27:01.2157305Z  Compiling soroban-spec-rust v26.1.0 +2026-06-21T01:27:01.4225204Z  Compiling soroban-env-macros v26.1.3 +2026-06-21T01:27:04.3261453Z  Compiling soroban-env-common v26.1.3 +2026-06-21T01:27:05.4657017Z  Compiling soroban-sdk-macros v26.1.0 +2026-06-21T01:27:08.7727968Z  Compiling soroban-env-host v26.1.3 +2026-06-21T01:27:13.9255696Z  Compiling soroban-ledger-snapshot v26.1.0 +2026-06-21T01:27:14.0857674Z  Compiling soroban-sdk v26.1.0 +2026-06-21T01:27:19.2572389Z  Compiling orbitchain-common v0.1.0 (/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/common) +2026-06-21T01:27:19.2574194Z  Compiling orbitchain-core v0.1.0 (/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/contracts/core) +2026-06-21T01:27:19.8888584Z  Compiling orbitchain-campaign v0.1.0 (/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign) +2026-06-21T01:27:19.8891145Z  Compiling orbitchain-token-bridge v0.1.0 (/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/token-bridge) +2026-06-21T01:27:20.2147298Z warning: unused import: `Address` +2026-06-21T01:27:20.2167023Z --> campaign/src/contract.rs:6:37 +2026-06-21T01:27:20.2167796Z | +2026-06-21T01:27:20.2205515Z 6 | use soroban_sdk::{panic_with_error, Address, Env}; +2026-06-21T01:27:20.2206679Z | ^^^^^^^ +2026-06-21T01:27:20.2207216Z | +2026-06-21T01:27:20.2207878Z = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default +2026-06-21T01:27:20.2208436Z +2026-06-21T01:27:20.5803251Z warning: unused import: `core::ops::Add` +2026-06-21T01:27:20.5817096Z --> campaign/src/test/claim_refund_tests.rs:8:5 +2026-06-21T01:27:20.5856496Z | +2026-06-21T01:27:20.5857641Z 8 | use core::ops::Add; +2026-06-21T01:27:20.5886944Z | ^^^^^^^^^^^^^^ +2026-06-21T01:27:20.5916216Z +2026-06-21T01:27:20.5946802Z warning: unused import: `log` +2026-06-21T01:27:20.5947881Z --> campaign/src/test/claim_refund_tests.rs:12:19 +2026-06-21T01:27:20.5973762Z | +2026-06-21T01:27:20.5997554Z 12 | use soroban_sdk::{log, vec, Address, Env, Vec}; +2026-06-21T01:27:20.6026882Z | ^^^ +2026-06-21T01:27:20.6029804Z +2026-06-21T01:27:20.6030452Z warning: unused import: `BytesN` +2026-06-21T01:27:20.6031549Z --> campaign/src/test/get_campaign_status_tests.rs:8:28 +2026-06-21T01:27:20.6032553Z | +2026-06-21T01:27:20.6033655Z 8 | use soroban_sdk::{Address, BytesN, Env, String, Vec}; +2026-06-21T01:27:20.6034774Z | ^^^^^^ +2026-06-21T01:27:20.6035402Z +2026-06-21T01:27:20.6036393Z warning: unused imports: `MilestoneData` and `MilestoneStatus` +2026-06-21T01:27:20.6037717Z --> campaign/src/test/get_campaign_status_tests.rs:12:50 +2026-06-21T01:27:20.6038659Z | +2026-06-21T01:27:20.6040005Z 12 | use crate::types::{CampaignData, CampaignStatus, MilestoneData, MilestoneStatus, StellarAsset}; +2026-06-21T01:27:20.6041588Z | ^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ +2026-06-21T01:27:20.6042411Z +2026-06-21T01:27:20.6043107Z warning: unused imports: `CampaignData` and `DonorRecord` +2026-06-21T01:27:20.6044291Z --> campaign/src/test/integration_tests.rs:13:16 +2026-06-21T01:27:20.6045212Z | +2026-06-21T01:27:20.6046691Z 13 | AssetInfo, CampaignData, CampaignStatus, DonorRecord, MilestoneData, MilestoneStatus, +2026-06-21T01:27:20.6048331Z | ^^^^^^^^^^^^ ^^^^^^^^^^^ +2026-06-21T01:27:20.6049116Z +2026-06-21T01:27:20.6049940Z warning: unused imports: `CampaignData`, `DataKey`, and `Error` +2026-06-21T01:27:20.6051548Z --> campaign/src/test/negative_path_tests.rs:12:5 +2026-06-21T01:27:20.6052789Z | +2026-06-21T01:27:20.6054019Z 12 | CampaignData, CampaignStatus, DonorRecord, AssetInfo, StellarAsset, MilestoneData, +2026-06-21T01:27:20.6055330Z | ^^^^^^^^^^^^ +2026-06-21T01:27:20.6056631Z 13 | MilestoneStatus, Error, DataKey, +2026-06-21T01:27:20.6057746Z | ^^^^^ ^^^^^^^ +2026-06-21T01:27:20.6058398Z +2026-06-21T01:27:22.1191773Z warning: unused variable: `creator` +2026-06-21T01:27:22.1193630Z --> campaign/src/test/negative_path_tests.rs:325:14 +2026-06-21T01:27:22.1194752Z | +2026-06-21T01:27:22.1195801Z 325 | let (creator, _) = initialize_default_campaign(&env); +2026-06-21T01:27:22.1197668Z | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_creator` +2026-06-21T01:27:22.1198934Z | +2026-06-21T01:27:22.1200015Z = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default +2026-06-21T01:27:22.1200958Z +2026-06-21T01:27:22.1344435Z warning: unused variable: `env` +2026-06-21T01:27:22.1345465Z --> campaign/src/test/negative_path_tests.rs:888:9 +2026-06-21T01:27:22.1346555Z | +2026-06-21T01:27:22.1347199Z 888 | let env = make_env(); +2026-06-21T01:27:22.1348416Z | ^^^ help: if this is intentional, prefix it with an underscore: `_env` +2026-06-21T01:27:22.1349288Z +2026-06-21T01:27:22.1360259Z warning: unused variable: `creator` +2026-06-21T01:27:22.1361256Z --> campaign/src/test/negative_path_tests.rs:922:14 +2026-06-21T01:27:22.1362075Z | +2026-06-21T01:27:22.1362901Z 922 | let (creator, _) = initialize_default_campaign(&env); +2026-06-21T01:27:22.1364282Z | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_creator` +2026-06-21T01:27:22.1365150Z +2026-06-21T01:27:22.5017840Z warning: `orbitchain-campaign` (lib) generated 1 warning (run `cargo fix --lib -p orbitchain-campaign` to apply 1 suggestion) +2026-06-21T01:27:22.5251636Z warning: unused return value of `get_all_milestones::get_all_milestones_view` that must be used +2026-06-21T01:27:22.5253193Z --> campaign/src/get_all_milestones.rs:130:13 +2026-06-21T01:27:22.5253974Z | +2026-06-21T01:27:22.5254721Z 130 | get_all_milestones_view(&env); +2026-06-21T01:27:22.5255344Z | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +2026-06-21T01:27:22.5255774Z | +2026-06-21T01:27:22.5256715Z = note: `#[warn(unused_must_use)]` (part of `#[warn(unused)]`) on by default +2026-06-21T01:27:22.5257435Z help: use `let _ = ...` to ignore the resulting value +2026-06-21T01:27:22.5257900Z | +2026-06-21T01:27:22.5258447Z 130 |  let _ = get_all_milestones_view(&env); +2026-06-21T01:27:22.5258987Z | +++++++ +2026-06-21T01:27:22.5259224Z +2026-06-21T01:27:22.5259820Z warning: unused return value of `get_milestone::get_milestone_view` that must be used +2026-06-21T01:27:22.5260506Z --> campaign/src/get_milestone.rs:148:13 +2026-06-21T01:27:22.5260904Z | +2026-06-21T01:27:22.5261295Z 148 | get_milestone_view(&env, 1); +2026-06-21T01:27:22.5261817Z | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +2026-06-21T01:27:22.5262211Z | +2026-06-21T01:27:22.5262843Z help: use `let _ = ...` to ignore the resulting value +2026-06-21T01:27:22.5263401Z | +2026-06-21T01:27:22.5263837Z 148 |  let _ = get_milestone_view(&env, 1); +2026-06-21T01:27:22.5264350Z | +++++++ +2026-06-21T01:27:22.5264584Z +2026-06-21T01:27:22.5265057Z warning: unused return value of `get_milestone::get_milestone_view` that must be used +2026-06-21T01:27:22.5265736Z --> campaign/src/get_milestone.rs:159:13 +2026-06-21T01:27:22.5266489Z | +2026-06-21T01:27:22.5267076Z 159 | get_milestone_view(&env, 99); +2026-06-21T01:27:22.5267959Z | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +2026-06-21T01:27:22.5268602Z | +2026-06-21T01:27:22.5268998Z help: use `let _ = ...` to ignore the resulting value +2026-06-21T01:27:22.5269351Z | +2026-06-21T01:27:22.5269724Z 159 |  let _ = get_milestone_view(&env, 99); +2026-06-21T01:27:22.5270152Z | +++++++ +2026-06-21T01:27:22.5270347Z +2026-06-21T01:27:22.5270771Z warning: unused return value of `get_milestone::get_milestone_view` that must be used +2026-06-21T01:27:22.5271317Z --> campaign/src/get_milestone.rs:168:13 +2026-06-21T01:27:22.5271647Z | +2026-06-21T01:27:22.5271973Z 168 | get_milestone_view(&env, 0); +2026-06-21T01:27:22.5272403Z | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +2026-06-21T01:27:22.5272727Z | +2026-06-21T01:27:22.5273046Z help: use `let _ = ...` to ignore the resulting value +2026-06-21T01:27:22.5273390Z | +2026-06-21T01:27:22.5273749Z 168 |  let _ = get_milestone_view(&env, 0); +2026-06-21T01:27:22.5274167Z | +++++++ +2026-06-21T01:27:22.5274357Z +2026-06-21T01:27:22.5346142Z warning: hiding a lifetime that's elided elsewhere is confusing +2026-06-21T01:27:22.5347180Z --> campaign/src/test/claim_refund_tests.rs:336:25 +2026-06-21T01:27:22.5347645Z | +2026-06-21T01:27:22.5348286Z 336 | fn token_asset<'a>(env: &Env) -> (StellarAssetClient<'a>, Address, TokenClient) { +2026-06-21T01:27:22.5349256Z | ^^^^ the lifetime is elided here ^^^^^^^^^^^ the same lifetime is hidden here +2026-06-21T01:27:22.5349830Z | +2026-06-21T01:27:22.5350344Z = help: the same lifetime is referred to in inconsistent ways, making the signature confusing +2026-06-21T01:27:22.5350992Z = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default +2026-06-21T01:27:22.5351436Z help: use `'_` for type paths +2026-06-21T01:27:22.5351742Z | +2026-06-21T01:27:22.5352268Z 336 | fn token_asset<'a>(env: &Env) -> (StellarAssetClient<'a>, Address, TokenClient<'_>) { +2026-06-21T01:27:22.5352984Z | ++++ +2026-06-21T01:27:22.5353259Z +2026-06-21T01:27:24.4453578Z warning: `orbitchain-campaign` (lib test) generated 15 warnings (1 duplicate) (run `cargo fix --lib -p orbitchain-campaign --tests` to apply 10 suggestions) +2026-06-21T01:27:24.4454724Z  Finished `test` profile [unoptimized + debuginfo] target(s) in 46.26s +2026-06-21T01:27:24.4865433Z  Running unittests src/lib.rs (target/debug/deps/orbitchain_campaign-b15e2173e8c5098e) +2026-06-21T01:27:24.4885646Z +2026-06-21T01:27:24.4886248Z running 142 tests +2026-06-21T01:27:24.4966772Z test get_all_milestones::tests::returns_all_milestones_when_empty ... ok +2026-06-21T01:27:24.5007062Z test get_all_milestones::tests::returns_all_milestones_for_single ... ok +2026-06-21T01:27:24.5074417Z test get_all_milestones::tests::returns_all_milestones_for_multiple ... ok +2026-06-21T01:27:24.5117173Z test get_milestone::tests::enriched_carries_pending_release_and_is_next_pending ... ok +2026-06-21T01:27:24.5136749Z test get_milestone::tests::enriched_is_fully_released_when_milestone_is_released ... ok +2026-06-21T01:27:24.5181858Z test get_milestone::tests::enriched_locked_milestone_is_not_marked_next_pending ... ok +2026-06-21T01:27:24.5427075Z test get_all_milestones::tests::panics_when_not_initialised - should panic ... ok +2026-06-21T01:27:24.5466369Z test get_milestone::tests::panics_when_contract_not_initialised - should panic ... ok +2026-06-21T01:27:24.5467995Z test get_milestone::tests::panics_on_index_equal_to_milestone_count - should panic ... ok +2026-06-21T01:27:24.5469292Z test multi_asset_release::tests::proportional_release_dust_below_minimum ... ok +2026-06-21T01:27:24.5470569Z test multi_asset_release::tests::proportional_release_equal_split ... ok +2026-06-21T01:27:24.5472319Z test get_milestone::tests::panics_on_index_far_exceeding_milestone_count - should panic ... ok +2026-06-21T01:27:24.5473527Z test multi_asset_release::tests::proportional_release_full_amount ... ok +2026-06-21T01:27:24.5474706Z test multi_asset_release::tests::proportional_release_negative_asset_raised ... ok +2026-06-21T01:27:24.5475853Z test multi_asset_release::tests::proportional_release_rounds_down ... ok +2026-06-21T01:27:24.5477187Z test multi_asset_release::tests::proportional_release_unequal_split ... ok +2026-06-21T01:27:24.5478381Z test multi_asset_release::tests::proportional_release_zero_asset_raised ... ok +2026-06-21T01:27:24.5496751Z test multi_asset_release::tests::proportional_release_zero_total_raised ... ok +2026-06-21T01:27:24.5515765Z test get_milestone::tests::returns_raw_data_for_index_zero ... ok +2026-06-21T01:27:24.5576630Z test get_milestone::tests::returns_correct_milestone_for_non_zero_index ... ok +2026-06-21T01:27:24.5593866Z test test::claim_refund_tests::test_claim_refund_active_campaign - should panic ... ok +2026-06-21T01:27:24.5606863Z test test::claim_refund_tests::test_claim_refund_already_claimed - should panic ... ok +2026-06-21T01:27:24.5725906Z test test::claim_refund_tests::test_claim_refund_ended_no_milestones_eligibility ... ok +2026-06-21T01:27:24.5882348Z test test::claim_refund_tests::test_claim_refund_ended_with_milestone_released - should panic ... ok +2026-06-21T01:27:24.5998814Z test test::claim_refund_tests::test_claim_refund_ended_with_released_milestone_eligibility ... ok +2026-06-21T01:27:24.6089668Z test test::claim_refund_tests::test_claim_refund_exactly_at_window_boundary ... ok +2026-06-21T01:27:24.6206900Z test test::claim_refund_tests::test_claim_refund_goal_reached_campaign - should panic ... ok +2026-06-21T01:27:24.6263086Z test test::claim_refund_tests::test_claim_refund_ended_full_refund ... ok +2026-06-21T01:27:24.6266644Z test test::claim_refund_tests::test_claim_refund_no_donor_eligibility ... ok +2026-06-21T01:27:24.6288200Z test test::claim_refund_tests::test_claim_refund_ended_donor_1 ... ok +2026-06-21T01:27:24.6336956Z test test::claim_refund_tests::test_claim_refund_no_donor_record - should panic ... ok +2026-06-21T01:27:24.6366928Z test test::claim_refund_tests::test_claim_refund_not_initialized - should panic ... ok +2026-06-21T01:27:24.6367953Z test test::claim_refund_tests::test_claim_refund_one_second_past_window ... ok +2026-06-21T01:27:24.6406977Z test test::claim_refund_tests::test_claim_refund_ended_donor_100 ... ok +2026-06-21T01:27:24.6423263Z test test::get_campaign_status_tests::calculates_days_remaining ... ok +2026-06-21T01:27:24.6434619Z test test::get_campaign_status_tests::returns_active_status ... ok +2026-06-21T01:27:24.6466883Z test test::claim_refund_tests::test_claim_refund_window_closed - should panic ... ok +2026-06-21T01:27:24.6486888Z test test::integration_tests::test_analytics_defaults_before_initialize ... ok +2026-06-21T01:27:24.6516700Z test test::get_campaign_status_tests::returns_cancelled_status ... ok +2026-06-21T01:27:24.6526682Z test test::get_campaign_status_tests::returns_ended_status ... ok +2026-06-21T01:27:24.6576838Z test test::integration_tests::test_donate_uninitialized - should panic ... ok +2026-06-21T01:27:24.6622182Z test test::integration_tests::test_donate_below_minimum_panics_assert - should panic ... ok +2026-06-21T01:27:24.6656613Z test test::integration_tests::test_get_donor_record_non_donor ... ok +2026-06-21T01:27:24.6695248Z test test::integration_tests::test_get_total_raised_default ... ok +2026-06-21T01:27:24.6736640Z test test::integration_tests::test_hello ... ok +2026-06-21T01:27:24.6796686Z test test::integration_tests::test_extend_deadline_happy_path ... ok +2026-06-21T01:27:24.6856975Z test test::integration_tests::test_campaign_analytics_report_and_summary ... ok +2026-06-21T01:27:24.6886782Z test test::integration_tests::test_initialize_happy_path ... ok +2026-06-21T01:27:24.6916555Z test test::integration_tests::test_version ... ok +2026-06-21T01:27:24.6926822Z test test::integration_tests::test_donate_happy_path ... ok +2026-06-21T01:27:24.6928239Z test test::integration_tests::test_lifecycle_end_and_refund_eligibility ... ok +2026-06-21T01:27:24.7036957Z test test::invariant_tests::invariant_milestone_targets_strictly_ascending ... ok +2026-06-21T01:27:24.7066868Z test test::invariant_tests::invariant_last_milestone_target_equals_goal ... ok +2026-06-21T01:27:24.7158018Z test test::invariant_tests::invariant_no_released_milestones_while_active ... ok +2026-06-21T01:27:24.7203898Z test test::invariant_tests::invariant_raised_amount_never_exceeds_goal ... ok +2026-06-21T01:27:24.7265863Z test test::negative_path_tests::test_cancel_campaign_fails_not_initialized - should panic ... ok +2026-06-21T01:27:24.7361805Z test test::invariant_tests::invariant_total_donations_match_raised ... ok +2026-06-21T01:27:24.7372815Z test test::negative_path_tests::test_cancel_campaign_fails_already_cancelled - should panic ... ok +2026-06-21T01:27:24.7396892Z test test::negative_path_tests::test_cancel_campaign_frozen_panics - should panic ... ok +2026-06-21T01:27:24.7426938Z test test::integration_tests::test_lifecycle_multi_milestone_unlock ... ok +2026-06-21T01:27:24.7496710Z test test::negative_path_tests::test_cancel_campaign_not_frozen_succeeds ... ok +2026-06-21T01:27:24.7546792Z test test::negative_path_tests::test_claim_refund_eligible_cancelled ... ok +2026-06-21T01:27:24.7586738Z test test::negative_path_tests::test_cancel_then_refund_eligible ... ok +2026-06-21T01:27:24.7616946Z test test::negative_path_tests::test_claim_refund_fails_not_initialized - should panic ... ok +2026-06-21T01:27:24.7636897Z test test::negative_path_tests::test_claim_refund_fails_already_claimed - should panic ... ok +2026-06-21T01:27:24.7676782Z test test::negative_path_tests::test_claim_refund_fails_no_donor_record - should panic ... ok +2026-06-21T01:27:24.7696925Z test test::negative_path_tests::test_claim_refund_fails_campaign_active - should panic ... ok +2026-06-21T01:27:24.7730366Z test test::negative_path_tests::test_donate_fails_below_minimum - should panic ... ok +2026-06-21T01:27:24.7749934Z test test::negative_path_tests::test_donate_fails_campaign_cancelled - should panic ... ok +2026-06-21T01:27:24.7786309Z test test::negative_path_tests::test_donate_fails_not_initialized - should panic ... ok +2026-06-21T01:27:24.7807367Z test test::negative_path_tests::test_donate_fails_campaign_ended - should panic ... ok +2026-06-21T01:27:24.7847009Z test test::negative_path_tests::test_donate_fails_negative_amount - should panic ... ok +2026-06-21T01:27:24.7940328Z test test::negative_path_tests::test_edge_case_zero_donations ... ok +2026-06-21T01:27:24.7942907Z test test::negative_path_tests::test_donate_fails_on_donation_count_overflow - should panic ... ok +2026-06-21T01:27:24.7956973Z test test::negative_path_tests::test_edge_case_no_donor_record ... ok +2026-06-21T01:27:24.8016942Z test test::negative_path_tests::test_donate_fails_zero_amount - should panic ... ok +2026-06-21T01:27:24.8046779Z test test::negative_path_tests::test_end_campaign_fails_not_initialized - should panic ... ok +2026-06-21T01:27:24.8076713Z test test::negative_path_tests::test_end_campaign_fails_already_ended - should panic ... ok +2026-06-21T01:27:24.8107476Z test test::negative_path_tests::test_end_campaign_frozen_panics - should panic ... ok +2026-06-21T01:27:24.8108553Z test test::negative_path_tests::test_end_campaign_fails_cancelled - should panic ... ok +2026-06-21T01:27:24.8176828Z test test::negative_path_tests::test_end_campaign_not_frozen_succeeds ... ok +2026-06-21T01:27:24.8196711Z test test::negative_path_tests::test_extend_deadline_fails_not_initialized - should panic ... ok +2026-06-21T01:27:24.8207698Z test test::negative_path_tests::test_end_then_refund_eligible ... ok +2026-06-21T01:27:24.8231851Z test test::negative_path_tests::test_extend_deadline_fails_cancelled - should panic ... ok +2026-06-21T01:27:24.8237713Z test test::negative_path_tests::test_extend_deadline_fails_absurd_future_time - should panic ... ok +2026-06-21T01:27:24.8341635Z test test::negative_path_tests::test_extend_deadline_fails_past_time - should panic ... ok +2026-06-21T01:27:24.8343125Z test test::negative_path_tests::test_extend_deadline_frozen_panics - should panic ... ok +2026-06-21T01:27:24.8382352Z test test::negative_path_tests::test_extend_deadline_not_frozen_succeeds ... ok +2026-06-21T01:27:24.8406713Z test test::negative_path_tests::test_hello ... ok +2026-06-21T01:27:24.8436963Z test test::negative_path_tests::test_get_milestone_view_fails_not_initialized - should panic ... ok +2026-06-21T01:27:24.8466765Z test test::negative_path_tests::test_initialize_fails_empty_asset_code - should panic ... ok +2026-06-21T01:27:24.8467814Z test test::negative_path_tests::test_full_lifecycle_happy_path ... ok +2026-06-21T01:27:24.8518128Z test test::negative_path_tests::test_initialize_fails_empty_assets - should panic ... ok +2026-06-21T01:27:24.8519416Z test test::negative_path_tests::test_initialize_fails_milestone_last_target_not_equal_goal - should panic ... ok +2026-06-21T01:27:24.8536863Z test test::negative_path_tests::test_get_milestone_view_fails_out_of_bounds - should panic ... ok +2026-06-21T01:27:24.8561665Z test test::negative_path_tests::test_initialize_fails_milestone_targets_not_ascending - should panic ... ok +2026-06-21T01:27:24.8563262Z test test::negative_path_tests::test_initialize_fails_already_initialized - should panic ... ok +2026-06-21T01:27:24.8564551Z test test::negative_path_tests::test_initialize_fails_negative_goal - should panic ... ok +2026-06-21T01:27:24.8565709Z test test::negative_path_tests::test_initialize_fails_past_end_time - should panic ... ok +2026-06-21T01:27:24.8567342Z test test::negative_path_tests::test_initialize_fails_too_many_milestones - should panic ... ok +2026-06-21T01:27:24.8568827Z test test::negative_path_tests::test_initialize_fails_zero_goal - should panic ... ok +2026-06-21T01:27:24.8570133Z test test::negative_path_tests::test_initialize_fails_zero_milestones - should panic ... ok +2026-06-21T01:27:24.8606893Z test test::negative_path_tests::test_initialize_requires_auth - should panic ... ok +2026-06-21T01:27:24.8722738Z test test::negative_path_tests::test_is_refund_eligible_fails_active_campaign ... ok +2026-06-21T01:27:24.8727021Z test test::negative_path_tests::test_is_refund_eligible_fails_already_claimed ... ok +2026-06-21T01:27:24.8728286Z test test::negative_path_tests::test_is_refund_eligible_fails_ended_with_released_milestones ... ok +2026-06-21T01:27:24.8756258Z test test::negative_path_tests::test_is_refund_eligible_fails_goal_reached ... ok +2026-06-21T01:27:24.8757348Z test test::negative_path_tests::test_is_refund_eligible_returns_false_no_campaign ... ok +2026-06-21T01:27:24.8836693Z test test::negative_path_tests::test_is_refund_eligible_fails_no_campaign ... ok +2026-06-21T01:27:24.8874051Z test test::negative_path_tests::test_is_refund_eligible_fails_no_donor_record ... ok +2026-06-21T01:27:24.8916865Z test test::negative_path_tests::test_is_refund_eligible_fails_window_closed ... ok +2026-06-21T01:27:24.8976575Z test test::negative_path_tests::test_refund_window_edge_boundary ... ok +2026-06-21T01:27:24.9012218Z test test::negative_path_tests::test_upgrade_fails_when_frozen - should panic ... ok +2026-06-21T01:27:24.9036939Z test test::negative_path_tests::test_reentrancy_lock_donate_twice_succeeds ... ok +2026-06-21T01:27:24.9066563Z test test::negative_path_tests::test_version ... ok +2026-06-21T01:27:24.9096563Z test test::negative_path_tests::test_refund_window_just_after_boundary ... ok +2026-06-21T01:27:24.9126564Z test test::negative_path_tests::test_upgrade_succeeds_after_unfreeze ... ok +2026-06-21T01:27:24.9137017Z test test::negative_path_tests::test_upgrade_succeeds_when_not_frozen ... ok +2026-06-21T01:27:24.9138044Z test test::refund_eligibility_tests::test_refund_eligible_campaign_cancelled ... ok +2026-06-21T01:27:24.9139105Z test test::refund_eligibility_tests::test_refund_eligibility_all_conditions ... ok +2026-06-21T01:27:24.9236899Z test test::refund_eligibility_tests::test_refund_not_eligible_campaign_goal_reached ... ok +2026-06-21T01:27:24.9240844Z test test::refund_eligibility_tests::test_refund_not_eligible_already_claimed ... ok +2026-06-21T01:27:24.9258121Z test test::refund_eligibility_tests::test_refund_eligible_campaign_ended_no_milestone_released ... ok +2026-06-21T01:27:24.9276919Z test test::refund_eligibility_tests::test_refund_not_eligible_campaign_active ... ok +2026-06-21T01:27:24.9279019Z test test::refund_eligibility_tests::test_refund_not_eligible_no_campaign ... ok +2026-06-21T01:27:24.9376823Z test test::refund_eligibility_tests::test_refund_not_eligible_no_donor_record ... ok +2026-06-21T01:27:24.9397319Z test test::refund_eligibility_tests::test_refund_window_edge_case_one_second_after_30_days ... ok +2026-06-21T01:27:24.9398518Z test test::refund_eligibility_tests::test_refund_window_edge_case_exactly_30_days ... ok +2026-06-21T01:27:24.9399533Z test test::refund_eligibility_tests::test_refund_not_eligible_window_closed ... ok +2026-06-21T01:27:24.9587000Z test test::release_milestone_tests::test_frozen_contract_release_panics - should panic ... ok +2026-06-21T01:27:24.9706774Z test test::release_milestone_tests::test_first_milestone_release_succeeds_regardless_of_previous ... ok +2026-06-21T01:27:24.9726885Z test test::release_milestone_tests::test_locked_milestone_release_panics - should panic ... ok +2026-06-21T01:27:24.9727770Z test test::release_milestone_tests::test_double_release_panics - should panic ... ok +2026-06-21T01:27:24.9805281Z test test::release_milestone_tests::test_final_milestone_releases_remaining_balance ... ok +2026-06-21T01:27:24.9896887Z test test::release_milestone_tests::test_non_creator_release_panics - should panic ... ok +2026-06-21T01:27:24.9936861Z test test::release_milestone_tests::test_release_non_existent_milestone_panics - should panic ... ok +2026-06-21T01:27:25.0114962Z test test::release_milestone_tests::test_release_with_single_asset_transfers_correct_amount ... ok +2026-06-21T01:27:25.0117087Z test test::release_milestone_tests::test_skipping_milestone_release_panics - should panic ... ok +2026-06-21T01:27:25.0367118Z test test::release_milestone_tests::test_valid_release_updates_milestone_status ... ok +2026-06-21T01:27:25.0408266Z test test::release_milestone_tests::test_valid_release_sets_released_amount ... ok +2026-06-21T01:27:25.0427694Z test test::release_milestone_tests::test_sequential_milestone_release_succeeds ... ok +2026-06-21T01:27:25.0464704Z test test::release_milestone_tests::test_release_with_multiple_assets_only_debits_first_asset ... ok +2026-06-21T01:27:25.0465427Z +2026-06-21T01:27:25.0465857Z test result: ok. 142 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.56s +2026-06-21T01:27:25.0466702Z +2026-06-21T01:27:25.0500917Z  Running unittests src/lib.rs (target/debug/deps/orbitchain_common-a7e91c53777a8f47) +2026-06-21T01:27:25.0514033Z +2026-06-21T01:27:25.0514393Z running 0 tests +2026-06-21T01:27:25.0514580Z +2026-06-21T01:27:25.0515389Z test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s +2026-06-21T01:27:25.0516251Z +2026-06-21T01:27:25.0530872Z  Running unittests src/lib.rs (target/debug/deps/orbitchain_core-64120678b644eb93) +2026-06-21T01:27:25.0543374Z +2026-06-21T01:27:25.0543538Z running 14 tests +2026-06-21T01:27:25.0616769Z test tests::test_dashboard_metrics_empty_contract ... ok +2026-06-21T01:27:25.0705106Z test tests::test_campaign_report_progress_clamped ... ok +2026-06-21T01:27:25.0713912Z test tests::test_create_and_donate_with_metadata_and_tracking ... ok +2026-06-21T01:27:25.0886905Z test tests::test_count_total_transactions_split ... ok +2026-06-21T01:27:25.0921231Z test tests::test_get_campaign_report_accuracy ... ok +2026-06-21T01:27:25.0936508Z test tests::test_initialize ... ok +2026-06-21T01:27:25.0964417Z test tests::test_ping ... ok +2026-06-21T01:27:25.0965053Z test tests::test_get_platform_summary ... ok +2026-06-21T01:27:25.1066621Z test tests::test_get_dashboard_metrics ... ok +2026-06-21T01:27:25.1076690Z test tests::test_validate_recipient ... ok +2026-06-21T01:27:25.1166637Z test tests::test_total_tx_count ... ok +2026-06-21T01:27:25.1179747Z test tests::test_submit_transaction ... ok +2026-06-21T01:27:25.1266381Z test tests::test_withdraw_and_approve ... ok +2026-06-21T01:27:25.1585835Z test tests::test_prevent_double_withdrawal - should panic ... ok +2026-06-21T01:27:25.1586679Z +2026-06-21T01:27:25.1587225Z test result: ok. 14 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.10s +2026-06-21T01:27:25.1588007Z +2026-06-21T01:27:25.1614857Z  Running unittests src/lib.rs (target/debug/deps/orbitchain_token_bridge-e7a55db06a538a5c) +2026-06-21T01:27:25.1626867Z +2026-06-21T01:27:25.1627079Z running 0 tests +2026-06-21T01:27:25.1627290Z +2026-06-21T01:27:25.1627570Z test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s +2026-06-21T01:27:25.1627935Z +2026-06-21T01:27:25.1629666Z  Doc-tests orbitchain_campaign +2026-06-21T01:27:25.8858845Z +2026-06-21T01:27:25.8859416Z running 0 tests +2026-06-21T01:27:25.8859645Z +2026-06-21T01:27:25.8916181Z test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s +2026-06-21T01:27:25.8917054Z +2026-06-21T01:27:25.8994071Z  Doc-tests orbitchain_common +2026-06-21T01:27:25.9409005Z +2026-06-21T01:27:25.9409692Z running 0 tests +2026-06-21T01:27:25.9409978Z +2026-06-21T01:27:25.9410422Z test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s +2026-06-21T01:27:25.9410848Z +2026-06-21T01:27:25.9439612Z  Doc-tests orbitchain_token_bridge +2026-06-21T01:27:25.9779464Z +2026-06-21T01:27:25.9780116Z running 0 tests +2026-06-21T01:27:25.9780445Z +2026-06-21T01:27:25.9781025Z test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s +2026-06-21T01:27:25.9781780Z diff --git a/.ci_logs/Tests (host target)/9_Post Cache cargo registry and target.txt b/.ci_logs/Tests (host target)/9_Post Cache cargo registry and target.txt new file mode 100644 index 0000000..f643541 --- /dev/null +++ b/.ci_logs/Tests (host target)/9_Post Cache cargo registry and target.txt @@ -0,0 +1,4 @@ +2026-06-21T01:27:26.0067821Z Post job cleanup. +2026-06-21T01:27:26.2852555Z Cache up-to-date. +2026-06-21T01:27:26.2854957Z (node:3242) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead. +2026-06-21T01:27:26.2856331Z (Use `node --trace-deprecation ...` to show where the warning was created) diff --git a/.ci_logs/Tests (host target)/system.txt b/.ci_logs/Tests (host target)/system.txt new file mode 100644 index 0000000..f9796ec --- /dev/null +++ b/.ci_logs/Tests (host target)/system.txt @@ -0,0 +1,8 @@ +2026-06-21T01:26:21.5340000Z Job is waiting for a hosted runner to come online. +2026-06-21T01:26:21.5340000Z Requested labels: ubuntu-latest +2026-06-21T01:26:21.5340000Z Job defined at: OrbitChainLabs/OrbitChain-Contracts/.github/workflows/ci.yml@refs/pull/60/merge +2026-06-21T01:26:21.5340000Z Waiting for a runner to pick up this job... +2026-06-21T01:26:21.5340000Z Job is about to start running on the hosted runner: GitHub Actions 1000000142 +2026-06-21T01:26:21.5330000Z Evaluating test.if +2026-06-21T01:26:21.5330000Z Evaluating: success() +2026-06-21T01:26:21.5330000Z Result: true \ No newline at end of file diff --git a/.ci_logs/WASM compile check/10_Post Run actions_checkout@v4.txt b/.ci_logs/WASM compile check/10_Post Run actions_checkout@v4.txt new file mode 100644 index 0000000..00363b1 --- /dev/null +++ b/.ci_logs/WASM compile check/10_Post Run actions_checkout@v4.txt @@ -0,0 +1,15 @@ +2026-06-21T01:27:05.6219988Z Node 20 is being deprecated. This workflow is running with Node 24 by default. If you need to temporarily use Node 20, you can set the ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true environment variable. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/ +2026-06-21T01:27:05.6221151Z Post job cleanup. +2026-06-21T01:27:05.7028949Z [command]/usr/bin/git version +2026-06-21T01:27:05.7061293Z git version 2.54.0 +2026-06-21T01:27:05.7092816Z Temporarily overriding HOME='/home/runner/work/_temp/ced60acb-1fb8-470c-93bc-14a624b22182' before making global git config changes +2026-06-21T01:27:05.7094112Z Adding repository directory to the temporary git global config as a safe directory +2026-06-21T01:27:05.7097748Z [command]/usr/bin/git config --global --add safe.directory /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts +2026-06-21T01:27:05.7127397Z [command]/usr/bin/git config --local --name-only --get-regexp core\.sshCommand +2026-06-21T01:27:05.7153265Z [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || :" +2026-06-21T01:27:05.7318303Z [command]/usr/bin/git config --local --name-only --get-regexp http\.https\:\/\/github\.com\/\.extraheader +2026-06-21T01:27:05.7338238Z http.https://github.com/.extraheader +2026-06-21T01:27:05.7346491Z [command]/usr/bin/git config --local --unset-all http.https://github.com/.extraheader +2026-06-21T01:27:05.7370082Z [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http\.https\:\/\/github\.com\/\.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :" +2026-06-21T01:27:05.7530121Z [command]/usr/bin/git config --local --name-only --get-regexp ^includeIf\.gitdir: +2026-06-21T01:27:05.7554695Z [command]/usr/bin/git submodule foreach --recursive git config --local --show-origin --name-only --get-regexp remote.origin.url diff --git a/.ci_logs/WASM compile check/11_Complete job.txt b/.ci_logs/WASM compile check/11_Complete job.txt new file mode 100644 index 0000000..2b35cfc --- /dev/null +++ b/.ci_logs/WASM compile check/11_Complete job.txt @@ -0,0 +1,2 @@ +2026-06-21T01:27:05.7818176Z Cleaning up orphan processes +2026-06-21T01:27:05.8051109Z ##[warning]Node.js 20 is deprecated. The following actions target Node.js 20 but are being forced to run on Node.js 24: actions/checkout@v4. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/ diff --git a/.ci_logs/WASM compile check/1_Set up job.txt b/.ci_logs/WASM compile check/1_Set up job.txt new file mode 100644 index 0000000..aab572c --- /dev/null +++ b/.ci_logs/WASM compile check/1_Set up job.txt @@ -0,0 +1,32 @@ +2026-06-21T01:26:23.6790912Z Current runner version: '2.335.1' +2026-06-21T01:26:23.6813093Z ##[group]Runner Image Provisioner +2026-06-21T01:26:23.6813865Z Hosted Compute Agent +2026-06-21T01:26:23.6814461Z Version: 20260611.554 +2026-06-21T01:26:23.6815038Z Commit: 5e0782fdc9014723d3be820dd114dd31555c2bd1 +2026-06-21T01:26:23.6815688Z Build Date: 2026-06-11T21:40:46Z +2026-06-21T01:26:23.6816487Z Worker ID: {86e8e81c-0ff0-47b4-929e-9710d480b6b9} +2026-06-21T01:26:23.6817169Z Azure Region: westcentralus +2026-06-21T01:26:23.6817709Z ##[endgroup] +2026-06-21T01:26:23.6819022Z ##[group]Operating System +2026-06-21T01:26:23.6819577Z Ubuntu +2026-06-21T01:26:23.6820081Z 24.04.4 +2026-06-21T01:26:23.6820547Z LTS +2026-06-21T01:26:23.6821000Z ##[endgroup] +2026-06-21T01:26:23.6821497Z ##[group]Runner Image +2026-06-21T01:26:23.6822027Z Image: ubuntu-24.04 +2026-06-21T01:26:23.6822582Z Version: 20260615.205.1 +2026-06-21T01:26:23.6823523Z Included Software: https://github.com/actions/runner-images/blob/ubuntu24/20260615.205/images/ubuntu/Ubuntu2404-Readme.md +2026-06-21T01:26:23.6825020Z Image Release: https://github.com/actions/runner-images/releases/tag/ubuntu24%2F20260615.205 +2026-06-21T01:26:23.6825862Z ##[endgroup] +2026-06-21T01:26:23.6827120Z ##[group]GITHUB_TOKEN Permissions +2026-06-21T01:26:23.6828882Z Contents: read +2026-06-21T01:26:23.6829398Z Metadata: read +2026-06-21T01:26:23.6829980Z ##[endgroup] +2026-06-21T01:26:23.6831833Z Secret source: Actions +2026-06-21T01:26:23.6832532Z Prepare workflow directory +2026-06-21T01:26:23.7191977Z Prepare all required actions +2026-06-21T01:26:23.7228543Z Getting action download info +2026-06-21T01:26:24.0187373Z Download action repository 'actions/checkout@v4' (SHA:34e114876b0b11c390a56381ad16ebd13914f8d5) +2026-06-21T01:26:24.0788967Z Download action repository 'dtolnay/rust-toolchain@stable' (SHA:29eef336d9b2848a0b548edc03f92a220660cdb8) +2026-06-21T01:26:24.2733295Z Download action repository 'Swatinem/rust-cache@v2' (SHA:e18b497796c12c097a38f9edb9d0641fb99eee32) +2026-06-21T01:26:25.2527414Z Complete job name: WASM compile check diff --git a/.ci_logs/WASM compile check/2_Run actions_checkout@v4.txt b/.ci_logs/WASM compile check/2_Run actions_checkout@v4.txt new file mode 100644 index 0000000..514933a --- /dev/null +++ b/.ci_logs/WASM compile check/2_Run actions_checkout@v4.txt @@ -0,0 +1,93 @@ +2026-06-21T01:26:25.3312010Z Node 20 is being deprecated. This workflow is running with Node 24 by default. If you need to temporarily use Node 20, you can set the ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true environment variable. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/ +2026-06-21T01:26:25.3321851Z ##[group]Run actions/checkout@v4 +2026-06-21T01:26:25.3322628Z with: +2026-06-21T01:26:25.3323185Z repository: OrbitChainLabs/OrbitChain-Contracts +2026-06-21T01:26:25.3328194Z token: *** +2026-06-21T01:26:25.3328683Z ssh-strict: true +2026-06-21T01:26:25.3329172Z ssh-user: git +2026-06-21T01:26:25.3329681Z persist-credentials: true +2026-06-21T01:26:25.3330231Z clean: true +2026-06-21T01:26:25.3330732Z sparse-checkout-cone-mode: true +2026-06-21T01:26:25.3331294Z fetch-depth: 1 +2026-06-21T01:26:25.3331779Z fetch-tags: false +2026-06-21T01:26:25.3332278Z show-progress: true +2026-06-21T01:26:25.3332771Z lfs: false +2026-06-21T01:26:25.3333270Z submodules: false +2026-06-21T01:26:25.3333809Z set-safe-directory: true +2026-06-21T01:26:25.3334598Z env: +2026-06-21T01:26:25.3335057Z CARGO_TERM_COLOR: always +2026-06-21T01:26:25.3335587Z RUST_BACKTRACE: short +2026-06-21T01:26:25.3336708Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:25.3337701Z ##[endgroup] +2026-06-21T01:26:25.4249698Z Syncing repository: OrbitChainLabs/OrbitChain-Contracts +2026-06-21T01:26:25.4251850Z ##[group]Getting Git version info +2026-06-21T01:26:25.4252812Z Working directory is '/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts' +2026-06-21T01:26:25.4254212Z [command]/usr/bin/git version +2026-06-21T01:26:25.4295929Z git version 2.54.0 +2026-06-21T01:26:25.4312976Z ##[endgroup] +2026-06-21T01:26:25.4325383Z Temporarily overriding HOME='/home/runner/work/_temp/51556e1d-f0b4-4bb5-b4a6-86f084ae7955' before making global git config changes +2026-06-21T01:26:25.4327017Z Adding repository directory to the temporary git global config as a safe directory +2026-06-21T01:26:25.4330921Z [command]/usr/bin/git config --global --add safe.directory /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts +2026-06-21T01:26:25.4368842Z Deleting the contents of '/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts' +2026-06-21T01:26:25.4371835Z ##[group]Initializing the repository +2026-06-21T01:26:25.4376436Z [command]/usr/bin/git init /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts +2026-06-21T01:26:25.4438218Z hint: Using 'master' as the name for the initial branch. This default branch name +2026-06-21T01:26:25.4439981Z hint: will change to "main" in Git 3.0. To configure the initial branch name +2026-06-21T01:26:25.4442081Z hint: to use in all of your new repositories, which will suppress this warning, +2026-06-21T01:26:25.4443612Z hint: call: +2026-06-21T01:26:25.4444539Z hint: +2026-06-21T01:26:25.4445592Z hint: git config --global init.defaultBranch +2026-06-21T01:26:25.4447084Z hint: +2026-06-21T01:26:25.4448333Z hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and +2026-06-21T01:26:25.4450191Z hint: 'development'. The just-created branch can be renamed via this command: +2026-06-21T01:26:25.4451768Z hint: +2026-06-21T01:26:25.4452621Z hint: git branch -m +2026-06-21T01:26:25.4453575Z hint: +2026-06-21T01:26:25.4454846Z hint: Disable this message with "git config set advice.defaultBranchName false" +2026-06-21T01:26:25.4457223Z Initialized empty Git repository in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/.git/ +2026-06-21T01:26:25.4459313Z [command]/usr/bin/git remote add origin https://github.com/OrbitChainLabs/OrbitChain-Contracts +2026-06-21T01:26:25.4483822Z ##[endgroup] +2026-06-21T01:26:25.4485440Z ##[group]Disabling automatic garbage collection +2026-06-21T01:26:25.4487385Z [command]/usr/bin/git config --local gc.auto 0 +2026-06-21T01:26:25.4511977Z ##[endgroup] +2026-06-21T01:26:25.4513957Z ##[group]Setting up auth +2026-06-21T01:26:25.4518037Z [command]/usr/bin/git config --local --name-only --get-regexp core\.sshCommand +2026-06-21T01:26:25.4545035Z [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || :" +2026-06-21T01:26:25.4798366Z [command]/usr/bin/git config --local --name-only --get-regexp http\.https\:\/\/github\.com\/\.extraheader +2026-06-21T01:26:25.4820708Z [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http\.https\:\/\/github\.com\/\.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :" +2026-06-21T01:26:25.4981111Z [command]/usr/bin/git config --local --name-only --get-regexp ^includeIf\.gitdir: +2026-06-21T01:26:25.5003705Z [command]/usr/bin/git submodule foreach --recursive git config --local --show-origin --name-only --get-regexp remote.origin.url +2026-06-21T01:26:25.5162929Z [command]/usr/bin/git config --local http.https://github.com/.extraheader AUTHORIZATION: basic *** +2026-06-21T01:26:25.5187284Z ##[endgroup] +2026-06-21T01:26:25.5188430Z ##[group]Fetching the repository +2026-06-21T01:26:25.5195403Z [command]/usr/bin/git -c protocol.version=2 fetch --no-tags --prune --no-recurse-submodules --depth=1 origin +1be331ea57707748b39835c9fac837ddeb283d53:refs/remotes/pull/60/merge +2026-06-21T01:26:26.0126822Z From https://github.com/OrbitChainLabs/OrbitChain-Contracts +2026-06-21T01:26:26.0130429Z * [new ref] 1be331ea57707748b39835c9fac837ddeb283d53 -> pull/60/merge +2026-06-21T01:26:26.0158741Z ##[endgroup] +2026-06-21T01:26:26.0160224Z ##[group]Determining the checkout info +2026-06-21T01:26:26.0161813Z ##[endgroup] +2026-06-21T01:26:26.0166474Z [command]/usr/bin/git sparse-checkout disable +2026-06-21T01:26:26.0201909Z [command]/usr/bin/git config --local --unset-all extensions.worktreeConfig +2026-06-21T01:26:26.0228736Z ##[group]Checking out the ref +2026-06-21T01:26:26.0232308Z [command]/usr/bin/git checkout --progress --force refs/remotes/pull/60/merge +2026-06-21T01:26:26.0333062Z Note: switching to 'refs/remotes/pull/60/merge'. +2026-06-21T01:26:26.0333517Z +2026-06-21T01:26:26.0333875Z You are in 'detached HEAD' state. You can look around, make experimental +2026-06-21T01:26:26.0334704Z changes and commit them, and you can discard any commits you make in this +2026-06-21T01:26:26.0335525Z state without impacting any branches by switching back to a branch. +2026-06-21T01:26:26.0336001Z +2026-06-21T01:26:26.0336407Z If you want to create a new branch to retain commits you create, you may +2026-06-21T01:26:26.0337171Z do so (now or later) by using -c with the switch command. Example: +2026-06-21T01:26:26.0337608Z +2026-06-21T01:26:26.0337816Z git switch -c +2026-06-21T01:26:26.0338117Z +2026-06-21T01:26:26.0338314Z Or undo this operation with: +2026-06-21T01:26:26.0338593Z +2026-06-21T01:26:26.0338768Z git switch - +2026-06-21T01:26:26.0339007Z +2026-06-21T01:26:26.0339730Z Turn off this advice by setting config variable advice.detachedHead to false +2026-06-21T01:26:26.0340398Z +2026-06-21T01:26:26.0341265Z HEAD is now at 1be331e Merge 4b973bcdef5a40b4714ec76b0c3c3d5e9b026c2d into dc3d5e2b821bb2a0f2655582265c562926415b02 +2026-06-21T01:26:26.0343621Z ##[endgroup] +2026-06-21T01:26:26.0367509Z [command]/usr/bin/git log -1 --format=%H +2026-06-21T01:26:26.0385724Z 1be331ea57707748b39835c9fac837ddeb283d53 diff --git a/.ci_logs/WASM compile check/3_Install Rust toolchain with wasm target.txt b/.ci_logs/WASM compile check/3_Install Rust toolchain with wasm target.txt new file mode 100644 index 0000000..fd9cd00 --- /dev/null +++ b/.ci_logs/WASM compile check/3_Install Rust toolchain with wasm target.txt @@ -0,0 +1,191 @@ +2026-06-21T01:26:26.0700951Z ##[warning]Unexpected input(s) 'cache', valid inputs are ['toolchain', 'targets', 'target', 'components'] +2026-06-21T01:26:26.0715776Z ##[group]Run dtolnay/rust-toolchain@stable +2026-06-21T01:26:26.0716456Z with: +2026-06-21T01:26:26.0716826Z targets: wasm32v1-none +2026-06-21T01:26:26.0717242Z cache: false +2026-06-21T01:26:26.0717615Z toolchain: stable +2026-06-21T01:26:26.0717994Z env: +2026-06-21T01:26:26.0718345Z CARGO_TERM_COLOR: always +2026-06-21T01:26:26.0718772Z RUST_BACKTRACE: short +2026-06-21T01:26:26.0719533Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:26.0720369Z ##[endgroup] +2026-06-21T01:26:26.0844610Z ##[group]Run : parse toolchain version +2026-06-21T01:26:26.0845266Z : parse toolchain version +2026-06-21T01:26:26.0845774Z if [[ -z $toolchain ]]; then +2026-06-21T01:26:26.0846861Z  # GitHub does not enforce `required: true` inputs itself. https://github.com/actions/runner/issues/1070 +2026-06-21T01:26:26.0847834Z  echo "'toolchain' is a required input" >&2 +2026-06-21T01:26:26.0848364Z  exit 1 +2026-06-21T01:26:26.0848950Z elif [[ $toolchain =~ ^stable' '[0-9]+' '(year|month|week|day)s?' 'ago$ ]]; then +2026-06-21T01:26:26.0849673Z  if [[ Linux == macOS ]]; then +2026-06-21T01:26:26.0850556Z  echo "toolchain=1.$((($(date -v-$(sed 's/stable \([0-9]*\) \(.\).*/\1\2/' <<< $toolchain) +%s)/60/60/24-16569)/7/6))" >> $GITHUB_OUTPUT +2026-06-21T01:26:26.0851430Z  else +2026-06-21T01:26:26.0852121Z  echo "toolchain=1.$((($(date --date "${toolchain#stable }" +%s)/60/60/24-16569)/7/6))" >> $GITHUB_OUTPUT +2026-06-21T01:26:26.0852933Z  fi +2026-06-21T01:26:26.0853469Z elif [[ $toolchain =~ ^stable' 'minus' '[0-9]+' 'releases?$ ]]; then +2026-06-21T01:26:26.0854379Z  echo "toolchain=1.$((($(date +%s)/60/60/24-16569)/7/6-${toolchain//[^0-9]/}))" >> $GITHUB_OUTPUT +2026-06-21T01:26:26.0855188Z elif [[ $toolchain =~ ^1\.[0-9]+$ ]]; then +2026-06-21T01:26:26.0856167Z  echo "toolchain=1.$((i=${toolchain#1.}, c=($(date +%s)/60/60/24-16569)/7/6, i+9*i*(10*i<=c)+90*i*(100*i<=c)))" >> $GITHUB_OUTPUT +2026-06-21T01:26:26.0857031Z else +2026-06-21T01:26:26.0857485Z  echo "toolchain=$toolchain" >> $GITHUB_OUTPUT +2026-06-21T01:26:26.0858035Z fi +2026-06-21T01:26:26.0979191Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:26.0979829Z env: +2026-06-21T01:26:26.0980201Z CARGO_TERM_COLOR: always +2026-06-21T01:26:26.0980813Z RUST_BACKTRACE: short +2026-06-21T01:26:26.0981587Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:26.0982435Z toolchain: stable +2026-06-21T01:26:26.0982828Z ##[endgroup] +2026-06-21T01:26:26.1128268Z ##[group]Run : construct rustup command line +2026-06-21T01:26:26.1128878Z : construct rustup command line +2026-06-21T01:26:26.1129677Z echo "targets=$(for t in ${targets//,/ }; do echo -n ' --target' $t; done)" >> $GITHUB_OUTPUT +2026-06-21T01:26:26.1130733Z echo "components=$(for c in ${components//,/ }; do echo -n ' --component' $c; done)" >> $GITHUB_OUTPUT +2026-06-21T01:26:26.1131578Z echo "downgrade=" >> $GITHUB_OUTPUT +2026-06-21T01:26:26.1148629Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:26.1149223Z env: +2026-06-21T01:26:26.1149592Z CARGO_TERM_COLOR: always +2026-06-21T01:26:26.1150031Z RUST_BACKTRACE: short +2026-06-21T01:26:26.1150809Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:26.1151646Z targets: wasm32v1-none +2026-06-21T01:26:26.1152057Z components: +2026-06-21T01:26:26.1152515Z ##[endgroup] +2026-06-21T01:26:26.1226728Z ##[group]Run : set $CARGO_HOME +2026-06-21T01:26:26.1227244Z : set $CARGO_HOME +2026-06-21T01:26:26.1227823Z echo CARGO_HOME=${CARGO_HOME:-"$HOME/.cargo"} >> $GITHUB_ENV +2026-06-21T01:26:26.1243946Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:26.1244523Z env: +2026-06-21T01:26:26.1244885Z CARGO_TERM_COLOR: always +2026-06-21T01:26:26.1245317Z RUST_BACKTRACE: short +2026-06-21T01:26:26.1246276Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:26.1247117Z ##[endgroup] +2026-06-21T01:26:26.1319447Z ##[group]Run : install rustup if needed +2026-06-21T01:26:26.1319996Z : install rustup if needed +2026-06-21T01:26:26.1320537Z if ! command -v rustup &>/dev/null; then +2026-06-21T01:26:26.1321739Z  curl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused --location --silent --show-error --fail https://sh.rustup.rs | sh -s -- --default-toolchain none -y +2026-06-21T01:26:26.1322927Z  echo "$CARGO_HOME/bin" >> $GITHUB_PATH +2026-06-21T01:26:26.1323438Z fi +2026-06-21T01:26:26.1339146Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:26.1339735Z env: +2026-06-21T01:26:26.1340092Z CARGO_TERM_COLOR: always +2026-06-21T01:26:26.1340522Z RUST_BACKTRACE: short +2026-06-21T01:26:26.1341282Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:26.1342122Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:26:26.1342573Z ##[endgroup] +2026-06-21T01:26:26.1416274Z ##[group]Run rustup toolchain install stable --target wasm32v1-none --profile minimal --no-self-update +2026-06-21T01:26:26.1417463Z rustup toolchain install stable --target wasm32v1-none --profile minimal --no-self-update +2026-06-21T01:26:26.1433515Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:26.1434085Z env: +2026-06-21T01:26:26.1434444Z CARGO_TERM_COLOR: always +2026-06-21T01:26:26.1434873Z RUST_BACKTRACE: short +2026-06-21T01:26:26.1435679Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:26.1436679Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:26:26.1437159Z RUSTUP_PERMIT_COPY_RENAME: 1 +2026-06-21T01:26:26.1437604Z ##[endgroup] +2026-06-21T01:26:26.3030928Z info: syncing channel updates for stable-x86_64-unknown-linux-gnu +2026-06-21T01:26:26.6140957Z info: latest update on 2026-05-28 for version 1.96.0 (ac68faa20 2026-05-25) +2026-06-21T01:26:26.6287557Z info: downloading component rust-std +2026-06-21T01:26:27.8672839Z +2026-06-21T01:26:27.8745077Z stable-x86_64-unknown-linux-gnu updated - rustc 1.96.0 (ac68faa20 2026-05-25) (from rustc 1.96.0 (ac68faa20 2026-05-25)) +2026-06-21T01:26:27.8746347Z +2026-06-21T01:26:27.8806683Z ##[group]Run rustup default stable +2026-06-21T01:26:27.8807058Z rustup default stable +2026-06-21T01:26:27.8828645Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:27.8829040Z env: +2026-06-21T01:26:27.8829282Z CARGO_TERM_COLOR: always +2026-06-21T01:26:27.8829557Z RUST_BACKTRACE: short +2026-06-21T01:26:27.8830069Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:27.8830607Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:26:27.8830890Z ##[endgroup] +2026-06-21T01:26:27.8916303Z info: using existing install for stable-x86_64-unknown-linux-gnu +2026-06-21T01:26:27.8921414Z info: default toolchain set to stable-x86_64-unknown-linux-gnu +2026-06-21T01:26:27.8921724Z +2026-06-21T01:26:27.8989007Z stable-x86_64-unknown-linux-gnu unchanged - rustc 1.96.0 (ac68faa20 2026-05-25) +2026-06-21T01:26:27.8989564Z +2026-06-21T01:26:27.8991526Z info: note that the toolchain 'stable-x86_64-unknown-linux-gnu' is currently in use (overridden by '/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/rust-toolchain.toml') +2026-06-21T01:26:27.9105924Z ##[group]Run : create cachekey +2026-06-21T01:26:27.9106735Z : create cachekey +2026-06-21T01:26:27.9107611Z DATE=$(rustc +stable --version --verbose | sed -ne 's/^commit-date: \(20[0-9][0-9]\)-\([01][0-9]\)-\([0-3][0-9]\)$/\1\2\3/p') +2026-06-21T01:26:27.9109064Z HASH=$(rustc +stable --version --verbose | sed -ne 's/^commit-hash: //p') +2026-06-21T01:26:27.9109995Z echo "cachekey=$(echo $DATE$HASH | head -c12)" >> $GITHUB_OUTPUT +2026-06-21T01:26:27.9133057Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:27.9133443Z env: +2026-06-21T01:26:27.9133704Z CARGO_TERM_COLOR: always +2026-06-21T01:26:27.9133980Z RUST_BACKTRACE: short +2026-06-21T01:26:27.9134477Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:27.9135017Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:26:27.9135333Z ##[endgroup] +2026-06-21T01:26:27.9471760Z ##[group]Run : disable incremental compilation +2026-06-21T01:26:27.9472200Z : disable incremental compilation +2026-06-21T01:26:27.9472585Z if [ -z "${CARGO_INCREMENTAL+set}" ]; then +2026-06-21T01:26:27.9472989Z  echo CARGO_INCREMENTAL=0 >> $GITHUB_ENV +2026-06-21T01:26:27.9473373Z fi +2026-06-21T01:26:27.9494190Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:27.9494612Z env: +2026-06-21T01:26:27.9494864Z CARGO_TERM_COLOR: always +2026-06-21T01:26:27.9495143Z RUST_BACKTRACE: short +2026-06-21T01:26:27.9495648Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:27.9496493Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:26:27.9496807Z ##[endgroup] +2026-06-21T01:26:27.9567068Z ##[group]Run : enable colors in Cargo output +2026-06-21T01:26:27.9567476Z : enable colors in Cargo output +2026-06-21T01:26:27.9567836Z if [ -z "${CARGO_TERM_COLOR+set}" ]; then +2026-06-21T01:26:27.9568222Z  echo CARGO_TERM_COLOR=always >> $GITHUB_ENV +2026-06-21T01:26:27.9568567Z fi +2026-06-21T01:26:27.9588817Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:27.9589221Z env: +2026-06-21T01:26:27.9589467Z CARGO_TERM_COLOR: always +2026-06-21T01:26:27.9589759Z RUST_BACKTRACE: short +2026-06-21T01:26:27.9590265Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:27.9590814Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:26:27.9591130Z CARGO_INCREMENTAL: 0 +2026-06-21T01:26:27.9591386Z ##[endgroup] +2026-06-21T01:26:27.9660806Z ##[group]Run : enable Cargo sparse registry +2026-06-21T01:26:27.9661192Z : enable Cargo sparse registry +2026-06-21T01:26:27.9661594Z # implemented in 1.66, stabilized in 1.68, made default in 1.70 +2026-06-21T01:26:27.9662446Z if [ -z "${CARGO_REGISTRIES_CRATES_IO_PROTOCOL+set}" -o -f "/home/runner/work/_temp"/.implicit_cargo_registries_crates_io_protocol ]; then +2026-06-21T01:26:27.9663189Z  if rustc +stable --version --verbose | grep -q '^release: 1\.6[89]\.'; then +2026-06-21T01:26:27.9663785Z  touch "/home/runner/work/_temp"/.implicit_cargo_registries_crates_io_protocol || true +2026-06-21T01:26:27.9664365Z  echo CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse >> $GITHUB_ENV +2026-06-21T01:26:27.9664896Z  elif rustc +stable --version --verbose | grep -q '^release: 1\.6[67]\.'; then +2026-06-21T01:26:27.9665497Z  touch "/home/runner/work/_temp"/.implicit_cargo_registries_crates_io_protocol || true +2026-06-21T01:26:27.9666218Z  echo CARGO_REGISTRIES_CRATES_IO_PROTOCOL=git >> $GITHUB_ENV +2026-06-21T01:26:27.9666630Z  fi +2026-06-21T01:26:27.9666867Z fi +2026-06-21T01:26:27.9686452Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:27.9686856Z env: +2026-06-21T01:26:27.9687105Z CARGO_TERM_COLOR: always +2026-06-21T01:26:27.9687381Z RUST_BACKTRACE: short +2026-06-21T01:26:27.9687878Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:27.9688415Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:26:27.9688840Z CARGO_INCREMENTAL: 0 +2026-06-21T01:26:27.9689100Z ##[endgroup] +2026-06-21T01:26:27.9990887Z ##[group]Run : work around spurious network errors in curl 8.0 +2026-06-21T01:26:27.9991393Z : work around spurious network errors in curl 8.0 +2026-06-21T01:26:27.9992130Z # https://rust-lang.zulipchat.com/#narrow/stream/246057-t-cargo/topic/timeout.20investigation +2026-06-21T01:26:27.9992796Z if rustc +stable --version --verbose | grep -q '^release: 1\.7[01]\.'; then +2026-06-21T01:26:27.9993292Z  echo CARGO_HTTP_MULTIPLEXING=false >> $GITHUB_ENV +2026-06-21T01:26:27.9993664Z fi +2026-06-21T01:26:28.0016377Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:28.0016827Z env: +2026-06-21T01:26:28.0017093Z CARGO_TERM_COLOR: always +2026-06-21T01:26:28.0017379Z RUST_BACKTRACE: short +2026-06-21T01:26:28.0017893Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:28.0018450Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:26:28.0018741Z CARGO_INCREMENTAL: 0 +2026-06-21T01:26:28.0018996Z ##[endgroup] +2026-06-21T01:26:28.0204277Z ##[group]Run rustc +stable --version --verbose +2026-06-21T01:26:28.0204686Z rustc +stable --version --verbose +2026-06-21T01:26:28.0226305Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:26:28.0226709Z env: +2026-06-21T01:26:28.0226966Z CARGO_TERM_COLOR: always +2026-06-21T01:26:28.0227247Z RUST_BACKTRACE: short +2026-06-21T01:26:28.0227758Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:28.0228316Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:26:28.0228615Z CARGO_INCREMENTAL: 0 +2026-06-21T01:26:28.0228867Z ##[endgroup] +2026-06-21T01:26:28.0369470Z rustc 1.96.0 (ac68faa20 2026-05-25) +2026-06-21T01:26:28.0370444Z binary: rustc +2026-06-21T01:26:28.0371113Z commit-hash: ac68faa20c58cbccd01ee7208bf3b6e93a7d7f96 +2026-06-21T01:26:28.0371891Z commit-date: 2026-05-25 +2026-06-21T01:26:28.0372514Z host: x86_64-unknown-linux-gnu +2026-06-21T01:26:28.0373223Z release: 1.96.0 +2026-06-21T01:26:28.0377021Z LLVM version: 22.1.2 diff --git a/.ci_logs/WASM compile check/4_Cache cargo registry and target.txt b/.ci_logs/WASM compile check/4_Cache cargo registry and target.txt new file mode 100644 index 0000000..f8572ca --- /dev/null +++ b/.ci_logs/WASM compile check/4_Cache cargo registry and target.txt @@ -0,0 +1,66 @@ +2026-06-21T01:26:28.0524269Z ##[group]Run Swatinem/rust-cache@v2 +2026-06-21T01:26:28.0524619Z with: +2026-06-21T01:26:28.0524865Z cache-on-failure: true +2026-06-21T01:26:28.0525136Z prefix-key: v0-rust +2026-06-21T01:26:28.0525393Z add-job-id-key: true +2026-06-21T01:26:28.0525669Z add-rust-environment-hash-key: true +2026-06-21T01:26:28.0525977Z cache-targets: true +2026-06-21T01:26:28.0526515Z cache-all-crates: false +2026-06-21T01:26:28.0526797Z cache-workspace-crates: false +2026-06-21T01:26:28.0527085Z save-if: true +2026-06-21T01:26:28.0527331Z cache-provider: github +2026-06-21T01:26:28.0527591Z cache-bin: true +2026-06-21T01:26:28.0527829Z lookup-only: false +2026-06-21T01:26:28.0528079Z cmd-format: {0} +2026-06-21T01:26:28.0528313Z env: +2026-06-21T01:26:28.0528539Z CARGO_TERM_COLOR: always +2026-06-21T01:26:28.0528812Z RUST_BACKTRACE: short +2026-06-21T01:26:28.0529304Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:28.0529829Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:26:28.0530148Z CARGO_INCREMENTAL: 0 +2026-06-21T01:26:28.0530403Z ##[endgroup] +2026-06-21T01:26:28.3173075Z (node:2365) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead. +2026-06-21T01:26:28.3174364Z (Use `node --trace-deprecation ...` to show where the warning was created) +2026-06-21T01:26:31.2011595Z ##[group]Cache Configuration +2026-06-21T01:26:31.2012172Z Cache Provider: +2026-06-21T01:26:31.2012479Z github +2026-06-21T01:26:31.2012757Z Workspaces: +2026-06-21T01:26:31.2013179Z /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts +2026-06-21T01:26:31.2013734Z Cache Paths: +2026-06-21T01:26:31.2014064Z /home/runner/.cargo/bin +2026-06-21T01:26:31.2014444Z /home/runner/.cargo/.crates.toml +2026-06-21T01:26:31.2014857Z /home/runner/.cargo/.crates2.json +2026-06-21T01:26:31.2015300Z /home/runner/.cargo/registry +2026-06-21T01:26:31.2015707Z /home/runner/.cargo/git +2026-06-21T01:26:31.2016497Z /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/target +2026-06-21T01:26:31.2017494Z Restore Key: +2026-06-21T01:26:31.2017856Z v0-rust-wasm-check-Linux-x64-1f47b3b1 +2026-06-21T01:26:31.2018277Z Cache Key: +2026-06-21T01:26:31.2018503Z v0-rust-wasm-check-Linux-x64-1f47b3b1-8243978e +2026-06-21T01:26:31.2018784Z .. Prefix: +2026-06-21T01:26:31.2019000Z - v0-rust-wasm-check-Linux-x64 +2026-06-21T01:26:31.2019298Z .. Environment considered: +2026-06-21T01:26:31.2019597Z - Rust Versions: +2026-06-21T01:26:31.2020033Z - 1.96.0 x86_64-unknown-linux-gnu ac68faa20c58cbccd01ee7208bf3b6e93a7d7f96 +2026-06-21T01:26:31.2020649Z - 1.96.0 x86_64-unknown-linux-gnu ac68faa20c58cbccd01ee7208bf3b6e93a7d7f96 +2026-06-21T01:26:31.2020997Z - CARGO_HOME +2026-06-21T01:26:31.2021183Z - CARGO_INCREMENTAL +2026-06-21T01:26:31.2021383Z - CARGO_TERM_COLOR +2026-06-21T01:26:31.2021577Z - RUST_BACKTRACE +2026-06-21T01:26:31.2021774Z .. Lockfiles considered: +2026-06-21T01:26:31.2022131Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/.cargo/config.toml +2026-06-21T01:26:31.2022668Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/Cargo.toml +2026-06-21T01:26:31.2023193Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/common/Cargo.toml +2026-06-21T01:26:31.2023751Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/contracts/core/Cargo.toml +2026-06-21T01:26:31.2024629Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/Cargo.toml +2026-06-21T01:26:31.2025248Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/rust-toolchain.toml +2026-06-21T01:26:31.2025773Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/token-bridge/Cargo.toml +2026-06-21T01:26:31.2026645Z ##[endgroup] +2026-06-21T01:26:31.2026754Z +2026-06-21T01:26:31.2026857Z ... Restoring cache ... +2026-06-21T01:26:31.3741126Z Cache hit for: v0-rust-wasm-check-Linux-x64-1f47b3b1-8243978e +2026-06-21T01:26:32.6120466Z Received 39797766 of 39797766 (100.0%), 37.6 MBs/sec +2026-06-21T01:26:32.6121345Z Cache Size: ~38 MB (39797766 B) +2026-06-21T01:26:32.6143877Z [command]/usr/bin/tar -xf /home/runner/work/_temp/8d99bb99-1c5d-4bc4-a2e4-19fc890f6d01/cache.tzst -P -C /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts --use-compress-program unzstd +2026-06-21T01:26:32.7872088Z Cache restored successfully +2026-06-21T01:26:32.7888748Z Restored from cache key "v0-rust-wasm-check-Linux-x64-1f47b3b1-8243978e" full match: true. diff --git a/.ci_logs/WASM compile check/5_cargo check --target wasm32v1-none (contracts).txt b/.ci_logs/WASM compile check/5_cargo check --target wasm32v1-none (contracts).txt new file mode 100644 index 0000000..8a187e9 --- /dev/null +++ b/.ci_logs/WASM compile check/5_cargo check --target wasm32v1-none (contracts).txt @@ -0,0 +1,94 @@ +2026-06-21T01:26:32.7975700Z ##[group]Run cargo check -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge --target wasm32v1-none +2026-06-21T01:26:32.7977270Z cargo check -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge --target wasm32v1-none +2026-06-21T01:26:32.7997166Z shell: /usr/bin/bash -e {0} +2026-06-21T01:26:32.7997424Z env: +2026-06-21T01:26:32.7997621Z CARGO_TERM_COLOR: always +2026-06-21T01:26:32.7997852Z RUST_BACKTRACE: short +2026-06-21T01:26:32.7998299Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:26:32.7998780Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:26:32.7999037Z CARGO_INCREMENTAL: 0 +2026-06-21T01:26:32.7999248Z CACHE_ON_FAILURE: true +2026-06-21T01:26:32.7999461Z ##[endgroup] +2026-06-21T01:26:33.0708437Z  Updating crates.io index +2026-06-21T01:26:34.7289899Z  Locking 212 packages to latest compatible versions +2026-06-21T01:26:34.7325874Z  Adding arbitrary v1.3.2 (available: v1.4.2) +2026-06-21T01:26:34.7418851Z  Adding crypto-common v0.1.6 (available: v0.1.7) +2026-06-21T01:26:34.7481947Z  Adding derive_arbitrary v1.3.2 (available: v1.4.2) +2026-06-21T01:26:34.7752683Z  Adding rand v0.8.6 (available: v0.10.1) +2026-06-21T01:26:34.7845783Z  Adding sha2 v0.10.9 (available: v0.11.0) +2026-06-21T01:26:34.8168433Z  Adding toml v0.8.23 (available: v1.1.2+spec-1.1.0) +2026-06-21T01:26:35.2305350Z  Compiling syn v2.0.118 +2026-06-21T01:26:35.2308093Z  Compiling serde_json v1.0.150 +2026-06-21T01:26:35.2336805Z  Compiling block-buffer v0.10.4 +2026-06-21T01:26:35.2337690Z  Compiling crypto-common v0.1.6 +2026-06-21T01:26:35.4615948Z  Compiling digest v0.10.7 +2026-06-21T01:26:35.4617377Z  Compiling cpufeatures v0.2.17 +2026-06-21T01:26:35.4927323Z  Compiling data-encoding v2.11.0 +2026-06-21T01:26:35.5902173Z  Compiling cfg-if v1.0.4 +2026-06-21T01:26:35.6140491Z  Compiling sha2 v0.10.9 +2026-06-21T01:26:36.1398216Z  Compiling ethnum v1.5.3 +2026-06-21T01:26:36.3848989Z  Compiling escape-bytes v0.1.1 +2026-06-21T01:26:36.4537427Z  Compiling num-traits v0.2.19 +2026-06-21T01:26:36.4587121Z  Compiling semver v1.0.28 +2026-06-21T01:26:36.7272614Z  Compiling either v1.16.0 +2026-06-21T01:26:36.8497441Z  Compiling equivalent v1.0.2 +2026-06-21T01:26:36.8803404Z  Compiling itertools v0.13.0 +2026-06-21T01:26:36.8849720Z  Compiling thiserror v1.0.69 +2026-06-21T01:26:37.0988657Z  Compiling hashbrown v0.17.1 +2026-06-21T01:26:37.5329789Z  Compiling indexmap v2.14.0 +2026-06-21T01:26:37.6380364Z  Compiling fnv v1.0.7 +2026-06-21T01:26:37.6857905Z  Compiling prettyplease v0.2.37 +2026-06-21T01:26:37.7777769Z  Compiling darling_core v0.23.0 +2026-06-21T01:26:38.2031470Z  Compiling wasmparser v0.116.1 +2026-06-21T01:26:38.2065201Z  Compiling darling_core v0.20.11 +2026-06-21T01:26:40.4108448Z  Compiling serde_derive v1.0.228 +2026-06-21T01:26:41.3758022Z  Compiling cfg_eval v0.1.2 +2026-06-21T01:26:41.5087373Z  Compiling darling_macro v0.23.0 +2026-06-21T01:26:41.7237413Z  Compiling num-derive v0.4.2 +2026-06-21T01:26:41.7817501Z  Compiling darling v0.23.0 +2026-06-21T01:26:41.8131882Z  Compiling serde_with_macros v3.21.0 +2026-06-21T01:26:42.6252364Z  Compiling thiserror-impl v1.0.69 +2026-06-21T01:26:43.3487478Z  Compiling heapless v0.8.0 +2026-06-21T01:26:43.5323347Z  Checking byteorder v1.5.0 +2026-06-21T01:26:43.6397756Z  Compiling base64 v0.22.1 +2026-06-21T01:26:43.9037450Z  Checking hash32 v0.3.1 +2026-06-21T01:26:44.0447714Z  Compiling serde v1.0.228 +2026-06-21T01:26:44.3071568Z  Compiling darling_macro v0.20.11 +2026-06-21T01:26:44.6017504Z  Compiling crate-git-revision v0.0.6 +2026-06-21T01:26:44.6526935Z  Compiling schemars v0.8.22 +2026-06-21T01:26:44.7879807Z  Compiling hex v0.4.3 +2026-06-21T01:26:44.8097971Z  Compiling stellar-strkey v0.0.13 +2026-06-21T01:26:44.9137508Z  Compiling stellar-xdr v26.0.1 +2026-06-21T01:26:45.0167443Z  Compiling soroban-env-common v26.1.3 +2026-06-21T01:26:45.2588117Z  Compiling stellar-strkey v0.0.16 +2026-06-21T01:26:45.3667946Z  Compiling num-integer v0.1.46 +2026-06-21T01:26:45.7007415Z  Compiling serde_with v3.21.0 +2026-06-21T01:26:45.7277394Z  Compiling rustc_version v0.4.1 +2026-06-21T01:26:46.0427502Z  Compiling static_assertions v1.1.0 +2026-06-21T01:26:46.0987215Z  Checking stable_deref_trait v1.2.1 +2026-06-21T01:26:46.5956907Z  Compiling soroban-sdk v26.1.0 +2026-06-21T01:26:46.6587742Z  Compiling num-bigint v0.4.6 +2026-06-21T01:26:46.7315366Z  Compiling darling v0.20.11 +2026-06-21T01:26:46.7628172Z  Compiling macro-string v0.1.4 +2026-06-21T01:26:47.0339313Z  Compiling heck v0.5.0 +2026-06-21T01:26:47.5647459Z  Compiling visibility v0.1.1 +2026-06-21T01:26:47.9872562Z  Compiling bytes-lit v0.0.5 +2026-06-21T01:26:59.5794362Z  Compiling soroban-spec v26.1.0 +2026-06-21T01:26:59.6746758Z  Compiling soroban-spec-rust v26.1.0 +2026-06-21T01:27:00.5252682Z  Compiling soroban-env-macros v26.1.3 +2026-06-21T01:27:02.4908202Z  Checking soroban-env-guest v26.1.3 +2026-06-21T01:27:02.6756737Z  Compiling soroban-sdk-macros v26.1.0 +2026-06-21T01:27:04.8428427Z  Checking orbitchain-common v0.1.0 (/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/common) +2026-06-21T01:27:04.8430377Z  Checking orbitchain-core v0.1.0 (/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/contracts/core) +2026-06-21T01:27:04.8934794Z  Checking orbitchain-campaign v0.1.0 (/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign) +2026-06-21T01:27:04.8936732Z  Checking orbitchain-token-bridge v0.1.0 (/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/token-bridge) +2026-06-21T01:27:05.0619165Z warning: unused import: `Address` +2026-06-21T01:27:05.0619911Z --> campaign/src/contract.rs:6:37 +2026-06-21T01:27:05.0620467Z | +2026-06-21T01:27:05.0626963Z 6 | use soroban_sdk::{panic_with_error, Address, Env}; +2026-06-21T01:27:05.0627797Z | ^^^^^^^ +2026-06-21T01:27:05.0628371Z | +2026-06-21T01:27:05.0629081Z = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default +2026-06-21T01:27:05.0629645Z +2026-06-21T01:27:05.2954320Z warning: `orbitchain-campaign` (lib) generated 1 warning (run `cargo fix --lib -p orbitchain-campaign` to apply 1 suggestion) +2026-06-21T01:27:05.2955580Z  Finished `dev` profile [unoptimized + debuginfo] target(s) in 32.47s diff --git a/.ci_logs/WASM compile check/9_Post Cache cargo registry and target.txt b/.ci_logs/WASM compile check/9_Post Cache cargo registry and target.txt new file mode 100644 index 0000000..3674e0f --- /dev/null +++ b/.ci_logs/WASM compile check/9_Post Cache cargo registry and target.txt @@ -0,0 +1,4 @@ +2026-06-21T01:27:05.3454376Z Post job cleanup. +2026-06-21T01:27:05.6081253Z Cache up-to-date. +2026-06-21T01:27:05.6084132Z (node:3509) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead. +2026-06-21T01:27:05.6084806Z (Use `node --trace-deprecation ...` to show where the warning was created) diff --git a/.ci_logs/WASM compile check/system.txt b/.ci_logs/WASM compile check/system.txt new file mode 100644 index 0000000..6f5b4e1 --- /dev/null +++ b/.ci_logs/WASM compile check/system.txt @@ -0,0 +1,8 @@ +2026-06-21T01:26:21.5360000Z Job is about to start running on the hosted runner: GitHub Actions 1000000145 +2026-06-21T01:26:21.5330000Z Evaluating wasm-check.if +2026-06-21T01:26:21.5330000Z Evaluating: success() +2026-06-21T01:26:21.5330000Z Result: true +2026-06-21T01:26:21.5360000Z Job is waiting for a hosted runner to come online. +2026-06-21T01:26:21.5340000Z Requested labels: ubuntu-latest +2026-06-21T01:26:21.5340000Z Job defined at: OrbitChainLabs/OrbitChain-Contracts/.github/workflows/ci.yml@refs/pull/60/merge +2026-06-21T01:26:21.5340000Z Waiting for a runner to pick up this job... \ No newline at end of file diff --git a/.ci_logs2/0_Tests (host target).txt b/.ci_logs2/0_Tests (host target).txt new file mode 100644 index 0000000..8c8bb96 --- /dev/null +++ b/.ci_logs2/0_Tests (host target).txt @@ -0,0 +1,787 @@ +2026-06-21T01:29:24.2391115Z Current runner version: '2.335.1' +2026-06-21T01:29:24.2417029Z ##[group]Runner Image Provisioner +2026-06-21T01:29:24.2417981Z Hosted Compute Agent +2026-06-21T01:29:24.2418571Z Version: 20260611.554 +2026-06-21T01:29:24.2419192Z Commit: 5e0782fdc9014723d3be820dd114dd31555c2bd1 +2026-06-21T01:29:24.2420035Z Build Date: 2026-06-11T21:40:46Z +2026-06-21T01:29:24.2420750Z Worker ID: {4a610412-766d-40b5-928e-de692c0d6a4e} +2026-06-21T01:29:24.2421490Z Azure Region: westus +2026-06-21T01:29:24.2422082Z ##[endgroup] +2026-06-21T01:29:24.2423513Z ##[group]Operating System +2026-06-21T01:29:24.2424672Z Ubuntu +2026-06-21T01:29:24.2425212Z 24.04.4 +2026-06-21T01:29:24.2425755Z LTS +2026-06-21T01:29:24.2426296Z ##[endgroup] +2026-06-21T01:29:24.2426891Z ##[group]Runner Image +2026-06-21T01:29:24.2427541Z Image: ubuntu-24.04 +2026-06-21T01:29:24.2428118Z Version: 20260615.205.1 +2026-06-21T01:29:24.2429440Z Included Software: https://github.com/actions/runner-images/blob/ubuntu24/20260615.205/images/ubuntu/Ubuntu2404-Readme.md +2026-06-21T01:29:24.2431017Z Image Release: https://github.com/actions/runner-images/releases/tag/ubuntu24%2F20260615.205 +2026-06-21T01:29:24.2432044Z ##[endgroup] +2026-06-21T01:29:24.2433121Z ##[group]GITHUB_TOKEN Permissions +2026-06-21T01:29:24.2435477Z Contents: read +2026-06-21T01:29:24.2436095Z Metadata: read +2026-06-21T01:29:24.2436696Z ##[endgroup] +2026-06-21T01:29:24.2438996Z Secret source: Actions +2026-06-21T01:29:24.2439773Z Prepare workflow directory +2026-06-21T01:29:24.2907905Z Prepare all required actions +2026-06-21T01:29:24.2947109Z Getting action download info +2026-06-21T01:29:24.6743664Z Download action repository 'actions/checkout@v4' (SHA:34e114876b0b11c390a56381ad16ebd13914f8d5) +2026-06-21T01:29:24.7669797Z Download action repository 'dtolnay/rust-toolchain@stable' (SHA:29eef336d9b2848a0b548edc03f92a220660cdb8) +2026-06-21T01:29:24.9757934Z Download action repository 'Swatinem/rust-cache@v2' (SHA:e18b497796c12c097a38f9edb9d0641fb99eee32) +2026-06-21T01:29:25.7002599Z Complete job name: Tests (host target) +2026-06-21T01:29:25.7800987Z Node 20 is being deprecated. This workflow is running with Node 24 by default. If you need to temporarily use Node 20, you can set the ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true environment variable. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/ +2026-06-21T01:29:25.7810428Z ##[group]Run actions/checkout@v4 +2026-06-21T01:29:25.7811290Z with: +2026-06-21T01:29:25.7811904Z repository: OrbitChainLabs/OrbitChain-Contracts +2026-06-21T01:29:25.7817151Z token: *** +2026-06-21T01:29:25.7817649Z ssh-strict: true +2026-06-21T01:29:25.7818145Z ssh-user: git +2026-06-21T01:29:25.7818655Z persist-credentials: true +2026-06-21T01:29:25.7819198Z clean: true +2026-06-21T01:29:25.7819685Z sparse-checkout-cone-mode: true +2026-06-21T01:29:25.7820258Z fetch-depth: 1 +2026-06-21T01:29:25.7820747Z fetch-tags: false +2026-06-21T01:29:25.7821281Z show-progress: true +2026-06-21T01:29:25.7821796Z lfs: false +2026-06-21T01:29:25.7822343Z submodules: false +2026-06-21T01:29:25.7822848Z set-safe-directory: true +2026-06-21T01:29:25.7823688Z env: +2026-06-21T01:29:25.7824338Z CARGO_TERM_COLOR: always +2026-06-21T01:29:25.7824893Z RUST_BACKTRACE: short +2026-06-21T01:29:25.7825848Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:25.7826858Z ##[endgroup] +2026-06-21T01:29:25.8871955Z Syncing repository: OrbitChainLabs/OrbitChain-Contracts +2026-06-21T01:29:25.8874394Z ##[group]Getting Git version info +2026-06-21T01:29:25.8875362Z Working directory is '/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts' +2026-06-21T01:29:25.8876732Z [command]/usr/bin/git version +2026-06-21T01:29:25.8934242Z git version 2.54.0 +2026-06-21T01:29:25.8989542Z ##[endgroup] +2026-06-21T01:29:25.9005805Z Temporarily overriding HOME='/home/runner/work/_temp/8d4943c8-8eb5-46dd-8d8c-0a112648f896' before making global git config changes +2026-06-21T01:29:25.9007401Z Adding repository directory to the temporary git global config as a safe directory +2026-06-21T01:29:25.9012344Z [command]/usr/bin/git config --global --add safe.directory /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts +2026-06-21T01:29:25.9065137Z Deleting the contents of '/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts' +2026-06-21T01:29:25.9069462Z ##[group]Initializing the repository +2026-06-21T01:29:25.9075106Z [command]/usr/bin/git init /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts +2026-06-21T01:29:25.9189681Z hint: Using 'master' as the name for the initial branch. This default branch name +2026-06-21T01:29:25.9191278Z hint: will change to "main" in Git 3.0. To configure the initial branch name +2026-06-21T01:29:25.9193075Z hint: to use in all of your new repositories, which will suppress this warning, +2026-06-21T01:29:25.9195038Z hint: call: +2026-06-21T01:29:25.9195911Z hint: +2026-06-21T01:29:25.9196927Z hint: git config --global init.defaultBranch +2026-06-21T01:29:25.9198279Z hint: +2026-06-21T01:29:25.9199583Z hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and +2026-06-21T01:29:25.9201577Z hint: 'development'. The just-created branch can be renamed via this command: +2026-06-21T01:29:25.9203167Z hint: +2026-06-21T01:29:25.9204313Z hint: git branch -m +2026-06-21T01:29:25.9205368Z hint: +2026-06-21T01:29:25.9206639Z hint: Disable this message with "git config set advice.defaultBranchName false" +2026-06-21T01:29:25.9208899Z Initialized empty Git repository in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/.git/ +2026-06-21T01:29:25.9213124Z [command]/usr/bin/git remote add origin https://github.com/OrbitChainLabs/OrbitChain-Contracts +2026-06-21T01:29:25.9258344Z ##[endgroup] +2026-06-21T01:29:25.9259836Z ##[group]Disabling automatic garbage collection +2026-06-21T01:29:25.9263230Z [command]/usr/bin/git config --local gc.auto 0 +2026-06-21T01:29:25.9294419Z ##[endgroup] +2026-06-21T01:29:25.9295975Z ##[group]Setting up auth +2026-06-21T01:29:25.9302658Z [command]/usr/bin/git config --local --name-only --get-regexp core\.sshCommand +2026-06-21T01:29:25.9350700Z [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || :" +2026-06-21T01:29:25.9712374Z [command]/usr/bin/git config --local --name-only --get-regexp http\.https\:\/\/github\.com\/\.extraheader +2026-06-21T01:29:25.9744837Z [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http\.https\:\/\/github\.com\/\.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :" +2026-06-21T01:29:25.9967466Z [command]/usr/bin/git config --local --name-only --get-regexp ^includeIf\.gitdir: +2026-06-21T01:29:26.0002047Z [command]/usr/bin/git submodule foreach --recursive git config --local --show-origin --name-only --get-regexp remote.origin.url +2026-06-21T01:29:26.0232514Z [command]/usr/bin/git config --local http.https://github.com/.extraheader AUTHORIZATION: basic *** +2026-06-21T01:29:26.0268600Z ##[endgroup] +2026-06-21T01:29:26.0278177Z ##[group]Fetching the repository +2026-06-21T01:29:26.0279704Z [command]/usr/bin/git -c protocol.version=2 fetch --no-tags --prune --no-recurse-submodules --depth=1 origin +59f3fe99e87bd5e1e546c9babe13e09825b65536:refs/remotes/pull/60/merge +2026-06-21T01:29:26.5216799Z From https://github.com/OrbitChainLabs/OrbitChain-Contracts +2026-06-21T01:29:26.5217965Z * [new ref] 59f3fe99e87bd5e1e546c9babe13e09825b65536 -> pull/60/merge +2026-06-21T01:29:26.5253661Z ##[endgroup] +2026-06-21T01:29:26.5255674Z ##[group]Determining the checkout info +2026-06-21T01:29:26.5257591Z ##[endgroup] +2026-06-21T01:29:26.5263614Z [command]/usr/bin/git sparse-checkout disable +2026-06-21T01:29:26.5311617Z [command]/usr/bin/git config --local --unset-all extensions.worktreeConfig +2026-06-21T01:29:26.5349966Z ##[group]Checking out the ref +2026-06-21T01:29:26.5354103Z [command]/usr/bin/git checkout --progress --force refs/remotes/pull/60/merge +2026-06-21T01:29:26.5514440Z Note: switching to 'refs/remotes/pull/60/merge'. +2026-06-21T01:29:26.5515950Z +2026-06-21T01:29:26.5517049Z You are in 'detached HEAD' state. You can look around, make experimental +2026-06-21T01:29:26.5519593Z changes and commit them, and you can discard any commits you make in this +2026-06-21T01:29:26.5522101Z state without impacting any branches by switching back to a branch. +2026-06-21T01:29:26.5523688Z +2026-06-21T01:29:26.5524995Z If you want to create a new branch to retain commits you create, you may +2026-06-21T01:29:26.5527355Z do so (now or later) by using -c with the switch command. Example: +2026-06-21T01:29:26.5528798Z +2026-06-21T01:29:26.5529456Z git switch -c +2026-06-21T01:29:26.5530464Z +2026-06-21T01:29:26.5530996Z Or undo this operation with: +2026-06-21T01:29:26.5531720Z +2026-06-21T01:29:26.5532247Z git switch - +2026-06-21T01:29:26.5533113Z +2026-06-21T01:29:26.5534348Z Turn off this advice by setting config variable advice.detachedHead to false +2026-06-21T01:29:26.5535670Z +2026-06-21T01:29:26.5537043Z HEAD is now at 59f3fe9 Merge 9e85affabcadb1e696b876ca7eae8bad3de3c85d into dc3d5e2b821bb2a0f2655582265c562926415b02 +2026-06-21T01:29:26.5541249Z ##[endgroup] +2026-06-21T01:29:26.5570744Z [command]/usr/bin/git log -1 --format=%H +2026-06-21T01:29:26.5605893Z 59f3fe99e87bd5e1e546c9babe13e09825b65536 +2026-06-21T01:29:26.6076680Z ##[warning]Unexpected input(s) 'cache', valid inputs are ['toolchain', 'targets', 'target', 'components'] +2026-06-21T01:29:26.6096123Z ##[group]Run dtolnay/rust-toolchain@stable +2026-06-21T01:29:26.6096764Z with: +2026-06-21T01:29:26.6097211Z cache: false +2026-06-21T01:29:26.6097692Z toolchain: stable +2026-06-21T01:29:26.6098175Z env: +2026-06-21T01:29:26.6098612Z CARGO_TERM_COLOR: always +2026-06-21T01:29:26.6099152Z RUST_BACKTRACE: short +2026-06-21T01:29:26.6100095Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:26.6101106Z ##[endgroup] +2026-06-21T01:29:26.6242395Z ##[group]Run : parse toolchain version +2026-06-21T01:29:26.6243154Z : parse toolchain version +2026-06-21T01:29:26.6243973Z if [[ -z $toolchain ]]; then +2026-06-21T01:29:26.6245005Z  # GitHub does not enforce `required: true` inputs itself. https://github.com/actions/runner/issues/1070 +2026-06-21T01:29:26.6246170Z  echo "'toolchain' is a required input" >&2 +2026-06-21T01:29:26.6246818Z  exit 1 +2026-06-21T01:29:26.6247523Z elif [[ $toolchain =~ ^stable' '[0-9]+' '(year|month|week|day)s?' 'ago$ ]]; then +2026-06-21T01:29:26.6248374Z  if [[ Linux == macOS ]]; then +2026-06-21T01:29:26.6249418Z  echo "toolchain=1.$((($(date -v-$(sed 's/stable \([0-9]*\) \(.\).*/\1\2/' <<< $toolchain) +%s)/60/60/24-16569)/7/6))" >> $GITHUB_OUTPUT +2026-06-21T01:29:26.6250440Z  else +2026-06-21T01:29:26.6251303Z  echo "toolchain=1.$((($(date --date "${toolchain#stable }" +%s)/60/60/24-16569)/7/6))" >> $GITHUB_OUTPUT +2026-06-21T01:29:26.6252245Z  fi +2026-06-21T01:29:26.6252897Z elif [[ $toolchain =~ ^stable' 'minus' '[0-9]+' 'releases?$ ]]; then +2026-06-21T01:29:26.6254188Z  echo "toolchain=1.$((($(date +%s)/60/60/24-16569)/7/6-${toolchain//[^0-9]/}))" >> $GITHUB_OUTPUT +2026-06-21T01:29:26.6255169Z elif [[ $toolchain =~ ^1\.[0-9]+$ ]]; then +2026-06-21T01:29:26.6256234Z  echo "toolchain=1.$((i=${toolchain#1.}, c=($(date +%s)/60/60/24-16569)/7/6, i+9*i*(10*i<=c)+90*i*(100*i<=c)))" >> $GITHUB_OUTPUT +2026-06-21T01:29:26.6257225Z else +2026-06-21T01:29:26.6257780Z  echo "toolchain=$toolchain" >> $GITHUB_OUTPUT +2026-06-21T01:29:26.6258435Z fi +2026-06-21T01:29:26.6479076Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:26.6480582Z env: +2026-06-21T01:29:26.6481444Z CARGO_TERM_COLOR: always +2026-06-21T01:29:26.6482525Z RUST_BACKTRACE: short +2026-06-21T01:29:26.6485007Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:26.6487031Z toolchain: stable +2026-06-21T01:29:26.6487977Z ##[endgroup] +2026-06-21T01:29:26.6676727Z ##[group]Run : construct rustup command line +2026-06-21T01:29:26.6677461Z : construct rustup command line +2026-06-21T01:29:26.6678402Z echo "targets=$(for t in ${targets//,/ }; do echo -n ' --target' $t; done)" >> $GITHUB_OUTPUT +2026-06-21T01:29:26.6679653Z echo "components=$(for c in ${components//,/ }; do echo -n ' --component' $c; done)" >> $GITHUB_OUTPUT +2026-06-21T01:29:26.6680660Z echo "downgrade=" >> $GITHUB_OUTPUT +2026-06-21T01:29:26.6712439Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:26.6713161Z env: +2026-06-21T01:29:26.6713623Z CARGO_TERM_COLOR: always +2026-06-21T01:29:26.6714445Z RUST_BACKTRACE: short +2026-06-21T01:29:26.6715409Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:26.6716443Z targets: +2026-06-21T01:29:26.6716906Z components: +2026-06-21T01:29:26.6717374Z ##[endgroup] +2026-06-21T01:29:26.6822243Z ##[group]Run : set $CARGO_HOME +2026-06-21T01:29:26.6822843Z : set $CARGO_HOME +2026-06-21T01:29:26.6823547Z echo CARGO_HOME=${CARGO_HOME:-"$HOME/.cargo"} >> $GITHUB_ENV +2026-06-21T01:29:26.6854837Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:26.6855586Z env: +2026-06-21T01:29:26.6856038Z CARGO_TERM_COLOR: always +2026-06-21T01:29:26.6856574Z RUST_BACKTRACE: short +2026-06-21T01:29:26.6857490Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:26.6858499Z ##[endgroup] +2026-06-21T01:29:26.6971673Z ##[group]Run : install rustup if needed +2026-06-21T01:29:26.6972344Z : install rustup if needed +2026-06-21T01:29:26.6972998Z if ! command -v rustup &>/dev/null; then +2026-06-21T01:29:26.6974776Z  curl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused --location --silent --show-error --fail https://sh.rustup.rs | sh -s -- --default-toolchain none -y +2026-06-21T01:29:26.6976235Z  echo "$CARGO_HOME/bin" >> $GITHUB_PATH +2026-06-21T01:29:26.6976869Z fi +2026-06-21T01:29:26.7006750Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:26.7007561Z env: +2026-06-21T01:29:26.7008026Z CARGO_TERM_COLOR: always +2026-06-21T01:29:26.7008557Z RUST_BACKTRACE: short +2026-06-21T01:29:26.7009473Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:26.7010486Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:29:26.7011040Z ##[endgroup] +2026-06-21T01:29:26.7122497Z ##[group]Run rustup toolchain install stable --profile minimal --no-self-update +2026-06-21T01:29:26.7123627Z rustup toolchain install stable --profile minimal --no-self-update +2026-06-21T01:29:26.7156683Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:26.7157405Z env: +2026-06-21T01:29:26.7157865Z CARGO_TERM_COLOR: always +2026-06-21T01:29:26.7158394Z RUST_BACKTRACE: short +2026-06-21T01:29:26.7159305Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:26.7160330Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:29:26.7160918Z RUSTUP_PERMIT_COPY_RENAME: 1 +2026-06-21T01:29:26.7161456Z ##[endgroup] +2026-06-21T01:29:26.9050991Z info: syncing channel updates for stable-x86_64-unknown-linux-gnu +2026-06-21T01:29:26.9879930Z +2026-06-21T01:29:26.9964268Z stable-x86_64-unknown-linux-gnu unchanged - rustc 1.96.0 (ac68faa20 2026-05-25) +2026-06-21T01:29:26.9965136Z +2026-06-21T01:29:27.0030682Z ##[group]Run rustup default stable +2026-06-21T01:29:27.0031319Z rustup default stable +2026-06-21T01:29:27.0064551Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:27.0065289Z env: +2026-06-21T01:29:27.0065976Z CARGO_TERM_COLOR: always +2026-06-21T01:29:27.0066518Z RUST_BACKTRACE: short +2026-06-21T01:29:27.0067450Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:27.0068470Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:29:27.0069031Z ##[endgroup] +2026-06-21T01:29:27.0182613Z info: using existing install for stable-x86_64-unknown-linux-gnu +2026-06-21T01:29:27.0188905Z info: default toolchain set to stable-x86_64-unknown-linux-gnu +2026-06-21T01:29:27.0189823Z +2026-06-21T01:29:27.0277736Z stable-x86_64-unknown-linux-gnu unchanged - rustc 1.96.0 (ac68faa20 2026-05-25) +2026-06-21T01:29:27.0279031Z +2026-06-21T01:29:27.0281286Z info: note that the toolchain 'stable-x86_64-unknown-linux-gnu' is currently in use (overridden by '/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/rust-toolchain.toml') +2026-06-21T01:29:27.0433387Z ##[group]Run : create cachekey +2026-06-21T01:29:27.0434304Z : create cachekey +2026-06-21T01:29:27.0435283Z DATE=$(rustc +stable --version --verbose | sed -ne 's/^commit-date: \(20[0-9][0-9]\)-\([01][0-9]\)-\([0-3][0-9]\)$/\1\2\3/p') +2026-06-21T01:29:27.0436471Z HASH=$(rustc +stable --version --verbose | sed -ne 's/^commit-hash: //p') +2026-06-21T01:29:27.0437394Z echo "cachekey=$(echo $DATE$HASH | head -c12)" >> $GITHUB_OUTPUT +2026-06-21T01:29:27.0501396Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:27.0502084Z env: +2026-06-21T01:29:27.0502502Z CARGO_TERM_COLOR: always +2026-06-21T01:29:27.0502990Z RUST_BACKTRACE: short +2026-06-21T01:29:27.0504195Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:27.0505195Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:29:27.0505743Z ##[endgroup] +2026-06-21T01:29:27.0933481Z ##[group]Run : disable incremental compilation +2026-06-21T01:29:27.0934529Z : disable incremental compilation +2026-06-21T01:29:27.0935219Z if [ -z "${CARGO_INCREMENTAL+set}" ]; then +2026-06-21T01:29:27.0935876Z  echo CARGO_INCREMENTAL=0 >> $GITHUB_ENV +2026-06-21T01:29:27.0936459Z fi +2026-06-21T01:29:27.0968933Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:27.0969601Z env: +2026-06-21T01:29:27.0970013Z CARGO_TERM_COLOR: always +2026-06-21T01:29:27.0970514Z RUST_BACKTRACE: short +2026-06-21T01:29:27.0971377Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:27.0972322Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:29:27.0972834Z ##[endgroup] +2026-06-21T01:29:27.1069356Z ##[group]Run : enable colors in Cargo output +2026-06-21T01:29:27.1070001Z : enable colors in Cargo output +2026-06-21T01:29:27.1070643Z if [ -z "${CARGO_TERM_COLOR+set}" ]; then +2026-06-21T01:29:27.1071325Z  echo CARGO_TERM_COLOR=always >> $GITHUB_ENV +2026-06-21T01:29:27.1071925Z fi +2026-06-21T01:29:27.1104082Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:27.1104759Z env: +2026-06-21T01:29:27.1105196Z CARGO_TERM_COLOR: always +2026-06-21T01:29:27.1105693Z RUST_BACKTRACE: short +2026-06-21T01:29:27.1106558Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:27.1107524Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:29:27.1108058Z CARGO_INCREMENTAL: 0 +2026-06-21T01:29:27.1108499Z ##[endgroup] +2026-06-21T01:29:27.1202478Z ##[group]Run : enable Cargo sparse registry +2026-06-21T01:29:27.1203121Z : enable Cargo sparse registry +2026-06-21T01:29:27.1204164Z # implemented in 1.66, stabilized in 1.68, made default in 1.70 +2026-06-21T01:29:27.1205513Z if [ -z "${CARGO_REGISTRIES_CRATES_IO_PROTOCOL+set}" -o -f "/home/runner/work/_temp"/.implicit_cargo_registries_crates_io_protocol ]; then +2026-06-21T01:29:27.1206847Z  if rustc +stable --version --verbose | grep -q '^release: 1\.6[89]\.'; then +2026-06-21T01:29:27.1208099Z  touch "/home/runner/work/_temp"/.implicit_cargo_registries_crates_io_protocol || true +2026-06-21T01:29:27.1209136Z  echo CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse >> $GITHUB_ENV +2026-06-21T01:29:27.1210091Z  elif rustc +stable --version --verbose | grep -q '^release: 1\.6[67]\.'; then +2026-06-21T01:29:27.1211169Z  touch "/home/runner/work/_temp"/.implicit_cargo_registries_crates_io_protocol || true +2026-06-21T01:29:27.1212163Z  echo CARGO_REGISTRIES_CRATES_IO_PROTOCOL=git >> $GITHUB_ENV +2026-06-21T01:29:27.1212846Z  fi +2026-06-21T01:29:27.1213256Z fi +2026-06-21T01:29:27.1244384Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:27.1245057Z env: +2026-06-21T01:29:27.1245466Z CARGO_TERM_COLOR: always +2026-06-21T01:29:27.1245949Z RUST_BACKTRACE: short +2026-06-21T01:29:27.1246804Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:27.1247765Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:29:27.1248283Z CARGO_INCREMENTAL: 0 +2026-06-21T01:29:27.1248736Z ##[endgroup] +2026-06-21T01:29:27.1633721Z ##[group]Run : work around spurious network errors in curl 8.0 +2026-06-21T01:29:27.1634923Z : work around spurious network errors in curl 8.0 +2026-06-21T01:29:27.1636116Z # https://rust-lang.zulipchat.com/#narrow/stream/246057-t-cargo/topic/timeout.20investigation +2026-06-21T01:29:27.1637253Z if rustc +stable --version --verbose | grep -q '^release: 1\.7[01]\.'; then +2026-06-21T01:29:27.1638131Z  echo CARGO_HTTP_MULTIPLEXING=false >> $GITHUB_ENV +2026-06-21T01:29:27.1638764Z fi +2026-06-21T01:29:27.1670878Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:27.1671546Z env: +2026-06-21T01:29:27.1671955Z CARGO_TERM_COLOR: always +2026-06-21T01:29:27.1672453Z RUST_BACKTRACE: short +2026-06-21T01:29:27.1673325Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:27.1674582Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:29:27.1675101Z CARGO_INCREMENTAL: 0 +2026-06-21T01:29:27.1675549Z ##[endgroup] +2026-06-21T01:29:27.1917568Z ##[group]Run rustc +stable --version --verbose +2026-06-21T01:29:27.1918274Z rustc +stable --version --verbose +2026-06-21T01:29:27.1950418Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:27.1951068Z env: +2026-06-21T01:29:27.1951474Z CARGO_TERM_COLOR: always +2026-06-21T01:29:27.1951962Z RUST_BACKTRACE: short +2026-06-21T01:29:27.1952838Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:27.1954076Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:29:27.1954623Z CARGO_INCREMENTAL: 0 +2026-06-21T01:29:27.1955073Z ##[endgroup] +2026-06-21T01:29:27.2138802Z rustc 1.96.0 (ac68faa20 2026-05-25) +2026-06-21T01:29:27.2139927Z binary: rustc +2026-06-21T01:29:27.2140964Z commit-hash: ac68faa20c58cbccd01ee7208bf3b6e93a7d7f96 +2026-06-21T01:29:27.2142263Z commit-date: 2026-05-25 +2026-06-21T01:29:27.2143307Z host: x86_64-unknown-linux-gnu +2026-06-21T01:29:27.2144613Z release: 1.96.0 +2026-06-21T01:29:27.2145540Z LLVM version: 22.1.2 +2026-06-21T01:29:27.2319007Z ##[group]Run Swatinem/rust-cache@v2 +2026-06-21T01:29:27.2319634Z with: +2026-06-21T01:29:27.2320057Z cache-on-failure: true +2026-06-21T01:29:27.2320569Z prefix-key: v0-rust +2026-06-21T01:29:27.2321036Z add-job-id-key: true +2026-06-21T01:29:27.2321525Z add-rust-environment-hash-key: true +2026-06-21T01:29:27.2322078Z cache-targets: true +2026-06-21T01:29:27.2322541Z cache-all-crates: false +2026-06-21T01:29:27.2323032Z cache-workspace-crates: false +2026-06-21T01:29:27.2323532Z save-if: true +2026-06-21T01:29:27.2324270Z cache-provider: github +2026-06-21T01:29:27.2324738Z cache-bin: true +2026-06-21T01:29:27.2325175Z lookup-only: false +2026-06-21T01:29:27.2325818Z cmd-format: {0} +2026-06-21T01:29:27.2326240Z env: +2026-06-21T01:29:27.2326645Z CARGO_TERM_COLOR: always +2026-06-21T01:29:27.2327122Z RUST_BACKTRACE: short +2026-06-21T01:29:27.2327977Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:27.2328976Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:29:27.2329499Z CARGO_INCREMENTAL: 0 +2026-06-21T01:29:27.2329951Z ##[endgroup] +2026-06-21T01:29:27.5327936Z (node:2375) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead. +2026-06-21T01:29:27.5331962Z (Use `node --trace-deprecation ...` to show where the warning was created) +2026-06-21T01:29:30.7385545Z ##[group]Cache Configuration +2026-06-21T01:29:30.7386347Z Cache Provider: +2026-06-21T01:29:30.7387180Z github +2026-06-21T01:29:30.7387676Z Workspaces: +2026-06-21T01:29:30.7388273Z /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts +2026-06-21T01:29:30.7389106Z Cache Paths: +2026-06-21T01:29:30.7389676Z /home/runner/.cargo/bin +2026-06-21T01:29:30.7390156Z /home/runner/.cargo/.crates.toml +2026-06-21T01:29:30.7390722Z /home/runner/.cargo/.crates2.json +2026-06-21T01:29:30.7391288Z /home/runner/.cargo/registry +2026-06-21T01:29:30.7391897Z /home/runner/.cargo/git +2026-06-21T01:29:30.7392638Z /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/target +2026-06-21T01:29:30.7393401Z Restore Key: +2026-06-21T01:29:30.7394156Z v0-rust-test-Linux-x64-1f47b3b1 +2026-06-21T01:29:30.7394767Z Cache Key: +2026-06-21T01:29:30.7395475Z v0-rust-test-Linux-x64-1f47b3b1-8243978e +2026-06-21T01:29:30.7396169Z .. Prefix: +2026-06-21T01:29:30.7396603Z - v0-rust-test-Linux-x64 +2026-06-21T01:29:30.7397135Z .. Environment considered: +2026-06-21T01:29:30.7397595Z - Rust Versions: +2026-06-21T01:29:30.7398245Z - 1.96.0 x86_64-unknown-linux-gnu ac68faa20c58cbccd01ee7208bf3b6e93a7d7f96 +2026-06-21T01:29:30.7399183Z - 1.96.0 x86_64-unknown-linux-gnu ac68faa20c58cbccd01ee7208bf3b6e93a7d7f96 +2026-06-21T01:29:30.7400037Z - CARGO_HOME +2026-06-21T01:29:30.7400534Z - CARGO_INCREMENTAL +2026-06-21T01:29:30.7401036Z - CARGO_TERM_COLOR +2026-06-21T01:29:30.7401500Z - RUST_BACKTRACE +2026-06-21T01:29:30.7402034Z .. Lockfiles considered: +2026-06-21T01:29:30.7402909Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/.cargo/config.toml +2026-06-21T01:29:30.7404443Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/Cargo.toml +2026-06-21T01:29:30.7405445Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/common/Cargo.toml +2026-06-21T01:29:30.7406224Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/contracts/core/Cargo.toml +2026-06-21T01:29:30.7406910Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/Cargo.toml +2026-06-21T01:29:30.7407535Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/rust-toolchain.toml +2026-06-21T01:29:30.7408168Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/token-bridge/Cargo.toml +2026-06-21T01:29:30.7408934Z ##[endgroup] +2026-06-21T01:29:30.7409083Z +2026-06-21T01:29:30.7409193Z ... Restoring cache ... +2026-06-21T01:29:30.9790394Z Cache hit for: v0-rust-test-Linux-x64-1f47b3b1-8243978e +2026-06-21T01:29:32.2967085Z Received 0 of 277338844 (0.0%), 0.0 MBs/sec +2026-06-21T01:29:33.2989031Z Received 100663296 of 277338844 (36.3%), 47.9 MBs/sec +2026-06-21T01:29:34.2994280Z Received 234881024 of 277338844 (84.7%), 74.6 MBs/sec +2026-06-21T01:29:34.7155818Z Received 277338844 of 277338844 (100.0%), 77.3 MBs/sec +2026-06-21T01:29:34.7156575Z Cache Size: ~264 MB (277338844 B) +2026-06-21T01:29:34.7197560Z [command]/usr/bin/tar -xf /home/runner/work/_temp/e15c496c-af51-4336-99b2-ef60cc1c2b6f/cache.tzst -P -C /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts --use-compress-program unzstd +2026-06-21T01:29:36.3287869Z Cache restored successfully +2026-06-21T01:29:36.3414880Z Restored from cache key "v0-rust-test-Linux-x64-1f47b3b1-8243978e" full match: true. +2026-06-21T01:29:36.3583280Z ##[group]Run cargo test -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:36.3586871Z cargo test -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:36.3622303Z shell: /usr/bin/bash -e {0} +2026-06-21T01:29:36.3622583Z env: +2026-06-21T01:29:36.3622796Z CARGO_TERM_COLOR: always +2026-06-21T01:29:36.3623042Z RUST_BACKTRACE: short +2026-06-21T01:29:36.3623528Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:36.3624411Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:29:36.3624679Z CARGO_INCREMENTAL: 0 +2026-06-21T01:29:36.3624905Z CACHE_ON_FAILURE: true +2026-06-21T01:29:36.3625131Z ##[endgroup] +2026-06-21T01:29:36.5104272Z  Updating crates.io index +2026-06-21T01:29:36.8168173Z  Locking 212 packages to latest compatible versions +2026-06-21T01:29:36.8207051Z  Adding arbitrary v1.3.2 (available: v1.4.2) +2026-06-21T01:29:36.8296721Z  Adding crypto-common v0.1.6 (available: v0.1.7) +2026-06-21T01:29:36.8357117Z  Adding derive_arbitrary v1.3.2 (available: v1.4.2) +2026-06-21T01:29:36.8628466Z  Adding rand v0.8.6 (available: v0.10.1) +2026-06-21T01:29:36.8724532Z  Adding sha2 v0.10.9 (available: v0.11.0) +2026-06-21T01:29:36.9051831Z  Adding toml v0.8.23 (available: v1.1.2+spec-1.1.0) +2026-06-21T01:29:37.6315735Z  Compiling zeroize v1.9.0 +2026-06-21T01:29:37.6367085Z  Compiling crypto-common v0.1.6 +2026-06-21T01:29:39.1946919Z  Compiling digest v0.10.7 +2026-06-21T01:29:39.4300730Z  Compiling sha2 v0.10.9 +2026-06-21T01:29:39.6114359Z  Compiling generic-array v0.14.9 +2026-06-21T01:29:39.6525309Z  Compiling der v0.7.10 +2026-06-21T01:29:39.9610617Z  Compiling stellar-xdr v26.0.1 +2026-06-21T01:29:40.1619577Z  Compiling block-buffer v0.10.4 +2026-06-21T01:29:40.1864177Z  Compiling crypto-bigint v0.5.5 +2026-06-21T01:29:40.5574642Z  Compiling ark-serialize v0.5.0 +2026-06-21T01:29:40.7425912Z  Compiling signature v2.2.0 +2026-06-21T01:29:40.8245451Z  Compiling sec1 v0.7.3 +2026-06-21T01:29:40.8655277Z  Compiling ark-ff v0.5.0 +2026-06-21T01:29:41.0595409Z  Compiling hmac v0.12.1 +2026-06-21T01:29:41.1375355Z  Compiling rfc6979 v0.4.0 +2026-06-21T01:29:41.2003639Z  Compiling ed25519 v2.2.3 +2026-06-21T01:29:41.3585858Z  Compiling elliptic-curve v0.13.8 +2026-06-21T01:29:41.6366338Z  Compiling ecdsa v0.16.9 +2026-06-21T01:29:41.6576135Z  Compiling primeorder v0.13.6 +2026-06-21T01:29:42.0349087Z  Compiling curve25519-dalek v4.1.3 +2026-06-21T01:29:44.3125877Z  Compiling ed25519-dalek v2.2.0 +2026-06-21T01:29:44.5578673Z  Compiling p256 v0.13.2 +2026-06-21T01:29:44.9175311Z  Compiling k256 v0.13.4 +2026-06-21T01:29:45.6246005Z  Compiling sha3 v0.10.9 +2026-06-21T01:29:47.2025785Z  Compiling ark-poly v0.5.0 +2026-06-21T01:29:47.7508474Z  Compiling ark-ec v0.5.0 +2026-06-21T01:29:49.5295833Z  Compiling ark-bls12-381 v0.5.0 +2026-06-21T01:29:49.5645948Z  Compiling ark-bn254 v0.5.0 +2026-06-21T01:29:57.4262066Z  Compiling soroban-spec v26.1.0 +2026-06-21T01:29:57.8995588Z  Compiling soroban-spec-rust v26.1.0 +2026-06-21T01:29:58.2025472Z  Compiling soroban-env-macros v26.1.3 +2026-06-21T01:30:00.5705427Z  Compiling soroban-env-common v26.1.3 +2026-06-21T01:30:01.7789644Z  Compiling soroban-sdk-macros v26.1.0 +2026-06-21T01:30:06.6339500Z  Compiling soroban-env-host v26.1.3 +2026-06-21T01:30:12.1422399Z  Compiling soroban-ledger-snapshot v26.1.0 +2026-06-21T01:30:12.3115614Z  Compiling soroban-sdk v26.1.0 +2026-06-21T01:30:17.6163705Z  Compiling orbitchain-common v0.1.0 (/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/common) +2026-06-21T01:30:17.6165831Z  Compiling orbitchain-core v0.1.0 (/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/contracts/core) +2026-06-21T01:30:18.2995805Z  Compiling orbitchain-token-bridge v0.1.0 (/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/token-bridge) +2026-06-21T01:30:18.3054808Z  Compiling orbitchain-campaign v0.1.0 (/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign) +2026-06-21T01:30:18.6467187Z warning: unused import: `Address` +2026-06-21T01:30:18.6469265Z --> campaign/src/contract.rs:6:37 +2026-06-21T01:30:18.6470150Z | +2026-06-21T01:30:18.6477674Z 6 | use soroban_sdk::{panic_with_error, Address, Env}; +2026-06-21T01:30:18.6479050Z | ^^^^^^^ +2026-06-21T01:30:18.6479836Z | +2026-06-21T01:30:18.6480760Z = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default +2026-06-21T01:30:18.6481542Z +2026-06-21T01:30:18.8570622Z warning: unused import: `core::ops::Add` +2026-06-21T01:30:18.8604787Z --> campaign/src/test/claim_refund_tests.rs:8:5 +2026-06-21T01:30:18.8634382Z | +2026-06-21T01:30:18.8665297Z 8 | use core::ops::Add; +2026-06-21T01:30:18.8684837Z | ^^^^^^^^^^^^^^ +2026-06-21T01:30:18.8714602Z +2026-06-21T01:30:18.8744997Z warning: unused import: `log` +2026-06-21T01:30:18.8774949Z --> campaign/src/test/claim_refund_tests.rs:12:19 +2026-06-21T01:30:18.8804714Z | +2026-06-21T01:30:18.8814912Z 12 | use soroban_sdk::{log, vec, Address, Env, Vec}; +2026-06-21T01:30:18.8834759Z | ^^^ +2026-06-21T01:30:18.8844541Z +2026-06-21T01:30:18.8875009Z warning: unused import: `BytesN` +2026-06-21T01:30:18.8894887Z --> campaign/src/test/get_campaign_status_tests.rs:8:28 +2026-06-21T01:30:18.8924694Z | +2026-06-21T01:30:18.8935374Z 8 | use soroban_sdk::{Address, BytesN, Env, String, Vec}; +2026-06-21T01:30:18.8976416Z | ^^^^^^ +2026-06-21T01:30:18.8984178Z +2026-06-21T01:30:18.9015369Z warning: unused imports: `MilestoneData` and `MilestoneStatus` +2026-06-21T01:30:18.9034925Z --> campaign/src/test/get_campaign_status_tests.rs:12:50 +2026-06-21T01:30:18.9044426Z | +2026-06-21T01:30:18.9075353Z 12 | use crate::types::{CampaignData, CampaignStatus, MilestoneData, MilestoneStatus, StellarAsset}; +2026-06-21T01:30:18.9095066Z | ^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ +2026-06-21T01:30:18.9124251Z +2026-06-21T01:30:18.9134797Z warning: unused imports: `CampaignData` and `DonorRecord` +2026-06-21T01:30:18.9154952Z --> campaign/src/test/integration_tests.rs:13:16 +2026-06-21T01:30:18.9184606Z | +2026-06-21T01:30:18.9195078Z 13 | AssetInfo, CampaignData, CampaignStatus, DonorRecord, MilestoneData, MilestoneStatus, +2026-06-21T01:30:18.9225071Z | ^^^^^^^^^^^^ ^^^^^^^^^^^ +2026-06-21T01:30:18.9244314Z +2026-06-21T01:30:18.9274944Z warning: unused imports: `CampaignData`, `DataKey`, and `Error` +2026-06-21T01:30:18.9295123Z --> campaign/src/test/negative_path_tests.rs:12:5 +2026-06-21T01:30:18.9324562Z | +2026-06-21T01:30:18.9335184Z 12 | CampaignData, CampaignStatus, DonorRecord, AssetInfo, StellarAsset, MilestoneData, +2026-06-21T01:30:18.9354529Z | ^^^^^^^^^^^^ +2026-06-21T01:30:18.9384656Z 13 | MilestoneStatus, Error, DataKey, +2026-06-21T01:30:18.9394756Z | ^^^^^ ^^^^^^^ +2026-06-21T01:30:18.9424254Z +2026-06-21T01:30:20.5275379Z warning: unused variable: `creator` +2026-06-21T01:30:20.5294914Z --> campaign/src/test/negative_path_tests.rs:325:14 +2026-06-21T01:30:20.5295644Z | +2026-06-21T01:30:20.5296406Z 325 | let (creator, _) = initialize_default_campaign(&env); +2026-06-21T01:30:20.5297804Z | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_creator` +2026-06-21T01:30:20.5298813Z | +2026-06-21T01:30:20.5299626Z = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default +2026-06-21T01:30:20.5300304Z +2026-06-21T01:30:20.5495250Z warning: unused variable: `env` +2026-06-21T01:30:20.5524945Z --> campaign/src/test/negative_path_tests.rs:888:9 +2026-06-21T01:30:20.5554689Z | +2026-06-21T01:30:20.5584761Z 888 | let env = make_env(); +2026-06-21T01:30:20.5615101Z | ^^^ help: if this is intentional, prefix it with an underscore: `_env` +2026-06-21T01:30:20.5644244Z +2026-06-21T01:30:20.5664475Z warning: unused variable: `creator` +2026-06-21T01:30:20.5665416Z --> campaign/src/test/negative_path_tests.rs:922:14 +2026-06-21T01:30:20.5675020Z | +2026-06-21T01:30:20.5676058Z 922 | let (creator, _) = initialize_default_campaign(&env); +2026-06-21T01:30:20.5677607Z | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_creator` +2026-06-21T01:30:20.5678573Z +2026-06-21T01:30:20.7360022Z warning: unused return value of `get_all_milestones::get_all_milestones_view` that must be used +2026-06-21T01:30:20.7361522Z --> campaign/src/get_all_milestones.rs:130:13 +2026-06-21T01:30:20.7362230Z | +2026-06-21T01:30:20.7362928Z 130 | get_all_milestones_view(&env); +2026-06-21T01:30:20.7364168Z | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +2026-06-21T01:30:20.7364805Z | +2026-06-21T01:30:20.7365516Z = note: `#[warn(unused_must_use)]` (part of `#[warn(unused)]`) on by default +2026-06-21T01:30:20.7366430Z help: use `let _ = ...` to ignore the resulting value +2026-06-21T01:30:20.7367006Z | +2026-06-21T01:30:20.7367600Z 130 |  let _ = get_all_milestones_view(&env); +2026-06-21T01:30:20.7368272Z | +++++++ +2026-06-21T01:30:20.7368594Z +2026-06-21T01:30:20.7369242Z warning: unused return value of `get_milestone::get_milestone_view` that must be used +2026-06-21T01:30:20.7370132Z --> campaign/src/get_milestone.rs:148:13 +2026-06-21T01:30:20.7370661Z | +2026-06-21T01:30:20.7371174Z 148 | get_milestone_view(&env, 1); +2026-06-21T01:30:20.7371870Z | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +2026-06-21T01:30:20.7372390Z | +2026-06-21T01:30:20.7372892Z help: use `let _ = ...` to ignore the resulting value +2026-06-21T01:30:20.7373466Z | +2026-06-21T01:30:20.7374542Z 148 |  let _ = get_milestone_view(&env, 1); +2026-06-21T01:30:20.7375446Z | +++++++ +2026-06-21T01:30:20.7375743Z +2026-06-21T01:30:20.7376394Z warning: unused return value of `get_milestone::get_milestone_view` that must be used +2026-06-21T01:30:20.7377298Z --> campaign/src/get_milestone.rs:159:13 +2026-06-21T01:30:20.7377804Z | +2026-06-21T01:30:20.7378335Z 159 | get_milestone_view(&env, 99); +2026-06-21T01:30:20.7379023Z | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +2026-06-21T01:30:20.7379539Z | +2026-06-21T01:30:20.7380051Z help: use `let _ = ...` to ignore the resulting value +2026-06-21T01:30:20.7380607Z | +2026-06-21T01:30:20.7381200Z 159 |  let _ = get_milestone_view(&env, 99); +2026-06-21T01:30:20.7381894Z | +++++++ +2026-06-21T01:30:20.7382200Z +2026-06-21T01:30:20.7382851Z warning: unused return value of `get_milestone::get_milestone_view` that must be used +2026-06-21T01:30:20.7383740Z --> campaign/src/get_milestone.rs:168:13 +2026-06-21T01:30:20.7384542Z | +2026-06-21T01:30:20.7385077Z 168 | get_milestone_view(&env, 0); +2026-06-21T01:30:20.7385774Z | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +2026-06-21T01:30:20.7386306Z | +2026-06-21T01:30:20.7386796Z help: use `let _ = ...` to ignore the resulting value +2026-06-21T01:30:20.7387364Z | +2026-06-21T01:30:20.7387940Z 168 |  let _ = get_milestone_view(&env, 0); +2026-06-21T01:30:20.7388638Z | +++++++ +2026-06-21T01:30:20.7388936Z +2026-06-21T01:30:20.7463632Z warning: hiding a lifetime that's elided elsewhere is confusing +2026-06-21T01:30:20.7464852Z --> campaign/src/test/claim_refund_tests.rs:336:25 +2026-06-21T01:30:20.7465450Z | +2026-06-21T01:30:20.7466243Z 336 | fn token_asset<'a>(env: &Env) -> (StellarAssetClient<'a>, Address, TokenClient) { +2026-06-21T01:30:20.7467666Z | ^^^^ the lifetime is elided here ^^^^^^^^^^^ the same lifetime is hidden here +2026-06-21T01:30:20.7468597Z | +2026-06-21T01:30:20.7469432Z = help: the same lifetime is referred to in inconsistent ways, making the signature confusing +2026-06-21T01:30:20.7470483Z = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default +2026-06-21T01:30:20.7471154Z help: use `'_` for type paths +2026-06-21T01:30:20.7471628Z | +2026-06-21T01:30:20.7472496Z 336 | fn token_asset<'a>(env: &Env) -> (StellarAssetClient<'a>, Address, TokenClient<'_>) { +2026-06-21T01:30:20.7473619Z | ++++ +2026-06-21T01:30:20.7474282Z +2026-06-21T01:30:21.0259776Z warning: `orbitchain-campaign` (lib) generated 1 warning (run `cargo fix --lib -p orbitchain-campaign` to apply 1 suggestion) +2026-06-21T01:30:22.7603248Z warning: `orbitchain-campaign` (lib test) generated 15 warnings (1 duplicate) (run `cargo fix --lib -p orbitchain-campaign --tests` to apply 10 suggestions) +2026-06-21T01:30:22.7604751Z  Finished `test` profile [unoptimized + debuginfo] target(s) in 46.36s +2026-06-21T01:30:22.7993020Z  Running unittests src/lib.rs (target/debug/deps/orbitchain_campaign-b15e2173e8c5098e) +2026-06-21T01:30:22.8012443Z +2026-06-21T01:30:22.8012771Z running 142 tests +2026-06-21T01:30:22.8095070Z test get_all_milestones::tests::returns_all_milestones_when_empty ... ok +2026-06-21T01:30:22.8144585Z test get_all_milestones::tests::returns_all_milestones_for_single ... ok +2026-06-21T01:30:22.8201728Z test get_milestone::tests::enriched_carries_pending_release_and_is_next_pending ... ok +2026-06-21T01:30:22.8203184Z test get_all_milestones::tests::returns_all_milestones_for_multiple ... ok +2026-06-21T01:30:22.8234870Z test get_milestone::tests::enriched_is_fully_released_when_milestone_is_released ... ok +2026-06-21T01:30:22.8293593Z test get_milestone::tests::enriched_locked_milestone_is_not_marked_next_pending ... ok +2026-06-21T01:30:22.8577360Z test get_all_milestones::tests::panics_when_not_initialised - should panic ... ok +2026-06-21T01:30:22.8594932Z test get_milestone::tests::panics_when_contract_not_initialised - should panic ... ok +2026-06-21T01:30:22.8654625Z test get_milestone::tests::panics_on_index_equal_to_milestone_count - should panic ... ok +2026-06-21T01:30:22.8674975Z test multi_asset_release::tests::proportional_release_dust_below_minimum ... ok +2026-06-21T01:30:22.8704646Z test multi_asset_release::tests::proportional_release_equal_split ... ok +2026-06-21T01:30:22.8734677Z test get_milestone::tests::panics_on_index_far_exceeding_milestone_count - should panic ... ok +2026-06-21T01:30:22.8747126Z test multi_asset_release::tests::proportional_release_full_amount ... ok +2026-06-21T01:30:22.8748449Z test multi_asset_release::tests::proportional_release_negative_asset_raised ... ok +2026-06-21T01:30:22.8750278Z test multi_asset_release::tests::proportional_release_rounds_down ... ok +2026-06-21T01:30:22.8751531Z test multi_asset_release::tests::proportional_release_unequal_split ... ok +2026-06-21T01:30:22.8764658Z test multi_asset_release::tests::proportional_release_zero_asset_raised ... ok +2026-06-21T01:30:22.8794310Z test multi_asset_release::tests::proportional_release_zero_total_raised ... ok +2026-06-21T01:30:22.8823343Z test get_milestone::tests::returns_raw_data_for_index_zero ... ok +2026-06-21T01:30:22.8824815Z test get_milestone::tests::returns_correct_milestone_for_non_zero_index ... ok +2026-06-21T01:30:22.8826304Z test test::claim_refund_tests::test_claim_refund_active_campaign - should panic ... ok +2026-06-21T01:30:22.8832020Z test test::claim_refund_tests::test_claim_refund_already_claimed - should panic ... ok +2026-06-21T01:30:22.8884834Z test test::claim_refund_tests::test_claim_refund_ended_no_milestones_eligibility ... ok +2026-06-21T01:30:22.9034814Z test test::claim_refund_tests::test_claim_refund_ended_with_milestone_released - should panic ... ok +2026-06-21T01:30:22.9197593Z test test::claim_refund_tests::test_claim_refund_ended_with_released_milestone_eligibility ... ok +2026-06-21T01:30:22.9304713Z test test::claim_refund_tests::test_claim_refund_exactly_at_window_boundary ... ok +2026-06-21T01:30:22.9394810Z test test::claim_refund_tests::test_claim_refund_goal_reached_campaign - should panic ... ok +2026-06-21T01:30:22.9395951Z test test::claim_refund_tests::test_claim_refund_ended_donor_1 ... ok +2026-06-21T01:30:22.9483335Z test test::claim_refund_tests::test_claim_refund_no_donor_eligibility ... ok +2026-06-21T01:30:22.9488790Z test test::claim_refund_tests::test_claim_refund_ended_full_refund ... ok +2026-06-21T01:30:22.9495334Z test test::claim_refund_tests::test_claim_refund_no_donor_record - should panic ... ok +2026-06-21T01:30:22.9496573Z test test::claim_refund_tests::test_claim_refund_not_initialized - should panic ... ok +2026-06-21T01:30:22.9550446Z test test::claim_refund_tests::test_claim_refund_one_second_past_window ... ok +2026-06-21T01:30:22.9594948Z test test::get_campaign_status_tests::calculates_days_remaining ... ok +2026-06-21T01:30:22.9634714Z test test::claim_refund_tests::test_claim_refund_window_closed - should panic ... ok +2026-06-21T01:30:22.9684637Z test test::get_campaign_status_tests::returns_active_status ... ok +2026-06-21T01:30:22.9689612Z test test::get_campaign_status_tests::returns_cancelled_status ... ok +2026-06-21T01:30:22.9715212Z test test::claim_refund_tests::test_claim_refund_ended_donor_100 ... ok +2026-06-21T01:30:22.9716975Z test test::integration_tests::test_analytics_defaults_before_initialize ... ok +2026-06-21T01:30:22.9718286Z test test::get_campaign_status_tests::returns_ended_status ... ok +2026-06-21T01:30:22.9794721Z test test::integration_tests::test_donate_uninitialized - should panic ... ok +2026-06-21T01:30:22.9824854Z test test::integration_tests::test_donate_below_minimum_panics_assert - should panic ... ok +2026-06-21T01:30:22.9884667Z test test::integration_tests::test_get_donor_record_non_donor ... ok +2026-06-21T01:30:22.9907466Z test test::integration_tests::test_get_total_raised_default ... ok +2026-06-21T01:30:22.9920381Z test test::integration_tests::test_hello ... ok +2026-06-21T01:30:22.9921503Z test test::integration_tests::test_extend_deadline_happy_path ... ok +2026-06-21T01:30:22.9955931Z test test::integration_tests::test_campaign_analytics_report_and_summary ... ok +2026-06-21T01:30:23.0030441Z test test::integration_tests::test_initialize_happy_path ... ok +2026-06-21T01:30:23.0031918Z test test::integration_tests::test_version ... ok +2026-06-21T01:30:23.0084619Z test test::integration_tests::test_donate_happy_path ... ok +2026-06-21T01:30:23.0179619Z test test::integration_tests::test_lifecycle_end_and_refund_eligibility ... ok +2026-06-21T01:30:23.0234886Z test test::invariant_tests::invariant_milestone_targets_strictly_ascending ... ok +2026-06-21T01:30:23.0289425Z test test::invariant_tests::invariant_last_milestone_target_equals_goal ... ok +2026-06-21T01:30:23.0413590Z test test::invariant_tests::invariant_raised_amount_never_exceeds_goal ... ok +2026-06-21T01:30:23.0414881Z test test::invariant_tests::invariant_no_released_milestones_while_active ... ok +2026-06-21T01:30:23.0450000Z test test::negative_path_tests::test_cancel_campaign_fails_not_initialized - should panic ... ok +2026-06-21T01:30:23.0533723Z test test::invariant_tests::invariant_total_donations_match_raised ... ok +2026-06-21T01:30:23.0545322Z test test::negative_path_tests::test_cancel_campaign_fails_already_cancelled - should panic ... ok +2026-06-21T01:30:23.0582859Z test test::integration_tests::test_lifecycle_multi_milestone_unlock ... ok +2026-06-21T01:30:23.0612074Z test test::negative_path_tests::test_cancel_campaign_frozen_panics - should panic ... ok +2026-06-21T01:30:23.0695056Z test test::negative_path_tests::test_cancel_then_refund_eligible ... ok +2026-06-21T01:30:23.0735033Z test test::negative_path_tests::test_cancel_campaign_not_frozen_succeeds ... ok +2026-06-21T01:30:23.0750161Z test test::negative_path_tests::test_claim_refund_eligible_cancelled ... ok +2026-06-21T01:30:23.0784853Z test test::negative_path_tests::test_claim_refund_fails_already_claimed - should panic ... ok +2026-06-21T01:30:23.0814770Z test test::negative_path_tests::test_claim_refund_fails_not_initialized - should panic ... ok +2026-06-21T01:30:23.0874949Z test test::negative_path_tests::test_claim_refund_fails_campaign_active - should panic ... ok +2026-06-21T01:30:23.0904894Z test test::negative_path_tests::test_claim_refund_fails_no_donor_record - should panic ... ok +2026-06-21T01:30:23.0934843Z test test::negative_path_tests::test_donate_fails_below_minimum - should panic ... ok +2026-06-21T01:30:23.0969800Z test test::negative_path_tests::test_donate_fails_campaign_cancelled - should panic ... ok +2026-06-21T01:30:23.0977783Z test test::negative_path_tests::test_donate_fails_not_initialized - should panic ... ok +2026-06-21T01:30:23.1044824Z test test::negative_path_tests::test_donate_fails_negative_amount - should panic ... ok +2026-06-21T01:30:23.1046252Z test test::negative_path_tests::test_donate_fails_campaign_ended - should panic ... ok +2026-06-21T01:30:23.1098867Z test test::negative_path_tests::test_donate_fails_zero_amount - should panic ... ok +2026-06-21T01:30:23.1154873Z test test::negative_path_tests::test_donate_fails_on_donation_count_overflow - should panic ... ok +2026-06-21T01:30:23.1184511Z test test::negative_path_tests::test_edge_case_no_donor_record ... ok +2026-06-21T01:30:23.1215103Z test test::negative_path_tests::test_edge_case_zero_donations ... ok +2026-06-21T01:30:23.1234821Z test test::negative_path_tests::test_end_campaign_fails_not_initialized - should panic ... ok +2026-06-21T01:30:23.1254898Z test test::negative_path_tests::test_end_campaign_fails_already_ended - should panic ... ok +2026-06-21T01:30:23.1276240Z test test::negative_path_tests::test_end_campaign_fails_cancelled - should panic ... ok +2026-06-21T01:30:23.1324743Z test test::negative_path_tests::test_end_campaign_frozen_panics - should panic ... ok +2026-06-21T01:30:23.1415148Z test test::negative_path_tests::test_extend_deadline_fails_absurd_future_time - should panic ... ok +2026-06-21T01:30:23.1425155Z test test::negative_path_tests::test_end_campaign_not_frozen_succeeds ... ok +2026-06-21T01:30:23.1455132Z test test::negative_path_tests::test_extend_deadline_fails_cancelled - should panic ... ok +2026-06-21T01:30:23.1465130Z test test::negative_path_tests::test_extend_deadline_fails_not_initialized - should panic ... ok +2026-06-21T01:30:23.1487349Z test test::negative_path_tests::test_end_then_refund_eligible ... ok +2026-06-21T01:30:23.1549428Z test test::negative_path_tests::test_extend_deadline_not_frozen_succeeds ... ok +2026-06-21T01:30:23.1564344Z test test::negative_path_tests::test_extend_deadline_fails_past_time - should panic ... ok +2026-06-21T01:30:23.1582076Z test test::negative_path_tests::test_extend_deadline_frozen_panics - should panic ... ok +2026-06-21T01:30:23.1586920Z test test::negative_path_tests::test_hello ... ok +2026-06-21T01:30:23.1601518Z test test::negative_path_tests::test_get_milestone_view_fails_not_initialized - should panic ... ok +2026-06-21T01:30:23.1674981Z test test::negative_path_tests::test_initialize_fails_empty_asset_code - should panic ... ok +2026-06-21T01:30:23.1704778Z test test::negative_path_tests::test_get_milestone_view_fails_out_of_bounds - should panic ... ok +2026-06-21T01:30:23.1729486Z test test::negative_path_tests::test_initialize_fails_empty_assets - should panic ... ok +2026-06-21T01:30:23.1760627Z test test::negative_path_tests::test_full_lifecycle_happy_path ... ok +2026-06-21T01:30:23.1780456Z test test::negative_path_tests::test_initialize_fails_milestone_last_target_not_equal_goal - should panic ... ok +2026-06-21T01:30:23.1782573Z test test::negative_path_tests::test_initialize_fails_already_initialized - should panic ... ok +2026-06-21T01:30:23.1783296Z test test::negative_path_tests::test_initialize_fails_milestone_targets_not_ascending - should panic ... ok +2026-06-21T01:30:23.1784326Z test test::negative_path_tests::test_initialize_fails_negative_goal - should panic ... ok +2026-06-21T01:30:23.1785258Z test test::negative_path_tests::test_initialize_fails_past_end_time - should panic ... ok +2026-06-21T01:30:23.1795079Z test test::negative_path_tests::test_initialize_fails_zero_goal - should panic ... ok +2026-06-21T01:30:23.1796139Z test test::negative_path_tests::test_initialize_fails_zero_milestones - should panic ... ok +2026-06-21T01:30:23.1797226Z test test::negative_path_tests::test_initialize_fails_too_many_milestones - should panic ... ok +2026-06-21T01:30:23.1815968Z test test::negative_path_tests::test_initialize_requires_auth - should panic ... ok +2026-06-21T01:30:23.1945096Z test test::negative_path_tests::test_is_refund_eligible_fails_active_campaign ... ok +2026-06-21T01:30:23.1948790Z test test::negative_path_tests::test_is_refund_eligible_fails_already_claimed ... ok +2026-06-21T01:30:23.1968041Z test test::negative_path_tests::test_is_refund_eligible_fails_goal_reached ... ok +2026-06-21T01:30:23.1970294Z test test::negative_path_tests::test_is_refund_eligible_fails_ended_with_released_milestones ... ok +2026-06-21T01:30:23.1992179Z test test::negative_path_tests::test_is_refund_eligible_fails_no_campaign ... ok +2026-06-21T01:30:23.2005094Z test test::negative_path_tests::test_is_refund_eligible_returns_false_no_campaign ... ok +2026-06-21T01:30:23.2074763Z test test::negative_path_tests::test_is_refund_eligible_fails_no_donor_record ... ok +2026-06-21T01:30:23.2155302Z test test::negative_path_tests::test_refund_window_edge_boundary ... ok +2026-06-21T01:30:23.2195041Z test test::negative_path_tests::test_is_refund_eligible_fails_window_closed ... ok +2026-06-21T01:30:23.2294782Z test test::negative_path_tests::test_refund_window_just_after_boundary ... ok +2026-06-21T01:30:23.2312298Z test test::negative_path_tests::test_reentrancy_lock_donate_twice_succeeds ... ok +2026-06-21T01:30:23.2325039Z test test::negative_path_tests::test_upgrade_succeeds_after_unfreeze ... ok +2026-06-21T01:30:23.2327350Z test test::negative_path_tests::test_version ... ok +2026-06-21T01:30:23.2341532Z test test::negative_path_tests::test_upgrade_fails_when_frozen - should panic ... ok +2026-06-21T01:30:23.2402154Z test test::negative_path_tests::test_upgrade_succeeds_when_not_frozen ... ok +2026-06-21T01:30:23.2408444Z test test::refund_eligibility_tests::test_refund_eligibility_all_conditions ... ok +2026-06-21T01:30:23.2472515Z test test::refund_eligibility_tests::test_refund_eligible_campaign_cancelled ... ok +2026-06-21T01:30:23.2504175Z test test::refund_eligibility_tests::test_refund_eligible_campaign_ended_no_milestone_released ... ok +2026-06-21T01:30:23.2513727Z test test::refund_eligibility_tests::test_refund_not_eligible_already_claimed ... ok +2026-06-21T01:30:23.2534852Z test test::refund_eligibility_tests::test_refund_not_eligible_campaign_active ... ok +2026-06-21T01:30:23.2594505Z test test::refund_eligibility_tests::test_refund_not_eligible_no_campaign ... ok +2026-06-21T01:30:23.2595529Z test test::refund_eligibility_tests::test_refund_not_eligible_no_donor_record ... ok +2026-06-21T01:30:23.2629624Z test test::refund_eligibility_tests::test_refund_not_eligible_campaign_goal_reached ... ok +2026-06-21T01:30:23.2630715Z test test::refund_eligibility_tests::test_refund_not_eligible_window_closed ... ok +2026-06-21T01:30:23.2714921Z test test::refund_eligibility_tests::test_refund_window_edge_case_exactly_30_days ... ok +2026-06-21T01:30:23.2744708Z test test::refund_eligibility_tests::test_refund_window_edge_case_one_second_after_30_days ... ok +2026-06-21T01:30:23.2894912Z test test::release_milestone_tests::test_frozen_contract_release_panics - should panic ... ok +2026-06-21T01:30:23.2954660Z test test::release_milestone_tests::test_double_release_panics - should panic ... ok +2026-06-21T01:30:23.2964797Z test test::release_milestone_tests::test_first_milestone_release_succeeds_regardless_of_previous ... ok +2026-06-21T01:30:23.3004907Z test test::release_milestone_tests::test_final_milestone_releases_remaining_balance ... ok +2026-06-21T01:30:23.3053182Z test test::release_milestone_tests::test_locked_milestone_release_panics - should panic ... ok +2026-06-21T01:30:23.3136315Z test test::release_milestone_tests::test_non_creator_release_panics - should panic ... ok +2026-06-21T01:30:23.3168091Z test test::release_milestone_tests::test_release_non_existent_milestone_panics - should panic ... ok +2026-06-21T01:30:23.3405415Z test test::release_milestone_tests::test_release_with_single_asset_transfers_correct_amount ... ok +2026-06-21T01:30:23.3435158Z test test::release_milestone_tests::test_skipping_milestone_release_panics - should panic ... ok +2026-06-21T01:30:23.3675151Z test test::release_milestone_tests::test_valid_release_sets_released_amount ... ok +2026-06-21T01:30:23.3695070Z test test::release_milestone_tests::test_valid_release_updates_milestone_status ... ok +2026-06-21T01:30:23.3696544Z test test::release_milestone_tests::test_sequential_milestone_release_succeeds ... ok +2026-06-21T01:30:23.3717872Z test test::release_milestone_tests::test_release_with_multiple_assets_only_debits_first_asset ... ok +2026-06-21T01:30:23.3718301Z +2026-06-21T01:30:23.3718562Z test result: ok. 142 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.57s +2026-06-21T01:30:23.3718927Z +2026-06-21T01:30:23.3753117Z  Running unittests src/lib.rs (target/debug/deps/orbitchain_common-a7e91c53777a8f47) +2026-06-21T01:30:23.3773637Z +2026-06-21T01:30:23.3774005Z running 0 tests +2026-06-21T01:30:23.3774263Z +2026-06-21T01:30:23.3775268Z test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s +2026-06-21T01:30:23.3775649Z +2026-06-21T01:30:23.3777129Z  Running unittests src/lib.rs (target/debug/deps/orbitchain_core-64120678b644eb93) +2026-06-21T01:30:23.3800176Z +2026-06-21T01:30:23.3800333Z running 14 tests +2026-06-21T01:30:23.3874793Z test tests::test_dashboard_metrics_empty_contract ... ok +2026-06-21T01:30:23.3983220Z test tests::test_campaign_report_progress_clamped ... ok +2026-06-21T01:30:23.3990605Z test tests::test_create_and_donate_with_metadata_and_tracking ... ok +2026-06-21T01:30:23.4144803Z test tests::test_count_total_transactions_split ... ok +2026-06-21T01:30:23.4146530Z test tests::test_get_campaign_report_accuracy ... ok +2026-06-21T01:30:23.4194375Z test tests::test_ping ... ok +2026-06-21T01:30:23.4234795Z test tests::test_initialize ... ok +2026-06-21T01:30:23.4235551Z test tests::test_get_dashboard_metrics ... ok +2026-06-21T01:30:23.4314754Z test tests::test_get_platform_summary ... ok +2026-06-21T01:30:23.4335773Z test tests::test_validate_recipient ... ok +2026-06-21T01:30:23.4442573Z test tests::test_total_tx_count ... ok +2026-06-21T01:30:23.4465186Z test tests::test_submit_transaction ... ok +2026-06-21T01:30:23.4517706Z test tests::test_withdraw_and_approve ... ok +2026-06-21T01:30:23.4832606Z test tests::test_prevent_double_withdrawal - should panic ... ok +2026-06-21T01:30:23.4833351Z +2026-06-21T01:30:23.4833836Z test result: ok. 14 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.10s +2026-06-21T01:30:23.4834708Z +2026-06-21T01:30:23.4865705Z  Running unittests src/lib.rs (target/debug/deps/orbitchain_token_bridge-e7a55db06a538a5c) +2026-06-21T01:30:23.4879175Z +2026-06-21T01:30:23.4879430Z running 0 tests +2026-06-21T01:30:23.4879673Z +2026-06-21T01:30:23.4880112Z test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s +2026-06-21T01:30:23.4880741Z +2026-06-21T01:30:23.4881670Z  Doc-tests orbitchain_campaign +2026-06-21T01:30:23.9780510Z +2026-06-21T01:30:23.9781027Z running 0 tests +2026-06-21T01:30:23.9781392Z +2026-06-21T01:30:23.9821072Z test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s +2026-06-21T01:30:23.9821507Z +2026-06-21T01:30:23.9863220Z  Doc-tests orbitchain_common +2026-06-21T01:30:24.0283064Z +2026-06-21T01:30:24.0283560Z running 0 tests +2026-06-21T01:30:24.0284083Z +2026-06-21T01:30:24.0284547Z test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s +2026-06-21T01:30:24.0285116Z +2026-06-21T01:30:24.0315499Z  Doc-tests orbitchain_token_bridge +2026-06-21T01:30:24.0663392Z +2026-06-21T01:30:24.0664054Z running 0 tests +2026-06-21T01:30:24.0664345Z +2026-06-21T01:30:24.0664682Z test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s +2026-06-21T01:30:24.0665049Z +2026-06-21T01:30:24.0929153Z Post job cleanup. +2026-06-21T01:30:24.3796533Z Cache up-to-date. +2026-06-21T01:30:24.3799274Z (node:3225) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead. +2026-06-21T01:30:24.3800003Z (Use `node --trace-deprecation ...` to show where the warning was created) +2026-06-21T01:30:24.3998879Z Node 20 is being deprecated. This workflow is running with Node 24 by default. If you need to temporarily use Node 20, you can set the ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true environment variable. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/ +2026-06-21T01:30:24.4000177Z Post job cleanup. +2026-06-21T01:30:24.4858032Z [command]/usr/bin/git version +2026-06-21T01:30:24.4894878Z git version 2.54.0 +2026-06-21T01:30:24.4932234Z Temporarily overriding HOME='/home/runner/work/_temp/e4b1ec18-2cd1-47f1-b8fb-5853776d7232' before making global git config changes +2026-06-21T01:30:24.4933214Z Adding repository directory to the temporary git global config as a safe directory +2026-06-21T01:30:24.4937966Z [command]/usr/bin/git config --global --add safe.directory /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts +2026-06-21T01:30:24.4973235Z [command]/usr/bin/git config --local --name-only --get-regexp core\.sshCommand +2026-06-21T01:30:24.5004785Z [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || :" +2026-06-21T01:30:24.5227390Z [command]/usr/bin/git config --local --name-only --get-regexp http\.https\:\/\/github\.com\/\.extraheader +2026-06-21T01:30:24.5254305Z http.https://github.com/.extraheader +2026-06-21T01:30:24.5265963Z [command]/usr/bin/git config --local --unset-all http.https://github.com/.extraheader +2026-06-21T01:30:24.5297286Z [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http\.https\:\/\/github\.com\/\.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :" +2026-06-21T01:30:24.5515702Z [command]/usr/bin/git config --local --name-only --get-regexp ^includeIf\.gitdir: +2026-06-21T01:30:24.5548082Z [command]/usr/bin/git submodule foreach --recursive git config --local --show-origin --name-only --get-regexp remote.origin.url +2026-06-21T01:30:24.5907089Z Cleaning up orphan processes +2026-06-21T01:30:24.6183975Z ##[warning]Node.js 20 is deprecated. The following actions target Node.js 20 but are being forced to run on Node.js 24: actions/checkout@v4. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/ diff --git a/.ci_logs2/1_WASM compile check.txt b/.ci_logs2/1_WASM compile check.txt new file mode 100644 index 0000000..750b229 --- /dev/null +++ b/.ci_logs2/1_WASM compile check.txt @@ -0,0 +1,497 @@ +2026-06-21T01:29:23.2606523Z Current runner version: '2.335.1' +2026-06-21T01:29:23.2640448Z ##[group]Runner Image Provisioner +2026-06-21T01:29:23.2641837Z Hosted Compute Agent +2026-06-21T01:29:23.2642720Z Version: 20260611.554 +2026-06-21T01:29:23.2643653Z Commit: 5e0782fdc9014723d3be820dd114dd31555c2bd1 +2026-06-21T01:29:23.2644850Z Build Date: 2026-06-11T21:40:46Z +2026-06-21T01:29:23.2646149Z Worker ID: {08a5a94d-d421-49d4-957f-b6196e4b1f44} +2026-06-21T01:29:23.2647397Z Azure Region: eastus +2026-06-21T01:29:23.2648301Z ##[endgroup] +2026-06-21T01:29:23.2650486Z ##[group]Operating System +2026-06-21T01:29:23.2651548Z Ubuntu +2026-06-21T01:29:23.2652328Z 24.04.4 +2026-06-21T01:29:23.2653137Z LTS +2026-06-21T01:29:23.2653992Z ##[endgroup] +2026-06-21T01:29:23.2654824Z ##[group]Runner Image +2026-06-21T01:29:23.2656013Z Image: ubuntu-24.04 +2026-06-21T01:29:23.2656925Z Version: 20260615.205.1 +2026-06-21T01:29:23.2658949Z Included Software: https://github.com/actions/runner-images/blob/ubuntu24/20260615.205/images/ubuntu/Ubuntu2404-Readme.md +2026-06-21T01:29:23.2661314Z Image Release: https://github.com/actions/runner-images/releases/tag/ubuntu24%2F20260615.205 +2026-06-21T01:29:23.2663063Z ##[endgroup] +2026-06-21T01:29:23.2664800Z ##[group]GITHUB_TOKEN Permissions +2026-06-21T01:29:23.2667596Z Contents: read +2026-06-21T01:29:23.2668462Z Metadata: read +2026-06-21T01:29:23.2669434Z ##[endgroup] +2026-06-21T01:29:23.2672358Z Secret source: Actions +2026-06-21T01:29:23.2673673Z Prepare workflow directory +2026-06-21T01:29:23.3207567Z Prepare all required actions +2026-06-21T01:29:23.3262571Z Getting action download info +2026-06-21T01:29:23.5586990Z Download action repository 'actions/checkout@v4' (SHA:34e114876b0b11c390a56381ad16ebd13914f8d5) +2026-06-21T01:29:23.6266232Z Download action repository 'dtolnay/rust-toolchain@stable' (SHA:29eef336d9b2848a0b548edc03f92a220660cdb8) +2026-06-21T01:29:23.7164971Z Download action repository 'Swatinem/rust-cache@v2' (SHA:e18b497796c12c097a38f9edb9d0641fb99eee32) +2026-06-21T01:29:24.0575824Z Complete job name: WASM compile check +2026-06-21T01:29:24.1280062Z Node 20 is being deprecated. This workflow is running with Node 24 by default. If you need to temporarily use Node 20, you can set the ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true environment variable. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/ +2026-06-21T01:29:24.1288836Z ##[group]Run actions/checkout@v4 +2026-06-21T01:29:24.1289518Z with: +2026-06-21T01:29:24.1290010Z repository: OrbitChainLabs/OrbitChain-Contracts +2026-06-21T01:29:24.1294494Z token: *** +2026-06-21T01:29:24.1294930Z ssh-strict: true +2026-06-21T01:29:24.1295373Z ssh-user: git +2026-06-21T01:29:24.1296037Z persist-credentials: true +2026-06-21T01:29:24.1296529Z clean: true +2026-06-21T01:29:24.1296973Z sparse-checkout-cone-mode: true +2026-06-21T01:29:24.1297488Z fetch-depth: 1 +2026-06-21T01:29:24.1297911Z fetch-tags: false +2026-06-21T01:29:24.1298343Z show-progress: true +2026-06-21T01:29:24.1298778Z lfs: false +2026-06-21T01:29:24.1299248Z submodules: false +2026-06-21T01:29:24.1299689Z set-safe-directory: true +2026-06-21T01:29:24.1300347Z env: +2026-06-21T01:29:24.1300758Z CARGO_TERM_COLOR: always +2026-06-21T01:29:24.1301237Z RUST_BACKTRACE: short +2026-06-21T01:29:24.1302071Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:24.1302972Z ##[endgroup] +2026-06-21T01:29:24.2340996Z Syncing repository: OrbitChainLabs/OrbitChain-Contracts +2026-06-21T01:29:24.2342852Z ##[group]Getting Git version info +2026-06-21T01:29:24.2343707Z Working directory is '/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts' +2026-06-21T01:29:24.2344882Z [command]/usr/bin/git version +2026-06-21T01:29:24.2391987Z git version 2.54.0 +2026-06-21T01:29:24.2445928Z ##[endgroup] +2026-06-21T01:29:24.2461417Z Temporarily overriding HOME='/home/runner/work/_temp/4baecb13-8970-45ed-9b1e-d0fa9beb298b' before making global git config changes +2026-06-21T01:29:24.2463906Z Adding repository directory to the temporary git global config as a safe directory +2026-06-21T01:29:24.2466991Z [command]/usr/bin/git config --global --add safe.directory /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts +2026-06-21T01:29:24.2516776Z Deleting the contents of '/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts' +2026-06-21T01:29:24.2521203Z ##[group]Initializing the repository +2026-06-21T01:29:24.2526726Z [command]/usr/bin/git init /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts +2026-06-21T01:29:24.2600451Z hint: Using 'master' as the name for the initial branch. This default branch name +2026-06-21T01:29:24.2602127Z hint: will change to "main" in Git 3.0. To configure the initial branch name +2026-06-21T01:29:24.2603664Z hint: to use in all of your new repositories, which will suppress this warning, +2026-06-21T01:29:24.2604875Z hint: call: +2026-06-21T01:29:24.2605750Z hint: +2026-06-21T01:29:24.2606591Z hint: git config --global init.defaultBranch +2026-06-21T01:29:24.2607652Z hint: +2026-06-21T01:29:24.2608605Z hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and +2026-06-21T01:29:24.2610069Z hint: 'development'. The just-created branch can be renamed via this command: +2026-06-21T01:29:24.2611242Z hint: +2026-06-21T01:29:24.2611901Z hint: git branch -m +2026-06-21T01:29:24.2612659Z hint: +2026-06-21T01:29:24.2613664Z hint: Disable this message with "git config set advice.defaultBranchName false" +2026-06-21T01:29:24.2621424Z Initialized empty Git repository in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/.git/ +2026-06-21T01:29:24.2631971Z [command]/usr/bin/git remote add origin https://github.com/OrbitChainLabs/OrbitChain-Contracts +2026-06-21T01:29:24.2674290Z ##[endgroup] +2026-06-21T01:29:24.2675875Z ##[group]Disabling automatic garbage collection +2026-06-21T01:29:24.2677798Z [command]/usr/bin/git config --local gc.auto 0 +2026-06-21T01:29:24.2712855Z ##[endgroup] +2026-06-21T01:29:24.2714133Z ##[group]Setting up auth +2026-06-21T01:29:24.2720218Z [command]/usr/bin/git config --local --name-only --get-regexp core\.sshCommand +2026-06-21T01:29:24.2757496Z [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || :" +2026-06-21T01:29:24.3088683Z [command]/usr/bin/git config --local --name-only --get-regexp http\.https\:\/\/github\.com\/\.extraheader +2026-06-21T01:29:24.3122880Z [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http\.https\:\/\/github\.com\/\.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :" +2026-06-21T01:29:24.3380818Z [command]/usr/bin/git config --local --name-only --get-regexp ^includeIf\.gitdir: +2026-06-21T01:29:24.3416233Z [command]/usr/bin/git submodule foreach --recursive git config --local --show-origin --name-only --get-regexp remote.origin.url +2026-06-21T01:29:24.3667485Z [command]/usr/bin/git config --local http.https://github.com/.extraheader AUTHORIZATION: basic *** +2026-06-21T01:29:24.3703777Z ##[endgroup] +2026-06-21T01:29:24.3704572Z ##[group]Fetching the repository +2026-06-21T01:29:24.3714725Z [command]/usr/bin/git -c protocol.version=2 fetch --no-tags --prune --no-recurse-submodules --depth=1 origin +59f3fe99e87bd5e1e546c9babe13e09825b65536:refs/remotes/pull/60/merge +2026-06-21T01:29:24.5808218Z From https://github.com/OrbitChainLabs/OrbitChain-Contracts +2026-06-21T01:29:24.5809281Z * [new ref] 59f3fe99e87bd5e1e546c9babe13e09825b65536 -> pull/60/merge +2026-06-21T01:29:24.5839492Z ##[endgroup] +2026-06-21T01:29:24.5840325Z ##[group]Determining the checkout info +2026-06-21T01:29:24.5841809Z ##[endgroup] +2026-06-21T01:29:24.5847626Z [command]/usr/bin/git sparse-checkout disable +2026-06-21T01:29:24.5892334Z [command]/usr/bin/git config --local --unset-all extensions.worktreeConfig +2026-06-21T01:29:24.6012125Z ##[group]Checking out the ref +2026-06-21T01:29:24.6013628Z [command]/usr/bin/git checkout --progress --force refs/remotes/pull/60/merge +2026-06-21T01:29:24.6094361Z Note: switching to 'refs/remotes/pull/60/merge'. +2026-06-21T01:29:24.6095998Z +2026-06-21T01:29:24.6097372Z You are in 'detached HEAD' state. You can look around, make experimental +2026-06-21T01:29:24.6099482Z changes and commit them, and you can discard any commits you make in this +2026-06-21T01:29:24.6101394Z state without impacting any branches by switching back to a branch. +2026-06-21T01:29:24.6102471Z +2026-06-21T01:29:24.6103205Z If you want to create a new branch to retain commits you create, you may +2026-06-21T01:29:24.6104875Z do so (now or later) by using -c with the switch command. Example: +2026-06-21T01:29:24.6106103Z +2026-06-21T01:29:24.6106587Z git switch -c +2026-06-21T01:29:24.6107308Z +2026-06-21T01:29:24.6107782Z Or undo this operation with: +2026-06-21T01:29:24.6108444Z +2026-06-21T01:29:24.6108938Z git switch - +2026-06-21T01:29:24.6109460Z +2026-06-21T01:29:24.6110391Z Turn off this advice by setting config variable advice.detachedHead to false +2026-06-21T01:29:24.6111642Z +2026-06-21T01:29:24.6113190Z HEAD is now at 59f3fe9 Merge 9e85affabcadb1e696b876ca7eae8bad3de3c85d into dc3d5e2b821bb2a0f2655582265c562926415b02 +2026-06-21T01:29:24.6129803Z ##[endgroup] +2026-06-21T01:29:24.6174527Z [command]/usr/bin/git log -1 --format=%H +2026-06-21T01:29:24.6283141Z 59f3fe99e87bd5e1e546c9babe13e09825b65536 +2026-06-21T01:29:24.6795069Z ##[warning]Unexpected input(s) 'cache', valid inputs are ['toolchain', 'targets', 'target', 'components'] +2026-06-21T01:29:24.6820836Z ##[group]Run dtolnay/rust-toolchain@stable +2026-06-21T01:29:24.6821944Z with: +2026-06-21T01:29:24.6822724Z targets: wasm32v1-none +2026-06-21T01:29:24.6823616Z cache: false +2026-06-21T01:29:24.6824428Z toolchain: stable +2026-06-21T01:29:24.6825263Z env: +2026-06-21T01:29:24.6826228Z CARGO_TERM_COLOR: always +2026-06-21T01:29:24.6827168Z RUST_BACKTRACE: short +2026-06-21T01:29:24.6828859Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:24.6830699Z ##[endgroup] +2026-06-21T01:29:24.6988090Z ##[group]Run : parse toolchain version +2026-06-21T01:29:24.6989276Z : parse toolchain version +2026-06-21T01:29:24.6990311Z if [[ -z $toolchain ]]; then +2026-06-21T01:29:24.6992236Z  # GitHub does not enforce `required: true` inputs itself. https://github.com/actions/runner/issues/1070 +2026-06-21T01:29:24.6994219Z  echo "'toolchain' is a required input" >&2 +2026-06-21T01:29:24.6995330Z  exit 1 +2026-06-21T01:29:24.6996926Z elif [[ $toolchain =~ ^stable' '[0-9]+' '(year|month|week|day)s?' 'ago$ ]]; then +2026-06-21T01:29:24.6998434Z  if [[ Linux == macOS ]]; then +2026-06-21T01:29:24.7000317Z  echo "toolchain=1.$((($(date -v-$(sed 's/stable \([0-9]*\) \(.\).*/\1\2/' <<< $toolchain) +%s)/60/60/24-16569)/7/6))" >> $GITHUB_OUTPUT +2026-06-21T01:29:24.7002180Z  else +2026-06-21T01:29:24.7003662Z  echo "toolchain=1.$((($(date --date "${toolchain#stable }" +%s)/60/60/24-16569)/7/6))" >> $GITHUB_OUTPUT +2026-06-21T01:29:24.7005352Z  fi +2026-06-21T01:29:24.7006612Z elif [[ $toolchain =~ ^stable' 'minus' '[0-9]+' 'releases?$ ]]; then +2026-06-21T01:29:24.7008562Z  echo "toolchain=1.$((($(date +%s)/60/60/24-16569)/7/6-${toolchain//[^0-9]/}))" >> $GITHUB_OUTPUT +2026-06-21T01:29:24.7010274Z elif [[ $toolchain =~ ^1\.[0-9]+$ ]]; then +2026-06-21T01:29:24.7012186Z  echo "toolchain=1.$((i=${toolchain#1.}, c=($(date +%s)/60/60/24-16569)/7/6, i+9*i*(10*i<=c)+90*i*(100*i<=c)))" >> $GITHUB_OUTPUT +2026-06-21T01:29:24.7014002Z else +2026-06-21T01:29:24.7014918Z  echo "toolchain=$toolchain" >> $GITHUB_OUTPUT +2026-06-21T01:29:24.7016151Z fi +2026-06-21T01:29:24.7153679Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:24.7154912Z env: +2026-06-21T01:29:24.7155972Z CARGO_TERM_COLOR: always +2026-06-21T01:29:24.7157157Z RUST_BACKTRACE: short +2026-06-21T01:29:24.7158776Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:24.7160569Z toolchain: stable +2026-06-21T01:29:24.7161348Z ##[endgroup] +2026-06-21T01:29:24.7353535Z ##[group]Run : construct rustup command line +2026-06-21T01:29:24.7354701Z : construct rustup command line +2026-06-21T01:29:24.7356524Z echo "targets=$(for t in ${targets//,/ }; do echo -n ' --target' $t; done)" >> $GITHUB_OUTPUT +2026-06-21T01:29:24.7358775Z echo "components=$(for c in ${components//,/ }; do echo -n ' --component' $c; done)" >> $GITHUB_OUTPUT +2026-06-21T01:29:24.7360537Z echo "downgrade=" >> $GITHUB_OUTPUT +2026-06-21T01:29:24.7395286Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:24.7396682Z env: +2026-06-21T01:29:24.7397372Z CARGO_TERM_COLOR: always +2026-06-21T01:29:24.7398214Z RUST_BACKTRACE: short +2026-06-21T01:29:24.7399768Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:24.7401516Z targets: wasm32v1-none +2026-06-21T01:29:24.7402330Z components: +2026-06-21T01:29:24.7403030Z ##[endgroup] +2026-06-21T01:29:24.7529636Z ##[group]Run : set $CARGO_HOME +2026-06-21T01:29:24.7530575Z : set $CARGO_HOME +2026-06-21T01:29:24.7531948Z echo CARGO_HOME=${CARGO_HOME:-"$HOME/.cargo"} >> $GITHUB_ENV +2026-06-21T01:29:24.7566387Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:24.7567554Z env: +2026-06-21T01:29:24.7568238Z CARGO_TERM_COLOR: always +2026-06-21T01:29:24.7569065Z RUST_BACKTRACE: short +2026-06-21T01:29:24.7570584Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:24.7572263Z ##[endgroup] +2026-06-21T01:29:24.7699588Z ##[group]Run : install rustup if needed +2026-06-21T01:29:24.7700668Z : install rustup if needed +2026-06-21T01:29:24.7701734Z if ! command -v rustup &>/dev/null; then +2026-06-21T01:29:24.7704248Z  curl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused --location --silent --show-error --fail https://sh.rustup.rs | sh -s -- --default-toolchain none -y +2026-06-21T01:29:24.7707099Z  echo "$CARGO_HOME/bin" >> $GITHUB_PATH +2026-06-21T01:29:24.7708126Z fi +2026-06-21T01:29:24.7742430Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:24.7743585Z env: +2026-06-21T01:29:24.7744288Z CARGO_TERM_COLOR: always +2026-06-21T01:29:24.7745125Z RUST_BACKTRACE: short +2026-06-21T01:29:24.7746842Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:24.7748567Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:29:24.7749457Z ##[endgroup] +2026-06-21T01:29:24.7879979Z ##[group]Run rustup toolchain install stable --target wasm32v1-none --profile minimal --no-self-update +2026-06-21T01:29:24.7882294Z rustup toolchain install stable --target wasm32v1-none --profile minimal --no-self-update +2026-06-21T01:29:24.7917552Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:24.7918698Z env: +2026-06-21T01:29:24.7919379Z CARGO_TERM_COLOR: always +2026-06-21T01:29:24.7920207Z RUST_BACKTRACE: short +2026-06-21T01:29:24.7921750Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:24.7923460Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:29:24.7924366Z RUSTUP_PERMIT_COPY_RENAME: 1 +2026-06-21T01:29:24.7925196Z ##[endgroup] +2026-06-21T01:29:24.9206494Z info: syncing channel updates for stable-x86_64-unknown-linux-gnu +2026-06-21T01:29:25.0194281Z info: latest update on 2026-05-28 for version 1.96.0 (ac68faa20 2026-05-25) +2026-06-21T01:29:25.0336060Z info: downloading component rust-std +2026-06-21T01:29:26.2712153Z +2026-06-21T01:29:26.2805677Z stable-x86_64-unknown-linux-gnu updated - rustc 1.96.0 (ac68faa20 2026-05-25) (from rustc 1.96.0 (ac68faa20 2026-05-25)) +2026-06-21T01:29:26.2806928Z +2026-06-21T01:29:26.2886718Z ##[group]Run rustup default stable +2026-06-21T01:29:26.2887107Z rustup default stable +2026-06-21T01:29:26.2922817Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:26.2923231Z env: +2026-06-21T01:29:26.2923491Z CARGO_TERM_COLOR: always +2026-06-21T01:29:26.2923804Z RUST_BACKTRACE: short +2026-06-21T01:29:26.2924327Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:26.2924903Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:29:26.2925217Z ##[endgroup] +2026-06-21T01:29:26.3043633Z info: using existing install for stable-x86_64-unknown-linux-gnu +2026-06-21T01:29:26.3048962Z info: default toolchain set to stable-x86_64-unknown-linux-gnu +2026-06-21T01:29:26.3049537Z +2026-06-21T01:29:26.3141024Z stable-x86_64-unknown-linux-gnu unchanged - rustc 1.96.0 (ac68faa20 2026-05-25) +2026-06-21T01:29:26.3141476Z +2026-06-21T01:29:26.3143044Z info: note that the toolchain 'stable-x86_64-unknown-linux-gnu' is currently in use (overridden by '/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/rust-toolchain.toml') +2026-06-21T01:29:26.3219138Z ##[group]Run : create cachekey +2026-06-21T01:29:26.3219514Z : create cachekey +2026-06-21T01:29:26.3220284Z DATE=$(rustc +stable --version --verbose | sed -ne 's/^commit-date: \(20[0-9][0-9]\)-\([01][0-9]\)-\([0-3][0-9]\)$/\1\2\3/p') +2026-06-21T01:29:26.3221047Z HASH=$(rustc +stable --version --verbose | sed -ne 's/^commit-hash: //p') +2026-06-21T01:29:26.3221622Z echo "cachekey=$(echo $DATE$HASH | head -c12)" >> $GITHUB_OUTPUT +2026-06-21T01:29:26.3257114Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:26.3257523Z env: +2026-06-21T01:29:26.3257787Z CARGO_TERM_COLOR: always +2026-06-21T01:29:26.3258074Z RUST_BACKTRACE: short +2026-06-21T01:29:26.3258585Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:26.3259149Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:29:26.3259495Z ##[endgroup] +2026-06-21T01:29:26.3704311Z ##[group]Run : disable incremental compilation +2026-06-21T01:29:26.3704780Z : disable incremental compilation +2026-06-21T01:29:26.3705182Z if [ -z "${CARGO_INCREMENTAL+set}" ]; then +2026-06-21T01:29:26.3706235Z  echo CARGO_INCREMENTAL=0 >> $GITHUB_ENV +2026-06-21T01:29:26.3706637Z fi +2026-06-21T01:29:26.3741400Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:26.3741823Z env: +2026-06-21T01:29:26.3742088Z CARGO_TERM_COLOR: always +2026-06-21T01:29:26.3742387Z RUST_BACKTRACE: short +2026-06-21T01:29:26.3742913Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:26.3743478Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:29:26.3743790Z ##[endgroup] +2026-06-21T01:29:26.3836252Z ##[group]Run : enable colors in Cargo output +2026-06-21T01:29:26.3836693Z : enable colors in Cargo output +2026-06-21T01:29:26.3837190Z if [ -z "${CARGO_TERM_COLOR+set}" ]; then +2026-06-21T01:29:26.3837628Z  echo CARGO_TERM_COLOR=always >> $GITHUB_ENV +2026-06-21T01:29:26.3837982Z fi +2026-06-21T01:29:26.3873400Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:26.3873812Z env: +2026-06-21T01:29:26.3874073Z CARGO_TERM_COLOR: always +2026-06-21T01:29:26.3874371Z RUST_BACKTRACE: short +2026-06-21T01:29:26.3874903Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:26.3875641Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:29:26.3875961Z CARGO_INCREMENTAL: 0 +2026-06-21T01:29:26.3876242Z ##[endgroup] +2026-06-21T01:29:26.3969458Z ##[group]Run : enable Cargo sparse registry +2026-06-21T01:29:26.3969877Z : enable Cargo sparse registry +2026-06-21T01:29:26.3970311Z # implemented in 1.66, stabilized in 1.68, made default in 1.70 +2026-06-21T01:29:26.3971281Z if [ -z "${CARGO_REGISTRIES_CRATES_IO_PROTOCOL+set}" -o -f "/home/runner/work/_temp"/.implicit_cargo_registries_crates_io_protocol ]; then +2026-06-21T01:29:26.3972114Z  if rustc +stable --version --verbose | grep -q '^release: 1\.6[89]\.'; then +2026-06-21T01:29:26.3972766Z  touch "/home/runner/work/_temp"/.implicit_cargo_registries_crates_io_protocol || true +2026-06-21T01:29:26.3973379Z  echo CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse >> $GITHUB_ENV +2026-06-21T01:29:26.3973942Z  elif rustc +stable --version --verbose | grep -q '^release: 1\.6[67]\.'; then +2026-06-21T01:29:26.3974567Z  touch "/home/runner/work/_temp"/.implicit_cargo_registries_crates_io_protocol || true +2026-06-21T01:29:26.3975144Z  echo CARGO_REGISTRIES_CRATES_IO_PROTOCOL=git >> $GITHUB_ENV +2026-06-21T01:29:26.3975740Z  fi +2026-06-21T01:29:26.3975994Z fi +2026-06-21T01:29:26.4010837Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:26.4011247Z env: +2026-06-21T01:29:26.4011533Z CARGO_TERM_COLOR: always +2026-06-21T01:29:26.4011919Z RUST_BACKTRACE: short +2026-06-21T01:29:26.4012452Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:26.4013186Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:29:26.4013516Z CARGO_INCREMENTAL: 0 +2026-06-21T01:29:26.4013793Z ##[endgroup] +2026-06-21T01:29:26.4418161Z ##[group]Run : work around spurious network errors in curl 8.0 +2026-06-21T01:29:26.4418717Z : work around spurious network errors in curl 8.0 +2026-06-21T01:29:26.4419511Z # https://rust-lang.zulipchat.com/#narrow/stream/246057-t-cargo/topic/timeout.20investigation +2026-06-21T01:29:26.4420208Z if rustc +stable --version --verbose | grep -q '^release: 1\.7[01]\.'; then +2026-06-21T01:29:26.4420741Z  echo CARGO_HTTP_MULTIPLEXING=false >> $GITHUB_ENV +2026-06-21T01:29:26.4421136Z fi +2026-06-21T01:29:26.4459201Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:26.4459625Z env: +2026-06-21T01:29:26.4459895Z CARGO_TERM_COLOR: always +2026-06-21T01:29:26.4460213Z RUST_BACKTRACE: short +2026-06-21T01:29:26.4460760Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:26.4461343Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:29:26.4461666Z CARGO_INCREMENTAL: 0 +2026-06-21T01:29:26.4461943Z ##[endgroup] +2026-06-21T01:29:26.4712651Z ##[group]Run rustc +stable --version --verbose +2026-06-21T01:29:26.4713118Z rustc +stable --version --verbose +2026-06-21T01:29:26.4750491Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:26.4750909Z env: +2026-06-21T01:29:26.4751175Z CARGO_TERM_COLOR: always +2026-06-21T01:29:26.4751479Z RUST_BACKTRACE: short +2026-06-21T01:29:26.4752012Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:26.4752591Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:29:26.4752908Z CARGO_INCREMENTAL: 0 +2026-06-21T01:29:26.4753189Z ##[endgroup] +2026-06-21T01:29:26.4953006Z rustc 1.96.0 (ac68faa20 2026-05-25) +2026-06-21T01:29:26.4953641Z binary: rustc +2026-06-21T01:29:26.4954244Z commit-hash: ac68faa20c58cbccd01ee7208bf3b6e93a7d7f96 +2026-06-21T01:29:26.4955207Z commit-date: 2026-05-25 +2026-06-21T01:29:26.4956014Z host: x86_64-unknown-linux-gnu +2026-06-21T01:29:26.4956473Z release: 1.96.0 +2026-06-21T01:29:26.4956864Z LLVM version: 22.1.2 +2026-06-21T01:29:26.5121513Z ##[group]Run Swatinem/rust-cache@v2 +2026-06-21T01:29:26.5121876Z with: +2026-06-21T01:29:26.5122142Z cache-on-failure: true +2026-06-21T01:29:26.5122438Z prefix-key: v0-rust +2026-06-21T01:29:26.5122717Z add-job-id-key: true +2026-06-21T01:29:26.5123018Z add-rust-environment-hash-key: true +2026-06-21T01:29:26.5123358Z cache-targets: true +2026-06-21T01:29:26.5123841Z cache-all-crates: false +2026-06-21T01:29:26.5124141Z cache-workspace-crates: false +2026-06-21T01:29:26.5124442Z save-if: true +2026-06-21T01:29:26.5124706Z cache-provider: github +2026-06-21T01:29:26.5124987Z cache-bin: true +2026-06-21T01:29:26.5125249Z lookup-only: false +2026-06-21T01:29:26.5125756Z cmd-format: {0} +2026-06-21T01:29:26.5126012Z env: +2026-06-21T01:29:26.5126262Z CARGO_TERM_COLOR: always +2026-06-21T01:29:26.5126550Z RUST_BACKTRACE: short +2026-06-21T01:29:26.5127078Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:26.5127702Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:29:26.5128019Z CARGO_INCREMENTAL: 0 +2026-06-21T01:29:26.5128289Z ##[endgroup] +2026-06-21T01:29:26.8046018Z (node:2367) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead. +2026-06-21T01:29:26.8046799Z (Use `node --trace-deprecation ...` to show where the warning was created) +2026-06-21T01:29:29.2292291Z ##[group]Cache Configuration +2026-06-21T01:29:29.2292906Z Cache Provider: +2026-06-21T01:29:29.2293245Z github +2026-06-21T01:29:29.2293547Z Workspaces: +2026-06-21T01:29:29.2293967Z /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts +2026-06-21T01:29:29.2294522Z Cache Paths: +2026-06-21T01:29:29.2294844Z /home/runner/.cargo/bin +2026-06-21T01:29:29.2295238Z /home/runner/.cargo/.crates.toml +2026-06-21T01:29:29.2295890Z /home/runner/.cargo/.crates2.json +2026-06-21T01:29:29.2296301Z /home/runner/.cargo/registry +2026-06-21T01:29:29.2296729Z /home/runner/.cargo/git +2026-06-21T01:29:29.2297270Z /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/target +2026-06-21T01:29:29.2297865Z Restore Key: +2026-06-21T01:29:29.2298224Z v0-rust-wasm-check-Linux-x64-1f47b3b1 +2026-06-21T01:29:29.2298643Z Cache Key: +2026-06-21T01:29:29.2299024Z v0-rust-wasm-check-Linux-x64-1f47b3b1-8243978e +2026-06-21T01:29:29.2299504Z .. Prefix: +2026-06-21T01:29:29.2299855Z - v0-rust-wasm-check-Linux-x64 +2026-06-21T01:29:29.2300273Z .. Environment considered: +2026-06-21T01:29:29.2300634Z - Rust Versions: +2026-06-21T01:29:29.2301157Z - 1.96.0 x86_64-unknown-linux-gnu ac68faa20c58cbccd01ee7208bf3b6e93a7d7f96 +2026-06-21T01:29:29.2301942Z - 1.96.0 x86_64-unknown-linux-gnu ac68faa20c58cbccd01ee7208bf3b6e93a7d7f96 +2026-06-21T01:29:29.2302498Z - CARGO_HOME +2026-06-21T01:29:29.2302817Z - CARGO_INCREMENTAL +2026-06-21T01:29:29.2303158Z - CARGO_TERM_COLOR +2026-06-21T01:29:29.2303488Z - RUST_BACKTRACE +2026-06-21T01:29:29.2303828Z .. Lockfiles considered: +2026-06-21T01:29:29.2304438Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/.cargo/config.toml +2026-06-21T01:29:29.2305365Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/Cargo.toml +2026-06-21T01:29:29.2306548Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/common/Cargo.toml +2026-06-21T01:29:29.2307526Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/contracts/core/Cargo.toml +2026-06-21T01:29:29.2308532Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/Cargo.toml +2026-06-21T01:29:29.2309460Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/rust-toolchain.toml +2026-06-21T01:29:29.2310347Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/token-bridge/Cargo.toml +2026-06-21T01:29:29.2310995Z ##[endgroup] +2026-06-21T01:29:29.2311121Z +2026-06-21T01:29:29.2311212Z ... Restoring cache ... +2026-06-21T01:29:29.2918534Z Cache hit for: v0-rust-wasm-check-Linux-x64-1f47b3b1-8243978e +2026-06-21T01:29:29.5607961Z Received 39797766 of 39797766 (100.0%), 172.5 MBs/sec +2026-06-21T01:29:29.5608646Z Cache Size: ~38 MB (39797766 B) +2026-06-21T01:29:29.5611410Z [command]/usr/bin/tar -xf /home/runner/work/_temp/66262c31-d013-4445-997a-dae26382e1c1/cache.tzst -P -C /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts --use-compress-program unzstd +2026-06-21T01:29:29.7734809Z Cache restored successfully +2026-06-21T01:29:29.7758522Z Restored from cache key "v0-rust-wasm-check-Linux-x64-1f47b3b1-8243978e" full match: true. +2026-06-21T01:29:29.7925368Z ##[group]Run cargo check -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge --target wasm32v1-none +2026-06-21T01:29:29.7926603Z cargo check -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge --target wasm32v1-none +2026-06-21T01:29:29.7961827Z shell: /usr/bin/bash -e {0} +2026-06-21T01:29:29.7962103Z env: +2026-06-21T01:29:29.7962321Z CARGO_TERM_COLOR: always +2026-06-21T01:29:29.7962571Z RUST_BACKTRACE: short +2026-06-21T01:29:29.7963052Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:29.7963612Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:29:29.7963877Z CARGO_INCREMENTAL: 0 +2026-06-21T01:29:29.7964106Z CACHE_ON_FAILURE: true +2026-06-21T01:29:29.7964335Z ##[endgroup] +2026-06-21T01:29:30.0207672Z  Updating crates.io index +2026-06-21T01:29:31.0092472Z  Locking 212 packages to latest compatible versions +2026-06-21T01:29:31.0131725Z  Adding arbitrary v1.3.2 (available: v1.4.2) +2026-06-21T01:29:31.0226177Z  Adding crypto-common v0.1.6 (available: v0.1.7) +2026-06-21T01:29:31.0287201Z  Adding derive_arbitrary v1.3.2 (available: v1.4.2) +2026-06-21T01:29:31.0562527Z  Adding rand v0.8.6 (available: v0.10.1) +2026-06-21T01:29:31.0660248Z  Adding sha2 v0.10.9 (available: v0.11.0) +2026-06-21T01:29:31.0996225Z  Adding toml v0.8.23 (available: v1.1.2+spec-1.1.0) +2026-06-21T01:29:31.7779913Z  Compiling syn v2.0.118 +2026-06-21T01:29:31.7782909Z  Compiling serde_json v1.0.150 +2026-06-21T01:29:31.7825663Z  Compiling crypto-common v0.1.6 +2026-06-21T01:29:31.7827208Z  Compiling block-buffer v0.10.4 +2026-06-21T01:29:31.9867613Z  Compiling digest v0.10.7 +2026-06-21T01:29:31.9868300Z  Compiling cpufeatures v0.2.17 +2026-06-21T01:29:32.0281443Z  Compiling data-encoding v2.11.0 +2026-06-21T01:29:32.1290489Z  Compiling cfg-if v1.0.4 +2026-06-21T01:29:32.1600427Z  Compiling sha2 v0.10.9 +2026-06-21T01:29:32.6052281Z  Compiling ethnum v1.5.3 +2026-06-21T01:29:32.8987425Z  Compiling escape-bytes v0.1.1 +2026-06-21T01:29:32.9767342Z  Compiling num-traits v0.2.19 +2026-06-21T01:29:33.1183193Z  Compiling semver v1.0.28 +2026-06-21T01:29:33.3036778Z  Compiling either v1.16.0 +2026-06-21T01:29:33.4297107Z  Compiling hashbrown v0.17.1 +2026-06-21T01:29:33.4633313Z  Compiling itertools v0.13.0 +2026-06-21T01:29:33.9987113Z  Compiling equivalent v1.0.2 +2026-06-21T01:29:34.0396999Z  Compiling thiserror v1.0.69 +2026-06-21T01:29:34.1147494Z  Compiling indexmap v2.14.0 +2026-06-21T01:29:34.4027130Z  Compiling fnv v1.0.7 +2026-06-21T01:29:34.4447250Z  Compiling prettyplease v0.2.37 +2026-06-21T01:29:34.7208629Z  Compiling darling_core v0.23.0 +2026-06-21T01:29:34.8481541Z  Compiling wasmparser v0.116.1 +2026-06-21T01:29:34.9157840Z  Compiling darling_core v0.20.11 +2026-06-21T01:29:37.5347391Z  Compiling serde_derive v1.0.228 +2026-06-21T01:29:38.4267187Z  Compiling cfg_eval v0.1.2 +2026-06-21T01:29:38.6347686Z  Compiling darling_macro v0.23.0 +2026-06-21T01:29:38.7277064Z  Compiling thiserror-impl v1.0.69 +2026-06-21T01:29:38.9857051Z  Compiling darling v0.23.0 +2026-06-21T01:29:39.0216888Z  Compiling serde_with_macros v3.21.0 +2026-06-21T01:29:40.3956967Z  Compiling num-derive v0.4.2 +2026-06-21T01:29:40.5256759Z  Checking byteorder v1.5.0 +2026-06-21T01:29:40.6317687Z  Compiling base64 v0.22.1 +2026-06-21T01:29:40.9337358Z  Compiling heapless v0.8.0 +2026-06-21T01:29:41.2470968Z  Checking hash32 v0.3.1 +2026-06-21T01:29:41.3297153Z  Compiling darling_macro v0.20.11 +2026-06-21T01:29:41.7537237Z  Compiling serde v1.0.228 +2026-06-21T01:29:41.8067178Z  Compiling num-integer v0.1.46 +2026-06-21T01:29:41.8907247Z  Compiling rustc_version v0.4.1 +2026-06-21T01:29:42.1487691Z  Compiling static_assertions v1.1.0 +2026-06-21T01:29:42.2198058Z  Checking stable_deref_trait v1.2.1 +2026-06-21T01:29:42.2487132Z  Compiling crate-git-revision v0.0.6 +2026-06-21T01:29:42.3006670Z  Compiling schemars v0.8.22 +2026-06-21T01:29:42.4977490Z  Compiling stellar-strkey v0.0.13 +2026-06-21T01:29:42.6257016Z  Compiling stellar-xdr v26.0.1 +2026-06-21T01:29:42.7567103Z  Compiling hex v0.4.3 +2026-06-21T01:29:42.8047472Z  Compiling soroban-env-common v26.1.3 +2026-06-21T01:29:42.9887048Z  Compiling stellar-strkey v0.0.16 +2026-06-21T01:29:43.0606965Z  Compiling soroban-sdk v26.1.0 +2026-06-21T01:29:43.2137807Z  Compiling num-bigint v0.4.6 +2026-06-21T01:29:43.4657121Z  Compiling serde_with v3.21.0 +2026-06-21T01:29:44.1167973Z  Compiling darling v0.20.11 +2026-06-21T01:29:44.1547658Z  Compiling macro-string v0.1.4 +2026-06-21T01:29:44.6647128Z  Compiling heck v0.5.0 +2026-06-21T01:29:44.8527347Z  Compiling bytes-lit v0.0.5 +2026-06-21T01:29:45.0858678Z  Compiling visibility v0.1.1 +2026-06-21T01:29:59.0382566Z  Compiling soroban-spec v26.1.0 +2026-06-21T01:29:59.1517590Z  Compiling soroban-spec-rust v26.1.0 +2026-06-21T01:30:00.0382393Z  Compiling soroban-env-macros v26.1.3 +2026-06-21T01:30:02.3364063Z  Checking soroban-env-guest v26.1.3 +2026-06-21T01:30:02.5115845Z  Compiling soroban-sdk-macros v26.1.0 +2026-06-21T01:30:05.2015274Z  Checking orbitchain-common v0.1.0 (/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/common) +2026-06-21T01:30:05.2017200Z  Checking orbitchain-core v0.1.0 (/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/contracts/core) +2026-06-21T01:30:05.2689091Z  Checking orbitchain-token-bridge v0.1.0 (/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/token-bridge) +2026-06-21T01:30:05.2690717Z  Checking orbitchain-campaign v0.1.0 (/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign) +2026-06-21T01:30:05.4062341Z warning: unused import: `Address` +2026-06-21T01:30:05.4063323Z --> campaign/src/contract.rs:6:37 +2026-06-21T01:30:05.4064275Z | +2026-06-21T01:30:05.4072815Z 6 | use soroban_sdk::{panic_with_error, Address, Env}; +2026-06-21T01:30:05.4073700Z | ^^^^^^^ +2026-06-21T01:30:05.4074265Z | +2026-06-21T01:30:05.4074919Z = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default +2026-06-21T01:30:05.4075432Z +2026-06-21T01:30:05.6666796Z warning: `orbitchain-campaign` (lib) generated 1 warning (run `cargo fix --lib -p orbitchain-campaign` to apply 1 suggestion) +2026-06-21T01:30:05.6667757Z  Finished `dev` profile [unoptimized + debuginfo] target(s) in 35.83s +2026-06-21T01:30:05.7279777Z Post job cleanup. +2026-06-21T01:30:06.0119028Z Cache up-to-date. +2026-06-21T01:30:06.0121745Z (node:3491) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead. +2026-06-21T01:30:06.0122586Z (Use `node --trace-deprecation ...` to show where the warning was created) +2026-06-21T01:30:06.0305232Z Node 20 is being deprecated. This workflow is running with Node 24 by default. If you need to temporarily use Node 20, you can set the ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true environment variable. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/ +2026-06-21T01:30:06.0306764Z Post job cleanup. +2026-06-21T01:30:06.1170318Z [command]/usr/bin/git version +2026-06-21T01:30:06.1209592Z git version 2.54.0 +2026-06-21T01:30:06.1244653Z Temporarily overriding HOME='/home/runner/work/_temp/734c3595-e843-4875-97af-a26dd5636539' before making global git config changes +2026-06-21T01:30:06.1245989Z Adding repository directory to the temporary git global config as a safe directory +2026-06-21T01:30:06.1250442Z [command]/usr/bin/git config --global --add safe.directory /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts +2026-06-21T01:30:06.1289836Z [command]/usr/bin/git config --local --name-only --get-regexp core\.sshCommand +2026-06-21T01:30:06.1325753Z [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || :" +2026-06-21T01:30:06.1567546Z [command]/usr/bin/git config --local --name-only --get-regexp http\.https\:\/\/github\.com\/\.extraheader +2026-06-21T01:30:06.1594791Z http.https://github.com/.extraheader +2026-06-21T01:30:06.1606998Z [command]/usr/bin/git config --local --unset-all http.https://github.com/.extraheader +2026-06-21T01:30:06.1644698Z [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http\.https\:\/\/github\.com\/\.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :" +2026-06-21T01:30:06.1884111Z [command]/usr/bin/git config --local --name-only --get-regexp ^includeIf\.gitdir: +2026-06-21T01:30:06.1919704Z [command]/usr/bin/git submodule foreach --recursive git config --local --show-origin --name-only --get-regexp remote.origin.url +2026-06-21T01:30:06.2320906Z Cleaning up orphan processes +2026-06-21T01:30:06.2623365Z ##[warning]Node.js 20 is deprecated. The following actions target Node.js 20 but are being forced to run on Node.js 24: actions/checkout@v4. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/ diff --git a/.ci_logs2/2_Format check.txt b/.ci_logs2/2_Format check.txt new file mode 100644 index 0000000..2dcf0bf --- /dev/null +++ b/.ci_logs2/2_Format check.txt @@ -0,0 +1,1088 @@ +2026-06-21T01:29:23.5240652Z Current runner version: '2.335.1' +2026-06-21T01:29:23.5277179Z ##[group]Runner Image Provisioner +2026-06-21T01:29:23.5278467Z Hosted Compute Agent +2026-06-21T01:29:23.5279444Z Version: 20260611.554 +2026-06-21T01:29:23.5280518Z Commit: 5e0782fdc9014723d3be820dd114dd31555c2bd1 +2026-06-21T01:29:23.5281688Z Build Date: 2026-06-11T21:40:46Z +2026-06-21T01:29:23.5282775Z Worker ID: {9c232506-fefe-4c59-b0b1-2edd6316e8ce} +2026-06-21T01:29:23.5284174Z Azure Region: northcentralus +2026-06-21T01:29:23.5285213Z ##[endgroup] +2026-06-21T01:29:23.5288831Z ##[group]Operating System +2026-06-21T01:29:23.5289984Z Ubuntu +2026-06-21T01:29:23.5290864Z 24.04.4 +2026-06-21T01:29:23.5291939Z LTS +2026-06-21T01:29:23.5292894Z ##[endgroup] +2026-06-21T01:29:23.5293873Z ##[group]Runner Image +2026-06-21T01:29:23.5294852Z Image: ubuntu-24.04 +2026-06-21T01:29:23.5295828Z Version: 20260615.205.1 +2026-06-21T01:29:23.5298416Z Included Software: https://github.com/actions/runner-images/blob/ubuntu24/20260615.205/images/ubuntu/Ubuntu2404-Readme.md +2026-06-21T01:29:23.5301362Z Image Release: https://github.com/actions/runner-images/releases/tag/ubuntu24%2F20260615.205 +2026-06-21T01:29:23.5303099Z ##[endgroup] +2026-06-21T01:29:23.5304960Z ##[group]GITHUB_TOKEN Permissions +2026-06-21T01:29:23.5308702Z Contents: read +2026-06-21T01:29:23.5309676Z Metadata: read +2026-06-21T01:29:23.5310705Z ##[endgroup] +2026-06-21T01:29:23.5313871Z Secret source: Actions +2026-06-21T01:29:23.5315586Z Prepare workflow directory +2026-06-21T01:29:23.5813054Z Prepare all required actions +2026-06-21T01:29:23.5870067Z Getting action download info +2026-06-21T01:29:23.8595120Z Download action repository 'actions/checkout@v4' (SHA:34e114876b0b11c390a56381ad16ebd13914f8d5) +2026-06-21T01:29:23.9379126Z Download action repository 'dtolnay/rust-toolchain@stable' (SHA:29eef336d9b2848a0b548edc03f92a220660cdb8) +2026-06-21T01:29:24.0838076Z Download action repository 'Swatinem/rust-cache@v2' (SHA:e18b497796c12c097a38f9edb9d0641fb99eee32) +2026-06-21T01:29:24.7288032Z Complete job name: Format check +2026-06-21T01:29:24.8070024Z Node 20 is being deprecated. This workflow is running with Node 24 by default. If you need to temporarily use Node 20, you can set the ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true environment variable. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/ +2026-06-21T01:29:24.8079824Z ##[group]Run actions/checkout@v4 +2026-06-21T01:29:24.8080671Z with: +2026-06-21T01:29:24.8081237Z repository: OrbitChainLabs/OrbitChain-Contracts +2026-06-21T01:29:24.8086115Z token: *** +2026-06-21T01:29:24.8086600Z ssh-strict: true +2026-06-21T01:29:24.8087290Z ssh-user: git +2026-06-21T01:29:24.8087785Z persist-credentials: true +2026-06-21T01:29:24.8088328Z clean: true +2026-06-21T01:29:24.8088824Z sparse-checkout-cone-mode: true +2026-06-21T01:29:24.8089403Z fetch-depth: 1 +2026-06-21T01:29:24.8089886Z fetch-tags: false +2026-06-21T01:29:24.8090381Z show-progress: true +2026-06-21T01:29:24.8090886Z lfs: false +2026-06-21T01:29:24.8091475Z submodules: false +2026-06-21T01:29:24.8091971Z set-safe-directory: true +2026-06-21T01:29:24.8092786Z env: +2026-06-21T01:29:24.8093258Z CARGO_TERM_COLOR: always +2026-06-21T01:29:24.8093786Z RUST_BACKTRACE: short +2026-06-21T01:29:24.8094734Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:24.8095744Z ##[endgroup] +2026-06-21T01:29:24.9063272Z Syncing repository: OrbitChainLabs/OrbitChain-Contracts +2026-06-21T01:29:24.9065619Z ##[group]Getting Git version info +2026-06-21T01:29:24.9066655Z Working directory is '/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts' +2026-06-21T01:29:24.9068461Z [command]/usr/bin/git version +2026-06-21T01:29:24.9165437Z git version 2.54.0 +2026-06-21T01:29:24.9220086Z ##[endgroup] +2026-06-21T01:29:24.9234233Z Temporarily overriding HOME='/home/runner/work/_temp/a700b0f7-3d9c-42f3-afd1-2bc5a51aacde' before making global git config changes +2026-06-21T01:29:24.9235949Z Adding repository directory to the temporary git global config as a safe directory +2026-06-21T01:29:24.9240411Z [command]/usr/bin/git config --global --add safe.directory /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts +2026-06-21T01:29:24.9290519Z Deleting the contents of '/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts' +2026-06-21T01:29:24.9294348Z ##[group]Initializing the repository +2026-06-21T01:29:24.9299504Z [command]/usr/bin/git init /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts +2026-06-21T01:29:24.9407525Z hint: Using 'master' as the name for the initial branch. This default branch name +2026-06-21T01:29:24.9409465Z hint: will change to "main" in Git 3.0. To configure the initial branch name +2026-06-21T01:29:24.9411266Z hint: to use in all of your new repositories, which will suppress this warning, +2026-06-21T01:29:24.9412436Z hint: call: +2026-06-21T01:29:24.9413282Z hint: +2026-06-21T01:29:24.9414252Z hint: git config --global init.defaultBranch +2026-06-21T01:29:24.9415451Z hint: +2026-06-21T01:29:24.9416527Z hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and +2026-06-21T01:29:24.9418269Z hint: 'development'. The just-created branch can be renamed via this command: +2026-06-21T01:29:24.9419624Z hint: +2026-06-21T01:29:24.9420135Z hint: git branch -m +2026-06-21T01:29:24.9420671Z hint: +2026-06-21T01:29:24.9421389Z hint: Disable this message with "git config set advice.defaultBranchName false" +2026-06-21T01:29:24.9422923Z Initialized empty Git repository in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/.git/ +2026-06-21T01:29:24.9425798Z [command]/usr/bin/git remote add origin https://github.com/OrbitChainLabs/OrbitChain-Contracts +2026-06-21T01:29:24.9468477Z ##[endgroup] +2026-06-21T01:29:24.9469876Z ##[group]Disabling automatic garbage collection +2026-06-21T01:29:24.9471514Z [command]/usr/bin/git config --local gc.auto 0 +2026-06-21T01:29:24.9499701Z ##[endgroup] +2026-06-21T01:29:24.9501035Z ##[group]Setting up auth +2026-06-21T01:29:24.9506303Z [command]/usr/bin/git config --local --name-only --get-regexp core\.sshCommand +2026-06-21T01:29:24.9539469Z [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || :" +2026-06-21T01:29:24.9885017Z [command]/usr/bin/git config --local --name-only --get-regexp http\.https\:\/\/github\.com\/\.extraheader +2026-06-21T01:29:24.9917788Z [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http\.https\:\/\/github\.com\/\.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :" +2026-06-21T01:29:25.0131263Z [command]/usr/bin/git config --local --name-only --get-regexp ^includeIf\.gitdir: +2026-06-21T01:29:25.0161708Z [command]/usr/bin/git submodule foreach --recursive git config --local --show-origin --name-only --get-regexp remote.origin.url +2026-06-21T01:29:25.0384227Z [command]/usr/bin/git config --local http.https://github.com/.extraheader AUTHORIZATION: basic *** +2026-06-21T01:29:25.0420001Z ##[endgroup] +2026-06-21T01:29:25.0420893Z ##[group]Fetching the repository +2026-06-21T01:29:25.0429550Z [command]/usr/bin/git -c protocol.version=2 fetch --no-tags --prune --no-recurse-submodules --depth=1 origin +59f3fe99e87bd5e1e546c9babe13e09825b65536:refs/remotes/pull/60/merge +2026-06-21T01:29:25.3652150Z From https://github.com/OrbitChainLabs/OrbitChain-Contracts +2026-06-21T01:29:25.3653625Z * [new ref] 59f3fe99e87bd5e1e546c9babe13e09825b65536 -> pull/60/merge +2026-06-21T01:29:25.3689983Z ##[endgroup] +2026-06-21T01:29:25.3691251Z ##[group]Determining the checkout info +2026-06-21T01:29:25.3692821Z ##[endgroup] +2026-06-21T01:29:25.3697378Z [command]/usr/bin/git sparse-checkout disable +2026-06-21T01:29:25.3743516Z [command]/usr/bin/git config --local --unset-all extensions.worktreeConfig +2026-06-21T01:29:25.3780421Z ##[group]Checking out the ref +2026-06-21T01:29:25.3781787Z [command]/usr/bin/git checkout --progress --force refs/remotes/pull/60/merge +2026-06-21T01:29:25.3935739Z Note: switching to 'refs/remotes/pull/60/merge'. +2026-06-21T01:29:25.3937262Z +2026-06-21T01:29:25.3938001Z You are in 'detached HEAD' state. You can look around, make experimental +2026-06-21T01:29:25.3939749Z changes and commit them, and you can discard any commits you make in this +2026-06-21T01:29:25.3941479Z state without impacting any branches by switching back to a branch. +2026-06-21T01:29:25.3943093Z +2026-06-21T01:29:25.3944121Z If you want to create a new branch to retain commits you create, you may +2026-06-21T01:29:25.3946220Z do so (now or later) by using -c with the switch command. Example: +2026-06-21T01:29:25.3947573Z +2026-06-21T01:29:25.3947981Z git switch -c +2026-06-21T01:29:25.3948642Z +2026-06-21T01:29:25.3949091Z Or undo this operation with: +2026-06-21T01:29:25.3949793Z +2026-06-21T01:29:25.3950208Z git switch - +2026-06-21T01:29:25.3950756Z +2026-06-21T01:29:25.3951678Z Turn off this advice by setting config variable advice.detachedHead to false +2026-06-21T01:29:25.3953066Z +2026-06-21T01:29:25.3954688Z HEAD is now at 59f3fe9 Merge 9e85affabcadb1e696b876ca7eae8bad3de3c85d into dc3d5e2b821bb2a0f2655582265c562926415b02 +2026-06-21T01:29:25.3959347Z ##[endgroup] +2026-06-21T01:29:25.3985326Z [command]/usr/bin/git log -1 --format=%H +2026-06-21T01:29:25.4008226Z 59f3fe99e87bd5e1e546c9babe13e09825b65536 +2026-06-21T01:29:25.4689742Z ##[warning]Unexpected input(s) 'cache', valid inputs are ['toolchain', 'targets', 'target', 'components'] +2026-06-21T01:29:25.4715342Z ##[group]Run dtolnay/rust-toolchain@stable +2026-06-21T01:29:25.4716510Z with: +2026-06-21T01:29:25.4717475Z cache: false +2026-06-21T01:29:25.4718322Z toolchain: stable +2026-06-21T01:29:25.4719168Z env: +2026-06-21T01:29:25.4719956Z CARGO_TERM_COLOR: always +2026-06-21T01:29:25.4720904Z RUST_BACKTRACE: short +2026-06-21T01:29:25.4722663Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:25.4724572Z ##[endgroup] +2026-06-21T01:29:25.4878129Z ##[group]Run : parse toolchain version +2026-06-21T01:29:25.4879340Z : parse toolchain version +2026-06-21T01:29:25.4880415Z if [[ -z $toolchain ]]; then +2026-06-21T01:29:25.4882332Z  # GitHub does not enforce `required: true` inputs itself. https://github.com/actions/runner/issues/1070 +2026-06-21T01:29:25.4885345Z  echo "'toolchain' is a required input" >&2 +2026-06-21T01:29:25.4887729Z  exit 1 +2026-06-21T01:29:25.4889921Z elif [[ $toolchain =~ ^stable' '[0-9]+' '(year|month|week|day)s?' 'ago$ ]]; then +2026-06-21T01:29:25.4892756Z  if [[ Linux == macOS ]]; then +2026-06-21T01:29:25.4896187Z  echo "toolchain=1.$((($(date -v-$(sed 's/stable \([0-9]*\) \(.\).*/\1\2/' <<< $toolchain) +%s)/60/60/24-16569)/7/6))" >> $GITHUB_OUTPUT +2026-06-21T01:29:25.4899826Z  else +2026-06-21T01:29:25.4901521Z  echo "toolchain=1.$((($(date --date "${toolchain#stable }" +%s)/60/60/24-16569)/7/6))" >> $GITHUB_OUTPUT +2026-06-21T01:29:25.4903350Z  fi +2026-06-21T01:29:25.4904508Z elif [[ $toolchain =~ ^stable' 'minus' '[0-9]+' 'releases?$ ]]; then +2026-06-21T01:29:25.4908130Z  echo "toolchain=1.$((($(date +%s)/60/60/24-16569)/7/6-${toolchain//[^0-9]/}))" >> $GITHUB_OUTPUT +2026-06-21T01:29:25.4911301Z elif [[ $toolchain =~ ^1\.[0-9]+$ ]]; then +2026-06-21T01:29:25.4914842Z  echo "toolchain=1.$((i=${toolchain#1.}, c=($(date +%s)/60/60/24-16569)/7/6, i+9*i*(10*i<=c)+90*i*(100*i<=c)))" >> $GITHUB_OUTPUT +2026-06-21T01:29:25.4918456Z else +2026-06-21T01:29:25.4920157Z  echo "toolchain=$toolchain" >> $GITHUB_OUTPUT +2026-06-21T01:29:25.4922250Z fi +2026-06-21T01:29:25.5141857Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:25.5143157Z env: +2026-06-21T01:29:25.5143904Z CARGO_TERM_COLOR: always +2026-06-21T01:29:25.5144850Z RUST_BACKTRACE: short +2026-06-21T01:29:25.5147138Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:25.5149073Z toolchain: stable +2026-06-21T01:29:25.5149901Z ##[endgroup] +2026-06-21T01:29:25.5374441Z ##[group]Run : construct rustup command line +2026-06-21T01:29:25.5376506Z : construct rustup command line +2026-06-21T01:29:25.5379734Z echo "targets=$(for t in ${targets//,/ }; do echo -n ' --target' $t; done)" >> $GITHUB_OUTPUT +2026-06-21T01:29:25.5383971Z echo "components=$(for c in ${components//,/ }; do echo -n ' --component' $c; done)" >> $GITHUB_OUTPUT +2026-06-21T01:29:25.5387471Z echo "downgrade=" >> $GITHUB_OUTPUT +2026-06-21T01:29:25.5435872Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:25.5438311Z env: +2026-06-21T01:29:25.5439602Z CARGO_TERM_COLOR: always +2026-06-21T01:29:25.5441293Z RUST_BACKTRACE: short +2026-06-21T01:29:25.5444499Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:25.5448277Z targets: +2026-06-21T01:29:25.5449567Z components: +2026-06-21T01:29:25.5450914Z ##[endgroup] +2026-06-21T01:29:25.5638170Z ##[group]Run : set $CARGO_HOME +2026-06-21T01:29:25.5639906Z : set $CARGO_HOME +2026-06-21T01:29:25.5642280Z echo CARGO_HOME=${CARGO_HOME:-"$HOME/.cargo"} >> $GITHUB_ENV +2026-06-21T01:29:25.5690915Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:25.5693092Z env: +2026-06-21T01:29:25.5694359Z CARGO_TERM_COLOR: always +2026-06-21T01:29:25.5695882Z RUST_BACKTRACE: short +2026-06-21T01:29:25.5699070Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:25.5702310Z ##[endgroup] +2026-06-21T01:29:25.5838242Z ##[group]Run : install rustup if needed +2026-06-21T01:29:25.5839357Z : install rustup if needed +2026-06-21T01:29:25.5840508Z if ! command -v rustup &>/dev/null; then +2026-06-21T01:29:25.5843220Z  curl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused --location --silent --show-error --fail https://sh.rustup.rs | sh -s -- --default-toolchain none -y +2026-06-21T01:29:25.5845956Z  echo "$CARGO_HOME/bin" >> $GITHUB_PATH +2026-06-21T01:29:25.5847294Z fi +2026-06-21T01:29:25.5878320Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:25.5879585Z env: +2026-06-21T01:29:25.5880327Z CARGO_TERM_COLOR: always +2026-06-21T01:29:25.5881272Z RUST_BACKTRACE: short +2026-06-21T01:29:25.5882938Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:25.5884824Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:29:25.5885799Z ##[endgroup] +2026-06-21T01:29:25.6020671Z ##[group]Run rustup toolchain install stable --profile minimal --no-self-update +2026-06-21T01:29:25.6022623Z rustup toolchain install stable --profile minimal --no-self-update +2026-06-21T01:29:25.6054727Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:25.6055975Z env: +2026-06-21T01:29:25.6056706Z CARGO_TERM_COLOR: always +2026-06-21T01:29:25.6057887Z RUST_BACKTRACE: short +2026-06-21T01:29:25.6059543Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:25.6061444Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:29:25.6062455Z RUSTUP_PERMIT_COPY_RENAME: 1 +2026-06-21T01:29:25.6063372Z ##[endgroup] +2026-06-21T01:29:25.8575850Z info: syncing channel updates for stable-x86_64-unknown-linux-gnu +2026-06-21T01:29:26.0316267Z +2026-06-21T01:29:26.0400121Z stable-x86_64-unknown-linux-gnu unchanged - rustc 1.96.0 (ac68faa20 2026-05-25) +2026-06-21T01:29:26.0401443Z +2026-06-21T01:29:26.0518931Z ##[group]Run rustup default stable +2026-06-21T01:29:26.0520171Z rustup default stable +2026-06-21T01:29:26.0555830Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:26.0557438Z env: +2026-06-21T01:29:26.0558586Z CARGO_TERM_COLOR: always +2026-06-21T01:29:26.0559667Z RUST_BACKTRACE: short +2026-06-21T01:29:26.0561891Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:26.0564035Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:29:26.0565150Z ##[endgroup] +2026-06-21T01:29:26.0683154Z info: using existing install for stable-x86_64-unknown-linux-gnu +2026-06-21T01:29:26.0691548Z info: default toolchain set to stable-x86_64-unknown-linux-gnu +2026-06-21T01:29:26.0692632Z +2026-06-21T01:29:26.0770308Z stable-x86_64-unknown-linux-gnu unchanged - rustc 1.96.0 (ac68faa20 2026-05-25) +2026-06-21T01:29:26.0775515Z info: note that the toolchain 'stable-x86_64-unknown-linux-gnu' is currently in use (overridden by '/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/rust-toolchain.toml') +2026-06-21T01:29:26.0778357Z +2026-06-21T01:29:26.0921458Z ##[group]Run : create cachekey +2026-06-21T01:29:26.0922542Z : create cachekey +2026-06-21T01:29:26.0924455Z DATE=$(rustc +stable --version --verbose | sed -ne 's/^commit-date: \(20[0-9][0-9]\)-\([01][0-9]\)-\([0-3][0-9]\)$/\1\2\3/p') +2026-06-21T01:29:26.0927166Z HASH=$(rustc +stable --version --verbose | sed -ne 's/^commit-hash: //p') +2026-06-21T01:29:26.0929095Z echo "cachekey=$(echo $DATE$HASH | head -c12)" >> $GITHUB_OUTPUT +2026-06-21T01:29:26.0964365Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:26.0965666Z env: +2026-06-21T01:29:26.0966479Z CARGO_TERM_COLOR: always +2026-06-21T01:29:26.0967739Z RUST_BACKTRACE: short +2026-06-21T01:29:26.0969447Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:26.0971347Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:29:26.0972364Z ##[endgroup] +2026-06-21T01:29:26.1589358Z ##[group]Run : disable incremental compilation +2026-06-21T01:29:26.1590650Z : disable incremental compilation +2026-06-21T01:29:26.1591943Z if [ -z "${CARGO_INCREMENTAL+set}" ]; then +2026-06-21T01:29:26.1593267Z  echo CARGO_INCREMENTAL=0 >> $GITHUB_ENV +2026-06-21T01:29:26.1594437Z fi +2026-06-21T01:29:26.1629010Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:26.1630294Z env: +2026-06-21T01:29:26.1631096Z CARGO_TERM_COLOR: always +2026-06-21T01:29:26.1632072Z RUST_BACKTRACE: short +2026-06-21T01:29:26.1633770Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:26.1635672Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:29:26.1636687Z ##[endgroup] +2026-06-21T01:29:26.1749414Z ##[group]Run : enable colors in Cargo output +2026-06-21T01:29:26.1750678Z : enable colors in Cargo output +2026-06-21T01:29:26.1751965Z if [ -z "${CARGO_TERM_COLOR+set}" ]; then +2026-06-21T01:29:26.1753389Z  echo CARGO_TERM_COLOR=always >> $GITHUB_ENV +2026-06-21T01:29:26.1754594Z fi +2026-06-21T01:29:26.1787681Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:26.1788992Z env: +2026-06-21T01:29:26.1789802Z CARGO_TERM_COLOR: always +2026-06-21T01:29:26.1790772Z RUST_BACKTRACE: short +2026-06-21T01:29:26.1792840Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:26.1794856Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:29:26.1795897Z CARGO_INCREMENTAL: 0 +2026-06-21T01:29:26.1797017Z ##[endgroup] +2026-06-21T01:29:26.1910784Z ##[group]Run : enable Cargo sparse registry +2026-06-21T01:29:26.1911983Z : enable Cargo sparse registry +2026-06-21T01:29:26.1913364Z # implemented in 1.66, stabilized in 1.68, made default in 1.70 +2026-06-21T01:29:26.1915868Z if [ -z "${CARGO_REGISTRIES_CRATES_IO_PROTOCOL+set}" -o -f "/home/runner/work/_temp"/.implicit_cargo_registries_crates_io_protocol ]; then +2026-06-21T01:29:26.1918732Z  if rustc +stable --version --verbose | grep -q '^release: 1\.6[89]\.'; then +2026-06-21T01:29:26.1921019Z  touch "/home/runner/work/_temp"/.implicit_cargo_registries_crates_io_protocol || true +2026-06-21T01:29:26.1923038Z  echo CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse >> $GITHUB_ENV +2026-06-21T01:29:26.1924910Z  elif rustc +stable --version --verbose | grep -q '^release: 1\.6[67]\.'; then +2026-06-21T01:29:26.1927270Z  touch "/home/runner/work/_temp"/.implicit_cargo_registries_crates_io_protocol || true +2026-06-21T01:29:26.1929260Z  echo CARGO_REGISTRIES_CRATES_IO_PROTOCOL=git >> $GITHUB_ENV +2026-06-21T01:29:26.1930615Z  fi +2026-06-21T01:29:26.1931390Z fi +2026-06-21T01:29:26.1964693Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:26.1965957Z env: +2026-06-21T01:29:26.1966970Z CARGO_TERM_COLOR: always +2026-06-21T01:29:26.1968032Z RUST_BACKTRACE: short +2026-06-21T01:29:26.1969707Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:26.1971577Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:29:26.1972579Z CARGO_INCREMENTAL: 0 +2026-06-21T01:29:26.1973445Z ##[endgroup] +2026-06-21T01:29:26.2361871Z ##[group]Run : work around spurious network errors in curl 8.0 +2026-06-21T01:29:26.2363407Z : work around spurious network errors in curl 8.0 +2026-06-21T01:29:26.2365561Z # https://rust-lang.zulipchat.com/#narrow/stream/246057-t-cargo/topic/timeout.20investigation +2026-06-21T01:29:26.2368077Z if rustc +stable --version --verbose | grep -q '^release: 1\.7[01]\.'; then +2026-06-21T01:29:26.2369793Z  echo CARGO_HTTP_MULTIPLEXING=false >> $GITHUB_ENV +2026-06-21T01:29:26.2371014Z fi +2026-06-21T01:29:26.2407012Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:26.2408328Z env: +2026-06-21T01:29:26.2409101Z CARGO_TERM_COLOR: always +2026-06-21T01:29:26.2410031Z RUST_BACKTRACE: short +2026-06-21T01:29:26.2411727Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:26.2413583Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:29:26.2414574Z CARGO_INCREMENTAL: 0 +2026-06-21T01:29:26.2415439Z ##[endgroup] +2026-06-21T01:29:26.2669608Z ##[group]Run rustc +stable --version --verbose +2026-06-21T01:29:26.2670888Z rustc +stable --version --verbose +2026-06-21T01:29:26.2705729Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:26.2707236Z env: +2026-06-21T01:29:26.2708025Z CARGO_TERM_COLOR: always +2026-06-21T01:29:26.2708963Z RUST_BACKTRACE: short +2026-06-21T01:29:26.2710692Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:26.2712583Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:29:26.2713577Z CARGO_INCREMENTAL: 0 +2026-06-21T01:29:26.2714431Z ##[endgroup] +2026-06-21T01:29:26.2897267Z rustc 1.96.0 (ac68faa20 2026-05-25) +2026-06-21T01:29:26.2898688Z binary: rustc +2026-06-21T01:29:26.2899852Z commit-hash: ac68faa20c58cbccd01ee7208bf3b6e93a7d7f96 +2026-06-21T01:29:26.2901985Z commit-date: 2026-05-25 +2026-06-21T01:29:26.2903560Z host: x86_64-unknown-linux-gnu +2026-06-21T01:29:26.2905223Z release: 1.96.0 +2026-06-21T01:29:26.2906625Z LLVM version: 22.1.2 +2026-06-21T01:29:26.3144205Z ##[group]Run Swatinem/rust-cache@v2 +2026-06-21T01:29:26.3145250Z with: +2026-06-21T01:29:26.3146019Z cache-on-failure: true +2026-06-21T01:29:26.3147275Z prefix-key: v0-rust +2026-06-21T01:29:26.3148155Z add-job-id-key: true +2026-06-21T01:29:26.3149087Z add-rust-environment-hash-key: true +2026-06-21T01:29:26.3150136Z cache-targets: true +2026-06-21T01:29:26.3151013Z cache-all-crates: false +2026-06-21T01:29:26.3151943Z cache-workspace-crates: false +2026-06-21T01:29:26.3152886Z save-if: true +2026-06-21T01:29:26.3153696Z cache-provider: github +2026-06-21T01:29:26.3154567Z cache-bin: true +2026-06-21T01:29:26.3155373Z lookup-only: false +2026-06-21T01:29:26.3156415Z cmd-format: {0} +2026-06-21T01:29:26.3157485Z env: +2026-06-21T01:29:26.3158243Z CARGO_TERM_COLOR: always +2026-06-21T01:29:26.3159154Z RUST_BACKTRACE: short +2026-06-21T01:29:26.3160783Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:26.3162635Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:29:26.3163611Z CARGO_INCREMENTAL: 0 +2026-06-21T01:29:26.3164447Z ##[endgroup] +2026-06-21T01:29:26.5996310Z (node:2386) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead. +2026-06-21T01:29:26.5999340Z (Use `node --trace-deprecation ...` to show where the warning was created) +2026-06-21T01:29:30.4318411Z ##[group]Cache Configuration +2026-06-21T01:29:30.4319148Z Cache Provider: +2026-06-21T01:29:30.4319523Z github +2026-06-21T01:29:30.4319799Z Workspaces: +2026-06-21T01:29:30.4320447Z /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts +2026-06-21T01:29:30.4321238Z Cache Paths: +2026-06-21T01:29:30.4321770Z /home/runner/.cargo/bin +2026-06-21T01:29:30.4322342Z /home/runner/.cargo/.crates.toml +2026-06-21T01:29:30.4322919Z /home/runner/.cargo/.crates2.json +2026-06-21T01:29:30.4323512Z /home/runner/.cargo/registry +2026-06-21T01:29:30.4324051Z /home/runner/.cargo/git +2026-06-21T01:29:30.4324782Z /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/target +2026-06-21T01:29:30.4325533Z Restore Key: +2026-06-21T01:29:30.4325983Z v0-rust-fmt-Linux-x64-1f47b3b1 +2026-06-21T01:29:30.4326513Z Cache Key: +2026-06-21T01:29:30.4327255Z v0-rust-fmt-Linux-x64-1f47b3b1-8243978e +2026-06-21T01:29:30.4327836Z .. Prefix: +2026-06-21T01:29:30.4328257Z - v0-rust-fmt-Linux-x64 +2026-06-21T01:29:30.4328754Z .. Environment considered: +2026-06-21T01:29:30.4329231Z - Rust Versions: +2026-06-21T01:29:30.4329903Z - 1.96.0 x86_64-unknown-linux-gnu ac68faa20c58cbccd01ee7208bf3b6e93a7d7f96 +2026-06-21T01:29:30.4330891Z - 1.96.0 x86_64-unknown-linux-gnu ac68faa20c58cbccd01ee7208bf3b6e93a7d7f96 +2026-06-21T01:29:30.4331592Z - CARGO_HOME +2026-06-21T01:29:30.4331857Z - CARGO_INCREMENTAL +2026-06-21T01:29:30.4332147Z - CARGO_TERM_COLOR +2026-06-21T01:29:30.4332419Z - RUST_BACKTRACE +2026-06-21T01:29:30.4332703Z .. Lockfiles considered: +2026-06-21T01:29:30.4333170Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/.cargo/config.toml +2026-06-21T01:29:30.4333826Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/Cargo.toml +2026-06-21T01:29:30.4334502Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/common/Cargo.toml +2026-06-21T01:29:30.4335238Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/contracts/core/Cargo.toml +2026-06-21T01:29:30.4336458Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/Cargo.toml +2026-06-21T01:29:30.4337959Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/rust-toolchain.toml +2026-06-21T01:29:30.4339110Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/token-bridge/Cargo.toml +2026-06-21T01:29:30.4340296Z ##[endgroup] +2026-06-21T01:29:30.4340557Z +2026-06-21T01:29:30.4340675Z ... Restoring cache ... +2026-06-21T01:29:30.5252663Z Cache hit for: v0-rust-fmt-Linux-x64-1f47b3b1-8243978e +2026-06-21T01:29:31.1393427Z Received 16348747 of 16348747 (100.0%), 31.2 MBs/sec +2026-06-21T01:29:31.1394326Z Cache Size: ~16 MB (16348747 B) +2026-06-21T01:29:31.1419330Z [command]/usr/bin/tar -xf /home/runner/work/_temp/413d3049-e073-4caa-80cf-7b60885f2d3b/cache.tzst -P -C /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts --use-compress-program unzstd +2026-06-21T01:29:31.2071314Z Cache restored successfully +2026-06-21T01:29:31.2074005Z Restored from cache key "v0-rust-fmt-Linux-x64-1f47b3b1-8243978e" full match: true. +2026-06-21T01:29:31.2213879Z ##[group]Run cargo fmt -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge -- --check +2026-06-21T01:29:31.2214858Z cargo fmt -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge -- --check +2026-06-21T01:29:31.2248429Z shell: /usr/bin/bash -e {0} +2026-06-21T01:29:31.2248704Z env: +2026-06-21T01:29:31.2248903Z CARGO_TERM_COLOR: always +2026-06-21T01:29:31.2249150Z RUST_BACKTRACE: short +2026-06-21T01:29:31.2249632Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:31.2250174Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:29:31.2250445Z CARGO_INCREMENTAL: 0 +2026-06-21T01:29:31.2250681Z CACHE_ON_FAILURE: true +2026-06-21T01:29:31.2250908Z ##[endgroup] +2026-06-21T01:29:31.8158550Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/contract.rs:3: +2026-06-21T01:29:31.8159292Z //! These are wired into the contract impl in `lib.rs` as methods on +2026-06-21T01:29:31.8159694Z //! `CampaignContract`. +2026-06-21T01:29:31.8159939Z +2026-06-21T01:29:31.8164129Z -use soroban_sdk::{panic_with_error, Address, Env}; +2026-06-21T01:29:31.8164536Z use crate::event; +2026-06-21T01:29:31.8164843Z use crate::storage::{get_campaign, is_frozen, set_campaign}; +2026-06-21T01:29:31.8165241Z use crate::types::{CampaignStatus, Error}; +2026-06-21T01:29:31.8165793Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/contract.rs:10: +2026-06-21T01:29:31.8166471Z use crate::{validate_campaign_transition, MAX_DEADLINE_GAP_SECONDS}; +2026-06-21T01:29:31.8167294Z +use soroban_sdk::{panic_with_error, Address, Env}; +2026-06-21T01:29:31.8167621Z +2026-06-21T01:29:31.8168105Z /// Issue #212 – End the campaign early (before deadline). +2026-06-21T01:29:31.8168441Z /// +2026-06-21T01:29:31.8168873Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/contract.rs:20: +2026-06-21T01:29:31.8169597Z /// - `Error::ContractFrozen` if contract is frozen (freeze invariant: all writes rejected) +2026-06-21T01:29:31.8170232Z /// - `Error::InvalidCampaignTransition` if campaign is already Ended or Cancelled +2026-06-21T01:29:31.8170707Z pub fn end_campaign(env: &Env) { +2026-06-21T01:29:31.8170994Z - let mut campaign = get_campaign(env) +2026-06-21T01:29:31.8171404Z - .unwrap_or_else(|| panic_with_error!(env, Error::NotInitialized)); +2026-06-21T01:29:31.8171802Z + let mut campaign = +2026-06-21T01:29:31.8172200Z + get_campaign(env).unwrap_or_else(|| panic_with_error!(env, Error::NotInitialized)); +2026-06-21T01:29:31.8172642Z +2026-06-21T01:29:31.8172855Z campaign.creator.require_auth(); +2026-06-21T01:29:31.8173130Z +2026-06-21T01:29:31.8173803Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/contract.rs:51: +2026-06-21T01:29:31.8174778Z /// - `Error::ContractFrozen` if contract is frozen (freeze invariant: all writes rejected) +2026-06-21T01:29:31.8175404Z /// - `Error::InvalidCampaignTransition` if campaign is already Cancelled +2026-06-21T01:29:31.8175830Z pub fn cancel_campaign(env: &Env) { +2026-06-21T01:29:31.8176125Z - let mut campaign = get_campaign(env) +2026-06-21T01:29:31.8176535Z - .unwrap_or_else(|| panic_with_error!(env, Error::NotInitialized)); +2026-06-21T01:29:31.8177069Z + let mut campaign = +2026-06-21T01:29:31.8177464Z + get_campaign(env).unwrap_or_else(|| panic_with_error!(env, Error::NotInitialized)); +2026-06-21T01:29:31.8177891Z +2026-06-21T01:29:31.8178108Z campaign.creator.require_auth(); +2026-06-21T01:29:31.8178369Z +2026-06-21T01:29:31.8178763Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/contract.rs:87: +2026-06-21T01:29:31.8179373Z /// - `Error::InvalidEndTime` if `new_end_time` is more than ten years out +2026-06-21T01:29:31.8179909Z /// - `Error::InvalidCampaignTransition` if campaign is not Active or GoalReached +2026-06-21T01:29:31.8180715Z pub fn extend_deadline(env: &Env, new_end_time: u64) { +2026-06-21T01:29:31.8181063Z - let mut campaign = get_campaign(env) +2026-06-21T01:29:31.8181450Z - .unwrap_or_else(|| panic_with_error!(env, Error::NotInitialized)); +2026-06-21T01:29:31.8181979Z + let mut campaign = +2026-06-21T01:29:31.8182373Z + get_campaign(env).unwrap_or_else(|| panic_with_error!(env, Error::NotInitialized)); +2026-06-21T01:29:31.8182796Z +2026-06-21T01:29:31.8182994Z campaign.creator.require_auth(); +2026-06-21T01:29:31.8183256Z +2026-06-21T01:29:31.8183652Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/contract.rs:128: +2026-06-21T01:29:31.8184133Z #[must_use] +2026-06-21T01:29:31.8184474Z pub fn get_campaign_status(env: &Env) -> crate::types::CampaignStatusResponse { +2026-06-21T01:29:31.8184917Z use crate::types::CampaignStatusResponse; +2026-06-21T01:29:31.8185197Z - +2026-06-21T01:29:31.8185389Z - let campaign = get_campaign(env) +2026-06-21T01:29:31.8185752Z - .unwrap_or_else(|| panic_with_error!(env, Error::NotInitialized)); +2026-06-21T01:29:31.8186112Z + +2026-06-21T01:29:31.8186290Z + let campaign = +2026-06-21T01:29:31.8186652Z + get_campaign(env).unwrap_or_else(|| panic_with_error!(env, Error::NotInitialized)); +2026-06-21T01:29:31.8187258Z +2026-06-21T01:29:31.8187452Z let now = env.ledger().timestamp(); +2026-06-21T01:29:31.8187769Z let days_remaining = if now < campaign.end_time { +2026-06-21T01:29:31.8262229Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/lib.rs:213: +2026-06-21T01:29:31.8262847Z // Update donor record +2026-06-21T01:29:31.8263203Z let existing_donor = get_donor(&env, &donor); +2026-06-21T01:29:31.8263623Z let is_new_donor = existing_donor.is_none(); +2026-06-21T01:29:31.8264314Z - let mut donor_record = existing_donor.unwrap_or_else(|| DonorRecord::new_for(donor.clone(), asset.clone())); +2026-06-21T01:29:31.8264965Z + let mut donor_record = +2026-06-21T01:29:31.8265491Z + existing_donor.unwrap_or_else(|| DonorRecord::new_for(donor.clone(), asset.clone())); +2026-06-21T01:29:31.8266029Z +2026-06-21T01:29:31.8266269Z donor_record.apply_donation( +2026-06-21T01:29:31.8266596Z &env, +2026-06-21T01:29:31.8364620Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/test/integration_tests.rs:93: +2026-06-21T01:29:31.8365404Z let end_time = env.ledger().timestamp() + 86_400; +2026-06-21T01:29:31.8365883Z let new_end_time = env.ledger().timestamp() + (2 * 86_400); +2026-06-21T01:29:31.8366295Z +2026-06-21T01:29:31.8366552Z - CampaignContract::initialize( +2026-06-21T01:29:31.8367245Z - env.clone(), +2026-06-21T01:29:31.8367543Z - creator, +2026-06-21T01:29:31.8367799Z - 1000, +2026-06-21T01:29:31.8368057Z - end_time, +2026-06-21T01:29:31.8368314Z - assets, +2026-06-21T01:29:31.8368583Z - milestones, +2026-06-21T01:29:31.8368862Z - 0, +2026-06-21T01:29:31.8369101Z - ) +2026-06-21T01:29:31.8369334Z - .unwrap(); +2026-06-21T01:29:31.8369838Z + CampaignContract::initialize(env.clone(), creator, 1000, end_time, assets, milestones, 0) +2026-06-21T01:29:31.8370422Z + .unwrap(); +2026-06-21T01:29:31.8370673Z +2026-06-21T01:29:31.8371025Z CampaignContract::extend_deadline(env.clone(), new_end_time); +2026-06-21T01:29:31.8371457Z +2026-06-21T01:29:31.8460468Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/test/negative_path_tests.rs:6: +2026-06-21T01:29:31.8461684Z #![cfg(test)] +2026-06-21T01:29:31.8462085Z +2026-06-21T01:29:31.8462703Z use soroban_sdk::testutils::{Address as AddressTestUtils, Ledger}; +2026-06-21T01:29:31.8463422Z -use soroban_sdk::{Address, Env, String, Vec, BytesN}; +2026-06-21T01:29:31.8463886Z +use soroban_sdk::{Address, BytesN, Env, String, Vec}; +2026-06-21T01:29:31.8464254Z +2026-06-21T01:29:31.8464485Z +use super::with_contract; +2026-06-21T01:29:31.8465194Z +use crate::storage::{get_campaign, set_campaign, set_donor, set_milestone}; +2026-06-21T01:29:31.8465695Z use crate::types::{ +2026-06-21T01:29:31.8466245Z - CampaignData, CampaignStatus, DonorRecord, AssetInfo, StellarAsset, MilestoneData, +2026-06-21T01:29:31.8467271Z - MilestoneStatus, Error, DataKey, +2026-06-21T01:29:31.8467752Z + AssetInfo, CampaignData, CampaignStatus, DataKey, DonorRecord, Error, MilestoneData, +2026-06-21T01:29:31.8468246Z + MilestoneStatus, StellarAsset, +2026-06-21T01:29:31.8468546Z }; +2026-06-21T01:29:31.8468866Z -use crate::storage::{set_campaign, set_donor, set_milestone, get_campaign}; +2026-06-21T01:29:31.8469344Z -use crate::{CampaignContract, MAX_DEADLINE_GAP_SECONDS}; +2026-06-21T01:29:31.8469712Z use crate::CampaignContractClient; +2026-06-21T01:29:31.8469997Z -use super::with_contract; +2026-06-21T01:29:31.8470305Z +use crate::{CampaignContract, MAX_DEADLINE_GAP_SECONDS}; +2026-06-21T01:29:31.8470633Z +2026-06-21T01:29:31.8470942Z /// Base ledger timestamp (1 year in seconds) so we can safely subtract +2026-06-21T01:29:31.8471377Z /// to simulate "past" end_times without underflow. +2026-06-21T01:29:31.8471992Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/test/negative_path_tests.rs:82: +2026-06-21T01:29:31.8472593Z set_donor(env, donor, &record); +2026-06-21T01:29:31.8472858Z } +2026-06-21T01:29:31.8473045Z +2026-06-21T01:29:31.8473238Z -fn create_donor_record( +2026-06-21T01:29:31.8473476Z - env: &Env, +2026-06-21T01:29:31.8473682Z - donor: &Address, +2026-06-21T01:29:31.8473911Z - total_donated: i128, +2026-06-21T01:29:31.8474159Z - refund_claimed: bool, +2026-06-21T01:29:31.8474388Z -) { +2026-06-21T01:29:31.8474771Z +fn create_donor_record(env: &Env, donor: &Address, total_donated: i128, refund_claimed: bool) { +2026-06-21T01:29:31.8475277Z let record = DonorRecord { +2026-06-21T01:29:31.8475539Z donor: donor.clone(), +2026-06-21T01:29:31.8475794Z total_donated, +2026-06-21T01:29:31.8476325Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/test/negative_path_tests.rs:132: +2026-06-21T01:29:31.8477088Z let creator = Address::generate(&env); +2026-06-21T01:29:31.8477445Z let end_time = env.ledger().timestamp() + 100_000; +2026-06-21T01:29:31.8477887Z let _ = CampaignContract::initialize( +2026-06-21T01:29:31.8478220Z - env.clone(), creator, 0, end_time, +2026-06-21T01:29:31.8478588Z - default_accepted_assets(&env), default_milestones(&env), 0, +2026-06-21T01:29:31.8478946Z + env.clone(), +2026-06-21T01:29:31.8479159Z + creator, +2026-06-21T01:29:31.8479358Z + 0, +2026-06-21T01:29:31.8479546Z + end_time, +2026-06-21T01:29:31.8479770Z + default_accepted_assets(&env), +2026-06-21T01:29:31.8480060Z + default_milestones(&env), +2026-06-21T01:29:31.8480309Z + 0, +2026-06-21T01:29:31.8480493Z ); +2026-06-21T01:29:31.8480666Z }); +2026-06-21T01:29:31.8480840Z } +2026-06-21T01:29:31.8481311Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/test/negative_path_tests.rs:147: +2026-06-21T01:29:31.8481889Z let creator = Address::generate(&env); +2026-06-21T01:29:31.8482240Z let end_time = env.ledger().timestamp() + 100_000; +2026-06-21T01:29:31.8482575Z let _ = CampaignContract::initialize( +2026-06-21T01:29:31.8482902Z - env.clone(), creator, -100, end_time, +2026-06-21T01:29:31.8483280Z - default_accepted_assets(&env), default_milestones(&env), 0, +2026-06-21T01:29:31.8483630Z + env.clone(), +2026-06-21T01:29:31.8483844Z + creator, +2026-06-21T01:29:31.8484045Z + -100, +2026-06-21T01:29:31.8484246Z + end_time, +2026-06-21T01:29:31.8484467Z + default_accepted_assets(&env), +2026-06-21T01:29:31.8484750Z + default_milestones(&env), +2026-06-21T01:29:31.8485005Z + 0, +2026-06-21T01:29:31.8485189Z ); +2026-06-21T01:29:31.8485509Z }); +2026-06-21T01:29:31.8485690Z } +2026-06-21T01:29:31.8486149Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/test/negative_path_tests.rs:163: +2026-06-21T01:29:31.8487039Z let creator = Address::generate(&env); +2026-06-21T01:29:31.8487367Z let end_time = env.ledger().timestamp() - 1; +2026-06-21T01:29:31.8487711Z let _ = CampaignContract::initialize( +2026-06-21T01:29:31.8488017Z - env.clone(), creator, 1000, end_time, +2026-06-21T01:29:31.8488385Z - default_accepted_assets(&env), default_milestones(&env), 0, +2026-06-21T01:29:31.8488733Z + env.clone(), +2026-06-21T01:29:31.8488954Z + creator, +2026-06-21T01:29:31.8489147Z + 1000, +2026-06-21T01:29:31.8489341Z + end_time, +2026-06-21T01:29:31.8489564Z + default_accepted_assets(&env), +2026-06-21T01:29:31.8489846Z + default_milestones(&env), +2026-06-21T01:29:31.8490104Z + 0, +2026-06-21T01:29:31.8490291Z ); +2026-06-21T01:29:31.8490462Z }); +2026-06-21T01:29:31.8490630Z } +2026-06-21T01:29:31.8491094Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/test/negative_path_tests.rs:179: +2026-06-21T01:29:31.8491701Z let end_time = env.ledger().timestamp() + 100_000; +2026-06-21T01:29:31.8492080Z let empty_assets: Vec = Vec::new(&env); +2026-06-21T01:29:31.8492431Z let _ = CampaignContract::initialize( +2026-06-21T01:29:31.8492731Z - env.clone(), creator, 1000, end_time, +2026-06-21T01:29:31.8493048Z - empty_assets, default_milestones(&env), 0, +2026-06-21T01:29:31.8493351Z + env.clone(), +2026-06-21T01:29:31.8493559Z + creator, +2026-06-21T01:29:31.8493753Z + 1000, +2026-06-21T01:29:31.8493940Z + end_time, +2026-06-21T01:29:31.8494142Z + empty_assets, +2026-06-21T01:29:31.8494383Z + default_milestones(&env), +2026-06-21T01:29:31.8494632Z + 0, +2026-06-21T01:29:31.8494815Z ); +2026-06-21T01:29:31.8494985Z }); +2026-06-21T01:29:31.8495153Z } +2026-06-21T01:29:31.8495610Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/test/negative_path_tests.rs:199: +2026-06-21T01:29:31.8496193Z issuer: Some(Address::generate(&env)), +2026-06-21T01:29:31.8496473Z }); +2026-06-21T01:29:31.8496685Z let _ = CampaignContract::initialize( +2026-06-21T01:29:31.8497108Z - env.clone(), creator, 1000, end_time, +2026-06-21T01:29:31.8497411Z - assets, default_milestones(&env), 0, +2026-06-21T01:29:31.8497694Z + env.clone(), +2026-06-21T01:29:31.8497905Z + creator, +2026-06-21T01:29:31.8498102Z + 1000, +2026-06-21T01:29:31.8498296Z + end_time, +2026-06-21T01:29:31.8498494Z + assets, +2026-06-21T01:29:31.8498706Z + default_milestones(&env), +2026-06-21T01:29:31.8498954Z + 0, +2026-06-21T01:29:31.8499142Z ); +2026-06-21T01:29:31.8499314Z }); +2026-06-21T01:29:31.8499487Z } +2026-06-21T01:29:31.8499937Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/test/negative_path_tests.rs:215: +2026-06-21T01:29:31.8500531Z let end_time = env.ledger().timestamp() + 100_000; +2026-06-21T01:29:31.8500927Z let empty_milestones: Vec = Vec::new(&env); +2026-06-21T01:29:31.8501301Z let _ = CampaignContract::initialize( +2026-06-21T01:29:31.8501604Z - env.clone(), creator, 1000, end_time, +2026-06-21T01:29:31.8501947Z - default_accepted_assets(&env), empty_milestones, 0, +2026-06-21T01:29:31.8502267Z + env.clone(), +2026-06-21T01:29:31.8502478Z + creator, +2026-06-21T01:29:31.8502686Z + 1000, +2026-06-21T01:29:31.8502875Z + end_time, +2026-06-21T01:29:31.8503098Z + default_accepted_assets(&env), +2026-06-21T01:29:31.8503375Z + empty_milestones, +2026-06-21T01:29:31.8503720Z + 0, +2026-06-21T01:29:31.8503915Z ); +2026-06-21T01:29:31.8504087Z }); +2026-06-21T01:29:31.8504257Z } +2026-06-21T01:29:31.8504709Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/test/negative_path_tests.rs:244: +2026-06-21T01:29:31.8505354Z }); +2026-06-21T01:29:31.8505547Z } +2026-06-21T01:29:31.8505759Z let _ = CampaignContract::initialize( +2026-06-21T01:29:31.8506060Z - env.clone(), creator, 6000, end_time, +2026-06-21T01:29:31.8506381Z - default_accepted_assets(&env), milestones, 0, +2026-06-21T01:29:31.8506687Z + env.clone(), +2026-06-21T01:29:31.8507036Z + creator, +2026-06-21T01:29:31.8507234Z + 6000, +2026-06-21T01:29:31.8507424Z + end_time, +2026-06-21T01:29:31.8507650Z + default_accepted_assets(&env), +2026-06-21T01:29:31.8507917Z + milestones, +2026-06-21T01:29:31.8508127Z + 0, +2026-06-21T01:29:31.8508314Z ); +2026-06-21T01:29:31.8508485Z }); +2026-06-21T01:29:31.8508653Z } +2026-06-21T01:29:31.8509111Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/test/negative_path_tests.rs:260: +2026-06-21T01:29:31.8509708Z let end_time = env.ledger().timestamp() + 100_000; +2026-06-21T01:29:31.8510087Z let mut milestones: Vec = Vec::new(&env); +2026-06-21T01:29:31.8510443Z milestones.push_back(MilestoneData { +2026-06-21T01:29:31.8510781Z - index: 0, target_amount: 500, released_amount: 0, +2026-06-21T01:29:31.8511085Z + index: 0, +2026-06-21T01:29:31.8511297Z + target_amount: 500, +2026-06-21T01:29:31.8511541Z + released_amount: 0, +2026-06-21T01:29:31.8511852Z description_hash: BytesN::from_array(&env, &[0u8; 32]), +2026-06-21T01:29:31.8512214Z status: MilestoneStatus::Locked, +2026-06-21T01:29:31.8512528Z - released_at: None, released_at_ledger: None, +2026-06-21T01:29:31.8512865Z - release_tx: None, released_to: None, +2026-06-21T01:29:31.8513158Z + released_at: None, +2026-06-21T01:29:31.8513412Z + released_at_ledger: None, +2026-06-21T01:29:31.8513678Z + release_tx: None, +2026-06-21T01:29:31.8513913Z + released_to: None, +2026-06-21T01:29:31.8514142Z }); +2026-06-21T01:29:31.8514354Z milestones.push_back(MilestoneData { +2026-06-21T01:29:31.8514682Z - index: 1, target_amount: 300, released_amount: 0, +2026-06-21T01:29:31.8514985Z + index: 1, +2026-06-21T01:29:31.8515195Z + target_amount: 300, +2026-06-21T01:29:31.8515435Z + released_amount: 0, +2026-06-21T01:29:31.8515738Z description_hash: BytesN::from_array(&env, &[0u8; 32]), +2026-06-21T01:29:31.8516092Z status: MilestoneStatus::Locked, +2026-06-21T01:29:31.8516400Z - released_at: None, released_at_ledger: None, +2026-06-21T01:29:31.8516937Z - release_tx: None, released_to: None, +2026-06-21T01:29:31.8517287Z + released_at: None, +2026-06-21T01:29:31.8517532Z + released_at_ledger: None, +2026-06-21T01:29:31.8517799Z + release_tx: None, +2026-06-21T01:29:31.8518032Z + released_to: None, +2026-06-21T01:29:31.8518254Z }); +2026-06-21T01:29:31.8518474Z let _ = CampaignContract::initialize( +2026-06-21T01:29:31.8518775Z - env.clone(), creator, 500, end_time, +2026-06-21T01:29:31.8519112Z - default_accepted_assets(&env), milestones, 0, +2026-06-21T01:29:31.8519418Z + env.clone(), +2026-06-21T01:29:31.8519631Z + creator, +2026-06-21T01:29:31.8519828Z + 500, +2026-06-21T01:29:31.8520027Z + end_time, +2026-06-21T01:29:31.8520250Z + default_accepted_assets(&env), +2026-06-21T01:29:31.8520519Z + milestones, +2026-06-21T01:29:31.8520727Z + 0, +2026-06-21T01:29:31.8520909Z ); +2026-06-21T01:29:31.8521077Z }); +2026-06-21T01:29:31.8521381Z } +2026-06-21T01:29:31.8521844Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/test/negative_path_tests.rs:290: +2026-06-21T01:29:31.8522440Z let end_time = env.ledger().timestamp() + 100_000; +2026-06-21T01:29:31.8522929Z let mut milestones: Vec = Vec::new(&env); +2026-06-21T01:29:31.8523283Z milestones.push_back(MilestoneData { +2026-06-21T01:29:31.8523604Z - index: 0, target_amount: 500, released_amount: 0, +2026-06-21T01:29:31.8523905Z + index: 0, +2026-06-21T01:29:31.8524115Z + target_amount: 500, +2026-06-21T01:29:31.8524354Z + released_amount: 0, +2026-06-21T01:29:31.8524667Z description_hash: BytesN::from_array(&env, &[0u8; 32]), +2026-06-21T01:29:31.8525026Z status: MilestoneStatus::Locked, +2026-06-21T01:29:31.8525356Z - released_at: None, released_at_ledger: None, +2026-06-21T01:29:31.8525690Z - release_tx: None, released_to: None, +2026-06-21T01:29:31.8525995Z + released_at: None, +2026-06-21T01:29:31.8526247Z + released_at_ledger: None, +2026-06-21T01:29:31.8526511Z + release_tx: None, +2026-06-21T01:29:31.8526887Z + released_to: None, +2026-06-21T01:29:31.8527124Z }); +2026-06-21T01:29:31.8527348Z let _ = CampaignContract::initialize( +2026-06-21T01:29:31.8527655Z - env.clone(), creator, 1000, end_time, +2026-06-21T01:29:31.8527983Z - default_accepted_assets(&env), milestones, 0, +2026-06-21T01:29:31.8528292Z + env.clone(), +2026-06-21T01:29:31.8528508Z + creator, +2026-06-21T01:29:31.8528715Z + 1000, +2026-06-21T01:29:31.8528908Z + end_time, +2026-06-21T01:29:31.8529132Z + default_accepted_assets(&env), +2026-06-21T01:29:31.8529405Z + milestones, +2026-06-21T01:29:31.8529616Z + 0, +2026-06-21T01:29:31.8529817Z ); +2026-06-21T01:29:31.8529993Z }); +2026-06-21T01:29:31.8530165Z } +2026-06-21T01:29:31.8530635Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/test/negative_path_tests.rs:375: +2026-06-21T01:29:31.8531218Z let creator = Address::generate(&env); +2026-06-21T01:29:31.8531566Z let end_time = env.ledger().timestamp() + 100_000; +2026-06-21T01:29:31.8531909Z let _ = CampaignContract::initialize( +2026-06-21T01:29:31.8532213Z - env.clone(), creator, 1000, end_time, +2026-06-21T01:29:31.8532588Z - default_accepted_assets(&env), default_milestones(&env), 100, +2026-06-21T01:29:31.8532955Z + env.clone(), +2026-06-21T01:29:31.8533176Z + creator, +2026-06-21T01:29:31.8533373Z + 1000, +2026-06-21T01:29:31.8533564Z + end_time, +2026-06-21T01:29:31.8533783Z + default_accepted_assets(&env), +2026-06-21T01:29:31.8534071Z + default_milestones(&env), +2026-06-21T01:29:31.8534333Z + 100, +2026-06-21T01:29:31.8534524Z ); +2026-06-21T01:29:31.8534733Z let donor = Address::generate(&env); +2026-06-21T01:29:31.8535123Z CampaignContract::donate(env.clone(), donor, 50, AssetInfo::Native); +2026-06-21T01:29:31.8535896Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/test/negative_path_tests.rs:506: +2026-06-21T01:29:31.8536534Z let creator = Address::generate(&env); +2026-06-21T01:29:31.8536989Z let end_time = env.ledger().timestamp() + 100_000; +2026-06-21T01:29:31.8537332Z let _ = CampaignContract::initialize( +2026-06-21T01:29:31.8537631Z - env.clone(), creator, 1000, end_time, +2026-06-21T01:29:31.8538001Z - default_accepted_assets(&env), default_milestones(&env), 0, +2026-06-21T01:29:31.8538353Z + env.clone(), +2026-06-21T01:29:31.8538568Z + creator, +2026-06-21T01:29:31.8538766Z + 1000, +2026-06-21T01:29:31.8538963Z + end_time, +2026-06-21T01:29:31.8539191Z + default_accepted_assets(&env), +2026-06-21T01:29:31.8539608Z + default_milestones(&env), +2026-06-21T01:29:31.8539864Z + 0, +2026-06-21T01:29:31.8540048Z ); +2026-06-21T01:29:31.8540274Z let mut campaign = get_campaign(&env).unwrap(); +2026-06-21T01:29:31.8540737Z campaign.status = CampaignStatus::GoalReached; +2026-06-21T01:29:31.8541429Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/test/negative_path_tests.rs:530: +2026-06-21T01:29:31.8542411Z // Initialize with future end_time, then manually set to past + Ended +2026-06-21T01:29:31.8543117Z let future_end = env.ledger().timestamp() + 100_000; +2026-06-21T01:29:31.8543473Z let _ = CampaignContract::initialize( +2026-06-21T01:29:31.8543799Z - env.clone(), creator.clone(), 1000, future_end, +2026-06-21T01:29:31.8544200Z - default_accepted_assets(&env), default_milestones(&env), 0, +2026-06-21T01:29:31.8544552Z + env.clone(), +2026-06-21T01:29:31.8544791Z + creator.clone(), +2026-06-21T01:29:31.8545017Z + 1000, +2026-06-21T01:29:31.8545216Z + future_end, +2026-06-21T01:29:31.8545451Z + default_accepted_assets(&env), +2026-06-21T01:29:31.8545736Z + default_milestones(&env), +2026-06-21T01:29:31.8545997Z + 0, +2026-06-21T01:29:31.8546183Z ); +2026-06-21T01:29:31.8546408Z let mut campaign = get_campaign(&env).unwrap(); +2026-06-21T01:29:31.8547190Z campaign.end_time = env.ledger().timestamp() - (31 * 24 * 60 * 60); +2026-06-21T01:29:31.8547855Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/test/negative_path_tests.rs:572: +2026-06-21T01:29:31.8548436Z let donor = Address::generate(&env); +2026-06-21T01:29:31.8548749Z create_donor_record(&env, &donor, 100, false); +2026-06-21T01:29:31.8549169Z let eligible = CampaignContract::is_refund_eligible(env.clone(), donor); +2026-06-21T01:29:31.8549740Z - assert!(!eligible, "Ended campaign with released milestone should not allow refunds"); +2026-06-21T01:29:31.8550191Z + assert!( +2026-06-21T01:29:31.8550385Z + !eligible, +2026-06-21T01:29:31.8550697Z + "Ended campaign with released milestone should not allow refunds" +2026-06-21T01:29:31.8551068Z + ); +2026-06-21T01:29:31.8551244Z }); +2026-06-21T01:29:31.8551424Z } +2026-06-21T01:29:31.8551591Z +2026-06-21T01:29:31.8552050Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/test/negative_path_tests.rs:731: +2026-06-21T01:29:31.8552625Z let donor = Address::generate(&env); +2026-06-21T01:29:31.8552941Z create_donor_record(&env, &donor, 500, false); +2026-06-21T01:29:31.8553368Z let eligible = CampaignContract::is_refund_eligible(env.clone(), donor); +2026-06-21T01:29:31.8553899Z - assert!(eligible, "Donor should be eligible for refund on cancelled campaign"); +2026-06-21T01:29:31.8554313Z + assert!( +2026-06-21T01:29:31.8554507Z + eligible, +2026-06-21T01:29:31.8554811Z + "Donor should be eligible for refund on cancelled campaign" +2026-06-21T01:29:31.8555152Z + ); +2026-06-21T01:29:31.8555329Z }); +2026-06-21T01:29:31.8555500Z } +2026-06-21T01:29:31.8555669Z +2026-06-21T01:29:31.8556123Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/test/negative_path_tests.rs:802: +2026-06-21T01:29:31.8557068Z // Initialize with future end_time, then manually set to exact boundary +2026-06-21T01:29:31.8557519Z let future_end = env.ledger().timestamp() + 100_000; +2026-06-21T01:29:31.8557868Z let _ = CampaignContract::initialize( +2026-06-21T01:29:31.8558203Z - env.clone(), creator.clone(), 1000, future_end, +2026-06-21T01:29:31.8558602Z - default_accepted_assets(&env), default_milestones(&env), 0, +2026-06-21T01:29:31.8558956Z + env.clone(), +2026-06-21T01:29:31.8559180Z + creator.clone(), +2026-06-21T01:29:31.8559408Z + 1000, +2026-06-21T01:29:31.8559781Z + future_end, +2026-06-21T01:29:31.8560027Z + default_accepted_assets(&env), +2026-06-21T01:29:31.8560315Z + default_milestones(&env), +2026-06-21T01:29:31.8560575Z + 0, +2026-06-21T01:29:31.8560877Z ); +2026-06-21T01:29:31.8561249Z let mut campaign = get_campaign(&env).unwrap(); +2026-06-21T01:29:31.8561981Z campaign.end_time = env.ledger().timestamp() - (30 * 24 * 60 * 60); +2026-06-21T01:29:31.8563124Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/test/negative_path_tests.rs:826: +2026-06-21T01:29:31.8564001Z // Initialize with future end_time, then manually set to just past boundary +2026-06-21T01:29:31.8564462Z let future_end = env.ledger().timestamp() + 100_000; +2026-06-21T01:29:31.8564824Z let _ = CampaignContract::initialize( +2026-06-21T01:29:31.8565160Z - env.clone(), creator.clone(), 1000, future_end, +2026-06-21T01:29:31.8565563Z - default_accepted_assets(&env), default_milestones(&env), 0, +2026-06-21T01:29:31.8565922Z + env.clone(), +2026-06-21T01:29:31.8566153Z + creator.clone(), +2026-06-21T01:29:31.8566381Z + 1000, +2026-06-21T01:29:31.8566586Z + future_end, +2026-06-21T01:29:31.8566987Z + default_accepted_assets(&env), +2026-06-21T01:29:31.8567279Z + default_milestones(&env), +2026-06-21T01:29:31.8567541Z + 0, +2026-06-21T01:29:31.8567728Z ); +2026-06-21T01:29:31.8567954Z let mut campaign = get_campaign(&env).unwrap(); +2026-06-21T01:29:31.8568366Z campaign.end_time = env.ledger().timestamp() - (30 * 24 * 60 * 60 + 1); +2026-06-21T01:29:31.8569057Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/test/negative_path_tests.rs:836: +2026-06-21T01:29:31.8569642Z let donor = Address::generate(&env); +2026-06-21T01:29:31.8569960Z create_donor_record(&env, &donor, 100, false); +2026-06-21T01:29:31.8570389Z let eligible = CampaignContract::is_refund_eligible(env.clone(), donor); +2026-06-21T01:29:31.8570893Z - assert!(!eligible, "Should NOT be eligible just past 30-day boundary"); +2026-06-21T01:29:31.8571278Z + assert!( +2026-06-21T01:29:31.8571478Z + !eligible, +2026-06-21T01:29:31.8571744Z + "Should NOT be eligible just past 30-day boundary" +2026-06-21T01:29:31.8572058Z + ); +2026-06-21T01:29:31.8572236Z }); +2026-06-21T01:29:31.8572419Z } +2026-06-21T01:29:31.8572592Z +2026-06-21T01:29:31.8573047Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/test/negative_path_tests.rs:864: +2026-06-21T01:29:31.8573740Z // Verify the contract is not frozen by default; upgrade should not panic on the +2026-06-21T01:29:31.8574273Z // freeze check (it will panic later when the deployer rejects the dummy hash, +2026-06-21T01:29:31.8574774Z // so we only assert that is_frozen returns false before the call). +2026-06-21T01:29:31.8575303Z - assert!(!crate::storage::is_frozen(&env), "Contract should not be frozen initially"); +2026-06-21T01:29:31.8575729Z + assert!( +2026-06-21T01:29:31.8575950Z + !crate::storage::is_frozen(&env), +2026-06-21T01:29:31.8576279Z + "Contract should not be frozen initially" +2026-06-21T01:29:31.8576563Z + ); +2026-06-21T01:29:31.8576864Z }); +2026-06-21T01:29:31.8577042Z } +2026-06-21T01:29:31.8577210Z +2026-06-21T01:29:31.8577664Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/test/negative_path_tests.rs:877: +2026-06-21T01:29:31.8578243Z CampaignContract::freeze(env.clone()); +2026-06-21T01:29:31.8578635Z assert!(crate::storage::is_frozen(&env), "Contract should be frozen"); +2026-06-21T01:29:31.8579044Z CampaignContract::unfreeze(env.clone()); +2026-06-21T01:29:31.8579503Z - assert!(!crate::storage::is_frozen(&env), "Contract should be unfrozen after unfreeze"); +2026-06-21T01:29:31.8580086Z + assert!( +2026-06-21T01:29:31.8580314Z + !crate::storage::is_frozen(&env), +2026-06-21T01:29:31.8580631Z + "Contract should be unfrozen after unfreeze" +2026-06-21T01:29:31.8580924Z + ); +2026-06-21T01:29:31.8581208Z }); +2026-06-21T01:29:31.8581377Z } +2026-06-21T01:29:31.8581541Z +2026-06-21T01:29:31.8581994Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/test/negative_path_tests.rs:906: +2026-06-21T01:29:31.8582569Z let creator = Address::generate(&env); +2026-06-21T01:29:31.8582902Z let end_time = env.ledger().timestamp() + 100_000; +2026-06-21T01:29:31.8583240Z let _ = CampaignContract::initialize( +2026-06-21T01:29:31.8583544Z - env.clone(), creator, 1000, end_time, +2026-06-21T01:29:31.8583916Z - default_accepted_assets(&env), default_milestones(&env), 0, +2026-06-21T01:29:31.8584270Z + env.clone(), +2026-06-21T01:29:31.8584496Z + creator, +2026-06-21T01:29:31.8584703Z + 1000, +2026-06-21T01:29:31.8584901Z + end_time, +2026-06-21T01:29:31.8585126Z + default_accepted_assets(&env), +2026-06-21T01:29:31.8585411Z + default_milestones(&env), +2026-06-21T01:29:31.8585673Z + 0, +2026-06-21T01:29:31.8585858Z ); +2026-06-21T01:29:31.8586035Z }); +2026-06-21T01:29:31.8586213Z } +2026-06-21T01:29:31.8586629Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/types.rs:1: +2026-06-21T01:29:31.8587373Z // src/types.rs +2026-06-21T01:29:31.8587572Z +2026-06-21T01:29:31.8587920Z -use soroban_sdk::{contracttype, contracterror, Address, BytesN, String, Vec, Env}; +2026-06-21T01:29:31.8588492Z +use soroban_sdk::{contracterror, contracttype, Address, BytesN, Env, String, Vec}; +2026-06-21T01:29:31.8588897Z +2026-06-21T01:29:31.8589435Z // ─── Error enum ─────────────────────────────────────────────────────────────── +2026-06-21T01:29:31.8589798Z +2026-06-21T01:29:31.8590199Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/types.rs:14: +2026-06-21T01:29:31.8590670Z pub enum Error { +2026-06-21T01:29:31.8591063Z // ── Requested contract error codes ──────────────────────────────────── +2026-06-21T01:29:31.8591534Z /// `initialize` called on an already-initialised contract. +2026-06-21T01:29:31.8591893Z - AlreadyInitialized = 1, +2026-06-21T01:29:31.8592171Z + AlreadyInitialized = 1, +2026-06-21T01:29:31.8592440Z /// Contract has not been initialised yet. +2026-06-21T01:29:31.8592737Z - NotInitialized = 2, +2026-06-21T01:29:31.8592996Z + NotInitialized = 2, +2026-06-21T01:29:31.8593287Z /// Caller is not authorised to perform the operation. +2026-06-21T01:29:31.8593611Z - Unauthorized = 3, +2026-06-21T01:29:31.8593862Z + Unauthorized = 3, +2026-06-21T01:29:31.8594113Z /// The campaign deadline has already passed. +2026-06-21T01:29:31.8594412Z - CampaignEnded = 4, +2026-06-21T01:29:31.8594682Z + CampaignEnded = 4, +2026-06-21T01:29:31.8595008Z /// Operation requires the campaign to be `Active` or `GoalReached`. +2026-06-21T01:29:31.8595391Z - CampaignNotActive = 5, +2026-06-21T01:29:31.8595670Z + CampaignNotActive = 5, +2026-06-21T01:29:31.8595979Z /// Donated asset is not in the campaign's accepted assets list. +2026-06-21T01:29:31.8596341Z - AssetNotAccepted = 6, +2026-06-21T01:29:31.8596600Z + AssetNotAccepted = 6, +2026-06-21T01:29:31.8597038Z /// Donation amount is below the campaign's minimum threshold. +2026-06-21T01:29:31.8597391Z - DonationTooSmall = 7, +2026-06-21T01:29:31.8597649Z + DonationTooSmall = 7, +2026-06-21T01:29:31.8597933Z /// Milestone index is out of range for this campaign. +2026-06-21T01:29:31.8598258Z - MilestoneNotFound = 8, +2026-06-21T01:29:31.8598517Z + MilestoneNotFound = 8, +2026-06-21T01:29:31.8598827Z /// Milestone has not been unlocked yet and cannot be released. +2026-06-21T01:29:31.8599332Z - MilestoneNotUnlocked = 9, +2026-06-21T01:29:31.8599610Z + MilestoneNotUnlocked = 9, +2026-06-21T01:29:31.8599975Z /// A previous milestone must be released before this one can be released. +2026-06-21T01:29:31.8600500Z PreviousMilestoneNotReleased = 10, +2026-06-21T01:29:31.8600840Z /// Cannot cancel the campaign while it still holds funds. +2026-06-21T01:29:31.8601378Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/types.rs:37: +2026-06-21T01:29:31.8601866Z - CannotCancelWithFunds = 11, +2026-06-21T01:29:31.8602146Z + CannotCancelWithFunds = 11, +2026-06-21T01:29:31.8602447Z /// Refunds are no longer permitted for this campaign. +2026-06-21T01:29:31.8602773Z - RefundWindowClosed = 12, +2026-06-21T01:29:31.8603055Z + RefundWindowClosed = 12, +2026-06-21T01:29:31.8603327Z /// `goal_amount` must be strictly positive. +2026-06-21T01:29:31.8603625Z - InvalidGoalAmount = 13, +2026-06-21T01:29:31.8603899Z + InvalidGoalAmount = 13, +2026-06-21T01:29:31.8604397Z /// `end_time` must be strictly greater than the current ledger timestamp. +2026-06-21T01:29:31.8604790Z - InvalidEndTime = 14, +2026-06-21T01:29:31.8605056Z + InvalidEndTime = 14, +2026-06-21T01:29:31.8605416Z /// Milestones must be strictly ascending and the last must equal `goal_amount`. +2026-06-21T01:29:31.8605834Z - InvalidMilestones = 15, +2026-06-21T01:29:31.8606104Z + InvalidMilestones = 15, +2026-06-21T01:29:31.8606448Z /// Contract does not hold enough funds to fulfil the requested transfer. +2026-06-21T01:29:31.8606994Z InsufficientContractBalance = 16, +2026-06-21T01:29:31.8607298Z /// A checked arithmetic operation overflowed. +2026-06-21T01:29:31.8607787Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/types.rs:49: +2026-06-21T01:29:31.8608266Z - Overflow = 17, +2026-06-21T01:29:31.8608515Z + Overflow = 17, +2026-06-21T01:29:31.8608720Z +2026-06-21T01:29:31.8609111Z // ── Additional contract errors ───────────────────────────────────────── +2026-06-21T01:29:31.8609514Z /// `accepted_assets` must be non-empty. +2026-06-21T01:29:31.8610000Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/types.rs:53: +2026-06-21T01:29:31.8610478Z - InvalidAssets = 18, +2026-06-21T01:29:31.8610740Z + InvalidAssets = 18, +2026-06-21T01:29:31.8611134Z /// `asset_code` must be non-empty and ≤ 12 characters (Stellar limit). +2026-06-21T01:29:31.8611521Z - InvalidAssetCode = 19, +2026-06-21T01:29:31.8611785Z + InvalidAssetCode = 19, +2026-06-21T01:29:31.8612095Z /// Last milestone `target_amount` does not equal `goal_amount`. +2026-06-21T01:29:31.8612448Z - MilestoneMismatch = 20, +2026-06-21T01:29:31.8612712Z + MilestoneMismatch = 20, +2026-06-21T01:29:31.8613030Z /// Milestone count must be in the range [1, MAX_MILESTONES]. +2026-06-21T01:29:31.8613388Z - InvalidMilestoneCount = 21, +2026-06-21T01:29:31.8613662Z + InvalidMilestoneCount = 21, +2026-06-21T01:29:31.8623947Z /// The requested campaign status transition is not permitted. +2026-06-21T01:29:31.8624426Z - InvalidCampaignTransition = 22, +2026-06-21T01:29:31.8624756Z + InvalidCampaignTransition = 22, +2026-06-21T01:29:31.8625121Z /// The requested milestone status transition is not permitted. +2026-06-21T01:29:31.8625507Z - InvalidMilestoneTransition = 23, +2026-06-21T01:29:31.8625813Z + InvalidMilestoneTransition = 23, +2026-06-21T01:29:31.8626269Z /// Cannot transition to `GoalReached` — raised amount < goal. +2026-06-21T01:29:31.8626642Z - GoalNotReached = 24, +2026-06-21T01:29:31.8627092Z + GoalNotReached = 24, +2026-06-21T01:29:31.8627322Z +2026-06-21T01:29:31.8627585Z /// A storage read returned an unexpectedly invalid value. +2026-06-21T01:29:31.8627942Z - InvalidStorageValue = 25, +2026-06-21T01:29:31.8628415Z + InvalidStorageValue = 25, +2026-06-21T01:29:31.8628763Z /// A storage write failed (entry too large, quota exceeded, etc.). +2026-06-21T01:29:31.8629142Z - StorageWriteError = 26, +2026-06-21T01:29:31.8629416Z + StorageWriteError = 26, +2026-06-21T01:29:31.8629789Z +2026-06-21T01:29:31.8630178Z // ── Asset / transfer ───────────────────────────────────────────────── 3x +2026-06-21T01:29:31.8630756Z /// Recipient address is the contract itself — would lock funds permanently. +2026-06-21T01:29:31.8631375Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/types.rs:74: +2026-06-21T01:29:31.8631868Z - InvalidRecipient = 30, +2026-06-21T01:29:31.8632155Z + InvalidRecipient = 30, +2026-06-21T01:29:31.8632525Z /// The asset has no issuer address; transfers require a token contract address. +2026-06-21T01:29:31.8632940Z - MissingIssuerAddress = 31, +2026-06-21T01:29:31.8633223Z + MissingIssuerAddress = 31, +2026-06-21T01:29:31.8633579Z /// Computed release amount is zero after proportional rounding. +2026-06-21T01:29:31.8633956Z - ZeroReleaseAmount = 32, +2026-06-21T01:29:31.8634228Z + ZeroReleaseAmount = 32, +2026-06-21T01:29:31.8634602Z /// `released_amount` already equals `target_amount`; nothing left to release. +2026-06-21T01:29:31.8635024Z - NothingToRelease = 33, +2026-06-21T01:29:31.8635298Z + NothingToRelease = 33, +2026-06-21T01:29:31.8635642Z /// `released_amount` would exceed `target_amount` after this operation. +2026-06-21T01:29:31.8636050Z MilestoneReleasedExceedsTarget = 34, +2026-06-21T01:29:31.8636326Z +2026-06-21T01:29:31.8636713Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/types.rs:84: +2026-06-21T01:29:31.8637521Z // ── Milestone ──────────────────────────────────────────────────────── 4x +2026-06-21T01:29:31.8637922Z /// Milestone is already in the `Released` state. +2026-06-21T01:29:31.8638244Z - MilestoneAlreadyReleased = 40, +2026-06-21T01:29:31.8638541Z + MilestoneAlreadyReleased = 40, +2026-06-21T01:29:31.8638918Z /// All milestones must be Released before the campaign can be concluded. +2026-06-21T01:29:31.8639322Z - UnreleasedMilestonesExist = 41, +2026-06-21T01:29:31.8639617Z + UnreleasedMilestonesExist = 41, +2026-06-21T01:29:31.8639878Z +2026-06-21T01:29:31.8640228Z // ── Refunds ────────────────────────────────────────────────────────── 5x +2026-06-21T01:29:31.8640807Z /// Refunds are only permitted when the campaign is `Cancelled` or +2026-06-21T01:29:31.8641414Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/types.rs:92: +2026-06-21T01:29:31.8641902Z /// `Ended` without reaching the goal. +2026-06-21T01:29:31.8642193Z - RefundNotPermitted = 50, +2026-06-21T01:29:31.8642470Z + RefundNotPermitted = 50, +2026-06-21T01:29:31.8642769Z /// No donor record found for the requesting address. +2026-06-21T01:29:31.8643085Z - NoDonorRecord = 51, +2026-06-21T01:29:31.8643354Z + NoDonorRecord = 51, +2026-06-21T01:29:31.8643647Z /// Donor has already claimed a refund for this campaign. +2026-06-21T01:29:31.8643984Z - RefundAlreadyClaimed = 52, +2026-06-21T01:29:31.8644279Z + RefundAlreadyClaimed = 52, +2026-06-21T01:29:31.8644623Z // RefundWindowClosed is defined above as RefundWindowClosed = 12 +2026-06-21T01:29:31.8644984Z +2026-06-21T01:29:31.8645364Z // ── Re-entrancy / concurrency ──────────────────────────────────────── 6x +2026-06-21T01:29:31.8645934Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/types.rs:101: +2026-06-21T01:29:31.8646456Z /// A re-entrant call was detected; operation aborted. +2026-06-21T01:29:31.8646914Z - ReentrantCall = 60, +2026-06-21T01:29:31.8647177Z + ReentrantCall = 60, +2026-06-21T01:29:31.8647393Z +2026-06-21T01:29:31.8647792Z // ── Amount validation ───────────────────────────────────────────────────────── 7x +2026-06-21T01:29:31.8648448Z /// A generic negative or otherwise invalid amount was supplied. +2026-06-21T01:29:31.8648998Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/types.rs:106: +2026-06-21T01:29:31.8649590Z - InvalidAmount = 70, +2026-06-21T01:29:31.8649852Z + InvalidAmount = 70, +2026-06-21T01:29:31.8650060Z +2026-06-21T01:29:31.8650429Z // ── Upgrade / freeze ─────────────────────────────────────────────────── 8x +2026-06-21T01:29:31.8650875Z /// Contract is frozen; all mutating operations are blocked. +2026-06-21T01:29:31.8651403Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/types.rs:110: +2026-06-21T01:29:31.8651883Z - ContractFrozen = 80, +2026-06-21T01:29:31.8652143Z + ContractFrozen = 80, +2026-06-21T01:29:31.8652354Z } +2026-06-21T01:29:31.8652522Z +2026-06-21T01:29:31.8652692Z - +2026-06-21T01:29:31.8653073Z // ─── Campaign lifecycle ─────────────────────────────────────────────────────── +2026-06-21T01:29:31.8653468Z +2026-06-21T01:29:31.8653700Z /// Campaign status with documented transition rules. +2026-06-21T01:29:31.8654203Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/types.rs:163: +2026-06-21T01:29:31.8654732Z pub fn can_transition_to(self, next: Self) -> bool { +2026-06-21T01:29:31.8655046Z matches!( +2026-06-21T01:29:31.8655259Z (self, next), +2026-06-21T01:29:31.8655525Z - (Self::Active, Self::GoalReached) +2026-06-21T01:29:31.8655832Z - | (Self::Active, Self::Ended) +2026-06-21T01:29:31.8656131Z - | (Self::Active, Self::Cancelled) +2026-06-21T01:29:31.8656437Z - | (Self::GoalReached, Self::Ended) +2026-06-21T01:29:31.8656878Z - | (Self::GoalReached, Self::Cancelled) +2026-06-21T01:29:31.8657211Z + (Self::Active, Self::GoalReached) +2026-06-21T01:29:31.8657505Z + | (Self::Active, Self::Ended) +2026-06-21T01:29:31.8657803Z + | (Self::Active, Self::Cancelled) +2026-06-21T01:29:31.8658105Z + | (Self::GoalReached, Self::Ended) +2026-06-21T01:29:31.8658419Z + | (Self::GoalReached, Self::Cancelled) +2026-06-21T01:29:31.8658699Z ) +2026-06-21T01:29:31.8658884Z } +2026-06-21T01:29:31.8659054Z } +2026-06-21T01:29:31.8659439Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/types.rs:453: +2026-06-21T01:29:31.8659903Z +2026-06-21T01:29:31.8660197Z /// Apply a new donation to this record. Panics with `Error::Overflow` if +2026-06-21T01:29:31.8660616Z /// `total_donated` or `donation_count` overflows. +2026-06-21T01:29:31.8661114Z - pub fn apply_donation(&mut self, env: &Env, amount: i128, time: u64, ledger: u32, asset: AssetInfo) { +2026-06-21T01:29:31.8661623Z - self.total_donated = self.total_donated +2026-06-21T01:29:31.8661921Z + pub fn apply_donation( +2026-06-21T01:29:31.8662155Z + &mut self, +2026-06-21T01:29:31.8662354Z + env: &Env, +2026-06-21T01:29:31.8662681Z + amount: i128, +2026-06-21T01:29:31.8662901Z + time: u64, +2026-06-21T01:29:31.8663094Z + ledger: u32, +2026-06-21T01:29:31.8663304Z + asset: AssetInfo, +2026-06-21T01:29:31.8663636Z + ) { +2026-06-21T01:29:31.8663830Z + self.total_donated = self +2026-06-21T01:29:31.8664093Z + .total_donated +2026-06-21T01:29:31.8664320Z .checked_add(amount) +2026-06-21T01:29:31.8664654Z .unwrap_or_else(|| env.panic_with_error(Error::Overflow)); +2026-06-21T01:29:31.8665012Z self.last_donation_time = time; +2026-06-21T01:29:31.8665486Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/types.rs:461: +2026-06-21T01:29:31.8665981Z self.last_donation_ledger = ledger; +2026-06-21T01:29:31.8666291Z - self.donation_count = self.donation_count +2026-06-21T01:29:31.8666605Z + self.donation_count = self +2026-06-21T01:29:31.8667197Z + .donation_count +2026-06-21T01:29:31.8667585Z .checked_add(1) +2026-06-21T01:29:31.8668027Z .unwrap_or_else(|| env.panic_with_error(Error::Overflow)); +2026-06-21T01:29:31.8668379Z self.asset = asset; +2026-06-21T01:29:31.8668847Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/types.rs:569: +2026-06-21T01:29:31.8669330Z pub asset: AssetInfo, +2026-06-21T01:29:31.8669564Z pub ledger: u32, +2026-06-21T01:29:31.8669767Z } +2026-06-21T01:29:31.8669934Z - +2026-06-21T01:29:31.8670102Z - +2026-06-21T01:29:31.8670266Z +2026-06-21T01:29:31.8867367Z ##[error]Process completed with exit code 1. +2026-06-21T01:29:31.8979167Z Post job cleanup. +2026-06-21T01:29:32.1720555Z Cache up-to-date. +2026-06-21T01:29:32.1724002Z (node:2464) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead. +2026-06-21T01:29:32.1724897Z (Use `node --trace-deprecation ...` to show where the warning was created) +2026-06-21T01:29:32.1915745Z Node 20 is being deprecated. This workflow is running with Node 24 by default. If you need to temporarily use Node 20, you can set the ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true environment variable. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/ +2026-06-21T01:29:32.1917417Z Post job cleanup. +2026-06-21T01:29:32.2771484Z [command]/usr/bin/git version +2026-06-21T01:29:32.2807881Z git version 2.54.0 +2026-06-21T01:29:32.2878136Z Temporarily overriding HOME='/home/runner/work/_temp/4c091e35-575d-4eaf-9ac3-df0a0519ae20' before making global git config changes +2026-06-21T01:29:32.2879611Z Adding repository directory to the temporary git global config as a safe directory +2026-06-21T01:29:32.2884064Z [command]/usr/bin/git config --global --add safe.directory /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts +2026-06-21T01:29:32.2923777Z [command]/usr/bin/git config --local --name-only --get-regexp core\.sshCommand +2026-06-21T01:29:32.2957702Z [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || :" +2026-06-21T01:29:32.3187535Z [command]/usr/bin/git config --local --name-only --get-regexp http\.https\:\/\/github\.com\/\.extraheader +2026-06-21T01:29:32.3213712Z http.https://github.com/.extraheader +2026-06-21T01:29:32.3225456Z [command]/usr/bin/git config --local --unset-all http.https://github.com/.extraheader +2026-06-21T01:29:32.3256297Z [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http\.https\:\/\/github\.com\/\.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :" +2026-06-21T01:29:32.3476647Z [command]/usr/bin/git config --local --name-only --get-regexp ^includeIf\.gitdir: +2026-06-21T01:29:32.3506171Z [command]/usr/bin/git submodule foreach --recursive git config --local --show-origin --name-only --get-regexp remote.origin.url +2026-06-21T01:29:32.3849608Z Cleaning up orphan processes +2026-06-21T01:29:32.4125974Z ##[warning]Node.js 20 is deprecated. The following actions target Node.js 20 but are being forced to run on Node.js 24: actions/checkout@v4. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/ diff --git a/.ci_logs2/3_Clippy lint.txt b/.ci_logs2/3_Clippy lint.txt new file mode 100644 index 0000000..2bb4811 --- /dev/null +++ b/.ci_logs2/3_Clippy lint.txt @@ -0,0 +1,494 @@ +2026-06-21T01:29:23.8644424Z Current runner version: '2.335.1' +2026-06-21T01:29:23.8670637Z ##[group]Runner Image Provisioner +2026-06-21T01:29:23.8671645Z Hosted Compute Agent +2026-06-21T01:29:23.8672299Z Version: 20260611.554 +2026-06-21T01:29:23.8673207Z Commit: 5e0782fdc9014723d3be820dd114dd31555c2bd1 +2026-06-21T01:29:23.8674004Z Build Date: 2026-06-11T21:40:46Z +2026-06-21T01:29:23.8674711Z Worker ID: {ece7a84e-2275-4c9b-af12-4bee02087f5c} +2026-06-21T01:29:23.8675502Z Azure Region: westcentralus +2026-06-21T01:29:23.8676165Z ##[endgroup] +2026-06-21T01:29:23.8677550Z ##[group]Operating System +2026-06-21T01:29:23.8678286Z Ubuntu +2026-06-21T01:29:23.8678848Z 24.04.4 +2026-06-21T01:29:23.8679432Z LTS +2026-06-21T01:29:23.8680020Z ##[endgroup] +2026-06-21T01:29:23.8680591Z ##[group]Runner Image +2026-06-21T01:29:23.8681310Z Image: ubuntu-24.04 +2026-06-21T01:29:23.8681914Z Version: 20260615.205.1 +2026-06-21T01:29:23.8683530Z Included Software: https://github.com/actions/runner-images/blob/ubuntu24/20260615.205/images/ubuntu/Ubuntu2404-Readme.md +2026-06-21T01:29:23.8685039Z Image Release: https://github.com/actions/runner-images/releases/tag/ubuntu24%2F20260615.205 +2026-06-21T01:29:23.8686123Z ##[endgroup] +2026-06-21T01:29:23.8687247Z ##[group]GITHUB_TOKEN Permissions +2026-06-21T01:29:23.8689355Z Contents: read +2026-06-21T01:29:23.8689963Z Metadata: read +2026-06-21T01:29:23.8690615Z ##[endgroup] +2026-06-21T01:29:23.8693028Z Secret source: Actions +2026-06-21T01:29:23.8693832Z Prepare workflow directory +2026-06-21T01:29:23.9107020Z Prepare all required actions +2026-06-21T01:29:23.9145315Z Getting action download info +2026-06-21T01:29:24.2248384Z Download action repository 'actions/checkout@v4' (SHA:34e114876b0b11c390a56381ad16ebd13914f8d5) +2026-06-21T01:29:24.2955315Z Download action repository 'dtolnay/rust-toolchain@stable' (SHA:29eef336d9b2848a0b548edc03f92a220660cdb8) +2026-06-21T01:29:24.5304284Z Download action repository 'Swatinem/rust-cache@v2' (SHA:e18b497796c12c097a38f9edb9d0641fb99eee32) +2026-06-21T01:29:25.6006577Z Complete job name: Clippy lint +2026-06-21T01:29:25.6791136Z Node 20 is being deprecated. This workflow is running with Node 24 by default. If you need to temporarily use Node 20, you can set the ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true environment variable. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/ +2026-06-21T01:29:25.6804227Z ##[group]Run actions/checkout@v4 +2026-06-21T01:29:25.6805355Z with: +2026-06-21T01:29:25.6806328Z repository: OrbitChainLabs/OrbitChain-Contracts +2026-06-21T01:29:25.6814965Z token: *** +2026-06-21T01:29:25.6815545Z ssh-strict: true +2026-06-21T01:29:25.6816046Z ssh-user: git +2026-06-21T01:29:25.6816546Z persist-credentials: true +2026-06-21T01:29:25.6817110Z clean: true +2026-06-21T01:29:25.6817610Z sparse-checkout-cone-mode: true +2026-06-21T01:29:25.6818196Z fetch-depth: 1 +2026-06-21T01:29:25.6818669Z fetch-tags: false +2026-06-21T01:29:25.6819145Z show-progress: true +2026-06-21T01:29:25.6819641Z lfs: false +2026-06-21T01:29:25.6820205Z submodules: false +2026-06-21T01:29:25.6820693Z set-safe-directory: true +2026-06-21T01:29:25.6822079Z env: +2026-06-21T01:29:25.6823039Z CARGO_TERM_COLOR: always +2026-06-21T01:29:25.6823949Z RUST_BACKTRACE: short +2026-06-21T01:29:25.6825881Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:25.6827351Z ##[endgroup] +2026-06-21T01:29:25.7883877Z Syncing repository: OrbitChainLabs/OrbitChain-Contracts +2026-06-21T01:29:25.7886123Z ##[group]Getting Git version info +2026-06-21T01:29:25.7887057Z Working directory is '/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts' +2026-06-21T01:29:25.7888381Z [command]/usr/bin/git version +2026-06-21T01:29:25.7917773Z git version 2.54.0 +2026-06-21T01:29:25.7970740Z ##[endgroup] +2026-06-21T01:29:25.7987915Z Temporarily overriding HOME='/home/runner/work/_temp/50e7bbc5-fe98-4a43-af7e-45162cab4a1c' before making global git config changes +2026-06-21T01:29:25.7990524Z Adding repository directory to the temporary git global config as a safe directory +2026-06-21T01:29:25.7994388Z [command]/usr/bin/git config --global --add safe.directory /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts +2026-06-21T01:29:25.8043874Z Deleting the contents of '/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts' +2026-06-21T01:29:25.8047922Z ##[group]Initializing the repository +2026-06-21T01:29:25.8052319Z [command]/usr/bin/git init /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts +2026-06-21T01:29:25.8126864Z hint: Using 'master' as the name for the initial branch. This default branch name +2026-06-21T01:29:25.8128680Z hint: will change to "main" in Git 3.0. To configure the initial branch name +2026-06-21T01:29:25.8130283Z hint: to use in all of your new repositories, which will suppress this warning, +2026-06-21T01:29:25.8131557Z hint: call: +2026-06-21T01:29:25.8132174Z hint: +2026-06-21T01:29:25.8133083Z hint: git config --global init.defaultBranch +2026-06-21T01:29:25.8134223Z hint: +2026-06-21T01:29:25.8134858Z hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and +2026-06-21T01:29:25.8136312Z hint: 'development'. The just-created branch can be renamed via this command: +2026-06-21T01:29:25.8137122Z hint: +2026-06-21T01:29:25.8137580Z hint: git branch -m +2026-06-21T01:29:25.8138094Z hint: +2026-06-21T01:29:25.8138761Z hint: Disable this message with "git config set advice.defaultBranchName false" +2026-06-21T01:29:25.8140227Z Initialized empty Git repository in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/.git/ +2026-06-21T01:29:25.8142958Z [command]/usr/bin/git remote add origin https://github.com/OrbitChainLabs/OrbitChain-Contracts +2026-06-21T01:29:25.8188303Z ##[endgroup] +2026-06-21T01:29:25.8189709Z ##[group]Disabling automatic garbage collection +2026-06-21T01:29:25.8193711Z [command]/usr/bin/git config --local gc.auto 0 +2026-06-21T01:29:25.8228320Z ##[endgroup] +2026-06-21T01:29:25.8229656Z ##[group]Setting up auth +2026-06-21T01:29:25.8236821Z [command]/usr/bin/git config --local --name-only --get-regexp core\.sshCommand +2026-06-21T01:29:25.8273792Z [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || :" +2026-06-21T01:29:25.8614959Z [command]/usr/bin/git config --local --name-only --get-regexp http\.https\:\/\/github\.com\/\.extraheader +2026-06-21T01:29:25.8649448Z [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http\.https\:\/\/github\.com\/\.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :" +2026-06-21T01:29:25.8895230Z [command]/usr/bin/git config --local --name-only --get-regexp ^includeIf\.gitdir: +2026-06-21T01:29:25.8936015Z [command]/usr/bin/git submodule foreach --recursive git config --local --show-origin --name-only --get-regexp remote.origin.url +2026-06-21T01:29:25.9204058Z [command]/usr/bin/git config --local http.https://github.com/.extraheader AUTHORIZATION: basic *** +2026-06-21T01:29:25.9246971Z ##[endgroup] +2026-06-21T01:29:25.9248090Z ##[group]Fetching the repository +2026-06-21T01:29:25.9260091Z [command]/usr/bin/git -c protocol.version=2 fetch --no-tags --prune --no-recurse-submodules --depth=1 origin +59f3fe99e87bd5e1e546c9babe13e09825b65536:refs/remotes/pull/60/merge +2026-06-21T01:29:26.4224672Z From https://github.com/OrbitChainLabs/OrbitChain-Contracts +2026-06-21T01:29:26.4226213Z * [new ref] 59f3fe99e87bd5e1e546c9babe13e09825b65536 -> pull/60/merge +2026-06-21T01:29:26.4264679Z ##[endgroup] +2026-06-21T01:29:26.4266094Z ##[group]Determining the checkout info +2026-06-21T01:29:26.4267611Z ##[endgroup] +2026-06-21T01:29:26.4273124Z [command]/usr/bin/git sparse-checkout disable +2026-06-21T01:29:26.4333428Z [command]/usr/bin/git config --local --unset-all extensions.worktreeConfig +2026-06-21T01:29:26.4367027Z ##[group]Checking out the ref +2026-06-21T01:29:26.4373029Z [command]/usr/bin/git checkout --progress --force refs/remotes/pull/60/merge +2026-06-21T01:29:26.4531677Z Note: switching to 'refs/remotes/pull/60/merge'. +2026-06-21T01:29:26.4533175Z +2026-06-21T01:29:26.4534130Z You are in 'detached HEAD' state. You can look around, make experimental +2026-06-21T01:29:26.4535948Z changes and commit them, and you can discard any commits you make in this +2026-06-21T01:29:26.4537794Z state without impacting any branches by switching back to a branch. +2026-06-21T01:29:26.4538908Z +2026-06-21T01:29:26.4539749Z If you want to create a new branch to retain commits you create, you may +2026-06-21T01:29:26.4541410Z do so (now or later) by using -c with the switch command. Example: +2026-06-21T01:29:26.4542678Z +2026-06-21T01:29:26.4543242Z git switch -c +2026-06-21T01:29:26.4544004Z +2026-06-21T01:29:26.4544595Z Or undo this operation with: +2026-06-21T01:29:26.4545457Z +2026-06-21T01:29:26.4546157Z git switch - +2026-06-21T01:29:26.4546647Z +2026-06-21T01:29:26.4547349Z Turn off this advice by setting config variable advice.detachedHead to false +2026-06-21T01:29:26.4548410Z +2026-06-21T01:29:26.4549756Z HEAD is now at 59f3fe9 Merge 9e85affabcadb1e696b876ca7eae8bad3de3c85d into dc3d5e2b821bb2a0f2655582265c562926415b02 +2026-06-21T01:29:26.4553957Z ##[endgroup] +2026-06-21T01:29:26.4686846Z [command]/usr/bin/git log -1 --format=%H +2026-06-21T01:29:26.4688543Z 59f3fe99e87bd5e1e546c9babe13e09825b65536 +2026-06-21T01:29:26.5187478Z ##[warning]Unexpected input(s) 'cache', valid inputs are ['toolchain', 'targets', 'target', 'components'] +2026-06-21T01:29:26.5210188Z ##[group]Run dtolnay/rust-toolchain@stable +2026-06-21T01:29:26.5210994Z with: +2026-06-21T01:29:26.5211488Z cache: false +2026-06-21T01:29:26.5212029Z toolchain: stable +2026-06-21T01:29:26.5212735Z env: +2026-06-21T01:29:26.5213238Z CARGO_TERM_COLOR: always +2026-06-21T01:29:26.5213892Z RUST_BACKTRACE: short +2026-06-21T01:29:26.5215243Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:26.5216761Z ##[endgroup] +2026-06-21T01:29:26.5361857Z ##[group]Run : parse toolchain version +2026-06-21T01:29:26.5363128Z : parse toolchain version +2026-06-21T01:29:26.5363914Z if [[ -z $toolchain ]]; then +2026-06-21T01:29:26.5365429Z  # GitHub does not enforce `required: true` inputs itself. https://github.com/actions/runner/issues/1070 +2026-06-21T01:29:26.5367160Z  echo "'toolchain' is a required input" >&2 +2026-06-21T01:29:26.5368012Z  exit 1 +2026-06-21T01:29:26.5368937Z elif [[ $toolchain =~ ^stable' '[0-9]+' '(year|month|week|day)s?' 'ago$ ]]; then +2026-06-21T01:29:26.5370137Z  if [[ Linux == macOS ]]; then +2026-06-21T01:29:26.5371657Z  echo "toolchain=1.$((($(date -v-$(sed 's/stable \([0-9]*\) \(.\).*/\1\2/' <<< $toolchain) +%s)/60/60/24-16569)/7/6))" >> $GITHUB_OUTPUT +2026-06-21T01:29:26.5373296Z  else +2026-06-21T01:29:26.5374460Z  echo "toolchain=1.$((($(date --date "${toolchain#stable }" +%s)/60/60/24-16569)/7/6))" >> $GITHUB_OUTPUT +2026-06-21T01:29:26.5375844Z  fi +2026-06-21T01:29:26.5376672Z elif [[ $toolchain =~ ^stable' 'minus' '[0-9]+' 'releases?$ ]]; then +2026-06-21T01:29:26.5378253Z  echo "toolchain=1.$((($(date +%s)/60/60/24-16569)/7/6-${toolchain//[^0-9]/}))" >> $GITHUB_OUTPUT +2026-06-21T01:29:26.5379618Z elif [[ $toolchain =~ ^1\.[0-9]+$ ]]; then +2026-06-21T01:29:26.5381181Z  echo "toolchain=1.$((i=${toolchain#1.}, c=($(date +%s)/60/60/24-16569)/7/6, i+9*i*(10*i<=c)+90*i*(100*i<=c)))" >> $GITHUB_OUTPUT +2026-06-21T01:29:26.5382791Z else +2026-06-21T01:29:26.5383455Z  echo "toolchain=$toolchain" >> $GITHUB_OUTPUT +2026-06-21T01:29:26.5384319Z fi +2026-06-21T01:29:26.5535061Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:26.5536059Z env: +2026-06-21T01:29:26.5536575Z CARGO_TERM_COLOR: always +2026-06-21T01:29:26.5537216Z RUST_BACKTRACE: short +2026-06-21T01:29:26.5538793Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:26.5540298Z toolchain: stable +2026-06-21T01:29:26.5540843Z ##[endgroup] +2026-06-21T01:29:26.5734561Z ##[group]Run : construct rustup command line +2026-06-21T01:29:26.5735453Z : construct rustup command line +2026-06-21T01:29:26.5736779Z echo "targets=$(for t in ${targets//,/ }; do echo -n ' --target' $t; done)" >> $GITHUB_OUTPUT +2026-06-21T01:29:26.5738713Z echo "components=$(for c in ${components//,/ }; do echo -n ' --component' $c; done)" >> $GITHUB_OUTPUT +2026-06-21T01:29:26.5740166Z echo "downgrade=" >> $GITHUB_OUTPUT +2026-06-21T01:29:26.5775577Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:26.5776693Z env: +2026-06-21T01:29:26.5777185Z CARGO_TERM_COLOR: always +2026-06-21T01:29:26.5777828Z RUST_BACKTRACE: short +2026-06-21T01:29:26.5779163Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:26.5780651Z targets: +2026-06-21T01:29:26.5781126Z components: +2026-06-21T01:29:26.5781650Z ##[endgroup] +2026-06-21T01:29:26.5899772Z ##[group]Run : set $CARGO_HOME +2026-06-21T01:29:26.5900486Z : set $CARGO_HOME +2026-06-21T01:29:26.5901379Z echo CARGO_HOME=${CARGO_HOME:-"$HOME/.cargo"} >> $GITHUB_ENV +2026-06-21T01:29:26.5936166Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:26.5937094Z env: +2026-06-21T01:29:26.5937585Z CARGO_TERM_COLOR: always +2026-06-21T01:29:26.5938207Z RUST_BACKTRACE: short +2026-06-21T01:29:26.5939498Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:26.5940927Z ##[endgroup] +2026-06-21T01:29:26.6059263Z ##[group]Run : install rustup if needed +2026-06-21T01:29:26.6060070Z : install rustup if needed +2026-06-21T01:29:26.6060864Z if ! command -v rustup &>/dev/null; then +2026-06-21T01:29:26.6063311Z  curl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused --location --silent --show-error --fail https://sh.rustup.rs | sh -s -- --default-toolchain none -y +2026-06-21T01:29:26.6065481Z  echo "$CARGO_HOME/bin" >> $GITHUB_PATH +2026-06-21T01:29:26.6066269Z fi +2026-06-21T01:29:26.6100102Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:26.6101017Z env: +2026-06-21T01:29:26.6101502Z CARGO_TERM_COLOR: always +2026-06-21T01:29:26.6102113Z RUST_BACKTRACE: short +2026-06-21T01:29:26.6103651Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:26.6105135Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:29:26.6105803Z ##[endgroup] +2026-06-21T01:29:26.6225583Z ##[group]Run rustup toolchain install stable --profile minimal --no-self-update +2026-06-21T01:29:26.6227180Z rustup toolchain install stable --profile minimal --no-self-update +2026-06-21T01:29:26.6261228Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:26.6262148Z env: +2026-06-21T01:29:26.6262760Z CARGO_TERM_COLOR: always +2026-06-21T01:29:26.6263388Z RUST_BACKTRACE: short +2026-06-21T01:29:26.6265146Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:26.6267029Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:29:26.6267759Z RUSTUP_PERMIT_COPY_RENAME: 1 +2026-06-21T01:29:26.6268467Z ##[endgroup] +2026-06-21T01:29:26.7614961Z info: syncing channel updates for stable-x86_64-unknown-linux-gnu +2026-06-21T01:29:26.9047552Z +2026-06-21T01:29:26.9141096Z stable-x86_64-unknown-linux-gnu unchanged - rustc 1.96.0 (ac68faa20 2026-05-25) +2026-06-21T01:29:26.9142315Z +2026-06-21T01:29:26.9218366Z ##[group]Run rustup default stable +2026-06-21T01:29:26.9219548Z rustup default stable +2026-06-21T01:29:26.9258187Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:26.9259552Z env: +2026-06-21T01:29:26.9260724Z CARGO_TERM_COLOR: always +2026-06-21T01:29:26.9261761Z RUST_BACKTRACE: short +2026-06-21T01:29:26.9263805Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:26.9265796Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:29:26.9266894Z ##[endgroup] +2026-06-21T01:29:26.9399456Z info: using existing install for stable-x86_64-unknown-linux-gnu +2026-06-21T01:29:26.9406736Z info: default toolchain set to stable-x86_64-unknown-linux-gnu +2026-06-21T01:29:26.9407931Z +2026-06-21T01:29:26.9499433Z stable-x86_64-unknown-linux-gnu unchanged - rustc 1.96.0 (ac68faa20 2026-05-25) +2026-06-21T01:29:26.9503789Z +2026-06-21T01:29:26.9506928Z info: note that the toolchain 'stable-x86_64-unknown-linux-gnu' is currently in use (overridden by '/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/rust-toolchain.toml') +2026-06-21T01:29:26.9660333Z ##[group]Run : create cachekey +2026-06-21T01:29:26.9661431Z : create cachekey +2026-06-21T01:29:26.9663599Z DATE=$(rustc +stable --version --verbose | sed -ne 's/^commit-date: \(20[0-9][0-9]\)-\([01][0-9]\)-\([0-3][0-9]\)$/\1\2\3/p') +2026-06-21T01:29:26.9666149Z HASH=$(rustc +stable --version --verbose | sed -ne 's/^commit-hash: //p') +2026-06-21T01:29:26.9668084Z echo "cachekey=$(echo $DATE$HASH | head -c12)" >> $GITHUB_OUTPUT +2026-06-21T01:29:26.9706854Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:26.9708144Z env: +2026-06-21T01:29:26.9708908Z CARGO_TERM_COLOR: always +2026-06-21T01:29:26.9709849Z RUST_BACKTRACE: short +2026-06-21T01:29:26.9711554Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:26.9713733Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:29:26.9714725Z ##[endgroup] +2026-06-21T01:29:27.0194356Z ##[group]Run : disable incremental compilation +2026-06-21T01:29:27.0195634Z : disable incremental compilation +2026-06-21T01:29:27.0196893Z if [ -z "${CARGO_INCREMENTAL+set}" ]; then +2026-06-21T01:29:27.0198165Z  echo CARGO_INCREMENTAL=0 >> $GITHUB_ENV +2026-06-21T01:29:27.0199291Z fi +2026-06-21T01:29:27.0237203Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:27.0238486Z env: +2026-06-21T01:29:27.0239233Z CARGO_TERM_COLOR: always +2026-06-21T01:29:27.0240181Z RUST_BACKTRACE: short +2026-06-21T01:29:27.0241877Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:27.0244021Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:29:27.0244995Z ##[endgroup] +2026-06-21T01:29:27.0369198Z ##[group]Run : enable colors in Cargo output +2026-06-21T01:29:27.0370426Z : enable colors in Cargo output +2026-06-21T01:29:27.0371644Z if [ -z "${CARGO_TERM_COLOR+set}" ]; then +2026-06-21T01:29:27.0373136Z  echo CARGO_TERM_COLOR=always >> $GITHUB_ENV +2026-06-21T01:29:27.0374328Z fi +2026-06-21T01:29:27.0412958Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:27.0414238Z env: +2026-06-21T01:29:27.0415003Z CARGO_TERM_COLOR: always +2026-06-21T01:29:27.0415928Z RUST_BACKTRACE: short +2026-06-21T01:29:27.0417619Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:27.0419587Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:29:27.0420585Z CARGO_INCREMENTAL: 0 +2026-06-21T01:29:27.0421438Z ##[endgroup] +2026-06-21T01:29:27.0548122Z ##[group]Run : enable Cargo sparse registry +2026-06-21T01:29:27.0549320Z : enable Cargo sparse registry +2026-06-21T01:29:27.0550728Z # implemented in 1.66, stabilized in 1.68, made default in 1.70 +2026-06-21T01:29:27.0553508Z if [ -z "${CARGO_REGISTRIES_CRATES_IO_PROTOCOL+set}" -o -f "/home/runner/work/_temp"/.implicit_cargo_registries_crates_io_protocol ]; then +2026-06-21T01:29:27.0556190Z  if rustc +stable --version --verbose | grep -q '^release: 1\.6[89]\.'; then +2026-06-21T01:29:27.0558542Z  touch "/home/runner/work/_temp"/.implicit_cargo_registries_crates_io_protocol || true +2026-06-21T01:29:27.0560551Z  echo CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse >> $GITHUB_ENV +2026-06-21T01:29:27.0562444Z  elif rustc +stable --version --verbose | grep -q '^release: 1\.6[67]\.'; then +2026-06-21T01:29:27.0564786Z  touch "/home/runner/work/_temp"/.implicit_cargo_registries_crates_io_protocol || true +2026-06-21T01:29:27.0566758Z  echo CARGO_REGISTRIES_CRATES_IO_PROTOCOL=git >> $GITHUB_ENV +2026-06-21T01:29:27.0568106Z  fi +2026-06-21T01:29:27.0568880Z fi +2026-06-21T01:29:27.0609477Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:27.0610760Z env: +2026-06-21T01:29:27.0611512Z CARGO_TERM_COLOR: always +2026-06-21T01:29:27.0612438Z RUST_BACKTRACE: short +2026-06-21T01:29:27.0614338Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:27.0616227Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:29:27.0617223Z CARGO_INCREMENTAL: 0 +2026-06-21T01:29:27.0618078Z ##[endgroup] +2026-06-21T01:29:27.1065016Z ##[group]Run : work around spurious network errors in curl 8.0 +2026-06-21T01:29:27.1066537Z : work around spurious network errors in curl 8.0 +2026-06-21T01:29:27.1068722Z # https://rust-lang.zulipchat.com/#narrow/stream/246057-t-cargo/topic/timeout.20investigation +2026-06-21T01:29:27.1070944Z if rustc +stable --version --verbose | grep -q '^release: 1\.7[01]\.'; then +2026-06-21T01:29:27.1072820Z  echo CARGO_HTTP_MULTIPLEXING=false >> $GITHUB_ENV +2026-06-21T01:29:27.1074040Z fi +2026-06-21T01:29:27.1114577Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:27.1115835Z env: +2026-06-21T01:29:27.1116603Z CARGO_TERM_COLOR: always +2026-06-21T01:29:27.1117525Z RUST_BACKTRACE: short +2026-06-21T01:29:27.1119183Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:27.1121032Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:29:27.1122014Z CARGO_INCREMENTAL: 0 +2026-06-21T01:29:27.1123129Z ##[endgroup] +2026-06-21T01:29:27.1436503Z ##[group]Run rustc +stable --version --verbose +2026-06-21T01:29:27.1438317Z rustc +stable --version --verbose +2026-06-21T01:29:27.1496776Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:27.1498576Z env: +2026-06-21T01:29:27.1499643Z CARGO_TERM_COLOR: always +2026-06-21T01:29:27.1500921Z RUST_BACKTRACE: short +2026-06-21T01:29:27.1503673Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:27.1506494Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:29:27.1507873Z CARGO_INCREMENTAL: 0 +2026-06-21T01:29:27.1509011Z ##[endgroup] +2026-06-21T01:29:27.1749687Z rustc 1.96.0 (ac68faa20 2026-05-25) +2026-06-21T01:29:27.1751978Z binary: rustc +2026-06-21T01:29:27.1754062Z commit-hash: ac68faa20c58cbccd01ee7208bf3b6e93a7d7f96 +2026-06-21T01:29:27.1756112Z commit-date: 2026-05-25 +2026-06-21T01:29:27.1757640Z host: x86_64-unknown-linux-gnu +2026-06-21T01:29:27.1759231Z release: 1.96.0 +2026-06-21T01:29:27.1760781Z LLVM version: 22.1.2 +2026-06-21T01:29:27.1992423Z ##[group]Run Swatinem/rust-cache@v2 +2026-06-21T01:29:27.1993601Z with: +2026-06-21T01:29:27.1994344Z cache-on-failure: true +2026-06-21T01:29:27.1995197Z prefix-key: v0-rust +2026-06-21T01:29:27.1996006Z add-job-id-key: true +2026-06-21T01:29:27.1996885Z add-rust-environment-hash-key: true +2026-06-21T01:29:27.1997863Z cache-targets: true +2026-06-21T01:29:27.1998688Z cache-all-crates: false +2026-06-21T01:29:27.1999597Z cache-workspace-crates: false +2026-06-21T01:29:27.2000483Z save-if: true +2026-06-21T01:29:27.2001244Z cache-provider: github +2026-06-21T01:29:27.2002069Z cache-bin: true +2026-06-21T01:29:27.2003194Z lookup-only: false +2026-06-21T01:29:27.2004221Z cmd-format: {0} +2026-06-21T01:29:27.2004964Z env: +2026-06-21T01:29:27.2005669Z CARGO_TERM_COLOR: always +2026-06-21T01:29:27.2006532Z RUST_BACKTRACE: short +2026-06-21T01:29:27.2008074Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:27.2009876Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:29:27.2010850Z CARGO_INCREMENTAL: 0 +2026-06-21T01:29:27.2011645Z ##[endgroup] +2026-06-21T01:29:27.4961044Z (node:2363) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead. +2026-06-21T01:29:27.4963532Z (Use `node --trace-deprecation ...` to show where the warning was created) +2026-06-21T01:29:31.3351271Z ##[group]Cache Configuration +2026-06-21T01:29:31.3351993Z Cache Provider: +2026-06-21T01:29:31.3352416Z github +2026-06-21T01:29:31.3353096Z Workspaces: +2026-06-21T01:29:31.3353616Z /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts +2026-06-21T01:29:31.3354288Z Cache Paths: +2026-06-21T01:29:31.3354749Z /home/runner/.cargo/bin +2026-06-21T01:29:31.3355217Z /home/runner/.cargo/.crates.toml +2026-06-21T01:29:31.3355726Z /home/runner/.cargo/.crates2.json +2026-06-21T01:29:31.3356236Z /home/runner/.cargo/registry +2026-06-21T01:29:31.3356758Z /home/runner/.cargo/git +2026-06-21T01:29:31.3357417Z /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/target +2026-06-21T01:29:31.3358028Z Restore Key: +2026-06-21T01:29:31.3358444Z v0-rust-clippy-Linux-x64-1f47b3b1 +2026-06-21T01:29:31.3358971Z Cache Key: +2026-06-21T01:29:31.3359474Z v0-rust-clippy-Linux-x64-1f47b3b1-8243978e +2026-06-21T01:29:31.3360004Z .. Prefix: +2026-06-21T01:29:31.3360412Z - v0-rust-clippy-Linux-x64 +2026-06-21T01:29:31.3360910Z .. Environment considered: +2026-06-21T01:29:31.3361351Z - Rust Versions: +2026-06-21T01:29:31.3361939Z - 1.96.0 x86_64-unknown-linux-gnu ac68faa20c58cbccd01ee7208bf3b6e93a7d7f96 +2026-06-21T01:29:31.3363064Z - 1.96.0 x86_64-unknown-linux-gnu ac68faa20c58cbccd01ee7208bf3b6e93a7d7f96 +2026-06-21T01:29:31.3363756Z - CARGO_HOME +2026-06-21T01:29:31.3364144Z - CARGO_INCREMENTAL +2026-06-21T01:29:31.3364570Z - CARGO_TERM_COLOR +2026-06-21T01:29:31.3364983Z - RUST_BACKTRACE +2026-06-21T01:29:31.3365391Z .. Lockfiles considered: +2026-06-21T01:29:31.3366090Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/.cargo/config.toml +2026-06-21T01:29:31.3367144Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/Cargo.toml +2026-06-21T01:29:31.3368160Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/common/Cargo.toml +2026-06-21T01:29:31.3369315Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/contracts/core/Cargo.toml +2026-06-21T01:29:31.3370433Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/Cargo.toml +2026-06-21T01:29:31.3371208Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/rust-toolchain.toml +2026-06-21T01:29:31.3371819Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/token-bridge/Cargo.toml +2026-06-21T01:29:31.3372861Z ##[endgroup] +2026-06-21T01:29:31.3373101Z +2026-06-21T01:29:31.3373275Z ... Restoring cache ... +2026-06-21T01:29:31.5295885Z Cache hit for: v0-rust-clippy-Linux-x64-1f47b3b1-8243978e +2026-06-21T01:29:32.7453084Z Received 20971520 of 181650538 (11.5%), 20.0 MBs/sec +2026-06-21T01:29:33.7392890Z Received 177456234 of 181650538 (97.7%), 84.6 MBs/sec +2026-06-21T01:29:33.7855527Z Received 181650538 of 181650538 (100.0%), 84.6 MBs/sec +2026-06-21T01:29:33.7856093Z Cache Size: ~173 MB (181650538 B) +2026-06-21T01:29:33.8003337Z [command]/usr/bin/tar -xf /home/runner/work/_temp/c96b3d00-4d11-4637-9d98-875ee13c7645/cache.tzst -P -C /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts --use-compress-program unzstd +2026-06-21T01:29:34.7829829Z Cache restored successfully +2026-06-21T01:29:34.7920798Z Restored from cache key "v0-rust-clippy-Linux-x64-1f47b3b1-8243978e" full match: true. +2026-06-21T01:29:34.8110474Z ##[group]Run cargo clippy -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge -- -D warnings +2026-06-21T01:29:34.8111635Z cargo clippy -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge -- -D warnings +2026-06-21T01:29:34.8147321Z shell: /usr/bin/bash -e {0} +2026-06-21T01:29:34.8147598Z env: +2026-06-21T01:29:34.8147818Z CARGO_TERM_COLOR: always +2026-06-21T01:29:34.8148077Z RUST_BACKTRACE: short +2026-06-21T01:29:34.8148552Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:34.8149068Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:29:34.8149339Z CARGO_INCREMENTAL: 0 +2026-06-21T01:29:34.8149571Z CACHE_ON_FAILURE: true +2026-06-21T01:29:34.8149806Z ##[endgroup] +2026-06-21T01:29:35.1023073Z  Updating crates.io index +2026-06-21T01:29:36.0114226Z  Locking 212 packages to latest compatible versions +2026-06-21T01:29:36.0155905Z  Adding arbitrary v1.3.2 (available: v1.4.2) +2026-06-21T01:29:36.0250740Z  Adding crypto-common v0.1.6 (available: v0.1.7) +2026-06-21T01:29:36.0311704Z  Adding derive_arbitrary v1.3.2 (available: v1.4.2) +2026-06-21T01:29:36.0590102Z  Adding rand v0.8.6 (available: v0.10.1) +2026-06-21T01:29:36.0687998Z  Adding sha2 v0.10.9 (available: v0.11.0) +2026-06-21T01:29:36.1028566Z  Adding toml v0.8.23 (available: v1.1.2+spec-1.1.0) +2026-06-21T01:29:36.8135063Z  Compiling serde_core v1.0.228 +2026-06-21T01:29:36.8136147Z  Compiling serde_json v1.0.150 +2026-06-21T01:29:36.8137248Z  Checking zeroize v1.9.0 +2026-06-21T01:29:36.8222072Z  Compiling schemars v0.8.22 +2026-06-21T01:29:36.8294836Z  Compiling thiserror v1.0.69 +2026-06-21T01:29:37.0793860Z  Checking hex v0.4.3 +2026-06-21T01:29:37.1325135Z  Checking generic-array v0.14.9 +2026-06-21T01:29:37.2513981Z  Checking der v0.7.10 +2026-06-21T01:29:37.6634157Z  Checking block-buffer v0.10.4 +2026-06-21T01:29:37.7344068Z  Checking crypto-common v0.1.6 +2026-06-21T01:29:37.7884422Z  Checking sec1 v0.7.3 +2026-06-21T01:29:37.7954463Z  Checking digest v0.10.7 +2026-06-21T01:29:37.8904446Z  Checking crypto-bigint v0.5.5 +2026-06-21T01:29:37.9534017Z  Checking sha2 v0.10.9 +2026-06-21T01:29:38.2534372Z  Checking signature v2.2.0 +2026-06-21T01:29:38.3154589Z  Checking ark-serialize v0.5.0 +2026-06-21T01:29:38.5334313Z  Checking ark-ff v0.5.0 +2026-06-21T01:29:38.9164095Z  Checking elliptic-curve v0.13.8 +2026-06-21T01:29:39.0884674Z  Compiling serde v1.0.228 +2026-06-21T01:29:39.2141006Z  Checking hmac v0.12.1 +2026-06-21T01:29:39.2937756Z  Checking rfc6979 v0.4.0 +2026-06-21T01:29:39.3510774Z  Checking ecdsa v0.16.9 +2026-06-21T01:29:39.6697002Z  Checking primeorder v0.13.6 +2026-06-21T01:29:39.8434283Z  Checking ed25519 v2.2.3 +2026-06-21T01:29:39.8720758Z  Checking curve25519-dalek v4.1.3 +2026-06-21T01:29:40.0254577Z  Compiling crate-git-revision v0.0.6 +2026-06-21T01:29:40.2099202Z  Compiling stellar-strkey v0.0.13 +2026-06-21T01:29:40.3264160Z  Compiling stellar-xdr v26.0.1 +2026-06-21T01:29:40.8034079Z  Compiling soroban-env-common v26.1.3 +2026-06-21T01:29:41.0065617Z  Compiling stellar-strkey v0.0.16 +2026-06-21T01:29:41.1144493Z  Compiling serde_with v3.21.0 +2026-06-21T01:29:41.4985113Z  Compiling soroban-env-host v26.1.3 +2026-06-21T01:29:41.6084606Z  Checking sha3 v0.10.9 +2026-06-21T01:29:41.7531045Z  Checking ed25519-dalek v2.2.0 +2026-06-21T01:29:41.8701501Z  Compiling soroban-sdk v26.1.0 +2026-06-21T01:29:42.0073927Z  Checking p256 v0.13.2 +2026-06-21T01:29:42.1984003Z  Checking k256 v0.13.4 +2026-06-21T01:29:43.4897088Z  Checking ark-poly v0.5.0 +2026-06-21T01:29:44.0197856Z  Checking ark-ec v0.5.0 +2026-06-21T01:29:45.5842285Z  Checking ark-bn254 v0.5.0 +2026-06-21T01:29:45.5843444Z  Checking ark-bls12-381 v0.5.0 +2026-06-21T01:29:57.3822843Z  Compiling soroban-spec v26.1.0 +2026-06-21T01:29:57.5144372Z  Compiling soroban-spec-rust v26.1.0 +2026-06-21T01:29:58.0217583Z  Compiling soroban-env-macros v26.1.3 +2026-06-21T01:30:00.2447130Z  Compiling soroban-sdk-macros v26.1.0 +2026-06-21T01:30:04.3444252Z  Checking orbitchain-common v0.1.0 (/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/common) +2026-06-21T01:30:04.3445544Z  Checking orbitchain-core v0.1.0 (/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/contracts/core) +2026-06-21T01:30:05.5686399Z  Checking orbitchain-campaign v0.1.0 (/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign) +2026-06-21T01:30:05.5688261Z  Checking orbitchain-token-bridge v0.1.0 (/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/token-bridge) +2026-06-21T01:30:05.7273480Z error: unused import: `Address` +2026-06-21T01:30:05.7274026Z --> campaign/src/contract.rs:6:37 +2026-06-21T01:30:05.7274368Z | +2026-06-21T01:30:05.7280386Z 6 | use soroban_sdk::{panic_with_error, Address, Env}; +2026-06-21T01:30:05.7280917Z | ^^^^^^^ +2026-06-21T01:30:05.7281271Z | +2026-06-21T01:30:05.7281678Z = note: `-D unused-imports` implied by `-D warnings` +2026-06-21T01:30:05.7282244Z = help: to override `-D warnings` add `#[allow(unused_imports)]` +2026-06-21T01:30:05.7282781Z +2026-06-21T01:30:06.0510166Z error: manual saturating arithmetic +2026-06-21T01:30:06.0510902Z --> campaign/src/contract.rs:106:24 +2026-06-21T01:30:06.0511411Z | +2026-06-21T01:30:06.0511965Z 106 | let max_end_time = current_time +2026-06-21T01:30:06.0512852Z |  ________________________^ +2026-06-21T01:30:06.0513556Z 107 | | .checked_add(MAX_DEADLINE_GAP_SECONDS) +2026-06-21T01:30:06.0514543Z 108 | | .unwrap_or(u64::MAX); +2026-06-21T01:30:06.0515817Z | |____________________________^ help: consider using `saturating_add`: `current_time.saturating_add(MAX_DEADLINE_GAP_SECONDS)` +2026-06-21T01:30:06.0516901Z | +2026-06-21T01:30:06.0518013Z = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#manual_saturating_arithmetic +2026-06-21T01:30:06.0519707Z = note: `-D clippy::manual-saturating-arithmetic` implied by `-D warnings` +2026-06-21T01:30:06.0520958Z = help: to override `-D warnings` add `#[allow(clippy::manual_saturating_arithmetic)]` +2026-06-21T01:30:06.0521500Z +2026-06-21T01:30:06.2736416Z error: could not compile `orbitchain-campaign` (lib) due to 2 previous errors +2026-06-21T01:30:06.3330586Z ##[error]Process completed with exit code 101. +2026-06-21T01:30:06.3443185Z Post job cleanup. +2026-06-21T01:30:06.6333183Z Cache up-to-date. +2026-06-21T01:30:06.6335846Z (node:3038) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead. +2026-06-21T01:30:06.6336937Z (Use `node --trace-deprecation ...` to show where the warning was created) +2026-06-21T01:30:06.6551590Z Node 20 is being deprecated. This workflow is running with Node 24 by default. If you need to temporarily use Node 20, you can set the ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true environment variable. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/ +2026-06-21T01:30:06.6552970Z Post job cleanup. +2026-06-21T01:30:06.7419223Z [command]/usr/bin/git version +2026-06-21T01:30:06.7491035Z git version 2.54.0 +2026-06-21T01:30:06.7526952Z Temporarily overriding HOME='/home/runner/work/_temp/3076a065-e648-4778-b1d6-07250dfeb08f' before making global git config changes +2026-06-21T01:30:06.7528207Z Adding repository directory to the temporary git global config as a safe directory +2026-06-21T01:30:06.7533976Z [command]/usr/bin/git config --global --add safe.directory /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts +2026-06-21T01:30:06.7573849Z [command]/usr/bin/git config --local --name-only --get-regexp core\.sshCommand +2026-06-21T01:30:06.7609036Z [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || :" +2026-06-21T01:30:06.7859809Z [command]/usr/bin/git config --local --name-only --get-regexp http\.https\:\/\/github\.com\/\.extraheader +2026-06-21T01:30:06.7887500Z http.https://github.com/.extraheader +2026-06-21T01:30:06.7898369Z [command]/usr/bin/git config --local --unset-all http.https://github.com/.extraheader +2026-06-21T01:30:06.7931091Z [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http\.https\:\/\/github\.com\/\.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :" +2026-06-21T01:30:06.8173604Z [command]/usr/bin/git config --local --name-only --get-regexp ^includeIf\.gitdir: +2026-06-21T01:30:06.8209292Z [command]/usr/bin/git submodule foreach --recursive git config --local --show-origin --name-only --get-regexp remote.origin.url +2026-06-21T01:30:06.8599004Z Cleaning up orphan processes +2026-06-21T01:30:06.8905125Z ##[warning]Node.js 20 is deprecated. The following actions target Node.js 20 but are being forced to run on Node.js 24: actions/checkout@v4. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/ diff --git a/.ci_logs2/Clippy lint/10_Post Run actions_checkout@v4.txt b/.ci_logs2/Clippy lint/10_Post Run actions_checkout@v4.txt new file mode 100644 index 0000000..3896034 --- /dev/null +++ b/.ci_logs2/Clippy lint/10_Post Run actions_checkout@v4.txt @@ -0,0 +1,15 @@ +2026-06-21T01:30:06.6551577Z Node 20 is being deprecated. This workflow is running with Node 24 by default. If you need to temporarily use Node 20, you can set the ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true environment variable. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/ +2026-06-21T01:30:06.6552964Z Post job cleanup. +2026-06-21T01:30:06.7419176Z [command]/usr/bin/git version +2026-06-21T01:30:06.7490998Z git version 2.54.0 +2026-06-21T01:30:06.7526923Z Temporarily overriding HOME='/home/runner/work/_temp/3076a065-e648-4778-b1d6-07250dfeb08f' before making global git config changes +2026-06-21T01:30:06.7528202Z Adding repository directory to the temporary git global config as a safe directory +2026-06-21T01:30:06.7533967Z [command]/usr/bin/git config --global --add safe.directory /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts +2026-06-21T01:30:06.7573752Z [command]/usr/bin/git config --local --name-only --get-regexp core\.sshCommand +2026-06-21T01:30:06.7609013Z [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || :" +2026-06-21T01:30:06.7859761Z [command]/usr/bin/git config --local --name-only --get-regexp http\.https\:\/\/github\.com\/\.extraheader +2026-06-21T01:30:06.7887479Z http.https://github.com/.extraheader +2026-06-21T01:30:06.7898355Z [command]/usr/bin/git config --local --unset-all http.https://github.com/.extraheader +2026-06-21T01:30:06.7931075Z [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http\.https\:\/\/github\.com\/\.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :" +2026-06-21T01:30:06.8173548Z [command]/usr/bin/git config --local --name-only --get-regexp ^includeIf\.gitdir: +2026-06-21T01:30:06.8209209Z [command]/usr/bin/git submodule foreach --recursive git config --local --show-origin --name-only --get-regexp remote.origin.url diff --git a/.ci_logs2/Clippy lint/11_Complete job.txt b/.ci_logs2/Clippy lint/11_Complete job.txt new file mode 100644 index 0000000..94c7700 --- /dev/null +++ b/.ci_logs2/Clippy lint/11_Complete job.txt @@ -0,0 +1,2 @@ +2026-06-21T01:30:06.8598989Z Cleaning up orphan processes +2026-06-21T01:30:06.8905104Z ##[warning]Node.js 20 is deprecated. The following actions target Node.js 20 but are being forced to run on Node.js 24: actions/checkout@v4. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/ diff --git a/.ci_logs2/Clippy lint/1_Set up job.txt b/.ci_logs2/Clippy lint/1_Set up job.txt new file mode 100644 index 0000000..6241290 --- /dev/null +++ b/.ci_logs2/Clippy lint/1_Set up job.txt @@ -0,0 +1,32 @@ +2026-06-21T01:29:23.8643656Z Current runner version: '2.335.1' +2026-06-21T01:29:23.8670608Z ##[group]Runner Image Provisioner +2026-06-21T01:29:23.8671637Z Hosted Compute Agent +2026-06-21T01:29:23.8672293Z Version: 20260611.554 +2026-06-21T01:29:23.8673203Z Commit: 5e0782fdc9014723d3be820dd114dd31555c2bd1 +2026-06-21T01:29:23.8674001Z Build Date: 2026-06-11T21:40:46Z +2026-06-21T01:29:23.8674706Z Worker ID: {ece7a84e-2275-4c9b-af12-4bee02087f5c} +2026-06-21T01:29:23.8675498Z Azure Region: westcentralus +2026-06-21T01:29:23.8676162Z ##[endgroup] +2026-06-21T01:29:23.8677543Z ##[group]Operating System +2026-06-21T01:29:23.8678283Z Ubuntu +2026-06-21T01:29:23.8678845Z 24.04.4 +2026-06-21T01:29:23.8679429Z LTS +2026-06-21T01:29:23.8680017Z ##[endgroup] +2026-06-21T01:29:23.8680587Z ##[group]Runner Image +2026-06-21T01:29:23.8681303Z Image: ubuntu-24.04 +2026-06-21T01:29:23.8681909Z Version: 20260615.205.1 +2026-06-21T01:29:23.8683244Z Included Software: https://github.com/actions/runner-images/blob/ubuntu24/20260615.205/images/ubuntu/Ubuntu2404-Readme.md +2026-06-21T01:29:23.8685032Z Image Release: https://github.com/actions/runner-images/releases/tag/ubuntu24%2F20260615.205 +2026-06-21T01:29:23.8686117Z ##[endgroup] +2026-06-21T01:29:23.8687241Z ##[group]GITHUB_TOKEN Permissions +2026-06-21T01:29:23.8689338Z Contents: read +2026-06-21T01:29:23.8689959Z Metadata: read +2026-06-21T01:29:23.8690613Z ##[endgroup] +2026-06-21T01:29:23.8693008Z Secret source: Actions +2026-06-21T01:29:23.8693826Z Prepare workflow directory +2026-06-21T01:29:23.9106978Z Prepare all required actions +2026-06-21T01:29:23.9145278Z Getting action download info +2026-06-21T01:29:24.2248346Z Download action repository 'actions/checkout@v4' (SHA:34e114876b0b11c390a56381ad16ebd13914f8d5) +2026-06-21T01:29:24.2955282Z Download action repository 'dtolnay/rust-toolchain@stable' (SHA:29eef336d9b2848a0b548edc03f92a220660cdb8) +2026-06-21T01:29:24.5304246Z Download action repository 'Swatinem/rust-cache@v2' (SHA:e18b497796c12c097a38f9edb9d0641fb99eee32) +2026-06-21T01:29:25.6006517Z Complete job name: Clippy lint diff --git a/.ci_logs2/Clippy lint/2_Run actions_checkout@v4.txt b/.ci_logs2/Clippy lint/2_Run actions_checkout@v4.txt new file mode 100644 index 0000000..5a18250 --- /dev/null +++ b/.ci_logs2/Clippy lint/2_Run actions_checkout@v4.txt @@ -0,0 +1,93 @@ +2026-06-21T01:29:25.6791083Z Node 20 is being deprecated. This workflow is running with Node 24 by default. If you need to temporarily use Node 20, you can set the ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true environment variable. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/ +2026-06-21T01:29:25.6804192Z ##[group]Run actions/checkout@v4 +2026-06-21T01:29:25.6805342Z with: +2026-06-21T01:29:25.6806318Z repository: OrbitChainLabs/OrbitChain-Contracts +2026-06-21T01:29:25.6814936Z token: *** +2026-06-21T01:29:25.6815541Z ssh-strict: true +2026-06-21T01:29:25.6816043Z ssh-user: git +2026-06-21T01:29:25.6816541Z persist-credentials: true +2026-06-21T01:29:25.6817107Z clean: true +2026-06-21T01:29:25.6817603Z sparse-checkout-cone-mode: true +2026-06-21T01:29:25.6818193Z fetch-depth: 1 +2026-06-21T01:29:25.6818666Z fetch-tags: false +2026-06-21T01:29:25.6819141Z show-progress: true +2026-06-21T01:29:25.6819624Z lfs: false +2026-06-21T01:29:25.6820141Z submodules: false +2026-06-21T01:29:25.6820689Z set-safe-directory: true +2026-06-21T01:29:25.6822063Z env: +2026-06-21T01:29:25.6823029Z CARGO_TERM_COLOR: always +2026-06-21T01:29:25.6823939Z RUST_BACKTRACE: short +2026-06-21T01:29:25.6825860Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:25.6827342Z ##[endgroup] +2026-06-21T01:29:25.7883786Z Syncing repository: OrbitChainLabs/OrbitChain-Contracts +2026-06-21T01:29:25.7886111Z ##[group]Getting Git version info +2026-06-21T01:29:25.7887050Z Working directory is '/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts' +2026-06-21T01:29:25.7888376Z [command]/usr/bin/git version +2026-06-21T01:29:25.7917735Z git version 2.54.0 +2026-06-21T01:29:25.7970687Z ##[endgroup] +2026-06-21T01:29:25.7987876Z Temporarily overriding HOME='/home/runner/work/_temp/50e7bbc5-fe98-4a43-af7e-45162cab4a1c' before making global git config changes +2026-06-21T01:29:25.7990471Z Adding repository directory to the temporary git global config as a safe directory +2026-06-21T01:29:25.7994354Z [command]/usr/bin/git config --global --add safe.directory /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts +2026-06-21T01:29:25.8043799Z Deleting the contents of '/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts' +2026-06-21T01:29:25.8047898Z ##[group]Initializing the repository +2026-06-21T01:29:25.8052294Z [command]/usr/bin/git init /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts +2026-06-21T01:29:25.8126766Z hint: Using 'master' as the name for the initial branch. This default branch name +2026-06-21T01:29:25.8128668Z hint: will change to "main" in Git 3.0. To configure the initial branch name +2026-06-21T01:29:25.8130277Z hint: to use in all of your new repositories, which will suppress this warning, +2026-06-21T01:29:25.8131547Z hint: call: +2026-06-21T01:29:25.8132170Z hint: +2026-06-21T01:29:25.8133073Z hint: git config --global init.defaultBranch +2026-06-21T01:29:25.8134201Z hint: +2026-06-21T01:29:25.8134853Z hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and +2026-06-21T01:29:25.8136303Z hint: 'development'. The just-created branch can be renamed via this command: +2026-06-21T01:29:25.8137119Z hint: +2026-06-21T01:29:25.8137576Z hint: git branch -m +2026-06-21T01:29:25.8138090Z hint: +2026-06-21T01:29:25.8138756Z hint: Disable this message with "git config set advice.defaultBranchName false" +2026-06-21T01:29:25.8140219Z Initialized empty Git repository in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/.git/ +2026-06-21T01:29:25.8142944Z [command]/usr/bin/git remote add origin https://github.com/OrbitChainLabs/OrbitChain-Contracts +2026-06-21T01:29:25.8188216Z ##[endgroup] +2026-06-21T01:29:25.8189697Z ##[group]Disabling automatic garbage collection +2026-06-21T01:29:25.8193674Z [command]/usr/bin/git config --local gc.auto 0 +2026-06-21T01:29:25.8228270Z ##[endgroup] +2026-06-21T01:29:25.8229639Z ##[group]Setting up auth +2026-06-21T01:29:25.8236273Z [command]/usr/bin/git config --local --name-only --get-regexp core\.sshCommand +2026-06-21T01:29:25.8273740Z [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || :" +2026-06-21T01:29:25.8614851Z [command]/usr/bin/git config --local --name-only --get-regexp http\.https\:\/\/github\.com\/\.extraheader +2026-06-21T01:29:25.8649380Z [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http\.https\:\/\/github\.com\/\.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :" +2026-06-21T01:29:25.8895125Z [command]/usr/bin/git config --local --name-only --get-regexp ^includeIf\.gitdir: +2026-06-21T01:29:25.8935956Z [command]/usr/bin/git submodule foreach --recursive git config --local --show-origin --name-only --get-regexp remote.origin.url +2026-06-21T01:29:25.9203876Z [command]/usr/bin/git config --local http.https://github.com/.extraheader AUTHORIZATION: basic *** +2026-06-21T01:29:25.9246912Z ##[endgroup] +2026-06-21T01:29:25.9248077Z ##[group]Fetching the repository +2026-06-21T01:29:25.9260073Z [command]/usr/bin/git -c protocol.version=2 fetch --no-tags --prune --no-recurse-submodules --depth=1 origin +59f3fe99e87bd5e1e546c9babe13e09825b65536:refs/remotes/pull/60/merge +2026-06-21T01:29:26.4224572Z From https://github.com/OrbitChainLabs/OrbitChain-Contracts +2026-06-21T01:29:26.4226205Z * [new ref] 59f3fe99e87bd5e1e546c9babe13e09825b65536 -> pull/60/merge +2026-06-21T01:29:26.4264617Z ##[endgroup] +2026-06-21T01:29:26.4266083Z ##[group]Determining the checkout info +2026-06-21T01:29:26.4267597Z ##[endgroup] +2026-06-21T01:29:26.4273092Z [command]/usr/bin/git sparse-checkout disable +2026-06-21T01:29:26.4333355Z [command]/usr/bin/git config --local --unset-all extensions.worktreeConfig +2026-06-21T01:29:26.4366982Z ##[group]Checking out the ref +2026-06-21T01:29:26.4372939Z [command]/usr/bin/git checkout --progress --force refs/remotes/pull/60/merge +2026-06-21T01:29:26.4531582Z Note: switching to 'refs/remotes/pull/60/merge'. +2026-06-21T01:29:26.4533164Z +2026-06-21T01:29:26.4534121Z You are in 'detached HEAD' state. You can look around, make experimental +2026-06-21T01:29:26.4535939Z changes and commit them, and you can discard any commits you make in this +2026-06-21T01:29:26.4537785Z state without impacting any branches by switching back to a branch. +2026-06-21T01:29:26.4538901Z +2026-06-21T01:29:26.4539743Z If you want to create a new branch to retain commits you create, you may +2026-06-21T01:29:26.4541402Z do so (now or later) by using -c with the switch command. Example: +2026-06-21T01:29:26.4542670Z +2026-06-21T01:29:26.4543234Z git switch -c +2026-06-21T01:29:26.4543997Z +2026-06-21T01:29:26.4544587Z Or undo this operation with: +2026-06-21T01:29:26.4545422Z +2026-06-21T01:29:26.4546149Z git switch - +2026-06-21T01:29:26.4546640Z +2026-06-21T01:29:26.4547282Z Turn off this advice by setting config variable advice.detachedHead to false +2026-06-21T01:29:26.4548404Z +2026-06-21T01:29:26.4549749Z HEAD is now at 59f3fe9 Merge 9e85affabcadb1e696b876ca7eae8bad3de3c85d into dc3d5e2b821bb2a0f2655582265c562926415b02 +2026-06-21T01:29:26.4553941Z ##[endgroup] +2026-06-21T01:29:26.4686734Z [command]/usr/bin/git log -1 --format=%H +2026-06-21T01:29:26.4688534Z 59f3fe99e87bd5e1e546c9babe13e09825b65536 diff --git a/.ci_logs2/Clippy lint/3_Install Rust toolchain.txt b/.ci_logs2/Clippy lint/3_Install Rust toolchain.txt new file mode 100644 index 0000000..597380b --- /dev/null +++ b/.ci_logs2/Clippy lint/3_Install Rust toolchain.txt @@ -0,0 +1,188 @@ +2026-06-21T01:29:26.5187440Z ##[warning]Unexpected input(s) 'cache', valid inputs are ['toolchain', 'targets', 'target', 'components'] +2026-06-21T01:29:26.5210159Z ##[group]Run dtolnay/rust-toolchain@stable +2026-06-21T01:29:26.5210990Z with: +2026-06-21T01:29:26.5211484Z cache: false +2026-06-21T01:29:26.5212026Z toolchain: stable +2026-06-21T01:29:26.5212732Z env: +2026-06-21T01:29:26.5213236Z CARGO_TERM_COLOR: always +2026-06-21T01:29:26.5213889Z RUST_BACKTRACE: short +2026-06-21T01:29:26.5215237Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:26.5216757Z ##[endgroup] +2026-06-21T01:29:26.5361810Z ##[group]Run : parse toolchain version +2026-06-21T01:29:26.5363121Z : parse toolchain version +2026-06-21T01:29:26.5363910Z if [[ -z $toolchain ]]; then +2026-06-21T01:29:26.5365425Z  # GitHub does not enforce `required: true` inputs itself. https://github.com/actions/runner/issues/1070 +2026-06-21T01:29:26.5367069Z  echo "'toolchain' is a required input" >&2 +2026-06-21T01:29:26.5368009Z  exit 1 +2026-06-21T01:29:26.5368933Z elif [[ $toolchain =~ ^stable' '[0-9]+' '(year|month|week|day)s?' 'ago$ ]]; then +2026-06-21T01:29:26.5370134Z  if [[ Linux == macOS ]]; then +2026-06-21T01:29:26.5371652Z  echo "toolchain=1.$((($(date -v-$(sed 's/stable \([0-9]*\) \(.\).*/\1\2/' <<< $toolchain) +%s)/60/60/24-16569)/7/6))" >> $GITHUB_OUTPUT +2026-06-21T01:29:26.5373292Z  else +2026-06-21T01:29:26.5374456Z  echo "toolchain=1.$((($(date --date "${toolchain#stable }" +%s)/60/60/24-16569)/7/6))" >> $GITHUB_OUTPUT +2026-06-21T01:29:26.5375841Z  fi +2026-06-21T01:29:26.5376669Z elif [[ $toolchain =~ ^stable' 'minus' '[0-9]+' 'releases?$ ]]; then +2026-06-21T01:29:26.5378249Z  echo "toolchain=1.$((($(date +%s)/60/60/24-16569)/7/6-${toolchain//[^0-9]/}))" >> $GITHUB_OUTPUT +2026-06-21T01:29:26.5379609Z elif [[ $toolchain =~ ^1\.[0-9]+$ ]]; then +2026-06-21T01:29:26.5381177Z  echo "toolchain=1.$((i=${toolchain#1.}, c=($(date +%s)/60/60/24-16569)/7/6, i+9*i*(10*i<=c)+90*i*(100*i<=c)))" >> $GITHUB_OUTPUT +2026-06-21T01:29:26.5382788Z else +2026-06-21T01:29:26.5383451Z  echo "toolchain=$toolchain" >> $GITHUB_OUTPUT +2026-06-21T01:29:26.5384315Z fi +2026-06-21T01:29:26.5535010Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:26.5536055Z env: +2026-06-21T01:29:26.5536571Z CARGO_TERM_COLOR: always +2026-06-21T01:29:26.5537212Z RUST_BACKTRACE: short +2026-06-21T01:29:26.5538787Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:26.5540285Z toolchain: stable +2026-06-21T01:29:26.5540840Z ##[endgroup] +2026-06-21T01:29:26.5734534Z ##[group]Run : construct rustup command line +2026-06-21T01:29:26.5735449Z : construct rustup command line +2026-06-21T01:29:26.5736754Z echo "targets=$(for t in ${targets//,/ }; do echo -n ' --target' $t; done)" >> $GITHUB_OUTPUT +2026-06-21T01:29:26.5738700Z echo "components=$(for c in ${components//,/ }; do echo -n ' --component' $c; done)" >> $GITHUB_OUTPUT +2026-06-21T01:29:26.5740162Z echo "downgrade=" >> $GITHUB_OUTPUT +2026-06-21T01:29:26.5775563Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:26.5776687Z env: +2026-06-21T01:29:26.5777181Z CARGO_TERM_COLOR: always +2026-06-21T01:29:26.5777825Z RUST_BACKTRACE: short +2026-06-21T01:29:26.5779157Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:26.5780647Z targets: +2026-06-21T01:29:26.5781123Z components: +2026-06-21T01:29:26.5781647Z ##[endgroup] +2026-06-21T01:29:26.5899743Z ##[group]Run : set $CARGO_HOME +2026-06-21T01:29:26.5900484Z : set $CARGO_HOME +2026-06-21T01:29:26.5901373Z echo CARGO_HOME=${CARGO_HOME:-"$HOME/.cargo"} >> $GITHUB_ENV +2026-06-21T01:29:26.5935904Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:26.5937089Z env: +2026-06-21T01:29:26.5937582Z CARGO_TERM_COLOR: always +2026-06-21T01:29:26.5938204Z RUST_BACKTRACE: short +2026-06-21T01:29:26.5939492Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:26.5940923Z ##[endgroup] +2026-06-21T01:29:26.6059232Z ##[group]Run : install rustup if needed +2026-06-21T01:29:26.6060065Z : install rustup if needed +2026-06-21T01:29:26.6060860Z if ! command -v rustup &>/dev/null; then +2026-06-21T01:29:26.6063305Z  curl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused --location --silent --show-error --fail https://sh.rustup.rs | sh -s -- --default-toolchain none -y +2026-06-21T01:29:26.6065477Z  echo "$CARGO_HOME/bin" >> $GITHUB_PATH +2026-06-21T01:29:26.6066265Z fi +2026-06-21T01:29:26.6100069Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:26.6101014Z env: +2026-06-21T01:29:26.6101499Z CARGO_TERM_COLOR: always +2026-06-21T01:29:26.6102110Z RUST_BACKTRACE: short +2026-06-21T01:29:26.6103643Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:26.6105132Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:29:26.6105799Z ##[endgroup] +2026-06-21T01:29:26.6225549Z ##[group]Run rustup toolchain install stable --profile minimal --no-self-update +2026-06-21T01:29:26.6227174Z rustup toolchain install stable --profile minimal --no-self-update +2026-06-21T01:29:26.6261215Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:26.6262143Z env: +2026-06-21T01:29:26.6262756Z CARGO_TERM_COLOR: always +2026-06-21T01:29:26.6263384Z RUST_BACKTRACE: short +2026-06-21T01:29:26.6265136Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:26.6267006Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:29:26.6267755Z RUSTUP_PERMIT_COPY_RENAME: 1 +2026-06-21T01:29:26.6268464Z ##[endgroup] +2026-06-21T01:29:26.7614867Z info: syncing channel updates for stable-x86_64-unknown-linux-gnu +2026-06-21T01:29:26.9047452Z +2026-06-21T01:29:26.9140843Z stable-x86_64-unknown-linux-gnu unchanged - rustc 1.96.0 (ac68faa20 2026-05-25) +2026-06-21T01:29:26.9142311Z +2026-06-21T01:29:26.9218332Z ##[group]Run rustup default stable +2026-06-21T01:29:26.9219544Z rustup default stable +2026-06-21T01:29:26.9258167Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:26.9259547Z env: +2026-06-21T01:29:26.9260718Z CARGO_TERM_COLOR: always +2026-06-21T01:29:26.9261756Z RUST_BACKTRACE: short +2026-06-21T01:29:26.9263788Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:26.9265790Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:29:26.9266890Z ##[endgroup] +2026-06-21T01:29:26.9399286Z info: using existing install for stable-x86_64-unknown-linux-gnu +2026-06-21T01:29:26.9406705Z info: default toolchain set to stable-x86_64-unknown-linux-gnu +2026-06-21T01:29:26.9407925Z +2026-06-21T01:29:26.9499370Z stable-x86_64-unknown-linux-gnu unchanged - rustc 1.96.0 (ac68faa20 2026-05-25) +2026-06-21T01:29:26.9503760Z +2026-06-21T01:29:26.9506918Z info: note that the toolchain 'stable-x86_64-unknown-linux-gnu' is currently in use (overridden by '/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/rust-toolchain.toml') +2026-06-21T01:29:26.9660294Z ##[group]Run : create cachekey +2026-06-21T01:29:26.9661425Z : create cachekey +2026-06-21T01:29:26.9663592Z DATE=$(rustc +stable --version --verbose | sed -ne 's/^commit-date: \(20[0-9][0-9]\)-\([01][0-9]\)-\([0-3][0-9]\)$/\1\2\3/p') +2026-06-21T01:29:26.9666144Z HASH=$(rustc +stable --version --verbose | sed -ne 's/^commit-hash: //p') +2026-06-21T01:29:26.9668070Z echo "cachekey=$(echo $DATE$HASH | head -c12)" >> $GITHUB_OUTPUT +2026-06-21T01:29:26.9706569Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:26.9708138Z env: +2026-06-21T01:29:26.9708902Z CARGO_TERM_COLOR: always +2026-06-21T01:29:26.9709838Z RUST_BACKTRACE: short +2026-06-21T01:29:26.9711550Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:26.9713725Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:29:26.9714719Z ##[endgroup] +2026-06-21T01:29:27.0194320Z ##[group]Run : disable incremental compilation +2026-06-21T01:29:27.0195629Z : disable incremental compilation +2026-06-21T01:29:27.0196885Z if [ -z "${CARGO_INCREMENTAL+set}" ]; then +2026-06-21T01:29:27.0198160Z  echo CARGO_INCREMENTAL=0 >> $GITHUB_ENV +2026-06-21T01:29:27.0199286Z fi +2026-06-21T01:29:27.0237185Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:27.0238479Z env: +2026-06-21T01:29:27.0239227Z CARGO_TERM_COLOR: always +2026-06-21T01:29:27.0240153Z RUST_BACKTRACE: short +2026-06-21T01:29:27.0241872Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:27.0244012Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:29:27.0244989Z ##[endgroup] +2026-06-21T01:29:27.0369161Z ##[group]Run : enable colors in Cargo output +2026-06-21T01:29:27.0370421Z : enable colors in Cargo output +2026-06-21T01:29:27.0371638Z if [ -z "${CARGO_TERM_COLOR+set}" ]; then +2026-06-21T01:29:27.0373123Z  echo CARGO_TERM_COLOR=always >> $GITHUB_ENV +2026-06-21T01:29:27.0374323Z fi +2026-06-21T01:29:27.0412938Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:27.0414234Z env: +2026-06-21T01:29:27.0414997Z CARGO_TERM_COLOR: always +2026-06-21T01:29:27.0415922Z RUST_BACKTRACE: short +2026-06-21T01:29:27.0417610Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:27.0419563Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:29:27.0420579Z CARGO_INCREMENTAL: 0 +2026-06-21T01:29:27.0421434Z ##[endgroup] +2026-06-21T01:29:27.0548091Z ##[group]Run : enable Cargo sparse registry +2026-06-21T01:29:27.0549313Z : enable Cargo sparse registry +2026-06-21T01:29:27.0550724Z # implemented in 1.66, stabilized in 1.68, made default in 1.70 +2026-06-21T01:29:27.0553498Z if [ -z "${CARGO_REGISTRIES_CRATES_IO_PROTOCOL+set}" -o -f "/home/runner/work/_temp"/.implicit_cargo_registries_crates_io_protocol ]; then +2026-06-21T01:29:27.0556185Z  if rustc +stable --version --verbose | grep -q '^release: 1\.6[89]\.'; then +2026-06-21T01:29:27.0558535Z  touch "/home/runner/work/_temp"/.implicit_cargo_registries_crates_io_protocol || true +2026-06-21T01:29:27.0560545Z  echo CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse >> $GITHUB_ENV +2026-06-21T01:29:27.0562438Z  elif rustc +stable --version --verbose | grep -q '^release: 1\.6[67]\.'; then +2026-06-21T01:29:27.0564763Z  touch "/home/runner/work/_temp"/.implicit_cargo_registries_crates_io_protocol || true +2026-06-21T01:29:27.0566753Z  echo CARGO_REGISTRIES_CRATES_IO_PROTOCOL=git >> $GITHUB_ENV +2026-06-21T01:29:27.0568101Z  fi +2026-06-21T01:29:27.0568876Z fi +2026-06-21T01:29:27.0609462Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:27.0610754Z env: +2026-06-21T01:29:27.0611508Z CARGO_TERM_COLOR: always +2026-06-21T01:29:27.0612435Z RUST_BACKTRACE: short +2026-06-21T01:29:27.0614330Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:27.0616221Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:29:27.0617215Z CARGO_INCREMENTAL: 0 +2026-06-21T01:29:27.0618073Z ##[endgroup] +2026-06-21T01:29:27.1064976Z ##[group]Run : work around spurious network errors in curl 8.0 +2026-06-21T01:29:27.1066531Z : work around spurious network errors in curl 8.0 +2026-06-21T01:29:27.1068510Z # https://rust-lang.zulipchat.com/#narrow/stream/246057-t-cargo/topic/timeout.20investigation +2026-06-21T01:29:27.1070937Z if rustc +stable --version --verbose | grep -q '^release: 1\.7[01]\.'; then +2026-06-21T01:29:27.1072816Z  echo CARGO_HTTP_MULTIPLEXING=false >> $GITHUB_ENV +2026-06-21T01:29:27.1074034Z fi +2026-06-21T01:29:27.1114549Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:27.1115828Z env: +2026-06-21T01:29:27.1116599Z CARGO_TERM_COLOR: always +2026-06-21T01:29:27.1117520Z RUST_BACKTRACE: short +2026-06-21T01:29:27.1119177Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:27.1121027Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:29:27.1122009Z CARGO_INCREMENTAL: 0 +2026-06-21T01:29:27.1123120Z ##[endgroup] +2026-06-21T01:29:27.1436454Z ##[group]Run rustc +stable --version --verbose +2026-06-21T01:29:27.1438272Z rustc +stable --version --verbose +2026-06-21T01:29:27.1496739Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:27.1498560Z env: +2026-06-21T01:29:27.1499634Z CARGO_TERM_COLOR: always +2026-06-21T01:29:27.1500909Z RUST_BACKTRACE: short +2026-06-21T01:29:27.1503651Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:27.1506481Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:29:27.1507867Z CARGO_INCREMENTAL: 0 +2026-06-21T01:29:27.1509004Z ##[endgroup] +2026-06-21T01:29:27.1749595Z rustc 1.96.0 (ac68faa20 2026-05-25) +2026-06-21T01:29:27.1751964Z binary: rustc +2026-06-21T01:29:27.1754050Z commit-hash: ac68faa20c58cbccd01ee7208bf3b6e93a7d7f96 +2026-06-21T01:29:27.1756102Z commit-date: 2026-05-25 +2026-06-21T01:29:27.1757628Z host: x86_64-unknown-linux-gnu +2026-06-21T01:29:27.1759212Z release: 1.96.0 +2026-06-21T01:29:27.1760773Z LLVM version: 22.1.2 diff --git a/.ci_logs2/Clippy lint/4_Cache cargo registry and target.txt b/.ci_logs2/Clippy lint/4_Cache cargo registry and target.txt new file mode 100644 index 0000000..70cc15b --- /dev/null +++ b/.ci_logs2/Clippy lint/4_Cache cargo registry and target.txt @@ -0,0 +1,68 @@ +2026-06-21T01:29:27.1992385Z ##[group]Run Swatinem/rust-cache@v2 +2026-06-21T01:29:27.1993592Z with: +2026-06-21T01:29:27.1994338Z cache-on-failure: true +2026-06-21T01:29:27.1995192Z prefix-key: v0-rust +2026-06-21T01:29:27.1996002Z add-job-id-key: true +2026-06-21T01:29:27.1996881Z add-rust-environment-hash-key: true +2026-06-21T01:29:27.1997859Z cache-targets: true +2026-06-21T01:29:27.1998685Z cache-all-crates: false +2026-06-21T01:29:27.1999589Z cache-workspace-crates: false +2026-06-21T01:29:27.2000479Z save-if: true +2026-06-21T01:29:27.2001239Z cache-provider: github +2026-06-21T01:29:27.2002065Z cache-bin: true +2026-06-21T01:29:27.2003189Z lookup-only: false +2026-06-21T01:29:27.2004214Z cmd-format: {0} +2026-06-21T01:29:27.2004959Z env: +2026-06-21T01:29:27.2005663Z CARGO_TERM_COLOR: always +2026-06-21T01:29:27.2006527Z RUST_BACKTRACE: short +2026-06-21T01:29:27.2008068Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:27.2009816Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:29:27.2010844Z CARGO_INCREMENTAL: 0 +2026-06-21T01:29:27.2011642Z ##[endgroup] +2026-06-21T01:29:27.4960965Z (node:2363) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead. +2026-06-21T01:29:27.4963525Z (Use `node --trace-deprecation ...` to show where the warning was created) +2026-06-21T01:29:31.3351184Z ##[group]Cache Configuration +2026-06-21T01:29:31.3351983Z Cache Provider: +2026-06-21T01:29:31.3352408Z github +2026-06-21T01:29:31.3353078Z Workspaces: +2026-06-21T01:29:31.3353607Z /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts +2026-06-21T01:29:31.3354281Z Cache Paths: +2026-06-21T01:29:31.3354744Z /home/runner/.cargo/bin +2026-06-21T01:29:31.3355190Z /home/runner/.cargo/.crates.toml +2026-06-21T01:29:31.3355719Z /home/runner/.cargo/.crates2.json +2026-06-21T01:29:31.3356230Z /home/runner/.cargo/registry +2026-06-21T01:29:31.3356729Z /home/runner/.cargo/git +2026-06-21T01:29:31.3357405Z /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/target +2026-06-21T01:29:31.3358023Z Restore Key: +2026-06-21T01:29:31.3358437Z v0-rust-clippy-Linux-x64-1f47b3b1 +2026-06-21T01:29:31.3358938Z Cache Key: +2026-06-21T01:29:31.3359466Z v0-rust-clippy-Linux-x64-1f47b3b1-8243978e +2026-06-21T01:29:31.3359996Z .. Prefix: +2026-06-21T01:29:31.3360403Z - v0-rust-clippy-Linux-x64 +2026-06-21T01:29:31.3360904Z .. Environment considered: +2026-06-21T01:29:31.3361345Z - Rust Versions: +2026-06-21T01:29:31.3361930Z - 1.96.0 x86_64-unknown-linux-gnu ac68faa20c58cbccd01ee7208bf3b6e93a7d7f96 +2026-06-21T01:29:31.3363057Z - 1.96.0 x86_64-unknown-linux-gnu ac68faa20c58cbccd01ee7208bf3b6e93a7d7f96 +2026-06-21T01:29:31.3363751Z - CARGO_HOME +2026-06-21T01:29:31.3364139Z - CARGO_INCREMENTAL +2026-06-21T01:29:31.3364563Z - CARGO_TERM_COLOR +2026-06-21T01:29:31.3364976Z - RUST_BACKTRACE +2026-06-21T01:29:31.3365384Z .. Lockfiles considered: +2026-06-21T01:29:31.3366068Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/.cargo/config.toml +2026-06-21T01:29:31.3367133Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/Cargo.toml +2026-06-21T01:29:31.3368150Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/common/Cargo.toml +2026-06-21T01:29:31.3369304Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/contracts/core/Cargo.toml +2026-06-21T01:29:31.3370407Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/Cargo.toml +2026-06-21T01:29:31.3371200Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/rust-toolchain.toml +2026-06-21T01:29:31.3371815Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/token-bridge/Cargo.toml +2026-06-21T01:29:31.3372857Z ##[endgroup] +2026-06-21T01:29:31.3373093Z +2026-06-21T01:29:31.3373269Z ... Restoring cache ... +2026-06-21T01:29:31.5295856Z Cache hit for: v0-rust-clippy-Linux-x64-1f47b3b1-8243978e +2026-06-21T01:29:32.7452294Z Received 20971520 of 181650538 (11.5%), 20.0 MBs/sec +2026-06-21T01:29:33.7392841Z Received 177456234 of 181650538 (97.7%), 84.6 MBs/sec +2026-06-21T01:29:33.7855477Z Received 181650538 of 181650538 (100.0%), 84.6 MBs/sec +2026-06-21T01:29:33.7856086Z Cache Size: ~173 MB (181650538 B) +2026-06-21T01:29:33.8003289Z [command]/usr/bin/tar -xf /home/runner/work/_temp/c96b3d00-4d11-4637-9d98-875ee13c7645/cache.tzst -P -C /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts --use-compress-program unzstd +2026-06-21T01:29:34.7829783Z Cache restored successfully +2026-06-21T01:29:34.7920761Z Restored from cache key "v0-rust-clippy-Linux-x64-1f47b3b1-8243978e" full match: true. diff --git a/.ci_logs2/Clippy lint/5_cargo clippy (contracts).txt b/.ci_logs2/Clippy lint/5_cargo clippy (contracts).txt new file mode 100644 index 0000000..f3fe2f8 --- /dev/null +++ b/.ci_logs2/Clippy lint/5_cargo clippy (contracts).txt @@ -0,0 +1,92 @@ +2026-06-21T01:29:34.8110458Z ##[group]Run cargo clippy -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge -- -D warnings +2026-06-21T01:29:34.8111630Z cargo clippy -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge -- -D warnings +2026-06-21T01:29:34.8147309Z shell: /usr/bin/bash -e {0} +2026-06-21T01:29:34.8147595Z env: +2026-06-21T01:29:34.8147816Z CARGO_TERM_COLOR: always +2026-06-21T01:29:34.8148075Z RUST_BACKTRACE: short +2026-06-21T01:29:34.8148548Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:34.8149066Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:29:34.8149337Z CARGO_INCREMENTAL: 0 +2026-06-21T01:29:34.8149569Z CACHE_ON_FAILURE: true +2026-06-21T01:29:34.8149804Z ##[endgroup] +2026-06-21T01:29:35.1023017Z  Updating crates.io index +2026-06-21T01:29:36.0113963Z  Locking 212 packages to latest compatible versions +2026-06-21T01:29:36.0155884Z  Adding arbitrary v1.3.2 (available: v1.4.2) +2026-06-21T01:29:36.0250709Z  Adding crypto-common v0.1.6 (available: v0.1.7) +2026-06-21T01:29:36.0311686Z  Adding derive_arbitrary v1.3.2 (available: v1.4.2) +2026-06-21T01:29:36.0590050Z  Adding rand v0.8.6 (available: v0.10.1) +2026-06-21T01:29:36.0687962Z  Adding sha2 v0.10.9 (available: v0.11.0) +2026-06-21T01:29:36.1028516Z  Adding toml v0.8.23 (available: v1.1.2+spec-1.1.0) +2026-06-21T01:29:36.8135015Z  Compiling serde_core v1.0.228 +2026-06-21T01:29:36.8136144Z  Compiling serde_json v1.0.150 +2026-06-21T01:29:36.8137244Z  Checking zeroize v1.9.0 +2026-06-21T01:29:36.8222029Z  Compiling schemars v0.8.22 +2026-06-21T01:29:36.8294785Z  Compiling thiserror v1.0.69 +2026-06-21T01:29:37.0793739Z  Checking hex v0.4.3 +2026-06-21T01:29:37.1325088Z  Checking generic-array v0.14.9 +2026-06-21T01:29:37.2513932Z  Checking der v0.7.10 +2026-06-21T01:29:37.6634105Z  Checking block-buffer v0.10.4 +2026-06-21T01:29:37.7343997Z  Checking crypto-common v0.1.6 +2026-06-21T01:29:37.7884366Z  Checking sec1 v0.7.3 +2026-06-21T01:29:37.7954401Z  Checking digest v0.10.7 +2026-06-21T01:29:37.8904392Z  Checking crypto-bigint v0.5.5 +2026-06-21T01:29:37.9533968Z  Checking sha2 v0.10.9 +2026-06-21T01:29:38.2534330Z  Checking signature v2.2.0 +2026-06-21T01:29:38.3154543Z  Checking ark-serialize v0.5.0 +2026-06-21T01:29:38.5334257Z  Checking ark-ff v0.5.0 +2026-06-21T01:29:38.9164047Z  Checking elliptic-curve v0.13.8 +2026-06-21T01:29:39.0884625Z  Compiling serde v1.0.228 +2026-06-21T01:29:39.2140767Z  Checking hmac v0.12.1 +2026-06-21T01:29:39.2937701Z  Checking rfc6979 v0.4.0 +2026-06-21T01:29:39.3510723Z  Checking ecdsa v0.16.9 +2026-06-21T01:29:39.6696952Z  Checking primeorder v0.13.6 +2026-06-21T01:29:39.8434214Z  Checking ed25519 v2.2.3 +2026-06-21T01:29:39.8720708Z  Checking curve25519-dalek v4.1.3 +2026-06-21T01:29:40.0254520Z  Compiling crate-git-revision v0.0.6 +2026-06-21T01:29:40.2099140Z  Compiling stellar-strkey v0.0.13 +2026-06-21T01:29:40.3264106Z  Compiling stellar-xdr v26.0.1 +2026-06-21T01:29:40.8034024Z  Compiling soroban-env-common v26.1.3 +2026-06-21T01:29:41.0065565Z  Compiling stellar-strkey v0.0.16 +2026-06-21T01:29:41.1144443Z  Compiling serde_with v3.21.0 +2026-06-21T01:29:41.4985063Z  Compiling soroban-env-host v26.1.3 +2026-06-21T01:29:41.6084558Z  Checking sha3 v0.10.9 +2026-06-21T01:29:41.7530585Z  Checking ed25519-dalek v2.2.0 +2026-06-21T01:29:41.8701452Z  Compiling soroban-sdk v26.1.0 +2026-06-21T01:29:42.0073863Z  Checking p256 v0.13.2 +2026-06-21T01:29:42.1983945Z  Checking k256 v0.13.4 +2026-06-21T01:29:43.4897037Z  Checking ark-poly v0.5.0 +2026-06-21T01:29:44.0197806Z  Checking ark-ec v0.5.0 +2026-06-21T01:29:45.5842236Z  Checking ark-bn254 v0.5.0 +2026-06-21T01:29:45.5843439Z  Checking ark-bls12-381 v0.5.0 +2026-06-21T01:29:57.3822789Z  Compiling soroban-spec v26.1.0 +2026-06-21T01:29:57.5144316Z  Compiling soroban-spec-rust v26.1.0 +2026-06-21T01:29:58.0217530Z  Compiling soroban-env-macros v26.1.3 +2026-06-21T01:30:00.2447081Z  Compiling soroban-sdk-macros v26.1.0 +2026-06-21T01:30:04.3444144Z  Checking orbitchain-common v0.1.0 (/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/common) +2026-06-21T01:30:04.3445537Z  Checking orbitchain-core v0.1.0 (/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/contracts/core) +2026-06-21T01:30:05.5686349Z  Checking orbitchain-campaign v0.1.0 (/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign) +2026-06-21T01:30:05.5688254Z  Checking orbitchain-token-bridge v0.1.0 (/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/token-bridge) +2026-06-21T01:30:05.7273433Z error: unused import: `Address` +2026-06-21T01:30:05.7274015Z --> campaign/src/contract.rs:6:37 +2026-06-21T01:30:05.7274363Z | +2026-06-21T01:30:05.7280375Z 6 | use soroban_sdk::{panic_with_error, Address, Env}; +2026-06-21T01:30:05.7280915Z | ^^^^^^^ +2026-06-21T01:30:05.7281268Z | +2026-06-21T01:30:05.7281643Z = note: `-D unused-imports` implied by `-D warnings` +2026-06-21T01:30:05.7282241Z = help: to override `-D warnings` add `#[allow(unused_imports)]` +2026-06-21T01:30:05.7282778Z +2026-06-21T01:30:06.0510115Z error: manual saturating arithmetic +2026-06-21T01:30:06.0510898Z --> campaign/src/contract.rs:106:24 +2026-06-21T01:30:06.0511407Z | +2026-06-21T01:30:06.0511942Z 106 | let max_end_time = current_time +2026-06-21T01:30:06.0512847Z |  ________________________^ +2026-06-21T01:30:06.0513551Z 107 | | .checked_add(MAX_DEADLINE_GAP_SECONDS) +2026-06-21T01:30:06.0514538Z 108 | | .unwrap_or(u64::MAX); +2026-06-21T01:30:06.0515810Z | |____________________________^ help: consider using `saturating_add`: `current_time.saturating_add(MAX_DEADLINE_GAP_SECONDS)` +2026-06-21T01:30:06.0516860Z | +2026-06-21T01:30:06.0518006Z = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#manual_saturating_arithmetic +2026-06-21T01:30:06.0519702Z = note: `-D clippy::manual-saturating-arithmetic` implied by `-D warnings` +2026-06-21T01:30:06.0520954Z = help: to override `-D warnings` add `#[allow(clippy::manual_saturating_arithmetic)]` +2026-06-21T01:30:06.0521497Z +2026-06-21T01:30:06.2736368Z error: could not compile `orbitchain-campaign` (lib) due to 2 previous errors +2026-06-21T01:30:06.3330558Z ##[error]Process completed with exit code 101. diff --git a/.ci_logs2/Clippy lint/9_Post Cache cargo registry and target.txt b/.ci_logs2/Clippy lint/9_Post Cache cargo registry and target.txt new file mode 100644 index 0000000..74fe337 --- /dev/null +++ b/.ci_logs2/Clippy lint/9_Post Cache cargo registry and target.txt @@ -0,0 +1,4 @@ +2026-06-21T01:30:06.3443170Z Post job cleanup. +2026-06-21T01:30:06.6333133Z Cache up-to-date. +2026-06-21T01:30:06.6335832Z (node:3038) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead. +2026-06-21T01:30:06.6336932Z (Use `node --trace-deprecation ...` to show where the warning was created) diff --git a/.ci_logs2/Clippy lint/system.txt b/.ci_logs2/Clippy lint/system.txt new file mode 100644 index 0000000..c88f276 --- /dev/null +++ b/.ci_logs2/Clippy lint/system.txt @@ -0,0 +1,8 @@ +2026-06-21T01:29:21.3020000Z Evaluating clippy.if +2026-06-21T01:29:21.3020000Z Evaluating: success() +2026-06-21T01:29:21.3020000Z Result: true +2026-06-21T01:29:21.3040000Z Requested labels: ubuntu-latest +2026-06-21T01:29:21.3040000Z Job defined at: OrbitChainLabs/OrbitChain-Contracts/.github/workflows/ci.yml@refs/pull/60/merge +2026-06-21T01:29:21.3040000Z Waiting for a runner to pick up this job... +2026-06-21T01:29:21.8010000Z Job is about to start running on the hosted runner: GitHub Actions 1000000146 +2026-06-21T01:29:21.8010000Z Job is waiting for a hosted runner to come online. \ No newline at end of file diff --git a/.ci_logs2/Format check/10_Post Run actions_checkout@v4.txt b/.ci_logs2/Format check/10_Post Run actions_checkout@v4.txt new file mode 100644 index 0000000..b595227 --- /dev/null +++ b/.ci_logs2/Format check/10_Post Run actions_checkout@v4.txt @@ -0,0 +1,15 @@ +2026-06-21T01:29:32.1915735Z Node 20 is being deprecated. This workflow is running with Node 24 by default. If you need to temporarily use Node 20, you can set the ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true environment variable. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/ +2026-06-21T01:29:32.1917412Z Post job cleanup. +2026-06-21T01:29:32.2771456Z [command]/usr/bin/git version +2026-06-21T01:29:32.2807865Z git version 2.54.0 +2026-06-21T01:29:32.2878122Z Temporarily overriding HOME='/home/runner/work/_temp/4c091e35-575d-4eaf-9ac3-df0a0519ae20' before making global git config changes +2026-06-21T01:29:32.2879603Z Adding repository directory to the temporary git global config as a safe directory +2026-06-21T01:29:32.2884053Z [command]/usr/bin/git config --global --add safe.directory /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts +2026-06-21T01:29:32.2923715Z [command]/usr/bin/git config --local --name-only --get-regexp core\.sshCommand +2026-06-21T01:29:32.2957688Z [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || :" +2026-06-21T01:29:32.3187509Z [command]/usr/bin/git config --local --name-only --get-regexp http\.https\:\/\/github\.com\/\.extraheader +2026-06-21T01:29:32.3213687Z http.https://github.com/.extraheader +2026-06-21T01:29:32.3225444Z [command]/usr/bin/git config --local --unset-all http.https://github.com/.extraheader +2026-06-21T01:29:32.3256283Z [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http\.https\:\/\/github\.com\/\.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :" +2026-06-21T01:29:32.3476627Z [command]/usr/bin/git config --local --name-only --get-regexp ^includeIf\.gitdir: +2026-06-21T01:29:32.3506132Z [command]/usr/bin/git submodule foreach --recursive git config --local --show-origin --name-only --get-regexp remote.origin.url diff --git a/.ci_logs2/Format check/11_Complete job.txt b/.ci_logs2/Format check/11_Complete job.txt new file mode 100644 index 0000000..73c6fa0 --- /dev/null +++ b/.ci_logs2/Format check/11_Complete job.txt @@ -0,0 +1,2 @@ +2026-06-21T01:29:32.3849593Z Cleaning up orphan processes +2026-06-21T01:29:32.4125954Z ##[warning]Node.js 20 is deprecated. The following actions target Node.js 20 but are being forced to run on Node.js 24: actions/checkout@v4. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/ diff --git a/.ci_logs2/Format check/1_Set up job.txt b/.ci_logs2/Format check/1_Set up job.txt new file mode 100644 index 0000000..f777768 --- /dev/null +++ b/.ci_logs2/Format check/1_Set up job.txt @@ -0,0 +1,32 @@ +2026-06-21T01:29:23.5239452Z Current runner version: '2.335.1' +2026-06-21T01:29:23.5277151Z ##[group]Runner Image Provisioner +2026-06-21T01:29:23.5278460Z Hosted Compute Agent +2026-06-21T01:29:23.5279436Z Version: 20260611.554 +2026-06-21T01:29:23.5280510Z Commit: 5e0782fdc9014723d3be820dd114dd31555c2bd1 +2026-06-21T01:29:23.5281682Z Build Date: 2026-06-11T21:40:46Z +2026-06-21T01:29:23.5282768Z Worker ID: {9c232506-fefe-4c59-b0b1-2edd6316e8ce} +2026-06-21T01:29:23.5284162Z Azure Region: northcentralus +2026-06-21T01:29:23.5285203Z ##[endgroup] +2026-06-21T01:29:23.5288805Z ##[group]Operating System +2026-06-21T01:29:23.5289975Z Ubuntu +2026-06-21T01:29:23.5290849Z 24.04.4 +2026-06-21T01:29:23.5291916Z LTS +2026-06-21T01:29:23.5292885Z ##[endgroup] +2026-06-21T01:29:23.5293866Z ##[group]Runner Image +2026-06-21T01:29:23.5294845Z Image: ubuntu-24.04 +2026-06-21T01:29:23.5295814Z Version: 20260615.205.1 +2026-06-21T01:29:23.5298104Z Included Software: https://github.com/actions/runner-images/blob/ubuntu24/20260615.205/images/ubuntu/Ubuntu2404-Readme.md +2026-06-21T01:29:23.5301339Z Image Release: https://github.com/actions/runner-images/releases/tag/ubuntu24%2F20260615.205 +2026-06-21T01:29:23.5303089Z ##[endgroup] +2026-06-21T01:29:23.5304939Z ##[group]GITHUB_TOKEN Permissions +2026-06-21T01:29:23.5308675Z Contents: read +2026-06-21T01:29:23.5309665Z Metadata: read +2026-06-21T01:29:23.5310686Z ##[endgroup] +2026-06-21T01:29:23.5313845Z Secret source: Actions +2026-06-21T01:29:23.5315563Z Prepare workflow directory +2026-06-21T01:29:23.5813010Z Prepare all required actions +2026-06-21T01:29:23.5870037Z Getting action download info +2026-06-21T01:29:23.8595082Z Download action repository 'actions/checkout@v4' (SHA:34e114876b0b11c390a56381ad16ebd13914f8d5) +2026-06-21T01:29:23.9379102Z Download action repository 'dtolnay/rust-toolchain@stable' (SHA:29eef336d9b2848a0b548edc03f92a220660cdb8) +2026-06-21T01:29:24.0838050Z Download action repository 'Swatinem/rust-cache@v2' (SHA:e18b497796c12c097a38f9edb9d0641fb99eee32) +2026-06-21T01:29:24.7287968Z Complete job name: Format check diff --git a/.ci_logs2/Format check/2_Run actions_checkout@v4.txt b/.ci_logs2/Format check/2_Run actions_checkout@v4.txt new file mode 100644 index 0000000..1bcc2da --- /dev/null +++ b/.ci_logs2/Format check/2_Run actions_checkout@v4.txt @@ -0,0 +1,93 @@ +2026-06-21T01:29:24.8069989Z Node 20 is being deprecated. This workflow is running with Node 24 by default. If you need to temporarily use Node 20, you can set the ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true environment variable. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/ +2026-06-21T01:29:24.8079796Z ##[group]Run actions/checkout@v4 +2026-06-21T01:29:24.8080660Z with: +2026-06-21T01:29:24.8081231Z repository: OrbitChainLabs/OrbitChain-Contracts +2026-06-21T01:29:24.8086110Z token: *** +2026-06-21T01:29:24.8086596Z ssh-strict: true +2026-06-21T01:29:24.8087283Z ssh-user: git +2026-06-21T01:29:24.8087780Z persist-credentials: true +2026-06-21T01:29:24.8088324Z clean: true +2026-06-21T01:29:24.8088819Z sparse-checkout-cone-mode: true +2026-06-21T01:29:24.8089399Z fetch-depth: 1 +2026-06-21T01:29:24.8089882Z fetch-tags: false +2026-06-21T01:29:24.8090377Z show-progress: true +2026-06-21T01:29:24.8090872Z lfs: false +2026-06-21T01:29:24.8091429Z submodules: false +2026-06-21T01:29:24.8091967Z set-safe-directory: true +2026-06-21T01:29:24.8092776Z env: +2026-06-21T01:29:24.8093254Z CARGO_TERM_COLOR: always +2026-06-21T01:29:24.8093782Z RUST_BACKTRACE: short +2026-06-21T01:29:24.8094728Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:24.8095739Z ##[endgroup] +2026-06-21T01:29:24.9063210Z Syncing repository: OrbitChainLabs/OrbitChain-Contracts +2026-06-21T01:29:24.9065595Z ##[group]Getting Git version info +2026-06-21T01:29:24.9066647Z Working directory is '/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts' +2026-06-21T01:29:24.9068447Z [command]/usr/bin/git version +2026-06-21T01:29:24.9165406Z git version 2.54.0 +2026-06-21T01:29:24.9220054Z ##[endgroup] +2026-06-21T01:29:24.9234201Z Temporarily overriding HOME='/home/runner/work/_temp/a700b0f7-3d9c-42f3-afd1-2bc5a51aacde' before making global git config changes +2026-06-21T01:29:24.9235909Z Adding repository directory to the temporary git global config as a safe directory +2026-06-21T01:29:24.9240381Z [command]/usr/bin/git config --global --add safe.directory /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts +2026-06-21T01:29:24.9290480Z Deleting the contents of '/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts' +2026-06-21T01:29:24.9294319Z ##[group]Initializing the repository +2026-06-21T01:29:24.9299478Z [command]/usr/bin/git init /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts +2026-06-21T01:29:24.9407485Z hint: Using 'master' as the name for the initial branch. This default branch name +2026-06-21T01:29:24.9409451Z hint: will change to "main" in Git 3.0. To configure the initial branch name +2026-06-21T01:29:24.9411256Z hint: to use in all of your new repositories, which will suppress this warning, +2026-06-21T01:29:24.9412421Z hint: call: +2026-06-21T01:29:24.9413267Z hint: +2026-06-21T01:29:24.9414242Z hint: git config --global init.defaultBranch +2026-06-21T01:29:24.9415425Z hint: +2026-06-21T01:29:24.9416515Z hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and +2026-06-21T01:29:24.9418250Z hint: 'development'. The just-created branch can be renamed via this command: +2026-06-21T01:29:24.9419605Z hint: +2026-06-21T01:29:24.9420125Z hint: git branch -m +2026-06-21T01:29:24.9420666Z hint: +2026-06-21T01:29:24.9421383Z hint: Disable this message with "git config set advice.defaultBranchName false" +2026-06-21T01:29:24.9422905Z Initialized empty Git repository in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/.git/ +2026-06-21T01:29:24.9425777Z [command]/usr/bin/git remote add origin https://github.com/OrbitChainLabs/OrbitChain-Contracts +2026-06-21T01:29:24.9468450Z ##[endgroup] +2026-06-21T01:29:24.9469866Z ##[group]Disabling automatic garbage collection +2026-06-21T01:29:24.9471489Z [command]/usr/bin/git config --local gc.auto 0 +2026-06-21T01:29:24.9499675Z ##[endgroup] +2026-06-21T01:29:24.9501027Z ##[group]Setting up auth +2026-06-21T01:29:24.9506041Z [command]/usr/bin/git config --local --name-only --get-regexp core\.sshCommand +2026-06-21T01:29:24.9539435Z [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || :" +2026-06-21T01:29:24.9884966Z [command]/usr/bin/git config --local --name-only --get-regexp http\.https\:\/\/github\.com\/\.extraheader +2026-06-21T01:29:24.9917748Z [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http\.https\:\/\/github\.com\/\.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :" +2026-06-21T01:29:25.0131217Z [command]/usr/bin/git config --local --name-only --get-regexp ^includeIf\.gitdir: +2026-06-21T01:29:25.0161676Z [command]/usr/bin/git submodule foreach --recursive git config --local --show-origin --name-only --get-regexp remote.origin.url +2026-06-21T01:29:25.0384078Z [command]/usr/bin/git config --local http.https://github.com/.extraheader AUTHORIZATION: basic *** +2026-06-21T01:29:25.0419970Z ##[endgroup] +2026-06-21T01:29:25.0420887Z ##[group]Fetching the repository +2026-06-21T01:29:25.0429523Z [command]/usr/bin/git -c protocol.version=2 fetch --no-tags --prune --no-recurse-submodules --depth=1 origin +59f3fe99e87bd5e1e546c9babe13e09825b65536:refs/remotes/pull/60/merge +2026-06-21T01:29:25.3652077Z From https://github.com/OrbitChainLabs/OrbitChain-Contracts +2026-06-21T01:29:25.3653619Z * [new ref] 59f3fe99e87bd5e1e546c9babe13e09825b65536 -> pull/60/merge +2026-06-21T01:29:25.3689963Z ##[endgroup] +2026-06-21T01:29:25.3691242Z ##[group]Determining the checkout info +2026-06-21T01:29:25.3692815Z ##[endgroup] +2026-06-21T01:29:25.3697352Z [command]/usr/bin/git sparse-checkout disable +2026-06-21T01:29:25.3743492Z [command]/usr/bin/git config --local --unset-all extensions.worktreeConfig +2026-06-21T01:29:25.3780398Z ##[group]Checking out the ref +2026-06-21T01:29:25.3781742Z [command]/usr/bin/git checkout --progress --force refs/remotes/pull/60/merge +2026-06-21T01:29:25.3935700Z Note: switching to 'refs/remotes/pull/60/merge'. +2026-06-21T01:29:25.3937251Z +2026-06-21T01:29:25.3937996Z You are in 'detached HEAD' state. You can look around, make experimental +2026-06-21T01:29:25.3939745Z changes and commit them, and you can discard any commits you make in this +2026-06-21T01:29:25.3941475Z state without impacting any branches by switching back to a branch. +2026-06-21T01:29:25.3943074Z +2026-06-21T01:29:25.3944109Z If you want to create a new branch to retain commits you create, you may +2026-06-21T01:29:25.3946204Z do so (now or later) by using -c with the switch command. Example: +2026-06-21T01:29:25.3947559Z +2026-06-21T01:29:25.3947977Z git switch -c +2026-06-21T01:29:25.3948639Z +2026-06-21T01:29:25.3949088Z Or undo this operation with: +2026-06-21T01:29:25.3949790Z +2026-06-21T01:29:25.3950204Z git switch - +2026-06-21T01:29:25.3950752Z +2026-06-21T01:29:25.3951648Z Turn off this advice by setting config variable advice.detachedHead to false +2026-06-21T01:29:25.3953046Z +2026-06-21T01:29:25.3954683Z HEAD is now at 59f3fe9 Merge 9e85affabcadb1e696b876ca7eae8bad3de3c85d into dc3d5e2b821bb2a0f2655582265c562926415b02 +2026-06-21T01:29:25.3959341Z ##[endgroup] +2026-06-21T01:29:25.3985303Z [command]/usr/bin/git log -1 --format=%H +2026-06-21T01:29:25.4008198Z 59f3fe99e87bd5e1e546c9babe13e09825b65536 diff --git a/.ci_logs2/Format check/3_Install Rust toolchain.txt b/.ci_logs2/Format check/3_Install Rust toolchain.txt new file mode 100644 index 0000000..bdc2b84 --- /dev/null +++ b/.ci_logs2/Format check/3_Install Rust toolchain.txt @@ -0,0 +1,188 @@ +2026-06-21T01:29:25.4689715Z ##[warning]Unexpected input(s) 'cache', valid inputs are ['toolchain', 'targets', 'target', 'components'] +2026-06-21T01:29:25.4715321Z ##[group]Run dtolnay/rust-toolchain@stable +2026-06-21T01:29:25.4716506Z with: +2026-06-21T01:29:25.4717470Z cache: false +2026-06-21T01:29:25.4718319Z toolchain: stable +2026-06-21T01:29:25.4719165Z env: +2026-06-21T01:29:25.4719953Z CARGO_TERM_COLOR: always +2026-06-21T01:29:25.4720894Z RUST_BACKTRACE: short +2026-06-21T01:29:25.4722658Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:25.4724569Z ##[endgroup] +2026-06-21T01:29:25.4878104Z ##[group]Run : parse toolchain version +2026-06-21T01:29:25.4879335Z : parse toolchain version +2026-06-21T01:29:25.4880411Z if [[ -z $toolchain ]]; then +2026-06-21T01:29:25.4882328Z  # GitHub does not enforce `required: true` inputs itself. https://github.com/actions/runner/issues/1070 +2026-06-21T01:29:25.4885250Z  echo "'toolchain' is a required input" >&2 +2026-06-21T01:29:25.4887703Z  exit 1 +2026-06-21T01:29:25.4889899Z elif [[ $toolchain =~ ^stable' '[0-9]+' '(year|month|week|day)s?' 'ago$ ]]; then +2026-06-21T01:29:25.4892691Z  if [[ Linux == macOS ]]; then +2026-06-21T01:29:25.4896162Z  echo "toolchain=1.$((($(date -v-$(sed 's/stable \([0-9]*\) \(.\).*/\1\2/' <<< $toolchain) +%s)/60/60/24-16569)/7/6))" >> $GITHUB_OUTPUT +2026-06-21T01:29:25.4899806Z  else +2026-06-21T01:29:25.4901508Z  echo "toolchain=1.$((($(date --date "${toolchain#stable }" +%s)/60/60/24-16569)/7/6))" >> $GITHUB_OUTPUT +2026-06-21T01:29:25.4903337Z  fi +2026-06-21T01:29:25.4904505Z elif [[ $toolchain =~ ^stable' 'minus' '[0-9]+' 'releases?$ ]]; then +2026-06-21T01:29:25.4908103Z  echo "toolchain=1.$((($(date +%s)/60/60/24-16569)/7/6-${toolchain//[^0-9]/}))" >> $GITHUB_OUTPUT +2026-06-21T01:29:25.4911258Z elif [[ $toolchain =~ ^1\.[0-9]+$ ]]; then +2026-06-21T01:29:25.4914823Z  echo "toolchain=1.$((i=${toolchain#1.}, c=($(date +%s)/60/60/24-16569)/7/6, i+9*i*(10*i<=c)+90*i*(100*i<=c)))" >> $GITHUB_OUTPUT +2026-06-21T01:29:25.4918431Z else +2026-06-21T01:29:25.4920133Z  echo "toolchain=$toolchain" >> $GITHUB_OUTPUT +2026-06-21T01:29:25.4922231Z fi +2026-06-21T01:29:25.5141833Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:25.5143152Z env: +2026-06-21T01:29:25.5143900Z CARGO_TERM_COLOR: always +2026-06-21T01:29:25.5144847Z RUST_BACKTRACE: short +2026-06-21T01:29:25.5147124Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:25.5149069Z toolchain: stable +2026-06-21T01:29:25.5149897Z ##[endgroup] +2026-06-21T01:29:25.5374401Z ##[group]Run : construct rustup command line +2026-06-21T01:29:25.5376484Z : construct rustup command line +2026-06-21T01:29:25.5379686Z echo "targets=$(for t in ${targets//,/ }; do echo -n ' --target' $t; done)" >> $GITHUB_OUTPUT +2026-06-21T01:29:25.5383930Z echo "components=$(for c in ${components//,/ }; do echo -n ' --component' $c; done)" >> $GITHUB_OUTPUT +2026-06-21T01:29:25.5387444Z echo "downgrade=" >> $GITHUB_OUTPUT +2026-06-21T01:29:25.5435847Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:25.5438273Z env: +2026-06-21T01:29:25.5439590Z CARGO_TERM_COLOR: always +2026-06-21T01:29:25.5441269Z RUST_BACKTRACE: short +2026-06-21T01:29:25.5444471Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:25.5448250Z targets: +2026-06-21T01:29:25.5449554Z components: +2026-06-21T01:29:25.5450894Z ##[endgroup] +2026-06-21T01:29:25.5638144Z ##[group]Run : set $CARGO_HOME +2026-06-21T01:29:25.5639886Z : set $CARGO_HOME +2026-06-21T01:29:25.5642254Z echo CARGO_HOME=${CARGO_HOME:-"$HOME/.cargo"} >> $GITHUB_ENV +2026-06-21T01:29:25.5690587Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:25.5693072Z env: +2026-06-21T01:29:25.5694351Z CARGO_TERM_COLOR: always +2026-06-21T01:29:25.5695875Z RUST_BACKTRACE: short +2026-06-21T01:29:25.5699055Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:25.5702303Z ##[endgroup] +2026-06-21T01:29:25.5838225Z ##[group]Run : install rustup if needed +2026-06-21T01:29:25.5839353Z : install rustup if needed +2026-06-21T01:29:25.5840504Z if ! command -v rustup &>/dev/null; then +2026-06-21T01:29:25.5843214Z  curl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused --location --silent --show-error --fail https://sh.rustup.rs | sh -s -- --default-toolchain none -y +2026-06-21T01:29:25.5845952Z  echo "$CARGO_HOME/bin" >> $GITHUB_PATH +2026-06-21T01:29:25.5847287Z fi +2026-06-21T01:29:25.5878294Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:25.5879581Z env: +2026-06-21T01:29:25.5880324Z CARGO_TERM_COLOR: always +2026-06-21T01:29:25.5881268Z RUST_BACKTRACE: short +2026-06-21T01:29:25.5882934Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:25.5884821Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:29:25.5885796Z ##[endgroup] +2026-06-21T01:29:25.6020655Z ##[group]Run rustup toolchain install stable --profile minimal --no-self-update +2026-06-21T01:29:25.6022619Z rustup toolchain install stable --profile minimal --no-self-update +2026-06-21T01:29:25.6054714Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:25.6055971Z env: +2026-06-21T01:29:25.6056703Z CARGO_TERM_COLOR: always +2026-06-21T01:29:25.6057880Z RUST_BACKTRACE: short +2026-06-21T01:29:25.6059539Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:25.6061422Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:29:25.6062452Z RUSTUP_PERMIT_COPY_RENAME: 1 +2026-06-21T01:29:25.6063368Z ##[endgroup] +2026-06-21T01:29:25.8575781Z info: syncing channel updates for stable-x86_64-unknown-linux-gnu +2026-06-21T01:29:26.0316115Z +2026-06-21T01:29:26.0400067Z stable-x86_64-unknown-linux-gnu unchanged - rustc 1.96.0 (ac68faa20 2026-05-25) +2026-06-21T01:29:26.0401437Z +2026-06-21T01:29:26.0518913Z ##[group]Run rustup default stable +2026-06-21T01:29:26.0520166Z rustup default stable +2026-06-21T01:29:26.0555815Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:26.0557432Z env: +2026-06-21T01:29:26.0558581Z CARGO_TERM_COLOR: always +2026-06-21T01:29:26.0559664Z RUST_BACKTRACE: short +2026-06-21T01:29:26.0561880Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:26.0564031Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:29:26.0565147Z ##[endgroup] +2026-06-21T01:29:26.0683082Z info: using existing install for stable-x86_64-unknown-linux-gnu +2026-06-21T01:29:26.0691522Z info: default toolchain set to stable-x86_64-unknown-linux-gnu +2026-06-21T01:29:26.0692627Z +2026-06-21T01:29:26.0770276Z stable-x86_64-unknown-linux-gnu unchanged - rustc 1.96.0 (ac68faa20 2026-05-25) +2026-06-21T01:29:26.0775502Z info: note that the toolchain 'stable-x86_64-unknown-linux-gnu' is currently in use (overridden by '/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/rust-toolchain.toml') +2026-06-21T01:29:26.0778347Z +2026-06-21T01:29:26.0921441Z ##[group]Run : create cachekey +2026-06-21T01:29:26.0922538Z : create cachekey +2026-06-21T01:29:26.0924449Z DATE=$(rustc +stable --version --verbose | sed -ne 's/^commit-date: \(20[0-9][0-9]\)-\([01][0-9]\)-\([0-3][0-9]\)$/\1\2\3/p') +2026-06-21T01:29:26.0927158Z HASH=$(rustc +stable --version --verbose | sed -ne 's/^commit-hash: //p') +2026-06-21T01:29:26.0929090Z echo "cachekey=$(echo $DATE$HASH | head -c12)" >> $GITHUB_OUTPUT +2026-06-21T01:29:26.0964177Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:26.0965661Z env: +2026-06-21T01:29:26.0966469Z CARGO_TERM_COLOR: always +2026-06-21T01:29:26.0967733Z RUST_BACKTRACE: short +2026-06-21T01:29:26.0969443Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:26.0971342Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:29:26.0972360Z ##[endgroup] +2026-06-21T01:29:26.1589330Z ##[group]Run : disable incremental compilation +2026-06-21T01:29:26.1590645Z : disable incremental compilation +2026-06-21T01:29:26.1591939Z if [ -z "${CARGO_INCREMENTAL+set}" ]; then +2026-06-21T01:29:26.1593263Z  echo CARGO_INCREMENTAL=0 >> $GITHUB_ENV +2026-06-21T01:29:26.1594433Z fi +2026-06-21T01:29:26.1628997Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:26.1630289Z env: +2026-06-21T01:29:26.1631092Z CARGO_TERM_COLOR: always +2026-06-21T01:29:26.1632055Z RUST_BACKTRACE: short +2026-06-21T01:29:26.1633766Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:26.1635669Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:29:26.1636683Z ##[endgroup] +2026-06-21T01:29:26.1749399Z ##[group]Run : enable colors in Cargo output +2026-06-21T01:29:26.1750673Z : enable colors in Cargo output +2026-06-21T01:29:26.1751961Z if [ -z "${CARGO_TERM_COLOR+set}" ]; then +2026-06-21T01:29:26.1753385Z  echo CARGO_TERM_COLOR=always >> $GITHUB_ENV +2026-06-21T01:29:26.1754590Z fi +2026-06-21T01:29:26.1787664Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:26.1788988Z env: +2026-06-21T01:29:26.1789798Z CARGO_TERM_COLOR: always +2026-06-21T01:29:26.1790768Z RUST_BACKTRACE: short +2026-06-21T01:29:26.1792835Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:26.1794835Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:29:26.1795894Z CARGO_INCREMENTAL: 0 +2026-06-21T01:29:26.1797011Z ##[endgroup] +2026-06-21T01:29:26.1910770Z ##[group]Run : enable Cargo sparse registry +2026-06-21T01:29:26.1911979Z : enable Cargo sparse registry +2026-06-21T01:29:26.1913359Z # implemented in 1.66, stabilized in 1.68, made default in 1.70 +2026-06-21T01:29:26.1915863Z if [ -z "${CARGO_REGISTRIES_CRATES_IO_PROTOCOL+set}" -o -f "/home/runner/work/_temp"/.implicit_cargo_registries_crates_io_protocol ]; then +2026-06-21T01:29:26.1918726Z  if rustc +stable --version --verbose | grep -q '^release: 1\.6[89]\.'; then +2026-06-21T01:29:26.1921014Z  touch "/home/runner/work/_temp"/.implicit_cargo_registries_crates_io_protocol || true +2026-06-21T01:29:26.1923034Z  echo CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse >> $GITHUB_ENV +2026-06-21T01:29:26.1924906Z  elif rustc +stable --version --verbose | grep -q '^release: 1\.6[67]\.'; then +2026-06-21T01:29:26.1927253Z  touch "/home/runner/work/_temp"/.implicit_cargo_registries_crates_io_protocol || true +2026-06-21T01:29:26.1929256Z  echo CARGO_REGISTRIES_CRATES_IO_PROTOCOL=git >> $GITHUB_ENV +2026-06-21T01:29:26.1930611Z  fi +2026-06-21T01:29:26.1931387Z fi +2026-06-21T01:29:26.1964680Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:26.1965952Z env: +2026-06-21T01:29:26.1966959Z CARGO_TERM_COLOR: always +2026-06-21T01:29:26.1968028Z RUST_BACKTRACE: short +2026-06-21T01:29:26.1969702Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:26.1971573Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:29:26.1972575Z CARGO_INCREMENTAL: 0 +2026-06-21T01:29:26.1973442Z ##[endgroup] +2026-06-21T01:29:26.2361839Z ##[group]Run : work around spurious network errors in curl 8.0 +2026-06-21T01:29:26.2363401Z : work around spurious network errors in curl 8.0 +2026-06-21T01:29:26.2365374Z # https://rust-lang.zulipchat.com/#narrow/stream/246057-t-cargo/topic/timeout.20investigation +2026-06-21T01:29:26.2368068Z if rustc +stable --version --verbose | grep -q '^release: 1\.7[01]\.'; then +2026-06-21T01:29:26.2369789Z  echo CARGO_HTTP_MULTIPLEXING=false >> $GITHUB_ENV +2026-06-21T01:29:26.2371010Z fi +2026-06-21T01:29:26.2406991Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:26.2408324Z env: +2026-06-21T01:29:26.2409097Z CARGO_TERM_COLOR: always +2026-06-21T01:29:26.2410028Z RUST_BACKTRACE: short +2026-06-21T01:29:26.2411721Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:26.2413580Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:29:26.2414570Z CARGO_INCREMENTAL: 0 +2026-06-21T01:29:26.2415436Z ##[endgroup] +2026-06-21T01:29:26.2669585Z ##[group]Run rustc +stable --version --verbose +2026-06-21T01:29:26.2670859Z rustc +stable --version --verbose +2026-06-21T01:29:26.2705715Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:26.2707228Z env: +2026-06-21T01:29:26.2708021Z CARGO_TERM_COLOR: always +2026-06-21T01:29:26.2708959Z RUST_BACKTRACE: short +2026-06-21T01:29:26.2710687Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:26.2712579Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:29:26.2713574Z CARGO_INCREMENTAL: 0 +2026-06-21T01:29:26.2714427Z ##[endgroup] +2026-06-21T01:29:26.2897216Z rustc 1.96.0 (ac68faa20 2026-05-25) +2026-06-21T01:29:26.2898677Z binary: rustc +2026-06-21T01:29:26.2899843Z commit-hash: ac68faa20c58cbccd01ee7208bf3b6e93a7d7f96 +2026-06-21T01:29:26.2901976Z commit-date: 2026-05-25 +2026-06-21T01:29:26.2903553Z host: x86_64-unknown-linux-gnu +2026-06-21T01:29:26.2905217Z release: 1.96.0 +2026-06-21T01:29:26.2906619Z LLVM version: 22.1.2 diff --git a/.ci_logs2/Format check/4_Cache cargo registry and target.txt b/.ci_logs2/Format check/4_Cache cargo registry and target.txt new file mode 100644 index 0000000..5410826 --- /dev/null +++ b/.ci_logs2/Format check/4_Cache cargo registry and target.txt @@ -0,0 +1,66 @@ +2026-06-21T01:29:26.3144182Z ##[group]Run Swatinem/rust-cache@v2 +2026-06-21T01:29:26.3145246Z with: +2026-06-21T01:29:26.3146014Z cache-on-failure: true +2026-06-21T01:29:26.3147267Z prefix-key: v0-rust +2026-06-21T01:29:26.3148151Z add-job-id-key: true +2026-06-21T01:29:26.3149083Z add-rust-environment-hash-key: true +2026-06-21T01:29:26.3150125Z cache-targets: true +2026-06-21T01:29:26.3151010Z cache-all-crates: false +2026-06-21T01:29:26.3151940Z cache-workspace-crates: false +2026-06-21T01:29:26.3152883Z save-if: true +2026-06-21T01:29:26.3153693Z cache-provider: github +2026-06-21T01:29:26.3154564Z cache-bin: true +2026-06-21T01:29:26.3155370Z lookup-only: false +2026-06-21T01:29:26.3156411Z cmd-format: {0} +2026-06-21T01:29:26.3157478Z env: +2026-06-21T01:29:26.3158239Z CARGO_TERM_COLOR: always +2026-06-21T01:29:26.3159150Z RUST_BACKTRACE: short +2026-06-21T01:29:26.3160778Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:26.3162590Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:29:26.3163607Z CARGO_INCREMENTAL: 0 +2026-06-21T01:29:26.3164443Z ##[endgroup] +2026-06-21T01:29:26.5996246Z (node:2386) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead. +2026-06-21T01:29:26.5999330Z (Use `node --trace-deprecation ...` to show where the warning was created) +2026-06-21T01:29:30.4318350Z ##[group]Cache Configuration +2026-06-21T01:29:30.4319140Z Cache Provider: +2026-06-21T01:29:30.4319493Z github +2026-06-21T01:29:30.4319789Z Workspaces: +2026-06-21T01:29:30.4320437Z /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts +2026-06-21T01:29:30.4321223Z Cache Paths: +2026-06-21T01:29:30.4321747Z /home/runner/.cargo/bin +2026-06-21T01:29:30.4322320Z /home/runner/.cargo/.crates.toml +2026-06-21T01:29:30.4322910Z /home/runner/.cargo/.crates2.json +2026-06-21T01:29:30.4323502Z /home/runner/.cargo/registry +2026-06-21T01:29:30.4324026Z /home/runner/.cargo/git +2026-06-21T01:29:30.4324773Z /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/target +2026-06-21T01:29:30.4325528Z Restore Key: +2026-06-21T01:29:30.4325977Z v0-rust-fmt-Linux-x64-1f47b3b1 +2026-06-21T01:29:30.4326499Z Cache Key: +2026-06-21T01:29:30.4327247Z v0-rust-fmt-Linux-x64-1f47b3b1-8243978e +2026-06-21T01:29:30.4327831Z .. Prefix: +2026-06-21T01:29:30.4328252Z - v0-rust-fmt-Linux-x64 +2026-06-21T01:29:30.4328749Z .. Environment considered: +2026-06-21T01:29:30.4329227Z - Rust Versions: +2026-06-21T01:29:30.4329897Z - 1.96.0 x86_64-unknown-linux-gnu ac68faa20c58cbccd01ee7208bf3b6e93a7d7f96 +2026-06-21T01:29:30.4330886Z - 1.96.0 x86_64-unknown-linux-gnu ac68faa20c58cbccd01ee7208bf3b6e93a7d7f96 +2026-06-21T01:29:30.4331586Z - CARGO_HOME +2026-06-21T01:29:30.4331847Z - CARGO_INCREMENTAL +2026-06-21T01:29:30.4332143Z - CARGO_TERM_COLOR +2026-06-21T01:29:30.4332416Z - RUST_BACKTRACE +2026-06-21T01:29:30.4332700Z .. Lockfiles considered: +2026-06-21T01:29:30.4333161Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/.cargo/config.toml +2026-06-21T01:29:30.4333822Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/Cargo.toml +2026-06-21T01:29:30.4334499Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/common/Cargo.toml +2026-06-21T01:29:30.4335234Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/contracts/core/Cargo.toml +2026-06-21T01:29:30.4336447Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/Cargo.toml +2026-06-21T01:29:30.4337950Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/rust-toolchain.toml +2026-06-21T01:29:30.4339104Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/token-bridge/Cargo.toml +2026-06-21T01:29:30.4340283Z ##[endgroup] +2026-06-21T01:29:30.4340552Z +2026-06-21T01:29:30.4340672Z ... Restoring cache ... +2026-06-21T01:29:30.5252635Z Cache hit for: v0-rust-fmt-Linux-x64-1f47b3b1-8243978e +2026-06-21T01:29:31.1392915Z Received 16348747 of 16348747 (100.0%), 31.2 MBs/sec +2026-06-21T01:29:31.1394317Z Cache Size: ~16 MB (16348747 B) +2026-06-21T01:29:31.1419312Z [command]/usr/bin/tar -xf /home/runner/work/_temp/413d3049-e073-4caa-80cf-7b60885f2d3b/cache.tzst -P -C /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts --use-compress-program unzstd +2026-06-21T01:29:31.2071270Z Cache restored successfully +2026-06-21T01:29:31.2073989Z Restored from cache key "v0-rust-fmt-Linux-x64-1f47b3b1-8243978e" full match: true. diff --git a/.ci_logs2/Format check/5_cargo fmt --check (contracts).txt b/.ci_logs2/Format check/5_cargo fmt --check (contracts).txt new file mode 100644 index 0000000..d55a8d3 --- /dev/null +++ b/.ci_logs2/Format check/5_cargo fmt --check (contracts).txt @@ -0,0 +1,688 @@ +2026-06-21T01:29:31.2213868Z ##[group]Run cargo fmt -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge -- --check +2026-06-21T01:29:31.2214854Z cargo fmt -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge -- --check +2026-06-21T01:29:31.2248421Z shell: /usr/bin/bash -e {0} +2026-06-21T01:29:31.2248700Z env: +2026-06-21T01:29:31.2248900Z CARGO_TERM_COLOR: always +2026-06-21T01:29:31.2249148Z RUST_BACKTRACE: short +2026-06-21T01:29:31.2249628Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:31.2250171Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:29:31.2250442Z CARGO_INCREMENTAL: 0 +2026-06-21T01:29:31.2250678Z CACHE_ON_FAILURE: true +2026-06-21T01:29:31.2250905Z ##[endgroup] +2026-06-21T01:29:31.8158522Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/contract.rs:3: +2026-06-21T01:29:31.8159216Z //! These are wired into the contract impl in `lib.rs` as methods on +2026-06-21T01:29:31.8159691Z //! `CampaignContract`. +2026-06-21T01:29:31.8159937Z +2026-06-21T01:29:31.8164117Z -use soroban_sdk::{panic_with_error, Address, Env}; +2026-06-21T01:29:31.8164533Z use crate::event; +2026-06-21T01:29:31.8164840Z use crate::storage::{get_campaign, is_frozen, set_campaign}; +2026-06-21T01:29:31.8165239Z use crate::types::{CampaignStatus, Error}; +2026-06-21T01:29:31.8165790Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/contract.rs:10: +2026-06-21T01:29:31.8166468Z use crate::{validate_campaign_transition, MAX_DEADLINE_GAP_SECONDS}; +2026-06-21T01:29:31.8167290Z +use soroban_sdk::{panic_with_error, Address, Env}; +2026-06-21T01:29:31.8167619Z +2026-06-21T01:29:31.8168101Z /// Issue #212 – End the campaign early (before deadline). +2026-06-21T01:29:31.8168438Z /// +2026-06-21T01:29:31.8168864Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/contract.rs:20: +2026-06-21T01:29:31.8169585Z /// - `Error::ContractFrozen` if contract is frozen (freeze invariant: all writes rejected) +2026-06-21T01:29:31.8170230Z /// - `Error::InvalidCampaignTransition` if campaign is already Ended or Cancelled +2026-06-21T01:29:31.8170704Z pub fn end_campaign(env: &Env) { +2026-06-21T01:29:31.8170992Z - let mut campaign = get_campaign(env) +2026-06-21T01:29:31.8171401Z - .unwrap_or_else(|| panic_with_error!(env, Error::NotInitialized)); +2026-06-21T01:29:31.8171800Z + let mut campaign = +2026-06-21T01:29:31.8172197Z + get_campaign(env).unwrap_or_else(|| panic_with_error!(env, Error::NotInitialized)); +2026-06-21T01:29:31.8172640Z +2026-06-21T01:29:31.8172853Z campaign.creator.require_auth(); +2026-06-21T01:29:31.8173128Z +2026-06-21T01:29:31.8173797Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/contract.rs:51: +2026-06-21T01:29:31.8174775Z /// - `Error::ContractFrozen` if contract is frozen (freeze invariant: all writes rejected) +2026-06-21T01:29:31.8175371Z /// - `Error::InvalidCampaignTransition` if campaign is already Cancelled +2026-06-21T01:29:31.8175828Z pub fn cancel_campaign(env: &Env) { +2026-06-21T01:29:31.8176123Z - let mut campaign = get_campaign(env) +2026-06-21T01:29:31.8176532Z - .unwrap_or_else(|| panic_with_error!(env, Error::NotInitialized)); +2026-06-21T01:29:31.8177067Z + let mut campaign = +2026-06-21T01:29:31.8177462Z + get_campaign(env).unwrap_or_else(|| panic_with_error!(env, Error::NotInitialized)); +2026-06-21T01:29:31.8177890Z +2026-06-21T01:29:31.8178106Z campaign.creator.require_auth(); +2026-06-21T01:29:31.8178368Z +2026-06-21T01:29:31.8178761Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/contract.rs:87: +2026-06-21T01:29:31.8179371Z /// - `Error::InvalidEndTime` if `new_end_time` is more than ten years out +2026-06-21T01:29:31.8179907Z /// - `Error::InvalidCampaignTransition` if campaign is not Active or GoalReached +2026-06-21T01:29:31.8180379Z pub fn extend_deadline(env: &Env, new_end_time: u64) { +2026-06-21T01:29:31.8181061Z - let mut campaign = get_campaign(env) +2026-06-21T01:29:31.8181448Z - .unwrap_or_else(|| panic_with_error!(env, Error::NotInitialized)); +2026-06-21T01:29:31.8181977Z + let mut campaign = +2026-06-21T01:29:31.8182371Z + get_campaign(env).unwrap_or_else(|| panic_with_error!(env, Error::NotInitialized)); +2026-06-21T01:29:31.8182794Z +2026-06-21T01:29:31.8182992Z campaign.creator.require_auth(); +2026-06-21T01:29:31.8183254Z +2026-06-21T01:29:31.8183650Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/contract.rs:128: +2026-06-21T01:29:31.8184131Z #[must_use] +2026-06-21T01:29:31.8184471Z pub fn get_campaign_status(env: &Env) -> crate::types::CampaignStatusResponse { +2026-06-21T01:29:31.8184915Z use crate::types::CampaignStatusResponse; +2026-06-21T01:29:31.8185195Z - +2026-06-21T01:29:31.8185387Z - let campaign = get_campaign(env) +2026-06-21T01:29:31.8185744Z - .unwrap_or_else(|| panic_with_error!(env, Error::NotInitialized)); +2026-06-21T01:29:31.8186109Z + +2026-06-21T01:29:31.8186287Z + let campaign = +2026-06-21T01:29:31.8186650Z + get_campaign(env).unwrap_or_else(|| panic_with_error!(env, Error::NotInitialized)); +2026-06-21T01:29:31.8187255Z +2026-06-21T01:29:31.8187450Z let now = env.ledger().timestamp(); +2026-06-21T01:29:31.8187766Z let days_remaining = if now < campaign.end_time { +2026-06-21T01:29:31.8262220Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/lib.rs:213: +2026-06-21T01:29:31.8262844Z // Update donor record +2026-06-21T01:29:31.8263199Z let existing_donor = get_donor(&env, &donor); +2026-06-21T01:29:31.8263620Z let is_new_donor = existing_donor.is_none(); +2026-06-21T01:29:31.8264310Z - let mut donor_record = existing_donor.unwrap_or_else(|| DonorRecord::new_for(donor.clone(), asset.clone())); +2026-06-21T01:29:31.8264963Z + let mut donor_record = +2026-06-21T01:29:31.8265475Z + existing_donor.unwrap_or_else(|| DonorRecord::new_for(donor.clone(), asset.clone())); +2026-06-21T01:29:31.8266027Z +2026-06-21T01:29:31.8266267Z donor_record.apply_donation( +2026-06-21T01:29:31.8266594Z &env, +2026-06-21T01:29:31.8364610Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/test/integration_tests.rs:93: +2026-06-21T01:29:31.8365401Z let end_time = env.ledger().timestamp() + 86_400; +2026-06-21T01:29:31.8365879Z let new_end_time = env.ledger().timestamp() + (2 * 86_400); +2026-06-21T01:29:31.8366292Z +2026-06-21T01:29:31.8366549Z - CampaignContract::initialize( +2026-06-21T01:29:31.8367240Z - env.clone(), +2026-06-21T01:29:31.8367540Z - creator, +2026-06-21T01:29:31.8367796Z - 1000, +2026-06-21T01:29:31.8368055Z - end_time, +2026-06-21T01:29:31.8368311Z - assets, +2026-06-21T01:29:31.8368581Z - milestones, +2026-06-21T01:29:31.8368846Z - 0, +2026-06-21T01:29:31.8369098Z - ) +2026-06-21T01:29:31.8369331Z - .unwrap(); +2026-06-21T01:29:31.8369834Z + CampaignContract::initialize(env.clone(), creator, 1000, end_time, assets, milestones, 0) +2026-06-21T01:29:31.8370419Z + .unwrap(); +2026-06-21T01:29:31.8370671Z +2026-06-21T01:29:31.8371016Z CampaignContract::extend_deadline(env.clone(), new_end_time); +2026-06-21T01:29:31.8371455Z +2026-06-21T01:29:31.8460460Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/test/negative_path_tests.rs:6: +2026-06-21T01:29:31.8461680Z #![cfg(test)] +2026-06-21T01:29:31.8462081Z +2026-06-21T01:29:31.8462698Z use soroban_sdk::testutils::{Address as AddressTestUtils, Ledger}; +2026-06-21T01:29:31.8463417Z -use soroban_sdk::{Address, Env, String, Vec, BytesN}; +2026-06-21T01:29:31.8463883Z +use soroban_sdk::{Address, BytesN, Env, String, Vec}; +2026-06-21T01:29:31.8464251Z +2026-06-21T01:29:31.8464482Z +use super::with_contract; +2026-06-21T01:29:31.8464925Z +use crate::storage::{get_campaign, set_campaign, set_donor, set_milestone}; +2026-06-21T01:29:31.8465692Z use crate::types::{ +2026-06-21T01:29:31.8466242Z - CampaignData, CampaignStatus, DonorRecord, AssetInfo, StellarAsset, MilestoneData, +2026-06-21T01:29:31.8467266Z - MilestoneStatus, Error, DataKey, +2026-06-21T01:29:31.8467749Z + AssetInfo, CampaignData, CampaignStatus, DataKey, DonorRecord, Error, MilestoneData, +2026-06-21T01:29:31.8468244Z + MilestoneStatus, StellarAsset, +2026-06-21T01:29:31.8468544Z }; +2026-06-21T01:29:31.8468863Z -use crate::storage::{set_campaign, set_donor, set_milestone, get_campaign}; +2026-06-21T01:29:31.8469341Z -use crate::{CampaignContract, MAX_DEADLINE_GAP_SECONDS}; +2026-06-21T01:29:31.8469710Z use crate::CampaignContractClient; +2026-06-21T01:29:31.8469995Z -use super::with_contract; +2026-06-21T01:29:31.8470303Z +use crate::{CampaignContract, MAX_DEADLINE_GAP_SECONDS}; +2026-06-21T01:29:31.8470631Z +2026-06-21T01:29:31.8470927Z /// Base ledger timestamp (1 year in seconds) so we can safely subtract +2026-06-21T01:29:31.8471375Z /// to simulate "past" end_times without underflow. +2026-06-21T01:29:31.8471989Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/test/negative_path_tests.rs:82: +2026-06-21T01:29:31.8472591Z set_donor(env, donor, &record); +2026-06-21T01:29:31.8472856Z } +2026-06-21T01:29:31.8473043Z +2026-06-21T01:29:31.8473236Z -fn create_donor_record( +2026-06-21T01:29:31.8473474Z - env: &Env, +2026-06-21T01:29:31.8473681Z - donor: &Address, +2026-06-21T01:29:31.8473909Z - total_donated: i128, +2026-06-21T01:29:31.8474157Z - refund_claimed: bool, +2026-06-21T01:29:31.8474386Z -) { +2026-06-21T01:29:31.8474768Z +fn create_donor_record(env: &Env, donor: &Address, total_donated: i128, refund_claimed: bool) { +2026-06-21T01:29:31.8475275Z let record = DonorRecord { +2026-06-21T01:29:31.8475537Z donor: donor.clone(), +2026-06-21T01:29:31.8475792Z total_donated, +2026-06-21T01:29:31.8476318Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/test/negative_path_tests.rs:132: +2026-06-21T01:29:31.8477086Z let creator = Address::generate(&env); +2026-06-21T01:29:31.8477443Z let end_time = env.ledger().timestamp() + 100_000; +2026-06-21T01:29:31.8477885Z let _ = CampaignContract::initialize( +2026-06-21T01:29:31.8478218Z - env.clone(), creator, 0, end_time, +2026-06-21T01:29:31.8478585Z - default_accepted_assets(&env), default_milestones(&env), 0, +2026-06-21T01:29:31.8478944Z + env.clone(), +2026-06-21T01:29:31.8479157Z + creator, +2026-06-21T01:29:31.8479356Z + 0, +2026-06-21T01:29:31.8479544Z + end_time, +2026-06-21T01:29:31.8479769Z + default_accepted_assets(&env), +2026-06-21T01:29:31.8480058Z + default_milestones(&env), +2026-06-21T01:29:31.8480308Z + 0, +2026-06-21T01:29:31.8480491Z ); +2026-06-21T01:29:31.8480664Z }); +2026-06-21T01:29:31.8480833Z } +2026-06-21T01:29:31.8481309Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/test/negative_path_tests.rs:147: +2026-06-21T01:29:31.8481887Z let creator = Address::generate(&env); +2026-06-21T01:29:31.8482237Z let end_time = env.ledger().timestamp() + 100_000; +2026-06-21T01:29:31.8482573Z let _ = CampaignContract::initialize( +2026-06-21T01:29:31.8482900Z - env.clone(), creator, -100, end_time, +2026-06-21T01:29:31.8483278Z - default_accepted_assets(&env), default_milestones(&env), 0, +2026-06-21T01:29:31.8483628Z + env.clone(), +2026-06-21T01:29:31.8483842Z + creator, +2026-06-21T01:29:31.8484043Z + -100, +2026-06-21T01:29:31.8484244Z + end_time, +2026-06-21T01:29:31.8484465Z + default_accepted_assets(&env), +2026-06-21T01:29:31.8484748Z + default_milestones(&env), +2026-06-21T01:29:31.8485003Z + 0, +2026-06-21T01:29:31.8485187Z ); +2026-06-21T01:29:31.8485369Z }); +2026-06-21T01:29:31.8485688Z } +2026-06-21T01:29:31.8486147Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/test/negative_path_tests.rs:163: +2026-06-21T01:29:31.8487037Z let creator = Address::generate(&env); +2026-06-21T01:29:31.8487364Z let end_time = env.ledger().timestamp() - 1; +2026-06-21T01:29:31.8487709Z let _ = CampaignContract::initialize( +2026-06-21T01:29:31.8488015Z - env.clone(), creator, 1000, end_time, +2026-06-21T01:29:31.8488383Z - default_accepted_assets(&env), default_milestones(&env), 0, +2026-06-21T01:29:31.8488731Z + env.clone(), +2026-06-21T01:29:31.8488952Z + creator, +2026-06-21T01:29:31.8489146Z + 1000, +2026-06-21T01:29:31.8489339Z + end_time, +2026-06-21T01:29:31.8489562Z + default_accepted_assets(&env), +2026-06-21T01:29:31.8489844Z + default_milestones(&env), +2026-06-21T01:29:31.8490102Z + 0, +2026-06-21T01:29:31.8490282Z ); +2026-06-21T01:29:31.8490461Z }); +2026-06-21T01:29:31.8490628Z } +2026-06-21T01:29:31.8491092Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/test/negative_path_tests.rs:179: +2026-06-21T01:29:31.8491699Z let end_time = env.ledger().timestamp() + 100_000; +2026-06-21T01:29:31.8492078Z let empty_assets: Vec = Vec::new(&env); +2026-06-21T01:29:31.8492430Z let _ = CampaignContract::initialize( +2026-06-21T01:29:31.8492729Z - env.clone(), creator, 1000, end_time, +2026-06-21T01:29:31.8493046Z - empty_assets, default_milestones(&env), 0, +2026-06-21T01:29:31.8493348Z + env.clone(), +2026-06-21T01:29:31.8493557Z + creator, +2026-06-21T01:29:31.8493752Z + 1000, +2026-06-21T01:29:31.8493938Z + end_time, +2026-06-21T01:29:31.8494141Z + empty_assets, +2026-06-21T01:29:31.8494381Z + default_milestones(&env), +2026-06-21T01:29:31.8494626Z + 0, +2026-06-21T01:29:31.8494813Z ); +2026-06-21T01:29:31.8494984Z }); +2026-06-21T01:29:31.8495151Z } +2026-06-21T01:29:31.8495608Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/test/negative_path_tests.rs:199: +2026-06-21T01:29:31.8496191Z issuer: Some(Address::generate(&env)), +2026-06-21T01:29:31.8496471Z }); +2026-06-21T01:29:31.8496683Z let _ = CampaignContract::initialize( +2026-06-21T01:29:31.8497099Z - env.clone(), creator, 1000, end_time, +2026-06-21T01:29:31.8497409Z - assets, default_milestones(&env), 0, +2026-06-21T01:29:31.8497692Z + env.clone(), +2026-06-21T01:29:31.8497903Z + creator, +2026-06-21T01:29:31.8498100Z + 1000, +2026-06-21T01:29:31.8498289Z + end_time, +2026-06-21T01:29:31.8498492Z + assets, +2026-06-21T01:29:31.8498704Z + default_milestones(&env), +2026-06-21T01:29:31.8498952Z + 0, +2026-06-21T01:29:31.8499135Z ); +2026-06-21T01:29:31.8499313Z }); +2026-06-21T01:29:31.8499485Z } +2026-06-21T01:29:31.8499934Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/test/negative_path_tests.rs:215: +2026-06-21T01:29:31.8500529Z let end_time = env.ledger().timestamp() + 100_000; +2026-06-21T01:29:31.8500924Z let empty_milestones: Vec = Vec::new(&env); +2026-06-21T01:29:31.8501299Z let _ = CampaignContract::initialize( +2026-06-21T01:29:31.8501602Z - env.clone(), creator, 1000, end_time, +2026-06-21T01:29:31.8501945Z - default_accepted_assets(&env), empty_milestones, 0, +2026-06-21T01:29:31.8502265Z + env.clone(), +2026-06-21T01:29:31.8502476Z + creator, +2026-06-21T01:29:31.8502684Z + 1000, +2026-06-21T01:29:31.8502874Z + end_time, +2026-06-21T01:29:31.8503095Z + default_accepted_assets(&env), +2026-06-21T01:29:31.8503373Z + empty_milestones, +2026-06-21T01:29:31.8503599Z + 0, +2026-06-21T01:29:31.8503913Z ); +2026-06-21T01:29:31.8504085Z }); +2026-06-21T01:29:31.8504255Z } +2026-06-21T01:29:31.8504707Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/test/negative_path_tests.rs:244: +2026-06-21T01:29:31.8505351Z }); +2026-06-21T01:29:31.8505546Z } +2026-06-21T01:29:31.8505757Z let _ = CampaignContract::initialize( +2026-06-21T01:29:31.8506058Z - env.clone(), creator, 6000, end_time, +2026-06-21T01:29:31.8506379Z - default_accepted_assets(&env), milestones, 0, +2026-06-21T01:29:31.8506685Z + env.clone(), +2026-06-21T01:29:31.8507034Z + creator, +2026-06-21T01:29:31.8507233Z + 6000, +2026-06-21T01:29:31.8507423Z + end_time, +2026-06-21T01:29:31.8507648Z + default_accepted_assets(&env), +2026-06-21T01:29:31.8507915Z + milestones, +2026-06-21T01:29:31.8508125Z + 0, +2026-06-21T01:29:31.8508305Z ); +2026-06-21T01:29:31.8508483Z }); +2026-06-21T01:29:31.8508651Z } +2026-06-21T01:29:31.8509108Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/test/negative_path_tests.rs:260: +2026-06-21T01:29:31.8509706Z let end_time = env.ledger().timestamp() + 100_000; +2026-06-21T01:29:31.8510085Z let mut milestones: Vec = Vec::new(&env); +2026-06-21T01:29:31.8510441Z milestones.push_back(MilestoneData { +2026-06-21T01:29:31.8510779Z - index: 0, target_amount: 500, released_amount: 0, +2026-06-21T01:29:31.8511083Z + index: 0, +2026-06-21T01:29:31.8511296Z + target_amount: 500, +2026-06-21T01:29:31.8511539Z + released_amount: 0, +2026-06-21T01:29:31.8511850Z description_hash: BytesN::from_array(&env, &[0u8; 32]), +2026-06-21T01:29:31.8512212Z status: MilestoneStatus::Locked, +2026-06-21T01:29:31.8512526Z - released_at: None, released_at_ledger: None, +2026-06-21T01:29:31.8512859Z - release_tx: None, released_to: None, +2026-06-21T01:29:31.8513156Z + released_at: None, +2026-06-21T01:29:31.8513410Z + released_at_ledger: None, +2026-06-21T01:29:31.8513676Z + release_tx: None, +2026-06-21T01:29:31.8513911Z + released_to: None, +2026-06-21T01:29:31.8514140Z }); +2026-06-21T01:29:31.8514352Z milestones.push_back(MilestoneData { +2026-06-21T01:29:31.8514680Z - index: 1, target_amount: 300, released_amount: 0, +2026-06-21T01:29:31.8514983Z + index: 1, +2026-06-21T01:29:31.8515193Z + target_amount: 300, +2026-06-21T01:29:31.8515433Z + released_amount: 0, +2026-06-21T01:29:31.8515736Z description_hash: BytesN::from_array(&env, &[0u8; 32]), +2026-06-21T01:29:31.8516090Z status: MilestoneStatus::Locked, +2026-06-21T01:29:31.8516398Z - released_at: None, released_at_ledger: None, +2026-06-21T01:29:31.8516926Z - release_tx: None, released_to: None, +2026-06-21T01:29:31.8517285Z + released_at: None, +2026-06-21T01:29:31.8517530Z + released_at_ledger: None, +2026-06-21T01:29:31.8517797Z + release_tx: None, +2026-06-21T01:29:31.8518030Z + released_to: None, +2026-06-21T01:29:31.8518252Z }); +2026-06-21T01:29:31.8518471Z let _ = CampaignContract::initialize( +2026-06-21T01:29:31.8518773Z - env.clone(), creator, 500, end_time, +2026-06-21T01:29:31.8519110Z - default_accepted_assets(&env), milestones, 0, +2026-06-21T01:29:31.8519416Z + env.clone(), +2026-06-21T01:29:31.8519629Z + creator, +2026-06-21T01:29:31.8519826Z + 500, +2026-06-21T01:29:31.8520019Z + end_time, +2026-06-21T01:29:31.8520248Z + default_accepted_assets(&env), +2026-06-21T01:29:31.8520517Z + milestones, +2026-06-21T01:29:31.8520725Z + 0, +2026-06-21T01:29:31.8520907Z ); +2026-06-21T01:29:31.8521076Z }); +2026-06-21T01:29:31.8521252Z } +2026-06-21T01:29:31.8521842Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/test/negative_path_tests.rs:290: +2026-06-21T01:29:31.8522438Z let end_time = env.ledger().timestamp() + 100_000; +2026-06-21T01:29:31.8522926Z let mut milestones: Vec = Vec::new(&env); +2026-06-21T01:29:31.8523281Z milestones.push_back(MilestoneData { +2026-06-21T01:29:31.8523602Z - index: 0, target_amount: 500, released_amount: 0, +2026-06-21T01:29:31.8523903Z + index: 0, +2026-06-21T01:29:31.8524113Z + target_amount: 500, +2026-06-21T01:29:31.8524352Z + released_amount: 0, +2026-06-21T01:29:31.8524665Z description_hash: BytesN::from_array(&env, &[0u8; 32]), +2026-06-21T01:29:31.8525024Z status: MilestoneStatus::Locked, +2026-06-21T01:29:31.8525354Z - released_at: None, released_at_ledger: None, +2026-06-21T01:29:31.8525688Z - release_tx: None, released_to: None, +2026-06-21T01:29:31.8525981Z + released_at: None, +2026-06-21T01:29:31.8526245Z + released_at_ledger: None, +2026-06-21T01:29:31.8526509Z + release_tx: None, +2026-06-21T01:29:31.8526884Z + released_to: None, +2026-06-21T01:29:31.8527122Z }); +2026-06-21T01:29:31.8527341Z let _ = CampaignContract::initialize( +2026-06-21T01:29:31.8527653Z - env.clone(), creator, 1000, end_time, +2026-06-21T01:29:31.8527981Z - default_accepted_assets(&env), milestones, 0, +2026-06-21T01:29:31.8528290Z + env.clone(), +2026-06-21T01:29:31.8528506Z + creator, +2026-06-21T01:29:31.8528713Z + 1000, +2026-06-21T01:29:31.8528906Z + end_time, +2026-06-21T01:29:31.8529130Z + default_accepted_assets(&env), +2026-06-21T01:29:31.8529403Z + milestones, +2026-06-21T01:29:31.8529614Z + 0, +2026-06-21T01:29:31.8529816Z ); +2026-06-21T01:29:31.8529992Z }); +2026-06-21T01:29:31.8530163Z } +2026-06-21T01:29:31.8530628Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/test/negative_path_tests.rs:375: +2026-06-21T01:29:31.8531216Z let creator = Address::generate(&env); +2026-06-21T01:29:31.8531564Z let end_time = env.ledger().timestamp() + 100_000; +2026-06-21T01:29:31.8531907Z let _ = CampaignContract::initialize( +2026-06-21T01:29:31.8532210Z - env.clone(), creator, 1000, end_time, +2026-06-21T01:29:31.8532586Z - default_accepted_assets(&env), default_milestones(&env), 100, +2026-06-21T01:29:31.8532953Z + env.clone(), +2026-06-21T01:29:31.8533174Z + creator, +2026-06-21T01:29:31.8533372Z + 1000, +2026-06-21T01:29:31.8533562Z + end_time, +2026-06-21T01:29:31.8533781Z + default_accepted_assets(&env), +2026-06-21T01:29:31.8534069Z + default_milestones(&env), +2026-06-21T01:29:31.8534331Z + 100, +2026-06-21T01:29:31.8534522Z ); +2026-06-21T01:29:31.8534726Z let donor = Address::generate(&env); +2026-06-21T01:29:31.8535121Z CampaignContract::donate(env.clone(), donor, 50, AssetInfo::Native); +2026-06-21T01:29:31.8535886Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/test/negative_path_tests.rs:506: +2026-06-21T01:29:31.8536531Z let creator = Address::generate(&env); +2026-06-21T01:29:31.8536986Z let end_time = env.ledger().timestamp() + 100_000; +2026-06-21T01:29:31.8537330Z let _ = CampaignContract::initialize( +2026-06-21T01:29:31.8537629Z - env.clone(), creator, 1000, end_time, +2026-06-21T01:29:31.8537999Z - default_accepted_assets(&env), default_milestones(&env), 0, +2026-06-21T01:29:31.8538351Z + env.clone(), +2026-06-21T01:29:31.8538567Z + creator, +2026-06-21T01:29:31.8538765Z + 1000, +2026-06-21T01:29:31.8538961Z + end_time, +2026-06-21T01:29:31.8539189Z + default_accepted_assets(&env), +2026-06-21T01:29:31.8539472Z + default_milestones(&env), +2026-06-21T01:29:31.8539862Z + 0, +2026-06-21T01:29:31.8540046Z ); +2026-06-21T01:29:31.8540272Z let mut campaign = get_campaign(&env).unwrap(); +2026-06-21T01:29:31.8540735Z campaign.status = CampaignStatus::GoalReached; +2026-06-21T01:29:31.8541426Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/test/negative_path_tests.rs:530: +2026-06-21T01:29:31.8542405Z // Initialize with future end_time, then manually set to past + Ended +2026-06-21T01:29:31.8543113Z let future_end = env.ledger().timestamp() + 100_000; +2026-06-21T01:29:31.8543471Z let _ = CampaignContract::initialize( +2026-06-21T01:29:31.8543797Z - env.clone(), creator.clone(), 1000, future_end, +2026-06-21T01:29:31.8544198Z - default_accepted_assets(&env), default_milestones(&env), 0, +2026-06-21T01:29:31.8544550Z + env.clone(), +2026-06-21T01:29:31.8544775Z + creator.clone(), +2026-06-21T01:29:31.8545015Z + 1000, +2026-06-21T01:29:31.8545214Z + future_end, +2026-06-21T01:29:31.8545449Z + default_accepted_assets(&env), +2026-06-21T01:29:31.8545734Z + default_milestones(&env), +2026-06-21T01:29:31.8545989Z + 0, +2026-06-21T01:29:31.8546181Z ); +2026-06-21T01:29:31.8546406Z let mut campaign = get_campaign(&env).unwrap(); +2026-06-21T01:29:31.8547186Z campaign.end_time = env.ledger().timestamp() - (31 * 24 * 60 * 60); +2026-06-21T01:29:31.8547852Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/test/negative_path_tests.rs:572: +2026-06-21T01:29:31.8548434Z let donor = Address::generate(&env); +2026-06-21T01:29:31.8548748Z create_donor_record(&env, &donor, 100, false); +2026-06-21T01:29:31.8549167Z let eligible = CampaignContract::is_refund_eligible(env.clone(), donor); +2026-06-21T01:29:31.8549733Z - assert!(!eligible, "Ended campaign with released milestone should not allow refunds"); +2026-06-21T01:29:31.8550189Z + assert!( +2026-06-21T01:29:31.8550383Z + !eligible, +2026-06-21T01:29:31.8550695Z + "Ended campaign with released milestone should not allow refunds" +2026-06-21T01:29:31.8551066Z + ); +2026-06-21T01:29:31.8551242Z }); +2026-06-21T01:29:31.8551422Z } +2026-06-21T01:29:31.8551589Z +2026-06-21T01:29:31.8552047Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/test/negative_path_tests.rs:731: +2026-06-21T01:29:31.8552623Z let donor = Address::generate(&env); +2026-06-21T01:29:31.8552939Z create_donor_record(&env, &donor, 500, false); +2026-06-21T01:29:31.8553365Z let eligible = CampaignContract::is_refund_eligible(env.clone(), donor); +2026-06-21T01:29:31.8553897Z - assert!(eligible, "Donor should be eligible for refund on cancelled campaign"); +2026-06-21T01:29:31.8554310Z + assert!( +2026-06-21T01:29:31.8554506Z + eligible, +2026-06-21T01:29:31.8554798Z + "Donor should be eligible for refund on cancelled campaign" +2026-06-21T01:29:31.8555150Z + ); +2026-06-21T01:29:31.8555327Z }); +2026-06-21T01:29:31.8555498Z } +2026-06-21T01:29:31.8555667Z +2026-06-21T01:29:31.8556120Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/test/negative_path_tests.rs:802: +2026-06-21T01:29:31.8557065Z // Initialize with future end_time, then manually set to exact boundary +2026-06-21T01:29:31.8557516Z let future_end = env.ledger().timestamp() + 100_000; +2026-06-21T01:29:31.8557865Z let _ = CampaignContract::initialize( +2026-06-21T01:29:31.8558201Z - env.clone(), creator.clone(), 1000, future_end, +2026-06-21T01:29:31.8558600Z - default_accepted_assets(&env), default_milestones(&env), 0, +2026-06-21T01:29:31.8558954Z + env.clone(), +2026-06-21T01:29:31.8559178Z + creator.clone(), +2026-06-21T01:29:31.8559406Z + 1000, +2026-06-21T01:29:31.8559599Z + future_end, +2026-06-21T01:29:31.8560024Z + default_accepted_assets(&env), +2026-06-21T01:29:31.8560313Z + default_milestones(&env), +2026-06-21T01:29:31.8560573Z + 0, +2026-06-21T01:29:31.8560875Z ); +2026-06-21T01:29:31.8561243Z let mut campaign = get_campaign(&env).unwrap(); +2026-06-21T01:29:31.8561976Z campaign.end_time = env.ledger().timestamp() - (30 * 24 * 60 * 60); +2026-06-21T01:29:31.8563121Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/test/negative_path_tests.rs:826: +2026-06-21T01:29:31.8563997Z // Initialize with future end_time, then manually set to just past boundary +2026-06-21T01:29:31.8564459Z let future_end = env.ledger().timestamp() + 100_000; +2026-06-21T01:29:31.8564822Z let _ = CampaignContract::initialize( +2026-06-21T01:29:31.8565158Z - env.clone(), creator.clone(), 1000, future_end, +2026-06-21T01:29:31.8565552Z - default_accepted_assets(&env), default_milestones(&env), 0, +2026-06-21T01:29:31.8565919Z + env.clone(), +2026-06-21T01:29:31.8566151Z + creator.clone(), +2026-06-21T01:29:31.8566379Z + 1000, +2026-06-21T01:29:31.8566584Z + future_end, +2026-06-21T01:29:31.8566985Z + default_accepted_assets(&env), +2026-06-21T01:29:31.8567277Z + default_milestones(&env), +2026-06-21T01:29:31.8567539Z + 0, +2026-06-21T01:29:31.8567726Z ); +2026-06-21T01:29:31.8567952Z let mut campaign = get_campaign(&env).unwrap(); +2026-06-21T01:29:31.8568364Z campaign.end_time = env.ledger().timestamp() - (30 * 24 * 60 * 60 + 1); +2026-06-21T01:29:31.8569054Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/test/negative_path_tests.rs:836: +2026-06-21T01:29:31.8569640Z let donor = Address::generate(&env); +2026-06-21T01:29:31.8569958Z create_donor_record(&env, &donor, 100, false); +2026-06-21T01:29:31.8570381Z let eligible = CampaignContract::is_refund_eligible(env.clone(), donor); +2026-06-21T01:29:31.8570890Z - assert!(!eligible, "Should NOT be eligible just past 30-day boundary"); +2026-06-21T01:29:31.8571276Z + assert!( +2026-06-21T01:29:31.8571475Z + !eligible, +2026-06-21T01:29:31.8571741Z + "Should NOT be eligible just past 30-day boundary" +2026-06-21T01:29:31.8572056Z + ); +2026-06-21T01:29:31.8572234Z }); +2026-06-21T01:29:31.8572417Z } +2026-06-21T01:29:31.8572590Z +2026-06-21T01:29:31.8573045Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/test/negative_path_tests.rs:864: +2026-06-21T01:29:31.8573737Z // Verify the contract is not frozen by default; upgrade should not panic on the +2026-06-21T01:29:31.8574271Z // freeze check (it will panic later when the deployer rejects the dummy hash, +2026-06-21T01:29:31.8574772Z // so we only assert that is_frozen returns false before the call). +2026-06-21T01:29:31.8575294Z - assert!(!crate::storage::is_frozen(&env), "Contract should not be frozen initially"); +2026-06-21T01:29:31.8575727Z + assert!( +2026-06-21T01:29:31.8575948Z + !crate::storage::is_frozen(&env), +2026-06-21T01:29:31.8576276Z + "Contract should not be frozen initially" +2026-06-21T01:29:31.8576561Z + ); +2026-06-21T01:29:31.8576862Z }); +2026-06-21T01:29:31.8577040Z } +2026-06-21T01:29:31.8577208Z +2026-06-21T01:29:31.8577656Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/test/negative_path_tests.rs:877: +2026-06-21T01:29:31.8578240Z CampaignContract::freeze(env.clone()); +2026-06-21T01:29:31.8578633Z assert!(crate::storage::is_frozen(&env), "Contract should be frozen"); +2026-06-21T01:29:31.8579042Z CampaignContract::unfreeze(env.clone()); +2026-06-21T01:29:31.8579500Z - assert!(!crate::storage::is_frozen(&env), "Contract should be unfrozen after unfreeze"); +2026-06-21T01:29:31.8579936Z + assert!( +2026-06-21T01:29:31.8580312Z + !crate::storage::is_frozen(&env), +2026-06-21T01:29:31.8580629Z + "Contract should be unfrozen after unfreeze" +2026-06-21T01:29:31.8580922Z + ); +2026-06-21T01:29:31.8581201Z }); +2026-06-21T01:29:31.8581375Z } +2026-06-21T01:29:31.8581540Z +2026-06-21T01:29:31.8581992Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/test/negative_path_tests.rs:906: +2026-06-21T01:29:31.8582567Z let creator = Address::generate(&env); +2026-06-21T01:29:31.8582900Z let end_time = env.ledger().timestamp() + 100_000; +2026-06-21T01:29:31.8583238Z let _ = CampaignContract::initialize( +2026-06-21T01:29:31.8583542Z - env.clone(), creator, 1000, end_time, +2026-06-21T01:29:31.8583914Z - default_accepted_assets(&env), default_milestones(&env), 0, +2026-06-21T01:29:31.8584268Z + env.clone(), +2026-06-21T01:29:31.8584494Z + creator, +2026-06-21T01:29:31.8584696Z + 1000, +2026-06-21T01:29:31.8584899Z + end_time, +2026-06-21T01:29:31.8585125Z + default_accepted_assets(&env), +2026-06-21T01:29:31.8585409Z + default_milestones(&env), +2026-06-21T01:29:31.8585672Z + 0, +2026-06-21T01:29:31.8585856Z ); +2026-06-21T01:29:31.8586033Z }); +2026-06-21T01:29:31.8586211Z } +2026-06-21T01:29:31.8586627Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/types.rs:1: +2026-06-21T01:29:31.8587370Z // src/types.rs +2026-06-21T01:29:31.8587570Z +2026-06-21T01:29:31.8587918Z -use soroban_sdk::{contracttype, contracterror, Address, BytesN, String, Vec, Env}; +2026-06-21T01:29:31.8588489Z +use soroban_sdk::{contracterror, contracttype, Address, BytesN, Env, String, Vec}; +2026-06-21T01:29:31.8588895Z +2026-06-21T01:29:31.8589431Z // ─── Error enum ─────────────────────────────────────────────────────────────── +2026-06-21T01:29:31.8589796Z +2026-06-21T01:29:31.8590185Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/types.rs:14: +2026-06-21T01:29:31.8590668Z pub enum Error { +2026-06-21T01:29:31.8591060Z // ── Requested contract error codes ──────────────────────────────────── +2026-06-21T01:29:31.8591531Z /// `initialize` called on an already-initialised contract. +2026-06-21T01:29:31.8591884Z - AlreadyInitialized = 1, +2026-06-21T01:29:31.8592168Z + AlreadyInitialized = 1, +2026-06-21T01:29:31.8592438Z /// Contract has not been initialised yet. +2026-06-21T01:29:31.8592735Z - NotInitialized = 2, +2026-06-21T01:29:31.8592994Z + NotInitialized = 2, +2026-06-21T01:29:31.8593279Z /// Caller is not authorised to perform the operation. +2026-06-21T01:29:31.8593609Z - Unauthorized = 3, +2026-06-21T01:29:31.8593860Z + Unauthorized = 3, +2026-06-21T01:29:31.8594111Z /// The campaign deadline has already passed. +2026-06-21T01:29:31.8594410Z - CampaignEnded = 4, +2026-06-21T01:29:31.8594670Z + CampaignEnded = 4, +2026-06-21T01:29:31.8595006Z /// Operation requires the campaign to be `Active` or `GoalReached`. +2026-06-21T01:29:31.8595390Z - CampaignNotActive = 5, +2026-06-21T01:29:31.8595668Z + CampaignNotActive = 5, +2026-06-21T01:29:31.8595977Z /// Donated asset is not in the campaign's accepted assets list. +2026-06-21T01:29:31.8596339Z - AssetNotAccepted = 6, +2026-06-21T01:29:31.8596598Z + AssetNotAccepted = 6, +2026-06-21T01:29:31.8597035Z /// Donation amount is below the campaign's minimum threshold. +2026-06-21T01:29:31.8597389Z - DonationTooSmall = 7, +2026-06-21T01:29:31.8597648Z + DonationTooSmall = 7, +2026-06-21T01:29:31.8597930Z /// Milestone index is out of range for this campaign. +2026-06-21T01:29:31.8598256Z - MilestoneNotFound = 8, +2026-06-21T01:29:31.8598516Z + MilestoneNotFound = 8, +2026-06-21T01:29:31.8598825Z /// Milestone has not been unlocked yet and cannot be released. +2026-06-21T01:29:31.8599180Z - MilestoneNotUnlocked = 9, +2026-06-21T01:29:31.8599608Z + MilestoneNotUnlocked = 9, +2026-06-21T01:29:31.8599973Z /// A previous milestone must be released before this one can be released. +2026-06-21T01:29:31.8600498Z PreviousMilestoneNotReleased = 10, +2026-06-21T01:29:31.8600838Z /// Cannot cancel the campaign while it still holds funds. +2026-06-21T01:29:31.8601375Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/types.rs:37: +2026-06-21T01:29:31.8601864Z - CannotCancelWithFunds = 11, +2026-06-21T01:29:31.8602144Z + CannotCancelWithFunds = 11, +2026-06-21T01:29:31.8602445Z /// Refunds are no longer permitted for this campaign. +2026-06-21T01:29:31.8602771Z - RefundWindowClosed = 12, +2026-06-21T01:29:31.8603053Z + RefundWindowClosed = 12, +2026-06-21T01:29:31.8603325Z /// `goal_amount` must be strictly positive. +2026-06-21T01:29:31.8603623Z - InvalidGoalAmount = 13, +2026-06-21T01:29:31.8603890Z + InvalidGoalAmount = 13, +2026-06-21T01:29:31.8604387Z /// `end_time` must be strictly greater than the current ledger timestamp. +2026-06-21T01:29:31.8604787Z - InvalidEndTime = 14, +2026-06-21T01:29:31.8605054Z + InvalidEndTime = 14, +2026-06-21T01:29:31.8605414Z /// Milestones must be strictly ascending and the last must equal `goal_amount`. +2026-06-21T01:29:31.8605832Z - InvalidMilestones = 15, +2026-06-21T01:29:31.8606102Z + InvalidMilestones = 15, +2026-06-21T01:29:31.8606446Z /// Contract does not hold enough funds to fulfil the requested transfer. +2026-06-21T01:29:31.8606992Z InsufficientContractBalance = 16, +2026-06-21T01:29:31.8607296Z /// A checked arithmetic operation overflowed. +2026-06-21T01:29:31.8607785Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/types.rs:49: +2026-06-21T01:29:31.8608265Z - Overflow = 17, +2026-06-21T01:29:31.8608513Z + Overflow = 17, +2026-06-21T01:29:31.8608713Z +2026-06-21T01:29:31.8609108Z // ── Additional contract errors ───────────────────────────────────────── +2026-06-21T01:29:31.8609512Z /// `accepted_assets` must be non-empty. +2026-06-21T01:29:31.8609998Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/types.rs:53: +2026-06-21T01:29:31.8610476Z - InvalidAssets = 18, +2026-06-21T01:29:31.8610738Z + InvalidAssets = 18, +2026-06-21T01:29:31.8611132Z /// `asset_code` must be non-empty and ≤ 12 characters (Stellar limit). +2026-06-21T01:29:31.8611519Z - InvalidAssetCode = 19, +2026-06-21T01:29:31.8611783Z + InvalidAssetCode = 19, +2026-06-21T01:29:31.8612092Z /// Last milestone `target_amount` does not equal `goal_amount`. +2026-06-21T01:29:31.8612446Z - MilestoneMismatch = 20, +2026-06-21T01:29:31.8612710Z + MilestoneMismatch = 20, +2026-06-21T01:29:31.8613028Z /// Milestone count must be in the range [1, MAX_MILESTONES]. +2026-06-21T01:29:31.8613377Z - InvalidMilestoneCount = 21, +2026-06-21T01:29:31.8613660Z + InvalidMilestoneCount = 21, +2026-06-21T01:29:31.8623933Z /// The requested campaign status transition is not permitted. +2026-06-21T01:29:31.8624423Z - InvalidCampaignTransition = 22, +2026-06-21T01:29:31.8624754Z + InvalidCampaignTransition = 22, +2026-06-21T01:29:31.8625119Z /// The requested milestone status transition is not permitted. +2026-06-21T01:29:31.8625504Z - InvalidMilestoneTransition = 23, +2026-06-21T01:29:31.8625811Z + InvalidMilestoneTransition = 23, +2026-06-21T01:29:31.8626266Z /// Cannot transition to `GoalReached` — raised amount < goal. +2026-06-21T01:29:31.8626640Z - GoalNotReached = 24, +2026-06-21T01:29:31.8627089Z + GoalNotReached = 24, +2026-06-21T01:29:31.8627320Z +2026-06-21T01:29:31.8627583Z /// A storage read returned an unexpectedly invalid value. +2026-06-21T01:29:31.8627939Z - InvalidStorageValue = 25, +2026-06-21T01:29:31.8628231Z + InvalidStorageValue = 25, +2026-06-21T01:29:31.8628761Z /// A storage write failed (entry too large, quota exceeded, etc.). +2026-06-21T01:29:31.8629140Z - StorageWriteError = 26, +2026-06-21T01:29:31.8629414Z + StorageWriteError = 26, +2026-06-21T01:29:31.8629781Z +2026-06-21T01:29:31.8630175Z // ── Asset / transfer ───────────────────────────────────────────────── 3x +2026-06-21T01:29:31.8630753Z /// Recipient address is the contract itself — would lock funds permanently. +2026-06-21T01:29:31.8631373Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/types.rs:74: +2026-06-21T01:29:31.8631866Z - InvalidRecipient = 30, +2026-06-21T01:29:31.8632153Z + InvalidRecipient = 30, +2026-06-21T01:29:31.8632523Z /// The asset has no issuer address; transfers require a token contract address. +2026-06-21T01:29:31.8632938Z - MissingIssuerAddress = 31, +2026-06-21T01:29:31.8633221Z + MissingIssuerAddress = 31, +2026-06-21T01:29:31.8633566Z /// Computed release amount is zero after proportional rounding. +2026-06-21T01:29:31.8633954Z - ZeroReleaseAmount = 32, +2026-06-21T01:29:31.8634226Z + ZeroReleaseAmount = 32, +2026-06-21T01:29:31.8634600Z /// `released_amount` already equals `target_amount`; nothing left to release. +2026-06-21T01:29:31.8635022Z - NothingToRelease = 33, +2026-06-21T01:29:31.8635296Z + NothingToRelease = 33, +2026-06-21T01:29:31.8635640Z /// `released_amount` would exceed `target_amount` after this operation. +2026-06-21T01:29:31.8636048Z MilestoneReleasedExceedsTarget = 34, +2026-06-21T01:29:31.8636324Z +2026-06-21T01:29:31.8636711Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/types.rs:84: +2026-06-21T01:29:31.8637518Z // ── Milestone ──────────────────────────────────────────────────────── 4x +2026-06-21T01:29:31.8637919Z /// Milestone is already in the `Released` state. +2026-06-21T01:29:31.8638242Z - MilestoneAlreadyReleased = 40, +2026-06-21T01:29:31.8638530Z + MilestoneAlreadyReleased = 40, +2026-06-21T01:29:31.8638915Z /// All milestones must be Released before the campaign can be concluded. +2026-06-21T01:29:31.8639320Z - UnreleasedMilestonesExist = 41, +2026-06-21T01:29:31.8639615Z + UnreleasedMilestonesExist = 41, +2026-06-21T01:29:31.8639876Z +2026-06-21T01:29:31.8640226Z // ── Refunds ────────────────────────────────────────────────────────── 5x +2026-06-21T01:29:31.8640801Z /// Refunds are only permitted when the campaign is `Cancelled` or +2026-06-21T01:29:31.8641411Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/types.rs:92: +2026-06-21T01:29:31.8641900Z /// `Ended` without reaching the goal. +2026-06-21T01:29:31.8642191Z - RefundNotPermitted = 50, +2026-06-21T01:29:31.8642468Z + RefundNotPermitted = 50, +2026-06-21T01:29:31.8642767Z /// No donor record found for the requesting address. +2026-06-21T01:29:31.8643083Z - NoDonorRecord = 51, +2026-06-21T01:29:31.8643344Z + NoDonorRecord = 51, +2026-06-21T01:29:31.8643645Z /// Donor has already claimed a refund for this campaign. +2026-06-21T01:29:31.8643983Z - RefundAlreadyClaimed = 52, +2026-06-21T01:29:31.8644277Z + RefundAlreadyClaimed = 52, +2026-06-21T01:29:31.8644621Z // RefundWindowClosed is defined above as RefundWindowClosed = 12 +2026-06-21T01:29:31.8644982Z +2026-06-21T01:29:31.8645361Z // ── Re-entrancy / concurrency ──────────────────────────────────────── 6x +2026-06-21T01:29:31.8645932Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/types.rs:101: +2026-06-21T01:29:31.8646454Z /// A re-entrant call was detected; operation aborted. +2026-06-21T01:29:31.8646912Z - ReentrantCall = 60, +2026-06-21T01:29:31.8647175Z + ReentrantCall = 60, +2026-06-21T01:29:31.8647391Z +2026-06-21T01:29:31.8647789Z // ── Amount validation ───────────────────────────────────────────────────────── 7x +2026-06-21T01:29:31.8648263Z /// A generic negative or otherwise invalid amount was supplied. +2026-06-21T01:29:31.8648996Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/types.rs:106: +2026-06-21T01:29:31.8649588Z - InvalidAmount = 70, +2026-06-21T01:29:31.8649844Z + InvalidAmount = 70, +2026-06-21T01:29:31.8650058Z +2026-06-21T01:29:31.8650427Z // ── Upgrade / freeze ─────────────────────────────────────────────────── 8x +2026-06-21T01:29:31.8650872Z /// Contract is frozen; all mutating operations are blocked. +2026-06-21T01:29:31.8651401Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/types.rs:110: +2026-06-21T01:29:31.8651881Z - ContractFrozen = 80, +2026-06-21T01:29:31.8652141Z + ContractFrozen = 80, +2026-06-21T01:29:31.8652352Z } +2026-06-21T01:29:31.8652519Z +2026-06-21T01:29:31.8652690Z - +2026-06-21T01:29:31.8653070Z // ─── Campaign lifecycle ─────────────────────────────────────────────────────── +2026-06-21T01:29:31.8653444Z +2026-06-21T01:29:31.8653698Z /// Campaign status with documented transition rules. +2026-06-21T01:29:31.8654200Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/types.rs:163: +2026-06-21T01:29:31.8654730Z pub fn can_transition_to(self, next: Self) -> bool { +2026-06-21T01:29:31.8655043Z matches!( +2026-06-21T01:29:31.8655257Z (self, next), +2026-06-21T01:29:31.8655522Z - (Self::Active, Self::GoalReached) +2026-06-21T01:29:31.8655829Z - | (Self::Active, Self::Ended) +2026-06-21T01:29:31.8656129Z - | (Self::Active, Self::Cancelled) +2026-06-21T01:29:31.8656435Z - | (Self::GoalReached, Self::Ended) +2026-06-21T01:29:31.8656876Z - | (Self::GoalReached, Self::Cancelled) +2026-06-21T01:29:31.8657209Z + (Self::Active, Self::GoalReached) +2026-06-21T01:29:31.8657504Z + | (Self::Active, Self::Ended) +2026-06-21T01:29:31.8657795Z + | (Self::Active, Self::Cancelled) +2026-06-21T01:29:31.8658103Z + | (Self::GoalReached, Self::Ended) +2026-06-21T01:29:31.8658417Z + | (Self::GoalReached, Self::Cancelled) +2026-06-21T01:29:31.8658696Z ) +2026-06-21T01:29:31.8658881Z } +2026-06-21T01:29:31.8659052Z } +2026-06-21T01:29:31.8659437Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/types.rs:453: +2026-06-21T01:29:31.8659901Z +2026-06-21T01:29:31.8660194Z /// Apply a new donation to this record. Panics with `Error::Overflow` if +2026-06-21T01:29:31.8660614Z /// `total_donated` or `donation_count` overflows. +2026-06-21T01:29:31.8661111Z - pub fn apply_donation(&mut self, env: &Env, amount: i128, time: u64, ledger: u32, asset: AssetInfo) { +2026-06-21T01:29:31.8661621Z - self.total_donated = self.total_donated +2026-06-21T01:29:31.8661919Z + pub fn apply_donation( +2026-06-21T01:29:31.8662153Z + &mut self, +2026-06-21T01:29:31.8662352Z + env: &Env, +2026-06-21T01:29:31.8662554Z + amount: i128, +2026-06-21T01:29:31.8662899Z + time: u64, +2026-06-21T01:29:31.8663092Z + ledger: u32, +2026-06-21T01:29:31.8663302Z + asset: AssetInfo, +2026-06-21T01:29:31.8663634Z + ) { +2026-06-21T01:29:31.8663828Z + self.total_donated = self +2026-06-21T01:29:31.8664091Z + .total_donated +2026-06-21T01:29:31.8664318Z .checked_add(amount) +2026-06-21T01:29:31.8664651Z .unwrap_or_else(|| env.panic_with_error(Error::Overflow)); +2026-06-21T01:29:31.8665010Z self.last_donation_time = time; +2026-06-21T01:29:31.8665483Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/types.rs:461: +2026-06-21T01:29:31.8665979Z self.last_donation_ledger = ledger; +2026-06-21T01:29:31.8666289Z - self.donation_count = self.donation_count +2026-06-21T01:29:31.8666603Z + self.donation_count = self +2026-06-21T01:29:31.8667191Z + .donation_count +2026-06-21T01:29:31.8667564Z .checked_add(1) +2026-06-21T01:29:31.8668024Z .unwrap_or_else(|| env.panic_with_error(Error::Overflow)); +2026-06-21T01:29:31.8668377Z self.asset = asset; +2026-06-21T01:29:31.8668845Z Diff in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/src/types.rs:569: +2026-06-21T01:29:31.8669328Z pub asset: AssetInfo, +2026-06-21T01:29:31.8669562Z pub ledger: u32, +2026-06-21T01:29:31.8669765Z } +2026-06-21T01:29:31.8669932Z - +2026-06-21T01:29:31.8670101Z - +2026-06-21T01:29:31.8670264Z +2026-06-21T01:29:31.8867353Z ##[error]Process completed with exit code 1. diff --git a/.ci_logs2/Format check/9_Post Cache cargo registry and target.txt b/.ci_logs2/Format check/9_Post Cache cargo registry and target.txt new file mode 100644 index 0000000..a6e1b14 --- /dev/null +++ b/.ci_logs2/Format check/9_Post Cache cargo registry and target.txt @@ -0,0 +1,4 @@ +2026-06-21T01:29:31.8979158Z Post job cleanup. +2026-06-21T01:29:32.1720523Z Cache up-to-date. +2026-06-21T01:29:32.1723982Z (node:2464) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead. +2026-06-21T01:29:32.1724891Z (Use `node --trace-deprecation ...` to show where the warning was created) diff --git a/.ci_logs2/Format check/system.txt b/.ci_logs2/Format check/system.txt new file mode 100644 index 0000000..7911f64 --- /dev/null +++ b/.ci_logs2/Format check/system.txt @@ -0,0 +1,8 @@ +2026-06-21T01:29:21.3020000Z Evaluating fmt.if +2026-06-21T01:29:21.3020000Z Evaluating: success() +2026-06-21T01:29:21.3020000Z Result: true +2026-06-21T01:29:21.3040000Z Requested labels: ubuntu-latest +2026-06-21T01:29:21.3040000Z Job defined at: OrbitChainLabs/OrbitChain-Contracts/.github/workflows/ci.yml@refs/pull/60/merge +2026-06-21T01:29:21.3040000Z Waiting for a runner to pick up this job... +2026-06-21T01:29:21.8020000Z Job is waiting for a hosted runner to come online. +2026-06-21T01:29:21.8020000Z Job is about to start running on the hosted runner: GitHub Actions 1000000147 \ No newline at end of file diff --git a/.ci_logs2/Tests (host target)/10_Post Run actions_checkout@v4.txt b/.ci_logs2/Tests (host target)/10_Post Run actions_checkout@v4.txt new file mode 100644 index 0000000..d5a4f2a --- /dev/null +++ b/.ci_logs2/Tests (host target)/10_Post Run actions_checkout@v4.txt @@ -0,0 +1,15 @@ +2026-06-21T01:30:24.3998868Z Node 20 is being deprecated. This workflow is running with Node 24 by default. If you need to temporarily use Node 20, you can set the ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true environment variable. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/ +2026-06-21T01:30:24.4000173Z Post job cleanup. +2026-06-21T01:30:24.4858006Z [command]/usr/bin/git version +2026-06-21T01:30:24.4894859Z git version 2.54.0 +2026-06-21T01:30:24.4932219Z Temporarily overriding HOME='/home/runner/work/_temp/e4b1ec18-2cd1-47f1-b8fb-5853776d7232' before making global git config changes +2026-06-21T01:30:24.4933211Z Adding repository directory to the temporary git global config as a safe directory +2026-06-21T01:30:24.4937955Z [command]/usr/bin/git config --global --add safe.directory /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts +2026-06-21T01:30:24.4973136Z [command]/usr/bin/git config --local --name-only --get-regexp core\.sshCommand +2026-06-21T01:30:24.5004772Z [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || :" +2026-06-21T01:30:24.5227353Z [command]/usr/bin/git config --local --name-only --get-regexp http\.https\:\/\/github\.com\/\.extraheader +2026-06-21T01:30:24.5254283Z http.https://github.com/.extraheader +2026-06-21T01:30:24.5265949Z [command]/usr/bin/git config --local --unset-all http.https://github.com/.extraheader +2026-06-21T01:30:24.5297269Z [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http\.https\:\/\/github\.com\/\.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :" +2026-06-21T01:30:24.5515673Z [command]/usr/bin/git config --local --name-only --get-regexp ^includeIf\.gitdir: +2026-06-21T01:30:24.5548036Z [command]/usr/bin/git submodule foreach --recursive git config --local --show-origin --name-only --get-regexp remote.origin.url diff --git a/.ci_logs2/Tests (host target)/11_Complete job.txt b/.ci_logs2/Tests (host target)/11_Complete job.txt new file mode 100644 index 0000000..062057d --- /dev/null +++ b/.ci_logs2/Tests (host target)/11_Complete job.txt @@ -0,0 +1,2 @@ +2026-06-21T01:30:24.5907076Z Cleaning up orphan processes +2026-06-21T01:30:24.6183955Z ##[warning]Node.js 20 is deprecated. The following actions target Node.js 20 but are being forced to run on Node.js 24: actions/checkout@v4. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/ diff --git a/.ci_logs2/Tests (host target)/1_Set up job.txt b/.ci_logs2/Tests (host target)/1_Set up job.txt new file mode 100644 index 0000000..7bdaaef --- /dev/null +++ b/.ci_logs2/Tests (host target)/1_Set up job.txt @@ -0,0 +1,32 @@ +2026-06-21T01:29:24.2390167Z Current runner version: '2.335.1' +2026-06-21T01:29:24.2417004Z ##[group]Runner Image Provisioner +2026-06-21T01:29:24.2417974Z Hosted Compute Agent +2026-06-21T01:29:24.2418568Z Version: 20260611.554 +2026-06-21T01:29:24.2419188Z Commit: 5e0782fdc9014723d3be820dd114dd31555c2bd1 +2026-06-21T01:29:24.2420030Z Build Date: 2026-06-11T21:40:46Z +2026-06-21T01:29:24.2420747Z Worker ID: {4a610412-766d-40b5-928e-de692c0d6a4e} +2026-06-21T01:29:24.2421487Z Azure Region: westus +2026-06-21T01:29:24.2422079Z ##[endgroup] +2026-06-21T01:29:24.2423501Z ##[group]Operating System +2026-06-21T01:29:24.2424662Z Ubuntu +2026-06-21T01:29:24.2425208Z 24.04.4 +2026-06-21T01:29:24.2425752Z LTS +2026-06-21T01:29:24.2426293Z ##[endgroup] +2026-06-21T01:29:24.2426884Z ##[group]Runner Image +2026-06-21T01:29:24.2427538Z Image: ubuntu-24.04 +2026-06-21T01:29:24.2428114Z Version: 20260615.205.1 +2026-06-21T01:29:24.2429166Z Included Software: https://github.com/actions/runner-images/blob/ubuntu24/20260615.205/images/ubuntu/Ubuntu2404-Readme.md +2026-06-21T01:29:24.2431013Z Image Release: https://github.com/actions/runner-images/releases/tag/ubuntu24%2F20260615.205 +2026-06-21T01:29:24.2432040Z ##[endgroup] +2026-06-21T01:29:24.2433117Z ##[group]GITHUB_TOKEN Permissions +2026-06-21T01:29:24.2435456Z Contents: read +2026-06-21T01:29:24.2436092Z Metadata: read +2026-06-21T01:29:24.2436693Z ##[endgroup] +2026-06-21T01:29:24.2438975Z Secret source: Actions +2026-06-21T01:29:24.2439768Z Prepare workflow directory +2026-06-21T01:29:24.2907856Z Prepare all required actions +2026-06-21T01:29:24.2947067Z Getting action download info +2026-06-21T01:29:24.6743625Z Download action repository 'actions/checkout@v4' (SHA:34e114876b0b11c390a56381ad16ebd13914f8d5) +2026-06-21T01:29:24.7669762Z Download action repository 'dtolnay/rust-toolchain@stable' (SHA:29eef336d9b2848a0b548edc03f92a220660cdb8) +2026-06-21T01:29:24.9757899Z Download action repository 'Swatinem/rust-cache@v2' (SHA:e18b497796c12c097a38f9edb9d0641fb99eee32) +2026-06-21T01:29:25.7002536Z Complete job name: Tests (host target) diff --git a/.ci_logs2/Tests (host target)/2_Run actions_checkout@v4.txt b/.ci_logs2/Tests (host target)/2_Run actions_checkout@v4.txt new file mode 100644 index 0000000..fe8592c --- /dev/null +++ b/.ci_logs2/Tests (host target)/2_Run actions_checkout@v4.txt @@ -0,0 +1,93 @@ +2026-06-21T01:29:25.7800949Z Node 20 is being deprecated. This workflow is running with Node 24 by default. If you need to temporarily use Node 20, you can set the ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true environment variable. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/ +2026-06-21T01:29:25.7810401Z ##[group]Run actions/checkout@v4 +2026-06-21T01:29:25.7811279Z with: +2026-06-21T01:29:25.7811899Z repository: OrbitChainLabs/OrbitChain-Contracts +2026-06-21T01:29:25.7817144Z token: *** +2026-06-21T01:29:25.7817646Z ssh-strict: true +2026-06-21T01:29:25.7818142Z ssh-user: git +2026-06-21T01:29:25.7818651Z persist-credentials: true +2026-06-21T01:29:25.7819195Z clean: true +2026-06-21T01:29:25.7819681Z sparse-checkout-cone-mode: true +2026-06-21T01:29:25.7820256Z fetch-depth: 1 +2026-06-21T01:29:25.7820744Z fetch-tags: false +2026-06-21T01:29:25.7821277Z show-progress: true +2026-06-21T01:29:25.7821782Z lfs: false +2026-06-21T01:29:25.7822290Z submodules: false +2026-06-21T01:29:25.7822844Z set-safe-directory: true +2026-06-21T01:29:25.7823676Z env: +2026-06-21T01:29:25.7824331Z CARGO_TERM_COLOR: always +2026-06-21T01:29:25.7824890Z RUST_BACKTRACE: short +2026-06-21T01:29:25.7825844Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:25.7826854Z ##[endgroup] +2026-06-21T01:29:25.8871880Z Syncing repository: OrbitChainLabs/OrbitChain-Contracts +2026-06-21T01:29:25.8874370Z ##[group]Getting Git version info +2026-06-21T01:29:25.8875357Z Working directory is '/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts' +2026-06-21T01:29:25.8876727Z [command]/usr/bin/git version +2026-06-21T01:29:25.8934198Z git version 2.54.0 +2026-06-21T01:29:25.8989507Z ##[endgroup] +2026-06-21T01:29:25.9005770Z Temporarily overriding HOME='/home/runner/work/_temp/8d4943c8-8eb5-46dd-8d8c-0a112648f896' before making global git config changes +2026-06-21T01:29:25.9007366Z Adding repository directory to the temporary git global config as a safe directory +2026-06-21T01:29:25.9012318Z [command]/usr/bin/git config --global --add safe.directory /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts +2026-06-21T01:29:25.9065082Z Deleting the contents of '/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts' +2026-06-21T01:29:25.9069444Z ##[group]Initializing the repository +2026-06-21T01:29:25.9075080Z [command]/usr/bin/git init /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts +2026-06-21T01:29:25.9189601Z hint: Using 'master' as the name for the initial branch. This default branch name +2026-06-21T01:29:25.9191272Z hint: will change to "main" in Git 3.0. To configure the initial branch name +2026-06-21T01:29:25.9193052Z hint: to use in all of your new repositories, which will suppress this warning, +2026-06-21T01:29:25.9195015Z hint: call: +2026-06-21T01:29:25.9195896Z hint: +2026-06-21T01:29:25.9196919Z hint: git config --global init.defaultBranch +2026-06-21T01:29:25.9198221Z hint: +2026-06-21T01:29:25.9199560Z hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and +2026-06-21T01:29:25.9201543Z hint: 'development'. The just-created branch can be renamed via this command: +2026-06-21T01:29:25.9203142Z hint: +2026-06-21T01:29:25.9204290Z hint: git branch -m +2026-06-21T01:29:25.9205346Z hint: +2026-06-21T01:29:25.9206629Z hint: Disable this message with "git config set advice.defaultBranchName false" +2026-06-21T01:29:25.9208886Z Initialized empty Git repository in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/.git/ +2026-06-21T01:29:25.9213093Z [command]/usr/bin/git remote add origin https://github.com/OrbitChainLabs/OrbitChain-Contracts +2026-06-21T01:29:25.9258310Z ##[endgroup] +2026-06-21T01:29:25.9259827Z ##[group]Disabling automatic garbage collection +2026-06-21T01:29:25.9263199Z [command]/usr/bin/git config --local gc.auto 0 +2026-06-21T01:29:25.9294384Z ##[endgroup] +2026-06-21T01:29:25.9295950Z ##[group]Setting up auth +2026-06-21T01:29:25.9302234Z [command]/usr/bin/git config --local --name-only --get-regexp core\.sshCommand +2026-06-21T01:29:25.9350640Z [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || :" +2026-06-21T01:29:25.9712261Z [command]/usr/bin/git config --local --name-only --get-regexp http\.https\:\/\/github\.com\/\.extraheader +2026-06-21T01:29:25.9744777Z [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http\.https\:\/\/github\.com\/\.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :" +2026-06-21T01:29:25.9967378Z [command]/usr/bin/git config --local --name-only --get-regexp ^includeIf\.gitdir: +2026-06-21T01:29:26.0001981Z [command]/usr/bin/git submodule foreach --recursive git config --local --show-origin --name-only --get-regexp remote.origin.url +2026-06-21T01:29:26.0232311Z [command]/usr/bin/git config --local http.https://github.com/.extraheader AUTHORIZATION: basic *** +2026-06-21T01:29:26.0268539Z ##[endgroup] +2026-06-21T01:29:26.0278150Z ##[group]Fetching the repository +2026-06-21T01:29:26.0279699Z [command]/usr/bin/git -c protocol.version=2 fetch --no-tags --prune --no-recurse-submodules --depth=1 origin +59f3fe99e87bd5e1e546c9babe13e09825b65536:refs/remotes/pull/60/merge +2026-06-21T01:29:26.5216704Z From https://github.com/OrbitChainLabs/OrbitChain-Contracts +2026-06-21T01:29:26.5217958Z * [new ref] 59f3fe99e87bd5e1e546c9babe13e09825b65536 -> pull/60/merge +2026-06-21T01:29:26.5253614Z ##[endgroup] +2026-06-21T01:29:26.5255643Z ##[group]Determining the checkout info +2026-06-21T01:29:26.5257568Z ##[endgroup] +2026-06-21T01:29:26.5263581Z [command]/usr/bin/git sparse-checkout disable +2026-06-21T01:29:26.5311572Z [command]/usr/bin/git config --local --unset-all extensions.worktreeConfig +2026-06-21T01:29:26.5349906Z ##[group]Checking out the ref +2026-06-21T01:29:26.5353780Z [command]/usr/bin/git checkout --progress --force refs/remotes/pull/60/merge +2026-06-21T01:29:26.5514352Z Note: switching to 'refs/remotes/pull/60/merge'. +2026-06-21T01:29:26.5515937Z +2026-06-21T01:29:26.5517040Z You are in 'detached HEAD' state. You can look around, make experimental +2026-06-21T01:29:26.5519585Z changes and commit them, and you can discard any commits you make in this +2026-06-21T01:29:26.5522093Z state without impacting any branches by switching back to a branch. +2026-06-21T01:29:26.5523681Z +2026-06-21T01:29:26.5524982Z If you want to create a new branch to retain commits you create, you may +2026-06-21T01:29:26.5527336Z do so (now or later) by using -c with the switch command. Example: +2026-06-21T01:29:26.5528787Z +2026-06-21T01:29:26.5529448Z git switch -c +2026-06-21T01:29:26.5530457Z +2026-06-21T01:29:26.5530988Z Or undo this operation with: +2026-06-21T01:29:26.5531713Z +2026-06-21T01:29:26.5532236Z git switch - +2026-06-21T01:29:26.5533106Z +2026-06-21T01:29:26.5534266Z Turn off this advice by setting config variable advice.detachedHead to false +2026-06-21T01:29:26.5535662Z +2026-06-21T01:29:26.5537026Z HEAD is now at 59f3fe9 Merge 9e85affabcadb1e696b876ca7eae8bad3de3c85d into dc3d5e2b821bb2a0f2655582265c562926415b02 +2026-06-21T01:29:26.5541236Z ##[endgroup] +2026-06-21T01:29:26.5570700Z [command]/usr/bin/git log -1 --format=%H +2026-06-21T01:29:26.5605832Z 59f3fe99e87bd5e1e546c9babe13e09825b65536 diff --git a/.ci_logs2/Tests (host target)/3_Install Rust toolchain.txt b/.ci_logs2/Tests (host target)/3_Install Rust toolchain.txt new file mode 100644 index 0000000..0cc7e29 --- /dev/null +++ b/.ci_logs2/Tests (host target)/3_Install Rust toolchain.txt @@ -0,0 +1,188 @@ +2026-06-21T01:29:26.6076643Z ##[warning]Unexpected input(s) 'cache', valid inputs are ['toolchain', 'targets', 'target', 'components'] +2026-06-21T01:29:26.6096099Z ##[group]Run dtolnay/rust-toolchain@stable +2026-06-21T01:29:26.6096760Z with: +2026-06-21T01:29:26.6097207Z cache: false +2026-06-21T01:29:26.6097689Z toolchain: stable +2026-06-21T01:29:26.6098171Z env: +2026-06-21T01:29:26.6098608Z CARGO_TERM_COLOR: always +2026-06-21T01:29:26.6099149Z RUST_BACKTRACE: short +2026-06-21T01:29:26.6100091Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:26.6101102Z ##[endgroup] +2026-06-21T01:29:26.6242351Z ##[group]Run : parse toolchain version +2026-06-21T01:29:26.6243147Z : parse toolchain version +2026-06-21T01:29:26.6243967Z if [[ -z $toolchain ]]; then +2026-06-21T01:29:26.6245000Z  # GitHub does not enforce `required: true` inputs itself. https://github.com/actions/runner/issues/1070 +2026-06-21T01:29:26.6246102Z  echo "'toolchain' is a required input" >&2 +2026-06-21T01:29:26.6246814Z  exit 1 +2026-06-21T01:29:26.6247519Z elif [[ $toolchain =~ ^stable' '[0-9]+' '(year|month|week|day)s?' 'ago$ ]]; then +2026-06-21T01:29:26.6248370Z  if [[ Linux == macOS ]]; then +2026-06-21T01:29:26.6249414Z  echo "toolchain=1.$((($(date -v-$(sed 's/stable \([0-9]*\) \(.\).*/\1\2/' <<< $toolchain) +%s)/60/60/24-16569)/7/6))" >> $GITHUB_OUTPUT +2026-06-21T01:29:26.6250437Z  else +2026-06-21T01:29:26.6251299Z  echo "toolchain=1.$((($(date --date "${toolchain#stable }" +%s)/60/60/24-16569)/7/6))" >> $GITHUB_OUTPUT +2026-06-21T01:29:26.6252242Z  fi +2026-06-21T01:29:26.6252893Z elif [[ $toolchain =~ ^stable' 'minus' '[0-9]+' 'releases?$ ]]; then +2026-06-21T01:29:26.6254182Z  echo "toolchain=1.$((($(date +%s)/60/60/24-16569)/7/6-${toolchain//[^0-9]/}))" >> $GITHUB_OUTPUT +2026-06-21T01:29:26.6255159Z elif [[ $toolchain =~ ^1\.[0-9]+$ ]]; then +2026-06-21T01:29:26.6256230Z  echo "toolchain=1.$((i=${toolchain#1.}, c=($(date +%s)/60/60/24-16569)/7/6, i+9*i*(10*i<=c)+90*i*(100*i<=c)))" >> $GITHUB_OUTPUT +2026-06-21T01:29:26.6257222Z else +2026-06-21T01:29:26.6257777Z  echo "toolchain=$toolchain" >> $GITHUB_OUTPUT +2026-06-21T01:29:26.6258432Z fi +2026-06-21T01:29:26.6478997Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:26.6480550Z env: +2026-06-21T01:29:26.6481432Z CARGO_TERM_COLOR: always +2026-06-21T01:29:26.6482499Z RUST_BACKTRACE: short +2026-06-21T01:29:26.6484968Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:26.6486991Z toolchain: stable +2026-06-21T01:29:26.6487951Z ##[endgroup] +2026-06-21T01:29:26.6676697Z ##[group]Run : construct rustup command line +2026-06-21T01:29:26.6677456Z : construct rustup command line +2026-06-21T01:29:26.6678380Z echo "targets=$(for t in ${targets//,/ }; do echo -n ' --target' $t; done)" >> $GITHUB_OUTPUT +2026-06-21T01:29:26.6679649Z echo "components=$(for c in ${components//,/ }; do echo -n ' --component' $c; done)" >> $GITHUB_OUTPUT +2026-06-21T01:29:26.6680656Z echo "downgrade=" >> $GITHUB_OUTPUT +2026-06-21T01:29:26.6712426Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:26.6713156Z env: +2026-06-21T01:29:26.6713619Z CARGO_TERM_COLOR: always +2026-06-21T01:29:26.6714437Z RUST_BACKTRACE: short +2026-06-21T01:29:26.6715404Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:26.6716439Z targets: +2026-06-21T01:29:26.6716903Z components: +2026-06-21T01:29:26.6717371Z ##[endgroup] +2026-06-21T01:29:26.6822224Z ##[group]Run : set $CARGO_HOME +2026-06-21T01:29:26.6822839Z : set $CARGO_HOME +2026-06-21T01:29:26.6823544Z echo CARGO_HOME=${CARGO_HOME:-"$HOME/.cargo"} >> $GITHUB_ENV +2026-06-21T01:29:26.6854591Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:26.6855582Z env: +2026-06-21T01:29:26.6856035Z CARGO_TERM_COLOR: always +2026-06-21T01:29:26.6856571Z RUST_BACKTRACE: short +2026-06-21T01:29:26.6857487Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:26.6858496Z ##[endgroup] +2026-06-21T01:29:26.6971651Z ##[group]Run : install rustup if needed +2026-06-21T01:29:26.6972339Z : install rustup if needed +2026-06-21T01:29:26.6972993Z if ! command -v rustup &>/dev/null; then +2026-06-21T01:29:26.6974765Z  curl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused --location --silent --show-error --fail https://sh.rustup.rs | sh -s -- --default-toolchain none -y +2026-06-21T01:29:26.6976232Z  echo "$CARGO_HOME/bin" >> $GITHUB_PATH +2026-06-21T01:29:26.6976865Z fi +2026-06-21T01:29:26.7006721Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:26.7007555Z env: +2026-06-21T01:29:26.7008023Z CARGO_TERM_COLOR: always +2026-06-21T01:29:26.7008553Z RUST_BACKTRACE: short +2026-06-21T01:29:26.7009468Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:26.7010482Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:29:26.7011037Z ##[endgroup] +2026-06-21T01:29:26.7122460Z ##[group]Run rustup toolchain install stable --profile minimal --no-self-update +2026-06-21T01:29:26.7123623Z rustup toolchain install stable --profile minimal --no-self-update +2026-06-21T01:29:26.7156662Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:26.7157400Z env: +2026-06-21T01:29:26.7157862Z CARGO_TERM_COLOR: always +2026-06-21T01:29:26.7158391Z RUST_BACKTRACE: short +2026-06-21T01:29:26.7159301Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:26.7160310Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:29:26.7160915Z RUSTUP_PERMIT_COPY_RENAME: 1 +2026-06-21T01:29:26.7161453Z ##[endgroup] +2026-06-21T01:29:26.9050898Z info: syncing channel updates for stable-x86_64-unknown-linux-gnu +2026-06-21T01:29:26.9879821Z +2026-06-21T01:29:26.9964176Z stable-x86_64-unknown-linux-gnu unchanged - rustc 1.96.0 (ac68faa20 2026-05-25) +2026-06-21T01:29:26.9965129Z +2026-06-21T01:29:27.0030645Z ##[group]Run rustup default stable +2026-06-21T01:29:27.0031315Z rustup default stable +2026-06-21T01:29:27.0064531Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:27.0065285Z env: +2026-06-21T01:29:27.0065971Z CARGO_TERM_COLOR: always +2026-06-21T01:29:27.0066514Z RUST_BACKTRACE: short +2026-06-21T01:29:27.0067437Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:27.0068466Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:29:27.0069028Z ##[endgroup] +2026-06-21T01:29:27.0182508Z info: using existing install for stable-x86_64-unknown-linux-gnu +2026-06-21T01:29:27.0188856Z info: default toolchain set to stable-x86_64-unknown-linux-gnu +2026-06-21T01:29:27.0189806Z +2026-06-21T01:29:27.0277647Z stable-x86_64-unknown-linux-gnu unchanged - rustc 1.96.0 (ac68faa20 2026-05-25) +2026-06-21T01:29:27.0279016Z +2026-06-21T01:29:27.0281270Z info: note that the toolchain 'stable-x86_64-unknown-linux-gnu' is currently in use (overridden by '/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/rust-toolchain.toml') +2026-06-21T01:29:27.0433351Z ##[group]Run : create cachekey +2026-06-21T01:29:27.0434293Z : create cachekey +2026-06-21T01:29:27.0435278Z DATE=$(rustc +stable --version --verbose | sed -ne 's/^commit-date: \(20[0-9][0-9]\)-\([01][0-9]\)-\([0-3][0-9]\)$/\1\2\3/p') +2026-06-21T01:29:27.0436468Z HASH=$(rustc +stable --version --verbose | sed -ne 's/^commit-hash: //p') +2026-06-21T01:29:27.0437390Z echo "cachekey=$(echo $DATE$HASH | head -c12)" >> $GITHUB_OUTPUT +2026-06-21T01:29:27.0501133Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:27.0502080Z env: +2026-06-21T01:29:27.0502499Z CARGO_TERM_COLOR: always +2026-06-21T01:29:27.0502987Z RUST_BACKTRACE: short +2026-06-21T01:29:27.0504184Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:27.0505192Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:29:27.0505740Z ##[endgroup] +2026-06-21T01:29:27.0933454Z ##[group]Run : disable incremental compilation +2026-06-21T01:29:27.0934521Z : disable incremental compilation +2026-06-21T01:29:27.0935215Z if [ -z "${CARGO_INCREMENTAL+set}" ]; then +2026-06-21T01:29:27.0935873Z  echo CARGO_INCREMENTAL=0 >> $GITHUB_ENV +2026-06-21T01:29:27.0936456Z fi +2026-06-21T01:29:27.0968921Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:27.0969598Z env: +2026-06-21T01:29:27.0970010Z CARGO_TERM_COLOR: always +2026-06-21T01:29:27.0970498Z RUST_BACKTRACE: short +2026-06-21T01:29:27.0971373Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:27.0972319Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:29:27.0972831Z ##[endgroup] +2026-06-21T01:29:27.1069329Z ##[group]Run : enable colors in Cargo output +2026-06-21T01:29:27.1069997Z : enable colors in Cargo output +2026-06-21T01:29:27.1070639Z if [ -z "${CARGO_TERM_COLOR+set}" ]; then +2026-06-21T01:29:27.1071317Z  echo CARGO_TERM_COLOR=always >> $GITHUB_ENV +2026-06-21T01:29:27.1071922Z fi +2026-06-21T01:29:27.1104064Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:27.1104755Z env: +2026-06-21T01:29:27.1105192Z CARGO_TERM_COLOR: always +2026-06-21T01:29:27.1105690Z RUST_BACKTRACE: short +2026-06-21T01:29:27.1106554Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:27.1107505Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:29:27.1108055Z CARGO_INCREMENTAL: 0 +2026-06-21T01:29:27.1108496Z ##[endgroup] +2026-06-21T01:29:27.1202457Z ##[group]Run : enable Cargo sparse registry +2026-06-21T01:29:27.1203118Z : enable Cargo sparse registry +2026-06-21T01:29:27.1204155Z # implemented in 1.66, stabilized in 1.68, made default in 1.70 +2026-06-21T01:29:27.1205508Z if [ -z "${CARGO_REGISTRIES_CRATES_IO_PROTOCOL+set}" -o -f "/home/runner/work/_temp"/.implicit_cargo_registries_crates_io_protocol ]; then +2026-06-21T01:29:27.1206844Z  if rustc +stable --version --verbose | grep -q '^release: 1\.6[89]\.'; then +2026-06-21T01:29:27.1208095Z  touch "/home/runner/work/_temp"/.implicit_cargo_registries_crates_io_protocol || true +2026-06-21T01:29:27.1209133Z  echo CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse >> $GITHUB_ENV +2026-06-21T01:29:27.1210087Z  elif rustc +stable --version --verbose | grep -q '^release: 1\.6[67]\.'; then +2026-06-21T01:29:27.1211154Z  touch "/home/runner/work/_temp"/.implicit_cargo_registries_crates_io_protocol || true +2026-06-21T01:29:27.1212160Z  echo CARGO_REGISTRIES_CRATES_IO_PROTOCOL=git >> $GITHUB_ENV +2026-06-21T01:29:27.1212843Z  fi +2026-06-21T01:29:27.1213254Z fi +2026-06-21T01:29:27.1244370Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:27.1245054Z env: +2026-06-21T01:29:27.1245463Z CARGO_TERM_COLOR: always +2026-06-21T01:29:27.1245947Z RUST_BACKTRACE: short +2026-06-21T01:29:27.1246800Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:27.1247762Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:29:27.1248280Z CARGO_INCREMENTAL: 0 +2026-06-21T01:29:27.1248733Z ##[endgroup] +2026-06-21T01:29:27.1633689Z ##[group]Run : work around spurious network errors in curl 8.0 +2026-06-21T01:29:27.1634915Z : work around spurious network errors in curl 8.0 +2026-06-21T01:29:27.1635925Z # https://rust-lang.zulipchat.com/#narrow/stream/246057-t-cargo/topic/timeout.20investigation +2026-06-21T01:29:27.1637249Z if rustc +stable --version --verbose | grep -q '^release: 1\.7[01]\.'; then +2026-06-21T01:29:27.1638128Z  echo CARGO_HTTP_MULTIPLEXING=false >> $GITHUB_ENV +2026-06-21T01:29:27.1638761Z fi +2026-06-21T01:29:27.1670867Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:27.1671542Z env: +2026-06-21T01:29:27.1671952Z CARGO_TERM_COLOR: always +2026-06-21T01:29:27.1672450Z RUST_BACKTRACE: short +2026-06-21T01:29:27.1673321Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:27.1674577Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:29:27.1675098Z CARGO_INCREMENTAL: 0 +2026-06-21T01:29:27.1675546Z ##[endgroup] +2026-06-21T01:29:27.1917541Z ##[group]Run rustc +stable --version --verbose +2026-06-21T01:29:27.1918246Z rustc +stable --version --verbose +2026-06-21T01:29:27.1950404Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:27.1951064Z env: +2026-06-21T01:29:27.1951470Z CARGO_TERM_COLOR: always +2026-06-21T01:29:27.1951959Z RUST_BACKTRACE: short +2026-06-21T01:29:27.1952834Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:27.1954069Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:29:27.1954620Z CARGO_INCREMENTAL: 0 +2026-06-21T01:29:27.1955070Z ##[endgroup] +2026-06-21T01:29:27.2138720Z rustc 1.96.0 (ac68faa20 2026-05-25) +2026-06-21T01:29:27.2139911Z binary: rustc +2026-06-21T01:29:27.2140938Z commit-hash: ac68faa20c58cbccd01ee7208bf3b6e93a7d7f96 +2026-06-21T01:29:27.2142247Z commit-date: 2026-05-25 +2026-06-21T01:29:27.2143301Z host: x86_64-unknown-linux-gnu +2026-06-21T01:29:27.2144604Z release: 1.96.0 +2026-06-21T01:29:27.2145533Z LLVM version: 22.1.2 diff --git a/.ci_logs2/Tests (host target)/4_Cache cargo registry and target.txt b/.ci_logs2/Tests (host target)/4_Cache cargo registry and target.txt new file mode 100644 index 0000000..bf8ac1b --- /dev/null +++ b/.ci_logs2/Tests (host target)/4_Cache cargo registry and target.txt @@ -0,0 +1,69 @@ +2026-06-21T01:29:27.2318976Z ##[group]Run Swatinem/rust-cache@v2 +2026-06-21T01:29:27.2319629Z with: +2026-06-21T01:29:27.2320047Z cache-on-failure: true +2026-06-21T01:29:27.2320566Z prefix-key: v0-rust +2026-06-21T01:29:27.2321033Z add-job-id-key: true +2026-06-21T01:29:27.2321522Z add-rust-environment-hash-key: true +2026-06-21T01:29:27.2322076Z cache-targets: true +2026-06-21T01:29:27.2322538Z cache-all-crates: false +2026-06-21T01:29:27.2323030Z cache-workspace-crates: false +2026-06-21T01:29:27.2323529Z save-if: true +2026-06-21T01:29:27.2324266Z cache-provider: github +2026-06-21T01:29:27.2324736Z cache-bin: true +2026-06-21T01:29:27.2325172Z lookup-only: false +2026-06-21T01:29:27.2325814Z cmd-format: {0} +2026-06-21T01:29:27.2326237Z env: +2026-06-21T01:29:27.2326642Z CARGO_TERM_COLOR: always +2026-06-21T01:29:27.2327119Z RUST_BACKTRACE: short +2026-06-21T01:29:27.2327973Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:27.2328924Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:29:27.2329496Z CARGO_INCREMENTAL: 0 +2026-06-21T01:29:27.2329949Z ##[endgroup] +2026-06-21T01:29:27.5327834Z (node:2375) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead. +2026-06-21T01:29:27.5331916Z (Use `node --trace-deprecation ...` to show where the warning was created) +2026-06-21T01:29:30.7385465Z ##[group]Cache Configuration +2026-06-21T01:29:30.7386330Z Cache Provider: +2026-06-21T01:29:30.7387162Z github +2026-06-21T01:29:30.7387659Z Workspaces: +2026-06-21T01:29:30.7388251Z /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts +2026-06-21T01:29:30.7389065Z Cache Paths: +2026-06-21T01:29:30.7389661Z /home/runner/.cargo/bin +2026-06-21T01:29:30.7390148Z /home/runner/.cargo/.crates.toml +2026-06-21T01:29:30.7390715Z /home/runner/.cargo/.crates2.json +2026-06-21T01:29:30.7391276Z /home/runner/.cargo/registry +2026-06-21T01:29:30.7391832Z /home/runner/.cargo/git +2026-06-21T01:29:30.7392623Z /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/target +2026-06-21T01:29:30.7393386Z Restore Key: +2026-06-21T01:29:30.7394140Z v0-rust-test-Linux-x64-1f47b3b1 +2026-06-21T01:29:30.7394741Z Cache Key: +2026-06-21T01:29:30.7395438Z v0-rust-test-Linux-x64-1f47b3b1-8243978e +2026-06-21T01:29:30.7396158Z .. Prefix: +2026-06-21T01:29:30.7396592Z - v0-rust-test-Linux-x64 +2026-06-21T01:29:30.7397123Z .. Environment considered: +2026-06-21T01:29:30.7397588Z - Rust Versions: +2026-06-21T01:29:30.7398239Z - 1.96.0 x86_64-unknown-linux-gnu ac68faa20c58cbccd01ee7208bf3b6e93a7d7f96 +2026-06-21T01:29:30.7399173Z - 1.96.0 x86_64-unknown-linux-gnu ac68faa20c58cbccd01ee7208bf3b6e93a7d7f96 +2026-06-21T01:29:30.7400019Z - CARGO_HOME +2026-06-21T01:29:30.7400521Z - CARGO_INCREMENTAL +2026-06-21T01:29:30.7401020Z - CARGO_TERM_COLOR +2026-06-21T01:29:30.7401491Z - RUST_BACKTRACE +2026-06-21T01:29:30.7402018Z .. Lockfiles considered: +2026-06-21T01:29:30.7402869Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/.cargo/config.toml +2026-06-21T01:29:30.7404419Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/Cargo.toml +2026-06-21T01:29:30.7405436Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/common/Cargo.toml +2026-06-21T01:29:30.7406220Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/contracts/core/Cargo.toml +2026-06-21T01:29:30.7406906Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/Cargo.toml +2026-06-21T01:29:30.7407531Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/rust-toolchain.toml +2026-06-21T01:29:30.7408156Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/token-bridge/Cargo.toml +2026-06-21T01:29:30.7408930Z ##[endgroup] +2026-06-21T01:29:30.7409078Z +2026-06-21T01:29:30.7409189Z ... Restoring cache ... +2026-06-21T01:29:30.9790362Z Cache hit for: v0-rust-test-Linux-x64-1f47b3b1-8243978e +2026-06-21T01:29:32.2966204Z Received 0 of 277338844 (0.0%), 0.0 MBs/sec +2026-06-21T01:29:33.2988982Z Received 100663296 of 277338844 (36.3%), 47.9 MBs/sec +2026-06-21T01:29:34.2994232Z Received 234881024 of 277338844 (84.7%), 74.6 MBs/sec +2026-06-21T01:29:34.7155770Z Received 277338844 of 277338844 (100.0%), 77.3 MBs/sec +2026-06-21T01:29:34.7156566Z Cache Size: ~264 MB (277338844 B) +2026-06-21T01:29:34.7197523Z [command]/usr/bin/tar -xf /home/runner/work/_temp/e15c496c-af51-4336-99b2-ef60cc1c2b6f/cache.tzst -P -C /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts --use-compress-program unzstd +2026-06-21T01:29:36.3287825Z Cache restored successfully +2026-06-21T01:29:36.3414837Z Restored from cache key "v0-rust-test-Linux-x64-1f47b3b1-8243978e" full match: true. diff --git a/.ci_logs2/Tests (host target)/5_cargo test (contracts).txt b/.ci_logs2/Tests (host target)/5_cargo test (contracts).txt new file mode 100644 index 0000000..5616b8a --- /dev/null +++ b/.ci_logs2/Tests (host target)/5_cargo test (contracts).txt @@ -0,0 +1,384 @@ +2026-06-21T01:29:36.3583268Z ##[group]Run cargo test -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:36.3586860Z cargo test -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:36.3622296Z shell: /usr/bin/bash -e {0} +2026-06-21T01:29:36.3622581Z env: +2026-06-21T01:29:36.3622794Z CARGO_TERM_COLOR: always +2026-06-21T01:29:36.3623040Z RUST_BACKTRACE: short +2026-06-21T01:29:36.3623524Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:36.3624407Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:29:36.3624677Z CARGO_INCREMENTAL: 0 +2026-06-21T01:29:36.3624904Z CACHE_ON_FAILURE: true +2026-06-21T01:29:36.3625129Z ##[endgroup] +2026-06-21T01:29:36.5104236Z  Updating crates.io index +2026-06-21T01:29:36.8168134Z  Locking 212 packages to latest compatible versions +2026-06-21T01:29:36.8206931Z  Adding arbitrary v1.3.2 (available: v1.4.2) +2026-06-21T01:29:36.8296695Z  Adding crypto-common v0.1.6 (available: v0.1.7) +2026-06-21T01:29:36.8357098Z  Adding derive_arbitrary v1.3.2 (available: v1.4.2) +2026-06-21T01:29:36.8628423Z  Adding rand v0.8.6 (available: v0.10.1) +2026-06-21T01:29:36.8724258Z  Adding sha2 v0.10.9 (available: v0.11.0) +2026-06-21T01:29:36.9051788Z  Adding toml v0.8.23 (available: v1.1.2+spec-1.1.0) +2026-06-21T01:29:37.6315692Z  Compiling zeroize v1.9.0 +2026-06-21T01:29:37.6367055Z  Compiling crypto-common v0.1.6 +2026-06-21T01:29:39.1946844Z  Compiling digest v0.10.7 +2026-06-21T01:29:39.4300680Z  Compiling sha2 v0.10.9 +2026-06-21T01:29:39.6114313Z  Compiling generic-array v0.14.9 +2026-06-21T01:29:39.6525097Z  Compiling der v0.7.10 +2026-06-21T01:29:39.9610572Z  Compiling stellar-xdr v26.0.1 +2026-06-21T01:29:40.1619528Z  Compiling block-buffer v0.10.4 +2026-06-21T01:29:40.1864136Z  Compiling crypto-bigint v0.5.5 +2026-06-21T01:29:40.5574583Z  Compiling ark-serialize v0.5.0 +2026-06-21T01:29:40.7425871Z  Compiling signature v2.2.0 +2026-06-21T01:29:40.8245385Z  Compiling sec1 v0.7.3 +2026-06-21T01:29:40.8655231Z  Compiling ark-ff v0.5.0 +2026-06-21T01:29:41.0595359Z  Compiling hmac v0.12.1 +2026-06-21T01:29:41.1375313Z  Compiling rfc6979 v0.4.0 +2026-06-21T01:29:41.2003592Z  Compiling ed25519 v2.2.3 +2026-06-21T01:29:41.3585813Z  Compiling elliptic-curve v0.13.8 +2026-06-21T01:29:41.6366293Z  Compiling ecdsa v0.16.9 +2026-06-21T01:29:41.6576061Z  Compiling primeorder v0.13.6 +2026-06-21T01:29:42.0349004Z  Compiling curve25519-dalek v4.1.3 +2026-06-21T01:29:44.3125830Z  Compiling ed25519-dalek v2.2.0 +2026-06-21T01:29:44.5578629Z  Compiling p256 v0.13.2 +2026-06-21T01:29:44.9175263Z  Compiling k256 v0.13.4 +2026-06-21T01:29:45.6245954Z  Compiling sha3 v0.10.9 +2026-06-21T01:29:47.2025734Z  Compiling ark-poly v0.5.0 +2026-06-21T01:29:47.7508427Z  Compiling ark-ec v0.5.0 +2026-06-21T01:29:49.5295779Z  Compiling ark-bls12-381 v0.5.0 +2026-06-21T01:29:49.5645900Z  Compiling ark-bn254 v0.5.0 +2026-06-21T01:29:57.4261183Z  Compiling soroban-spec v26.1.0 +2026-06-21T01:29:57.8995537Z  Compiling soroban-spec-rust v26.1.0 +2026-06-21T01:29:58.2025426Z  Compiling soroban-env-macros v26.1.3 +2026-06-21T01:30:00.5705384Z  Compiling soroban-env-common v26.1.3 +2026-06-21T01:30:01.7789607Z  Compiling soroban-sdk-macros v26.1.0 +2026-06-21T01:30:06.6338887Z  Compiling soroban-env-host v26.1.3 +2026-06-21T01:30:12.1422356Z  Compiling soroban-ledger-snapshot v26.1.0 +2026-06-21T01:30:12.3115566Z  Compiling soroban-sdk v26.1.0 +2026-06-21T01:30:17.6163670Z  Compiling orbitchain-common v0.1.0 (/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/common) +2026-06-21T01:30:17.6165822Z  Compiling orbitchain-core v0.1.0 (/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/contracts/core) +2026-06-21T01:30:18.2995755Z  Compiling orbitchain-token-bridge v0.1.0 (/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/token-bridge) +2026-06-21T01:30:18.3054770Z  Compiling orbitchain-campaign v0.1.0 (/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign) +2026-06-21T01:30:18.6467135Z warning: unused import: `Address` +2026-06-21T01:30:18.6469254Z --> campaign/src/contract.rs:6:37 +2026-06-21T01:30:18.6470126Z | +2026-06-21T01:30:18.6477658Z 6 | use soroban_sdk::{panic_with_error, Address, Env}; +2026-06-21T01:30:18.6479045Z | ^^^^^^^ +2026-06-21T01:30:18.6479831Z | +2026-06-21T01:30:18.6480753Z = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default +2026-06-21T01:30:18.6481537Z +2026-06-21T01:30:18.8570575Z warning: unused import: `core::ops::Add` +2026-06-21T01:30:18.8604755Z --> campaign/src/test/claim_refund_tests.rs:8:5 +2026-06-21T01:30:18.8634363Z | +2026-06-21T01:30:18.8665266Z 8 | use core::ops::Add; +2026-06-21T01:30:18.8684809Z | ^^^^^^^^^^^^^^ +2026-06-21T01:30:18.8714580Z +2026-06-21T01:30:18.8744968Z warning: unused import: `log` +2026-06-21T01:30:18.8774925Z --> campaign/src/test/claim_refund_tests.rs:12:19 +2026-06-21T01:30:18.8804653Z | +2026-06-21T01:30:18.8814893Z 12 | use soroban_sdk::{log, vec, Address, Env, Vec}; +2026-06-21T01:30:18.8834743Z | ^^^ +2026-06-21T01:30:18.8844527Z +2026-06-21T01:30:18.8874985Z warning: unused import: `BytesN` +2026-06-21T01:30:18.8894869Z --> campaign/src/test/get_campaign_status_tests.rs:8:28 +2026-06-21T01:30:18.8924676Z | +2026-06-21T01:30:18.8935349Z 8 | use soroban_sdk::{Address, BytesN, Env, String, Vec}; +2026-06-21T01:30:18.8976396Z | ^^^^^^ +2026-06-21T01:30:18.8984162Z +2026-06-21T01:30:18.9015299Z warning: unused imports: `MilestoneData` and `MilestoneStatus` +2026-06-21T01:30:18.9034902Z --> campaign/src/test/get_campaign_status_tests.rs:12:50 +2026-06-21T01:30:18.9044413Z | +2026-06-21T01:30:18.9075304Z 12 | use crate::types::{CampaignData, CampaignStatus, MilestoneData, MilestoneStatus, StellarAsset}; +2026-06-21T01:30:18.9095051Z | ^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ +2026-06-21T01:30:18.9124230Z +2026-06-21T01:30:18.9134783Z warning: unused imports: `CampaignData` and `DonorRecord` +2026-06-21T01:30:18.9154937Z --> campaign/src/test/integration_tests.rs:13:16 +2026-06-21T01:30:18.9184591Z | +2026-06-21T01:30:18.9195060Z 13 | AssetInfo, CampaignData, CampaignStatus, DonorRecord, MilestoneData, MilestoneStatus, +2026-06-21T01:30:18.9225053Z | ^^^^^^^^^^^^ ^^^^^^^^^^^ +2026-06-21T01:30:18.9244297Z +2026-06-21T01:30:18.9274928Z warning: unused imports: `CampaignData`, `DataKey`, and `Error` +2026-06-21T01:30:18.9294657Z --> campaign/src/test/negative_path_tests.rs:12:5 +2026-06-21T01:30:18.9324545Z | +2026-06-21T01:30:18.9335169Z 12 | CampaignData, CampaignStatus, DonorRecord, AssetInfo, StellarAsset, MilestoneData, +2026-06-21T01:30:18.9354515Z | ^^^^^^^^^^^^ +2026-06-21T01:30:18.9384640Z 13 | MilestoneStatus, Error, DataKey, +2026-06-21T01:30:18.9394743Z | ^^^^^ ^^^^^^^ +2026-06-21T01:30:18.9424236Z +2026-06-21T01:30:20.5275336Z warning: unused variable: `creator` +2026-06-21T01:30:20.5294872Z --> campaign/src/test/negative_path_tests.rs:325:14 +2026-06-21T01:30:20.5295637Z | +2026-06-21T01:30:20.5296398Z 325 | let (creator, _) = initialize_default_campaign(&env); +2026-06-21T01:30:20.5297756Z | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_creator` +2026-06-21T01:30:20.5298803Z | +2026-06-21T01:30:20.5299617Z = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default +2026-06-21T01:30:20.5300297Z +2026-06-21T01:30:20.5495183Z warning: unused variable: `env` +2026-06-21T01:30:20.5524910Z --> campaign/src/test/negative_path_tests.rs:888:9 +2026-06-21T01:30:20.5554657Z | +2026-06-21T01:30:20.5584736Z 888 | let env = make_env(); +2026-06-21T01:30:20.5615076Z | ^^^ help: if this is intentional, prefix it with an underscore: `_env` +2026-06-21T01:30:20.5644210Z +2026-06-21T01:30:20.5664450Z warning: unused variable: `creator` +2026-06-21T01:30:20.5665408Z --> campaign/src/test/negative_path_tests.rs:922:14 +2026-06-21T01:30:20.5675006Z | +2026-06-21T01:30:20.5676033Z 922 | let (creator, _) = initialize_default_campaign(&env); +2026-06-21T01:30:20.5677600Z | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_creator` +2026-06-21T01:30:20.5678567Z +2026-06-21T01:30:20.7359958Z warning: unused return value of `get_all_milestones::get_all_milestones_view` that must be used +2026-06-21T01:30:20.7361512Z --> campaign/src/get_all_milestones.rs:130:13 +2026-06-21T01:30:20.7362225Z | +2026-06-21T01:30:20.7362914Z 130 | get_all_milestones_view(&env); +2026-06-21T01:30:20.7364161Z | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +2026-06-21T01:30:20.7364800Z | +2026-06-21T01:30:20.7365511Z = note: `#[warn(unused_must_use)]` (part of `#[warn(unused)]`) on by default +2026-06-21T01:30:20.7366393Z help: use `let _ = ...` to ignore the resulting value +2026-06-21T01:30:20.7367002Z | +2026-06-21T01:30:20.7367595Z 130 |  let _ = get_all_milestones_view(&env); +2026-06-21T01:30:20.7368268Z | +++++++ +2026-06-21T01:30:20.7368591Z +2026-06-21T01:30:20.7369236Z warning: unused return value of `get_milestone::get_milestone_view` that must be used +2026-06-21T01:30:20.7370128Z --> campaign/src/get_milestone.rs:148:13 +2026-06-21T01:30:20.7370656Z | +2026-06-21T01:30:20.7371170Z 148 | get_milestone_view(&env, 1); +2026-06-21T01:30:20.7371866Z | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +2026-06-21T01:30:20.7372387Z | +2026-06-21T01:30:20.7372888Z help: use `let _ = ...` to ignore the resulting value +2026-06-21T01:30:20.7373462Z | +2026-06-21T01:30:20.7374230Z 148 |  let _ = get_milestone_view(&env, 1); +2026-06-21T01:30:20.7375441Z | +++++++ +2026-06-21T01:30:20.7375739Z +2026-06-21T01:30:20.7376389Z warning: unused return value of `get_milestone::get_milestone_view` that must be used +2026-06-21T01:30:20.7377294Z --> campaign/src/get_milestone.rs:159:13 +2026-06-21T01:30:20.7377800Z | +2026-06-21T01:30:20.7378331Z 159 | get_milestone_view(&env, 99); +2026-06-21T01:30:20.7379019Z | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +2026-06-21T01:30:20.7379535Z | +2026-06-21T01:30:20.7380047Z help: use `let _ = ...` to ignore the resulting value +2026-06-21T01:30:20.7380604Z | +2026-06-21T01:30:20.7381195Z 159 |  let _ = get_milestone_view(&env, 99); +2026-06-21T01:30:20.7381879Z | +++++++ +2026-06-21T01:30:20.7382195Z +2026-06-21T01:30:20.7382846Z warning: unused return value of `get_milestone::get_milestone_view` that must be used +2026-06-21T01:30:20.7383735Z --> campaign/src/get_milestone.rs:168:13 +2026-06-21T01:30:20.7384536Z | +2026-06-21T01:30:20.7385073Z 168 | get_milestone_view(&env, 0); +2026-06-21T01:30:20.7385770Z | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +2026-06-21T01:30:20.7386302Z | +2026-06-21T01:30:20.7386792Z help: use `let _ = ...` to ignore the resulting value +2026-06-21T01:30:20.7387361Z | +2026-06-21T01:30:20.7387934Z 168 |  let _ = get_milestone_view(&env, 0); +2026-06-21T01:30:20.7388632Z | +++++++ +2026-06-21T01:30:20.7388932Z +2026-06-21T01:30:20.7463587Z warning: hiding a lifetime that's elided elsewhere is confusing +2026-06-21T01:30:20.7464846Z --> campaign/src/test/claim_refund_tests.rs:336:25 +2026-06-21T01:30:20.7465438Z | +2026-06-21T01:30:20.7466238Z 336 | fn token_asset<'a>(env: &Env) -> (StellarAssetClient<'a>, Address, TokenClient) { +2026-06-21T01:30:20.7467661Z | ^^^^ the lifetime is elided here ^^^^^^^^^^^ the same lifetime is hidden here +2026-06-21T01:30:20.7468593Z | +2026-06-21T01:30:20.7469428Z = help: the same lifetime is referred to in inconsistent ways, making the signature confusing +2026-06-21T01:30:20.7470479Z = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default +2026-06-21T01:30:20.7471150Z help: use `'_` for type paths +2026-06-21T01:30:20.7471624Z | +2026-06-21T01:30:20.7472482Z 336 | fn token_asset<'a>(env: &Env) -> (StellarAssetClient<'a>, Address, TokenClient<'_>) { +2026-06-21T01:30:20.7473613Z | ++++ +2026-06-21T01:30:20.7474276Z +2026-06-21T01:30:21.0259735Z warning: `orbitchain-campaign` (lib) generated 1 warning (run `cargo fix --lib -p orbitchain-campaign` to apply 1 suggestion) +2026-06-21T01:30:22.7603208Z warning: `orbitchain-campaign` (lib test) generated 15 warnings (1 duplicate) (run `cargo fix --lib -p orbitchain-campaign --tests` to apply 10 suggestions) +2026-06-21T01:30:22.7604741Z  Finished `test` profile [unoptimized + debuginfo] target(s) in 46.36s +2026-06-21T01:30:22.7992983Z  Running unittests src/lib.rs (target/debug/deps/orbitchain_campaign-b15e2173e8c5098e) +2026-06-21T01:30:22.8012413Z +2026-06-21T01:30:22.8012765Z running 142 tests +2026-06-21T01:30:22.8094754Z test get_all_milestones::tests::returns_all_milestones_when_empty ... ok +2026-06-21T01:30:22.8144570Z test get_all_milestones::tests::returns_all_milestones_for_single ... ok +2026-06-21T01:30:22.8201713Z test get_milestone::tests::enriched_carries_pending_release_and_is_next_pending ... ok +2026-06-21T01:30:22.8203170Z test get_all_milestones::tests::returns_all_milestones_for_multiple ... ok +2026-06-21T01:30:22.8234855Z test get_milestone::tests::enriched_is_fully_released_when_milestone_is_released ... ok +2026-06-21T01:30:22.8293582Z test get_milestone::tests::enriched_locked_milestone_is_not_marked_next_pending ... ok +2026-06-21T01:30:22.8577309Z test get_all_milestones::tests::panics_when_not_initialised - should panic ... ok +2026-06-21T01:30:22.8594917Z test get_milestone::tests::panics_when_contract_not_initialised - should panic ... ok +2026-06-21T01:30:22.8654610Z test get_milestone::tests::panics_on_index_equal_to_milestone_count - should panic ... ok +2026-06-21T01:30:22.8674933Z test multi_asset_release::tests::proportional_release_dust_below_minimum ... ok +2026-06-21T01:30:22.8704632Z test multi_asset_release::tests::proportional_release_equal_split ... ok +2026-06-21T01:30:22.8734663Z test get_milestone::tests::panics_on_index_far_exceeding_milestone_count - should panic ... ok +2026-06-21T01:30:22.8747111Z test multi_asset_release::tests::proportional_release_full_amount ... ok +2026-06-21T01:30:22.8748380Z test multi_asset_release::tests::proportional_release_negative_asset_raised ... ok +2026-06-21T01:30:22.8750268Z test multi_asset_release::tests::proportional_release_rounds_down ... ok +2026-06-21T01:30:22.8751523Z test multi_asset_release::tests::proportional_release_unequal_split ... ok +2026-06-21T01:30:22.8764644Z test multi_asset_release::tests::proportional_release_zero_asset_raised ... ok +2026-06-21T01:30:22.8794295Z test multi_asset_release::tests::proportional_release_zero_total_raised ... ok +2026-06-21T01:30:22.8823328Z test get_milestone::tests::returns_raw_data_for_index_zero ... ok +2026-06-21T01:30:22.8824781Z test get_milestone::tests::returns_correct_milestone_for_non_zero_index ... ok +2026-06-21T01:30:22.8826294Z test test::claim_refund_tests::test_claim_refund_active_campaign - should panic ... ok +2026-06-21T01:30:22.8832005Z test test::claim_refund_tests::test_claim_refund_already_claimed - should panic ... ok +2026-06-21T01:30:22.8884818Z test test::claim_refund_tests::test_claim_refund_ended_no_milestones_eligibility ... ok +2026-06-21T01:30:22.9034798Z test test::claim_refund_tests::test_claim_refund_ended_with_milestone_released - should panic ... ok +2026-06-21T01:30:22.9197578Z test test::claim_refund_tests::test_claim_refund_ended_with_released_milestone_eligibility ... ok +2026-06-21T01:30:22.9304698Z test test::claim_refund_tests::test_claim_refund_exactly_at_window_boundary ... ok +2026-06-21T01:30:22.9394795Z test test::claim_refund_tests::test_claim_refund_goal_reached_campaign - should panic ... ok +2026-06-21T01:30:22.9395947Z test test::claim_refund_tests::test_claim_refund_ended_donor_1 ... ok +2026-06-21T01:30:22.9483302Z test test::claim_refund_tests::test_claim_refund_no_donor_eligibility ... ok +2026-06-21T01:30:22.9488781Z test test::claim_refund_tests::test_claim_refund_ended_full_refund ... ok +2026-06-21T01:30:22.9495322Z test test::claim_refund_tests::test_claim_refund_no_donor_record - should panic ... ok +2026-06-21T01:30:22.9496569Z test test::claim_refund_tests::test_claim_refund_not_initialized - should panic ... ok +2026-06-21T01:30:22.9550431Z test test::claim_refund_tests::test_claim_refund_one_second_past_window ... ok +2026-06-21T01:30:22.9594936Z test test::get_campaign_status_tests::calculates_days_remaining ... ok +2026-06-21T01:30:22.9634698Z test test::claim_refund_tests::test_claim_refund_window_closed - should panic ... ok +2026-06-21T01:30:22.9684618Z test test::get_campaign_status_tests::returns_active_status ... ok +2026-06-21T01:30:22.9689597Z test test::get_campaign_status_tests::returns_cancelled_status ... ok +2026-06-21T01:30:22.9715199Z test test::claim_refund_tests::test_claim_refund_ended_donor_100 ... ok +2026-06-21T01:30:22.9716708Z test test::integration_tests::test_analytics_defaults_before_initialize ... ok +2026-06-21T01:30:22.9718278Z test test::get_campaign_status_tests::returns_ended_status ... ok +2026-06-21T01:30:22.9794704Z test test::integration_tests::test_donate_uninitialized - should panic ... ok +2026-06-21T01:30:22.9824839Z test test::integration_tests::test_donate_below_minimum_panics_assert - should panic ... ok +2026-06-21T01:30:22.9884651Z test test::integration_tests::test_get_donor_record_non_donor ... ok +2026-06-21T01:30:22.9907452Z test test::integration_tests::test_get_total_raised_default ... ok +2026-06-21T01:30:22.9920367Z test test::integration_tests::test_hello ... ok +2026-06-21T01:30:22.9921497Z test test::integration_tests::test_extend_deadline_happy_path ... ok +2026-06-21T01:30:22.9955920Z test test::integration_tests::test_campaign_analytics_report_and_summary ... ok +2026-06-21T01:30:23.0030423Z test test::integration_tests::test_initialize_happy_path ... ok +2026-06-21T01:30:23.0031890Z test test::integration_tests::test_version ... ok +2026-06-21T01:30:23.0084604Z test test::integration_tests::test_donate_happy_path ... ok +2026-06-21T01:30:23.0179606Z test test::integration_tests::test_lifecycle_end_and_refund_eligibility ... ok +2026-06-21T01:30:23.0234872Z test test::invariant_tests::invariant_milestone_targets_strictly_ascending ... ok +2026-06-21T01:30:23.0289409Z test test::invariant_tests::invariant_last_milestone_target_equals_goal ... ok +2026-06-21T01:30:23.0413566Z test test::invariant_tests::invariant_raised_amount_never_exceeds_goal ... ok +2026-06-21T01:30:23.0414862Z test test::invariant_tests::invariant_no_released_milestones_while_active ... ok +2026-06-21T01:30:23.0449985Z test test::negative_path_tests::test_cancel_campaign_fails_not_initialized - should panic ... ok +2026-06-21T01:30:23.0533708Z test test::invariant_tests::invariant_total_donations_match_raised ... ok +2026-06-21T01:30:23.0545273Z test test::negative_path_tests::test_cancel_campaign_fails_already_cancelled - should panic ... ok +2026-06-21T01:30:23.0582834Z test test::integration_tests::test_lifecycle_multi_milestone_unlock ... ok +2026-06-21T01:30:23.0612061Z test test::negative_path_tests::test_cancel_campaign_frozen_panics - should panic ... ok +2026-06-21T01:30:23.0695042Z test test::negative_path_tests::test_cancel_then_refund_eligible ... ok +2026-06-21T01:30:23.0735023Z test test::negative_path_tests::test_cancel_campaign_not_frozen_succeeds ... ok +2026-06-21T01:30:23.0750146Z test test::negative_path_tests::test_claim_refund_eligible_cancelled ... ok +2026-06-21T01:30:23.0784836Z test test::negative_path_tests::test_claim_refund_fails_already_claimed - should panic ... ok +2026-06-21T01:30:23.0814754Z test test::negative_path_tests::test_claim_refund_fails_not_initialized - should panic ... ok +2026-06-21T01:30:23.0874932Z test test::negative_path_tests::test_claim_refund_fails_campaign_active - should panic ... ok +2026-06-21T01:30:23.0904848Z test test::negative_path_tests::test_claim_refund_fails_no_donor_record - should panic ... ok +2026-06-21T01:30:23.0934829Z test test::negative_path_tests::test_donate_fails_below_minimum - should panic ... ok +2026-06-21T01:30:23.0969783Z test test::negative_path_tests::test_donate_fails_campaign_cancelled - should panic ... ok +2026-06-21T01:30:23.0977771Z test test::negative_path_tests::test_donate_fails_not_initialized - should panic ... ok +2026-06-21T01:30:23.1044811Z test test::negative_path_tests::test_donate_fails_negative_amount - should panic ... ok +2026-06-21T01:30:23.1046247Z test test::negative_path_tests::test_donate_fails_campaign_ended - should panic ... ok +2026-06-21T01:30:23.1098853Z test test::negative_path_tests::test_donate_fails_zero_amount - should panic ... ok +2026-06-21T01:30:23.1154857Z test test::negative_path_tests::test_donate_fails_on_donation_count_overflow - should panic ... ok +2026-06-21T01:30:23.1184483Z test test::negative_path_tests::test_edge_case_no_donor_record ... ok +2026-06-21T01:30:23.1214729Z test test::negative_path_tests::test_edge_case_zero_donations ... ok +2026-06-21T01:30:23.1234805Z test test::negative_path_tests::test_end_campaign_fails_not_initialized - should panic ... ok +2026-06-21T01:30:23.1254886Z test test::negative_path_tests::test_end_campaign_fails_already_ended - should panic ... ok +2026-06-21T01:30:23.1276228Z test test::negative_path_tests::test_end_campaign_fails_cancelled - should panic ... ok +2026-06-21T01:30:23.1324730Z test test::negative_path_tests::test_end_campaign_frozen_panics - should panic ... ok +2026-06-21T01:30:23.1415117Z test test::negative_path_tests::test_extend_deadline_fails_absurd_future_time - should panic ... ok +2026-06-21T01:30:23.1425137Z test test::negative_path_tests::test_end_campaign_not_frozen_succeeds ... ok +2026-06-21T01:30:23.1455116Z test test::negative_path_tests::test_extend_deadline_fails_cancelled - should panic ... ok +2026-06-21T01:30:23.1465120Z test test::negative_path_tests::test_extend_deadline_fails_not_initialized - should panic ... ok +2026-06-21T01:30:23.1487305Z test test::negative_path_tests::test_end_then_refund_eligible ... ok +2026-06-21T01:30:23.1549415Z test test::negative_path_tests::test_extend_deadline_not_frozen_succeeds ... ok +2026-06-21T01:30:23.1564329Z test test::negative_path_tests::test_extend_deadline_fails_past_time - should panic ... ok +2026-06-21T01:30:23.1582061Z test test::negative_path_tests::test_extend_deadline_frozen_panics - should panic ... ok +2026-06-21T01:30:23.1586908Z test test::negative_path_tests::test_hello ... ok +2026-06-21T01:30:23.1601505Z test test::negative_path_tests::test_get_milestone_view_fails_not_initialized - should panic ... ok +2026-06-21T01:30:23.1674953Z test test::negative_path_tests::test_initialize_fails_empty_asset_code - should panic ... ok +2026-06-21T01:30:23.1704761Z test test::negative_path_tests::test_get_milestone_view_fails_out_of_bounds - should panic ... ok +2026-06-21T01:30:23.1729471Z test test::negative_path_tests::test_initialize_fails_empty_assets - should panic ... ok +2026-06-21T01:30:23.1760592Z test test::negative_path_tests::test_full_lifecycle_happy_path ... ok +2026-06-21T01:30:23.1780442Z test test::negative_path_tests::test_initialize_fails_milestone_last_target_not_equal_goal - should panic ... ok +2026-06-21T01:30:23.1782564Z test test::negative_path_tests::test_initialize_fails_already_initialized - should panic ... ok +2026-06-21T01:30:23.1783294Z test test::negative_path_tests::test_initialize_fails_milestone_targets_not_ascending - should panic ... ok +2026-06-21T01:30:23.1784319Z test test::negative_path_tests::test_initialize_fails_negative_goal - should panic ... ok +2026-06-21T01:30:23.1785254Z test test::negative_path_tests::test_initialize_fails_past_end_time - should panic ... ok +2026-06-21T01:30:23.1795065Z test test::negative_path_tests::test_initialize_fails_zero_goal - should panic ... ok +2026-06-21T01:30:23.1796133Z test test::negative_path_tests::test_initialize_fails_zero_milestones - should panic ... ok +2026-06-21T01:30:23.1797209Z test test::negative_path_tests::test_initialize_fails_too_many_milestones - should panic ... ok +2026-06-21T01:30:23.1815949Z test test::negative_path_tests::test_initialize_requires_auth - should panic ... ok +2026-06-21T01:30:23.1945075Z test test::negative_path_tests::test_is_refund_eligible_fails_active_campaign ... ok +2026-06-21T01:30:23.1948771Z test test::negative_path_tests::test_is_refund_eligible_fails_already_claimed ... ok +2026-06-21T01:30:23.1968029Z test test::negative_path_tests::test_is_refund_eligible_fails_goal_reached ... ok +2026-06-21T01:30:23.1970261Z test test::negative_path_tests::test_is_refund_eligible_fails_ended_with_released_milestones ... ok +2026-06-21T01:30:23.1992164Z test test::negative_path_tests::test_is_refund_eligible_fails_no_campaign ... ok +2026-06-21T01:30:23.2005074Z test test::negative_path_tests::test_is_refund_eligible_returns_false_no_campaign ... ok +2026-06-21T01:30:23.2074743Z test test::negative_path_tests::test_is_refund_eligible_fails_no_donor_record ... ok +2026-06-21T01:30:23.2154995Z test test::negative_path_tests::test_refund_window_edge_boundary ... ok +2026-06-21T01:30:23.2195017Z test test::negative_path_tests::test_is_refund_eligible_fails_window_closed ... ok +2026-06-21T01:30:23.2294757Z test test::negative_path_tests::test_refund_window_just_after_boundary ... ok +2026-06-21T01:30:23.2312270Z test test::negative_path_tests::test_reentrancy_lock_donate_twice_succeeds ... ok +2026-06-21T01:30:23.2325027Z test test::negative_path_tests::test_upgrade_succeeds_after_unfreeze ... ok +2026-06-21T01:30:23.2327341Z test test::negative_path_tests::test_version ... ok +2026-06-21T01:30:23.2341512Z test test::negative_path_tests::test_upgrade_fails_when_frozen - should panic ... ok +2026-06-21T01:30:23.2402140Z test test::negative_path_tests::test_upgrade_succeeds_when_not_frozen ... ok +2026-06-21T01:30:23.2408422Z test test::refund_eligibility_tests::test_refund_eligibility_all_conditions ... ok +2026-06-21T01:30:23.2472502Z test test::refund_eligibility_tests::test_refund_eligible_campaign_cancelled ... ok +2026-06-21T01:30:23.2504136Z test test::refund_eligibility_tests::test_refund_eligible_campaign_ended_no_milestone_released ... ok +2026-06-21T01:30:23.2513712Z test test::refund_eligibility_tests::test_refund_not_eligible_already_claimed ... ok +2026-06-21T01:30:23.2534839Z test test::refund_eligibility_tests::test_refund_not_eligible_campaign_active ... ok +2026-06-21T01:30:23.2594490Z test test::refund_eligibility_tests::test_refund_not_eligible_no_campaign ... ok +2026-06-21T01:30:23.2595526Z test test::refund_eligibility_tests::test_refund_not_eligible_no_donor_record ... ok +2026-06-21T01:30:23.2629603Z test test::refund_eligibility_tests::test_refund_not_eligible_campaign_goal_reached ... ok +2026-06-21T01:30:23.2630708Z test test::refund_eligibility_tests::test_refund_not_eligible_window_closed ... ok +2026-06-21T01:30:23.2714900Z test test::refund_eligibility_tests::test_refund_window_edge_case_exactly_30_days ... ok +2026-06-21T01:30:23.2744692Z test test::refund_eligibility_tests::test_refund_window_edge_case_one_second_after_30_days ... ok +2026-06-21T01:30:23.2894842Z test test::release_milestone_tests::test_frozen_contract_release_panics - should panic ... ok +2026-06-21T01:30:23.2954643Z test test::release_milestone_tests::test_double_release_panics - should panic ... ok +2026-06-21T01:30:23.2964782Z test test::release_milestone_tests::test_first_milestone_release_succeeds_regardless_of_previous ... ok +2026-06-21T01:30:23.3004892Z test test::release_milestone_tests::test_final_milestone_releases_remaining_balance ... ok +2026-06-21T01:30:23.3053168Z test test::release_milestone_tests::test_locked_milestone_release_panics - should panic ... ok +2026-06-21T01:30:23.3136294Z test test::release_milestone_tests::test_non_creator_release_panics - should panic ... ok +2026-06-21T01:30:23.3168074Z test test::release_milestone_tests::test_release_non_existent_milestone_panics - should panic ... ok +2026-06-21T01:30:23.3405373Z test test::release_milestone_tests::test_release_with_single_asset_transfers_correct_amount ... ok +2026-06-21T01:30:23.3435102Z test test::release_milestone_tests::test_skipping_milestone_release_panics - should panic ... ok +2026-06-21T01:30:23.3675099Z test test::release_milestone_tests::test_valid_release_sets_released_amount ... ok +2026-06-21T01:30:23.3695048Z test test::release_milestone_tests::test_valid_release_updates_milestone_status ... ok +2026-06-21T01:30:23.3696536Z test test::release_milestone_tests::test_sequential_milestone_release_succeeds ... ok +2026-06-21T01:30:23.3717854Z test test::release_milestone_tests::test_release_with_multiple_assets_only_debits_first_asset ... ok +2026-06-21T01:30:23.3718297Z +2026-06-21T01:30:23.3718559Z test result: ok. 142 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.57s +2026-06-21T01:30:23.3718925Z +2026-06-21T01:30:23.3753102Z  Running unittests src/lib.rs (target/debug/deps/orbitchain_common-a7e91c53777a8f47) +2026-06-21T01:30:23.3773599Z +2026-06-21T01:30:23.3773999Z running 0 tests +2026-06-21T01:30:23.3774258Z +2026-06-21T01:30:23.3775123Z test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s +2026-06-21T01:30:23.3775645Z +2026-06-21T01:30:23.3777121Z  Running unittests src/lib.rs (target/debug/deps/orbitchain_core-64120678b644eb93) +2026-06-21T01:30:23.3800163Z +2026-06-21T01:30:23.3800329Z running 14 tests +2026-06-21T01:30:23.3874772Z test tests::test_dashboard_metrics_empty_contract ... ok +2026-06-21T01:30:23.3983185Z test tests::test_campaign_report_progress_clamped ... ok +2026-06-21T01:30:23.3990589Z test tests::test_create_and_donate_with_metadata_and_tracking ... ok +2026-06-21T01:30:23.4144775Z test tests::test_count_total_transactions_split ... ok +2026-06-21T01:30:23.4146518Z test tests::test_get_campaign_report_accuracy ... ok +2026-06-21T01:30:23.4194361Z test tests::test_ping ... ok +2026-06-21T01:30:23.4234784Z test tests::test_initialize ... ok +2026-06-21T01:30:23.4235546Z test tests::test_get_dashboard_metrics ... ok +2026-06-21T01:30:23.4314692Z test tests::test_get_platform_summary ... ok +2026-06-21T01:30:23.4335753Z test tests::test_validate_recipient ... ok +2026-06-21T01:30:23.4442541Z test tests::test_total_tx_count ... ok +2026-06-21T01:30:23.4465173Z test tests::test_submit_transaction ... ok +2026-06-21T01:30:23.4517691Z test tests::test_withdraw_and_approve ... ok +2026-06-21T01:30:23.4832581Z test tests::test_prevent_double_withdrawal - should panic ... ok +2026-06-21T01:30:23.4833344Z +2026-06-21T01:30:23.4833830Z test result: ok. 14 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.10s +2026-06-21T01:30:23.4834703Z +2026-06-21T01:30:23.4865690Z  Running unittests src/lib.rs (target/debug/deps/orbitchain_token_bridge-e7a55db06a538a5c) +2026-06-21T01:30:23.4879161Z +2026-06-21T01:30:23.4879425Z running 0 tests +2026-06-21T01:30:23.4879670Z +2026-06-21T01:30:23.4880104Z test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s +2026-06-21T01:30:23.4880735Z +2026-06-21T01:30:23.4881641Z  Doc-tests orbitchain_campaign +2026-06-21T01:30:23.9780470Z +2026-06-21T01:30:23.9781010Z running 0 tests +2026-06-21T01:30:23.9781386Z +2026-06-21T01:30:23.9821060Z test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s +2026-06-21T01:30:23.9821496Z +2026-06-21T01:30:23.9863203Z  Doc-tests orbitchain_common +2026-06-21T01:30:24.0283020Z +2026-06-21T01:30:24.0283552Z running 0 tests +2026-06-21T01:30:24.0284075Z +2026-06-21T01:30:24.0284541Z test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s +2026-06-21T01:30:24.0285112Z +2026-06-21T01:30:24.0315480Z  Doc-tests orbitchain_token_bridge +2026-06-21T01:30:24.0663345Z +2026-06-21T01:30:24.0664048Z running 0 tests +2026-06-21T01:30:24.0664339Z +2026-06-21T01:30:24.0664678Z test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s +2026-06-21T01:30:24.0665047Z diff --git a/.ci_logs2/Tests (host target)/9_Post Cache cargo registry and target.txt b/.ci_logs2/Tests (host target)/9_Post Cache cargo registry and target.txt new file mode 100644 index 0000000..9e0ca52 --- /dev/null +++ b/.ci_logs2/Tests (host target)/9_Post Cache cargo registry and target.txt @@ -0,0 +1,4 @@ +2026-06-21T01:30:24.0929142Z Post job cleanup. +2026-06-21T01:30:24.3796493Z Cache up-to-date. +2026-06-21T01:30:24.3799267Z (node:3225) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead. +2026-06-21T01:30:24.3800000Z (Use `node --trace-deprecation ...` to show where the warning was created) diff --git a/.ci_logs2/Tests (host target)/system.txt b/.ci_logs2/Tests (host target)/system.txt new file mode 100644 index 0000000..2f8fdbe --- /dev/null +++ b/.ci_logs2/Tests (host target)/system.txt @@ -0,0 +1,8 @@ +2026-06-21T01:29:21.3050000Z Requested labels: ubuntu-latest +2026-06-21T01:29:21.3050000Z Job defined at: OrbitChainLabs/OrbitChain-Contracts/.github/workflows/ci.yml@refs/pull/60/merge +2026-06-21T01:29:21.3050000Z Waiting for a runner to pick up this job... +2026-06-21T01:29:21.3030000Z Evaluating test.if +2026-06-21T01:29:21.3030000Z Evaluating: success() +2026-06-21T01:29:21.3030000Z Result: true +2026-06-21T01:29:21.8030000Z Job is waiting for a hosted runner to come online. +2026-06-21T01:29:21.8040000Z Job is about to start running on the hosted runner: GitHub Actions 1000000149 \ No newline at end of file diff --git a/.ci_logs2/WASM compile check/10_Post Run actions_checkout@v4.txt b/.ci_logs2/WASM compile check/10_Post Run actions_checkout@v4.txt new file mode 100644 index 0000000..cd263a0 --- /dev/null +++ b/.ci_logs2/WASM compile check/10_Post Run actions_checkout@v4.txt @@ -0,0 +1,15 @@ +2026-06-21T01:30:06.0305218Z Node 20 is being deprecated. This workflow is running with Node 24 by default. If you need to temporarily use Node 20, you can set the ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true environment variable. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/ +2026-06-21T01:30:06.0306760Z Post job cleanup. +2026-06-21T01:30:06.1170276Z [command]/usr/bin/git version +2026-06-21T01:30:06.1209570Z git version 2.54.0 +2026-06-21T01:30:06.1244636Z Temporarily overriding HOME='/home/runner/work/_temp/734c3595-e843-4875-97af-a26dd5636539' before making global git config changes +2026-06-21T01:30:06.1245984Z Adding repository directory to the temporary git global config as a safe directory +2026-06-21T01:30:06.1250431Z [command]/usr/bin/git config --global --add safe.directory /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts +2026-06-21T01:30:06.1289740Z [command]/usr/bin/git config --local --name-only --get-regexp core\.sshCommand +2026-06-21T01:30:06.1325724Z [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || :" +2026-06-21T01:30:06.1567502Z [command]/usr/bin/git config --local --name-only --get-regexp http\.https\:\/\/github\.com\/\.extraheader +2026-06-21T01:30:06.1594765Z http.https://github.com/.extraheader +2026-06-21T01:30:06.1606982Z [command]/usr/bin/git config --local --unset-all http.https://github.com/.extraheader +2026-06-21T01:30:06.1644674Z [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http\.https\:\/\/github\.com\/\.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :" +2026-06-21T01:30:06.1884063Z [command]/usr/bin/git config --local --name-only --get-regexp ^includeIf\.gitdir: +2026-06-21T01:30:06.1919637Z [command]/usr/bin/git submodule foreach --recursive git config --local --show-origin --name-only --get-regexp remote.origin.url diff --git a/.ci_logs2/WASM compile check/11_Complete job.txt b/.ci_logs2/WASM compile check/11_Complete job.txt new file mode 100644 index 0000000..831761e --- /dev/null +++ b/.ci_logs2/WASM compile check/11_Complete job.txt @@ -0,0 +1,2 @@ +2026-06-21T01:30:06.2320891Z Cleaning up orphan processes +2026-06-21T01:30:06.2623341Z ##[warning]Node.js 20 is deprecated. The following actions target Node.js 20 but are being forced to run on Node.js 24: actions/checkout@v4. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/ diff --git a/.ci_logs2/WASM compile check/1_Set up job.txt b/.ci_logs2/WASM compile check/1_Set up job.txt new file mode 100644 index 0000000..c75e5a3 --- /dev/null +++ b/.ci_logs2/WASM compile check/1_Set up job.txt @@ -0,0 +1,32 @@ +2026-06-21T01:29:23.2605054Z Current runner version: '2.335.1' +2026-06-21T01:29:23.2640421Z ##[group]Runner Image Provisioner +2026-06-21T01:29:23.2641695Z Hosted Compute Agent +2026-06-21T01:29:23.2642714Z Version: 20260611.554 +2026-06-21T01:29:23.2643647Z Commit: 5e0782fdc9014723d3be820dd114dd31555c2bd1 +2026-06-21T01:29:23.2644842Z Build Date: 2026-06-11T21:40:46Z +2026-06-21T01:29:23.2646139Z Worker ID: {08a5a94d-d421-49d4-957f-b6196e4b1f44} +2026-06-21T01:29:23.2647390Z Azure Region: eastus +2026-06-21T01:29:23.2648296Z ##[endgroup] +2026-06-21T01:29:23.2650470Z ##[group]Operating System +2026-06-21T01:29:23.2651541Z Ubuntu +2026-06-21T01:29:23.2652322Z 24.04.4 +2026-06-21T01:29:23.2653130Z LTS +2026-06-21T01:29:23.2653986Z ##[endgroup] +2026-06-21T01:29:23.2654818Z ##[group]Runner Image +2026-06-21T01:29:23.2656006Z Image: ubuntu-24.04 +2026-06-21T01:29:23.2656863Z Version: 20260615.205.1 +2026-06-21T01:29:23.2658706Z Included Software: https://github.com/actions/runner-images/blob/ubuntu24/20260615.205/images/ubuntu/Ubuntu2404-Readme.md +2026-06-21T01:29:23.2661301Z Image Release: https://github.com/actions/runner-images/releases/tag/ubuntu24%2F20260615.205 +2026-06-21T01:29:23.2663051Z ##[endgroup] +2026-06-21T01:29:23.2664794Z ##[group]GITHUB_TOKEN Permissions +2026-06-21T01:29:23.2667571Z Contents: read +2026-06-21T01:29:23.2668455Z Metadata: read +2026-06-21T01:29:23.2669428Z ##[endgroup] +2026-06-21T01:29:23.2672337Z Secret source: Actions +2026-06-21T01:29:23.2673665Z Prepare workflow directory +2026-06-21T01:29:23.3207519Z Prepare all required actions +2026-06-21T01:29:23.3262532Z Getting action download info +2026-06-21T01:29:23.5586902Z Download action repository 'actions/checkout@v4' (SHA:34e114876b0b11c390a56381ad16ebd13914f8d5) +2026-06-21T01:29:23.6266195Z Download action repository 'dtolnay/rust-toolchain@stable' (SHA:29eef336d9b2848a0b548edc03f92a220660cdb8) +2026-06-21T01:29:23.7164941Z Download action repository 'Swatinem/rust-cache@v2' (SHA:e18b497796c12c097a38f9edb9d0641fb99eee32) +2026-06-21T01:29:24.0575775Z Complete job name: WASM compile check diff --git a/.ci_logs2/WASM compile check/2_Run actions_checkout@v4.txt b/.ci_logs2/WASM compile check/2_Run actions_checkout@v4.txt new file mode 100644 index 0000000..8e29ce8 --- /dev/null +++ b/.ci_logs2/WASM compile check/2_Run actions_checkout@v4.txt @@ -0,0 +1,93 @@ +2026-06-21T01:29:24.1280030Z Node 20 is being deprecated. This workflow is running with Node 24 by default. If you need to temporarily use Node 20, you can set the ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true environment variable. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/ +2026-06-21T01:29:24.1288809Z ##[group]Run actions/checkout@v4 +2026-06-21T01:29:24.1289513Z with: +2026-06-21T01:29:24.1290004Z repository: OrbitChainLabs/OrbitChain-Contracts +2026-06-21T01:29:24.1294491Z token: *** +2026-06-21T01:29:24.1294926Z ssh-strict: true +2026-06-21T01:29:24.1295370Z ssh-user: git +2026-06-21T01:29:24.1296032Z persist-credentials: true +2026-06-21T01:29:24.1296526Z clean: true +2026-06-21T01:29:24.1296968Z sparse-checkout-cone-mode: true +2026-06-21T01:29:24.1297485Z fetch-depth: 1 +2026-06-21T01:29:24.1297907Z fetch-tags: false +2026-06-21T01:29:24.1298340Z show-progress: true +2026-06-21T01:29:24.1298775Z lfs: false +2026-06-21T01:29:24.1299204Z submodules: false +2026-06-21T01:29:24.1299686Z set-safe-directory: true +2026-06-21T01:29:24.1300343Z env: +2026-06-21T01:29:24.1300755Z CARGO_TERM_COLOR: always +2026-06-21T01:29:24.1301235Z RUST_BACKTRACE: short +2026-06-21T01:29:24.1302065Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:24.1302968Z ##[endgroup] +2026-06-21T01:29:24.2340931Z Syncing repository: OrbitChainLabs/OrbitChain-Contracts +2026-06-21T01:29:24.2342833Z ##[group]Getting Git version info +2026-06-21T01:29:24.2343701Z Working directory is '/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts' +2026-06-21T01:29:24.2344878Z [command]/usr/bin/git version +2026-06-21T01:29:24.2391950Z git version 2.54.0 +2026-06-21T01:29:24.2445891Z ##[endgroup] +2026-06-21T01:29:24.2461384Z Temporarily overriding HOME='/home/runner/work/_temp/4baecb13-8970-45ed-9b1e-d0fa9beb298b' before making global git config changes +2026-06-21T01:29:24.2463849Z Adding repository directory to the temporary git global config as a safe directory +2026-06-21T01:29:24.2466964Z [command]/usr/bin/git config --global --add safe.directory /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts +2026-06-21T01:29:24.2516737Z Deleting the contents of '/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts' +2026-06-21T01:29:24.2521178Z ##[group]Initializing the repository +2026-06-21T01:29:24.2526696Z [command]/usr/bin/git init /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts +2026-06-21T01:29:24.2600408Z hint: Using 'master' as the name for the initial branch. This default branch name +2026-06-21T01:29:24.2602115Z hint: will change to "main" in Git 3.0. To configure the initial branch name +2026-06-21T01:29:24.2603651Z hint: to use in all of your new repositories, which will suppress this warning, +2026-06-21T01:29:24.2604860Z hint: call: +2026-06-21T01:29:24.2605736Z hint: +2026-06-21T01:29:24.2606579Z hint: git config --global init.defaultBranch +2026-06-21T01:29:24.2607624Z hint: +2026-06-21T01:29:24.2608587Z hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and +2026-06-21T01:29:24.2610061Z hint: 'development'. The just-created branch can be renamed via this command: +2026-06-21T01:29:24.2611234Z hint: +2026-06-21T01:29:24.2611894Z hint: git branch -m +2026-06-21T01:29:24.2612653Z hint: +2026-06-21T01:29:24.2613653Z hint: Disable this message with "git config set advice.defaultBranchName false" +2026-06-21T01:29:24.2621394Z Initialized empty Git repository in /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/.git/ +2026-06-21T01:29:24.2631943Z [command]/usr/bin/git remote add origin https://github.com/OrbitChainLabs/OrbitChain-Contracts +2026-06-21T01:29:24.2674249Z ##[endgroup] +2026-06-21T01:29:24.2675857Z ##[group]Disabling automatic garbage collection +2026-06-21T01:29:24.2677786Z [command]/usr/bin/git config --local gc.auto 0 +2026-06-21T01:29:24.2712816Z ##[endgroup] +2026-06-21T01:29:24.2714122Z ##[group]Setting up auth +2026-06-21T01:29:24.2719793Z [command]/usr/bin/git config --local --name-only --get-regexp core\.sshCommand +2026-06-21T01:29:24.2757463Z [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || :" +2026-06-21T01:29:24.3088614Z [command]/usr/bin/git config --local --name-only --get-regexp http\.https\:\/\/github\.com\/\.extraheader +2026-06-21T01:29:24.3122838Z [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http\.https\:\/\/github\.com\/\.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :" +2026-06-21T01:29:24.3380753Z [command]/usr/bin/git config --local --name-only --get-regexp ^includeIf\.gitdir: +2026-06-21T01:29:24.3416186Z [command]/usr/bin/git submodule foreach --recursive git config --local --show-origin --name-only --get-regexp remote.origin.url +2026-06-21T01:29:24.3667379Z [command]/usr/bin/git config --local http.https://github.com/.extraheader AUTHORIZATION: basic *** +2026-06-21T01:29:24.3703743Z ##[endgroup] +2026-06-21T01:29:24.3704567Z ##[group]Fetching the repository +2026-06-21T01:29:24.3714687Z [command]/usr/bin/git -c protocol.version=2 fetch --no-tags --prune --no-recurse-submodules --depth=1 origin +59f3fe99e87bd5e1e546c9babe13e09825b65536:refs/remotes/pull/60/merge +2026-06-21T01:29:24.5808135Z From https://github.com/OrbitChainLabs/OrbitChain-Contracts +2026-06-21T01:29:24.5809246Z * [new ref] 59f3fe99e87bd5e1e546c9babe13e09825b65536 -> pull/60/merge +2026-06-21T01:29:24.5839452Z ##[endgroup] +2026-06-21T01:29:24.5840321Z ##[group]Determining the checkout info +2026-06-21T01:29:24.5841805Z ##[endgroup] +2026-06-21T01:29:24.5847616Z [command]/usr/bin/git sparse-checkout disable +2026-06-21T01:29:24.5892296Z [command]/usr/bin/git config --local --unset-all extensions.worktreeConfig +2026-06-21T01:29:24.6012041Z ##[group]Checking out the ref +2026-06-21T01:29:24.6013548Z [command]/usr/bin/git checkout --progress --force refs/remotes/pull/60/merge +2026-06-21T01:29:24.6094290Z Note: switching to 'refs/remotes/pull/60/merge'. +2026-06-21T01:29:24.6095984Z +2026-06-21T01:29:24.6097326Z You are in 'detached HEAD' state. You can look around, make experimental +2026-06-21T01:29:24.6099469Z changes and commit them, and you can discard any commits you make in this +2026-06-21T01:29:24.6101381Z state without impacting any branches by switching back to a branch. +2026-06-21T01:29:24.6102454Z +2026-06-21T01:29:24.6103197Z If you want to create a new branch to retain commits you create, you may +2026-06-21T01:29:24.6104864Z do so (now or later) by using -c with the switch command. Example: +2026-06-21T01:29:24.6106092Z +2026-06-21T01:29:24.6106579Z git switch -c +2026-06-21T01:29:24.6107302Z +2026-06-21T01:29:24.6107776Z Or undo this operation with: +2026-06-21T01:29:24.6108419Z +2026-06-21T01:29:24.6108930Z git switch - +2026-06-21T01:29:24.6109453Z +2026-06-21T01:29:24.6110322Z Turn off this advice by setting config variable advice.detachedHead to false +2026-06-21T01:29:24.6111634Z +2026-06-21T01:29:24.6113179Z HEAD is now at 59f3fe9 Merge 9e85affabcadb1e696b876ca7eae8bad3de3c85d into dc3d5e2b821bb2a0f2655582265c562926415b02 +2026-06-21T01:29:24.6129778Z ##[endgroup] +2026-06-21T01:29:24.6174491Z [command]/usr/bin/git log -1 --format=%H +2026-06-21T01:29:24.6283042Z 59f3fe99e87bd5e1e546c9babe13e09825b65536 diff --git a/.ci_logs2/WASM compile check/3_Install Rust toolchain with wasm target.txt b/.ci_logs2/WASM compile check/3_Install Rust toolchain with wasm target.txt new file mode 100644 index 0000000..5857dfd --- /dev/null +++ b/.ci_logs2/WASM compile check/3_Install Rust toolchain with wasm target.txt @@ -0,0 +1,191 @@ +2026-06-21T01:29:24.6795031Z ##[warning]Unexpected input(s) 'cache', valid inputs are ['toolchain', 'targets', 'target', 'components'] +2026-06-21T01:29:24.6820815Z ##[group]Run dtolnay/rust-toolchain@stable +2026-06-21T01:29:24.6821938Z with: +2026-06-21T01:29:24.6822721Z targets: wasm32v1-none +2026-06-21T01:29:24.6823613Z cache: false +2026-06-21T01:29:24.6824425Z toolchain: stable +2026-06-21T01:29:24.6825260Z env: +2026-06-21T01:29:24.6826222Z CARGO_TERM_COLOR: always +2026-06-21T01:29:24.6827165Z RUST_BACKTRACE: short +2026-06-21T01:29:24.6828854Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:24.6830695Z ##[endgroup] +2026-06-21T01:29:24.6988058Z ##[group]Run : parse toolchain version +2026-06-21T01:29:24.6989270Z : parse toolchain version +2026-06-21T01:29:24.6990307Z if [[ -z $toolchain ]]; then +2026-06-21T01:29:24.6992164Z  # GitHub does not enforce `required: true` inputs itself. https://github.com/actions/runner/issues/1070 +2026-06-21T01:29:24.6994214Z  echo "'toolchain' is a required input" >&2 +2026-06-21T01:29:24.6995327Z  exit 1 +2026-06-21T01:29:24.6996918Z elif [[ $toolchain =~ ^stable' '[0-9]+' '(year|month|week|day)s?' 'ago$ ]]; then +2026-06-21T01:29:24.6998431Z  if [[ Linux == macOS ]]; then +2026-06-21T01:29:24.7000311Z  echo "toolchain=1.$((($(date -v-$(sed 's/stable \([0-9]*\) \(.\).*/\1\2/' <<< $toolchain) +%s)/60/60/24-16569)/7/6))" >> $GITHUB_OUTPUT +2026-06-21T01:29:24.7002176Z  else +2026-06-21T01:29:24.7003657Z  echo "toolchain=1.$((($(date --date "${toolchain#stable }" +%s)/60/60/24-16569)/7/6))" >> $GITHUB_OUTPUT +2026-06-21T01:29:24.7005348Z  fi +2026-06-21T01:29:24.7006607Z elif [[ $toolchain =~ ^stable' 'minus' '[0-9]+' 'releases?$ ]]; then +2026-06-21T01:29:24.7008544Z  echo "toolchain=1.$((($(date +%s)/60/60/24-16569)/7/6-${toolchain//[^0-9]/}))" >> $GITHUB_OUTPUT +2026-06-21T01:29:24.7010268Z elif [[ $toolchain =~ ^1\.[0-9]+$ ]]; then +2026-06-21T01:29:24.7012182Z  echo "toolchain=1.$((i=${toolchain#1.}, c=($(date +%s)/60/60/24-16569)/7/6, i+9*i*(10*i<=c)+90*i*(100*i<=c)))" >> $GITHUB_OUTPUT +2026-06-21T01:29:24.7013999Z else +2026-06-21T01:29:24.7014914Z  echo "toolchain=$toolchain" >> $GITHUB_OUTPUT +2026-06-21T01:29:24.7016145Z fi +2026-06-21T01:29:24.7153652Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:24.7154909Z env: +2026-06-21T01:29:24.7155959Z CARGO_TERM_COLOR: always +2026-06-21T01:29:24.7157150Z RUST_BACKTRACE: short +2026-06-21T01:29:24.7158771Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:24.7160565Z toolchain: stable +2026-06-21T01:29:24.7161345Z ##[endgroup] +2026-06-21T01:29:24.7353502Z ##[group]Run : construct rustup command line +2026-06-21T01:29:24.7354676Z : construct rustup command line +2026-06-21T01:29:24.7356518Z echo "targets=$(for t in ${targets//,/ }; do echo -n ' --target' $t; done)" >> $GITHUB_OUTPUT +2026-06-21T01:29:24.7358770Z echo "components=$(for c in ${components//,/ }; do echo -n ' --component' $c; done)" >> $GITHUB_OUTPUT +2026-06-21T01:29:24.7360533Z echo "downgrade=" >> $GITHUB_OUTPUT +2026-06-21T01:29:24.7395273Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:24.7396678Z env: +2026-06-21T01:29:24.7397367Z CARGO_TERM_COLOR: always +2026-06-21T01:29:24.7398211Z RUST_BACKTRACE: short +2026-06-21T01:29:24.7399763Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:24.7401513Z targets: wasm32v1-none +2026-06-21T01:29:24.7402325Z components: +2026-06-21T01:29:24.7403027Z ##[endgroup] +2026-06-21T01:29:24.7529606Z ##[group]Run : set $CARGO_HOME +2026-06-21T01:29:24.7530570Z : set $CARGO_HOME +2026-06-21T01:29:24.7531703Z echo CARGO_HOME=${CARGO_HOME:-"$HOME/.cargo"} >> $GITHUB_ENV +2026-06-21T01:29:24.7566373Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:24.7567542Z env: +2026-06-21T01:29:24.7568235Z CARGO_TERM_COLOR: always +2026-06-21T01:29:24.7569062Z RUST_BACKTRACE: short +2026-06-21T01:29:24.7570580Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:24.7572260Z ##[endgroup] +2026-06-21T01:29:24.7699558Z ##[group]Run : install rustup if needed +2026-06-21T01:29:24.7700662Z : install rustup if needed +2026-06-21T01:29:24.7701728Z if ! command -v rustup &>/dev/null; then +2026-06-21T01:29:24.7704241Z  curl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused --location --silent --show-error --fail https://sh.rustup.rs | sh -s -- --default-toolchain none -y +2026-06-21T01:29:24.7707092Z  echo "$CARGO_HOME/bin" >> $GITHUB_PATH +2026-06-21T01:29:24.7708122Z fi +2026-06-21T01:29:24.7742400Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:24.7743581Z env: +2026-06-21T01:29:24.7744285Z CARGO_TERM_COLOR: always +2026-06-21T01:29:24.7745122Z RUST_BACKTRACE: short +2026-06-21T01:29:24.7746835Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:24.7748563Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:29:24.7749449Z ##[endgroup] +2026-06-21T01:29:24.7879955Z ##[group]Run rustup toolchain install stable --target wasm32v1-none --profile minimal --no-self-update +2026-06-21T01:29:24.7882289Z rustup toolchain install stable --target wasm32v1-none --profile minimal --no-self-update +2026-06-21T01:29:24.7917540Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:24.7918693Z env: +2026-06-21T01:29:24.7919376Z CARGO_TERM_COLOR: always +2026-06-21T01:29:24.7920203Z RUST_BACKTRACE: short +2026-06-21T01:29:24.7921722Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:24.7923456Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:29:24.7924363Z RUSTUP_PERMIT_COPY_RENAME: 1 +2026-06-21T01:29:24.7925193Z ##[endgroup] +2026-06-21T01:29:24.9206387Z info: syncing channel updates for stable-x86_64-unknown-linux-gnu +2026-06-21T01:29:25.0194216Z info: latest update on 2026-05-28 for version 1.96.0 (ac68faa20 2026-05-25) +2026-06-21T01:29:25.0335997Z info: downloading component rust-std +2026-06-21T01:29:26.2712070Z +2026-06-21T01:29:26.2805416Z stable-x86_64-unknown-linux-gnu updated - rustc 1.96.0 (ac68faa20 2026-05-25) (from rustc 1.96.0 (ac68faa20 2026-05-25)) +2026-06-21T01:29:26.2806911Z +2026-06-21T01:29:26.2886698Z ##[group]Run rustup default stable +2026-06-21T01:29:26.2887103Z rustup default stable +2026-06-21T01:29:26.2922804Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:26.2923227Z env: +2026-06-21T01:29:26.2923487Z CARGO_TERM_COLOR: always +2026-06-21T01:29:26.2923783Z RUST_BACKTRACE: short +2026-06-21T01:29:26.2924313Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:26.2924899Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:29:26.2925214Z ##[endgroup] +2026-06-21T01:29:26.3043567Z info: using existing install for stable-x86_64-unknown-linux-gnu +2026-06-21T01:29:26.3048941Z info: default toolchain set to stable-x86_64-unknown-linux-gnu +2026-06-21T01:29:26.3049530Z +2026-06-21T01:29:26.3140984Z stable-x86_64-unknown-linux-gnu unchanged - rustc 1.96.0 (ac68faa20 2026-05-25) +2026-06-21T01:29:26.3141471Z +2026-06-21T01:29:26.3143019Z info: note that the toolchain 'stable-x86_64-unknown-linux-gnu' is currently in use (overridden by '/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/rust-toolchain.toml') +2026-06-21T01:29:26.3219119Z ##[group]Run : create cachekey +2026-06-21T01:29:26.3219509Z : create cachekey +2026-06-21T01:29:26.3220081Z DATE=$(rustc +stable --version --verbose | sed -ne 's/^commit-date: \(20[0-9][0-9]\)-\([01][0-9]\)-\([0-3][0-9]\)$/\1\2\3/p') +2026-06-21T01:29:26.3221042Z HASH=$(rustc +stable --version --verbose | sed -ne 's/^commit-hash: //p') +2026-06-21T01:29:26.3221619Z echo "cachekey=$(echo $DATE$HASH | head -c12)" >> $GITHUB_OUTPUT +2026-06-21T01:29:26.3257103Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:26.3257519Z env: +2026-06-21T01:29:26.3257783Z CARGO_TERM_COLOR: always +2026-06-21T01:29:26.3258071Z RUST_BACKTRACE: short +2026-06-21T01:29:26.3258580Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:26.3259145Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:29:26.3259491Z ##[endgroup] +2026-06-21T01:29:26.3704288Z ##[group]Run : disable incremental compilation +2026-06-21T01:29:26.3704776Z : disable incremental compilation +2026-06-21T01:29:26.3705176Z if [ -z "${CARGO_INCREMENTAL+set}" ]; then +2026-06-21T01:29:26.3706210Z  echo CARGO_INCREMENTAL=0 >> $GITHUB_ENV +2026-06-21T01:29:26.3706633Z fi +2026-06-21T01:29:26.3741389Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:26.3741812Z env: +2026-06-21T01:29:26.3742085Z CARGO_TERM_COLOR: always +2026-06-21T01:29:26.3742384Z RUST_BACKTRACE: short +2026-06-21T01:29:26.3742908Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:26.3743474Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:29:26.3743786Z ##[endgroup] +2026-06-21T01:29:26.3836234Z ##[group]Run : enable colors in Cargo output +2026-06-21T01:29:26.3836687Z : enable colors in Cargo output +2026-06-21T01:29:26.3837183Z if [ -z "${CARGO_TERM_COLOR+set}" ]; then +2026-06-21T01:29:26.3837623Z  echo CARGO_TERM_COLOR=always >> $GITHUB_ENV +2026-06-21T01:29:26.3837979Z fi +2026-06-21T01:29:26.3873377Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:26.3873808Z env: +2026-06-21T01:29:26.3874069Z CARGO_TERM_COLOR: always +2026-06-21T01:29:26.3874367Z RUST_BACKTRACE: short +2026-06-21T01:29:26.3874898Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:26.3875636Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:29:26.3875958Z CARGO_INCREMENTAL: 0 +2026-06-21T01:29:26.3876237Z ##[endgroup] +2026-06-21T01:29:26.3969436Z ##[group]Run : enable Cargo sparse registry +2026-06-21T01:29:26.3969873Z : enable Cargo sparse registry +2026-06-21T01:29:26.3970307Z # implemented in 1.66, stabilized in 1.68, made default in 1.70 +2026-06-21T01:29:26.3971274Z if [ -z "${CARGO_REGISTRIES_CRATES_IO_PROTOCOL+set}" -o -f "/home/runner/work/_temp"/.implicit_cargo_registries_crates_io_protocol ]; then +2026-06-21T01:29:26.3972104Z  if rustc +stable --version --verbose | grep -q '^release: 1\.6[89]\.'; then +2026-06-21T01:29:26.3972750Z  touch "/home/runner/work/_temp"/.implicit_cargo_registries_crates_io_protocol || true +2026-06-21T01:29:26.3973375Z  echo CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse >> $GITHUB_ENV +2026-06-21T01:29:26.3973938Z  elif rustc +stable --version --verbose | grep -q '^release: 1\.6[67]\.'; then +2026-06-21T01:29:26.3974561Z  touch "/home/runner/work/_temp"/.implicit_cargo_registries_crates_io_protocol || true +2026-06-21T01:29:26.3975141Z  echo CARGO_REGISTRIES_CRATES_IO_PROTOCOL=git >> $GITHUB_ENV +2026-06-21T01:29:26.3975736Z  fi +2026-06-21T01:29:26.3975991Z fi +2026-06-21T01:29:26.4010827Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:26.4011243Z env: +2026-06-21T01:29:26.4011529Z CARGO_TERM_COLOR: always +2026-06-21T01:29:26.4011915Z RUST_BACKTRACE: short +2026-06-21T01:29:26.4012440Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:26.4013009Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:29:26.4013512Z CARGO_INCREMENTAL: 0 +2026-06-21T01:29:26.4013790Z ##[endgroup] +2026-06-21T01:29:26.4418137Z ##[group]Run : work around spurious network errors in curl 8.0 +2026-06-21T01:29:26.4418712Z : work around spurious network errors in curl 8.0 +2026-06-21T01:29:26.4419504Z # https://rust-lang.zulipchat.com/#narrow/stream/246057-t-cargo/topic/timeout.20investigation +2026-06-21T01:29:26.4420203Z if rustc +stable --version --verbose | grep -q '^release: 1\.7[01]\.'; then +2026-06-21T01:29:26.4420737Z  echo CARGO_HTTP_MULTIPLEXING=false >> $GITHUB_ENV +2026-06-21T01:29:26.4421132Z fi +2026-06-21T01:29:26.4459187Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:26.4459621Z env: +2026-06-21T01:29:26.4459891Z CARGO_TERM_COLOR: always +2026-06-21T01:29:26.4460207Z RUST_BACKTRACE: short +2026-06-21T01:29:26.4460734Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:26.4461339Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:29:26.4461663Z CARGO_INCREMENTAL: 0 +2026-06-21T01:29:26.4461940Z ##[endgroup] +2026-06-21T01:29:26.4712629Z ##[group]Run rustc +stable --version --verbose +2026-06-21T01:29:26.4713108Z rustc +stable --version --verbose +2026-06-21T01:29:26.4750479Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} +2026-06-21T01:29:26.4750905Z env: +2026-06-21T01:29:26.4751172Z CARGO_TERM_COLOR: always +2026-06-21T01:29:26.4751475Z RUST_BACKTRACE: short +2026-06-21T01:29:26.4752007Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:26.4752587Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:29:26.4752904Z CARGO_INCREMENTAL: 0 +2026-06-21T01:29:26.4753186Z ##[endgroup] +2026-06-21T01:29:26.4952938Z rustc 1.96.0 (ac68faa20 2026-05-25) +2026-06-21T01:29:26.4953633Z binary: rustc +2026-06-21T01:29:26.4954165Z commit-hash: ac68faa20c58cbccd01ee7208bf3b6e93a7d7f96 +2026-06-21T01:29:26.4955200Z commit-date: 2026-05-25 +2026-06-21T01:29:26.4956006Z host: x86_64-unknown-linux-gnu +2026-06-21T01:29:26.4956463Z release: 1.96.0 +2026-06-21T01:29:26.4956859Z LLVM version: 22.1.2 diff --git a/.ci_logs2/WASM compile check/4_Cache cargo registry and target.txt b/.ci_logs2/WASM compile check/4_Cache cargo registry and target.txt new file mode 100644 index 0000000..cc2ce09 --- /dev/null +++ b/.ci_logs2/WASM compile check/4_Cache cargo registry and target.txt @@ -0,0 +1,66 @@ +2026-06-21T01:29:26.5121492Z ##[group]Run Swatinem/rust-cache@v2 +2026-06-21T01:29:26.5121872Z with: +2026-06-21T01:29:26.5122138Z cache-on-failure: true +2026-06-21T01:29:26.5122434Z prefix-key: v0-rust +2026-06-21T01:29:26.5122714Z add-job-id-key: true +2026-06-21T01:29:26.5123015Z add-rust-environment-hash-key: true +2026-06-21T01:29:26.5123347Z cache-targets: true +2026-06-21T01:29:26.5123837Z cache-all-crates: false +2026-06-21T01:29:26.5124138Z cache-workspace-crates: false +2026-06-21T01:29:26.5124439Z save-if: true +2026-06-21T01:29:26.5124703Z cache-provider: github +2026-06-21T01:29:26.5124984Z cache-bin: true +2026-06-21T01:29:26.5125246Z lookup-only: false +2026-06-21T01:29:26.5125753Z cmd-format: {0} +2026-06-21T01:29:26.5126009Z env: +2026-06-21T01:29:26.5126259Z CARGO_TERM_COLOR: always +2026-06-21T01:29:26.5126546Z RUST_BACKTRACE: short +2026-06-21T01:29:26.5127072Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:26.5127647Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:29:26.5128016Z CARGO_INCREMENTAL: 0 +2026-06-21T01:29:26.5128286Z ##[endgroup] +2026-06-21T01:29:26.8045967Z (node:2367) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead. +2026-06-21T01:29:26.8046793Z (Use `node --trace-deprecation ...` to show where the warning was created) +2026-06-21T01:29:29.2292240Z ##[group]Cache Configuration +2026-06-21T01:29:29.2292900Z Cache Provider: +2026-06-21T01:29:29.2293233Z github +2026-06-21T01:29:29.2293541Z Workspaces: +2026-06-21T01:29:29.2293961Z /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts +2026-06-21T01:29:29.2294515Z Cache Paths: +2026-06-21T01:29:29.2294839Z /home/runner/.cargo/bin +2026-06-21T01:29:29.2295233Z /home/runner/.cargo/.crates.toml +2026-06-21T01:29:29.2295886Z /home/runner/.cargo/.crates2.json +2026-06-21T01:29:29.2296296Z /home/runner/.cargo/registry +2026-06-21T01:29:29.2296692Z /home/runner/.cargo/git +2026-06-21T01:29:29.2297264Z /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/target +2026-06-21T01:29:29.2297859Z Restore Key: +2026-06-21T01:29:29.2298220Z v0-rust-wasm-check-Linux-x64-1f47b3b1 +2026-06-21T01:29:29.2298639Z Cache Key: +2026-06-21T01:29:29.2299019Z v0-rust-wasm-check-Linux-x64-1f47b3b1-8243978e +2026-06-21T01:29:29.2299499Z .. Prefix: +2026-06-21T01:29:29.2299850Z - v0-rust-wasm-check-Linux-x64 +2026-06-21T01:29:29.2300269Z .. Environment considered: +2026-06-21T01:29:29.2300629Z - Rust Versions: +2026-06-21T01:29:29.2301152Z - 1.96.0 x86_64-unknown-linux-gnu ac68faa20c58cbccd01ee7208bf3b6e93a7d7f96 +2026-06-21T01:29:29.2301936Z - 1.96.0 x86_64-unknown-linux-gnu ac68faa20c58cbccd01ee7208bf3b6e93a7d7f96 +2026-06-21T01:29:29.2302494Z - CARGO_HOME +2026-06-21T01:29:29.2302814Z - CARGO_INCREMENTAL +2026-06-21T01:29:29.2303155Z - CARGO_TERM_COLOR +2026-06-21T01:29:29.2303485Z - RUST_BACKTRACE +2026-06-21T01:29:29.2303824Z .. Lockfiles considered: +2026-06-21T01:29:29.2304421Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/.cargo/config.toml +2026-06-21T01:29:29.2305358Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign/Cargo.toml +2026-06-21T01:29:29.2306539Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/common/Cargo.toml +2026-06-21T01:29:29.2307517Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/contracts/core/Cargo.toml +2026-06-21T01:29:29.2308524Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/tools/Cargo.toml +2026-06-21T01:29:29.2309453Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/rust-toolchain.toml +2026-06-21T01:29:29.2310342Z - /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/token-bridge/Cargo.toml +2026-06-21T01:29:29.2310992Z ##[endgroup] +2026-06-21T01:29:29.2311117Z +2026-06-21T01:29:29.2311209Z ... Restoring cache ... +2026-06-21T01:29:29.2918506Z Cache hit for: v0-rust-wasm-check-Linux-x64-1f47b3b1-8243978e +2026-06-21T01:29:29.5607411Z Received 39797766 of 39797766 (100.0%), 172.5 MBs/sec +2026-06-21T01:29:29.5608642Z Cache Size: ~38 MB (39797766 B) +2026-06-21T01:29:29.5611400Z [command]/usr/bin/tar -xf /home/runner/work/_temp/66262c31-d013-4445-997a-dae26382e1c1/cache.tzst -P -C /home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts --use-compress-program unzstd +2026-06-21T01:29:29.7734760Z Cache restored successfully +2026-06-21T01:29:29.7758495Z Restored from cache key "v0-rust-wasm-check-Linux-x64-1f47b3b1-8243978e" full match: true. diff --git a/.ci_logs2/WASM compile check/5_cargo check --target wasm32v1-none (contracts).txt b/.ci_logs2/WASM compile check/5_cargo check --target wasm32v1-none (contracts).txt new file mode 100644 index 0000000..67caec5 --- /dev/null +++ b/.ci_logs2/WASM compile check/5_cargo check --target wasm32v1-none (contracts).txt @@ -0,0 +1,94 @@ +2026-06-21T01:29:29.7925356Z ##[group]Run cargo check -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge --target wasm32v1-none +2026-06-21T01:29:29.7926597Z cargo check -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge --target wasm32v1-none +2026-06-21T01:29:29.7961815Z shell: /usr/bin/bash -e {0} +2026-06-21T01:29:29.7962100Z env: +2026-06-21T01:29:29.7962319Z CARGO_TERM_COLOR: always +2026-06-21T01:29:29.7962568Z RUST_BACKTRACE: short +2026-06-21T01:29:29.7963049Z CONTRACTS: -p orbitchain-campaign -p orbitchain-common -p orbitchain-core -p orbitchain-token-bridge +2026-06-21T01:29:29.7963609Z CARGO_HOME: /home/runner/.cargo +2026-06-21T01:29:29.7963874Z CARGO_INCREMENTAL: 0 +2026-06-21T01:29:29.7964104Z CACHE_ON_FAILURE: true +2026-06-21T01:29:29.7964333Z ##[endgroup] +2026-06-21T01:29:30.0207625Z  Updating crates.io index +2026-06-21T01:29:31.0092343Z  Locking 212 packages to latest compatible versions +2026-06-21T01:29:31.0131706Z  Adding arbitrary v1.3.2 (available: v1.4.2) +2026-06-21T01:29:31.0226165Z  Adding crypto-common v0.1.6 (available: v0.1.7) +2026-06-21T01:29:31.0287194Z  Adding derive_arbitrary v1.3.2 (available: v1.4.2) +2026-06-21T01:29:31.0562507Z  Adding rand v0.8.6 (available: v0.10.1) +2026-06-21T01:29:31.0660215Z  Adding sha2 v0.10.9 (available: v0.11.0) +2026-06-21T01:29:31.0996182Z  Adding toml v0.8.23 (available: v1.1.2+spec-1.1.0) +2026-06-21T01:29:31.7779867Z  Compiling syn v2.0.118 +2026-06-21T01:29:31.7782898Z  Compiling serde_json v1.0.150 +2026-06-21T01:29:31.7825640Z  Compiling crypto-common v0.1.6 +2026-06-21T01:29:31.7827201Z  Compiling block-buffer v0.10.4 +2026-06-21T01:29:31.9867521Z  Compiling digest v0.10.7 +2026-06-21T01:29:31.9868295Z  Compiling cpufeatures v0.2.17 +2026-06-21T01:29:32.0281396Z  Compiling data-encoding v2.11.0 +2026-06-21T01:29:32.1290440Z  Compiling cfg-if v1.0.4 +2026-06-21T01:29:32.1600378Z  Compiling sha2 v0.10.9 +2026-06-21T01:29:32.6052233Z  Compiling ethnum v1.5.3 +2026-06-21T01:29:32.8987353Z  Compiling escape-bytes v0.1.1 +2026-06-21T01:29:32.9767286Z  Compiling num-traits v0.2.19 +2026-06-21T01:29:33.1183139Z  Compiling semver v1.0.28 +2026-06-21T01:29:33.3036729Z  Compiling either v1.16.0 +2026-06-21T01:29:33.4297051Z  Compiling hashbrown v0.17.1 +2026-06-21T01:29:33.4633256Z  Compiling itertools v0.13.0 +2026-06-21T01:29:33.9987065Z  Compiling equivalent v1.0.2 +2026-06-21T01:29:34.0396946Z  Compiling thiserror v1.0.69 +2026-06-21T01:29:34.1147444Z  Compiling indexmap v2.14.0 +2026-06-21T01:29:34.4027037Z  Compiling fnv v1.0.7 +2026-06-21T01:29:34.4447193Z  Compiling prettyplease v0.2.37 +2026-06-21T01:29:34.7208580Z  Compiling darling_core v0.23.0 +2026-06-21T01:29:34.8481496Z  Compiling wasmparser v0.116.1 +2026-06-21T01:29:34.9157789Z  Compiling darling_core v0.20.11 +2026-06-21T01:29:37.5347341Z  Compiling serde_derive v1.0.228 +2026-06-21T01:29:38.4267137Z  Compiling cfg_eval v0.1.2 +2026-06-21T01:29:38.6347618Z  Compiling darling_macro v0.23.0 +2026-06-21T01:29:38.7277012Z  Compiling thiserror-impl v1.0.69 +2026-06-21T01:29:38.9856993Z  Compiling darling v0.23.0 +2026-06-21T01:29:39.0216839Z  Compiling serde_with_macros v3.21.0 +2026-06-21T01:29:40.3956915Z  Compiling num-derive v0.4.2 +2026-06-21T01:29:40.5256712Z  Checking byteorder v1.5.0 +2026-06-21T01:29:40.6317162Z  Compiling base64 v0.22.1 +2026-06-21T01:29:40.9337310Z  Compiling heapless v0.8.0 +2026-06-21T01:29:41.2470918Z  Checking hash32 v0.3.1 +2026-06-21T01:29:41.3297093Z  Compiling darling_macro v0.20.11 +2026-06-21T01:29:41.7537184Z  Compiling serde v1.0.228 +2026-06-21T01:29:41.8067123Z  Compiling num-integer v0.1.46 +2026-06-21T01:29:41.8907174Z  Compiling rustc_version v0.4.1 +2026-06-21T01:29:42.1487642Z  Compiling static_assertions v1.1.0 +2026-06-21T01:29:42.2198003Z  Checking stable_deref_trait v1.2.1 +2026-06-21T01:29:42.2487080Z  Compiling crate-git-revision v0.0.6 +2026-06-21T01:29:42.3006616Z  Compiling schemars v0.8.22 +2026-06-21T01:29:42.4977436Z  Compiling stellar-strkey v0.0.13 +2026-06-21T01:29:42.6256960Z  Compiling stellar-xdr v26.0.1 +2026-06-21T01:29:42.7567055Z  Compiling hex v0.4.3 +2026-06-21T01:29:42.8047353Z  Compiling soroban-env-common v26.1.3 +2026-06-21T01:29:42.9886999Z  Compiling stellar-strkey v0.0.16 +2026-06-21T01:29:43.0606913Z  Compiling soroban-sdk v26.1.0 +2026-06-21T01:29:43.2137757Z  Compiling num-bigint v0.4.6 +2026-06-21T01:29:43.4657068Z  Compiling serde_with v3.21.0 +2026-06-21T01:29:44.1167914Z  Compiling darling v0.20.11 +2026-06-21T01:29:44.1547604Z  Compiling macro-string v0.1.4 +2026-06-21T01:29:44.6647072Z  Compiling heck v0.5.0 +2026-06-21T01:29:44.8527288Z  Compiling bytes-lit v0.0.5 +2026-06-21T01:29:45.0858623Z  Compiling visibility v0.1.1 +2026-06-21T01:29:59.0382515Z  Compiling soroban-spec v26.1.0 +2026-06-21T01:29:59.1517534Z  Compiling soroban-spec-rust v26.1.0 +2026-06-21T01:30:00.0382349Z  Compiling soroban-env-macros v26.1.3 +2026-06-21T01:30:02.3364014Z  Checking soroban-env-guest v26.1.3 +2026-06-21T01:30:02.5115754Z  Compiling soroban-sdk-macros v26.1.0 +2026-06-21T01:30:05.2015227Z  Checking orbitchain-common v0.1.0 (/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/common) +2026-06-21T01:30:05.2017188Z  Checking orbitchain-core v0.1.0 (/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/crates/contracts/core) +2026-06-21T01:30:05.2689040Z  Checking orbitchain-token-bridge v0.1.0 (/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/token-bridge) +2026-06-21T01:30:05.2690711Z  Checking orbitchain-campaign v0.1.0 (/home/runner/work/OrbitChain-Contracts/OrbitChain-Contracts/campaign) +2026-06-21T01:30:05.4062290Z warning: unused import: `Address` +2026-06-21T01:30:05.4063317Z --> campaign/src/contract.rs:6:37 +2026-06-21T01:30:05.4064255Z | +2026-06-21T01:30:05.4072799Z 6 | use soroban_sdk::{panic_with_error, Address, Env}; +2026-06-21T01:30:05.4073665Z | ^^^^^^^ +2026-06-21T01:30:05.4074261Z | +2026-06-21T01:30:05.4074913Z = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default +2026-06-21T01:30:05.4075427Z +2026-06-21T01:30:05.6666751Z warning: `orbitchain-campaign` (lib) generated 1 warning (run `cargo fix --lib -p orbitchain-campaign` to apply 1 suggestion) +2026-06-21T01:30:05.6667741Z  Finished `dev` profile [unoptimized + debuginfo] target(s) in 35.83s diff --git a/.ci_logs2/WASM compile check/9_Post Cache cargo registry and target.txt b/.ci_logs2/WASM compile check/9_Post Cache cargo registry and target.txt new file mode 100644 index 0000000..34ef984 --- /dev/null +++ b/.ci_logs2/WASM compile check/9_Post Cache cargo registry and target.txt @@ -0,0 +1,4 @@ +2026-06-21T01:30:05.7279764Z Post job cleanup. +2026-06-21T01:30:06.0118981Z Cache up-to-date. +2026-06-21T01:30:06.0121740Z (node:3491) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead. +2026-06-21T01:30:06.0122580Z (Use `node --trace-deprecation ...` to show where the warning was created) diff --git a/.ci_logs2/WASM compile check/system.txt b/.ci_logs2/WASM compile check/system.txt new file mode 100644 index 0000000..aad5885 --- /dev/null +++ b/.ci_logs2/WASM compile check/system.txt @@ -0,0 +1,8 @@ +2026-06-21T01:29:21.3050000Z Requested labels: ubuntu-latest +2026-06-21T01:29:21.3050000Z Job defined at: OrbitChainLabs/OrbitChain-Contracts/.github/workflows/ci.yml@refs/pull/60/merge +2026-06-21T01:29:21.3050000Z Waiting for a runner to pick up this job... +2026-06-21T01:29:21.3030000Z Evaluating wasm-check.if +2026-06-21T01:29:21.3030000Z Evaluating: success() +2026-06-21T01:29:21.3030000Z Result: true +2026-06-21T01:29:21.8030000Z Job is waiting for a hosted runner to come online. +2026-06-21T01:29:21.8030000Z Job is about to start running on the hosted runner: GitHub Actions 1000000148 \ No newline at end of file diff --git a/.ci_logs2/logs.zip b/.ci_logs2/logs.zip new file mode 100644 index 0000000..4ea91fc Binary files /dev/null and b/.ci_logs2/logs.zip differ diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..52064d8 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,110 @@ +name: CI + +# Lock the token down — this workflow only reads the repo. +permissions: + contents: read + +on: + push: + branches: [main] + pull_request: + branches: [main] + workflow_dispatch: + +concurrency: + # Cancel superseded PR runs but never cancel the push-to-main run + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + +env: + CARGO_TERM_COLOR: always + RUST_BACKTRACE: short + # Workspace members that compile to wasm32 Soroban contracts. crates/tools + # is intentionally excluded — it is a native CLI binary, not a contract, and + # has its own dev-tooling lint/test debt tracked separately. + CONTRACTS: >- + -p orbitchain-campaign + -p orbitchain-common + -p orbitchain-core + -p orbitchain-token-bridge + +jobs: + fmt: + name: Format check + runs-on: ubuntu-latest + timeout-minutes: 5 + steps: + - uses: actions/checkout@v4 + - name: Install Rust toolchain + # Honors rust-toolchain.toml (channel + targets + components) + uses: dtolnay/rust-toolchain@stable + with: + # No `cache: true` here — Swatinem/rust-cache handles caching below. + cache: false + - name: Cache cargo registry and target + uses: Swatinem/rust-cache@v2 + with: + cache-on-failure: true + - name: cargo fmt --check (contracts) + # Scope to the four Soroban contract crates only. crates/tools is a + # native CLI with separate formatting conventions and pre-existing + # rustfmt drift that is intentionally out of scope for this CI gate + # — see the PR description for the tracked follow-up. + run: cargo fmt ${{ env.CONTRACTS }} -- --check + + clippy: + name: Clippy lint + runs-on: ubuntu-latest + timeout-minutes: 15 + steps: + - uses: actions/checkout@v4 + - name: Install Rust toolchain + uses: dtolnay/rust-toolchain@stable + with: + cache: false + - name: Cache cargo registry and target + uses: Swatinem/rust-cache@v2 + with: + cache-on-failure: true + - name: cargo clippy (contracts) + # Scope is intentionally narrower than the workspace because + # crates/tools is a native CLI with separate lint conventions. + run: cargo clippy ${{ env.CONTRACTS }} -- -D warnings + + test: + name: Tests (host target) + runs-on: ubuntu-latest + timeout-minutes: 25 + steps: + - uses: actions/checkout@v4 + - name: Install Rust toolchain + uses: dtolnay/rust-toolchain@stable + with: + cache: false + - name: Cache cargo registry and target + uses: Swatinem/rust-cache@v2 + with: + cache-on-failure: true + - name: cargo test (contracts) + run: cargo test ${{ env.CONTRACTS }} + + wasm-check: + name: WASM compile check + runs-on: ubuntu-latest + timeout-minutes: 25 + steps: + - uses: actions/checkout@v4 + - name: Install Rust toolchain with wasm target + uses: dtolnay/rust-toolchain@stable + with: + # wasm32v1-none is the target Soroban SDK 26.x requires on stable + # Rust (>=1.84); wasm32-unknown-unknown on Rust >=1.82 enables + # reference-types/multi-value which the Soroban host cannot honour. + targets: wasm32v1-none + cache: false + - name: Cache cargo registry and target + uses: Swatinem/rust-cache@v2 + with: + cache-on-failure: true + - name: cargo check --target wasm32v1-none (contracts) + run: cargo check ${{ env.CONTRACTS }} --target wasm32v1-none diff --git a/campaign/src/contract.rs b/campaign/src/contract.rs index 04db6e4..189fbf7 100644 --- a/campaign/src/contract.rs +++ b/campaign/src/contract.rs @@ -3,11 +3,11 @@ //! These are wired into the contract impl in `lib.rs` as methods on //! `CampaignContract`. -use soroban_sdk::{panic_with_error, Address, Env}; use crate::event; use crate::storage::{get_campaign, is_frozen, set_campaign}; use crate::types::{CampaignStatus, Error}; use crate::{validate_campaign_transition, MAX_DEADLINE_GAP_SECONDS}; +use soroban_sdk::{panic_with_error, Env}; /// Issue #212 – End the campaign early (before deadline). /// @@ -20,8 +20,8 @@ use crate::{validate_campaign_transition, MAX_DEADLINE_GAP_SECONDS}; /// - `Error::ContractFrozen` if contract is frozen (freeze invariant: all writes rejected) /// - `Error::InvalidCampaignTransition` if campaign is already Ended or Cancelled pub fn end_campaign(env: &Env) { - let mut campaign = get_campaign(env) - .unwrap_or_else(|| panic_with_error!(env, Error::NotInitialized)); + let mut campaign = + get_campaign(env).unwrap_or_else(|| panic_with_error!(env, Error::NotInitialized)); campaign.creator.require_auth(); @@ -51,8 +51,8 @@ pub fn end_campaign(env: &Env) { /// - `Error::ContractFrozen` if contract is frozen (freeze invariant: all writes rejected) /// - `Error::InvalidCampaignTransition` if campaign is already Cancelled pub fn cancel_campaign(env: &Env) { - let mut campaign = get_campaign(env) - .unwrap_or_else(|| panic_with_error!(env, Error::NotInitialized)); + let mut campaign = + get_campaign(env).unwrap_or_else(|| panic_with_error!(env, Error::NotInitialized)); campaign.creator.require_auth(); @@ -87,8 +87,8 @@ pub fn cancel_campaign(env: &Env) { /// - `Error::InvalidEndTime` if `new_end_time` is more than ten years out /// - `Error::InvalidCampaignTransition` if campaign is not Active or GoalReached pub fn extend_deadline(env: &Env, new_end_time: u64) { - let mut campaign = get_campaign(env) - .unwrap_or_else(|| panic_with_error!(env, Error::NotInitialized)); + let mut campaign = + get_campaign(env).unwrap_or_else(|| panic_with_error!(env, Error::NotInitialized)); campaign.creator.require_auth(); @@ -103,9 +103,7 @@ pub fn extend_deadline(env: &Env, new_end_time: u64) { } let current_time = env.ledger().timestamp(); - let max_end_time = current_time - .checked_add(MAX_DEADLINE_GAP_SECONDS) - .unwrap_or(u64::MAX); + let max_end_time = current_time.saturating_add(MAX_DEADLINE_GAP_SECONDS); if new_end_time <= current_time || new_end_time > max_end_time { panic_with_error!(env, Error::InvalidEndTime); } @@ -128,9 +126,9 @@ pub fn extend_deadline(env: &Env, new_end_time: u64) { #[must_use] pub fn get_campaign_status(env: &Env) -> crate::types::CampaignStatusResponse { use crate::types::CampaignStatusResponse; - - let campaign = get_campaign(env) - .unwrap_or_else(|| panic_with_error!(env, Error::NotInitialized)); + + let campaign = + get_campaign(env).unwrap_or_else(|| panic_with_error!(env, Error::NotInitialized)); let now = env.ledger().timestamp(); let days_remaining = if now < campaign.end_time { diff --git a/campaign/src/event.rs b/campaign/src/event.rs index 9d14e68..b075e98 100644 --- a/campaign/src/event.rs +++ b/campaign/src/event.rs @@ -1,3 +1,9 @@ +// Issue: `Events::publish` is deprecated in soroban-sdk 26.x in favour of the +// `#[contractevent]` macro. Migrating every event definition here is a +// follow-up tracked separately; suppressing the warning keeps CI clean without +// changing the published event topics or behaviour. +#![allow(deprecated)] + use soroban_sdk::{Address, Env, String, Symbol}; /// Emitted when a donation is received by the campaign. @@ -9,8 +15,12 @@ pub fn donation_received( raised_total: i128, timestamp: u64, ) { - let topics = (Symbol::new(env, "donation_received"), env.current_contract_address()); - env.events().publish(topics, (donor, amount, asset_code, raised_total, timestamp)); + let topics = ( + Symbol::new(env, "donation_received"), + env.current_contract_address(), + ); + env.events() + .publish(topics, (donor, amount, asset_code, raised_total, timestamp)); } /// Emitted when a milestone transitions from Locked to Unlocked. @@ -20,17 +30,16 @@ pub fn milestone_unlocked( target_amount: i128, raised_total: i128, ) { - let topics = (Symbol::new(env, "milestone_unlocked"), env.current_contract_address()); - env.events().publish(topics, (milestone_index, target_amount, raised_total)); + let topics = ( + Symbol::new(env, "milestone_unlocked"), + env.current_contract_address(), + ); + env.events() + .publish(topics, (milestone_index, target_amount, raised_total)); } /// Emitted when the campaign deadline is extended by the creator. -pub fn deadline_extended( - env: &Env, - creator: &Address, - old_deadline: u64, - new_deadline: u64, -) { +pub fn deadline_extended(env: &Env, creator: &Address, old_deadline: u64, new_deadline: u64) { env.events().publish( ("campaign", "deadline_extended"), (creator, old_deadline, new_deadline), @@ -39,7 +48,8 @@ pub fn deadline_extended( /// Emitted when the campaign is cancelled by the creator. pub fn campaign_cancelled(env: &Env, creator: &Address) { - env.events().publish(("campaign", "campaign_cancelled"), creator); + env.events() + .publish(("campaign", "campaign_cancelled"), creator); } /// Emitted when the campaign ends (deadline passed or ended early). @@ -56,12 +66,23 @@ pub fn milestone_released( recipient: &Address, timestamp: u64, ) { - let topics = (Symbol::new(env, "milestone_released"), env.current_contract_address()); - env.events().publish(topics, (milestone_index, amount, asset_code, recipient, timestamp)); + let topics = ( + Symbol::new(env, "milestone_released"), + env.current_contract_address(), + ); + env.events().publish( + topics, + (milestone_index, amount, asset_code, recipient, timestamp), + ); } /// Issue #246 – Emitted when the contract is upgraded by the admin. -pub fn contract_upgraded(env: &Env, admin: &Address, new_wasm_hash: soroban_sdk::BytesN<32>, timestamp: u64) { +pub fn contract_upgraded( + env: &Env, + admin: &Address, + new_wasm_hash: soroban_sdk::BytesN<32>, + timestamp: u64, +) { env.events().publish( ("campaign", "contract_upgraded"), (admin, new_wasm_hash, timestamp), @@ -70,16 +91,12 @@ pub fn contract_upgraded(env: &Env, admin: &Address, new_wasm_hash: soroban_sdk: /// Issue #246 – Emitted when the contract is frozen by the admin. pub fn contract_frozen(env: &Env, admin: &Address, timestamp: u64) { - env.events().publish( - ("campaign", "contract_frozen"), - (admin, timestamp), - ); + env.events() + .publish(("campaign", "contract_frozen"), (admin, timestamp)); } /// Issue #246 – Emitted when the contract is unfrozen by the admin. pub fn contract_unfrozen(env: &Env, admin: &Address, timestamp: u64) { - env.events().publish( - ("campaign", "contract_unfrozen"), - (admin, timestamp), - ); + env.events() + .publish(("campaign", "contract_unfrozen"), (admin, timestamp)); } diff --git a/campaign/src/get_all_milestones.rs b/campaign/src/get_all_milestones.rs index 729ee49..7d0a8d4 100644 --- a/campaign/src/get_all_milestones.rs +++ b/campaign/src/get_all_milestones.rs @@ -1,6 +1,5 @@ use soroban_sdk::{panic_with_error, Env, Vec}; -use crate::get_milestone; use crate::storage::get_campaign; use crate::types::Error; use crate::views::{self, MilestoneView}; @@ -14,8 +13,8 @@ use crate::views::{self, MilestoneView}; /// - `Error::NotInitialized` — contract not yet initialised. #[must_use] pub fn get_all_milestones_view(env: &Env) -> Vec { - let campaign = get_campaign(env) - .unwrap_or_else(|| panic_with_error!(env, Error::NotInitialized)); + let campaign = + get_campaign(env).unwrap_or_else(|| panic_with_error!(env, Error::NotInitialized)); let mut result: Vec = Vec::new(env); for i in 0..campaign.milestone_count { @@ -31,8 +30,8 @@ mod tests { use super::*; use soroban_sdk::{testutils::Address as _, Address, Env}; - use crate::types::{CampaignData, CampaignStatus, DataKey, MilestoneStatus}; use crate::test::with_contract; + use crate::types::{CampaignData, CampaignStatus, DataKey, MilestoneStatus}; fn make_env() -> Env { Env::default() @@ -111,8 +110,14 @@ mod tests { seed_milestone(&env, 2, MilestoneStatus::Locked); let result = get_all_milestones_view(&env); assert_eq!(result.len(), 3); - assert_eq!(result.get(0).unwrap().data.status, MilestoneStatus::Released); - assert_eq!(result.get(1).unwrap().data.status, MilestoneStatus::Unlocked); + assert_eq!( + result.get(0).unwrap().data.status, + MilestoneStatus::Released + ); + assert_eq!( + result.get(1).unwrap().data.status, + MilestoneStatus::Unlocked + ); assert_eq!(result.get(2).unwrap().data.status, MilestoneStatus::Locked); }); } diff --git a/campaign/src/get_milestone.rs b/campaign/src/get_milestone.rs index b06e805..5da2960 100644 --- a/campaign/src/get_milestone.rs +++ b/campaign/src/get_milestone.rs @@ -58,8 +58,8 @@ mod tests { use super::*; use soroban_sdk::{testutils::Address as _, Address, Env}; - use crate::types::{CampaignData, CampaignStatus, DataKey, MilestoneStatus}; use crate::test::with_contract; + use crate::types::{CampaignData, CampaignStatus, DataKey, MilestoneStatus}; // ── Helpers ────────────────────────────────────────────────────────────── diff --git a/campaign/src/lib.rs b/campaign/src/lib.rs index 4a300b6..a83ffc7 100644 --- a/campaign/src/lib.rs +++ b/campaign/src/lib.rs @@ -8,6 +8,11 @@ //! be used for new campaign development. #![no_std] +// `Events::publish` and a few call sites on `Ledger` are marked deprecated in +// soroban-sdk 26.x in favour of `#[contractevent]` and the new ledger APIs. +// Migrating every call site here is tracked as a follow-up issue; suppressing +// the warning keeps CI clean without changing the published event topics. +#![allow(deprecated)] pub mod contract; pub mod event; @@ -19,9 +24,20 @@ pub mod storage; pub mod types; pub mod views; -use soroban_sdk::{contract, contractimpl, Address, Env, String, Vec, BytesN}; -use types::{CampaignData, CampaignInitializedEvent, CampaignReport, CampaignStatus, CampaignStatusResponse, DashboardMetrics, DonorRecord, Error, MilestoneData, MilestoneStatus, PlatformSummary, StellarAsset, AssetInfo}; -use storage::{get_campaign, set_campaign, get_milestone, set_milestone, get_donor, set_donor, storage_get_total_raised, storage_set_total_raised, storage_get_donation_count, storage_increment_donation_count, storage_get_unique_donor_count, storage_increment_unique_donor_count, storage_get_release_count, storage_increment_asset_raised, increment_donor_asset_donation, get_donor_asset_donation, is_frozen, set_frozen, acquire_lock, release_lock}; +use soroban_sdk::{contract, contractimpl, Address, BytesN, Env, String, Vec}; +use storage::{ + acquire_lock, get_campaign, get_donor, get_donor_asset_donation, get_milestone, + increment_donor_asset_donation, is_frozen, release_lock, set_campaign, set_donor, set_frozen, + set_milestone, storage_get_donation_count, storage_get_release_count, storage_get_total_raised, + storage_get_unique_donor_count, storage_increment_asset_raised, + storage_increment_donation_count, storage_increment_unique_donor_count, + storage_set_total_raised, +}; +use types::{ + AssetInfo, CampaignData, CampaignInitializedEvent, CampaignReport, CampaignStatus, + CampaignStatusResponse, DashboardMetrics, DonorRecord, Error, MilestoneData, MilestoneStatus, + PlatformSummary, StellarAsset, +}; pub const VERSION: u32 = 1; @@ -85,7 +101,7 @@ impl CampaignContract { validate_assets(&env, &accepted_assets)?; - let milestone_count = milestones.len() as u32; + let milestone_count = milestones.len(); if milestone_count == 0 || milestone_count > types::MAX_MILESTONES { panic_with_error(&env, Error::InvalidMilestoneCount); } @@ -118,7 +134,7 @@ impl CampaignContract { creator, goal_amount, end_time, - asset_count: accepted_assets.len() as u32, + asset_count: accepted_assets.len(), milestone_count, created_at_ledger: env.ledger().sequence(), }, @@ -197,7 +213,8 @@ impl CampaignContract { // Update donor record let existing_donor = get_donor(&env, &donor); let is_new_donor = existing_donor.is_none(); - let mut donor_record = existing_donor.unwrap_or_else(|| DonorRecord::new_for(donor.clone(), asset.clone())); + let mut donor_record = + existing_donor.unwrap_or_else(|| DonorRecord::new_for(donor.clone(), asset.clone())); donor_record.apply_donation( &env, @@ -347,10 +364,7 @@ impl CampaignContract { }; let refund_eligibility = check_refund_eligibility(&env, &campaign, &donor_record); - match refund_eligibility { - Ok(_) => true, - Err(_) => false, - } + refund_eligibility.is_ok() } /// Claim a refund for a donation. @@ -601,16 +615,6 @@ impl CampaignContract { } } -/// Issue #175 – assert the current invoker is the campaign creator. -/// -/// Reads the creator address from campaign storage and calls `require_auth()`. -/// Panics with `Error::Unauthorized` if the campaign is not initialized; -/// Soroban's auth framework panics if the invoker is not the creator. -fn require_creator(env: &Env) { - let campaign = get_campaign(env).unwrap_or_else(|| panic_with_error(env, Error::Unauthorized)); - campaign.creator.require_auth(); -} - /// Validates that `asset` is in the campaign's accepted list and returns the /// token contract address needed to construct a `token::Client`. fn get_token_address_for_asset(env: &Env, asset: &AssetInfo, campaign: &CampaignData) -> Address { @@ -640,7 +644,7 @@ fn get_token_address_for_asset(env: &Env, asset: &AssetInfo, campaign: &Campaign fn validate_assets(env: &Env, assets: &Vec) -> Result<(), Error> { for asset in assets.iter() { - if asset.asset_code.len() == 0 { + if asset.asset_code.is_empty() { panic_with_error(env, Error::InvalidAssetCode); } } @@ -709,7 +713,7 @@ fn check_refund_eligibility( CampaignStatus::Ended => { // Refunds only if NO milestones have been released for i in 0..campaign.milestone_count { - if let Some(milestone) = get_milestone(&env, i) { + if let Some(milestone) = get_milestone(env, i) { if milestone.status == MilestoneStatus::Released { return Err(Error::RefundNotPermitted); } @@ -734,7 +738,9 @@ fn check_refund_eligibility( } /// Validates campaign status transitions; panics if invalid. -#[must_use] +/// +/// Returns `Result<(), Error>` which is already `#[must_use]`, so no extra +/// attribute is needed (clippy `double_must_use`). pub fn validate_campaign_transition( env: &Env, current_status: &CampaignStatus, @@ -757,7 +763,9 @@ pub fn validate_campaign_transition( } /// Validates milestone status transitions; panics if invalid. -#[must_use] +/// +/// Returns `Result<(), Error>` which is already `#[must_use]`, so no extra +/// attribute is needed (clippy `double_must_use`). pub fn validate_milestone_transition( env: &Env, current_status: &MilestoneStatus, @@ -784,10 +792,10 @@ mod test { pub mod claim_refund_tests; pub mod get_campaign_status_tests; pub mod integration_tests; + pub mod invariant_tests; pub mod negative_path_tests; pub mod refund_eligibility_tests; pub mod release_milestone_tests; - pub mod invariant_tests; /// Shared helper: register the contract and run the body inside /// `env.as_contract()` so storage, ledger, and auth work correctly. diff --git a/campaign/src/multi_asset_release.rs b/campaign/src/multi_asset_release.rs index e7db271..57bc551 100644 --- a/campaign/src/multi_asset_release.rs +++ b/campaign/src/multi_asset_release.rs @@ -1,11 +1,11 @@ -use soroban_sdk::{panic_with_error, symbol_short, token, Address, Env, Vec}; use crate::event; -use crate::types::{Error, MilestoneStatus, StellarAsset}; use crate::storage::{ acquire_lock, get_campaign, get_milestone, release_lock, set_milestone, - storage_get_asset_raised, storage_get_total_raised, - storage_increment_release_count, storage_set_total_raised, storage_set_asset_raised, + storage_get_asset_raised, storage_get_total_raised, storage_increment_release_count, + storage_set_asset_raised, storage_set_total_raised, }; +use crate::types::{Error, MilestoneStatus}; +use soroban_sdk::{panic_with_error, symbol_short, token, Address, Env}; // ─── Constants ─────────────────────────────────────────────────────────────── @@ -13,6 +13,9 @@ use crate::storage::{ const MIN_TRANSFER_AMOUNT: i128 = 1; /// Maximum accepted assets per campaign to prevent unbounded loop gas costs. +/// Kept as a documented invariant even though the runtime is bounded by +/// Soroban resource limits — leaving the constant for future use. +#[allow(dead_code)] const MAX_ACCEPTED_ASSETS: usize = 20; // ─── Helper: proportional release ──────────────────────────────────────────── @@ -63,18 +66,13 @@ fn compute_asset_release( /// contract can never release more than it actually holds. /// - Dust amounts below MIN_TRANSFER_AMOUNT are skipped rather than /// causing the whole release to fail. -pub fn release_milestone_multi_asset( - env: &Env, - milestone_index: u32, - recipient: Address, -) { +pub fn release_milestone_multi_asset(env: &Env, milestone_index: u32, recipient: Address) { // Issue #242 – Reentrancy protection: acquire lock acquire_lock(env); // ── 1. Load campaign ──────────────────────────────────────────────────── - let campaign = get_campaign(env).unwrap_or_else(|| { - panic_with_error!(env, Error::NotInitialized) - }); + let campaign = + get_campaign(env).unwrap_or_else(|| panic_with_error!(env, Error::NotInitialized)); // ── 3. Validate recipient ──────────────────────────────────────────────── if recipient == env.current_contract_address() { @@ -82,9 +80,8 @@ pub fn release_milestone_multi_asset( } // ── 4. Load and validate milestone ────────────────────────────────────── - let mut milestone = get_milestone(env, milestone_index).unwrap_or_else(|| { - panic_with_error!(env, Error::MilestoneNotFound) - }); + let mut milestone = get_milestone(env, milestone_index) + .unwrap_or_else(|| panic_with_error!(env, Error::MilestoneNotFound)); if milestone.status != MilestoneStatus::Unlocked { panic_with_error!(env, Error::InvalidMilestoneTransition); @@ -140,17 +137,14 @@ pub fn release_milestone_multi_asset( // Retrieve the per-asset raised amount from storage for proportional math let asset_raised = storage_get_asset_raised(env, &token_address); - let asset_release = match compute_asset_release( - asset_raised, - milestone_release, - total_raised, - ) { - Some(amount) => amount, - None => { - // Nothing to release for this asset (dust or zero balance) - continue; - } - }; + let asset_release = + match compute_asset_release(asset_raised, milestone_release, total_raised) { + Some(amount) => amount, + None => { + // Nothing to release for this asset (dust or zero balance) + continue; + } + }; // Issue #244 – Verify contract balance is sufficient if contract_balance < asset_release { @@ -194,10 +188,7 @@ pub fn release_milestone_multi_asset( } // ── 8. Update global total-raised bookkeeping ──────────────────────────── - let new_total_raised = total_raised - .checked_sub(total_released) - .unwrap_or(0) - .max(0); + let new_total_raised = total_raised.checked_sub(total_released).unwrap_or(0).max(0); storage_set_total_raised(env, new_total_raised); storage_increment_release_count(env); diff --git a/campaign/src/release_milestone.rs b/campaign/src/release_milestone.rs index 871931c..47ca2b9 100644 --- a/campaign/src/release_milestone.rs +++ b/campaign/src/release_milestone.rs @@ -1,10 +1,10 @@ -use soroban_sdk::{Address, Env, token, panic_with_error}; use crate::event; -use crate::types::{Error, MilestoneStatus}; use crate::storage::{ acquire_lock, get_campaign, get_milestone, is_frozen, release_lock, set_milestone, storage_increment_release_count, }; +use crate::types::{Error, MilestoneStatus}; +use soroban_sdk::{panic_with_error, token, Address, Env}; /// Issue #207 – `release_milestone` function /// @@ -41,18 +41,16 @@ pub fn release_milestone(env: &Env, milestone_index: u32, recipient: Address) { // Issue #242 – Reentrancy protection: acquire lock acquire_lock(env); - let campaign = get_campaign(env).unwrap_or_else(|| { - panic_with_error!(env, Error::NotInitialized) - }); + let campaign = + get_campaign(env).unwrap_or_else(|| panic_with_error!(env, Error::NotInitialized)); // Freeze check — reject all mutating operations while frozen if is_frozen(env) { soroban_sdk::panic_with_error!(env, Error::ContractFrozen); } - let mut milestone = get_milestone(env, milestone_index).unwrap_or_else(|| { - panic_with_error!(env, Error::MilestoneNotFound) - }); + let mut milestone = get_milestone(env, milestone_index) + .unwrap_or_else(|| panic_with_error!(env, Error::MilestoneNotFound)); // Prevent double release: milestone already in Released state if milestone.status == MilestoneStatus::Released { @@ -66,9 +64,8 @@ pub fn release_milestone(env: &Env, milestone_index: u32, recipient: Address) { // Prevent skipping milestones: if not milestone 0, previous must be Released if milestone_index > 0 { - let prev_milestone = get_milestone(env, milestone_index - 1).unwrap_or_else(|| { - soroban_sdk::panic_with_error!(env, Error::MilestoneNotFound) - }); + let prev_milestone = get_milestone(env, milestone_index - 1) + .unwrap_or_else(|| soroban_sdk::panic_with_error!(env, Error::MilestoneNotFound)); if prev_milestone.status != MilestoneStatus::Released { soroban_sdk::panic_with_error!(env, Error::PreviousMilestoneNotReleased); } @@ -85,9 +82,10 @@ pub fn release_milestone(env: &Env, milestone_index: u32, recipient: Address) { // every accepted asset would multiply the payout by the asset count. // Campaigns with more than one accepted asset must use // `release_milestone_multi_asset`, which distributes proportionally. - let asset = campaign.accepted_assets.first().unwrap_or_else(|| { - panic_with_error!(env, Error::NotInitialized) - }); + let asset = campaign + .accepted_assets + .first() + .unwrap_or_else(|| panic_with_error!(env, Error::NotInitialized)); if let Some(issuer) = asset.issuer.clone() { let token_client = token::Client::new(env, &issuer); @@ -104,7 +102,11 @@ pub fn release_milestone(env: &Env, milestone_index: u32, recipient: Address) { // Clamp to available balance (should never be needed due to check above) let transfer_amount = release_amount.min(asset_balance); - token_client.transfer(&env.current_contract_address(), &recipient, &transfer_amount); + token_client.transfer( + &env.current_contract_address(), + &recipient, + &transfer_amount, + ); event::milestone_released( env, diff --git a/campaign/src/storage.rs b/campaign/src/storage.rs index 6a9652f..5553f4f 100644 --- a/campaign/src/storage.rs +++ b/campaign/src/storage.rs @@ -1,7 +1,7 @@ // src/storage.rs -use soroban_sdk::{Address, Env, panic_with_error}; use crate::types::{CampaignData, DataKey, DonorRecord, Error, MilestoneData}; +use soroban_sdk::{panic_with_error, Address, Env}; // ─── TTL Constants ──────────────────────────────────────────────────────────── // @@ -32,9 +32,11 @@ pub const TEMPORARY_BUMP_THRESHOLD: u32 = 17_280; #[inline] fn bump_persistent(env: &Env, key: &DataKey) { if env.storage().persistent().has(key) { - env.storage() - .persistent() - .extend_ttl(key, PERSISTENT_BUMP_THRESHOLD, PERSISTENT_BUMP_AMOUNT); + env.storage().persistent().extend_ttl( + key, + PERSISTENT_BUMP_THRESHOLD, + PERSISTENT_BUMP_AMOUNT, + ); } } @@ -45,9 +47,7 @@ fn bump_persistent(env: &Env, key: &DataKey) { /// (handled automatically by the host — we surface it as `StorageWriteError` /// so callers get a typed error instead of a host trap). pub fn set_campaign(env: &Env, data: &CampaignData) { - env.storage() - .persistent() - .set(&DataKey::CampaignData, data); + env.storage().persistent().set(&DataKey::CampaignData, data); bump_persistent(env, &DataKey::CampaignData); } @@ -55,10 +55,7 @@ pub fn set_campaign(env: &Env, data: &CampaignData) { /// Returns `None` only before the contract is initialised. #[must_use] pub fn get_campaign(env: &Env) -> Option { - let value = env - .storage() - .persistent() - .get(&DataKey::CampaignData)?; + let value = env.storage().persistent().get(&DataKey::CampaignData)?; bump_persistent(env, &DataKey::CampaignData); Some(value) } @@ -93,8 +90,7 @@ pub fn get_milestone(env: &Env, index: u32) -> Option { /// Same as `get_milestone` but panics with `MilestoneNotFound`. #[must_use] pub fn get_milestone_or_panic(env: &Env, index: u32) -> MilestoneData { - get_milestone(env, index) - .unwrap_or_else(|| panic_with_error!(env, Error::MilestoneNotFound)) + get_milestone(env, index).unwrap_or_else(|| panic_with_error!(env, Error::MilestoneNotFound)) } // ─── Donors ─────────────────────────────────────────────────────────────────── @@ -139,11 +135,7 @@ pub fn get_donor_or_default(env: &Env, donor: &Address) -> DonorRecord { /// Returns 0 if no donations in that asset yet. pub fn get_donor_asset_donation(env: &Env, donor: &Address, asset: &Address) -> i128 { let key = DataKey::DonorAssetDonation(donor.clone(), asset.clone()); - let value: i128 = env - .storage() - .persistent() - .get(&key) - .unwrap_or(0); + let value: i128 = env.storage().persistent().get(&key).unwrap_or(0); bump_persistent(env, &key); value } @@ -152,15 +144,12 @@ pub fn get_donor_asset_donation(env: &Env, donor: &Address, asset: &Address) -> /// Panics if the addition would overflow. pub fn increment_donor_asset_donation(env: &Env, donor: &Address, asset: &Address, amount: i128) { let key = DataKey::DonorAssetDonation(donor.clone(), asset.clone()); - let current: i128 = env - .storage() - .persistent() - .get(&key) - .unwrap_or(0); - - let new_amount = current.checked_add(amount) + let current: i128 = env.storage().persistent().get(&key).unwrap_or(0); + + let new_amount = current + .checked_add(amount) .unwrap_or_else(|| panic_with_error!(env, Error::Overflow)); - + env.storage().persistent().set(&key, &new_amount); bump_persistent(env, &key); } @@ -286,11 +275,7 @@ pub fn storage_increment_release_count(env: &Env) -> u64 { /// Load the raised amount for a specific token address. pub fn storage_get_asset_raised(env: &Env, token: &Address) -> i128 { let key = DataKey::AssetRaised(token.clone()); - let value: i128 = env - .storage() - .persistent() - .get(&key) - .unwrap_or(0); + let value: i128 = env.storage().persistent().get(&key).unwrap_or(0); bump_persistent(env, &key); value } @@ -374,11 +359,7 @@ pub fn release_lock(env: &Env) { /// Returns `false` if the flag has never been set. pub fn is_frozen(env: &Env) -> bool { let key = DataKey::Frozen; - let frozen: bool = env - .storage() - .persistent() - .get(&key) - .unwrap_or(false); + let frozen: bool = env.storage().persistent().get(&key).unwrap_or(false); bump_persistent(env, &key); frozen } diff --git a/campaign/src/test/claim_refund_tests.rs b/campaign/src/test/claim_refund_tests.rs index a825ecc..a708583 100644 --- a/campaign/src/test/claim_refund_tests.rs +++ b/campaign/src/test/claim_refund_tests.rs @@ -9,12 +9,15 @@ use core::ops::Add; use soroban_sdk::testutils::{Address as AddressTestUtils, Ledger}; use soroban_sdk::token::{StellarAssetClient, TokenClient}; -use soroban_sdk::{Address, Env, Vec, log, vec}; +use soroban_sdk::{log, vec, Address, Env, Vec}; -use crate::types::{AssetInfo, CampaignData, CampaignStatus, DonorRecord, MilestoneData, MilestoneStatus, StellarAsset}; +use super::with_contract; use crate::storage::{set_campaign, set_donor, set_milestone}; +use crate::types::{ + AssetInfo, CampaignData, CampaignStatus, DonorRecord, MilestoneData, MilestoneStatus, + StellarAsset, +}; use crate::{CampaignContract, CampaignContractClient}; -use super::with_contract; /// Base ledger timestamp (1 year in seconds) used so we can safely subtract /// from it to simulate "past" end_times without underflow. @@ -38,7 +41,11 @@ fn create_test_campaign( let campaign = CampaignData { creator: creator.clone(), goal_amount, - raised_amount: if matches!(status, CampaignStatus::Cancelled | CampaignStatus::Ended) { 1000 } else { 0 }, + raised_amount: if matches!(status, CampaignStatus::Cancelled | CampaignStatus::Ended) { + 1000 + } else { + 0 + }, end_time, status, accepted_assets: { @@ -60,16 +67,15 @@ fn create_test_campaign( } /// Creates a milestone with the given index and status. -fn create_test_milestone( - env: &Env, - index: u32, - target_amount: i128, - status: MilestoneStatus, -) { +fn create_test_milestone(env: &Env, index: u32, target_amount: i128, status: MilestoneStatus) { let milestone = crate::types::MilestoneData { index, target_amount, - released_amount: if status == MilestoneStatus::Released { target_amount } else { 0 }, + released_amount: if status == MilestoneStatus::Released { + target_amount + } else { + 0 + }, description_hash: soroban_sdk::BytesN::from_array(env, &[0u8; 32]), status, released_at: None, @@ -81,12 +87,7 @@ fn create_test_milestone( } /// Creates a donor record for testing. -fn create_test_donor( - env: &Env, - donor: &Address, - total_donated: i128, - refund_claimed: bool, -) { +fn create_test_donor(env: &Env, donor: &Address, total_donated: i128, refund_claimed: bool) { let donor_record = DonorRecord { donor: donor.clone(), total_donated, @@ -220,7 +221,10 @@ fn test_claim_refund_exactly_at_window_boundary() { let donor = Address::generate(&env); create_test_donor(&env, &donor, 100, false); let eligible = CampaignContract::is_refund_eligible(env.clone(), donor.clone()); - assert!(eligible, "Should be refund-eligible at exactly 30-day boundary"); + assert!( + eligible, + "Should be refund-eligible at exactly 30-day boundary" + ); }); } @@ -235,7 +239,10 @@ fn test_claim_refund_one_second_past_window() { let donor = Address::generate(&env); create_test_donor(&env, &donor, 100, false); let eligible = CampaignContract::is_refund_eligible(env.clone(), donor.clone()); - assert!(!eligible, "Should NOT be refund-eligible past 30-day window"); + assert!( + !eligible, + "Should NOT be refund-eligible past 30-day window" + ); }); } @@ -265,7 +272,10 @@ fn test_claim_refund_ended_no_milestones_eligibility() { let donor = Address::generate(&env); create_test_donor(&env, &donor, 100, false); let eligible = CampaignContract::is_refund_eligible(env.clone(), donor.clone()); - assert!(eligible, "Ended campaign with no released milestones should allow refunds"); + assert!( + eligible, + "Ended campaign with no released milestones should allow refunds" + ); }); } @@ -281,11 +291,13 @@ fn test_claim_refund_ended_with_released_milestone_eligibility() { let donor = Address::generate(&env); create_test_donor(&env, &donor, 100, false); let eligible = CampaignContract::is_refund_eligible(env.clone(), donor.clone()); - assert!(!eligible, "Ended campaign with released milestones should NOT allow refunds"); + assert!( + !eligible, + "Ended campaign with released milestones should NOT allow refunds" + ); }); } - fn setup<'a>() -> (Env, CampaignContractClient<'a>, Address) { let env = Env::default(); env.mock_all_auths(); @@ -302,11 +314,15 @@ fn create_test_milestone_data( index: u32, target_amount: i128, status: MilestoneStatus, -) -> Vec{ +) -> Vec { let milestone = crate::types::MilestoneData { index, target_amount, - released_amount: if status == MilestoneStatus::Released { target_amount } else { 0 }, + released_amount: if status == MilestoneStatus::Released { + target_amount + } else { + 0 + }, description_hash: soroban_sdk::BytesN::from_array(env, &[0u8; 32]), status, released_at: None, @@ -351,14 +367,24 @@ fn test_claim_refund_ended_donor_100() { let min_donation_amount = 0; let contract_address = &client.address; - client.initialize(&creator, &goal_amount, &end_time, &accepted_assets, &milestones, &min_donation_amount); + client.initialize( + &creator, + &goal_amount, + &end_time, + &accepted_assets, + &milestones, + &min_donation_amount, + ); client.donate(&donor, &100, &AssetInfo::Stellar(token_address.clone())); token.transfer(&donor, contract_address, &100); - client.donate(&donor2, &999_900, &AssetInfo::Stellar(token_address.clone())); + client.donate( + &donor2, + &999_900, + &AssetInfo::Stellar(token_address.clone()), + ); token.transfer(&donor2, contract_address, &999_900); - let recipient = Address::generate(&env); client.release_milestone(&0, &recipient); @@ -375,7 +401,7 @@ fn test_claim_refund_ended_donor_100() { let donor2_balance = token.balance(&donor2); assert_eq!(donor2_balance, 1099); - + let contract_balance = token.balance(&contract_address); assert_eq!(contract_balance, 0); } @@ -404,14 +430,20 @@ fn test_claim_refund_ended_donor_1() { let min_donation_amount = 0; let contract_address = &client.address; - client.initialize(&creator, &goal_amount, &end_time, &accepted_assets, &milestones, &min_donation_amount); + client.initialize( + &creator, + &goal_amount, + &end_time, + &accepted_assets, + &milestones, + &min_donation_amount, + ); client.donate(&donor, &1, &AssetInfo::Stellar(token_address.clone())); token.transfer(&donor, contract_address, &1); client.donate(&donor2, &9999, &AssetInfo::Stellar(token_address.clone())); token.transfer(&donor2, contract_address, &9999); - let recipient = Address::generate(&env); client.release_milestone(&0, &recipient); @@ -455,12 +487,18 @@ fn test_claim_refund_ended_full_refund() { let min_donation_amount = 0; let contract_address = &client.address; - client.initialize(&creator, &goal_amount, &end_time, &accepted_assets, &milestones, &min_donation_amount); + client.initialize( + &creator, + &goal_amount, + &end_time, + &accepted_assets, + &milestones, + &min_donation_amount, + ); client.donate(&donor, &1500, &AssetInfo::Stellar(token_address.clone())); token.transfer(&donor, contract_address, &1500); - let recipient = Address::generate(&env); client.release_milestone(&0, &recipient); @@ -475,4 +513,4 @@ fn test_claim_refund_ended_full_refund() { let contract_balance = token.balance(&contract_address); assert_eq!(contract_balance, 0); -} \ No newline at end of file +} diff --git a/campaign/src/test/get_campaign_status_tests.rs b/campaign/src/test/get_campaign_status_tests.rs index 2ac1096..80dd43f 100644 --- a/campaign/src/test/get_campaign_status_tests.rs +++ b/campaign/src/test/get_campaign_status_tests.rs @@ -5,12 +5,12 @@ #![cfg(test)] use soroban_sdk::testutils::{Address as AddressTestUtils, Ledger}; -use soroban_sdk::{Address, Env, Vec, String, BytesN}; +use soroban_sdk::{Address, BytesN, Env, String, Vec}; -use crate::types::{CampaignStatus, CampaignData, StellarAsset, MilestoneStatus, MilestoneData}; +use super::with_contract; use crate::storage::set_campaign; +use crate::types::{CampaignData, CampaignStatus, MilestoneData, MilestoneStatus, StellarAsset}; use crate::CampaignContract; -use super::with_contract; /// Base ledger timestamp (1 year in seconds) so we can safely subtract /// to simulate "past" end_times without underflow. diff --git a/campaign/src/test/integration_tests.rs b/campaign/src/test/integration_tests.rs index c07b33a..7f04d3c 100644 --- a/campaign/src/test/integration_tests.rs +++ b/campaign/src/test/integration_tests.rs @@ -5,19 +5,22 @@ #![cfg(test)] use soroban_sdk::testutils::Address as AddressTestUtils; -use soroban_sdk::{Address, Env, Vec, String, BytesN}; +use soroban_sdk::{Address, BytesN, Env, String, Vec}; -use crate::types::{CampaignStatus, CampaignData, DonorRecord, AssetInfo, StellarAsset, MilestoneStatus, MilestoneData}; +use super::with_contract; use crate::storage::{get_campaign, get_milestone}; +use crate::types::{ + AssetInfo, CampaignData, CampaignStatus, DonorRecord, MilestoneData, MilestoneStatus, + StellarAsset, +}; use crate::CampaignContract; -use super::with_contract; // ─── Helpers ───────────────────────────────────────────────────────────────── /// Builds a minimal valid campaign setup and returns (creator, assets, milestones). fn setup_basic_campaign(env: &Env) -> (Address, Vec, Vec) { let creator = Address::generate(env); - + let mut assets: Vec = Vec::new(env); assets.push_back(StellarAsset { asset_code: String::from_str(env, "XLM"), @@ -90,16 +93,8 @@ fn test_extend_deadline_happy_path() { let end_time = env.ledger().timestamp() + 86_400; let new_end_time = env.ledger().timestamp() + (2 * 86_400); - CampaignContract::initialize( - env.clone(), - creator, - 1000, - end_time, - assets, - milestones, - 0, - ) - .unwrap(); + CampaignContract::initialize(env.clone(), creator, 1000, end_time, assets, milestones, 0) + .unwrap(); CampaignContract::extend_deadline(env.clone(), new_end_time); @@ -129,7 +124,8 @@ fn test_donate_happy_path() { assets.clone(), milestones.clone(), 0, - ).unwrap(); + ) + .unwrap(); // First donation let donor1 = Address::generate(&env); @@ -154,11 +150,19 @@ fn test_donate_happy_path() { let campaign = get_campaign(&env).unwrap(); assert_eq!(campaign.raised_amount, 1000); - assert_eq!(campaign.status, CampaignStatus::GoalReached, "Campaign should transition to GoalReached"); + assert_eq!( + campaign.status, + CampaignStatus::GoalReached, + "Campaign should transition to GoalReached" + ); // Verify milestone was unlocked let milestone = get_milestone(&env, 0).expect("Milestone should exist"); - assert_eq!(milestone.status, MilestoneStatus::Unlocked, "Milestone should be unlocked when goal is reached"); + assert_eq!( + milestone.status, + MilestoneStatus::Unlocked, + "Milestone should be unlocked when goal is reached" + ); // Verify both donor records let donor1_record = CampaignContract::get_donor_record(env.clone(), donor1.clone()) @@ -196,7 +200,8 @@ fn test_lifecycle_end_and_refund_eligibility() { assets.clone(), milestones.clone(), 0, - ).unwrap(); + ) + .unwrap(); // Donate let donor = Address::generate(&env); @@ -266,7 +271,8 @@ fn test_lifecycle_multi_milestone_unlock() { assets.clone(), milestones.clone(), 0, - ).unwrap(); + ) + .unwrap(); // Use different donor addresses to avoid auth-frame conflicts in tests let donor1 = Address::generate(&env); @@ -278,29 +284,53 @@ fn test_lifecycle_multi_milestone_unlock() { CampaignContract::donate(env.clone(), donor1.clone(), 500, AssetInfo::Native); let milestone_0 = get_milestone(&env, 0).unwrap(); - assert_eq!(milestone_0.status, MilestoneStatus::Locked, "Milestone 0 should remain locked at 500 raised"); + assert_eq!( + milestone_0.status, + MilestoneStatus::Locked, + "Milestone 0 should remain locked at 500 raised" + ); // Second donation: 600 — total 1100, milestone 0 should unlock CampaignContract::donate(env.clone(), donor2.clone(), 600, AssetInfo::Native); let milestone_0 = get_milestone(&env, 0).unwrap(); - assert_eq!(milestone_0.status, MilestoneStatus::Unlocked, "Milestone 0 should unlock at 1100 raised"); + assert_eq!( + milestone_0.status, + MilestoneStatus::Unlocked, + "Milestone 0 should unlock at 1100 raised" + ); let milestone_1 = get_milestone(&env, 1).unwrap(); - assert_eq!(milestone_1.status, MilestoneStatus::Locked, "Milestone 1 should remain locked"); + assert_eq!( + milestone_1.status, + MilestoneStatus::Locked, + "Milestone 1 should remain locked" + ); // Third donation: 1000 — total 2100, milestone 1 should unlock CampaignContract::donate(env.clone(), donor3.clone(), 1000, AssetInfo::Native); let milestone_1 = get_milestone(&env, 1).unwrap(); - assert_eq!(milestone_1.status, MilestoneStatus::Unlocked, "Milestone 1 should unlock at 2100 raised"); + assert_eq!( + milestone_1.status, + MilestoneStatus::Unlocked, + "Milestone 1 should unlock at 2100 raised" + ); let milestone_2 = get_milestone(&env, 2).unwrap(); - assert_eq!(milestone_2.status, MilestoneStatus::Locked, "Milestone 2 should remain locked"); + assert_eq!( + milestone_2.status, + MilestoneStatus::Locked, + "Milestone 2 should remain locked" + ); // Fourth donation: 900 — total 3000, milestone 2 should unlock CampaignContract::donate(env.clone(), donor4.clone(), 900, AssetInfo::Native); let milestone_2 = get_milestone(&env, 2).unwrap(); - assert_eq!(milestone_2.status, MilestoneStatus::Unlocked, "Milestone 2 should unlock at 3000 raised"); + assert_eq!( + milestone_2.status, + MilestoneStatus::Unlocked, + "Milestone 2 should unlock at 3000 raised" + ); // Campaign should be GoalReached let campaign = get_campaign(&env).unwrap(); @@ -378,7 +408,8 @@ fn test_campaign_analytics_report_and_summary() { assets.clone(), milestones.clone(), 0, - ).unwrap(); + ) + .unwrap(); let initial = CampaignContract::get_campaign_report(env.clone()).unwrap(); assert_eq!(initial.creator, creator); @@ -456,7 +487,8 @@ fn test_donate_below_minimum_panics_assert() { assets.clone(), milestones.clone(), 100, // min donation is 100 - ).unwrap(); + ) + .unwrap(); let donor = Address::generate(&env); CampaignContract::donate(env.clone(), donor.clone(), 50, AssetInfo::Native); diff --git a/campaign/src/test/invariant_tests.rs b/campaign/src/test/invariant_tests.rs index 4467b45..86219bc 100644 --- a/campaign/src/test/invariant_tests.rs +++ b/campaign/src/test/invariant_tests.rs @@ -8,15 +8,13 @@ #![cfg(test)] use soroban_sdk::testutils::{Address as AddressTestUtils, Ledger}; -use soroban_sdk::{Address, Env, Vec, String, BytesN}; +use soroban_sdk::{Address, BytesN, Env, String, Vec}; -use crate::types::{ - CampaignData, CampaignStatus, MilestoneData, MilestoneStatus, StellarAsset, -}; +use super::with_contract; use crate::storage::{ get_campaign, get_milestone, set_campaign, set_milestone, storage_get_total_raised, }; -use super::with_contract; +use crate::types::{CampaignData, CampaignStatus, MilestoneData, MilestoneStatus, StellarAsset}; /// Base timestamp: 1 year in seconds, same convention as other test files. const BASE: u64 = 86400 * 365; @@ -100,32 +98,25 @@ fn invariant_last_milestone_target_equals_goal() { let last_milestone = get_milestone(&env, last_index).unwrap(); assert_eq!( - last_milestone.target_amount, - campaign.goal_amount, + last_milestone.target_amount, campaign.goal_amount, "INVARIANT VIOLATED: last milestone target ({}) != goal_amount ({})", - last_milestone.target_amount, - campaign.goal_amount, + last_milestone.target_amount, campaign.goal_amount, ); }); // Case B: three milestones — only the last must equal goal with_contract(&env, || { let goal: i128 = 3000; - setup_campaign_with_milestones( - &env, goal, 0, CampaignStatus::Active, - &[1000, 2000, 3000], - ); + setup_campaign_with_milestones(&env, goal, 0, CampaignStatus::Active, &[1000, 2000, 3000]); let campaign = get_campaign(&env).unwrap(); let last_index = campaign.milestone_count - 1; let last_milestone = get_milestone(&env, last_index).unwrap(); assert_eq!( - last_milestone.target_amount, - campaign.goal_amount, + last_milestone.target_amount, campaign.goal_amount, "INVARIANT VIOLATED: last milestone target ({}) != goal_amount ({})", - last_milestone.target_amount, - campaign.goal_amount, + last_milestone.target_amount, campaign.goal_amount, ); }); } @@ -182,8 +173,8 @@ fn invariant_total_donations_match_raised() { env.ledger().set_timestamp(BASE); with_contract(&env, || { - use crate::types::{AssetInfo, DonorRecord}; use crate::storage::{set_donor, storage_set_total_raised}; + use crate::types::{AssetInfo, DonorRecord}; let goal: i128 = 3000; setup_campaign_with_milestones(&env, goal, 0, CampaignStatus::Active, &[1000, 2000, 3000]); @@ -255,10 +246,7 @@ fn invariant_no_released_milestones_while_active() { with_contract(&env, || { let goal: i128 = 3000; - setup_campaign_with_milestones( - &env, goal, 0, CampaignStatus::Active, - &[1000, 2000, 3000], - ); + setup_campaign_with_milestones(&env, goal, 0, CampaignStatus::Active, &[1000, 2000, 3000]); // Simulate donations that cross each milestone threshold // by updating raised_amount and unlocking milestones as donate() would @@ -295,7 +283,9 @@ fn invariant_no_released_milestones_while_active() { MilestoneStatus::Released, "INVARIANT VIOLATED: milestone {} is Released while campaign is {:?} \ after donations only (raised={})", - i, campaign.status, raised, + i, + campaign.status, + raised, ); } } @@ -314,10 +304,7 @@ fn invariant_milestone_targets_strictly_ascending() { env.ledger().set_timestamp(BASE); with_contract(&env, || { - setup_campaign_with_milestones( - &env, 3000, 0, CampaignStatus::Active, - &[1000, 2000, 3000], - ); + setup_campaign_with_milestones(&env, 3000, 0, CampaignStatus::Active, &[1000, 2000, 3000]); let campaign = get_campaign(&env).unwrap(); let mut prev_target: i128 = 0; @@ -329,7 +316,9 @@ fn invariant_milestone_targets_strictly_ascending() { ms.target_amount > prev_target, "INVARIANT VIOLATED: milestone {} target ({}) is not greater than \ previous target ({})", - i, ms.target_amount, prev_target, + i, + ms.target_amount, + prev_target, ); prev_target = ms.target_amount; @@ -338,11 +327,9 @@ fn invariant_milestone_targets_strictly_ascending() { // Final check: last milestone equals goal let last = get_milestone(&env, campaign.milestone_count - 1).unwrap(); assert_eq!( - last.target_amount, - campaign.goal_amount, + last.target_amount, campaign.goal_amount, "INVARIANT VIOLATED: last milestone target ({}) != goal_amount ({})", - last.target_amount, - campaign.goal_amount, + last.target_amount, campaign.goal_amount, ); }); } diff --git a/campaign/src/test/negative_path_tests.rs b/campaign/src/test/negative_path_tests.rs index d1e5352..f433be4 100644 --- a/campaign/src/test/negative_path_tests.rs +++ b/campaign/src/test/negative_path_tests.rs @@ -6,16 +6,16 @@ #![cfg(test)] use soroban_sdk::testutils::{Address as AddressTestUtils, Ledger}; -use soroban_sdk::{Address, Env, String, Vec, BytesN}; +use soroban_sdk::{Address, BytesN, Env, String, Vec}; +use super::with_contract; +use crate::storage::{get_campaign, set_campaign, set_donor, set_milestone}; use crate::types::{ - CampaignData, CampaignStatus, DonorRecord, AssetInfo, StellarAsset, MilestoneData, - MilestoneStatus, Error, DataKey, + AssetInfo, CampaignData, CampaignStatus, DataKey, DonorRecord, Error, MilestoneData, + MilestoneStatus, StellarAsset, }; -use crate::storage::{set_campaign, set_donor, set_milestone, get_campaign}; -use crate::{CampaignContract, MAX_DEADLINE_GAP_SECONDS}; use crate::CampaignContractClient; -use super::with_contract; +use crate::{CampaignContract, MAX_DEADLINE_GAP_SECONDS}; /// Base ledger timestamp (1 year in seconds) so we can safely subtract /// to simulate "past" end_times without underflow. @@ -82,12 +82,7 @@ fn fund_donor(env: &Env, donor: &Address) { set_donor(env, donor, &record); } -fn create_donor_record( - env: &Env, - donor: &Address, - total_donated: i128, - refund_claimed: bool, -) { +fn create_donor_record(env: &Env, donor: &Address, total_donated: i128, refund_claimed: bool) { let record = DonorRecord { donor: donor.clone(), total_donated, @@ -132,8 +127,13 @@ fn test_initialize_fails_zero_goal() { let creator = Address::generate(&env); let end_time = env.ledger().timestamp() + 100_000; let _ = CampaignContract::initialize( - env.clone(), creator, 0, end_time, - default_accepted_assets(&env), default_milestones(&env), 0, + env.clone(), + creator, + 0, + end_time, + default_accepted_assets(&env), + default_milestones(&env), + 0, ); }); } @@ -147,8 +147,13 @@ fn test_initialize_fails_negative_goal() { let creator = Address::generate(&env); let end_time = env.ledger().timestamp() + 100_000; let _ = CampaignContract::initialize( - env.clone(), creator, -100, end_time, - default_accepted_assets(&env), default_milestones(&env), 0, + env.clone(), + creator, + -100, + end_time, + default_accepted_assets(&env), + default_milestones(&env), + 0, ); }); } @@ -163,8 +168,13 @@ fn test_initialize_fails_past_end_time() { let creator = Address::generate(&env); let end_time = env.ledger().timestamp() - 1; let _ = CampaignContract::initialize( - env.clone(), creator, 1000, end_time, - default_accepted_assets(&env), default_milestones(&env), 0, + env.clone(), + creator, + 1000, + end_time, + default_accepted_assets(&env), + default_milestones(&env), + 0, ); }); } @@ -179,8 +189,13 @@ fn test_initialize_fails_empty_assets() { let end_time = env.ledger().timestamp() + 100_000; let empty_assets: Vec = Vec::new(&env); let _ = CampaignContract::initialize( - env.clone(), creator, 1000, end_time, - empty_assets, default_milestones(&env), 0, + env.clone(), + creator, + 1000, + end_time, + empty_assets, + default_milestones(&env), + 0, ); }); } @@ -199,8 +214,13 @@ fn test_initialize_fails_empty_asset_code() { issuer: Some(Address::generate(&env)), }); let _ = CampaignContract::initialize( - env.clone(), creator, 1000, end_time, - assets, default_milestones(&env), 0, + env.clone(), + creator, + 1000, + end_time, + assets, + default_milestones(&env), + 0, ); }); } @@ -215,8 +235,13 @@ fn test_initialize_fails_zero_milestones() { let end_time = env.ledger().timestamp() + 100_000; let empty_milestones: Vec = Vec::new(&env); let _ = CampaignContract::initialize( - env.clone(), creator, 1000, end_time, - default_accepted_assets(&env), empty_milestones, 0, + env.clone(), + creator, + 1000, + end_time, + default_accepted_assets(&env), + empty_milestones, + 0, ); }); } @@ -244,8 +269,13 @@ fn test_initialize_fails_too_many_milestones() { }); } let _ = CampaignContract::initialize( - env.clone(), creator, 6000, end_time, - default_accepted_assets(&env), milestones, 0, + env.clone(), + creator, + 6000, + end_time, + default_accepted_assets(&env), + milestones, + 0, ); }); } @@ -260,22 +290,35 @@ fn test_initialize_fails_milestone_targets_not_ascending() { let end_time = env.ledger().timestamp() + 100_000; let mut milestones: Vec = Vec::new(&env); milestones.push_back(MilestoneData { - index: 0, target_amount: 500, released_amount: 0, + index: 0, + target_amount: 500, + released_amount: 0, description_hash: BytesN::from_array(&env, &[0u8; 32]), status: MilestoneStatus::Locked, - released_at: None, released_at_ledger: None, - release_tx: None, released_to: None, + released_at: None, + released_at_ledger: None, + release_tx: None, + released_to: None, }); milestones.push_back(MilestoneData { - index: 1, target_amount: 300, released_amount: 0, + index: 1, + target_amount: 300, + released_amount: 0, description_hash: BytesN::from_array(&env, &[0u8; 32]), status: MilestoneStatus::Locked, - released_at: None, released_at_ledger: None, - release_tx: None, released_to: None, + released_at: None, + released_at_ledger: None, + release_tx: None, + released_to: None, }); let _ = CampaignContract::initialize( - env.clone(), creator, 500, end_time, - default_accepted_assets(&env), milestones, 0, + env.clone(), + creator, + 500, + end_time, + default_accepted_assets(&env), + milestones, + 0, ); }); } @@ -290,15 +333,24 @@ fn test_initialize_fails_milestone_last_target_not_equal_goal() { let end_time = env.ledger().timestamp() + 100_000; let mut milestones: Vec = Vec::new(&env); milestones.push_back(MilestoneData { - index: 0, target_amount: 500, released_amount: 0, + index: 0, + target_amount: 500, + released_amount: 0, description_hash: BytesN::from_array(&env, &[0u8; 32]), status: MilestoneStatus::Locked, - released_at: None, released_at_ledger: None, - release_tx: None, released_to: None, + released_at: None, + released_at_ledger: None, + release_tx: None, + released_to: None, }); let _ = CampaignContract::initialize( - env.clone(), creator, 1000, end_time, - default_accepted_assets(&env), milestones, 0, + env.clone(), + creator, + 1000, + end_time, + default_accepted_assets(&env), + milestones, + 0, ); }); } @@ -375,8 +427,13 @@ fn test_donate_fails_below_minimum() { let creator = Address::generate(&env); let end_time = env.ledger().timestamp() + 100_000; let _ = CampaignContract::initialize( - env.clone(), creator, 1000, end_time, - default_accepted_assets(&env), default_milestones(&env), 100, + env.clone(), + creator, + 1000, + end_time, + default_accepted_assets(&env), + default_milestones(&env), + 100, ); let donor = Address::generate(&env); CampaignContract::donate(env.clone(), donor, 50, AssetInfo::Native); @@ -506,8 +563,13 @@ fn test_is_refund_eligible_fails_goal_reached() { let creator = Address::generate(&env); let end_time = env.ledger().timestamp() + 100_000; let _ = CampaignContract::initialize( - env.clone(), creator, 1000, end_time, - default_accepted_assets(&env), default_milestones(&env), 0, + env.clone(), + creator, + 1000, + end_time, + default_accepted_assets(&env), + default_milestones(&env), + 0, ); let mut campaign = get_campaign(&env).unwrap(); campaign.status = CampaignStatus::GoalReached; @@ -530,8 +592,13 @@ fn test_is_refund_eligible_fails_window_closed() { // Initialize with future end_time, then manually set to past + Ended let future_end = env.ledger().timestamp() + 100_000; let _ = CampaignContract::initialize( - env.clone(), creator.clone(), 1000, future_end, - default_accepted_assets(&env), default_milestones(&env), 0, + env.clone(), + creator.clone(), + 1000, + future_end, + default_accepted_assets(&env), + default_milestones(&env), + 0, ); let mut campaign = get_campaign(&env).unwrap(); campaign.end_time = env.ledger().timestamp() - (31 * 24 * 60 * 60); @@ -572,7 +639,10 @@ fn test_is_refund_eligible_fails_ended_with_released_milestones() { let donor = Address::generate(&env); create_donor_record(&env, &donor, 100, false); let eligible = CampaignContract::is_refund_eligible(env.clone(), donor); - assert!(!eligible, "Ended campaign with released milestone should not allow refunds"); + assert!( + !eligible, + "Ended campaign with released milestone should not allow refunds" + ); }); } @@ -731,7 +801,10 @@ fn test_claim_refund_eligible_cancelled() { let donor = Address::generate(&env); create_donor_record(&env, &donor, 500, false); let eligible = CampaignContract::is_refund_eligible(env.clone(), donor); - assert!(eligible, "Donor should be eligible for refund on cancelled campaign"); + assert!( + eligible, + "Donor should be eligible for refund on cancelled campaign" + ); }); } @@ -802,8 +875,13 @@ fn test_refund_window_edge_boundary() { // Initialize with future end_time, then manually set to exact boundary let future_end = env.ledger().timestamp() + 100_000; let _ = CampaignContract::initialize( - env.clone(), creator.clone(), 1000, future_end, - default_accepted_assets(&env), default_milestones(&env), 0, + env.clone(), + creator.clone(), + 1000, + future_end, + default_accepted_assets(&env), + default_milestones(&env), + 0, ); let mut campaign = get_campaign(&env).unwrap(); campaign.end_time = env.ledger().timestamp() - (30 * 24 * 60 * 60); @@ -826,8 +904,13 @@ fn test_refund_window_just_after_boundary() { // Initialize with future end_time, then manually set to just past boundary let future_end = env.ledger().timestamp() + 100_000; let _ = CampaignContract::initialize( - env.clone(), creator.clone(), 1000, future_end, - default_accepted_assets(&env), default_milestones(&env), 0, + env.clone(), + creator.clone(), + 1000, + future_end, + default_accepted_assets(&env), + default_milestones(&env), + 0, ); let mut campaign = get_campaign(&env).unwrap(); campaign.end_time = env.ledger().timestamp() - (30 * 24 * 60 * 60 + 1); @@ -836,7 +919,10 @@ fn test_refund_window_just_after_boundary() { let donor = Address::generate(&env); create_donor_record(&env, &donor, 100, false); let eligible = CampaignContract::is_refund_eligible(env.clone(), donor); - assert!(!eligible, "Should NOT be eligible just past 30-day boundary"); + assert!( + !eligible, + "Should NOT be eligible just past 30-day boundary" + ); }); } @@ -864,7 +950,10 @@ fn test_upgrade_succeeds_when_not_frozen() { // Verify the contract is not frozen by default; upgrade should not panic on the // freeze check (it will panic later when the deployer rejects the dummy hash, // so we only assert that is_frozen returns false before the call). - assert!(!crate::storage::is_frozen(&env), "Contract should not be frozen initially"); + assert!( + !crate::storage::is_frozen(&env), + "Contract should not be frozen initially" + ); }); } @@ -877,7 +966,10 @@ fn test_upgrade_succeeds_after_unfreeze() { CampaignContract::freeze(env.clone()); assert!(crate::storage::is_frozen(&env), "Contract should be frozen"); CampaignContract::unfreeze(env.clone()); - assert!(!crate::storage::is_frozen(&env), "Contract should be unfrozen after unfreeze"); + assert!( + !crate::storage::is_frozen(&env), + "Contract should be unfrozen after unfreeze" + ); }); } @@ -906,8 +998,13 @@ fn test_initialize_requires_auth() { let creator = Address::generate(&env); let end_time = env.ledger().timestamp() + 100_000; let _ = CampaignContract::initialize( - env.clone(), creator, 1000, end_time, - default_accepted_assets(&env), default_milestones(&env), 0, + env.clone(), + creator, + 1000, + end_time, + default_accepted_assets(&env), + default_milestones(&env), + 0, ); }); } diff --git a/campaign/src/test/refund_eligibility_tests.rs b/campaign/src/test/refund_eligibility_tests.rs index 96ee378..f28b633 100644 --- a/campaign/src/test/refund_eligibility_tests.rs +++ b/campaign/src/test/refund_eligibility_tests.rs @@ -8,21 +8,19 @@ use soroban_sdk::testutils::{Address as AddressTestUtils, Ledger}; use soroban_sdk::{Address, Env}; -use crate::types::{CampaignStatus, CampaignData, DonorRecord, AssetInfo, StellarAsset, MilestoneStatus}; +use super::with_contract; use crate::storage::{set_campaign, set_donor, set_milestone}; +use crate::types::{ + AssetInfo, CampaignData, CampaignStatus, DonorRecord, MilestoneStatus, StellarAsset, +}; use crate::CampaignContract; -use super::with_contract; /// Base ledger timestamp (1 year in seconds) so we can safely subtract /// to simulate "past" end_times without underflow. const BASE: u64 = 86400 * 365; /// Helper to create a test milestone -fn create_test_milestone( - env: &Env, - campaign_index: u32, - status: MilestoneStatus, -) { +fn create_test_milestone(env: &Env, campaign_index: u32, status: MilestoneStatus) { let milestone = crate::types::MilestoneData { index: campaign_index, target_amount: 1000, @@ -114,7 +112,10 @@ fn test_refund_not_eligible_campaign_goal_reached() { let donor = Address::generate(&env); create_test_donor(&env, &donor, 100, false); let eligible = CampaignContract::is_refund_eligible(env.clone(), donor.clone()); - assert!(!eligible, "GoalReached campaign should not be refund-eligible"); + assert!( + !eligible, + "GoalReached campaign should not be refund-eligible" + ); }); } @@ -142,7 +143,10 @@ fn test_refund_eligible_campaign_ended_no_milestone_released() { let donor = Address::generate(&env); create_test_donor(&env, &donor, 100, false); let eligible = CampaignContract::is_refund_eligible(env.clone(), donor.clone()); - assert!(eligible, "Ended campaign with no milestone released should be refund-eligible"); + assert!( + eligible, + "Ended campaign with no milestone released should be refund-eligible" + ); }); } @@ -167,7 +171,10 @@ fn test_refund_not_eligible_no_campaign() { let donor = Address::generate(&env); create_test_donor(&env, &donor, 100, false); let eligible = CampaignContract::is_refund_eligible(env.clone(), donor.clone()); - assert!(!eligible, "Should not be refund-eligible if campaign not initialized"); + assert!( + !eligible, + "Should not be refund-eligible if campaign not initialized" + ); }); } @@ -181,7 +188,10 @@ fn test_refund_not_eligible_window_closed() { let donor = Address::generate(&env); create_test_donor(&env, &donor, 100, false); let eligible = CampaignContract::is_refund_eligible(env.clone(), donor.clone()); - assert!(!eligible, "Refund should not be eligible after 30-day window closes"); + assert!( + !eligible, + "Refund should not be eligible after 30-day window closes" + ); }); } @@ -195,7 +205,10 @@ fn test_refund_not_eligible_already_claimed() { let donor = Address::generate(&env); create_test_donor(&env, &donor, 100, true); let eligible = CampaignContract::is_refund_eligible(env.clone(), donor.clone()); - assert!(!eligible, "Donor should not be refund-eligible if already claimed"); + assert!( + !eligible, + "Donor should not be refund-eligible if already claimed" + ); }); } @@ -209,7 +222,10 @@ fn test_refund_window_edge_case_exactly_30_days() { let donor = Address::generate(&env); create_test_donor(&env, &donor, 100, false); let eligible = CampaignContract::is_refund_eligible(env.clone(), donor.clone()); - assert!(eligible, "Should be refund-eligible at exactly 30-day boundary"); + assert!( + eligible, + "Should be refund-eligible at exactly 30-day boundary" + ); }); } @@ -223,7 +239,10 @@ fn test_refund_window_edge_case_one_second_after_30_days() { let donor = Address::generate(&env); create_test_donor(&env, &donor, 100, false); let eligible = CampaignContract::is_refund_eligible(env.clone(), donor.clone()); - assert!(!eligible, "Should not be refund-eligible after 30-day window closes"); + assert!( + !eligible, + "Should not be refund-eligible after 30-day window closes" + ); }); } @@ -237,6 +256,9 @@ fn test_refund_eligibility_all_conditions() { let donor = Address::generate(&env); create_test_donor(&env, &donor, 100, false); let eligible = CampaignContract::is_refund_eligible(env.clone(), donor.clone()); - assert!(eligible, "Should be eligible with cancelled campaign, no claim, within window"); + assert!( + eligible, + "Should be eligible with cancelled campaign, no claim, within window" + ); }); } diff --git a/campaign/src/test/release_milestone_tests.rs b/campaign/src/test/release_milestone_tests.rs index 24468c6..fb689b9 100644 --- a/campaign/src/test/release_milestone_tests.rs +++ b/campaign/src/test/release_milestone_tests.rs @@ -20,13 +20,13 @@ #![cfg(test)] use soroban_sdk::testutils::{Address as AddressTestUtils, Ledger}; -use soroban_sdk::{Address, Env, Vec, String, BytesN}; use soroban_sdk::token::StellarAssetClient; +use soroban_sdk::{Address, BytesN, Env, String, Vec}; -use crate::types::{CampaignStatus, StellarAsset, MilestoneData, MilestoneStatus, CampaignData}; +use super::with_contract; use crate::storage::{get_milestone, set_campaign, set_milestone}; +use crate::types::{CampaignData, CampaignStatus, MilestoneData, MilestoneStatus, StellarAsset}; use crate::CampaignContractClient; -use super::with_contract; /// Base ledger timestamp (1 year in seconds). const BASE: u64 = 86400 * 365; @@ -83,12 +83,7 @@ fn mint_tokens_to_contract(env: &Env) { } /// Creates a milestone with the given index, target, and status. -fn create_test_milestone( - env: &Env, - index: u32, - target_amount: i128, - status: MilestoneStatus, -) { +fn create_test_milestone(env: &Env, index: u32, target_amount: i128, status: MilestoneStatus) { let milestone = MilestoneData { index, target_amount, @@ -203,8 +198,7 @@ fn test_valid_release_sets_released_amount() { crate::release_milestone::release_milestone(&env, 0, recipient); let milestone = get_milestone(&env, 0).expect("Milestone should exist"); assert_eq!( - milestone.released_amount, - milestone.target_amount, + milestone.released_amount, milestone.target_amount, "Released amount should equal target amount after release" ); }); diff --git a/campaign/src/types.rs b/campaign/src/types.rs index ab7fb21..c70eac7 100644 --- a/campaign/src/types.rs +++ b/campaign/src/types.rs @@ -1,6 +1,6 @@ // src/types.rs -use soroban_sdk::{contracttype, contracterror, Address, BytesN, String, Vec, Env}; +use soroban_sdk::{contracterror, contracttype, Address, BytesN, Env, String, Vec}; // ─── Error enum ─────────────────────────────────────────────────────────────── @@ -14,103 +14,102 @@ use soroban_sdk::{contracttype, contracterror, Address, BytesN, String, Vec, Env pub enum Error { // ── Requested contract error codes ──────────────────────────────────── /// `initialize` called on an already-initialised contract. - AlreadyInitialized = 1, + AlreadyInitialized = 1, /// Contract has not been initialised yet. - NotInitialized = 2, + NotInitialized = 2, /// Caller is not authorised to perform the operation. - Unauthorized = 3, + Unauthorized = 3, /// The campaign deadline has already passed. - CampaignEnded = 4, + CampaignEnded = 4, /// Operation requires the campaign to be `Active` or `GoalReached`. - CampaignNotActive = 5, + CampaignNotActive = 5, /// Donated asset is not in the campaign's accepted assets list. - AssetNotAccepted = 6, + AssetNotAccepted = 6, /// Donation amount is below the campaign's minimum threshold. - DonationTooSmall = 7, + DonationTooSmall = 7, /// Milestone index is out of range for this campaign. - MilestoneNotFound = 8, + MilestoneNotFound = 8, /// Milestone has not been unlocked yet and cannot be released. - MilestoneNotUnlocked = 9, + MilestoneNotUnlocked = 9, /// A previous milestone must be released before this one can be released. PreviousMilestoneNotReleased = 10, /// Cannot cancel the campaign while it still holds funds. - CannotCancelWithFunds = 11, + CannotCancelWithFunds = 11, /// Refunds are no longer permitted for this campaign. - RefundWindowClosed = 12, + RefundWindowClosed = 12, /// `goal_amount` must be strictly positive. - InvalidGoalAmount = 13, + InvalidGoalAmount = 13, /// `end_time` must be strictly greater than the current ledger timestamp. - InvalidEndTime = 14, + InvalidEndTime = 14, /// Milestones must be strictly ascending and the last must equal `goal_amount`. - InvalidMilestones = 15, + InvalidMilestones = 15, /// Contract does not hold enough funds to fulfil the requested transfer. InsufficientContractBalance = 16, /// A checked arithmetic operation overflowed. - Overflow = 17, + Overflow = 17, // ── Additional contract errors ───────────────────────────────────────── /// `accepted_assets` must be non-empty. - InvalidAssets = 18, + InvalidAssets = 18, /// `asset_code` must be non-empty and ≤ 12 characters (Stellar limit). - InvalidAssetCode = 19, + InvalidAssetCode = 19, /// Last milestone `target_amount` does not equal `goal_amount`. - MilestoneMismatch = 20, + MilestoneMismatch = 20, /// Milestone count must be in the range [1, MAX_MILESTONES]. - InvalidMilestoneCount = 21, + InvalidMilestoneCount = 21, /// The requested campaign status transition is not permitted. - InvalidCampaignTransition = 22, + InvalidCampaignTransition = 22, /// The requested milestone status transition is not permitted. - InvalidMilestoneTransition = 23, + InvalidMilestoneTransition = 23, /// Cannot transition to `GoalReached` — raised amount < goal. - GoalNotReached = 24, + GoalNotReached = 24, /// A storage read returned an unexpectedly invalid value. - InvalidStorageValue = 25, + InvalidStorageValue = 25, /// A storage write failed (entry too large, quota exceeded, etc.). - StorageWriteError = 26, + StorageWriteError = 26, // ── Asset / transfer ───────────────────────────────────────────────── 3x /// Recipient address is the contract itself — would lock funds permanently. - InvalidRecipient = 30, + InvalidRecipient = 30, /// The asset has no issuer address; transfers require a token contract address. - MissingIssuerAddress = 31, + MissingIssuerAddress = 31, /// Computed release amount is zero after proportional rounding. - ZeroReleaseAmount = 32, + ZeroReleaseAmount = 32, /// `released_amount` already equals `target_amount`; nothing left to release. - NothingToRelease = 33, + NothingToRelease = 33, /// `released_amount` would exceed `target_amount` after this operation. MilestoneReleasedExceedsTarget = 34, // ── Milestone ──────────────────────────────────────────────────────── 4x /// Milestone is already in the `Released` state. - MilestoneAlreadyReleased = 40, + MilestoneAlreadyReleased = 40, /// All milestones must be Released before the campaign can be concluded. - UnreleasedMilestonesExist = 41, + UnreleasedMilestonesExist = 41, // ── Refunds ────────────────────────────────────────────────────────── 5x /// Refunds are only permitted when the campaign is `Cancelled` or /// `Ended` without reaching the goal. - RefundNotPermitted = 50, + RefundNotPermitted = 50, /// No donor record found for the requesting address. - NoDonorRecord = 51, + NoDonorRecord = 51, /// Donor has already claimed a refund for this campaign. - RefundAlreadyClaimed = 52, + RefundAlreadyClaimed = 52, // RefundWindowClosed is defined above as RefundWindowClosed = 12 // ── Re-entrancy / concurrency ──────────────────────────────────────── 6x /// A re-entrant call was detected; operation aborted. - ReentrantCall = 60, + ReentrantCall = 60, // ── Amount validation ───────────────────────────────────────────────────────── 7x /// A generic negative or otherwise invalid amount was supplied. - InvalidAmount = 70, + InvalidAmount = 70, // ── Upgrade / freeze ─────────────────────────────────────────────────── 8x /// Contract is frozen; all mutating operations are blocked. - ContractFrozen = 80, + ContractFrozen = 80, } - // ─── Campaign lifecycle ─────────────────────────────────────────────────────── /// Campaign status with documented transition rules. @@ -163,11 +162,11 @@ impl CampaignStatus { pub fn can_transition_to(self, next: Self) -> bool { matches!( (self, next), - (Self::Active, Self::GoalReached) - | (Self::Active, Self::Ended) - | (Self::Active, Self::Cancelled) - | (Self::GoalReached, Self::Ended) - | (Self::GoalReached, Self::Cancelled) + (Self::Active, Self::GoalReached) + | (Self::Active, Self::Ended) + | (Self::Active, Self::Cancelled) + | (Self::GoalReached, Self::Ended) + | (Self::GoalReached, Self::Cancelled) ) } } @@ -453,13 +452,22 @@ impl DonorRecord { /// Apply a new donation to this record. Panics with `Error::Overflow` if /// `total_donated` or `donation_count` overflows. - pub fn apply_donation(&mut self, env: &Env, amount: i128, time: u64, ledger: u32, asset: AssetInfo) { - self.total_donated = self.total_donated + pub fn apply_donation( + &mut self, + env: &Env, + amount: i128, + time: u64, + ledger: u32, + asset: AssetInfo, + ) { + self.total_donated = self + .total_donated .checked_add(amount) .unwrap_or_else(|| env.panic_with_error(Error::Overflow)); self.last_donation_time = time; self.last_donation_ledger = ledger; - self.donation_count = self.donation_count + self.donation_count = self + .donation_count .checked_add(1) .unwrap_or_else(|| env.panic_with_error(Error::Overflow)); self.asset = asset; @@ -569,5 +577,3 @@ pub struct RefundProcessedEvent { pub asset: AssetInfo, pub ledger: u32, } - - diff --git a/campaign/src/views.rs b/campaign/src/views.rs index 2457fcf..2b984e7 100644 --- a/campaign/src/views.rs +++ b/campaign/src/views.rs @@ -33,8 +33,8 @@ pub struct MilestoneView { /// Returns `milestone_count` if all milestones are released. #[must_use] pub fn find_next_pending_index(env: &Env) -> u32 { - let campaign = get_campaign(env) - .unwrap_or_else(|| panic_with_error!(env, Error::NotInitialized)); + let campaign = + get_campaign(env).unwrap_or_else(|| panic_with_error!(env, Error::NotInitialized)); for i in 0..campaign.milestone_count { if let Some(milestone) = get_milestone(env, i) { @@ -53,8 +53,8 @@ pub fn find_next_pending_index(env: &Env) -> u32 { /// - `Error::MilestoneNotFound` — `index` ≥ `milestone_count` or missing storage. #[must_use] pub fn get_milestone_by_index(env: &Env, index: u32) -> MilestoneView { - let campaign = get_campaign(env) - .unwrap_or_else(|| panic_with_error!(env, Error::NotInitialized)); + let campaign = + get_campaign(env).unwrap_or_else(|| panic_with_error!(env, Error::NotInitialized)); if index >= campaign.milestone_count { panic_with_error!(env, Error::MilestoneNotFound); diff --git a/campaign/test_snapshots/test/integration_tests/test_extend_deadline_happy_path.1.json b/campaign/test_snapshots/test/integration_tests/test_extend_deadline_happy_path.1.json new file mode 100644 index 0000000..882dda9 --- /dev/null +++ b/campaign/test_snapshots/test/integration_tests/test_extend_deadline_happy_path.1.json @@ -0,0 +1,466 @@ +{ + "generators": { + "address": 3, + "nonce": 0, + "mux_id": 0 + }, + "auth": [ + [], + [ + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "function_name": "", + "args": [] + } + }, + "sub_invocations": [] + } + ], + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "function_name": "", + "args": [] + } + }, + "sub_invocations": [] + } + ] + ] + ], + "ledger": { + "protocol_version": 26, + "sequence_number": 0, + "timestamp": 0, + "network_id": "0000000000000000000000000000000000000000000000000000000000000000", + "base_reserve": 0, + "min_persistent_entry_ttl": 4096, + "min_temp_entry_ttl": 16, + "max_entry_ttl": 6312000, + "ledger_entries": [ + { + "entry": { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": { + "vec": [ + { + "symbol": "CampaignData" + } + ] + }, + "durability": "persistent", + "val": { + "map": [ + { + "key": { + "symbol": "accepted_assets" + }, + "val": { + "vec": [ + { + "map": [ + { + "key": { + "symbol": "asset_code" + }, + "val": { + "string": "XLM" + } + }, + { + "key": { + "symbol": "issuer" + }, + "val": { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M" + } + } + ] + } + ] + } + }, + { + "key": { + "symbol": "concluded_at_ledger" + }, + "val": "void" + }, + { + "key": { + "symbol": "created_at_ledger" + }, + "val": { + "u32": 0 + } + }, + { + "key": { + "symbol": "created_at_time" + }, + "val": { + "u64": "0" + } + }, + { + "key": { + "symbol": "creator" + }, + "val": { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + } + }, + { + "key": { + "symbol": "end_time" + }, + "val": { + "u64": "172800" + } + }, + { + "key": { + "symbol": "goal_amount" + }, + "val": { + "i128": "1000" + } + }, + { + "key": { + "symbol": "milestone_count" + }, + "val": { + "u32": 1 + } + }, + { + "key": { + "symbol": "min_donation_amount" + }, + "val": { + "i128": "0" + } + }, + { + "key": { + "symbol": "raised_amount" + }, + "val": { + "i128": "0" + } + }, + { + "key": { + "symbol": "status" + }, + "val": { + "vec": [ + { + "symbol": "Active" + } + ] + } + } + ] + } + } + }, + "ext": "v0" + }, + "live_until": 1036800 + }, + { + "entry": { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": { + "vec": [ + { + "symbol": "MilestoneData" + }, + { + "u32": 0 + } + ] + }, + "durability": "persistent", + "val": { + "map": [ + { + "key": { + "symbol": "description_hash" + }, + "val": { + "bytes": "0101010101010101010101010101010101010101010101010101010101010101" + } + }, + { + "key": { + "symbol": "index" + }, + "val": { + "u32": 0 + } + }, + { + "key": { + "symbol": "release_tx" + }, + "val": "void" + }, + { + "key": { + "symbol": "released_amount" + }, + "val": { + "i128": "0" + } + }, + { + "key": { + "symbol": "released_at" + }, + "val": "void" + }, + { + "key": { + "symbol": "released_at_ledger" + }, + "val": "void" + }, + { + "key": { + "symbol": "released_to" + }, + "val": "void" + }, + { + "key": { + "symbol": "status" + }, + "val": { + "vec": [ + { + "symbol": "Locked" + } + ] + } + }, + { + "key": { + "symbol": "target_amount" + }, + "val": { + "i128": "1000" + } + } + ] + } + } + }, + "ext": "v0" + }, + "live_until": 1036800 + }, + { + "entry": { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": "ledger_key_contract_instance", + "durability": "persistent", + "val": { + "contract_instance": { + "executable": { + "wasm": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + "storage": null + } + } + } + }, + "ext": "v0" + }, + "live_until": 4095 + }, + { + "entry": { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": { + "ledger_key_nonce": { + "nonce": "801925984706572462" + } + }, + "durability": "temporary", + "val": "void" + } + }, + "ext": "v0" + }, + "live_until": 6311999 + }, + { + "entry": { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": { + "ledger_key_nonce": { + "nonce": "5541220902715666415" + } + }, + "durability": "temporary", + "val": "void" + } + }, + "ext": "v0" + }, + "live_until": 6311999 + }, + { + "entry": { + "last_modified_ledger_seq": 0, + "data": { + "contract_code": { + "ext": "v0", + "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "code": "" + } + }, + "ext": "v0" + }, + "live_until": 4095 + } + ] + }, + "events": [ + { + "event": { + "ext": "v0", + "contract_id": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "type_": "contract", + "body": { + "v0": { + "topics": [ + { + "string": "campaign" + }, + { + "string": "initialized" + } + ], + "data": { + "map": [ + { + "key": { + "symbol": "asset_count" + }, + "val": { + "u32": 1 + } + }, + { + "key": { + "symbol": "created_at_ledger" + }, + "val": { + "u32": 0 + } + }, + { + "key": { + "symbol": "creator" + }, + "val": { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + } + }, + { + "key": { + "symbol": "end_time" + }, + "val": { + "u64": "86400" + } + }, + { + "key": { + "symbol": "goal_amount" + }, + "val": { + "i128": "1000" + } + }, + { + "key": { + "symbol": "milestone_count" + }, + "val": { + "u32": 1 + } + } + ] + } + } + } + }, + "failed_call": false + }, + { + "event": { + "ext": "v0", + "contract_id": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "type_": "contract", + "body": { + "v0": { + "topics": [ + { + "string": "campaign" + }, + { + "string": "deadline_extended" + } + ], + "data": { + "vec": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + }, + { + "u64": "86400" + }, + { + "u64": "172800" + } + ] + } + } + } + }, + "failed_call": false + } + ] +} \ No newline at end of file diff --git a/campaign/test_snapshots/test/negative_path_tests/test_extend_deadline_fails_absurd_future_time.1.json b/campaign/test_snapshots/test/negative_path_tests/test_extend_deadline_fails_absurd_future_time.1.json new file mode 100644 index 0000000..8015c57 --- /dev/null +++ b/campaign/test_snapshots/test/negative_path_tests/test_extend_deadline_fails_absurd_future_time.1.json @@ -0,0 +1,405 @@ +{ + "generators": { + "address": 3, + "nonce": 0, + "mux_id": 0 + }, + "auth": [ + [] + ], + "ledger": { + "protocol_version": 26, + "sequence_number": 0, + "timestamp": 31536000, + "network_id": "0000000000000000000000000000000000000000000000000000000000000000", + "base_reserve": 0, + "min_persistent_entry_ttl": 4096, + "min_temp_entry_ttl": 16, + "max_entry_ttl": 6312000, + "ledger_entries": [ + { + "entry": { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": { + "vec": [ + { + "symbol": "CampaignData" + } + ] + }, + "durability": "persistent", + "val": { + "map": [ + { + "key": { + "symbol": "accepted_assets" + }, + "val": { + "vec": [ + { + "map": [ + { + "key": { + "symbol": "asset_code" + }, + "val": { + "string": "XLM" + } + }, + { + "key": { + "symbol": "issuer" + }, + "val": { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M" + } + } + ] + } + ] + } + }, + { + "key": { + "symbol": "concluded_at_ledger" + }, + "val": "void" + }, + { + "key": { + "symbol": "created_at_ledger" + }, + "val": { + "u32": 0 + } + }, + { + "key": { + "symbol": "created_at_time" + }, + "val": { + "u64": "31536000" + } + }, + { + "key": { + "symbol": "creator" + }, + "val": { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + } + }, + { + "key": { + "symbol": "end_time" + }, + "val": { + "u64": "31636000" + } + }, + { + "key": { + "symbol": "goal_amount" + }, + "val": { + "i128": "1000" + } + }, + { + "key": { + "symbol": "milestone_count" + }, + "val": { + "u32": 1 + } + }, + { + "key": { + "symbol": "min_donation_amount" + }, + "val": { + "i128": "0" + } + }, + { + "key": { + "symbol": "raised_amount" + }, + "val": { + "i128": "0" + } + }, + { + "key": { + "symbol": "status" + }, + "val": { + "vec": [ + { + "symbol": "Active" + } + ] + } + } + ] + } + } + }, + "ext": "v0" + }, + "live_until": 1036800 + }, + { + "entry": { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": { + "vec": [ + { + "symbol": "MilestoneData" + }, + { + "u32": 0 + } + ] + }, + "durability": "persistent", + "val": { + "map": [ + { + "key": { + "symbol": "description_hash" + }, + "val": { + "bytes": "0000000000000000000000000000000000000000000000000000000000000000" + } + }, + { + "key": { + "symbol": "index" + }, + "val": { + "u32": 0 + } + }, + { + "key": { + "symbol": "release_tx" + }, + "val": "void" + }, + { + "key": { + "symbol": "released_amount" + }, + "val": { + "i128": "0" + } + }, + { + "key": { + "symbol": "released_at" + }, + "val": "void" + }, + { + "key": { + "symbol": "released_at_ledger" + }, + "val": "void" + }, + { + "key": { + "symbol": "released_to" + }, + "val": "void" + }, + { + "key": { + "symbol": "status" + }, + "val": { + "vec": [ + { + "symbol": "Locked" + } + ] + } + }, + { + "key": { + "symbol": "target_amount" + }, + "val": { + "i128": "1000" + } + } + ] + } + } + }, + "ext": "v0" + }, + "live_until": 1036800 + }, + { + "entry": { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": "ledger_key_contract_instance", + "durability": "persistent", + "val": { + "contract_instance": { + "executable": { + "wasm": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + "storage": null + } + } + } + }, + "ext": "v0" + }, + "live_until": 4095 + }, + { + "entry": { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": { + "ledger_key_nonce": { + "nonce": "801925984706572462" + } + }, + "durability": "temporary", + "val": "void" + } + }, + "ext": "v0" + }, + "live_until": 6311999 + }, + { + "entry": { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": { + "ledger_key_nonce": { + "nonce": "5541220902715666415" + } + }, + "durability": "temporary", + "val": "void" + } + }, + "ext": "v0" + }, + "live_until": 6311999 + }, + { + "entry": { + "last_modified_ledger_seq": 0, + "data": { + "contract_code": { + "ext": "v0", + "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "code": "" + } + }, + "ext": "v0" + }, + "live_until": 4095 + } + ] + }, + "events": [ + { + "event": { + "ext": "v0", + "contract_id": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "type_": "contract", + "body": { + "v0": { + "topics": [ + { + "string": "campaign" + }, + { + "string": "initialized" + } + ], + "data": { + "map": [ + { + "key": { + "symbol": "asset_count" + }, + "val": { + "u32": 1 + } + }, + { + "key": { + "symbol": "created_at_ledger" + }, + "val": { + "u32": 0 + } + }, + { + "key": { + "symbol": "creator" + }, + "val": { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + } + }, + { + "key": { + "symbol": "end_time" + }, + "val": { + "u64": "31636000" + } + }, + { + "key": { + "symbol": "goal_amount" + }, + "val": { + "i128": "1000" + } + }, + { + "key": { + "symbol": "milestone_count" + }, + "val": { + "u32": 1 + } + } + ] + } + } + } + }, + "failed_call": false + } + ] +} \ No newline at end of file diff --git a/common/src/lib.rs b/common/src/lib.rs index 1bbd9bd..a41e8bf 100644 --- a/common/src/lib.rs +++ b/common/src/lib.rs @@ -7,7 +7,7 @@ //! All discriminants are stable — never renumber existing variants. #![no_std] -use soroban_sdk::{contracttype, contracterror}; +use soroban_sdk::{contracterror, contracttype}; #[contracttype] #[derive(Copy, Clone, Debug, Eq, PartialEq)] diff --git a/crates/contracts/core/src/lib.rs b/crates/contracts/core/src/lib.rs index 4fbc21e..a366ca1 100644 --- a/crates/contracts/core/src/lib.rs +++ b/crates/contracts/core/src/lib.rs @@ -7,8 +7,14 @@ //! remaining behavior is gradually migrated into the canonical contract. #![no_std] +// `Events::publish` and the bare `env.register_contract` test helper are +// marked deprecated in soroban-sdk 26.x in favour of `#[contractevent]` and +// `env.register`. Migrating every call site here is tracked as a follow-up +// issue; suppressing the warning keeps CI clean without changing the +// published event topics or test behaviour. +#![allow(deprecated)] use soroban_sdk::{ - contract, contractimpl, contracterror, contracttype, symbol_short, vec, Address, Env, String, + contract, contracterror, contractimpl, contracttype, symbol_short, vec, Address, Env, String, Symbol, Vec, }; @@ -148,7 +154,7 @@ pub struct Campaign { #[derive(Clone, Debug, Eq, PartialEq)] pub struct DonationRecord { pub donor: Address, - pub amount: i128, // net amount after fee + pub amount: i128, // net amount after fee pub fee: i128, pub asset: Symbol, pub timestamp: u64, @@ -229,7 +235,9 @@ impl OrbitChainContract { /// Initialize the contract with admin address pub fn initialize(env: Env, admin: Address) { admin.require_auth(); - env.storage().instance().set(&symbol_short!("admin"), &admin); + env.storage() + .instance() + .set(&symbol_short!("admin"), &admin); env.storage().instance().set(&symbol_short!("count"), &0u64); } @@ -267,14 +275,16 @@ impl OrbitChainContract { }; // Issue #99 – store each campaign keyed by its ID - env.storage().persistent().set(&campaign_key(count), &campaign); - env.storage().instance().set(&symbol_short!("count"), &count); + env.storage() + .persistent() + .set(&campaign_key(count), &campaign); + env.storage() + .instance() + .set(&symbol_short!("count"), &count); // Emit CampaignCreated event - env.events().publish( - (Symbol::new(&env, "CampaignCreated"), creator), - count, - ); + env.events() + .publish((Symbol::new(&env, "CampaignCreated"), creator), count); count } @@ -315,7 +325,9 @@ impl OrbitChainContract { // Update overall raised total campaign.raised += net; - env.storage().persistent().set(&campaign_key(campaign_id), &campaign); + env.storage() + .persistent() + .set(&campaign_key(campaign_id), &campaign); // Issue #102 – update per-asset raised total let prev_asset_raised: i128 = env @@ -323,9 +335,10 @@ impl OrbitChainContract { .persistent() .get(&asset_raised_key(campaign_id, &asset)) .unwrap_or(0); - env.storage() - .persistent() - .set(&asset_raised_key(campaign_id, &asset), &(prev_asset_raised + net)); + env.storage().persistent().set( + &asset_raised_key(campaign_id, &asset), + &(prev_asset_raised + net), + ); // Issue #104 – append to donation history let record = DonationRecord { @@ -341,7 +354,9 @@ impl OrbitChainContract { .get(&history_key(campaign_id)) .unwrap_or_else(|| vec![&env]); history.push_back(record); - env.storage().persistent().set(&history_key(campaign_id), &history); + env.storage() + .persistent() + .set(&history_key(campaign_id), &history); // Issue #100 – store donation metadata let metadata = DonationMetadata { @@ -364,7 +379,9 @@ impl OrbitChainContract { if !donors.contains(&donor) { donors.push_back(donor.clone()); - env.storage().persistent().set(&donors_key(campaign_id), &donors); + env.storage() + .persistent() + .set(&donors_key(campaign_id), &donors); } // Emit DonationReceived event @@ -374,12 +391,10 @@ impl OrbitChainContract { ); // Issue #142 – increment global transaction counter - let tx_count: u64 = env - .storage() + let tx_count: u64 = env.storage().instance().get(&total_tx_key()).unwrap_or(0); + env.storage() .instance() - .get(&total_tx_key()) - .unwrap_or(0); - env.storage().instance().set(&total_tx_key(), &(tx_count + 1)); + .set(&total_tx_key(), &(tx_count + 1)); // Issue #145 – increment dedicated donation counter so it can be queried // independently of withdrawals. @@ -485,7 +500,13 @@ impl OrbitChainContract { /// Issue #129 – request a withdrawal from a campaign. /// Creates a pending WithdrawalRequest that must be approved by admin (issue #131). - pub fn withdraw(env: Env, creator: Address, campaign_id: u64, recipient: Address, amount: i128) { + pub fn withdraw( + env: Env, + creator: Address, + campaign_id: u64, + recipient: Address, + amount: i128, + ) { creator.require_auth(); // Issue #130 – validate recipient (non-zero amount, valid address type enforced by SDK) @@ -529,12 +550,10 @@ impl OrbitChainContract { .set(&pending_withdrawal_key(campaign_id), &request); // Issue #142 – increment global transaction counter - let tx_count: u64 = env - .storage() + let tx_count: u64 = env.storage().instance().get(&total_tx_key()).unwrap_or(0); + env.storage() .instance() - .get(&total_tx_key()) - .unwrap_or(0); - env.storage().instance().set(&total_tx_key(), &(tx_count + 1)); + .set(&total_tx_key(), &(tx_count + 1)); // Issue #145 – increment dedicated withdrawal counter so it can be queried // independently of donations. @@ -548,7 +567,11 @@ impl OrbitChainContract { .set(&total_withdrawals_key(), &(withdrawal_count + 1)); env.events().publish( - (Symbol::new(&env, "WithdrawalRequested"), creator, campaign_id), + ( + Symbol::new(&env, "WithdrawalRequested"), + creator, + campaign_id, + ), (recipient, amount), ); } @@ -586,7 +609,9 @@ impl OrbitChainContract { panic_with_error(&env, CoreError::InsufficientFunds); } campaign.raised -= request.amount; - env.storage().persistent().set(&campaign_key(campaign_id), &campaign); + env.storage() + .persistent() + .set(&campaign_key(campaign_id), &campaign); request.status = WithdrawalStatus::Approved; env.storage() @@ -633,7 +658,11 @@ impl OrbitChainContract { .set(&pending_withdrawal_key(campaign_id), &request); env.events().publish( - (Symbol::new(&env, "TransactionSubmitted"), admin, campaign_id), + ( + Symbol::new(&env, "TransactionSubmitted"), + admin, + campaign_id, + ), request.amount, ); @@ -649,10 +678,7 @@ impl OrbitChainContract { /// Issue #142 – expose total transaction count (donations + withdrawal requests) pub fn get_total_tx_count(env: Env) -> u64 { - env.storage() - .instance() - .get(&total_tx_key()) - .unwrap_or(0) + env.storage().instance().get(&total_tx_key()).unwrap_or(0) } // ── Analytics & reporting (issues #145, #146, #147, #148) ──────────────────────────── @@ -684,10 +710,7 @@ impl OrbitChainContract { /// Issue #147 – build a per-campaign report including funding progress, donor /// count and donation count. Returns `None` if the campaign does not exist. pub fn get_campaign_report(env: Env, campaign_id: u64) -> Option { - let campaign: Campaign = env - .storage() - .persistent() - .get(&campaign_key(campaign_id))?; + let campaign: Campaign = env.storage().persistent().get(&campaign_key(campaign_id))?; // Donor count (issue #101 storage) let donors: Vec
= env @@ -967,7 +990,10 @@ mod tests { // ── Analytics & reporting tests (issues #145, #146, #147, #148) ──────────────────── /// Helper: bootstrap a contract with admin + N campaigns and return the IDs. - fn setup_with_campaigns(env: &Env, n: u32) -> (OrbitChainContractClient<'_>, Address, Address, Vec) { + fn setup_with_campaigns( + env: &Env, + n: u32, + ) -> (OrbitChainContractClient<'_>, Address, Address, Vec) { env.mock_all_auths(); let contract_id = env.register_contract(None, OrbitChainContract); let client = OrbitChainContractClient::new(env, &contract_id);