tx · FgdxQLhK9hLNCCsR7HWMxXX4wQiDwEUL79HygmyGvWFT

3N7Gg64FJ3ESaqn41qu1ete7zmzbmoP1AAV:  -0.01000000 Waves

2021.12.08 16:44 [1825356] smart account 3N7Gg64FJ3ESaqn41qu1ete7zmzbmoP1AAV > SELF 0.00000000 Waves

{ "type": 13, "id": "FgdxQLhK9hLNCCsR7HWMxXX4wQiDwEUL79HygmyGvWFT", "fee": 1000000, "feeAssetId": null, "timestamp": 1638971138548, "version": 2, "chainId": 84, "sender": "3N7Gg64FJ3ESaqn41qu1ete7zmzbmoP1AAV", "senderPublicKey": "5amLtMwixiEesBDKPy9dkFWntG2fNxhTs5n69JbQE9F7", "proofs": [ "5MihmKYYrdMfVhs4NPg4Sah3quNZcyRsWD4PiBbDWeuczwVRz3uRnVvQVqs7JQZYWpZ1fpQ645w6LHwHV8fKSTZH" ], "script": "base64:AAIFAAAAAAAAAAoIAhIECgIIARIAAAAAAQAAAAAFc2VwYXICAAAAAXwAAAACAAAAAWkBAAAADHNldGNoYWxsZW5nZQAAAAIAAAAEc2lkZQAAAAVzdGFrZQMDCQAAAAAAAAIFAAAABHNpZGUCAAAABWJsYWNrBgkAAAAAAAACBQAAAARzaWRlAgAAAAV3aGl0ZQQAAAADcG10AwkAAAAAAAACCQABkAAAAAEIBQAAAAFpAAAACHBheW1lbnRzAAAAAAAAAAABCQABkQAAAAIIBQAAAAFpAAAACHBheW1lbnRzAAAAAAAAAAAACQAAAgAAAAECAAAAFW11c3Qgc3Rha2Ugc29tZSB3YXZlcwMJAQAAAAlpc0RlZmluZWQAAAABCAUAAAADcG10AAAAB2Fzc2V0SWQJAAACAAAAAQIAAAAVd29ya3Mgd2l0aCB3YXZlcyBvbmx5BAAAAAxjYWxsZXJBZHJlc3MJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACCQABLAAAAAICAAAACmNoYWxsZW5nZS0FAAAADGNh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kAAAIAAAABAgAAABRjaGFsbGVuZ2Ugbm90IGV4aXN0cwkAAAIAAAABAgAAABRjaGFsbGVuZ2Ugbm90IGV4aXN0cwAAAAAcmuue", "height": 1825356, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 63aM1jzYWZQa5B18BH9SgJHfrUYH73njzfnrWWq6bWkU Next: EeGVH8qh7ygc7TszsafiTXzeGy4i18jutG5zhd9fxQhb Diff:
OldNewDifferences
3333 }
3434
3535 let challenge = split(getchallenge(callerAdress), separ)
36- if ((size(challenge) == 1))
36+ if ((size(challenge) > 0))
3737 then if ((challenge[0] == "awaiting"))
3838 then [StringEntry(("challenge-" + callerAdress), makeString(["unset", challenge[1], challenge[2]], separ))]
3939 else throw("challenge not exists")
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let separ = "|"
55
66 @Callable(i)
77 func setchallenge (side,stake) = if (if ((side == "black"))
88 then true
99 else (side == "white"))
1010 then {
1111 let pmt = if ((size(i.payments) == 1))
1212 then i.payments[0]
1313 else throw("must stake some waves")
1414 if (isDefined(pmt.assetId))
1515 then throw("works with waves only")
1616 else {
1717 let callerAdress = toBase58String(i.caller.bytes)
1818 [StringEntry(("challenge-" + callerAdress), makeString(["awaiting", side, toString(pmt.amount)], separ))]
1919 }
2020 }
2121 else throw("invalid side")
2222
2323
2424
2525 @Callable(i)
2626 func unsetchallenge () = {
2727 let callerAdress = toBase58String(i.caller.bytes)
2828 func getchallenge (challendger) = match getString(("challenge-" + challendger)) {
2929 case a: String =>
3030 getStringValue(("challenge-" + challendger))
3131 case _ =>
3232 ""
3333 }
3434
3535 let challenge = split(getchallenge(callerAdress), separ)
36- if ((size(challenge) == 1))
36+ if ((size(challenge) > 0))
3737 then if ((challenge[0] == "awaiting"))
3838 then [StringEntry(("challenge-" + callerAdress), makeString(["unset", challenge[1], challenge[2]], separ))]
3939 else throw("challenge not exists")
4040 else throw("challenge not exists")
4141 }
4242
4343

github/deemru/w8io/026f985 
25.17 ms