jiminy-distribute
Split a token amount across N recipients by weight. Remainder goes to the last recipient so the sum always equals the input. Also does basis-point fee extraction.
= "0.16"
Two functions:
use *;
// Weighted split, dust goes to last recipient
let mut amounts = ;
proportional_split?;
// Fee extraction
let = extract_fee?;
#![no_std] / no_alloc / BPF-safe / Apache-2.0