Created
June 16, 2025 20:10
-
-
Save fullkomnun/0f40413d9c75e37a66f7fa80c8046ce5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
program example_program1.aleo { | |
mapping data_map: address => u8; | |
// transition is executed off-chain | |
async transition save_sum(private a: u8, private b: u8) -> (u8, Future) { | |
let sum: u8 = a + b; | |
return (sum, finalize_save_sum(self.caller, sum)); | |
} | |
// finalize is executed on-chain | |
async function finalize_save_sum(caller: address, sum: u8) { | |
data_map.set(caller, sum); | |
} | |
} |
Author
fullkomnun
commented
Jun 16, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment