Commit 7a35257f authored by Robin Freyler's avatar Robin Freyler

[examples] lang2/Erc20: add Erc20::allowance

parent 32efa54b
......@@ -72,6 +72,16 @@ mod erc20 {
fn allowance(
owner: AccountId,
spender: AccountId,
) -> Balance {
let allowance = self.allowance_of_or_zero(&owner, &spender);
fn transfer(&mut self, to: AccountId, amount: Balance) -> bool {
let from = self.env().caller();
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment