dfinity / dfinity/cycles-ledger

feature request: alternative withdrawal method by making arbitrary canister call

Open
#129 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
11
Forks
6
Avg merge
6d 17h
Merged PRs (30d)
2

Description

It would be similar to wallet_call that is offered by cycle wallet at the moment.

type WalletResultCall = variant {
  Ok : record { return: blob };
  Err : text;
};

//Call Forwarding
  wallet_call: (record {
    canister: principal;
    method_name: text;
    args: blob;
    cycles: nat64;
  }) -> (WalletResultCall);
  wallet_call128: (record {
    canister: principal;
    method_name: text;
    args: blob;
    cycles: nat;
  }) -> (WalletResultCall);

This would enable users to make calls that require cycles. For example, an ICRC token canister may want its fees paid in cycles.

I know that there is a security concern of outstanding call contexts that could prevent ledger from being upgraded. But I still think this is worth discussing.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the existing cycles-ledger canister API and the cycle wallet's wallet_call and wallet_call128 entry points described in the issue. Assess how arbitrary calls would carry cycles, then document how outstanding call contexts and ledger upgrades are handled. Done requires a decided API and an accepted security and upgradeability approach.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
backend-api-design, distributed-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.