valid_cheatcodes.adl
1 2 // The 'test_dep' program. 3 program test_dep.alpha { 4 mapping Yo: u32 => u32; 5 record yeets { 6 owner: address, 7 val: u32, 8 } 9 10 async transition main_dep(a:u32) -> (yeets, Future) { 11 let f: Future = finalize_main_dep(a, 1u32); 12 let l: yeets = yeets {owner: self.signer, val: 1u32}; 13 return (l, f); 14 } 15 16 async function finalize_main_dep(a:u32, b:u32) { 17 Mapping::set(Yo, a, b); 18 let c:u32 = a + b; 19 } 20 } 21 22 // --- Next Program --- // 23 24 import test_dep.alpha; 25 26 program test.alpha { 27 mapping account: address => u64; 28 29 async transition main(public a: u32, public b: i64) -> Future { 30 return finish(a, b); 31 } 32 33 async function finish(public a: u32, public b: i64) { 34 CheatCode::print_mapping(account); 35 CheatCode::print_mapping(test_dep.alpha/Yo); 36 CheatCode::set_block_height(1u32); 37 CheatCode::set_block_height(a); 38 CheatCode::set_block_timestamp(100i64); 39 CheatCode::set_block_timestamp(b); 40 CheatCode::set_signer("APrivateKey1zkp8CZNn3yeCseEtxuVPbDCwSyhGW6yZKUYKfgXmcpoGPWH"); 41 } 42 }