Trying to create a canister, But call is getting rejected due to cycles not being added

I’m trying to create an instance of a canister, that is, an actor class. the first image is where I call the Cycles.add() function just before instantiating the new canister. I then immediately call the wallet_receive() method within the canister instantiated. The second image is of the wallet_receive() method in the canister that is to be instantiated.

Those cycles should be transferred with the call to Journal.Journal (and automatically accepted on installation, without any call tp Cycles.accept IIRC).

Are you running this code in the Motoko playground by any chance? As far as I’m aware, that deliberately doesn’t allow cycle transfers to prevent users syphoning off free cycles…

1 Like

ahhh. I am indeed in motoko playground. that explains it. Thank you, kindly