Summary

GitHub commit

https://github.com/ICPSwap-Labs/icpswap-v3-service/commit/94eeb92ad6ecc2713d38fd3bef48cd4f328a3513

Changelog

  1. Log buffer converted to a fixed-size circular buffer. Added stable _logsWriteIndex : Nat; once _logs.size() >= MAX_LOGS, new entries overwrite via _logs.put(_logsWriteIndex % MAX_LOGS, entry) instead of Buffer.remove(0), eliminating the O(n) shift on every append.
  2. getLogs(count) rewritten to read the circular buffer correctly via modular arithmetic, preserving chronological order in both pre-wrap and post-wrap states.
  3. deposit, depositFrom, withdraw, and createPasscode catch blocks now call _addLog(caller, "... exception (ambiguous): ..." , ?amount). The (ambiguous) tag is intentional — async exceptions cannot distinguish ledger success from failure.
  4. withdraw: when TOKEN.transfer returns #Err(msg), the function nletDeposit(caller, args.amount) before returning the error, insteadof silently leaving the debit in place.
  5. withdraw: removed the redundant AccountUtils.isEmptyIdentity(caby the Principal.isAnonymous guard above it).
  6. destoryPasscode now sorts (token0, token1) by principal text before calling FACTORY.deletePasscode, mirroring createPasscode. Previously, callers passing the tokens in non-canonical order would fail to match the stored passc
  7. transfer exception log now includes the recipient principal in addition to the error message.
  8. Version bumped from 3.6.0 to 3.7.0.
  9. The creation fee has been changed from 1 ICP to 5 ICP.

Wasm Verification

git fetch
git checkout 94eeb92ad6ecc2713d38fd3bef48cd4f328a3513
./build.sh
sha256sum .dfx/local/canisters/PasscodeManager/PasscodeManager.wasm
Payload

Proposal to Upgrade an SNS Controlled Canister

Target canister: 7eikv-2iaaa-aaaag-qdgwa-cai

Wasm info

Embedded module with 436647 bytes and SHA256 3d19f055a42387b3d279d27a7b9f6b3e89735dacc44718d623e7c74911558093.

Mode: Upgrade

Argument info

Upgrade argument with 51 bytes and SHA256 4449444c0004687c6868010a0000000000000002010180cab5ee01010a0000000000d00ad70101010a00000000020000ab0101.

Overview