tx · 6SqBpdzyNuRDS4TWdbwA4nC4TLXyGre3hzDEQDrUepJv

3N18S8xfWJYHVuGfJcpcPVh7LsnqR9hKTcc:  -0.01400000 Waves

2019.09.08 12:22 [666911] smart account 3N18S8xfWJYHVuGfJcpcPVh7LsnqR9hKTcc > SELF 0.00000000 Waves

{ "type": 13, "id": "6SqBpdzyNuRDS4TWdbwA4nC4TLXyGre3hzDEQDrUepJv", "fee": 1400000, "feeAssetId": null, "timestamp": 1567934541565, "version": 1, "sender": "3N18S8xfWJYHVuGfJcpcPVh7LsnqR9hKTcc", "senderPublicKey": "9cETBksYN8YMHGvDB6BEqmH9HScpCMBRZwnjCviRQ9aA", "proofs": [ "2xU7weGtVWk1LpMCZgQ2QASRwj2xKhjHMHqGP5MvubznFemn8T4EUMGagg7tiDqBAyaGczm33vAL6fUsNgiyHbsE" ], "script": "base64:AAIDAAAAAAAAAAAAAAARAAAAAAVQUklDRQAAAAAABfXhAAAAAAALUEFURU5UUFJJQ0UAAAAAAAvrwgAAAAAABk9SQUNMRQIAAAAjM012aXNEZkE2dk5nNGk2aUtZV1o4Yld2eVA0aW1mQmI5ZXEAAAAAA1dJTgIAAAADV0lOAAAAAARMT1NFAgAAAARMT1NFAAAAAAROT05FAgAAAARub25lAQAAAA5nZXROdW1iZXJCeUtleQAAAAEAAAADa2V5BAAAAANudW0EAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEAAAAAAAAAAAAFAAAAA251bQEAAAALZ2V0U3RyQnlLZXkAAAABAAAAA2tleQQAAAADc3RyBAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhBQAAAAROT05FBQAAAANzdHIBAAAAEXZhb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b3VudAAAAAEFAAAABWxvc2VyAAAAAAAAAAABBQAAAANuaWwAAAAA7CqnuQ==", "chainId": 84, "height": 666911, "spentComplexity": 0 } View: original | compacted Prev: ACTuEEnfsTS4G32c8TdabeUCdNAQG6NQrMShCidNWiay Next: Vzswnt7gd2A5f1f7uwyfSoRmTwGhiLfkLkfqHH6kP2E Diff:
OldNewDifferences
145145 then throw("winner and loser must be different")
146146 else if ((l(P) != f))
147147 then throw("this game has already been played")
148- else WriteSet([DataEntry(P, (((Q + "-WIN;") + R) + "-LOSE")), DataEntry(F(Q), (H(Q) + 1)), DataEntry(I(R), (J(R) + 1))])
148+ else WriteSet([DataEntry(("game_" + P), (((Q + "-WIN;") + R) + "-LOSE")), DataEntry(F(Q), (H(Q) + 1)), DataEntry(I(R), (J(R) + 1))])
149149 }
150150
151151
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = 100000000
55
66 let b = 200000000
77
88 let c = "3MvisDfA6vNg4i6iKYWZ8bWvyP4imfBb9eq"
99
1010 let d = "WIN"
1111
1212 let e = "LOSE"
1313
1414 let f = "none"
1515
1616 func g (h) = {
1717 let i = {
1818 let j = getInteger(this, h)
1919 if ($isInstanceOf(j, "Int"))
2020 then {
2121 let k = j
2222 k
2323 }
2424 else 0
2525 }
2626 i
2727 }
2828
2929
3030 func l (h) = {
3131 let m = {
3232 let j = getString(this, h)
3333 if ($isInstanceOf(j, "String"))
3434 then {
3535 let k = j
3636 k
3737 }
3838 else f
3939 }
4040 m
4141 }
4242
4343
4444 func n (o,p,q,r) = if ((o > q))
4545 then false
4646 else if (if ((o == q))
4747 then (p > r)
4848 else false)
4949 then false
5050 else true
5151
5252
5353 func s (o,p,q,r,t,u,v,w,x,y,z,A) = if (!(n(o, p, q, r)))
5454 then false
5555 else if (!(n(q, r, t, u)))
5656 then false
5757 else if (!(n(t, u, v, w)))
5858 then false
5959 else if (!(n(v, w, x, y)))
6060 then false
6161 else if (!(n(x, y, z, A)))
6262 then false
6363 else true
6464
6565
6666 func B (o,p,q,r,t,u,v,w,x,y,z,A) = ((((((((((((((((((((((toString(o) + ",") + toString(p)) + ";") + toString(q)) + ",") + toString(r)) + ";") + toString(t)) + ",") + toString(u)) + ";") + toString(v)) + ",") + toString(w)) + ";") + toString(x)) + ",") + toString(y)) + ";") + toString(z)) + ",") + toString(A))
6767
6868
6969 func C (D) = (D + "_balance")
7070
7171
7272 func E (D) = g(C(D))
7373
7474
7575 func F (G) = (G + "_wincnt")
7676
7777
7878 func H (G) = g(F(G))
7979
8080
8181 func I (G) = (G + "_losecnt")
8282
8383
8484 func J (G) = g(I(G))
8585
8686
8787 @Callable(K)
8888 func patent (o,p,q,r,t,u,v,w,x,y,z,A) = {
8989 let L = extract(K.payment)
9090 if (isDefined(L.assetId))
9191 then throw("can use WAVES only at the moment")
9292 else {
9393 let M = toBase58String(K.caller.bytes)
9494 if ((L.amount != a))
9595 then throw("purchase amount cannot be not equal to the price")
9696 else if (!(s(o, p, q, r, t, u, v, w, x, y, z, A)))
9797 then throw("invalid coordinates order")
9898 else if ((l(B(o, p, q, r, t, u, v, w, x, y, z, A)) != f))
9999 then throw("this patent is already exists")
100100 else WriteSet([DataEntry(B(o, p, q, r, t, u, v, w, x, y, z, A), M)])
101101 }
102102 }
103103
104104
105105
106106 @Callable(K)
107107 func buyPatent (o,p,q,r,t,u,v,w,x,y,z,A) = {
108108 let L = extract(K.payment)
109109 if (isDefined(L.assetId))
110110 then throw("can use WAVES only at the moment")
111111 else {
112112 let M = toBase58String(K.caller.bytes)
113113 let N = l(B(o, p, q, r, t, u, v, w, x, y, z, A))
114114 if ((L.amount != b))
115115 then throw("purchase amount cannot be not equal to the price")
116116 else if (!(s(o, p, q, r, t, u, v, w, x, y, z, A)))
117117 then throw("invalid coordinates order")
118118 else if ((N == f))
119119 then throw("there is no such patent")
120120 else if ((N == M))
121121 then throw("you cannot buy your own patent")
122122 else WriteSet([DataEntry(B(o, p, q, r, t, u, v, w, x, y, z, A), M), DataEntry(C(N), (E(N) + L.amount))])
123123 }
124124 }
125125
126126
127127
128128 @Callable(K)
129129 func withdraw () = {
130130 let M = toBase58String(K.caller.bytes)
131131 let O = E(M)
132132 if ((0 >= O))
133133 then throw("insufficient balance")
134134 else ScriptResult(WriteSet([DataEntry(C(M), 0)]), TransferSet([ScriptTransfer(addressFromStringValue(M), O, unit)]))
135135 }
136136
137137
138138
139139 @Callable(K)
140140 func gameReport (P,Q,R) = {
141141 let S = toBase58String(K.caller.bytes)
142142 if ((S != c))
143143 then throw("only oracle can inform about games results")
144144 else if ((Q == R))
145145 then throw("winner and loser must be different")
146146 else if ((l(P) != f))
147147 then throw("this game has already been played")
148- else WriteSet([DataEntry(P, (((Q + "-WIN;") + R) + "-LOSE")), DataEntry(F(Q), (H(Q) + 1)), DataEntry(I(R), (J(R) + 1))])
148+ else WriteSet([DataEntry(("game_" + P), (((Q + "-WIN;") + R) + "-LOSE")), DataEntry(F(Q), (H(Q) + 1)), DataEntry(I(R), (J(R) + 1))])
149149 }
150150
151151

github/deemru/w8io/026f985 
32.47 ms