Skip to content
This repository has been archived by the owner on Oct 19, 2022. It is now read-only.

refactor: use management canister deposit_cycles instead of specific interface #2

Open
dpori opened this issue Apr 23, 2021 · 0 comments
Assignees
Labels
good first issue Good for newcomers

Comments

@dpori
Copy link
Contributor

dpori commented Apr 23, 2021

https://sdk.dfinity.org/docs/interface-spec/index.html#ic-candid

public type mgmtCanisterIDL = actor {
    deposit_cycles: ({canister_id: Principal}) -> ();
};


public func getManagementCanister(): mgmtCanisterIDL {
    let canister = actor("aaaaa-aa"): mgmtCanisterIDL;
    return canister;
};

let managementCanister = getManagementCanister();
managementCanister.deposit_cycles({
    canister_id = fee.feeRecipient;
});
@dpori dpori self-assigned this Apr 23, 2021
@dpori dpori added the good first issue Good for newcomers label Apr 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant