mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-09-19 01:37:34 +03:00
[examples] Add @program
annotations.
This commit is contained in:
parent
a178456a98
commit
47f283fb9b
@ -1,4 +1,5 @@
|
||||
// This function calculates the interest accrued over ten periods for some `capital` and `rate`.
|
||||
@program
|
||||
function fixed_period_interest(capital: u32, public rate: u32) -> u32 {
|
||||
let amount: u32 = capital;
|
||||
|
||||
@ -11,6 +12,7 @@ function fixed_period_interest(capital: u32, public rate: u32) -> u32 {
|
||||
}
|
||||
|
||||
// This function calculates the interest accrued over a variable number of periods (max 50) for some `capital` and `rate`.
|
||||
@program
|
||||
function bounded_period_interest(capital: u32, public rate: u32, periods: u8) -> u32 {
|
||||
console.assert(periods <= 50u8);
|
||||
let amount: u32 = capital;
|
||||
|
Loading…
Reference in New Issue
Block a user