The Common Account
The common account is controlled by the chain owner (defined in the chain root contract).
This account is used to store funds collected by fees, or sent to the chain L1 address, or to invalid contracts. (this way the funds are not permanently lost)
Parameters
ParamWithdrawAmount
- the amount to harvest (defaults to 0, which means all available funds)ParamWithdrawColor
- color of the tokens to harvest (defaults to normal iotas)
- Solo
- Solo (Schema)
- Rust (Schema)
- Go (Schema)
req := solo.NewCallParams(accounts.Contract.Name, accounts.FuncHarvest.Name)
_, err := chain.PostRequestSync(req.WithIotas(1), wallet)
require.NoError(t, err)
w := coreaccounts.ScFuncs.Harvest(ctx.Sign(wallet))
w.Func.TransferIotas(1).PostToChain(chainID)
require.NoError(t, ctx.Err)
let h = coreaccounts::ScFuncs::harvest(ctx);
h.func.transfer_iotas(1).post_to_chain(chainID);
w := coreaccounts.ScFuncs.Harvest(ctx)
w.Func.TransferIotas(1).PostToChain(chainID)