Skip to content

feat(wrapper): Create methods to call canister with arguments#116

Merged
AntonioVentilii merged 25 commits intomainfrom
feat/PAPI-wrapper-canister
Feb 20, 2026
Merged

feat(wrapper): Create methods to call canister with arguments#116
AntonioVentilii merged 25 commits intomainfrom
feat/PAPI-wrapper-canister

Conversation

@AntonioVentilii
Copy link
Collaborator

@AntonioVentilii AntonioVentilii commented Sep 19, 2025

Motivation

The PAPI wrapper is a canister that should function as a bridge between a caller and another canister that requires cycles for that specific call: it manages the cycles payment for the caller.

In this PR we create the main methods to call another canister giving the input arguments.

Note

We currently do not implement method to call the canister with text arguments (call_text) because there is a workspace dependency conflict with the Candid parser.

Nonetheless, we put the method there for future improvement.

Changes

  • Create Display trait for PaymentError.
  • Create a generic call that bridges the canisters with PAPI. It will accepts either text, blob or no args.
  • Create methods to call the canister either with no args, or with blob arguments.

Tests

Added some tests.

@AntonioVentilii AntonioVentilii changed the title DO NOT MERGE: PAPI wrapper canister feat(wrapper): Create methods to call canister with arguments Feb 20, 2026
@AntonioVentilii AntonioVentilii marked this pull request as ready for review February 20, 2026 13:12
@AntonioVentilii AntonioVentilii requested a review from a team as a code owner February 20, 2026 13:12
@AntonioVentilii AntonioVentilii merged commit 781730f into main Feb 20, 2026
13 checks passed
@AntonioVentilii AntonioVentilii deleted the feat/PAPI-wrapper-canister branch February 20, 2026 13:12
AntonioVentilii added a commit that referenced this pull request Feb 21, 2026
# Motivation

No need for the `Display` trait in `PaymentError` (introduced in
#116), since we can use the `Debug`
one in the `wrapper`.
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