Skip to content

feat: add pre-approvals filter to c2m-bridge#1477

Open
LGLO wants to merge 2 commits into
mainfrom
c-to-m-bridge-approvals
Open

feat: add pre-approvals filter to c2m-bridge#1477
LGLO wants to merge 2 commits into
mainfrom
c-to-m-bridge-approvals

Conversation

@LGLO
Copy link
Copy Markdown
Contributor

@LGLO LGLO commented May 8, 2026

Overview

For some time the protocol bridge will remain restricted by adding pre-approvals mechanism.

Each Cardano transaction should be first approved by the governance - by adding Cardano Tx Hash to Approved set.
Then it should be submitted to Cardano.

🗹 TODO before merging

  • Ready

📌 Submission Checklist

  • All commits are signed off (git commit -s) for the DCO
  • Changes are backward-compatible (or flagged if breaking)
  • Pull request description explains why the change is needed
  • Self-reviewed the diff
  • I have included a change file, or skipped for this reason:
  • If the changes introduce a new feature, I have bumped the node minor version
  • Update documentation (if relevant)
  • Updated AGENTS.md if build commands, architecture, or workflows changed
  • No new todos introduced

🧪 Testing Evidence

Please describe any additional testing aside from CI:

  • Additional tests are provided (if possible)

🔱 Fork Strategy

  • Node Runtime Update
  • Node Client Update
  • Other:
  • N/A

Links

https://github.com/shieldedtech/midnight-c-to-m-protocol-bridge/issues/2

@LGLO LGLO requested a review from a team as a code owner May 8, 2026 12:17
Signed-off-by: Lech Głowiak <lech.glowiak@shielded.io>
@LGLO LGLO force-pushed the c-to-m-bridge-approvals branch from d09925e to 5e12e55 Compare May 8, 2026 12:32
Comment thread pallets/c2m-bridge/src/lib.rs Outdated
Comment thread pallets/c2m-bridge/src/lib.rs Outdated
Comment thread pallets/c2m-bridge/src/tests.rs Outdated
Comment thread pallets/c2m-bridge/src/lib.rs Outdated
Comment thread pallets/c2m-bridge/src/lib.rs Outdated
Comment thread pallets/c2m-bridge/src/lib.rs Outdated
Signed-off-by: Lech Głowiak <lech.glowiak@shielded.io>
) -> DispatchResult {
T::GovernanceOrigin::ensure_origin(origin)?;
for hash in hashes {
ApprovedMcTxHashes::<T>::insert(hash, ());
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need some event for it here or this one during transfer is sufficient?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need events for Approved Tx addition

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.

2 participants