You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
function__init__ ()
return {}
endfunctionfundfaucet ()
-- don't need to do anything here, any money you send will just be added-- to the total contract funds.endfunctiongetmoney ()
-- here we require the user to be authenticated.ifnotaccount.idthen-- this terminates the call execution and-- invalidates anything that might have happened before.error('you must be authenticated')
end-- we let the user specify how much he's going to take from the faucetlocalmoney_to_get=tonumber(call.payload.money_to_get_msats)
ifnotmoney_to_getthenmoney_to_get=10000-- default to 10 satendifmoney_to_get>100000thenmoney_to_get=100000-- the amount is limited to 100 satend-- this sends the money to the account balance of the callercontract.send(account.id, money_to_get)
end
Create a small proof of concept faucet that people can use to get started with marking
Functional requirements
The text was updated successfully, but these errors were encountered: