@Severin I have a strange error where when I use deps pull or I use the latest release for cycles-ledger I get a did file that has a service, but doesn’t have the init args in the definition. Thus when I try to install the canister it has the init args function as export const init = ({ IDL }) => { return []; };
when it should be something like ie(evmrpc)
export const init = ({ IDL }) => {
const Regex = IDL.Text;
const LogFilter = IDL.Variant({
'ShowAll' : IDL.Null,
'HideAll' : IDL.Null,
'ShowPattern' : Regex,
'HidePattern' : Regex,
});
const InstallArgs = IDL.Record({
'logFilter' : IDL.Opt(LogFilter),
'demo' : IDL.Opt(IDL.Bool),
'manageApiKeys' : IDL.Opt(IDL.Vec(IDL.Principal)),
});
return [InstallArgs];
};
I’m guessing maybe this was handcrafted?
Anyway…it seems to mess up pic.js when I try to install the cycles ledger and i get
Error from Canister um5iw-rqaaa-aaaaq-qaaba-cai: Canister called `ic0.trap` with message: failed to decode call arguments: Custom(Cannot parse header 4449444c0001
Caused by:
binary parser error: index at byte offset 6).
Consider gracefully handling failures from this canister or altering the canister to handle exceptions. See documentation: http://internetcomputer.org/docs/current/references/execution-errors#trapped-explicitly
with the args being passed in of Uint8Array(6) [ 68, 73, 68, 76, 0, 1 ] which looks way too short for #Init({max_records_per…
I had to manually change it to:
export const init = ({ IDL }) => {
const ChangeIndexId = IDL.Variant({
'SetTo' : IDL.Principal,
'Unset' : IDL.Null
});
const UpgradeArgs = IDL.Record({
'change_index_id' : ChangeIndexId,
'max_blocks_per_request': IDL.Opt(IDL.Nat64) });
const InitArgs = IDL.Record({
'index_id' : IDL.Opt(IDL.Nat),
'max_blocks_per_request' : IDL.Nat64,
});
const InstallArgs = IDL.Variant({
"Upgrade" : IDL.Opt(UpgradeArgs),
"Init" : InitArgs,
});
return [InstallArgs];
};
…this works, but gets over written whenever I do generate so I had to move it to another directory which is just annoying.
I think the .did file needs to have the service line changed to:
service : (LedgerArgs) -> {
https://dashboard.internetcomputer.org/canister/um5iw-rqaaa-aaaaq-qaaba-cai