Hey,
I played a bit with examples from Payment-Channel-Example
There an actor type is expected in constructor of the payment-actor. I have following questions:
-
How to pass a different already existing canister as constructor argument?
- I tried
dfx deploy paymentchannel --argument '("rkp4c-7iaaa-aaaaa-aaaca-cai")'
but got the error:
nvalid data: Unable to serialize Candid values: type mismatch: "rkp4c-7iaaa-aaaaa-aaaca-cai" cannot be of type service { allowance : (Owner, Owner) -> (nat) query; approve : (Owner, nat) -> (bool); balanceOf : (Owner) -> (opt nat) query; name : () -> (text) query; symbol : () -> (text) query; totalSupply : () -> (nat) query; transfer : (Owner, nat) -> (bool); transferFrom : (Owner, Owner, nat) -> (bool); }
- I tried
-
Is it possible to define a default constructor argument in dfx.json for an motoko actor?
Thanks