Transaction #2319

Hash 88cebd81c8db5b6afeb50762c4b2d3f245a8864155e8334fcda2ef63d49596c4
Status Success
Timestamp 286 days ago - 8/6/2023, 5:10:44 AM UTC+0
Block 2319
Stamps Used 159
Burned Fee 0.00940828 TAU
From 225ec10455f8bd8757a8889ec5ac4ca5c68dd3fd49432d901e10a4252790c746 
Contract Name submission
Function Name submit_contract

Additional Info
Nonce 48
Processor e79133b02cd2a84e2ce5d24b2f44433f61f0db7e10acedfc241e94dff06f710a
Signature 0e0930454b3e251013e392f3b6651b563e46cd4546a4c6eb49cc50291dcb1b85204bdc8d0b4bec86f883006a53b1c9cb999384605a51cf8515c8108bec47980e
Stamps Supplied 651
Stamps per TAU 169

Kwargs

code random.seed() import currency movement = Hash(default_value=0) winner = Variable() propietario = Variable() jugador = Variable() computadora = Variable() premio = Variable() @construct def seed(): movement['piedra'] = 1 movement['papel'] = 2 movement['tijera'] = 3 jugador.set(movement['piedra']) computadora.set(movement['piedra']) propietario.set(ctx.caller) premio.set(5.0) @export def Jugar(movimiento: int, precio: float): assert movimiento < 4, 'No puedes hacer ese movimiento!' assert precio == 3, 'El precio es 3 TAU' jugador.set(movimiento) computadora.set(random.randint(1, 3)) if jugador.get() == computadora.get(): return 'Empate' elif (jugador.get() == movement['piedra'] and computadora.get() == movement['tijera']) or (jugador.get() == movement['papel'] and computadora.get() == movement['piedra']) or (jugador.get() == movement['tijera'] and computadora.get() == movement['papel']): currency.transfer_from(amount=premio.get(), to=ctx.caller, main_account=propietario.get()) winner.set(ctx.caller) return str(winner.get()) else: currency.transfer_from(amount=precio, to=propietario.get(), main_account=ctx.caller) winner.set(propietario.get()) return str(winner.get()) @export def computadora(): return str(computadora.get())
name con_juego_10

State Changes

Contract con_juego_10
Variable __code__
New Value random.seed() import currency __movement = Hash(default_value=0, contract='con_juego_10', name='movement') __winner = Variable(contract='con_juego_10', name='winner') __propietario = Variable(contract='con_juego_10', name='propietario') __jugador = Variable(contract='con_juego_10', name='jugador') __computadora = Variable(contract='con_juego_10', name='computadora') __premio = Variable(contract='con_juego_10', name='premio') def ____(): __movement['piedra'] = 1 __movement['papel'] = 2 __movement['tijera'] = 3 __jugador.set(__movement['piedra']) __computadora.set(__movement['piedra']) __propietario.set(ctx.caller) __premio.set(decimal('5.0')) @__export('con_juego_10') def Jugar(movimiento: int, precio: float): assert movimiento < 4, 'No puedes hacer ese movimiento!' assert precio == 3, 'El precio es 3 TAU' __jugador.set(movimiento) __computadora.set(random.randint(1, 3)) if __jugador.get() == __computadora.get(): return 'Empate' elif __jugador.get() == __movement['piedra'] and __computadora.get( ) == __movement['tijera'] or __jugador.get() == __movement['papel' ] and __computadora.get() == __movement['piedra'] or __jugador.get( ) == __movement['tijera'] and __computadora.get() == __movement['papel' ]: currency.transfer_from(amount=__premio.get(), to=ctx.caller, main_account=__propietario.get()) __winner.set(ctx.caller) return str(__winner.get()) else: currency.transfer_from(amount=precio, to=__propietario.get(), main_account=ctx.caller) __winner.set(__propietario.get()) return str(__winner.get()) @__export('con_juego_10') def computadora(): return str(__computadora.get())
 
