fun stakingDepositMessage(value: Int, pool: Address): SendParameters { return SendParameters{ to: pool, value: value, body: beginCell().storeSlice("Deposit".asSlice()).endCell() }; } fun stakingWithdrawMessage(value: Int, pool: Address): SendParameters { return SendParameters{ to: pool, value: ton("0.05"), body: beginCell().storeUint(3665837821, 32).storeCoins(value).endCell() }; } struct WithdrawalRequests { addresses: map[Int]Address; amounts: map[Int]Int; n_requests: Int; } fun withdrawalSum(requests: WithdrawalRequests): Int { let sum: Int = 0; let i: Int = 0; while(i < requests.n_requests) { sum = sum + requests.amounts.get(i)!!; i = i + 1; } return sum; }