Esempio n. 1
0
        public void TransferFrom(Address from, Address to, ulong amount)
        {
            var allowance = Allowances.GetAllowance(from, Api.GetTransaction().From);

            Api.Assert(allowance > amount, "Insufficient allowance.");

            DoTransfer(from, to, amount);
            Allowances.Reduce(from, amount);
        }
Esempio n. 2
0
 public ulong Allowance(Address owner, Address spender)
 {
     return(Allowances.GetAllowance(owner, spender));
 }