Contract con_juego_10
Variable __compiled__
New Value e30000000000000000000000000500000040000000738e00000065006a0183000100640064016c025a02650364006402640364048d035a0465056402640564068d025a0665056402640764068d025a0765056402640864068d025a0865056402640964068d025a0965056402640a64068d025a0a640b640c84005a0b650c64028301650d650e640d9c02640e640f840483015a0f650c6402830164106409840083015a10640153002911e9000000004eda0c636f6e5f6a7565676f5f3130da086d6f76656d656e742903da0d64656661756c745f76616c7565da08636f6e7472616374da046e616d65da0677696e6e6572290272050000007206000000da0b70726f706965746172696fda076a756761646f72da0b636f6d70757461646f7261da067072656d696f63000000000000000000000000030000004300000073520000006401740064023c006403740064043c006405740064063c0074016a027400640219008301010074036a027400640219008301010074046a0274056a068301010074076a02740864078301830101006400530029084ee901000000da06706965647261e902000000da05706170656ce903000000da0674696a6572617a03352e302909da0a5f5f6d6f76656d656e74da095f5f6a756761646f72da03736574da0d5f5f636f6d70757461646f7261da0d5f5f70726f706965746172696fda03637478da0663616c6c6572da085f5f7072656d696fda07646563696d616ca900721b000000721b000000da00da045f5f5f5f0b000000730e00000000010801080108010e010e010c01721d0000002902da0a6d6f76696d69656e746fda0670726563696f63020000000000000002000000050000004300000073160100007c0064016b00731074006402830182017c0164036b027320740064048301820174016a027c008301010074036a0274046a056405640383028301010074016a06830074036a0683006b0272506406530074016a0683007407640719006b02727074036a0683007407640819006b0273b074016a0683007407640919006b02729074036a0683007407640719006b0273b074016a0683007407640819006b0272e274036a0683007407640919006b0272e274086a09740a6a068300740b6a0c740d6a068300640a8d030100740e6a02740b6a0c83010100740f740e6a0683008301530074086a097c01740d6a068300740b6a0c640a8d030100740e6a02740d6a06830083010100740f740e6a0683008301530064005300290b4ee9040000007a1f4e6f2070756564657320686163657220657365206d6f76696d69656e746f2172100000007a12456c2070726563696f206573203320544155720c000000da06456d70617465720d0000007211000000720f0000002903da06616d6f756e74da02746fda0c6d61696e5f6163636f756e742910da0e417373657274696f6e4572726f72721300000072140000007215000000da0672616e646f6dda0772616e64696e74da036765747212000000da0863757272656e6379da0d7472616e736665725f66726f6d7219000000721700000072180000007216000000da085f5f77696e6e6572da037374722902721e000000721f000000721b000000721b000000721c000000da054a756761721500000073240000000002100110010a0112011001040116011a0116011a020e010c010c010c020c010a010e01722d000000630000000000000000000000000200000043000000730c000000740074016a0283008301530029014e2903722c00000072150000007228000000721b000000721b000000721b000000721c000000720a0000002d0000007302000000000229117226000000da04736565647229000000da04486173687212000000da085661726961626c65722b0000007216000000721300000072150000007219000000721d000000da085f5f6578706f7274da03696e74da05666c6f6174722d000000720a000000721b000000721b000000721b000000721c000000da083c6d6f64756c653e010000007316000000080108010e010c010c010c010c010c03080a06011217
 
Contract con_juego_10
Variable __developer__
New Value 225ec10455f8bd8757a8889ec5ac4ca5c68dd3fd49432d901e10a4252790c746
 
Contract con_juego_10
Variable __owner__
New Value null
 
Contract con_juego_10
Variable __submitted__
New Value 2023,8,6,5,10,45,0
 
Contract con_juego_10
Variable computadora
New Value 1
 
Contract con_juego_10
Variable jugador
New Value 1
 
Contract con_juego_10
Variable movement
Key papel
New Value 2
 
Contract con_juego_10
Variable movement
Key piedra
New Value 1
 
Contract con_juego_10
Variable movement
Key tijera
New Value 3
 
Contract con_juego_10
Variable premio
New Value 5.0
 
Contract con_juego_10
Variable propietario
New Value 225ec10455f8bd8757a8889ec5ac4ca5c68dd3fd49432d901e10a4252790c746
 
Contract currency
Variable balances
Key 225ec10455f8bd8757a8889ec5ac4ca5c68dd3fd49432d901e10a4252790c746
New Value 47280.59230720153846573