templates.events
1import smartpy as sp 2 3 4@sp.module 5def main(): 6 class C(sp.Contract): 7 @sp.entrypoint 8 def ep(self): 9 sp.emit("Hello") 10 sp.emit("World", tag="mytag") 11 sp.emit(sp.record(a="ABC", b="XYZ"), tag="mytag2") 12 sp.emit(sp.record(a="ABC", b="XYZ"), tag="mytag2", with_type=False) 13 14 15@sp.add_test() 16def test(): 17 s = sp.test_scenario("Events", main) 18 c = main.C() 19 s += c 20 c.ep()