diff --git a/examples/valid/bank.flint b/examples/valid/bank.flint index 9a3d3d14..5e750997 100644 --- a/examples/valid/bank.flint +++ b/examples/valid/bank.flint @@ -68,6 +68,11 @@ Bank :: account <- (accounts) { // Emit the Ethereum event. didCompleteTransfer(account, destination, amount) } + + @payable + public mutating func deposit(implicit value: Wei) { + balances[account].transfer(&value) + } public mutating func withdraw(amount: Int) { // Transfer some Wei from balances[account] into a local variable.