From f99927244208185ca0368aacd0264e3ba2f5bad4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rados=C5=82aw=20Rowicki?= <35342116+radrow@users.noreply.github.com> Date: Mon, 23 Mar 2020 12:23:52 +0100 Subject: [PATCH] Fixed example --- docs/sophia.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/sophia.md b/docs/sophia.md index 3195870..7432d7a 100644 --- a/docs/sophia.md +++ b/docs/sophia.md @@ -1012,8 +1012,8 @@ contract FundMe = deadline : int, goal : int } - function spend(args : spend_args) = - raw_spend(args.recipient, args.amount) + stateful function spend(args : spend_args) = + Chain.spend(args.recipient, args.amount) entrypoint init(beneficiary, deadline, goal) : state = { contributions = {}, @@ -1052,7 +1052,6 @@ contract FundMe = require(state.total >= state.goal, "Project was not funded") spend({recipient = state.beneficiary, amount = Contract.balance }) - put(state{ beneficiary = #0 }) stateful function withdraw_contributor() = if(state.total >= state.goal) -- 2.30.2