Hi
My question is closely related
(Canister financing issues)
public shared({caller}) func ledger_transfer_icp(
icp_amount: Nat) : async TransferResult{
var amount = Nat64.fromNat(icp_amount);
var res: TransferResult = #Err(#TxCreatedInFuture);
// let to_ai = Account.principalToSubaccount(Principal.fromText(Const.canister_project_cycles_wallet));
let to_ = Account.accountIdentifier(
Principal.fromText("3sq5w-t7zis-qf3wl-vgvih-byre2-ttswt-vzupn-6mnpw-mju7l-jhbfi-hae"), Account.defaultSubaccount());
try{
res := await public_ledger.transfer({
to = to_;
fee = { e8s = 10_000; };
memo = 0;
from_subaccount = null;
created_at_time = null;
amount = { e8s = amount - 10_000 };
});
return res;
}
catch(e){ };
return res;
};
As a result of the error
Below is the output from the command line
ygvtn-qaaaa-aaaan-qa32a-cai - my canister cycles wallet
mxjrx-tiaaa-aaaah-aaoxq-cai - my canister where deploy test code
mlx7d-nlzwm-jsiyr-txxc2-mlgsf-hafo6-73wnd-du4xx-f2tsd-mjtum-pae - everywhere is conrtroller
I have replenished the balance wherever possible (on the screen)
I don’t understand where the error is.
Can I deploy the code in the cycles wallet? (although this is nonsense…)