Skip to content

Closes #652 - #798

Open
mansur-codes wants to merge 10 commits into
BCPathway:mainfrom
mansur-codes:main
Open

Closes #652#798
mansur-codes wants to merge 10 commits into
BCPathway:mainfrom
mansur-codes:main

Conversation

@mansur-codes

Copy link
Copy Markdown
Contributor

What does this PR do?

Adds a persistent storage mapping from a contract Address to its targeted WASM upgrade hash (BytesN<32>) as part of the Multi-Sig Gated WASM Upgrades epic. Introduces ContractUpgradeTarget(Address) as a new AdminKey variant, with set_upgrade_target (gated by require_super_admin) and get_upgrade_target functions, plus 5 unit tests covering happy paths and error states.

Type of change

  • Feature

Checklist

  • I ran pre-commit run --all-files locally and it passed
  • All CI jobs pass on this branch
  • I added or updated tests for new behaviour
  • I updated relevant docs / comments
  • No secrets or credentials are included
  • No breaking changes to public APIs (or I've documented them)

Breaking changes?

No. ContractUpgradeTarget(Address) is appended as the last variant of AdminKey to preserve ABI and storage discriminant stability.

Related issues

Closes #652

@drips-wave

drips-wave Bot commented Aug 26, 2026

Copy link
Copy Markdown

@mansur-codes Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@mansur-codes

Copy link
Copy Markdown
Contributor Author

This test (test_e2e_role_based_token_lifecycle in contracts/token/tests/roles_e2e.rs)
is consistently failing on Ubuntu CI with:

left: Err(Ok(Error(Context, InvalidAction)))
right: Err(Ok(Error(Contract, #6)))

The test passes 10/10 times locally on Windows (rustc 1.96.0) but fails
100% of the time on CI (Ubuntu, same rustc 1.96.0 pinned).

Things already tried that did not fix it:

  • Refreshing env.mock_all_auths() before the failing assertion
  • Replacing the silent if let pattern with a strict assert_eq!
  • Moving ensure_not_paused and ensure_initialized before reentrancy_guard!
    in transfer, mint, batch_mint, and batch_transfer

The error suggests the Soroban host is returning a Context-level error
before the contract's own ContractPaused logic runs, but only on Linux.
Needs investigation in a Linux environment with RUST_BACKTRACE=1.

@p3ris0n

p3ris0n commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

@mansur-codes please resolve conflicts

@p3ris0n

p3ris0n commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

@mansur-codes please resolve conflicts

@mansur-codes

Copy link
Copy Markdown
Contributor Author

I'm on it, i will resolve it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Storage] Create mapping for contract ID to WASM hash

2 participants