Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat Implement connection functionality between ICP Context and Proxy contracts #996

Merged
merged 13 commits into from
Dec 4, 2024

Conversation

alenmestrov
Copy link
Member

@alenmestrov alenmestrov commented Dec 1, 2024

Context-Proxy Contract Integration

Summary

This PR implements the integration between context and proxy contracts, enabling secure deployment and member verification for multi-signature management.

Key Features

  • Automated proxy contract deployment through context contract
    • Context contract stores and manages proxy WASM
    • Deploys new proxy instance for each context
    • Initializes proxy with correct context ID and parent context canister ID
  • Member verification system
    • Proxy contract verifies all operations with parent context
    • Checks if users are members before allowing proposal creation/approval
    • Secure cross-canister calls for verification

Changes

Context Contract Updates

  • Added proxy WASM storage and management
  • Implemented set_proxy_code for updating proxy contract code
  • Added proxy deployment logic during context creation
  • Member verification endpoint for proxy contracts

Proxy Contract Updates

  • Added context contract integration
  • Implemented member verification before proposal operations
  • Secure initialization with context parameters

Integration Tests

Added comprehensive test suite covering:

  • Proxy deployment through context contract
  • Member verification flow
  • Proposal creation and approval by verified members
  • Error cases for non-members

Build and Test Instructions

Standard build and test process:

./build.sh
cargo test --test integration -- --nocapture

Notes

  • Proxy contracts are now fully integrated with their parent context
  • All operations verify membership status
  • Secure deployment ensures correct initialization

…ent Update proxy contract, optimized tests so that they catch more variations of responses
@alenmestrov alenmestrov requested a review from miraclx December 1, 2024 19:04
@alenmestrov alenmestrov self-assigned this Dec 1, 2024
@alenmestrov alenmestrov marked this pull request as ready for review December 2, 2024 12:03
@alenmestrov alenmestrov requested a review from miraclx December 4, 2024 12:27
@alenmestrov alenmestrov merged commit 1d8f611 into feat--icp-proxy Dec 4, 2024
1 check passed
@alenmestrov alenmestrov deleted the feat--icp-context-proxy-connector branch December 4, 2024 13:32
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