create_crash.aes
1 contract Remote = 2 stateful entrypoint init() = 3 abort("ERROR") 4 5 contract Exposer = 6 stateful entrypoint expose(): Remote = 7 Chain.create(): Remote 8 9 main contract Catcher = 10 stateful entrypoint throw_and_catch() : bool = 11 let e = Chain.create() : Exposer 12 switch(e.expose(protected=true)) 13 None => true 14 Some(_) => false