Dfx encode principal

Thanks! @nmattia literally just helped me debug this (not all heroes wear capes) and while we did not find the solution, he found a workaround by encoding the argument in raw

#!/usr/bin/env bash

MANAGER=$(dfx identity get-principal)

dfx deploy console --argument "$(didc encode '(record {manager = principal"'${MANAGER}'";})' --format hex)" --argument-type raw

and making the argument mandatory

let call_arg = arg_data::<(ConsoleArgs,)>().0;
let manager = call_arg.manager;

Oh that’s a good idea :+1:

3 Likes